@skillcdn/console 0.5.0 → 0.5.1
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 +68 -11
- package/SKILLCDN.md +3 -3
- package/dist/agent-page.d.ts.map +1 -1
- package/dist/agent-page.js +3 -2
- package/dist/agent-page.js.map +1 -1
- package/dist/api.d.ts +7 -6
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +6 -5
- package/dist/api.js.map +1 -1
- package/dist/charts.d.ts +103 -0
- package/dist/charts.d.ts.map +1 -0
- package/dist/charts.js +182 -0
- package/dist/charts.js.map +1 -0
- package/dist/cli/cli.d.ts +26 -2
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +1304 -383
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/command-words.d.ts +20 -0
- package/dist/cli/command-words.d.ts.map +1 -0
- package/dist/cli/command-words.js +51 -0
- package/dist/cli/command-words.js.map +1 -0
- package/dist/cli/credentials.d.ts +54 -5
- package/dist/cli/credentials.d.ts.map +1 -1
- package/dist/cli/credentials.js +126 -20
- package/dist/cli/credentials.js.map +1 -1
- package/dist/cli/directory.d.ts +19 -4
- package/dist/cli/directory.d.ts.map +1 -1
- package/dist/cli/directory.js +16 -8
- package/dist/cli/directory.js.map +1 -1
- package/dist/cli/format.d.ts +65 -8
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +242 -37
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/help.d.ts +13 -4
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +92 -54
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/main.js +76 -2
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/pack.d.ts +69 -60
- package/dist/cli/pack.d.ts.map +1 -1
- package/dist/cli/pack.js +241 -270
- package/dist/cli/pack.js.map +1 -1
- package/dist/cli/plugin-check.d.ts +42 -0
- package/dist/cli/plugin-check.d.ts.map +1 -1
- package/dist/cli/plugin-check.js +221 -36
- package/dist/cli/plugin-check.js.map +1 -1
- package/dist/cli/plugin-cli.d.ts +6 -1
- package/dist/cli/plugin-cli.d.ts.map +1 -1
- package/dist/cli/plugin-cli.js +21 -4
- package/dist/cli/plugin-cli.js.map +1 -1
- package/dist/cli/plugin-main.js +1 -0
- package/dist/cli/plugin-main.js.map +1 -1
- package/dist/cli/serve.d.ts +33 -1
- package/dist/cli/serve.d.ts.map +1 -1
- package/dist/cli/serve.js +252 -3
- package/dist/cli/serve.js.map +1 -1
- package/dist/client.d.ts +48 -9
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +72 -80
- package/dist/client.js.map +1 -1
- package/dist/components/agent-page.d.ts +64 -1
- package/dist/components/agent-page.d.ts.map +1 -1
- package/dist/components/agent-page.js +244 -96
- package/dist/components/agent-page.js.map +1 -1
- package/dist/components/charts.d.ts +157 -0
- package/dist/components/charts.d.ts.map +1 -0
- package/dist/components/charts.js +182 -0
- package/dist/components/charts.js.map +1 -0
- package/dist/components/desk-records.d.ts +102 -0
- package/dist/components/desk-records.d.ts.map +1 -0
- package/dist/components/desk-records.js +221 -0
- package/dist/components/desk-records.js.map +1 -0
- package/dist/components/desk.d.ts +85 -0
- package/dist/components/desk.d.ts.map +1 -0
- package/dist/components/desk.js +135 -0
- package/dist/components/desk.js.map +1 -0
- package/dist/components/event-feed.d.ts.map +1 -1
- package/dist/components/event-feed.js +4 -1
- package/dist/components/event-feed.js.map +1 -1
- package/dist/components/home.d.ts.map +1 -1
- package/dist/components/home.js +4 -2
- package/dist/components/home.js.map +1 -1
- package/dist/components/plugin-settings.d.ts.map +1 -1
- package/dist/components/plugin-settings.js +54 -3
- package/dist/components/plugin-settings.js.map +1 -1
- package/dist/components/projects.d.ts.map +1 -1
- package/dist/components/projects.js +27 -7
- package/dist/components/projects.js.map +1 -1
- package/dist/components/rules.d.ts +8 -10
- package/dist/components/rules.d.ts.map +1 -1
- package/dist/components/rules.js +35 -13
- package/dist/components/rules.js.map +1 -1
- package/dist/components/setup.d.ts +9 -3
- package/dist/components/setup.d.ts.map +1 -1
- package/dist/components/setup.js +10 -4
- package/dist/components/setup.js.map +1 -1
- package/dist/console.css +677 -7
- package/dist/console.d.ts +5 -0
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +14 -8
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +32 -33
- package/dist/data.js.map +1 -1
- package/dist/desk-page.d.ts +38 -0
- package/dist/desk-page.d.ts.map +1 -0
- package/dist/desk-page.js +184 -0
- package/dist/desk-page.js.map +1 -0
- package/dist/desk-records-page.d.ts +18 -0
- package/dist/desk-records-page.d.ts.map +1 -0
- package/dist/desk-records-page.js +130 -0
- package/dist/desk-records-page.js.map +1 -0
- package/dist/desk-records.d.ts +247 -0
- package/dist/desk-records.d.ts.map +1 -0
- package/dist/desk-records.js +543 -0
- package/dist/desk-records.js.map +1 -0
- package/dist/desk.d.ts +122 -0
- package/dist/desk.d.ts.map +1 -0
- package/dist/desk.js +211 -0
- package/dist/desk.js.map +1 -0
- package/dist/feed-stream.d.ts +39 -0
- package/dist/feed-stream.d.ts.map +1 -0
- package/dist/feed-stream.js +117 -0
- package/dist/feed-stream.js.map +1 -0
- package/dist/home-tiles.d.ts +10 -3
- package/dist/home-tiles.d.ts.map +1 -1
- package/dist/home-tiles.js +54 -31
- package/dist/home-tiles.js.map +1 -1
- package/dist/i18n/en.d.ts +180 -5
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +184 -7
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +169 -6
- package/dist/i18n/ko.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +11 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +11 -0
- package/dist/limits.js.map +1 -1
- package/dist/onboarding.d.ts +6 -0
- package/dist/onboarding.d.ts.map +1 -1
- package/dist/onboarding.js +3 -3
- package/dist/onboarding.js.map +1 -1
- package/dist/plugin/context.d.ts +42 -11
- package/dist/plugin/context.d.ts.map +1 -1
- package/dist/plugin/limits.d.ts +2 -0
- package/dist/plugin/limits.d.ts.map +1 -1
- package/dist/plugin/limits.js +2 -0
- package/dist/plugin/limits.js.map +1 -1
- package/dist/plugin/manifest.d.ts +13 -0
- package/dist/plugin/manifest.d.ts.map +1 -1
- package/dist/plugin/manifest.js +30 -3
- package/dist/plugin/manifest.js.map +1 -1
- package/dist/plugin/rest-schemas.d.ts +55 -0
- package/dist/plugin/rest-schemas.d.ts.map +1 -1
- package/dist/plugin/rest-schemas.js +37 -0
- package/dist/plugin/rest-schemas.js.map +1 -1
- package/dist/plugin/sandbox.d.ts.map +1 -1
- package/dist/plugin/sandbox.js +4 -1
- package/dist/plugin/sandbox.js.map +1 -1
- package/dist/plugin/testing.d.ts +6 -2
- package/dist/plugin/testing.d.ts.map +1 -1
- package/dist/plugin/testing.js +52 -10
- package/dist/plugin/testing.js.map +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/records.d.ts +283 -0
- package/dist/records.d.ts.map +1 -0
- package/dist/records.js +543 -0
- package/dist/records.js.map +1 -0
- package/dist/routes.d.ts +3 -1
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +3 -1
- package/dist/routes.js.map +1 -1
- package/dist/rules.d.ts +30 -11
- package/dist/rules.d.ts.map +1 -1
- package/dist/rules.js +98 -45
- package/dist/rules.js.map +1 -1
- package/dist/runner/acp.d.ts +1 -1
- package/dist/runner/acp.d.ts.map +1 -1
- package/dist/runner/acp.js +31 -20
- package/dist/runner/acp.js.map +1 -1
- package/dist/runner/claude.d.ts +1 -1
- package/dist/runner/claude.d.ts.map +1 -1
- package/dist/runner/claude.js +85 -15
- package/dist/runner/claude.js.map +1 -1
- package/dist/runner/codex.d.ts +1 -1
- package/dist/runner/codex.d.ts.map +1 -1
- package/dist/runner/codex.js +19 -16
- package/dist/runner/codex.js.map +1 -1
- package/dist/runner/desk.d.ts +43 -2
- package/dist/runner/desk.d.ts.map +1 -1
- package/dist/runner/desk.js +166 -10
- package/dist/runner/desk.js.map +1 -1
- package/dist/runner/process.d.ts.map +1 -1
- package/dist/runner/process.js +11 -4
- package/dist/runner/process.js.map +1 -1
- package/dist/runner/redact.d.ts +39 -4
- package/dist/runner/redact.d.ts.map +1 -1
- package/dist/runner/redact.js +81 -5
- package/dist/runner/redact.js.map +1 -1
- package/dist/runner/runner.d.ts +15 -1
- package/dist/runner/runner.d.ts.map +1 -1
- package/dist/runner/runner.js +231 -33
- package/dist/runner/runner.js.map +1 -1
- package/dist/runner/task-scheduler.d.ts +20 -0
- package/dist/runner/task-scheduler.d.ts.map +1 -1
- package/dist/runner/task-scheduler.js +34 -4
- package/dist/runner/task-scheduler.js.map +1 -1
- package/dist/runner/types.d.ts +36 -1
- package/dist/runner/types.d.ts.map +1 -1
- package/dist/runner/types.js +17 -0
- package/dist/runner/types.js.map +1 -1
- package/dist/runner.d.ts +6 -6
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +5 -5
- package/dist/runner.js.map +1 -1
- package/dist/schemas.d.ts +509 -5
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +76 -16
- package/dist/schemas.js.map +1 -1
- package/dist/services.d.ts +22 -5
- package/dist/services.d.ts.map +1 -1
- package/dist/services.js +35 -15
- package/dist/services.js.map +1 -1
- package/dist/setup-guide.d.ts +3 -1
- package/dist/setup-guide.d.ts.map +1 -1
- package/dist/setup-guide.js +7 -4
- package/dist/setup-guide.js.map +1 -1
- package/dist/vocabulary.d.ts +14 -3
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +13 -3
- package/dist/vocabulary.js.map +1 -1
- package/docs/specs/cli.md +64 -38
- package/docs/specs/plugins.md +27 -20
- package/docs/specs/records.md +113 -0
- package/docs/specs/rest.md +20 -13
- package/docs/specs/runner.md +23 -17
- package/package.json +7 -2
- package/skills/building-a-console/SKILL.md +4 -4
- package/skills/building-a-plugin/SKILL.md +6 -6
- package/skills/deploying-a-console/SKILL.md +4 -4
- package/skills/deploying-a-console/references/resources.md +41 -4
- package/skills/deploying-a-console/references/running-it-again.md +3 -2
- package/skills/keeping-a-desk/SKILL.md +133 -0
- package/skills/keeping-a-desk/collections.md +96 -0
- package/skills/planning-the-board/SKILL.md +14 -18
- package/skills/planning-the-board/references/a-task.md +2 -2
- package/skills/planning-the-board/references/project-rules.md +13 -14
- package/skills/planning-the-board/references/setting-up.md +15 -13
- package/skills/running-an-agent/SKILL.md +10 -9
- package/skills/working-the-board/SKILL.md +62 -44
- package/skills/working-the-board/references/terms.md +9 -5
- package/skills/working-the-board/references/the-pack.md +12 -10
- package/skills/working-the-board/references/the-sentence.md +2 -2
- package/src/agent-page.tsx +3 -1
- package/src/api.ts +77 -2
- package/src/charts.ts +250 -0
- package/src/cli/cli.ts +1698 -476
- package/src/cli/command-words.ts +56 -0
- package/src/cli/credentials.ts +181 -20
- package/src/cli/directory.ts +28 -10
- package/src/cli/format.ts +301 -46
- package/src/cli/help.ts +102 -54
- package/src/cli/main.ts +72 -2
- package/src/cli/pack.ts +333 -372
- package/src/cli/plugin-check.ts +275 -34
- package/src/cli/plugin-cli.ts +28 -4
- package/src/cli/plugin-main.ts +1 -0
- package/src/cli/serve.ts +295 -2
- package/src/client.ts +192 -177
- package/src/components/agent-page.tsx +489 -243
- package/src/components/charts.tsx +680 -0
- package/src/components/desk-records.tsx +724 -0
- package/src/components/desk.tsx +471 -0
- package/src/components/event-feed.tsx +5 -1
- package/src/components/home.tsx +12 -0
- package/src/components/plugin-settings.tsx +171 -12
- package/src/components/projects.tsx +29 -12
- package/src/components/rules.tsx +94 -34
- package/src/components/setup.tsx +18 -3
- package/src/console.tsx +17 -9
- package/src/data.ts +37 -34
- package/src/desk-page.tsx +332 -0
- package/src/desk-records-page.tsx +256 -0
- package/src/desk-records.ts +808 -0
- package/src/desk.ts +329 -0
- package/src/feed-stream.ts +144 -0
- package/src/home-tiles.ts +55 -35
- package/src/i18n/en.ts +196 -9
- package/src/i18n/ko.ts +178 -8
- package/src/index.ts +118 -0
- package/src/limits.ts +11 -0
- package/src/onboarding.ts +12 -4
- package/src/plugin/context.ts +55 -12
- package/src/plugin/limits.ts +2 -0
- package/src/plugin/manifest.ts +38 -2
- package/src/plugin/rest-schemas.ts +41 -0
- package/src/plugin/sandbox.ts +4 -1
- package/src/plugin/testing.ts +63 -12
- package/src/plugin.ts +2 -0
- package/src/records.ts +702 -0
- package/src/routes.ts +3 -1
- package/src/rules.ts +108 -47
- package/src/runner/acp.ts +47 -29
- package/src/runner/claude.ts +113 -23
- package/src/runner/codex.ts +35 -25
- package/src/runner/desk.ts +198 -12
- package/src/runner/process.ts +11 -4
- package/src/runner/redact.ts +92 -6
- package/src/runner/runner.ts +275 -34
- package/src/runner/task-scheduler.ts +36 -4
- package/src/runner/types.ts +47 -1
- package/src/runner.ts +27 -2
- package/src/schemas.ts +83 -15
- package/src/services.ts +49 -14
- package/src/setup-guide.ts +6 -2
- package/src/styles/README.md +11 -1
- package/src/styles/console.css +9 -0
- package/src/styles/pages/desk.css +126 -0
- package/src/styles/pages/documents.css +5 -0
- package/src/styles/parts/bars.css +80 -0
- package/src/styles/parts/chart.css +173 -0
- package/src/styles/parts/figures.css +65 -0
- package/src/styles/parts/legend.css +48 -0
- package/src/styles/parts/series.css +32 -0
- package/src/styles/parts/share.css +25 -0
- package/src/styles/parts/spark.css +23 -0
- package/src/styles/parts/stat.css +69 -0
- package/src/styles/tokens.css +13 -7
- package/src/vocabulary.ts +16 -3
- package/template/desk-web/README.md +8 -0
- package/template/desk-web/index.html +13 -0
- package/template/desk-web/package.json +25 -0
- package/template/desk-web/src/main.tsx +24 -0
- package/template/desk-web/src/page.tsx +51 -0
- package/template/desk-web/tsconfig.json +16 -0
- package/template/desk-web/vite.config.ts +15 -0
package/src/cli/format.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
1
2
|
import { argUsage } from "../plugin/args.js";
|
|
2
3
|
import type {
|
|
3
4
|
RestAgent,
|
|
@@ -9,6 +10,8 @@ import type {
|
|
|
9
10
|
RestDocument,
|
|
10
11
|
RestDocumentSummary,
|
|
11
12
|
RestDocuments,
|
|
13
|
+
RestEvent,
|
|
14
|
+
RestEvents,
|
|
12
15
|
RestGoal,
|
|
13
16
|
RestListing,
|
|
14
17
|
RestMember,
|
|
@@ -19,6 +22,7 @@ import type {
|
|
|
19
22
|
RestPluginDetail,
|
|
20
23
|
RestPluginGrant,
|
|
21
24
|
RestPluginInvocation,
|
|
25
|
+
RestPluginJob,
|
|
22
26
|
RestPluginOperation,
|
|
23
27
|
RestPluginRecord,
|
|
24
28
|
RestPluginRecordPage,
|
|
@@ -31,14 +35,17 @@ import type {
|
|
|
31
35
|
RestRules,
|
|
32
36
|
RestRulesPlugin,
|
|
33
37
|
RestRun,
|
|
38
|
+
RestRunBrief,
|
|
34
39
|
RestSignal,
|
|
35
40
|
RestTask,
|
|
41
|
+
RestTaskBrief,
|
|
36
42
|
RestTeam,
|
|
37
43
|
RestVersion,
|
|
38
44
|
RestVersionSummary,
|
|
39
45
|
RestWork,
|
|
40
46
|
RestWorkspace,
|
|
41
47
|
} from "../schemas.js";
|
|
48
|
+
import { reportCountOf } from "../schemas.js";
|
|
42
49
|
|
|
43
50
|
// What the command prints: one line per thing in a list, a few lines for one thing in full.
|
|
44
51
|
// Plain text, for an agent to read and a person to skim; ids are given, since the commands take
|
|
@@ -159,7 +166,16 @@ export function formatAgentLine(agent: RestAgent): string {
|
|
|
159
166
|
const standing = [
|
|
160
167
|
`signs in as ${person.login}`,
|
|
161
168
|
...(manager === null ? [] : [`reports to ${calledOf(manager)}`]),
|
|
162
|
-
...(person.invited === true
|
|
169
|
+
...(person.invited === true
|
|
170
|
+
? [
|
|
171
|
+
// At a git host, whether the host said which account the login is (ADR-0126).
|
|
172
|
+
agent.firstSignIn === undefined
|
|
173
|
+
? "not signed in yet"
|
|
174
|
+
: agent.firstSignIn === "account"
|
|
175
|
+
? "not signed in yet, its account confirmed at the host"
|
|
176
|
+
: "not signed in yet, its account not confirmed",
|
|
177
|
+
]
|
|
178
|
+
: []),
|
|
163
179
|
...(person.status === "active" ? [] : ["deactivated"]),
|
|
164
180
|
].join(", ");
|
|
165
181
|
return `@${person.handle ?? person.login} ${called.join(", ")} (${standing})`;
|
|
@@ -318,7 +334,7 @@ export const calledOf = (person: Pick<RestPerson, "login" | "handle">): string =
|
|
|
318
334
|
/** The members at work on a task as a line calls them, in the order they came to it. */
|
|
319
335
|
const logins = (people: readonly RestPerson[]): string => people.map(calledOf).join(", ");
|
|
320
336
|
|
|
321
|
-
export function formatTaskLine(task:
|
|
337
|
+
export function formatTaskLine(task: RestTaskBrief): string {
|
|
322
338
|
const notes = [`owner ${calledOf(task.owner)}`];
|
|
323
339
|
if (task.workers.length > 0) {
|
|
324
340
|
notes.push(`workers ${logins(task.workers)}`);
|
|
@@ -365,13 +381,16 @@ function scheduleLines(task: RestTask): string[] {
|
|
|
365
381
|
export function formatTask(
|
|
366
382
|
task: RestTask,
|
|
367
383
|
decisions?: readonly RestDecision[],
|
|
368
|
-
runs?: readonly
|
|
384
|
+
runs?: readonly RestRunBrief[],
|
|
369
385
|
comments?: readonly RestComment[],
|
|
386
|
+
/** The address of the task's page at the console, where the command knows it: what a person is given to open. */
|
|
387
|
+
page?: string,
|
|
370
388
|
): string {
|
|
371
389
|
const lines = [
|
|
372
390
|
`#${task.number} ${task.title}`,
|
|
373
391
|
`state: ${task.state} priority: ${task.priority} owner: ${calledOf(task.owner)} workers: ${task.workers.length === 0 ? "nobody" : logins(task.workers)}`,
|
|
374
392
|
`id: ${task.id}${task.parentId === null ? "" : ` part of: ${task.parentId}`}`,
|
|
393
|
+
...(page === undefined ? [] : [pageLine(page)]),
|
|
375
394
|
...(task.agent == null ? [] : [`written through: ${task.agent}`]),
|
|
376
395
|
...scheduleLines(task),
|
|
377
396
|
];
|
|
@@ -426,8 +445,10 @@ export function formatComment(comment: RestComment): string {
|
|
|
426
445
|
return lines.join("\n");
|
|
427
446
|
}
|
|
428
447
|
|
|
429
|
-
export function formatRunLine(run:
|
|
430
|
-
|
|
448
|
+
export function formatRunLine(run: RestRunBrief): string {
|
|
449
|
+
// A run of a listing comes without its reports, counted (`?brief=true`); a run read whole,
|
|
450
|
+
// or from a console from before the brief form, with them.
|
|
451
|
+
const notes = [plural(reportCountOf(run), "report"), plural(run.artifacts.length, "artifact")];
|
|
431
452
|
if (run.waitingFor !== null) {
|
|
432
453
|
notes.push(`waiting for decision ${run.waitingFor}`);
|
|
433
454
|
}
|
|
@@ -473,45 +494,174 @@ export function formatArtifact(
|
|
|
473
494
|
return artifact.label === null ? what : `${artifact.label}: ${what}`;
|
|
474
495
|
}
|
|
475
496
|
|
|
476
|
-
/**
|
|
477
|
-
function
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
page
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
}
|
|
497
|
+
/** When a part of the rules was written and by whom, where a page says; nothing for the console's own. */
|
|
498
|
+
function rulesFacts(page: RestRules["page"]): string {
|
|
499
|
+
return page === null
|
|
500
|
+
? ""
|
|
501
|
+
: ` (v${page.version}, by ${writer(page.updatedBy, page.agent)}; ${moment(page.updatedAt)})`;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/** A part of the rules that has a text: what it is, who wrote it where someone did, and the text as it stands. */
|
|
505
|
+
const formatRulesPart = (head: string, page: RestRules["page"], body: string): string =>
|
|
506
|
+
`${head}${rulesFacts(page)}:\n\n${body.trimEnd()}`;
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* The workspace's rules as a console of before the parts answers them (ADR-0120): whole, the
|
|
510
|
+
* console's own until an administrator writes the organization's in their place, which is
|
|
511
|
+
* what holds on such a console. No command is named for writing them: this one writes what an
|
|
512
|
+
* organization adds, and refuses to on a console that would keep it as the whole.
|
|
513
|
+
*/
|
|
514
|
+
function formatRulesWhole(rules: RestRules): string {
|
|
486
515
|
const head =
|
|
487
516
|
rules.source === "reference"
|
|
488
|
-
?
|
|
489
|
-
: `Rules of ${
|
|
490
|
-
return `${head}\n\n${rules.body.trimEnd()}`;
|
|
517
|
+
? "Rules of the workspace: the console's own, until an administrator writes the organization's."
|
|
518
|
+
: `Rules of the workspace${rulesFacts(rules.page) || " (written)"}:`;
|
|
519
|
+
return `${head}\n\n${(rules.body ?? "").trimEnd()}`;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* The parts of the rules as they are printed for whoever reads them (ADR-0120): what the
|
|
524
|
+
* project adds where the command works in one and it adds something, the plugins' lines in the
|
|
525
|
+
* language they are read in, what the organization adds where it adds something, and the
|
|
526
|
+
* console's rules, which always hold.
|
|
527
|
+
*/
|
|
528
|
+
function rulesParts(rules: RestProjectRules | RestRules, language: string | null | undefined) {
|
|
529
|
+
const named = "workspace" in rules;
|
|
530
|
+
const workspace = named ? rules.workspace : rules;
|
|
531
|
+
const project = named && rules.project.source !== "none" ? rules.project : undefined;
|
|
532
|
+
const count = rules.plugins?.length ?? 0;
|
|
533
|
+
const added = workspace.added ?? null;
|
|
534
|
+
return {
|
|
535
|
+
/** Whether the command works in a project: its rules were asked for, whether it adds any or not. */
|
|
536
|
+
named,
|
|
537
|
+
workspace,
|
|
538
|
+
/** What the project adds, where it adds something. */
|
|
539
|
+
own: project !== undefined && project.body !== null ? project : undefined,
|
|
540
|
+
plugins:
|
|
541
|
+
rules.plugins === undefined || count === 0
|
|
542
|
+
? undefined
|
|
543
|
+
: formatRulesPlugins(rules.plugins, language),
|
|
544
|
+
pluginCount: count,
|
|
545
|
+
/** What the organization adds, where it adds something and the console says the parts. */
|
|
546
|
+
added: workspace.own === undefined || added === null ? undefined : added,
|
|
547
|
+
/** The console's rules by themselves; nothing from a console of before, which answers the whole. */
|
|
548
|
+
console: workspace.own,
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* The mark of the rules (ADR-0119): the first eight hex characters of a SHA-256 over what they
|
|
554
|
+
* say to whoever reads them: the workspace's text whole, which is the console's rules with
|
|
555
|
+
* what the organization adds (ADR-0120), what the project adds, and the plugins' lines, in the
|
|
556
|
+
* language they are read in. A session that was shown the rules holds their mark, and a later
|
|
557
|
+
* take of that session leaves out the rules the mark stands for; nothing but having been shown
|
|
558
|
+
* them gives it. When they were written and by whom is no part of it: the same rules have the
|
|
559
|
+
* same mark, and a project that adds nothing has the workspace's.
|
|
560
|
+
*/
|
|
561
|
+
export function rulesMark(
|
|
562
|
+
rules: RestProjectRules | RestRules,
|
|
563
|
+
language?: string | null | undefined,
|
|
564
|
+
): string {
|
|
565
|
+
const parts = rulesParts(rules, language);
|
|
566
|
+
return createHash("sha256")
|
|
567
|
+
.update(
|
|
568
|
+
JSON.stringify([
|
|
569
|
+
(parts.workspace.body ?? "").trimEnd(),
|
|
570
|
+
parts.own === undefined ? null : (parts.own.body ?? "").trimEnd(),
|
|
571
|
+
parts.plugins ?? null,
|
|
572
|
+
]),
|
|
573
|
+
)
|
|
574
|
+
.digest("hex")
|
|
575
|
+
.slice(0, 8);
|
|
491
576
|
}
|
|
492
577
|
|
|
578
|
+
/** How long a text of the rules is, as its first line says it. */
|
|
579
|
+
const charactersOf = (text: string | null): string => `${(text ?? "").trimEnd().length} characters`;
|
|
580
|
+
|
|
493
581
|
/**
|
|
494
|
-
* The rules that hold
|
|
495
|
-
*
|
|
582
|
+
* The rules that hold, under a first line that says what follows (ADR-0119): the mark, which
|
|
583
|
+
* parts there are and how long each is, and how a later take of the session leaves them out.
|
|
584
|
+
* What differs stands first and what always holds last (ADR-0120): what the project adds with
|
|
585
|
+
* the plugins' lines, then what the organization adds, then the console's rules. An agent that
|
|
586
|
+
* had read the long part once cut every later print at its head, and never saw what stood
|
|
587
|
+
* after it; and where they differ it is the earlier part that holds. Who adds nothing is said
|
|
588
|
+
* in a clause of the line, and has no part.
|
|
496
589
|
*/
|
|
497
590
|
export function formatRules(
|
|
498
591
|
rules: RestProjectRules | RestRules,
|
|
499
592
|
language?: string | null | undefined,
|
|
500
593
|
): string {
|
|
501
|
-
const parts =
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
}
|
|
512
|
-
|
|
594
|
+
const parts = rulesParts(rules, language);
|
|
595
|
+
const mark = rulesMark(rules, language);
|
|
596
|
+
// A console of before answers the workspace's rules whole: they are the last part then.
|
|
597
|
+
const whole = parts.console === undefined;
|
|
598
|
+
const last = whole
|
|
599
|
+
? `the workspace's (${charactersOf(parts.workspace.body)})`
|
|
600
|
+
: `the console's (${charactersOf(parts.console ?? null)})`;
|
|
601
|
+
const lastFollows = whole
|
|
602
|
+
? `the workspace's follow (${charactersOf(parts.workspace.body)})`
|
|
603
|
+
: `the console's follow (${charactersOf(parts.console ?? null)})`;
|
|
604
|
+
const plugins = `${parts.pluginCount} plugin${parts.pluginCount === 1 ? "" : "s"}`;
|
|
605
|
+
const HOLDS = "the earlier holding where they differ";
|
|
606
|
+
/** The organization's part and the last, after whatever stood before them. */
|
|
607
|
+
const rest = (first: boolean): string =>
|
|
608
|
+
parts.added === undefined
|
|
609
|
+
? last
|
|
610
|
+
: `the organization's${first ? " additions first" : ""} (${charactersOf(parts.added.body)}), then ${last}`;
|
|
611
|
+
let follows: string;
|
|
612
|
+
if (parts.own !== undefined) {
|
|
613
|
+
follows = `this project's additions first (${charactersOf(parts.own.body)})${parts.plugins === undefined ? "" : ` with its ${plugins}`}, then ${rest(false)}, ${HOLDS}${whole || parts.added !== undefined ? "" : "; the organization adds nothing"}.`;
|
|
614
|
+
} else {
|
|
615
|
+
const nobody = parts.added === undefined && !whole;
|
|
616
|
+
const lead = parts.named
|
|
617
|
+
? nobody
|
|
618
|
+
? "this project and the organization add nothing; "
|
|
619
|
+
: "this project adds nothing; "
|
|
620
|
+
: nobody
|
|
621
|
+
? "the organization adds nothing; "
|
|
622
|
+
: "";
|
|
623
|
+
const theirs = parts.named ? `its ${plugins}` : `the ${plugins} you may use`;
|
|
624
|
+
const body =
|
|
625
|
+
parts.plugins !== undefined
|
|
626
|
+
? `${theirs} first, then ${parts.added === undefined ? last : `the organization's additions (${charactersOf(parts.added.body)}), then ${last}, ${HOLDS}`}`
|
|
627
|
+
: parts.added === undefined
|
|
628
|
+
? parts.named || nobody
|
|
629
|
+
? lastFollows
|
|
630
|
+
: last
|
|
631
|
+
: `${rest(true)}, ${HOLDS}`;
|
|
632
|
+
follows = `${lead}${body}${parts.named ? "." : "; no project is named here, and a project's additions stand before them where it has some."}`;
|
|
633
|
+
}
|
|
634
|
+
// The mark ends the line bare, so that it is copied as it is.
|
|
635
|
+
const later = parts.named
|
|
636
|
+
? ` A later take in this session leaves them out: console take <number> --rules ${mark}`
|
|
637
|
+
: "";
|
|
638
|
+
return [
|
|
639
|
+
`Rules ${mark}: ${follows}${later}`,
|
|
640
|
+
...(parts.own === undefined
|
|
641
|
+
? []
|
|
642
|
+
: ["", formatRulesPart("What this project adds", parts.own.page, parts.own.body ?? "")]),
|
|
643
|
+
...(parts.plugins === undefined ? [] : ["", parts.plugins]),
|
|
644
|
+
...(parts.added === undefined
|
|
645
|
+
? []
|
|
646
|
+
: ["", formatRulesPart("What this organization adds", parts.added.page, parts.added.body)]),
|
|
647
|
+
"",
|
|
648
|
+
parts.console === undefined
|
|
649
|
+
? formatRulesWhole(parts.workspace)
|
|
650
|
+
: formatRulesPart("The console's rules, which always hold", null, parts.console),
|
|
651
|
+
].join("\n");
|
|
513
652
|
}
|
|
514
653
|
|
|
654
|
+
/** What a take says, before the task, where it was told the mark the rules have (ADR-0119): they are left out. */
|
|
655
|
+
export const formatRulesLeftOut = (mark: string): string =>
|
|
656
|
+
`Rules ${mark}: left out, since they stand as this session read them. console rules prints them.`;
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* What a take says, before the task, where it was told a mark the rules do not have (ADR-0119):
|
|
660
|
+
* the rules then follow the task whole, as they do without a mark.
|
|
661
|
+
*/
|
|
662
|
+
export const formatRulesChanged = (given: string): string =>
|
|
663
|
+
`The rules are not the ones marked ${given}: they changed since, or that mark is of another project's. They follow whole after the task, under the mark they have now.`;
|
|
664
|
+
|
|
515
665
|
/** How far a goal is, from its tasks: the done, the at work, and the rest, in one phrase. */
|
|
516
666
|
function progressOf(goal: RestGoal): string {
|
|
517
667
|
const counts = goal.taskCounts;
|
|
@@ -532,7 +682,7 @@ export function formatGoalLine(goal: RestGoal): string {
|
|
|
532
682
|
}
|
|
533
683
|
|
|
534
684
|
/** One goal in full; with the tasks that work towards it, when given. */
|
|
535
|
-
export function formatGoal(goal: RestGoal, tasks?: readonly
|
|
685
|
+
export function formatGoal(goal: RestGoal, tasks?: readonly RestTaskBrief[]): string {
|
|
536
686
|
const lines = [
|
|
537
687
|
`goal ${goal.id}: ${goal.title}`,
|
|
538
688
|
`state: ${goal.state} category: ${goal.category?.key ?? "none"} starts: ${goal.startsOn ?? "none"} due: ${goal.dueOn ?? "none"} set by: ${calledOf(goal.createdBy)}${through(goal.agent)}`,
|
|
@@ -607,9 +757,13 @@ const addressed = (decision: RestDecision): string =>
|
|
|
607
757
|
? ""
|
|
608
758
|
: `, for ${deciderLogins(decision)}`;
|
|
609
759
|
|
|
760
|
+
/**
|
|
761
|
+
* One decision in a line, with when it was asked: a decision that waits holds a run, and whoever
|
|
762
|
+
* is told what is on their plate is told since when each one waits.
|
|
763
|
+
*/
|
|
610
764
|
export function formatDecisionLine(decision: RestDecision): string {
|
|
611
765
|
const state = decision.answer === null ? "waiting" : `answered ${decision.answer.option}`;
|
|
612
|
-
return `${decision.id} ${state} ${decision.question} (asked by ${asker(decision)}${addressed(decision)})`;
|
|
766
|
+
return `${decision.id} ${state} ${decision.question} (asked by ${asker(decision)}${addressed(decision)}, at ${moment(decision.createdAt)})`;
|
|
613
767
|
}
|
|
614
768
|
|
|
615
769
|
/** The options, one a line; the person's own answer, when they wrote one, is the last and says so. */
|
|
@@ -630,7 +784,7 @@ export function formatAnswer(decision: RestDecision): string {
|
|
|
630
784
|
}
|
|
631
785
|
const chosen = decision.options.find((option) => option.id === answer.option);
|
|
632
786
|
const lines = [
|
|
633
|
-
`Answered: ${answer.option}) ${chosen?.label ?? answer.option}${chosen?.own === true ? ", in their own words" : ""}, by ${calledOf(answer.by)}${through(answer.agent)} at ${answer.at}`,
|
|
787
|
+
`Answered: ${answer.option}) ${chosen?.label ?? answer.option}${chosen?.own === true ? ", in their own words" : ""}, by ${calledOf(answer.by)}${through(answer.agent)} at ${moment(answer.at)}`,
|
|
634
788
|
];
|
|
635
789
|
if (answer.note !== null && answer.note.length > 0) {
|
|
636
790
|
lines.push(`Note: ${answer.note}`);
|
|
@@ -638,6 +792,13 @@ export function formatAnswer(decision: RestDecision): string {
|
|
|
638
792
|
return lines.join("\n");
|
|
639
793
|
}
|
|
640
794
|
|
|
795
|
+
/**
|
|
796
|
+
* The address of a task's or a decision's page, on a line of its own: what an agent gives a
|
|
797
|
+
* person to open, in place of the console's front page, or of a number a git host would take
|
|
798
|
+
* for an issue of its own.
|
|
799
|
+
*/
|
|
800
|
+
export const pageLine = (page: string): string => `page: ${page}`;
|
|
801
|
+
|
|
641
802
|
/**
|
|
642
803
|
* One decision in full. A decision reached at its own address (ADR-0068), outside the project the
|
|
643
804
|
* command works in, names its files with the command that reads them there, by the decision too:
|
|
@@ -645,7 +806,11 @@ export function formatAnswer(decision: RestDecision): string {
|
|
|
645
806
|
*/
|
|
646
807
|
export function formatDecision(
|
|
647
808
|
decision: RestDecision,
|
|
648
|
-
options: {
|
|
809
|
+
options: {
|
|
810
|
+
readonly atItsAddress?: boolean;
|
|
811
|
+
/** The address of the decision's page at the console, where the command knows it. */
|
|
812
|
+
readonly page?: string | undefined;
|
|
813
|
+
} = {},
|
|
649
814
|
): string {
|
|
650
815
|
const reads = (fileId: string): string =>
|
|
651
816
|
options.atItsAddress === true
|
|
@@ -653,7 +818,8 @@ export function formatDecision(
|
|
|
653
818
|
: `console file ${fileId}`;
|
|
654
819
|
const lines = [
|
|
655
820
|
`decision ${decision.id}: ${decision.question}`,
|
|
656
|
-
`asked by ${asker(decision)}${addressed(decision)}${decision.taskNumber === null ? "" : `, about task #${decision.taskNumber}`}`,
|
|
821
|
+
`asked by ${asker(decision)}${addressed(decision)}${decision.taskNumber === null ? "" : `, about task #${decision.taskNumber}`}, at ${moment(decision.createdAt)}`,
|
|
822
|
+
...(options.page === undefined ? [] : [pageLine(options.page)]),
|
|
657
823
|
];
|
|
658
824
|
if (decision.body.trim().length > 0) {
|
|
659
825
|
lines.push("", decision.body.trimEnd());
|
|
@@ -675,7 +841,7 @@ export function formatDecision(
|
|
|
675
841
|
if (decision.outcomeBy != null && decision.outcomeAt != null) {
|
|
676
842
|
lines.push(
|
|
677
843
|
indent(
|
|
678
|
-
`written by ${calledOf(decision.outcomeBy)}${through(decision.outcomeAgent)} at ${decision.outcomeAt}`,
|
|
844
|
+
`written by ${calledOf(decision.outcomeBy)}${through(decision.outcomeAgent)} at ${moment(decision.outcomeAt)}`,
|
|
679
845
|
),
|
|
680
846
|
);
|
|
681
847
|
}
|
|
@@ -916,21 +1082,40 @@ export function formatPluginHelp(detail: RestPluginDetail, name: string | undefi
|
|
|
916
1082
|
return parts.join("\n");
|
|
917
1083
|
}
|
|
918
1084
|
|
|
919
|
-
/**
|
|
1085
|
+
/** When a secret was set, from where where it was sealed from an answer, and when it expires: never what it holds. */
|
|
1086
|
+
function secretStanding(standing: {
|
|
1087
|
+
readonly setAt: string | null;
|
|
1088
|
+
readonly source?: string | null | undefined;
|
|
1089
|
+
readonly expiresAt?: string | null | undefined;
|
|
1090
|
+
}): string {
|
|
1091
|
+
return `set${standing.setAt === null ? "" : ` ${moment(standing.setAt)}`}${
|
|
1092
|
+
standing.source === null || standing.source === undefined || standing.source === "administrator"
|
|
1093
|
+
? ""
|
|
1094
|
+
: ` from ${standing.source}`
|
|
1095
|
+
}${standing.expiresAt === null || standing.expiresAt === undefined ? "" : `, expires ${moment(standing.expiresAt)}`}`;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* A setting in a line: its key and type, what it holds or whether it is set, and its name; for a
|
|
1100
|
+
* secret kept per key (ADR-0111), how many keys of how many, and a line under it for each key.
|
|
1101
|
+
*/
|
|
920
1102
|
export function formatPluginSettingLine(
|
|
921
1103
|
setting: RestPluginSetting,
|
|
922
1104
|
language: string | null | undefined,
|
|
923
1105
|
): string {
|
|
1106
|
+
const keys = setting.keys ?? null;
|
|
1107
|
+
if (setting.type === "secret" && keys !== null) {
|
|
1108
|
+
const max = setting.keyed?.max;
|
|
1109
|
+
const count = `${keys.length}${max === undefined ? "" : ` of ${max}`} ${keys.length === 1 && max === undefined ? "key" : "keys"}`;
|
|
1110
|
+
return [
|
|
1111
|
+
` ${setting.key} (secret, per key): ${count} ${localized(setting.name, language)}`,
|
|
1112
|
+
...keys.map((kept) => ` ${kept.key}: ${secretStanding(kept)}`),
|
|
1113
|
+
].join("\n");
|
|
1114
|
+
}
|
|
924
1115
|
const holds =
|
|
925
1116
|
setting.type === "secret"
|
|
926
1117
|
? setting.set
|
|
927
|
-
?
|
|
928
|
-
setting.source === null ||
|
|
929
|
-
setting.source === undefined ||
|
|
930
|
-
setting.source === "administrator"
|
|
931
|
-
? ""
|
|
932
|
-
: ` from ${setting.source}`
|
|
933
|
-
}${setting.expiresAt === null || setting.expiresAt === undefined ? "" : `, expires ${moment(setting.expiresAt)}`}`
|
|
1118
|
+
? secretStanding(setting)
|
|
934
1119
|
: "not set"
|
|
935
1120
|
: setting.set
|
|
936
1121
|
? setting.value === null
|
|
@@ -964,6 +1149,68 @@ export function formatTeamLine(team: RestTeam, loginOf: ReadonlyMap<string, stri
|
|
|
964
1149
|
return `${team.key} ${team.name} ${count}${logins.length === 0 ? "" : `: ${logins.join(", ")}`}`;
|
|
965
1150
|
}
|
|
966
1151
|
|
|
1152
|
+
/**
|
|
1153
|
+
* A job of a plugin in a line (ADR-0128): its name and how often it runs, how its last run went
|
|
1154
|
+
* and since when it has failed where it keeps failing, and when it runs next.
|
|
1155
|
+
*/
|
|
1156
|
+
export function formatPluginJobLine(job: RestPluginJob): string {
|
|
1157
|
+
const schedule = `every ${job.every}${job.at === null ? "" : ` at ${job.at}`}`;
|
|
1158
|
+
const last =
|
|
1159
|
+
job.lastRunAt === null || job.lastOutcome === null
|
|
1160
|
+
? "has not run yet"
|
|
1161
|
+
: `last run ${moment(job.lastRunAt)}: ${job.lastOutcome}${
|
|
1162
|
+
job.lastOutcome === "failed" && job.failedSince !== null
|
|
1163
|
+
? `, failing since ${moment(job.failedSince)}`
|
|
1164
|
+
: ""
|
|
1165
|
+
}`;
|
|
1166
|
+
return ` ${job.name} ${schedule} ${last} next: ${job.nextAt === null ? "not scheduled" : moment(job.nextAt)}`;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
/** What an event of a plugin says, after its kind: what failed, which command and how it ended, else what it carries. */
|
|
1170
|
+
function pluginEventSays(event: RestEvent): string {
|
|
1171
|
+
const data = event.data;
|
|
1172
|
+
if (event.kind === "plugin.failed") {
|
|
1173
|
+
return data.problem ?? "";
|
|
1174
|
+
}
|
|
1175
|
+
if (event.kind === "plugin.command") {
|
|
1176
|
+
return `${data.command ?? "?"} ${data.outcome ?? "?"}${data.code === undefined ? "" : ` (${data.code})`}${
|
|
1177
|
+
data.durationMs === undefined ? "" : `, ${data.durationMs} ms`
|
|
1178
|
+
}`;
|
|
1179
|
+
}
|
|
1180
|
+
const carried = JSON.stringify(data);
|
|
1181
|
+
return carried === "{}" ? "" : carried.length > 300 ? `${carried.slice(0, 300)}...` : carried;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
/** One event of a plugin in a line: its number, when, its kind, who did it and through what, and what it says. */
|
|
1185
|
+
export function formatPluginEventLine(event: RestEvent): string {
|
|
1186
|
+
const who =
|
|
1187
|
+
event.actor === null
|
|
1188
|
+
? "the console"
|
|
1189
|
+
: `${calledOf(event.actor)}${event.agent === null ? "" : ` as ${event.agent}`}`;
|
|
1190
|
+
const says = pluginEventSays(event);
|
|
1191
|
+
return `#${event.id} ${moment(event.createdAt)} ${event.kind} ${who}${says === "" ? "" : ` ${says}`}`;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
/**
|
|
1195
|
+
* A page of a plugin's events, newest first (ADR-0128), of one kind where one was asked for:
|
|
1196
|
+
* what `console plugin <key> events` prints, with how to read on. The console answers what the
|
|
1197
|
+
* caller may read and says nothing of the rest, so an empty page is said as that, and never as
|
|
1198
|
+
* a plugin that has no events.
|
|
1199
|
+
*/
|
|
1200
|
+
export function formatPluginEvents(
|
|
1201
|
+
key: string,
|
|
1202
|
+
page: RestEvents,
|
|
1203
|
+
asked: { readonly kind: string | undefined; readonly limit: number; readonly offset: number },
|
|
1204
|
+
): string {
|
|
1205
|
+
if (page.items.length === 0) {
|
|
1206
|
+
const none = `No ${asked.kind === undefined ? "" : `${asked.kind} `}event of ${key} that you may read${
|
|
1207
|
+
asked.offset > 0 ? ", that far back" : ""
|
|
1208
|
+
}.`;
|
|
1209
|
+
return `${none}${formatMore(page.more, asked.limit, asked.offset)}`;
|
|
1210
|
+
}
|
|
1211
|
+
return `${page.items.map(formatPluginEventLine).join("\n")}${formatMore(page.more, asked.limit, asked.offset)}`;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
967
1214
|
/** One plugin in full: what it is, how it stands, what one may run, its skills and its settings. */
|
|
968
1215
|
export function formatPlugin(
|
|
969
1216
|
detail: RestPluginDetail,
|
|
@@ -1014,6 +1261,14 @@ export function formatPlugin(
|
|
|
1014
1261
|
`Skills: console plugin ${detail.key} skills lists them; console plugin ${detail.key} skill <path> reads one. Read the one that fits before the first command.`,
|
|
1015
1262
|
);
|
|
1016
1263
|
}
|
|
1264
|
+
// A console before 0.5.1 names no jobs: nothing is printed of them then, not an empty block.
|
|
1265
|
+
if (detail.jobs !== undefined && detail.jobs.length > 0) {
|
|
1266
|
+
lines.push(
|
|
1267
|
+
"",
|
|
1268
|
+
`Jobs (what went wrong in one: console plugin ${detail.key} events --kind plugin.failed):`,
|
|
1269
|
+
...detail.jobs.map(formatPluginJobLine),
|
|
1270
|
+
);
|
|
1271
|
+
}
|
|
1017
1272
|
if (detail.settings.length > 0) {
|
|
1018
1273
|
lines.push(
|
|
1019
1274
|
"",
|