genaicode 2.44.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 (63) 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/claude.js +65 -5
  15. package/dist/agents/sessions/claude.js.map +1 -1
  16. package/dist/agents/sessions/group.js +25 -5
  17. package/dist/agents/sessions/group.js.map +1 -1
  18. package/dist/agents/sessions/index.d.ts +1 -1
  19. package/dist/agents/sessions/index.js +1 -1
  20. package/dist/agents/sessions/index.js.map +1 -1
  21. package/dist/agents/sessions/topics.d.ts +33 -5
  22. package/dist/agents/sessions/topics.js +112 -16
  23. package/dist/agents/sessions/topics.js.map +1 -1
  24. package/dist/agents/sessions/types.d.ts +8 -0
  25. package/dist/agents/types.d.ts +5 -0
  26. package/dist/agents/usage.d.ts +6 -0
  27. package/dist/agents/usage.js +18 -0
  28. package/dist/agents/usage.js.map +1 -1
  29. package/dist/agents.d.ts +2 -1
  30. package/dist/agents.js +1 -1
  31. package/dist/agents.js.map +1 -1
  32. package/dist/cli/args.d.ts +5 -1
  33. package/dist/cli/args.js +8 -2
  34. package/dist/cli/args.js.map +1 -1
  35. package/dist/cli/check-limits.d.ts +13 -0
  36. package/dist/cli/check-limits.js +129 -0
  37. package/dist/cli/check-limits.js.map +1 -0
  38. package/dist/cli/check-process.d.ts +13 -0
  39. package/dist/cli/check-process.js +86 -0
  40. package/dist/cli/check-process.js.map +1 -0
  41. package/dist/cli/check-storage.d.ts +3 -0
  42. package/dist/cli/check-storage.js +52 -0
  43. package/dist/cli/check-storage.js.map +1 -0
  44. package/dist/cli/limit-test.sh +37 -0
  45. package/dist/cli/mac-fork.cjs +22 -0
  46. package/dist/cli/main.d.ts +3 -5
  47. package/dist/cli/main.js +62 -26
  48. package/dist/cli/main.js.map +1 -1
  49. package/dist/cli/pack-verify.d.ts +3 -0
  50. package/dist/cli/pack-verify.js +214 -0
  51. package/dist/cli/pack-verify.js.map +1 -0
  52. package/dist/react/agent-chat.css +20 -0
  53. package/dist/react/format.d.ts +2 -0
  54. package/dist/react/format.js +12 -0
  55. package/dist/react/format.js.map +1 -1
  56. package/dist/react/pack-tasks.js +25 -6
  57. package/dist/react/pack-tasks.js.map +1 -1
  58. package/dist/ui/index.js +108 -107
  59. package/dist/ui/web-client.js +36 -16
  60. package/docs/CHANGELOG.md +21 -0
  61. package/docs/agents.md +22 -3
  62. package/docs/cli.md +41 -0
  63. package/package.json +1 -1
package/docs/CHANGELOG.md CHANGED
@@ -8,6 +8,27 @@ 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
+
21
+ ## 2.45.0 — 2026-11-21
22
+
23
+ ### Added
24
+
25
+ - `genaicode topics refresh` puts the sessions Claude Code ran for a claude.ai project (`SessionInfo.project`, read from the session) in a topic named as that project, without asking an agent (`projectTopics()`); `--again` sorts everything anew (#244)
26
+
27
+ ### Fixed
28
+
29
+ - Fewer machine-made sessions in listings and topics: Claude Code's `turnOrigin` is read, and single-prompt headless runs count as automated; what ran in a pack worktree or a temporary directory takes no topic; a topic asks for you only for approvals and for 3 days after a message asked something (#244)
30
+ - `genaicode topics refresh` says how many runs it takes and how far it is after each one, and gives sessions that say the very same thing (the hundredth run of one prompt) a single line, so there are fewer runs (#242)
31
+
11
32
  ## 2.44.0 — 2026-11-21
12
33
 
13
34
  ### 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
@@ -336,8 +351,9 @@ it). Those come right after the approvals in `--waiting`, marked `●`, and `ses
336
351
  statement is not seen.
337
352
 
338
353
  Sessions nobody typed into are left out of every listing: scheduled tasks and notifications in
339
- Claude Code (every prompt has `origin.kind` other than `human`, or the session opens with a
340
- scheduled task nobody answered) and `codex exec` runs. They carry `automated: true`;
354
+ Claude Code (every prompt has `origin.kind` or `turnOrigin` other than `human`, or the session
355
+ opens with a scheduled task nobody answered), headless runs of it with a single prompt (a program
356
+ driving it through more prompts is somebody's chat) and `codex exec` runs. They carry `automated: true`;
341
357
  `sessions --automated`, or `{ automated: true }` in the query, lists them too.
342
358
 
343
359
  **Topics.** Sessions can be kept as pieces of work that cross agents and directories
@@ -366,7 +382,10 @@ const { topics, unsorted } = summarizeTopics(sessions, sorted.store); // asking
366
382
 
367
383
  The prompt holds one line per session (agent, last two directory names, title or first and last
368
384
  prompt), quoted as data. `renameTopic()`, `mergeTopics()` and `moveSessions()` correct a store; a
369
- session that has a topic is never moved by a later answer.
385
+ session that has a topic is never moved by a later answer. `projectTopics(sessions, store)` places
386
+ the sessions relayed from a claude.ai project (`SessionInfo.project`: its id, and its name where
387
+ the session gives it; such a session is titled as its thread there) in a topic named as the project, without an agent. What ran in a pack member's worktree
388
+ (`.genaicode/worktrees`) or a temporary directory (`inRunDirectory()`) is listed as ever but takes no topic.
370
389
 
371
390
  For Copilot and Gemini shell approvals, `waitingCommands` contains the tool name and up to
372
391
  200 characters of each matching command. Genaicode keeps a digest in its private hook record
package/docs/cli.md CHANGED
@@ -170,6 +170,14 @@ in `~/.genaicode/topics.json`. The next refresh sorts only the new sessions into
170
170
  are. `-a` picks the agent and `-m` the model (Claude Code sorts with `haiku` unless told
171
171
  otherwise); `--since` looks further back than the 30 days it and `topics` cover by default.
172
172
 
173
+ Sessions that Claude Code ran for a claude.ai project (Remote Control) say which project in their
174
+ first message. Those go to a topic named as the project, before any agent is asked and at no
175
+ cost, so the topics start from the projects you already have. `topics refresh --again` drops the
176
+ topics there are, corrections included, and sorts every session anew.
177
+
178
+ A topic asks for you (`●`) when a session waits for an approval, or when its last message asked
179
+ something in the last 3 days; an older question is a thread you left.
180
+
173
181
  The result is yours to correct, and corrections stay: `topics rename <topic> <name>`,
174
182
  `topics merge <topic> <into>`, `topics move <session id...> --to <topic or new name>` (`--out`
175
183
  takes sessions out, to be sorted again). A topic is named by its id, its name, or a part of the
@@ -254,6 +262,39 @@ worktree's diff, merge the changes into the lead's directory, or discard the wor
254
262
  Merging leaves the files available for review and commit. Unmerged worktrees stay on disk
255
263
  when you exit. The task controls belong to the chat process that started them.
256
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
+
257
298
  Each prompt after the first continues the agent's own session (`AgentTask.resume`), so you
258
299
  can say "now add a test for that". Prompts sent while the agent works wait in a queue and
259
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.44.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": {