Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Do not multiply entities without necessity. The long-term goal is minimal code,

- A new Sandbox Provider, Harness, model provider or vendor feature changes only its adapter. It adds no Core execution path, store table or column, migration, deployment or configuration field, API field or Web UI specific to one vendor or Harness. The [Sandbox Provider guide](docs/sandbox-provider.md) and [Harness onboarding](contracts/agents-api/harness-onboarding.md) describe how to add an adapter.
- When the protocol cannot express what an adapter needs, change the protocol. Never add an optional side interface for one implementation.
- Implementing the declared `CheckpointProvider` lifecycle in one vendor's Provider is an adapter change. A vendor-only pause interface, a Core path for that vendor, vendor receipts in the store or a vendor idle setting in the deployment is not.
- Implementing the declared checkpoint lifecycle in one vendor's Provider is an adapter change. A vendor-only pause interface, a Core path for that vendor, vendor receipts in the store or a vendor idle setting in the deployment is not.
- Fix shared lifecycle, admission, cancellation, reuse and performance problems in the common flow, never in a branch selected by Harness, Runtime or vendor name. Core preparation and execution never branch on operating system or Environment source; platform support requires native CI builds and automated tests.
- Each Harness runs its own model and tool loop through a maintained upstream SDK or native protocol, in the Environment's declared workspace directory. Its native history or configuration directory is never the workspace. Never build a second executor, a hand-written model/tool loop or a compatibility framework to fabricate parity. The public API and persistence never depend on one engine's native item types.

Expand Down
2 changes: 0 additions & 2 deletions apps/web/src/features/sandbox/NodeList.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ describe("node state", () => {
expect(nodeState(node("a", { online: false }), [], true, core)).toBe("unconfirmed");
expect(nodeState(node("a", { core_url: "https://core-old.example" }), [], false, core)).toBe("old_address");
expect(nodeState(node("a", { online: false, core_url: "https://core-old.example" }), [], false, core)).toBe("old_address");
// A node Core did not enroll, such as a file-managed local one, reports no address: unknown, not old.
expect(nodeState(node("a", { core_url: "" }), [], false, core)).toBe("available");
expect(nodeState(node("a", { online: false, cleanup_pending: 2 }), [], false, core)).toBe("offline");
expect(nodeState(node("a", { provider_ready: false }), [], false, core)).toBe("degraded");
});
Expand Down
5 changes: 2 additions & 3 deletions apps/web/src/features/sandbox/NodeList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ export type NodeState = "unconfirmed" | "old_address" | "offline" | "degraded" |

/**
* Whether a node enrolled with another Core address than the deployment's
* `coreUrl`. An empty address is unknown, not old: a node Core did not enroll,
* such as a file-managed local one, reports none.
* `coreUrl`. While the deployment is unknown, no node is on an old address.
*/
export function onOldAddress(node: SandboxNode, coreUrl: string): boolean {
return Boolean(node.core_url && coreUrl && node.core_url !== coreUrl);
return coreUrl !== "" && node.core_url !== coreUrl;
}

/**
Expand Down
2 changes: 0 additions & 2 deletions apps/web/src/lib/locale-strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ export const chinese = {
"Couldn't confirm the sandbox change": "沙箱更改未能确认",
"Sandbox state couldn't be read": "无法读取沙箱状态",
"Nodes": "节点",
"Local nodes run on the Core server. Capacity and counts are reported by Core.": "本地节点运行在 Core 服务器上。容量和资源数量由 Core 上报。",
"Sandbox nodes": "沙箱节点",
"Node": "节点",
"Health": "健康状态",
Expand Down Expand Up @@ -244,7 +243,6 @@ export const chinese = {
"Automatic placement": "自动分配",
"available": "可用",
"unavailable": "不可用",
"Optional. Local nodes run on the Core server. A selected node must be available; Core will not fall back to another node.": "可选。本地节点运行在 Core 服务器上。所选节点必须可用;Core 不会自动改用其他节点。",
"Loading nodes…": "正在加载节点…",
"Retry directory": "重新加载节点目录",
"No nodes are registered.": "尚未注册节点。",
Expand Down
4 changes: 2 additions & 2 deletions contracts/agents-api/core.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6222,7 +6222,7 @@ paths:
post:
consumes:
- application/json
description: Selects a provider, enforced resource limits and pinned Runtime release. Core derives the deployment's core_url from the installation public URL and rejects a core_url member with 400. Every provider returns 409 sandbox_configuration_error while the public URL is loopback or not https. E2B credentials are write-only. E2B may omit resources to adopt the validated template build's CPU and memory, returned in specification.resources. Requires explicit expected_generation, including zero at first setup. Stale retries reject before provider validation. An identical selection at the current generation is a no-op; differing selections and file-managed deployments reject. This does not create compute or execute work.
description: Selects a provider, enforced resource limits and pinned Runtime release. Core derives the deployment's core_url from the installation public URL and rejects a core_url member with 400. Every provider returns 409 sandbox_configuration_error while the public URL is loopback or not https. E2B credentials are write-only. E2B may omit resources to adopt the validated template build's CPU and memory, returned in specification.resources. Requires explicit expected_generation, including zero at first setup. Stale retries reject before provider validation. An identical selection at the current generation is a no-op; a differing selection rejects. This does not create compute or execute work.
parameters:
- description: Deployment selection
in: body
Expand Down Expand Up @@ -6714,7 +6714,7 @@ paths:
- Sandbox Manager
/core/v1/sandbox/runtime-observations:
get:
description: Core key only. Each observation is labelled with its owning Project ID. Uses the existing read-only Runtime sampler, with bounded concurrency and no execution or provisioning. A provider with a batch metrics read, such as E2B, samples the page's running sandboxes in one bounded request.
description: Core key only. Each observation is labelled with its owning Project ID. Uses the existing read-only Runtime sampler, with bounded concurrency and no execution or provisioning.
parameters:
- description: Last Session ID from the preceding page
in: query
Expand Down
2 changes: 1 addition & 1 deletion contracts/agents-api/execution-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Execution admits only `mode: "disabled"` and `enabled: false`. Enabled or omitte
}
```

- `server_label` is nonempty and unique within the Session. Only the `http` transport is accepted; `server_url` is an absolute HTTP or HTTPS URL without credentials, query or fragment. Nonempty `headers` and `request_metadata` are rejected.
- `server_label` is nonempty and unique within the Session. Only the `http` transport is accepted; `server_url` is an absolute HTTP or HTTPS URL without credentials, query or fragment. Nonempty `headers` and `request_metadata` and an inline `authorization` are rejected.
- [Public MCP connection origin](./environments.md#public-mcp-connection-origin) owns origin defaults, placement and credential authority; [Harness capabilities](./harness-capabilities.md#tools) owns per-Harness support.
- Omitted or null `allowed_tools` permits every server tool; `[]` permits none.
- `required: true` makes native thread creation and cold resume wait for the server to initialize; a failure stops execution without replacing retained history. It needs the Runtime's `mcp_http_required` capability. Public work can be accepted or queued during the wait.
Expand Down
16 changes: 2 additions & 14 deletions contracts/agents-api/go-bindings.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,7 @@
"FunctionToolInput": {
"sources": ["#/components/schemas/AgentToolConfigParamFunction"],
"fields": {
"name": {"type": "*string"},
"description": {"type": "*string"},
"parameters": {"type": "json.RawMessage"},
"defer_loading": {"type": "json.RawMessage"}
"parameters": {"type": "json.RawMessage"}
}
},
"InlineAgent": {
Expand Down Expand Up @@ -233,16 +230,7 @@
"order": ["type", "server_label", "transport", "allowed_tools", "connection_origin", "credential_id", "request_metadata", "required"]
},
"MCPToolInput": {
"sources": ["#/components/schemas/AgentToolConfigParamMcp"],
"fields": {
"server_label": {"type": "*string"},
"allowed_tools": {"type": "json.RawMessage", "omit": false},
"connection_origin": {"omit": false},
"credential_id": {"omit": false},
"request_metadata": {"type": "json.RawMessage", "omit": false},
"required": {"type": "json.RawMessage", "omit": false}
},
"order": ["type", "server_label", "transport", "allowed_tools", "connection_origin", "credential_id", "request_metadata", "required"]
"sources": ["#/components/schemas/AgentToolConfigParamMcp"]
},
"MultiAgentConfig": {
"sources": ["#/components/schemas/MultiAgentConfigResource"],
Expand Down
5 changes: 3 additions & 2 deletions contracts/agents-api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Core targets the complete OpenAI Agents API as pinned below ([public API rule](h
| [openapi.yaml](./openapi.yaml) | The official public contract with Core's `x_agents_core` extension on Agent and Session request/response objects |
| [go-bindings.json](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/contracts/agents-api/go-bindings.json) | Go names, field representations, encoding order and stored projections; it does not define official field membership, enums or constraints |

Run `make openapi` to regenerate the public Go types, route inventory and all three OpenAPI documents. `scripts/generate-public-api.py` reads the checked-in, checksum-verified official source without network access. It selects Agents, Vaults, Files and Skills and follows their schema references, preserving union types, nullability, required fields and constraints. Core's extension types in `v1/` remain authored in Go and are added to the public schema during generation. The internal `/core/v1` and `/api/v1` documents come from handler annotations. `make check-openapi` checks freshness and the generator; it also runs through `make check-go`.
Run `make openapi` to regenerate the public Go types, the Agent request shapes, the route inventory and all three OpenAPI documents. `scripts/generate-public-api.py` reads the checked-in, checksum-verified official source without network access. It selects Agents, Vaults, Files and Skills and follows their schema references, preserving union types, nullability, required fields and constraints. The request shapes in `services/core/internal/api/official_shapes.gen.go` project `CreateAgentParams`, `UpdateAgentParams` and `SessionAgentConfigParam`; Core checks request bodies against them before it reads an Agent configuration. Core's extension types in `v1/` remain authored in Go and are added to the public schema during generation. The internal `/core/v1` and `/api/v1` documents come from handler annotations. `make check-openapi` checks freshness and the generator; it also runs through `make check-go`.

The public contract is the official API plus Core extensions. Standard fields are generated into `v1/official.gen.go`; `go-bindings.json` lists types consumed by Core and overrides only the Go representation or field order that existing storage or custom JSON encoding requires. Unspecified fields follow the official schema; shared shapes use one Go type. Selected discriminated unions also generate JSON serializers to retain required nullable fields for each variant. Other union serializers, request admission and state transitions remain implementation code. Contract tests verify that the public schema preserves the official definitions, extensions remain in `x_agents_core`, and all documents match registered routes. Official-client and raw HTTP tests verify behavior. Schema generation does not qualify an unimplemented feature; the gaps below still apply. Upstream upgrades update the OpenAPI and SDK pins together after comparison and compatibility tests.
The public contract is the official API plus Core extensions. Standard fields are generated into `v1/official.gen.go`; `go-bindings.json` lists types consumed by Core and overrides only the Go representation or field order that existing storage or custom JSON encoding requires. Unspecified fields follow the official schema; shared shapes use one Go type. Selected discriminated unions also generate JSON serializers to retain required nullable fields for each variant. Other union serializers, Core's local limits, execution admission and state transitions remain implementation code. Contract tests verify that the public schema preserves the official definitions, extensions remain in `x_agents_core`, and all documents match registered routes. Official-client and raw HTTP tests verify behavior. Schema generation does not qualify an unimplemented feature; the gaps below still apply. Upstream upgrades update the OpenAPI and SDK pins together after comparison and compatibility tests.

The official source and existing service have these recorded differences: Agents authentication errors can return a null `code`; empty Files pages return null `first_id` and `last_id`; File resources can return null `expires_at` and `status_details`. The source declares those fields non-null. The official-client response validator allows null only for these named fields and otherwise validates OpenAPI 3.1 response schemas. Files and Skills operations omit error responses in the source, so those error bodies use the upstream shared `ErrorResponse` schema. [Wire semantics](./wire-semantics.md) and raw HTTP tests qualify service behavior; the published schema retains the official definitions.

Expand Down Expand Up @@ -111,6 +111,7 @@ Each item is Core's deliberate or native behavior where the official service beh
- Explicit reasoning effort or summary, service tiers other than `auto`, enabled `web_search` and enabled programmatic tool calling are saved but rejected at Session admission.
- Harness support for tools, structured output, deferred discovery, subagents and MCP differs by Harness and placement; see the [Harness capabilities](./harness-capabilities.md). MiniMax Code has no public functions, no service-origin MCP and no image input.
- Model-derived reasoning defaults are not resolved.
- MCP tools support the `http` transport only; `stdio` is rejected, and so is an inline `authorization` on a Session MCP transport ([HTTP MCP](./execution-tools.md#http-mcp)).

**Execution and history**

Expand Down
2 changes: 1 addition & 1 deletion contracts/agents-api/runtime-observability-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Only list rows carry `disk`: null, or `{usage_bytes, limit_bytes}` with the rule
| `unsupported` | `runtime_mode_not_observable` | `none` and `self_hosted` Sessions. |
| `unavailable` | `allocation_pending` | The managed allocation does not exist yet or is being created. |
| `unavailable` | `runtime_not_running` | The allocation is being cleaned up or is released, or the provider reports the Runtime absent, stopped or suspended. |
| `unavailable` | `source_not_configured` | No observation source serves the allocation's provider. |
| `unavailable` | `source_not_configured` | This Core has no managed installation identity. |
| `unavailable` | `sample_timeout` | The provider read exceeded its deadline. |
| `unavailable` | `sample_unavailable` | The provider could not produce a current sample. |

Expand Down
Loading
Loading