genaicode 2.45.0 → 2.46.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 (53) hide show
  1. package/dist/agents/drivers/claude.js +58 -3
  2. package/dist/agents/drivers/claude.js.map +1 -1
  3. package/dist/agents/pack-checks.d.ts +32 -0
  4. package/dist/agents/pack-checks.js +87 -0
  5. package/dist/agents/pack-checks.js.map +1 -0
  6. package/dist/agents/pack-git.d.ts +7 -3
  7. package/dist/agents/pack-git.js +58 -13
  8. package/dist/agents/pack-git.js.map +1 -1
  9. package/dist/agents/pack.d.ts +20 -2
  10. package/dist/agents/pack.js +242 -20
  11. package/dist/agents/pack.js.map +1 -1
  12. package/dist/agents/session.js +57 -28
  13. package/dist/agents/session.js.map +1 -1
  14. package/dist/agents/sessions/group.js +25 -5
  15. package/dist/agents/sessions/group.js.map +1 -1
  16. package/dist/agents/types.d.ts +5 -0
  17. package/dist/agents/usage.d.ts +6 -0
  18. package/dist/agents/usage.js +18 -0
  19. package/dist/agents/usage.js.map +1 -1
  20. package/dist/agents.d.ts +1 -0
  21. package/dist/agents.js.map +1 -1
  22. package/dist/cli/args.d.ts +1 -0
  23. package/dist/cli/args.js +4 -0
  24. package/dist/cli/args.js.map +1 -1
  25. package/dist/cli/check-limits.d.ts +13 -0
  26. package/dist/cli/check-limits.js +129 -0
  27. package/dist/cli/check-limits.js.map +1 -0
  28. package/dist/cli/check-process.d.ts +13 -0
  29. package/dist/cli/check-process.js +86 -0
  30. package/dist/cli/check-process.js.map +1 -0
  31. package/dist/cli/check-storage.d.ts +3 -0
  32. package/dist/cli/check-storage.js +52 -0
  33. package/dist/cli/check-storage.js.map +1 -0
  34. package/dist/cli/limit-test.sh +37 -0
  35. package/dist/cli/mac-fork.cjs +22 -0
  36. package/dist/cli/main.d.ts +3 -5
  37. package/dist/cli/main.js +31 -16
  38. package/dist/cli/main.js.map +1 -1
  39. package/dist/cli/pack-verify.d.ts +3 -0
  40. package/dist/cli/pack-verify.js +214 -0
  41. package/dist/cli/pack-verify.js.map +1 -0
  42. package/dist/react/agent-chat.css +20 -0
  43. package/dist/react/format.d.ts +2 -0
  44. package/dist/react/format.js +12 -0
  45. package/dist/react/format.js.map +1 -1
  46. package/dist/react/pack-tasks.js +25 -6
  47. package/dist/react/pack-tasks.js.map +1 -1
  48. package/dist/ui/index.js +101 -100
  49. package/dist/ui/web-client.js +36 -16
  50. package/docs/CHANGELOG.md +10 -0
  51. package/docs/agents.md +15 -0
  52. package/docs/cli.md +33 -0
  53. package/package.json +1 -1
package/docs/CHANGELOG.md CHANGED
@@ -8,6 +8,16 @@ fails. Merging to master refreshes the `release` PR; merging that publishes to n
8
8
 
9
9
  ## Unreleased
10
10
 
11
+ ## 2.46.0 — 2026-11-21
12
+
13
+ ### Added
14
+
15
+ - Pack task cards let you request an independent review, test an isolated copy of the worker's files and see when either result is outdated before merging (#239)
16
+
17
+ ### Fixed
18
+
19
+ - `replyEnding()` strips trailing punctuation/emoji and inspects the closing clause in linear time, eliminating polynomial regex backtracking on long whitespace runs (#245)
20
+
11
21
  ## 2.45.0 — 2026-11-21
12
22
 
13
23
  ### Added
package/docs/agents.md CHANGED
@@ -235,6 +235,7 @@ its own. The lead needs `capabilities.mcp` and sees these tools on an MCP server
235
235
  | `steer` | More input for a running task, where the member has `steer()` |
236
236
  | `stop` | Stops a running task |
237
237
  | `diff` | A worktree task's changes as a unified diff |
238
+ | `review` | A read-only second opinion on the full patch, attached to the worker's task |
238
239
  | `merge` | Applies a finished task's changes to the lead's directory (`threeWay` for conflict markers) |
239
240
  | `discard` | Drops a finished task's changes |
240
241
 
@@ -259,6 +260,20 @@ The same method accepts `merge`, `discard`, `stop` and `{ type: 'steer', text }`
259
260
  Each run also exposes these controls as `run.pack`. A chat can still review and merge
260
261
  finished tasks after a later turn starts. Adopted transcripts are read-only.
261
262
 
263
+ Use `{ type: 'review' }` to get a fresh review from the first eligible installed agent,
264
+ starting with the lead and excluding the worker. The pack passes the complete patch as text
265
+ to `CodingAgent.runText`. Claude Code implements this with tools, MCP, hooks and project
266
+ context disabled. A custom driver can supply the same capability. Other drivers remain
267
+ eligible to do the work. `{ type: 'verify' }` runs the pack's configured
268
+ `verification: { label, run(cwd, signal, snapshotRoot) }` in a private checkout of the
269
+ recorded Git tree. The pack removes the checkout after the callback finishes. An
270
+ embedding application supplies the isolation for its own verifier. The callback returns
271
+ `{ ok, detail }`. Both results appear in `task.checks`. Each result records its
272
+ Git tree in `revision`. Compare it with `checks.revision` to spot an outdated result.
273
+ Pass the revision displayed to the operator in `{ type: 'merge', revision }` so a
274
+ concurrent edit leaves the worktree open for inspection. Set `operatorMerge: true` to
275
+ have the lead leave completed changes for the operator by default.
276
+
262
277
  ## Sessions across agents
263
278
 
264
279
  Every agent keeps its conversations somewhere of its own. `listSessions()` reads those stores and
package/docs/cli.md CHANGED
@@ -262,6 +262,39 @@ worktree's diff, merge the changes into the lead's directory, or discard the wor
262
262
  Merging leaves the files available for review and commit. Unmerged worktrees stay on disk
263
263
  when you exit. The task controls belong to the chat process that started them.
264
264
 
265
+ Chat packs leave completed changes on the task card by default. Choose **Request review**
266
+ to send the full diff to another agent with its tools disabled. The lead reviews when eligible.
267
+ Claude Code supports this mode. For example, Claude can review a Codex worker in `--pack claude:codex`.
268
+ **Run tests** runs the displayed command in a private copy of the worker's directory. A project with an npm
269
+ test script gets a test button automatically. Choose a different check at startup, for
270
+ example `genaicode ui --pack --verify "python -m pytest"`. Tests run when you request them.
271
+
272
+ The CLI checks out the recorded Git tree, excluding the worker's ignored files. It runs
273
+ tests under Seatbelt on macOS or `/usr/bin/bwrap` (bubblewrap) on Linux, with a temporary
274
+ home and writable space for test output and bundler caches. Installed dependencies are read-only,
275
+ and npm workspace links point to the checked-out packages. Network access is disabled. A missing or disabled
276
+ sandbox reports a failed check. The built-in test runner is unavailable on Windows.
277
+
278
+ Each pack runs one test command at a time under an unprivileged account, for up to five
279
+ minutes and 180 CPU seconds per process. On Linux, a systemd user manager (254 or newer)
280
+ and cgroup v2 enforce 2 GiB of memory across the whole check, zero swap and 64 tasks,
281
+ including threads. The runner checks the kernel's limits before executing the command.
282
+ On macOS, it monitors total resident memory and process count, stopping the group above
283
+ 2 GiB or 64 processes. macOS also applies a system memory limit of 1.5 GiB per process.
284
+
285
+ Each check has a disposable 1 GiB filesystem for the workspace and temporary files. Linux
286
+ mounts the installed dependencies read-only and allows another 16 MiB of shared memory.
287
+ On macOS, the workspace and its copied dependencies share a private sparse disk image. Each
288
+ newly written file is limited to 128 MiB.
289
+
290
+ On macOS, test helpers stay in one process group and exit with the command. Node's child
291
+ process APIs use `fork` and `exec`. Native tools that require Darwin's `posix_spawn` system
292
+ call receive a permission error. Linux runs the command in its own PID namespace.
293
+
294
+ Read **Review notes** and **Test output** beside **Merge locally**. A further edit marks
295
+ earlier results **Outdated**. Run the checks again, or inspect the changed diff and decide
296
+ whether to merge it. In the terminal use `r` for review, `v` for tests and `c` to read the results.
297
+
265
298
  Each prompt after the first continues the agent's own session (`AgentTask.resume`), so you
266
299
  can say "now add a test for that". Prompts sent while the agent works wait in a queue and
267
300
  run next; Esc stops the agent. When the agent asks for permission, `y` approves, `n`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genaicode",
3
- "version": "2.45.0",
3
+ "version": "2.46.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": {