copilotz 1.0.0-rc.45 → 1.0.0-rc.48
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/AGENTS.md +30 -13
- package/CHANGELOG.md +106 -0
- package/README.md +37 -10
- package/hosts/web/palette/palette.d.ts +2 -1
- package/hosts/web/palette/palette.js +25 -24
- package/hosts/web/palette/state.d.ts +18 -6
- package/hosts/web/palette/state.js +8 -0
- package/package.json +85 -7
- package/plugins/access/contacts/mod.d.ts +3 -1
- package/plugins/access/contacts/mod.js +7 -3
- package/plugins/access/contacts/views/notes.d.ts +11 -0
- package/plugins/access/contacts/views/notes.js +34 -0
- package/plugins/access/spaces/actions/member.js +3 -1
- package/plugins/access/spaces/collections/member.d.ts +17 -0
- package/plugins/access/spaces/collections/member.js +5 -0
- package/plugins/access/spaces/contract.d.ts +6 -3
- package/plugins/access/spaces/contract.js +2 -2
- package/plugins/access/spaces/mod.d.ts +9 -6
- package/plugins/access/spaces/mod.js +9 -8
- package/plugins/access/spaces/shared/audience.d.ts +51 -0
- package/plugins/access/spaces/shared/audience.js +112 -0
- package/plugins/access/spaces/shared/can.d.ts +19 -0
- package/plugins/access/spaces/shared/can.js +25 -0
- package/plugins/access/spaces/shared/labels.d.ts +23 -25
- package/plugins/access/spaces/shared/labels.js +70 -86
- package/plugins/access/spaces/shared/reach.d.ts +28 -8
- package/plugins/access/spaces/shared/reach.js +120 -19
- package/plugins/access/spaces/shared/rules.d.ts +3 -2
- package/plugins/access/spaces/shared/rules.js +7 -4
- package/plugins/access/spaces/shared/seat.d.ts +1 -1
- package/plugins/access/spaces/shared/seat.js +9 -3
- package/plugins/access/spaces/views/web/words.d.ts +1 -1
- package/plugins/agents/chat/actions/approve.js +109 -0
- package/plugins/agents/chat/actions/erase.js +5 -9
- package/plugins/{compute/computers → agents/chat}/actions/forget-grant.js +1 -1
- package/plugins/agents/chat/actions/move.js +13 -19
- package/plugins/agents/chat/actions/notes.d.ts +1 -0
- package/plugins/agents/chat/actions/notes.js +48 -0
- package/plugins/agents/chat/actions/unmark.d.ts +1 -0
- package/plugins/agents/chat/actions/unmark.js +100 -0
- package/plugins/{compute/computers → agents/chat}/collections/approval.d.ts +116 -47
- package/plugins/agents/chat/collections/approval.js +107 -0
- package/plugins/agents/chat/collections/file.d.ts +2 -2
- package/plugins/{compute/computers → agents/chat}/collections/grant.d.ts +20 -23
- package/plugins/{compute/computers → agents/chat}/collections/grant.js +12 -10
- package/plugins/agents/chat/collections/intent.d.ts +7 -7
- package/plugins/agents/chat/collections/live.d.ts +1 -1
- package/plugins/agents/chat/collections/message.d.ts +59 -13
- package/plugins/agents/chat/collections/message.js +31 -3
- package/plugins/agents/chat/collections/shown.d.ts +1 -1
- package/plugins/agents/chat/collections/thread.d.ts +71 -1
- package/plugins/agents/chat/collections/thread.js +57 -0
- package/plugins/agents/chat/collections/wait.d.ts +1 -1
- package/plugins/agents/chat/contract.d.ts +20 -3
- package/plugins/agents/chat/contract.js +17 -1
- package/plugins/agents/chat/mod.d.ts +27 -1
- package/plugins/agents/chat/mod.js +54 -7
- package/plugins/agents/chat/processors/turn.js +86 -24
- package/plugins/agents/chat/resources/commands.d.ts +5 -0
- package/plugins/agents/chat/resources/commands.js +90 -20
- package/plugins/agents/chat/resources/tools.js +29 -5
- package/plugins/agents/chat/shared/asks.d.ts +81 -0
- package/plugins/agents/chat/shared/asks.js +203 -0
- package/plugins/agents/chat/shared/delivery.d.ts +10 -0
- package/plugins/agents/chat/shared/delivery.js +137 -25
- package/plugins/agents/chat/shared/notes.d.ts +28 -0
- package/plugins/agents/chat/shared/notes.js +35 -0
- package/plugins/agents/chat/shared/send.d.ts +9 -1
- package/plugins/agents/chat/shared/send.js +36 -6
- package/plugins/agents/chat/shared/share.d.ts +48 -0
- package/plugins/agents/chat/shared/share.js +67 -0
- package/plugins/agents/chat/shared/types.d.ts +13 -0
- package/plugins/agents/chat/shared/unmark.d.ts +145 -0
- package/plugins/agents/chat/shared/unmark.js +237 -0
- package/plugins/agents/chat/terminal.d.ts +2 -1
- package/plugins/agents/chat/terminal.js +6 -2
- package/plugins/agents/chat/views/asked.d.ts +35 -0
- package/plugins/agents/chat/views/asked.js +89 -0
- package/plugins/agents/chat/views/held.d.ts +10 -0
- package/plugins/agents/chat/views/held.js +10 -0
- package/plugins/agents/chat/views/message.d.ts +1 -0
- package/plugins/agents/chat/views/message.js +8 -4
- package/plugins/agents/chat/views/terminal/asks.d.ts +14 -0
- package/plugins/agents/chat/views/terminal/asks.js +35 -0
- package/plugins/agents/chat/views/terminal/message.js +9 -9
- package/plugins/agents/chat/views/terminal/moving.d.ts +11 -0
- package/plugins/agents/chat/views/terminal/moving.js +27 -0
- package/plugins/agents/chat/views/web/asking.d.ts +11 -0
- package/plugins/{compute/computers/views/web/waiting.js → agents/chat/views/web/asking.js} +10 -9
- package/plugins/agents/chat/views/web/asks.d.ts +42 -0
- package/plugins/agents/chat/views/web/asks.js +170 -0
- package/plugins/agents/chat/views/web/composer.d.ts +23 -1
- package/plugins/agents/chat/views/web/composer.js +37 -3
- package/plugins/agents/chat/views/web/conversation.d.ts +58 -0
- package/plugins/agents/chat/views/web/conversation.js +130 -55
- package/plugins/agents/chat/views/web/handed.d.ts +6 -0
- package/plugins/agents/chat/views/web/handed.js +38 -0
- package/plugins/agents/chat/views/web/header.d.ts +10 -6
- package/plugins/agents/chat/views/web/header.js +2 -2
- package/plugins/agents/chat/views/web/lane.d.ts +11 -0
- package/plugins/agents/chat/views/web/lane.js +44 -0
- package/plugins/agents/chat/views/web/listed.d.ts +9 -1
- package/plugins/agents/chat/views/web/listed.js +14 -2
- package/plugins/agents/chat/views/web/message.d.ts +7 -4
- package/plugins/agents/chat/views/web/message.js +28 -20
- package/plugins/agents/chat/views/web/move.d.ts +7 -2
- package/plugins/agents/chat/views/web/move.js +40 -9
- package/plugins/agents/chat/views/web/moving.d.ts +21 -0
- package/plugins/agents/chat/views/web/moving.js +46 -0
- package/plugins/agents/chat/views/web/notes-lane.d.ts +66 -0
- package/plugins/agents/chat/views/web/notes-lane.js +57 -0
- package/plugins/agents/chat/views/web/notes.d.ts +16 -0
- package/plugins/agents/chat/views/web/notes.js +36 -0
- package/plugins/agents/chat/views/web/palette.js +2 -2
- package/plugins/agents/chat/views/web/plain.d.ts +8 -1
- package/plugins/agents/chat/views/web/plain.js +18 -1
- package/plugins/agents/chat/views/web/send-on.d.ts +29 -0
- package/plugins/agents/chat/views/web/send-on.js +68 -0
- package/plugins/agents/chat/views/web/style.d.ts +5 -3
- package/plugins/agents/chat/views/web/style.js +158 -5
- package/plugins/agents/chat/views/web/words.d.ts +1 -1
- package/plugins/agents/chat/views/web/words.js +114 -3
- package/plugins/agents/chat/web.d.ts +20 -3
- package/plugins/agents/chat/web.js +32 -4
- package/plugins/agents/history/collections/summary.d.ts +1 -1
- package/plugins/agents/history/processors/compact.js +1 -1
- package/plugins/agents/history/resources/tools.js +5 -1
- package/plugins/agents/history/shared/lines.d.ts +4 -3
- package/plugins/agents/history/shared/lines.js +5 -2
- package/plugins/agents/memory/collections/memory.d.ts +1 -1
- package/plugins/agents/memory/mod.d.ts +1 -1
- package/plugins/agents/memory/mod.js +1 -1
- package/plugins/agents/memory/shared/scope.js +1 -1
- package/plugins/agents/routines/collections/routine.d.ts +1 -1
- package/plugins/agents/routines/collections/run.d.ts +1 -1
- package/plugins/agents/routines/resources/tools.js +3 -0
- package/plugins/agents/routines/shared/routines.d.ts +1 -1
- package/plugins/agents/routines/shared/schedule.d.ts +1 -1
- package/plugins/billing/usage/views/web/words.d.ts +1 -1
- package/plugins/compute/computers/actions/allow-origin.js +3 -4
- package/plugins/compute/computers/actions/forget.js +2 -11
- package/plugins/compute/computers/actions/upgrade-asks.d.ts +1 -0
- package/plugins/compute/computers/actions/upgrade-asks.js +29 -0
- package/plugins/compute/computers/collections/desk.d.ts +1 -1
- package/plugins/compute/computers/mod.d.ts +7 -5
- package/plugins/compute/computers/mod.js +18 -15
- package/plugins/compute/computers/processors/left.js +1 -1
- package/plugins/compute/computers/program/version.d.ts +1 -1
- package/plugins/compute/computers/program/version.js +1 -1
- package/plugins/compute/computers/resources/commands.d.ts +2 -3
- package/plugins/compute/computers/resources/commands.js +2 -55
- package/plugins/compute/computers/resources/downloads.js +1 -1
- package/plugins/compute/computers/shared/ask.d.ts +37 -14
- package/plugins/compute/computers/shared/ask.js +57 -105
- package/plugins/compute/computers/shared/desks.js +2 -2
- package/plugins/compute/computers/shared/upgrade.d.ts +42 -0
- package/plugins/compute/computers/shared/upgrade.js +44 -0
- package/plugins/compute/computers/terminal.d.ts +4 -3
- package/plugins/compute/computers/terminal.js +5 -6
- package/plugins/compute/computers/views/web/allowed.d.ts +2 -2
- package/plugins/compute/computers/views/web/allowed.js +4 -4
- package/plugins/compute/computers/views/web/asked.d.ts +0 -2
- package/plugins/compute/computers/views/web/asked.js +0 -18
- package/plugins/compute/computers/views/web/asks.d.ts +14 -18
- package/plugins/compute/computers/views/web/asks.js +9 -70
- package/plugins/compute/computers/views/web/routine-panel.js +12 -5
- package/plugins/compute/computers/views/web/style.d.ts +6 -6
- package/plugins/compute/computers/views/web/style.js +8 -39
- package/plugins/compute/computers/web.d.ts +7 -9
- package/plugins/compute/computers/web.js +17 -15
- package/plugins/interfaces/maintenance/contract.d.ts +5 -1
- package/plugins/interfaces/maintenance/mod.d.ts +3 -0
- package/plugins/interfaces/maintenance/mod.js +3 -0
- package/plugins/interfaces/maintenance/resources/routes.d.ts +4 -0
- package/plugins/interfaces/maintenance/resources/routes.js +19 -0
- package/plugins/interfaces/mcp/actions/call.js +2 -23
- package/plugins/interfaces/mcp/actions/public.d.ts +8 -0
- package/plugins/interfaces/mcp/actions/public.js +81 -0
- package/plugins/interfaces/mcp/mod.d.ts +31 -0
- package/plugins/interfaces/mcp/mod.js +33 -0
- package/plugins/interfaces/mcp/resources/limits.d.ts +38 -0
- package/plugins/interfaces/mcp/resources/limits.js +77 -0
- package/plugins/interfaces/mcp/resources/public.d.ts +45 -0
- package/plugins/interfaces/mcp/resources/public.js +99 -0
- package/plugins/interfaces/mcp/resources/server.d.ts +5 -1
- package/plugins/interfaces/mcp/resources/server.js +21 -4
- package/plugins/interfaces/mcp/resources/tools.js +6 -3
- package/plugins/interfaces/mcp/shared/settings.d.ts +37 -6
- package/plugins/interfaces/mcp/shared/settings.js +48 -7
- package/plugins/interfaces/mcp/shared/shown.d.ts +20 -0
- package/plugins/interfaces/mcp/shared/shown.js +31 -0
- package/plugins/interfaces/voice/collections/call.d.ts +1 -1
- package/plugins/interfaces/web/collections/visitor.d.ts +1 -1
- package/plugins/interfaces/whatsapp/collections/phone.d.ts +1 -1
- package/plugins/models/actions/check.js +5 -3
- package/plugins/models/actions/offered.js +6 -2
- package/plugins/models/actions/price.d.ts +0 -2
- package/plugins/models/actions/price.js +5 -5
- package/plugins/models/shared/choice.d.ts +8 -0
- package/plugins/models/shared/choice.js +37 -3
- package/plugins/models/shared/embed.js +2 -1
- package/plugins/models/shared/generate.js +2 -1
- package/plugins/models/shared/image.js +2 -1
- package/plugins/models/shared/transcribe.js +2 -1
- package/runtime/api.js +1 -1
- package/runtime/define.d.ts +7 -4
- package/runtime/describe.d.ts +2 -0
- package/runtime/describe.js +5 -2
- package/runtime/errors.d.ts +7 -0
- package/runtime/errors.js +7 -0
- package/runtime/executor.js +18 -9
- package/runtime/mod.d.ts +1 -1
- package/runtime/mod.js +1 -1
- package/runtime/owner.js +48 -4
- package/runtime/schedules.d.ts +23 -4
- package/runtime/schedules.js +9 -2
- package/runtime/timers.d.ts +4 -1
- package/runtime/timers.js +34 -10
- package/runtime/wire.d.ts +9 -1
- package/runtime/wire.js +10 -1
- package/stores/sql/sqlite/mod.d.ts +8 -1
- package/stores/sql/sqlite/mod.js +14 -2
- package/testing/mod.js +1 -1
- package/plugins/access/spaces/actions/share.d.ts +0 -1
- package/plugins/access/spaces/actions/share.js +0 -36
- package/plugins/compute/computers/actions/approve.js +0 -95
- package/plugins/compute/computers/collections/approval.js +0 -79
- package/plugins/compute/computers/shared/asks.d.ts +0 -5
- package/plugins/compute/computers/shared/asks.js +0 -4
- package/plugins/compute/computers/shared/grants.d.ts +0 -32
- package/plugins/compute/computers/shared/grants.js +0 -66
- package/plugins/compute/computers/views/terminal/approvals.d.ts +0 -9
- package/plugins/compute/computers/views/terminal/approvals.js +0 -16
- package/plugins/compute/computers/views/web/waiting.d.ts +0 -10
- /package/plugins/{compute/computers → agents/chat}/actions/approve.d.ts +0 -0
- /package/plugins/{compute/computers → agents/chat}/actions/forget-grant.d.ts +0 -0
package/AGENTS.md
CHANGED
|
@@ -4,18 +4,20 @@ A guide for coding agents (Claude Code, Codex, Cursor, Gemini) building an app w
|
|
|
4
4
|
it whole before you write code. The last section is for work on Copilotz itself.
|
|
5
5
|
|
|
6
6
|
It ships in the package (`node_modules/copilotz/AGENTS.md`, and `@copilotz/copilotz` on JSR) and
|
|
7
|
-
goes with `copilotz@1.0.0-rc.
|
|
7
|
+
goes with `copilotz@1.0.0-rc.48`. Every docs page is Markdown at
|
|
8
8
|
`https://copilotz.com/docs/<slug>.md`, and https://copilotz.com/llms.txt lists them all. When you're
|
|
9
9
|
unsure of a name, fetch its page or read the package's types (`node_modules/copilotz/**/*.d.ts`).
|
|
10
10
|
Don't guess.
|
|
11
11
|
|
|
12
|
+
It also comes as an Agent Skill, for any coding agent: `npx skills add copilotzhq/copilotz`.
|
|
13
|
+
|
|
12
14
|
## What Copilotz is
|
|
13
15
|
|
|
14
16
|
A runtime for apps that people and AI use alike. You write the app once: its data, what can be done,
|
|
15
17
|
who may do it, and how it shows. People use it on a web page or in a terminal, the app's own agents
|
|
16
18
|
through tools, and outside assistants (ChatGPT, Claude, any MCP client) over MCP. Every way in calls
|
|
17
19
|
the same Actions, under the same rules, and every write is on one record of who did what, for whom.
|
|
18
|
-
It runs on Node 24+, Deno and Bun.
|
|
20
|
+
It runs on Node 24+, Deno 2.9+ and Bun.
|
|
19
21
|
|
|
20
22
|
## How Copilotz works, in one minute
|
|
21
23
|
|
|
@@ -62,12 +64,12 @@ There's no project generator. Set a project up as the docs' courses do, on Node
|
|
|
62
64
|
```sh
|
|
63
65
|
mkdir my-app && cd my-app
|
|
64
66
|
npm init -y && npm pkg set type=module
|
|
65
|
-
npm install copilotz@1.0.0-rc.
|
|
67
|
+
npm install copilotz@1.0.0-rc.48 react@19 react-dom@19
|
|
66
68
|
npm install -D typescript @types/node @types/react @types/react-dom esbuild
|
|
67
69
|
```
|
|
68
70
|
|
|
69
71
|
Pin the version: npm's `latest` tag still points at an early release candidate. On Deno, run
|
|
70
|
-
`deno add jsr:@copilotz/copilotz` and map `"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.
|
|
72
|
+
`deno add jsr:@copilotz/copilotz` and map `"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.48"` in
|
|
71
73
|
`deno.json`, so imports read the same.
|
|
72
74
|
|
|
73
75
|
Node runs `.ts` files as they are, so there's no build step. It doesn't run `.tsx`: tests that load
|
|
@@ -106,7 +108,7 @@ line `@AGENTS.md` (Claude Code reads `CLAUDE.md`, and follows the import). Keep
|
|
|
106
108
|
```markdown
|
|
107
109
|
# AGENTS.md
|
|
108
110
|
|
|
109
|
-
This app runs on Copilotz (copilotz@1.0.0-rc.
|
|
111
|
+
This app runs on Copilotz (copilotz@1.0.0-rc.48). Read node_modules/copilotz/AGENTS.md first;
|
|
110
112
|
https://copilotz.com/llms.txt lists the docs, as Markdown.
|
|
111
113
|
|
|
112
114
|
- `npm test` runs every test offline, with a scripted model: run it after each change.
|
|
@@ -290,9 +292,10 @@ Test what callers may not do as well: call as someone else, and `assert.rejects`
|
|
|
290
292
|
live `in` a space; `part` ties one to another document, as a booking to its chat), or write a
|
|
291
293
|
`guard`. Don't filter by who's asking inside an Action. To keep a collection changing only through
|
|
292
294
|
its Actions, refuse `direct` writes in a `guard`.
|
|
293
|
-
- **Say `allow` on every Action outsiders call:** `people`, `contacts`, `peopleOrContacts`,
|
|
294
|
-
`inPerson` for what only the person decides (consent, keys, who's in a space,
|
|
295
|
-
of agents too, and of whom they work for.
|
|
295
|
+
- **Say `allow` on every Action outsiders call:** `people`, `contacts`, `peopleOrContacts`,
|
|
296
|
+
`publicCallers`, or `inPerson` for what only the person decides (consent, keys, who's in a space,
|
|
297
|
+
money). Write it by kind, never by identity. It's asked of agents too, and of whom they work for.
|
|
298
|
+
An Action without `allow` is internal.
|
|
296
299
|
- **A View for whatever anyone reads, a model included.** Each tool gets a `tool:<name>` View: short
|
|
297
300
|
text, with ids the model can act on. A failed call's output is its error's words; pass them on,
|
|
298
301
|
don't throw. An MCP server that offers a tool without its View doesn't start.
|
|
@@ -308,6 +311,16 @@ Test what callers may not do as well: call as someone else, and `assert.rejects`
|
|
|
308
311
|
A tool works where its chat is.
|
|
309
312
|
- **Going past the actor's reach is a named grant,** `ctx.as(grant("…"))`, in trusted code, on the
|
|
310
313
|
record. Keys stay in code: never in Action inputs (they're recorded), never with a model.
|
|
314
|
+
- **An agent tells a conversation only what everyone in it could see.** Its work reads what both its
|
|
315
|
+
asker and the place its answer goes reach: a space and what it draws on; a customer's chat, what
|
|
316
|
+
that customer reaches (a space drawing on another with `contacts: "read"` lets them read it); its
|
|
317
|
+
person's Personal space, all they reach. Writing anywhere its readers don't all reach that asks
|
|
318
|
+
the person first (`needs_approval`): don't catch it, let it through to the turn.
|
|
319
|
+
- **A tool that goes past its caller, offered to a contact or the public, is a declassifier.** Scope
|
|
320
|
+
it to them (their own bookings, never any record), take no free-form query that could widen it,
|
|
321
|
+
and return only what they may see. In a customer's chat, an Action people call that goes past its
|
|
322
|
+
caller is refused; the app's own (no `allow`) runs as its tool chose. The public (`publicCallers`,
|
|
323
|
+
`{ kind: "public" }`) reads only spaces that have it as a viewer, and writes nothing.
|
|
311
324
|
- **Outside effects:** write the intent, call out with its id as the idempotency key (a tool's
|
|
312
325
|
`callId`), then write the result.
|
|
313
326
|
- **Online:** `devSignIn` is for this machine only; Copilotz won't start it with a public origin.
|
|
@@ -330,7 +343,9 @@ Build Compass (41 chapters, written for an earlier release candidate: check name
|
|
|
330
343
|
site's chat: [GS 8](https://copilotz.com/docs/getting-started/08-a-chat-on-your-site.md).
|
|
331
344
|
WhatsApp: [GS 9](https://copilotz.com/docs/getting-started/09-whatsapp.md).
|
|
332
345
|
- Shipping (SQLite, PostgreSQL, sign-in by email):
|
|
333
|
-
[GS 10](https://copilotz.com/docs/getting-started/10-shipping-the-salon.md).
|
|
346
|
+
[GS 10](https://copilotz.com/docs/getting-started/10-shipping-the-salon.md). A container of 512
|
|
347
|
+
MiB or less (Deno 2.9+, `--max-semi-space-size=2`, SQLite's cache, each plugin from its own entry
|
|
348
|
+
point): [memory](https://copilotz.com/docs/operations/memory.md).
|
|
334
349
|
- The prompt and context Views:
|
|
335
350
|
[BC 2](https://copilotz.com/docs/build-compass/part-1-an-agent-of-your-own/02-north-in-your-terminal.md),
|
|
336
351
|
[BC 4](https://copilotz.com/docs/build-compass/part-2-your-own-plugins/04-today-every-turn.md).
|
|
@@ -355,10 +370,12 @@ The same names on npm (`copilotz/…`) and JSR (`@copilotz/copilotz/…`); the p
|
|
|
355
370
|
lists them all. Besides those above: `copilotz/stores/sqlite` and `copilotz/stores/postgres`
|
|
356
371
|
(stores), `copilotz/plugins/interfaces` (`mcp`, `api`, `whatsapp`, `voice`, `webLines`),
|
|
357
372
|
`copilotz/web` (the web host, `web`), `copilotz/web/server` (`webPage`), `copilotz/web/node`
|
|
358
|
-
(`listen`, `serve`, `bundle`), `copilotz/terminal` (`terminal`) and `copilotz/testing`.
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
373
|
+
(`listen`, `serve`, `bundle`), `copilotz/terminal` (`terminal`) and `copilotz/testing`. Each plugin
|
|
374
|
+
of `agents`, `access` and `interfaces` is also its own entry point, which loads it alone:
|
|
375
|
+
`copilotz/plugins/interfaces/mcp`, `copilotz/plugins/agents/chat`, `copilotz/plugins/access/spaces`…
|
|
376
|
+
Front ends sit beside each theme (`copilotz/plugins/agents/web` has `chatWeb`). Product packages
|
|
377
|
+
ship at the same version: `@copilotz/work` (`boards`, `documents`), `@copilotz/team`,
|
|
378
|
+
`@copilotz/directory` and `@copilotz/billing`.
|
|
362
379
|
|
|
363
380
|
## Working on Copilotz itself
|
|
364
381
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,109 @@
|
|
|
1
|
+
## 1.0.0-rc.48 — 2026-11-13
|
|
2
|
+
|
|
3
|
+
- **Oxian 0.23.6:** each end of a worker connection keeps about 70 bytes per finished stream instead
|
|
4
|
+
of about 170, for the connection's life (its handoff, at about 49,000 streams). A public MCP app,
|
|
5
|
+
whose Hypervisor and worker share a process, keeps about 0.2 MiB less heap per 1,000 calls.
|
|
6
|
+
- `copilotz/testing`'s `host()` on Deno loaded Oxian 0.23.4's adapter beside the runtime's own
|
|
7
|
+
Oxian; it now names the same version.
|
|
8
|
+
|
|
9
|
+
## 1.0.0-rc.47 — 2026-11-13
|
|
10
|
+
|
|
11
|
+
(rc.46 was tagged but never published: a file wasn't formatted, and a test read Windows line endings
|
|
12
|
+
as part of the text. This is it.)
|
|
13
|
+
|
|
14
|
+
**Breaking: what an agent may say is bounded by who will see it.** The old labels (marks on answers,
|
|
15
|
+
hidden until shared) are gone, along with the `share` Action, `needs_share`, message `sources`, the
|
|
16
|
+
"Uses … Not everyone here can see it." notice and `/share`. In their place:
|
|
17
|
+
|
|
18
|
+
- **The bound.** An agent's work reads only what both its asker and its destination reach: a space
|
|
19
|
+
and what it draws on; a customer's chat, what that customer reaches; its person's own Personal
|
|
20
|
+
space, all they reach. Its answer there shows nobody what they couldn't see, so nothing is ever
|
|
21
|
+
hidden once written. The turn's agent carries its conversation (`thread`), and so does a tool
|
|
22
|
+
acting as its agent's person.
|
|
23
|
+
- **Going wider asks first.** Writing anywhere whose readers don't all reach that bound (a Personal
|
|
24
|
+
space's agent posting in Launch, a team's agent writing into a customer's chat, handing work to
|
|
25
|
+
another space) is refused with `needs_approval` (`to`, `named`), and the turn asks its person:
|
|
26
|
+
"May I post this to Launch? Its 12 members will see it.", yes this once, for this conversation,
|
|
27
|
+
for the routine that set it going, or no; never always. On a yes it runs again. Don't catch
|
|
28
|
+
`needs_approval` in a tool: let it through.
|
|
29
|
+
- **One ask for every plugin, in chat** (`approval`, `grant`, `chat.approve`, `chat.forgetGrant`):
|
|
30
|
+
each ask says which answers it takes. Computers use it (`computer.approve` and
|
|
31
|
+
`computer.forgetGrant` are gone); their stored asks and yeses move over on the first start
|
|
32
|
+
(`computer.upgradeAsks`).
|
|
33
|
+
- **Answers handed back** from another space ask "Post here" / "Send it to me only" where that
|
|
34
|
+
space's people don't all reach what the work drew on; from a Personal space they never ask. Work
|
|
35
|
+
handed over from inside a customer's chat is refused: staff use its notes.
|
|
36
|
+
- **In front of a customer,** trusted code going beyond its caller runs only in an Action a contact
|
|
37
|
+
may call, or the app's own (no `allow`), recorded or not. A tool that goes past its caller,
|
|
38
|
+
offered to a contact or the public, is a declassifier: scope it to them (AGENTS.md).
|
|
39
|
+
- **A space drawing on another may let its contacts read it:** `member.set` with `contacts: "read"`
|
|
40
|
+
(read only, one level), for a catalog or policies a line's customers may see.
|
|
41
|
+
- **Staff notes** beside a customer's chat (`<chat>:notes`, `chat.notes`): the team works with its
|
|
42
|
+
agents there, with the space's reach; the customer never sees it; a reply goes over as the
|
|
43
|
+
person's own message.
|
|
44
|
+
- **Moving a conversation names what it shows:** "Everyone in Launch (12) will see this whole
|
|
45
|
+
conversation. It drew on Squad 1 and Finance." (`thread.moving`), from what its agents' messages
|
|
46
|
+
record they drew on (`drew`: a record, never a gate, and only spaces their readers reach).
|
|
47
|
+
- **The public:** `{ kind: "public" }` (`publicCallers`) reads only the spaces that have it as a
|
|
48
|
+
viewer, and writes nothing; a call with no actor is still no one.
|
|
49
|
+
- **Migration, by itself on the first start:** `chat.unmark` moves what the old marks kept hidden:
|
|
50
|
+
in a Personal space they become `drew`; in a customer's chat, the message moves to its staff
|
|
51
|
+
notes; elsewhere, to the Personal space of whom it answered, leaving a placeholder. One log line
|
|
52
|
+
of counts. `deno task unmark --dry-run` rehearses it against a database, writing nothing. Until it
|
|
53
|
+
has run, a contact reads nothing that still carries the old marks.
|
|
54
|
+
- **What code writes is kept as what happened, and said in the reader's words.** A line where a
|
|
55
|
+
reply went (the migration's placeholders; an answer handed back that went to its asker alone, or
|
|
56
|
+
stayed) is a message's `held` (`{ for: <person> }`, or `{}`), with no text. Staff notes and what
|
|
57
|
+
was held from a chat keep that chat's title as it is, `about` and `held: { from }` saying what
|
|
58
|
+
they are. A share's or a hand-back's ask keeps where and to how many, not a sentence. Views say
|
|
59
|
+
them in chat's words (`chat.heldMoved`, `chat.notesOf`, `chat.heldFrom`, `chat.askPost`…), English
|
|
60
|
+
by default, names as they are when read; the asks' cards, the sidebar's waiting list and the
|
|
61
|
+
terminal's notice take every word from there. Agents are told them in English.
|
|
62
|
+
- **Runtime:** a declared schedule may run `once` (on the first start with it); a failure's `detail`
|
|
63
|
+
reaches its caller; operators call `isMaintenance` Actions at
|
|
64
|
+
`POST /maintenance/actions/<action>`.
|
|
65
|
+
- **Less memory for the same app.** The docs app's shape (an MCP server with 3 tools, on the memory
|
|
66
|
+
store), started, after a full GC: Deno 2.9 106 → 90 MiB RSS and Node 24 134 → 103 MiB, with 7 MiB
|
|
67
|
+
less heap, when it imports each plugin from its own entry point.
|
|
68
|
+
[Memory](docs/operations/memory.md), a new page, says how to run an app in a container of 512 MiB
|
|
69
|
+
or less, with what each setting saves:
|
|
70
|
+
- **The model catalog loads the first time a model is resolved,** not with the models plugin. An
|
|
71
|
+
app that never calls a model saves about 5 MiB of heap; one that does sees no change.
|
|
72
|
+
- **SQLite keeps a 2 MiB page cache per connection and maps nothing into memory,** where it kept
|
|
73
|
+
64 MiB and mapped up to 256 MiB: 15 to 40 MiB less at its peak over 1,000 calls.
|
|
74
|
+
`cacheKiB: 65_536, mmapMiB: 256` gives the old sizes back.
|
|
75
|
+
- **Copilotz needs Deno 2.9 or later.** On an older Deno, the SQLite store says so when it opens,
|
|
76
|
+
instead of failing at its first read ("column index out of range").
|
|
77
|
+
- **The read cache's size** is `createRuntime({ cache: { documents, queries } })` (10,000 and
|
|
78
|
+
1,000 by default); 1,000 and 100 kept 3.5 MiB less heap over 1,000 calls.
|
|
79
|
+
- **V8's young generation, capped** (`--max-semi-space-size=2` on Node,
|
|
80
|
+
`--v8-flags=--max-semi-space-size=2` on Deno), took 55 to 110 MiB off the peak over 1,000 calls.
|
|
81
|
+
- The suite holds the docs app's shape to a memory budget on Deno and Node
|
|
82
|
+
(`bench/memory/budget.test.ts`).
|
|
83
|
+
- **A public MCP server keeps nothing** (`public: true` on `resources.mcp.<name>`, for a docs
|
|
84
|
+
site's): each call runs its tool as the public, with no contact, chat, step, receipt or event. It
|
|
85
|
+
lists only the tools that only read (`annotations.readOnly`), with no `chat` handle, and reads
|
|
86
|
+
what the spaces that have the public as a viewer hold. Calls are limited at once, a minute by
|
|
87
|
+
address (as the `caller` front says it, else the socket) and on the whole server (`ipPerMinute`,
|
|
88
|
+
`linePerMinute`), in memory of a fixed size, and stopped past `timeout`. The docs app's shape,
|
|
89
|
+
1,000 calls without a handle: from 5 documents and 17 events a call to none, from 31.7 KB of heap
|
|
90
|
+
kept a call to 1.5, and a peak of 261 MiB to 119, on Node 24 (on Deno 2.9: 25.7 KB to 1.0, 195 MiB
|
|
91
|
+
to 113). A tool offered there that goes past the public's reach is a declassifier (see the `mcp`
|
|
92
|
+
reference).
|
|
93
|
+
- **New entry points, one per plugin:** `copilotz/plugins/agents/<name>` (`chat`, `history`,
|
|
94
|
+
`memory`, `skills`, `routines`, `openapi`, `webtools`), `copilotz/plugins/access/<name>`
|
|
95
|
+
(`spaces`, `identity`, `contacts`, `google`, `email`, `dev`, `accounts`) and
|
|
96
|
+
`copilotz/plugins/interfaces/<name>` (`mcp`, `api`, `whatsapp`, `voice`), on npm and JSR. Each
|
|
97
|
+
loads its plugin alone; the themes' entry points stay as they were.
|
|
98
|
+
|
|
99
|
+
**The Copilotz agent plugin.** Coding agents can install a `copilotz` skill (`skills/copilotz/`:
|
|
100
|
+
setup, the offline test loop with the scripted model, the rules, the audience rule included) with
|
|
101
|
+
`npx skills add copilotzhq/copilotz`, or as a plugin: Claude Code (`.claude-plugin/`), Agent Plugins
|
|
102
|
+
(`plugin.json`, read by Codex, Cursor and Copilot CLI) and Gemini CLI (`gemini-extension.json`). The
|
|
103
|
+
docs over MCP come in a later change, once they're live: no manifest wires a server before then.
|
|
104
|
+
`testing/skill.test.ts` checks the skill's imports, docs slugs, links and commands, and that the
|
|
105
|
+
manifests agree; the release script now sets their versions too.
|
|
106
|
+
|
|
1
107
|
## 1.0.0-rc.45 — 2026-11-12
|
|
2
108
|
|
|
3
109
|
- **AGENTS.md, a guide for coding agents.** Claude Code, Codex, Cursor or Gemini building an app
|
package/README.md
CHANGED
|
@@ -150,11 +150,15 @@ ana sees: Tue 10:00, Wed 15:00
|
|
|
150
150
|
## Install and run
|
|
151
151
|
|
|
152
152
|
```sh
|
|
153
|
-
npm install copilotz
|
|
154
|
-
bun add copilotz
|
|
155
|
-
deno add jsr:@copilotz/copilotz
|
|
153
|
+
npm install copilotz@next # Node 24+ (npm, pnpm, yarn)
|
|
154
|
+
bun add copilotz@next # Bun
|
|
155
|
+
deno add jsr:@copilotz/copilotz@^1.0.0-rc.48 # Deno 2.9+ (or `deno add npm:copilotz@next`)
|
|
156
156
|
```
|
|
157
157
|
|
|
158
|
+
Until 1.0, the release candidates are on npm's `next` tag, and a plain `npm install copilotz` or
|
|
159
|
+
`deno add jsr:@copilotz/copilotz` gets an older version. At 1.0, stable installs drop `@next` and
|
|
160
|
+
the version.
|
|
161
|
+
|
|
158
162
|
Save the example as `salon.ts`, and run it with an OpenAI key:
|
|
159
163
|
|
|
160
164
|
```sh
|
|
@@ -162,9 +166,9 @@ OPENAI_API_KEY=sk-… node salon.ts # or bun salon.ts, or deno run -A salon.t
|
|
|
162
166
|
```
|
|
163
167
|
|
|
164
168
|
On Deno, map the name `copilotz` in `deno.json`
|
|
165
|
-
(`"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.
|
|
166
|
-
Copilotz runs on Node
|
|
167
|
-
browser.
|
|
169
|
+
(`"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.48"`) so the imports read the same everywhere.
|
|
170
|
+
Copilotz runs on Node 24+, Deno 2.9+ and Bun, and it's built on web standards for Cloudflare Workers
|
|
171
|
+
and the browser.
|
|
168
172
|
|
|
169
173
|
## How it works
|
|
170
174
|
|
|
@@ -236,8 +240,9 @@ The runtime keeps these promises at every door, so your plugins don't have to.
|
|
|
236
240
|
## In the box
|
|
237
241
|
|
|
238
242
|
Copilotz's own plugins are built the way yours are. Add the ones you need, and change them through
|
|
239
|
-
their resources instead of forking them. They come by theme from `copilotz/plugins/<theme>`,
|
|
240
|
-
their front ends from `/web` and `/terminal`
|
|
243
|
+
their resources instead of forking them. They come by theme from `copilotz/plugins/<theme>`, or one
|
|
244
|
+
at a time (`copilotz/plugins/interfaces/mcp`), and their front ends from `/web` and `/terminal`
|
|
245
|
+
beside the theme.
|
|
241
246
|
|
|
242
247
|
**The doors**
|
|
243
248
|
|
|
@@ -301,10 +306,32 @@ their front ends from `/web` and `/terminal` beside it.
|
|
|
301
306
|
- **[AGENTS.md](AGENTS.md)** is the short guide for coding agents (Claude Code, Codex, Cursor,
|
|
302
307
|
Gemini) building an app with Copilotz. It ships in the package.
|
|
303
308
|
|
|
309
|
+
## For coding agents
|
|
310
|
+
|
|
311
|
+
Claude Code, Codex, Cursor, Gemini CLI and GitHub Copilot building an app with Copilotz read
|
|
312
|
+
[AGENTS.md](AGENTS.md), which ships in the package. The same guidance comes as an Agent Skill,
|
|
313
|
+
[`copilotz`](skills/copilotz/SKILL.md): short up front, with a walkthrough, the rules and testing in
|
|
314
|
+
files the agent reads when it needs them.
|
|
315
|
+
|
|
316
|
+
```sh
|
|
317
|
+
npx skills add copilotzhq/copilotz # the skill, for any agent
|
|
318
|
+
/plugin install copilotz --marketplace copilotzhq/copilotz # Claude Code, as a plugin
|
|
319
|
+
codex plugin marketplace add copilotzhq/copilotz # Codex, then:
|
|
320
|
+
codex plugin add copilotz@copilotz
|
|
321
|
+
copilot plugin install copilotzhq/copilotz # GitHub Copilot CLI
|
|
322
|
+
gemini extensions install https://github.com/copilotzhq/copilotz # Gemini CLI
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
The docs over MCP (`search_docs`, `read_doc`, `agents_guide`) are coming; the plugins will add them
|
|
326
|
+
once they're live, and the skill works without them. Cursor reads the same plugin once it's in the
|
|
327
|
+
Cursor Marketplace; until then, use `npx skills add`.
|
|
328
|
+
|
|
304
329
|
## Status
|
|
305
330
|
|
|
306
|
-
Copilotz 1.0 is
|
|
307
|
-
|
|
331
|
+
Copilotz 1.0 is in release candidates:
|
|
332
|
+
[the newest](https://github.com/copilotzhq/copilotz/releases/latest) is on npm's `next` tag
|
|
333
|
+
(`npm install copilotz@next`) and on JSR. It's a new runtime, and it doesn't read 0.x data. Copilotz
|
|
334
|
+
0.x lives on the [`v0`](https://github.com/copilotzhq/copilotz/tree/v0) branch, and
|
|
308
335
|
[CHANGELOG.md](CHANGELOG.md) says what each release changed, and how to upgrade.
|
|
309
336
|
|
|
310
337
|
To work on Copilotz itself, see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* hints, and `search`), observed only while it's open; and the page's own
|
|
7
7
|
* groups. Items go somewhere, do something (an Action), or open a step of
|
|
8
8
|
* their own, a list over this one ("Move to…", then a space), opened from
|
|
9
|
-
* anywhere with `openPalette(step)
|
|
9
|
+
* anywhere with `openPalette(step)`; a step's pick may open one more (the
|
|
10
|
+
* space picked, then whether to move there), and its note may be a View.
|
|
10
11
|
*
|
|
11
12
|
* Keyboard first, as a combobox: typing filters, ↑ ↓ (or Ctrl+N, Ctrl+P)
|
|
12
13
|
* move, Enter chooses, Escape goes back a step or closes it, and Backspace
|
|
@@ -7,7 +7,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
7
7
|
* hints, and `search`), observed only while it's open; and the page's own
|
|
8
8
|
* groups. Items go somewhere, do something (an Action), or open a step of
|
|
9
9
|
* their own, a list over this one ("Move to…", then a space), opened from
|
|
10
|
-
* anywhere with `openPalette(step)
|
|
10
|
+
* anywhere with `openPalette(step)`; a step's pick may open one more (the
|
|
11
|
+
* space picked, then whether to move there), and its note may be a View.
|
|
11
12
|
*
|
|
12
13
|
* Keyboard first, as a combobox: typing filters, ↑ ↓ (or Ctrl+N, Ctrl+P)
|
|
13
14
|
* move, Enter chooses, Escape goes back a step or closes it, and Backspace
|
|
@@ -38,7 +39,7 @@ import { groupsOf, listOf } from "./list.js";
|
|
|
38
39
|
import { Row } from "./row.js";
|
|
39
40
|
import { useOutputs } from "./sources.js";
|
|
40
41
|
import { say } from "./words.js";
|
|
41
|
-
import { closePalette, paletteState, } from "./state.js";
|
|
42
|
+
import { closePalette, paletteState, pickIn, } from "./state.js";
|
|
42
43
|
const SHEET = sheet("palette", `
|
|
43
44
|
.copilotz-palette { width: min(640px, calc(100vw - 32px)); max-width: none;
|
|
44
45
|
max-height: min(560px, calc(100dvh - 20vh)); margin: 12vh auto auto; padding: 0;
|
|
@@ -190,27 +191,27 @@ export function Palette({ sources, hints, own = [], placeholder }) {
|
|
|
190
191
|
setActive(undefined);
|
|
191
192
|
setError(undefined);
|
|
192
193
|
};
|
|
193
|
-
const control = (moved) =>
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}
|
|
194
|
+
const control = (moved) => {
|
|
195
|
+
const palette = {
|
|
196
|
+
search,
|
|
197
|
+
push(next) {
|
|
198
|
+
moved.yes = true;
|
|
199
|
+
push(next);
|
|
200
|
+
},
|
|
201
|
+
back() {
|
|
202
|
+
moved.yes = true;
|
|
203
|
+
back();
|
|
204
|
+
},
|
|
205
|
+
close: closePalette,
|
|
206
|
+
pick: (value) => pickIn(entries.map((e) => e.step), value, palette),
|
|
207
|
+
dialog(shown) {
|
|
208
|
+
moved.yes = true;
|
|
209
|
+
setDialog({ ...shown, open: true });
|
|
210
|
+
closePalette();
|
|
211
|
+
},
|
|
212
|
+
};
|
|
213
|
+
return palette;
|
|
214
|
+
};
|
|
214
215
|
const choose = async (item) => {
|
|
215
216
|
if (item.disabled || busy)
|
|
216
217
|
return;
|
|
@@ -279,7 +280,7 @@ export function Palette({ sources, hints, own = [], placeholder }) {
|
|
|
279
280
|
? _jsx(IconButton, { icon: "chevron-left", label: say("back"), size: "sm", onClick: back })
|
|
280
281
|
: _jsx(Icon, { name: "search", size: 18 }), title
|
|
281
282
|
? (_jsx("span", { className: `copilotz-palette-step${asking ? " copilotz-palette-question" : ""}`, title: title, children: title }))
|
|
282
|
-
: null, asking ? _jsx("span", { className: "copilotz-palette-gap" }) : (_jsx("input", { ref: field, className: "copilotz-palette-field", type: "search", role: "combobox", "aria-expanded": "true", "aria-controls": `${id}-list`, "aria-autocomplete": "list", "aria-activedescendant": current ? optionId(current) : undefined, "aria-label": title ?? hint, placeholder: step?.placeholder ?? (step ? say("search") : hint), autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", spellCheck: false, enterKeyHint: "go", value: search, onChange: (event) => typed(event.target.value) })), _jsx("span", { className: "copilotz-palette-esc", "aria-hidden": "true", children: _jsx(Kbd, { children: "esc" }) }), _jsx(Button, { size: "sm", variant: "ghost", className: "copilotz-palette-cancel", onClick: closePalette, children: say("cancel") })] }), step?.note ? _jsx("
|
|
283
|
+
: null, asking ? _jsx("span", { className: "copilotz-palette-gap" }) : (_jsx("input", { ref: field, className: "copilotz-palette-field", type: "search", role: "combobox", "aria-expanded": "true", "aria-controls": `${id}-list`, "aria-autocomplete": "list", "aria-activedescendant": current ? optionId(current) : undefined, "aria-label": title ?? hint, placeholder: step?.placeholder ?? (step ? say("search") : hint), autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", spellCheck: false, enterKeyHint: "go", value: search, onChange: (event) => typed(event.target.value) })), _jsx("span", { className: "copilotz-palette-esc", "aria-hidden": "true", children: _jsx(Kbd, { children: "esc" }) }), _jsx(Button, { size: "sm", variant: "ghost", className: "copilotz-palette-cancel", onClick: closePalette, children: say("cancel") })] }), step?.note ? _jsx("div", { className: "copilotz-palette-note", children: step.note }) : null, error
|
|
283
284
|
? (_jsx(Notice, { tone: "destructive", role: "alert", className: "copilotz-palette-error", children: error }))
|
|
284
285
|
: null, _jsxs("div", { ref: list, id: `${id}-list`, role: "listbox", "aria-label": title ?? say("commands"), className: "copilotz-palette-list",
|
|
285
286
|
// A question's choices take the keys themselves.
|
|
@@ -18,8 +18,9 @@ export type PaletteControl = {
|
|
|
18
18
|
back(): void;
|
|
19
19
|
close(): void;
|
|
20
20
|
/**
|
|
21
|
-
* Hands `value` to the nearest step that asked for one (its `pick
|
|
22
|
-
* space picked, for a move there. What it returns, the
|
|
21
|
+
* Hands `value` to the nearest step that asked for one (its `pick`, with
|
|
22
|
+
* this palette): a space picked, for a move there. What it returns, the
|
|
23
|
+
* item's `run` does.
|
|
23
24
|
*/
|
|
24
25
|
pick(value: unknown): Promise<unknown>;
|
|
25
26
|
/** Closes the palette and shows a View in a dialog instead: a form (inviting someone). */
|
|
@@ -69,8 +70,11 @@ export type PaletteStep = {
|
|
|
69
70
|
placeholder?: string;
|
|
70
71
|
/** What the field starts with: a name to change. */
|
|
71
72
|
value?: string;
|
|
72
|
-
/**
|
|
73
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Under the field: what choosing here does. Words, or what says them
|
|
75
|
+
* (a `LazyView`: who'll see a move, read once it's asked).
|
|
76
|
+
*/
|
|
77
|
+
note?: ReactNode;
|
|
74
78
|
/** The View that lists its items (it returns groups), with its item and hints (and `search`) … */
|
|
75
79
|
view?: string;
|
|
76
80
|
item?: unknown;
|
|
@@ -81,8 +85,11 @@ export type PaletteStep = {
|
|
|
81
85
|
filter?: boolean;
|
|
82
86
|
/** A question to answer (archive it?): no field, only its choices, the first chosen by Enter. */
|
|
83
87
|
confirm?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
|
|
88
|
+
/**
|
|
89
|
+
* What a picked value does: a space picked, the move there; or, with the
|
|
90
|
+
* palette, a question first (`palette.push`: who'll see it there?).
|
|
91
|
+
*/
|
|
92
|
+
pick?(value: unknown, palette: PaletteControl): unknown;
|
|
86
93
|
};
|
|
87
94
|
/** A View shown in a dialog, from the palette. */
|
|
88
95
|
export type PaletteDialog = {
|
|
@@ -105,4 +112,9 @@ export declare const paletteState: {
|
|
|
105
112
|
/** Opens the palette: at its first step, or at `step` (from an item's menu: "Move to…"). */
|
|
106
113
|
export declare function openPalette(step?: PaletteStep): void;
|
|
107
114
|
export declare function closePalette(): void;
|
|
115
|
+
/**
|
|
116
|
+
* Hands `value` to the nearest of `steps` that asks for one (the latest
|
|
117
|
+
* with a `pick`), with the palette, so it may open a step of its own.
|
|
118
|
+
*/
|
|
119
|
+
export declare function pickIn(steps: (PaletteStep | undefined)[], value: unknown, palette: PaletteControl): Promise<unknown>;
|
|
108
120
|
export {};
|
|
@@ -21,3 +21,11 @@ export function closePalette() {
|
|
|
21
21
|
if (state.open)
|
|
22
22
|
set({ open: false, steps: [] });
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Hands `value` to the nearest of `steps` that asks for one (the latest
|
|
26
|
+
* with a `pick`), with the palette, so it may open a step of its own.
|
|
27
|
+
*/
|
|
28
|
+
export async function pickIn(steps, value, palette) {
|
|
29
|
+
const asker = [...steps].reverse().find((step) => step?.pick);
|
|
30
|
+
return await asker?.pick?.(value, palette);
|
|
31
|
+
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "copilotz",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.0-rc.48",
|
|
4
|
+
"description": "The open-source runtime that makes your app usable by people, your own agents and their assistants.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
7
7
|
"ai",
|
|
8
|
+
"ai-agents",
|
|
9
|
+
"agent-framework",
|
|
8
10
|
"llm",
|
|
11
|
+
"mcp",
|
|
12
|
+
"model-context-protocol",
|
|
9
13
|
"runtime",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
14
|
+
"typescript",
|
|
15
|
+
"nodejs",
|
|
12
16
|
"deno",
|
|
13
|
-
"bun"
|
|
17
|
+
"bun",
|
|
18
|
+
"event-sourcing",
|
|
19
|
+
"react"
|
|
14
20
|
],
|
|
15
|
-
"homepage": "https://
|
|
21
|
+
"homepage": "https://copilotz.com",
|
|
16
22
|
"bugs": "https://github.com/copilotzhq/copilotz/issues",
|
|
17
23
|
"repository": {
|
|
18
24
|
"type": "git",
|
|
@@ -82,6 +88,34 @@
|
|
|
82
88
|
"types": "./plugins/agents/terminal.d.ts",
|
|
83
89
|
"default": "./plugins/agents/terminal.js"
|
|
84
90
|
},
|
|
91
|
+
"./plugins/agents/chat": {
|
|
92
|
+
"types": "./plugins/agents/chat/mod.d.ts",
|
|
93
|
+
"default": "./plugins/agents/chat/mod.js"
|
|
94
|
+
},
|
|
95
|
+
"./plugins/agents/history": {
|
|
96
|
+
"types": "./plugins/agents/history/mod.d.ts",
|
|
97
|
+
"default": "./plugins/agents/history/mod.js"
|
|
98
|
+
},
|
|
99
|
+
"./plugins/agents/memory": {
|
|
100
|
+
"types": "./plugins/agents/memory/mod.d.ts",
|
|
101
|
+
"default": "./plugins/agents/memory/mod.js"
|
|
102
|
+
},
|
|
103
|
+
"./plugins/agents/skills": {
|
|
104
|
+
"types": "./plugins/agents/skills/mod.d.ts",
|
|
105
|
+
"default": "./plugins/agents/skills/mod.js"
|
|
106
|
+
},
|
|
107
|
+
"./plugins/agents/routines": {
|
|
108
|
+
"types": "./plugins/agents/routines/mod.d.ts",
|
|
109
|
+
"default": "./plugins/agents/routines/mod.js"
|
|
110
|
+
},
|
|
111
|
+
"./plugins/agents/openapi": {
|
|
112
|
+
"types": "./plugins/agents/openapi/mod.d.ts",
|
|
113
|
+
"default": "./plugins/agents/openapi/mod.js"
|
|
114
|
+
},
|
|
115
|
+
"./plugins/agents/webtools": {
|
|
116
|
+
"types": "./plugins/agents/webtools/mod.d.ts",
|
|
117
|
+
"default": "./plugins/agents/webtools/mod.js"
|
|
118
|
+
},
|
|
85
119
|
"./plugins/access": {
|
|
86
120
|
"types": "./plugins/access/mod.d.ts",
|
|
87
121
|
"default": "./plugins/access/mod.js"
|
|
@@ -98,6 +132,34 @@
|
|
|
98
132
|
"types": "./plugins/access/terminal.d.ts",
|
|
99
133
|
"default": "./plugins/access/terminal.js"
|
|
100
134
|
},
|
|
135
|
+
"./plugins/access/spaces": {
|
|
136
|
+
"types": "./plugins/access/spaces/mod.d.ts",
|
|
137
|
+
"default": "./plugins/access/spaces/mod.js"
|
|
138
|
+
},
|
|
139
|
+
"./plugins/access/identity": {
|
|
140
|
+
"types": "./plugins/access/identity/mod.d.ts",
|
|
141
|
+
"default": "./plugins/access/identity/mod.js"
|
|
142
|
+
},
|
|
143
|
+
"./plugins/access/contacts": {
|
|
144
|
+
"types": "./plugins/access/contacts/mod.d.ts",
|
|
145
|
+
"default": "./plugins/access/contacts/mod.js"
|
|
146
|
+
},
|
|
147
|
+
"./plugins/access/google": {
|
|
148
|
+
"types": "./plugins/access/google/mod.d.ts",
|
|
149
|
+
"default": "./plugins/access/google/mod.js"
|
|
150
|
+
},
|
|
151
|
+
"./plugins/access/email": {
|
|
152
|
+
"types": "./plugins/access/email/mod.d.ts",
|
|
153
|
+
"default": "./plugins/access/email/mod.js"
|
|
154
|
+
},
|
|
155
|
+
"./plugins/access/dev": {
|
|
156
|
+
"types": "./plugins/access/dev/mod.d.ts",
|
|
157
|
+
"default": "./plugins/access/dev/mod.js"
|
|
158
|
+
},
|
|
159
|
+
"./plugins/access/accounts": {
|
|
160
|
+
"types": "./plugins/access/accounts/mod.d.ts",
|
|
161
|
+
"default": "./plugins/access/accounts/mod.js"
|
|
162
|
+
},
|
|
101
163
|
"./plugins/billing": {
|
|
102
164
|
"types": "./plugins/billing/mod.d.ts",
|
|
103
165
|
"default": "./plugins/billing/mod.js"
|
|
@@ -146,6 +208,22 @@
|
|
|
146
208
|
"types": "./plugins/interfaces/terminal/terminal.d.ts",
|
|
147
209
|
"default": "./plugins/interfaces/terminal/terminal.js"
|
|
148
210
|
},
|
|
211
|
+
"./plugins/interfaces/mcp": {
|
|
212
|
+
"types": "./plugins/interfaces/mcp/mod.d.ts",
|
|
213
|
+
"default": "./plugins/interfaces/mcp/mod.js"
|
|
214
|
+
},
|
|
215
|
+
"./plugins/interfaces/api": {
|
|
216
|
+
"types": "./plugins/interfaces/api/mod.d.ts",
|
|
217
|
+
"default": "./plugins/interfaces/api/mod.js"
|
|
218
|
+
},
|
|
219
|
+
"./plugins/interfaces/whatsapp": {
|
|
220
|
+
"types": "./plugins/interfaces/whatsapp/mod.d.ts",
|
|
221
|
+
"default": "./plugins/interfaces/whatsapp/mod.js"
|
|
222
|
+
},
|
|
223
|
+
"./plugins/interfaces/voice": {
|
|
224
|
+
"types": "./plugins/interfaces/voice/mod.d.ts",
|
|
225
|
+
"default": "./plugins/interfaces/voice/mod.js"
|
|
226
|
+
},
|
|
149
227
|
"./web": {
|
|
150
228
|
"types": "./hosts/web/mod.d.ts",
|
|
151
229
|
"default": "./hosts/web/mod.js"
|
|
@@ -213,7 +291,7 @@
|
|
|
213
291
|
"ink": "8.0.0",
|
|
214
292
|
"json-schema-to-ts": "3.1.1",
|
|
215
293
|
"ominipg": "0.11.2",
|
|
216
|
-
"oxianjs": "0.23.
|
|
294
|
+
"oxianjs": "0.23.6",
|
|
217
295
|
"pg": "8.23.1",
|
|
218
296
|
"temml": "0.14.0"
|
|
219
297
|
},
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
* else; the space's members reach it as any chat there. An agent working
|
|
14
14
|
* for a contact reaches what both reach: that chat.
|
|
15
15
|
* - **Agents are told** who they're talking with (the `contact` context),
|
|
16
|
-
* and see them by name ("People here: Ana": a `names` source, `contact:`)
|
|
16
|
+
* and see them by name ("People here: Ana": a `names` source, `contact:`);
|
|
17
|
+
* working in a chat's staff notes (chat's `chat.notes`), whose chat it is
|
|
18
|
+
* and what was said there lately (the `notes` context).
|
|
17
19
|
* - **Erasing one** (`contact.forget`, by its space's managers) ends its
|
|
18
20
|
* access at once and deletes its record, and with `chats` its chats.
|
|
19
21
|
* - **Lines** bring contacts in: WhatsApp's, the phone's, MCP's and the web's (`webLines`, in
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
* else; the space's members reach it as any chat there. An agent working
|
|
14
14
|
* for a contact reaches what both reach: that chat.
|
|
15
15
|
* - **Agents are told** who they're talking with (the `contact` context),
|
|
16
|
-
* and see them by name ("People here: Ana": a `names` source, `contact:`)
|
|
16
|
+
* and see them by name ("People here: Ana": a `names` source, `contact:`);
|
|
17
|
+
* working in a chat's staff notes (chat's `chat.notes`), whose chat it is
|
|
18
|
+
* and what was said there lately (the `notes` context).
|
|
17
19
|
* - **Erasing one** (`contact.forget`, by its space's managers) ends its
|
|
18
20
|
* access at once and deletes its record, and with `chats` its chats.
|
|
19
21
|
* - **Lines** bring contacts in: WhatsApp's, the phone's, MCP's and the web's (`webLines`, in
|
|
@@ -31,6 +33,7 @@ import { forgetAction } from "./actions/forget.js";
|
|
|
31
33
|
import { startAction } from "./actions/start.js";
|
|
32
34
|
import { CONTACT, contact } from "./collections/contact.js";
|
|
33
35
|
import { contactView } from "./views/contact.js";
|
|
36
|
+
import { notesContextView } from "./views/notes.js";
|
|
34
37
|
export * from "./contract.js";
|
|
35
38
|
export const contacts = definePlugin({
|
|
36
39
|
name: "contacts",
|
|
@@ -41,13 +44,14 @@ export const contacts = definePlugin({
|
|
|
41
44
|
"contact.chat": chatAction,
|
|
42
45
|
"contact.forget": forgetAction,
|
|
43
46
|
},
|
|
44
|
-
views: { "context:contact": contactView },
|
|
47
|
+
views: { "context:contact": contactView, "context:notes": notesContextView },
|
|
45
48
|
resources: {
|
|
46
49
|
// A contact's record lives in its line's space; only trusted code changes it. A contact is a
|
|
47
50
|
// member (of its chats, and of its own record): reading it labels nothing, as for an agent.
|
|
48
51
|
shared: { contact: { write: "manage", member: "contact" } },
|
|
49
52
|
names: { contact: { collection: "contact", prefix: CONTACT } },
|
|
50
|
-
|
|
53
|
+
// Who an agent talks with; and, working in a contact's chat's notes, that chat's latest.
|
|
54
|
+
context: { contact: { place: "system" }, notes: { place: "turn" } },
|
|
51
55
|
},
|
|
52
56
|
// Who a contact is (its number, its channel) is trusted code's to say: never written from outside.
|
|
53
57
|
guard: (_actor, { collection, access, direct }) => {
|