@skillcdn/console 0.6.1 → 0.6.3
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 +14 -7
- package/SKILLCDN.md +3 -2
- package/dist/agent-page.d.ts +2 -0
- package/dist/agent-page.d.ts.map +1 -1
- package/dist/agent-page.js +77 -30
- package/dist/agent-page.js.map +1 -1
- package/dist/agent-state.d.ts +9 -0
- package/dist/agent-state.d.ts.map +1 -0
- package/dist/agent-state.js +28 -0
- package/dist/agent-state.js.map +1 -0
- package/dist/agent-usage.d.ts +9 -6
- package/dist/agent-usage.d.ts.map +1 -1
- package/dist/agent-usage.js +38 -8
- package/dist/agent-usage.js.map +1 -1
- package/dist/api.d.ts +4 -3
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +4 -3
- package/dist/api.js.map +1 -1
- package/dist/cli/cli.d.ts +2 -0
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +369 -130
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/format.d.ts +13 -4
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +43 -9
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/help.d.ts +82 -9
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +780 -318
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/pack.d.ts +2 -2
- package/dist/cli/pack.d.ts.map +1 -1
- package/dist/cli/pack.js +6 -4
- package/dist/cli/pack.js.map +1 -1
- package/dist/cli/runner-files.d.ts +16 -0
- package/dist/cli/runner-files.d.ts.map +1 -0
- package/dist/cli/runner-files.js +110 -0
- package/dist/cli/runner-files.js.map +1 -0
- package/dist/cli/runner-host.d.ts +7 -0
- package/dist/cli/runner-host.d.ts.map +1 -1
- package/dist/cli/runner-host.js +40 -2
- package/dist/cli/runner-host.js.map +1 -1
- package/dist/client.d.ts +22 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +7 -1
- package/dist/client.js.map +1 -1
- package/dist/components/agent-page.d.ts +61 -11
- package/dist/components/agent-page.d.ts.map +1 -1
- package/dist/components/agent-page.js +146 -35
- package/dist/components/agent-page.js.map +1 -1
- package/dist/components/agents.d.ts +3 -2
- package/dist/components/agents.d.ts.map +1 -1
- package/dist/components/agents.js +9 -3
- 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 +78 -35
- package/dist/components/calendar.js.map +1 -1
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +40 -12
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts +2 -0
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +4 -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.map +1 -1
- package/dist/feed-words.js +18 -1
- package/dist/feed-words.js.map +1 -1
- package/dist/i18n/en.d.ts +51 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +44 -2
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +52 -17
- package/dist/i18n/ko.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +10 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +10 -0
- package/dist/limits.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 +6 -1
- package/dist/plugin/capabilities.js.map +1 -1
- package/dist/plugin/context.d.ts +101 -8
- 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/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/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 +9 -3
- package/dist/runner/acp.js.map +1 -1
- package/dist/runner/claude.d.ts.map +1 -1
- package/dist/runner/claude.js +143 -10
- package/dist/runner/claude.js.map +1 -1
- package/dist/runner/codex.d.ts.map +1 -1
- package/dist/runner/codex.js +14 -2
- package/dist/runner/codex.js.map +1 -1
- package/dist/runner/config.d.ts +18 -0
- package/dist/runner/config.d.ts.map +1 -1
- package/dist/runner/config.js +77 -1
- package/dist/runner/config.js.map +1 -1
- package/dist/runner/desk.d.ts +7 -0
- package/dist/runner/desk.d.ts.map +1 -1
- package/dist/runner/desk.js +20 -4
- package/dist/runner/desk.js.map +1 -1
- package/dist/runner/message.d.ts +26 -2
- package/dist/runner/message.d.ts.map +1 -1
- package/dist/runner/message.js +120 -32
- package/dist/runner/message.js.map +1 -1
- package/dist/runner/runner.d.ts +40 -2
- package/dist/runner/runner.d.ts.map +1 -1
- package/dist/runner/runner.js +533 -32
- package/dist/runner/runner.js.map +1 -1
- package/dist/runner/slack-status.d.ts +19 -0
- package/dist/runner/slack-status.d.ts.map +1 -0
- package/dist/runner/slack-status.js +332 -0
- package/dist/runner/slack-status.js.map +1 -0
- package/dist/runner/slack.d.ts +17 -11
- package/dist/runner/slack.d.ts.map +1 -1
- package/dist/runner/slack.js +1199 -109
- package/dist/runner/slack.js.map +1 -1
- package/dist/runner/types.d.ts +205 -6
- package/dist/runner/types.d.ts.map +1 -1
- package/dist/runner/types.js.map +1 -1
- package/dist/runner/usage.d.ts +6 -1
- package/dist/runner/usage.d.ts.map +1 -1
- package/dist/runner/usage.js +9 -2
- package/dist/runner/usage.js.map +1 -1
- 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 +263 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +137 -5
- package/dist/schemas.js.map +1 -1
- package/dist/vocabulary.d.ts +7 -0
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +6 -0
- package/dist/vocabulary.js.map +1 -1
- package/dist/wake-text.d.ts +43 -0
- package/dist/wake-text.d.ts.map +1 -0
- package/dist/wake-text.js +115 -0
- package/dist/wake-text.js.map +1 -0
- package/docs/specs/cli.md +21 -12
- package/docs/specs/plugins.md +12 -7
- package/docs/specs/rest.md +14 -5
- package/docs/specs/runner.md +133 -26
- package/docs/start.md +26 -5
- package/package.json +3 -3
- package/skills/building-a-plugin/SKILL.md +3 -3
- package/skills/deploying-a-console/SKILL.md +3 -3
- package/skills/deploying-a-console/references/access.md +15 -1
- package/skills/deploying-a-console/references/resources.md +2 -2
- package/skills/deploying-a-console/scripts/github-app.mjs +593 -0
- package/skills/planning-the-board/references/setting-up.md +1 -1
- package/skills/running-an-agent/SKILL.md +18 -72
- package/skills/running-an-agent/references/preparing-the-machine.md +17 -0
- package/skills/running-an-agent/references/several-tasks.md +1 -1
- package/skills/running-an-agent/references/slack-app.md +55 -8
- 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 +19 -0
- package/skills/trying-a-console/SKILL.md +136 -0
- package/skills/trying-a-console/references/when-it-does-not-go.md +30 -0
- package/skills/working-the-board/SKILL.md +11 -15
- 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 +3 -3
- 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 +133 -41
- package/src/agent-state.ts +33 -0
- package/src/agent-usage.ts +55 -12
- package/src/api.ts +23 -0
- package/src/cli/cli.ts +443 -137
- package/src/cli/format.ts +49 -9
- package/src/cli/help.ts +904 -359
- package/src/cli/pack.ts +6 -4
- package/src/cli/runner-files.ts +120 -0
- package/src/cli/runner-host.ts +48 -2
- package/src/client.ts +64 -0
- package/src/components/agent-page.tsx +264 -39
- package/src/components/agents.tsx +20 -5
- package/src/components/calendar.tsx +92 -36
- package/src/console.tsx +47 -10
- package/src/data.ts +6 -0
- package/src/desk-page.tsx +5 -5
- package/src/feed-words.ts +20 -1
- package/src/i18n/en.ts +50 -2
- package/src/i18n/ko.ts +62 -17
- package/src/index.ts +2 -0
- package/src/limits.ts +10 -0
- package/src/plugin/capabilities.ts +8 -1
- package/src/plugin/context.ts +103 -7
- package/src/plugin/limits.ts +7 -0
- package/src/plugin/testing.ts +4 -0
- package/src/rules.ts +1 -1
- package/src/runner/acp.ts +9 -3
- package/src/runner/claude.ts +159 -10
- package/src/runner/codex.ts +14 -2
- package/src/runner/config.ts +114 -1
- package/src/runner/desk.ts +23 -4
- package/src/runner/message.ts +144 -35
- package/src/runner/runner.ts +658 -35
- package/src/runner/slack-status.ts +423 -0
- package/src/runner/slack.ts +1509 -128
- package/src/runner/types.ts +200 -5
- package/src/runner/usage.ts +16 -3
- package/src/runner.ts +20 -1
- package/src/schemas.ts +161 -3
- package/src/vocabulary.ts +9 -0
- package/src/wake-text.ts +133 -0
package/docs/specs/plugins.md
CHANGED
|
@@ -173,9 +173,11 @@ Everything a plugin does to the console is a call on `ctx`, which is a message t
|
|
|
173
173
|
| `ctx.caller` | `{ kind: "person" \| "console" \| "plugin", person?, agent?, plugin?, for?, roles, run?, project? }`: in a command, a query or a person's endpoint, the person (`id`, `login`, `name`, `language`, `admin`), the agent's name where a token acts, their roles in this plugin, their open run in the board project if any, and the project the call is on, one the plugin acts in only where it is placed on it ([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)); in a job, a hook, an upgrade or a webhook, `console`, with every role; in an `api` call another plugin made from its own job, hook or webhook, `plugin`, with that plugin's key and the roles granted to it here, and, where it acts for a person, `for` the person (`id`, `login`, `name`, `language`, `admin: false`) and the roles the plugin and the person both hold ([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)); a plugin that knows only the first two kinds refuses the third, which fails safe | nothing |
|
|
174
174
|
| `ctx.records(collection)` | the records of a collection, by its definition (typed from the schema) or by name: `create(data, { project?, owner? })`, `get(id)` (`null` when there is none), `update(id, patch, { baseVersion? })`, `archive(id)`, `restore(id)`, `list({ where?, order?, limit?, after?, project?, archived? })`, `search(words, { where?, limit?, project? })`, `aggregate({ where?, groupBy?, count?, sum?, min?, max? })`, `versions(id)`, `link(id, target)`, `unlink(id, target)`, `links(id)`, and `files(id)` with `attach(handle, { name?, type? })`, `list()` and `remove(fileId)`; `order` is `{ field, descending? }`; a refusal is thrown as a `PluginRefusal` with the console's code | nothing; `files` for the files |
|
|
175
175
|
| `ctx.sql` | `query(text, params)` and `transaction(async (tx) => ...)`, on the plugin's own role | `storage:sql` |
|
|
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
|
-
| `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.
|
|
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`), whether the console shows every member to every member (`peopleVisibility`: `everyone`, or `shared_projects`, where a member sees those of the projects they are in, [ADR-0035](../adr/0035-who-may-see-whom-is-decided-by-one-policy-and-the-workspace-keeps-its-settings.md); from 0.6.3, by which a plugin says to an administrator whom its "everyone" reaches, and decides nothing: whom a caller sees is asked with `seenByCaller`), 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
|
+
| `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`. With `seenByCaller: true` among the options (`list({ q?, seenByCaller? })`, `get(id, { seenByCaller? })`, `granted(role, { seenByCaller? })`), the people the caller may see whatever the plugin holds ([ADR-0168](../adr/0168-a-plugin-that-holds-the-whole-directory-reads-the-people-its-caller-may-see-where-it-asks.md)): what a plugin with `people:read:all` shows a member is then whom the console's own page of people shows them, where the console keeps its people apart. The view is a person's, the caller's own, their agent's, an agent account's, or that of the person a plugin acts for, as a member; a hook, a job and a plugin as itself have no caller and are refused (`plugin.forbidden`), never answered everyone; what is neither `true` nor `false` is `plugin.invalid_args`. From 0.6.3: a console of before reads past the option and answers everyone, so a plugin that relies on it names 0.6.3 as the oldest console it runs on | `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` |
|
|
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, among everyone with `people:read:all` unless `seenByCaller: true` asks for the caller's own view (`list({ seenByCaller? })`, `get(key, { seenByCaller? })`, as the reads of people take it, [ADR-0168](../adr/0168-a-plugin-that-holds-the-whole-directory-reads-the-people-its-caller-may-see-where-it-asks.md)); 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` |
|
|
181
183
|
| `ctx.console.decisions` | `list(project)`, `get(id)`, `ask(project, { question, body?, options, deciderId?, deciderIds?, taskId?, about })`: `options` each `{ label, key? }`, the `key` spelled as a plugin's key is and given once, answered back as `optionKey` on `console:decision.answered`; `about` names the record the decision is for; `answer(id, { optionKey \| option, note? }, { for: personId })` answers for a person who answered elsewhere a decision on their own plate, addressed to them or a plugin's addressed to someone they manage, up the reporting line ([ADR-0068](../adr/0068-a-decision-reaches-whom-it-is-addressed-to-wherever-it-is-and-a-plugins-reaches-the-managers-above-them.md)), and none they could answer only as a member of its project or as an administrator, `plugin.forbidden` otherwise; as theirs through the plugin ([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)); a plugin answers no decision itself | `board:read`; `board:decisions`; `people:act` for `answer` |
|
|
@@ -191,7 +193,7 @@ Everything a plugin does to the console is a call on `ctx`, which is a message t
|
|
|
191
193
|
|
|
192
194
|
What `ctx` never has, whatever the manifest asks: the environment, a connection of the console's to the database, a session or a token, a secret's value, another plugin's records or secrets, a way to answer a decision, to change a person, a role, a membership or a setting of the workspace, or to make a request a person could not make themselves.
|
|
193
195
|
|
|
194
|
-
A read of the console in a person's call is the person's: `people.list` is the people they may see, `projects.list` the projects they may see, a task they may not see is not found. In a call a plugin makes for a person, it is the person's as a member's, whatever they administer: acting for a person never carries their administration, nor the view of the administrator who enabled the plugin ([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)). A `console` caller (a job, a hook) sees what the plugin's capabilities open: `people:read` alone shows a job nobody, `people:read:all` everyone; so does a plugin another calls as itself. A plugin that wants a person to see more than they may must not; the capability for the whole directory is declared and consented to as such. An id plugin code names that is none, a decision's, a run's, a person's or a goal's, is refused before the database is asked: as nothing found where a call answers `null` or `plugin.not_found` for one missing, else as `plugin.invalid_args`.
|
|
196
|
+
A read of the console in a person's call is the person's: `people.list` is the people they may see, `projects.list` the projects they may see, a task they may not see is not found. In a call a plugin makes for a person, it is the person's as a member's, whatever they administer: acting for a person never carries their administration, nor the view of the administrator who enabled the plugin ([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)). A `console` caller (a job, a hook) sees what the plugin's capabilities open: `people:read` alone shows a job nobody, `people:read:all` everyone; so does a plugin another calls as itself. A plugin that wants a person to see more than they may must not; the capability for the whole directory is declared and consented to as such. With it, a read of people in a person's call answers everyone as well, which is more than that person sees where the console keeps its people apart (`peopleVisibility` of `ctx.console.workspace()`): what such a plugin shows its caller, a calendar of who is away, a list, a picker, it reads with `seenByCaller: true`, the caller's own view ([ADR-0168](../adr/0168-a-plugin-that-holds-the-whole-directory-reads-the-people-its-caller-may-see-where-it-asks.md)), and keeps the whole directory for what is its own to decide, as whom a request goes to. An id plugin code names that is none, a decision's, a run's, a person's or a goal's, is refused before the database is asked: as nothing found where a call answers `null` or `plugin.not_found` for one missing, else as `plugin.invalid_args`.
|
|
195
197
|
|
|
196
198
|
## Capabilities
|
|
197
199
|
|
|
@@ -202,8 +204,9 @@ Declared in the manifest, consented to by an administrator when enabling, enforc
|
|
|
202
204
|
| (none) | its own records, versions, links and events; its settings; its log | its own data, spoiled; the versions restore it |
|
|
203
205
|
| `files` | files on its records, within `PLUGIN_FILE_BYTES_AT_MOST` | storage filled to the bound |
|
|
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
|
-
| `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 |
|
|
207
|
+
| `people:read:all` | everyone, for `console` callers too, and in a person's call unless the read asks for the caller's own view (`seenByCaller`); 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,7 +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 |
|
|
215
|
-
| `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 | who is told of what on those boards, and so what each member chose to be told of |
|
|
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 |
|
|
216
219
|
| `events:plugins` | hooks on the events other plugins emit | what they publish |
|
|
217
220
|
| `jobs` | runs on a schedule | time, within the bound |
|
|
218
221
|
| `outbound:<host>` | `ctx.fetch` to that host, a public address, over https | what it may read, sent to that host; a cost there |
|
|
@@ -278,7 +281,7 @@ What the deployment must allow: the console's database user holds `CREATEROLE`,
|
|
|
278
281
|
## The board
|
|
279
282
|
|
|
280
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.
|
|
281
|
-
- A plugin
|
|
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.
|
|
282
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`.
|
|
283
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.
|
|
284
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`).
|
|
@@ -481,6 +484,8 @@ The install path is the first line (a release of the deployment, from a lockfile
|
|
|
481
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 |
|
|
482
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)) |
|
|
483
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
|
+
|
|
484
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.
|
|
485
490
|
|
|
486
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
|
@@ -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
|
|
|
@@ -259,7 +259,7 @@ For an owner, signed in or with a token. The patch takes `role` and writes `proj
|
|
|
259
259
|
|
|
260
260
|
### `GET /api/v1/projects/<key>/tasks?state=&open=&archived=&category=&goal=&worker=&unassigned=&dueBy=&q=&limit=&offset=`
|
|
261
261
|
|
|
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`; `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`.
|
|
263
263
|
|
|
264
264
|
### `POST /api/v1/projects/<key>/tasks`
|
|
265
265
|
|
|
@@ -323,7 +323,7 @@ Takes `taskId` (a task of the project; `run.task_not_found` otherwise), and opti
|
|
|
323
323
|
|
|
324
324
|
### `POST .../runs/<id>/reports` and `POST .../runs/<id>/artifacts`
|
|
325
325
|
|
|
326
|
-
How the work goes, and what was made. A report takes `body` (Markdown, `MAX_BODY_LENGTH`, not blank) and tells the board (`run.reported`, with the first words as `excerpt`); a link takes
|
|
326
|
+
How the work goes, and what was made. A report takes `body` (Markdown, `MAX_BODY_LENGTH`, not blank) and tells the board (`run.reported`, with the first words as `excerpt`); a link takes a `url` and optionally a `label` (`run.handed_in`, with the label or the link's first words). The `url` is over https, or over http where it is an address of the console itself (of `PUBLIC_URL`'s origin), as a console on one machine is served; an address with a backslash in it or a name before an `@`, which a browser reads as the console's and another client as another machine's, is none of its own. No `url`, here or among a task's `links`, holds a control or an invisible character, which a terminal would run and a reader not see. Both answer `201` with the run. Only the run's person adds to it (`run.not_yours`), only while it is open (`run.over`), and only so many (`run.too_many_reports`, `run.too_many_artifacts`, counting links and files together).
|
|
327
327
|
|
|
328
328
|
### `POST .../runs/<id>/files` and `GET /api/v1/projects/<key>/files/<id>`
|
|
329
329
|
|
|
@@ -454,23 +454,32 @@ An agent account keeps named secrets in the console ([ADR-0087](../adr/0087-an-a
|
|
|
454
454
|
|
|
455
455
|
**A supervisor's part**, under `/api/v1/agents/<handle>/secrets`, with a session or a token ([ADR-0021](../adr/0021-a-token-configures-as-its-person-does.md)); `auth.forbidden` for whoever sees the account and does not supervise it. `GET` answers the names as above. `PUT .../<name>` seeds a secret, write-only: the same body, answered without the value, the secret marked `seeded`. `DELETE .../<name>` removes one. No route of a supervisor's answers a value: `GET .../<name>` is nothing.
|
|
456
456
|
|
|
457
|
+
**A secret offered to an account** ([ADR-0169](../adr/0169-a-member-offers-an-agent-account-a-secret-and-the-account-takes-it-or-leaves-it.md)), under `/api/v1/agents/<handle>/secret-offers` and `/api/v1/agents/me/secret-offers`. An offer is kept sealed apart from the store, changes nothing the account keeps, and no route answers its value.
|
|
458
|
+
|
|
459
|
+
- `POST /api/v1/agents/<handle>/secret-offers` offers one, for any member who sees the account, with a session or a token; `agent.not_found` for an account the member may not see, and `409 secret.offer_own` for the account itself. The body is `{ "name", "value", "note"?, "expiresOn"? }`: a secret's name, a value of at most 8 KiB (`secret.too_large`), what it is for in one line of at most 200 characters, and the day the value ends on. Answered `201` with the offer: `{ "id", "name", "note", "by", "agent", "expiresOn", "state", "at", "endsAt", "decidedAt", "takenAs" }`, `state` one of `waiting`, `taken`, `left`, `lapsed`, and never the value. Twenty offers wait for one account at a time and five of them are one member's: one more is `409 secret.too_many_offers`. An offer waits seven days, until `endsAt`. The account is sent a wake at once ([runner.md](runner.md)).
|
|
460
|
+
- `GET /api/v1/agents/<handle>/secret-offers` is `{ "items": [...] }`, the newest first: the account's record of its offers whole for a supervisor, the latest two hundred that no longer wait among them, and for any other member who sees the account the offers they made themselves.
|
|
461
|
+
- `GET /api/v1/agents/me/secret-offers` is what waits for the account itself, on a session of its own as its store is read (`secret.own_session` with a token it made, `agent.not_found` for a person).
|
|
462
|
+
- `POST /api/v1/agents/me/secret-offers/<id>/take` takes one into the store, with `{ "as"?, "replace"? }`: under the name offered or the one `as` says, as a secret the account set itself, answered as a secret is, without its value. Where the account keeps a secret of that name already it is `409 secret.exists` and the offer still waits, unless `replace` is `true`. `DELETE /api/v1/agents/me/secret-offers/<id>` leaves one, `204`. An offer that is not the account's, or waits no more, is `404 secret.offer_not_found`; a value the deployment's key no longer opens, `409 secret.unreadable`.
|
|
463
|
+
|
|
457
464
|
`GET /api/v1/agents/<handle>/secret-accesses?before=&limit=` is the account's record of its store, for its supervisors: `{ "items": [{ "id", "name", "action", "by", "agent", "seeded", "at" }, ...], "more" }`, the newest first, `limit` of them (50 where none is said, 200 at most), from before the line `before` on. A line says what was done to which secret (`set`, `read` or `removed`), by whom, through which agent where they acted with a token, and whether it was a supervisor's doing; never a value.
|
|
458
465
|
|
|
459
466
|
### The runner: `PUT /api/v1/agents/me/runner` and the signals
|
|
460
467
|
|
|
461
468
|
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.
|
|
462
469
|
|
|
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.
|
|
470
|
+
**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 the state stands; and when its runner was last heard from. `reasonAt` is when the reason was said, which is another moment than `since` where the reason changed under a state that stayed, a new conversation or a turn that completed while the agent ran on: the same moment as `since` where the two came together, `null` where the console keeps none, a row of before, and left out by a console of before; a reason is shown beside this moment or beside none, never beside `since`. `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.
|
|
464
471
|
|
|
465
472
|
**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.
|
|
466
473
|
|
|
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.
|
|
474
|
+
- `PUT /api/v1/agents/me/runner` is the heartbeat: how the agent stands and why, as `reasonAt`, optional, when the runner said the reason, which the console keeps under a state that stays, held between the moment the state began and now, and dates itself, at the change of the state or of the reason, where a runner of before says none, 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.
|
|
468
475
|
- `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`).
|
|
469
476
|
|
|
470
477
|
**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.
|
|
471
478
|
|
|
472
479
|
**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.
|
|
473
480
|
|
|
481
|
+
**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.
|
|
482
|
+
|
|
474
483
|
**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)).
|
|
475
484
|
|
|
476
485
|
**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`).
|