pairz 1.0.0-rc.83 → 1.0.0-rc.85

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 (143) hide show
  1. package/AGENTS.md +4 -4
  2. package/CHANGELOG.md +54 -0
  3. package/README.md +3 -3
  4. package/docs/build-compass.md +1 -1
  5. package/docs/getting-started.md +1 -1
  6. package/docs/guides/a-business-apps-screens.md +1 -1
  7. package/docs/guides/agents-on-peoples-plans.md +17 -5
  8. package/docs/guides/the-compiler.md +2 -2
  9. package/docs/reference/plugins/accounts-web.md +1 -1
  10. package/docs/reference/plugins/accounts.md +1 -1
  11. package/docs/reference/plugins/api-web.md +1 -1
  12. package/docs/reference/plugins/api.md +1 -1
  13. package/docs/reference/plugins/boards-web.md +1 -1
  14. package/docs/reference/plugins/boards.md +1 -1
  15. package/docs/reference/plugins/chat-channels-pt-br.md +1 -1
  16. package/docs/reference/plugins/chat-channels.md +1 -1
  17. package/docs/reference/plugins/chat-terminal.md +1 -1
  18. package/docs/reference/plugins/chat-web.md +1 -1
  19. package/docs/reference/plugins/chat.md +3 -3
  20. package/docs/reference/plugins/computers-terminal.md +1 -1
  21. package/docs/reference/plugins/computers-web.md +1 -1
  22. package/docs/reference/plugins/computers.md +1 -1
  23. package/docs/reference/plugins/contacts-web.md +1 -1
  24. package/docs/reference/plugins/contacts.md +1 -1
  25. package/docs/reference/plugins/credits-web.md +1 -1
  26. package/docs/reference/plugins/credits.md +1 -1
  27. package/docs/reference/plugins/dev-sign-in.md +1 -1
  28. package/docs/reference/plugins/directory-member.md +1 -1
  29. package/docs/reference/plugins/directory-web.md +1 -1
  30. package/docs/reference/plugins/directory.md +1 -1
  31. package/docs/reference/plugins/documents-web.md +1 -1
  32. package/docs/reference/plugins/documents.md +1 -1
  33. package/docs/reference/plugins/email-sign-in.md +1 -1
  34. package/docs/reference/plugins/email.md +1 -1
  35. package/docs/reference/plugins/google-sign-in.md +1 -1
  36. package/docs/reference/plugins/history.md +1 -1
  37. package/docs/reference/plugins/identity.md +1 -1
  38. package/docs/reference/plugins/maintenance.md +1 -1
  39. package/docs/reference/plugins/mcp.md +1 -1
  40. package/docs/reference/plugins/mcpClient.md +89 -0
  41. package/docs/reference/plugins/memory-extraction.md +1 -1
  42. package/docs/reference/plugins/memory-terminal.md +1 -1
  43. package/docs/reference/plugins/memory-web.md +1 -1
  44. package/docs/reference/plugins/memory.md +1 -1
  45. package/docs/reference/plugins/models.md +1 -1
  46. package/docs/reference/plugins/openapi.md +1 -1
  47. package/docs/reference/plugins/password-sign-in.md +1 -1
  48. package/docs/reference/plugins/push-web.md +1 -1
  49. package/docs/reference/plugins/push.md +1 -1
  50. package/docs/reference/plugins/routines-web.md +1 -1
  51. package/docs/reference/plugins/routines.md +1 -1
  52. package/docs/reference/plugins/skills-web.md +1 -1
  53. package/docs/reference/plugins/skills.md +1 -1
  54. package/docs/reference/plugins/spaces-terminal.md +1 -1
  55. package/docs/reference/plugins/spaces-web.md +1 -1
  56. package/docs/reference/plugins/spaces.md +1 -1
  57. package/docs/reference/plugins/stripe-webhook.md +1 -1
  58. package/docs/reference/plugins/stripe.md +1 -1
  59. package/docs/reference/plugins/team-web.md +1 -1
  60. package/docs/reference/plugins/team.md +1 -1
  61. package/docs/reference/plugins/terminal-shell.md +1 -1
  62. package/docs/reference/plugins/terminal.md +1 -1
  63. package/docs/reference/plugins/tiers-web.md +1 -1
  64. package/docs/reference/plugins/tiers.md +1 -1
  65. package/docs/reference/plugins/usage-terminal.md +1 -1
  66. package/docs/reference/plugins/usage-web.md +1 -1
  67. package/docs/reference/plugins/usage.md +1 -1
  68. package/docs/reference/plugins/voice.md +1 -1
  69. package/docs/reference/plugins/web-lines.md +1 -1
  70. package/docs/reference/plugins/web-page.md +1 -1
  71. package/docs/reference/plugins/web-shell.md +1 -1
  72. package/docs/reference/plugins/webTools.md +1 -1
  73. package/docs/reference/plugins/whatsapp-web.md +1 -1
  74. package/docs/reference/plugins/whatsapp.md +1 -1
  75. package/docs/reference/plugins.json +864 -131
  76. package/docs/reference/plugins.md +2 -0
  77. package/docs/reference.md +5 -5
  78. package/package.json +1 -1
  79. package/plugins/access/accounts/contract.d.ts +3 -0
  80. package/plugins/access/accounts/contract.js +3 -1
  81. package/plugins/access/accounts/shared/oauth.d.ts +1 -1
  82. package/plugins/agents/chat/contract.d.ts +2 -2
  83. package/plugins/agents/chat/contract.js +1 -1
  84. package/plugins/agents/chat/processors/turn.js +11 -2
  85. package/plugins/agents/chat/shared/tools.d.ts +8 -0
  86. package/plugins/agents/chat/shared/tools.js +26 -1
  87. package/plugins/agents/chat/shared/types.d.ts +13 -0
  88. package/plugins/agents/chat/views/prompt.js +5 -0
  89. package/plugins/agents/mcpclient/actions/call.d.ts +11 -0
  90. package/plugins/agents/mcpclient/actions/call.js +60 -0
  91. package/plugins/agents/mcpclient/actions/connections.d.ts +6 -0
  92. package/plugins/agents/mcpclient/actions/connections.js +170 -0
  93. package/plugins/agents/mcpclient/collections/connection.d.ts +247 -0
  94. package/plugins/agents/mcpclient/collections/connection.js +74 -0
  95. package/plugins/agents/mcpclient/contract.d.ts +65 -0
  96. package/plugins/agents/mcpclient/contract.js +2 -0
  97. package/plugins/agents/mcpclient/mod.d.ts +14 -0
  98. package/plugins/agents/mcpclient/mod.js +48 -0
  99. package/plugins/agents/mcpclient/resources/source.d.ts +2 -0
  100. package/plugins/agents/mcpclient/resources/source.js +53 -0
  101. package/plugins/agents/mcpclient/routes/oauth.d.ts +8 -0
  102. package/plugins/agents/mcpclient/routes/oauth.js +45 -0
  103. package/plugins/agents/mcpclient/shared/auth.d.ts +26 -0
  104. package/plugins/agents/mcpclient/shared/auth.js +132 -0
  105. package/plugins/agents/mcpclient/shared/http.d.ts +13 -0
  106. package/plugins/agents/mcpclient/shared/http.js +73 -0
  107. package/plugins/agents/mcpclient/shared/resolve.d.ts +3 -0
  108. package/plugins/agents/mcpclient/shared/resolve.js +4 -0
  109. package/plugins/agents/mcpclient/shared/rpc.d.ts +30 -0
  110. package/plugins/agents/mcpclient/shared/rpc.js +228 -0
  111. package/plugins/agents/mcpclient/shared/session.d.ts +39 -0
  112. package/plugins/agents/mcpclient/shared/session.js +139 -0
  113. package/plugins/agents/mcpclient/shared/settings.d.ts +16 -0
  114. package/plugins/agents/mcpclient/shared/settings.js +15 -0
  115. package/plugins/agents/mcpclient/shared/signin.d.ts +20 -0
  116. package/plugins/agents/mcpclient/shared/signin.js +212 -0
  117. package/plugins/agents/mcpclient/shared/snapshot.d.ts +9 -0
  118. package/plugins/agents/mcpclient/shared/snapshot.js +43 -0
  119. package/plugins/agents/mod.d.ts +1 -0
  120. package/plugins/agents/mod.js +1 -0
  121. package/plugins/agents/webtools/contract.d.ts +6 -0
  122. package/plugins/agents/webtools/contract.js +6 -1
  123. package/plugins/agents/webtools/shared/address.d.ts +4 -1
  124. package/plugins/agents/webtools/shared/address.js +4 -6
  125. package/plugins/agents/webtools/shared/read.js +2 -1
  126. package/plugins/agents/webtools/shared/resolve.d.ts +3 -0
  127. package/plugins/agents/webtools/shared/resolve.js +4 -0
  128. package/plugins/compute/computers/actions/engine.js +13 -3
  129. package/plugins/compute/computers/program/agents/acp.d.ts +3 -1
  130. package/plugins/compute/computers/program/agents/acp.js +12 -8
  131. package/plugins/compute/computers/program/agents/claude.js +4 -4
  132. package/plugins/compute/computers/program/agents/codex.js +2 -1
  133. package/plugins/compute/computers/program/agents/engines.d.ts +69 -5
  134. package/plugins/compute/computers/program/agents/engines.js +92 -9
  135. package/plugins/compute/computers/program/agents/permission.d.ts +49 -13
  136. package/plugins/compute/computers/program/agents/permission.js +114 -36
  137. package/plugins/compute/computers/program/agents/types.d.ts +3 -2
  138. package/plugins/compute/computers/program/agents/types.js +3 -2
  139. package/plugins/compute/computers/program/version.d.ts +1 -1
  140. package/plugins/compute/computers/program/version.js +1 -1
  141. package/plugins/compute/computers/program/workloads/search.d.ts +1 -1
  142. package/plugins/compute/computers/resources/downloads.js +1 -1
  143. package/plugins/compute/computers/shared/workloads.d.ts +4 -1
package/AGENTS.md CHANGED
@@ -4,7 +4,7 @@ A guide for coding agents (Claude Code, Codex, Cursor, Gemini) building an app w
4
4
  whole before you write code. The last section is for work on Pairz itself.
5
5
 
6
6
  It ships in the package (`node_modules/pairz/AGENTS.md`, and `@pairz/pairz` on JSR) and goes with
7
- `pairz@1.0.0-rc.83`. The [reading list](llms.txt) links to every docs page in the installed package.
7
+ `pairz@1.0.0-rc.85`. The [reading list](llms.txt) links to every docs page in the installed package.
8
8
  The same pages are online at https://pairz.ai/llms.txt. When you're unsure of a name, fetch its page
9
9
  or read the package's types (`node_modules/pairz/**/*.d.ts`). Don't guess.
10
10
 
@@ -243,7 +243,7 @@ Plugins reach each other only through the runtime, by name. One that builds on a
243
243
  Start on Node 24 or newer:
244
244
 
245
245
  ```sh
246
- npx pairz@1.0.0-rc.83 init orders
246
+ npx pairz@1.0.0-rc.85 init orders
247
247
  cd orders
248
248
  npm run check
249
249
  npm run dev
@@ -262,7 +262,7 @@ for fields such as `requires`, `defaults` and `guard`, `lib/web/` for React comp
262
262
  names in `pairz-env.d.ts`. Commit that declaration and ignore `.pairz/build/`. The server imports
263
263
  `#pairz/plugins/<name>/mod.ts`, the browser `web.ts` and the terminal `terminal.ts` from the same
264
264
  folder. The starter's dev script watches declarations and the server. On Deno, the compiler entry is
265
- `deno run -A jsr:@pairz/pairz@1.0.0-rc.83/gen`.
265
+ `deno run -A jsr:@pairz/pairz@1.0.0-rc.85/gen`.
266
266
 
267
267
  Existing plugins with a hand-written `mod.ts` keep their own assembly and explicit schemas. List
268
268
  them alongside generated plugins in `app.ts`. [The compiler](docs/guides/the-compiler.md).
@@ -273,7 +273,7 @@ line `@AGENTS.md` (Claude Code reads `CLAUDE.md`, and follows the import). Keep
273
273
  ```markdown
274
274
  # AGENTS.md
275
275
 
276
- This app runs on Pairz (pairz@1.0.0-rc.83). Read node_modules/pairz/AGENTS.md first;
276
+ This app runs on Pairz (pairz@1.0.0-rc.85). Read node_modules/pairz/AGENTS.md first;
277
277
  node_modules/pairz/llms.txt lists the installed guides.
278
278
 
279
279
  - `npm test` runs offline. Run `npm run build` after editing declarations. `npm run check` checks
package/CHANGELOG.md CHANGED
@@ -1,3 +1,57 @@
1
+ ## 1.0.0-rc.85 — 2026-12-05
2
+
3
+ ### Fixed
4
+
5
+ - **Agents on a Gemini plan can use the computer's tools (again).** On Antigravity (`agy acp`), an
6
+ agent's call to one of the computer's tools was refused, and the person saw the refusal notice:
7
+ over ACP, Antigravity loads no permission rules from its settings, allow, ask or deny (its open
8
+ bugs [#1966](https://github.com/google-antigravity/antigravity-cli/issues/1966),
9
+ [#1781](https://github.com/google-antigravity/antigravity-cli/issues/1781),
10
+ [#1785](https://github.com/google-antigravity/antigravity-cli/issues/1785)), so it asked about
11
+ them, and it names them `mcp_pairz_<tool>` ("Run mcp_pairz_read_file"), a name the program didn't
12
+ know. The program now knows a call is the agent's by its name and kind, never its title: `name`
13
+ exactly `mcp_pairz_<tool>` for one of the session's tools, of kind `other` or none (its own
14
+ command is titled with the command line, so "Run mcp_pairz_terminal" as a title proves nothing).
15
+ Antigravity's own tools are denied by hooks the program writes in its home
16
+ (`~/.gemini/config/hooks.json`: `PreToolUse` denies every tool but `mcp_pairz_…`, telling its
17
+ model "off in Pairz: the agent's own tools only", and approves the agent's), since its settings'
18
+ deny rules weren't applied either; not on Windows, where the shell that runs a hook isn't
19
+ documented. The settings stay, for when Antigravity reads them over ACP, and the program still
20
+ refuses anything else that asks.
21
+ - **A refusal logs what was asked.** When the program refuses a tool an engine asked for, the
22
+ computer's log and the app's (`refused`, with its new `request`) keep the request as the engine
23
+ sent it, what looks like a secret redacted, at most 2 KB, so a change in how a CLI asks shows the
24
+ next time.
25
+
26
+ ## 1.0.0-rc.84 — 2026-12-05
27
+
28
+ ### Added
29
+
30
+ - **The MCP client: agents use outside MCP servers' tools, connected at runtime.** A new plugin,
31
+ `mcpClient` (beside `webTools`), lets a person connect an MCP server to a space while the app runs
32
+ (`mcp.connect`), with no restart: every agent in that space gets its tools, named
33
+ `<connection>_<tool>`, through chat's one tool path, so API models and engines (Claude Code,
34
+ Codex, Cursor) alike call them. A connection is its person's, used only in turns that work for
35
+ them; a space's manager can share theirs with the space (`mcp.set { shared }`), and switch it off
36
+ for some agents (`mcp.set { off }`). Tokens stay in the app, sealed at rest with the accounts'
37
+ sealing (`mcpClient.key`), never on a computer.
38
+ - **Sign-in as the MCP spec of 2026-07-28 asks.** OAuth 2.1 with PKCE (S256), `resource` and
39
+ `state`: the server's protected-resource metadata, or, where a server has none, its authorization
40
+ server's metadata at its own address; then a client id by the first that works: one registered by
41
+ hand for that issuer (`mcpClient.clients`, each bound to the servers it may sign in to), the app's
42
+ client metadata document (`/oauth/mcp-client.json`, where the authorization server says it reads
43
+ them), or dynamic registration. `iss` is checked where the authorization server says it sends it;
44
+ `offline_access` is asked for only where it's offered; tokens are renewed when they can be, and a
45
+ connection that can't is `needs_reconnect`. A token can also be typed in, for servers without
46
+ OAuth.
47
+ - **Both protocol versions.** Streamable HTTP, stateless 2026-07-28 (`server/discover`) first,
48
+ falling back to the 2025-11-25 handshake (`initialize`) for servers that don't speak it yet.
49
+ Server addresses pass the web tools' private-address guard (`loopback` opens localhost, for
50
+ development only); requests, responses, results and tool counts have limits.
51
+ - **Chat: `toolSources`.** A resource of tools that come from data rather than code, asked each turn
52
+ as the turn's agent and again when a call runs (`ToolSource`, `sourcedTools`). A tool of the
53
+ `tools` resource wins a name.
54
+
1
55
  ## 1.0.0-rc.83 — 2026-12-04
2
56
 
3
57
  ### Added
package/README.md CHANGED
@@ -149,7 +149,7 @@ ana sees: Tue 10:00, Wed 15:00
149
149
 
150
150
  ## Install and run
151
151
 
152
- Start a new app with `npx pairz@1.0.0-rc.83 init orders`. The starter includes the compiler, a
152
+ Start a new app with `npx pairz@1.0.0-rc.85 init orders`. The starter includes the compiler, a
153
153
  plugin, a web page and tests. [Start an app](docs/guides/the-compiler.md#start-an-app).
154
154
 
155
155
  To add the runtime to an existing project:
@@ -157,7 +157,7 @@ To add the runtime to an existing project:
157
157
  ```sh
158
158
  npm install pairz@next # Node 24+ (npm, pnpm, yarn)
159
159
  bun add pairz@next # Bun
160
- deno add jsr:@pairz/pairz@^1.0.0-rc.83 # Deno 2.9+ (or `deno add npm:pairz@next`)
160
+ deno add jsr:@pairz/pairz@^1.0.0-rc.85 # Deno 2.9+ (or `deno add npm:pairz@next`)
161
161
  ```
162
162
 
163
163
  Until 1.0, the release candidates are on npm's `next` tag, and a plain `npm install pairz` or
@@ -170,7 +170,7 @@ Save the example as `salon.ts`, and run it with an OpenAI key:
170
170
  OPENAI_API_KEY=sk-… node salon.ts # or bun salon.ts, or deno run -A salon.ts
171
171
  ```
172
172
 
173
- On Deno, map the name `pairz` in `deno.json` (`"pairz": "jsr:@pairz/pairz@^1.0.0-rc.83"`) so the
173
+ On Deno, map the name `pairz` in `deno.json` (`"pairz": "jsr:@pairz/pairz@^1.0.0-rc.85"`) so the
174
174
  imports read the same everywhere. Pairz runs on Node 24+, Deno 2.9+ and Bun, and it's built on web
175
175
  standards for Cloudflare Workers and the browser.
176
176
 
@@ -95,7 +95,7 @@ below follow the course repository and its hand-written plugin assembly.
95
95
  ```sh
96
96
  mkdir compass && cd compass
97
97
  npm init -y && npm pkg set type=module
98
- npm install pairz@1.0.0-rc.83 react@19 react-dom@19
98
+ npm install pairz@1.0.0-rc.85 react@19 react-dom@19
99
99
  npm install -D typescript @types/node @types/react @types/react-dom esbuild
100
100
  ```
101
101
 
@@ -11,7 +11,7 @@ status: stable
11
11
  Start an app on Node 24 or newer with the project template:
12
12
 
13
13
  ```sh
14
- npx pairz@1.0.0-rc.83 init orders
14
+ npx pairz@1.0.0-rc.85 init orders
15
15
  cd orders
16
16
  npm run check
17
17
  npm run dev
@@ -10,7 +10,7 @@ order: 9
10
10
  A back-office app is mostly screens: lists to search and export, forms that add and change records,
11
11
  dates, a home page of places, a printed document or two. This guide builds them for the salon's
12
12
  staff: its customers, their visits, and the services it offers. Each recipe is whole files, in the
13
- place they go, and each compiles against `pairz@1.0.0-rc.83`.
13
+ place they go, and each compiles against `pairz@1.0.0-rc.85`.
14
14
 
15
15
  The pieces themselves (every prop, every token) are in [the web toolkit](the-web-toolkit.md). This
16
16
  guide is how to put them together.
@@ -374,14 +374,24 @@ server, `pairz`) by the server's name, and keep the CLI's own tools off:
374
374
  | ----------- | ----------------------------------------------------------------- | ------------------------------------- |
375
375
  | Claude Code | `--allowedTools mcp__pairz` | `--tools ""` |
376
376
  | Codex | `default_tools_approval_mode = "approve"` on the server | off by its features and model catalog |
377
- | Antigravity | `"allow": ["mcp(pairz/*)"]` in its settings' `permissions` | denied there (`command(*)`, …) |
377
+ | Antigravity | a hook that approves `mcp_pairz_*` (`auto_approve`) | a hook that denies every other tool |
378
378
  | Grok Build | `--always-approve`, with nothing but the agent's tools to approve | `--tools search_tool,use_tool` |
379
379
  | Cursor | its SDK runs tool calls without asking | `tools: ["mcp"]` |
380
380
 
381
+ Antigravity's hooks are `PreToolUse` hooks in its home's `~/.gemini/config/hooks.json`
382
+ ([its hooks](https://antigravity.google/docs/hooks)), not on Windows, where the shell that runs a
383
+ hook isn't documented. Over ACP it loads no permission rules from its settings, allow, ask or deny
384
+ (open bugs [#1966](https://github.com/google-antigravity/antigravity-cli/issues/1966),
385
+ [#1781](https://github.com/google-antigravity/antigravity-cli/issues/1781),
386
+ [#1785](https://github.com/google-antigravity/antigravity-cli/issues/1785)). Its settings still say
387
+ the same (`"allow": ["mcp(pairz/*)"]`, `command(*)` and the rest denied), for when it does.
388
+
381
389
  What a CLI asks anyway is answered by whose tool it is, never by what it says the tool does. One
382
- named exactly as one of the agent's tools with its server (`pairz/terminal`, `mcp__pairz__terminal`)
383
- is allowed. Anything else is refused, and never silently (Antigravity titles its own command with
384
- the command, so `pairz/../…` is refused too):
390
+ named as the agent's, with its server, in the CLI's own field is allowed: Claude Code's `tool_name`
391
+ `mcp__pairz__terminal`; Antigravity's `name`, exactly `mcp_pairz_<tool>` for one of the session's
392
+ tools, of kind `other` or none. Never by a title: Antigravity titles its own command with the
393
+ command line, so a command titled "Run mcp_pairz_terminal" is refused too. Anything else is refused,
394
+ and never silently:
385
395
 
386
396
  - The model is told, where the CLI takes words with a refusal (Claude Code, Codex's older
387
397
  approvals), that the computer's AI app blocked it and nobody can approve it.
@@ -389,7 +399,9 @@ the command, so `pairz/../…` is refused too):
389
399
  app on this computer, blocked "rm -rf ~", one of its own tools: they're off there, and nobody can
390
400
  approve them. The agent's own tools still work." The model reads it after, so it doesn't wait for
391
401
  a yes that can't come.
392
- - The app counts it (`pairz.engine.refused`, by engine) and logs it, as the computer does.
402
+ - The app counts it (`pairz.engine.refused`, by engine) and logs it, as the computer does, with the
403
+ request as the CLI sent it (what looks like a secret redacted, at most 2 KB), so a change in how a
404
+ CLI asks shows.
393
405
 
394
406
  `node scripts/engines-check.ts` checks each CLI live before a release
395
407
  ([CONTRIBUTING.md](../../CONTRIBUTING.md#releasing)).
@@ -16,7 +16,7 @@ TypeScript modules.
16
16
  On Node 24 or newer:
17
17
 
18
18
  ```sh
19
- npx pairz@1.0.0-rc.83 init orders
19
+ npx pairz@1.0.0-rc.85 init orders
20
20
  cd orders
21
21
  npm run dev
22
22
  ```
@@ -227,7 +227,7 @@ loads the declaration modules and calls `plugins()` with no settings. Put browse
227
227
  or its handlers. Node loads the app's `tsx.ts` loader when present. Bun and Deno load TSX directly.
228
228
 
229
229
  Run `npx pairz gen` in an npm app. On Deno the entry is
230
- `deno run -A jsr:@pairz/pairz@1.0.0-rc.83/gen`. Pass `--check`, `--watch`, `--eject` or `init [dir]`
230
+ `deno run -A jsr:@pairz/pairz@1.0.0-rc.85/gen`. Pass `--check`, `--watch`, `--eject` or `init [dir]`
231
231
  after the entry. A JSR app maps `pairz` to the same JSR version in `deno.json`; it uses the same
232
232
  `package.json` imports for generated modules.
233
233
 
@@ -40,7 +40,7 @@ plugins fill.
40
40
  The runtime doesn't start without [`accounts`](accounts.md) and [`web-shell`](web-shell.md): add
41
41
  them too.
42
42
 
43
- It ships with `pairz@1.0.0-rc.83`.
43
+ It ships with `pairz@1.0.0-rc.85`.
44
44
 
45
45
  ## Listing
46
46
 
@@ -83,7 +83,7 @@ It also reads `accountProviders` and `org`, resource kinds the app and other plu
83
83
 
84
84
  It builds on no other plugin.
85
85
 
86
- It ships with `pairz@1.0.0-rc.83`.
86
+ It ships with `pairz@1.0.0-rc.85`.
87
87
 
88
88
  ## What it does on its own
89
89
 
@@ -39,7 +39,7 @@ Nothing to set. It reads `apiPresets`, resource kinds the app and other plugins
39
39
 
40
40
  The runtime doesn't start without [`api`](api.md) and [`web-shell`](web-shell.md): add them too.
41
41
 
42
- It ships with `pairz@1.0.0-rc.83`.
42
+ It ships with `pairz@1.0.0-rc.85`.
43
43
 
44
44
  ## Listing
45
45
 
@@ -62,7 +62,7 @@ Nothing to set: it works as it comes.
62
62
 
63
63
  The runtime doesn't start without [`spaces`](spaces.md): add it too.
64
64
 
65
- It ships with `pairz@1.0.0-rc.83`.
65
+ It ships with `pairz@1.0.0-rc.85`.
66
66
 
67
67
  ## What it does on its own
68
68
 
@@ -39,7 +39,7 @@ Nothing to set. It reads `boardsText`, resource kinds the app and other plugins
39
39
 
40
40
  The runtime doesn't start without [`web-shell`](web-shell.md): add it too.
41
41
 
42
- It ships in a package of its own, `@pairz/work@1.0.0-rc.83`, for `pairz` `1.0.0-rc.83`: install it
42
+ It ships in a package of its own, `@pairz/work@1.0.0-rc.85`, for `pairz` `1.0.0-rc.85`: install it
43
43
  beside `pairz`.
44
44
 
45
45
  ## Listing
@@ -73,7 +73,7 @@ Nothing to set: it works as it comes.
73
73
 
74
74
  The runtime doesn't start without [`chat`](chat.md) and [`spaces`](spaces.md): add them too.
75
75
 
76
- It ships in a package of its own, `@pairz/work@1.0.0-rc.83`, for `pairz` `1.0.0-rc.83`: install it
76
+ It ships in a package of its own, `@pairz/work@1.0.0-rc.85`, for `pairz` `1.0.0-rc.85`: install it
77
77
  beside `pairz`.
78
78
 
79
79
  ## Listing
@@ -46,7 +46,7 @@ Nothing to set: it works as it comes.
46
46
 
47
47
  It builds on no other plugin.
48
48
 
49
- It ships with `pairz@1.0.0-rc.83`.
49
+ It ships with `pairz@1.0.0-rc.85`.
50
50
 
51
51
  ## Listing
52
52
 
@@ -48,7 +48,7 @@ Nothing to set: it works as it comes.
48
48
 
49
49
  It builds on no other plugin.
50
50
 
51
- It ships with `pairz@1.0.0-rc.83`.
51
+ It ships with `pairz@1.0.0-rc.85`.
52
52
 
53
53
  ## Listing
54
54
 
@@ -42,7 +42,7 @@ Nothing to set. It reads `agents`, resource kinds the app and other plugins fill
42
42
  The runtime doesn't start without [`chat`](chat.md) and [`terminal-shell`](terminal-shell.md): add
43
43
  them too.
44
44
 
45
- It ships with `pairz@1.0.0-rc.83`.
45
+ It ships with `pairz@1.0.0-rc.85`.
46
46
 
47
47
  ## Listing
48
48
 
@@ -56,7 +56,7 @@ and other plugins fill.
56
56
 
57
57
  The runtime doesn't start without [`chat`](chat.md) and [`web-shell`](web-shell.md): add them too.
58
58
 
59
- It ships with `pairz@1.0.0-rc.83`.
59
+ It ships with `pairz@1.0.0-rc.85`.
60
60
 
61
61
  ## Listing
62
62
 
@@ -116,14 +116,14 @@ You set it in `resources.chat`.
116
116
  | `chat.channels` | `boolean` | no | The app shows a space's threads as channels (its front end's `threads` resource, named and few: see shared/threads.ts): agents are told so, and keep side work in subthreads, starting a new thread only when asked for one. |
117
117
  | `chat.transcriber` | `ModelRef` | no | The model that transcribes audio sent with a message (default: the `transcribe` alias, from `resources.model`). |
118
118
 
119
- It also reads `agentModel`, `agentSources`, `agents`, `contactSend`, `context`, `roster` and
120
- `tools`, resource kinds the app and other plugins fill.
119
+ It also reads `agentModel`, `agentSources`, `agents`, `contactSend`, `context`, `roster`,
120
+ `toolSources` and `tools`, resource kinds the app and other plugins fill.
121
121
 
122
122
  ## What it requires
123
123
 
124
124
  The runtime doesn't start without [`models`](models.md): add it too.
125
125
 
126
- It ships with `pairz@1.0.0-rc.83`.
126
+ It ships with `pairz@1.0.0-rc.85`.
127
127
 
128
128
  ## What it does on its own
129
129
 
@@ -38,7 +38,7 @@ Nothing to set: it works as it comes.
38
38
  The runtime doesn't start without [`computers`](computers.md) and
39
39
  [`terminal-shell`](terminal-shell.md): add them too.
40
40
 
41
- It ships with `pairz@1.0.0-rc.83`.
41
+ It ships with `pairz@1.0.0-rc.85`.
42
42
 
43
43
  ## Listing
44
44
 
@@ -46,7 +46,7 @@ resource kinds the app and other plugins fill.
46
46
  The runtime doesn't start without [`computers`](computers.md) and [`web-shell`](web-shell.md): add
47
47
  them too.
48
48
 
49
- It ships with `pairz@1.0.0-rc.83`.
49
+ It ships with `pairz@1.0.0-rc.85`.
50
50
 
51
51
  ## Listing
52
52
 
@@ -164,7 +164,7 @@ It also reads `computerWake`, `customHostnames`, `directory`, `downloads`, `host
164
164
 
165
165
  The runtime doesn't start without [`chat`](chat.md) and [`spaces`](spaces.md): add them too.
166
166
 
167
- It ships with `pairz@1.0.0-rc.83`.
167
+ It ships with `pairz@1.0.0-rc.85`.
168
168
 
169
169
  ## What it does on its own
170
170
 
@@ -38,7 +38,7 @@ Nothing to set: it works as it comes.
38
38
 
39
39
  It builds on no other plugin.
40
40
 
41
- It ships with `pairz@1.0.0-rc.83`.
41
+ It ships with `pairz@1.0.0-rc.85`.
42
42
 
43
43
  ## Listing
44
44
 
@@ -65,7 +65,7 @@ Nothing to set: it works as it comes.
65
65
 
66
66
  The runtime doesn't start without [`spaces`](spaces.md): add it too.
67
67
 
68
- It ships with `pairz@1.0.0-rc.83`.
68
+ It ships with `pairz@1.0.0-rc.85`.
69
69
 
70
70
  ## Listing
71
71
 
@@ -39,7 +39,7 @@ Nothing to set: it works as it comes.
39
39
 
40
40
  The runtime doesn't start without [`web-shell`](web-shell.md): add it too.
41
41
 
42
- It ships in a package of its own, `@pairz/billing@1.0.0-rc.83`, for `pairz` `1.0.0-rc.83`: install
42
+ It ships in a package of its own, `@pairz/billing@1.0.0-rc.85`, for `pairz` `1.0.0-rc.85`: install
43
43
  it beside `pairz`.
44
44
 
45
45
  ## Listing
@@ -80,7 +80,7 @@ It also reads `directory` and `org`, resource kinds the app and other plugins fi
80
80
 
81
81
  The runtime doesn't start without [`usage`](usage.md): add it too.
82
82
 
83
- It ships in a package of its own, `@pairz/billing@1.0.0-rc.83`, for `pairz` `1.0.0-rc.83`: install
83
+ It ships in a package of its own, `@pairz/billing@1.0.0-rc.85`, for `pairz` `1.0.0-rc.85`: install
84
84
  it beside `pairz`.
85
85
 
86
86
  ## What it does on its own
@@ -43,7 +43,7 @@ Nothing to set. It reads `links`, resource kinds the app and other plugins fill.
43
43
 
44
44
  The runtime doesn't start without [`identity`](identity.md): add it too.
45
45
 
46
- It ships with `pairz@1.0.0-rc.83`.
46
+ It ships with `pairz@1.0.0-rc.85`.
47
47
 
48
48
  ## Listing
49
49
 
@@ -47,7 +47,7 @@ Nothing to set. It reads `hosts`, resource kinds the app and other plugins fill.
47
47
 
48
48
  The runtime doesn't start without [`identity`](identity.md): add it too.
49
49
 
50
- It ships in a package of its own, `@pairz/directory@1.0.0-rc.83`, for `pairz` `1.0.0-rc.83`: install
50
+ It ships in a package of its own, `@pairz/directory@1.0.0-rc.85`, for `pairz` `1.0.0-rc.85`: install
51
51
  it beside `pairz`.
52
52
 
53
53
  ## Listing
@@ -39,7 +39,7 @@ Nothing to set. It reads `orgSettings`, resource kinds the app and other plugins
39
39
 
40
40
  The runtime doesn't start without [`web-shell`](web-shell.md): add it too.
41
41
 
42
- It ships in a package of its own, `@pairz/directory@1.0.0-rc.83`, for `pairz` `1.0.0-rc.83`: install
42
+ It ships in a package of its own, `@pairz/directory@1.0.0-rc.85`, for `pairz` `1.0.0-rc.85`: install
43
43
  it beside `pairz`.
44
44
 
45
45
  ## Listing
@@ -88,7 +88,7 @@ It also reads `caller`, resource kinds the app and other plugins fill.
88
88
 
89
89
  The runtime doesn't start without [`identity`](identity.md): add it too.
90
90
 
91
- It ships in a package of its own, `@pairz/directory@1.0.0-rc.83`, for `pairz` `1.0.0-rc.83`: install
91
+ It ships in a package of its own, `@pairz/directory@1.0.0-rc.85`, for `pairz` `1.0.0-rc.85`: install
92
92
  it beside `pairz`.
93
93
 
94
94
  ## Listing
@@ -40,7 +40,7 @@ Nothing to set: it works as it comes.
40
40
 
41
41
  The runtime doesn't start without [`web-shell`](web-shell.md): add it too.
42
42
 
43
- It ships in a package of its own, `@pairz/work@1.0.0-rc.83`, for `pairz` `1.0.0-rc.83`: install it
43
+ It ships in a package of its own, `@pairz/work@1.0.0-rc.85`, for `pairz` `1.0.0-rc.85`: install it
44
44
  beside `pairz`.
45
45
 
46
46
  ## Listing
@@ -80,7 +80,7 @@ Nothing to set. It reads `agents`, resource kinds the app and other plugins fill
80
80
 
81
81
  The runtime doesn't start without [`chat`](chat.md) and [`spaces`](spaces.md): add them too.
82
82
 
83
- It ships in a package of its own, `@pairz/work@1.0.0-rc.83`, for `pairz` `1.0.0-rc.83`: install it
83
+ It ships in a package of its own, `@pairz/work@1.0.0-rc.85`, for `pairz` `1.0.0-rc.85`: install it
84
84
  beside `pairz`.
85
85
 
86
86
  ## Listing
@@ -76,7 +76,7 @@ It also reads `email`, resource kinds the app and other plugins fill.
76
76
 
77
77
  The runtime doesn't start without [`identity`](identity.md) and [`email`](email.md): add them too.
78
78
 
79
- It ships with `pairz@1.0.0-rc.83`.
79
+ It ships with `pairz@1.0.0-rc.85`.
80
80
 
81
81
  ## What it does on its own
82
82
 
@@ -76,7 +76,7 @@ It also reads `links`, resource kinds the app and other plugins fill.
76
76
 
77
77
  It builds on no other plugin.
78
78
 
79
- It ships with `pairz@1.0.0-rc.83`.
79
+ It ships with `pairz@1.0.0-rc.85`.
80
80
 
81
81
  ## Listing
82
82
 
@@ -53,7 +53,7 @@ resource's clientId."
53
53
 
54
54
  The runtime doesn't start without [`identity`](identity.md): add it too.
55
55
 
56
- It ships with `pairz@1.0.0-rc.83`.
56
+ It ships with `pairz@1.0.0-rc.85`.
57
57
 
58
58
  ## Listing
59
59
 
@@ -64,7 +64,7 @@ history resource's summarizer model."
64
64
 
65
65
  The runtime doesn't start without [`chat`](chat.md) and [`models`](models.md): add them too.
66
66
 
67
- It ships with `pairz@1.0.0-rc.83`.
67
+ It ships with `pairz@1.0.0-rc.85`.
68
68
 
69
69
  ## What it does on its own
70
70
 
@@ -67,7 +67,7 @@ Nothing to set: it works as it comes.
67
67
 
68
68
  It builds on no other plugin.
69
69
 
70
- It ships with `pairz@1.0.0-rc.83`.
70
+ It ships with `pairz@1.0.0-rc.85`.
71
71
 
72
72
  ## Listing
73
73
 
@@ -60,7 +60,7 @@ It also reads `org`, resource kinds the app and other plugins fill.
60
60
 
61
61
  It builds on no other plugin.
62
62
 
63
- It ships with `pairz@1.0.0-rc.83`.
63
+ It ships with `pairz@1.0.0-rc.85`.
64
64
 
65
65
  ## Listing
66
66
 
@@ -78,7 +78,7 @@ It also reads `caller`, `org`, `tools` and `widgets`, resource kinds the app and
78
78
  The runtime doesn't start without [`chat`](chat.md), [`spaces`](spaces.md) and
79
79
  [`contacts`](contacts.md): add them too.
80
80
 
81
- It ships with `pairz@1.0.0-rc.83`.
81
+ It ships with `pairz@1.0.0-rc.85`.
82
82
 
83
83
  ## What it does on its own
84
84
 
@@ -0,0 +1,89 @@
1
+ ---
2
+ title: "mcpClient"
3
+ description: "MCP client: people connect outside MCP servers at runtime, and agents in that space use their tools."
4
+ section: "Reference"
5
+ order: 3
6
+ ---
7
+
8
+ <!-- Made by scripts/describe.ts from the plugin itself: run it again rather than edit this page. -->
9
+
10
+ # mcpClient
11
+
12
+ MCP client: people connect outside MCP servers at runtime, and agents in that space use their tools.
13
+
14
+ ```ts
15
+ import { mcpClient } from "pairz/plugins/agents";
16
+ ```
17
+
18
+ ## What it keeps
19
+
20
+ It keeps 3 collections.
21
+
22
+ | Collection | Kept as | Fields |
23
+ | ----------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
24
+ | `mcpConnection` | documents | `person`, `in`, `name`, `url`, `status`, `shared`, `off`, `tools`, `era`, `version`, `checked`, `staleAt`, `problem`, `issuer`, `resource`, `tokenEndpoint`, `clientId`, `registration`, `scopes`, `wanted`, `expires`, `refreshed`, `rev`; private: `secret`, `tokens` |
25
+ | `mcpFlow` | in memory, gone on restart | `connection`, `person`, `verifier`, `redirect`, `issuer`, `issRequired`, `resource`, `tokenEndpoint`, `clientId`, `registration`, `scopes`, `expires` |
26
+ | `mcpRegistration` | documents | `issuer`, `clientId`; private: `secret` |
27
+
28
+ ## What it lets callers do
29
+
30
+ Of its 7 Actions, people may call all 7; agents may call 2; contacts and someone signed out may call
31
+ none.
32
+
33
+ | Action | Person | Agent | Contact | Anyone | Key | Routine | What it does |
34
+ | ---------------- | ------ | ----- | ------- | ------ | --- | ------- | ----------------------------------------------------------------------------- |
35
+ | `mcp.authorize` | yes | yes | no | no | yes | yes | Starts signing in to a connection's server again, or for more access. |
36
+ | `mcp.call` | yes | yes | no | no | yes | yes | Calls a tool of a connected MCP server. |
37
+ | `mcp.callback` | yes | no | no | no | no | no | Finishes signing in to an MCP server, once its authorization server answered. |
38
+ | `mcp.connect` | yes | no | no | no | no | no | Connects an MCP server, so agents in a space can use its tools. |
39
+ | `mcp.disconnect` | yes | no | no | no | no | no | Removes a connection and its tokens. |
40
+ | `mcp.refresh` | yes | no | no | no | no | no | Asks a connection's server for its tools again. |
41
+ | `mcp.set` | yes | no | no | no | no | no | Switches a connection off for some agents, or shares it with its space. |
42
+
43
+ An agent works for a person, and calls what both may. A key calls only what its scope names. A
44
+ routine is work done for a person, which they set going.
45
+
46
+ It answers 2 routes over HTTP:
47
+
48
+ | Method | Path |
49
+ | ------ | ------------------------ |
50
+ | GET | `/mcp-client/callback` |
51
+ | GET | `/oauth/mcp-client.json` |
52
+
53
+ It also adds rules every read and write keeps to (`guard`).
54
+
55
+ ## Where it shows
56
+
57
+ It has no Views: it shows nowhere on its own.
58
+
59
+ - **What it adds to resources:** `toolSources` (`mcp`).
60
+
61
+ ## What it needs
62
+
63
+ You set it in `resources.mcpClient`, and 1 is a secret, kept out of your code.
64
+
65
+ | Setting | Type | Required | What it is |
66
+ | ---------------------- | ------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------- |
67
+ | `mcpClient.url` | `string` | no | The app's public address. |
68
+ | `mcpClient.key` | `string` | no | Secret. What connections' tokens are sealed with at rest (accounts' sealing). |
69
+ | `mcpClient.clientName` | `string` | no | What authorization servers see the app called. |
70
+ | `mcpClient.clients` | `Record<string, PreregisteredClient>` | no | Clients registered by hand, by authorization server (its issuer). |
71
+ | `mcpClient.loopback` | `boolean` | no | Development only: also reach MCP and authorization servers on this machine (`localhost`, `127.0.0.1`), over plain http. |
72
+ | `mcpClient.timeout` | `number` | no | How long one request may take (30 s). |
73
+ | `mcpClient.maxBytes` | `number` | no | The most one response may be (1 MB). |
74
+ | `mcpClient.maxResult` | `number` | no | The most of a tool's result an agent is given (100 KB). |
75
+ | `mcpClient.maxTools` | `number` | no | The most tools one connection offers (64). |
76
+
77
+ ## What it requires
78
+
79
+ The runtime doesn't start without [`chat`](chat.md), [`spaces`](spaces.md),
80
+ [`accounts`](accounts.md) and [`webTools`](webTools.md): add them too.
81
+
82
+ It ships with `pairz@1.0.0-rc.85`.
83
+
84
+ ## Listing
85
+
86
+ It breaks 2 listing rules as it is:
87
+
88
+ - Route "/mcp-client/callback" isn't under /mcpClient.
89
+ - Route "/oauth/mcp-client.json" isn't under /mcpClient.