6893 Commits
Author SHA1 Message Date
Trung Nguyen 246ee10485 sdk/typescript: generate TypeScript types for the API, session and events
Add a Go generator under sdk/typescript/gen that walks the Go types
exposed over the HTTP API and SSE stream, builds a JSON Schema for them
and emits TypeScript declarations into sdk/typescript/src/generated.
Output is committed; task check-ts fails when it drifts from the Go
source.

Runtime events now live in a single registry (pkg/runtime.EventTypes),
used by both the remote client and the generator, with a test that
every *Event struct is registered.
2026-11-02 14:28:54 +01:00
David Gageot d4d8f85ac6 Merge pull request #4776 from dgageot/worktree-board-411db210ae37aaa2
feat: isolate background agents in git worktrees
2026-11-02 10:46:27 +00:00
Trung Nguyen b4de8a00bd fix stale comments on the API server and core runtime paths
Comments and doc comments that drifted from the code after refactors, limited to the serve api request path (sessions, run, steer, resume, elicitation, permissions) and the core runtime it drives: the agent loop, streaming, hooks and tool dispatch, compaction, forked skills, and model overrides.
2026-11-02 11:31:33 +01:00
David Gageot 22ef4bd65c fix: preserve portable plan storage builds
Assisted-By: OpenAI
2026-11-02 11:08:01 +01:00
David Gageot 2ecedcfa4f fix: coordinate shared toolset disposal
Assisted-By: OpenAI ChatGPT
Signed-off-by: David Gageot <david.gageot@docker.com>
2026-11-02 10:13:23 +01:00
github-actions[bot] d26fdce0a7 chore: refresh models.dev snapshot (+116 -124 ~284) 2026-11-02 06:23:18 +00:00
Arnaud Héritier 72e52dca87 Merge pull request #4712 from PerryLink/mcp-env-preflight-expand
fix(config): expand ${env.X} in the MCP toolset env preflight
2026-10-31 20:15:58 +00:00
Arnaud Héritier c3c6e56008 Merge pull request #4773 from oyobbeb/fix/openai-base-url-env
fix(openai): treat OPENAI_BASE_URL as a custom endpoint
2026-10-31 19:40:05 +00:00
Arnaud Héritier ef90f0b819 Merge pull request #4774 from jaeminbird/fix/oaistream-held-finish-reason
fix(oaistream): keep a held-back stop/length finish reason
2026-10-31 19:39:46 +00:00
Arnaud Héritier 0534104098 Merge pull request #4760 from jaeminbird/fix/openai-typeless-enum
fix(tools): type typeless enum/const schemas from their values
2026-10-31 19:16:28 +00:00
Arnaud Héritier a2dffa19b4 Merge pull request #4767 from Sayt-0/feat/claude-harness-questions
feat(harness): put Claude Code's questions and plan approvals to the user
2026-10-31 11:56:14 +00:00
Djordje Lukic 8421c5b097 Merge pull request #4763 from mrhy7176/cursor/add-cloudgpu-catalog-1c10
feat: add CloudGPU provider (centralized catalog)
2026-10-30 13:33:59 +00:00
David Gageot f7db466a7b fix: isolate hook configuration per runtime
Assisted-By: OpenAI
Signed-off-by: David Gageot <david.gageot@docker.com>
2026-10-30 12:07:52 +01:00
melmennaoui f2699081dd Merge pull request #4771 from docker/fix/eval-preserve-tool-evidence
fix(evaluation): preserve full tool results in judge transcripts
2026-10-30 10:05:13 +00:00
Djordje Lukic 83ae659a18 Merge pull request #4741 from steilerDev/feat/remote-mcp-standalone-sse
feat(mcp): add remote.standalone_sse to open the streamable-HTTP standalone stream
2026-10-30 09:57:31 +00:00
Frank SteilerandClaude Sonnet 5.5 4639af6163 test(mcp): annotate intentional sleep in standalone SSE test for forbidigo
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 10:48:03 +01:00
David Gageot 21fc31fa03 fix: preserve worktree instructions in delegated sessions
Assisted-By: OpenAI
2026-10-30 10:04:17 +01:00
David Gageot 58b5922ba8 test: use portable working directory command
Assisted-By: OpenAI
2026-10-30 09:40:21 +01:00
David Gageot 0cfe98fb31 fix: dispose all shared tool graph resources
Assisted-By: OpenAI
2026-10-30 09:40:04 +01:00
David Gageot b293244253 fix: propagate recovery through nested tool owners
Assisted-By: OpenAI
2026-10-30 09:39:39 +01:00
David Gageot 15f8221734 refactor: use default queues for isolated runtimes
Assisted-By: OpenAI
2026-10-30 08:59:44 +01:00
David Gageot 8d42876b35 refactor: centralize background workspace cleanup
Assisted-By: OpenAI
2026-10-30 08:58:36 +01:00
David Gageot a6fffc4c05 fix: harden background worktree setup and resource ownership 2026-10-30 08:57:56 +01:00
David Gageot 6b469a55ab feat: isolate background agents in git worktrees 2026-10-30 08:54:56 +01:00
jaeminbird a13e4b5d4a fix(oaistream): keep a held-back stop/length finish reason
With track_usage on, the Chat Completions adapter held stop/length back
until the usage chunk but never stored it, so a provider length came out
as stop and, with no usage chunk, the reason was dropped. Store the held
reason, re-emit it on the usage chunk, and emit it before io.EOF when no
usage chunk arrives.

Refs #4624
2026-10-30 02:54:44 -04:00
Yeongbin Jeong f01c7f6b98 fix(openai): treat OPENAI_BASE_URL as a custom endpoint
The endpoint checks behind preserve_reasoning, explicit prompt-cache
breakpoints and consecutive-message merging read only base_url, so a
client pointed at a local server through OPENAI_BASE_URL was treated as
api.openai.com. Use the endpoint NewClient resolved when base_url is unset.

Fixes #4594

Signed-off-by: Yeongbin Jeong <oyobbeb@gmail.com>
2026-10-30 15:17:31 +09:00
jaeminbird 93ec8d008e fix(tools): type typeless enum/const schemas from their values
A property schema with no "type" got "type": "object" injected, first by
SchemaToMap for every provider and again by the OpenAI strict-mode
normalizer. For an enum or const node that makes the schema reject every
allowed value: pydantic emits {"enum": ["auto", 0, 1]} for
Literal["auto", 0, 1], and after conversion no value of "mode" validates,
while the tool is still sent with strict: true.

Derive the type from the enum/const values instead; other typeless nodes
still default to "object". When the OpenAI normalizer makes an optional
enum/const property required, wrap it in anyOf with null, since a "null"
type next to enum/const still rejects null. Required properties keep
"null" in their type when the enum/const lists it.

Signed-off-by: jaeminbird <jaeminbird@gmail.com>
2026-10-30 02:04:24 -04:00
Sayt-0 47321fa374 feat(codingharness): put Claude Code's questions and plan approvals to the user
The harness runs Claude Code in print mode, where AskUserQuestion and
the plan mode tools are disabled: Claude Code asked its questions in
plain text and ended the turn.

For each turn, the Claude Code driver now serves a permission_prompt
tool from an MCP server on loopback and hands it to the CLI as its
permission prompt tool. Claude Code then offers AskUserQuestion and plan
mode, and consults the tool before AskUserQuestion and ExitPlanMode
only. The driver turns them into elicitation forms and answers with the
user's choices, or with a denial when the form is declined or
dismissed.

The server requires a bearer token kept in a 0600 MCP config file, sets
a 24 hour tool timeout (Claude Code otherwise abandons an HTTP tool
call after 60 seconds), and ends open questions with the turn. Through
the new optional harness.Eliciter capability, the runtime passes an
elicitation handler only when someone can answer: serve mcp, A2A and
background agents keep plain text questions.

Signed-off-by: Sayt-0 <louis.dal-moro-compta@epita.fr>
2026-10-30 05:14:14 +00:00
Arnaud Héritier 696d6557da Merge pull request #4759 from jaeminbird/fix/context-window-stop-reason
fix(anthropic,bedrock): treat model_context_window_exceeded as truncation
2026-10-29 22:39:51 +00:00
Arnaud Héritier 077d2e4af6 Merge pull request #4754 from PerryLink/fix/code-mode-runtime-handled-tools
fix(codemode): keep runtime-handled tools out of the script toolset
2026-10-29 22:38:12 +00:00
Arnaud Héritier 709bb8bf6b Merge pull request #4744 from PerryLink/fix/mcp-toolset-env-precedence
fix(mcp): give the toolset's env precedence over the host environment
2026-10-29 22:36:38 +00:00
Arnaud Héritier c25ec5b3c4 Merge pull request #4718 from locker95/fix/stream-terminal-chunk-content
fix(runtime): keep text sent with a terminal finish reason
2026-10-29 22:34:12 +00:00
melmennaoui fcb865d638 fix(evaluation): preserve tool evidence in judge transcripts
Remove the implicit 500-byte tool-result cutoff so relevance judges can assess the same evidence recorded for the agent. Cover boundary lengths, tail and middle evidence, UTF-8, and large outputs.

Closes #4770

Assisted-By: docker-agent
Signed-off-by: melmennaoui <mohamed.elmennaoui@docker.com>
2026-10-29 23:02:31 +01:00
Djordje Lukic f15255707a fix: reject concurrent session compaction requests
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2026-10-29 20:47:08 +01:00
Sayt-0 cdc68184af feat(tui): support multi-select and titled choices in elicitation forms
The elicitation dialog rendered neither multi-select enums (an array
field whose items carry an enum or anyOf choices) nor titled choices
(oneOf with const and title), two shapes of the MCP elicitation spec
that the ACP bridge already accepts. Such fields fell back to a plain
text input.

Multi-select fields now render as checkboxes: up and down move between
the options, Space or a click toggles one, default values start
checked, and minItems and maxItems are validated. The submitted value
is the list of checked values, in option order. Titled choices show
their title with their description below, and submit their const.

Signed-off-by: Sayt-0 <louis.dal-moro-compta@epita.fr>
2026-10-29 16:27:50 +00:00
Cursor AgentandCloudGPU a70ece7245 feat: add CloudGPU provider to the embedded catalog
Register cloudgpu as an OpenAI-compatible catalog provider at
https://cloudgpu.app/v1, discover CLOUDGPU_API_KEY, and default to
deepseek-v4.1-flash.

Co-authored-by: CloudGPU <mrhy7176@users.noreply.github.com>
2026-10-29 10:12:27 +00:00
jaeminbird ed018bedd5 fix(anthropic,bedrock): treat model_context_window_exceeded as truncation
Anthropic documents the model_context_window_exceeded stop reason as
"treat the response as truncated", and returns it without a beta header
on Sonnet 4.5 and newer. Both adapters fell through to the default: the
Anthropic adapter reported stop, or tool_calls when a tool_use block had
started (so a cut-off tool call looked complete), and Bedrock reported
stop. Map it to length, like max_tokens.

Signed-off-by: jaeminbird <jaeminbird@gmail.com>
2026-10-29 04:24:05 -04:00
Djordje Lukic 9ced286177 Merge pull request #4755 from rumpl/refactor/embedded-provider-catalog
refactor: centralize providers in an embedded catalog
2026-10-28 22:23:37 +00:00
David Gageot 37b23c34f5 Merge pull request #4716 from rumpl/fix/mcp-start-after-stop
fix: allow MCP supervisors to start after an explicit stop
2026-10-28 22:23:10 +00:00
Djordje Lukic 306a0b8cb0 refactor: centralize providers in an embedded catalog
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2026-10-28 22:03:27 +01:00
PerryLink 26484ed7f7 fix(codemode): keep runtime-handled tools out of the script toolset
transfer_task (and handoff, run_skill, the background-agent and session tools) are
declared with a host-owned RuntimeHandler and no in-process Handler. Code Mode still
wrapped them into run_tools_with_javascript, so a script call failed in invokeTool with
`tool "transfer_task" is not available in code mode` while the direct tool was gone:
with code_mode_tools: true, an agent with sub_agents could not delegate at all (#4713).

Treat a non-empty RuntimeHandler like the existing exclusions: the tool is returned next
to run_tools_with_javascript and the runtime dispatches it through its handler, exactly
as without Code Mode. Tools with an in-process Handler keep being wrapped.

The regression test pins that the runtime-handled tool stays direct, is not declared in
the script functions, and keeps its RuntimeHandler.
2026-10-28 23:31:51 +08:00
David Gageot 9208dd6ab1 Merge pull request #4753 from dgageot/worktree-board-ba05f8cd0b29128e
fix: support recent sbx sandbox releases
2026-10-28 15:26:12 +00:00
David Gageot ee04211913 fix: support recent sbx sandbox releases
Assisted-By: OpenAI
Signed-off-by: David Gageot <david.gageot@docker.com>
2026-10-28 16:16:42 +01:00
Arnaud Héritier fa4b9fec0e feat(provider): add Lunaroute OpenAI-compatible provider
Register Lunaroute at https://gw.lunaroute.com/v1 with LUNAROUTE_API_KEY
and glm-5.3 as its default model. Support credential-based provider
selection, direct authenticated model discovery, and the existing OpenAI-compatible request path.

Document provider setup and limitations, add an example configuration,
and cover credential handling, model discovery, and provider requests
with tests.

Closes #4749
2026-10-28 15:00:43 +01:00
Arnaud Héritier 65a6fbbf3c Merge pull request #4007 from JinhaoSong322/add-orcarouter-provider
feat: add OrcaRouter as a built-in OpenAI-compatible provider
2026-10-27 15:58:05 +00:00
David Gageot a09be20016 fix(mcp): make stop and resume transport-safe 2026-10-27 15:50:45 +01:00
Simon Ferquel's Clanker 1e8a2050c7 openai: document nullable schema helpers
Signed-off-by: Simon Ferquel's Clanker <simonferquel-clanker@users.noreply.github.com>
2026-10-27 14:30:26 +00:00
Simon Ferquel's Clanker b8f809d2d6 openai: express nullable arrays and objects as anyOf in strict tool schemas
makeAllRequired made optional properties nullable by rewriting
"type": "array" to ["array", "null"]. OpenAI's Responses API with
strict: true rejects that form with an opaque "Invalid schema for
function" error when the property lives in an object reached through a
$defs entry that itself contains a $ref or an anyOf of $refs (for
example the Notion MCP server's query-sessions tool).

Express nullable array and object properties, both newly nullable and
already declared as a type pair, as {"anyOf": [<schema>, {"type":
"null"}]}, the form already used for $ref properties. Scalars keep the
["T", "null"] form. fixSchemaArrayItems now also looks inside the anyOf
variants so arrays without items keep getting a default.

Signed-off-by: Simon Ferquel's Clanker <simonferquel-clanker@users.noreply.github.com>
2026-10-27 14:20:17 +00:00
PerryLink 36af70cc18 fix(mcp): give the toolset's env precedence over the host environment
CreateToolSet built the child environment as the toolset's vars followed by os.Environ(), and
exec.Cmd keeps the last value for a duplicate key, so every key the host also exported won: a
toolset's `env: {GITHUB_TOKEN: org-scoped}` silently ran with the host's personal token, and
PATH/HOME/HTTPS_PROXY pins were no-ops. shell, script and background-jobs toolsets document and
implement the opposite precedence ("configured toolset env still wins on key collisions",
pkg/tools/builtin/shell/shell.go), and a test pins it for script toolsets. LSP had the same
order.

Prepend the host environment instead, and pin the order with a unit test in the mcp package.
2026-10-27 14:10:36 +00:00
JinhaoSong322andClaude bb8b58db16 feat: add OrcaRouter as a built-in OpenAI-compatible provider
Adds orcarouter as a first-class built-in alias provider, mirroring the
existing openrouter entry:

- aliases.go: register orcarouter with base_url https://api.orcarouter.ai/v1
  and ORCAROUTER_API_KEY
- config/auto.go: register orcarouter in cloudProviders (auto-selection) and
  DefaultModels (orcarouter/auto adaptive router)
- openai client: treat orcarouter as an open-model host so consecutive
  system messages are merged before sending
- docs: new providers/orcarouter page, plus rows in the provider overview,
  and configuration/models provider list
- agent-schema.json: document the new alias in the provider description
- tests: cover the alias config, auto-selection, default model, and max
  tokens for orcarouter

Rebased onto current main, retaining canonical provider IDs and adding
navigation, a runnable example, and hermetic provider wire regressions.

Gate the OrcaRouter live-API test behind explicit opt-in so configured
credentials alone never trigger paid inference during normal tests.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: JinhaoSong322 <jinhao.song@myflashcloud.com>
Signed-off-by: Arnaud Héritier <aheritier@users.noreply.github.com>
2026-10-27 14:07:49 +00:00