genaicode 2.22.0 → 2.24.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.
package/docs/CHANGELOG.md CHANGED
@@ -2,8 +2,25 @@
2
2
 
3
3
  ## Unreleased
4
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
+
5
10
  ### Added
6
11
 
12
+ - `--mcp name=url` for `genaicode chat` and `genaicode ui`: an MCP server (streamable HTTP)
13
+ the agent gets with every prompt. Only MCP-capable agents are offered then.
14
+ - The Godot example's dock has a button that opens the full browser chat (`genaicode ui`)
15
+ with the same game tools.
16
+ - `dev.commit: 'on-request'` in `createAppAgent` (and `defaultAppAgents(mode, commands, { git })`):
17
+ no `propose_commit`, and the agent may `git commit` and `git push` when the user asks for it.
18
+ - `claude()` supports `steer()`: the prompt goes to Claude Code as stream-json on stdin, and
19
+ a message sent while it works reaches the running turn between tool calls, as in Claude
20
+ Code itself. `AgentSession.send()` (and so `genaicode chat`, `genaicode ui`, `<AgentChat>`
21
+ and `createAppAgent`) now steers Claude instead of queueing. `claude({ steer: false })`
22
+ keeps the old one-shot prompt argument.
23
+
7
24
  - `genaicode acp`: the Agent Client Protocol (version 1) on stdin/stdout, so editors (Zed,
8
25
  JetBrains) and apps in any language (a game engine's editor, a Tauri or native app) can run
9
26
  the installed agent CLIs: sessions with MCP servers, streamed text and tool calls, permission
@@ -43,6 +60,9 @@
43
60
 
44
61
  - The overlay's wolf stays light in dark mode, with a ring, so it shows on dark pages.
45
62
  - The embed skill moved to `docs/skills/genaicode-embed/SKILL.md` (it was `skills/`).
63
+ - `AgentChat` shows a tool call's whole argument: opening a step wraps the full shell command
64
+ (line breaks kept) instead of cutting it with an ellipsis, and hovering the header shows it too.
65
+ `toolArgument` (in `genaicode/react`) returns it.
46
66
 
47
67
  ## 2.18.0
48
68
 
package/docs/agents.md CHANGED
@@ -28,22 +28,22 @@ for await (const event of run) {
28
28
  const result = await run.result; // { status, ok, text, sessionId, usage, error, ... }
29
29
  ```
30
30
 
31
- | Agent | Driver | Extras |
32
- | ---------------- | ----------------------------- | ----------------------------------------------- |
33
- | Claude Code | `claude()` | MCP servers, approvals, max turns, effort, cost |
34
- | Codex | `codex()`, `codexLive()` | MCP servers; live: `steer()`, approvals |
35
- | GitHub Copilot | `copilot()` | MCP servers, allow/deny tool patterns |
36
- | Cursor | `cursor()` | streamed text deltas |
37
- | Gemini CLI | `gemini()` | approval mode |
38
- | opencode | `opencode()` | `provider/model` ids, variants |
39
- | Mistral Vibe | `vibe()` | agent profile, max turns, max price |
40
- | Antigravity CLI | `antigravity()` | sandbox, effort, usage |
41
- | Muse | `muse()`, `museLive()` | max turns; live: `steer()`, approvals |
42
- | Your own CLI/API | `cliAgent()`, `hostedAgent()` | plug in any JSON-lines CLI or hosted agent |
31
+ | Agent | Driver | Extras |
32
+ | ---------------- | ----------------------------- | -------------------------------------------- |
33
+ | Claude Code | `claude()` | `steer()`, MCP, approvals, max turns, effort |
34
+ | Codex | `codex()`, `codexLive()` | MCP servers; live: `steer()`, approvals |
35
+ | GitHub Copilot | `copilot()` | MCP servers, allow/deny tool patterns |
36
+ | Cursor | `cursor()` | streamed text deltas |
37
+ | Gemini CLI | `gemini()` | approval mode |
38
+ | opencode | `opencode()` | `provider/model` ids, variants |
39
+ | Mistral Vibe | `vibe()` | agent profile, max turns, max price |
40
+ | Antigravity CLI | `antigravity()` | sandbox, effort, usage |
41
+ | Muse | `muse()`, `museLive()` | max turns; live: `steer()`, approvals |
42
+ | Your own CLI/API | `cliAgent()`, `hostedAgent()` | plug in any JSON-lines CLI or hosted agent |
43
43
 
44
44
  On top of the drivers:
45
45
 
46
- - **Steer a running task** with `run.steer(text)` (live drivers), and answer permission
46
+ - **Steer a running task** with `run.steer(text)` (Claude and the live drivers), and answer permission
47
47
  prompts with `onApproval` (Claude, live Codex and Muse).
48
48
  - **Pick approval and sandbox policy** with `permissions: { approval, sandbox }` (or
49
49
  `'yolo'`); each driver maps it to the agent's own flags and refuses what it cannot honor.
@@ -212,6 +212,11 @@ const result = await run.result;
212
212
  - `steer(text)` resolves once the agent acknowledges the input. It rejects after the task has
213
213
  ended, and when no acknowledgement arrives (the input may or may not have reached the agent).
214
214
  - `onApproval` answers permission requests; see [Approvals](#approvals).
215
+ - `claude()` steers too, without a server: it writes the prompt to Claude Code as
216
+ `--input-format stream-json`, and each steer is one more user message that Claude reads
217
+ between tool calls of the running turn. `steer(text)` resolves once Claude takes it; a steer
218
+ that arrives as the turn ends runs as one more turn of the same task. `claude({ steer: false })`
219
+ passes the prompt as an argument instead.
215
220
  - The task ends when the agent reports its turn complete. The server is then stopped. An exit
216
221
  before that point is a failure, even with exit code 0.
217
222
 
package/docs/app-agent.md CHANGED
@@ -69,6 +69,10 @@ exactly that tree on the reviewed HEAD, or refuses if the files or HEAD changed
69
69
  changed the files, or a merge or rebase is in progress. The repository's commit hooks run. An app that delivers the
70
70
  edits itself (syncs the files, uploads them) passes `dev.commit: false`, so the agent gets no
71
71
  `propose_commit`, and `dev.only: true` when there is nothing to do in `use` mode.
72
+ `dev.commit: 'on-request'` also offers no `propose_commit`, but tells the agent to commit or push
73
+ only when the user asks, and the default agents drop their commit and push deny rules.
74
+ Claude asks through its permission prompt; Copilot cannot ask headless, so those commands are
75
+ allowed outright. Codex's sandbox has no network, so it can't push.
72
76
  The agent sees no MCP server but the app's: Claude runs with `--strict-mcp-config`, and Codex
73
77
  and Copilot get the user's own configured servers switched off. The MCP endpoint takes a per-run
74
78
  bearer and refuses browser requests; every other route asks `authorize` and refuses
package/docs/cli.md CHANGED
@@ -68,6 +68,13 @@ The terminal UI rings the terminal bell instead. `/bark off` (or the Bark button
68
68
  </picture>
69
69
  </p>
70
70
 
71
+ `--mcp name=url` (repeatable) gives the agent an MCP server over streamable HTTP for every
72
+ prompt, e.g. `genaicode ui --mcp game=http://127.0.0.1:7777/mcp` from a game editor whose
73
+ running game serves tools there. Only the agents that take MCP servers in genaicode (claude,
74
+ codex, copilot) are offered then.
75
+ An app that starts `genaicode ui` itself can add `--exit-with-stdin` and stop it by closing
76
+ its stdin, which also reaches the server when a launcher such as npx sits in between.
77
+
71
78
  `genaicode ui` listens on the loopback address and prints a link with a random access
72
79
  token. The page, the event stream and every command need that token; only the bundled
73
80
  script and the four mascot files (`/app.js`, `/assets/…`) are served without it, since they
@@ -282,6 +282,10 @@ Put the panel where the host's developers work: an editor dock (Godot `EditorPlu
282
282
  A complete GDScript client and editor dock: https://github.com/gtanczyk/genaicode/blob/master/docs/examples/godot
283
283
  Electron: `startEmbeddedWeb` from `genaicode/ui` in the main process shows the bundled chat in
284
284
  a `BrowserWindow` without any protocol code.
285
+ No room for a native panel, or the user wants the full chat: a button that starts
286
+ `npx -y genaicode@<version> ui --no-open -C <project> [--mcp name=url]`, reads the
287
+ `Open <link>` line from its stderr and opens that link in the system browser (the Godot
288
+ example's `browser_chat.gd`). Stop the process when the host closes.
285
289
 
286
290
  ## Recipe: let the agent drive the app
287
291
 
@@ -299,6 +303,11 @@ in-app agent, `task.mcpServers` elsewhere.
299
303
  - `game_release_control`: give the controls back. Also release when the agent's turn ends
300
304
  or its client disconnects.
301
305
 
306
+ The tools exist only while the app runs, and agent CLIs connect to MCP servers when a prompt
307
+ starts. When the panel sends a prompt while the app is not running, it says so in the panel and
308
+ adds a note to the prompt ("the app is not running, ask the user to start it"), so the agent
309
+ does not try to launch the app on its own.
310
+
302
311
  Listen on 127.0.0.1 only and refuse browser requests (an `Origin` header, a `Host` that is not
303
312
  localhost) so a web page cannot drive the app. These tools are not writes, so they need no
304
313
  approval card. Details and a TypeScript version: "The agent drives the app (a game)" in
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genaicode",
3
- "version": "2.22.0",
3
+ "version": "2.24.0",
4
4
  "description": "Drive the coding-agent CLIs you already have (Claude Code, Codex, Copilot, Cursor, Gemini, opencode...) behind one API and one CLI, plus a thin provider-neutral LLM layer.",
5
5
  "author": "Grzegorz Tańczyk",
6
6
  "repository": {