copilotz 1.0.0-rc.31 → 1.0.0-rc.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -0
- package/README.md +48 -29
- package/hosts/terminal/host.js +12 -4
- package/hosts/web/host.js +5 -0
- package/package.json +1 -1
- package/plugins/access/accounts/actions/callback.js +2 -2
- package/plugins/access/accounts/actions/complete.js +2 -2
- package/plugins/access/accounts/actions/connect.js +2 -2
- package/plugins/access/accounts/actions/disconnect.js +2 -2
- package/plugins/access/accounts/collections/account.js +2 -2
- package/plugins/access/contacts/collections/contact.d.ts +1 -1
- package/plugins/access/contacts/collections/contact.js +2 -2
- package/plugins/access/identity/actions/session.js +2 -2
- package/plugins/access/spaces/actions/can.js +2 -2
- package/plugins/access/spaces/actions/create.js +2 -2
- package/plugins/access/spaces/actions/invitation.js +4 -4
- package/plugins/access/spaces/actions/leave.js +2 -2
- package/plugins/access/spaces/actions/member.js +3 -3
- package/plugins/access/spaces/actions/org.js +6 -6
- package/plugins/access/spaces/actions/personal.js +9 -6
- package/plugins/access/spaces/actions/request.js +3 -3
- package/plugins/access/spaces/actions/share.js +2 -2
- package/plugins/access/spaces/collections/invitation.js +6 -4
- package/plugins/access/spaces/collections/profile.js +3 -3
- package/plugins/access/spaces/collections/space.d.ts +1 -1
- package/plugins/access/spaces/collections/space.js +2 -1
- package/plugins/access/spaces/shared/labels.js +2 -1
- package/plugins/access/spaces/shared/reach.d.ts +31 -3
- package/plugins/access/spaces/shared/reach.js +120 -9
- package/plugins/access/spaces/shared/rules.js +8 -3
- package/plugins/access/spaces/views/elsewhere.d.ts +5 -2
- package/plugins/access/spaces/views/web/words.d.ts +1 -1
- package/plugins/agents/chat/actions/attach.js +3 -3
- package/plugins/agents/chat/actions/move.js +2 -2
- package/plugins/agents/chat/actions/send.js +4 -4
- package/plugins/agents/chat/collections/file.d.ts +10 -1
- package/plugins/agents/chat/collections/file.js +7 -0
- package/plugins/agents/chat/collections/intent.d.ts +1 -1
- package/plugins/agents/chat/collections/live.d.ts +2 -2
- package/plugins/agents/chat/collections/message.d.ts +1 -1
- package/plugins/agents/chat/collections/shown.d.ts +1 -1
- package/plugins/agents/chat/collections/thread.d.ts +1 -1
- package/plugins/agents/chat/collections/wait.d.ts +1 -1
- package/plugins/agents/chat/processors/turn.js +13 -13
- package/plugins/agents/chat/shared/delivery.d.ts +1 -1
- package/plugins/agents/chat/shared/delivery.js +4 -1
- package/plugins/agents/chat/shared/send.js +2 -1
- package/plugins/agents/memory/collections/memory.d.ts +1 -1
- package/plugins/agents/memory/mod.js +2 -2
- package/plugins/agents/memory/shared/scope.d.ts +4 -1
- package/plugins/agents/memory/shared/scope.js +6 -6
- package/plugins/agents/openapi/shared/files.js +2 -2
- package/plugins/agents/routines/collections/routine.d.ts +2 -2
- package/plugins/agents/routines/resources/tools.js +11 -9
- package/plugins/agents/routines/shared/fire.d.ts +3 -1
- package/plugins/agents/routines/shared/fire.js +4 -2
- package/plugins/agents/skills/collections/skill.d.ts +1 -1
- package/plugins/agents/skills/resources/tools.js +1 -1
- package/plugins/agents/skills/shared/skills.d.ts +2 -2
- package/plugins/agents/skills/shared/skills.js +3 -6
- package/plugins/agents/team/actions/agent.js +4 -4
- package/plugins/agents/team/collections/agent.d.ts +1 -1
- package/plugins/billing/usage/collections/usage.js +4 -3
- package/plugins/billing/usage/views/web/words.d.ts +1 -1
- package/plugins/compute/apps/actions/list.js +2 -2
- package/plugins/compute/apps/actions/publish.js +2 -2
- package/plugins/compute/apps/resources/tools.js +7 -7
- package/plugins/compute/cloud/actions/create.js +5 -2
- package/plugins/compute/cloud/resources/tools.js +10 -9
- package/plugins/compute/computers/actions/allowed.js +1 -1
- package/plugins/compute/computers/actions/code.js +2 -2
- package/plugins/compute/computers/actions/env.js +5 -2
- package/plugins/compute/computers/actions/work.js +2 -2
- package/plugins/compute/computers/collections/approval.d.ts +6 -6
- package/plugins/compute/computers/collections/desk.d.ts +1 -1
- package/plugins/compute/computers/collections/desk.js +2 -2
- package/plugins/compute/computers/collections/enrollment.d.ts +1 -1
- package/plugins/compute/computers/collections/grant.d.ts +1 -1
- package/plugins/compute/computers/collections/grant.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/downloads.js +1 -1
- package/plugins/compute/computers/resources/tools.js +3 -5
- package/plugins/compute/computers/shared/grants.js +2 -0
- package/plugins/compute/computers/shared/wake.d.ts +4 -4
- package/plugins/compute/computers/shared/wake.js +7 -9
- package/plugins/compute/computers/shared/where.d.ts +4 -4
- package/plugins/compute/computers/shared/where.js +9 -10
- package/plugins/interfaces/api/collections/key.d.ts +7 -4
- package/plugins/interfaces/api/collections/key.js +5 -1
- package/plugins/interfaces/api/shared/actor.d.ts +1 -0
- package/plugins/interfaces/mcp/actions/call.js +5 -1
- package/plugins/interfaces/mcp/mod.d.ts +15 -9
- package/plugins/interfaces/mcp/mod.js +16 -10
- package/plugins/interfaces/mcp/resources/server.js +3 -3
- package/plugins/interfaces/mcp/resources/tools.d.ts +4 -9
- package/plugins/interfaces/mcp/resources/tools.js +7 -20
- package/plugins/interfaces/mcp/resources/widgets.js +2 -1
- package/plugins/interfaces/mcp/shared/settings.d.ts +2 -2
- package/plugins/interfaces/mcp/shared/settings.js +5 -1
- package/plugins/interfaces/voice/collections/blocked.d.ts +1 -1
- package/plugins/interfaces/voice/collections/call.d.ts +1 -1
- package/plugins/interfaces/voice/routes/relay.js +6 -5
- package/plugins/interfaces/web/actions/arrive.js +1 -1
- package/plugins/interfaces/web/collections/visitor.js +8 -4
- package/plugins/interfaces/web/resources/spend.js +9 -3
- package/plugins/interfaces/whatsapp/collections/number.d.ts +1 -1
- package/plugins/interfaces/whatsapp/processors/receive.js +7 -4
- package/plugins/models/shared/use.d.ts +6 -8
- package/plugins/work/boards/actions/create-board.js +2 -2
- package/plugins/work/boards/actions/create-card.js +2 -2
- package/plugins/work/boards/actions/delete-board.js +2 -2
- package/plugins/work/boards/actions/delete-card.js +2 -2
- package/plugins/work/boards/actions/move-card.js +2 -2
- package/plugins/work/boards/actions/update-board.js +2 -2
- package/plugins/work/boards/actions/update-card.js +2 -2
- package/plugins/work/boards/collections/board.d.ts +1 -1
- package/plugins/work/boards/collections/card.d.ts +1 -1
- package/plugins/work/boards/resources/tools.js +6 -8
- package/plugins/work/documents/actions/create.js +2 -2
- package/plugins/work/documents/actions/delete.js +2 -2
- package/plugins/work/documents/actions/presence.js +2 -2
- package/plugins/work/documents/actions/rename.js +2 -2
- package/plugins/work/documents/actions/restore.js +2 -2
- package/plugins/work/documents/actions/save.js +2 -2
- package/plugins/work/documents/collections/document-presence.d.ts +1 -1
- package/plugins/work/documents/collections/document-version.d.ts +1 -1
- package/plugins/work/documents/collections/document-version.js +2 -2
- package/plugins/work/documents/collections/document.d.ts +1 -1
- package/plugins/work/documents/collections/document.js +3 -3
- package/plugins/work/documents/resources/tools.js +4 -6
- package/runtime/actor.d.ts +37 -0
- package/runtime/actor.js +39 -0
- package/runtime/browsers.d.ts +11 -1
- package/runtime/browsers.js +20 -3
- package/runtime/client.d.ts +10 -2
- package/runtime/client.js +19 -5
- package/runtime/define.d.ts +34 -5
- package/runtime/errors.d.ts +16 -6
- package/runtime/errors.js +20 -7
- package/runtime/executor.js +26 -4
- package/runtime/kept.d.ts +22 -0
- package/runtime/kept.js +128 -0
- package/runtime/mod.d.ts +1 -1
- package/runtime/mod.js +1 -1
- package/runtime/observe.d.ts +6 -1
- package/runtime/observe.js +2 -1
- package/runtime/owner.d.ts +5 -1
- package/runtime/owner.js +38 -15
- package/runtime/reads.d.ts +3 -1
- package/runtime/reads.js +8 -1
- package/runtime/registry.js +9 -0
- package/runtime/store.d.ts +3 -1
- package/runtime/views.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,78 @@
|
|
|
1
|
+
## 1.0.0-rc.32 — 2026-11-09
|
|
2
|
+
|
|
3
|
+
**Upgrading.** `people` now lets in an agent working for a person, and an Action's `allow` is asked
|
|
4
|
+
of code acting for someone too (a tool's `ctx.call`, a Processor's, another Action's), not only of
|
|
5
|
+
outside callers. Go through your Actions:
|
|
6
|
+
|
|
7
|
+
- Say `inPerson` for what only the person decides (consent, keys, who's in a space, money,
|
|
8
|
+
publishing): it never lets in an agent, a key or a routine's work. Say `people` for the rest. An
|
|
9
|
+
`allow` written as `(actor) => actor.kind === "person"` keeps your own tools' agents out: say
|
|
10
|
+
`people`.
|
|
11
|
+
- An Action whose run takes `ctx.actor.id` for a person's id, or checks something only when
|
|
12
|
+
`ctx.actor.kind === "person"`, reads `personOf(ctx.actor)` instead (an agent's id isn't its
|
|
13
|
+
person's).
|
|
14
|
+
- A tool calling an Action its agent's person couldn't is refused (`forbidden`): let them in, or go
|
|
15
|
+
beyond on purpose with a named grant, `ctx.as(grant("<why>"))`.
|
|
16
|
+
- An agent's work reaches only where it is (its chat's space) and what that space draws on: a tool
|
|
17
|
+
that read across its person's spaces from a shared chat finds less. Have the space draw on the
|
|
18
|
+
other (`member.set` of a space), work from the person's Personal space, or hand the work over.
|
|
19
|
+
- Tools read where they are from `ctx.in`, not their chat's `in`.
|
|
20
|
+
- A developer key no longer calls what's now `inPerson` (`space.create`, `member.*`, `invitation.*`,
|
|
21
|
+
`share`, `chat.move`, `agent.create`…), even listed in its scope.
|
|
22
|
+
- An MCP line listing a tool without its `tool:<name>` View doesn't start: add the View.
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { grant, inPerson, people, personOf } from "@copilotz/copilotz";
|
|
26
|
+
|
|
27
|
+
"invoice.send": defineAction({ allow: inPerson, … }), // only the person decides
|
|
28
|
+
"invoice.draft": defineAction({ allow: people, run: (ctx) => draft(personOf(ctx.actor)) }),
|
|
29
|
+
// a tool, in its chat's space; going beyond its person on purpose, on the record:
|
|
30
|
+
run: async (input, ctx) => await ctx.as(grant("availability")).call("slots.all", { in: ctx.in }),
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- **Who, for whom, where** ([design](design/work.md)). All work runs as an actor, for whom it's done
|
|
34
|
+
(`for`) and where (`in`, an opaque id: a space, to the access plugin), which the runtime carries
|
|
35
|
+
as it carries the actor: into nested calls, tools, the Processors a call's events wake, its timers
|
|
36
|
+
and the Views observed for it; every event records it; `guard` and `allow` see it; contexts say it
|
|
37
|
+
(`ctx.in`, on Actions, Processors, tools, queries and Views). `ctx.as` stays where the work is
|
|
38
|
+
unless told where. Every way in says it: a browser's calls (its page's space;
|
|
39
|
+
`client.call(…,
|
|
40
|
+
{ in })`), the terminal (where its person works), a key (its space), WhatsApp,
|
|
41
|
+
voice, web and MCP lines (theirs), routines (theirs), a chat's turn (its chat's).
|
|
42
|
+
- **An agent's work reaches only where it is.** Reach for work done for someone is the person's
|
|
43
|
+
reach ∩ the agent's memberships ∩ its space and what that draws on, at the role it draws on it
|
|
44
|
+
with; in the person's own Personal space, all they reach. North working for Ana in a shared space
|
|
45
|
+
reached every space of Ana's (the core agents are members of all of them), and only labels kept
|
|
46
|
+
Finance from Launch's members: now it reads Launch and its sources. A person acting themselves
|
|
47
|
+
isn't narrowed; a tool or routine acting as them is. An agent actor's `at` is `in`.
|
|
48
|
+
- **`allow` is asked wherever someone acts:** from outside as before, and from code acting for an
|
|
49
|
+
actor (`ctx.call`, a timer, a read's unrecorded calls); for an agent, of whom it works for too
|
|
50
|
+
(`allows`). Actions without one stay internal. Going beyond is a named grant (`grant`), on the
|
|
51
|
+
record as the grant, `via` whose work it was, and counted (`copilotz.elevated.ops`).
|
|
52
|
+
- **Copilotz's own Actions say which:** `inPerson` for sessions, connected accounts, who's in a
|
|
53
|
+
space or the org, `share`, `chat.move`, `memory.move`, `agent.create/update/delete`,
|
|
54
|
+
`computer.code`, `computer.work` and `app.publish`, beside those that were; `people` for the rest,
|
|
55
|
+
boards and documents included (their agents' own tools couldn't call them). `chat.send` and
|
|
56
|
+
`chat.attach` let in people and contacts writing as themselves, never an agent. Code that took the
|
|
57
|
+
actor's id for its person's (`space.personal`, invitations, accounts, desks, cloud computers,
|
|
58
|
+
usage) asks `personOf`; an environment changes only by its space's managers, whoever asks.
|
|
59
|
+
- **Reach is kept in the owner** per who, for whom and where, until a commit changes a membership or
|
|
60
|
+
a space it read (`ReadContext.kept`: what rules work out from reads, let go exactly when what they
|
|
61
|
+
read changes; `cache.kept`, 1,000). An agent's turn works out its reach once, not on every op.
|
|
62
|
+
With narrowing, an agent's work for a person in one of 1,000 spaces (`examples/work-bench.ts`)
|
|
63
|
+
takes a fifth of the time: a turn's 13 ops, 4.4 ms median (21.5 before), 5.3 ms at p95 (22.9); the
|
|
64
|
+
person's own, 4.7 ms (11.7). Nothing measured got slower.
|
|
65
|
+
- **Tools know where they are** (`ctx.in`): documents, boards, computers, cloud computers, apps,
|
|
66
|
+
memory, skills, routines and an API's files no longer read their chat to find its space. What's
|
|
67
|
+
learned stays where it's learned.
|
|
68
|
+
- **Handing work to another space** writes under its grant (`chat.hand-over`, and `chat.hand-back`
|
|
69
|
+
for the answer), for the same person, in the new space; its check is the person's, anywhere.
|
|
70
|
+
- **mcp:** a listed tool without its `tool:<name>` View stops the app from starting (it was left
|
|
71
|
+
out, said once in the log). A line's contact, its widgets and its tools work in its space.
|
|
72
|
+
- **Model-use listeners** get `as` in a job; a web line's budget prices its visitors' use as its
|
|
73
|
+
grant (`web.budget`).
|
|
74
|
+
- **Startup checks** see the Views' names (`merged.views`).
|
|
75
|
+
|
|
1
76
|
## 1.0.0-rc.31 — 2026-11-08
|
|
2
77
|
|
|
3
78
|
- **A write the rules refuse in a transaction no longer holds up every write.** Refused before it
|
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ bun add copilotz # Bun
|
|
|
22
22
|
deno add jsr:@copilotz/copilotz # Deno (or `deno add npm:copilotz`)
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
On Deno, name it `copilotz` in `deno.json` (`"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.
|
|
25
|
+
On Deno, name it `copilotz` in `deno.json` (`"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.32"`),
|
|
26
26
|
and the imports below are the same everywhere. Some pieces need a package of their own, installed
|
|
27
27
|
beside it: `esbuild` to bundle the page's code on Node (`bundle`), `@electric-sql/pglite` for
|
|
28
28
|
PostgreSQL in the process, and `@types/react` for the front ends' types.
|
|
@@ -70,8 +70,9 @@ The runtime knows only these, and plugins are made of them:
|
|
|
70
70
|
(`ctx.db.collection("note").insertOne(…)`, `find`, `updateOne` with `$set`…), with named queries,
|
|
71
71
|
vector fields and indexes. Every write records an event in the same commit.
|
|
72
72
|
- **Actions:** what can be done, with a JSON Schema input and an `allow(actor, input)` saying who
|
|
73
|
-
may call them. Every call is on the record
|
|
74
|
-
id, and everything it causes is its caller's
|
|
73
|
+
may call them, from outside and from code acting for someone. Every call is on the record
|
|
74
|
+
(`action.started`, `action.completed`), retryable by id, and everything it causes is its caller's,
|
|
75
|
+
where its caller is (`in`).
|
|
75
76
|
- **Processors:** what happens when events happen: ordered per key, at least once, from a durable
|
|
76
77
|
cursor, idempotent by deterministic ids.
|
|
77
78
|
- **Views:** a plugin's front end, found by name: text for the model (`llm.thread`, the agents'
|
|
@@ -631,7 +632,7 @@ and an app serves it from there by default:
|
|
|
631
632
|
import { computerDownloads } from "copilotz/plugins/compute/downloads";
|
|
632
633
|
|
|
633
634
|
plugins: [...plugins, await computerDownloads()], // this Copilotz's release
|
|
634
|
-
plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.
|
|
635
|
+
plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.32" })], // its own: /computer/download/
|
|
635
636
|
plugins: [...plugins, await computerDownloads({ url: "https://downloads.example.com/computer/" })], // or elsewhere
|
|
636
637
|
```
|
|
637
638
|
|
|
@@ -770,6 +771,9 @@ name, never by importing its code.
|
|
|
770
771
|
last four hours of a conversation, back from its newest message (summaries too, with `history`);
|
|
771
772
|
what's older stays in the chat. The start moves in steps of a tenth of `maxAge`, so prompts keep
|
|
772
773
|
hitting the provider's cache ([design](design/views.md#history-as-views)).
|
|
774
|
+
- **Tools know where they are:** a turn works where its chat is, so a tool's `ctx.in` is its
|
|
775
|
+
conversation's space (with the access plugin, all it reaches there), beside `ctx.agent`,
|
|
776
|
+
`ctx.thread` and `ctx.trigger`.
|
|
773
777
|
- **A tool call runs once:** before a step's tools run, the step's calls are written (an
|
|
774
778
|
`intent`), and what each returns as soon as it does. A retried turn (it failed after its tools
|
|
775
779
|
ran, its executor died, the runtime restarted) goes on with those calls instead of asking its
|
|
@@ -927,19 +931,22 @@ name, never by importing its code.
|
|
|
927
931
|
agents, other spaces) and roles; collections named in the `shared` resource keep to what each
|
|
928
932
|
actor reaches. People join by accepting an invitation to the email they signed in with; sending
|
|
929
933
|
one never says whether the address has an account. Agents are members too, each working only where
|
|
930
|
-
it's one; a new space has the app's default agents. An
|
|
931
|
-
|
|
934
|
+
it's one; a new space has the app's default agents. An agent's work for someone reaches only where
|
|
935
|
+
it is (`in`) and what that space draws on (in the person's own Personal space, all they reach),
|
|
936
|
+
kept in the owner per who, for whom and where. An answer drawn from a space not everyone in the
|
|
937
|
+
conversation can see shows only to those who see both, marked, until someone shares it.
|
|
932
938
|
- **`identity`**: people and their sessions, and who a session's secret proves: its `who` reads the
|
|
933
939
|
session cookie (`credential.actor`); `POST /signout` ends the session, and `GET /me` says whom the
|
|
934
940
|
page shows. Sign-in plugins set the cookie with its contract's `signedIn`.
|
|
935
941
|
- **`contacts`**: people outside the org who talk to its agents (a WhatsApp customer). A contact is
|
|
936
942
|
its own kind of actor (`{ kind: "contact", id }`), never a person: every Action and query stays
|
|
937
|
-
shut to it unless it says otherwise (`peopleOrContacts
|
|
938
|
-
the line's space and is shared with it
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
isn't anyone in as a visitor,
|
|
943
|
+
shut to it unless it says otherwise (`peopleOrContacts`; `chat.send` lets in people and contacts
|
|
944
|
+
writing as themselves, never an agent). Its chat lives in the line's space and is shared with it
|
|
945
|
+
on its own: it reaches that chat, what's said and filed there, and nothing else; the space's
|
|
946
|
+
people reach it as any chat there, and the agent working for the contact reaches exactly that
|
|
947
|
+
chat, never its agents' private steps. Agents are told whom they're talking with. The web
|
|
948
|
+
interface's site chats (`webLines`, `web.<name>`) let a browser that isn't anyone in as a visitor,
|
|
949
|
+
a contact once it speaks (see "Visitors"). A contact works in its line's space (`in`).
|
|
943
950
|
- **`googleSignIn`**: sign-in with a Google ID token (the `google` resource names your client). Its
|
|
944
951
|
routes: `POST /signin/google`, which Google's button posts its token to, sets the session's
|
|
945
952
|
cookie; `GET /google` gives the page the client id for its button.
|
|
@@ -1093,17 +1100,18 @@ filled by the front ends through resources).
|
|
|
1093
1100
|
webhook (`/hooks/voice/<name>`) and the call's socket (`/hooks/voice/<name>/relay`), which
|
|
1094
1101
|
`listen` and `Deno.serve(runtime.fetch)` carry.
|
|
1095
1102
|
- **`mcp`**: models outside the app (ChatGPT, Claude, any MCP client) call its tools. A server the
|
|
1096
|
-
app declares (`mcp.<name>`: its space, the tools it lists, each with its `tool:<name>` View,
|
|
1097
|
-
each is shown, who calls, its limits) is an MCP server at
|
|
1098
|
-
JSON-RPC 2.0, no session, MCP 2026-07-28 and the versions
|
|
1099
|
-
(ChatGPT's `openai/session`, or a `chat` handle the app gives
|
|
1100
|
-
contact in a chat of its own in the server's space, its ids an HMAC
|
|
1101
|
-
call runs the tool through chat's runner as that contact,
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1103
|
+
app declares (`mcp.<name>`: its space, the tools it lists, each with its `tool:<name>` View,
|
|
1104
|
+
without which the app doesn't start, how each is shown, who calls, its limits) is an MCP server at
|
|
1105
|
+
`POST /mcp/<name>`: Streamable HTTP, JSON-RPC 2.0, no session, MCP 2026-07-28 and the versions
|
|
1106
|
+
with a handshake. Each conversation (ChatGPT's `openai/session`, or a `chat` handle the app gives
|
|
1107
|
+
a client that names none) is a contact in a chat of its own in the server's space, its ids an HMAC
|
|
1108
|
+
with the `links` secret. A call runs the tool through chat's runner as that contact, where its
|
|
1109
|
+
chat is (the Actions it calls asked their `allow` for the contact), is written there as a step,
|
|
1110
|
+
and answers what the app's agents read of it (only public errors say their words); a request sent
|
|
1111
|
+
again to a tool that changes things is answered from the first, and the server's limits (calls at
|
|
1112
|
+
once, a minute, new conversations an hour, by conversation, user, caller's address and in all)
|
|
1113
|
+
refuse the rest. **Widgets** (MCP Apps, ChatGPT's Apps SDK): a tool's calls shown through a web
|
|
1114
|
+
View of the app's (`tools.<name>.widget`), drawn inside the assistant by the widget host
|
|
1107
1115
|
(`copilotz/web/widget`) in a template made from the app's `widgets` resource
|
|
1108
1116
|
(`widgets: widgetsOf({ code, plugins })`, from `copilotz/web/server`), seeded with what the View
|
|
1109
1117
|
reads, answered on the server as the conversation's contact (its first paint asks nothing). What
|
|
@@ -1740,17 +1748,28 @@ Copilotz runs on Node (first), Deno and Bun, and is built for Cloudflare Workers
|
|
|
1740
1748
|
no op for 5 seconds rolls back too.
|
|
1741
1749
|
- **Stream-first:** committed events and live frames go to subscribers immediately, and observed
|
|
1742
1750
|
Views run again as soon as what they read commits.
|
|
1743
|
-
- **Who acts:** an outside call may bind an actor
|
|
1744
|
-
`
|
|
1745
|
-
|
|
1746
|
-
and
|
|
1747
|
-
|
|
1751
|
+
- **Who acts, for whom, where:** an outside call may bind an actor
|
|
1752
|
+
(`runtime.call(action, input,
|
|
1753
|
+
{ actor })`, and `query`, `emit`, `observe` likewise): who acts,
|
|
1754
|
+
for whom an agent works (`for`), and where the work is (`in`, an opaque id: a space, to the access
|
|
1755
|
+
plugin). Everything it causes is theirs, there: nested calls, writes, the events they record
|
|
1756
|
+
(`event.actor`: the log is the audit trail), Processors handling those events, timers it sets,
|
|
1757
|
+
Views observed for it; contexts say where (`ctx.in`). Without one, the system acts
|
|
1758
|
+
([design](design/work.md)).
|
|
1759
|
+
- **Actions say whom they let call them** (`allow(actor, input)`), asked from outside and of code
|
|
1760
|
+
acting for someone (`ctx.call` in a tool, a Processor, another Action); for an agent, of whom it
|
|
1761
|
+
works for too. Without `allow`, an Action is internal: code calls it, actors from outside can't.
|
|
1762
|
+
The runtime's `people` lets in people, their keys and an agent working for one; `inPerson` only
|
|
1763
|
+
the person themselves (never a key, an agent or a routine's work), for what only they decide;
|
|
1764
|
+
`peopleOrContacts` contacts too.
|
|
1748
1765
|
- **Rules are filters** (a plugin's `guard(actor, { collection, filter }, ctx)`): reads, updates
|
|
1749
1766
|
and deletes reach only what matches; inserts, and what updates leave, must match. The owner
|
|
1750
1767
|
applies them to every op an actor's work makes; the access plugin declares them for the
|
|
1751
1768
|
collections it shares.
|
|
1752
1769
|
- **Trusted code acts as someone else, on the record:** `ctx.as(person)`, or `ctx.as()` for the
|
|
1753
|
-
system, which no rule restricts
|
|
1770
|
+
system, which no rule restricts, or a named grant of the system's (`ctx.as(grant("hand-over"))`,
|
|
1771
|
+
counted as `copilotz.elevated.ops`); its events say `via` whom, and stay where the work is
|
|
1772
|
+
unless it says where.
|
|
1754
1773
|
- Remote executors prove the deployment key, compared in constant time.
|
|
1755
1774
|
- **Private fields** (`private: ["token"]` on a collection): what an actor's queries and Views
|
|
1756
1775
|
read comes without them; Actions and Processors acting for them still read them. No event holds
|
package/hosts/terminal/host.js
CHANGED
|
@@ -35,13 +35,16 @@ export async function terminal(options) {
|
|
|
35
35
|
/** One person at the terminal, until they leave (undefined) or `/as` makes someone else type. */
|
|
36
36
|
async function session(options, { me, actor, space }, { first, interactive, lines }) {
|
|
37
37
|
const as = actor ? { actor } : {};
|
|
38
|
-
//
|
|
38
|
+
// Where they work (`/space` moves them), which their calls say (`in`).
|
|
39
|
+
let here = space;
|
|
40
|
+
const placed = () => ({ ...actor, ...(here ? { in: here } : {}) });
|
|
41
|
+
// The runtime as this person: everything commands do is theirs, where they work.
|
|
39
42
|
const runtime = actor
|
|
40
43
|
? {
|
|
41
44
|
...options.runtime,
|
|
42
|
-
call: (action, input, o = {}) => options.runtime.call(action, input, { ...o, actor }),
|
|
45
|
+
call: (action, input, o = {}) => options.runtime.call(action, input, { ...o, actor: placed() }),
|
|
43
46
|
query: (name, params, o = {}) => options.runtime.query(name, params, { ...o, actor }),
|
|
44
|
-
emit: (type, data, o = {}) => options.runtime.emit(type, data, { ...o, actor }),
|
|
47
|
+
emit: (type, data, o = {}) => options.runtime.emit(type, data, { ...o, actor: placed() }),
|
|
45
48
|
}
|
|
46
49
|
: options.runtime;
|
|
47
50
|
const stdout = options.stdout ?? process.stdout;
|
|
@@ -50,7 +53,11 @@ async function session(options, { me, actor, space }, { first, interactive, line
|
|
|
50
53
|
me,
|
|
51
54
|
runtime,
|
|
52
55
|
state: () => runtime.query("shell.mine", { person: me }),
|
|
53
|
-
set: async (fields) =>
|
|
56
|
+
set: async (fields) => {
|
|
57
|
+
if (typeof fields.space === "string")
|
|
58
|
+
here = fields.space;
|
|
59
|
+
await runtime.call("shell.set", { person: me, ...fields });
|
|
60
|
+
},
|
|
54
61
|
show: async (kind, item, hints) => {
|
|
55
62
|
for (const one of Array.isArray(item) ? item : [item]) {
|
|
56
63
|
await runtime.call("shell.print", {
|
|
@@ -133,6 +140,7 @@ async function session(options, { me, actor, space }, { first, interactive, line
|
|
|
133
140
|
const state = await runtime.query("shell.mine", { person: me });
|
|
134
141
|
if (space && !state.space)
|
|
135
142
|
await runtime.call("shell.set", { person: me, space });
|
|
143
|
+
here = state.space ?? space;
|
|
136
144
|
const screen = runtime.observe("terminal.shell", { person: me }, {
|
|
137
145
|
...as,
|
|
138
146
|
viewer: { name: me, kind: "person" },
|
package/hosts/web/host.js
CHANGED
|
@@ -203,8 +203,13 @@ export async function web(options) {
|
|
|
203
203
|
...(space ? { space } : {}),
|
|
204
204
|
...(query ? { query } : {}),
|
|
205
205
|
};
|
|
206
|
+
// Where the page is: a space's page is in that space, any other where the person works. What
|
|
207
|
+
// its Views call is done there (`in`, the work's), as the shell says (`hints.in`).
|
|
208
|
+
const [kind, ...rest] = location.pathname.split("/").filter(Boolean).map(decodeURIComponent);
|
|
209
|
+
const here = kind === "space" && rest.length ? rest.join("/") : space;
|
|
206
210
|
const shell = client.observe("web.shell", where, {
|
|
207
211
|
viewer,
|
|
212
|
+
...(here ? { actor: { ...first.actor, in: here } } : {}),
|
|
208
213
|
part: (part, key) => _jsx(Part, { part: part }, key),
|
|
209
214
|
});
|
|
210
215
|
draw(_jsx(Part, { part: shell }));
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* said), which the route sends them to Connected accounts with. Unrecorded:
|
|
7
7
|
* the code stays out of the log.
|
|
8
8
|
*/
|
|
9
|
-
import { defineAction } from "../../../../runtime/mod.js";
|
|
9
|
+
import { defineAction, inPerson } from "../../../../runtime/mod.js";
|
|
10
10
|
import { codeOf } from "../shared/errors.js";
|
|
11
11
|
import { finish } from "../shared/flow.js";
|
|
12
12
|
export const callbackAction = defineAction({
|
|
@@ -24,7 +24,7 @@ export const callbackAction = defineAction({
|
|
|
24
24
|
required: ["provider"],
|
|
25
25
|
additionalProperties: false,
|
|
26
26
|
},
|
|
27
|
-
allow:
|
|
27
|
+
allow: inPerson,
|
|
28
28
|
run: async (ctx, input) => {
|
|
29
29
|
const { provider, code, state, error } = input;
|
|
30
30
|
try {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* which must be the person's own sign-in, there, in time. Unrecorded: the
|
|
6
6
|
* code stays out of the log. It answers the account, as its person sees it.
|
|
7
7
|
*/
|
|
8
|
-
import { defineAction,
|
|
8
|
+
import { defineAction, inPerson } from "../../../../runtime/mod.js";
|
|
9
9
|
import { invalid } from "../shared/errors.js";
|
|
10
10
|
import { finish, where } from "../shared/flow.js";
|
|
11
11
|
import { providerOf } from "../shared/settings.js";
|
|
@@ -18,7 +18,7 @@ export const completeAction = defineAction({
|
|
|
18
18
|
required: ["provider", "address"],
|
|
19
19
|
additionalProperties: false,
|
|
20
20
|
},
|
|
21
|
-
allow:
|
|
21
|
+
allow: inPerson,
|
|
22
22
|
run: (ctx, input) => {
|
|
23
23
|
const { title } = providerOf(ctx, input.provider);
|
|
24
24
|
let url;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Unrecorded: its answer carries the sign-in's state, which stays out of
|
|
8
8
|
* the log.
|
|
9
9
|
*/
|
|
10
|
-
import { defineAction,
|
|
10
|
+
import { defineAction, inPerson } from "../../../../runtime/mod.js";
|
|
11
11
|
import { start } from "../shared/flow.js";
|
|
12
12
|
export const connectAction = defineAction({
|
|
13
13
|
description: "Starts connecting one of your accounts: where to sign in",
|
|
@@ -18,6 +18,6 @@ export const connectAction = defineAction({
|
|
|
18
18
|
required: ["provider"],
|
|
19
19
|
additionalProperties: false,
|
|
20
20
|
},
|
|
21
|
-
allow:
|
|
21
|
+
allow: inPerson,
|
|
22
22
|
run: (ctx, input) => start(ctx, input.provider, input.origin),
|
|
23
23
|
});
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* timer, saying `account.changed`. Agents working for them then use the
|
|
6
6
|
* app's own models, where it has them.
|
|
7
7
|
*/
|
|
8
|
-
import { defineAction,
|
|
8
|
+
import { defineAction, inPerson } from "../../../../runtime/mod.js";
|
|
9
9
|
import { revoke } from "../shared/oauth.js";
|
|
10
10
|
import { unseal } from "../shared/seal.js";
|
|
11
11
|
import { accountId, providerOf, settingsOf, timerOf } from "../shared/settings.js";
|
|
@@ -17,7 +17,7 @@ export const disconnectAction = defineAction({
|
|
|
17
17
|
required: ["provider"],
|
|
18
18
|
additionalProperties: false,
|
|
19
19
|
},
|
|
20
|
-
allow:
|
|
20
|
+
allow: inPerson,
|
|
21
21
|
run: async (ctx, input) => {
|
|
22
22
|
const person = ctx.actor.id;
|
|
23
23
|
const provider = providerOf(ctx, input.provider);
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Queries, for people: `account.providers`, what can be connected and how;
|
|
11
11
|
* `account.uses`, which of some models would run on the asker's accounts.
|
|
12
12
|
*/
|
|
13
|
-
import { defineCollection, people } from "../../../../runtime/mod.js";
|
|
13
|
+
import { defineCollection, people, personOf, } from "../../../../runtime/mod.js";
|
|
14
14
|
import { providersOf } from "../shared/settings.js";
|
|
15
15
|
import { usesOf } from "../shared/uses.js";
|
|
16
16
|
const accountSchema = {
|
|
@@ -52,7 +52,7 @@ export const account = defineCollection({
|
|
|
52
52
|
/** For each agent's model, the asker's account it would run on (or one to reconnect). */
|
|
53
53
|
uses: {
|
|
54
54
|
allow: people,
|
|
55
|
-
run: async (accounts, params, ctx) => usesOf(ctx, await accounts.find({ person: ctx.actor
|
|
55
|
+
run: async (accounts, params, ctx) => usesOf(ctx, await accounts.find({ person: personOf(ctx.actor) ?? "" }), params),
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
58
|
});
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* the agent working for them (it's shared with them on its own, as their
|
|
8
8
|
* chats are), and no one else's.
|
|
9
9
|
*/
|
|
10
|
-
import { defineCollection, principalOf } from "../../../../runtime/mod.js";
|
|
10
|
+
import { defineCollection, people, principalOf, } from "../../../../runtime/mod.js";
|
|
11
11
|
import { namesOf } from "../../spaces/contract.js";
|
|
12
12
|
const contactSchema = {
|
|
13
13
|
type: "object",
|
|
@@ -32,7 +32,7 @@ export const contact = defineCollection({
|
|
|
32
32
|
* the spaces' `names` resource asks here for ids that start so.
|
|
33
33
|
*/
|
|
34
34
|
names: {
|
|
35
|
-
allow:
|
|
35
|
+
allow: people,
|
|
36
36
|
run: async (contacts, params) => {
|
|
37
37
|
const given = Array.isArray(params?.ids) ? params.ids : [];
|
|
38
38
|
const ids = [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* verified (the system calls it: a sign-in plugin's Action, never a person);
|
|
4
4
|
* `session.end` ends the one a person shows.
|
|
5
5
|
*/
|
|
6
|
-
import { defineAction,
|
|
6
|
+
import { defineAction, inPerson } from "../../../../runtime/mod.js";
|
|
7
7
|
import { hash, secret } from "../collections/credential.js";
|
|
8
8
|
/** How long a session lasts unless its sign-in says (30 days). */
|
|
9
9
|
const LASTS = 30 * 86_400_000;
|
|
@@ -43,7 +43,7 @@ export const endSession = defineAction({
|
|
|
43
43
|
required: ["secret"],
|
|
44
44
|
additionalProperties: false,
|
|
45
45
|
},
|
|
46
|
-
allow:
|
|
46
|
+
allow: inPerson,
|
|
47
47
|
run: async (ctx, input) => {
|
|
48
48
|
const ended = await ctx.as().db.collection("credential").deleteOne({
|
|
49
49
|
_id: await hash(input.secret),
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* what's shared there). For other plugins and front ends, which reach spaces
|
|
5
5
|
* only by name: computers check it before someone uses a space's computer.
|
|
6
6
|
*/
|
|
7
|
-
import { defineAction } from "../../../../runtime/mod.js";
|
|
7
|
+
import { defineAction, people } from "../../../../runtime/mod.js";
|
|
8
8
|
import { may } from "../shared/can.js";
|
|
9
9
|
export const canAction = defineAction({
|
|
10
10
|
description: "Whether you may read, write in or manage a space",
|
|
@@ -19,7 +19,7 @@ export const canAction = defineAction({
|
|
|
19
19
|
},
|
|
20
20
|
// A question, asked on every preview request: it records nothing.
|
|
21
21
|
record: false,
|
|
22
|
-
allow:
|
|
22
|
+
allow: people,
|
|
23
23
|
run: async (ctx, input) => {
|
|
24
24
|
return { can: await may(ctx, input.verb, input.space) };
|
|
25
25
|
},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* it, with the app's default agents working there. Not one the app declares
|
|
4
4
|
* (see shared/declared.ts): those are the app's, made by `space.keep`.
|
|
5
5
|
*/
|
|
6
|
-
import { defineAction,
|
|
6
|
+
import { defineAction, inPerson } from "../../../../runtime/mod.js";
|
|
7
7
|
import { seat } from "../shared/agents.js";
|
|
8
8
|
import { declaredOf } from "../shared/declared.js";
|
|
9
9
|
import { memberKey, orgRoleOf } from "../shared/reach.js";
|
|
@@ -15,7 +15,7 @@ export const createAction = defineAction({
|
|
|
15
15
|
required: ["name"],
|
|
16
16
|
additionalProperties: false,
|
|
17
17
|
},
|
|
18
|
-
allow:
|
|
18
|
+
allow: inPerson,
|
|
19
19
|
run: async (ctx, input) => {
|
|
20
20
|
// A guest's, through a key of theirs too: the person's role says.
|
|
21
21
|
const person = { kind: ctx.actor.kind, id: ctx.actor.id };
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* in keeps their role) or turns it down. Its managers take one back the same
|
|
6
6
|
* way. Sending answers the same whether the address has an account or not.
|
|
7
7
|
*/
|
|
8
|
-
import { defineAction,
|
|
8
|
+
import { defineAction, inPerson } from "../../../../runtime/mod.js";
|
|
9
9
|
import { joinable } from "../shared/personal.js";
|
|
10
10
|
import { may, must } from "../shared/can.js";
|
|
11
11
|
import { memberKey, orgRoleOf, rolesOf } from "../shared/reach.js";
|
|
@@ -39,7 +39,7 @@ export const sendInvitationAction = defineAction({
|
|
|
39
39
|
required: ["space", "email"],
|
|
40
40
|
additionalProperties: false,
|
|
41
41
|
},
|
|
42
|
-
allow:
|
|
42
|
+
allow: inPerson,
|
|
43
43
|
run: async (ctx, input) => {
|
|
44
44
|
const email = input.email.trim().toLowerCase();
|
|
45
45
|
if (!EMAIL.test(email))
|
|
@@ -90,7 +90,7 @@ export const acceptInvitationAction = defineAction({
|
|
|
90
90
|
required: ["invitation"],
|
|
91
91
|
additionalProperties: false,
|
|
92
92
|
},
|
|
93
|
-
allow:
|
|
93
|
+
allow: inPerson,
|
|
94
94
|
run: async (ctx, input) => {
|
|
95
95
|
const found = await answerable(ctx, input.invitation);
|
|
96
96
|
if (!found.mine)
|
|
@@ -117,7 +117,7 @@ export const declineInvitationAction = defineAction({
|
|
|
117
117
|
required: ["invitation"],
|
|
118
118
|
additionalProperties: false,
|
|
119
119
|
},
|
|
120
|
-
allow:
|
|
120
|
+
allow: inPerson,
|
|
121
121
|
run: async (ctx, input) => {
|
|
122
122
|
const found = await answerable(ctx, input.invitation);
|
|
123
123
|
await ctx.as().db.collection("invitation").deleteOne({ _id: found._id });
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* which is yours; and not as its only manager: make someone else one first.
|
|
4
4
|
* What you added there stays, the space's.
|
|
5
5
|
*/
|
|
6
|
-
import { defineAction,
|
|
6
|
+
import { defineAction, inPerson } from "../../../../runtime/mod.js";
|
|
7
7
|
import { keepsAManager } from "../shared/managers.js";
|
|
8
8
|
import { PERSONAL } from "../shared/personal.js";
|
|
9
9
|
import { memberKey } from "../shared/reach.js";
|
|
@@ -15,7 +15,7 @@ export const leaveAction = defineAction({
|
|
|
15
15
|
required: ["space"],
|
|
16
16
|
additionalProperties: false,
|
|
17
17
|
},
|
|
18
|
-
allow:
|
|
18
|
+
allow: inPerson,
|
|
19
19
|
run: async (ctx, input) => {
|
|
20
20
|
const db = ctx.as().db;
|
|
21
21
|
const found = await db.collection("space").findOne({ _id: input.space });
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* key (`{ kind: "key", id }`) is seated by the plugin that made it, with
|
|
13
13
|
* the role what it may do says; its managers take it out (which revokes it).
|
|
14
14
|
*/
|
|
15
|
-
import { defineAction, forbidden, invalid,
|
|
15
|
+
import { defineAction, forbidden, inPerson, invalid, } from "../../../../runtime/mod.js";
|
|
16
16
|
import { mustKnow, unseat } from "../shared/agents.js";
|
|
17
17
|
import { keepsAManager } from "../shared/managers.js";
|
|
18
18
|
import { joinable } from "../shared/personal.js";
|
|
@@ -65,7 +65,7 @@ export const setMemberAction = defineAction({
|
|
|
65
65
|
required: ["space", "member", "role"],
|
|
66
66
|
additionalProperties: false,
|
|
67
67
|
},
|
|
68
|
-
allow:
|
|
68
|
+
allow: inPerson,
|
|
69
69
|
run: async (ctx, input) => {
|
|
70
70
|
if (input.space === ORG)
|
|
71
71
|
throw forbidden("Org roles change with org.role.");
|
|
@@ -105,7 +105,7 @@ export const removeMemberAction = defineAction({
|
|
|
105
105
|
required: ["space", "member"],
|
|
106
106
|
additionalProperties: false,
|
|
107
107
|
},
|
|
108
|
-
allow:
|
|
108
|
+
allow: inPerson,
|
|
109
109
|
run: async (ctx, input) => {
|
|
110
110
|
if (input.space === ORG)
|
|
111
111
|
throw forbidden("People leave the org with org.remove.");
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* only they managed to someone who stays; their Personal space stays, where
|
|
8
8
|
* the org's admins still reach it.
|
|
9
9
|
*/
|
|
10
|
-
import { defineAction, forbidden, invalid, people } from "../../../../runtime/mod.js";
|
|
10
|
+
import { defineAction, forbidden, inPerson, invalid, people, } from "../../../../runtime/mod.js";
|
|
11
11
|
import { ORG, ORG_ROLES, orgRoleOf, rolesOf, runsOrg } from "../shared/reach.js";
|
|
12
12
|
import { keepProfileOf } from "../shared/profile.js";
|
|
13
13
|
const role = { type: "string", enum: [...ORG_ROLES] };
|
|
@@ -59,7 +59,7 @@ export const orgRoleAction = defineAction({
|
|
|
59
59
|
required: ["person", "role"],
|
|
60
60
|
additionalProperties: false,
|
|
61
61
|
},
|
|
62
|
-
allow:
|
|
62
|
+
allow: inPerson,
|
|
63
63
|
run: async (ctx, input) => {
|
|
64
64
|
const mine = await runs(ctx);
|
|
65
65
|
const theirs = await orgRoleOf({ kind: "person", id: input.person }, ctx.as());
|
|
@@ -82,7 +82,7 @@ export const removeFromOrgAction = defineAction({
|
|
|
82
82
|
required: ["person"],
|
|
83
83
|
additionalProperties: false,
|
|
84
84
|
},
|
|
85
|
-
allow:
|
|
85
|
+
allow: inPerson,
|
|
86
86
|
run: async (ctx, input) => {
|
|
87
87
|
const mine = await runs(ctx);
|
|
88
88
|
const theirs = await orgRoleOf({ kind: "person", id: input.person }, ctx.as());
|
|
@@ -161,7 +161,7 @@ export const inviteToOrgAction = defineAction({
|
|
|
161
161
|
required: ["email"],
|
|
162
162
|
additionalProperties: false,
|
|
163
163
|
},
|
|
164
|
-
allow:
|
|
164
|
+
allow: inPerson,
|
|
165
165
|
run: async (ctx, input) => {
|
|
166
166
|
const mine = await runs(ctx);
|
|
167
167
|
void mine;
|
|
@@ -193,7 +193,7 @@ export const uninviteAction = defineAction({
|
|
|
193
193
|
required: ["email"],
|
|
194
194
|
additionalProperties: false,
|
|
195
195
|
},
|
|
196
|
-
allow:
|
|
196
|
+
allow: inPerson,
|
|
197
197
|
run: async (ctx, input) => {
|
|
198
198
|
await runs(ctx);
|
|
199
199
|
await directoryOf(ctx).cancel(input.email.toLowerCase());
|
|
@@ -250,7 +250,7 @@ export const renameOrgAction = defineAction({
|
|
|
250
250
|
required: ["name"],
|
|
251
251
|
additionalProperties: false,
|
|
252
252
|
},
|
|
253
|
-
allow:
|
|
253
|
+
allow: inPerson,
|
|
254
254
|
run: async (ctx, input) => {
|
|
255
255
|
const mine = await standing(ctx);
|
|
256
256
|
if (mine !== "owner" && mine !== "staff")
|