copilotz 1.0.0-rc.1 → 1.0.0-rc.11
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 +337 -0
- package/README.md +36 -16
- package/hosts/orgs/mod.d.ts +31 -4
- package/hosts/orgs/mod.js +102 -9
- package/hosts/web/host.js +7 -2
- package/hosts/web/node/serve.js +8 -3
- package/hosts/web/pwa.js +1 -1
- package/hosts/web/routes.d.ts +62 -5
- package/hosts/web/routes.js +135 -34
- package/hosts/web/server.d.ts +19 -2
- package/hosts/web/server.js +25 -5
- package/hosts/web/style.d.ts +1 -1
- package/hosts/web/style.js +10 -0
- package/hosts/web/toolkit/button.js +6 -0
- package/hosts/web/toolkit/copy-button.js +4 -0
- package/hosts/web/toolkit/icon-button.js +6 -0
- package/hosts/web/toolkit/icon.d.ts +1 -0
- package/hosts/web/toolkit/icon.js +2 -0
- package/hosts/web/toolkit/input.js +6 -0
- package/hosts/web/toolkit/time.js +2 -1
- package/package.json +3 -3
- 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.d.ts +2 -2
- package/plugins/access/accounts/collections/account.js +1 -2
- package/plugins/access/accounts/collections/flow.d.ts +1 -1
- package/plugins/access/accounts/shared/settings.js +2 -2
- package/plugins/access/directory/actions/host.d.ts +2 -0
- package/plugins/access/directory/actions/host.js +54 -0
- package/plugins/access/directory/actions/invite.js +1 -2
- package/plugins/access/directory/actions/org.js +3 -3
- package/plugins/access/directory/collections/org-host.d.ts +61 -0
- package/plugins/access/directory/collections/org-host.js +29 -0
- package/plugins/access/directory/collections/org.d.ts +3 -3
- package/plugins/access/directory/mod.d.ts +3 -1
- package/plugins/access/directory/mod.js +7 -2
- package/plugins/access/identity/actions/key.js +3 -3
- package/plugins/access/identity/actions/session.js +2 -2
- package/plugins/access/identity/collections/credential.js +2 -2
- package/plugins/access/spaces/actions/agents.js +4 -7
- package/plugins/access/spaces/actions/archive.js +4 -5
- package/plugins/access/spaces/actions/can.js +4 -4
- package/plugins/access/spaces/actions/create.js +2 -2
- package/plugins/access/spaces/actions/invitation.js +12 -12
- package/plugins/access/spaces/actions/leave.js +2 -2
- package/plugins/access/spaces/actions/member.js +32 -37
- package/plugins/access/spaces/actions/org.js +19 -17
- package/plugins/access/spaces/actions/personal.js +5 -2
- package/plugins/access/spaces/actions/rename.js +4 -5
- package/plugins/access/spaces/actions/request.js +8 -13
- package/plugins/access/spaces/actions/share.js +2 -3
- package/plugins/access/spaces/collections/invitation.js +2 -2
- package/plugins/access/spaces/collections/profile.d.ts +61 -0
- package/plugins/access/spaces/collections/profile.js +41 -0
- package/plugins/access/spaces/collections/request.js +2 -2
- package/plugins/access/spaces/collections/space.js +31 -4
- package/plugins/access/spaces/contract.d.ts +32 -5
- package/plugins/access/spaces/contract.js +3 -0
- package/plugins/access/spaces/mod.d.ts +5 -0
- package/plugins/access/spaces/mod.js +13 -2
- package/plugins/access/spaces/processors/profile.d.ts +7 -0
- package/plugins/access/spaces/processors/profile.js +10 -0
- package/plugins/access/spaces/resources/commands.js +14 -4
- package/plugins/access/spaces/resources/tools.js +3 -1
- package/plugins/access/spaces/shared/can.d.ts +12 -0
- package/plugins/access/spaces/shared/can.js +24 -0
- package/plugins/access/spaces/shared/labels.js +23 -3
- package/plugins/access/spaces/shared/managers.js +1 -1
- package/plugins/access/spaces/shared/names.d.ts +61 -0
- package/plugins/access/spaces/shared/names.js +77 -0
- package/plugins/access/spaces/shared/profile.d.ts +21 -0
- package/plugins/access/spaces/shared/profile.js +27 -0
- package/plugins/access/spaces/shared/reach.d.ts +11 -1
- package/plugins/access/spaces/shared/reach.js +28 -3
- package/plugins/access/spaces/shared/rules.js +4 -2
- package/plugins/access/spaces/shared/seat.d.ts +9 -0
- package/plugins/access/spaces/shared/seat.js +22 -0
- package/plugins/access/spaces/views/elsewhere.d.ts +2 -1
- package/plugins/access/spaces/views/elsewhere.js +33 -8
- package/plugins/access/spaces/views/web/header.d.ts +3 -1
- package/plugins/access/spaces/views/web/header.js +5 -5
- package/plugins/access/spaces/views/web/invitation.d.ts +3 -1
- package/plugins/access/spaces/views/web/invitation.js +2 -2
- package/plugins/access/spaces/views/web/invitations.js +3 -1
- package/plugins/access/spaces/views/web/invited.js +3 -1
- package/plugins/access/spaces/views/web/inviting.js +5 -3
- package/plugins/access/spaces/views/web/members.js +25 -15
- package/plugins/access/spaces/views/web/org-members.d.ts +1 -1
- package/plugins/access/spaces/views/web/org-members.js +8 -7
- package/plugins/access/spaces/views/web/palette.js +18 -10
- package/plugins/access/spaces/views/web/panel.d.ts +3 -2
- package/plugins/access/spaces/views/web/panel.js +33 -17
- package/plugins/access/spaces/views/web/pending.d.ts +3 -1
- package/plugins/access/spaces/views/web/pending.js +5 -5
- package/plugins/access/spaces/views/web/sections.d.ts +31 -0
- package/plugins/access/spaces/views/web/sections.js +22 -0
- package/plugins/access/spaces/views/web/space.d.ts +4 -2
- package/plugins/access/spaces/views/web/space.js +25 -9
- package/plugins/access/spaces/views/web/spaces.js +3 -2
- package/plugins/access/spaces/views/web/style.d.ts +1 -1
- package/plugins/access/spaces/views/web/style.js +39 -0
- package/plugins/access/spaces/views/web/tabs.d.ts +18 -6
- package/plugins/access/spaces/views/web/tabs.js +24 -8
- package/plugins/access/spaces/views/web/tree.d.ts +3 -1
- package/plugins/access/spaces/views/web/tree.js +10 -9
- package/plugins/access/spaces/views/web/who.d.ts +14 -5
- package/plugins/access/spaces/views/web/who.js +25 -10
- package/plugins/access/spaces/views/where.js +9 -3
- package/plugins/access/spaces/web.js +16 -2
- package/plugins/agents/chat/actions/fork.js +2 -2
- package/plugins/agents/chat/actions/move.js +2 -2
- package/plugins/agents/chat/actions/send.js +24 -3
- package/plugins/agents/chat/actions/stop.js +9 -2
- package/plugins/agents/chat/collections/file.js +2 -2
- package/plugins/agents/chat/collections/message.d.ts +139 -0
- package/plugins/agents/chat/collections/message.js +42 -3
- package/plugins/agents/chat/collections/thread.d.ts +9 -0
- package/plugins/agents/chat/collections/thread.js +5 -3
- package/plugins/agents/chat/contract.d.ts +1 -0
- package/plugins/agents/chat/contract.js +1 -0
- package/plugins/agents/chat/processors/turn.js +20 -9
- package/plugins/agents/chat/shared/delivery.d.ts +2 -1
- package/plugins/agents/chat/shared/delivery.js +30 -3
- package/plugins/agents/chat/shared/origin.d.ts +22 -0
- package/plugins/agents/chat/shared/origin.js +11 -0
- package/plugins/agents/chat/shared/send.d.ts +5 -1
- package/plugins/agents/chat/shared/send.js +82 -2
- package/plugins/agents/chat/shared/types.d.ts +13 -2
- package/plugins/agents/chat/views/message.d.ts +4 -1
- package/plugins/agents/chat/views/message.js +19 -4
- package/plugins/agents/chat/views/participants.js +7 -1
- package/plugins/agents/chat/views/prompt.d.ts +3 -1
- package/plugins/agents/chat/views/prompt.js +12 -4
- package/plugins/agents/chat/views/terminal/agent-prompt.js +2 -2
- package/plugins/agents/chat/views/terminal/author.js +5 -1
- package/plugins/agents/chat/views/web/conversation.js +10 -2
- package/plugins/agents/chat/views/web/home.js +1 -1
- package/plugins/agents/chat/views/web/message.d.ts +2 -1
- package/plugins/agents/chat/views/web/message.js +7 -3
- package/plugins/agents/chat/views/web/style.d.ts +1 -1
- package/plugins/agents/chat/views/web/style.js +11 -6
- package/plugins/agents/chat/views/web/who.d.ts +3 -2
- package/plugins/agents/chat/views/web/who.js +6 -3
- package/plugins/agents/history/collections/outline.d.ts +15 -0
- package/plugins/agents/history/collections/outline.js +2 -0
- package/plugins/agents/history/collections/summary.d.ts +1 -1
- package/plugins/agents/history/mod.d.ts +8 -6
- package/plugins/agents/history/mod.js +8 -6
- package/plugins/agents/history/processors/compact.d.ts +1 -1
- package/plugins/agents/history/processors/compact.js +53 -28
- package/plugins/agents/history/resources/tools.js +4 -1
- package/plugins/agents/history/shared/lines.d.ts +5 -2
- package/plugins/agents/history/shared/lines.js +9 -2
- package/plugins/agents/history/views/history.js +5 -1
- package/plugins/agents/memory/collections/memory.js +17 -6
- package/plugins/agents/memory/mod.js +2 -2
- package/plugins/agents/memory/processors/extract.js +7 -3
- package/plugins/agents/memory/resources/context.d.ts +9 -1
- package/plugins/agents/memory/resources/context.js +7 -1
- package/plugins/agents/memory/resources/tools.js +11 -8
- package/plugins/agents/memory/shared/scope.d.ts +12 -3
- package/plugins/agents/memory/shared/scope.js +25 -6
- package/plugins/agents/memory/shared/search.d.ts +3 -1
- package/plugins/agents/memory/shared/search.js +10 -2
- package/plugins/agents/memory/views/context.d.ts +4 -1
- package/plugins/agents/memory/views/context.js +27 -11
- package/plugins/agents/memory/views/memory.d.ts +1 -0
- package/plugins/agents/memory/views/memory.js +4 -2
- package/plugins/agents/memory/views/terminal/memory.d.ts +4 -1
- package/plugins/agents/memory/views/terminal/memory.js +7 -2
- package/plugins/agents/memory/views/web/card.d.ts +4 -2
- package/plugins/agents/memory/views/web/card.js +4 -3
- package/plugins/agents/memory/views/web/list.d.ts +3 -1
- package/plugins/agents/memory/views/web/list.js +20 -9
- package/plugins/agents/memory/views/web/memories.js +5 -1
- package/plugins/agents/memory/views/web/pick.js +8 -5
- package/plugins/agents/memory/web.js +9 -1
- package/plugins/agents/routines/actions/create.js +24 -12
- package/plugins/agents/routines/actions/delete.js +2 -2
- package/plugins/agents/routines/actions/origin.d.ts +1 -0
- package/plugins/agents/routines/actions/origin.js +32 -0
- package/plugins/agents/routines/actions/pause.js +2 -2
- package/plugins/agents/routines/actions/resume.js +2 -2
- package/plugins/agents/routines/actions/run.js +4 -4
- package/plugins/agents/routines/actions/update.js +18 -10
- package/plugins/agents/routines/collections/routine.d.ts +14 -2
- package/plugins/agents/routines/collections/routine.js +14 -8
- package/plugins/agents/routines/collections/run.d.ts +9 -0
- package/plugins/agents/routines/collections/run.js +2 -0
- package/plugins/agents/routines/contract.d.ts +7 -1
- package/plugins/agents/routines/mod.d.ts +10 -2
- package/plugins/agents/routines/mod.js +14 -2
- package/plugins/agents/routines/resources/tools.js +64 -13
- package/plugins/agents/routines/shared/fire.d.ts +5 -2
- package/plugins/agents/routines/shared/fire.js +30 -14
- package/plugins/agents/routines/shared/routines.d.ts +17 -8
- package/plugins/agents/routines/shared/routines.js +33 -19
- package/plugins/agents/routines/shared/schedule.d.ts +5 -0
- package/plugins/agents/routines/shared/schedule.js +12 -1
- package/plugins/agents/routines/views/web/form.d.ts +4 -3
- package/plugins/agents/routines/views/web/form.js +29 -7
- package/plugins/agents/routines/views/web/new.js +1 -1
- package/plugins/agents/routines/views/web/page.d.ts +2 -1
- package/plugins/agents/routines/views/web/page.js +32 -10
- package/plugins/agents/routines/views/web/routines.d.ts +2 -1
- package/plugins/agents/routines/views/web/routines.js +1 -1
- package/plugins/agents/routines/views/web/step.js +3 -1
- package/plugins/agents/routines/views/web/style.d.ts +1 -1
- package/plugins/agents/routines/views/web/style.js +1 -0
- package/plugins/agents/routines/web.js +1 -1
- package/plugins/agents/skills/actions/create.js +2 -2
- package/plugins/agents/skills/actions/delete.js +2 -2
- package/plugins/agents/skills/actions/update.js +2 -2
- package/plugins/agents/skills/collections/skill.js +4 -4
- package/plugins/agents/skills/shared/write.d.ts +2 -3
- package/plugins/agents/skills/shared/write.js +2 -1
- package/plugins/agents/skills/views/web/page.js +7 -3
- package/plugins/agents/skills/web.js +3 -1
- package/plugins/agents/team/actions/agent.js +5 -6
- package/plugins/agents/team/collections/agent.js +3 -3
- package/plugins/billing/usage/actions/close.js +20 -1
- package/plugins/billing/usage/actions/org.js +43 -30
- package/plugins/billing/usage/actions/quote.d.ts +1 -0
- package/plugins/billing/usage/actions/quote.js +42 -0
- package/plugins/billing/usage/actions/rerate.js +22 -2
- package/plugins/billing/usage/collections/rollup.d.ts +80 -1
- package/plugins/billing/usage/collections/rollup.js +8 -0
- package/plugins/billing/usage/collections/usage.d.ts +71 -2
- package/plugins/billing/usage/collections/usage.js +24 -8
- package/plugins/billing/usage/mod.d.ts +12 -5
- package/plugins/billing/usage/mod.js +14 -5
- package/plugins/billing/usage/resources/commands.js +1 -1
- package/plugins/billing/usage/shared/rate.d.ts +30 -9
- package/plugins/billing/usage/shared/rate.js +73 -30
- package/plugins/billing/usage/shared/totals.d.ts +19 -3
- package/plugins/billing/usage/shared/totals.js +43 -13
- package/plugins/billing/usage/shared/use.d.ts +12 -1
- package/plugins/billing/usage/shared/use.js +9 -7
- package/plugins/billing/usage/views/terminal/totals.d.ts +6 -2
- package/plugins/billing/usage/views/terminal/totals.js +38 -6
- package/plugins/billing/usage/views/web/chart.d.ts +7 -5
- package/plugins/billing/usage/views/web/chart.js +43 -21
- package/plugins/billing/usage/views/web/numbers.d.ts +110 -37
- package/plugins/billing/usage/views/web/numbers.js +119 -31
- package/plugins/billing/usage/views/web/org.d.ts +12 -5
- package/plugins/billing/usage/views/web/org.js +164 -57
- package/plugins/billing/usage/views/web/style.d.ts +8 -5
- package/plugins/billing/usage/views/web/style.js +87 -10
- package/plugins/billing/usage/web.d.ts +4 -3
- package/plugins/billing/usage/web.js +4 -3
- package/plugins/compute/apps/actions/build.d.ts +1 -0
- package/plugins/compute/apps/actions/build.js +99 -0
- package/plugins/compute/apps/actions/configure.d.ts +1 -0
- package/plugins/compute/apps/actions/configure.js +72 -0
- package/plugins/compute/apps/actions/list.d.ts +1 -0
- package/plugins/compute/apps/actions/list.js +13 -0
- package/plugins/compute/apps/actions/meter.d.ts +1 -0
- package/plugins/compute/apps/actions/meter.js +43 -0
- package/plugins/compute/apps/actions/publish.d.ts +1 -0
- package/plugins/compute/apps/actions/publish.js +41 -0
- package/plugins/compute/apps/actions/redeploy.d.ts +1 -0
- package/plugins/compute/apps/actions/redeploy.js +26 -0
- package/plugins/compute/apps/actions/remove.d.ts +1 -0
- package/plugins/compute/apps/actions/remove.js +47 -0
- package/plugins/compute/apps/adapters/cloudrun.d.ts +90 -0
- package/plugins/compute/apps/adapters/cloudrun.js +353 -0
- package/plugins/compute/apps/adapters/front.d.ts +24 -0
- package/plugins/compute/apps/adapters/front.js +131 -0
- package/plugins/compute/apps/adapters/local.d.ts +15 -0
- package/plugins/compute/apps/adapters/local.js +139 -0
- package/plugins/compute/apps/adapters/tar.d.ts +29 -0
- package/plugins/compute/apps/adapters/tar.js +178 -0
- package/plugins/compute/apps/collections/app.d.ts +143 -0
- package/plugins/compute/apps/collections/app.js +60 -0
- package/plugins/compute/apps/contract.d.ts +73 -0
- package/plugins/compute/apps/contract.js +8 -0
- package/plugins/compute/apps/mod.d.ts +42 -0
- package/plugins/compute/apps/mod.js +67 -0
- package/plugins/compute/apps/resources/tools.d.ts +10 -0
- package/plugins/compute/apps/resources/tools.js +85 -0
- package/plugins/compute/apps/shared/archive.d.ts +24 -0
- package/plugins/compute/apps/shared/archive.js +69 -0
- package/plugins/compute/apps/shared/claims.d.ts +28 -0
- package/plugins/compute/apps/shared/claims.js +18 -0
- package/plugins/compute/apps/shared/environment.d.ts +8 -0
- package/plugins/compute/apps/shared/environment.js +15 -0
- package/plugins/compute/apps/shared/errors.d.ts +4 -0
- package/plugins/compute/apps/shared/errors.js +4 -0
- package/plugins/compute/apps/shared/host.d.ts +19 -0
- package/plugins/compute/apps/shared/host.js +19 -0
- package/plugins/compute/apps/shared/label.d.ts +21 -0
- package/plugins/compute/apps/shared/label.js +51 -0
- package/plugins/compute/apps/shared/meter.d.ts +17 -0
- package/plugins/compute/apps/shared/meter.js +29 -0
- package/plugins/compute/apps/shared/publish.d.ts +45 -0
- package/plugins/compute/apps/shared/publish.js +129 -0
- package/plugins/compute/apps/shared/settings.d.ts +49 -0
- package/plugins/compute/apps/shared/settings.js +22 -0
- package/plugins/compute/apps/views/web/apps.d.ts +54 -0
- package/plugins/compute/apps/views/web/apps.js +48 -0
- package/plugins/compute/apps/views/web/env.d.ts +54 -0
- package/plugins/compute/apps/views/web/env.js +195 -0
- package/plugins/compute/apps/views/web/publish.d.ts +24 -0
- package/plugins/compute/apps/views/web/publish.js +158 -0
- package/plugins/compute/apps/views/web/space.d.ts +16 -0
- package/plugins/compute/apps/views/web/space.js +138 -0
- package/plugins/compute/apps/views/web/style.d.ts +7 -0
- package/plugins/compute/apps/views/web/style.js +155 -0
- package/plugins/compute/apps/web.d.ts +17 -0
- package/plugins/compute/apps/web.js +35 -0
- package/plugins/compute/cloud/actions/create.d.ts +1 -0
- package/plugins/compute/cloud/actions/create.js +78 -0
- package/plugins/compute/cloud/actions/daily.d.ts +1 -0
- package/plugins/compute/cloud/actions/daily.js +75 -0
- package/plugins/compute/cloud/actions/destroy.d.ts +1 -0
- package/plugins/compute/cloud/actions/destroy.js +71 -0
- package/plugins/compute/cloud/actions/may.d.ts +1 -0
- package/plugins/compute/cloud/actions/may.js +15 -0
- package/plugins/compute/cloud/actions/org.d.ts +1 -0
- package/plugins/compute/cloud/actions/org.js +21 -0
- package/plugins/compute/cloud/actions/pool-tick.d.ts +4 -0
- package/plugins/compute/cloud/actions/pool-tick.js +96 -0
- package/plugins/compute/cloud/actions/pool.d.ts +3 -0
- package/plugins/compute/cloud/actions/pool.js +98 -0
- package/plugins/compute/cloud/actions/release.d.ts +1 -0
- package/plugins/compute/cloud/actions/release.js +58 -0
- package/plugins/compute/cloud/actions/remote.d.ts +10 -0
- package/plugins/compute/cloud/actions/remote.js +24 -0
- package/plugins/compute/cloud/actions/tick.d.ts +1 -0
- package/plugins/compute/cloud/actions/tick.js +95 -0
- package/plugins/compute/cloud/actions/touch.d.ts +1 -0
- package/plugins/compute/cloud/actions/touch.js +32 -0
- package/plugins/compute/cloud/actions/vms.d.ts +9 -0
- package/plugins/compute/cloud/actions/vms.js +213 -0
- package/plugins/compute/cloud/actions/wake.d.ts +1 -0
- package/plugins/compute/cloud/actions/wake.js +147 -0
- package/plugins/compute/cloud/adapters/gce/index.d.ts +73 -0
- package/plugins/compute/cloud/adapters/gce/index.js +242 -0
- package/plugins/compute/cloud/adapters/local.d.ts +48 -0
- package/plugins/compute/cloud/adapters/local.js +188 -0
- package/plugins/compute/cloud/collections/cloud-computer.d.ts +109 -0
- package/plugins/compute/cloud/collections/cloud-computer.js +89 -0
- package/plugins/compute/cloud/collections/pool-vm.d.ts +79 -0
- package/plugins/compute/cloud/collections/pool-vm.js +36 -0
- package/plugins/compute/cloud/collections/pool-want.d.ts +94 -0
- package/plugins/compute/cloud/collections/pool-want.js +27 -0
- package/plugins/compute/cloud/contract.d.ts +236 -0
- package/plugins/compute/cloud/contract.js +67 -0
- package/plugins/compute/cloud/mod.d.ts +95 -0
- package/plugins/compute/cloud/mod.js +193 -0
- package/plugins/compute/cloud/processors/mark.d.ts +9 -0
- package/plugins/compute/cloud/processors/mark.js +13 -0
- package/plugins/compute/cloud/shared/google.d.ts +75 -0
- package/plugins/compute/cloud/shared/google.js +218 -0
- package/plugins/compute/cloud/shared/host.d.ts +11 -0
- package/plugins/compute/cloud/shared/host.js +29 -0
- package/plugins/compute/cloud/shared/may.d.ts +13 -0
- package/plugins/compute/cloud/shared/may.js +23 -0
- package/plugins/compute/cloud/shared/meter.d.ts +29 -0
- package/plugins/compute/cloud/shared/meter.js +59 -0
- package/plugins/compute/cloud/shared/names.d.ts +10 -0
- package/plugins/compute/cloud/shared/names.js +11 -0
- package/plugins/compute/cloud/shared/people.d.ts +19 -0
- package/plugins/compute/cloud/shared/people.js +12 -0
- package/plugins/compute/cloud/shared/records.d.ts +25 -0
- package/plugins/compute/cloud/shared/records.js +10 -0
- package/plugins/compute/cloud/shared/settings.d.ts +75 -0
- package/plugins/compute/cloud/shared/settings.js +48 -0
- package/plugins/compute/cloud/shared/time.d.ts +19 -0
- package/plugins/compute/cloud/shared/time.js +31 -0
- package/plugins/compute/cloud/views/web/cloud.d.ts +78 -0
- package/plugins/compute/cloud/views/web/cloud.js +121 -0
- package/plugins/compute/cloud/views/web/computer.d.ts +37 -0
- package/plugins/compute/cloud/views/web/computer.js +195 -0
- package/plugins/compute/cloud/views/web/new.d.ts +27 -0
- package/plugins/compute/cloud/views/web/new.js +94 -0
- package/plugins/compute/cloud/views/web/style.d.ts +6 -0
- package/plugins/compute/cloud/views/web/style.js +84 -0
- package/plugins/compute/cloud/web.d.ts +19 -0
- package/plugins/compute/cloud/web.js +60 -0
- package/plugins/compute/computers/actions/allow-origin.d.ts +5 -0
- package/plugins/compute/computers/actions/allow-origin.js +48 -0
- package/plugins/compute/computers/actions/allowed.d.ts +1 -0
- package/plugins/compute/computers/actions/allowed.js +48 -0
- package/plugins/compute/computers/actions/approve.js +18 -10
- package/plugins/compute/computers/actions/code.js +11 -5
- package/plugins/compute/computers/actions/default.js +4 -8
- package/plugins/compute/computers/actions/enrollment.d.ts +1 -0
- package/plugins/compute/computers/actions/enrollment.js +49 -0
- package/plugins/compute/computers/actions/env.d.ts +3 -0
- package/plugins/compute/computers/actions/env.js +132 -0
- package/plugins/compute/computers/actions/forget-grant.d.ts +1 -0
- package/plugins/compute/computers/actions/forget-grant.js +16 -0
- package/plugins/compute/computers/actions/forget.js +2 -2
- package/plugins/compute/computers/actions/mark.d.ts +1 -0
- package/plugins/compute/computers/actions/mark.js +36 -0
- package/plugins/compute/computers/actions/move.js +5 -4
- package/plugins/compute/computers/actions/preview.d.ts +4 -0
- package/plugins/compute/computers/actions/preview.js +183 -0
- package/plugins/compute/computers/actions/provision.d.ts +1 -0
- package/plugins/compute/computers/actions/provision.js +51 -0
- package/plugins/compute/computers/actions/rename.js +2 -2
- package/plugins/compute/computers/actions/running.d.ts +1 -0
- package/plugins/compute/computers/actions/running.js +33 -0
- package/plugins/compute/computers/actions/scope.d.ts +1 -0
- package/plugins/compute/computers/actions/scope.js +61 -0
- package/plugins/compute/computers/actions/share.js +5 -4
- package/plugins/compute/computers/actions/unshare.js +5 -8
- package/plugins/compute/computers/actions/view.d.ts +1 -0
- package/plugins/compute/computers/actions/view.js +29 -0
- package/plugins/compute/computers/actions/work.js +41 -6
- package/plugins/compute/computers/collections/approval.d.ts +57 -5
- package/plugins/compute/computers/collections/approval.js +16 -4
- package/plugins/compute/computers/collections/computer.d.ts +70 -1
- package/plugins/compute/computers/collections/computer.js +18 -2
- package/plugins/compute/computers/collections/desk.d.ts +53 -0
- package/plugins/compute/computers/collections/desk.js +11 -3
- package/plugins/compute/computers/collections/env-var.d.ts +122 -0
- package/plugins/compute/computers/collections/env-var.js +51 -0
- package/plugins/compute/computers/collections/grant.d.ts +20 -3
- package/plugins/compute/computers/collections/grant.js +21 -5
- package/plugins/compute/computers/collections/preview.d.ts +111 -0
- package/plugins/compute/computers/collections/preview.js +58 -0
- package/plugins/compute/computers/contract.d.ts +18 -0
- package/plugins/compute/computers/contract.js +8 -0
- package/plugins/compute/computers/mod.d.ts +9 -1
- package/plugins/compute/computers/mod.js +46 -6
- package/plugins/compute/computers/processors/left.d.ts +8 -0
- package/plugins/compute/computers/processors/left.js +31 -0
- package/plugins/compute/computers/program/release.d.ts +10 -10
- package/plugins/compute/computers/program/release.js +7 -4
- package/plugins/compute/computers/program/version.d.ts +2 -0
- package/plugins/compute/computers/program/version.js +2 -0
- package/plugins/compute/computers/resources/commands.js +32 -17
- package/plugins/compute/computers/resources/downloads.d.ts +6 -2
- package/plugins/compute/computers/resources/downloads.js +15 -7
- package/plugins/compute/computers/resources/previews.d.ts +48 -0
- package/plugins/compute/computers/resources/previews.js +391 -0
- package/plugins/compute/computers/resources/tools.d.ts +11 -5
- package/plugins/compute/computers/resources/tools.js +101 -15
- package/plugins/compute/computers/shared/ask.d.ts +7 -3
- package/plugins/compute/computers/shared/ask.js +31 -10
- package/plugins/compute/computers/shared/asks.d.ts +2 -2
- package/plugins/compute/computers/shared/asks.js +3 -2
- package/plugins/compute/computers/shared/desks.d.ts +1 -5
- package/plugins/compute/computers/shared/desks.js +2 -11
- package/plugins/compute/computers/shared/env.d.ts +20 -0
- package/plugins/compute/computers/shared/env.js +50 -0
- package/plugins/compute/computers/shared/folder.d.ts +3 -1
- package/plugins/compute/computers/shared/folder.js +7 -3
- package/plugins/compute/computers/shared/grants.d.ts +26 -0
- package/plugins/compute/computers/shared/grants.js +49 -0
- package/plugins/compute/computers/shared/jobs.d.ts +13 -0
- package/plugins/compute/computers/shared/jobs.js +16 -0
- package/plugins/compute/computers/shared/preview-url.d.ts +5 -0
- package/plugins/compute/computers/shared/preview-url.js +5 -0
- package/plugins/compute/computers/shared/seal.d.ts +4 -0
- package/plugins/compute/computers/shared/seal.js +60 -0
- package/plugins/compute/computers/shared/settings.d.ts +30 -5
- package/plugins/compute/computers/shared/settings.js +10 -0
- package/plugins/compute/computers/shared/wake.d.ts +41 -0
- package/plugins/compute/computers/shared/wake.js +63 -0
- package/plugins/compute/computers/shared/where.d.ts +30 -7
- package/plugins/compute/computers/shared/where.js +79 -11
- package/plugins/compute/computers/shared/workloads.d.ts +50 -0
- package/plugins/compute/computers/shared/workloads.js +4 -0
- package/plugins/compute/computers/views/context.d.ts +6 -3
- package/plugins/compute/computers/views/context.js +80 -5
- package/plugins/compute/computers/views/terminal/approvals.js +3 -1
- package/plugins/compute/computers/views/web/add.d.ts +41 -0
- package/plugins/compute/computers/views/web/add.js +60 -0
- package/plugins/compute/computers/views/web/allowed.d.ts +16 -0
- package/plugins/compute/computers/views/web/allowed.js +38 -0
- package/plugins/compute/computers/views/web/asked.d.ts +26 -7
- package/plugins/compute/computers/views/web/asked.js +45 -10
- package/plugins/compute/computers/views/web/asks.d.ts +6 -2
- package/plugins/compute/computers/views/web/asks.js +29 -7
- package/plugins/compute/computers/views/web/calls.js +2 -1
- package/plugins/compute/computers/views/web/computer.d.ts +4 -1
- package/plugins/compute/computers/views/web/computer.js +21 -2
- package/plugins/compute/computers/views/web/connect.d.ts +18 -3
- package/plugins/compute/computers/views/web/connect.js +65 -40
- package/plugins/compute/computers/views/web/desks.d.ts +19 -8
- package/plugins/compute/computers/views/web/desks.js +67 -37
- package/plugins/compute/computers/views/web/env.d.ts +32 -0
- package/plugins/compute/computers/views/web/env.js +154 -0
- package/plugins/compute/computers/views/web/environment.d.ts +23 -0
- package/plugins/compute/computers/views/web/environment.js +47 -0
- package/plugins/compute/computers/views/web/jobs.d.ts +18 -6
- package/plugins/compute/computers/views/web/jobs.js +56 -21
- package/plugins/compute/computers/views/web/kinds.d.ts +102 -0
- package/plugins/compute/computers/views/web/kinds.js +37 -0
- package/plugins/compute/computers/views/web/mark.d.ts +7 -2
- package/plugins/compute/computers/views/web/mark.js +2 -2
- package/plugins/compute/computers/views/web/names.d.ts +3 -2
- package/plugins/compute/computers/views/web/names.js +5 -3
- package/plugins/compute/computers/views/web/page.d.ts +14 -2
- package/plugins/compute/computers/views/web/page.js +48 -26
- package/plugins/compute/computers/views/web/previews.d.ts +44 -0
- package/plugins/compute/computers/views/web/previews.js +33 -0
- package/plugins/compute/computers/views/web/routine-panel.d.ts +14 -0
- package/plugins/compute/computers/views/web/routine-panel.js +91 -0
- package/plugins/compute/computers/views/web/serve.d.ts +47 -0
- package/plugins/compute/computers/views/web/serve.js +168 -0
- package/plugins/compute/computers/views/web/space-tab.d.ts +4 -3
- package/plugins/compute/computers/views/web/space-tab.js +39 -9
- package/plugins/compute/computers/views/web/step.js +7 -1
- package/plugins/compute/computers/views/web/style.d.ts +1 -1
- package/plugins/compute/computers/views/web/style.js +166 -2
- package/plugins/compute/computers/views/web/workspace.d.ts +16 -3
- package/plugins/compute/computers/views/web/workspace.js +49 -6
- package/plugins/compute/computers/web.d.ts +17 -4
- package/plugins/compute/computers/web.js +32 -5
- package/plugins/compute/mod.d.ts +8 -1
- package/plugins/compute/mod.js +8 -1
- package/plugins/compute/web.d.ts +13 -0
- package/plugins/compute/web.js +13 -0
- package/plugins/interfaces/api/actions/create.js +2 -3
- package/plugins/interfaces/api/actions/revoke.js +2 -2
- package/plugins/interfaces/api/collections/key.d.ts +1 -1
- package/plugins/interfaces/api/collections/key.js +3 -3
- package/plugins/interfaces/api/mod.js +2 -0
- package/plugins/interfaces/api/processors/left.d.ts +6 -0
- package/plugins/interfaces/api/processors/left.js +12 -0
- package/plugins/interfaces/api/shared/actor.d.ts +3 -11
- package/plugins/interfaces/api/shared/actor.js +1 -23
- package/plugins/interfaces/api/shared/events.js +2 -2
- package/plugins/interfaces/api/shared/rules.d.ts +3 -10
- package/plugins/interfaces/api/shared/rules.js +8 -24
- package/plugins/interfaces/api/shared/server.js +1 -1
- package/plugins/interfaces/api/web.js +3 -1
- package/plugins/interfaces/web/views/frame.d.ts +3 -1
- package/plugins/interfaces/web/views/frame.js +2 -2
- package/plugins/interfaces/web/views/shell.js +2 -1
- package/plugins/interfaces/whatsapp/actions/connect.js +8 -10
- package/plugins/interfaces/whatsapp/actions/disconnect.js +3 -3
- package/plugins/interfaces/whatsapp/actions/link.js +10 -13
- package/plugins/interfaces/whatsapp/collections/phone.d.ts +2 -2
- package/plugins/interfaces/whatsapp/processors/receive.js +3 -10
- package/plugins/interfaces/whatsapp/shared/rules.d.ts +1 -3
- package/plugins/interfaces/whatsapp/shared/rules.js +1 -9
- package/plugins/interfaces/whatsapp/web.js +8 -1
- package/plugins/models/adapters/llm/openai-compatible.js +10 -4
- package/plugins/models/adapters/llm/openai.js +57 -7
- package/plugins/models/shared/choice.js +1 -1
- package/plugins/models/shared/generate.js +1 -1
- package/runtime/actor.d.ts +9 -0
- package/{plugins/compute/computers/shared/person.js → runtime/actor.js} +1 -0
- package/runtime/define.d.ts +6 -1
- package/runtime/errors.d.ts +18 -0
- package/runtime/errors.js +7 -0
- package/runtime/mod.d.ts +2 -0
- package/runtime/mod.js +2 -0
- package/runtime/owner.d.ts +13 -1
- package/runtime/owner.js +27 -0
- package/plugins/compute/computers/shared/person.d.ts +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,340 @@
|
|
|
1
|
+
## 1.0.0-rc.11 — 2026-10-31
|
|
2
|
+
|
|
3
|
+
- **A routine can run with nobody watching.** What its agent needs a yes for can now be allowed for
|
|
4
|
+
that routine alone: "Allow for this routine" on the card, or "What it can do without asking" on
|
|
5
|
+
its page (run commands, start jobs, change files, per computer), ahead of its first run. Allowing
|
|
6
|
+
it answers every run already stopped on the same thing. What a run waits on shows on the routine's
|
|
7
|
+
page, with the way to its chat. In the terminal: `/approve <n> routine`.
|
|
8
|
+
- **That yes covers only that routine's runs, as it was.** A run's work carries the routine as its
|
|
9
|
+
`origin`, on the actor (`originOf`, chat's contract), which only code can set: a person's own
|
|
10
|
+
message to the same agent still asks, even one claiming `via` a routine. Changing what a routine
|
|
11
|
+
does (what it asks, whom, as whom) makes a new version (`routine.rev`), which the yes doesn't
|
|
12
|
+
cover: its page says so and offers "Allow again". Name and schedule don't count. Where a
|
|
13
|
+
computer's owner keeps the answers, only they can say it (`computer.allowOrigin`).
|
|
14
|
+
- **Plugins can add to a routine's page:** the `routinePanels` resource (`{ view, order? }`), a View
|
|
15
|
+
given the routine.
|
|
16
|
+
- **Authorization is one model.** `personOf`, `forbidden`, `invalid`, `failure`, `people` and
|
|
17
|
+
`inPerson` come from the runtime; `may`, `must` and `mustOwnOr` from the spaces contract,
|
|
18
|
+
replacing seven `personOf` copies, about 25 hand-written checks and about 30 local error helpers.
|
|
19
|
+
`reachOf` is the only answer to what someone may do, and respects every limit on them.
|
|
20
|
+
- **Fixed: taking over a space.** A thread named after a space could be used to become its manager.
|
|
21
|
+
A document's memberships now live under its own name (`note:n1`), and only shared collections can
|
|
22
|
+
be named.
|
|
23
|
+
- **Fixed: keys left their space.** Actions that checked reach, then wrote as the system, ignored a
|
|
24
|
+
key's limit. Reach respects it now (`within`, which replaces `at` on a key's actor), and the API's
|
|
25
|
+
own narrowing rules are gone. Keys can't answer approvals.
|
|
26
|
+
- **Fixed: agents asked by agents ran as the agent that asked.** A turn is always its own agent, for
|
|
27
|
+
the person the work is for, including where a computer's owner answered.
|
|
28
|
+
- **Publishing is asked every time.** Nothing wider than once is offered or honored.
|
|
29
|
+
- **Approvals can be taken back,** from the Computer tab. What's allowed for a routine comes from
|
|
30
|
+
the routine (`origins` resource), not from what the caller says.
|
|
31
|
+
- **Roles are given one way** (`seat`): a granted request can't name a role that doesn't exist or
|
|
32
|
+
make an agent a manager, and custom roles count everywhere.
|
|
33
|
+
- **An archived space isn't written in,** which only views enforced before.
|
|
34
|
+
- **Replacing or rebuilding an app** takes its publisher or a manager. **Where a computer's owner
|
|
35
|
+
answers,** only they change anything on it directly; others still read it.
|
|
36
|
+
- **Leaving ends what someone left behind,** however they left: desks, yeses and keys for that
|
|
37
|
+
space, and out of the org, all of them and their own computers. Cloud computers stay for those who
|
|
38
|
+
run the org. A preview's cookie asks whether its person is still a member on each request.
|
|
39
|
+
- **Agents can hand work to other spaces.** `send_message` takes `space`: any space the person can
|
|
40
|
+
write in, listed in the agent's context with who answers there. A new chat opens there, visible to
|
|
41
|
+
its members and marked as delegated, for the same person; the answer comes back to the chat it
|
|
42
|
+
came from, and stopping that chat stops the work. An agent can't hand work to itself.
|
|
43
|
+
|
|
44
|
+
## 1.0.0-rc.10 — 2026-10-31
|
|
45
|
+
|
|
46
|
+
- **A routine made from a chat posts back in that chat.** `schedule_routine` keeps the chat it was
|
|
47
|
+
called from (`routine.thread`), where before no setting could reach it: `same` meant a new chat
|
|
48
|
+
made by the first run. `routine.create` takes `thread` (a chat in that space its maker can see),
|
|
49
|
+
and `post` now defaults to `same`, in the web form too. Its confirmation says where it posts. If
|
|
50
|
+
the chat is deleted or moved to another space, the run starts a new one and says why
|
|
51
|
+
(`routineRun.note`).
|
|
52
|
+
- **A new chat each run is a first-class choice,** for runs to open later (a daily analysis):
|
|
53
|
+
`post:
|
|
54
|
+
"new"`. Each chat is named by `chatName`, with `{name}`, `{date}`, `{time}` (its
|
|
55
|
+
timezone) and `{run}` filled in; by default its name and the day (and time, for `hours` and
|
|
56
|
+
`cron`), so runs no longer all share one name. Its agent may then name it for what it found, with
|
|
57
|
+
the new `name_chat` tool, offered only in those chats. The routine's page lists runs by their
|
|
58
|
+
chats' names. The form and the agent's confirmation say how many chats a day it comes to, when it
|
|
59
|
+
runs at least hourly.
|
|
60
|
+
- **A routine's messages say they're its.** `chat.send` takes `via` (`{ kind, name, path? }`): the
|
|
61
|
+
message is still its sender's, but shows "Routine: Pricing", linked to the routine, and agents
|
|
62
|
+
read `ana (via routine "Pricing"): …`, so they know nobody typed it just now. `chat.send` also
|
|
63
|
+
takes `title` and `renamable` for a new thread, in the same commit as its first message.
|
|
64
|
+
|
|
65
|
+
## 1.0.0-rc.9 — 2026-10-31
|
|
66
|
+
|
|
67
|
+
- **A space's page has a few tabs, and their sections.** A `spaceTabs` entry `under` another tab is
|
|
68
|
+
a section of it, listed in its menu, with an optional `group` heading; a tab with sections names
|
|
69
|
+
its own View among them (`own`) and shows them in a menu beside (`menu: "side"`) or as tabs above
|
|
70
|
+
(`top`, the default). A section's key opens its tab there (`?tab=memories`), so every address
|
|
71
|
+
still works, and the palette lists sections too. The tabs now: Chats, Board and Documents (an
|
|
72
|
+
app's), Computer (Computers, Environment, Apps), Routines and Settings (General, Members,
|
|
73
|
+
Memories, Skills, Channels: WhatsApp, API). Where there's no room for a menu beside (a phone),
|
|
74
|
+
Settings is a list to tap into, and a section says how to get back; in the side panel, sections
|
|
75
|
+
are tabs under the panel's. Who's waiting to join shows on Settings and on Members.
|
|
76
|
+
- **On phones, an app's page.** The viewport spans the screen (`viewport-fit=cover`; the composer
|
|
77
|
+
keeps clear of the home bar) and the keyboard resizes the page where browsers allow
|
|
78
|
+
(`interactive-widget`); pinching still zooms. The page never scrolls sideways or bounces as a
|
|
79
|
+
whole, and a tap is a tap (no double-tap zoom, no grey flash). On touch screens, text is 16px,
|
|
80
|
+
fields too at least (so Safari never zooms in on one you type in), and buttons, icon buttons,
|
|
81
|
+
fields and copy buttons are 44px targets (40px small).
|
|
82
|
+
- **A conversation scrolls up and down only.** What's wider (a table, code) scrolls in its own box;
|
|
83
|
+
text wraps; a file's chip and a tool call being written no longer widen it.
|
|
84
|
+
- **What an agent asks you never covers the conversation.** The command or the file it shows scrolls
|
|
85
|
+
within a few lines (a command can wrap into dozens), with a copy button, so the answers are always
|
|
86
|
+
in sight; the cards keep to at most 60% of the chat's height and scroll there.
|
|
87
|
+
|
|
88
|
+
## 1.0.0-rc.8 — 2026-10-31
|
|
89
|
+
|
|
90
|
+
- **Agents' prompts only grow, so the prompt cache keeps them whole.** A turn context (the
|
|
91
|
+
computers', the spaces elsewhere, memories, an app's) is sent after the conversation only when it
|
|
92
|
+
says something new: when its text isn't what the agent was last told there. The turn's first
|
|
93
|
+
message keeps what it was told (`told`, `[{ name, text }]`, a private field: people's reads come
|
|
94
|
+
without it), and later turns are sent it there. So each model call starts with the whole call
|
|
95
|
+
before it, tool steps and earlier contexts included, where before a turn's context, dropped the
|
|
96
|
+
next turn, cut the cached prefix at the turn's start. `Prompt.turn` is now `{ name, text }[]`:
|
|
97
|
+
what's new this turn.
|
|
98
|
+
- **OpenAI's newer models keep the prefix where told.** Since GPT-5.6, OpenAI caches only at
|
|
99
|
+
breakpoints: its implicit one falls at the end of the latest user message, the turn's context,
|
|
100
|
+
which the next turn didn't send, so a conversation reused only its system text. The Responses
|
|
101
|
+
adapter now marks a message with `cache` (the end of the history) with an explicit
|
|
102
|
+
`prompt_cache_breakpoint`, on the user's or tool's input at or before it. A model that refuses
|
|
103
|
+
breakpoints (earlier ones, other servers) is asked again without, and never again. What OpenAI
|
|
104
|
+
wrote to the cache is metered as `cacheWrite` (billed at a premium by models that report it).
|
|
105
|
+
- **Memory: the system text says how to remember; what's remembered is told.** The `memory` context
|
|
106
|
+
(system) is the guide alone, the same in every conversation, so the system text is cached across
|
|
107
|
+
all of an agent's conversations in a space. Core memories about who's here are the new
|
|
108
|
+
`remembered` turn context: those learned before the conversation began, told at its start and kept
|
|
109
|
+
there. Core memories learned since come up in `recall` when relevant (query `relevant` takes
|
|
110
|
+
`since`; `core` takes `before`), so a memory learned mid-conversation never rewrites its prompt.
|
|
111
|
+
- **History summarizes a message when it leaves the tail**, not when it comes: only then is its line
|
|
112
|
+
read (in the outline, or by `zoom`). A conversation that stays within the tail never calls the
|
|
113
|
+
summarizer; a longer one builds the same tree, in batches, as its tail shrinks. The outline keeps
|
|
114
|
+
the tail's message ids (`tailIds`); threads summarized before keep the lines they have.
|
|
115
|
+
- Measured on Compass's own plugins with real OpenAI calls (gpt-6.1-sol; a 12-turn conversation,
|
|
116
|
+
then a 4-turn one with tool steps, the same agent in the same space): the agent's calls read 95.5%
|
|
117
|
+
of their input from the prompt cache, up from 59.3%, and every model call in the run (memory
|
|
118
|
+
extraction included) 92.4%, up from 44.4%, with no summarizer call (101 before). A 24-turn
|
|
119
|
+
conversation that outgrew its tail: 92.4% for the agent, its one miss when the outline arrives
|
|
120
|
+
(the prompt is new from there).
|
|
121
|
+
|
|
122
|
+
## 1.0.0-rc.7 — 2026-10-30
|
|
123
|
+
|
|
124
|
+
- **Agents choose among a space's computers.** Every computer tool (the terminal, jobs, files, the
|
|
125
|
+
browser, web search, `preview`, and the apps' `publish`) takes `computer`: one of the space's
|
|
126
|
+
computers by its name (any case, or part of it when only one has it) or its id; the space's
|
|
127
|
+
default otherwise. An unknown or ambiguous name, or a computer that's offline, is told with the
|
|
128
|
+
ones to choose from; naming a cloud computer that's asleep wakes it. Each turn, an agent's context
|
|
129
|
+
lists the space's computers (whose, a cloud computer or a machine, how it is now, its system, what
|
|
130
|
+
it asks first, the default marked) when there are several; one stays as it was. In a space with
|
|
131
|
+
several, an answer says the computer it came from (`computer`), and the web's tool steps show it.
|
|
132
|
+
- **A job is found on whichever computer runs it:** `computer.preview` and `computer.scope` (and so
|
|
133
|
+
`app.publish` and the agents' `preview` and `publish`) take a job without a computer and look for
|
|
134
|
+
it on the space's computers that are online, the default first. `computer.preview`,
|
|
135
|
+
`computer.scope`, `computer.allowed` and `app.publish` take `computer` (a name or an id).
|
|
136
|
+
- **The default computer** is named so on the web (a "Default" badge, "Make it the default") and in
|
|
137
|
+
`/computers`.
|
|
138
|
+
- **Apps: what serves a preview serves the app.** A folder with no Dockerfile is built into an image
|
|
139
|
+
made for it (no more buildpacks, which found nothing to build in a plain folder): the computer's
|
|
140
|
+
system (Debian 12) with Node.js 24 and Python, the folder as it was sent, its dependencies
|
|
141
|
+
installed again (npm, pnpm, yarn; `requirements.txt`) and its `build` script run, then its job's
|
|
142
|
+
command behind a front that passes the platform's port on to the job's port on localhost,
|
|
143
|
+
WebSockets included. A job bound to `127.0.0.1` (as previews allow) is served all the same; the
|
|
144
|
+
job is given its own port as `PORT`. `AppHost.build` answers the port its image serves on. Without
|
|
145
|
+
a Dockerfile, an app is published from its job (its command).
|
|
146
|
+
- **A space's environment: variables and secrets.** Each space has its own (collection `envVar`,
|
|
147
|
+
`{ name, value, secret, computers, by, at }`, names like `API_URL`). Its managers change it
|
|
148
|
+
(`env.set` `{ in, name, value?, secret?, computers? }`, `env.unset`); its members read names and
|
|
149
|
+
the values of variables. A secret is sealed at rest (AES-GCM, with the new `computers: { key }`
|
|
150
|
+
resource, else kept as given) and never read back by anyone: people see only that it's there (and
|
|
151
|
+
a long one's last 4 characters), agents only its name. Every job and shell started in the space,
|
|
152
|
+
from the web or by an agent, gets the variables with `computers` (true unless said), under its own
|
|
153
|
+
`env` (`jobs.start` and `terminal` take `env`; the `start_job` tool too); a job kept running keeps
|
|
154
|
+
its env on the computer's disk and starts again with it. A secret given to computers can be read
|
|
155
|
+
by any process there, and the web says so where it's given. Agents' computer context lists the
|
|
156
|
+
names they have (`$NAME`), never a value.
|
|
157
|
+
- **Apps get the space's environment.** An app is deployed with all of its space's variables and
|
|
158
|
+
secrets, and its own over them (`envVar` with `app`; queries `here` and `apps`), passed to Cloud
|
|
159
|
+
Run as its env. `app.configure` `{ app, env? }` (its publisher, or the space's managers) changes
|
|
160
|
+
its own and deploys its image again with them, without a build (the port the image serves is kept
|
|
161
|
+
as `served`). A change to the space's environment doesn't redeploy anything: it reaches an app
|
|
162
|
+
when it's published again, or at once with "Apply to apps". Taking an app down removes its own
|
|
163
|
+
environment (`env.unset` `{ in, app }`).
|
|
164
|
+
- **Web: Environment.** A space's Environment tab lists its variables (a secret masked, whether its
|
|
165
|
+
computers get it, who set it and when); its managers add, change and remove them, with the honest
|
|
166
|
+
limit shown beside a secret given to computers. Under it, its live apps and "Apply to apps"
|
|
167
|
+
(through computers' new `envActions` resource). An app's row opens its environment: the space's
|
|
168
|
+
shown, its own edited, saved with a redeploy. The job start form takes its own environment
|
|
169
|
+
(`NAME=value` lines). The toolkit's `Time` also draws on a server.
|
|
170
|
+
- **People by name, everywhere:** agents' prompts, notes, the terminal and the web show a person's
|
|
171
|
+
name where they showed their id (`google:1139…`). The spaces plugin keeps each person's profile
|
|
172
|
+
(collection `profile`: their name as sign-in verified it, else their email's name, and picture;
|
|
173
|
+
never their email), from the identity plugin's `person` as it changes, at `org.join`, and on
|
|
174
|
+
`space.personal` (each page load), so people known before it get one the next time they come.
|
|
175
|
+
Anyone in the org reads names through the query `profile.names` `{ ids }` (a browser reads
|
|
176
|
+
profiles only through it); two people of one name stay apart ("Ana (2762)"). The new `names`
|
|
177
|
+
resource says where names are (`{ collection: "profile" }`), and the spaces contract (and
|
|
178
|
+
`copilotz/plugins/access`) gives `nameOf`, `namesOf`, `namesIn` (Views), `namesFor` (Actions,
|
|
179
|
+
Processors, tools), `withNames`, `idsIn` and `PROFILE`. A sign-in's id is never shown as a name:
|
|
180
|
+
without a profile, it's "someone".
|
|
181
|
+
- **Agents' prompts:** others' messages read "Ana Lima: …", "People here:" names people, a
|
|
182
|
+
conversation's space is "Ana Lima's Personal space", the computers context says whose computer it
|
|
183
|
+
is and who says yes by name, as do waiting asks, routines (who made one, whom it runs as), history
|
|
184
|
+
summaries and zoom, and recall. Memory extraction writes names, and `remember`'s `about` takes a
|
|
185
|
+
person by name.
|
|
186
|
+
- **Notes and summaries written before names:** a memory or a summary that says someone's id
|
|
187
|
+
(`google:1139…'s cloud computer…`) reads with their name wherever it shows (prompts, recall, the
|
|
188
|
+
Memories page, the terminal), substituted when it's shown: nothing stored is changed, and nothing
|
|
189
|
+
needs migrating.
|
|
190
|
+
- **The web:** the Members tab (people, requests to join, invitations), the space header's faces,
|
|
191
|
+
other people's Personal spaces ("Ana Lima's Personal"), invitations ("Ana Lima invited you"), chat
|
|
192
|
+
messages and the conversation's people, memories (grouped, by whom, search), routines, skills
|
|
193
|
+
("Made by"), apps ("by"), computers (whose each is, who asks first, who started a job or made a
|
|
194
|
+
preview), usage and the org's people show names. **The terminal:** `/computers`, `/approvals`,
|
|
195
|
+
`/requests`, `/grant`, `/invitations`, memories and messages, likewise; `/remove` takes a person's
|
|
196
|
+
id with a colon (`google:1139…`).
|
|
197
|
+
- **Share refusals** name the spaces a write would reveal ("Ana Lima's Personal space"), not their
|
|
198
|
+
ids. An org invitation made by a space invitation says who invited them.
|
|
199
|
+
|
|
200
|
+
## 1.0.0-rc.6 — 2026-10-30
|
|
201
|
+
|
|
202
|
+
- **Computer program:** an app on another machine over plain `ws:` (an `http://` address that isn't
|
|
203
|
+
localhost) fails at once, saying to use https, instead of waiting to connect forever: Oxian
|
|
204
|
+
refuses plain `ws:` but to this machine.
|
|
205
|
+
- **Cloud pools:** a pool grown for a wake isn't shrunk while its VM boots. `pool.take` records what
|
|
206
|
+
it waits for (`poolWant`), and `pool.tick` sizes each pool to its floor, the takes of the last 2
|
|
207
|
+
minutes and the wakes still waiting. Before, the next minute's sizing set the pool back to its
|
|
208
|
+
floor, deleting the VM a wake had grown it for before it connected.
|
|
209
|
+
- **Cloud computers:** `cloudComputer.sizes` also says whether the person asking may make one now
|
|
210
|
+
(`create`, and `why` not: `admins`, `budget`), and the warm and view minutes; `cloud.may` says
|
|
211
|
+
just that. The web's "Use a cloud computer" choice shows why it can't be picked, and the copy says
|
|
212
|
+
the app's minutes.
|
|
213
|
+
- **Cloud computers shared into a space:** each computer's state is kept on it and its desks
|
|
214
|
+
(`status`: `{ kind: "cloud", state, size }`, set with the new system Action `computer.mark`, as
|
|
215
|
+
the cloud plugin sees it change), so the space's members see how anyone's is (asleep, waking,
|
|
216
|
+
awake), not "offline".
|
|
217
|
+
- **Previews:** `preview.here` records carry their address (`url`); the web no longer works it out.
|
|
218
|
+
`computer.preview` and `computer.scope` take a `desk` (one of the space's), and so does
|
|
219
|
+
`app.publish`: the web makes previews and publishes apps from the computer it's on, not the
|
|
220
|
+
space's default.
|
|
221
|
+
- **Apps:** an agent's `publish` asks its person with where the app will be ("wants to publish Shop
|
|
222
|
+
at https://shop.copilotz.app").
|
|
223
|
+
- **`org.me`** isn't recorded (it only reads), so reads (queries, Views) ask it too.
|
|
224
|
+
- **The local cloud host** is one per app and account, whichever executor asks: with several
|
|
225
|
+
executors, a VM one started was turned away by another.
|
|
226
|
+
|
|
227
|
+
## 1.0.0-rc.5 — 2026-10-30
|
|
228
|
+
|
|
229
|
+
- **Cloud computers** (plugin `cloud`, see design/cloud-computers.md): computers the app hosts for
|
|
230
|
+
its people. A cloud computer is a disk; a VM from a pool serves it for one wake, then goes.
|
|
231
|
+
`cloud.create` `{ size, in?, name? }` makes one (an org's owners and admins, or its members when
|
|
232
|
+
the settings say, under the org's monthly `budgetUsd`); work for one that's asleep wakes it (a few
|
|
233
|
+
seconds; about 30 from cold); unused for `warmMinutes` (10) it's released, and after `coldDays`
|
|
234
|
+
(7) it goes cold, kept as a snapshot. A person with it open (`computer.view`, every few minutes
|
|
235
|
+
from its panel) keeps it awake up to `viewMinutes` (120). Its agents ask their person nothing
|
|
236
|
+
first (the `cloud` settings' `approve`, `[]` by default, in place of the computers plugin's;
|
|
237
|
+
publishing an app is always asked). `cloud.destroy`, `cloud.org`, queries `cloudComputer.mine` and
|
|
238
|
+
`cloudComputer.sizes` (each size priced an hour). Hosts are adapters: Compute Engine (`gceHost`:
|
|
239
|
+
managed instance groups as pools, pd-balanced disks, VMs admitted by their Google identity tokens)
|
|
240
|
+
and a local one for development and tests. Metered under `computer` as `cloud/<size>` (VM
|
|
241
|
+
seconds), `cloud/disk` and `cloud/snapshot` (GB-hours).
|
|
242
|
+
- **Cloud pools** (plugin `cloudPool`): the pools' VMs, where they connect (the `pool` worker kind),
|
|
243
|
+
and the Actions `cloud` reaches them through: `pool.take`, `pool.serve`, `pool.stop`, `pool.drop`,
|
|
244
|
+
`pool.renew`, and `pool.tick` each minute (pools sized by the hour). Each VM given is leased:
|
|
245
|
+
renewed each minute while its computer uses it, deleted once nobody does. A VM serving a computer
|
|
246
|
+
connects again as itself when its socket drops, until it's told to stop; then, or gone, never
|
|
247
|
+
again. One runtime has both plugins; an app of many orgs runs `cloudPool` once (its directory's
|
|
248
|
+
runtime, needing nothing else) and gives each org's runtime `remotePool(call, org)`, the same
|
|
249
|
+
Actions forwarded there, each org touching only its own VMs.
|
|
250
|
+
- **Computer program:** `computer pool --app <url>`, a free VM of an app's pool: it waits to serve a
|
|
251
|
+
computer, mounts its disk, and runs it, connected at the address it's told (its org's). Given the
|
|
252
|
+
app's socket (`wss://…`), its identity is still for the app's https origin. scripts/cloud has a
|
|
253
|
+
Google Cloud project's setup and the pool VMs' startup script.
|
|
254
|
+
- **Previews:** what a job serves, at `https://<computer>-preview.<domain>`, carried to the computer
|
|
255
|
+
over its own connection (no inbound network), streamed both ways (`computer.http`). For a space's
|
|
256
|
+
members (a signed cookie, given by the app) or anyone with the link. `computer.preview`,
|
|
257
|
+
`computer.previews`, `computer.unpreview`, and the agents' `preview` tool. Settings
|
|
258
|
+
`computers.previews` `{ domain, key }`. WebSockets aren't carried yet.
|
|
259
|
+
- **Apps** (plugin `apps`): what a job serves, published to run on its own at
|
|
260
|
+
`https://<label>.copilotz.app`. The space's folder is archived by its computer
|
|
261
|
+
(`computer.archive`), built (its Dockerfile, else buildpacks) and deployed as a service that
|
|
262
|
+
scales to zero. `app.publish` (and the agents' `publish` tool, always asked), `app.list`,
|
|
263
|
+
`app.redeploy`, `app.remove`; builds and running metered under `app`. Hosts: Cloud Run
|
|
264
|
+
(`cloudRun`) and a local one (`localApps`).
|
|
265
|
+
- **Apps' safety:** services and images are named `cz-app-<name>` (an app never replaces another
|
|
266
|
+
service in its project); builds run as `cz-build@<project>` (`buildServiceAccount`), never the
|
|
267
|
+
project's default service account, as they run the app's own Dockerfile. `app.publish`'s `port`
|
|
268
|
+
wins over its job's.
|
|
269
|
+
- **Previews' safety:** a preview's `Set-Cookie` loses its `Domain` (no preview sets cookies for the
|
|
270
|
+
domain's other hosts); a request with several `cz_preview` cookies gets in when any is its host's.
|
|
271
|
+
- **Jobs** can say their `port` (a preview's) and be kept (`keep`): a kept job runs again when its
|
|
272
|
+
computer wakes.
|
|
273
|
+
- **A person's panel** (`computer.work`): `wake` wakes a computer that sleeps (its page opened);
|
|
274
|
+
what only reads (`jobs.list`, `jobs.logs`, `files.list`, `files.read`, `search`) neither wakes it
|
|
275
|
+
nor keeps it awake, so a page left open lets it sleep (`computer.view` keeps it awake while
|
|
276
|
+
viewed, up to the limit). A computer the app makes says what its agents ask about
|
|
277
|
+
(`computer.provision`'s `approve`, kept on it and its desks).
|
|
278
|
+
- **On the web** (`copilotz/plugins/compute/web`: `computersWeb`, `cloudWeb`, `appsWeb`):
|
|
279
|
+
- adding a computer is one choice: a cloud computer (its sizes, priced an hour), your own machine,
|
|
280
|
+
or one of yours;
|
|
281
|
+
- a cloud computer shows its state, how long it's been awake and about what that came to; asleep,
|
|
282
|
+
waking it, with honest progress; deleting it, asked first;
|
|
283
|
+
- a job serving a port can be previewed (members, or anyone with the link), opened, copied and
|
|
284
|
+
published as an app (live as it builds), and a space has an Apps tab;
|
|
285
|
+
- jobs can be kept running.
|
|
286
|
+
- **Web host:** routes by host (`{ host }` beside `{ path }`); a trusted front (`front`: a secret
|
|
287
|
+
header and the host it forwards) for apps behind a proxy; orgs claim hosts in the directory
|
|
288
|
+
(`orgHost`), resolved at `/__copilotz/hosts/resolve`.
|
|
289
|
+
- **Runtime:** `runtime.workers.dispatch(kind, id, workload, body?)`, for host code (a route)
|
|
290
|
+
streaming work to a connected worker.
|
|
291
|
+
- **Usage:** `usage.quote` prices quantities as a use would be, without recording one.
|
|
292
|
+
|
|
293
|
+
## 1.0.0-rc.4 — 2026-10-30
|
|
294
|
+
|
|
295
|
+
- **Usage: every use has a price.** It's the cost (a margin of 0) unless the app's price book says
|
|
296
|
+
otherwise: rates of its own, or a gross `margin` on the cost (`{ margin: 0.9 }` is ten times the
|
|
297
|
+
cost), from its `since` date on. `markup` is gone: a margin says it. Uses recorded before count at
|
|
298
|
+
their cost, in totals and when re-rated.
|
|
299
|
+
- **Usage: by part.** Each record keeps its cost and price by part (input, cache reads, cache
|
|
300
|
+
writes, output, reasoning…) and what caching saved; totals and rollups sum them.
|
|
301
|
+
- **Usage: people see prices.** `usage.totals`, `usage.org` and `usage.calls` give people prices
|
|
302
|
+
only; costs (and so margins) only platform staff and the system. Each of `usage.org` and
|
|
303
|
+
`usage.calls` says whether it shows costs (`costs`).
|
|
304
|
+
- **Usage page and `/usage`:** spend (the price) everywhere, with caching visible: hit rate, what
|
|
305
|
+
reading and writing the cache was charged, and what it saved, overall and by model; cached tokens
|
|
306
|
+
in the chart and in each call. Platform staff also see cost and gross margin, marked staff-only.
|
|
307
|
+
- **Models:** OpenAI-compatible providers' cache reads and writes are read as each reports them
|
|
308
|
+
(DeepSeek's cache hits, Moonshot's cached tokens, OpenRouter's cache writes).
|
|
309
|
+
|
|
310
|
+
## 1.0.0-rc.3 — 2026-10-30
|
|
311
|
+
|
|
312
|
+
- **Computers:** connecting one more app (`computer install <app> --code`) no longer stops the
|
|
313
|
+
computer running in the background: it enrolls beside it, then that one starts again with every
|
|
314
|
+
app. Turned away, the background one runs on as it was (before, a code refused while it was
|
|
315
|
+
stopping left it stopped). The state's lock waits a moment for one that's stopping.
|
|
316
|
+
- **Computers:** a new app's folder never takes the name of a space folder kept in the root by a
|
|
317
|
+
computer from before apps had folders of their own.
|
|
318
|
+
- **Install script:** it always says, last, how the terminal it ran in gets `computer` (new ones
|
|
319
|
+
have it).
|
|
320
|
+
|
|
321
|
+
## 1.0.0-rc.2 — 2026-10-30
|
|
322
|
+
|
|
323
|
+
- **Orgs:** an org's socket is in its own address (`/o/<org>/oxian`), beside the shared `/oxian`, so
|
|
324
|
+
a browser that sends no cookies with a WebSocket (Safari) reaches its org. The web host's page
|
|
325
|
+
says which socket to use (`socket`) and its base (`base`).
|
|
326
|
+
- **Web:** a person shows as their name, from their profile, not as their id: the viewer has a
|
|
327
|
+
`label` beside its `name`, which the shell's account menu and the chat's greeting use.
|
|
328
|
+
- **Computers:** one machine serves many apps, or many orgs of one. Each is a computer of its own
|
|
329
|
+
there, with its own id and secret, all in one program; a state kept before becomes its one
|
|
330
|
+
connection. `computer list` says which and where; `computer disconnect <app-url>` leaves one. An
|
|
331
|
+
org's spaces go in a folder named for the org (`~/Copilotz/acme-studio`, `~/Copilotz/personal`): a
|
|
332
|
+
code made on an org says it (`folder`), and the install lines pass it on (`--folder`).
|
|
333
|
+
- **The computer program's release:** each release on GitHub has it, made by the publish workflow on
|
|
334
|
+
a Mac. When the program is the same as the last release's (`source` in its manifest), the release
|
|
335
|
+
has that one's binaries, version and all, so computers don't download what they have.
|
|
336
|
+
`computerDownloads()` serves this Copilotz's own release by default.
|
|
337
|
+
|
|
1
338
|
## 1.0.0-rc.1 — 2026-10-30
|
|
2
339
|
|
|
3
340
|
Copilotz 1.0 is a new runtime, written from scratch: one runtime for agents and the apps around
|
package/README.md
CHANGED
|
@@ -22,10 +22,10 @@ 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.
|
|
26
|
-
the imports below are the same everywhere. Some pieces need a package of their own, installed
|
|
27
|
-
it: `esbuild` to bundle the web host on Node, `@electric-sql/pglite` for PostgreSQL in the
|
|
28
|
-
and `@types/react` for the front ends' types.
|
|
25
|
+
On Deno, name it `copilotz` in `deno.json` (`"copilotz": "jsr:@copilotz/copilotz@^1.0.0-rc.11"`),
|
|
26
|
+
and the imports below are the same everywhere. Some pieces need a package of their own, installed
|
|
27
|
+
beside it: `esbuild` to bundle the web host on Node, `@electric-sql/pglite` for PostgreSQL in the
|
|
28
|
+
process, and `@types/react` for the front ends' types.
|
|
29
29
|
|
|
30
30
|
## A first app
|
|
31
31
|
|
|
@@ -196,18 +196,26 @@ each socket to the runtime of the org its request is for:
|
|
|
196
196
|
## Installing a computer
|
|
197
197
|
|
|
198
198
|
People's computers run the computer program (`plugins/compute/computers/program/`), a single
|
|
199
|
-
executable for macOS, Linux and Windows
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
node scripts/computer/build.ts # dist/computer/<version>/: a binary per platform (by Bun),
|
|
203
|
-
# install.sh, install.ps1, manifest.json (sizes, SHA-256)
|
|
204
|
-
```
|
|
199
|
+
executable for macOS, Linux and Windows. Each Copilotz release on GitHub has it (`v<version>`: a
|
|
200
|
+
binary per platform, `install.sh`, `install.ps1`, and `manifest.json` with their sizes and SHA-256),
|
|
201
|
+
and an app serves it from there by default:
|
|
205
202
|
|
|
206
203
|
```ts
|
|
207
204
|
import { computerDownloads } from "copilotz/plugins/compute/downloads";
|
|
208
205
|
|
|
209
|
-
plugins: [...plugins, await computerDownloads(
|
|
210
|
-
plugins: [...plugins, await computerDownloads({
|
|
206
|
+
plugins: [...plugins, await computerDownloads()], // this Copilotz's release
|
|
207
|
+
plugins: [...plugins, await computerDownloads({ dir: "dist/computer/1.0.0-rc.11" })], // its own: /computer/download/
|
|
208
|
+
plugins: [...plugins, await computerDownloads({ url: "https://downloads.example.com/computer/" })], // or elsewhere
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
The publish workflow makes it when a `v1.*` tag is pushed, on a Mac (the macOS binaries are signed
|
|
212
|
+
there). A release whose program is the same as the last one's (`source` in the manifest: a hash of
|
|
213
|
+
its code, without its version, its install scripts and the Bun that builds it) has that release's
|
|
214
|
+
binaries, version and all, so computers don't update to what they have. To build one yourself:
|
|
215
|
+
|
|
216
|
+
```sh
|
|
217
|
+
node scripts/computer/build.ts # dist/computer/<version>/
|
|
218
|
+
node scripts/computer/build.ts --reuse <url> # that release's, when it's the same program
|
|
211
219
|
```
|
|
212
220
|
|
|
213
221
|
A space's Computer tab (or `/computer connect`) then gives the one line to run on the machine, for
|
|
@@ -232,6 +240,11 @@ and its binary's URL, size and SHA-256; it checks them, and that the new one run
|
|
|
232
240
|
starts again. The binaries aren't signed yet, so macOS and Windows warn about one downloaded with a
|
|
233
241
|
browser; the line doesn't need that.
|
|
234
242
|
|
|
243
|
+
One machine can serve several apps, or several orgs of one: run the line from each, and each is a
|
|
244
|
+
computer of its own there, in one program. Each one's spaces go in a folder of its own under
|
|
245
|
+
`~/Copilotz`, named for the org (the line from an org says it: `--folder acme`), else for the app's
|
|
246
|
+
host. `computer list` says which and where; `computer disconnect <app-url>` leaves one.
|
|
247
|
+
|
|
235
248
|
## Plugins
|
|
236
249
|
|
|
237
250
|
Plugins come in themes. Every plugin is a plain object, and its settings are a resource under its
|
|
@@ -369,9 +382,15 @@ name, never by importing its code.
|
|
|
369
382
|
billing; billing builds on models. An app records its own uses with `usage.record`.
|
|
370
383
|
- **Rated as recorded,** so a record keeps what applied. Cost comes from `resources.cost` (the
|
|
371
384
|
app's rates: negotiated, a subscription at 0, compute by the second), else from the catalog's
|
|
372
|
-
prices
|
|
373
|
-
|
|
374
|
-
|
|
385
|
+
prices (each kind of token at its own: input, cache reads and writes, output, reasoning). The
|
|
386
|
+
price is the cost, a margin of 0, unless `resources.price` says otherwise: rates of its own, or
|
|
387
|
+
a gross margin on the cost (`{ "*": { margin: 0.2 }, "cloud/*": { margin: 0.9 } }`: 0.9 is ten
|
|
388
|
+
times the cost). Rates are keyed by subject, then `provider/*`, then the catalog, then `*`, and
|
|
389
|
+
dated lists apply each rate from its `since`, so a new margin applies from its date on. Each
|
|
390
|
+
record keeps its cost and price by part too, and what caching saved. A use nothing prices is
|
|
391
|
+
kept and flagged `unpriced`.
|
|
392
|
+
- **People see prices** (what they're charged); costs, and so margins, only platform staff and the
|
|
393
|
+
system.
|
|
375
394
|
- **Totals** by any field or tag, summed by the store (`aggregate`) over indexed fields (time,
|
|
376
395
|
meter, subject, thread; more from the app:
|
|
377
396
|
`collections: { usage: { indexes: [["tags.tenant", "at"]] } }`):
|
|
@@ -386,7 +405,8 @@ name, never by importing its code.
|
|
|
386
405
|
- **Re-rating** (`usage.rerate`) never changes a record: it appends adjustments, dated when made,
|
|
387
406
|
and totals follow.
|
|
388
407
|
- **On the web** (`usageWeb`): an org's Usage page, day by day and against the period before, by
|
|
389
|
-
person, agent and model
|
|
408
|
+
person, agent and model, with what the cache read, wrote and saved; owners and admins see
|
|
409
|
+
everyone's, anyone else their own.
|
|
390
410
|
|
|
391
411
|
**`compute/`**: **`computers`**, machines people connect (the computer program in
|
|
392
412
|
`computers/program/`, a worker of the plugin's `computer` kind) and their desks, one per space
|
package/hosts/orgs/mod.d.ts
CHANGED
|
@@ -19,18 +19,34 @@
|
|
|
19
19
|
* - `POST /signout`: out of the directory and every org.
|
|
20
20
|
* - `/o/<org>/…`: that org, by its address, for what reaches it without a
|
|
21
21
|
* browser's session: its API (a key), its webhooks (signed), its
|
|
22
|
-
* computers'
|
|
22
|
+
* computers' downloads. The org's own handlers say who may.
|
|
23
|
+
* - `/o/<org>/oxian`: that org's socket, for its pages and its computers
|
|
24
|
+
* (a ticket or a computer's credentials say who); no cookie needed.
|
|
23
25
|
* - Staff's console: `GET /console/orgs`; `POST /console/orgs/<id>`
|
|
24
26
|
* `{ suspended?, name? }`; `POST …/<id>/move` `{ schema }` (its rows to
|
|
25
27
|
* another schema); `GET …/<id>/export` (its rows, as SQL); `POST
|
|
26
28
|
* …/<id>/delete` `{ confirm: <its name> }`. The app does the rows'
|
|
27
29
|
* part (`operations`). Staff enter any org with `/orgs/enter`.
|
|
30
|
+
* - Hosts orgs claimed (`claimHost` in an org's `directory` resource: a
|
|
31
|
+
* preview's `<id>-preview.copilotz.app`, an app's): with the app's own
|
|
32
|
+
* hosts named (`hosts`), a request to any other host is the org's that
|
|
33
|
+
* claimed it, answered by its runtime's routes by host alone (never its
|
|
34
|
+
* page or socket); a host nobody claimed is a 404. Which org a host is
|
|
35
|
+
* kept a minute, forgotten here as soon as an org claims or releases it.
|
|
36
|
+
* - `GET /__copilotz/hosts/resolve?host=<h>`: whose a host is, `{ org,
|
|
37
|
+
* target? }` (or 404), for the app's front only (it carries `front`'s
|
|
38
|
+
* secret): the front sends a host with a target (an app's service)
|
|
39
|
+
* straight there.
|
|
40
|
+
*
|
|
41
|
+
* Behind a front (a Cloudflare worker), `front: { secret }`: a request
|
|
42
|
+
* carrying the secret (`x-copilotz-front`) is for the host it forwards
|
|
43
|
+
* (`x-forwarded-host`); any other's forwarded headers are ignored.
|
|
28
44
|
*
|
|
29
45
|
* The app says how to open an org: its store (at the org's placement, as
|
|
30
46
|
* its tenant), its plugins with the host's `here` (the org's name, and how
|
|
31
47
|
* it reaches the directory), and `admit` for its browsers.
|
|
32
48
|
*/
|
|
33
|
-
import type { Actor, Plugins, Runtime } from "../../runtime/mod.js";
|
|
49
|
+
import type { Actor, Plugins, Runtime, Transport } from "../../runtime/mod.js";
|
|
34
50
|
import { type Code, type WebServerOptions } from "../web/server.js";
|
|
35
51
|
/** An org as the host opens it. */
|
|
36
52
|
export type OrgInfo = {
|
|
@@ -41,13 +57,24 @@ export type OrgInfo = {
|
|
|
41
57
|
schema: string;
|
|
42
58
|
};
|
|
43
59
|
};
|
|
44
|
-
export type OrgsHostOptions = Pick<WebServerOptions, "title" | "theme" | "google" | "dev" | "assets"> & {
|
|
60
|
+
export type OrgsHostOptions = Pick<WebServerOptions, "title" | "theme" | "google" | "dev" | "assets" | "front"> & {
|
|
61
|
+
/**
|
|
62
|
+
* The app's own hosts (`compass.copilotz.com`; patterns as routes' are,
|
|
63
|
+
* `*.run.app`): a request to any other is for a host an org claimed.
|
|
64
|
+
* Unset, every host is the app's, and claims route nothing.
|
|
65
|
+
*/
|
|
66
|
+
hosts?: string[];
|
|
45
67
|
/** The directory's runtime: identity, a sign-in method, and the directory plugin. */
|
|
46
68
|
directory: Runtime;
|
|
47
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Opens an org: the app's runtime for it, with these plugins too, this
|
|
71
|
+
* `admit`, and these `transports` (its socket, at `/oxian` and at its
|
|
72
|
+
* address, `/o/<org>/oxian`).
|
|
73
|
+
*/
|
|
48
74
|
open(org: OrgInfo, given: {
|
|
49
75
|
plugins: Plugins;
|
|
50
76
|
admit: (ticket: string) => Actor | undefined;
|
|
77
|
+
transports: Transport[];
|
|
51
78
|
}): Promise<Runtime>;
|
|
52
79
|
/** The socket upgrade for an org's runtime (its transport for browsers). */
|
|
53
80
|
upgrade(runtime: Runtime, request: Request): Response | Promise<Response>;
|