@skillcdn/console 0.6.0 → 0.6.2
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/README.md +7 -7
- package/dist/agent-page.d.ts.map +1 -1
- package/dist/agent-page.js +58 -35
- package/dist/agent-page.js.map +1 -1
- package/dist/agent-usage.d.ts +51 -0
- package/dist/agent-usage.d.ts.map +1 -0
- package/dist/agent-usage.js +77 -0
- package/dist/agent-usage.js.map +1 -0
- package/dist/api.d.ts +4 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +4 -2
- package/dist/api.js.map +1 -1
- package/dist/cli/cli.d.ts +9 -2
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +491 -125
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/format.d.ts +46 -4
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +163 -45
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +62 -13
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/machine-check.d.ts +24 -5
- package/dist/cli/machine-check.d.ts.map +1 -1
- package/dist/cli/machine-check.js +128 -16
- package/dist/cli/machine-check.js.map +1 -1
- package/dist/cli/pack.d.ts +11 -8
- package/dist/cli/pack.d.ts.map +1 -1
- package/dist/cli/pack.js +63 -28
- package/dist/cli/pack.js.map +1 -1
- package/dist/cli/runner-host.d.ts +2 -0
- package/dist/cli/runner-host.d.ts.map +1 -1
- package/dist/cli/runner-host.js +1 -0
- package/dist/cli/runner-host.js.map +1 -1
- package/dist/cli/secret-notes.d.ts.map +1 -1
- package/dist/cli/secret-notes.js +9 -1
- package/dist/cli/secret-notes.js.map +1 -1
- package/dist/cli/terminal.d.ts +10 -2
- package/dist/cli/terminal.d.ts.map +1 -1
- package/dist/cli/terminal.js +16 -4
- package/dist/cli/terminal.js.map +1 -1
- package/dist/client.d.ts +30 -7
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +13 -1
- package/dist/client.js.map +1 -1
- package/dist/components/agent-page.d.ts +76 -18
- package/dist/components/agent-page.d.ts.map +1 -1
- package/dist/components/agent-page.js +183 -53
- package/dist/components/agent-page.js.map +1 -1
- package/dist/components/agents.d.ts +2 -0
- package/dist/components/agents.d.ts.map +1 -1
- package/dist/components/agents.js +6 -5
- package/dist/components/agents.js.map +1 -1
- package/dist/components/calendar.d.ts +24 -4
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +79 -36
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/categories.js +2 -2
- package/dist/components/categories.js.map +1 -1
- package/dist/components/comments.js +2 -2
- package/dist/components/comments.js.map +1 -1
- package/dist/components/decision-list.d.ts.map +1 -1
- package/dist/components/decision-list.js +5 -5
- package/dist/components/decision-list.js.map +1 -1
- package/dist/components/documents.d.ts.map +1 -1
- package/dist/components/documents.js +4 -4
- package/dist/components/documents.js.map +1 -1
- package/dist/components/event-feed.d.ts +2 -3
- package/dist/components/event-feed.d.ts.map +1 -1
- package/dist/components/event-feed.js +4 -184
- package/dist/components/event-feed.js.map +1 -1
- package/dist/components/goals.d.ts.map +1 -1
- package/dist/components/goals.js +3 -3
- package/dist/components/goals.js.map +1 -1
- package/dist/components/home.js +9 -9
- package/dist/components/home.js.map +1 -1
- package/dist/components/icon.d.ts.map +1 -1
- package/dist/components/icon.js +11 -2
- package/dist/components/icon.js.map +1 -1
- package/dist/components/notifications.d.ts +65 -0
- package/dist/components/notifications.d.ts.map +1 -0
- package/dist/components/notifications.js +162 -0
- package/dist/components/notifications.js.map +1 -0
- package/dist/components/pack-connect.js +1 -1
- package/dist/components/pack-connect.js.map +1 -1
- package/dist/components/pack-token.js +1 -1
- package/dist/components/pack-token.js.map +1 -1
- package/dist/components/people.js +2 -2
- package/dist/components/people.js.map +1 -1
- package/dist/components/pictures.js +1 -1
- package/dist/components/pictures.js.map +1 -1
- package/dist/components/plugin-settings.d.ts +22 -1
- package/dist/components/plugin-settings.d.ts.map +1 -1
- package/dist/components/plugin-settings.js +63 -11
- package/dist/components/plugin-settings.js.map +1 -1
- package/dist/components/projects.js +1 -1
- package/dist/components/projects.js.map +1 -1
- package/dist/components/roadmap.js +2 -2
- package/dist/components/roadmap.js.map +1 -1
- package/dist/components/rules.js +2 -2
- package/dist/components/rules.js.map +1 -1
- package/dist/components/runs.d.ts.map +1 -1
- package/dist/components/runs.js +1 -1
- package/dist/components/runs.js.map +1 -1
- package/dist/components/sessions.js +1 -1
- package/dist/components/sessions.js.map +1 -1
- package/dist/components/shell.d.ts +2 -0
- package/dist/components/shell.d.ts.map +1 -1
- package/dist/components/shell.js +1 -1
- package/dist/components/shell.js.map +1 -1
- package/dist/components/sign-in.js +2 -2
- package/dist/components/sign-in.js.map +1 -1
- package/dist/components/skills.d.ts.map +1 -1
- package/dist/components/skills.js +1 -1
- package/dist/components/skills.js.map +1 -1
- package/dist/components/task-view.d.ts +6 -0
- package/dist/components/task-view.d.ts.map +1 -1
- package/dist/components/task-view.js +3 -2
- package/dist/components/task-view.js.map +1 -1
- package/dist/components/tokens.js +1 -1
- package/dist/components/tokens.js.map +1 -1
- package/dist/components/ui.d.ts +21 -2
- package/dist/components/ui.d.ts.map +1 -1
- package/dist/components/ui.js +24 -3
- package/dist/components/ui.js.map +1 -1
- package/dist/components/work.js +1 -1
- package/dist/components/work.js.map +1 -1
- package/dist/console.css +506 -289
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +193 -16
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts +17 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +31 -0
- package/dist/data.js.map +1 -1
- package/dist/desk-page.js +5 -5
- package/dist/desk-page.js.map +1 -1
- package/dist/feed-words.d.ts +5 -0
- package/dist/feed-words.d.ts.map +1 -0
- package/dist/feed-words.js +193 -0
- package/dist/feed-words.js.map +1 -0
- package/dist/i18n/en.d.ts +93 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +103 -15
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +105 -22
- package/dist/i18n/ko.js.map +1 -1
- package/dist/icons/glyphs.d.ts +370 -104
- package/dist/icons/glyphs.d.ts.map +1 -1
- package/dist/icons/glyphs.js +72 -66
- package/dist/icons/glyphs.js.map +1 -1
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/index.js +9 -1
- package/dist/icons/index.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +7 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +7 -0
- package/dist/limits.js.map +1 -1
- package/dist/notifications.d.ts +124 -0
- package/dist/notifications.d.ts.map +1 -0
- package/dist/notifications.js +147 -0
- package/dist/notifications.js.map +1 -0
- package/dist/onboarding.d.ts.map +1 -1
- package/dist/onboarding.js +7 -12
- package/dist/onboarding.js.map +1 -1
- package/dist/plugin/capabilities.d.ts +1 -1
- package/dist/plugin/capabilities.d.ts.map +1 -1
- package/dist/plugin/capabilities.js +10 -0
- package/dist/plugin/capabilities.js.map +1 -1
- package/dist/plugin/context.d.ts +85 -1
- package/dist/plugin/context.d.ts.map +1 -1
- package/dist/plugin/limits.d.ts +7 -0
- package/dist/plugin/limits.d.ts.map +1 -1
- package/dist/plugin/limits.js +7 -0
- package/dist/plugin/limits.js.map +1 -1
- package/dist/plugin/manifest.d.ts +8 -0
- package/dist/plugin/manifest.d.ts.map +1 -1
- package/dist/plugin/manifest.js +13 -0
- package/dist/plugin/manifest.js.map +1 -1
- package/dist/plugin/rest-schemas.d.ts +22 -0
- package/dist/plugin/rest-schemas.d.ts.map +1 -1
- package/dist/plugin/rest-schemas.js +19 -3
- package/dist/plugin/rest-schemas.js.map +1 -1
- package/dist/plugin/testing.d.ts +2 -0
- package/dist/plugin/testing.d.ts.map +1 -1
- package/dist/plugin/testing.js +2 -0
- package/dist/plugin/testing.js.map +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/router.d.ts +6 -0
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +5 -0
- package/dist/router.js.map +1 -1
- package/dist/routes.d.ts +2 -0
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +2 -0
- package/dist/routes.js.map +1 -1
- package/dist/rules.js +1 -1
- package/dist/rules.js.map +1 -1
- package/dist/runner/acp.d.ts.map +1 -1
- package/dist/runner/acp.js +12 -97
- package/dist/runner/acp.js.map +1 -1
- package/dist/runner/browser.d.ts +50 -0
- package/dist/runner/browser.d.ts.map +1 -0
- package/dist/runner/browser.js +104 -0
- package/dist/runner/browser.js.map +1 -0
- package/dist/runner/claude.d.ts +1 -2
- package/dist/runner/claude.d.ts.map +1 -1
- package/dist/runner/claude.js +352 -13
- package/dist/runner/claude.js.map +1 -1
- package/dist/runner/codex.d.ts +9 -10
- package/dist/runner/codex.d.ts.map +1 -1
- package/dist/runner/codex.js +809 -346
- package/dist/runner/codex.js.map +1 -1
- package/dist/runner/config.d.ts +14 -3
- package/dist/runner/config.d.ts.map +1 -1
- package/dist/runner/config.js +27 -7
- package/dist/runner/config.js.map +1 -1
- package/dist/runner/desk.d.ts +3 -1
- package/dist/runner/desk.d.ts.map +1 -1
- package/dist/runner/desk.js +17 -5
- package/dist/runner/desk.js.map +1 -1
- package/dist/runner/message.d.ts +53 -3
- package/dist/runner/message.d.ts.map +1 -1
- package/dist/runner/message.js +201 -20
- package/dist/runner/message.js.map +1 -1
- package/dist/runner/registry.d.ts +6 -0
- package/dist/runner/registry.d.ts.map +1 -1
- package/dist/runner/registry.js.map +1 -1
- package/dist/runner/rpc.d.ts +31 -0
- package/dist/runner/rpc.d.ts.map +1 -0
- package/dist/runner/rpc.js +102 -0
- package/dist/runner/rpc.js.map +1 -0
- package/dist/runner/runner.d.ts +41 -1
- package/dist/runner/runner.d.ts.map +1 -1
- package/dist/runner/runner.js +695 -52
- package/dist/runner/runner.js.map +1 -1
- package/dist/runner/slack.d.ts +17 -8
- package/dist/runner/slack.d.ts.map +1 -1
- package/dist/runner/slack.js +1250 -78
- package/dist/runner/slack.js.map +1 -1
- package/dist/runner/types.d.ts +160 -8
- package/dist/runner/types.d.ts.map +1 -1
- package/dist/runner/types.js.map +1 -1
- package/dist/runner/usage.d.ts +105 -0
- package/dist/runner/usage.d.ts.map +1 -0
- package/dist/runner/usage.js +218 -0
- package/dist/runner/usage.js.map +1 -0
- package/dist/runner.d.ts +4 -4
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +3 -3
- package/dist/runner.js.map +1 -1
- package/dist/schemas.d.ts +673 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +205 -1
- package/dist/schemas.js.map +1 -1
- package/dist/services.js +3 -3
- package/dist/services.js.map +1 -1
- package/dist/setup-guide.d.ts +4 -3
- package/dist/setup-guide.d.ts.map +1 -1
- package/dist/setup-guide.js +11 -13
- package/dist/setup-guide.js.map +1 -1
- package/dist/text.d.ts +7 -0
- package/dist/text.d.ts.map +1 -1
- package/dist/text.js +18 -0
- package/dist/text.js.map +1 -1
- package/dist/vocabulary.d.ts +4 -2
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +4 -1
- package/dist/vocabulary.js.map +1 -1
- package/docs/specs/cli.md +26 -19
- package/docs/specs/plugins.md +16 -10
- package/docs/specs/rest.md +28 -10
- package/docs/specs/runner.md +132 -44
- package/package.json +4 -4
- package/skills/building-a-console/SKILL.md +2 -2
- package/skills/building-a-console/references/configuring.md +1 -1
- package/skills/building-a-plugin/SKILL.md +4 -4
- package/skills/planning-the-board/SKILL.md +1 -1
- package/skills/planning-the-board/references/setting-up.md +2 -2
- package/skills/running-an-agent/SKILL.md +15 -64
- package/skills/running-an-agent/references/preparing-the-machine.md +17 -0
- package/skills/running-an-agent/references/several-tasks.md +37 -0
- package/skills/running-an-agent/references/slack-app.md +70 -13
- package/skills/running-an-agent/references/the-account-and-the-invitation.md +5 -0
- package/skills/running-an-agent/references/what-was-not-seen-run-yet.md +3 -0
- package/skills/running-an-agent/references/when-the-agent-could-not-go-on.md +16 -0
- package/skills/running-an-agent/references/your-first-task.md +14 -0
- package/skills/working-the-board/SKILL.md +9 -12
- package/skills/working-the-board/references/a-pack-skills-questions.md +3 -0
- package/skills/working-the-board/references/a-plugins-commands.md +3 -0
- package/skills/working-the-board/references/a-review.md +3 -0
- package/skills/working-the-board/references/an-open-run.md +3 -0
- package/skills/working-the-board/references/requirements.md +7 -0
- package/skills/working-the-board/references/the-pack.md +2 -2
- package/skills/working-the-board/references/what-they-were-told.md +3 -0
- package/skills/working-the-board/references/work-given-in-chat.md +5 -0
- package/src/agent-page.tsx +76 -47
- package/src/agent-usage.ts +113 -0
- package/src/api.ts +62 -0
- package/src/cli/cli.ts +634 -162
- package/src/cli/format.ts +190 -47
- package/src/cli/help.ts +77 -12
- package/src/cli/machine-check.ts +182 -29
- package/src/cli/pack.ts +81 -40
- package/src/cli/runner-host.ts +3 -0
- package/src/cli/secret-notes.ts +9 -1
- package/src/cli/terminal.ts +20 -4
- package/src/client.ts +94 -6
- package/src/components/agent-page.tsx +280 -63
- package/src/components/agents.tsx +23 -3
- package/src/components/calendar.tsx +93 -37
- package/src/components/categories.tsx +2 -2
- package/src/components/comments.tsx +5 -5
- package/src/components/decision-list.tsx +13 -10
- package/src/components/documents.tsx +13 -8
- package/src/components/event-feed.tsx +4 -203
- package/src/components/goals.tsx +6 -4
- package/src/components/home.tsx +12 -12
- package/src/components/icon.tsx +16 -3
- package/src/components/notifications.tsx +419 -0
- package/src/components/pack-connect.tsx +1 -1
- package/src/components/pack-token.tsx +5 -5
- package/src/components/people.tsx +3 -3
- package/src/components/pictures.tsx +1 -1
- package/src/components/plugin-settings.tsx +128 -23
- package/src/components/projects.tsx +1 -1
- package/src/components/roadmap.tsx +2 -2
- package/src/components/rules.tsx +2 -2
- package/src/components/runs.tsx +6 -3
- package/src/components/sessions.tsx +2 -2
- package/src/components/shell.tsx +3 -0
- package/src/components/sign-in.tsx +3 -3
- package/src/components/skills.tsx +5 -3
- package/src/components/task-view.tsx +18 -7
- package/src/components/tokens.tsx +2 -2
- package/src/components/ui.tsx +70 -5
- package/src/components/work.tsx +2 -2
- package/src/console.tsx +269 -12
- package/src/data.ts +54 -0
- package/src/desk-page.tsx +5 -5
- package/src/feed-words.ts +214 -0
- package/src/i18n/en.ts +114 -15
- package/src/i18n/ko.ts +115 -22
- package/src/icons/glyphs.ts +74 -68
- package/src/icons/index.ts +9 -1
- package/src/index.ts +11 -0
- package/src/limits.ts +7 -0
- package/src/notifications.ts +205 -0
- package/src/onboarding.ts +10 -14
- package/src/plugin/capabilities.ts +13 -0
- package/src/plugin/context.ts +87 -0
- package/src/plugin/limits.ts +7 -0
- package/src/plugin/manifest.ts +14 -0
- package/src/plugin/rest-schemas.ts +27 -3
- package/src/plugin/testing.ts +4 -0
- package/src/plugin.ts +2 -0
- package/src/router.ts +7 -0
- package/src/routes.ts +2 -0
- package/src/rules.ts +1 -1
- package/src/runner/acp.ts +12 -118
- package/src/runner/browser.ts +128 -0
- package/src/runner/claude.ts +399 -12
- package/src/runner/codex.ts +904 -400
- package/src/runner/config.ts +30 -7
- package/src/runner/desk.ts +22 -6
- package/src/runner/message.ts +251 -21
- package/src/runner/registry.ts +6 -0
- package/src/runner/rpc.ts +140 -0
- package/src/runner/runner.ts +863 -53
- package/src/runner/slack.ts +1535 -85
- package/src/runner/types.ts +150 -5
- package/src/runner/usage.ts +299 -0
- package/src/runner.ts +16 -1
- package/src/schemas.ts +249 -0
- package/src/services.ts +3 -3
- package/src/setup-guide.ts +12 -14
- package/src/styles/README.md +11 -7
- package/src/styles/console.css +2 -0
- package/src/styles/drawn-by-pages.json +7 -82
- package/src/styles/pages/agents.css +46 -35
- package/src/styles/pages/calendar.css +0 -1
- package/src/styles/pages/connect.css +0 -14
- package/src/styles/pages/decisions.css +2 -43
- package/src/styles/pages/documents.css +0 -29
- package/src/styles/pages/home.css +4 -16
- package/src/styles/pages/people.css +2 -17
- package/src/styles/pages/plugins.css +9 -12
- package/src/styles/pages/roadmap.css +0 -16
- package/src/styles/pages/settings.css +0 -28
- package/src/styles/pages/sign-in.css +2 -17
- package/src/styles/pages/thread.css +4 -50
- package/src/styles/pages/work.css +0 -5
- package/src/styles/parts/button.css +31 -0
- package/src/styles/parts/count.css +10 -0
- package/src/styles/parts/divider.css +17 -0
- package/src/styles/parts/frame.css +12 -0
- package/src/styles/parts/icon.css +39 -0
- package/src/styles/parts/menu.css +184 -0
- package/src/styles/parts/panel.css +7 -0
- package/src/styles/parts/progress.css +63 -0
- package/src/styles/parts/settings.css +2 -0
- package/src/styles/parts/sheet.css +28 -0
- package/src/styles/parts/text.css +34 -0
- package/src/text.ts +19 -0
- package/src/vocabulary.ts +4 -1
- package/template/plugin/package.json +1 -1
package/docs/specs/plugins.md
CHANGED
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
| `defaultRole` | string | a role every member of the workspace holds without a grant; optional |
|
|
58
58
|
| `requires` | `{ [key]: range }` | other plugins this one needs, by a semver range of their version; they are enabled first and cannot be disabled while this one is |
|
|
59
59
|
| `grants` | `{ [key]: { roles, why } }` | the roles of other plugins the plugin asks to hold as itself ([ADR-0072](../adr/0072-a-plugin-is-a-principal-it-holds-roles-granted-to-it-calls-as-itself-and-acts-for-a-person-within-what-both-may-do.md)): up to 10 plugins, each with `why`, localized, for the administrator who grants them when enabling or on the plugin's page; never of itself |
|
|
60
|
-
| `board` | `{ needs, defaults? }` | `needs` is `required`, `optional` or `none`; `defaults` the `key`, `name` and `description` per language of the project an administrator may make for it |
|
|
60
|
+
| `board` | `{ needs, defaults? }` | `needs` is `required`, `optional` or `none`; `defaults` the `key`, `name` and `description` per language of the project an administrator may make for it, and its mark where the plugin names one ([ADR-0155](../adr/0155-a-plugin-names-the-mark-of-the-project-made-for-it-an-icon-of-the-pack-and-a-colour.md)): `glyph`, an icon of the console's pack by its name (`leave`, `finance`, `customer`; the pack is `@skillcdn/console/icons`), and `color`, one of `gray`, `blue`, `green`, `orange`, `pink`, `purple`, `teal`, `yellow`. An icon the pack of a console does not have, or a colour it does not know, is none there: the manifest holds each to how a name is spelled. A manifest that names either runs on consoles from 0.6.1 and says so in `console`: one before refuses a key of `defaults` it does not know |
|
|
61
61
|
| `settings` | Setting[] | up to 50, each `{ key, type, name, description?, required?, default?, min?, max?, options?, of? }`; `key` a lowercase letter followed by letters and digits (`daysPerYear`), as code and `--set` name it; types `text`, `markdown`, `number`, `boolean`, `enum` (with `options`, each `{ value, name }`), `day`, `time` (`HH:MM`, read in the workspace's time zone), `person`, `project`, `secret`, `list` (with `of`, any type but `secret` and `list`); `min` and `max` bound a number, the length of a text or the items of a list; `default` fits the type, and `person`, `project` and `secret` have none; `group` names one of `settingGroups`, under which the form shows the setting; a `secret` may name `hosts`, the hosts it goes into a request to, and is sealed from the answers of, and no other (`slack.com`, `*.example.com`, as `outbound:<host>` names them), and `use: "verify"`, a secret that verifies signatures and signs nothing ([ADR-0070](../adr/0070-a-secret-is-sealed-by-the-console-from-an-answer-and-goes-where-its-setting-says.md)); and `keyed: { max }`, a secret that keeps one value per key, up to `max` keys (1 to 1,000), a key being letters, digits, `_` and `-` up to 64 and no secret, never `required` and taking no `use` ([ADR-0111](../adr/0111-a-secret-setting-may-keep-one-value-per-key.md)) |
|
|
62
62
|
| `settingGroups` | Group[] | up to 10, each `{ key, name, description? }`, in the order the form shows them; the settings without a `group` come above them |
|
|
63
63
|
| `menu` | `{ group, order?, name? }` | the tab the plugin is under: a group of the console's (`people`, `customers`, `money`, `operations`, `marketing`, `engineering`, `reports`), or one the plugin declares with a `name` per language; `order` within the row, default 100 |
|
|
@@ -86,7 +86,7 @@ An example, a plugin for leave:
|
|
|
86
86
|
"approver": { "name": { "en": "Approver", "ko": "승인자" }, "description": { "en": "Sees every request.", "ko": "모든 신청을 봅니다." } }
|
|
87
87
|
},
|
|
88
88
|
"defaultRole": "employee",
|
|
89
|
-
"board": { "needs": "required", "defaults": { "key": "people-ops", "name": { "en": "People", "ko": "인사" }, "description": { "en": "Leave and the people's matters.", "ko": "연차와 인사 업무." } } },
|
|
89
|
+
"board": { "needs": "required", "defaults": { "key": "people-ops", "name": { "en": "People", "ko": "인사" }, "description": { "en": "Leave and the people's matters.", "ko": "연차와 인사 업무." }, "glyph": "leave", "color": "green" } },
|
|
90
90
|
"settings": [
|
|
91
91
|
{ "key": "daysPerYear", "type": "number", "name": { "en": "Days per year", "ko": "연간 일수" }, "default": 15, "min": 0, "max": 365 },
|
|
92
92
|
{ "key": "approver", "type": "person", "name": { "en": "Approver", "ko": "승인자" }, "required": true }
|
|
@@ -175,6 +175,8 @@ Everything a plugin does to the console is a call on `ctx`, which is a message t
|
|
|
175
175
|
| `ctx.sql` | `query(text, params)` and `transaction(async (tx) => ...)`, on the plugin's own role | `storage:sql` |
|
|
176
176
|
| `ctx.console.workspace()` | the workspace's name, its language (`language`, the one an administrator set for whoever has none of their own, else `en`, and `languageSet`, whether one was set, [ADR-0081](../adr/0081-a-workspace-has-a-language-for-whoever-has-none-of-their-own.md)), the languages the console speaks (`languages`, `language` first), time zone (`timeZone`, `UTC` where none is set, and `timeZoneSet`, whether an administrator set one, so that a plugin that reads a time of day says so instead of taking UTC for a choice), the day its week begins on (`weekStart`: `auto`, `monday` or `sunday`), categories, and `url`, the console's public origin (`PUBLIC_URL`) for a link to the console in what the plugin writes elsewhere, `null` where the deployment names none | nothing |
|
|
177
177
|
| `ctx.console.people` | `list({ q? })` and `get(id)`: the people the caller may see, each with `managerId`, whom they report to in the directory or `null`, for a plugin to take as its default where it needs someone's manager, `language`, what they read in or `null` until the pages have seen them, and `teams`, the keys of the teams they are in ([ADR-0073](../adr/0073-a-team-is-a-name-and-its-members-a-unit-to-call-people-by-and-to-grant-a-plugins-role-to.md), [ADR-0074](../adr/0074-a-team-is-called-by-a-key-that-never-changes-one-name-among-the-projects-keys.md)); everyone for a `console` caller, or with `people:read:all`; their work `email` with `people:read:email` | `people:read` |
|
|
178
|
+
| `ctx.console.accounts` | `put({ personId, messenger, workspace, account })`, `remove({ personId, messenger, workspace })` and `list({ messenger, workspace, after?, limit? })`: which account at a messenger is a member's ([ADR-0164](../adr/0164-a-plugin-says-which-account-at-a-messenger-is-a-members-and-a-wake-says-by-it-whether-a-supervisor-wrote.md)), said by a plugin that matched the two by something neither lets its holder set freely, an address say, and never by a name. `messenger` is its name as a wake source is named (`slack`), `workspace` and `account` the messenger's ids for them, each letters, digits, `.`, `_` and `-`, `MAX_MESSENGER_ID_LENGTH` at most (`plugin.invalid_args`). One member for an account and one account of a member in a workspace: what this plugin said before of either gives way, what another plugin said of either stands while that plugin is in the image, enabled, and holds the capability (`plugin.conflict`); the person is active (`plugin.not_found`); a workspace keeps `MAX_MESSENGER_ACCOUNTS` (`plugin.too_many`). `list` answers `{ items, after }`, what this plugin said, each `{ id, personId, messenger, workspace, account, since }`, a page at a time; `remove` whether there was one. Whoever calls, a person's command or a job, the capability is what opens it, and the event of a change a person's call made names the person. Purged, the plugin has said nothing. Left out by a console older than the capability: a plugin that runs on both asks whether it is there | `people:accounts` |
|
|
179
|
+
| `ctx.console.notifications` | `settings()`: what the caller chose to be told of, as `GET /api/v1/notifications/settings` answers it ([ADR-0165](../adr/0165-a-plugin-reads-what-its-caller-chose-to-be-told-of-and-nobody-elses.md)): `kinds`, `defaults`, `projectsOff`, of those the plugin is on, and `ownAgents`. A member's own call alone, a person's, their agent's or an agent account's; `plugin.forbidden` for a hook, a job, a plugin as itself and a call a plugin makes for a person. From 0.6.2; left out by a console of before | `notifications:read` |
|
|
178
180
|
| `ctx.console.teams` | `list()` and `get(key)`: the teams of the workspace ([ADR-0073](../adr/0073-a-team-is-a-name-and-its-members-a-unit-to-call-people-by-and-to-grant-a-plugins-role-to.md)), each `{ id, key, name, memberIds, createdAt }`, the members among the people the caller may see; a team is called by its `key`, which never changes | `people:read` |
|
|
179
181
|
| `ctx.console.projects` | `list()`, `get(key)`, `members(key)`: the projects the caller may see; all with `projects:read:all`, but in a call for a person, the person's ([ADR-0072](../adr/0072-a-plugin-is-a-principal-it-holds-roles-granted-to-it-calls-as-itself-and-acts-for-a-person-within-what-both-may-do.md)) | `projects:read` |
|
|
180
182
|
| `ctx.console.tasks` | `list(project, filters)`, `get(project, number)`, `create(project, task)`, `update(project, number, patch)`, `comment(project, number, body)`: reading in the plugin's projects, creating there, changing and commenting its own | `board:read`; `board:tasks` |
|
|
@@ -204,6 +206,7 @@ Declared in the manifest, consented to by an administrator when enabling, enforc
|
|
|
204
206
|
| `people:read` | the people the caller may see, as the person, and among them who was granted a role of the plugin (`ctx.console.people.granted(role)`, an administrator listed only where granted it) and, for a frame, their pictures | the names, logins and pictures its role holders may see anyway |
|
|
205
207
|
| `people:read:all` | everyone, for `console` callers too; and the workspace's people events (`person.joined`, `person.deactivated`, `person.reactivated`, `person.role_changed`, `person.manager_changed`, `person.email_changed`, `person.updated`, `person.listed`, `person.unlisted`, and the teams' `team.created`, `team.renamed`, `team.removed`, `team.member_added`, `team.member_removed`, and the agent accounts' `agent.state_changed`) to its hooks, with their content | the directory, and when people come and go |
|
|
206
208
|
| `people:read:email` | the work email of the people it may read (`email` on `ctx.console.people.list` and `get`, `null` until known; left out without it): the address a person signs in with at Google, else what an administrator wrote, by which the plugin matches them to an account elsewhere; `person.email_changed` says that one changed, never what it is | the addresses of the people its role holders may see |
|
|
209
|
+
| `people:accounts` | saying which account at a messenger is which member's (`ctx.console.accounts`, [ADR-0164](../adr/0164-a-plugin-says-which-account-at-a-messenger-is-a-members-and-a-wake-says-by-it-whether-a-supervisor-wrote.md)): an agent account's wake from that messenger says by it who wrote, and whether a supervisor of the account did, whose own word there the account takes as an instruction ([ADR-0160](../adr/0160-an-agent-account-takes-every-supervisors-word-as-its-managers-by-a-tell-or-at-the-messenger.md)). It counts while the plugin is enabled and holds the capability, and every change is an event of the workspace under the plugin's name (`person.updated` with the field `account`, which a plugin that reads everyone hears as it hears any change of a member). It reads nobody and opens nothing else | anyone's account at a messenger said to be a supervisor's, and so that person's word there taken as an instruction by the agent accounts the supervisor supervises; each change on the workspace's feed, under the plugin's name |
|
|
207
210
|
| `people:act` | acting for a person who did something elsewhere ([ADR-0072](../adr/0072-a-plugin-is-a-principal-it-holds-roles-granted-to-it-calls-as-itself-and-acts-for-a-person-within-what-both-may-do.md)): `ctx.plugins.get(key).for(personId)` and `ctx.console.decisions.answer(id, answer, { for })`, within what the person may do as a member, whatever they administer, and what the plugin was granted, both; a decision only where it is on their plate, a person's own only while they are in its project ([ADR-0077](../adr/0077-a-persons-own-decision-is-its-projects-and-reaches-nobody-out-of-it.md)); recorded as the person's through the plugin | what its role holders may do as members, done in their name from elsewhere; the decisions on their plates answered |
|
|
208
211
|
| `projects:read` | the projects and members the caller may see | what the person sees |
|
|
209
212
|
| `projects:read:all` | every project and its members | the projects and who is in them |
|
|
@@ -212,6 +215,7 @@ Declared in the manifest, consented to by an administrator when enabling, enforc
|
|
|
212
215
|
| `board:decisions` | decisions raised in its projects; the answers to its own read | questions that mislead; never an answer of its own (an answer for a person is `people:act`) |
|
|
213
216
|
| `board:documents` | pages written under `plugins/<key>/` in its projects | pages that mislead, in its folder |
|
|
214
217
|
| `events:console` | hooks on the console's events of its board projects: the kind, the ids and the time, the content with `board:read` | when things happen on those boards |
|
|
218
|
+
| `notifications:read` | with a console event it hears, whom the console told of it ([ADR-0157](../adr/0157-the-console-decides-who-is-told-of-what-and-keeps-the-record-and-a-plugin-carries-it-out.md)): `data.told`, each `{ personId, kind, woken, followed }`, the kind one of the console's kinds of notification, `woken` where the console told the member itself, by a wake of its agent account, so that whoever carries notifications elsewhere carries that one to nobody, and `followed` where they are told because they turned that task's notifications on themselves, whatever their kinds; an empty list where nobody was told. The list is the same for every plugin, and the most a plugin sends on: a kind a member turned off in the console makes no notification, but of a task they turned on themselves (`followed`), and so names them in no other list. Which of it the plugin sends, and how, is the plugin's own to let a member choose: it offers the choice on a page of its own and by a command of its own, since an agent account chooses from the command as a person does from a page, and keeps it in its own records or tables, by the member's `personId` and the kind, and the console's settings, which are of everything a member is told, name no plugin and keep nothing of one. The event itself reaches the plugin as it did, whoever was told of it and whoever was not, so that what the plugin does with an event besides carrying it goes on. A plugin that holds it hears an event once the board's pass has read it, a few seconds after it happened. And in a member's own call, what that member chose to be told of (`ctx.console.notifications.settings`), so that it shows as off what is off in the console | who is told of what on those boards, and so what each member chose to be told of |
|
|
215
219
|
| `events:plugins` | hooks on the events other plugins emit | what they publish |
|
|
216
220
|
| `jobs` | runs on a schedule | time, within the bound |
|
|
217
221
|
| `outbound:<host>` | `ctx.fetch` to that host, a public address, over https | what it may read, sent to that host; a cost there |
|
|
@@ -276,8 +280,8 @@ What the deployment must allow: the console's database user holds `CREATEROLE`,
|
|
|
276
280
|
|
|
277
281
|
## The board
|
|
278
282
|
|
|
279
|
-
- `board.needs` says whether the plugin puts things on a board. Enabling one with `required` or `optional`, the administrator makes a project from `board.defaults` (the key, name and description in the workspace's languages, edited as they like; private; they are its owner) or chooses one that exists; several plugins may bind to one project. The install keeps the project's id, and the project's settings page shows the plugins bound to it.
|
|
280
|
-
- A plugin
|
|
283
|
+
- `board.needs` says whether the plugin puts things on a board. Enabling one with `required` or `optional`, the administrator makes a project from `board.defaults` (the key, name and description in the workspace's languages, and the mark where the plugin names one, an icon of the pack on a colour, each edited as they like; private; they are its owner) or chooses one that exists, which keeps its own mark; several plugins may bind to one project. The install keeps the project's id, and the project's settings page shows the plugins bound to it.
|
|
284
|
+
- A plugin is on the projects the administrator names, all or a list, whatever pages and collections it has: one with no `level: project` page hears the events of those projects and reads there all the same. A project page is shown in those projects alone. Owners do not enable plugins in their projects. The projects it is on, with its board project, are the projects it reaches, as itself and for anyone, and no other ([ADR-0080](../adr/0080-a-plugin-reaches-the-projects-it-is-placed-on-and-whoever-may-use-it-is-a-requester-in-its-board-project.md)): a person's call takes it nowhere it is not placed.
|
|
281
285
|
- What a plugin makes on a board carries its name: the console writes the link (`plugin_links`: plugin, kind, id) when `ctx.console.tasks.create`, `decisions.ask` or `documents.write` runs, the event carries `plugin = <key>` beside `actor` and `agent`, and the pages and the feed say "through <plugin>" (`plugin` on a task, a decision and a document as the API answers them). A person's call acts as the person, in the projects of the plugin's the person may see; a call a plugin makes for a person acts as the person, a member whatever they administer, and the event names the plugin that acted for them as `via`; a `console` caller, a job or a hook, and a plugin another calls as itself act as the administrator who enabled the plugin, who owns what it makes, within the plugin's projects alone, through no one. A plugin changes, closes, comments or reads the answer of its own items only; it reads every item of its board projects with `board:read`, and by id, for a person, only what the person may see, as a listing shows them. Its documents go under `plugins/<key>/`; a write elsewhere is `plugin.forbidden`.
|
|
282
286
|
- A decision a plugin raises stays addressed as the plugin addressed it: no person addresses it anew (`decision.plugin_addressed`, [ADR-0096](../adr/0096-a-decision-that-waits-may-be-addressed-anew-by-whoever-may-answer-it.md)), and a hook with `board:read` hears `console:decision.addressed` for the others.
|
|
283
287
|
- A decision a plugin raises is a decision as any ([ADR-0042](../adr/0042-a-decision-is-addressed-to-a-person-its-raiser-unless-another-is-named.md)): addressed to the person named in `deciderId`, or to the several named in `deciderIds`, any of whom may answer and the first answer ending it ([ADR-0057](../adr/0057-a-decision-may-be-addressed-to-several-people-and-the-first-answer-ends-it.md)), each an active person of the workspace, in the board project or not ([ADR-0068](../adr/0068-a-decision-reaches-whom-it-is-addressed-to-wherever-it-is-and-a-plugins-reaches-the-managers-above-them.md)), else to the administrator who enabled the plugin; answered by anyone of the project, by those it is addressed to wherever they are, and by whoever manages one of them, up the reporting line; shown among each person's decisions and in `console work`, read and answered at `/decisions/<id>` and `GET /api/v1/decisions/<id>` by a person who may not see the project, which is where a plugin's page sends them (`frame.navigate("/decisions/<id>")`). The command that raised it returns `waiting` and exits with `3`, and the agent waits as it does for `ask`. The plugin learns of the answer through `on["console:decision.answered"]`, which `about` lets it map to its record, and whose `data` names the chosen option by its label (`option`) and by the key the plugin gave it (`optionKey`), for its own decisions with `board:decisions` alone, so that it reads the answer without comparing labels or asking again; the person's own answer has no key. A plugin never answers of itself; with `people:act` it answers for a person a decision on their plate (`ctx.console.decisions.answer`).
|
|
@@ -332,8 +336,8 @@ Under `/api/v1/plugins`. Who may call: *anyone* signed in or on a token, *roles*
|
|
|
332
336
|
| Route | Who | What |
|
|
333
337
|
|---|---|---|
|
|
334
338
|
| `GET /api/v1/plugins` | anyone | the plugins a member may know of (the enabled ones; every state for an administrator): key, name, description, version, the consoles it declares it runs on (`console`, or `null`), state and reasons, the caller's roles, the menu, the pages and widgets the caller may see, the board project's key; and whether `storage:sql` is available in this deployment |
|
|
335
|
-
| `GET /api/v1/plugins/<key>` | anyone | one plugin: the above, its commands and queries (name, about, args), its skills address, its settings without the secrets (whether each is set, and for a secret `setAt`, `expiresAt`, `source`, `hosts` and `use`; for a keyed one `keyed` and `keys`, each `{ key, setAt, expiresAt, source }`), `needsTimeZone`, whether the plugin reads a time of day while the workspace has no time zone, `keeps`, the collections it forgets after a while with their days, and `jobs`, each job its module declares as the scheduler keeps it, `{ name, every, at, lastRunAt, lastOutcome, nextAt, failedSince }` ([ADR-0128](../adr/0128-a-plugins-jobs-are-seen-and-one-that-keeps-failing-is-a-problem-of-its-plugin.md)); for an administrator the consent, the grants, the projects and `asks`, how the roles it asks of other plugins stand |
|
|
336
|
-
| `POST .../enable` | admin | `{ consent: [...], board: { create: { key, name, description } } \| { project: "<key>" } \| null, projects: "all" \| [...], settings: {...} }` |
|
|
339
|
+
| `GET /api/v1/plugins/<key>` | anyone | one plugin: the above, its commands and queries (name, about, args), its skills address, its settings without the secrets (whether each is set, and for a secret `setAt`, `expiresAt`, `source`, `hosts` and `use`; for a keyed one `keyed` and `keys`, each `{ key, setAt, expiresAt, source }`), `boardDefaults`, the project its manifest proposes, `{ key, name, description, color, glyph }` or `null`, the mark `null` where it names none and the icon one of this console's pack (`color` and `glyph` answered from 0.6.1), `needsTimeZone`, whether the plugin reads a time of day while the workspace has no time zone, `keeps`, the collections it forgets after a while with their days, and `jobs`, each job its module declares as the scheduler keeps it, `{ name, every, at, lastRunAt, lastOutcome, nextAt, failedSince }` ([ADR-0128](../adr/0128-a-plugins-jobs-are-seen-and-one-that-keeps-failing-is-a-problem-of-its-plugin.md)); for an administrator the consent, the grants, the projects and `asks`, how the roles it asks of other plugins stand |
|
|
340
|
+
| `POST .../enable` | admin | `{ consent: [...], board: { create: { key, name, description, color?, glyph? } } \| { project: "<key>" } \| null, projects: "all" \| [...], settings: {...} }`; `color` and `glyph` are the mark of the project made, held as a project's own are, an icon the pack lacks refused |
|
|
337
341
|
| `POST .../disable` | admin | |
|
|
338
342
|
| `PATCH .../consent` | admin | `{ consent: [...] }`: what an enabled plugin holds from now on, every capability it requires named again and the optional ones to keep on; a `plugin.configured` event with `capabilities` |
|
|
339
343
|
| `PATCH .../settings` | admin | `{ values }`, without secrets |
|
|
@@ -347,7 +351,7 @@ Under `/api/v1/plugins`. Who may call: *anyone* signed in or on a token, *roles*
|
|
|
347
351
|
| `GET .../records/<collection>/<id>[?version=]`, `GET .../records/<collection>/<id>/versions` | roles | one record, a version of it, its versions |
|
|
348
352
|
| `POST .../files`, `GET .../files/<id>` | roles | a file for a command (a handle, good for an hour); a record's file |
|
|
349
353
|
| `GET .../people/<id>/picture` | roles, `people:read` | the picture of a person the asker may see, or of anyone with `people:read:all`; it names the person, never an address ([ADR-0063](../adr/0063-a-frame-reads-a-persons-picture-by-the-person-and-a-plugin-reads-who-it-granted-a-role.md)) |
|
|
350
|
-
| `GET .../events?limit=&offset=&kind=` | *admin*, every event of the plugin; anyone else who may know of the plugin, only the events of a project they may see, as that project's own feed shows them, and of the events that belong to no project only those that tell nothing of another person's doing | the plugin's events the caller may read, newest first, whether or not it has a board project. Of the events that belong to no project, someone who is no administrator reads their own doing, a `plugin.command` they ran among it, and what the console says of the plugin with nobody in it, `plugin.failed` and `plugin.upgraded`; never another person's command, which carries who ran it and its arguments, whom a role went to, or an administrator's act. A token reads as its person. What the caller may not read takes no place in a page and is not counted in `more`, with no word that it is there. Of one kind where `kind` names one, `plugin.failed` for what went wrong in it, a word that is no kind of event refused (`invalid`)
|
|
354
|
+
| `GET .../events?limit=&offset=&kind=` | *admin*, every event of the plugin; anyone else who may know of the plugin, only the events of a project they may see, as that project's own feed shows them, and of the events that belong to no project only those that tell nothing of another person's doing | the plugin's events the caller may read, newest first, whether or not it has a board project. Of the events that belong to no project, someone who is no administrator reads their own doing, a `plugin.command` they ran among it, and what the console says of the plugin with nobody in it, `plugin.failed` and `plugin.upgraded`; never another person's command, which carries who ran it and its arguments, whom a role went to, or an administrator's act. A token reads as its person. What the caller may not read takes no place in a page and is not counted in `more`, with no word that it is there. Of one kind where `kind` names one, `plugin.failed` for what went wrong in it, a word that is no kind of event refused (`invalid`) |
|
|
351
355
|
| `GET .../plugin-events?after=&limit=` | roles | the events the plugin emitted (`ctx.events.emit`), after a number, oldest first: `{ items: [{ id, kind, data, at }], more, newest }`, `newest` the number of the plugin's newest event, 0 where it has none, so that a frame reads the stream from where it stands; both within the stream's settled end ([ADR-0125](../adr/0125-a-feed-is-read-no-further-than-its-settled-end-which-its-writers-hold-a-lock-for.md)), so that a frame that comes back with a number has passed over nothing; `503` with `feed.unsettled` and `retry-after: 1` from a process that has not seen the stream settle while an event is being written, where `newest` would be the stream's beginning: a frame asks again at its next tick |
|
|
352
356
|
| `GET .../skills`, `.../skills/one?path=&cursor=`, `.../skills/file?path=&offset=&limit=`, `.../skills/browse?path=&cursor=&limit=`, `.../skills/find?query=&path=&cursor=&limit=`, `.../skills/rows?path=&heading=&cursor=&limit=`, `.../skills/code?path=&heading=&cursor=&limit=` | anyone who may know of the plugin | the plugin's skills, a pack of its own at `/local/plugins/<key>`, read from its package on the console's machine as a `local` pack is ([ADR-0031](../adr/0031-the-console-reads-a-pack-as-the-skillcdn-command-does-and-a-local-one-from-a-directory.md)), answered as a project's reads are, the tables and the code blocks of its documents as data among them ([ADR-0100](../adr/0100-a-packs-tables-and-code-blocks-are-had-as-data-through-the-console.md)); `status: none` for a plugin that ships none |
|
|
353
357
|
| `ANY .../x/<name>[/<rest>]` | a person, or nobody | an endpoint, with `endpoints`: a `person` endpoint for whoever is signed in or presents a token and holds a role it names (a browser's session asking for what is not a read, from elsewhere than the console's own pages, counts for nobody; the session of a command signed in as the account itself is presented as a token is and taken as one), a `webhook` endpoint for nobody, run as the console with every role and held to 600 requests a minute per plugin (`plugin.rate_limited`). The request's body up to 1 MiB, its headers cut to `content-type` and those the definition names; the answer's status, its `content-type`, `location` and `cache-control`, and its body, under the console's own `nosniff`, `no-store` and a sandboxing policy. A method the definition does not name is `plugin.invalid_args` |
|
|
@@ -366,11 +370,11 @@ Under `/api/v1/plugins`. Who may call: *anyone* signed in or on a token, *roles*
|
|
|
366
370
|
| Command | Asks | Says |
|
|
367
371
|
|---|---|---|
|
|
368
372
|
| `plugins` | `GET /api/v1/plugins` | a line per plugin: key, name, version, state, the caller's roles |
|
|
369
|
-
| `plugin <key>` | `GET /api/v1/plugins/<key>` | the description and the agent note; its problems, a job that keeps failing among them; a line per command and query, its usage in brief, the positionals and the required flags, the rest as `[options]`, since an agent reads this whole at every first use; the skills (`console plugin <key> skills`); the board project; a line per job, how often it runs, how its last run went and since when it has failed, and when it runs next, where the console names them; the settings an agent should know |
|
|
373
|
+
| `plugin <key>` | `GET /api/v1/plugins/<key>` | the description and the agent note; its problems, a job that keeps failing among them; a line per command and query, its usage in brief, the positionals and the required flags, the rest as `[options]`, since an agent reads this whole at every first use; the skills (`console plugin <key> skills`); the board project, or while it has none the one `enable --board new` would make, with the mark the plugin names for it; a line per job, how often it runs, how its last run went and since when it has failed, and when it runs next, where the console names them; the settings an agent should know |
|
|
370
374
|
| `plugin <key> help [<command>]` | the same | one command whole, in the form of `console help <command>`: the forms, every argument, the limits, the refusals; without a command, every one in the brief form |
|
|
371
375
|
| `plugin <key> <command> [args] [--<flag> <value>]... [--file <path> \| -] [--run <id>] [--json]` | `POST .../files` where `--file` or `-`, then `POST .../invoke` with the words as typed, the handle, the project the command works in and the run named | the command's `text`, or its `data` with `--json`; a query's answer as JSON, a file it answers saved under its name; exit `0`; `3` with `waiting`, printing the decision's id, the project it waits in and `console decision <id> --wait`, which reads the decision wherever it is, from a checkout bound to another project or none; `1` on a refusal, in the console's form. `--json`, `--url`, `--account`, `--project`, `--file` and `--run` are the command's own wherever they stand; every other word is the plugin's |
|
|
372
376
|
| `plugin <key> records <collection> [<id>] [--where <field>=<value>]... [--search <words>] [--project <key>] [--order <field>[:desc]] [--limit <n>] [--after <cursor>] [--archived] [--versions]` | `GET .../records/...` | the records, one a line, or one whole, or its versions |
|
|
373
|
-
| `plugin <key> events [--kind <kind>] [--limit <n>] [--offset <n>]` | `GET .../events` | the plugin's events the caller may read ("REST": every one for an administrator; for anyone else those of the projects they may see, their own commands, and the console's word of the plugin), newest first, one a line: its number, when, its kind, who did it and through what, and what it says, the problem of a `plugin.failed`, the command and how it ended of a `plugin.command`; `--kind plugin.failed` for the failures alone, which is where a job's failure says why; a page of up to 100, 50 unless said; where the console answers none, `No event of <key> that you may read`, which says nothing of whether the plugin has others
|
|
377
|
+
| `plugin <key> events [--kind <kind>] [--limit <n>] [--offset <n>]` | `GET .../events` | the plugin's events the caller may read ("REST": every one for an administrator; for anyone else those of the projects they may see, their own commands, and the console's word of the plugin), newest first, one a line: its number, when, its kind, who did it and through what, and what it says, the problem of a `plugin.failed`, the command and how it ended of a `plugin.command`; `--kind plugin.failed` for the failures alone, which is where a job's failure says why; a page of up to 100, 50 unless said; where the console answers none, `No event of <key> that you may read`, which says nothing of whether the plugin has others |
|
|
374
378
|
| `plugin <key> skills [--search <words>]`, `plugin <key> skill <path>` | `GET .../skills...` | as `console skills` and `console skill` |
|
|
375
379
|
| `plugin <key> enable [--consent <capability>,...] [--board new\|<key>] [--projects all\|<key>,...] [--set <key>=<value>]...`, `plugin <key> disable`, `plugin <key> capabilities [--consent <capability>,...|none]`, `plugin <key> settings [--set ...]`, `plugin <key> secret <name> [--key <key>]` (the value typed unseen at the terminal, or piped in; never an argument; `--key` for a keyed secret, one key at a time), `plugin <key> grant <role> --person <login>\|--project <key>\|--everyone`, `plugin <key> revoke <grant>` | the administrator's routes | what changed; `enable` prints what each capability opens before asking the console, and refuses without `--consent` naming every capability the manifest requires; `capabilities` says what the plugin holds, and with `--consent` which of the optional ones it holds from now on |
|
|
376
380
|
|
|
@@ -446,7 +450,7 @@ The console's page reads its computed `--sc-*` tokens (the list is `CONSOLE_TOKE
|
|
|
446
450
|
|
|
447
451
|
### The settings pages
|
|
448
452
|
|
|
449
|
-
The Settings page lists the plugins with their state, for an administrator, one that runs with a problem marked beside it, each leading to its own page, and `/settings/plugins` is that list alone; `/settings/plugins/<key>` is one, read at a glance and with as few words as it takes: its name, key, version and state in the head, with the way to disable it; why it cannot run, where it cannot, and its problems where it runs with one, a job that keeps failing ([ADR-0128](../adr/0128-a-plugins-jobs-are-seen-and-one-that-keeps-failing-is-a-problem-of-its-plugin.md)); a row each for its board project, the projects it is on, the capabilities it holds, those it can go without each with a box to turn it on or off, its jobs, each with how its last run went, since when it has failed and when it runs next, its commands and queries, and what agents read of it; where it is not enabled, the form that enables it, in three parts: the capabilities, each by the name the pages give it in the person's language with one sentence of what it opens (the packs' `plugins.capability`; the catalogue above is what they say), in two lists: those it requires, on and not the administrator's to turn off, one a new version asks marked as new, and those it can go without, off until turned on, those consented to before on already; the board project, to make (the form filled from `board.defaults
|
|
453
|
+
The Settings page lists the plugins with their state, for an administrator, one that runs with a problem marked beside it, each leading to its own page, and `/settings/plugins` is that list alone; `/settings/plugins/<key>` is one, read at a glance and with as few words as it takes: its name, key, version and state in the head, with the way to disable it; why it cannot run, where it cannot, and its problems where it runs with one, a job that keeps failing ([ADR-0128](../adr/0128-a-plugins-jobs-are-seen-and-one-that-keeps-failing-is-a-problem-of-its-plugin.md)); a row each for its board project, the projects it is on, the capabilities it holds, those it can go without each with a box to turn it on or off, its jobs, each with how its last run went, since when it has failed and when it runs next, its commands and queries, and what agents read of it; where it is not enabled, the form that enables it, in three parts: the capabilities, each by the name the pages give it in the person's language with one sentence of what it opens (the packs' `plugins.capability`; the catalogue above is what they say), in two lists: those it requires, on and not the administrator's to turn off, one a new version asks marked as new, and those it can go without, off until turned on, those consented to before on already; the board project, to make (the form filled from `board.defaults`, with the mark as it will be beside the icon and the colour, to keep or change) or to choose; the projects, all or some; the settings form from the manifest, and each secret with when it was set, never its value, a keyed one with each of its keys, how its value stands and the way to remove it, and a key and a value to set one; the roles the plugin declares, each with what it is for and who holds it, every member for `defaultRole`, each grant (a person, a project's members, everyone) a chip with the way to revoke it, and one choice to grant the role to someone not holding it yet; the plugin's events; export and purge, the latter offered once the plugin is disabled and asking for the key to be typed. Administrators only; no plugin code runs on these pages.
|
|
450
454
|
|
|
451
455
|
## Security model
|
|
452
456
|
|
|
@@ -480,6 +484,8 @@ The install path is the first line (a release of the deployment, from a lockfile
|
|
|
480
484
|
| Whoever may use a plugin is a requester in its board project | they raise a decision there through the plugin, themselves or through a plugin acting for them, and read it as its raiser; nothing else of the project opens to them |
|
|
481
485
|
| A plugin's own acts are the console's, through no one | recorded as the administrator who enabled it, with the plugin's key beside; an identity of the plugin's own on the board is an open question ([architecture.md](../architecture.md)) |
|
|
482
486
|
|
|
487
|
+
**Whose account at a messenger is whose** is said by a plugin and by nothing else ([ADR-0164](../adr/0164-a-plugin-says-which-account-at-a-messenger-is-a-members-and-a-wake-says-by-it-whether-a-supervisor-wrote.md)), and it is the one thing a plugin says that an agent account acts on as a person's standing: a supervisor's own word at the messenger instructs the accounts they supervise. So it has a capability to itself, which no other implies; the console reads what was said only while the plugin that said it is enabled and holds the capability; no plugin says over another; and the record of every change is the workspace's own, under the plugin's name. What a plugin's page, a person's argument or a message says of an account reaches the console's answer only through the plugin's own call, so a plugin that holds the capability matches by what its design says, and its tests hold it to that.
|
|
488
|
+
|
|
483
489
|
**What is checked, not enforced.** The hardening of a thread is defence in depth: a sandbox of its own would be a host container without egress, left to later. `console-plugin check` scans a plugin for what the host refuses, so that an author learns before an administrator does.
|
|
484
490
|
|
|
485
491
|
**The pages.** A frame's code runs in an opaque origin and reaches the console through the bridge alone, which performs its plugin's own routes and nothing else; it holds the person's authority within its plugin, exactly as the plugin's server does. A file of its bundle, which a frame may go to, carries a policy of its own and runs nothing as a document. A frame holds no WebRTC either, which `connect-src` does not govern and no policy a browser honours closes: every script of a bundle is served beginning with a line that takes it out of wherever the script runs, the frame or a frame made inside it ([ADR-0064](../adr/0064-a-frame-holds-no-webrtc-every-script-of-a-bundle-begins-by-taking-it-out.md)). A plugin that holds `outbound:webrtc` is served its scripts without that line; no host opens it, and it opens no host. One that lists it as optional is served its scripts uncached, so that it is gone from the next time a frame loads once it is withdrawn; a consent a new version no longer asks opens nothing, and a frame runs its own version's scripts alone ([ADR-0066](../adr/0066-webrtc-is-a-way-out-a-plugin-asks-for-and-how-a-frame-is-held-stays-in-one-place.md)). Nothing a plugin writes is rendered as HTML by the console's pages: a tab, a sub-tab and a widget's name are text.
|
package/docs/specs/rest.md
CHANGED
|
@@ -98,7 +98,7 @@ The API is the board as its members see it: the people, the projects, and in eac
|
|
|
98
98
|
|
|
99
99
|
### `GET /api/v1/me`
|
|
100
100
|
|
|
101
|
-
`{ "workspace": { "name", "tokenDaysAtMost", "skills": { "source", "address", "packToken" }, "peopleVisibility", "weekStart", "timeZone", "language" }, "person": ... | null, "agent": "..." | null, "session": { "kind", "name" } | null, "language": "..." | null, "signIn": [{ "key", "label", "admits": { "organization", "domains" } }, ...], "console": { "version", "clientRange" }, "decisions": { "waiting" } | null }`: what the board is called, the most days a token may be good for here (or `null` where a person chooses), where the organization's skills come from (`source`, the origin of the SkillCDN deployment they are read through, and `address`, the organization's, canonical, which a project without one of its own reads, or `null`; and `packToken`, when the SkillCDN token the organization's pack is read with was set, `{ setAt }`, or `null`), who sees whom on the People page (`peopleVisibility`: `everyone`, or `shared_projects`, where a member sees only the people they share a project with and an administrator everyone; [ADR-0035](../adr/0035-who-may-see-whom-is-decided-by-one-policy-and-the-workspace-keeps-its-settings.md); read as optional, for a console from before the setting), the day the calendars begin a week on and this week is counted by (`weekStart`: `auto`, as the language of the pages has it, or `monday`, `sunday`; [ADR-0039](../adr/0039-this-week-is-the-plans-unit-and-the-week-begins-as-the-workspace-says.md)) and the workspace's time zone (`timeZone`: an IANA name, in which the command prints moments, or `null` for none; `language`: the workspace's language, the tag of one the console speaks, for whoever has none of their own, the pages after the browser's languages and the plugins' calls ([ADR-0081](../adr/0081-a-workspace-has-a-language-for-whoever-has-none-of-their-own.md)), or `null` for none, English then; both optional the same way), who the session cookie or the token says is asking (`id`, `login`, `name` or `null`, `avatar` or `null`, `role`), with what (`agent`: the name of the token when a token asks, as its person called it, so that a console of a person's own knows it holds one and offers nothing a token cannot do; `null` on a session), the language the person reads in (`language`, a tag: the one they chose, else the one the pages first saw them in, [ADR-0065](../adr/0065-a-plugin-writes-one-text-and-a-persons-language-is-kept-from-the-first-time-the-pages-see-them.md); `null` until then), their own arrangement of the front page's widgets (`home`, [ADR-0059](../adr/0059-a-person-arranges-the-front-pages-widgets-from-the-sizes-each-comes-in.md): `[{ plugin, widget, size, place? }]` in order, or `null` for the manifests'; answered from 0.4.4 and read as optional), and the identity providers people sign in through (`gh`, `google`, each with the label of its button and, in `admits`, who gets in through it: the organization at the git host whose members are in, or `null`, and the Workspace domains whose accounts are, which a sign-in page says under the button; answered from 0.4.1 and read as optional), none where nobody can; and the console's own version with the range of command versions it takes (`console`, [ADR-0025](../adr/0025-the-command-names-its-version-on-every-request-and-the-console-holds-it-to-the-range-it-takes.md)), for a console built on the package to compare itself with; and how many decisions wait for the person's answer across the projects they may see (`decisions.waiting`, [ADR-0042](../adr/0042-a-decision-is-addressed-to-a-person-its-raiser-unless-another-is-named.md); `null` for nobody; answered from 0.4.3 and read as optional), which the pages say beside My decisions and read again when a decision is raised or answered. Nobody is an answer, not an error; the pages ask this once to decide what to show, and the command once, at `login`, to see that the console knows the token. Nobody is told what the sign-in page shows and no more: of the workspace its `name` and its `language`, with `tokenDaysAtMost` as `null` and `skills` as `{ "source": "", "address": null }`, the two keys every answer has, saying nothing; its short name, its domain, its services, who sees whom, the week's first day, the time zone and where the skills are read are its members' to read, and are left out; then the ways in and the console's version. A token the console knows whose person is out is refused here as on every route, `auth.deactivated` or `auth.not_admitted`, so that the agent learns why ([ADR-0044](../adr/0044-a-token-of-a-person-who-is-out-is-kept-and-refused-with-the-reason-until-they-are-back-in.md)).
|
|
101
|
+
`{ "workspace": { "name", "tokenDaysAtMost", "skills": { "source", "address", "packToken" }, "peopleVisibility", "weekStart", "timeZone", "language" }, "person": ... | null, "agent": "..." | null, "session": { "kind", "name" } | null, "language": "..." | null, "signIn": [{ "key", "label", "admits": { "organization", "domains" } }, ...], "console": { "version", "clientRange" }, "decisions": { "waiting" } | null, "notifications": { "unread" } | null }`: what the board is called, the most days a token may be good for here (or `null` where a person chooses), where the organization's skills come from (`source`, the origin of the SkillCDN deployment they are read through, and `address`, the organization's, canonical, which a project without one of its own reads, or `null`; and `packToken`, when the SkillCDN token the organization's pack is read with was set, `{ setAt }`, or `null`), who sees whom on the People page (`peopleVisibility`: `everyone`, or `shared_projects`, where a member sees only the people they share a project with and an administrator everyone; [ADR-0035](../adr/0035-who-may-see-whom-is-decided-by-one-policy-and-the-workspace-keeps-its-settings.md); read as optional, for a console from before the setting), the day the calendars begin a week on and this week is counted by (`weekStart`: `auto`, as the language of the pages has it, or `monday`, `sunday`; [ADR-0039](../adr/0039-this-week-is-the-plans-unit-and-the-week-begins-as-the-workspace-says.md)) and the workspace's time zone (`timeZone`: an IANA name, in which the command prints moments, or `null` for none; `language`: the workspace's language, the tag of one the console speaks, for whoever has none of their own, the pages after the browser's languages and the plugins' calls ([ADR-0081](../adr/0081-a-workspace-has-a-language-for-whoever-has-none-of-their-own.md)), or `null` for none, English then; both optional the same way), who the session cookie or the token says is asking (`id`, `login`, `name` or `null`, `avatar` or `null`, `role`), with what (`agent`: the name of the token when a token asks, as its person called it, so that a console of a person's own knows it holds one and offers nothing a token cannot do; `null` on a session), the language the person reads in (`language`, a tag: the one they chose, else the one the pages first saw them in, [ADR-0065](../adr/0065-a-plugin-writes-one-text-and-a-persons-language-is-kept-from-the-first-time-the-pages-see-them.md); `null` until then), their own arrangement of the front page's widgets (`home`, [ADR-0059](../adr/0059-a-person-arranges-the-front-pages-widgets-from-the-sizes-each-comes-in.md): `[{ plugin, widget, size, place? }]` in order, or `null` for the manifests'; answered from 0.4.4 and read as optional), and the identity providers people sign in through (`gh`, `google`, each with the label of its button and, in `admits`, who gets in through it: the organization at the git host whose members are in, or `null`, and the Workspace domains whose accounts are, which a sign-in page says under the button; answered from 0.4.1 and read as optional), none where nobody can; and the console's own version with the range of command versions it takes (`console`, [ADR-0025](../adr/0025-the-command-names-its-version-on-every-request-and-the-console-holds-it-to-the-range-it-takes.md)), for a console built on the package to compare itself with; and how many decisions wait for the person's answer across the projects they may see (`decisions.waiting`, [ADR-0042](../adr/0042-a-decision-is-addressed-to-a-person-its-raiser-unless-another-is-named.md); `null` for nobody; answered from 0.4.3 and read as optional), which the pages say beside My decisions and read again when a decision is raised or answered. Nobody is an answer, not an error; the pages ask this once to decide what to show, and the command once, at `login`, to see that the console knows the token. Nobody is told what the sign-in page shows and no more: of the workspace its `name` and its `language`, with `tokenDaysAtMost` as `null` and `skills` as `{ "source": "", "address": null }`, the two keys every answer has, saying nothing; its short name, its domain, its services, who sees whom, the week's first day, the time zone and where the skills are read are its members' to read, and are left out; then the ways in and the console's version. A token the console knows whose person is out is refused here as on every route, `auth.deactivated` or `auth.not_admitted`, so that the agent learns why ([ADR-0044](../adr/0044-a-token-of-a-person-who-is-out-is-kept-and-refused-with-the-reason-until-they-are-back-in.md)).
|
|
102
102
|
|
|
103
103
|
### `GET /api/v1/people?login=`
|
|
104
104
|
|
|
@@ -131,7 +131,7 @@ Takes `key` and `name`, and optionally `description`, `visibility` (default `pri
|
|
|
131
131
|
|
|
132
132
|
### `GET /api/v1/events?after=&limit=`
|
|
133
133
|
|
|
134
|
-
The workspace's own events, the ones about no project: who joined (`person.joined`), who was made what (`person.role_changed`), who was let in, taken off the list, taken out and taken back in (`person.listed`, `person.unlisted`, `person.deactivated`, `person.reactivated`, each with the `login`), whom someone reports to now (`person.manager_changed`, with the `login` and the `manager`'s login, or `null`), what changed of a member, a title or what an agent account is (`person.updated`, with the `login`, the `fields` and an agent account's `handle`), what became of the categories (`category.created`, `category.updated`, `category.removed`, each with the `key` and the `name`), and which of the workspace's settings an administrator changed (`workspace.updated`, with `fields`). The same shape and parameters as a project's feed below, without the filters. They say who is in, so they go to whom the policy shows everyone ([ADR-0035](../adr/0035-who-may-see-whom-is-decided-by-one-policy-and-the-workspace-keeps-its-settings.md)): `auth.forbidden` for a member while the people are narrowed to those they share a project with.
|
|
134
|
+
The workspace's own events, the ones about no project: who joined (`person.joined`), who was made what (`person.role_changed`), who was let in, taken off the list, taken out and taken back in (`person.listed`, `person.unlisted`, `person.deactivated`, `person.reactivated`, each with the `login`), whom someone reports to now (`person.manager_changed`, with the `login` and the `manager`'s login, or `null`), what changed of a member, a title or what an agent account is (`person.updated`, with the `login`, the `fields` and an agent account's `handle`), which account at a messenger a plugin said is a member's, or is no longer (`person.updated` too, its `fields` being `account`, with the `login`, the `messenger`, the `workspace` and the `account` by the messenger's ids, `set` for whether the account is theirs now, and the plugin that said it as the event's `plugin`; [ADR-0164](../adr/0164-a-plugin-says-which-account-at-a-messenger-is-a-members-and-a-wake-says-by-it-whether-a-supervisor-wrote.md)), what became of the categories (`category.created`, `category.updated`, `category.removed`, each with the `key` and the `name`), and which of the workspace's settings an administrator changed (`workspace.updated`, with `fields`). The same shape and parameters as a project's feed below, without the filters. They say who is in, so they go to whom the policy shows everyone ([ADR-0035](../adr/0035-who-may-see-whom-is-decided-by-one-policy-and-the-workspace-keeps-its-settings.md)): `auth.forbidden` for a member while the people are narrowed to those they share a project with.
|
|
135
135
|
|
|
136
136
|
### `PATCH /api/v1/me`
|
|
137
137
|
|
|
@@ -165,7 +165,7 @@ Kept by an administrator, signed in or through their agent's token. `POST` takes
|
|
|
165
165
|
|
|
166
166
|
### `GET /api/v1/rules`, `PUT /api/v1/rules`, `POST /api/v1/rules/archive` and `GET /api/v1/rules/versions`
|
|
167
167
|
|
|
168
|
-
The rules of the board ([ADR-0023](../adr/0023-the-rules-of-a-board-are-pages-the-workspace-and-its-projects-keep-read-first-by-every-agent.md), [ADR-0120](../adr/0120-the-consoles-rules-always-hold-and-a-workspace-and-a-project-add-to-them.md)): the console's rules, which always hold, and what the organization adds to them; read by whoever is signed in or presents a token, and added to by an administrator, signed in or through their agent's token. `GET` answers `{ "source", "body", "page", "own", "added" }`. `body` is what holds at the workspace, whole: the console's rules as this version of the console carries them, then what the organization adds under a heading of its own (`# What this organization adds`)
|
|
168
|
+
The rules of the board ([ADR-0023](../adr/0023-the-rules-of-a-board-are-pages-the-workspace-and-its-projects-keep-read-first-by-every-agent.md), [ADR-0120](../adr/0120-the-consoles-rules-always-hold-and-a-workspace-and-a-project-add-to-them.md)): the console's rules, which always hold, and what the organization adds to them; read by whoever is signed in or presents a token, and added to by an administrator, signed in or through their agent's token. `GET` answers `{ "source", "body", "page", "own", "added" }`. `body` is what holds at the workspace, whole: the console's rules as this version of the console carries them, then what the organization adds under a heading of its own (`# What this organization adds`). `source` is `reference` while the organization adds nothing, with `page: null`; once something is added, `source` is `written` and `page` is the additions' page without its body (as a folder lists one: `path` `rules`, `title` `Rules`, `version`, `updatedBy`, `agent`, `createdAt`, `updatedAt`). The two parts come apart as well, from 0.5.1 and read as optional: `own`, the console's rules by themselves, and `added`, `{ "body", "page" }` for what the organization adds, or `null`. `PUT` takes `body` (Markdown, `MAX_RULES_LENGTH`) and optionally `baseVersion`, writes it as the next version of what the organization adds, bringing the page back when it was put away, and answers what `GET` answers. The console's rules are never written: a body that carries them whole, as a command or a page of before read them and sends them back, is written as what stands before them and after them, without the heading, and with nothing beside them it puts what was added away, as `POST .../archive` does. The whole is known as it was read: with `{language}` as it stands or filled with any words, as `console rules` prints it, and with lines that end in a line feed or in a carriage return and one; a body that quotes a sentence of the rules, or a part of them, is written as it is. A write from a version the additions have moved on from is `document.conflict`. The write is a `document.written` event in the workspace's own feed, with `path`, `title` and `version`. `POST .../archive` puts what the organization adds away, so that the console's rules stand alone (`document.archived`); what is put away already changes nothing. `.../versions` answers `{ "items": [version, ...] }` as a page's versions are answered, newest first, and `{ "items": [] }` while nothing is added. A body may say `{language}` for the language of the person an agent works for: the API answers the text as written, and the pages and the command fill it (`fillRules`), with the name of the language the person reads in (`GET /api/v1/me`, `language`) or with the task's while they have none. The answer also carries `plugins` ([plugins.md](plugins.md), "The command"): every enabled plugin the asker may use, by key, each with its `name`, `agentNote` and `description` by language and the asker's `roles` in it; empty where the console has none.
|
|
169
169
|
|
|
170
170
|
### `GET /api/v1/work`
|
|
171
171
|
|
|
@@ -183,6 +183,16 @@ One decision by its id, wherever it is ([ADR-0068](../adr/0068-a-decision-reache
|
|
|
183
183
|
|
|
184
184
|
The bytes of a file put on a decision ([ADR-0055](../adr/0055-a-decision-carries-the-files-put-on-it-when-it-is-raised.md)) at the decision's own address, for whoever the decision reaches as `GET /api/v1/decisions/<id>` has it, in a project they may see or not ([ADR-0068](../adr/0068-a-decision-reaches-whom-it-is-addressed-to-wherever-it-is-and-a-plugins-reaches-the-managers-above-them.md)), with a session or a token: what the pages read a decision's attachments and the pictures its context names at, on the person's own decisions and at `/decisions/<id>`, where the decision may be of a project the person may not see. Answered as the project's address for files answers: the same `content-length`, `content-disposition`, types and policy. Only a file of that decision: another file of its project, a decision out of the asker's reach, one that is not there and an id that is no id are each `file.not_found`, told apart by nothing.
|
|
185
185
|
|
|
186
|
+
### `GET /api/v1/notifications?unread=&limit=&offset=` and `POST /api/v1/notifications/read`
|
|
187
|
+
|
|
188
|
+
What the asker is told of what happens on the board ([ADR-0157](../adr/0157-the-console-decides-who-is-told-of-what-and-keeps-the-record-and-a-plugin-carries-it-out.md)): `{ "items": [{ "id", "kind", "followed", "readAt", "createdAt", "event", "project": { "key", "name", "color", "symbol", "glyph", "icon" } | null }, ...], "more": boolean, "unread": count }`, the newest first, 50 unless `limit` says otherwise and 200 at most, from `offset` on; `unread=true` answers those not read alone. `kind` says why they are told: `assigned`, `ready`, `moved`, `changed`, `commented`, `archived`, `decision`, `answered` or `agent`, read as a word, since a later console may add one. `followed` is true where they are told because they turned the task's notifications on themselves, whatever their settings say. `readAt` is when they read it, `null` while they have not. `event` is the feed's own event, as `GET .../events` answers one, and `project` the project it happened in, `null` for what happened to the workspace itself, an agent account's standing say. A notification an agent account was woken with is read as it is made, since the wake said it. A notification is the asker's own, a person's or an agent account's alike, and their agent's with their token; it is answered only while the asker may still see what it is of: a task of a project they may see, a decision that reaches them, an agent account they supervise. `/api/v1/me` counts those not read (`notifications.unread`). Notifications are kept ninety days.
|
|
189
|
+
|
|
190
|
+
`POST /api/v1/notifications/read` takes `{ "ids": [...] }`, up to 200 of the asker's notifications, or `{ "all": true }`, and answers `{ "read", "unread", "at" }`: how many were marked, how many are still not read, and the moment those marked were read at, which is their `readAt` from then on. One that is another member's, read already, or of a thing the asker may no longer see is none of them. The pages read the whole list at one moment, when a member opens it under the bell: they mark all, list after, and show as new whatever was read at `at` or later, or is not read yet.
|
|
191
|
+
|
|
192
|
+
### `GET` and `PUT /api/v1/notifications/settings`
|
|
193
|
+
|
|
194
|
+
What the asker is told of: `{ "kinds": { "<kind>": boolean, ... }, "defaults": { ... }, "projectsOff": [{ "key", "name" }, ...], "ownAgents": boolean }`. `kinds` is each kind on or off, and `defaults` what it would be had they chosen nothing: for a person `agent` alone, which is how the agent accounts that report to them stand and a decision one of them raises for them ([ADR-0158](../adr/0158-an-agent-account-holds-to-how-its-manager-set-it-up-tells-its-manager-of-what-tries-to-instruct-it-and-waits-for-a-word-before-it-spends.md)), for an agent account `ready`, `commented`, `decision`, `answered` and `agent`. A notification is made only under a kind that is on. `projectsOff` are the projects they are told nothing of, and `ownAgents` whether they are told of what an agent of their own did as them, which they are not unless they say so. The settings are of everything a member is told and name no plugin: a kind that is off makes no notification, but of a task whose bell the asker turned on themselves, and so is sent on by nobody, and which of the kinds that are on a plugin that carries notifications out of the console sends, to a messenger say, is that plugin's own setting, offered and kept by the plugin ([plugins](plugins.md#capabilities)). `PUT` takes `{ "kinds"?, "projectsOff"?, "ownAgents"? }`: the kinds named are changed and the others stay; `projectsOff` is the whole list, by the projects' keys, of projects the asker may see; or `{ "reset": true }`, alone, for the defaults again. A kind that is none is `request.invalid`, a project that is not there or not theirs to see `project.not_found`, and nothing is changed by a request that is refused.
|
|
195
|
+
|
|
186
196
|
### `GET /api/v1/tokens` and `POST /api/v1/tokens`
|
|
187
197
|
|
|
188
198
|
The tokens of whoever is signed in, for their agents, scripts and consoles of their own: managed by a person signed in on the console's own pages, never with a token, so that a token which leaks cannot outlive its removal through tokens of its own. `GET` answers `{ "items": [token, ...] }`, the live ones newest first: `id`, `name`, `createdAt`, `expiresAt` (or `null` for a token that does not expire), `lastUsedAt` (or `null`; noted at most hourly), `client` (the version of the command that last presented it, `0.1.18`, noted with its last use and whenever it changes; or `null` when the last to present it named none, [ADR-0025](../adr/0025-the-command-names-its-version-on-every-request-and-the-console-holds-it-to-the-range-it-takes.md)), and never a secret. `POST` takes `name` (what the person calls it: the agent it is for, where it runs; what the board shows at work unless the agent says otherwise, and what an event names as the agent) and optionally `expiresInDays` (`1` to `MAX_TOKEN_DAYS`; `DEFAULT_TOKEN_DAYS` when left out; `null` for a token that does not expire, where the organization allows one; `token.expiry_at_most` otherwise) and answers `201` with `{ "token": token, "secret": "cns_t_..." }`: the secret this once, which the server keeps only as a hash.
|
|
@@ -249,7 +259,7 @@ For an owner, signed in or with a token. The patch takes `role` and writes `proj
|
|
|
249
259
|
|
|
250
260
|
### `GET /api/v1/projects/<key>/tasks?state=&open=&archived=&category=&goal=&worker=&unassigned=&dueBy=&q=&limit=&offset=`
|
|
251
261
|
|
|
252
|
-
`{ "items": [task, ...], "more": boolean }`: the project's board, newest first, a page at a time; `brief=true` answers the same page with every task without its `body`, for what lists tasks and shows no body, a listing of the command or a desk's pages, where the bodies weigh more than the rest of a page together (a console from before 0.5.1 ignores the word and answers the tasks whole, which reads the same, so whoever asks for the brief form reads `body` as optional). `limit` (1 to `LIST_LIMIT`, the default) and `offset` (from 0) say which page, and `more` whether there is one after it; a `limit` or an `offset` that is not a number in range is `request.invalid`. `state` keeps one state of it; `open=true` the tasks not done or dropped, `open=false` the rest; `category=<key>` those sorted into a category; `goal=<id>` those that work towards a goal; `worker=<person id>` those one person is at work on, `unassigned=true` those nobody is at work on (with `worker`, nothing); `dueBy=<day>` (`2026-10-24`) those due on that day or before it; `q=<words>` (1 to `MAX_SEARCH_LENGTH` characters) those whose title holds every word, whatever the case and in any order, and the task of that number for a number (`12`, `#12`), which is how a picker or a command finds a task by its title ([ADR-0037](../adr/0037-a-task-has-one-owner-and-any-number-of-workers-and-a-parent-or-a-goal-is-found-by-search.md)). The tasks put away ([ADR-0029](../adr/0029-a-task-done-or-dropped-is-put-away-out-of-the-board-and-open-by-its-number.md)) are left out; `archived=true` answers them alone, newest first: the archive and the board are two listings, never one. A task carries its `number` (the one people say out loud, numbered per project), `title`, `body` (Markdown, to be shown as text or rendered to elements, never as HTML), `state`, `priority`, `owner` (one person, whoever wrote it), `agent` (the agent the task was written through, or `null` when a person wrote it themselves, the owner may have changed since; [ADR-0056](../adr/0056-a-record-that-names-the-person-who-did-a-thing-names-the-agent-they-did-it-through.md); from 0.4.4, read as optional), `workers` (the people at work on it, in the order they came to it, `[]` while nobody is; [ADR-0037](../adr/0037-a-task-has-one-owner-and-any-number-of-workers-and-a-parent-or-a-goal-is-found-by-search.md)), `parentId`, `category` (its `key`, `name` and `color` as the workspace keeps it, or `null`), `goalId` (or `null`), its plan ([ADR-0019](../adr/0019-a-task-is-planned-in-days-the-board-keeps-its-moments-and-goals-and-categories-give-the-work-its-shape.md)): `startsOn` and `dueOn`, each a day (`2026-10-24`) or `null`; its moments, which the board keeps itself: `startedAt`, when it was first moved past `ready`, and `doneAt`, when it was moved to `done`, each an instant or `null`; `archivedAt`, when it was put away, an instant or `null` while it is current; `links` (`url` and `label`), `openDecisions` (how many decisions about it wait for a person), `openRuns` (how many runs on it are open: begun and not ended, which says nothing of whether an agent is still at it, [ADR-0020](../adr/0020-the-console-does-not-claim-an-agent-is-at-work-a-run-says-when-it-was-last-heard-from-and-a-new-run-takes-over.md)), `createdAt` and `updatedAt`.
|
|
262
|
+
`{ "items": [task, ...], "more": boolean }`: the project's board, newest first, a page at a time; `brief=true` answers the same page with every task without its `body`, for what lists tasks and shows no body, a listing of the command or a desk's pages, where the bodies weigh more than the rest of a page together (a console from before 0.5.1 ignores the word and answers the tasks whole, which reads the same, so whoever asks for the brief form reads `body` as optional). `limit` (1 to `LIST_LIMIT`, the default) and `offset` (from 0) say which page, and `more` whether there is one after it; a `limit` or an `offset` that is not a number in range is `request.invalid`. `state` keeps one state of it; `open=true` the tasks not done or dropped, `open=false` the rest; `category=<key>` those sorted into a category; `goal=<id>` those that work towards a goal; `worker=<person id>` those one person is at work on, `unassigned=true` those nobody is at work on (with `worker`, nothing); `dueBy=<day>` (`2026-10-24`) those due on that day or before it; `q=<words>` (1 to `MAX_SEARCH_LENGTH` characters) those whose title holds every word, whatever the case and in any order, and the task of that number for a number (`12`, `#12`), which is how a picker or a command finds a task by its title ([ADR-0037](../adr/0037-a-task-has-one-owner-and-any-number-of-workers-and-a-parent-or-a-goal-is-found-by-search.md)). The tasks put away ([ADR-0029](../adr/0029-a-task-done-or-dropped-is-put-away-out-of-the-board-and-open-by-its-number.md)) are left out; `archived=true` answers them alone, newest first: the archive and the board are two listings, never one. A task carries its `number` (the one people say out loud, numbered per project), `title`, `body` (Markdown, to be shown as text or rendered to elements, never as HTML), `state`, `priority`, `owner` (one person, whoever wrote it), `agent` (the agent the task was written through, or `null` when a person wrote it themselves, the owner may have changed since; [ADR-0056](../adr/0056-a-record-that-names-the-person-who-did-a-thing-names-the-agent-they-did-it-through.md); from 0.4.4, read as optional), `workers` (the people at work on it, in the order they came to it, `[]` while nobody is; [ADR-0037](../adr/0037-a-task-has-one-owner-and-any-number-of-workers-and-a-parent-or-a-goal-is-found-by-search.md)), `parentId`, `category` (its `key`, `name` and `color` as the workspace keeps it, or `null`), `goalId` (or `null`), its plan ([ADR-0019](../adr/0019-a-task-is-planned-in-days-the-board-keeps-its-moments-and-goals-and-categories-give-the-work-its-shape.md)): `startsOn` and `dueOn`, each a day (`2026-10-24`) or `null`; its moments, which the board keeps itself: `startedAt`, when it was first moved past `ready`, and `doneAt`, when it was moved to `done`, each an instant or `null`; `lastRunEndedAt`, when the last of its runs to end ended, read from the runs, an instant or `null` where none has ([ADR-0159](../adr/0159-a-task-with-no-day-of-its-plan-lies-on-the-calendar-where-it-was-worked.md); from 0.6.2, read as optional); `archivedAt`, when it was put away, an instant or `null` while it is current; `links` (`url` and `label`), `openDecisions` (how many decisions about it wait for a person), `openRuns` (how many runs on it are open: begun and not ended, which says nothing of whether an agent is still at it, [ADR-0020](../adr/0020-the-console-does-not-claim-an-agent-is-at-work-a-run-says-when-it-was-last-heard-from-and-a-new-run-takes-over.md)), `createdAt` and `updatedAt`.
|
|
253
263
|
|
|
254
264
|
### `POST /api/v1/projects/<key>/tasks`
|
|
255
265
|
|
|
@@ -259,6 +269,10 @@ Takes `title`, and optionally `body`, `state` (default `idea`), `priority` (defa
|
|
|
259
269
|
|
|
260
270
|
One task, by its id or by its number in the project (`/tasks/7`): the pages hold ids, people and their agents say numbers. A patch takes the id and names only what changes, with the same fields as a creation; a field set to `null` clears it, and `workerIds` names the workers whole, in place of those there were, only the newcomers being checked, `[]` leaving nobody on it. A change of `state` is a `task.moved` event with `from` and `to`; any other change is one `task.updated` event naming the `fields` (`workers`, `category`, `goalId`, `startsOn` and `dueOn` among them, as the input names them), and, where the change put anyone to work on it, their ids (`workersAdded`). A patch that changes nothing writes nothing and answers the task as it is. The moments follow the moves: the first move past `ready` sets `startedAt`, a move to `done` sets `doneAt`, and a move back out of `done` clears it.
|
|
261
271
|
|
|
272
|
+
### `GET` and `PUT /api/v1/projects/<key>/tasks/<id or number>/follow`
|
|
273
|
+
|
|
274
|
+
Whether one task tells the asker anything ([ADR-0157](../adr/0157-the-console-decides-who-is-told-of-what-and-keeps-the-record-and-a-plugin-carries-it-out.md)): `{ "on": boolean, "usual": boolean, "all": boolean }`. `on` is how it stands, `all` whether they turned it on themselves and are told of everything on it, which holds whatever their settings come to say until they turn it again, and `usual` what their settings alone have: on where they own the task or are at work on it, have on one of the kinds a task goes on telling such a member under (its owner `moved`, `changed`, `commented` and `archived`; whoever is at work on it `ready`, `changed`, `commented` and `archived`; `assigned` is said once and is none of them), and did not turn its project off; off for every other task. `PUT` takes `{ "on": boolean }` and answers the same three. Turned on where `usual` is off, the task tells them of everything that happens on it, its changes, its moves, its comments and its being put away, whatever their kinds and whatever its project; turned off where `usual` is on, of nothing of it, its owner and those at work on it among them; turned to what `usual` says, nothing is kept of the choice, so that a task turned off and on again tells them by their kinds as before. For anyone who may see the task, a person or an agent account, and their agent with their token.
|
|
275
|
+
|
|
262
276
|
### `POST .../tasks/<id>/archive`, `POST .../tasks/<id>/restore` and `POST /api/v1/projects/<key>/tasks/archive`
|
|
263
277
|
|
|
264
278
|
Putting a task away, and bringing it back ([ADR-0029](../adr/0029-a-task-done-or-dropped-is-put-away-out-of-the-board-and-open-by-its-number.md), [ADR-0030](../adr/0030-a-task-is-put-away-from-any-state.md)). A task is put away, whatever its state, by whoever may work in the project, with a session or a token, and brought back the same way: putting away is a moment the board keeps (`archivedAt`), not a state, so the task keeps its state, counts toward its goal as before, and keeps its runs, decisions, comments and events; it is out of the listings, the board and the calendar, and open at its own address by id or by number still. Each answers the task and writes `task.archived` or `task.restored` with the task's `number` and `title`; what is so already answers the task and writes nothing. `POST .../tasks/archive`, for an owner, takes `{ "goalId" }` and puts every done or dropped task of that goal away at once, one event each, answering `{ "archived": n }`, how many went; a goal with nothing to put away, or that is not the project's, is `0`. The console puts away by itself what was done or dropped and not touched for `TASK_ARCHIVE_AFTER_DAYS` ([deploy/README.md](../../deploy/README.md#environment-contract)), each with a `task.archived` event that names no actor.
|
|
@@ -285,7 +299,7 @@ The answer takes `option` (the id of one of its options) or `own` (the person's
|
|
|
285
299
|
|
|
286
300
|
### `PUT /api/v1/projects/<key>/decisions/<id>/deciders`
|
|
287
301
|
|
|
288
|
-
Addresses a decision that waits anew ([ADR-0096](../adr/0096-a-decision-that-waits-may-be-addressed-anew-by-whoever-may-answer-it.md)): takes `deciderIds`, one to `MAX_DECIDERS` people, each once in the order given, who take the place of those it was for; to add someone, those it is for are named again with them. For anyone who may work in the project, with a session from the console's own pages or a token, as its answer is. Each person named must be able to work in the project, as at its raising (`decision.invalid_decider`). An answered decision stays as it was addressed (`decision.answered`), and a plugin's as the plugin addressed it (`decision.plugin_addressed`). Answers the decision, whose `decider` and `deciders` say whom it is for now; who raised it, what it asks and the run that waits are as before. Writes a `decision.addressed` event with the `question`, the logins of everyone it is for now (`deciders`) and the ids of those named anew (`decidersAdded`); the same people in the same order write nothing. Those named find it among their decisions from then on, and those left out no longer do. From 0.5.0
|
|
302
|
+
Addresses a decision that waits anew ([ADR-0096](../adr/0096-a-decision-that-waits-may-be-addressed-anew-by-whoever-may-answer-it.md)): takes `deciderIds`, one to `MAX_DECIDERS` people, each once in the order given, who take the place of those it was for; to add someone, those it is for are named again with them. For anyone who may work in the project, with a session from the console's own pages or a token, as its answer is. Each person named must be able to work in the project, as at its raising (`decision.invalid_decider`). An answered decision stays as it was addressed (`decision.answered`), and a plugin's as the plugin addressed it (`decision.plugin_addressed`). Answers the decision, whose `decider` and `deciders` say whom it is for now; who raised it, what it asks and the run that waits are as before. Writes a `decision.addressed` event with the `question`, the logins of everyone it is for now (`deciders`) and the ids of those named anew (`decidersAdded`); the same people in the same order write nothing. Those named find it among their decisions from then on, and those left out no longer do. From 0.5.0.
|
|
289
303
|
|
|
290
304
|
### `PATCH /api/v1/projects/<key>/decisions/<id>`
|
|
291
305
|
|
|
@@ -393,7 +407,7 @@ An agent account is a member of its own ([ADR-0084](../adr/0084-an-agent-account
|
|
|
393
407
|
|
|
394
408
|
- **A person** carries `kind` (`person`, or `agent`), `handle` (an agent account's, what the pages and the command call it by, `@mira`; `null` for a person), `title` (every member's, a line that says what they do; `null` for none) and `avatarParts` (what an agent account's avatar is drawn from: `set`, the version of the set of shapes, and an index into it each for `background`, `head`, `ears`, `eyes`, `mouth`, `marks`, `accessory` and `palette`; `null` for a person, whose picture is `avatar`). Each is read as optional: a console that answers none has persons only.
|
|
395
409
|
- **`person.updated`**, an event of the workspace's feed: a member's title, or an agent account's name or avatar, changed. Its data: `login`, `fields`, and `handle` for an agent account.
|
|
396
|
-
- **`agent.state_changed`**, an event of the workspace's feed ([ADR-0085](../adr/0085-a-runner-on-the-agents-machine-is-told-by-signals-and-runs-one-session-at-a-time.md)): how an agent account stands now. Its data: `login`, `handle`, `state` (`running`, `stopped`, `refused`, `failed` or `unheard`), `was` (the state before, `null` where none had been said)
|
|
410
|
+
- **`agent.state_changed`**, an event of the workspace's feed ([ADR-0085](../adr/0085-a-runner-on-the-agents-machine-is-told-by-signals-and-runs-one-session-at-a-time.md)): how an agent account stands now. Its data: `login`, `handle`, `state` (`running`, `stopped`, `refused`, `failed` or `unheard`), `was` (the state before, `null` where none had been said), `detail` (why, in a few words, where one was said) and `until` (until when it stands so, where its runner said: the moment a usage limit resets, [ADR-0150](../adr/0150-a-runner-waits-out-its-products-usage-limit-and-tells-its-agent-before-it.md)). Its actor is the account itself, whose runner said so; the supervisor whose `stop` stopped it; or nobody, where the console noted an account it has not heard from. It is told where the state changes, and where a usage limit comes or its moment moves while the account stands as `failed` all along, `was` then being `failed` too: an account that had failed for another reason, or was refused at the reset by a longer window, is said with the moment that holds now.
|
|
397
411
|
- **A connection** ([Connecting an agent](#connecting-an-agent)) may ask to be the account itself: `as: "self"` beside `agent` on `POST /api/v1/connect`, `as` answered by `GET /api/v1/connect/<code>`, and a claim that answers `{ "status": "signed_in", "session", "secret" }`, the command's session in place of a token; `GET /api/v1/me` says `session`, and a session its `kind` and `name`.
|
|
398
412
|
|
|
399
413
|
### `GET /api/v1/agents` and `POST /api/v1/agents`
|
|
@@ -402,7 +416,7 @@ An agent account is a member of its own ([ADR-0084](../adr/0084-an-agent-account
|
|
|
402
416
|
|
|
403
417
|
`POST`, for an administrator, signed in or through their agent's token ([ADR-0021](../adr/0021-a-token-configures-as-its-person-does.md)), makes one and answers `201` with it. It takes the account the agent will sign in with, as a listing names one, `host` (one the deployment signs people in through; `agent.unknown_host` otherwise) and `login` (as the host spells one); its persona, `handle` (2 to 39 lowercase letters, digits and hyphens, a letter or a digit first and last, none of the words the addresses and the command use, `RESERVED_HANDLES`: `new`, `me`, `proposals`, `setup`, `invite`, `secret`, `secrets`, `signals`, `tell`, `interrupt`, `stop`, `restart`, `reset`, `set`, `wake`; one among the workspace's agent accounts, `agent.handle_taken`; it never changes), `name` (a line up to `MAX_PERSON_NAME_LENGTH`), `title` (optional, a line up to `MAX_PERSON_TITLE_LENGTH`), and its avatar, `avatarParts` with optionally the `avatarSeed` they were rolled from, or neither, and the console rolls the parts, from the seed where one is given; `managerId`, an active member of the workspace, a person or an agent account, whoever makes the account where none is named (`agent.invalid_manager` for anyone else, or for one who reports to the account); and `project`, the key of the project it starts in (`agent.invalid_project`), where it is listed as a member when the project lists its members. The member's row is written at once, so that work is assigned to it before anyone signed in with it, and the login is let in as a listing lets one in ([ADR-0022](../adr/0022-who-is-in-is-the-consoles-own-record-and-an-administrator-keeps-it.md)); its first sign-in is the account's `person.joined`. A Workspace makes its own addresses: there the account may be made on the way, and the first sign-in with that address binds the provider's account to the row. At a git host a login goes to whoever registers it, so the account has to be the organization's before it is added here, as the pages, the command and the guide say, and the console holds the first sign-in to more than the name ([ADR-0126](../adr/0126-an-agent-account-at-a-git-host-is-bound-to-the-hosts-account-when-it-is-added.md)). Where the deployment names the organization at the host, the console asks it, as the account is added, which of its members the login is, in one question whose answer says both that the login is a member and which account the membership is of, so that no account that came to carry the name between two questions is read in its place, and binds the row to the host's id of that account: `firstSignIn` is `account`, that account alone is let in as this one, whatever it is called by then, and whoever else comes to carry the name is refused while the account waits. Where the organization has no member called so, or cannot be asked, the account is added all the same, not confirmed: `firstSignIn` is `member`, and its first sign-in binds it only where the organization says, at that sign-in, that the login is a member; anyone else under the login is refused. Where the deployment names no organization, nothing can say which account a login is: `firstSignIn` is `login`, and until the account has signed in the console lets in whoever holds the login, as a listing does. A login that is, by the host's id, an account a member already is, under whatever name the console last saw, is that member (`agent.login_is_member`, or the member made the account where `convert` asks); and where the host said which account the login is, a member bound to another account is not the one named, whatever the console last saw them called: the name was theirs and is another account's now, so they are neither refused for nor made the account, with `convert` or without, and the account is added beside them, let in by the organization where a listing of theirs still spells the name. An account added and not used is deactivated, which takes its listing away. The name and the picture stay the console's: a sign-in writes the login as the provider spells it now, and neither the provider's name nor its picture. It writes `person.listed` with `login` and `handle`.
|
|
404
418
|
|
|
405
|
-
With the account the console makes its onboarding ([ADR-0088](../adr/0088-an-agent-account-has-a-desk-and-is-set-up-from-an-invitation-by-signing-in-as-itself.md), points 4 to 6): a task in the project it starts in, `Set up @<handle>`, `ready`, with the account as its worker and whoever made the account as its owner, through the agent they made it through; its body says what the agent does itself and what it cannot, to be asked for as decisions, in the words of the services the workspace names (`onboardingOf` in the package), and nothing is asked there of the account it signs in with, which comes before it. It names the account's own address where the account signs in with one, the login it was made with, and has it ask which address an invitation goes to where it does not, offering none; and it says that a run waiting for a decision stays open, the answer waking the account, so that the task is finished when nothing of it waits on anyone: each item set up, or answered as not to be done now, the last report listing what is not done. The board wakes the account with it, as with any ready task it is at work on ([runner.md](runner.md#the-boards-wakes)), and the wake waits on the account's record until a runner first connects. The answer carries `onboarding`, `{ "project", "number" }`, or `null` where the board took no task; an account read later says nothing of it.
|
|
419
|
+
With the account the console makes its onboarding ([ADR-0088](../adr/0088-an-agent-account-has-a-desk-and-is-set-up-from-an-invitation-by-signing-in-as-itself.md), points 4 to 6): a task in the project it starts in, `Set up @<handle>`, `ready`, with the account as its worker and whoever made the account as its owner, through the agent they made it through; its body says what the agent does itself and what it cannot, to be asked for as decisions, in the words of the services the workspace names (`onboardingOf` in the package), and nothing is asked there of the account it signs in with, which comes before it. Whatever the services are, it says the one rule and how help is asked: the agent does everything it can itself, and asks for help only with what it cannot do ([ADR-0152](../adr/0152-an-agent-does-everything-it-can-itself-and-asks-for-help-only-with-what-it-cannot-do.md)). It names the account's own address where the account signs in with one, the login it was made with, and has it ask which address an invitation goes to where it does not, offering none; and it says that a run waiting for a decision stays open, the answer waking the account, so that the task is finished when nothing of it waits on anyone: each item set up, or answered as not to be done now, the last report listing what is not done. The board wakes the account with it, as with any ready task it is at work on ([runner.md](runner.md#the-boards-wakes)), and the wake waits on the account's record until a runner first connects. The answer carries `onboarding`, `{ "project", "number" }`, or `null` where the board took no task; an account read later says nothing of it.
|
|
406
420
|
|
|
407
421
|
A login a member already carries is refused, `409` `agent.login_is_member`, unless the input says `convert: true` ([ADR-0104](../adr/0104-a-member-is-made-an-agent-account-only-where-that-is-asked-for.md)): a persona's proposed login may spell a colleague's, and nobody is made an agent account by a name that happens to be theirs. With `convert`, the member is made the account, once: the member's own row becomes the account, with everything it did and the sessions and tokens it holds, and the board is told with `person.updated` (`login`, `handle`, `fields: ["kind"]`). An administrator is not made one (`agent.administrator`), and a login that is an agent account already is `agent.exists`, whatever `convert` says; `convert` asks nothing of a login nobody carries. `kind` never goes back.
|
|
408
422
|
|
|
@@ -446,20 +460,24 @@ An agent account keeps named secrets in the console ([ADR-0087](../adr/0087-an-a
|
|
|
446
460
|
|
|
447
461
|
What passes between the console and an agent account's runner ([ADR-0085](../adr/0085-a-runner-on-the-agents-machine-is-told-by-signals-and-runs-one-session-at-a-time.md)) is specified in [runner.md](runner.md), the bodies with it; the routes, who asks them and what they refuse are here.
|
|
448
462
|
|
|
449
|
-
**How an agent stands.** An agent object carries `state`, `{ "state", "reason", "since", "heardAt" }`: one of `running`, `stopped`, `refused`, `failed` and `unheard`; why, one of a short list of words (`started`, `resumed`, `reset`, `completed`, `stop`, `model_refused`, `sign_in`, `start`, `crashed`, `no_heartbeat`); since when; and when its runner was last heard from. It is `null` until a runner has said anything of the account, and answered to whoever sees the account. `runner` is what its runner last said of itself and what was chosen for it, `{ "delivered", "latest", "session", "machine", "runner", "product", "offers", "running", "settings" }`, answered to the account's supervisors and to the account, `null` to anyone else. The console says when it last heard and claims nothing more ([ADR-0020](../adr/0020-the-console-does-not-claim-an-agent-is-at-work-a-run-says-when-it-was-last-heard-from-and-a-new-run-takes-over.md)): a runner not heard from for five minutes is noted `unheard` by the worker, and its next heartbeat says how the agent stands again.
|
|
463
|
+
**How an agent stands.** An agent object carries `state`, `{ "state", "reason", "since", "heardAt" }`: one of `running`, `stopped`, `refused`, `failed` and `unheard`; why, one of a short list of words (`started`, `resumed`, `reset`, `completed`, `stop`, `model_refused`, `sign_in`, `start`, `crashed`, `usage_limit`, `no_heartbeat`); since when; and when its runner was last heard from. `until` is until when it stands so, where its runner said ([ADR-0150](../adr/0150-a-runner-waits-out-its-products-usage-limit-and-tells-its-agent-before-it.md)): the moment a usage limit resets, `null` where nothing says, and left out by a console of before. It is `null` until a runner has said anything of the account, and answered to whoever sees the account. `usage` is what its product last said of what its subscription allows ([ADR-0156](../adr/0156-an-agent-account-shows-what-its-products-allowance-has-used-and-when-it-resets.md)), a window each, `{ "name", "used", "resetsAt", "near"?, "at" }`: the name its driver gives the window, the share used from 0 to 1 and the moment it resets, `null` each where the product does not say, whether the product calls it near its limit, and when the product said so. It is answered to whoever sees the account, from 0.6.1, and left out where its runner has said none; a window whose reset has passed is of a window that is over, and the pages and the command leave it out, as they do one that names no reset once it was last said more than eight days ago. Which windows there are is the product's to say, and none is expected: a plan that keeps no short window is answered without one. `runner` is what its runner last said of itself and what was chosen for it, `{ "delivered", "latest", "session", "machine", "runner", "product", "offers", "running", "settings" }`, answered to the account's supervisors and to the account, `null` to anyone else. The console says when it last heard and claims nothing more ([ADR-0020](../adr/0020-the-console-does-not-claim-an-agent-is-at-work-a-run-says-when-it-was-last-heard-from-and-a-new-run-takes-over.md)): a runner not heard from for five minutes is noted `unheard` by the worker, and its next heartbeat says how the agent stands again.
|
|
450
464
|
|
|
451
465
|
**The runner's own**, for an agent account (`agent.not_found` for a person) on the session of its command signed in as itself ([`console login --self`](#connecting-an-agent)); its browser, or a token it made, is `agent.own_command`, since the command's session is the runner's one credential.
|
|
452
466
|
|
|
453
|
-
- `PUT /api/v1/agents/me/runner` is the heartbeat: how the agent stands and why, the last signal delivered, the open session, the machine, the runner's version, the product and what it offers to choose from, what the session runs with, and as `sources`, optional, how each wake source the runner keeps beside the console's own stands ([ADR-0144](../adr/0144-a-runner-takes-its-runner-json-as-it-changes-and-says-how-its-wake-sources-stand.md): `{ "name", "state", "since", "why"? }`, the state one of `connected`, `waiting` and `failing`, up to ten), which the console keeps as last said and answers as `runner.sources` of the account where a runner said any; every line bounded and read by schema (`request.invalid`), the body up to 64 KiB (`request.too_large`). It answers `{ "latest", "delivered", "settings", "state" }`: the number of the account's newest signal; the most the console was ever told was delivered, where a runner that lost its own count goes on from; the model and the effort chosen for it, `null` each for the product's own, and a choice this heartbeat's `offers` do not list, where they list any, is `null` from then on, since what is chosen is kept among what the product offers; and how the console has the agent, which is `stopped` whatever the runner says while a supervisor's `stop` stands. A state that changed is `agent.state_changed`, by the account.
|
|
467
|
+
- `PUT /api/v1/agents/me/runner` is the heartbeat: how the agent stands and why, as `until`, optional, until when where the runner knows, the moment a usage limit resets ([ADR-0150](../adr/0150-a-runner-waits-out-its-products-usage-limit-and-tells-its-agent-before-it.md)), the last signal delivered, the open session, the machine, the runner's version, the product and what it offers to choose from, what the session runs with, as `usage`, optional, what the product last said of its allowance ([ADR-0156](../adr/0156-an-agent-account-shows-what-its-products-allowance-has-used-and-when-it-resets.md): up to eight windows, a name of forty characters on one line, a share from 0 to 1 or `null`, moments), which the console keeps a window at a time until each resets and answers as `usage` of the account, and as `sources`, optional, how each wake source the runner keeps beside the console's own stands ([ADR-0144](../adr/0144-a-runner-takes-its-runner-json-as-it-changes-and-says-how-its-wake-sources-stand.md): `{ "name", "state", "since", "why"? }`, the state one of `connected`, `waiting` and `failing`, up to ten), which the console keeps as last said and answers as `runner.sources` of the account where a runner said any; every line bounded and read by schema (`request.invalid`), the body up to 64 KiB (`request.too_large`). It answers `{ "latest", "delivered", "settings", "state" }`: the number of the account's newest signal; the most the console was ever told was delivered, where a runner that lost its own count goes on from; the model and the effort chosen for it, `null` each for the product's own, and a choice this heartbeat's `offers` do not list, where they list any, is `null` from then on, since what is chosen is kept among what the product offers; and how the console has the agent, which is `stopped` whatever the runner says while a supervisor's `stop` stands. A state that changed is `agent.state_changed`, by the account.
|
|
454
468
|
- `GET /api/v1/agents/me/signals/stream?after=<number>` is a stream of server-sent events, each `signal` with a signal as its data and its number as its id, from the number after `after` on, in order, with a comment in the silences. `Last-Event-ID` is read in place of `after` where it is further on. The stream ends when the command's session does, and when the process closes. It counts among the streams the account holds (`feed.too_many`).
|
|
455
469
|
|
|
456
470
|
**The record.** `GET /api/v1/agents/<handle>/signals?before=&limit=` answers `{ "items": [signal, ...], "more", "delivered" }`, the newest first, `limit` of them (50 where none is said, 200 at most), from before the number `before` on, to the account's supervisors (`auth.forbidden` for whoever sees the account and does not supervise it). `delivered` is the number of the last signal delivered, every one before it too ([ADR-0131](../adr/0131-a-signal-is-delivered-when-the-product-took-it-and-an-event-says-which-sub-agent-made-it.md)), as the account's runner last said, `0` for none: a signal of the record is delivered where its number is no more than that, and waits otherwise. It follows the runner's heartbeat, so a signal the product has just taken reads as waiting for a moment. A console before 0.5.2 leaves it out. `GET /api/v1/agents/me/signals` answers the same to the account itself, on a session of its own, a browser's or its command's. A signal is no event of the board's feed.
|
|
457
471
|
|
|
458
472
|
**A wake the runner raises itself.** `POST /api/v1/agents/me/signals`, for an agent account on its command's session, as the heartbeat is (`agent.own_command`, `agent.not_found`): `{ "kind": "wake", "source": "messenger", "key", "text" }`, what one of its wake sources heard on the machine ([runner.md](runner.md#wake-sources)). `key` is a line up to `MAX_SIGNAL_KEY_LENGTH` saying what it is about, a thread say; `text`, optional, is someone else's words, bounded as a signal's are. It answers `201` with the signal, recorded under the next number of the account's record, by nobody, and sent on the account's stream in its order. Nothing else is raised this way, any other `kind` or `source` being `request.invalid`: a runner tells its own agent nothing in a supervisor's name, the board's or the console's. A runner raises 600 wakes within an hour at most ([ADR-0132](../adr/0132-what-a-runner-writes-is-bounded-by-the-hour-and-its-log-by-its-size.md)): one more is `signal.too_many` (`429`), with `retry-after`, the seconds until the hour has room, and nothing recorded. What a supervisor, the board and the schedule send is not counted.
|
|
459
473
|
|
|
474
|
+
**Who wrote at a messenger** ([ADR-0164](../adr/0164-a-plugin-says-which-account-at-a-messenger-is-a-members-and-a-wake-says-by-it-whether-a-supervisor-wrote.md)). `POST /api/v1/agents/me/writers`, for an agent account on a session of its own (`agent.not_found` for a person, `agent.own_command` for a token the account made): `{ "messenger", "accounts": [{ "workspace", "account" }, ...] }`, the messenger by its name as a wake source is named (`slack`) and up to `MAX_WRITERS_ASKED` accounts, each by the messenger's ids for its workspace and for itself, letters, digits, `.`, `_` and `-`, 64 at most (`request.invalid` otherwise). It answers `{ "items": [{ "workspace", "account", "told", "member" }, ...] }` in the order asked: `told`, whether the console is told the accounts of that workspace at all, by a plugin that is enabled and holds `people:accounts`; and `member`, `{ "login", "kind", "supervisor", "administrator", "line" }` for the active member whose account it is, `login` being `null` for one the account may not see and has not in its reporting line, `supervisor` being whether they supervise the account that asks, an administrator or above it in the reporting line at any level, `administrator` whether they administer the workspace, and `line` where they stand in the asker's reporting line, `"manager"` whom it reports to, `"above"` anyone further up, `"report"` whoever reports to it, `"below"` anyone further down, `null` nowhere in it, or `null` for an account that is no member's as far as the console is told. It changes nothing. A runner asks it for its wake sources, and `console agent messages` for the lines it prints.
|
|
475
|
+
|
|
460
476
|
**A wake an account raises for itself** ([ADR-0145](../adr/0145-an-agent-account-wakes-itself-now-or-at-a-moment-to-come.md)). `POST /api/v1/agents/me/wakes`, for an agent account on a session of its own, its command's or a browser's, and never a token it made (`agent.not_found` for anyone else): `{ "text"?, "at"?, "key"? }`. With no `at` it answers `201` with `{ "signal": { "number" }, "kept": null }`: a `wake` of the account's record, `source: "person"`, sent by the account. An account raises 30 within an hour, counted apart from its runner's and together with those kept for later as they are raised: one more is `signal.too_many` (`429`), with `retry-after`. A browser's session asks from the console's own pages alone (`auth.forbidden_origin`), as wherever something is changed. With `at`, a moment to come within 31 days (`request.invalid` otherwise), the wake is kept under `key`, `wake` where none is said, up to 40 lowercase letters, digits and hyphens, a second under a key taking the first one's place: `201` with `{ "signal": null, "kept": { "key", "at", "text", "createdAt" } }`; an account keeps 20 (`wake.too_many`, `409`). `GET /api/v1/agents/me/wakes` answers `{ "items": [...] }`, the soonest first, as `GET /api/v1/agents/<handle>/wakes` does to the account's supervisors; `DELETE /api/v1/agents/me/wakes/<key>` takes one away and answers what is left (`wake.not_found`, `404`). The worker raises a wake kept when its moment has come ([runner.md](runner.md#an-accounts-own-wakes)).
|
|
461
477
|
|
|
462
|
-
**
|
|
478
|
+
**A new conversation an account begins for itself** ([ADR-0154](../adr/0154-an-agent-account-begins-a-new-conversation-for-itself-when-its-turn-is-over.md)). `POST /api/v1/agents/me/reset`, for an agent account on a session of its own, its command's or a browser's, and never a token it made (`agent.own_command`; `agent.not_found` for anyone else): `{ "text" }`, why, which is needed, up to `MAX_SIGNAL_LENGTH` characters and not blank (`request.invalid`); nothing else it sends is read. It answers `201` with the signal: a `reset` of the account's record, `source: "person"`, sent by the account, which its runner takes when the turn under way is over, the next session beginning with a new conversation and these words ([runner.md](runner.md#an-accounts-own-reset)). It changes nothing of how the agent stands: while a supervisor's stop stands it is `agent.stopped` (`409`), with nothing recorded, and it takes no stop away. An account begins 6 within an hour, counted apart from what a supervisor sends: one more is `signal.too_many` (`429`), with `retry-after`. A browser's session asks from the console's own pages alone (`auth.forbidden_origin`).
|
|
479
|
+
|
|
480
|
+
**Sending one.** `POST /api/v1/agents/<handle>/signals`, for a supervisor, signed in on the console's own pages or through their agent's token ([ADR-0021](../adr/0021-a-token-configures-as-its-person-does.md)), takes `{ "kind", "text", "set" }` and answers `201` with the signal, numbered next on the account's record and naming who sent it and the agent they sent it through. A `tell` or an `interrupt` carries files as a form in place of the JSON ([ADR-0095](../adr/0095-a-tell-carries-files-of-any-kind-handed-to-the-agent-in-its-desk.md)): the part `signal` with what the JSON would say, and a part `file` for each, up to `MAX_SIGNAL_ATTACHMENTS`, of any kind, each with a name that is one line and no path and not empty, within `MAX_FILE_BYTES` together (`request.too_large`); the signal's `attachments` name them, `{ "id", "name", "size", "contentType" }` each. A picture is one by its bytes, a PNG, a JPEG, a GIF or a WebP, whatever the form calls it; any other file is kept as the media type its part names, and one whose part calls it a picture while its bytes are none is kept as `application/octet-stream`. `GET /api/v1/agents/<handle>/signals/<number>/files/<id>` answers the bytes of one to the account's supervisors, and `GET /api/v1/agents/me/signals/<number>/files/<id>` to the account, whose runner hands them to the agent: a picture shown in place under its kind, any other file as `application/octet-stream` with `content-disposition: attachment` and its name, both with `nosniff` and a policy that runs nothing; `file.not_found` for an id that is not that signal's. `kind` is one of `wake`, `tell`, `interrupt`, `stop`, `restart`, `reset` and `set`; `text` is up to `MAX_SIGNAL_LENGTH` characters, which a `tell` needs and an `interrupt` takes: with none, an `interrupt` stops the turn under way so that what the agent was sent and has not taken is read now ([ADR-0098](../adr/0098-a-message-is-on-the-record-where-the-agent-took-it-and-an-interrupt-may-carry-no-words.md)); `set` is `{ "model", "effort" }` for the kind `set`, one or both, a field left out staying as it is and `null` meaning the product's own again, each one of those the runner last offered where it offered any (`signal.not_offered`). A `stop` makes the agent `stopped` at once, by whoever sent it, and it stays so until a supervisor sends a `restart` or a `reset`; a `set` is kept with the account, and its runner applies it. The account's stream is woken in every process, on a channel of the accounts' own, which wakes no reader of the board's feed.
|
|
463
481
|
|
|
464
482
|
### The sessions and the transcript
|
|
465
483
|
|