@skillcdn/console 0.6.2 → 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 +13 -6
- 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 +40 -3
- 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/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 +304 -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 +16 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +6 -1
- package/dist/client.js.map +1 -1
- package/dist/components/agent-page.d.ts +28 -3
- package/dist/components/agent-page.d.ts.map +1 -1
- package/dist/components/agent-page.js +48 -3
- 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/console.d.ts.map +1 -1
- package/dist/console.js +1 -1
- package/dist/console.js.map +1 -1
- package/dist/feed-words.d.ts.map +1 -1
- package/dist/feed-words.js +12 -1
- package/dist/feed-words.js.map +1 -1
- package/dist/i18n/en.d.ts +45 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +36 -1
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +28 -0
- package/dist/i18n/ko.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/context.d.ts +39 -7
- package/dist/plugin/context.d.ts.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 +5 -1
- 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 +9 -0
- package/dist/runner/desk.js.map +1 -1
- package/dist/runner/message.d.ts +16 -22
- package/dist/runner/message.d.ts.map +1 -1
- package/dist/runner/message.js +72 -120
- package/dist/runner/message.js.map +1 -1
- package/dist/runner/runner.d.ts +25 -1
- package/dist/runner/runner.d.ts.map +1 -1
- package/dist/runner/runner.js +404 -19
- 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.map +1 -1
- package/dist/runner/slack.js +245 -57
- package/dist/runner/slack.js.map +1 -1
- package/dist/runner/types.d.ts +109 -15
- 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 +2 -2
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js.map +1 -1
- package/dist/schemas.d.ts +160 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +82 -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 +19 -11
- package/docs/specs/plugins.md +5 -5
- package/docs/specs/rest.md +10 -3
- package/docs/specs/runner.md +96 -20
- package/docs/start.md +26 -5
- package/package.json +3 -3
- package/skills/building-a-plugin/SKILL.md +2 -2
- 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/running-an-agent/SKILL.md +13 -10
- package/skills/running-an-agent/references/preparing-the-machine.md +1 -1
- package/skills/running-an-agent/references/slack-app.md +25 -8
- package/skills/running-an-agent/references/the-account-and-the-invitation.md +1 -1
- package/skills/running-an-agent/references/what-was-not-seen-run-yet.md +1 -1
- package/skills/running-an-agent/references/when-the-agent-could-not-go-on.md +1 -1
- package/skills/running-an-agent/references/your-first-task.md +7 -2
- 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 +3 -3
- package/skills/working-the-board/references/the-pack.md +3 -3
- package/skills/working-the-board/references/what-they-were-told.md +1 -1
- package/src/agent-page.tsx +92 -1
- package/src/agent-state.ts +33 -0
- package/src/api.ts +16 -0
- package/src/cli/cli.ts +359 -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 +53 -0
- package/src/components/agent-page.tsx +150 -3
- package/src/components/agents.tsx +20 -5
- package/src/console.tsx +1 -0
- package/src/feed-words.ts +14 -1
- package/src/i18n/en.ts +39 -1
- package/src/i18n/ko.ts +32 -0
- package/src/limits.ts +10 -0
- package/src/plugin/context.ts +40 -7
- package/src/runner/acp.ts +9 -3
- package/src/runner/claude.ts +5 -1
- package/src/runner/codex.ts +14 -2
- package/src/runner/config.ts +114 -1
- package/src/runner/desk.ts +10 -0
- package/src/runner/message.ts +88 -126
- package/src/runner/runner.ts +487 -22
- package/src/runner/slack-status.ts +423 -0
- package/src/runner/slack.ts +293 -61
- package/src/runner/types.ts +108 -13
- package/src/runner/usage.ts +16 -3
- package/src/runner.ts +4 -0
- package/src/schemas.ts +97 -3
- package/src/vocabulary.ts +9 -0
- package/src/wake-text.ts +133 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { MAX_SIGNAL_LENGTH } from "./limits.js";
|
|
2
|
+
/**
|
|
3
|
+
* The first version whose runner reads a wake of the board's, and one of the console's own
|
|
4
|
+
* (ADR-0169), in parts (ADR-0166): the console's
|
|
5
|
+
* lines under the session's mark, and what a member wrote, a comment say, in a block. A runner
|
|
6
|
+
* of before prints such a text whole under its header, as the console's own words, so the
|
|
7
|
+
* console writes one in parts only for an account whose runner last said this version or a
|
|
8
|
+
* later one.
|
|
9
|
+
*/
|
|
10
|
+
export const BOARD_PARTS_FROM = "0.6.3";
|
|
11
|
+
/** A word of a header on one line, with nothing in it that ends the header early. */
|
|
12
|
+
export const inHeader = (text) => text.replaceAll(/[[\]\r\n]+/g, " ").trim();
|
|
13
|
+
/**
|
|
14
|
+
* What a line of a wake's text begins with, as the console keeps the text (ADR-0163): a line of
|
|
15
|
+
* the wake source's own, and a line of someone else's words. Every line of someone's words is
|
|
16
|
+
* begun so where the text is written, so that no word of theirs is ever a line of the source's.
|
|
17
|
+
*/
|
|
18
|
+
const SAYS = "#";
|
|
19
|
+
const WORDS = ">";
|
|
20
|
+
/** What a wake's text ends on where its parts came to more than a signal carries. */
|
|
21
|
+
const WAKE_CUT = "The wake came to more than a signal carries, and was cut here";
|
|
22
|
+
/** The first `most` characters of a text, never half of a character that takes two. */
|
|
23
|
+
function firstOf(text, most) {
|
|
24
|
+
const last = text.charCodeAt(most - 1);
|
|
25
|
+
return text.slice(0, last >= 0xd800 && last <= 0xdbff ? most - 1 : most);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* What someone wrote, a line each behind `>`. A line break of any spelling ends a line, so that
|
|
29
|
+
* none is left in one to end it for a reader.
|
|
30
|
+
*/
|
|
31
|
+
export function quotedLines(words) {
|
|
32
|
+
return words.split(/\r\n?|\n/).map((line) => (line === "" ? WORDS : `${WORDS} ${line}`));
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The parts of a wake as the one text a signal carries: a line of the source's own behind `#`,
|
|
36
|
+
* and each line of someone else's words behind `>`, in the order given. The runner writes it so
|
|
37
|
+
* for every wake a source raises, whatever the source handed it, and reads it back so when the
|
|
38
|
+
* signal returns (`wakePartsOf`). Two runs of words with no line between them are parted by a
|
|
39
|
+
* line that says nothing. Within `most` characters, the most a signal carries: what comes to
|
|
40
|
+
* more is cut at the end of a line, or within a line of words, and the text's last line says so.
|
|
41
|
+
*/
|
|
42
|
+
export function wakeTextOf(parts, most = MAX_SIGNAL_LENGTH) {
|
|
43
|
+
const lines = [];
|
|
44
|
+
let afterWords = false;
|
|
45
|
+
for (const part of parts) {
|
|
46
|
+
if ("says" in part) {
|
|
47
|
+
const says = inHeader(part.says);
|
|
48
|
+
if (says !== "") {
|
|
49
|
+
lines.push(`${SAYS} ${says}`);
|
|
50
|
+
afterWords = false;
|
|
51
|
+
}
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
if (part.words === "") {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if (afterWords) {
|
|
58
|
+
lines.push(SAYS);
|
|
59
|
+
}
|
|
60
|
+
lines.push(...quotedLines(part.words));
|
|
61
|
+
afterWords = true;
|
|
62
|
+
}
|
|
63
|
+
const whole = lines.join("\n");
|
|
64
|
+
if (whole.length <= most) {
|
|
65
|
+
return whole;
|
|
66
|
+
}
|
|
67
|
+
const cut = `${SAYS} ${WAKE_CUT}`;
|
|
68
|
+
const kept = [];
|
|
69
|
+
let room = most - cut.length;
|
|
70
|
+
for (const line of lines) {
|
|
71
|
+
if (line.length + 1 > room) {
|
|
72
|
+
// A line of words is carried as far as it goes; one of the source's own, whole or not at all.
|
|
73
|
+
if (line.startsWith(`${WORDS} `) && room > WORDS.length + 2) {
|
|
74
|
+
kept.push(firstOf(line, room - 1));
|
|
75
|
+
}
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
kept.push(line);
|
|
79
|
+
room -= line.length + 1;
|
|
80
|
+
}
|
|
81
|
+
return [...kept, cut].join("\n");
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The parts of a wake read back from its text, or nothing where the text is not written as
|
|
85
|
+
* `wakeTextOf` writes one: a wake raised by a runner of before, which is then carried whole as
|
|
86
|
+
* someone else's words, as it was.
|
|
87
|
+
*/
|
|
88
|
+
export function wakePartsOf(text) {
|
|
89
|
+
const parts = [];
|
|
90
|
+
let words;
|
|
91
|
+
const close = () => {
|
|
92
|
+
if (words !== undefined) {
|
|
93
|
+
parts.push({ words: words.join("\n") });
|
|
94
|
+
words = undefined;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
for (const line of text.split("\n")) {
|
|
98
|
+
if (line === WORDS || line.startsWith(`${WORDS} `)) {
|
|
99
|
+
words ??= [];
|
|
100
|
+
words.push(line.slice(WORDS.length + 1));
|
|
101
|
+
}
|
|
102
|
+
else if (line === SAYS || line.startsWith(`${SAYS} `)) {
|
|
103
|
+
close();
|
|
104
|
+
if (line.length > SAYS.length + 1) {
|
|
105
|
+
parts.push({ says: line.slice(SAYS.length + 1) });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
return undefined;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
close();
|
|
113
|
+
return parts;
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=wake-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wake-text.js","sourceRoot":"","sources":["../src/wake-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAgBhD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAExC,qFAAqF;AACrF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAE7F;;;;GAIG;AACH,MAAM,IAAI,GAAG,GAAG,CAAC;AACjB,MAAM,KAAK,GAAG,GAAG,CAAC;AAClB,qFAAqF;AACrF,MAAM,QAAQ,GAAG,+DAA+D,CAAC;AAEjF,uFAAuF;AACvF,SAAS,OAAO,CAAC,IAAY,EAAE,IAAY;IACzC,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IACvC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,OAAO,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;AAC3F,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,KAA0B,EAAE,IAAI,GAAG,iBAAiB;IAC7E,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;YACnB,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;gBAChB,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;gBAC9B,UAAU,GAAG,KAAK,CAAC;YACrB,CAAC;YACD,SAAS;QACX,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,KAAK,EAAE,EAAE,CAAC;YACtB,SAAS;QACX,CAAC;QACD,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACvC,UAAU,GAAG,IAAI,CAAC;IACpB,CAAC;IACD,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,KAAK,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,GAAG,GAAG,GAAG,IAAI,IAAI,QAAQ,EAAE,CAAC;IAClC,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,IAAI,IAAI,GAAG,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC;IAC7B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC;YAC3B,8FAA8F;YAC9F,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,GAAG,CAAC,IAAI,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC5D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;YACrC,CAAC;YACD,MAAM;QACR,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChB,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,MAAM,KAAK,GAAe,EAAE,CAAC;IAC7B,IAAI,KAA2B,CAAC;IAChC,MAAM,KAAK,GAAG,GAAS,EAAE;QACvB,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACxC,KAAK,GAAG,SAAS,CAAC;QACpB,CAAC;IACH,CAAC,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,IAAI,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC;YACnD,KAAK,KAAK,EAAE,CAAC;YACb,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC;aAAM,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,GAAG,CAAC,EAAE,CAAC;YACxD,KAAK,EAAE,CAAC;YACR,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAClC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;YACpD,CAAC;QACH,CAAC;aAAM,CAAC;YACN,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IACD,KAAK,EAAE,CAAC;IACR,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/docs/specs/cli.md
CHANGED
|
@@ -19,6 +19,8 @@ The board is a project's ([ADR-0008](../adr/0008-a-workspace-holds-projects-and-
|
|
|
19
19
|
|
|
20
20
|
## The commands
|
|
21
21
|
|
|
22
|
+
The command's shape ([ADR-0167](../adr/0167-the-commands-of-the-console-command-are-one-table-by-who-runs-them-its-help-is-in-layers-within-bounds-and-a-mistake-is-answered-with-a-sentence.md)). A word in the plural lists (`tasks`, `docs`, `agents`); the same word in the singular reads one by what it is called by (`task 7`, `doc guides/onboarding`, `agent mira`), and with a word after it does something to one or makes one (`task new`, `doc write`, `agent tell`): a form. The words at the top that name no thing are those of a run, which act on the one open run (`take`, `report`, `hand-in`, `ask`, `answer`, `comment`, `file`, `finish`, `fail`, `abandon`), of signing in (`login`, `logins`, `logout`, `whoami`, `use`), of what one is told (`work`, `notify`, `manager`, `rules`) and of a machine (`serve`, `desk`, `runner`); nothing else is added there. `console help` lists the commands in one table, grouped by who runs them, within 3,000 bytes; `console help <command>` is a command's page, its forms a line each with every flag, what must be known before it is run, its limits and its refusals, within 2,600 bytes; a command of several forms says the first on its page and names the others, each with a page of its own, `console help <command> <form>`, which `<command> <form> --help` opens too; `console help everywhere` says what holds for every command. Six words of before still run, each as the form that took its place, and stand in no list: `write`, `attach`, `archive` and `restore` are `doc write`, `doc attach`, `doc archive` and `doc restore`, and `follow` and `mute` are `task follow` and `task mute`; they go with 0.7.
|
|
23
|
+
|
|
22
24
|
A table a group, each row a command: what it asks the console, and what it says. `...` is `/api/v1/projects/<key>`, the project the command works in. Everywhere: `--json` prints the console's own answer as JSON, in the shapes of `@skillcdn/console/api`; `--url <origin>` names the console this one command talks to, which must be one signed in to here; `--account <login>` the account there, where several are; `--project <key>` the project. A Markdown body given as `-` is read from standard input. A day is given as `2026-10-24`, `today`, `tomorrow` or `+7` (days from today by this machine's clock); `--due overdue` keeps the open tasks past their day, `--due week` those due by the last day of this week, the week beginning as the workspace says (`console workspace`) or, left to the language, as the person's language has it, else this machine's ([ADR-0039](../adr/0039-this-week-is-the-plans-unit-and-the-week-begins-as-the-workspace-says.md)). Every argument is bounded and checked by the console, as the REST API's schemas say; the command sends it as it was given.
|
|
23
25
|
|
|
24
26
|
### Commands to sign in and to name the project
|
|
@@ -42,7 +44,7 @@ A table a group, each row a command: what it asks the console, and what it says.
|
|
|
42
44
|
| `notifications --read <id> [<id>...]`, `notifications --read-all` | `POST /api/v1/notifications/read` with `ids`, each once, or `all: true` | how many were marked read, and how many are still unread (`Marked 2 read; 3 still unread.`). `--read` without an id, the two together, a word without `--read`, and either beside `--unread`, `--limit` or `--offset` are not understood (`2`), and nothing is asked of the console |
|
|
43
45
|
| `notify` | `GET /api/v1/notifications/settings` | what the member is told of ([ADR-0157](../adr/0157-the-console-decides-who-is-told-of-what-and-keeps-the-record-and-a-plugin-carries-it-out.md)): a line per kind of `NOTIFICATION_KINDS`, `on` or `off`, with what it is of in a few words, and `(default: on\|off)` where they chose otherwise than a member who chose nothing has; a kind a newer console answers after them, by its name alone; then the projects turned off, by key and name, and whether what an agent of their own did as them is told to them. They are of everything the member is told: what a plugin that carries notifications elsewhere, to a messenger say, sends of it is that plugin's own setting, and the command names no plugin. Needs no project |
|
|
44
46
|
| `notify [--on <kind>]... [--off <kind>]... [--project-off <key>]... [--project-on <key>]... [--own-agents on\|off]`, `notify --reset` | `PUT /api/v1/notifications/settings`, once: the kinds named, the others staying as they are, as `kinds`; `ownAgents`; and, where a project is named, `projectsOff` whole, which is those that were, read first with `GET` of the same, less the ones turned on again, and the ones turned off now; or `reset: true`, alone | the settings as they are now, as `notify` prints them. A kind that is none of `NOTIFICATION_KINDS` is refused with the kinds there are before anything is asked of the console (`2`), as are a kind or a project said both on and off, a word for `--own-agents` that is neither, and `--reset` beside another flag; a key turned off of a project the console has not, or does not show the member (`project.not_found`), is the console's to refuse, with nothing changed; a key turned on that was not off changes nothing |
|
|
45
|
-
| `follow <number\|id>`, `mute <number\|id>` | `GET .../tasks/<ref>`, then `PUT .../tasks/<id>/follow` with `on`: `true` for `follow`, `false` for `mute` | one line that says whether the task's notifications are on or off for the member now ([ADR-0157](../adr/0157-the-console-decides-who-is-told-of-what-and-keeps-the-record-and-a-plugin-carries-it-out.md)), and how, with the command that turns them the other way: turned on where their settings would tell them nothing of it, `Notifications of #7 <title> are on: you are told of everything that happens on it. Turn them off: console mute 7`; turned off where their settings would tell them, `... are off: you are told of nothing of it. Turn them on: console follow 7`; and turned to what their settings say already, `... are on, as your settings have it: you are told of it by the kinds you have on (console notify). Turn them off: console mute 7` or `... are off, as your settings have it. Turn them on: console follow 7`, so that a task muted and followed again tells them by their kinds as before. Their own choice of that one task; `--json` is the console's answer, `{ "on", "usual", "all" }`. A console older than the command has none of the notifications' routes: `notifications`, `notify`, `follow` and `mute` each say that it is one, with its version where it says it, and end with `1` |
|
|
47
|
+
| `task follow <number\|id>`, `task mute <number\|id>` | `GET .../tasks/<ref>`, then `PUT .../tasks/<id>/follow` with `on`: `true` for `follow`, `false` for `mute` | one line that says whether the task's notifications are on or off for the member now ([ADR-0157](../adr/0157-the-console-decides-who-is-told-of-what-and-keeps-the-record-and-a-plugin-carries-it-out.md)), and how, with the command that turns them the other way: turned on where their settings would tell them nothing of it, `Notifications of #7 <title> are on: you are told of everything that happens on it. Turn them off: console task mute 7`; turned off where their settings would tell them, `... are off: you are told of nothing of it. Turn them on: console task follow 7`; and turned to what their settings say already, `... are on, as your settings have it: you are told of it by the kinds you have on (console notify). Turn them off: console task mute 7` or `... are off, as your settings have it. Turn them on: console task follow 7`, so that a task muted and followed again tells them by their kinds as before. Their own choice of that one task; `--json` is the console's answer, `{ "on", "usual", "all" }`. A console older than the command has none of the notifications' routes: `notifications`, `notify`, `task follow` and `task mute` each say that it is one, with its version where it says it, and end with `1` |
|
|
46
48
|
| `tasks [--state <state>] [--open] [--mine] [--category <key>] [--goal <id>] [--due <day\|today\|week\|overdue>] [--unassigned] [--search <words>] [--archived] [--limit <n>] [--offset <n>]` | `GET .../tasks?brief=true` with the filters and the page, the tasks without their bodies, which no line shows, and whole on `--json` (`--mine` and `--unassigned` not together; `--search` is `q=`, the words of a title or a number, how a task is found as a parent, [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)) | one line per task: number, state, priority, title, owner, workers, category, due day, what waits on it, and whether it is put away; the tasks put away are left out unless `--archived` asks for them alone; a page at a time; a search that finds nothing says so with the words it looked for, and, where they were several, that every one must be in a title and fewer find more |
|
|
47
49
|
| `task <number\|id>` | `GET .../tasks/<ref>`, the decisions about it, the runs on it without their reports (`GET .../runs?task=&brief=true`; whole on `--json`), `GET .../tasks/<id>/comments`, `GET .../tasks/<id>/follow` | the task in full, after its id the address of its page on a line of its own (`page: <origin>/projects/<key>/tasks/<number>`, made from the console's origin and the pages' route and asked of no console, so that an agent that tells a person of the task links the task and not the console's front page), with its plan and its moments, and the discussion on it: each comment whole, with its files and the command that reads each. A line says whether the task's notifications are on for the member ([ADR-0157](../adr/0157-the-console-decides-who-is-told-of-what-and-keeps-the-record-and-a-plugin-carries-it-out.md)), and how: `notifications: on, as your settings have it`, `notifications: on, turned on by you: you are told of everything that happens on it`, `notifications: off, turned off by you: you are told of nothing of it` or `notifications: off, as your settings have it`; `--json` carries it as `follow`, `{ "on", "usual", "all" }`; a console older than the command has no such route, and nothing is said of it then |
|
|
48
50
|
| `task new <title> [--body <markdown>\|--file <path>] [--state <state>] [--priority <priority>] [--category <key>] [--goal <id>] [--starts <day>] [--due <day>] [--worker <login\|me\|none>]... [--parent <number\|id>] [--take [--rules <mark>] [--agent <name>]]` | `POST .../tasks`; with `--take`, then what `take` asks, from `POST .../runs` on | the number, the id and the address of the task's page, as `task` prints it (with `--take`, once, in the task's lines after the take); `--worker` given again, or with commas between, names several, in place of the workers there were, and `none` alone nobody. With `--take` the task is written and taken in one command, in that order: what `task new` prints, the number first, then what `take` prints, `--rules` and `--agent` as `take` has them, and on `--json` what `take` answers with the task as it was written beside it (`written`). The task is written `ready` where no state is said, since an idea is not taken; a state that cannot be taken (`done`, `dropped`) is refused before anything is written, as are `--rules` and `--agent` without `--take`. Where the take fails after the task was written, the task's two lines are on the output (on `--json`, `{ "written": ... }` alone), and the error says, before the console's own words for the refusal, that the task is written and was not taken, and that `console take <number>` is the way on: the task is not written a second time. Where the run began and only a read after it failed, the error says that the task is written and taken, by which run, and that it is neither written nor taken again (on `--json`, `{ "written": ..., "run": ... }`), since a second take would end the run that began. The exit code is the refusal's |
|
|
@@ -78,11 +80,15 @@ A table a group, each row a command: what it asks the console, and what it says.
|
|
|
78
80
|
|---|---|---|
|
|
79
81
|
| `agents` | `GET /api/v1/agents` | one line per agent account the person sees or supervises ([ADR-0084](../adr/0084-an-agent-account-is-a-member-of-its-own-with-a-manager-above-it.md)): the handle (`@mira`), the name and what it does, the login it signs in with, whom it reports to where the person sees them, and `not signed in yet` or `deactivated` where so. Needs no project |
|
|
80
82
|
| `agent new <handle> [--login <login>] [--name "<name>"] [--title "<title>"] [--manager <login\|me>] [--host gh\|google] [--seed <seed>] [--convert]` | `GET /api/v1/people?login=` for the manager's id, then `POST /api/v1/agents`, with `convert: true` where `--convert` says that the member who carries the login is to become the account | the account's line, and what happens next: the account it signs in with, by its login: at Google Workspace it is made before its machine is set up, and its first sign-in binds it; at a git host it has to be the organization's already, and the line says what its first sign-in is held to ([ADR-0126](../adr/0126-an-agent-account-at-a-git-host-is-bound-to-the-hosts-account-when-it-is-added.md)), confirmed where the organization said which account the login is, so that only that account is let in, and not confirmed where it has no member called so, could not be asked, or is not read by this console, with who is let in then; the account's line says the same in a word while it waits (`its account confirmed at the host`, `its account not confirmed`); its first task, by its number, where the console made its onboarding with it; and that a machine comes next, with `console agent invite`. Without `--login`, the login is what the workspace's identity service makes of the workspace's short name, the handle and the domain (`mira@acme.example`), and the command asks for one where the workspace names no such service. For an administrator ([ADR-0084](../adr/0084-an-agent-account-is-a-member-of-its-own-with-a-manager-above-it.md)): the handle, which never changes; the login it signs in with, the host read off its shape unless `--host` says; the name, the handle capitalized when left out; the manager, whoever makes it when left out; the project it starts in, the directory's or `--project`. The console rolls the avatar, from `--seed` where one is given. The pages make one from proposals instead |
|
|
81
|
-
| `agent <handle> [--avatar <file>] [--account <service>=<name\|none>]... [--day-start <HH:MM\|none>] [--day-end <HH:MM\|none>]` | `GET /api/v1/agents/<handle>`; with `--account`, `PATCH /api/v1/agents/<handle>` | the account's line; how it stands ([ADR-0085](../adr/0085-a-runner-on-the-agents-machine-is-told-by-signals-and-runs-one-session-at-a-time.md)), its state,
|
|
83
|
+
| `agent <handle> [--avatar <file>] [--account <service>=<name\|none>]... [--day-start <HH:MM\|none>] [--day-end <HH:MM\|none>]` | `GET /api/v1/agents/<handle>`; with `--account`, `PATCH /api/v1/agents/<handle>` | the account's line; how it stands ([ADR-0085](../adr/0085-a-runner-on-the-agents-machine-is-told-by-signals-and-runs-one-session-at-a-time.md)), its state, since when it stands, until when where its runner said, as when a usage limit resets ([ADR-0150](../adr/0150-a-runner-waits-out-its-products-usage-limit-and-tells-its-agent-before-it.md)), why, and when its runner was last heard from, as `state: running since <moment>; why: reset, said <moment>; its runner was last heard from <moment>`: the moment after `since` is the state's alone, and the reason stands apart from it, with when it was said where that is another moment, a new conversation or a turn that completed under a state that stayed, and with none where it came with the state or the console keeps no moment for it; how much of its product's allowance is used, a line where its runner said any ([ADR-0156](../adr/0156-an-agent-account-shows-what-its-products-allowance-has-used-and-when-it-resets.md)): each window that still stands with its share, that it is near its limit where it is, and when it resets, and when the product said so, of each where one was kept from before; for a supervisor and for the account, what its runner last said of itself, the model and the effort it is set to and runs with, and how many of its signals were delivered; and whether the person supervises it; the handle with the `@` or without. With `--avatar`, the account's avatar as a PNG file of 1024 pixels a side, written to the path given or into a directory under `<handle>.png`: drawn by the command from the `avatarParts` the console answers, for the profile of the agent's account elsewhere. With `--account`, given once for each, the accounts the agent holds elsewhere are recorded on it ([ADR-0089](../adr/0089-a-workspace-names-the-services-its-agents-work-with.md)): what it is called at a service, by the service's short name (`--account github=acme-mira`), and never a secret; `=none` takes one away; by the account itself, or a supervisor. The account's lines say them as `accounts elsewhere`. `--day-start` and `--day-end` keep the hours of its day ([ADR-0085](../adr/0085-a-runner-on-the-agents-machine-is-told-by-signals-and-runs-one-session-at-a-time.md)), an hour as `09:00` in the workspace's time zone, `none` for the usual start or no end, by the account itself or a supervisor: the console sends its briefings by them, and the account's lines say them as `day`. Needs no project |
|
|
82
84
|
| `secrets` | `GET /api/v1/agents/me/secrets` | one line per secret of the account's own store ([ADR-0087](../adr/0087-an-agent-account-keeps-its-secrets-in-a-store-of-its-own-that-only-it-reads.md)): its name, when it was set, `seeded by a supervisor` where one set it, and the day it ends on where one was said; never a value. For an agent account signed in as itself. Needs no project |
|
|
83
85
|
| `secret <name>` | `GET /api/v1/agents/me/secrets/<name>` | the value and nothing else, for whatever reads it next; the reading is noted on the account's record |
|
|
84
86
|
| `secret <name> --set [--file <path>] [--expires <day\|none>]`, `secret <name> --remove` | `PUT`, `DELETE /api/v1/agents/me/secrets/<name>` | the secret as it is kept, without its value; or that it is removed. The value is typed unseen at the terminal, or read whole from standard input when piped, or from `--file`; never an argument |
|
|
85
87
|
| `agent secrets <handle>` | `GET /api/v1/agents/<handle>/secrets` | the names of the account's secrets, as `secrets` prints them; for a supervisor. Refused to the account itself as to anyone who supervises it not, and then in words that name the account's own commands, `console secrets` and `console secret <name>` |
|
|
88
|
+
| `secrets --offered` | `GET /api/v1/agents/me/secret-offers` | one offer that waits for the account a line ([ADR-0169](../adr/0169-a-member-offers-an-agent-account-a-secret-and-the-account-takes-it-or-leaves-it.md)): its id, the name proposed, who offers it and through which agent, when, and until when it waits; under it, what the offerer said it is for, as their words; then the two commands that take one and leave one. Never a value |
|
|
89
|
+
| `secret --accept <offer id> [--as <name>] [--replace]`, `secret --decline <offer id>` | `POST /api/v1/agents/me/secret-offers/<id>/take`, `DELETE /api/v1/agents/me/secret-offers/<id>` | the secret as it is kept from then on, without its value, under the name offered or the one `--as` says; or that the offer is left and its value gone. Where the account keeps a secret of that name already it is refused in words that name the two ways on, `--as <name>` and `--replace`, and the offer still waits. `--as` and `--replace` without `--accept`, or two of `--accept`, `--decline`, `--set` and `--remove`, are a mistake, answered with a sentence |
|
|
90
|
+
| `agent secret <handle> <name> --offer [--note "<what it is for>"] [--file <path>] [--expires <day\|none>]` | `POST /api/v1/agents/<handle>/secret-offers` | that the secret is offered, with the offer's line, and that nothing the account keeps changed; for any member who sees the account. The value is given as `secret --set` takes it. `--note` without `--offer`, and `--offer` with `--remove`, are a mistake, answered with a sentence. Seeding refused for want of supervising the account is answered with the way to offer instead |
|
|
91
|
+
| `agent secrets <handle> --offered` | `GET /api/v1/agents/<handle>/secret-offers` | the account's offers a line each, as `secrets --offered` prints one, with how each stands, waiting, taken and under which name, left or run out: all of them for a supervisor, one's own for any other member |
|
|
86
92
|
| `agent secret <handle> <name> [--file <path>] [--expires <day\|none>]`, `agent secret <handle> <name> --remove` | `PUT`, `DELETE /api/v1/agents/<handle>/secrets/<name>` | that the secret is seeded, which only the account reads back, or removed; for a supervisor. The value is given as `secret --set` takes it |
|
|
87
93
|
| `agent invite <handle> [--out <path>]`, `agent invite <handle> --revoke` | `POST`, `DELETE /api/v1/agents/<handle>/invitation` | the day the invitation is good until, the one line to say to the agent's product on its machine, which carries the command with its code, shown this once, and the address where a person reads the same guide, `/setup/<code>`; or that the invitation is taken away. Made again, it takes the place of the one before. With `--out`, the same words are written to a file as Markdown, at the path or into a directory as `<handle>-invitation.md`, and the output names the file, the day and how the file is handed on, never the code, with `--json` too (`handle`, `invitation`, `file`): what the command prints under an agent is in that agent's record, so an agent that makes an invitation hands the file to whoever prepares the machine as the body of a decision (`ask --file --to`), as an attachment of a comment (`comment --attach`) or at the messenger, and never as a comment's own words, which `comment` prints back; the path the output names is spelled so that both shells take it whole. The path is tried before the invitation is made, with a file that holds nothing: one that cannot be written fails the command with no invitation made, so that the one before stands. The file is written for its OS account alone to read (mode 600), one that was there before too. A file that took the try and not the line leaves the invitation made and its line with nobody: the command fails and says to make it again. For a supervisor ([ADR-0088](../adr/0088-an-agent-account-has-a-desk-and-is-set-up-from-an-invitation-by-signing-in-as-itself.md), [rest.md](rest.md#the-invitation-apiv1agentshandleinvitation-and-get-apiv1setupcode)). The code is no credential |
|
|
88
94
|
| `agent setup --console <origin> --code <code>` | `GET /api/v1/setup/<code>` at the console the line names, with no token | the guide of that account's setup, as Markdown with every line to run on a line of its own: the account and how it signs in, then what has to be there before the line, what the agent asks the person at the machine for and what the command does, what the agent does when it starts, how it signs in elsewhere in a browser, and what it asks for where it cannot, in the words of the services its workspace names ([ADR-0094](../adr/0094-the-account-an-agent-signs-in-with-is-named-and-who-makes-it-is-the-organizations-to-say.md)). `--guide` stops there, and `--json` prints what the code opened and the guide in its parts. Otherwise the command goes on, as [Setting a machine up](#setting-a-machine-up) says. Run in the agent's OS account on the machine being set up, signed in nowhere yet; `--url` is read as `--console`, and the code as a person types one. Needs no login and no project. A code that opens nothing ends in 1 and says who makes another; what is no code or no origin is a misuse (2) and asks nothing of any console |
|
|
@@ -114,8 +120,8 @@ A table a group, each row a command: what it asks the console, and what it says.
|
|
|
114
120
|
|
|
115
121
|
| Command | Asks the console | Says |
|
|
116
122
|
|---|---|---|
|
|
117
|
-
| `skills [--cursor <cursor>]`, `skills <folder\|file> [--limit <n>] [--cursor <cursor>]`, `skills --search <words> [<folder>\|--path <folder>] [--limit <n>] [--cursor <cursor>]`, `skills --rows [<folder\|file>] [--heading <words>] [--format csv\|json] [--out <path>]`, `skills --code [<folder\|file>] [--heading <words>] [--grep <pattern>] [--out <path>]` | `GET .../skills`; `GET .../skills/browse?path=&cursor=&limit=`, one page; `GET .../skills/find?query=&path=&cursor=&limit=`, one page; `GET .../skills/rows?path=&heading=&cursor=&limit=` or `.../skills/code`, page after page to the end; where no project is named, the same reads under `/api/v1/workspace/skills` | each read as the `skillcdn` command's own goes, printed by the reads that command prints with ([ADR-0118](../adr/0118-the-consoles-reads-of-a-pack-keep-to-the-skillcdn-commands-read-by-read.md), [ADR-0124](../adr/0124-the-commands-reads-of-a-pack-are-the-skillcdn-commands-own.md)): `skillcdn skills`, `browse`, `find`, `rows` and `code`, with the same pages, bounds and words, the reads named as the commands the pack is read with, `console plugin <key> skills` for a plugin's. The project's pack; or, where no project is named, the organization's, every read but `--rows`, `--code` and `--json` under a first line that says whose pack it is and how a project's own is read ([ADR-0113](../adr/0113-the-organizations-pack-is-read-where-no-project-is-named-by-every-member.md)). The project's pack is its own, or the organization's ([ADR-0031](../adr/0031-the-console-reads-a-pack-as-the-skillcdn-command-does-and-a-local-one-from-a-directory.md)): where it is, at a deployment or on the console's machine, and how the read went; what a client is told of it on connect, as the deployment tells one, with the reads named as the console's commands; every skill with the path of its `SKILL.md
|
|
118
|
-
| `skill <path> [--cursor <cursor>]`, `skill --file <path> [--offset <n>] [--limit <n>]` | `GET .../skills`, then `GET .../skills/one?path=&cursor=`, page after page until `complete` or until the next page would pass what a part holds; with `--file`, `GET .../skills/file?path=&offset=&limit=` once; where no project is named, the same reads under `/api/v1/workspace/skills` | as `skillcdn skill` and `skillcdn file` go ([ADR-0118](../adr/0118-the-consoles-reads-of-a-pack-keep-to-the-skillcdn-commands-read-by-read.md), [ADR-0124](../adr/0124-the-commands-reads-of-a-pack-are-the-skillcdn-commands-own.md)), of the project's pack, or of the organization's where no project is named, under the line that says so: the skill, the pages it came in joined, whole where it prints within 28,000 bytes, the line above it counted where the pack is the organization's, and otherwise in parts, since a host shows an agent no more of one command's output: a part joins as many pages as fit, says at its head that the skill's context is incomplete, a part after the first under the skill's name and its source alone, the description, the license and the lists of its files and of what it refers to printed once, with the first (SkillCDN 0.5.3; the license from 0.6, which took its line out of a later part), a part ending between two blocks of Markdown where it can, outside a table and a fenced code block, with a long table's first two lines said again where the next part goes on with it, and the first part naming what it shortened and the files of other packs the skill links to, which are not read here (SkillCDN 0.6), and ends in the `skillcdn` command's own words (SkillCDN 0.6.2), with none of the console's after them: that the part ends before the skill does, how many pages of the skill follow it where the pack counts them (`3 more pages follow this part`), and that the skill is not to be used, planned from or answered from yet but read on now, then, alone on the last line, the command that prints the next part, `console skill <path as given> --cursor <cursor>` with `--project`, `--url` and `--account` as they were given; the last part of a skill read in parts ends with `Skill context is complete: this was its last part.`, and a skill printed whole by one command says neither, however many pages it came in; a cursor of a pack that has moved since is refused in the pack's own words. Each word of a line printed to run is spelled so that bash and PowerShell both take it whole and expand nothing in it: as it is where neither reads anything of it, else in single quotes, and in double quotes where it holds a single quote, straight or curly, and nothing either reads inside them; a word that holds a single quote with `$`, a backtick, a double quote, a backslash or `!`, or a character that does not show, has no spelling both take, and no line is printed for it: the part says to run the command that was run again with `--cursor <cursor>`, and why, and an outline says the read with the file's path quoted for one's shell. Laid out as `load_skill` lays it out for a model: the rules of the repository from its root to the nearest manifest, the instructions, the included files, then its supporting files and what it refers to, a reference whose link names a section with what reads that section (SkillCDN 0.5), rendered by the main repository's own renderers with the reads named as the console's commands; or, with `--file`, a page of the file, or what a folder holds: the text as written from character `--offset` (0 unless given), 24,000 characters ended at the end of a line unless `--limit` says otherwise (1 to 100,000), and a page that ends before the file does says where the next begins, which `--offset` then reads; the section a search or an outline named is read the same way; a private pack through the pack token the project holds ([ADR-0028](../adr/0028-the-console-reads-a-projects-pack-through-the-deployments-rest-api-with-a-pack-token-for-a-private-one.md)). `<path>` is the path of the SKILL.md from the repository's root, or of the skill's folder, which is read as its `SKILL.md` (`.` for the root's own), or the URI the pack names it by (`skill://<host>/<owner>/<name>/<path>`); a URI of another pack is not understood. Where the pack answers that no skill is at the path, the command says so as `skillcdn skill` does, `skill.not_found: No skill at "<path>". Use console skills <folder> or console skills --search for its exact SKILL.md path. Available: <the first twenty there are>.`; no file is the pack's own `file.not_found` and words; the words about a private pack and its token are for a pack that serves nothing to the console at all. `--file` takes no skill's path beside it, `--offset` and `--limit` go with `--file` only, and `--cursor` with a skill only: otherwise not understood. A read the pack refused ends the command with exit `1` and the refusal on standard error; `--json` prints the console's answer, with the skill whole in it, from `--cursor` where one is given, or the file's page as the API gives it, 40,000 characters unless `--limit` says otherwise; for a refused read it says the status, and ends the same |
|
|
123
|
+
| `skills [--cursor <cursor>]`, `skills <folder\|file> [--limit <n>] [--cursor <cursor>]`, `skills --search <words> [<folder>\|--path <folder>] [--limit <n>] [--cursor <cursor>]`, `skills --rows [<folder\|file>] [--heading <words>] [--format csv\|json] [--out <path>]`, `skills --code [<folder\|file>] [--heading <words>] [--grep <pattern>] [--out <path>]` | `GET .../skills`; `GET .../skills/browse?path=&cursor=&limit=`, one page; `GET .../skills/find?query=&path=&cursor=&limit=`, one page; `GET .../skills/rows?path=&heading=&cursor=&limit=` or `.../skills/code`, page after page to the end; where no project is named, the same reads under `/api/v1/workspace/skills` | each read as the `skillcdn` command's own goes, printed by the reads that command prints with ([ADR-0118](../adr/0118-the-consoles-reads-of-a-pack-keep-to-the-skillcdn-commands-read-by-read.md), [ADR-0124](../adr/0124-the-commands-reads-of-a-pack-are-the-skillcdn-commands-own.md)): `skillcdn skills`, `browse`, `find`, `rows` and `code`, with the same pages, bounds and words, the reads named as the commands the pack is read with, `console plugin <key> skills` for a plugin's. The project's pack; or, where no project is named, the organization's, every read but `--rows`, `--code` and `--json` under a first line that says whose pack it is and how a project's own is read ([ADR-0113](../adr/0113-the-organizations-pack-is-read-where-no-project-is-named-by-every-member.md)). The project's pack is its own, or the organization's ([ADR-0031](../adr/0031-the-console-reads-a-pack-as-the-skillcdn-command-does-and-a-local-one-from-a-directory.md)): where it is, at a deployment or on the console's machine, and how the read went; what a client is told of it on connect, as the deployment tells one, with the reads named as the console's commands; every skill with the path of its `SKILL.md`, as a search without words lists them, and the documents outside the skills counted and not listed, with the commands that read them, a folder and a search, since a pack of documents holds hundreds (SkillCDN 0.6.3); a line of the command's own, after the listing and after what a search found, that a skill is loaded, its rules first, with `console skill <the path of its SKILL.md>`, a long one in parts, and that `--file` reads a file as it is, without the rules; where a person connects an agent of its own, and where the console's own skills are on this machine. A listing longer than one read prints, 28,000 bytes with the console's own lines counted (SkillCDN 0.6.2), comes in pages cut from the console's one answer: the first has the console's lines above the listing and ends with `The listing goes on: console skills --cursor <cursor>`, with `--project`, `--url` and `--account` as they were given, a page from a cursor is the listing alone, and the last says `The listing is complete: this was its last page.`; a cursor that is none, or of another commit of the pack, is refused as the pack refuses one (`request.invalid`), and `--limit` goes with a folder or a search. With a folder (`.` for the root; `/` is taken too, but a Windows shell rewrites it into a path before the command sees it), a page of what it holds, as `browse_repo` lays it out for a model: 50 entries unless `--limit` says otherwise (up to 200), and a page that ends before the folder does ends with the command that reads the next, `Next page: console skills <folder> --cursor <cursor>`, with `--limit`, `--project`, `--url` and `--account` as they were given, and names no cursor beside it (SkillCDN 0.6.3). With a file's path, the file's outline, paged the same way: every heading with its level and the offset and limit that read its section with `skill --file`; a file that is not Markdown has none, and the line says so (SkillCDN 0.4); from SkillCDN 0.5 a heading says how many rows the tables of its section hold, and a line how many tables and code blocks the document has, each with the command that reads them as data, its path spelled as the line that reads the next part of a skill spells one (`skill` below). With `--rows`, the tables of the document, or of every document under the folder, the whole pack when none is named, as data ([ADR-0100](../adr/0100-a-packs-tables-and-code-blocks-are-had-as-data-through-the-console.md)): one CSV, a header of `path`, `heading` and every column name the tables have, then a line per row in reading order, every page the pack answers joined, so that a table written in several sections and files under one header comes out as one. `--format json` prints an array of rows instead, each with its `path`, its `heading` and its `cells` by column name; a document with no table prints the header alone, and standard error says that there is none. With `--code`, the fenced code blocks as written, each under a line that names its file, the section it stands in and what it says it is written in (`--- <path> > <heading> (<language>) ---`); `--grep <pattern>` keeps the blocks whose text matches, a regular expression as JavaScript reads one, run on this machine. `--heading <words>` keeps what stands under a heading whose path holds every word; `--out <path>` writes the file there, or into a directory, and says how much was written (`Wrote 3 rows of 2 tables to <file>.`), instead of printing. A read as data that the pack refused prints nothing, says why on standard error and exits with `1`, so that what a program takes is never a refusal; one that does not end within 64 pages fails the same way, and a folder or a file under the path is named instead. With `--search`, one page of what the words find, as `search_repo` does: skills first with the files of theirs that matched, then documents, each with the sections of it that matched and the offset and limit that read each, in relevance order, within the folder when one is named, after the words or with `--path <folder>`, ten unless `--limit` says otherwise (up to 25), a document made from others marked as one (SkillCDN 0.5), a line on how the page was ranked where the deployment searches by meaning too, which from SkillCDN 0.5 says where identifiers were ranked by their words and how much of the pack is embedded so far, and, when more matched, a last line with the command that reads the next page, `Next page: console skills --search <words> ... --cursor <cursor>`, the words, the folder and `--limit` as they were given, the line on how a skill is loaded standing above the results then, so that the command is the last line read. A read the pack refused ends the command with exit `1` and the refusal on standard error, the listing too: for one read, the pack's own code and words, as the `skillcdn` command prints them (`file.not_found: No file at that path in this mount.`); for the pack as a whole, where it is, how it stands and whose token is missing. `--json` is the console's answer: what the pack answered, in the shapes of the main repository's REST API, one page of a folder or an outline as it came, the tables or the code blocks joined; for a refused read it says the status, and the command ends the same. The listing ends with where the plugins' own skills are: `console plugin <key> skills` |
|
|
124
|
+
| `skill <path> [--cursor <cursor>]`, `skill --file <path> [--offset <n>] [--limit <n>]` | `GET .../skills`, then `GET .../skills/one?path=&cursor=`, page after page until `complete` or until the next page would pass what a part holds; with `--file`, `GET .../skills/file?path=&offset=&limit=` once; where no project is named, the same reads under `/api/v1/workspace/skills` | as `skillcdn skill` and `skillcdn file` go ([ADR-0118](../adr/0118-the-consoles-reads-of-a-pack-keep-to-the-skillcdn-commands-read-by-read.md), [ADR-0124](../adr/0124-the-commands-reads-of-a-pack-are-the-skillcdn-commands-own.md)), of the project's pack, or of the organization's where no project is named, under the line that says so: the skill, the pages it came in joined, whole where it prints within 28,000 bytes, the line above it counted where the pack is the organization's, and otherwise in parts, since a host shows an agent no more of one command's output: a part joins as many pages as fit, says at its head that the skill's context is incomplete, a part after the first under the skill's name and its source alone, the description, the license and the lists of its files and of what it refers to printed once, with the first (SkillCDN 0.5.3; the license from 0.6, which took its line out of a later part), a part ending between two blocks of Markdown where it can, outside a table and a fenced code block, with a long table's first two lines said again where the next part goes on with it, and the first part naming what it shortened and the files of other packs the skill links to, which are not read here (SkillCDN 0.6), and ends in the `skillcdn` command's own words (SkillCDN 0.6.2), with none of the console's after them: that the part ends before the skill does, how many pages of the skill follow it where the pack counts them (`3 more pages follow this part`), and that the skill is not to be used, planned from or answered from yet but read on now, then, alone on the last line, the command that prints the next part, `console skill <path as given> --cursor <cursor>` with `--project`, `--url` and `--account` as they were given; the last part of a skill read in parts ends with `Skill context is complete: this was its last part.`, and a skill printed whole by one command says neither, however many pages it came in; a cursor of a pack that has moved since is refused in the pack's own words. Where a skill does not list every file of its folder, or resolve every file it links to, it names the folder by the command that lists it, `console skills <folder>`, `.` for the root's, with `--project`, `--url` and `--account` as they were given (SkillCDN 0.6.3). Each word of a line printed to run is spelled so that bash and PowerShell both take it whole and expand nothing in it: as it is where neither reads anything of it, else in single quotes, and in double quotes where it holds a single quote, straight or curly, and nothing either reads inside them; a word that holds a single quote with `$`, a backtick, a double quote, a backslash or `!`, or a character that does not show, has no spelling both take, and no line is printed for it: the part says to run the command that was run again with `--cursor <cursor>`, and why, and an outline says the read with the file's path quoted for one's shell. Laid out as `load_skill` lays it out for a model: the rules of the repository from its root to the nearest manifest, the instructions, the included files, then its supporting files and what it refers to, a reference whose link names a section with what reads that section (SkillCDN 0.5), rendered by the main repository's own renderers with the reads named as the console's commands; or, with `--file`, a page of the file, or what a folder holds: the text as written from character `--offset` (0 unless given), 24,000 characters ended at the end of a line unless `--limit` says otherwise (1 to 100,000), and a page that ends before the file does says where the next begins, which `--offset` then reads; the section a search or an outline named is read the same way; a private pack through the pack token the project holds ([ADR-0028](../adr/0028-the-console-reads-a-projects-pack-through-the-deployments-rest-api-with-a-pack-token-for-a-private-one.md)). `<path>` is the path of the SKILL.md from the repository's root, or of the skill's folder, which is read as its `SKILL.md` (`.` for the root's own), or the URI the pack names it by (`skill://<host>/<owner>/<name>/<path>`); a URI of another pack is not understood. Where the pack answers that no skill is at the path, the command says so as `skillcdn skill` does, `skill.not_found: No skill at "<path>". Use console skills <folder> or console skills --search for its exact SKILL.md path. Available: <the first twenty there are>.`; no file is the pack's own `file.not_found` and words; the words about a private pack and its token are for a pack that serves nothing to the console at all. `--file` takes no skill's path beside it, `--offset` and `--limit` go with `--file` only, and `--cursor` with a skill only: otherwise not understood. A read the pack refused ends the command with exit `1` and the refusal on standard error; `--json` prints the console's answer, with the skill whole in it, from `--cursor` where one is given, or the file's page as the API gives it, 40,000 characters unless `--limit` says otherwise; for a refused read it says the status, and ends the same |
|
|
119
125
|
| `rules` | `GET .../rules`, or `GET /api/v1/rules` without a project named, and `GET /api/v1/me` | the rules that hold, as they read for the person (`{language}` is the language they read in, or the task's while they have none) ([ADR-0023](../adr/0023-the-rules-of-a-board-are-pages-the-workspace-and-its-projects-keep-read-first-by-every-agent.md)), under a first line that says what follows ([ADR-0119](../adr/0119-a-take-leaves-out-the-rules-a-session-says-it-holds.md)): `Rules <mark>:`, which parts there are, in the order they are printed, with how many characters each is, and how a later take of the session leaves them out (`console take <number> --rules <mark>`). The mark is the first eight hex characters of a SHA-256 over the rules as they read for the person, the console's rules with what the organization adds, what the project adds and the plugins' lines, in the language they are read in: the same for the same rules, another once a rule changed, for another project's and in another language; a project that adds nothing has the mark of the workspace's alone. Then the parts, what differs first and what always holds last ([ADR-0120](../adr/0120-the-consoles-rules-always-hold-and-a-workspace-and-a-project-add-to-them.md)): what this project adds, with its version and who wrote it; under `## Plugins`, a line per plugin bound to the project that the person holds a role in, or at the workspace every plugin they may use, with the sentence its manifest gives agents and `console plugin <key>` to start with ([plugins.md](plugins.md), "The command"); what the organization adds, with its version and who wrote it; and the console's rules, which always hold. A part that adds nothing is not printed: the first line says in a clause that the project, the organization or both add nothing. What is added stands first because it is short and is what differs between projects; where the parts differ the earlier holds, as the line says. `--json` carries the rules as the console answered them, and `mark` |
|
|
120
126
|
| `rules write --body <markdown>\|--file <path>\|-\|none [--workspace] [--base <version>]` | `PUT .../docs/rules` or `POST .../docs/rules/archive`; with `--workspace`, `PUT /api/v1/rules` or `POST /api/v1/rules/archive` | the version written of what the project adds to the rules, or with `--workspace` of what the organization adds ([ADR-0120](../adr/0120-the-consoles-rules-always-hold-and-a-workspace-and-a-project-add-to-them.md)); that a text which adds nothing to the console's rules wrote nothing; or, with `none`, that what was added is put away; for an owner of the project, or an administrator for the organization's. |
|
|
121
127
|
| `plugins` | `GET /api/v1/plugins`, `GET /api/v1/me` | one line per plugin the person may use ([plugins.md](plugins.md)): key, name in their language, version, state, their roles in it. Needs no project |
|
|
@@ -133,7 +139,7 @@ A table a group, each row a command: what it asks the console, and what it says.
|
|
|
133
139
|
|---|---|---|
|
|
134
140
|
| `take <number\|id> [--agent <name>] [--rules <mark>]` | `GET .../tasks/<ref>`, then `POST .../runs`, then `GET .../rules`, `GET /api/v1/me`, `GET .../tasks/<ref>` again, `GET .../tasks/<id>/comments` and `GET .../runs?open=true&mine=true&brief=true` | the run that began, with the run's id and the task's id on a line of their own, the task in full as it stands taken, with the address of its page as `task` prints it and the discussion on it, the rules that hold as they read for the person, as `rules` prints them, under the line that carries their mark, and what to do next. With `--rules <mark>`, the mark a session read at the head of the rules ([ADR-0119](../adr/0119-a-take-leaves-out-the-rules-a-session-says-it-holds.md)): where it is the mark the rules have now, they are left out, and one line says so (`Rules <mark>: left out, since they stand as this session read them. console rules prints them.`); where it is not, since a rule changed or the mark is of another project's, a line says so (`The rules are not the ones marked <mark>: … They follow whole after the task, under the mark they have now.`) and they are printed whole after the task, as without a mark. The line that answers a mark stands directly after the line of the run's ids, before the task: a session that holds the rules reads the head of a take, and a rule that changed is said there. Without it the rules are printed whole, so that a session that was never shown them, a fresh one or a subagent, has them whatever it does. `--json` carries the rules either way, with `mark`; a run open on the task is taken over, and that is said when it happened ([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)); another run of the token open in the project is named, with the `--run <id>` to say on every command on a run from here |
|
|
135
141
|
| `report <markdown> [--run <id>]`, `report --file <path> [--run <id>]`, `report - [--run <id>]` | `POST .../runs/<id>/reports` | how many reports the run carries |
|
|
136
|
-
| `hand-in <https url \| file path> [--label <words>] [--run <id>]` | `POST .../runs/<id>/artifacts` for a link; `POST .../runs/<id>/files` for a file, sent as a form with its name and its media type by extension | how many artifacts; a picture handed in is shown on the task, and where a report names it as `` |
|
|
142
|
+
| `hand-in <https url \| file path> [--label <words>] [--run <id>]` | `POST .../runs/<id>/artifacts` for a link; `POST .../runs/<id>/files` for a file, sent as a form with its name and its media type by extension | how many artifacts; a picture handed in is shown on the task, and where a report names it as ``. A link is over https; over http the console takes an address of its own alone, a page a command printed on a console served on one machine (`http://127.0.0.1:11199/...`), and refuses any other in those words (`request.invalid`), one with a backslash in it or a name before an `@` among them |
|
|
137
143
|
| `comment <number\|id> "<markdown>" [--attach <path>]...`, `comment <number\|id> --file <path>`, `comment <number\|id> -` | `GET .../tasks/<ref>`, then `POST .../tasks/<id>/comments`: as JSON, or as one form with the part `body` and a part `file` per file attached, its media type by extension | the comment as written, with its files and the command that reads each; a word to the task's people, which needs no run ([ADR-0024](../adr/0024-a-task-carries-a-discussion-of-comments-with-their-files-read-as-one-thread-with-the-runs-and-the-decisions.md)) |
|
|
138
144
|
| `file <id> [--decision <id>] [--out <path>]` | `GET .../files/<id>`; with `--decision`, `GET /api/v1/decisions/<decision id>/files/<id>`, needing no project ([ADR-0068](../adr/0068-a-decision-reaches-whom-it-is-addressed-to-wherever-it-is-and-a-plugins-reaches-the-managers-above-them.md)) | that the file is saved, where, with its size and type: under its own name in the working directory, at the path, or into the directory named; a file a run handed in, one put in a comment or on a decision, or one attached to a page, so that an agent looks at a picture a person put on the board; with `--decision`, a file of that decision wherever it is, as `decision` names it for one reached outside the project; `file.not_found` for a file not the decision's, or a decision out of reach |
|
|
139
145
|
| `ask "<question>" --option "<label>" ... [--body <markdown>\|--file <path>] [--attach <path>]... [--to <login\|me>]... [--wait <seconds>] [--run <id>]` | `POST .../decisions` with `runId` and, for `--to`, `deciderId`, and `deciderIds` beside it where `--to` was given more than once ([ADR-0057](../adr/0057-a-decision-may-be-addressed-to-several-people-and-the-first-answer-ends-it.md)); with `--attach`, as one form with the part `decision` and a part `file` per file, its media type by extension ([ADR-0055](../adr/0055-a-decision-carries-the-files-put-on-it-when-it-is-raised.md)); then `GET .../decisions/<id>?wait=` | the decision raised, its id and then the address of its page each on a line of its own (`page: <origin>/projects/<key>/decisions/<id>`), how many files came, whom it waits for, its options; then the answer, or that it still waits. It is for the person the agent works for unless `--to` names another of the project ([ADR-0042](../adr/0042-a-decision-is-addressed-to-a-person-its-raiser-unless-another-is-named.md)), or several, any of whom may answer, the first answer ending it |
|
|
@@ -141,7 +147,7 @@ A table a group, each row a command: what it asks the console, and what it says.
|
|
|
141
147
|
| `answer <id> --option <n>\|--own "<answer>" [--note <markdown>\|--file <path>]` | `POST .../decisions/<id>/answer`; where the project does not have it, or none is named, `POST /api/v1/decisions/<id>/answer` ([ADR-0068](../adr/0068-a-decision-reaches-whom-it-is-addressed-to-wherever-it-is-and-a-plugins-reaches-the-managers-above-them.md)) | the decision with its answer: a person's answer written in their name through the agent, as they gave it in chat or in passing, with where and when in the note, so that the record is whole and a run that waited goes on ([ADR-0042](../adr/0042-a-decision-is-addressed-to-a-person-its-raiser-unless-another-is-named.md)) |
|
|
142
148
|
| `decisions [--open] [--limit <n>] [--offset <n>]`, `decisions --mine\|--raised [--open] [--limit <n>] [--offset <n>]` | `GET .../decisions`; `GET /api/v1/decisions` for `--mine`, with `raised=true` for `--raised`, neither needing a project | one line per decision, the waiting first, each with who asked it, whom it is for and when it was asked; with `--mine`, the decisions addressed to the person across the projects they may see, with `--raised` those they asked of someone else, each with its project's key; a page at a time |
|
|
143
149
|
| `finish [--summary <markdown>\|--file <path>] [--run <id>]`, `fail [...]` | `POST .../runs/<id>/end`, then `GET .../tasks/<id>` | how the run ended and the state the task is in, read once the run is over (`Run <id> finished; task #<n> is in_review now.`), since a finished run leaves its task at work where another run is open on it; a failed run puts its task up for review too, for a person to look at why ([ADR-0114](../adr/0114-the-end-of-a-run-leaves-no-task-at-work-behind-it.md)), and it is left `in_progress` where a person moved the task meanwhile or another run is open on it. `--json` is the run as the console answered it, and the task is not read. Where the task could not be read, standard error says that the run is over and is not to be ended again, then what the reading ended on, with exit `1` |
|
|
144
|
-
| `abandon [<run id>] [--summary <markdown>]` | `POST .../runs/<id>/end`, as `abandoned`, then `GET .../tasks/<id>` | how the run ended, and the state the task is in, read once the run is over (`Run <id> abandoned; task #<n> is ready now.`): back as the take found it; `--json` and a task that could not be read as after `fail` |
|
|
150
|
+
| `abandon [<run id> \| --run <id>] [--summary <markdown> \| --file <path>]` | `POST .../runs/<id>/end`, as `abandoned`, then `GET .../tasks/<id>` | how the run ended, and the state the task is in, read once the run is over (`Run <id> abandoned; task #<n> is ready now.`): back as the take found it; `--json` and a task that could not be read as after `fail` |
|
|
145
151
|
| `runs [--task <number\|id>] [--open] [--mine] [--limit <n>] [--offset <n>]` | `GET .../runs?brief=true`, the runs without their reports, counted, and whole on `--json` | one line per run, with how many reports and files it has and when an open one was last heard from; a page at a time |
|
|
146
152
|
| `run <id>` | `GET .../runs/<id>` | the run in full, with its reports, what it handed in and where each file is read |
|
|
147
153
|
| `decision <id> --outcome <markdown>\|--file <path>` | `PATCH .../decisions/<id>`; where no project is named, `GET /api/v1/decisions/<id>` first, for the project the decision is in ([ADR-0068](../adr/0068-a-decision-reaches-whom-it-is-addressed-to-wherever-it-is-and-a-plugins-reaches-the-managers-above-them.md)) | the decision as a record, with what followed written down; written from a directory that names no project, a desk, as the decision is read from there; `decision.not_found` for one out of reach |
|
|
@@ -153,9 +159,9 @@ A table a group, each row a command: what it asks the console, and what it says.
|
|
|
153
159
|
|---|---|---|
|
|
154
160
|
| `docs [<folder>] [--search <words>] [--archived]` | `GET .../docs?folder=` or `?q=` | the folders and the pages of a folder, or the pages found by words: one line per page |
|
|
155
161
|
| `doc <path> [--version <n>\|--versions]` | `GET .../docs/<path>`, `.../versions`, `.../versions/<n>` | the page in full: its body, what it refers to, what refers to it, its files; or its versions; or one as it was |
|
|
156
|
-
| `write <path> [--title <title>] --body <markdown>\|--file <path> [--base <version>]` | `GET .../docs/<path>` for the title when none is said, then `PUT .../docs/<path>` | the path, the title and the version written, what the page refers to, and the page's address on a line `page: <address>`, as a task's; the title is shown above the body, on the page and by `doc`, so the body does not begin with it |
|
|
157
|
-
| `attach <path> <file> [--label <words>]` | `POST .../docs/<path>/files`, as a form | how many files the page carries; a picture attached is shown where the page's body names it as `` |
|
|
158
|
-
| `archive <path>`, `restore <path>` | `POST .../docs/<path>/archive`, `.../restore` | that the page is put away, or back |
|
|
162
|
+
| `doc write <path> [--title <title>] --body <markdown>\|--file <path> [--base <version>]` | `GET .../docs/<path>` for the title when none is said, then `PUT .../docs/<path>` | the path, the title and the version written, what the page refers to, and the page's address on a line `page: <address>`, as a task's; the title is shown above the body, on the page and by `doc`, so the body does not begin with it |
|
|
163
|
+
| `doc attach <path> <file> [--label <words>]` | `POST .../docs/<path>/files`, as a form | how many files the page carries; a picture attached is shown where the page's body names it as `` |
|
|
164
|
+
| `doc archive <path>`, `doc restore <path>` | `POST .../docs/<path>/archive`, `.../restore` | that the page is put away, or back. A form's word is the form where a path follows it, the form's flags before the path or after it, and a page's path alone: a page called `write` is read with `doc write`, and written with `doc write write` |
|
|
159
165
|
|
|
160
166
|
### Commands for the command itself
|
|
161
167
|
|
|
@@ -164,11 +170,11 @@ A table a group, each row a command: what it asks the console, and what it says.
|
|
|
164
170
|
| `serve [<dir>] [--port <n>] [--records <dir>]` | `GET /api/v1/me` once; then every request of the pages under `/api/`, carried with the token | where it serves and as whom, and where the records of a desk are where `--records` names them; then nothing until stopped ([a console of one's own](#a-console-of-ones-own)) |
|
|
165
171
|
| `desk [<directory>] [--web]` | `GET /api/v1/me` once | for a person: which of their desk's files it wrote and which were there, with `--web` the shell of the desk's pages written in `web/`, and last what is next, in order, to say to an agent begun in that folder ([a desk of one's own](#a-desk-of-ones-own)). Needs no project; for an agent account it writes the shell alone, with `--web`, into its desk, and nothing without it; refused under a directory that works in a project |
|
|
166
172
|
| `desk check [<directory>]` | nothing | each problem of the collections of the desk in the directory, the current one unless another is named, with its file and what is wrong; or that they read right, with what each collection keeps; or that the desk keeps no collection, which is no failure, what else it keeps under `records/` being its own and not read ([records.md](records.md#the-check), [ADR-0117](../adr/0117-a-desk-keeps-records-of-what-its-member-made-as-files-the-desks-pages-read.md)). Ends in 1 with any problem. Needs no sign-in and no project |
|
|
167
|
-
| `help
|
|
173
|
+
| `help`, `help <command> [<form>]`, `help everywhere` | nothing | the table of the commands; a command's page, or the page of one of its forms, the one a flag names where a form is typed as a flag (`help skills search`, and `skills --search --help`); what holds for every command: the options every command takes, the exit codes, the refusals any command may meet and which console a command talks to ([ADR-0167](../adr/0167-the-commands-of-the-console-command-are-one-table-by-who-runs-them-its-help-is-in-layers-within-bounds-and-a-mistake-is-answered-with-a-sentence.md)). A word that is no command is answered with the nearest there are, and one that is no form with the forms the command has |
|
|
168
174
|
| `--version` (also `version`, `-v`) | nothing | which version of the command this is, and where it is installed |
|
|
169
175
|
## The documents
|
|
170
176
|
|
|
171
|
-
A project's pages of Markdown ([ADR-0009](../adr/0009-documents-are-pages-of-markdown-in-a-project-addressed-by-path-versioned-and-linked-both-ways.md)), by path (`guides/onboarding`): `console docs` lists a folder, `console doc` reads a page, `console write` writes one, the first version or the next, keeping the title when none is said, `console attach` adds a file from the machine, `console archive` and `console restore` put a page away and bring it back. A link in a body whose destination is a page's path refers to that page, and `console doc` says what refers to a page in return. An agent writes down what it learned where the next agent will read it, and refers to it from its reports and in what it asks.
|
|
177
|
+
A project's pages of Markdown ([ADR-0009](../adr/0009-documents-are-pages-of-markdown-in-a-project-addressed-by-path-versioned-and-linked-both-ways.md)), by path (`guides/onboarding`): `console docs` lists a folder, `console doc` reads a page, `console doc write` writes one, the first version or the next, keeping the title when none is said, `console doc attach` adds a file from the machine, `console doc archive` and `console doc restore` put a page away and bring it back. A link in a body whose destination is a page's path refers to that page, and `console doc` says what refers to a page in return. An agent writes down what it learned where the next agent will read it, and refers to it from its reports and in what it asks.
|
|
172
178
|
|
|
173
179
|
## Configuring, as the person
|
|
174
180
|
|
|
@@ -215,6 +221,8 @@ An agent account's desk is settled by `console agent setup` ([below](#setting-a-
|
|
|
215
221
|
|
|
216
222
|
Plain text on standard output: one line per thing in a list, a few lines for one thing in full, with ids given, since the commands take them, and the vocabulary's own words (`in_progress`, `waiting`), since the options take them. A line that names a member, the owner and the workers of a task, whom a decision is for, who wrote a comment, calls a person by their login and an agent account by its handle (`workers alice, @mira`), which the commands take wherever they take a login ([ADR-0084](../adr/0084-an-agent-account-is-a-member-of-its-own-with-a-manager-above-it.md)): a line tells the two apart. What went wrong goes to standard error as the console's stable code and its words (`run.task_closed: the task is done or dropped`), with a hint when there is something to do about it.
|
|
217
223
|
|
|
224
|
+
A command that was not understood is answered with a sentence, never with a page ([ADR-0167](../adr/0167-the-commands-of-the-console-command-are-one-table-by-who-runs-them-its-help-is-in-layers-within-bounds-and-a-mistake-is-answered-with-a-sentence.md)): what was wrong, with the form to type where one was left out, and a second line that names the page, of the form that was tried where it has one (`Its forms and flags: console help task edit`). An option that is none of the command's is answered with those it takes (`Not an option of this command: --bogus. Its own are --state, --open, ...; --json, --project, --url and --account go with every command.`), so that the next try needs no page; a word where the command takes none, and an option without its value, are said as that. A word that is no command names the nearest there are (`Not a command: taks. Nearest: take, tasks, task. console help lists the commands.`). All of these end with `2`, and ask the console nothing.
|
|
225
|
+
|
|
218
226
|
| Exit code | Meaning |
|
|
219
227
|
|---|---|
|
|
220
228
|
| `0` | Done. |
|
package/docs/specs/plugins.md
CHANGED
|
@@ -173,11 +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` |
|
|
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
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
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; a team is called by its `key`, which never changes | `people: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` |
|
|
181
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` |
|
|
182
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` |
|
|
183
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` |
|
|
@@ -193,7 +193,7 @@ Everything a plugin does to the console is a call on `ctx`, which is a message t
|
|
|
193
193
|
|
|
194
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.
|
|
195
195
|
|
|
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. 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`.
|
|
197
197
|
|
|
198
198
|
## Capabilities
|
|
199
199
|
|
|
@@ -204,7 +204,7 @@ Declared in the manifest, consented to by an administrator when enabling, enforc
|
|
|
204
204
|
| (none) | its own records, versions, links and events; its settings; its log | its own data, spoiled; the versions restore it |
|
|
205
205
|
| `files` | files on its records, within `PLUGIN_FILE_BYTES_AT_MOST` | storage filled to the bound |
|
|
206
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 |
|
|
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 |
|
|
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 |
|
|
208
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
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 |
|
|
210
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 |
|
package/docs/specs/rest.md
CHANGED
|
@@ -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,17 +454,24 @@ 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.
|