Repository navigation
feat(api): add SandboxTemplate and Sandbox contracts - #2959
Merged
Merged
Conversation
Add the v1alpha3 resource, validation, generated CRDs and Kubernetes clients, and protobuf catalog contracts. Keep service registration and runtime preparation in the implementation stack. Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Define standalone sandbox lifecycle requests, shared runtime enums, and the sandbox routing metadata key. Pin the env process and filesystem descriptors and generate clients without registering runtime services. Session adoption of the shared enums follows in the implementation stack. Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
EItanya
marked this pull request as ready for review
September 26, 2026 21:12
EItanya
requested review from
a team,
Charlesthebird and
peterj
as code owners
September 26, 2026 21:12
EItanya
added this pull request to stack #2961
September 26, 2026 21:15
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
EItanya
added a commit
that referenced
this pull request
Sep 26, 2026
This PR implements standalone sandboxes so users and agents can create a scratch environment from a `SandboxTemplate`, run commands, move files, and suspend, resume, or delete it. It uses the API contracts merged in #2959. - Prepare pinned Substrate runtimes through KRT and run the env guest with a durable workspace. - Share runtime revision and instance persistence through Session and Sandbox extensions, and move Sessions onto the shared lifecycle enums. - Execute lifecycle mutations inline with client retries. Expiration remains automatic, and sandbox suspension can interrupt running processes or transfers. - Expose lifecycle and upstream env process/file services through the apiserver, plus tools on the existing MCP endpoint. Helm installs a `kagent-api` RemoteMCPServer so agents can opt into these tools through their existing bindings. - Include ownership checks, explicit Agent routing in the UI, and architecture and retry documentation. The schema changes are folded into the initial migration for pre-alpha and require a fresh database. Validation: core tests, PostgreSQL store and migration tests (including inline SQL preparation), in-process guest/gRPC/MCP tests, protobuf generation, and lint passed. The latest Helm changes passed all 366 chart tests and Helm lint; the E2E package compiles and passes focused Go lint. Live-cluster E2E coverage is included, but the latest changes have not been run against a live cluster. --------- Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
alexdarbyshire
pushed a commit
to alexdarbyshire/kagent
that referenced
this pull request
Oct 5, 2026
This PR adds API contracts for standalone sandboxes that users and agents can use as scratch environments. - Add the `SandboxTemplate` CRD and catalog service, including validation, generated CRDs, and Kubernetes clients. Templates remain independent of `Harness`. - Add `SandboxService` lifecycle contracts and shared `RuntimeState` / `RuntimeOperation` enums. - Reuse the upstream env process and filesystem contracts, with `kagent-sandbox-id` metadata identifying the target sandbox. This is the first of two stacked PRs. Service registration, runtime behavior, and Session adoption of the shared enums follow in kagent-dev#2960, which is stacked on this branch. Validation: `go test ./api/... ./core/...` passed, including PostgreSQL and CRD validation tests. `make proto-check` and `make proto-breaking` passed with no generated drift. --------- Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
alexdarbyshire
pushed a commit
to alexdarbyshire/kagent
that referenced
this pull request
Oct 5, 2026
This PR implements standalone sandboxes so users and agents can create a scratch environment from a `SandboxTemplate`, run commands, move files, and suspend, resume, or delete it. It uses the API contracts merged in kagent-dev#2959. - Prepare pinned Substrate runtimes through KRT and run the env guest with a durable workspace. - Share runtime revision and instance persistence through Session and Sandbox extensions, and move Sessions onto the shared lifecycle enums. - Execute lifecycle mutations inline with client retries. Expiration remains automatic, and sandbox suspension can interrupt running processes or transfers. - Expose lifecycle and upstream env process/file services through the apiserver, plus tools on the existing MCP endpoint. Helm installs a `kagent-api` RemoteMCPServer so agents can opt into these tools through their existing bindings. - Include ownership checks, explicit Agent routing in the UI, and architecture and retry documentation. The schema changes are folded into the initial migration for pre-alpha and require a fresh database. Validation: core tests, PostgreSQL store and migration tests (including inline SQL preparation), in-process guest/gRPC/MCP tests, protobuf generation, and lint passed. The latest Helm changes passed all 366 chart tests and Helm lint; the E2E package compiles and passes focused Go lint. Live-cluster E2E coverage is included, but the latest changes have not been run against a live cluster. --------- Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds API contracts for standalone sandboxes that users and agents can use as scratch environments.
SandboxTemplateCRD and catalog service, including validation, generated CRDs, and Kubernetes clients. Templates remain independent ofHarness.SandboxServicelifecycle contracts and sharedRuntimeState/RuntimeOperationenums.kagent-sandbox-idmetadata identifying the target sandbox.This is the first of two stacked PRs. Service registration, runtime behavior, and Session adoption of the shared enums follow in #2960, which is stacked on this branch.
Validation:
go test ./api/... ./core/...passed, including PostgreSQL and CRD validation tests.make proto-checkandmake proto-breakingpassed with no generated drift.