diff --git a/.github/workflows/buf.yml b/.github/workflows/buf.yml
index e2651a9..08e9c52 100644
--- a/.github/workflows/buf.yml
+++ b/.github/workflows/buf.yml
@@ -18,21 +18,19 @@ permissions:
contents: read
jobs:
- lint-and-breaking:
+ lint:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- with:
- fetch-depth: 0
- - name: Lint schema and check compatibility
+ - name: Lint schema
uses: bufbuild/buf-action@v1
with:
version: "1.71.0"
lint: true
format: false
- breaking: ${{ github.event_name == 'pull_request' }}
+ breaking: false
push: false
archive: false
pr_comment: false
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 703e857..811dd88 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -20,11 +20,11 @@ limitations under the License.
Thank you for your interest in OpenEngine. We welcome bug reports, feedback on
the API design, and pull requests.
-OpenEngine is a pre-adoption API draft. `proto/openengine.proto` is the canonical
-wire contract and the single source of truth. Until an external consumer adopts
-it, the schema may remove or renumber fields to stay minimal. After external
-adoption, changes within `openengine.v1` will be additive. Please open an issue
-to discuss protocol changes before sending a PR.
+OpenEngine is a pre-adoption API draft. `proto/openengine/v1/openengine.proto` is
+the canonical wire contract and the single source of truth. Until an external
+consumer adopts it, the schema may remove or renumber fields to stay minimal.
+After external adoption, changes within `openengine.v1` will be additive. Please
+open an issue to discuss protocol changes before sending a PR.
- **Bugs / feedback / design questions**: open a [GitHub issue](https://github.com/ai-dynamo/openengine/issues).
- **Pull requests**: open against `main`. Keep changes focused (one logical change per PR).
diff --git a/README.md b/README.md
index aeb79ca..e8d7ea6 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ SPDX-License-Identifier: Apache-2.0
-
+
Why OpenEngine? · API reference - · Canonical proto + · Canonical proto · Contributing
@@ -101,7 +101,7 @@ exist alongside OpenEngine. ## Capabilities The complete service is defined in -[`proto/openengine.proto`](proto/openengine.proto). +[`proto/openengine/v1/openengine.proto`](proto/openengine/v1/openengine.proto). | Area | What the contract provides | | --------------------- | ----------------------------------------------------------------------------------------------------------------- | @@ -130,11 +130,9 @@ cd openengine buf build buf lint -buf breaking --against '.git#branch=main,subdir=proto' ``` -The same lint and breaking checks run in GitHub Actions for schema pull -requests. +Buf lint runs in GitHub Actions for schema pull requests. ### Generate Python bindings @@ -156,7 +154,7 @@ python -m grpc_tools.protoc \ -I "$PROTO_INCLUDE" \ --python_out="$OUT_DIR" \ --grpc_python_out="$OUT_DIR" \ - proto/openengine.proto + proto/openengine/v1/openengine.proto ``` Other protobuf-supported languages can generate clients and servers from the @@ -190,7 +188,7 @@ git commit --signoff -m "docs: describe the change" ``` Please validate protobuf changes with Buf and keep -[`proto/openengine.proto`](proto/openengine.proto) and +[`proto/openengine/v1/openengine.proto`](proto/openengine/v1/openengine.proto) and [`docs/api.md`](docs/api.md) synchronized. ## Security diff --git a/buf.yaml b/buf.yaml index ac68faf..592b8f1 100644 --- a/buf.yaml +++ b/buf.yaml @@ -7,14 +7,8 @@ lint: use: - STANDARD except: - # The canonical v1 contract intentionally remains at proto/openengine.proto. - - PACKAGE_DIRECTORY_MATCH # OpenEngine is the public protocol name; appending Service would obscure it. - SERVICE_SUFFIX # Discovery and event RPCs intentionally return their domain message type # directly instead of adding one-field response wrappers. - RPC_RESPONSE_STANDARD_NAME - -breaking: - use: - - FILE diff --git a/docs/api.md b/docs/api.md index ffc6577..2d4a20b 100644 --- a/docs/api.md +++ b/docs/api.md @@ -5,7 +5,8 @@ SPDX-License-Identifier: Apache-2.0 # OpenEngine API v1 -This is the human-readable reference for [`openengine.v1`](../proto/openengine.proto). +This is the human-readable reference for +[`openengine.v1`](../proto/openengine/v1/openengine.proto). The proto is the source of truth. --- @@ -103,7 +104,7 @@ name remains `openengine.v1`. Discovery response scalars use proto3 `optional` presence. An absent value means the engine cannot report the value; an explicitly present zero or `false` is a -reported value and must not be replaced with an orchestrator default. +reported value and must not be replaced with a client default. Role semantics: @@ -332,9 +333,8 @@ enum Modality { } // A single multimodal input. Exactly one `source` should be set. The engine -// owns fetch/decode/preprocess -- in the sidecar deployment the orchestrator -// has no GPU/NIXL agent, so a pre-decoded/RDMA media descriptor is NOT -// representable here by design. +// owns fetch, decode, and preprocessing, so pre-decoded or RDMA media +// descriptors are not represented here. message MediaItem { Modality modality = 1; oneof source { @@ -522,7 +522,7 @@ dedicated field. Prefill flow: -1. Orchestrator sends `GenerateRequest` to a `PREFILL` engine. +1. Client sends `GenerateRequest` to a `PREFILL` engine. 2. Engine returns a `KvSessionRef` in the terminal `PrefillReady` response when decode may attach. 3. Engine owns KV session lifetime and cleanup, including finish, abort, drain, timeout, and transfer failure paths. @@ -530,7 +530,7 @@ Prefill flow: Decode flow: -1. Orchestrator sends `GenerateRequest` to a `DECODE` engine with `kv.session` set. +1. Client sends `GenerateRequest` to a `DECODE` engine with `kv.session` set. 2. Decode engine validates the session and transfer backend. 3. Decode engine generates tokens. @@ -659,7 +659,8 @@ Compatibility notes: - SGLang/vLLM-style `BlockStored`, `BlockRemoved`, and `AllBlocksCleared` are first-class OpenEngine events. - OpenEngine preserves batch timestamp, DP-rank attribution, monotonic sequence numbers, replay start sequence, topic, endpoint, replay endpoint, buffer size, HWM, and queue-size metadata. - Native OpenEngine streams should use protobuf. Existing ZMQ/msgpack publishers can be exposed through `GetKvEventSources` during migration. -- Orchestrators should prefer `SubscribeKvEvents` when available and fall back to engine-native sources when advertised. +- Clients should prefer `SubscribeKvEvents` when available and fall back to + engine-native sources when advertised. - `endpoint_addr` MUST carry a routable `host:port`, never a bind wildcard such as `*` or `0.0.0.0`. diff --git a/docs/motivation.md b/docs/motivation.md index 53c1152..4e59d2f 100644 --- a/docs/motivation.md +++ b/docs/motivation.md @@ -5,9 +5,10 @@ SPDX-License-Identifier: Apache-2.0 # Why OpenEngine -OpenEngine defines the runtime boundary between an inference engine and an -orchestrator. It lets each side change without sharing a process, dependency -tree, or private control API. +OpenEngine defines a runtime boundary around an inference engine. Applications +can call it directly, and distributed frameworks can use the same contract to +coordinate engine workers. The client and engine can change without sharing a +process, dependency tree, or private control API. ## The integration problem @@ -20,7 +21,8 @@ Inference engines already own request execution: - guided decoding, LoRA, and logprobs; - engine-specific performance work. -Orchestrators own a different set of concerns: +Distributed frameworks add a different set of concerns when coordinating +workers: - discovery and routing; - admission and load balancing; @@ -28,22 +30,27 @@ Orchestrators own a different set of concerns: - health, drain, and cancellation policy; - KV-aware scheduling across workers. -Without a shared boundary, every engine-orchestrator pair needs a separate -adapter. These adapters often import the engine, copy its launch flags, and -depend on scheduler details. Engine upgrades then become orchestrator upgrades. +Without a shared boundary, direct users need engine-specific clients and every +engine-framework pair needs a separate adapter. These integrations often import +the engine, copy its launch flags, or depend on scheduler details. Engine +upgrades then force changes in client or framework code. ## The boundary ```mermaid flowchart LR - C["Client API"] --> O["Orchestrator