copilotz 1.0.0-rc.20 → 1.0.0-rc.22
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/CHANGELOG.md +485 -0
- package/README.md +324 -19
- package/hosts/orgs/mod.d.ts +4 -1
- package/hosts/orgs/mod.js +2 -2
- package/hosts/web/files.d.ts +6 -2
- package/hosts/web/files.js +36 -3
- package/hosts/web/node/mod.d.ts +1 -1
- package/hosts/web/node/mod.js +1 -1
- package/hosts/web/node/serve.d.ts +26 -0
- package/hosts/web/node/serve.js +23 -1
- package/hosts/web/routes.d.ts +28 -1
- package/hosts/web/routes.js +65 -10
- package/hosts/web/server.d.ts +5 -4
- package/hosts/web/server.js +1 -1
- package/package.json +2 -2
- package/plugins/access/accounts/collections/account.d.ts +2 -2
- package/plugins/access/contacts/actions/chat.d.ts +1 -0
- package/plugins/access/contacts/actions/chat.js +45 -0
- package/plugins/access/contacts/actions/forget.d.ts +1 -0
- package/plugins/access/contacts/actions/forget.js +56 -0
- package/plugins/access/contacts/actions/start.d.ts +1 -0
- package/plugins/access/contacts/actions/start.js +60 -0
- package/plugins/access/contacts/collections/contact.d.ts +81 -0
- package/plugins/access/contacts/collections/contact.js +58 -0
- package/plugins/access/contacts/contract.d.ts +10 -0
- package/plugins/access/contacts/contract.js +10 -0
- package/plugins/access/contacts/mod.d.ts +27 -0
- package/plugins/access/contacts/mod.js +49 -0
- package/plugins/access/contacts/views/contact.d.ts +8 -0
- package/plugins/access/contacts/views/contact.js +25 -0
- package/plugins/access/contacts/web.d.ts +7 -0
- package/plugins/access/contacts/web.js +11 -0
- package/plugins/access/directory/collections/credit-code.d.ts +1 -1
- package/plugins/access/directory/collections/invite.d.ts +1 -1
- package/plugins/access/google/actions/sign-in.js +2 -0
- package/plugins/access/identity/actions/session.js +2 -0
- package/plugins/access/identity/mod.js +8 -6
- package/plugins/access/mod.d.ts +7 -1
- package/plugins/access/mod.js +7 -2
- package/plugins/access/spaces/actions/agents.js +12 -6
- package/plugins/access/spaces/actions/create.js +10 -1
- package/plugins/access/spaces/actions/invitation.js +5 -2
- package/plugins/access/spaces/actions/keep.d.ts +1 -0
- package/plugins/access/spaces/actions/keep.js +55 -0
- package/plugins/access/spaces/actions/member.js +17 -4
- package/plugins/access/spaces/actions/rename.js +4 -0
- package/plugins/access/spaces/collections/member.d.ts +1 -1
- package/plugins/access/spaces/collections/request.d.ts +1 -1
- package/plugins/access/spaces/collections/space.d.ts +9 -0
- package/plugins/access/spaces/collections/space.js +2 -0
- package/plugins/access/spaces/contract.d.ts +4 -3
- package/plugins/access/spaces/contract.js +1 -1
- package/plugins/access/spaces/mod.d.ts +7 -1
- package/plugins/access/spaces/mod.js +8 -1
- package/plugins/access/spaces/resources/tools.d.ts +0 -5
- package/plugins/access/spaces/resources/tools.js +11 -1
- package/plugins/access/spaces/shared/agents.js +2 -2
- package/plugins/access/spaces/shared/can.d.ts +18 -3
- package/plugins/access/spaces/shared/can.js +32 -5
- package/plugins/access/spaces/shared/declared.d.ts +21 -0
- package/plugins/access/spaces/shared/declared.js +8 -0
- package/plugins/access/spaces/shared/labels.d.ts +7 -1
- package/plugins/access/spaces/shared/labels.js +56 -8
- package/plugins/access/spaces/shared/managers.js +2 -2
- package/plugins/access/spaces/shared/names.d.ts +9 -5
- package/plugins/access/spaces/shared/names.js +36 -19
- package/plugins/access/spaces/shared/reach.d.ts +20 -6
- package/plugins/access/spaces/shared/reach.js +62 -20
- package/plugins/access/spaces/shared/rules.d.ts +10 -5
- package/plugins/access/spaces/shared/rules.js +35 -10
- package/plugins/access/spaces/shared/seat.d.ts +3 -2
- package/plugins/access/spaces/shared/seat.js +9 -2
- package/plugins/access/spaces/views/where.d.ts +4 -2
- package/plugins/access/spaces/views/where.js +9 -0
- package/plugins/access/spaces/web.js +1 -1
- package/plugins/access/web.d.ts +1 -0
- package/plugins/access/web.js +1 -0
- package/plugins/agents/chat/actions/erase.d.ts +1 -0
- package/plugins/agents/chat/actions/erase.js +51 -0
- package/plugins/agents/chat/actions/open.d.ts +1 -0
- package/plugins/agents/chat/actions/open.js +49 -0
- package/plugins/agents/chat/actions/quiet.d.ts +1 -0
- package/plugins/agents/chat/actions/quiet.js +33 -0
- package/plugins/agents/chat/actions/say.d.ts +1 -0
- package/plugins/agents/chat/actions/say.js +82 -0
- package/plugins/agents/chat/actions/send.js +57 -19
- package/plugins/agents/chat/actions/shown.d.ts +1 -0
- package/plugins/agents/chat/actions/shown.js +35 -0
- package/plugins/agents/chat/collections/intent.d.ts +124 -0
- package/plugins/agents/chat/collections/intent.js +52 -0
- package/plugins/agents/chat/collections/message.d.ts +74 -1
- package/plugins/agents/chat/collections/message.js +23 -1
- package/plugins/agents/chat/collections/shown.d.ts +105 -0
- package/plugins/agents/chat/collections/shown.js +34 -0
- package/plugins/agents/chat/contract.d.ts +15 -7
- package/plugins/agents/chat/contract.js +7 -1
- package/plugins/agents/chat/mod.d.ts +20 -2
- package/plugins/agents/chat/mod.js +43 -4
- package/plugins/agents/chat/processors/failed.js +15 -5
- package/plugins/agents/chat/processors/turn.d.ts +1 -1
- package/plugins/agents/chat/processors/turn.js +95 -35
- package/plugins/agents/chat/shared/delivery.d.ts +16 -2
- package/plugins/agents/chat/shared/delivery.js +62 -7
- package/plugins/agents/chat/shared/send.d.ts +1 -3
- package/plugins/agents/chat/shared/send.js +2 -9
- package/plugins/agents/chat/shared/tools.d.ts +33 -0
- package/plugins/agents/chat/shared/tools.js +28 -0
- package/plugins/agents/chat/shared/types.d.ts +59 -1
- package/plugins/agents/chat/views/message.d.ts +4 -2
- package/plugins/agents/chat/views/message.js +22 -4
- package/plugins/agents/chat/views/prompt.js +38 -4
- package/plugins/agents/history/collections/outline.d.ts +1 -1
- package/plugins/agents/history/collections/summary.d.ts +1 -1
- package/plugins/agents/history/mod.js +2 -1
- package/plugins/agents/history/processors/erase.d.ts +3 -0
- package/plugins/agents/history/processors/erase.js +11 -0
- package/plugins/agents/memory/mod.js +2 -1
- package/plugins/agents/memory/processors/extract.d.ts +1 -1
- package/plugins/agents/memory/processors/extract.js +5 -0
- package/plugins/agents/memory/resources/tools.js +1 -1
- package/plugins/agents/memory/shared/settings.d.ts +7 -2
- package/plugins/agents/memory/shared/settings.js +9 -1
- package/plugins/agents/routines/collections/routine.d.ts +1 -1
- package/plugins/agents/routines/collections/run.d.ts +1 -1
- package/plugins/compute/apps/collections/app.d.ts +2 -2
- package/plugins/compute/cloud/actions/pool.js +2 -0
- package/plugins/compute/cloud/actions/remote.js +4 -2
- package/plugins/compute/cloud/actions/vms.js +2 -0
- package/plugins/compute/cloud/resources/tools.js +3 -3
- package/plugins/compute/computers/actions/admit.js +2 -0
- package/plugins/compute/computers/actions/code.js +2 -0
- package/plugins/compute/computers/actions/enrollment.js +2 -0
- package/plugins/compute/computers/actions/work.js +3 -0
- package/plugins/compute/computers/collections/approval.d.ts +2 -2
- package/plugins/compute/computers/collections/grant.d.ts +1 -1
- package/plugins/compute/computers/collections/preview.d.ts +2 -2
- package/plugins/compute/computers/program/version.d.ts +1 -1
- package/plugins/compute/computers/program/version.js +1 -1
- package/plugins/compute/computers/resources/downloads.js +1 -1
- package/plugins/compute/computers/shared/wake.d.ts +1 -1
- package/plugins/compute/computers/shared/wake.js +17 -0
- package/plugins/interfaces/api/collections/key.d.ts +1 -1
- package/plugins/interfaces/api/shared/events.js +5 -4
- package/plugins/interfaces/maintenance/actions/read.d.ts +4 -0
- package/plugins/interfaces/maintenance/actions/read.js +76 -0
- package/plugins/interfaces/maintenance/actions/write.d.ts +4 -0
- package/plugins/interfaces/maintenance/actions/write.js +64 -0
- package/plugins/interfaces/maintenance/contract.d.ts +60 -0
- package/plugins/interfaces/maintenance/contract.js +2 -0
- package/plugins/interfaces/maintenance/mod.d.ts +54 -0
- package/plugins/interfaces/maintenance/mod.js +68 -0
- package/plugins/interfaces/maintenance/resources/routes.d.ts +71 -0
- package/plugins/interfaces/maintenance/resources/routes.js +457 -0
- package/plugins/interfaces/maintenance/shared/ops.d.ts +4 -0
- package/plugins/interfaces/maintenance/shared/ops.js +19 -0
- package/plugins/interfaces/mcp/actions/call.d.ts +11 -0
- package/plugins/interfaces/mcp/actions/call.js +327 -0
- package/plugins/interfaces/mcp/actions/prune.d.ts +1 -0
- package/plugins/interfaces/mcp/actions/prune.js +20 -0
- package/plugins/interfaces/mcp/collections/closed.d.ts +23 -0
- package/plugins/interfaces/mcp/collections/closed.js +17 -0
- package/plugins/interfaces/mcp/collections/opening.d.ts +24 -0
- package/plugins/interfaces/mcp/collections/opening.js +28 -0
- package/plugins/interfaces/mcp/collections/rate.d.ts +27 -0
- package/plugins/interfaces/mcp/collections/rate.js +18 -0
- package/plugins/interfaces/mcp/collections/receipt.d.ts +46 -0
- package/plugins/interfaces/mcp/collections/receipt.js +46 -0
- package/plugins/interfaces/mcp/contract.d.ts +9 -0
- package/plugins/interfaces/mcp/contract.js +9 -0
- package/plugins/interfaces/mcp/mod.d.ts +84 -0
- package/plugins/interfaces/mcp/mod.js +128 -0
- package/plugins/interfaces/mcp/processors/closed.d.ts +13 -0
- package/plugins/interfaces/mcp/processors/closed.js +16 -0
- package/plugins/interfaces/mcp/resources/running.d.ts +21 -0
- package/plugins/interfaces/mcp/resources/running.js +36 -0
- package/plugins/interfaces/mcp/resources/server.d.ts +54 -0
- package/plugins/interfaces/mcp/resources/server.js +423 -0
- package/plugins/interfaces/mcp/resources/tools.d.ts +114 -0
- package/plugins/interfaces/mcp/resources/tools.js +324 -0
- package/plugins/interfaces/mcp/shared/caller.d.ts +45 -0
- package/plugins/interfaces/mcp/shared/caller.js +99 -0
- package/plugins/interfaces/mcp/shared/keys.d.ts +50 -0
- package/plugins/interfaces/mcp/shared/keys.js +53 -0
- package/plugins/interfaces/mcp/shared/settings.d.ts +187 -0
- package/plugins/interfaces/mcp/shared/settings.js +176 -0
- package/plugins/interfaces/mcp/views/offered.d.ts +20 -0
- package/plugins/interfaces/mcp/views/offered.js +20 -0
- package/plugins/interfaces/mod.d.ts +5 -1
- package/plugins/interfaces/mod.js +5 -1
- package/plugins/interfaces/terminal/actions/print.js +1 -1
- package/plugins/interfaces/terminal/actions/set.js +1 -1
- package/plugins/interfaces/terminal/collections/output.d.ts +1 -1
- package/plugins/interfaces/terminal/collections/shell.js +1 -1
- package/plugins/interfaces/voice/actions/block.d.ts +2 -0
- package/plugins/interfaces/voice/actions/block.js +74 -0
- package/plugins/interfaces/voice/actions/call.d.ts +19 -0
- package/plugins/interfaces/voice/actions/call.js +253 -0
- package/plugins/interfaces/voice/actions/hook.d.ts +5 -0
- package/plugins/interfaces/voice/actions/hook.js +225 -0
- package/plugins/interfaces/voice/actions/prune.d.ts +1 -0
- package/plugins/interfaces/voice/actions/prune.js +35 -0
- package/plugins/interfaces/voice/collections/blocked.d.ts +87 -0
- package/plugins/interfaces/voice/collections/blocked.js +34 -0
- package/plugins/interfaces/voice/collections/call.d.ts +279 -0
- package/plugins/interfaces/voice/collections/call.js +77 -0
- package/plugins/interfaces/voice/collections/phone.d.ts +74 -0
- package/plugins/interfaces/voice/collections/phone.js +26 -0
- package/plugins/interfaces/voice/contract.d.ts +14 -0
- package/plugins/interfaces/voice/contract.js +2 -0
- package/plugins/interfaces/voice/mod.d.ts +57 -0
- package/plugins/interfaces/voice/mod.js +118 -0
- package/plugins/interfaces/voice/processors/forget.d.ts +13 -0
- package/plugins/interfaces/voice/processors/forget.js +27 -0
- package/plugins/interfaces/voice/resources/relay.d.ts +77 -0
- package/plugins/interfaces/voice/resources/relay.js +428 -0
- package/plugins/interfaces/voice/resources/tools.d.ts +1 -0
- package/plugins/interfaces/voice/resources/tools.js +25 -0
- package/plugins/interfaces/voice/shared/caller.d.ts +27 -0
- package/plugins/interfaces/voice/shared/caller.js +38 -0
- package/plugins/interfaces/voice/shared/settings.d.ts +136 -0
- package/plugins/interfaces/voice/shared/settings.js +121 -0
- package/plugins/interfaces/voice/shared/signature.d.ts +11 -0
- package/plugins/interfaces/voice/shared/signature.js +34 -0
- package/plugins/interfaces/voice/views/call.d.ts +41 -0
- package/plugins/interfaces/voice/views/call.js +30 -0
- package/plugins/interfaces/voice/views/context.d.ts +9 -0
- package/plugins/interfaces/voice/views/context.js +14 -0
- package/plugins/interfaces/voice/views/message.d.ts +17 -0
- package/plugins/interfaces/voice/views/message.js +41 -0
- package/plugins/interfaces/whatsapp/actions/connect.js +3 -0
- package/plugins/interfaces/whatsapp/actions/disconnect.js +4 -1
- package/plugins/interfaces/whatsapp/actions/hook.js +27 -11
- package/plugins/interfaces/whatsapp/actions/set.d.ts +8 -0
- package/plugins/interfaces/whatsapp/actions/set.js +121 -0
- package/plugins/interfaces/whatsapp/collections/blocked.d.ts +29 -0
- package/plugins/interfaces/whatsapp/collections/blocked.js +22 -0
- package/plugins/interfaces/whatsapp/collections/code.d.ts +1 -1
- package/plugins/interfaces/whatsapp/collections/number.d.ts +90 -4
- package/plugins/interfaces/whatsapp/collections/number.js +36 -4
- package/plugins/interfaces/whatsapp/collections/phone.d.ts +13 -3
- package/plugins/interfaces/whatsapp/collections/phone.js +9 -3
- package/plugins/interfaces/whatsapp/collections/rate.d.ts +27 -0
- package/plugins/interfaces/whatsapp/collections/rate.js +13 -0
- package/plugins/interfaces/whatsapp/collections/sent.d.ts +24 -12
- package/plugins/interfaces/whatsapp/collections/sent.js +11 -7
- package/plugins/interfaces/whatsapp/collections/thread.d.ts +14 -6
- package/plugins/interfaces/whatsapp/collections/thread.js +7 -5
- package/plugins/interfaces/whatsapp/collections/typing.d.ts +70 -0
- package/plugins/interfaces/whatsapp/collections/typing.js +21 -0
- package/plugins/interfaces/whatsapp/contract.d.ts +27 -4
- package/plugins/interfaces/whatsapp/contract.js +34 -1
- package/plugins/interfaces/whatsapp/events/undelivered.d.ts +8 -0
- package/plugins/interfaces/whatsapp/events/undelivered.js +17 -0
- package/plugins/interfaces/whatsapp/mod.d.ts +28 -2
- package/plugins/interfaces/whatsapp/mod.js +65 -6
- package/plugins/interfaces/whatsapp/processors/forget.d.ts +6 -0
- package/plugins/interfaces/whatsapp/processors/forget.js +11 -0
- package/plugins/interfaces/whatsapp/processors/receive.d.ts +17 -3
- package/plugins/interfaces/whatsapp/processors/receive.js +264 -81
- package/plugins/interfaces/whatsapp/processors/reply.d.ts +25 -5
- package/plugins/interfaces/whatsapp/processors/reply.js +216 -20
- package/plugins/interfaces/whatsapp/processors/typing.d.ts +8 -0
- package/plugins/interfaces/whatsapp/processors/typing.js +25 -0
- package/plugins/interfaces/whatsapp/shared/customers.d.ts +13 -0
- package/plugins/interfaces/whatsapp/shared/customers.js +16 -0
- package/plugins/interfaces/whatsapp/shared/graph.d.ts +31 -6
- package/plugins/interfaces/whatsapp/shared/graph.js +117 -10
- package/plugins/interfaces/whatsapp/shared/media.d.ts +23 -0
- package/plugins/interfaces/whatsapp/shared/media.js +46 -0
- package/plugins/interfaces/whatsapp/shared/number.d.ts +19 -8
- package/plugins/interfaces/whatsapp/shared/number.js +64 -7
- package/plugins/interfaces/whatsapp/shared/parts.d.ts +94 -0
- package/plugins/interfaces/whatsapp/shared/parts.js +184 -0
- package/plugins/interfaces/whatsapp/shared/payload.d.ts +27 -1
- package/plugins/interfaces/whatsapp/shared/payload.js +36 -1
- package/plugins/interfaces/whatsapp/shared/settings.d.ts +49 -1
- package/plugins/interfaces/whatsapp/shared/settings.js +11 -0
- package/plugins/interfaces/whatsapp/views/message.d.ts +13 -0
- package/plugins/interfaces/whatsapp/views/message.js +13 -0
- package/plugins/interfaces/whatsapp/views/web/line.d.ts +24 -0
- package/plugins/interfaces/whatsapp/views/web/line.js +44 -0
- package/plugins/interfaces/whatsapp/views/web/space.d.ts +7 -5
- package/plugins/interfaces/whatsapp/views/web/space.js +17 -10
- package/plugins/interfaces/whatsapp/views/web/style.d.ts +1 -1
- package/plugins/interfaces/whatsapp/views/web/style.js +8 -0
- package/plugins/models/adapters/llm/anthropic.d.ts +1 -1
- package/plugins/models/adapters/llm/anthropic.js +28 -15
- package/plugins/models/adapters/llm/gemini.d.ts +1 -1
- package/plugins/models/adapters/llm/gemini.js +2 -1
- package/plugins/models/adapters/llm/openai-compatible.d.ts +1 -1
- package/plugins/models/adapters/llm/openai-compatible.js +2 -1
- package/plugins/models/adapters/llm/openai.d.ts +1 -1
- package/plugins/models/adapters/llm/openai.js +16 -4
- package/plugins/models/shared/types.d.ts +8 -0
- package/plugins/models/shared/types.js +10 -0
- package/runtime/actor.d.ts +6 -0
- package/runtime/actor.js +9 -4
- package/runtime/aggregate.js +8 -2
- package/runtime/blobs.d.ts +15 -12
- package/runtime/blobs.js +58 -11
- package/runtime/cache.d.ts +6 -0
- package/runtime/cache.js +19 -1
- package/runtime/define.d.ts +10 -0
- package/runtime/errors.d.ts +20 -2
- package/runtime/errors.js +7 -1
- package/runtime/executor.js +27 -11
- package/runtime/links.d.ts +31 -0
- package/runtime/links.js +60 -0
- package/runtime/maintain.d.ts +88 -0
- package/runtime/maintain.js +120 -0
- package/runtime/memory.js +7 -4
- package/runtime/mod.d.ts +6 -4
- package/runtime/mod.js +5 -2
- package/runtime/mongo.d.ts +13 -0
- package/runtime/mongo.js +39 -8
- package/runtime/observe.d.ts +2 -0
- package/runtime/observe.js +14 -10
- package/runtime/ops.d.ts +5 -0
- package/runtime/ops.js +10 -1
- package/runtime/owner.d.ts +18 -1
- package/runtime/owner.js +127 -61
- package/runtime/presence.d.ts +18 -0
- package/runtime/presence.js +25 -0
- package/runtime/registry.d.ts +5 -0
- package/runtime/registry.js +18 -0
- package/runtime/runtime.js +9 -3
- package/runtime/store.d.ts +48 -1
- package/runtime/wire.d.ts +1 -0
- package/runtime/wire.js +3 -1
- package/stores/blobs/files/mod.js +4 -2
- package/stores/blobs/gcs/mod.d.ts +3 -0
- package/stores/blobs/gcs/mod.js +6 -5
- package/stores/blobs/http/mod.d.ts +1 -1
- package/stores/blobs/http/mod.js +2 -1
- package/stores/latency/mod.js +5 -1
- package/stores/sql/postgres/maintenance.d.ts +31 -0
- package/stores/sql/postgres/maintenance.js +325 -0
- package/stores/sql/postgres/mod.d.ts +28 -4
- package/stores/sql/postgres/mod.js +376 -96
- package/stores/sql/postgres/update.js +3 -1
- package/stores/sql/shared/capped.d.ts +2 -0
- package/stores/sql/shared/capped.js +22 -0
- package/stores/sql/shared/rows.d.ts +14 -0
- package/stores/sql/shared/rows.js +29 -0
- package/stores/sql/shared/statement.d.ts +12 -0
- package/stores/sql/shared/statement.js +244 -0
- package/stores/sql/sqlite/apart.d.ts +11 -0
- package/stores/sql/sqlite/apart.js +219 -0
- package/stores/sql/sqlite/mod.d.ts +16 -2
- package/stores/sql/sqlite/mod.js +246 -51
- package/testing/mod.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,488 @@
|
|
|
1
|
+
## 1.0.0-rc.22 — 2026-11-04
|
|
2
|
+
|
|
3
|
+
**A security release: upgrade now.** Before it, a Google sign-in wrote the new session's secret to
|
|
4
|
+
the event log, and connecting a computer wrote the computer's secret (the first entry below). After
|
|
5
|
+
upgrading, every deployment should:
|
|
6
|
+
|
|
7
|
+
1. **End every session made before the upgrade:** delete the `credential` documents of
|
|
8
|
+
`kind: "session"`, so every signed-in person signs in again. Keys are unaffected.
|
|
9
|
+
2. **Scrub the old events that hold these secrets**, from the store and from anything that copied it
|
|
10
|
+
(backups, exports, exporters): the `action.started` and `action.completed` events of
|
|
11
|
+
`google.sign-in`, `computer.code`, `computer.enrollment` and `computer.work`, and the
|
|
12
|
+
`action.started` events of `session.end`, `computer.admit`, `pool.admit` and `pool.serve`.
|
|
13
|
+
3. **Reconnect computers whose log may have been read:** forget each one (`computer.forget`) and
|
|
14
|
+
connect it again with a new code. A computer's secret can't be rotated yet.
|
|
15
|
+
|
|
16
|
+
- **Security: a Google sign-in no longer writes the session's secret to the log.** `google.sign-in`
|
|
17
|
+
was a recorded Action, so the event log kept its input, the Google ID token, and its result,
|
|
18
|
+
`{ person, session }`, with the new session's secret in plain text. Anyone who could read the log
|
|
19
|
+
(a database reader, a backup, an export, an exporter) could sign in as that person, staff
|
|
20
|
+
included. The identity plugin keeps secrets only as hashes, and this Action undid that. It is now
|
|
21
|
+
unrecorded (`record: false`), like `session.start`. So is `session.end`, whose input is the secret
|
|
22
|
+
being ended. Found by a security review.
|
|
23
|
+
- **Computers' secrets are kept out of the log too**, found by checking every Action for the same
|
|
24
|
+
mistake. These are now unrecorded: `computer.admit`, whose input is a computer's secret (or the
|
|
25
|
+
code connecting it) on every connect; `pool.admit`, whose input is a pool VM's identity token;
|
|
26
|
+
`computer.code`, whose result is the code that connects a computer as its person; and
|
|
27
|
+
`computer.work`, whose input and result are what a person types and sees in their shell, files'
|
|
28
|
+
contents and the env values they pass. `computer.enrollment`'s result (`code`) and
|
|
29
|
+
`pool.serve`'s `assign.code` and `assign.secret` (also when forwarded by `remotePool`) are
|
|
30
|
+
private: still recorded, so a retried wake gets the same code, but the code isn't logged.
|
|
31
|
+
- **Deployments should end every session made before this fix.** Delete the `credential` documents
|
|
32
|
+
of `kind: "session"`, so every signed-in person signs in again. Keys are unaffected. A
|
|
33
|
+
computer's secret can't be rotated yet: where the log may have been read, forget the computer
|
|
34
|
+
(`computer.forget`) and connect it again with a new code.
|
|
35
|
+
- **Old events still hold these secrets until they're scrubbed**, from the store and from anything
|
|
36
|
+
that copied it: the `action.started` and `action.completed` events of `google.sign-in`,
|
|
37
|
+
`computer.code`, `computer.enrollment` and `computer.work`, and the `action.started` events of
|
|
38
|
+
`session.end`, `computer.admit`, `pool.admit` and `pool.serve`. Ended sessions, used codes and
|
|
39
|
+
expired tokens prove nobody, but scrub them anyway.
|
|
40
|
+
|
|
41
|
+
- **MCP: a conversation whose first call an owner stopped no longer ends for good.** A new
|
|
42
|
+
conversation's chat is made (`chat.open`) and then shared with its contact (`member.set`), two
|
|
43
|
+
writes; an owner that stopped between them (a deploy, which doesn't wait for running calls, or a
|
|
44
|
+
crash) left a chat its contact couldn't reach, which is how a contact its people took out of its
|
|
45
|
+
chat looks, so every later call said "This conversation with the app is over". A new
|
|
46
|
+
conversation's opening is now noted with its first call's counts (`mcp_opening`, durable, no
|
|
47
|
+
events, gone with its receipts after 15 minutes) and dropped once the chat is shared: a chat out
|
|
48
|
+
of its contact's reach, with its opening noted, goes on as new (asked again within 15 minutes, its
|
|
49
|
+
contact not erased); without one, it stays over. Erasure's tombstones are read first, as before.
|
|
50
|
+
This is what failed the MCP restart test on slower machines (macOS CI); the test now waits on what
|
|
51
|
+
it watches for, not on fixed times, and a new one stops an owner at each of a first call's writes.
|
|
52
|
+
- **Contacts: a start cut short after a contact's record, before sharing it with the contact, is
|
|
53
|
+
finished when it's started again** (`contact.start`, on WhatsApp, voice and MCP): the contact, and
|
|
54
|
+
the agent working for it, read the record again. A known contact was returned as it was.
|
|
55
|
+
- **Maintenance SQL can run as the store's own role, told so:**
|
|
56
|
+
`postgresStore({ url, schema, maintenance: { storeRole: true } })`, beside a role of its own
|
|
57
|
+
(`maintenance: { url }`; both at once stop the store from opening, and neither still refuses raw
|
|
58
|
+
SQL on a server, its message naming both). Anyone holding the maintenance key can then do whatever
|
|
59
|
+
the store's role can: drop or truncate its tables, delete from the log, read every schema it
|
|
60
|
+
reaches. Only the allowlist check is skipped; the statement filter, a connection of its own for
|
|
61
|
+
each statement over the extended protocol, the timeouts, caps and `connections`, fenced writes in
|
|
62
|
+
the owner with their `maintenance.sql` event, the rollback of what changes `meta` or makes a
|
|
63
|
+
trigger, and the emptied cache all hold. Still refused, before each statement and after a write: a
|
|
64
|
+
role that is or may become a superuser, a member of `pg_execute_server_program`,
|
|
65
|
+
`pg_read_server_files` or `pg_write_server_files`, one with `CREATEROLE` before PostgreSQL 16, or
|
|
66
|
+
one that may run the server's file functions (`pg_read_file`, `lo_import`, `lo_export`…). Cloud
|
|
67
|
+
SQL's `postgres` user passes from PostgreSQL 16. An orgs host's orgs still don't get the plugin.
|
|
68
|
+
|
|
69
|
+
## 1.0.0-rc.21 — 2026-11-04
|
|
70
|
+
|
|
71
|
+
- **Security: a burst of calls no longer drops an executor's connection** (Oxian 0.23.3). About 35
|
|
72
|
+
concurrent calls on one executor (around 20 holding transactions) filled Oxian's queues, and the
|
|
73
|
+
connection was lost with every job in flight on it (`executor_lost`): a remote DoS on any app with
|
|
74
|
+
a public entry point, flagged by a security review. Full queues now hold senders back instead.
|
|
75
|
+
Long-lived workers also move to a fresh connection before one's streams run out, instead of
|
|
76
|
+
failing calls with `capacity`; Copilotz treats the move as the same worker (#154).
|
|
77
|
+
- **MCP: models outside the app call its tools** (the new `mcp` interface; widgets come next). An
|
|
78
|
+
app declares lines in `resources.mcp.lines.<name>`, each an MCP server at `POST /mcp/<name>`
|
|
79
|
+
(`/o/<org>/mcp/<name>` under many orgs): the space its chats live in (`in`), the tools it offers
|
|
80
|
+
(`tools`, by name: only these, never an agent's; each needs its `tool:<name>` View, else it isn't
|
|
81
|
+
offered, and one whose `offer` says no to a contact isn't either), how each is shown (`title`,
|
|
82
|
+
`annotations`, ChatGPT's `invoking`/`invoked` lines, 64 characters), who calls (`client`, the
|
|
83
|
+
steps' sender), `title`, `version`, `instructions`, `handles`, `origins`, `org` and `limits`; and
|
|
84
|
+
plugin-wide, how it knows a caller's address (`caller`) and calls at once in the process
|
|
85
|
+
(`atOnce`, 8). Checked at start; it needs the `links` resource's secret.
|
|
86
|
+
- **The protocol:** Streamable HTTP and JSON-RPC 2.0, written in the plugin, answered as JSON,
|
|
87
|
+
with no session (GET and DELETE are 405; no `Mcp-Session-Id`). MCP 2026-07-28 (per-request
|
|
88
|
+
`_meta`, `server/discover`, the `MCP-Protocol-Version`, `Mcp-Method`, `Mcp-Name` and
|
|
89
|
+
`Mcp-Param-*` headers checked against the body: -32020) and 2025-11-25, 2025-06-18 and
|
|
90
|
+
2025-03-26 (`initialize`; batches only for 2025-03-26, 10 messages at most, one after another).
|
|
91
|
+
Unknown versions are -32022 with the supported ones. Every tool says `noauth`, and all four of
|
|
92
|
+
MCP's hints. A request with an `Origin` the line doesn't name is 403; input nested past 64
|
|
93
|
+
levels, or holding a `$blob`, is -32602.
|
|
94
|
+
- **Conversations:** ChatGPT's `_meta["openai/session"]` (with `openai/subject`) names one; a
|
|
95
|
+
client that names none gets a `chat` handle (128 random bits, an optional input on every tool,
|
|
96
|
+
said once, at the end of the first answer), or with `handles: false` is refused. Each is a
|
|
97
|
+
contact (`via: "mcp"`) in a chat of its own in the line's space, its ids HMACs of the key with
|
|
98
|
+
the `links` secret: no table. A handle the app never gave is refused; a chat whose contact its
|
|
99
|
+
people took out, or that was erased (`contact.forget`, `chat.erase`: a tombstone, `mcp_closed`,
|
|
100
|
+
no personal data), is over for good.
|
|
101
|
+
- **A call** is `mcp.call`, called by the route as the conversation's contact (an actor only the
|
|
102
|
+
route makes: `{ kind: "contact", id, mcp, client }`, which the Action's `allow` asks for). It
|
|
103
|
+
runs the tool through chat's runner, writes a private step from the line's `client` in the chat
|
|
104
|
+
(in its space as it is now; only input that fit the tool's schema, else a note of what was
|
|
105
|
+
sent), and answers with the tool's View, read as the contact, never its output as it is. Only a
|
|
106
|
+
public error (below) says its message. `ctx.callId` is the step's id (the call's,
|
|
107
|
+
`mcp:<thread>:<hash of the request id>:<hash of tool and input>`, and when it began), the same
|
|
108
|
+
however often a call cut short runs again; a new call has a new one. A tool that changes things
|
|
109
|
+
keeps a receipt (`mcp_receipt`, durable, no events, gone after 15 minutes) by what it asks in
|
|
110
|
+
its conversation (tool and input), whatever the request's id: the same call while it runs waits
|
|
111
|
+
for that run; asked again, under any id, within two minutes of its end it's answered what it
|
|
112
|
+
said (kept up to 8,000 characters), beginning with a line saying it wasn't done again (so a
|
|
113
|
+
second, deliberate purchase isn't taken for done); begun and never done (stopped, an owner
|
|
114
|
+
restarted, or failed by accident and told to try again), it runs again as the same step, with
|
|
115
|
+
`retry` and the same `callId`. A public refusal is an answer, and is said again. A read-only
|
|
116
|
+
tool always runs.
|
|
117
|
+
- **Limits** (`limits`): calls at once in the runtime (`mcp.atOnce`, 4: each org's own under the
|
|
118
|
+
orgs host), on the line (4: an executor's connection takes about that many tools that change
|
|
119
|
+
things at once until Oxian's send backpressure is released), from one caller's address (2; a
|
|
120
|
+
batch's every call counts) and in one conversation (2), past any of which it's 503 busy, -31000
|
|
121
|
+
(a batch, an error for each of its requests; a batch with more tool calls than `addressAtOnce`
|
|
122
|
+
is refused, -32600); how long the route waits for an answer (`timeout`, 20 s: then the model is
|
|
123
|
+
told it's still working, as long as few calls are, `lateAtOnce` 2 on the line and
|
|
124
|
+
`addressLateAtOnce` 1 from an address, else it's stopped) and a call may run (`stop`, 60 s: then
|
|
125
|
+
it's stopped; tools should honour `ctx.signal`); a request's body (64 KiB), calls a minute by
|
|
126
|
+
conversation (30), by caller's address (60) and on the line (600), new conversations an hour by
|
|
127
|
+
user (30, ChatGPT's `openai/subject`), by address (20) and on the line (600), and an answer's
|
|
128
|
+
length (100,000 characters). Only calls taken count, and a new conversation once it's made. The
|
|
129
|
+
address is believed only as the app's front says it (`caller`: its header, with the front's
|
|
130
|
+
secret, a request without which is refused, or the proxies' `hops`, which a list header such as
|
|
131
|
+
`x-forwarded-for` needs); IPv6 is counted by its /64, IPv4 written as IPv6 as IPv4, and an
|
|
132
|
+
address that can't be read with every other such call, as one. Ranges in `caller.exempt`
|
|
133
|
+
(OpenAI's) aren't limited by address.
|
|
134
|
+
- **A failure can be public** (`failure(code, message, { public: true })`, `isPublic`): its message
|
|
135
|
+
is for any caller, even a model outside the app over MCP, which no other error's words reach. It
|
|
136
|
+
stays public from job to job. A code alone isn't public: libraries' errors have codes too.
|
|
137
|
+
- **Chat's tool runner is in its contract** (`runTool`, `toolText`): a tool's input checked, run,
|
|
138
|
+
and its result read as agents read it, as a turn does; the turn uses them. Input that doesn't fit
|
|
139
|
+
a tool's schema is a public failure, and the runner says so (`unchecked`). `Tool` gains `title`
|
|
140
|
+
and `annotations` (`readOnly`, `destructive`, `idempotent`, `openWorld`).
|
|
141
|
+
|
|
142
|
+
- **Phone calls: the `voice` plugin** (in `copilotz/plugins/interfaces`), on Twilio's
|
|
143
|
+
ConversationRelay. The app declares its lines (`resources.voice.lines.<name>`: `in`, `account`,
|
|
144
|
+
`token`, `origin`, and optionally `agent`, `language`, `tts`, `voice`, `stt`, `texts`, `gap`,
|
|
145
|
+
`trustCallerId`, `keys`, `limits`, `org`), each a Twilio number open to anyone who calls; their
|
|
146
|
+
settings are checked at start.
|
|
147
|
+
- **Twilio's webhook** is `POST /hooks/voice/<line>` (the `voice.hook` route): checked against
|
|
148
|
+
`X-Twilio-Signature` with the line's auth token. A caller the line's managers blocked isn't
|
|
149
|
+
taken (`voice.block { thread, days? }`, kept by the number's hash; `voice.unblock { block }`
|
|
150
|
+
lifts it by its id, whatever is left of the call); then a call is taken within its caller's
|
|
151
|
+
limits (`callerAtOnce` 1, `callerPerDay` 10; withheld numbers, together, their own
|
|
152
|
+
`hiddenAtOnce` and `hiddenPerDay`, by default the line's `atOnce` and half its `perDay`), then
|
|
153
|
+
the line's (`atOnce` 2, `perDay` 50 calls that went on in any 24 hours), or rejected as busy
|
|
154
|
+
(`<Reject reason="busy"/>`: nothing is spent). A call taken gets TwiML that opens the line's
|
|
155
|
+
socket (`<Connect><ConversationRelay>`, the line's language, greeting and voice) with a ticket
|
|
156
|
+
good once, for a minute; `POST /hooks/voice/<line>/over` hears the relay end and hangs up.
|
|
157
|
+
- **The socket** (`GET /hooks/voice/<line>/relay`, a `serve` route): its signature checked, its
|
|
158
|
+
ticket used, then Twilio's `setup` must name the call the ticket was for. The caller is a
|
|
159
|
+
contact (`via: "voice"`) in a chat of their own in the line's space, answered by the line's
|
|
160
|
+
agent (a line whose agent doesn't answer there fails the call). A number isn't proof of who's
|
|
161
|
+
calling: calling back goes on in the same contact and chat (until the line's `gap`, 12 hours,
|
|
162
|
+
and never into a chat with another call on, checked in the write that puts the call live) only
|
|
163
|
+
when Twilio verified the number (`StirVerstat` `TN-Validation-Passed-A`) or the line sets
|
|
164
|
+
`trustCallerId`; otherwise, and for withheld numbers (Twilio's placeholders, `+266696687`,
|
|
165
|
+
`+7378742833` and the like), each call is a new contact.
|
|
166
|
+
- **What's said:** what the caller says goes to the agent at once, one prompt after the other; a
|
|
167
|
+
prompt said while the answer to the one before is still being written stops that turn, and the
|
|
168
|
+
next turn reads both (Twilio already waits for the caller to finish: a quiet window would add to
|
|
169
|
+
every answer). What the agent writes is said as it writes it, word by word (a step's words
|
|
170
|
+
before its tools, then its answer), through the `voice_call` View read as the caller, and only
|
|
171
|
+
of the turns the caller's own words started: a staff member's turn in their chat isn't said.
|
|
172
|
+
Speaking over it (`interrupt`) cuts what was being said, and the agent is told what was heard
|
|
173
|
+
(the `voice` context). Keys pressed (with `keys`) come as a tap, `keys:<digits>`.
|
|
174
|
+
- **What a call may cost** (`limits`): an answer that failed, or took longer than `turn` (25 s,
|
|
175
|
+
then stopped), says the line's `failed` text, never the error; one past `said` characters
|
|
176
|
+
(1,200) is cut at a word and stopped; `idle` (90 s) of silence, a call past `call` (600 s) or
|
|
177
|
+
past `turns` prompts (30) says `bye` and ends it. The goodbye waits 15 seconds at most for
|
|
178
|
+
what's being said; a call is over by its hard end (`call`, the goodbye and closing), and holds
|
|
179
|
+
its place among the line's calls until then. A call that ends stops its turn, and any turn of it
|
|
180
|
+
that starts just after. The agent ends a call too, once its goodbye is said (the `end_call`
|
|
181
|
+
tool, offered to whoever answers a call while it goes on). Twilio's `end` says why
|
|
182
|
+
(`handoffData`).
|
|
183
|
+
- **The phone is a medium:** messages are said through their `message` View (renderer `voice`: the
|
|
184
|
+
words without Markdown, a link's words, a web address's site), which an app may replace.
|
|
185
|
+
- Each call is a small record (`voice_call`, no events: when, how long, why it ended, whether the
|
|
186
|
+
number was verified; the caller's number private), and `voice_phone` keeps each verified
|
|
187
|
+
caller's contact and chat. Erasing a contact erases its number from both; erasing a chat
|
|
188
|
+
(`chat.erase`, `contact.forget` with `chats`) erases what the calls kept of it. Calls' records
|
|
189
|
+
go after the plugin's `keep` days (30, at least 1: `voice.prune`, daily), once they're over: a
|
|
190
|
+
call going on is never pruned. Agents working for a caller are told it's a phone call, and that
|
|
191
|
+
the number isn't proof of who they are (the `contact` context).
|
|
192
|
+
- It needs a host that takes a route's socket (`host.upgrade()`: `serveRoutes`, or `serve`, from
|
|
193
|
+
`copilotz/web/node`).
|
|
194
|
+
|
|
195
|
+
- **Maintenance endpoints** (the new `maintenance` plugin, in `copilotz/plugins/interfaces`): HTTP
|
|
196
|
+
under `/maintenance/` for an app's operators when they can't reach its database. A key (`key`, or
|
|
197
|
+
several in `keys` to rotate one; 32 random characters at least, a weak one stops the app),
|
|
198
|
+
compared in constant time; without one, every request is unauthorized. Requests act as the
|
|
199
|
+
maintenance actor (`{ kind: "maintenance", by }`), whose Actions run as the system on the record,
|
|
200
|
+
and each writes a line (`log`) before it runs. An orgs host's orgs don't get it.
|
|
201
|
+
- `POST /maintenance/sql`: one read-only statement, with `params`, at most `limit` rows and
|
|
202
|
+
`bytes`, cut off after `timeout`.
|
|
203
|
+
- `POST /maintenance/collections/<collection>/<op>`: insertOne… deleteMany, find… aggregate,
|
|
204
|
+
through the owner's write path: schema-checked, recorded, cached, heard by Processors.
|
|
205
|
+
- `POST /maintenance/queries/<collection>.<name>`: a collection's named query, the body its
|
|
206
|
+
params, read as the system.
|
|
207
|
+
- `POST /maintenance/sql/write`: one statement that writes, run by the owner alone among its
|
|
208
|
+
writes, fenced by its epoch, with a `maintenance.sql` audit event in the same commit; then the
|
|
209
|
+
owner empties its read cache, runs observed Views again and re-reads its timers. A statement
|
|
210
|
+
that changes `meta` (the epoch, Processors' positions) is rolled back. An `Idempotency-Key`
|
|
211
|
+
makes it safe to send again.
|
|
212
|
+
- `GET /maintenance/blobs/<id>`: a blob's bytes, as a download.
|
|
213
|
+
- **SQL on the store port, for maintenance only:**
|
|
214
|
+
`Store.inspect?(sql, params?, { limit, timeout })` (now SQLite's too), a transaction's
|
|
215
|
+
`execute?(sql, params?)` and `transaction(…, { maintenance })`. Both run exactly one statement: a
|
|
216
|
+
second, or one that ends the transaction or changes the connection (`COMMIT`, `SET`…), is refused
|
|
217
|
+
(PostgreSQL ran every statement of an unparameterized `inspect` before; PostgreSQL's line comments
|
|
218
|
+
end at a CR too). `runtime.maintenance` is the owner's way to them; plugin code has none. The
|
|
219
|
+
cache gains `clear()`, observers `stale()`.
|
|
220
|
+
- **PostgreSQL servers:** raw SQL runs only as a role of its own
|
|
221
|
+
(`postgresStore({ maintenance: { url, connections } })`), which must hold exactly maintenance's
|
|
222
|
+
grants: no attribute but LOGIN, membership in no role (but Cloud SQL's IAM marker, itself held
|
|
223
|
+
to the same), no settings of its own, nothing owned (a large object neither), nothing granted
|
|
224
|
+
outside the store's schema, `CREATE` nowhere, no large object, table or column of another's to
|
|
225
|
+
read, nothing on the store's tables beyond what it needs, no `SECURITY DEFINER` function to run,
|
|
226
|
+
no `dblink` or `postgres_fdw`, no trigger on the store's tables: checked before each statement
|
|
227
|
+
and again after a write, in its transaction, reading only `pg_catalog`'s names. `ALTER ROLE`,
|
|
228
|
+
`DO` and `LOCK` don't run; a password literal is kept as `PASSWORD '***'`. Each statement on a
|
|
229
|
+
connection of its own, over the extended protocol, closed after; at most 2 at once, else `busy`.
|
|
230
|
+
A read stops fetching before a row would pass its bytes. PGlite runs it as its one session, and
|
|
231
|
+
discards what it left there.
|
|
232
|
+
- **SQLite:** the store names its tables in `main`, so a temporary object can't stand in for them
|
|
233
|
+
(a write that leaves one, or a trigger, is rolled back); a read runs in a process of its own
|
|
234
|
+
(`deno`, `node` or `bun` itself, never a compiled app; an empty environment; on Deno and Node,
|
|
235
|
+
read access to the database's files alone), killed at its timeout. Else, on the reading
|
|
236
|
+
connection, a pragma only from those that only read, said once and on each answer
|
|
237
|
+
(`inline: true`).
|
|
238
|
+
|
|
239
|
+
- **Security: a forged blob reference is refused, never loaded.** Large strings are kept as blobs
|
|
240
|
+
and documents hold `{ $blob, size, type }` in their place; the owner loaded any object with a
|
|
241
|
+
string `$blob` on every read. So an Action that stores what it's given (a tool's input, a
|
|
242
|
+
webhook's body) could plant one: an id no blob has made every read of that document fail (a chat
|
|
243
|
+
that can't be read or erased, Processors giving up on its events); another document's hash pulled
|
|
244
|
+
that content in; and a path or a name read a file (`fileBlobs`) or any object in the bucket
|
|
245
|
+
(`gcsBlobs` without a prefix).
|
|
246
|
+
- What plugin code writes (documents, updates, upserts' filters, edges, events, records, timers'
|
|
247
|
+
inputs, Action results) and what an Action is called with may hold no `$blob` key: `invalid`.
|
|
248
|
+
The owner checks it as it walks what it offloads, so it costs no extra pass.
|
|
249
|
+
- No part of an update's field path may start with `$` (as MongoDB refuses) or be `__proto__`
|
|
250
|
+
(`invalid`): `{ $set: { "bio.$blob": … } }` made a reference out of plain strings, and on Node
|
|
251
|
+
and Bun `{ $set: { "__proto__.x": … } }` set `x` on every object's prototype (Deno has no
|
|
252
|
+
`__proto__`). `constructor` and `prototype` are fields like any other: paths read and make a
|
|
253
|
+
document's own fields only, so a filter on `constructor` no longer finds `Object` in every
|
|
254
|
+
document.
|
|
255
|
+
- A path ends at a blob reference as it does at a string, so a large string is treated like a
|
|
256
|
+
small one (`$set: { "text.note": 1 }` replaced the reference's insides, losing the text), and at
|
|
257
|
+
any other object with a `$blob` key, so no update turns a planted one into a reference.
|
|
258
|
+
- An aggregate's `$group` can't name a field `$…` either: `_id: { $blob: …, size, type }` built a
|
|
259
|
+
reference from strings, which a browser's own read then loaded.
|
|
260
|
+
- The API's event stream sends a call's result whole; one over 16 KiB went as its reference.
|
|
261
|
+
Published events (`runtime.subscribe`) have `full()`: the event with its large values.
|
|
262
|
+
- Only an exact reference loads a blob: the keys `$blob`, `size` and `type`, a `sha256-<64 hex>`
|
|
263
|
+
id, a numeric size and a string type. Any other object is data.
|
|
264
|
+
- Every blob store (memory, SQLite, PostgreSQL, `fileBlobs`, `httpBlobs`, `gcsBlobs`) takes only a
|
|
265
|
+
blob's id (`checkBlobId`, exported for your own `Blobs`).
|
|
266
|
+
- Fixed on the way: a timer's input over 16 KiB reached its Action as a reference; it comes whole.
|
|
267
|
+
An occurrence of one that a deploy to this version cuts short fails once when it resumes
|
|
268
|
+
(`id_conflict`: it started with the reference as its input); the timer's next ones run.
|
|
269
|
+
- A store may already hold planted references: an exact one still loads (its blob gone, reads
|
|
270
|
+
fail), and any other, carried on, is now refused. #155 has read-only queries (PostgreSQL,
|
|
271
|
+
SQLite) that find them; clean every one, `sys.timers` first.
|
|
272
|
+
|
|
273
|
+
- **Contacts: people outside the org who talk to its agents** (the new `contacts` plugin, part of
|
|
274
|
+
`access`). A WhatsApp customer is a contact, its own kind of actor (`{ kind: "contact", id }`),
|
|
275
|
+
never a person: every `allow: people` Action and query stays shut to it, and nothing that asks for
|
|
276
|
+
a person (`personOf`) finds one. The runtime's `principalOf` says whom work is for, a person or a
|
|
277
|
+
contact (it moved there from chat), and `peopleOrContacts` is what an Action opened to contacts
|
|
278
|
+
allows: today only `chat.send`, whose message is then from `contact:<id>`.
|
|
279
|
+
- A contact's chat is shared with it on its own (a membership `on` the thread, made by
|
|
280
|
+
`contact.chat`): it reaches that chat, what's said and filed there, and its own record, nothing
|
|
281
|
+
else. The space's people reach it as any chat there; the agent working for the contact reaches
|
|
282
|
+
exactly that chat. Three generic completions in spaces make it so, and help people too (a person
|
|
283
|
+
can now share one chat): a shared collection's documents can be part of another's (`part`: a
|
|
284
|
+
message's `thread`), reached with it; an agent working for someone reaches a document one of
|
|
285
|
+
them reaches on its own in a space the other reaches; and `present(ctx, space)` says whether
|
|
286
|
+
someone reaches a space or a document in it, so `space.roster` tells a contact in its chat who
|
|
287
|
+
answers (agents only).
|
|
288
|
+
- A contact is let into documents only, never a whole space (`member.set`, a request granted), and
|
|
289
|
+
never manages one. `request_access` isn't offered to agents working for a contact, nor memory: a
|
|
290
|
+
customer's chat keeps to itself.
|
|
291
|
+
- `contact.start` (trusted code, idempotent by id) and `contact.chat`; `contactOf(actor)` says
|
|
292
|
+
whose work an event's actor's is (the contact's id, through the agent working for them too);
|
|
293
|
+
agents are told whom they talk with (the `contact` context) and see them by name: the `names`
|
|
294
|
+
resource is now a map of sources
|
|
295
|
+
(`{ people: { collection: "profile" }, contact: { collection: "contact", prefix:
|
|
296
|
+
"contact:" } }`),
|
|
297
|
+
replacing `{ collection }`. On the web, add `contactsWeb` to show contacts by name.
|
|
298
|
+
- **A WhatsApp number can be a customer line.** Its space's managers open it to anyone
|
|
299
|
+
(`whatsapp.set { number, open, agent, gap }`). A stranger who writes is then a contact, in a chat
|
|
300
|
+
of their own in the number's space, answered by the number's agent (or who answers new chats
|
|
301
|
+
there); a chat quiet for `gap` hours (12 by default) is over, and their next message starts a new
|
|
302
|
+
one. Their text always goes to the agent (commands stay linked people's); a code from the app
|
|
303
|
+
still links a phone, and linked phones keep working as their person. The `whatsapp` plugin now
|
|
304
|
+
requires `contacts`.
|
|
305
|
+
- **WhatsApp is a medium.** A View for it (renderer `whatsapp`) returns parts, each one WhatsApp
|
|
306
|
+
message, built with the toolkit in WhatsApp's contract (`text`, `buttons`, `list`, `carousel`,
|
|
307
|
+
`image`, `document`, and `clip` for titles), which checks Meta's limits and throws `invalid`
|
|
308
|
+
instead of cutting anything short. A message goes out as its `message` View there (the plugin's:
|
|
309
|
+
its text as WhatsApp formats it; an app's replaces it).
|
|
310
|
+
- **Additions:** chat declares the `additions` resource kind (`{ order?, agents? }`, each an
|
|
311
|
+
`addition:<name>` View in the medium, given `{ thread, answer }`, returning `Addition`s:
|
|
312
|
+
`{ key, parts, fallback?, note? }`). After an agent's final answer that didn't fail
|
|
313
|
+
(`isAnswer`), each goes once per chat per key, recorded in chat's new `shown` ledger through
|
|
314
|
+
`chat.shown` (trusted code, unrecorded); its `note` is told to the model after that answer
|
|
315
|
+
(`[then shown: …]`).
|
|
316
|
+
- **One message, not two:** an answer's last text goes as the first addition's body (or caption)
|
|
317
|
+
when there's room, as Meta charges per message. A part Meta refuses (a 400 that isn't the token
|
|
318
|
+
or the 24-hour window) sends the addition's fallback instead, with the answer joined to it;
|
|
319
|
+
without one, it's logged. A retried delivery sends only what didn't go (`whatsapp_sent` now
|
|
320
|
+
keeps each part by id, with its addition's `key` and `thread`).
|
|
321
|
+
- **Taps:** a button's, a list row's, a carousel card's or a template's reply comes as its title
|
|
322
|
+
with `tap: { id, title, key }` (`chat.send` takes `tap`; messages keep it), answering the
|
|
323
|
+
message it was on; agents read `Carla: PIX [tapped: pay:pix]`. Typing the title is just text. A
|
|
324
|
+
tap is a choice, not a permission: anyone can send any id, so a tool acting on one checks it
|
|
325
|
+
against what was shown there. A quote or a tap answers only what went out in its own chat.
|
|
326
|
+
- What a message and its additions show is read as whom they go to, never with the reach of
|
|
327
|
+
whoever's work the answer was.
|
|
328
|
+
- **"Typing…" while agents work:** each step an agent takes in a WhatsApp chat shows it again once
|
|
329
|
+
WhatsApp may have hidden it (after 20 s, for up to five minutes); nothing says "please wait".
|
|
330
|
+
- **Media:** a part's picture or file is a public https link (as given), one of the app's routes
|
|
331
|
+
(`{ route, params }`: a link signed for a day with its params, which the route checks with
|
|
332
|
+
`verifyLink`), or a chat's file (`{ file }`: a signed link to `/files/<id>`, or, without the
|
|
333
|
+
app's `links`, uploaded to Meta and sent by its id). A carousel's pictures must be links: a file
|
|
334
|
+
with nowhere to link it sends the fallback. A message's files go as images (jpeg, png up to 5
|
|
335
|
+
MB) or documents, a short text as the first one's caption.
|
|
336
|
+
- **WhatsApp lines for an app, as it uses them**:
|
|
337
|
+
- **A line the app declares** in its settings (`resources.whatsapp.lines.<name>`: the space,
|
|
338
|
+
Meta's number id, token and app secret, its own verify token, a webhook path it routes to
|
|
339
|
+
`whatsapp.hook`, its agent, gap, rate, quiet window and language): open to anyone, kept as the
|
|
340
|
+
settings say at every use, with no person connecting or opening it; people can't change it
|
|
341
|
+
(`whatsapp.set`, `whatsapp.credentials` and `whatsapp.disconnect` refuse), and the web tab
|
|
342
|
+
leaves it alone. `whatsapp.set` stays for numbers people connect.
|
|
343
|
+
- **Spaces the app declares** (the spaces plugin's `spaces` resource, by id: `{ name, agents }`):
|
|
344
|
+
the app's own, owned by no person, made and kept by the system when something needs them
|
|
345
|
+
(`space.keep`, trusted code; a declared line keeps the space it's `in`). Its agents are editors
|
|
346
|
+
there, the first answering its new chats; people neither take them out, nor change their role,
|
|
347
|
+
nor rename the space. Otherwise it's a space like any other.
|
|
348
|
+
- **The reply is the body:** after an answer, an addition's own words (a question its buttons ask)
|
|
349
|
+
are what it says without one; with the answer, the answer is its whole body. A fallback keeps
|
|
350
|
+
its words after the answer.
|
|
351
|
+
- **What Meta took but couldn't deliver** (a failed status on the webhook, such as a picture it
|
|
352
|
+
couldn't fetch: `whatsapp.undelivered`) sends that addition's fallback, once, with the answer's
|
|
353
|
+
text when it went in the same message.
|
|
354
|
+
- **A burst gets one answer:** a customer's messages wait for the line's quiet window (`quiet`, 4
|
|
355
|
+
s by default, up to 30) before the agent answers, all of them in one turn and one reply
|
|
356
|
+
(`chat.send`'s new `quiet`: a durable timer each message sets again, `chat.quiet`, so a restart
|
|
357
|
+
in the window still answers once).
|
|
358
|
+
- **A failed turn** tells a customer only that, in their line's language, never its error.
|
|
359
|
+
- Each sender's quiet window is their own (`quiet:<thread>:<sender>:<agent>`): a staff member's
|
|
360
|
+
message never takes a customer's place, nor the reverse. Erasing a chat ends its windows, and a
|
|
361
|
+
window whose message is gone (or no longer theirs to read) starts no turn.
|
|
362
|
+
- A declared line is one org's with the orgs host: it names the org (`org`), and every other org's
|
|
363
|
+
runtime has nothing of it; a line naming none is a single-org app's.
|
|
364
|
+
- What Meta couldn't deliver is rendered again as its addressee, as any reply is.
|
|
365
|
+
- **Signed links** (the runtime's `signLink` and `verifyLink`, with the app's `links` resource:
|
|
366
|
+
`{ origin, secret }`, a secret of at least 32 bytes, checked at start): the app's origin, a path,
|
|
367
|
+
its params and an expiry (an hour unless said), HMAC-signed, with a line break between origin and
|
|
368
|
+
path, so a link for one app or org never opens another (under `hosts/orgs`, give each org its own
|
|
369
|
+
origin). The web host checks the secret as it starts serving. A chat's file is linked or uploaded
|
|
370
|
+
only for someone who may read it. The web host serves a file at a signed `/files/<id>` link
|
|
371
|
+
without a session, as the system; expired or altered, a 404.
|
|
372
|
+
- **Chat in spaces declares its own `shared` entries** (`thread`, `message` with labels, `file`,
|
|
373
|
+
`live` and `shown`, each a part of its thread). `chat.open` opens an empty chat in a space;
|
|
374
|
+
`chat.say { id, thread, from, text, to? }` has an agent say a fixed message in a chat without a
|
|
375
|
+
turn (trusted code only; the same `id` is said once), sent out like any of its answers.
|
|
376
|
+
- **What a contact's chat shows stays theirs to see** (from a security review):
|
|
377
|
+
- A document others are parts of (a chat) labels as itself, and so do its parts: a write into a
|
|
378
|
+
chat shared with someone outside its space (a contact) that drew on anything else, even the same
|
|
379
|
+
space, carries that space as its source (staff read it; the contact doesn't), or an agent
|
|
380
|
+
writing it is refused (`needs_share`). WhatsApp sends only what its addressee may read.
|
|
381
|
+
- Agents are told who else is in a chat from outside the org (the `where` context), from a chat's
|
|
382
|
+
members on its own, which its space's people now read by asking for that chat.
|
|
383
|
+
- A part of a shared document, and a document shared on its own, are reached only where it lives:
|
|
384
|
+
nothing written as one lands in another space. `may`, `must` and `present` never take a document
|
|
385
|
+
shared on its own for a space (`may(ctx, verb, id, on)` asks about the document).
|
|
386
|
+
- A contact's message goes to whom its chat is with (or the agent that wrote what it replies to):
|
|
387
|
+
never to agents it names. Anyone's `replyTo` is kept only for a message of the same chat that
|
|
388
|
+
they read.
|
|
389
|
+
- A tool whose `offer` is a function decides for agents that name it too; `request_access` refuses
|
|
390
|
+
for a contact; computers aren't woken (or billed) for work that's no person's; memory declares
|
|
391
|
+
its own `shared` entry; the identity guard keeps people's records to people.
|
|
392
|
+
- `chat.say`'s message is `<thread>:say:<id>`, said only by an agent answering in that chat.
|
|
393
|
+
- Work handed to another space from a chat shared with a contact comes back labelled with that
|
|
394
|
+
space (`sources`): the contact doesn't read it (spaces' contract: `sharedWith`).
|
|
395
|
+
- The `shared` resource's entries are its own keys: a collection named like what objects inherit
|
|
396
|
+
(`constructor`) is none.
|
|
397
|
+
- **Erasure:** `contact.forget { contact, chats? }` (managers of its space) ends a contact's access
|
|
398
|
+
at once, deletes its record (`contact.deleted`: WhatsApp erases its phone, but a block on it
|
|
399
|
+
stays, by the phone's hash) and, with `chats`, its chats, each for someone who manages that chat's
|
|
400
|
+
space (chat's new `chat.erase`, trusted code only: messages, files, waits, steps in flight; the
|
|
401
|
+
history plugin erases its summaries on `thread.deleted`). The event log keeps what happened (what
|
|
402
|
+
WhatsApp delivered, each change with its document) until retention removes it; memories learned in
|
|
403
|
+
staff's chats, and chats a hand-over opened elsewhere, aren't erased.
|
|
404
|
+
- **An open line, kept in hand:** `whatsapp.block { thread, blocked }` (managers) blocks the phone
|
|
405
|
+
behind a chat: what it sends goes nowhere, unanswered. A customer sending more than the number's
|
|
406
|
+
`rate` a minute (20) goes unanswered. One taken out of their chat is heard again once it's been
|
|
407
|
+
quiet for the gap. Customers are told what can't go on in the number's `language` (`en`, `pt`),
|
|
408
|
+
never in an error's own words.
|
|
409
|
+
- **Fixed:** `message.questions`, and the terminal's `shell.mine`, `shell.set` and `shell.print`,
|
|
410
|
+
let anyone whose id matched in; they're a person's own now.
|
|
411
|
+
|
|
412
|
+
- **Private fields for recorded Actions.** `private: ["buyer", "passengers"]` on an Action (dot
|
|
413
|
+
paths, as a collection's): its calls are recorded without them, in `action.started`'s input and
|
|
414
|
+
`action.completed`'s result alike, so the personal data a booking's buyer gives (names, CPFs,
|
|
415
|
+
emails) never lands in the log, while the calls are still recorded, retried and deduplicated.
|
|
416
|
+
- The call's `inputHash`, and so a nested call's id, still covers the whole input: a retry with
|
|
417
|
+
the same input answers from the log, and a changed one is a new call (under an outside call id,
|
|
418
|
+
`id_conflict`).
|
|
419
|
+
- A result that had private fields is kept whole in `sys.results` (a document by call id, written
|
|
420
|
+
in the completion's commit, no events), and `action.completed` says `private: true`: a retry
|
|
421
|
+
answers with all of it, as it would without them.
|
|
422
|
+
|
|
423
|
+
- **A host without the web app: `serveRoutes`** (`copilotz/web/node`), for an app people use on
|
|
424
|
+
WhatsApp or on the phone. Given the runtime, it serves the app's routes alone (webhooks),
|
|
425
|
+
`/health` (unless a route takes it), and 404 for anything else: no page, no code, no sign-in; a
|
|
426
|
+
route's Action is called as a visitor. Its `close({ drain })` stops listening, letting running
|
|
427
|
+
requests finish, then closes the runtime with those options. A runtime that declares the `socket`
|
|
428
|
+
transport still takes its sockets at `/oxian`. `routeHost(runtime)` (`copilotz/web/server`) is the
|
|
429
|
+
same as a fetch handler. On Node, Deno and Bun (`examples/web-node/routes.ts`).
|
|
430
|
+
- **A route can take a WebSocket** (a voice call's relay): a `serve` route calls `host.upgrade()`,
|
|
431
|
+
and answers with the response it gives; its `socket` is a browser's `WebSocket` as far as
|
|
432
|
+
`onmessage`, `send` and `close` go. It can refuse first, before any handshake. `serveRoutes` and
|
|
433
|
+
the web host's `serve` take it, through Oxian's adapter (route sockets, Oxian 0.23).
|
|
434
|
+
|
|
435
|
+
- **A tool call runs once, even when its turn is tried again.** A step that failed after its tools
|
|
436
|
+
ran (a tool's `llm` View throwing, a commit failing) was run again whole: its model asked again,
|
|
437
|
+
its tools run again, with whatever input the model now chose, and the model never saw the first
|
|
438
|
+
run. Now a step's calls are written before any of them runs (chat's new `intent` collection, one
|
|
439
|
+
document per running turn, no events), and what each returns as soon as it does. A retried turn
|
|
440
|
+
goes on with those calls without asking its model: a call that returned answers from its record,
|
|
441
|
+
and one cut short (its executor lost, the runtime closed) runs again as itself.
|
|
442
|
+
- Tools get `ctx.callId`, the same however many times the call runs (`<turn>:<step>:<n>`): the
|
|
443
|
+
idempotency key for what they do outside. `ctx.retry` is now true only for a call that may have
|
|
444
|
+
run before. The recorded Actions a tool calls answer from the log when it runs again.
|
|
445
|
+
- A turn that ends without its step (failed for good, or stopped mid-tool) keeps the step, with
|
|
446
|
+
what each call returned, or that it never did ("Interrupted before it returned: it may or may
|
|
447
|
+
not have taken effect…"); a stopped answer no longer repeats that step's text.
|
|
448
|
+
- A tool step costs one more commit (its calls, before they run) and one per tool call (what it
|
|
449
|
+
returned). A step that only sends messages costs nothing more: they commit with it.
|
|
450
|
+
- **Closing drops no turn.** `runtime.close()` returned from a delivery it cut short as if it were
|
|
451
|
+
done, then saved its Processor's cursor past it, so a turn running at a deploy never answered. Now
|
|
452
|
+
closing starts no more deliveries or timer occurrences, gives the running ones `drain` ms to
|
|
453
|
+
finish (`close({ drain })`, 5 s by default), and keeps each cursor before an event it didn't
|
|
454
|
+
finish: the next owner delivers it again, with `retry`, and with the above it doesn't repeat its
|
|
455
|
+
tools. Workers are told they're gone after the drain, so running work can still use them. The orgs
|
|
456
|
+
host's `close({ drain })` passes it on to every org's runtime.
|
|
457
|
+
|
|
458
|
+
- **Fixed: messages in a row ended an agent's prompt with its own answer.** A person writing several
|
|
459
|
+
messages a few seconds apart starts a turn for each; one that ran after the agent had answered
|
|
460
|
+
(while it wrote, or with the next turn) was sent a conversation ending with that answer, which
|
|
461
|
+
Anthropic's newer models refuse ("assistant message prefill", HTTP 400), so it failed. Now an
|
|
462
|
+
answer keeps how far its turn had read its thread (`knew`, the `at` of the newest message there);
|
|
463
|
+
the prompt reads what others said after that, while it wrote, after the answer; and the turn of a
|
|
464
|
+
person's message that an answer to them had already read ends without a model call. Adapters never
|
|
465
|
+
send a conversation ending with the model's own message: a user turn ("Continue.") follows it, for
|
|
466
|
+
every provider alike.
|
|
467
|
+
- **Fixed: a failed turn's answer said what its provider said.** "booking failed: Anthropic 400:
|
|
468
|
+
{…}" was written in the chat, where everyone there read it (and a WhatsApp customer got it). It
|
|
469
|
+
now says "booking failed: something went wrong, so it couldn't answer. Try again in a moment."
|
|
470
|
+
What went wrong stays in the `processor.failed` event; a missing key still says who can add one.
|
|
471
|
+
- **Fixed: MiniMax's usage counted no input.** Anthropic's adapter read input and cache counts only
|
|
472
|
+
from `message_start`; MiniMax (on Anthropic's protocol) says them in `message_delta`, so its calls
|
|
473
|
+
were recorded with 0 input tokens. It now reads every count from both, the greatest of each (they
|
|
474
|
+
are totals so far), so Anthropic's, said in both, count once.
|
|
475
|
+
- **OpenAI keeps nothing: `store: false`.** The Responses API stores every response (30 days) unless
|
|
476
|
+
told not to, and Copilotz never read them back: a model's reasoning already comes back encrypted
|
|
477
|
+
and goes back with each call. A server that refuses `store` is asked again without it, from then
|
|
478
|
+
on, as one refusing `include` is. A model's `options` can still set it.
|
|
479
|
+
|
|
480
|
+
- **Fixed: a collection's private fields reached the log on PostgreSQL.** Writes that go as the
|
|
481
|
+
store's single command (most of them) recorded `.created`, `.updated` and `.deleted` with the
|
|
482
|
+
whole document, so `private` fields (a computer's `pending` secret, unsealed account tokens) were
|
|
483
|
+
in the log there; memory and SQLite left them out. The command now records documents without them
|
|
484
|
+
too. Events already written still hold them.
|
|
485
|
+
|
|
1
486
|
## 1.0.0-rc.20 — 2026-11-04
|
|
2
487
|
|
|
3
488
|
- **A model thinking past two minutes isn't a dropped call.** A call counted as dropped once its
|