Domain images and tool adapters
Ship domain tools in a provider-owned OCI image, describe them as Registry resources, and connect execution through MCP, HTTP or an operator-installed CLI adapter. Image delivery, content registration and execution authority have separate responsibilities.
Availability: the generic CLI adapter ships with Runtime v0.3.0. Upgrade its Worker/Host, Tool Executor and domain-executor installer images together, and install the provider-owned adapter manifest. Domain images are released independently; qualify each project's actual Agent Task, permissions and Artifact path. Updating documentation does not upgrade an old image. MCP and HTTP Executors retain their existing integration contracts.
Choose the execution topology
| Integration | Image and program requirements | Typical use |
|---|---|---|
| MCP | Implement the selected transport and authorization; stdio also needs an actual process | Existing MCP services, remote business APIs and tool discovery |
| Independent HTTP Executor | Implement governed execution, or run the generic CLI bridge in the provider image | Independently upgraded toolchains sharing the task Worktree |
| Worker plus remote Host CLI | Install the manifest on the Worker; the selected Run Host/sandbox must contain the executable | Operations that must use the placed sandbox and resource limits |
An independent domain tool image normally needs no Git, Codex or model credentials. A mode that runs Codex App Server inside the Run's Docker image requires those engine components in that Run image. A Worker-local engine with remote tool execution has different requirements. The deployment operator must select the topology explicitly.
Environment runtime.image constrains the selected Run sandbox. It is not a registration field for arbitrary tool services. An independent domain Executor has its own deployment image and endpoint, selected through Binding routes. A Runtime Profile does not automatically start multiple tool containers.
Image delivery requirements
- Build and publish your own OCI image. Deliver its actual
repository@sha256:<64 hexadecimal characters>, platforms, provenance, license and qualification evidence. Inheriting an OrbitSpace base image is optional. - Declare absolute executable paths, numeric execution user, cwd, installed dependencies, CPU/memory and network requirements. Package declarations match existing software; they do not run apt, pip or npm during a Task.
- Design for non-root execution, a read-only root filesystem and explicit task mounts. Deployment policy controls scratch space, process limits and networking. Business files stay within the authorized cwd.
- Provision registry access and image bytes on the execution side, then admit the actual digest, Profile, capabilities and packages. Docker Hosts inspect allowlisted images; Registry import does not pull them.
- Publish each update under a new digest and retain the provider's original image identity. Do not embed model keys, platform credentials or long-lived tokens in images or Bundles.
Content registration and execution provisioning are two steps. A Registry Bundle contains resource definitions and image references; it is not an OCI registry and does not discover trusted tool definitions from arbitrary image contents.
A runnable text-analysis example
Download these files into a development directory:
- document-cli.py: bounded JSON stdin/stdout; measures characters, lines, whitespace-delimited words and text SHA-256, without writing the cwd.
- tool-adapters.json: a fixed command mapping for
tool://document/analyze. - domain-tool.dockerfile: a provider-owned image example.
- domain-registry-bundle.json and domain-environment.json: matching resources and Environment.
Check the CLI protocol from your development directory before running an Agent:
python3 - <<'PY' | python3 document-cli.py
import hashlib, json, uuid
value = {"text": "Hello OrbitSpace\nOne protocol, multiple domains."}
wire = json.dumps(value, ensure_ascii=False, separators=(",", ":")).encode()
print(json.dumps({
"schema_version": "1", "execution_id": str(uuid.uuid4()),
"tool": "document.analyze", "workspace": ".",
"input_digest": "sha256:" + hashlib.sha256(wire).hexdigest(), "input": value
}))
PYExpect exit 0, status=succeeded, 2 lines, 6 whitespace-delimited words and a text digest, with no business files written. This checks the CLI protocol only; platform leases, approvals and durable replay require the execution service.
Replace the example.com provenance with truthful source/build metadata. Supply an approved digest-pinned PROVIDER_BASE_IMAGE that contains /usr/local/bin/python3. If the executable path differs, update both the image entrypoint and the adapter manifest.
docker build -f domain-tool.dockerfile \
--build-arg PROVIDER_BASE_IMAGE="$PROVIDER_BASE_IMAGE" \
-t "$PROVIDER_IMAGE_TAG" .This only builds a local image. Complete business checks, publish to your registry and obtain the real digest before configuring execution. No fictitious pullable digest is supplied here.
The example document/agent-runner Profile maps to the existing local-default configuration. It describes the Agent Run; the independent document service selects its image through deployment configuration. The target Host must actually offer that Profile. Its filesystem requirement does not expose filesystem tools to the model by itself.
Register the Tool and install the manifest
A Bundle Tool Version declares its concrete binding, description, object input_schema and required capabilities. The Environment pins tool://document/analyze@1.0.0, which resolves to the unversioned operation below:
{
"schema_version": "orbitspace.tool-adapters/v1",
"tools": [{
"binding": "tool://document/analyze",
"name": "document_analyze",
"tool": "document.analyze",
"command": ["/usr/local/bin/python3", "/opt/provider/document-cli.py"],
"artifact_kinds": []
}]
}name must match the Environment's projected tool name: Registry name document/analyze becomes document_analyze. tool identifies the operation received by the provider. The provider owns every CLI flag; the platform adds no --request or --result arguments. Model text is never interpolated into fixed argv.
Operators install the manifest outside Workspaces and mount it read-only. Task attachments and model arguments cannot register commands. An HTTP Executor reads ORBITSPACE_TOOL_ADAPTER_MANIFEST_FILE; a remote Worker reads ORBITSPACE_REMOTE_TOOL_ADAPTER_MANIFEST_FILE. Loading occurs at startup. Names and Bindings must be unique and cannot shadow platform operations.
The remote Host must separately allow the exact command[0] through ORBITSPACE_REMOTE_RUNTIME_ALLOWED_COMMANDS, and the selected sandbox must contain it. A manifest cannot expand the Host's command allowlist, capabilities or networking.
For an independent HTTP Executor, domain-executor-installer can provide the generic binary as a separate read-only mount without rebuilding the provider image. Domain and generic services share the same task Worktree, with independent execution state and service identities. Model credentials remain with the Worker.
ORBITSPACE_TOOL_EXECUTOR_URL=http://tool-executor:9200
ORBITSPACE_TOOL_EXECUTOR_ROUTES_JSON={"tool://document/":"http://document-executor:9200"}These are Worker deployment settings. The longest Binding prefix selects an operator-configured endpoint; the model cannot choose its URL. Production endpoints require a protected service network and matching execution credentials.
Standard streams, results and Artifacts
CLI v1 provides execution correlation and digest validation, without independently signed Task/Run/project identity. HTTP Executors currently rely on service authentication from a trusted Gateway. See tool identity and context isolation for cross-organization integration boundaries.
The bridge writes one bounded JSON request to stdin and closes the stream. The program returns one JSON result on stdout; diagnostics use stderr. Cwd is the owned task Worktree. workspace is either . or that same canonical absolute root; other roots must be rejected.
The platform assigns execution_id and input_digest; the provider echoes them unchanged. tool must match the manifest. Success requires exit 0, status=succeeded, an object result and null error. Failure/cancellation requires a nonzero exit, structured error, null result and no Artifacts.
Results also contain tool_version, nonnegative duration_ms, warnings and Artifacts; target_platform is optional. Registry version, CLI version and OCI digest are distinct identities. Protocol stdout is not duplicated into another model-context field.
File outputs need a relative path, name, media type, byte size and actual SHA-256. The manifest's artifact_kinds is a ceiling, while Run publication policy applies independently. The example uses an empty list and returns inline results only. Deliver long outputs as admitted Artifacts rather than unbounded stdout.
Format definitions: manifest Schema, request Schema, result Schema. These use URN identifiers. The closed manifest root accepts only declared fields; do not add $schema to it.
Integration and qualification order
- Check CLI success, failure, timeouts, input size and confinement independently.
- Provision the image and service. Verify Profiles, actual dependencies, mounts, UID/GID, command admission and readiness.
- Import the Bundle into an explicit project, then publish the Environment and bind a workspace Agent.
- Use a matching bridge build to verify calls and replay with the same execution ID, then run a real task through an Agent service.
- Inspect Run tool records, real outputs and Artifact digests. Check disconnection recovery, lease loss and denied permissions. Native program checks, multi-platform OCI qualification and live Agent Tasks provide different evidence.
Drain new placement and in-flight executions before changing manifests/images, verify the update and resume placement. The platform records the manifest digest. A changed mapping leaves pending remote work in outcome_unknown instead of replaying old side effects with a new command. Inspect original records and business state before further action.
See Runtime onboarding for nodes and MCP and Skills for existing remote tool services.