copilotz 1.0.0-rc.49 → 1.0.0-rc.50
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 +6 -5
- package/CHANGELOG.md +130 -0
- package/README.md +4 -3
- package/hosts/web/host.js +16 -11
- package/hosts/web/mod.d.ts +1 -0
- package/hosts/web/mod.js +1 -0
- package/hosts/web/palette/palette.js +2 -2
- package/hosts/web/part.d.ts +7 -1
- package/hosts/web/part.js +17 -1
- package/hosts/web/pt-br/about.d.ts +3 -0
- package/hosts/web/pt-br/about.js +21 -0
- package/hosts/web/pt-br/chat.d.ts +3 -0
- package/hosts/web/pt-br/chat.js +266 -0
- package/hosts/web/pt-br/host.d.ts +3 -0
- package/hosts/web/pt-br/host.js +18 -0
- package/hosts/web/pt-br/memory.d.ts +3 -0
- package/hosts/web/pt-br/memory.js +41 -0
- package/hosts/web/pt-br/mod.d.ts +23 -0
- package/hosts/web/pt-br/mod.js +39 -0
- package/hosts/web/pt-br/palette.d.ts +6 -0
- package/hosts/web/pt-br/palette.js +17 -0
- package/hosts/web/pt-br/shell.d.ts +3 -0
- package/hosts/web/pt-br/shell.js +47 -0
- package/hosts/web/pt-br/sign-in.d.ts +3 -0
- package/hosts/web/pt-br/sign-in.js +92 -0
- package/hosts/web/pt-br/spaces.d.ts +3 -0
- package/hosts/web/pt-br/spaces.js +271 -0
- package/hosts/web/pt-br/toolkit.d.ts +3 -0
- package/hosts/web/pt-br/toolkit.js +54 -0
- package/hosts/web/pt-br/usage.d.ts +3 -0
- package/hosts/web/pt-br/usage.js +156 -0
- package/hosts/web/screens.d.ts +17 -0
- package/hosts/web/screens.js +26 -0
- package/hosts/web/signin-email.d.ts +18 -3
- package/hosts/web/signin-email.js +34 -7
- package/hosts/web/signin-password.d.ts +19 -0
- package/hosts/web/signin-password.js +68 -0
- package/hosts/web/signin-words.d.ts +8 -0
- package/hosts/web/signin-words.js +10 -0
- package/hosts/web/signin.d.ts +5 -1
- package/hosts/web/signin.js +33 -12
- package/hosts/web/toolkit/anchor.d.ts +3 -1
- package/hosts/web/toolkit/anchor.js +16 -3
- package/hosts/web/toolkit/drawer.d.ts +3 -1
- package/hosts/web/toolkit/drawer.js +5 -2
- package/hosts/web/toolkit/icon-button.d.ts +6 -3
- package/hosts/web/toolkit/icon-button.js +5 -2
- package/hosts/web/toolkit/icon.d.ts +1 -0
- package/hosts/web/toolkit/icon.js +2 -0
- package/hosts/web/toolkit/rail-item.d.ts +39 -0
- package/hosts/web/toolkit/rail-item.js +47 -0
- package/hosts/web/toolkit/tooltip.d.ts +2 -2
- package/hosts/web/toolkit/tooltip.js +3 -1
- package/hosts/web/toolkit/words.d.ts +1 -1
- package/package.json +5 -1
- package/plugins/access/email/actions/code.d.ts +2 -0
- package/plugins/access/email/actions/code.js +106 -0
- package/plugins/access/email/actions/import.js +3 -3
- package/plugins/access/email/actions/invite.js +17 -13
- package/plugins/access/email/actions/password-accounts.d.ts +3 -0
- package/plugins/access/email/actions/password-accounts.js +118 -0
- package/plugins/access/email/actions/password-sign-in.d.ts +2 -0
- package/plugins/access/email/actions/password-sign-in.js +84 -0
- package/plugins/access/email/actions/prune.d.ts +2 -0
- package/plugins/access/email/actions/prune.js +12 -0
- package/plugins/access/email/actions/reset.js +6 -6
- package/plugins/access/email/actions/send.js +60 -6
- package/plugins/access/email/actions/sign-in.js +9 -7
- package/plugins/access/email/actions/sign-up.js +7 -7
- package/plugins/access/email/adapters/console.js +11 -3
- package/plugins/access/email/adapters/resend.d.ts +4 -3
- package/plugins/access/email/adapters/resend.js +12 -1
- package/plugins/access/email/adapters/smtp.d.ts +10 -0
- package/plugins/access/email/adapters/smtp.js +16 -0
- package/plugins/access/email/collections/code.d.ts +4 -4
- package/plugins/access/email/collections/code.js +2 -2
- package/plugins/access/email/collections/password-login.d.ts +70 -0
- package/plugins/access/email/collections/password-login.js +26 -0
- package/plugins/access/email/contract.d.ts +129 -16
- package/plugins/access/email/contract.js +3 -2
- package/plugins/access/email/mod.d.ts +21 -9
- package/plugins/access/email/mod.js +47 -11
- package/plugins/access/email/password.d.ts +38 -0
- package/plugins/access/email/password.js +63 -0
- package/plugins/access/email/resources/messages.d.ts +2 -2
- package/plugins/access/email/resources/messages.js +9 -0
- package/plugins/access/email/routes/password.d.ts +13 -0
- package/plugins/access/email/routes/password.js +8 -0
- package/plugins/access/email/routes/sign-in.d.ts +18 -10
- package/plugins/access/email/routes/sign-in.js +21 -97
- package/plugins/access/email/shared/addresses.d.ts +13 -0
- package/plugins/access/email/shared/addresses.js +16 -0
- package/plugins/access/email/shared/bcrypt.d.ts +7 -0
- package/plugins/access/email/shared/bcrypt.js +138 -0
- package/plugins/access/email/shared/identifiers.d.ts +8 -0
- package/plugins/access/email/shared/identifiers.js +22 -0
- package/plugins/access/email/shared/inputs.d.ts +5 -0
- package/plugins/access/email/shared/inputs.js +2 -0
- package/plugins/access/email/shared/limits.d.ts +36 -13
- package/plugins/access/email/shared/limits.js +37 -22
- package/plugins/access/email/shared/mail.d.ts +14 -5
- package/plugins/access/email/shared/mail.js +22 -5
- package/plugins/access/email/shared/mime.d.ts +24 -0
- package/plugins/access/email/shared/mime.js +153 -0
- package/plugins/access/email/shared/password.d.ts +1 -19
- package/plugins/access/email/shared/password.js +9 -3
- package/plugins/access/email/shared/people.d.ts +5 -4
- package/plugins/access/email/shared/people.js +5 -4
- package/plugins/access/email/shared/pi.d.ts +7 -0
- package/plugins/access/email/shared/pi.js +101 -0
- package/plugins/access/email/shared/settings.d.ts +5 -1
- package/plugins/access/email/shared/settings.js +2 -0
- package/plugins/access/email/shared/smtp.d.ts +22 -0
- package/plugins/access/email/shared/smtp.js +160 -0
- package/plugins/access/email/shared/step.d.ts +27 -0
- package/plugins/access/email/shared/step.js +87 -0
- package/plugins/access/mod.d.ts +8 -4
- package/plugins/access/spaces/actions/member.d.ts +6 -0
- package/plugins/access/spaces/actions/member.js +79 -10
- package/plugins/access/spaces/collections/member.d.ts +13 -2
- package/plugins/access/spaces/collections/member.js +6 -2
- package/plugins/access/spaces/collections/space.js +2 -1
- package/plugins/access/spaces/mod.d.ts +6 -1
- package/plugins/access/spaces/mod.js +8 -2
- package/plugins/access/spaces/shared/audience.js +2 -1
- package/plugins/access/spaces/shared/managers.d.ts +2 -1
- package/plugins/access/spaces/shared/managers.js +1 -1
- package/plugins/access/spaces/shared/reach.d.ts +15 -1
- package/plugins/access/spaces/shared/reach.js +47 -13
- package/plugins/access/spaces/shared/seat.d.ts +6 -1
- package/plugins/access/spaces/shared/seat.js +9 -3
- package/plugins/access/spaces/views/web/invitations.d.ts +3 -1
- package/plugins/access/spaces/views/web/invitations.js +7 -1
- package/plugins/access/spaces/views/web/spaces.d.ts +3 -1
- package/plugins/access/spaces/views/web/spaces.js +9 -1
- package/plugins/access/spaces/views/web/style.d.ts +1 -1
- package/plugins/access/spaces/views/web/style.js +6 -0
- package/plugins/access/spaces/views/web/tree.d.ts +17 -0
- package/plugins/access/spaces/views/web/tree.js +38 -7
- package/plugins/access/spaces/views/web/words.d.ts +1 -1
- package/plugins/access/spaces/views/web/words.js +4 -0
- package/plugins/access/spaces/web.d.ts +3 -0
- package/plugins/access/spaces/web.js +9 -3
- package/plugins/agents/chat/collections/approval.d.ts +1 -1
- package/plugins/agents/chat/collections/file.js +2 -0
- package/plugins/agents/chat/collections/message.js +18 -5
- package/plugins/agents/chat/collections/thread.js +2 -0
- package/plugins/agents/chat/contract.d.ts +11 -3
- package/plugins/agents/chat/contract.js +6 -0
- package/plugins/agents/chat/shared/types.d.ts +46 -11
- package/plugins/agents/chat/views/web/asking.d.ts +5 -1
- package/plugins/agents/chat/views/web/asking.js +20 -5
- package/plugins/agents/chat/views/web/before-send.d.ts +9 -0
- package/plugins/agents/chat/views/web/before-send.js +7 -0
- package/plugins/agents/chat/views/web/composer.d.ts +17 -1
- package/plugins/agents/chat/views/web/composer.js +14 -4
- package/plugins/agents/chat/views/web/conversation.d.ts +3 -1
- package/plugins/agents/chat/views/web/conversation.js +20 -7
- package/plugins/agents/chat/views/web/handed.d.ts +14 -3
- package/plugins/agents/chat/views/web/handed.js +24 -15
- package/plugins/agents/chat/views/web/new-thread.d.ts +5 -1
- package/plugins/agents/chat/views/web/new-thread.js +5 -3
- package/plugins/agents/chat/views/web/over.d.ts +4 -2
- package/plugins/agents/chat/views/web/words.d.ts +1 -1
- package/plugins/agents/chat/views/web/words.js +5 -0
- package/plugins/agents/chat/web.d.ts +9 -1
- package/plugins/agents/chat/web.js +18 -5
- package/plugins/agents/history/collections/summary.js +2 -0
- package/plugins/agents/routines/collections/routine.d.ts +1 -1
- package/plugins/compute/computers/collections/computer.d.ts +1 -1
- package/plugins/compute/computers/collections/desk.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/program/workloads/search.d.ts +1 -1
- package/plugins/compute/computers/resources/downloads.js +1 -1
- package/plugins/interfaces/voice/collections/call.d.ts +1 -1
- package/plugins/interfaces/web/contract.d.ts +12 -9
- package/plugins/interfaces/web/mod.d.ts +18 -5
- package/plugins/interfaces/web/mod.js +17 -5
- package/plugins/interfaces/web/shared/orgs.d.ts +8 -1
- package/plugins/interfaces/web/shared/sidebar.d.ts +22 -0
- package/plugins/interfaces/web/shared/sidebar.js +29 -0
- package/plugins/interfaces/web/shared/style.d.ts +12 -2
- package/plugins/interfaces/web/shared/style.js +38 -6
- package/plugins/interfaces/web/views/frame.d.ts +25 -8
- package/plugins/interfaces/web/views/frame.js +67 -14
- package/plugins/interfaces/web/views/me.d.ts +12 -8
- package/plugins/interfaces/web/views/me.js +15 -10
- package/plugins/interfaces/web/views/rail.d.ts +41 -0
- package/plugins/interfaces/web/views/rail.js +55 -0
- package/plugins/interfaces/web/views/shell.d.ts +11 -4
- package/plugins/interfaces/web/views/shell.js +3 -1
- package/plugins/interfaces/web/views/words.d.ts +1 -1
- package/plugins/interfaces/web/views/words.js +4 -0
- package/plugins/interfaces/whatsapp/actions/set.js +33 -2
- package/plugins/interfaces/whatsapp/actions/template.d.ts +1 -0
- package/plugins/interfaces/whatsapp/actions/template.js +89 -0
- package/plugins/interfaces/whatsapp/collections/number.d.ts +80 -0
- package/plugins/interfaces/whatsapp/collections/number.js +21 -0
- package/plugins/interfaces/whatsapp/collections/phone.d.ts +27 -2
- package/plugins/interfaces/whatsapp/collections/phone.js +15 -2
- package/plugins/interfaces/whatsapp/collections/sent.d.ts +1 -1
- package/plugins/interfaces/whatsapp/collections/sent.js +1 -1
- package/plugins/interfaces/whatsapp/collections/template.d.ts +96 -0
- package/plugins/interfaces/whatsapp/collections/template.js +30 -0
- package/plugins/interfaces/whatsapp/collections/thread.d.ts +3 -3
- package/plugins/interfaces/whatsapp/collections/thread.js +3 -3
- package/plugins/interfaces/whatsapp/contract.d.ts +9 -3
- package/plugins/interfaces/whatsapp/contract.js +8 -1
- package/plugins/interfaces/whatsapp/mod.d.ts +29 -5
- package/plugins/interfaces/whatsapp/mod.js +51 -7
- package/plugins/interfaces/whatsapp/processors/forget.d.ts +3 -2
- package/plugins/interfaces/whatsapp/processors/forget.js +6 -0
- package/plugins/interfaces/whatsapp/processors/receive.d.ts +7 -4
- package/plugins/interfaces/whatsapp/processors/receive.js +21 -5
- package/plugins/interfaces/whatsapp/processors/reply.d.ts +29 -14
- package/plugins/interfaces/whatsapp/processors/reply.js +154 -32
- package/plugins/interfaces/whatsapp/shared/graph.d.ts +20 -3
- package/plugins/interfaces/whatsapp/shared/graph.js +22 -3
- package/plugins/interfaces/whatsapp/shared/number.d.ts +15 -4
- package/plugins/interfaces/whatsapp/shared/number.js +21 -3
- package/plugins/interfaces/whatsapp/shared/rules.d.ts +1 -1
- package/plugins/interfaces/whatsapp/shared/rules.js +3 -1
- package/plugins/interfaces/whatsapp/shared/settings.d.ts +47 -1
- package/plugins/interfaces/whatsapp/shared/settings.js +3 -0
- package/plugins/interfaces/whatsapp/shared/template.d.ts +48 -0
- package/plugins/interfaces/whatsapp/shared/template.js +117 -0
- package/runtime/api.js +37 -7
- package/runtime/client.js +43 -12
- package/runtime/define.d.ts +64 -4
- package/runtime/describe.d.ts +2 -0
- package/runtime/describe.js +1 -0
- package/runtime/errors.d.ts +13 -1
- package/runtime/errors.js +9 -1
- package/runtime/executor.js +337 -62
- package/runtime/mod.d.ts +1 -1
- package/runtime/mongo.d.ts +4 -1
- package/runtime/mongo.js +32 -2
- package/runtime/owner.d.ts +1 -16
- package/runtime/owner.js +18 -20
- package/runtime/pattern.d.ts +44 -0
- package/runtime/pattern.js +476 -0
- package/runtime/registry.d.ts +3 -1
- package/runtime/registry.js +21 -0
- package/runtime/site.d.ts +6 -1
- package/runtime/site.js +10 -2
- package/runtime/wire.d.ts +4 -2
- package/runtime/wire.js +7 -2
- package/stores/sql/postgres/dialect.d.ts +2 -1
- package/stores/sql/postgres/dialect.js +9 -0
- package/stores/sql/postgres/maintenance.d.ts +1 -0
- package/stores/sql/postgres/mod.js +9 -8
- package/stores/sql/postgres/pattern.d.ts +10 -0
- package/stores/sql/postgres/pattern.js +70 -0
- package/stores/sql/shared/filter.d.ts +23 -2
- package/stores/sql/shared/filter.js +49 -12
- package/stores/sql/sqlite/dialect.d.ts +7 -1
- package/stores/sql/sqlite/dialect.js +10 -0
- package/stores/sql/sqlite/mod.d.ts +10 -0
- package/stores/sql/sqlite/mod.js +48 -9
package/AGENTS.md
CHANGED
|
@@ -4,7 +4,7 @@ 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.50`. 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.
|
|
@@ -64,12 +64,12 @@ There's no project generator. Set a project up as the docs' courses do, on Node
|
|
|
64
64
|
```sh
|
|
65
65
|
mkdir my-app && cd my-app
|
|
66
66
|
npm init -y && npm pkg set type=module
|
|
67
|
-
npm install copilotz@1.0.0-rc.
|
|
67
|
+
npm install copilotz@1.0.0-rc.50 react@19 react-dom@19
|
|
68
68
|
npm install -D typescript @types/node @types/react @types/react-dom esbuild
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
Pin the version: npm's `latest` tag still points at an early release candidate. On Deno, run
|
|
72
|
-
`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.50"` in
|
|
73
73
|
`deno.json`, so imports read the same.
|
|
74
74
|
|
|
75
75
|
Node runs `.ts` files as they are, so there's no build step. It doesn't run `.tsx`: tests that load
|
|
@@ -108,7 +108,7 @@ line `@AGENTS.md` (Claude Code reads `CLAUDE.md`, and follows the import). Keep
|
|
|
108
108
|
```markdown
|
|
109
109
|
# AGENTS.md
|
|
110
110
|
|
|
111
|
-
This app runs on Copilotz (copilotz@1.0.0-rc.
|
|
111
|
+
This app runs on Copilotz (copilotz@1.0.0-rc.50). Read node_modules/copilotz/AGENTS.md first;
|
|
112
112
|
https://copilotz.com/llms.txt lists the docs, as Markdown.
|
|
113
113
|
|
|
114
114
|
- `npm test` runs every test offline, with a scripted model: run it after each change.
|
|
@@ -369,7 +369,8 @@ Build Compass (41 chapters, written for an earlier release candidate: check name
|
|
|
369
369
|
The same names on npm (`copilotz/…`) and JSR (`@copilotz/copilotz/…`); the package's `package.json`
|
|
370
370
|
lists them all. Besides those above: `copilotz/stores/sqlite` and `copilotz/stores/postgres`
|
|
371
371
|
(stores), `copilotz/plugins/interfaces` (`mcp`, `api`, `whatsapp`, `voice`, `webLines`),
|
|
372
|
-
`copilotz/web` (the web host, `web`), `copilotz/web/
|
|
372
|
+
`copilotz/web` (the web host, `web`), `copilotz/web/pt-br` (`ptBR`: every web word in Brazilian
|
|
373
|
+
Portuguese, first among the page's plugins), `copilotz/web/server` (`webPage`), `copilotz/web/node`
|
|
373
374
|
(`listen`, `serve`, `bundle`), `copilotz/terminal` (`terminal`) and `copilotz/testing`. Each plugin
|
|
374
375
|
of `agents`, `access` and `interfaces` is also its own entry point, which loads it alone:
|
|
375
376
|
`copilotz/plugins/interfaces/mcp`, `copilotz/plugins/agents/chat`, `copilotz/plugins/access/spaces`…
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,133 @@
|
|
|
1
|
+
## 1.0.0-rc.50 — 2026-11-15
|
|
2
|
+
|
|
3
|
+
What rebuilding real systems on rc.49 asked of Copilotz: a retail point of sale (Open Source Point
|
|
4
|
+
of Sale 3.3.9) and two client systems. Each gap was checked against the code first. What already
|
|
5
|
+
existed is now documented where people look; what didn't is here.
|
|
6
|
+
|
|
7
|
+
**Breaking, in small ways:**
|
|
8
|
+
|
|
9
|
+
- **REST answers an app's own failure with a 4xx, not a 500.** `failure(code, message)` with a code
|
|
10
|
+
of the app's (`linha_lotada`) answers its code's status, or 422, with its code, and its words as
|
|
11
|
+
the caller may be told them. `failure(code, message, { status })` picks the status (400 to 599).
|
|
12
|
+
Errors with no code, and the runtime's own faults, stay a silent 500. Plugin routes keep a 500, so
|
|
13
|
+
webhook providers still retry.
|
|
14
|
+
- **`TransactionScope` has `call`, and `Context` has `describe()`.** Only code that builds a fake
|
|
15
|
+
scope or context in its tests has to add them.
|
|
16
|
+
- **What the public reads, everyone reads.** A space with the public as a viewer is read, read-only,
|
|
17
|
+
by people, contacts, agents and keys that aren't its members (they used to see less than someone
|
|
18
|
+
signed out). It isn't listed among their spaces.
|
|
19
|
+
- **WhatsApp: what people say to a customer reaches their phone** (see below). A message said to a
|
|
20
|
+
whole WhatsApp chat (`to: []`) by a person now goes to the phone. In a chat the desk took over,
|
|
21
|
+
`chat.say` without `to` goes to the last person who wrote there, so app code says
|
|
22
|
+
`to: ["contact:<id>"]`.
|
|
23
|
+
- `ConversationView.view` is optional (an entry can be a `beforeSend` alone).
|
|
24
|
+
|
|
25
|
+
**Another plugin's work in the same commit.** An Action declared `atomic: true` (it only reads,
|
|
26
|
+
writes, emits and schedules) can be called inside another plugin's transaction:
|
|
27
|
+
`tx.call(action,
|
|
28
|
+
input)`. Its reads see the transaction's writes; its writes, events and timers
|
|
29
|
+
commit with it, or not at all; its own `ctx.transaction` joins; it may call only other atomic
|
|
30
|
+
Actions; a stream, a fetch or a worker inside it throws. A recorded one's `action.started` and
|
|
31
|
+
`action.completed` commit with the writes, so a retry after a rollback runs it again and a retry
|
|
32
|
+
after a commit answers from the record. Each op is on record as its own Action's, with its own
|
|
33
|
+
actor. A sale, its payments, its stock, a gift card's debit and reward points are one commit now.
|
|
34
|
+
When an effect may come later, the outbox stays the pattern: emit in the transaction, and an
|
|
35
|
+
idempotent Processor reacts (docs/architecture/the-owner.md).
|
|
36
|
+
|
|
37
|
+
**A transaction waits for a slow op.** The 5 seconds after which a held transaction rolls back now
|
|
38
|
+
count only while it waits on its own code: an op slower than 5 seconds, or one waiting for the
|
|
39
|
+
store's writer behind another transaction, no longer closes its own transaction ("The transaction is
|
|
40
|
+
closed.").
|
|
41
|
+
|
|
42
|
+
**Code can see what the app declares:** `ctx.describe()`, the same as `runtime.describe()`
|
|
43
|
+
(collections and their schemas, Actions, Views, resources). An optional call to another plugin's
|
|
44
|
+
Action asks `ctx.describe().actions[name]` first.
|
|
45
|
+
|
|
46
|
+
**Text search in filters: `$regex`.** `{ name: { $regex: "joão", $options: "i" } }` works in every
|
|
47
|
+
filter (reads, counts, `$match`, updates and deletes, rules, Processors' `where`, REST and the
|
|
48
|
+
browser's reads) and on every store alike. It's the part of JavaScript's patterns every store reads
|
|
49
|
+
the same way (classes, groups, `|`, `^` and `$`, quantifiers up to 255; `i` folds case as JavaScript
|
|
50
|
+
does, so `joão` matches `JOÃO`; `s`), matched in linear time, so a caller's pattern can't stall the
|
|
51
|
+
app; backreferences, lookarounds and `\b` are refused as `invalid`. Escape typed text with
|
|
52
|
+
`RegExp.escape`. Accents aren't folded: search a folded copy of the field (stores/README.md).
|
|
53
|
+
|
|
54
|
+
**Chat and history read by indexes.** A thread's messages, its summaries, a space's recent chats,
|
|
55
|
+
the questions waiting on someone and an agent's replies elsewhere are read by indexes declared on
|
|
56
|
+
`message`, `thread`, `file` and `summary`: about 10 to 40 times faster at 30,000 messages. SQL
|
|
57
|
+
stores now look an `_id` up by its key wherever a filter has it (inside `$and` and `$or`, as a
|
|
58
|
+
person's reads come), and PostgreSQL's updates and deletes use declared indexes as reads do. A
|
|
59
|
+
database made before builds the new indexes when it starts (on PostgreSQL, writes wait for them).
|
|
60
|
+
`message.questions` takes `threads`, and finds questions older than the latest 20 too.
|
|
61
|
+
|
|
62
|
+
**Sign-in by username and password.** `passwordSignIn` (from `copilotz/plugins/access`), for staff
|
|
63
|
+
and back-office apps whose accounts an admin or an import makes: `password.set`, `password.import`
|
|
64
|
+
and `password.remove` (trusted code's), `password.sign-in` and `password.change`, routes under
|
|
65
|
+
`/signin/password`. An identifier is a username, a badge number or a CPF: read without spaces or
|
|
66
|
+
case, and without what `ignore` lists (`".-/"`). It shares email sign-in's hashing, limits and
|
|
67
|
+
sessions, and the sign-in page offers it.
|
|
68
|
+
|
|
69
|
+
- **bcrypt hashes move in.** `$2a$`, `$2b$` and `$2y$` hashes (costs 4 to 15) verify through
|
|
70
|
+
`email.import` and `password.import`, and are hashed again Copilotz's way at the first sign-in.
|
|
71
|
+
Blowfish is in TypeScript, checked against published vectors; no new dependency.
|
|
72
|
+
- **Sign-in by a code.** `emailSignIn.signInByCode`: "Email me a code instead" signs in with a
|
|
73
|
+
6-digit code (`email.code`, `email.enter`), and confirms the address.
|
|
74
|
+
- **Per brand.** `emailSignIn.hosts` says, by the host the page was served on, the app's name, its
|
|
75
|
+
sender, its messages' words and where its links go; `email.invite` takes the host.
|
|
76
|
+
|
|
77
|
+
**Email over SMTP.** The `email` resource's `adapter: "smtp"`
|
|
78
|
+
(`smtp: { host, port, secure,
|
|
79
|
+
starttls, user, password }`) sends over TLS from the start or by
|
|
80
|
+
STARTTLS, on Node, Deno and Bun (not workerd). `email.send` takes `from` (the resource's, or one its
|
|
81
|
+
`senders` allow), `replyTo` and `attachments` (`{ filename, contentType, content }`, base64, up to
|
|
82
|
+
10 and 10 MiB), through Resend too.
|
|
83
|
+
|
|
84
|
+
**Memberships until a time.** `member.set` takes `until`: reach ignores the membership after it, and
|
|
85
|
+
a timer removes it then. Trusted code may seat a person directly with `member.set`.
|
|
86
|
+
|
|
87
|
+
**Secrets, documented.** A collection's `private` fields never reach the log or an actor's reads:
|
|
88
|
+
that's where a secret goes. Settings kept as keys and values keep their secrets in a collection of
|
|
89
|
+
their own, with `private: ["value"]`.
|
|
90
|
+
|
|
91
|
+
**The web.**
|
|
92
|
+
|
|
93
|
+
- **The sidebar folds to a rail.** The button at its top, ⌘B (Ctrl+B elsewhere) or "Collapse
|
|
94
|
+
sidebar" in the palette folds it to a rail of icons, and back; the browser keeps it as each person
|
|
95
|
+
left it, and phones keep the drawer. A `sidebar` entry may name a `rail` View; chat, spaces and
|
|
96
|
+
invitations have one, and the org switcher sits on the rail (`OrgsSlot.rail`; the directory's
|
|
97
|
+
`orgs.rail`). The `shell` resource (`{ sidebar: "rail" }`) starts it folded. The toolkit has
|
|
98
|
+
`RailItem`, `side: "end"` on tooltips and popovers, and `shortcut` on `IconButton`.
|
|
99
|
+
- **Brazilian Portuguese out of the box.** `ptBR`, from `copilotz/web/pt-br`, first among the page's
|
|
100
|
+
plugins, says every word of the front ends and of the sign-in page in Portuguese, Copilotz's pitch
|
|
101
|
+
too. An app's own words after it have the last word.
|
|
102
|
+
- **An app puts words in the composer, and acts before it sends.** `handDraft(thread, text)`, from
|
|
103
|
+
chat's contract. A `conversation` entry's `beforeSend(sending, call)` runs before the box sends
|
|
104
|
+
anything: `false` holds the message, and a throw shows its words over the box.
|
|
105
|
+
- **The first load after a restart no longer leaves the page blank.** A page whose ticket the server
|
|
106
|
+
refuses before it's in asks for a new one (3 in all).
|
|
107
|
+
- **Phones.** A link followed from the sidebar's drawer closes it at once, and a page on its way
|
|
108
|
+
shows a thin bar at the top while it loads (the one before stays until it's ready). The shell, its
|
|
109
|
+
drawers and the command palette keep clear of the screen's safe areas (status bar, notch, home
|
|
110
|
+
indicator), so an installed web app no longer draws its header under the status bar.
|
|
111
|
+
- `*.localhost` names are this machine's (RFC 6761): a page on `http://acme.localhost:8100` is no
|
|
112
|
+
longer refused as another site, and dev sign-in answers there.
|
|
113
|
+
|
|
114
|
+
**WhatsApp.**
|
|
115
|
+
|
|
116
|
+
- **What people say to a customer reaches their phone.** Someone at the desk taking a chat over
|
|
117
|
+
(`chat.send` with `to: ["contact:<id>"]`, or to the whole chat), the app's `chat.say`, and a
|
|
118
|
+
teammate writing to a linked person are sent, with their files, once. What's private, or said to
|
|
119
|
+
an agent alone, stays in the app. A customer quoting such a message answers its sender.
|
|
120
|
+
- **Templates, for after Meta's 24 hours.** Declare them
|
|
121
|
+
(`whatsappTemplates: { reminder: { name,
|
|
122
|
+
language, body } }`) and send one with
|
|
123
|
+
`whatsapp.template` (people, agents for them, keys, app code). The plugin knows when each phone
|
|
124
|
+
last wrote: a message past the 24 hours goes as the number's `fallback` template (`{name}`,
|
|
125
|
+
`{text}`), or fails once as `window_closed` before Meta is asked. Meta's own refusal for it
|
|
126
|
+
(131047) gets the same fallback.
|
|
127
|
+
|
|
128
|
+
**Documented, not built:** a View's handler asks a query through an unrecorded Action; a report's
|
|
129
|
+
queries hang on a collection of its own; starting a runtime over is closing it and creating another.
|
|
130
|
+
|
|
1
131
|
## 1.0.0-rc.49 — 2026-11-13
|
|
2
132
|
|
|
3
133
|
**Breaking: hosted computers and apps are Compass's, not Copilotz's.** `cloud`, `cloudPool`,
|
package/README.md
CHANGED
|
@@ -152,7 +152,7 @@ ana sees: Tue 10:00, Wed 15:00
|
|
|
152
152
|
```sh
|
|
153
153
|
npm install copilotz@next # Node 24+ (npm, pnpm, yarn)
|
|
154
154
|
bun add copilotz@next # Bun
|
|
155
|
-
deno add jsr:@copilotz/copilotz@^1.0.0-rc.
|
|
155
|
+
deno add jsr:@copilotz/copilotz@^1.0.0-rc.50 # Deno 2.9+ (or `deno add npm:copilotz@next`)
|
|
156
156
|
```
|
|
157
157
|
|
|
158
158
|
Until 1.0, the release candidates are on npm's `next` tag, and a plain `npm install copilotz` or
|
|
@@ -166,7 +166,7 @@ OPENAI_API_KEY=sk-… node salon.ts # or bun salon.ts, or deno run -A salon.t
|
|
|
166
166
|
```
|
|
167
167
|
|
|
168
168
|
On Deno, map the name `copilotz` in `deno.json`
|
|
169
|
-
(`"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.
|
|
169
|
+
(`"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.50"`) so the imports read the same everywhere.
|
|
170
170
|
Copilotz runs on Node 24+, Deno 2.9+ and Bun, and it's built on web standards for Cloudflare Workers
|
|
171
171
|
and the browser.
|
|
172
172
|
|
|
@@ -265,7 +265,8 @@ beside the theme.
|
|
|
265
265
|
them. `skills` gives them know-how, and `routines` runs them on a schedule. `openapi` turns an
|
|
266
266
|
API's spec into tools, and `webTools` searches and reads the web.
|
|
267
267
|
- **Access:** `access` for spaces, people and contacts, with `googleSignIn`, `emailSignIn` and
|
|
268
|
-
`email
|
|
268
|
+
`email` (Resend or SMTP), `passwordSignIn` (a username and a password), and `devSignIn` for this
|
|
269
|
+
machine. `accounts` connects a person's own accounts.
|
|
269
270
|
- **Billing:** `usage` keeps a ledger of what every model call used and cost.
|
|
270
271
|
- **Compute:** `computers`, people's own machines, where agents run commands once their person says
|
|
271
272
|
yes.
|
package/hosts/web/host.js
CHANGED
|
@@ -6,7 +6,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
* asks, `arrive`: `POST /web/<name>`), observes the web shell for the address it's at (its path, where
|
|
7
7
|
* the person works, `?in=`, and its other parameters), and draws it with
|
|
8
8
|
* React, each part a component redrawn on its own. Where you are is the address: links are
|
|
9
|
-
* followed without reloading, back and forward work, two tabs differ.
|
|
9
|
+
* followed without reloading, back and forward work, two tabs differ. A page followed to shows
|
|
10
|
+
* once it's ready, the one before staying until then, with a thin bar at the top saying it's on
|
|
11
|
+
* its way (screens.ts). The
|
|
10
12
|
* connection is kept for `LazyView`, which observes a View on demand.
|
|
11
13
|
* Whom Views are shown to (`ctx.viewer`) is the person, by their name and
|
|
12
14
|
* email (identity's `GET /me`, asked while the ticket is), kept as their own
|
|
@@ -30,7 +32,8 @@ import { preconnect, preinit, preload } from "react-dom";
|
|
|
30
32
|
import { createRoot } from "react-dom/client";
|
|
31
33
|
import { connect } from "../../runtime/client.js";
|
|
32
34
|
import { registerWorker } from "./install.js";
|
|
33
|
-
import { Part } from "./part.js";
|
|
35
|
+
import { Going, Part } from "./part.js";
|
|
36
|
+
import { screens } from "./screens.js";
|
|
34
37
|
import { followViewer, session, viewerOf } from "./session.js";
|
|
35
38
|
import { SignIn } from "./signin.js";
|
|
36
39
|
import { inviteOf } from "./signin-email.js";
|
|
@@ -105,7 +108,8 @@ async function shownOf() {
|
|
|
105
108
|
/**
|
|
106
109
|
* The ways to sign in the app has, by what its routes answer: Google's, with
|
|
107
110
|
* its client id (`GET /google`), email's, with whether people make accounts
|
|
108
|
-
* (`GET /signin/email`),
|
|
111
|
+
* and sign in by a code (`GET /signin/email`), password sign-in's
|
|
112
|
+
* (`GET /signin/password`), and dev sign-in, on this machine
|
|
109
113
|
* (`GET /signin/dev`). One that isn't there answers 404.
|
|
110
114
|
*/
|
|
111
115
|
async function waysToSignIn() {
|
|
@@ -114,15 +118,18 @@ async function waysToSignIn() {
|
|
|
114
118
|
const json = response?.ok && response.headers.get("content-type")?.includes("json");
|
|
115
119
|
return json ? await response.json().catch(() => undefined) : undefined;
|
|
116
120
|
};
|
|
117
|
-
const [google, email, dev] = await Promise.all([
|
|
121
|
+
const [google, email, password, dev] = await Promise.all([
|
|
118
122
|
asked("/google"),
|
|
119
123
|
asked("/signin/email"),
|
|
124
|
+
asked("/signin/password"),
|
|
120
125
|
asked("/signin/dev"),
|
|
121
126
|
]);
|
|
122
127
|
const clientId = google?.clientId;
|
|
128
|
+
const said = email;
|
|
123
129
|
return {
|
|
124
130
|
...(typeof clientId === "string" && clientId ? { google: { clientId } } : {}),
|
|
125
|
-
...(
|
|
131
|
+
...(said ? { email: { signUp: said.signUp !== false, code: said.code === true } } : {}),
|
|
132
|
+
...(password ? { password: true } : {}),
|
|
126
133
|
...(dev ? { dev: true } : {}),
|
|
127
134
|
};
|
|
128
135
|
}
|
|
@@ -142,7 +149,7 @@ export async function web(options) {
|
|
|
142
149
|
preconnect("https://fonts.gstatic.com", { crossOrigin: "anonymous" });
|
|
143
150
|
preinit(fonts, { as: "style", precedence: "copilotz-fonts" });
|
|
144
151
|
}
|
|
145
|
-
const draw = (root) => react.render(_jsxs(ThemeContext, { value: theme, children: [_jsx("style", { href: "copilotz-theme", precedence: "copilotz", children: css }), _jsx("style", { href: "copilotz-base", precedence: "copilotz", children: BASE }), _jsx(Painted, {}), root, _jsx(UpdateReady, {})] }));
|
|
152
|
+
const draw = (root, going = false) => react.render(_jsxs(ThemeContext, { value: theme, children: [_jsx("style", { href: "copilotz-theme", precedence: "copilotz", children: css }), _jsx("style", { href: "copilotz-base", precedence: "copilotz", children: BASE }), _jsx(Painted, {}), root, going ? _jsx(Going, {}) : null, _jsx(UpdateReady, {})] }));
|
|
146
153
|
draw(null);
|
|
147
154
|
// Installable, and told when a new version is ready (see pwa.ts).
|
|
148
155
|
registerWorker();
|
|
@@ -190,7 +197,8 @@ export async function web(options) {
|
|
|
190
197
|
session.client = client;
|
|
191
198
|
session.viewer = viewerOf(first.actor, me);
|
|
192
199
|
let space = (await options.start?.(client, first.actor))?.space;
|
|
193
|
-
|
|
200
|
+
// Each page drawn at once, on its way until it's ready; the one before closes then.
|
|
201
|
+
const showing = screens((shell, going) => draw(_jsx(Part, { part: shell }), going));
|
|
194
202
|
const show = () => {
|
|
195
203
|
const asked = new URLSearchParams(location.search).get("in");
|
|
196
204
|
if (asked)
|
|
@@ -210,11 +218,8 @@ export async function web(options) {
|
|
|
210
218
|
...(here ? { actor: { ...first.actor, in: here } } : {}),
|
|
211
219
|
part: (part, key) => _jsx(Part, { part: part }, key),
|
|
212
220
|
});
|
|
213
|
-
draw(_jsx(Part, { part: shell }));
|
|
214
221
|
// The old screen closes once the new one reads what it needs: what both read stays watched.
|
|
215
|
-
|
|
216
|
-
shown = shell;
|
|
217
|
-
void shell.ready.then(() => old?.close());
|
|
222
|
+
showing(shell);
|
|
218
223
|
};
|
|
219
224
|
follow = (path) => {
|
|
220
225
|
history.pushState(null, "", path);
|
package/hosts/web/mod.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export { Dialog } from "./toolkit/dialog.js";
|
|
|
42
42
|
export { Drawer } from "./toolkit/drawer.js";
|
|
43
43
|
export { type Tab, Tabs } from "./toolkit/tabs.js";
|
|
44
44
|
export { NavItem } from "./toolkit/nav-item.js";
|
|
45
|
+
export { RailItem, type RailItemProps } from "./toolkit/rail-item.js";
|
|
45
46
|
export { ResizeHandle } from "./toolkit/resize-handle.js";
|
|
46
47
|
export { Tooltip } from "./toolkit/tooltip.js";
|
|
47
48
|
export { Page } from "./toolkit/page.js";
|
package/hosts/web/mod.js
CHANGED
|
@@ -50,6 +50,7 @@ export { Dialog } from "./toolkit/dialog.js";
|
|
|
50
50
|
export { Drawer } from "./toolkit/drawer.js";
|
|
51
51
|
export { Tabs } from "./toolkit/tabs.js";
|
|
52
52
|
export { NavItem } from "./toolkit/nav-item.js";
|
|
53
|
+
export { RailItem } from "./toolkit/rail-item.js";
|
|
53
54
|
export { ResizeHandle } from "./toolkit/resize-handle.js";
|
|
54
55
|
export { Tooltip } from "./toolkit/tooltip.js";
|
|
55
56
|
// Pages and details.
|
|
@@ -105,8 +105,8 @@ const SHEET = sheet("palette", `
|
|
|
105
105
|
.copilotz-palette-row { min-height: 48px; }
|
|
106
106
|
}
|
|
107
107
|
@media (max-width: 640px) {
|
|
108
|
-
.copilotz-palette { width: calc(100vw - 16px); max-height: calc(100dvh - 16px
|
|
109
|
-
border-radius: var(--radius-xl); }
|
|
108
|
+
.copilotz-palette { width: calc(100vw - 16px); max-height: calc(100dvh - 16px - env(safe-area-inset-top));
|
|
109
|
+
margin-top: calc(8px + env(safe-area-inset-top)); border-radius: var(--radius-xl); }
|
|
110
110
|
.copilotz-palette-step { max-width: 40%; }
|
|
111
111
|
}
|
|
112
112
|
`);
|
package/hosts/web/part.d.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* A part on the web: a React component over an observed part, redrawn on its
|
|
3
3
|
* own when its output changes (as the terminal's `Part` is for Ink). While it
|
|
4
4
|
* loads, it keeps what it showed before (a new page appears once it's ready,
|
|
5
|
-
* without a blank flash
|
|
5
|
+
* without a blank flash, the host showing it on its way: `Going`), or the
|
|
6
|
+
* first time, a quiet loader after a moment.
|
|
6
7
|
* A failed part says why, and offers to reload.
|
|
7
8
|
*/
|
|
8
9
|
import { type ReactNode } from "react";
|
|
@@ -12,6 +13,11 @@ export declare function Part({ part }: {
|
|
|
12
13
|
}): ReactNode;
|
|
13
14
|
/** A part not ready yet: a quiet loader, after a moment. */
|
|
14
15
|
export declare function Loading(): ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* A new page on its way, the one before still shown (see screens.ts): a thin
|
|
18
|
+
* bar across the top, after a moment, so a quick page never flashes it.
|
|
19
|
+
*/
|
|
20
|
+
export declare function Going(): ReactNode;
|
|
15
21
|
/** What a View returned, as React draws it; plain data as itself. */
|
|
16
22
|
export declare const node: (value: unknown) => ReactNode;
|
|
17
23
|
export declare const message: (error: unknown) => string;
|
package/hosts/web/part.js
CHANGED
|
@@ -3,7 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
* A part on the web: a React component over an observed part, redrawn on its
|
|
4
4
|
* own when its output changes (as the terminal's `Part` is for Ink). While it
|
|
5
5
|
* loads, it keeps what it showed before (a new page appears once it's ready,
|
|
6
|
-
* without a blank flash
|
|
6
|
+
* without a blank flash, the host showing it on its way: `Going`), or the
|
|
7
|
+
* first time, a quiet loader after a moment.
|
|
7
8
|
* A failed part says why, and offers to reload.
|
|
8
9
|
*/
|
|
9
10
|
import { isValidElement, useRef, useSyncExternalStore } from "react";
|
|
@@ -18,6 +19,14 @@ const STYLE = `
|
|
|
18
19
|
animation: copilotz-appear .3s .35s forwards; }
|
|
19
20
|
#app > .copilotz-loading { min-height: 100%; }
|
|
20
21
|
@keyframes copilotz-appear { to { opacity: 1; } }
|
|
22
|
+
.copilotz-going { position: fixed; z-index: 70; top: env(safe-area-inset-top); left: 0; right: 0; height: 2px;
|
|
23
|
+
overflow: hidden; pointer-events: none; opacity: 0; animation: copilotz-appear .2s .15s forwards; }
|
|
24
|
+
.copilotz-going::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%;
|
|
25
|
+
background: var(--primary); animation: copilotz-going 1.1s ease-in-out infinite; }
|
|
26
|
+
@keyframes copilotz-going { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
|
|
27
|
+
@media (prefers-reduced-motion: reduce) {
|
|
28
|
+
.copilotz-going::before { width: 100%; opacity: .5; animation: none; }
|
|
29
|
+
}
|
|
21
30
|
.copilotz-failed { margin: 12px; }
|
|
22
31
|
#app > .copilotz-failed { max-width: 520px; margin: 18vh auto; }
|
|
23
32
|
`;
|
|
@@ -34,6 +43,13 @@ export function Part({ part }) {
|
|
|
34
43
|
export function Loading() {
|
|
35
44
|
return (_jsxs("div", { className: "copilotz-loading", role: "status", children: [SHEET, _jsx("span", { className: "copilotz-sr", children: say("loading") }), _jsx(Spinner, { variant: "dots", size: 7 })] }));
|
|
36
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* A new page on its way, the one before still shown (see screens.ts): a thin
|
|
48
|
+
* bar across the top, after a moment, so a quick page never flashes it.
|
|
49
|
+
*/
|
|
50
|
+
export function Going() {
|
|
51
|
+
return (_jsx("div", { className: "copilotz-going", role: "progressbar", "aria-label": say("loading"), children: SHEET }));
|
|
52
|
+
}
|
|
37
53
|
/** Refused by the rules (a read or a query the person isn't let): nothing a reload changes. */
|
|
38
54
|
const refused = (error) => typeof error === "object" && error !== null && error.code === "forbidden";
|
|
39
55
|
function Failed({ error }) {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const about = {
|
|
2
|
+
headline: "Seus agentes,",
|
|
3
|
+
quiet: "com você e sua equipe.",
|
|
4
|
+
points: [
|
|
5
|
+
{
|
|
6
|
+
icon: "sparkles",
|
|
7
|
+
title: "Agentes que trabalham com você",
|
|
8
|
+
text: "Nas suas conversas, no seu computador, lembrando o que importa, e pedindo sua aprovação antes de qualquer coisa que não dê para desfazer.",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
icon: "users",
|
|
12
|
+
title: "Espaços para você e sua equipe",
|
|
13
|
+
text: "Um espaço Pessoal só seu, e espaços compartilhados com quem você convidar.",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
icon: "building",
|
|
17
|
+
title: "Todas as organizações, um só login",
|
|
18
|
+
text: "A sua e as das suas equipes: troque entre elas com um clique. Os convites esperam por você aqui.",
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
};
|