genaicode 2.37.1 → 2.38.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 (41) hide show
  1. package/dist/agents/permissions.d.ts +2 -1
  2. package/dist/agents/permissions.js +3 -0
  3. package/dist/agents/permissions.js.map +1 -1
  4. package/dist/agents/sessions/codex-api.js +1 -0
  5. package/dist/agents/sessions/codex-api.js.map +1 -1
  6. package/dist/agents/sessions/codex.js +38 -33
  7. package/dist/agents/sessions/codex.js.map +1 -1
  8. package/dist/agents/sessions/group.d.ts +2 -0
  9. package/dist/agents/sessions/group.js +8 -0
  10. package/dist/agents/sessions/group.js.map +1 -1
  11. package/dist/agents/sessions/live.d.ts +2 -0
  12. package/dist/agents/sessions/live.js +31 -23
  13. package/dist/agents/sessions/live.js.map +1 -1
  14. package/dist/agents/sessions/send-lock.d.ts +2 -0
  15. package/dist/agents/sessions/send-lock.js +76 -0
  16. package/dist/agents/sessions/send-lock.js.map +1 -0
  17. package/dist/agents/sessions/send.d.ts +26 -0
  18. package/dist/agents/sessions/send.js +87 -0
  19. package/dist/agents/sessions/send.js.map +1 -0
  20. package/dist/agents/sessions/types.d.ts +2 -0
  21. package/dist/agents.d.ts +2 -0
  22. package/dist/agents.js +1 -0
  23. package/dist/agents.js.map +1 -1
  24. package/dist/cli/args.d.ts +8 -1
  25. package/dist/cli/args.js +27 -0
  26. package/dist/cli/args.js.map +1 -1
  27. package/dist/cli/detach-send.d.ts +9 -0
  28. package/dist/cli/detach-send.js +39 -0
  29. package/dist/cli/detach-send.js.map +1 -0
  30. package/dist/cli/main.d.ts +3 -1
  31. package/dist/cli/main.js +47 -0
  32. package/dist/cli/main.js.map +1 -1
  33. package/dist/cli/send-worker.d.ts +1 -0
  34. package/dist/cli/send-worker.js +46 -0
  35. package/dist/cli/send-worker.js.map +1 -0
  36. package/dist/ui/index.js +102 -93
  37. package/dist/ui/web-client.js +15 -15
  38. package/docs/CHANGELOG.md +6 -0
  39. package/docs/agents.md +24 -0
  40. package/docs/cli.md +19 -0
  41. package/package.json +1 -1
package/docs/CHANGELOG.md CHANGED
@@ -8,6 +8,12 @@ fails. Merging to master refreshes the `release` PR; merging that publishes to n
8
8
 
9
9
  ## Unreleased
10
10
 
11
+ ## 2.38.0 — 2026-11-20
12
+
13
+ ### Added
14
+
15
+ - `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)
16
+
11
17
  ## 2.37.1 — 2026-11-20
12
18
 
13
19
  ### 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
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genaicode",
3
- "version": "2.37.1",
3
+ "version": "2.38.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": {