genaicode 2.33.0 → 2.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +1 -0
  2. package/dist/agents/drivers/anthropic-managed.d.ts +141 -0
  3. package/dist/agents/drivers/anthropic-managed.js +753 -0
  4. package/dist/agents/drivers/anthropic-managed.js.map +1 -0
  5. package/dist/agents/drivers/cursor-cloud.d.ts +78 -0
  6. package/dist/agents/drivers/cursor-cloud.js +478 -0
  7. package/dist/agents/drivers/cursor-cloud.js.map +1 -0
  8. package/dist/agents/drivers/gemini-managed.d.ts +78 -0
  9. package/dist/agents/drivers/gemini-managed.js +526 -0
  10. package/dist/agents/drivers/gemini-managed.js.map +1 -0
  11. package/dist/agents/drivers/managed-http.d.ts +28 -0
  12. package/dist/agents/drivers/managed-http.js +142 -0
  13. package/dist/agents/drivers/managed-http.js.map +1 -0
  14. package/dist/agents/drivers/openai-managed.d.ts +79 -0
  15. package/dist/agents/drivers/openai-managed.js +402 -0
  16. package/dist/agents/drivers/openai-managed.js.map +1 -0
  17. package/dist/agents/failover.d.ts +19 -1
  18. package/dist/agents/failover.js +63 -2
  19. package/dist/agents/failover.js.map +1 -1
  20. package/dist/agents/hosted.d.ts +5 -1
  21. package/dist/agents/hosted.js +45 -132
  22. package/dist/agents/hosted.js.map +1 -1
  23. package/dist/agents/managed.d.ts +154 -0
  24. package/dist/agents/managed.js +561 -0
  25. package/dist/agents/managed.js.map +1 -0
  26. package/dist/agents/runtime.d.ts +5 -1
  27. package/dist/agents/runtime.js +9 -0
  28. package/dist/agents/runtime.js.map +1 -1
  29. package/dist/agents.d.ts +11 -1
  30. package/dist/agents.js +6 -1
  31. package/dist/agents.js.map +1 -1
  32. package/dist/backend/backend.d.ts +131 -0
  33. package/dist/backend/backend.js +773 -0
  34. package/dist/backend/backend.js.map +1 -0
  35. package/dist/backend/limiter.d.ts +34 -0
  36. package/dist/backend/limiter.js +76 -0
  37. package/dist/backend/limiter.js.map +1 -0
  38. package/dist/backend/node.d.ts +10 -0
  39. package/dist/backend/node.js +124 -0
  40. package/dist/backend/node.js.map +1 -0
  41. package/dist/backend/protocol.d.ts +98 -0
  42. package/dist/backend/protocol.js +2 -0
  43. package/dist/backend/protocol.js.map +1 -0
  44. package/dist/backend/seal.d.ts +7 -0
  45. package/dist/backend/seal.js +60 -0
  46. package/dist/backend/seal.js.map +1 -0
  47. package/dist/backend.d.ts +27 -0
  48. package/dist/backend.js +25 -0
  49. package/dist/backend.js.map +1 -0
  50. package/dist/browser/invoke.d.ts +17 -0
  51. package/dist/browser/invoke.js +69 -0
  52. package/dist/browser/invoke.js.map +1 -0
  53. package/dist/browser/nano.d.ts +10 -0
  54. package/dist/browser/nano.js +10 -56
  55. package/dist/browser/nano.js.map +1 -1
  56. package/dist/browser/page-agent.d.ts +7 -0
  57. package/dist/browser/page-agent.js +26 -5
  58. package/dist/browser/page-agent.js.map +1 -1
  59. package/dist/browser/remote.d.ts +44 -0
  60. package/dist/browser/remote.js +372 -0
  61. package/dist/browser/remote.js.map +1 -0
  62. package/dist/browser.d.ts +9 -2
  63. package/dist/browser.js +8 -2
  64. package/dist/browser.js.map +1 -1
  65. package/dist/core/types.d.ts +5 -0
  66. package/dist/core/types.js.map +1 -1
  67. package/dist/index.d.ts +1 -1
  68. package/dist/index.js +1 -1
  69. package/dist/index.js.map +1 -1
  70. package/dist/providers/google-converter.js +3 -0
  71. package/dist/providers/google-converter.js.map +1 -1
  72. package/dist/providers/google.js +7 -10
  73. package/dist/providers/google.js.map +1 -1
  74. package/dist/react/page-agent-chat.js +6 -2
  75. package/dist/react/page-agent-chat.js.map +1 -1
  76. package/docs/CHANGELOG.md +38 -395
  77. package/docs/agents.md +207 -1
  78. package/docs/backend.md +125 -0
  79. package/docs/browser.md +6 -1
  80. package/docs/changelog-2.26-and-older.md +441 -0
  81. package/docs/pivot.md +1 -1
  82. package/package.json +5 -1
@@ -32,9 +32,13 @@ export function PageAgentChat(props) {
32
32
  }
33
33
  : undefined, [props.attachments, takes]);
34
34
  const status = model.status === 'downloading' ? (_jsxs("div", { className: "gc-notice gc-page-model", role: "status", children: ["Downloading the on-device model", model.progress !== undefined ? ` · ${Math.round(model.progress * 100)}%` : '…', _jsx("progress", { max: 1, value: model.progress ?? undefined }), _jsx("small", { children: "Once per browser. After that it works offline." })] })) : model.status === 'loading' ? (_jsx("div", { className: "gc-notice gc-page-model", role: "status", children: "Loading the on-device model\u2026" })) : null;
35
- const empty = missing ? ((props.unavailable ?? (_jsxs("div", { className: "gc-empty", children: [_jsx("div", { className: "gc-empty-title", children: "This assistant needs a browser with a built-in AI model" }), _jsx("p", { children: "It runs on your device, in Chrome 148 or newer on a desktop computer. Nothing is sent to a server." })] })))) : model.status === 'downloadable' && !session.turns.length ? (_jsxs("div", { className: "gc-empty", children: [props.emptyState, _jsx("p", { className: "gc-page-download", children: "The assistant runs on your device. Your browser downloads the model once (a few GB), then it works offline." }), _jsx("button", { type: "button", className: "gc-btn gc-primary", onClick: () => {
35
+ const empty = missing ? ((props.unavailable ??
36
+ (model.spent ? (_jsxs("div", { className: "gc-empty", children: [_jsx("div", { className: "gc-empty-title", children: "The assistant is resting" }), _jsxs("p", { children: ["Its allowance for today is used up.", model.spent.resetsAt !== undefined
37
+ ? ` It is back at ${new Date(model.spent.resetsAt).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}.`
38
+ : ' It is back tomorrow.'] })] })) : (_jsxs("div", { className: "gc-empty", children: [_jsx("div", { className: "gc-empty-title", children: "This assistant needs a browser with a built-in AI model" }), _jsx("p", { children: "It runs on your device, in Chrome 148 or newer on a desktop computer. Nothing is sent to a server." })] }))))) : model.status === 'downloadable' && !session.turns.length ? (_jsxs("div", { className: "gc-empty", children: [props.emptyState, _jsx("p", { className: "gc-page-download", children: "The assistant runs on your device. Your browser downloads the model once (a few GB), then it works offline." }), _jsx("button", { type: "button", className: "gc-btn gc-primary", onClick: () => {
36
39
  agent.prepare().catch(() => { });
37
40
  }, children: "Download the model" })] })) : (props.emptyState);
38
- return (_jsx(AgentChat, { state: session, onSend: agent.send, attachments: attachments, onStop: agent.stop, onApprove: agent.approve, foldSteps: props.foldSteps ?? true, formatToolName: props.formatToolName, onArtifactSubmit: null, renderFooter: () => status, header: props.header, headerExtras: _jsxs(_Fragment, { children: [percent !== undefined ? (_jsxs("span", { className: "gc-chip gc-limit", "data-level": percent >= 90 ? 'exceeded' : percent >= 70 ? 'warning' : 'ok', title: "How full the on-device model's context window is. When it fills up, the oldest messages are forgotten.", children: ["context ", percent, "%"] })) : null, _jsx("button", { type: "button", className: "gc-btn", disabled: running || !session.turns.length, onClick: agent.reset, title: "New conversation", children: "New" }), props.headerExtras] }), emptyState: empty, placeholder: props.placeholder ?? (missing ? 'Not available in this browser' : `Ask ${session.agent}…`), hint: props.hint, disabled: missing || model.status === 'checking', autoFocus: props.autoFocus, theme: props.theme, className: ['gc-page', props.className].filter(Boolean).join(' '), style: props.style }));
41
+ return (_jsx(AgentChat, { state: session, onSend: agent.send, attachments: attachments, onStop: agent.stop, onApprove: agent.approve, foldSteps: props.foldSteps ?? true, formatToolName: props.formatToolName, onArtifactSubmit: null, renderFooter: () => status, header: props.header, headerExtras: _jsxs(_Fragment, { children: [percent !== undefined ? (_jsxs("span", { className: "gc-chip gc-limit", "data-level": percent >= 90 ? 'exceeded' : percent >= 70 ? 'warning' : 'ok', title: "How full the on-device model's context window is. When it fills up, the oldest messages are forgotten.", children: ["context ", percent, "%"] })) : null, _jsx("button", { type: "button", className: "gc-btn", disabled: running || !session.turns.length, onClick: agent.reset, title: "New conversation", children: "New" }), props.headerExtras] }), emptyState: empty, placeholder: props.placeholder ??
42
+ (missing ? (model.spent ? 'Back later' : 'Not available in this browser') : `Ask ${session.agent}…`), hint: props.hint, disabled: missing || model.status === 'checking', autoFocus: props.autoFocus, theme: props.theme, className: ['gc-page', props.className].filter(Boolean).join(' '), style: props.style }));
39
43
  }
40
44
  //# sourceMappingURL=page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+BAA+B,CAAC,CAAC,CAAC,CAAC,OAAO,OAAO,CAAC,KAAK,GAAG,CAAC,EAEtG,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,QAAQ,EAAE,OAAO,IAAI,KAAK,CAAC,MAAM,KAAK,UAAU,EAChD,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,SAAS,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EACjE,KAAK,EAAE,KAAK,CAAC,KAAK,GAClB,CACH,CAAC;AACJ,CAAC"}
package/docs/CHANGELOG.md CHANGED
@@ -1,441 +1,84 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
4
-
5
- ### Fixed
6
-
7
- - Headless Copilot can commit and push when an app enables `dev.commit: 'on-request'`:
8
- its allowlist now includes those commands, since it cannot ask for permission.
9
-
10
- ### Added
11
-
12
- - `antigravity()` now drives `agy acp` (Antigravity CLI 1.5.0+) over JSON-RPC on stdio and
13
- supports `task.mcpServers` (HTTP with secret headers and stdio with env passed over stdin,
14
- never in argv, with session MCP tools pre-allowed), `task.resume` (`session/resume`),
15
- `steer()`, and `permissions.approval` (`'ask'` routed to `task.onApproval`, `'auto-approve'`,
16
- `'deny'`) and `sandbox` (`'workspace-write'`, `'unrestricted'`). Print-mode helpers
17
- (`antigravityArgs`, `antigravityPermissionFlags`) also map `--conversation` and
18
- `--dangerously-skip-permissions`. With agy 1.5.0, MCP tool calls run without an approval
19
- request, carry no output in the transcript, and get an extra `toolSummary` argument.
20
- - `muse()` and `museLive()` honor `task.mcpServers`: the servers go to Muse Code as `-c
21
- mcp_servers.<name>.*` overrides for that run, with header and env values passed as `${VAR}`
22
- references to environment variables, never in argv. `genaicode chat --mcp` and `ui --mcp` now
23
- offer Muse too.
24
- - `museLive()` honors `task.resume`: it continues a saved Muse session with `session/resume`
25
- in a fresh `muse serve`, so a conversation can span several tasks.
26
- - `--mcp name=url` for `genaicode chat` and `genaicode ui`: an MCP server (streamable HTTP)
27
- the agent gets with every prompt. Only MCP-capable agents are offered then.
28
- - The Godot example's dock has a button that opens the full browser chat (`genaicode ui`)
29
- with the same game tools.
30
- - `dev.commit: 'on-request'` in `createAppAgent` (and `defaultAppAgents(mode, commands, { git })`):
31
- no `propose_commit`, and the agent may `git commit` and `git push` when the user asks for it.
32
- - `claude()` supports `steer()`: the prompt goes to Claude Code as stream-json on stdin, and
33
- a message sent while it works reaches the running turn between tool calls, as in Claude
34
- Code itself. `AgentSession.send()` (and so `genaicode chat`, `genaicode ui`, `<AgentChat>`
35
- and `createAppAgent`) now steers Claude instead of queueing. `claude({ steer: false })`
36
- keeps the old one-shot prompt argument.
37
-
38
- - `genaicode acp`: the Agent Client Protocol (version 1) on stdin/stdout, so editors (Zed,
39
- JetBrains) and apps in any language (a game engine's editor, a Tauri or native app) can run
40
- the installed agent CLIs: sessions with MCP servers, streamed text and tool calls, permission
41
- requests, cancel, and config options for the agent, its effort and approvals. See
42
- [embedding.md](embedding.md#any-language-the-agent-client-protocol).
43
- - `genaicode embed` (and its skill) also covers desktop apps, game engine editors and apps in
44
- other languages through `genaicode acp`, and can let the agent drive the running app (play
45
- the game) through observe / take control / act / release tools. A Godot example lives in
46
- `docs/examples/godot`.
47
- - `autoApprove` in `createAppAgent` answers the agent CLI's own permission prompts the app
48
- decides itself (e.g. its auto-approve setting); the rest still wait for the user.
49
- - An `AppTool` may return `{ text, images }`: the images (e.g. a screenshot of the app)
50
- reach the agent as MCP image content. A write tool's outcome stays its text.
51
- - `dev.commit: false` and `dev.only: true` in `createAppAgent`: an app that delivers the
52
- agent's edits itself (not a git commit) drops `propose_commit`, and an app that is only ever
53
- edited starts in `dev` mode with no `use` mode to switch to.
54
- - Auto-approve in `genaicode chat` and `genaicode ui`: `a` on a permission request (or
55
- `/auto`, or the Auto-approve chip in the browser) approves it and everything after it;
56
- `/auto off` asks again. `-y` starts with it on.
57
- - `genaicode embed` makes projects without a dev server work too: the agent writes a small
58
- dev-only server that serves the pages with the panel injected, leaving the files and the
59
- build untouched. That server opens the browser, and the agent's report starts with the one
60
- command to run. It also keeps its shell commands few, since each one may need approval.
61
- - `createDevOverlay()` in `genaicode/ui`: the Vite plugin's overlay (the wolf, its error
62
- badge, "Fix N errors", the resizable panel) for any other Node dev server, as
63
- `handle(req, res)` / `middleware` plus `injectHtml(html)`. `genaicode embed` now uses it
64
- for non-Vite dev servers and for the dev server it writes, instead of a hand-made button.
65
- - `!command` in `genaicode chat` (`!` on an empty prompt switches to shell mode, as in
66
- Claude Code) and `genaicode ui` runs a shell command in the project
67
- (e.g. `!npm run dev` after `genaicode embed`), its output in the transcript; `/stop`, Esc
68
- or the Stop button end it and what it started, `!!` sends a leading `!` to the agent.
69
- `<AgentChat canStop>` offers Stop while the agent is idle.
70
- - `Markdown` renders GFM tables (alignment, `\|` escapes, horizontal scroll when wide),
71
- `~~strikethrough~~` and task lists (`- [x]`). A table may follow a paragraph line directly.
72
-
73
- ### Changed
74
-
75
- - The overlay's wolf stays light in dark mode, with a ring, so it shows on dark pages.
76
- - The embed skill moved to `docs/skills/genaicode-embed/SKILL.md` (it was `skills/`).
77
- - `AgentChat` shows a tool call's whole argument: opening a step wraps the full shell command
78
- (line breaks kept) instead of cutting it with an ellipsis, and hovering the header shows it too.
79
- `toolArgument` (in `genaicode/react`) returns it.
80
-
81
- ## 2.18.0
82
-
83
- ### Added
84
-
85
- - `genaicode embed [request]`: your own agent adds genaicode to the project in the current
86
- directory. It gets instructions (the Vite overlay; a development-only panel through
87
- `genaicode/ui` for webpack, Next.js, Express and other Node dev servers; the in-app agent;
88
- or `genaicode ui` alongside) and decides from what it reads in the project. The chat opens
89
- in the terminal (`--ui`: browser), headless without one; `--print` prints the
90
- instructions for any other agent. They ship as a Claude Code skill too,
91
- `skills/genaicode-embed/SKILL.md`.
92
- - One session in the terminal and the browser: `/web` in `genaicode chat` opens it in the
93
- browser (`/web off` stops the server), `genaicode chat --web` does so at start, and Enter
94
- in the terminal running `genaicode ui` continues there with the browser still connected.
95
-
96
- - `<AgentChat foldSteps>` (and `<AppAgentChat foldSteps>`): each turn's work (tools, edits,
97
- interim text) folds into one "N steps" line that opens on click, naming the running tool.
98
- The answer, errors, steering input and open approvals stay in view.
99
- - `AppAgent.notify(text)`: a note from the app to its agent, e.g. that a background job a tool
100
- started has finished. It goes ahead of queued prompts and never starts a conversation.
101
- - `useAppAgent(basePath, { eventsUrl })`: the event stream URL, for an app that puts a key in
102
- its query because `EventSource` cannot send headers.
103
- - `genaicode/app-agent`: a coding agent inside your own local app. `createAppAgent` serves the
104
- app's tools to the agent over MCP, turns write tools into actions the user approves, gives
105
- the agent the open page with link chips and navigation, and in `dev` mode lets it edit the
106
- app and propose a commit of exactly the reviewed tree. `createAppAgentHandler` serves it to
107
- the page over HTTP and server-sent events, for any Node server. Switching agent or mode keeps
108
- the conversation, `trace` logs prompts, MCP calls, decisions and turns, and
109
- `POST /approvals/:id` answers the agent CLI's own permission prompts.
110
- - `genaicode/react`: `AppAgentChat`, the page side of an app agent (chat, link chips, action
111
- cards with the commit diff, agent and mode pickers), and `useAppAgent` for a page of your own.
112
- - `codex({ config })`: extra `-c key=value` overrides, e.g. `{ 'features.shell_tool': false }`.
113
- - `codex({ onlyTaskMcpServers })` and `copilot({ onlyTaskMcpServers })`: switch off the MCP
114
- servers the CLI loads from its own config, leaving only the task's. The app agent uses it.
115
- - `copilot({ excludedTools })`: `--excluded-tools`, e.g. `['web_fetch', 'web_search']`.
116
- - `claude({ settings })`: `--settings` above the user's and the project's, e.g.
117
- `{ disableAllHooks: true }`; merged with the sandbox settings of `task.permissions`.
118
- - `AgentSession.send(text, { note: true })` for host notes: never steered, run before queued
119
- prompts, and kept through a user stop until the next prompt; `SessionState.notes` lists them.
120
- `send(text, { queue: true })` waits for its own turn instead of steering a running one.
121
- - `genaicode/react` exports `useFollowScroll`, the hook that keeps a transcript at its newest
122
- line until the user scrolls up (`<AgentChat>` now uses it, and also re-pins when its box is
123
- resized), and `installResizeHandle` with `storedSize`: a framework-free panel-edge resize
124
- handle with pointer drag, arrow keys, Home/End, Escape to undo a drag, Enter or double-click
125
- to reset, and a kept ARIA range. The gamedev.pl Play workbench uses both.
126
-
127
- ### Fixed
128
-
129
- - `codex()` reads MCP tool results: a successful call (`error: null`) is no longer reported as
130
- failed, and its text becomes the tool output. `codex exec` never asks for approval, so it now
131
- pre-approves the tools of `task.mcpServers` (`default_tools_approval_mode`); before, Codex
132
- refused every call to them. `allowMcpTools: false` keeps the old behavior.
133
- - `<AgentChat>` can shrink in a flex container narrower than its widest line.
134
- - Anthropic structured outputs: the converter drops the schema keywords the API rejects with a
135
- 400 (`minimum`, `maximum`, `exclusiveMinimum`, `exclusiveMaximum`, `multipleOf`, `maxItems`,
136
- `uniqueItems`) and lowers `minItems` above 1 to 1, the largest value accepted. It walks only
137
- real subschemas, so a property that happens to be named `maximum` is kept. Callers still
138
- validate the answer against their own schema.
139
- - `genaicode/vite` overlay: Escape closes the panel and hands the focus back to the wolf, from the
140
- wolf or anything in the panel (inside the chat frame the key stays with the UI). The wolf names
141
- the panel it toggles with `aria-controls`.
142
-
143
- ### Changed
144
-
145
- - README and the package description lead with the coding agents: a 20-second demo, the
146
- `npx genaicode run --verify` one-liner, then `genaicode/agents`. The LLM layer moved below
147
- them as "Also: a thin LLM layer", and the 1.x note to the end.
148
- - `defaultAppAgents`: Claude cannot start subagents (`Task`, `Agent`) in either mode; one can
149
- outlive the turn, so its answer never reaches the user.
150
-
151
- ## 2.13.3 — 2026-10-17
3
+ One line per change, written for someone upgrading `genaicode`. The category decides the next
4
+ version: **Breaking** bumps major, **Added** bumps minor, **Fixed** bumps patch, **Internal** never
5
+ releases. A PR that changes `src/` (tests excluded) must add a line under `## Unreleased`, or CI
6
+ fails. Merging to master refreshes the `release` PR; merging that publishes to npm. See
7
+ [AGENTS.md](../AGENTS.md#changelog-and-releases).
152
8
 
153
- ### Added
154
-
155
- - The Anthropic provider honors `responseFormat: { type: 'json_schema' }`: it sends the schema as
156
- `output_config.format` (structured outputs), next to any `effort`, so the answer is decoded
157
- against the schema instead of only asked for in the prompt. Anthropic requires
158
- `additionalProperties: false` on every object, so the converter adds it where the schema leaves
159
- it out. A schemaless `{ type: 'json' }` still maps to nothing: Anthropic has no such mode.
160
-
161
- ## 2.13.2 — 2026-10-09
162
-
163
- ### Fixed
164
-
165
- - Approvals no longer use `AbortSignal.any`, which Node 20.0–20.2 lack.
166
- - `hostedAgent()` refuses `permissions.approval: 'ask'`: the provider contract has no way to bring a question back to `onApproval`.
167
- - `codexLive()` denies Codex permission-profile requests without asking when `task.permissions.sandbox` is `workspace-write` or `read-only`, since the profile would widen that sandbox. The docs now say that a Codex command approval in `ask` mode can still let that step leave the sandbox.
9
+ ## Unreleased
168
10
 
169
- ## 2.13.0 — 2026-10-08
11
+ ## 2.34.0 — 2026-11-18
170
12
 
171
13
  ### Added
172
14
 
173
- - `task.permissions`: `{ approval: 'ask' | 'auto-approve' | 'deny', sandbox: 'workspace-write' |
174
- 'read-only' | 'unrestricted' }`, or the `'yolo'` preset (auto-approve, unrestricted). Each
175
- driver translates it into the agent's own options and declares what it accepts in
176
- `capabilities.permissions`; an unsupported value or combination fails the run with an error
177
- instead of starting it in another mode. The sandbox bounds approvals, and `auto-approve`
178
- grants exactly the scope the agent asked for. Prompts decided by the policy keep their
179
- `approval-request` / `approval-resolved` events, marked `automatic: true`, and show as
180
- "Auto-approved" in `createAgentSession`, `<AgentChat>` and `genaicode chat`.
181
- - For apps with their own argument lists: `applyPermissionArgs`, the per-agent
182
- `*PermissionFlags` functions, `codexThreadPolicy`, `decideApproval`, `claudeSandboxRefuses`
183
- and a `sandbox` option for `claudeApprovalTool`.
184
-
185
- - `claude()` answers permission prompts: with `task.onApproval`, it serves Claude Code's
186
- `--permission-prompt-tool` from a private loopback MCP endpoint (random port and bearer
187
- token) next to the task's own `mcpServers`, and raises `MCP_TOOL_TIMEOUT` so Claude waits
188
- for a person. The permission mode (`acceptEdits` by default) still applies first. Approving
189
- allows exactly the input Claude asked about; `capabilities.approvals` is now true.
190
- - `codexLive()` answers Codex permission profile requests (`item/permissions/requestApproval`):
191
- approving grants the requested categories for the current turn, denying grants none.
192
- - `ApprovalRequest.scope`: `once` (also when absent) or `turn`, what approving grants.
193
- - `onApproval(request, signal)`: `signal` aborts when the request is withdrawn, the turn ends,
194
- the process exits or the task is stopped, so an app can close the question. Late answers,
195
- like errors and a missing handler, deny. `createAgentSession` drops withdrawn requests from
196
- `approvals`; `<AgentChat>` and `genaicode chat` label turn-scoped approvals.
197
- - The vendor protocols for apps with their own driver or MCP server: `codexApprovals`,
198
- `museApprovals` (for a `LiveSession`), `claudeApprovalTool`, `claudeApprovalArgs`,
199
- `claudeApprovalEnv`, `claudeApprovalRequest` and `startClaudeApprovalServer`.
200
- - `LiveSession.signal`, `LiveSession.approve(request, signal?)`, the request context
201
- (`id`, `signal`) passed to `onRequest` handlers, `RpcPeer.cancel(id)`, and a `prepare`
202
- for `cliAgent` that can be async and gets a `PrepareContext` (`emit`, `signal`).
15
+ - `withFallback()` gains `info()` and `forget()` when its agents have them, and `nano()` gains `info()`: `createPageAgent({ agent: withFallback([...]) })` shows what the agent that runs first takes (image attachments where the model does) and when an agent over its allowance is back, and "New" clears every agent's conversation (#177).
16
+ - `managedAgent()` and `ManagedProvider` in `genaicode/agents`: one contract for hosted agent platforms whose sessions outlive the process (Anthropic, Gemini, OpenAI and Cursor managed agents). Sessions are addressed by id (`start`, `get`, `events` or a live `watch`, `send`, `answer`, `interrupt`, `release`, `delete`), report usage and cost, pass `task.budget` to the platform's own cap (a stop there fails with `failure.kind: 'budget'`) and bring approvals back to `task.onApproval`. `hostedAgent()` now runs on it (`fromHosted()`) (#174).
17
+ - `anthropicManaged()` in `genaicode/agents`: tasks run as Claude Managed Agents sessions of an agent and environment you created once. Text streams live, `steer()` and `abort()` reach the session, paused tool calls come back as approvals, `task.budget.maxCostUsd` becomes the session's list-cost cap, `resume` continues a session, MCP bearer tokens go into a per-session vault, files and `https://github.com/...` workspaces are mounted, and custom tools run through `tools` handlers. Pass a client from an `@anthropic-ai/sdk` with `beta.sessions` (#178).
18
+ - `geminiManaged()` in `genaicode/agents`: tasks run on Gemini Managed Agents (Antigravity) through the Interactions API, on the Gemini API or Gemini Enterprise Agent Platform. Steps stream live and resume after a drop, `abort()` cancels the interaction, `resume` chains the next turn in the same environment, MCP servers go along with their headers, `task.budget.maxTokens` becomes the interaction's token cap, and files and git repositories are mounted in a fresh sandbox (#179).
19
+ - `openaiManaged()` in `genaicode/agents`: tasks run as OpenAI background responses with hosted tools (a hosted shell in a container kept for the session, web search, or your own list). Output items are polled in order and reported as messages and tool calls, `abort()` cancels the response, `resume` chains the next response, MCP servers go along with their bearer token, and `effort` and `maxTurns` map to `reasoning.effort` and `max_tool_calls` (#180).
20
+ - `cursorCloud()` in `genaicode/agents`: tasks run as Cursor Cloud Agents on a repository or pull request. The agent keeps one session id across turns (`resume` sends a follow-up run), its run streams live and resumes after a drop, `steer()` and `abort()` reach the running turn, MCP servers go along with their headers, and usage is the agent's total (#181).
21
+ - `genaicode/backend`: a model behind your server for the page agent. `createAgentBackend()` runs the tool loop on any `genaicode()` client, hands page-tool calls to the page and runs server tools for the signed-in user, keeps the conversation in an encrypted token (or a `store`), and holds costs with output, step, conversation and daily limits (`memoryLimiter()`); `handle(request)` takes a web `Request`, `toNodeListener()` serves Node. In `genaicode/browser`, `remote({ url, tools })` is its driver and `withFallback` is exported, so a page can fall back between the server and Gemini Nano (#175).
203
22
 
204
23
  ### Fixed
205
24
 
206
- - `codexLive()` rejects approval requests from another thread or turn, and declines an answer
207
- given after the turn ended or after the server withdrew the request.
208
- - `museLive()` no longer falls back to an approve-for-session choice when Muse offers no
209
- one-time approval; it denies instead. Requests of another session or turn are ignored, and an
210
- approval resolved elsewhere (`approval/resolved`, `alreadyTerminal`) closes its question.
25
+ - Gemini: a tool call's `thoughtSignature` now goes back with it in the history (`ToolCall.signature`), so Gemini 3 accepts the next step of a tool loop; a streamed reply keeps the tool calls and images of every chunk, not only the last one's (#175).
211
26
 
212
- ## 2.11.0 — 2026-10-06
27
+ ## 2.33.0 — 2026-11-12
213
28
 
214
29
  ### Added
215
30
 
216
- - `genaicode/react`: `<AgentChat>`, the `genaicode ui` chat as a presentational React
217
- component for apps that run their own `createAgentSession` and stream its `SessionState`
218
- to the page. It renders turns, streaming Markdown (no raw HTML; links open in a new tab),
219
- collapsible tool calls, edited files, errors, approvals, queued prompts and the busy
220
- state, and reports `onSend`, `onStop` and `onApprove`. Slots for host content:
221
- `renderPrompt`, `renderAfterTurn`, `renderFooter`, `notices`, `header`, `headerExtras`,
222
- `emptyState`, `formatToolName`. Themed with `--gc-*` CSS custom properties; styles in
223
- `genaicode/react/styles.css`. React (18+) comes from the app and is not a declared
224
- dependency. `Markdown` and the display helpers are exported too.
225
- - `genaicode ui` and the `genaicode/vite` panel are now drawn by `<AgentChat>`.
226
- - `genaicode/ui`: `startEmbeddedWeb` for hosts that frame the whole `genaicode ui` page,
227
- typed with `task` (`mcpServers`, `timeoutMs`...), `env`, `transformPrompt` and
228
- `frameAncestors`. The UI bundle loads only when it is called.
229
- - `createAgentSession({ transformPrompt })` rewrites each prompt (and steered input) before
230
- it reaches the agent; the transcript keeps the text given to `send()`.
231
-
232
- - The `genaicode/vite` panel can be resized: drag its left or top edge (or focus an edge and use
233
- the arrow keys), double-click an edge to reset it. The size is remembered across reloads.
234
-
235
- ## 2.9.1 — 2026-09-29
31
+ - `genaicode/browser`: an agent that runs in the web page on the browser's built-in model (Gemini Nano through Chrome's Prompt API), with no server and no key. `nano()` is a `CodingAgent` that calls page tools through schema-constrained choices, `createPageAgent()` is the conversation (approval of `write` tools, model download, context use), `exposeWebMcp()` offers the same tools to outside agents over WebMCP and `webMcpTools()` reads them back; `<PageAgentChat>` and `usePageAgent` in `genaicode/react` draw it (#168).
32
+ - Files in the page agent: `PageAgent.send(text, files)` and `nano().run({ attachments })` read text files into the prompt and hand images and audio to the browser's model where it takes them (`nano({ inputs: ['image', 'audio'] })`, `inputs()`, `state.model.inputs`). `<AgentChat attachments>` adds an attach button, paste, drop and a voice-message recorder to the composer (`onSend(text, files)`), and draws a turn's `attachments`; `<PageAgentChat attachments>` turns it on for the kinds the model takes (#171).
236
33
 
237
34
  ### Fixed
238
35
 
239
- - `vite` is no longer declared as an optional peer dependency. `genaicode/vite` imports only
240
- its types, and the declaration made npm keep `vite` (with rollup and postcss) in
241
- `npm ci --omit=dev` installs of projects that have `vite` as a dev dependency.
36
+ - `<AgentChat attachments>`: the message field takes the whole width of the composer and the attach, record, Stop and Send buttons sit in a row under it, instead of squeezing the field between them (#172).
37
+ - `nano()` asks each schema-constrained step on a copy of the model session (`clone()`): Chrome keeps a session's first `responseConstraint`, so the arguments call failed with `UnknownError` on Gemini Nano and fell back to a slow answer in words (#171).
38
+ - `nano()` (`genaicode/browser`) survives Chrome's `UnknownError` on a schema-constrained call by asking the model in words, retries a reply that failed before its first word, names the failed step in the error and reports each model call through `onModelCall` (#170).
242
39
 
243
- ## 2.9.0 — 2026-09-29
40
+ ## 2.32.0 — 2026-11-11
244
41
 
245
42
  ### Added
246
43
 
247
- - The wolf from genaicode 1.0 is back in `genaicode chat` and `genaicode ui`. The browser UI
248
- shows it as the favicon, in the header and on the start screen. With the tab in the
249
- background, it barks (the original `wolf-bark.mp3`) when the agent asks for approval or
250
- finishes, and counts those in the tab title. The terminal UI rings the bell instead.
251
- `/bark [on|off]` or the Bark button toggles it.
252
- - `genaicode/vite`, a Vite dev plugin: the `genaicode ui` chat in a panel inside the app,
253
- opened from the wolf in its corner, with the agent working in the project root. The page's
254
- errors (build errors, uncaught exceptions, unhandled rejections, `console.error`) are counted on the wolf, and
255
- "Fix N errors" sends them to the agent. `vite` is an optional peer dependency.
256
- - The `genaicode ui` page sends `Content-Security-Policy: frame-ancestors 'none'`, so other
257
- pages cannot frame it (the Vite plugin allows its own origins).
44
+ - Artifacts take audio and video (a player in the card; `artifactResponse(artifact, body, { range })` now returns a `status` and answers `Range` so players can seek; `maxMediaBytes`, `maxTotalBytes`), a published page can send the user's answers back to the agent (`parent.postMessage({ genaicode: 'submit', data }, '*')`, confirmed on the card; `<AgentChat onArtifactSubmit>`, `artifactSubmission()`), and an agent that takes over after a switch or failover is told what was published, by `name`, with the content of pages that exist nowhere else (#166).
258
45
 
259
- ## 2.8.0 — 2026-09-29
46
+ ## 2.31.0 — 2026-11-11
260
47
 
261
48
  ### Added
262
49
 
263
- - `AgentTask.resume` continues an earlier agent session: pass the `sessionId` of a previous
264
- result, and the agent picks up its own history of that session. Supported by `claude`,
265
- `codex` (`exec resume`), `cursor`, `opencode` and `copilot` (`capabilities.resume`).
266
- Other drivers fail the task before spawning. `genaicode run --resume <id>` does the same
267
- from the command line.
268
- - `createAgentSession` (`genaicode/agents`): a multi-turn conversation with an agent for chat
269
- front ends. It keeps a structured transcript per turn, resumes the agent session on each
270
- new prompt, steers or queues prompts sent mid-turn, and holds approvals until answered.
271
- - `genaicode chat` (and plain `genaicode` in a terminal): chat with an agent in the terminal.
272
- `genaicode ui`: the same chat in the browser, on 127.0.0.1 behind a one-time token.
273
- Both are bundled into `dist/ui` and load only for those commands.
274
-
275
- ### Changed
276
-
277
- - The opencode driver emits `tool-start` (with the tool's input) before each `tool-end`.
278
- - `genaicode` with no arguments opens the chat in a terminal; it prints help otherwise.
50
+ - Artifacts: agents with MCP support get a `publish_artifact` tool to show the user a self-contained HTML page, an image or a document. `startArtifactChannel()`, `createArtifactStore()`, `artifactResponse()` and `createAgentSession({ artifacts })` (an `artifact` transcript entry) in `genaicode/agents`; `<AgentChat artifactUrl renderArtifact>` shows a card with a sandboxed preview; `genaicode chat` and `ui` have it on by default (`--no-artifacts`) (#162).
51
+ - App agents publish artifacts too: `createAppAgent({ artifacts: true })` offers `publish_artifact`, `createAppAgentHandler` serves `GET <basePath>/artifacts/:id` sandboxed and behind `authorize`, and `<AppAgentChat>` shows the cards (`renderArtifact` to replace them) (#164).
279
52
 
280
- ## 2.7.0 — 2026-09-29
53
+ ## 2.30.0 — 2026-11-07
281
54
 
282
55
  ### Added
283
56
 
284
- - The Anthropic provider maps `thinking.level` to `output_config.effort` (`minimal` and
285
- `low` → `low`, `medium`, `high`) with adaptive thinking on models that have it (Opus and
286
- Sonnet 4.6 and later, Fable, Mythos). Before, `level` was ignored on Anthropic.
287
- - `anthropicModelTraits(model)` reports what a Claude model ID accepts (adaptive thinking,
288
- budgets, temperature, forced tool choice, how thinking turns off). It reads Bedrock
289
- (`anthropic.`) and Vertex (`@date`) IDs too.
290
-
291
- ### Fixed
292
-
293
- - Claude Sonnet 5.5, Opus 5.5 and Fable 5.1 no longer 400 on requests genaicode builds:
294
- - `thinking: false` sends `between_tools` on Sonnet 5.5, and on Opus 5.5 / Fable / Mythos
295
- (where thinking cannot be turned off) leaves `thinking` out and sets effort `low`.
296
- - A forced `toolChoice` (`'required'` or `{ name }`) becomes `auto` plus a system-prompt
297
- line asking for the call. These models reject `any` / `tool`; check that a call was made.
298
- - `thinking.budgetTokens` becomes adaptive thinking on models that removed budgets (Opus
299
- 4.7+, Sonnet 5+, Fable, Mythos) instead of a 400.
300
- - `temperature` is left out on models that reject it (Opus 4.7+, Sonnet 5+, Fable, Mythos),
301
- as for `gpt-6-luna`.
57
+ - Opt-in failover between agents: `result.failure` (`quota`, `auth`, `unavailable`, `crash`, `budget`), `shouldFailOver()`, `withFallback([...agents])`, `createAgentSession({ fallback })`/`setFallback()` with a `failover` transcript entry, `createAppAgent({ fallback })`/`configure({ fallback })`, and `run|chat|ui --fallback` plus `/fallback` in the chat (#160).
58
+ - Switching agents keeps the conversation: after `AgentSession.setAgent()` (and `/agent` in `genaicode chat` / `ui`) the next agent's first prompt carries a recap of the turns it missed plus the path of a full Markdown transcript in `.genaicode/handoff/` in the cwd; switching back resumes the agent's own session and tells it only what it missed. Opt out with `setAgent(agent, { handoff: false })`, `handoff: false`, or `/agent name --fresh`.
302
59
 
303
- ## 2.6.0 — 2026-09-28
60
+ ## 2.29.0 — 2026-11-07
304
61
 
305
62
  ### Added
306
63
 
307
- - `npx genaicode` is a command-line front end to the `genaicode/agents` drivers.
308
- `genaicode agents` lists which agent CLIs are installed, and `genaicode run <prompt>`
309
- runs one task with the first installed agent (or `--agent <name>`), with `--cwd`,
310
- `--model`, `--effort`, `--max-turns`, `--timeout`, `--json` event output, and a
311
- `--verify <command>` repair loop. It replaces the 2.x notice the bin used to print;
312
- `npx genaicode@1` still runs the legacy 1.x agent.
64
+ - `rate-limit` events report plan limits (Claude's 5-hour/weekly windows, `codexLive` rate limits; any quota error as `window: 'quota'`), and `task.budget` (`maxTokens`, `maxCostUsd`, `warnAt`) emits `budget-warning` then stops the run; sessions take `budget` and keep `state.rateLimits`, `<AgentChat>`/`chat`/`ui` show limit chips, and `run|chat|ui` take `--max-tokens`/`--max-cost` (#157).
313
65
 
314
- ### Fixed
315
-
316
- - `museLive()` reads tool items as `muse serve` sends them (`itemId`, `tool`), so
317
- `tool-start`/`tool-end` carry the item id and the tool name (`bash`) instead of `toolCall`.
318
- - `muse()` no longer reports Muse's internal reminder subagents (`reminder.child_run`) as
319
- tool calls, and names tools without the `tool:` prefix (`bash`, like `museLive()`).
320
-
321
- ## 2.5.3 — 2026-09-26
322
-
323
- ### Fixed
324
-
325
- - The OpenAI provider leaves out `temperature` for `gpt-6-luna` models, which reject any
326
- value but their default. Before, `.temperature(0)` on Luna failed with a 400.
327
-
328
- ## 2.5.2 — 2026-09-24
66
+ ## 2.28.1 — 2026-11-04
329
67
 
330
68
  ### Fixed
331
69
 
332
- - `museLive()` now answers approvals: `onApproval` decides each request (and each stage of a
333
- multi-stage one) through Muse's `approval/decide`. Before, requests were refused
334
- unanswered and stayed pending.
70
+ - `antigravity()` tool calls show what they act on: MCP tools are named `mcp__<server>__<tool>`, arguments gain `path`/`command`/`description`, and a `read_file` shows the lines it read.
335
71
 
336
- ### Notes
337
-
338
- - 2.5.1 was never published; this fix shipped as 2.5.2.
339
-
340
- ## 2.5.0 — 2026-09-24
72
+ ## 2.28.0 — 2026-11-04
341
73
 
342
74
  ### Added
343
75
 
344
- - Drivers `vibe()` for Mistral Vibe (`--output streaming`) and `antigravity()` for the
345
- Antigravity CLI (`agy --output-format stream-json`).
346
-
347
- ### Changed
348
-
349
- - `codex()`: a failed MCP tool call's `tool-end` event carries the error message as `output`.
350
-
351
- ### Notes
352
-
353
- - 2.4.2 was published from the same code.
76
+ - `antigravity()` drives `agy acp` with `task.mcpServers`, `task.resume`, `steer()`, and `onApproval` (#151).
354
77
 
355
- ## 2.4.1 — 2026-09-24
356
-
357
- ### Notes
358
-
359
- - Releases are published from GitHub Actions when a version tag is pushed. See
360
- [docs/releasing.md](releasing.md).
361
-
362
- ## 2.4.0 — 2026-09-24
363
-
364
- ### Added
365
-
366
- - `genaicode/agents` subpath (experimental): run installed coding-agent CLIs behind one
367
- `CodingAgent` interface. Drivers `claude()`, `codex()`, `muse()`; agent-neutral
368
- `AgentEvent` stream and `AgentResult`; abort, timeout and process-group kill;
369
- `detectAgents` / `findExecutable`; `cliAgent()` for custom drivers. See
370
- [docs/agents.md](agents.md).
371
- - Live agent sessions over JSON-RPC: `codexLive()` (`codex app-server`) and `museLive()`
372
- (`muse serve`) with `AgentRun.steer()` and `AgentTask.onApproval`; `liveAgent()` and
373
- `RpcPeer` for custom live drivers; `approval-resolved` event.
374
- - `AgentTask.mcpServers` (HTTP and stdio) for `claude`, `codex` and `codexLive`; header
375
- secrets stay out of argv. Drivers can set up and clean up per task via `prepare`.
376
- - `scrubEnv`, `withoutProviderCredentials` and `PROVIDER_CREDENTIAL_VARS` for child
377
- environments; `runWithVerify` verify-and-repair loop.
378
- - Drivers `gemini()`, `cursor()` and `opencode()`; `hostedAgent()` adapts a
379
- `HostedAgentProvider` (start / poll / send / cancel) to `CodingAgent`.
380
- - Driver `copilot()` for GitHub Copilot CLI (`--output-format json`), with MCP servers via
381
- `--additional-mcp-config` and `allowTools` / `denyTools` permission patterns.
382
-
383
- ### Notes
384
-
385
- - The core `genaicode` entry is unchanged and still spawns nothing.
386
-
387
- ## 2.2.0 — 2026-07-26
78
+ ## 2.27.0 — 2026-10-30
388
79
 
389
80
  ### Added
390
81
 
391
- - Portable `responseFormat` on `GenerationRequest` / request builders
392
- (`text` | `json` | `json_schema`), mapped by OpenAI and Google adapters
393
- - Portable `thinking` controls (`false` | `{ budgetTokens?, level? }`), mapped by
394
- Anthropic (budget / disable) and Google (budget or level)
395
- - `.json()` sets `responseFormat: { type: 'json' }` when no format was already chosen
396
- - Capability flags: `jsonResponse`, `thinking`
397
-
398
- ### Notes
399
-
400
- - Additive only; provider `generationConfig` / Anthropic `thinking` factory options still
401
- work as escape hatches for vendor-only knobs.
402
- - On Google, `thinking: false` and `budgetTokens: 0` map to `thinkingLevel: MINIMAL`
403
- (Gemini 3 rejects `thinkingBudget: 0`). JSON `responseFormat` also defaults Google
404
- thinking to `MINIMAL` when unset, so small token budgets are not spent only on thoughts.
405
- - Provider E2E covers JSON response format and thinking knobs when credentials are set.
406
-
407
- ## 2.1.0 — 2026-07-25
408
-
409
- Publishes the Phase 3–4 work already on `master`. npm `2.0.0` shipped the 2.0
410
- kernel and provider adapters only; this minor adds the remaining public surface
411
- documented in the README and [semver policy](semver.md).
412
-
413
- ### Added
82
+ - The app agent chat can dismiss settled action cards.
414
83
 
415
- - Provider-neutral streaming (`StreamEvent`, `.stream()` / `.streamText()`,
416
- native streams for OpenAI / Anthropic / Google with generate→stream fallback)
417
- - Built-in middleware: `timingPlugin`, `rateLimitPlugin`, `cachePlugin`,
418
- `fallbackPlugin`, `fallbackProvider`
419
- - Retry helpers: `classifyError`, `isRetryable`, `withRetry` (+ [docs/retry.md](retry.md))
420
- - `ProviderCapabilities` on `ModelProvider`
421
- - Compatibility fixtures for multimodal and tool-call round trips
422
- - Framework examples under `examples/` (HTTP handler, queue worker, cron job)
423
- - Written guidance: [docs/semver.md](semver.md),
424
- [docs/provider-packages.md](provider-packages.md)
425
-
426
- ### Notes
427
-
428
- - Additive API only; no breaking changes from `2.0.0`.
429
- - Retries remain opt-in application policy (no hidden retries in core).
430
- - Provider SDKs stay bundled behind `genaicode/providers` for 2.x.
431
-
432
- ## 2.0.0 — 2026-07-24
433
-
434
- Major pivot from coding agent to backend LLM toolkit.
435
-
436
- - `genaicode()` client, immutable request builders, conversation chains
437
- - `PromptItem` IR and prompt/result helpers
438
- - OpenAI, OpenAI-compatible, Anthropic, Gemini, and Vertex adapters
439
- - `GenAIPlugin` middleware contract
440
- - Coding-agent CLI/UI/tools removed; `npx genaicode` prints migration guidance
441
- (1.x remains on the `1.x` branch / `genaicode@1`)
84
+ Earlier versions: [changelog-2.26-and-older.md](changelog-2.26-and-older.md) and the git tags.