@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/client.ts
CHANGED
|
@@ -102,6 +102,7 @@ import {
|
|
|
102
102
|
type RestRules,
|
|
103
103
|
type RestRulesInput,
|
|
104
104
|
type RestRun,
|
|
105
|
+
type RestRunBriefs,
|
|
105
106
|
type RestRunEndInput,
|
|
106
107
|
type RestRunInput,
|
|
107
108
|
type RestRunnerHeartbeat,
|
|
@@ -120,6 +121,7 @@ import {
|
|
|
120
121
|
type RestSkillRows,
|
|
121
122
|
type RestSkills,
|
|
122
123
|
type RestTask,
|
|
124
|
+
type RestTaskBriefs,
|
|
123
125
|
type RestTaskInput,
|
|
124
126
|
type RestTaskPatch,
|
|
125
127
|
type RestTasks,
|
|
@@ -200,6 +202,7 @@ import {
|
|
|
200
202
|
restProjectsSchema,
|
|
201
203
|
restReachedDecisionSchema,
|
|
202
204
|
restRulesSchema,
|
|
205
|
+
restRunBriefsSchema,
|
|
203
206
|
restRunnerHeartbeatSchema,
|
|
204
207
|
restRunSchema,
|
|
205
208
|
restRunsSchema,
|
|
@@ -213,6 +216,7 @@ import {
|
|
|
213
216
|
restSkillLoadSchema,
|
|
214
217
|
restSkillRowsSchema,
|
|
215
218
|
restSkillsSchema,
|
|
219
|
+
restTaskBriefsSchema,
|
|
216
220
|
restTaskSchema,
|
|
217
221
|
restTasksSchema,
|
|
218
222
|
restTeamSchema,
|
|
@@ -363,6 +367,16 @@ export interface DocumentFilter {
|
|
|
363
367
|
readonly archived?: boolean | undefined;
|
|
364
368
|
}
|
|
365
369
|
|
|
370
|
+
/**
|
|
371
|
+
* The reads of a pack: the listing, one skill, a file, a folder, what words find, and the tables
|
|
372
|
+
* and the code blocks as data. A project's client has them for the project's pack, a plugin's
|
|
373
|
+
* for its own, and the console's client for the organization's (`organizationPack()`).
|
|
374
|
+
*/
|
|
375
|
+
export type PackClient = Pick<
|
|
376
|
+
ProjectClient,
|
|
377
|
+
"skills" | "skill" | "skillFile" | "skillBrowse" | "skillFind" | "skillRows" | "skillCode"
|
|
378
|
+
>;
|
|
379
|
+
|
|
366
380
|
/** The board of one project, as the asker may see and change it. */
|
|
367
381
|
export interface ProjectClient {
|
|
368
382
|
/** The key the project is reached by. */
|
|
@@ -389,6 +403,12 @@ export interface ProjectClient {
|
|
|
389
403
|
updateMember(personId: string, patch: RestMemberPatch): Promise<RestMember>;
|
|
390
404
|
removeMember(personId: string): Promise<void>;
|
|
391
405
|
tasks(filter?: TaskFilter, signal?: AbortSignal): Promise<RestTasks>;
|
|
406
|
+
/**
|
|
407
|
+
* The same page of the board without the tasks' bodies (`?brief=true`), for what lists tasks
|
|
408
|
+
* and shows no body. A console from before the brief form answers the tasks whole, and they
|
|
409
|
+
* read the same.
|
|
410
|
+
*/
|
|
411
|
+
taskBriefs(filter?: TaskFilter, signal?: AbortSignal): Promise<RestTaskBriefs>;
|
|
392
412
|
/** One task, by its id or by its number. */
|
|
393
413
|
task(ref: string, signal?: AbortSignal): Promise<RestTask>;
|
|
394
414
|
createTask(input: RestTaskInput): Promise<RestTask>;
|
|
@@ -421,6 +441,15 @@ export interface ProjectClient {
|
|
|
421
441
|
filter?: { readonly task?: string; readonly open?: boolean; readonly mine?: boolean } & Page,
|
|
422
442
|
signal?: AbortSignal,
|
|
423
443
|
): Promise<RestRuns>;
|
|
444
|
+
/**
|
|
445
|
+
* The same page of the runs without their reports, counted (`?brief=true`), for what lists
|
|
446
|
+
* runs and shows no report. A console from before the brief form answers the runs whole,
|
|
447
|
+
* which reads the same: `reportCountOf` says how many reports a run has either way.
|
|
448
|
+
*/
|
|
449
|
+
runBriefs(
|
|
450
|
+
filter?: { readonly task?: string; readonly open?: boolean; readonly mine?: boolean } & Page,
|
|
451
|
+
signal?: AbortSignal,
|
|
452
|
+
): Promise<RestRunBriefs>;
|
|
424
453
|
run(id: string, signal?: AbortSignal): Promise<RestRun>;
|
|
425
454
|
/** Takes a task: a run begins, for the person the asker is or acts for. */
|
|
426
455
|
startRun(input: RestRunInput): Promise<RestRun>;
|
|
@@ -667,8 +696,17 @@ export interface PluginClient {
|
|
|
667
696
|
},
|
|
668
697
|
signal?: AbortSignal,
|
|
669
698
|
): Promise<RestSkillCode>;
|
|
670
|
-
/**
|
|
671
|
-
|
|
699
|
+
/**
|
|
700
|
+
* The plugin's events the asker may read, newest first, a page at a time: every one for an
|
|
701
|
+
* administrator; for anyone else those of the projects they may see, their own doing, and the
|
|
702
|
+
* console's word of the plugin, the rest left out with no word that it is there. Of one kind
|
|
703
|
+
* where one is named (ADR-0128), which a console before 0.5.1 does not narrow by and answers
|
|
704
|
+
* every kind.
|
|
705
|
+
*/
|
|
706
|
+
events(
|
|
707
|
+
page?: Page & { readonly kind?: string | undefined },
|
|
708
|
+
signal?: AbortSignal,
|
|
709
|
+
): Promise<RestEvents>;
|
|
672
710
|
/** Enables the plugin, with consent to every capability it asks; for an administrator. */
|
|
673
711
|
enable(input: RestPluginEnableInput): Promise<RestPluginDetail>;
|
|
674
712
|
disable(): Promise<RestPluginDetail>;
|
|
@@ -676,9 +714,12 @@ export interface PluginClient {
|
|
|
676
714
|
updateSettings(patch: RestPluginSettingsPatch): Promise<RestPluginDetail>;
|
|
677
715
|
/** Says what an enabled plugin holds: those it requires, named again, and the optional ones to turn on. */
|
|
678
716
|
updateConsent(consent: readonly string[]): Promise<RestPluginDetail>;
|
|
679
|
-
/**
|
|
680
|
-
|
|
681
|
-
|
|
717
|
+
/**
|
|
718
|
+
* Seals a secret for the plugin; it is answered by nothing from then on. A keyed secret
|
|
719
|
+
* (ADR-0111) is set and removed under a key, one value at a time.
|
|
720
|
+
*/
|
|
721
|
+
setSecret(name: string, value: string, key?: string): Promise<void>;
|
|
722
|
+
removeSecret(name: string, key?: string): Promise<void>;
|
|
682
723
|
grants(signal?: AbortSignal): Promise<RestPluginGrants>;
|
|
683
724
|
grant(input: RestPluginGrantInput): Promise<RestPluginGrant>;
|
|
684
725
|
revoke(grantId: string): Promise<RestPluginGrant>;
|
|
@@ -704,6 +745,12 @@ export interface ConsoleClient {
|
|
|
704
745
|
workspacePackTokenConnection(signal?: AbortSignal): Promise<RestWorkspacePackConnect>;
|
|
705
746
|
claimWorkspacePackTokenConnection(signal?: AbortSignal): Promise<RestWorkspacePackConnect>;
|
|
706
747
|
cancelWorkspacePackTokenConnection(): Promise<void>;
|
|
748
|
+
/**
|
|
749
|
+
* The organization's pack, read where no project is named (ADR-0113): the workspace's skills
|
|
750
|
+
* address, with the workspace's SkillCDN token where the pack is private; for every member
|
|
751
|
+
* of the workspace, as the workspace's rules are.
|
|
752
|
+
*/
|
|
753
|
+
organizationPack(): PackClient;
|
|
707
754
|
/** The people the asker may see: everyone, or those they share a project with (ADR-0035). */
|
|
708
755
|
people(signal?: AbortSignal): Promise<RestPeople>;
|
|
709
756
|
/**
|
|
@@ -862,11 +909,11 @@ export interface ConsoleClient {
|
|
|
862
909
|
pictureUrl(url: string): string;
|
|
863
910
|
/** The categories tasks are sorted into (ADR-0019), by name. */
|
|
864
911
|
categories(signal?: AbortSignal): Promise<RestCategories>;
|
|
865
|
-
/** The workspace's rules (ADR-
|
|
912
|
+
/** The workspace's rules (ADR-0120): the console's, which always hold, and what the organization adds to them. */
|
|
866
913
|
rules(signal?: AbortSignal): Promise<RestRules>;
|
|
867
|
-
/** Writes the organization's rules; for an administrator.
|
|
914
|
+
/** Writes what the organization adds to the console's rules; for an administrator. */
|
|
868
915
|
writeRules(input: RestRulesInput): Promise<RestRules>;
|
|
869
|
-
/** Puts the organization
|
|
916
|
+
/** Puts what the organization adds away, so that the console's rules stand alone; for an administrator. */
|
|
870
917
|
archiveRules(): Promise<RestRules>;
|
|
871
918
|
/** The versions of the organization's rules, newest first; none while the console's own hold. */
|
|
872
919
|
rulesVersions(signal?: AbortSignal): Promise<RestVersions>;
|
|
@@ -1052,6 +1099,30 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
|
|
|
1052
1099
|
value === undefined ? undefined : String(value);
|
|
1053
1100
|
const number = (value: number | undefined): string | undefined =>
|
|
1054
1101
|
value === undefined ? undefined : String(value);
|
|
1102
|
+
/** What narrows a page of the board, as the query of its address. */
|
|
1103
|
+
const tasksQuery = (filter: TaskFilter): Record<string, string | undefined> => ({
|
|
1104
|
+
state: filter.state,
|
|
1105
|
+
archived: flag(filter.archived),
|
|
1106
|
+
open: flag(filter.open),
|
|
1107
|
+
category: filter.category,
|
|
1108
|
+
goal: filter.goal,
|
|
1109
|
+
worker: filter.worker,
|
|
1110
|
+
unassigned: flag(filter.unassigned),
|
|
1111
|
+
dueBy: filter.dueBy,
|
|
1112
|
+
q: filter.q,
|
|
1113
|
+
limit: number(filter.limit),
|
|
1114
|
+
offset: number(filter.offset),
|
|
1115
|
+
});
|
|
1116
|
+
/** What narrows a page of the runs, as the query of its address. */
|
|
1117
|
+
const runsQuery = (
|
|
1118
|
+
filter: { readonly task?: string; readonly open?: boolean; readonly mine?: boolean } & Page,
|
|
1119
|
+
): Record<string, string | undefined> => ({
|
|
1120
|
+
task: filter.task,
|
|
1121
|
+
open: flag(filter.open),
|
|
1122
|
+
mine: flag(filter.mine),
|
|
1123
|
+
limit: number(filter.limit),
|
|
1124
|
+
offset: number(filter.offset),
|
|
1125
|
+
});
|
|
1055
1126
|
|
|
1056
1127
|
/** A file as the parts of a form: the bytes with their name and type, and the label. */
|
|
1057
1128
|
const formOf = (input: FileUpload): FormData => {
|
|
@@ -1098,6 +1169,85 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
|
|
|
1098
1169
|
return form;
|
|
1099
1170
|
};
|
|
1100
1171
|
|
|
1172
|
+
/**
|
|
1173
|
+
* The reads of a pack under `root`: a project's, a plugin's own, and the organization's where
|
|
1174
|
+
* no project is named (ADR-0113) are read by the same seven routes, each under its own root.
|
|
1175
|
+
*/
|
|
1176
|
+
const packAt = (root: string): PackClient => ({
|
|
1177
|
+
skills: (signal) => request("GET", `${base}${root}`, undefined, restSkillsSchema, signal),
|
|
1178
|
+
skill: (path, cursor, signal) =>
|
|
1179
|
+
request(
|
|
1180
|
+
"GET",
|
|
1181
|
+
withQuery(`${root}/one`, { path, cursor }),
|
|
1182
|
+
undefined,
|
|
1183
|
+
restSkillLoadSchema,
|
|
1184
|
+
signal,
|
|
1185
|
+
),
|
|
1186
|
+
skillFile: (path, page = {}, signal) =>
|
|
1187
|
+
request(
|
|
1188
|
+
"GET",
|
|
1189
|
+
withQuery(`${root}/file`, {
|
|
1190
|
+
path,
|
|
1191
|
+
offset: number(page.offset),
|
|
1192
|
+
limit: number(page.limit),
|
|
1193
|
+
}),
|
|
1194
|
+
undefined,
|
|
1195
|
+
restSkillFileSchema,
|
|
1196
|
+
signal,
|
|
1197
|
+
),
|
|
1198
|
+
skillBrowse: (page = {}, signal) =>
|
|
1199
|
+
request(
|
|
1200
|
+
"GET",
|
|
1201
|
+
withQuery(`${root}/browse`, {
|
|
1202
|
+
path: page.path,
|
|
1203
|
+
cursor: page.cursor,
|
|
1204
|
+
limit: number(page.limit),
|
|
1205
|
+
}),
|
|
1206
|
+
undefined,
|
|
1207
|
+
restSkillBrowseSchema,
|
|
1208
|
+
signal,
|
|
1209
|
+
),
|
|
1210
|
+
skillFind: (query, options = {}, signal) =>
|
|
1211
|
+
request(
|
|
1212
|
+
"GET",
|
|
1213
|
+
withQuery(`${root}/find`, {
|
|
1214
|
+
query,
|
|
1215
|
+
path: options.path,
|
|
1216
|
+
cursor: options.cursor,
|
|
1217
|
+
limit: number(options.limit),
|
|
1218
|
+
}),
|
|
1219
|
+
undefined,
|
|
1220
|
+
restSkillFindSchema,
|
|
1221
|
+
signal,
|
|
1222
|
+
),
|
|
1223
|
+
skillRows: (page = {}, signal) =>
|
|
1224
|
+
request(
|
|
1225
|
+
"GET",
|
|
1226
|
+
withQuery(`${root}/rows`, {
|
|
1227
|
+
path: page.path,
|
|
1228
|
+
heading: page.heading,
|
|
1229
|
+
cursor: page.cursor,
|
|
1230
|
+
limit: number(page.limit),
|
|
1231
|
+
}),
|
|
1232
|
+
undefined,
|
|
1233
|
+
restSkillRowsSchema,
|
|
1234
|
+
signal,
|
|
1235
|
+
),
|
|
1236
|
+
skillCode: (page = {}, signal) =>
|
|
1237
|
+
request(
|
|
1238
|
+
"GET",
|
|
1239
|
+
withQuery(`${root}/code`, {
|
|
1240
|
+
path: page.path,
|
|
1241
|
+
heading: page.heading,
|
|
1242
|
+
cursor: page.cursor,
|
|
1243
|
+
limit: number(page.limit),
|
|
1244
|
+
}),
|
|
1245
|
+
undefined,
|
|
1246
|
+
restSkillCodeSchema,
|
|
1247
|
+
signal,
|
|
1248
|
+
),
|
|
1249
|
+
});
|
|
1250
|
+
|
|
1101
1251
|
const projectClient = (key: string): ProjectClient => {
|
|
1102
1252
|
const at = (collection?: Parameters<typeof projectPath>[1], id?: string) =>
|
|
1103
1253
|
projectPath(key, collection, id);
|
|
@@ -1119,23 +1269,19 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
|
|
|
1119
1269
|
tasks: (filter = {}, signal) =>
|
|
1120
1270
|
request(
|
|
1121
1271
|
"GET",
|
|
1122
|
-
withQuery(at("tasks"),
|
|
1123
|
-
state: filter.state,
|
|
1124
|
-
archived: flag(filter.archived),
|
|
1125
|
-
open: flag(filter.open),
|
|
1126
|
-
category: filter.category,
|
|
1127
|
-
goal: filter.goal,
|
|
1128
|
-
worker: filter.worker,
|
|
1129
|
-
unassigned: flag(filter.unassigned),
|
|
1130
|
-
dueBy: filter.dueBy,
|
|
1131
|
-
q: filter.q,
|
|
1132
|
-
limit: number(filter.limit),
|
|
1133
|
-
offset: number(filter.offset),
|
|
1134
|
-
}),
|
|
1272
|
+
withQuery(at("tasks"), tasksQuery(filter)),
|
|
1135
1273
|
undefined,
|
|
1136
1274
|
restTasksSchema,
|
|
1137
1275
|
signal,
|
|
1138
1276
|
),
|
|
1277
|
+
taskBriefs: (filter = {}, signal) =>
|
|
1278
|
+
request(
|
|
1279
|
+
"GET",
|
|
1280
|
+
withQuery(at("tasks"), { ...tasksQuery(filter), brief: "true" }),
|
|
1281
|
+
undefined,
|
|
1282
|
+
restTaskBriefsSchema,
|
|
1283
|
+
signal,
|
|
1284
|
+
),
|
|
1139
1285
|
task: (ref, signal) =>
|
|
1140
1286
|
request("GET", `${base}${at("tasks", ref)}`, undefined, restTaskSchema, signal),
|
|
1141
1287
|
createTask: (input) => request("POST", `${base}${at("tasks")}`, input, restTaskSchema),
|
|
@@ -1189,17 +1335,13 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
|
|
|
1189
1335
|
restDecisionSchema,
|
|
1190
1336
|
),
|
|
1191
1337
|
runs: (filter = {}, signal) =>
|
|
1338
|
+
request("GET", withQuery(at("runs"), runsQuery(filter)), undefined, restRunsSchema, signal),
|
|
1339
|
+
runBriefs: (filter = {}, signal) =>
|
|
1192
1340
|
request(
|
|
1193
1341
|
"GET",
|
|
1194
|
-
withQuery(at("runs"), {
|
|
1195
|
-
task: filter.task,
|
|
1196
|
-
open: flag(filter.open),
|
|
1197
|
-
mine: flag(filter.mine),
|
|
1198
|
-
limit: number(filter.limit),
|
|
1199
|
-
offset: number(filter.offset),
|
|
1200
|
-
}),
|
|
1342
|
+
withQuery(at("runs"), { ...runsQuery(filter), brief: "true" }),
|
|
1201
1343
|
undefined,
|
|
1202
|
-
|
|
1344
|
+
restRunBriefsSchema,
|
|
1203
1345
|
signal,
|
|
1204
1346
|
),
|
|
1205
1347
|
run: (id, signal) =>
|
|
@@ -1246,79 +1388,7 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
|
|
|
1246
1388
|
signal,
|
|
1247
1389
|
),
|
|
1248
1390
|
eventStreamUrl: (after) => withQuery(`${at("events")}/stream`, { after: String(after) }),
|
|
1249
|
-
skills
|
|
1250
|
-
request("GET", `${base}${at("skills")}`, undefined, restSkillsSchema, signal),
|
|
1251
|
-
skill: (path, cursor, signal) =>
|
|
1252
|
-
request(
|
|
1253
|
-
"GET",
|
|
1254
|
-
withQuery(`${at("skills")}/one`, { path, cursor }),
|
|
1255
|
-
undefined,
|
|
1256
|
-
restSkillLoadSchema,
|
|
1257
|
-
signal,
|
|
1258
|
-
),
|
|
1259
|
-
skillFile: (path, page = {}, signal) =>
|
|
1260
|
-
request(
|
|
1261
|
-
"GET",
|
|
1262
|
-
withQuery(`${at("skills")}/file`, {
|
|
1263
|
-
path,
|
|
1264
|
-
offset: page.offset === undefined ? undefined : String(page.offset),
|
|
1265
|
-
limit: page.limit === undefined ? undefined : String(page.limit),
|
|
1266
|
-
}),
|
|
1267
|
-
undefined,
|
|
1268
|
-
restSkillFileSchema,
|
|
1269
|
-
signal,
|
|
1270
|
-
),
|
|
1271
|
-
skillBrowse: (page = {}, signal) =>
|
|
1272
|
-
request(
|
|
1273
|
-
"GET",
|
|
1274
|
-
withQuery(`${at("skills")}/browse`, {
|
|
1275
|
-
path: page.path,
|
|
1276
|
-
cursor: page.cursor,
|
|
1277
|
-
limit: page.limit === undefined ? undefined : String(page.limit),
|
|
1278
|
-
}),
|
|
1279
|
-
undefined,
|
|
1280
|
-
restSkillBrowseSchema,
|
|
1281
|
-
signal,
|
|
1282
|
-
),
|
|
1283
|
-
skillFind: (query, options = {}, signal) =>
|
|
1284
|
-
request(
|
|
1285
|
-
"GET",
|
|
1286
|
-
withQuery(`${at("skills")}/find`, {
|
|
1287
|
-
query,
|
|
1288
|
-
path: options.path,
|
|
1289
|
-
cursor: options.cursor,
|
|
1290
|
-
limit: options.limit === undefined ? undefined : String(options.limit),
|
|
1291
|
-
}),
|
|
1292
|
-
undefined,
|
|
1293
|
-
restSkillFindSchema,
|
|
1294
|
-
signal,
|
|
1295
|
-
),
|
|
1296
|
-
skillRows: (page = {}, signal) =>
|
|
1297
|
-
request(
|
|
1298
|
-
"GET",
|
|
1299
|
-
withQuery(`${at("skills")}/rows`, {
|
|
1300
|
-
path: page.path,
|
|
1301
|
-
heading: page.heading,
|
|
1302
|
-
cursor: page.cursor,
|
|
1303
|
-
limit: page.limit === undefined ? undefined : String(page.limit),
|
|
1304
|
-
}),
|
|
1305
|
-
undefined,
|
|
1306
|
-
restSkillRowsSchema,
|
|
1307
|
-
signal,
|
|
1308
|
-
),
|
|
1309
|
-
skillCode: (page = {}, signal) =>
|
|
1310
|
-
request(
|
|
1311
|
-
"GET",
|
|
1312
|
-
withQuery(`${at("skills")}/code`, {
|
|
1313
|
-
path: page.path,
|
|
1314
|
-
heading: page.heading,
|
|
1315
|
-
cursor: page.cursor,
|
|
1316
|
-
limit: page.limit === undefined ? undefined : String(page.limit),
|
|
1317
|
-
}),
|
|
1318
|
-
undefined,
|
|
1319
|
-
restSkillCodeSchema,
|
|
1320
|
-
signal,
|
|
1321
|
-
),
|
|
1391
|
+
...packAt(at("skills")),
|
|
1322
1392
|
setPackToken: (input) =>
|
|
1323
1393
|
request("PUT", `${base}${at()}/pack-token`, input, restProjectSchema),
|
|
1324
1394
|
removePackToken: () =>
|
|
@@ -1418,8 +1488,6 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
|
|
|
1418
1488
|
|
|
1419
1489
|
const pluginClient = (key: string): PluginClient => {
|
|
1420
1490
|
const at = (...parts: readonly string[]) => pluginPath(key, ...parts);
|
|
1421
|
-
const skillsQuery = (part: string, params: Record<string, string | undefined>): string =>
|
|
1422
|
-
withQuery(at("skills", part), params);
|
|
1423
1491
|
const queryUrl = (
|
|
1424
1492
|
name: string,
|
|
1425
1493
|
args: Readonly<Record<string, unknown>>,
|
|
@@ -1489,80 +1557,16 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
|
|
|
1489
1557
|
signal,
|
|
1490
1558
|
),
|
|
1491
1559
|
purge: (confirm) => request("POST", `${base}${at("purge")}`, { confirm }, undefined),
|
|
1492
|
-
skills
|
|
1493
|
-
|
|
1494
|
-
skill: (path, cursor, signal) =>
|
|
1495
|
-
request(
|
|
1496
|
-
"GET",
|
|
1497
|
-
skillsQuery("one", { path, cursor }),
|
|
1498
|
-
undefined,
|
|
1499
|
-
restSkillLoadSchema,
|
|
1500
|
-
signal,
|
|
1501
|
-
),
|
|
1502
|
-
skillFile: (path, page = {}, signal) =>
|
|
1503
|
-
request(
|
|
1504
|
-
"GET",
|
|
1505
|
-
skillsQuery("file", { path, offset: number(page.offset), limit: number(page.limit) }),
|
|
1506
|
-
undefined,
|
|
1507
|
-
restSkillFileSchema,
|
|
1508
|
-
signal,
|
|
1509
|
-
),
|
|
1510
|
-
skillBrowse: (page = {}, signal) =>
|
|
1511
|
-
request(
|
|
1512
|
-
"GET",
|
|
1513
|
-
skillsQuery("browse", {
|
|
1514
|
-
path: page.path,
|
|
1515
|
-
cursor: page.cursor,
|
|
1516
|
-
limit: number(page.limit),
|
|
1517
|
-
}),
|
|
1518
|
-
undefined,
|
|
1519
|
-
restSkillBrowseSchema,
|
|
1520
|
-
signal,
|
|
1521
|
-
),
|
|
1522
|
-
skillFind: (query, options = {}, signal) =>
|
|
1523
|
-
request(
|
|
1524
|
-
"GET",
|
|
1525
|
-
skillsQuery("find", {
|
|
1526
|
-
query,
|
|
1527
|
-
path: options.path,
|
|
1528
|
-
cursor: options.cursor,
|
|
1529
|
-
limit: number(options.limit),
|
|
1530
|
-
}),
|
|
1531
|
-
undefined,
|
|
1532
|
-
restSkillFindSchema,
|
|
1533
|
-
signal,
|
|
1534
|
-
),
|
|
1535
|
-
skillRows: (page = {}, signal) =>
|
|
1536
|
-
request(
|
|
1537
|
-
"GET",
|
|
1538
|
-
skillsQuery("rows", {
|
|
1539
|
-
path: page.path,
|
|
1540
|
-
heading: page.heading,
|
|
1541
|
-
cursor: page.cursor,
|
|
1542
|
-
limit: number(page.limit),
|
|
1543
|
-
}),
|
|
1544
|
-
undefined,
|
|
1545
|
-
restSkillRowsSchema,
|
|
1546
|
-
signal,
|
|
1547
|
-
),
|
|
1548
|
-
skillCode: (page = {}, signal) =>
|
|
1560
|
+
...packAt(at("skills")),
|
|
1561
|
+
events: (page = {}, signal) =>
|
|
1549
1562
|
request(
|
|
1550
1563
|
"GET",
|
|
1551
|
-
|
|
1552
|
-
path: page.path,
|
|
1553
|
-
heading: page.heading,
|
|
1554
|
-
cursor: page.cursor,
|
|
1564
|
+
withQuery(at("events"), {
|
|
1555
1565
|
limit: number(page.limit),
|
|
1566
|
+
offset: number(page.offset),
|
|
1567
|
+
kind: page.kind,
|
|
1556
1568
|
}),
|
|
1557
1569
|
undefined,
|
|
1558
|
-
restSkillCodeSchema,
|
|
1559
|
-
signal,
|
|
1560
|
-
),
|
|
1561
|
-
events: (page = {}, signal) =>
|
|
1562
|
-
request(
|
|
1563
|
-
"GET",
|
|
1564
|
-
withQuery(at("events"), { limit: number(page.limit), offset: number(page.offset) }),
|
|
1565
|
-
undefined,
|
|
1566
1570
|
restEventsSchema,
|
|
1567
1571
|
signal,
|
|
1568
1572
|
),
|
|
@@ -1572,10 +1576,20 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
|
|
|
1572
1576
|
request("PATCH", `${base}${at("settings")}`, patch, restPluginDetailSchema),
|
|
1573
1577
|
updateConsent: (consent) =>
|
|
1574
1578
|
request("PATCH", `${base}${at("consent")}`, { consent }, restPluginDetailSchema),
|
|
1575
|
-
setSecret: (name, value) =>
|
|
1576
|
-
request(
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
+
setSecret: (name, value, under) =>
|
|
1580
|
+
request(
|
|
1581
|
+
"PUT",
|
|
1582
|
+
`${base}${under === undefined ? at("secrets", name) : at("secrets", name, "keys", under)}`,
|
|
1583
|
+
{ value },
|
|
1584
|
+
undefined,
|
|
1585
|
+
),
|
|
1586
|
+
removeSecret: (name, under) =>
|
|
1587
|
+
request(
|
|
1588
|
+
"DELETE",
|
|
1589
|
+
`${base}${under === undefined ? at("secrets", name) : at("secrets", name, "keys", under)}`,
|
|
1590
|
+
undefined,
|
|
1591
|
+
undefined,
|
|
1592
|
+
),
|
|
1579
1593
|
grants: (signal) =>
|
|
1580
1594
|
request("GET", `${base}${at("grants")}`, undefined, restPluginGrantsSchema, signal),
|
|
1581
1595
|
grant: (input) => request("POST", `${base}${at("grants")}`, input, restPluginGrantSchema),
|
|
@@ -1599,6 +1613,7 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
|
|
|
1599
1613
|
);
|
|
1600
1614
|
return found.items[0];
|
|
1601
1615
|
},
|
|
1616
|
+
organizationPack: () => packAt(REST_ROUTES.workspaceSkills),
|
|
1602
1617
|
updateWorkspace: (patch) =>
|
|
1603
1618
|
request("PATCH", `${base}${REST_ROUTES.workspace}`, patch, restWorkspaceSchema),
|
|
1604
1619
|
setWorkspacePackToken: (input) =>
|