genaicode 2.37.1 → 2.39.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 (52) hide show
  1. package/dist/agents/mcp-tools.d.ts +2 -0
  2. package/dist/agents/mcp-tools.js +6 -1
  3. package/dist/agents/mcp-tools.js.map +1 -1
  4. package/dist/agents/permissions.d.ts +2 -1
  5. package/dist/agents/permissions.js +3 -0
  6. package/dist/agents/permissions.js.map +1 -1
  7. package/dist/agents/sessions/answer.d.ts +7 -2
  8. package/dist/agents/sessions/answer.js +16 -10
  9. package/dist/agents/sessions/answer.js.map +1 -1
  10. package/dist/agents/sessions/codex-api.js +1 -0
  11. package/dist/agents/sessions/codex-api.js.map +1 -1
  12. package/dist/agents/sessions/codex.js +38 -33
  13. package/dist/agents/sessions/codex.js.map +1 -1
  14. package/dist/agents/sessions/group.d.ts +2 -0
  15. package/dist/agents/sessions/group.js +8 -0
  16. package/dist/agents/sessions/group.js.map +1 -1
  17. package/dist/agents/sessions/index.js +1 -1
  18. package/dist/agents/sessions/index.js.map +1 -1
  19. package/dist/agents/sessions/live.d.ts +6 -2
  20. package/dist/agents/sessions/live.js +37 -27
  21. package/dist/agents/sessions/live.js.map +1 -1
  22. package/dist/agents/sessions/send-lock.d.ts +2 -0
  23. package/dist/agents/sessions/send-lock.js +76 -0
  24. package/dist/agents/sessions/send-lock.js.map +1 -0
  25. package/dist/agents/sessions/send.d.ts +26 -0
  26. package/dist/agents/sessions/send.js +87 -0
  27. package/dist/agents/sessions/send.js.map +1 -0
  28. package/dist/agents/sessions/tools.d.ts +2 -2
  29. package/dist/agents/sessions/tools.js +71 -29
  30. package/dist/agents/sessions/tools.js.map +1 -1
  31. package/dist/agents/sessions/types.d.ts +4 -0
  32. package/dist/agents.d.ts +2 -0
  33. package/dist/agents.js +1 -0
  34. package/dist/agents.js.map +1 -1
  35. package/dist/cli/args.d.ts +8 -1
  36. package/dist/cli/args.js +27 -0
  37. package/dist/cli/args.js.map +1 -1
  38. package/dist/cli/detach-send.d.ts +9 -0
  39. package/dist/cli/detach-send.js +39 -0
  40. package/dist/cli/detach-send.js.map +1 -0
  41. package/dist/cli/main.d.ts +3 -1
  42. package/dist/cli/main.js +59 -11
  43. package/dist/cli/main.js.map +1 -1
  44. package/dist/cli/send-worker.d.ts +1 -0
  45. package/dist/cli/send-worker.js +46 -0
  46. package/dist/cli/send-worker.js.map +1 -0
  47. package/dist/ui/index.js +102 -93
  48. package/dist/ui/web-client.js +15 -15
  49. package/docs/CHANGELOG.md +12 -0
  50. package/docs/agents.md +38 -7
  51. package/docs/cli.md +24 -5
  52. package/package.json +1 -1
package/docs/CHANGELOG.md CHANGED
@@ -8,6 +8,18 @@ fails. Merging to master refreshes the `release` PR; merging that publishes to n
8
8
 
9
9
  ## Unreleased
10
10
 
11
+ ## 2.39.0 — 2026-11-20
12
+
13
+ ### Added
14
+
15
+ - Ask “Which sessions need my attention?” in `genaicode chat --sessions`. The new `sessions_waiting` MCP tool lists pending approvals and replies across projects, including open questions (#215)
16
+
17
+ ## 2.38.0 — 2026-11-20
18
+
19
+ ### Added
20
+
21
+ - `genaicode sessions send <id> "<prompt>"` and **Reply** in the browser's Sessions view resume a waiting local conversation in its original agent and directory. The CLI streams the reply or runs in the background with `--detach` (#213)
22
+
11
23
  ## 2.37.1 — 2026-11-20
12
24
 
13
25
  ### Fixed
package/docs/agents.md CHANGED
@@ -331,6 +331,30 @@ The command in the settings is the `genaicode` that installed it (`node` and the
331
331
  `cli.js`): install it from a `genaicode` that stays where it is (a project's dependency or a
332
332
  global install), and run `hooks install` again after moving it.
333
333
 
334
+ ### Sending a turn to a session
335
+
336
+ `sendSession()` accepts a user's message for the local session's own driver. It checks the
337
+ session state again at send time, resolves the original working directory and passes the full
338
+ native session id to `AgentTask.resume`. Use `onEvent` for streaming or await the final result.
339
+
340
+ ```ts
341
+ import { claude, codex, sendSession } from 'genaicode/agents';
342
+
343
+ const result = await sendSession([claude(), codex()], id, message, {
344
+ permissions: { sandbox: 'read-only' },
345
+ onEvent(event) {
346
+ if (event.type === 'text-delta') process.stdout.write(event.text);
347
+ },
348
+ });
349
+ ```
350
+
351
+ Pass `{ source }` with a full id from a listing to target that exact session. CLI callers can
352
+ also supply a unique id prefix. A busy session, pending approval, missing directory, unknown
353
+ state or unsupported driver prevents the run from starting. When hooks are absent, the store's
354
+ activity estimate applies. A claim under `~/.genaicode/sending` keeps concurrent tower sends
355
+ to the same session apart, including sends from separate processes. Native clients report their
356
+ own activity separately. The session MCP tools remain read-only.
357
+
334
358
  ### Being told: `notify`
335
359
 
336
360
  ```bash
@@ -436,14 +460,15 @@ app-server protocol (`codex app-server generate-ts`) no longer has a field that
436
460
 
437
461
  ### Asking an agent about the sessions: `sessions mcp`
438
462
 
439
- The index is also three MCP tools, so an agent can answer "what is open?" and "what waits for
440
- me?" across all of them:
463
+ The session index provides four read-only MCP tools. In `genaicode chat --sessions`, ask
464
+ "Which sessions need my attention?" to see which project needs a decision or a reply.
441
465
 
442
- | tool | what it returns |
443
- | ------------------- | -------------------------------------------------------------------------------------- |
444
- | `sessions_projects` | projects worked in lately, with counts per agent and per state |
445
- | `sessions_list` | sessions, newest first; filters `project`, `agent`, `state`, `text`, `days`, `limit` |
446
- | `sessions_read` | what was said in one session: prompts, the agent's messages and the names of its tools |
466
+ | tool | what it returns |
467
+ | ------------------- | --------------------------------------------------------------------------------------------- |
468
+ | `sessions_projects` | projects worked in lately, with counts per agent and per state |
469
+ | `sessions_list` | sessions, newest first; filters `project`, `agent`, `state`, `text`, `days`, `limit` |
470
+ | `sessions_waiting` | approvals and replies with open questions, filtered by `project`, `agent`, `days` and `limit` |
471
+ | `sessions_read` | what was said in one session: prompts, the agent's messages and the names of its tools |
447
472
 
448
473
  ```bash
449
474
  npx genaicode chat --sessions # the chat's agent gets the tools
@@ -451,6 +476,12 @@ claude mcp add sessions -- npx genaicode sessions mcp # or any agent, as a
451
476
  codex mcp add sessions -- npx genaicode sessions mcp
452
477
  ```
453
478
 
479
+ `sessions_waiting` uses the same order as `genaicode sessions --waiting`. It shows approvals
480
+ first, then sessions awaiting a reply, newest first within each group. It looks back seven days
481
+ and shows up to 30 sessions by default. For questions held open by `hooks install --answer`,
482
+ the agent can read the question ID, tool name and preview. Archived sessions stay out of this
483
+ view and appear with `[archived]` in `sessions_list` and `sessions_read`.
484
+
454
485
  `state` is `active`, `waiting`, `unfinished` or `approval` (a session that asks whether it may use
455
486
  a tool, known once the [hooks](#which-sessions-need-you-hooks) are installed). The tools only read
456
487
  the local stores. They are off unless you ask for them, because the agent that has them reads what
package/docs/cli.md CHANGED
@@ -75,6 +75,25 @@ half way. After `npx genaicode hooks install`, Claude Code, Codex, Gemini, Copil
75
75
  do, and `◆` marks one that asks for approval (see [hooks](agents.md#which-sessions-need-you-hooks)). Each line ends with the session id; `genaicode chat -a <agent> -C <dir> -r <id>`
76
76
  continues it (see [sessions](agents.md#sessions-across-agents)).
77
77
 
78
+ To send one message from another directory, use the id from the listing. A unique prefix of at least eight characters also works.
79
+
80
+ ```bash
81
+ genaicode sessions send a1b2c3d4 "Which test still fails?"
82
+ genaicode sessions send a1b2c3d4 --sandbox read-only "Explain the failure"
83
+ genaicode sessions send a1b2c3d4 --detach "Run the regression tests"
84
+ ```
85
+
86
+ The original agent resumes the conversation in its own project. Replies stream to stdout.
87
+ You can pipe the prompt on stdin or use `-a <agent>` to search one agent's store.
88
+ `--detach` returns the background process ID once the agent acknowledges the turn. Its reply
89
+ stays in the native conversation. The driver uses its default permissions unless you select
90
+ `--sandbox read-only|workspace-write|unrestricted`. Each driver accepts its supported modes.
91
+
92
+ In the browser, choose **Sessions → Reply**, enter the message and choose **Send**. The reply appears
93
+ in the Sessions view. Both entry points require a local session that is waiting for a reply or
94
+ stopped mid-turn, with a driver that supports resuming. A running turn or pending tool approval
95
+ must finish first. The check uses the latest store and hook information available when you send.
96
+
78
97
  `npx genaicode notify on` then shows a desktop notification when a session asks for approval
79
98
  (`--done`: also when one finishes its turn; see [notify](agents.md#being-told-notify)).
80
99
 
@@ -92,11 +111,11 @@ them); the agents' files stay as they are (see
92
111
  updates: counts per store, never content, exit code 1 when one looks broken (see
93
112
  [sessions doctor](agents.md#when-an-agent-changes-its-store-sessions-doctor)).
94
113
 
95
- `npx genaicode chat --sessions` gives the chat's agent that index as tools, so you can ask it what
96
- is open or what waits for you in every agent; `npx genaicode sessions mcp` serves the same tools
97
- to any agent as a stdio MCP server (see
98
- [sessions mcp](agents.md#asking-an-agent-about-the-sessions-sessions-mcp)). The agent that has
99
- them reads what the other sessions said.
114
+ In `npx genaicode chat --sessions`, ask "Which sessions need my attention?" The
115
+ `sessions_waiting` tool shows the same sessions as `genaicode sessions --waiting`, including
116
+ the project, open approval questions and the latest reply. `npx genaicode sessions mcp` serves
117
+ the same read-only tools over stdio. The agent can read what the other sessions said and what
118
+ their open questions ask. See [session tools](agents.md#asking-an-agent-about-the-sessions-sessions-mcp).
100
119
 
101
120
  ## Chat with an agent: terminal and browser
102
121
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genaicode",
3
- "version": "2.37.1",
3
+ "version": "2.39.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": {