genaicode 2.35.1 → 2.36.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.
package/docs/CHANGELOG.md CHANGED
@@ -8,6 +8,13 @@ fails. Merging to master refreshes the `release` PR; merging that publishes to n
8
8
 
9
9
  ## Unreleased
10
10
 
11
+ ## 2.36.0 — 2026-11-19
12
+
13
+ ### Added
14
+
15
+ - An installer for the `genaicode` command (`curl -fsSL https://raw.githubusercontent.com/gtanczyk/genaicode/master/scripts/install.sh | sh`) that keeps itself up to date: once a day a background check installs a new version beside the running one; `genaicode update [--check] [--version <v>] [--auto on|off]` updates by hand and prints the release notes (#202)
16
+ - Ask an agent what is open across all of them: `genaicode chat --sessions` (and `ui --sessions`) gives the chat's agent the session index as MCP tools (`sessions_projects`, `sessions_list`, `sessions_read`), and `genaicode sessions mcp` serves them to any agent on stdio. In code: `sessionTools()` and `serveMcpStdio()` in `genaicode/agents` (#201)
17
+
11
18
  ## 2.35.1 — 2026-11-19
12
19
 
13
20
  ### Fixed
package/docs/agents.md CHANGED
@@ -364,6 +364,40 @@ match the readers (`.github/workflows/drift-canary.yaml`, `node scripts/drift-ca
364
364
  build): it lists each published CLI version beside `verified`, and fails when the latest Codex
365
365
  app-server protocol (`codex app-server generate-ts`) no longer has a field that genaicode reads.
366
366
 
367
+ ### Asking an agent about the sessions: `sessions mcp`
368
+
369
+ The index is also three MCP tools, so an agent can answer "what is open?" and "what waits for
370
+ me?" across all of them:
371
+
372
+ | tool | what it returns |
373
+ | ------------------- | -------------------------------------------------------------------------------------- |
374
+ | `sessions_projects` | projects worked in lately, with counts per agent and per state |
375
+ | `sessions_list` | sessions, newest first; filters `project`, `agent`, `state`, `text`, `days`, `limit` |
376
+ | `sessions_read` | what was said in one session: prompts, the agent's messages and the names of its tools |
377
+
378
+ ```bash
379
+ npx genaicode chat --sessions # the chat's agent gets the tools
380
+ claude mcp add sessions -- npx genaicode sessions mcp # or any agent, as a stdio MCP server
381
+ codex mcp add sessions -- npx genaicode sessions mcp
382
+ ```
383
+
384
+ `state` is `active`, `waiting`, `unfinished` or `approval` (a session that asks whether it may use
385
+ a tool, known once the [hooks](#which-sessions-need-you-hooks) are installed). The tools only read
386
+ the local stores. They are off unless you ask for them, because the agent that has them reads what
387
+ your other agents' sessions said, and that text goes to its model like anything else it reads;
388
+ treat what it finds there as content, not as instructions. `sessions mcp -a codex` serves one
389
+ agent's sessions only.
390
+
391
+ ```ts
392
+ import { agentSessionSources, claude, codex, sessionTools, startLocalMcpServer } from 'genaicode/agents';
393
+
394
+ const index = await startLocalMcpServer({
395
+ name: 'sessions',
396
+ tools: sessionTools(agentSessionSources([claude(), codex()])),
397
+ });
398
+ agent.run({ prompt: 'What waits for me?', cwd, mcpServers: [index.mcpServer] });
399
+ ```
400
+
367
401
  ### Continuing a session in another agent
368
402
 
369
403
  Sources whose conversations can be read have `read(session)`: the turns of a session (prompts, the
package/docs/cli.md CHANGED
@@ -1,7 +1,40 @@
1
- # Command line: run, chat, ui, embed, acp
1
+ # Command line: install, run, chat, ui, embed, acp
2
2
 
3
3
  [← README](../README.md)
4
4
 
5
+ ## Install the command
6
+
7
+ `npx genaicode` works without installing anything. To type just `genaicode`, and have it
8
+ update itself, run the installer (macOS and Linux, Node.js 20+ with npm):
9
+
10
+ ```bash
11
+ curl -fsSL https://raw.githubusercontent.com/gtanczyk/genaicode/master/scripts/install.sh | sh
12
+ ```
13
+
14
+ It is a short shell script ([scripts/install.sh](../scripts/install.sh), read it first) that
15
+ `npm install`s the published package without lifecycle scripts into
16
+ `~/.genaicode/versions/<version>`, points `~/.genaicode/current` at it and writes a
17
+ `~/.local/bin/genaicode` shim. Nothing needs sudo. If `~/.local/bin` is not on your `PATH`,
18
+ it prints the line to add to your shell profile. `GENAICODE_VERSION`, `GENAICODE_HOME` and
19
+ `GENAICODE_BIN_DIR` change the version, the install directory and the bin directory.
20
+
21
+ ```bash
22
+ genaicode update # install the latest version now and print what changed
23
+ genaicode update --check # only say whether a newer version is out
24
+ genaicode update --version 2.35.1
25
+ genaicode update --auto off # stop the daily check (--auto on brings it back)
26
+ ```
27
+
28
+ Once a day, a `genaicode` start looks for a new version in the npm registry, in a background
29
+ process, so the command never waits on the network. A new version installs beside the
30
+ running one and `current` switches over in one step, so running sessions are not disturbed
31
+ and the next start uses it; that start prints one line with the old and new versions and
32
+ the release notes link. The previous version and any still running are kept; older ones are removed.
33
+ `GENAICODE_NO_AUTO_UPDATE=1` (and `CI`) skip the check for one run. Windows, `npx`, a global
34
+ `npm install -g genaicode` and a project dependency update through npm as usual.
35
+
36
+ To uninstall, remove `~/.genaicode` and `~/.local/bin/genaicode`.
37
+
5
38
  ## From the command line
6
39
 
7
40
  The `genaicode` bin runs the same headless drivers without writing any code:
@@ -45,6 +78,12 @@ continues it (see [sessions](agents.md#sessions-across-agents)).
45
78
  updates: counts per store, never content, exit code 1 when one looks broken (see
46
79
  [sessions doctor](agents.md#when-an-agent-changes-its-store-sessions-doctor)).
47
80
 
81
+ `npx genaicode chat --sessions` gives the chat's agent that index as tools, so you can ask it what
82
+ is open or what waits for you in every agent; `npx genaicode sessions mcp` serves the same tools
83
+ to any agent as a stdio MCP server (see
84
+ [sessions mcp](agents.md#asking-an-agent-about-the-sessions-sessions-mcp)). The agent that has
85
+ them reads what the other sessions said.
86
+
48
87
  ## Chat with an agent: terminal and browser
49
88
 
50
89
  ```bash
@@ -5,10 +5,10 @@ separate packages to shrink the default install.
5
5
 
6
6
  ## Current shape
7
7
 
8
- | Package surface | Role |
9
- | ---------------------- | ----------------------------------------- |
10
- | `genaicode` | Core client, IR, plugins, middleware |
11
- | `genaicode/providers` | Adapters + public converters |
8
+ | Package surface | Role |
9
+ | --------------------- | ------------------------------------ |
10
+ | `genaicode` | Core client, IR, plugins, middleware |
11
+ | `genaicode/providers` | Adapters + public converters |
12
12
 
13
13
  Hard dependencies today (approximate installed sizes in this repo's lockfile):
14
14
 
package/docs/retry.md CHANGED
@@ -22,11 +22,11 @@ await withRetry(() => ai('summarize this').text(), {
22
22
 
23
23
  `classifyError` returns `{ class, retryable, reason, status?, code?, cause }`:
24
24
 
25
- | Class | Typical causes | Retry? |
26
- | ----------- | -------------------------------------- | ------ |
27
- | `transient` | 429, 5xx, timeouts, connection resets | yes |
28
- | `permanent` | 4xx (except above), auth, abort | no |
29
- | `unknown` | Unrecognized shapes | no* |
25
+ | Class | Typical causes | Retry? |
26
+ | ----------- | ------------------------------------- | ------ |
27
+ | `transient` | 429, 5xx, timeouts, connection resets | yes |
28
+ | `permanent` | 4xx (except above), auth, abort | no |
29
+ | `unknown` | Unrecognized shapes | no\* |
30
30
 
31
31
  \*Treat unknown as non-retryable by default; override with `shouldRetry` when you
32
32
  know more about your gateway.
@@ -35,7 +35,7 @@ know more about your gateway.
35
35
 
36
36
  Safe to retry without extra coordination:
37
37
 
38
- - Pure generation (`text`, `json`, `toolCalls` that only *propose* tool calls)
38
+ - Pure generation (`text`, `json`, `toolCalls` that only _propose_ tool calls)
39
39
  - Read-only prompts against immutable inputs
40
40
 
41
41
  Not safe to retry blindly:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genaicode",
3
- "version": "2.35.1",
3
+ "version": "2.36.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": {