genaicode 2.23.0 → 2.25.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 (39) hide show
  1. package/dist/agents/drivers/muse-live.js +20 -11
  2. package/dist/agents/drivers/muse-live.js.map +1 -1
  3. package/dist/agents/drivers/muse-mcp.d.ts +13 -0
  4. package/dist/agents/drivers/muse-mcp.js +42 -0
  5. package/dist/agents/drivers/muse-mcp.js.map +1 -0
  6. package/dist/agents/drivers/muse.js +6 -1
  7. package/dist/agents/drivers/muse.js.map +1 -1
  8. package/dist/agents.d.ts +1 -0
  9. package/dist/agents.js +1 -0
  10. package/dist/agents.js.map +1 -1
  11. package/dist/app-agent/app-agent.d.ts +3 -2
  12. package/dist/app-agent/app-agent.js +6 -3
  13. package/dist/app-agent/app-agent.js.map +1 -1
  14. package/dist/app-agent/policy.d.ts +6 -2
  15. package/dist/app-agent/policy.js +14 -5
  16. package/dist/app-agent/policy.js.map +1 -1
  17. package/dist/cli/args.d.ts +5 -0
  18. package/dist/cli/args.js +13 -1
  19. package/dist/cli/args.js.map +1 -1
  20. package/dist/cli/main.d.ts +8 -2
  21. package/dist/cli/main.js +16 -2
  22. package/dist/cli/main.js.map +1 -1
  23. package/dist/react/agent-chat.css +8 -0
  24. package/dist/react/agent-chat.js +5 -3
  25. package/dist/react/agent-chat.js.map +1 -1
  26. package/dist/react/format.d.ts +3 -1
  27. package/dist/react/format.js +8 -6
  28. package/dist/react/format.js.map +1 -1
  29. package/dist/react.d.ts +1 -1
  30. package/dist/react.js +1 -1
  31. package/dist/react.js.map +1 -1
  32. package/dist/ui/index.js +46 -46
  33. package/dist/ui/web-client.js +17 -9
  34. package/docs/CHANGELOG.md +20 -0
  35. package/docs/agents.md +20 -14
  36. package/docs/app-agent.md +4 -0
  37. package/docs/cli.md +7 -0
  38. package/docs/skills/genaicode-embed/SKILL.md +9 -0
  39. package/package.json +1 -1
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
+ - `muse()` and `museLive()` honor `task.mcpServers`: the servers go to Muse Code as `-c
13
+ mcp_servers.<name>.*` overrides for that run, with header and env values passed as `${VAR}`
14
+ references to environment variables, never in argv. `genaicode chat --mcp` and `ui --mcp` now
15
+ offer Muse too.
16
+ - `museLive()` honors `task.resume`: it continues a saved Muse session with `session/resume`
17
+ in a fresh `muse serve`, so a conversation can span several tasks.
18
+ - `--mcp name=url` for `genaicode chat` and `genaicode ui`: an MCP server (streamable HTTP)
19
+ the agent gets with every prompt. Only MCP-capable agents are offered then.
20
+ - The Godot example's dock has a button that opens the full browser chat (`genaicode ui`)
21
+ with the same game tools.
22
+ - `dev.commit: 'on-request'` in `createAppAgent` (and `defaultAppAgents(mode, commands, { git })`):
23
+ no `propose_commit`, and the agent may `git commit` and `git push` when the user asks for it.
7
24
  - `claude()` supports `steer()`: the prompt goes to Claude Code as stream-json on stdin, and
8
25
  a message sent while it works reaches the running turn between tool calls, as in Claude
9
26
  Code itself. `AgentSession.send()` (and so `genaicode chat`, `genaicode ui`, `<AgentChat>`
@@ -49,6 +66,9 @@
49
66
 
50
67
  - The overlay's wolf stays light in dark mode, with a ring, so it shows on dark pages.
51
68
  - The embed skill moved to `docs/skills/genaicode-embed/SKILL.md` (it was `skills/`).
69
+ - `AgentChat` shows a tool call's whole argument: opening a step wraps the full shell command
70
+ (line breaks kept) instead of cutting it with an ellipsis, and hovering the header shows it too.
71
+ `toolArgument` (in `genaicode/react`) returns it.
52
72
 
53
73
  ## 2.18.0
54
74
 
package/docs/agents.md CHANGED
@@ -28,18 +28,18 @@ 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()` | `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 |
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()` | MCP servers, 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
 
@@ -136,7 +136,7 @@ const first = await agent.run({ prompt: 'Add a --dry-run flag', cwd }).result;
136
136
  const next = await agent.run({ prompt: 'Now cover it with a test', cwd, resume: first.sessionId }).result;
137
137
  ```
138
138
 
139
- `claude`, `codex`, `cursor`, `opencode` and `copilot` support it (`capabilities.resume`).
139
+ `claude`, `codex`, `cursor`, `opencode`, `copilot` and `museLive` support it (`capabilities.resume`).
140
140
  Other drivers fail the task before spawning anything rather than starting a fresh session.
141
141
 
142
142
  ## Chat sessions
@@ -342,7 +342,7 @@ protocol and resolves with `{ ok, error? }` when the turn ends.
342
342
  ## MCP servers
343
343
 
344
344
  `task.mcpServers` attaches MCP servers for one task on drivers with `capabilities.mcp`
345
- (`claude`, `codex`, `codexLive`, `copilot`):
345
+ (`claude`, `codex`, `codexLive`, `copilot`, `muse`, `museLive`):
346
346
 
347
347
  ```ts
348
348
  await claude().run({
@@ -367,6 +367,12 @@ await claude().run({
367
367
  the run), added to the user's own MCP config. `--allow-all-tools` already covers the
368
368
  servers' tools; with `allowAllTools: false` each server is pre-allowed with
369
369
  `--allow-tool=<name>` unless `allowMcpTools: false`.
370
+ - Muse Code (`muse exec`, `muse serve`) gets repeatable `-c mcp_servers.<name>.*` overrides
371
+ (`transport` `streamable_http` or `stdio`, `url`, `command`, `args`). Header values and a
372
+ stdio server's `env` values go through environment variables that the overrides name as a
373
+ whole-value `${VAR}`, which Muse expands, so they never appear in argv. Needs Muse Code
374
+ 1.4.4 or newer (checked with 1.4.13). Under `museLive()` with `permissions.approval: 'ask'`
375
+ every MCP tool call is an approval request: answer it in `onApproval`.
370
376
  - A driver without MCP support fails the task before spawning anything, instead of silently
371
377
  dropping the servers. Server names must match `/^[A-Za-z0-9_-]+$/`.
372
378
 
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.23.0",
3
+ "version": "2.25.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": {