@skillcdn/console 0.1.18 → 0.1.20
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 +2 -2
- package/SKILLCDN.md +1 -1
- package/dist/api.d.ts +1 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +1 -1
- package/dist/api.js.map +1 -1
- package/dist/cli/cli.d.ts +1 -1
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +353 -39
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/credentials.d.ts +102 -3
- package/dist/cli/credentials.d.ts.map +1 -1
- package/dist/cli/credentials.js +177 -8
- package/dist/cli/credentials.js.map +1 -1
- package/dist/cli/directory.d.ts +6 -0
- package/dist/cli/directory.d.ts.map +1 -1
- package/dist/cli/directory.js +37 -6
- package/dist/cli/directory.js.map +1 -1
- package/dist/cli/format.d.ts +10 -1
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +106 -2
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +44 -22
- package/dist/cli/help.js.map +1 -1
- package/dist/client.d.ts +21 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +14 -1
- package/dist/client.js.map +1 -1
- package/dist/components/board.d.ts +23 -5
- package/dist/components/board.d.ts.map +1 -1
- package/dist/components/board.js +239 -9
- package/dist/components/board.js.map +1 -1
- package/dist/components/comments.d.ts +0 -2
- package/dist/components/comments.d.ts.map +1 -1
- package/dist/components/comments.js +14 -41
- package/dist/components/comments.js.map +1 -1
- package/dist/components/documents.d.ts +2 -0
- package/dist/components/documents.d.ts.map +1 -1
- package/dist/components/documents.js +51 -5
- package/dist/components/documents.js.map +1 -1
- package/dist/components/event-feed.d.ts.map +1 -1
- package/dist/components/event-feed.js +4 -0
- package/dist/components/event-feed.js.map +1 -1
- package/dist/components/files.d.ts +11 -0
- package/dist/components/files.d.ts.map +1 -0
- package/dist/components/files.js +44 -0
- package/dist/components/files.js.map +1 -0
- package/dist/components/goals.d.ts +17 -1
- package/dist/components/goals.d.ts.map +1 -1
- package/dist/components/goals.js +34 -9
- package/dist/components/goals.js.map +1 -1
- package/dist/components/markdown.d.ts +6 -0
- package/dist/components/markdown.d.ts.map +1 -1
- package/dist/components/markdown.js +7 -0
- package/dist/components/markdown.js.map +1 -1
- package/dist/components/pictures.d.ts +68 -0
- package/dist/components/pictures.d.ts.map +1 -0
- package/dist/components/pictures.js +213 -0
- package/dist/components/pictures.js.map +1 -0
- package/dist/components/projects.d.ts +12 -0
- package/dist/components/projects.d.ts.map +1 -1
- package/dist/components/projects.js +15 -0
- package/dist/components/projects.js.map +1 -1
- package/dist/components/runs.d.ts.map +1 -1
- package/dist/components/runs.js +34 -7
- package/dist/components/runs.js.map +1 -1
- package/dist/components/task-view.d.ts +3 -0
- package/dist/components/task-view.d.ts.map +1 -1
- package/dist/components/task-view.js +6 -4
- package/dist/components/task-view.js.map +1 -1
- package/dist/console.css +338 -37
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +124 -10
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts +16 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +47 -2
- package/dist/data.js.map +1 -1
- package/dist/docs-page.d.ts.map +1 -1
- package/dist/docs-page.js +14 -1
- package/dist/docs-page.js.map +1 -1
- package/dist/i18n/en.d.ts +56 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +54 -3
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +54 -3
- package/dist/i18n/ko.js.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/router.d.ts +25 -6
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +38 -7
- package/dist/router.js.map +1 -1
- package/dist/rules.js +5 -5
- package/dist/rules.js.map +1 -1
- package/dist/schemas.d.ts +158 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +78 -0
- package/dist/schemas.js.map +1 -1
- package/dist/vocabulary.d.ts +2 -2
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +3 -0
- package/dist/vocabulary.js.map +1 -1
- package/docs/specs/cli.md +19 -11
- package/docs/specs/rest.md +24 -6
- package/package.json +1 -1
- package/skills/working-the-board/SKILL.md +12 -6
- package/src/api.ts +13 -0
- package/src/cli/cli.ts +441 -42
- package/src/cli/credentials.ts +276 -14
- package/src/cli/directory.ts +43 -6
- package/src/cli/format.ts +138 -2
- package/src/cli/help.ts +46 -22
- package/src/client.ts +60 -0
- package/src/components/board.tsx +401 -28
- package/src/components/comments.tsx +30 -49
- package/src/components/documents.tsx +87 -4
- package/src/components/event-feed.tsx +4 -0
- package/src/components/files.ts +49 -0
- package/src/components/goals.tsx +173 -106
- package/src/components/markdown.tsx +19 -0
- package/src/components/pictures.tsx +389 -0
- package/src/components/projects.tsx +68 -0
- package/src/components/runs.tsx +73 -15
- package/src/components/task-view.tsx +43 -2
- package/src/console.tsx +268 -7
- package/src/data.ts +72 -1
- package/src/docs-page.tsx +18 -1
- package/src/i18n/en.ts +58 -3
- package/src/i18n/ko.ts +58 -3
- package/src/index.ts +28 -1
- package/src/router.ts +57 -9
- package/src/rules.ts +5 -5
- package/src/schemas.ts +97 -0
- package/src/styles/console.css +338 -37
- package/src/vocabulary.ts +3 -0
package/src/cli/help.ts
CHANGED
|
@@ -84,23 +84,28 @@ const TASK_FIELD_REFUSALS = [
|
|
|
84
84
|
|
|
85
85
|
export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
86
86
|
login: {
|
|
87
|
-
usage: "login --url <origin> [--agent <name>] [--token-stdin]",
|
|
87
|
+
usage: "login --url <origin> [--agent <name>] [--token-stdin] [--default]",
|
|
88
88
|
about:
|
|
89
|
-
"Connects this agent to the console: shows an address and a code, which a person opens signed in, names the agent and approves; the command then receives a token of its own and keeps it, with the console's address, in your home directory, never showing it. An agent running the command relays the address and the code to its person and waits. --agent says what the agent calls itself; left out, the command names the agent it runs under where its environment says so (Claude Code, Codex), else An agent; the machine's name follows, and the pages show the name before 'on' with the whole on hover. --token-stdin reads a token made by hand from standard input instead, for a script or a job.",
|
|
89
|
+
"Connects this agent to the console: shows an address and a code, which a person opens signed in, names the agent and approves; the command then receives a token of its own and keeps it, with the console's address and the account, in your home directory, never showing it. One login per console and account: a second console adds a login beside the first, the first is the default console a directory that names none works at, and --default makes this one that. A login repeated for the same console and account replaces its token, which is given up at the console. An agent running the command relays the address and the code to its person and waits. --agent says what the agent calls itself; left out, the command names the agent it runs under where its environment says so (Claude Code, Codex), else An agent; the machine's name follows, and the pages show the name before 'on' with the whole on hover. --token-stdin reads a token made by hand from standard input instead, for a script or a job.",
|
|
90
90
|
refusals: [
|
|
91
91
|
"connect.not_found: the code was not approved in time, or the person said it was not theirs; run login again",
|
|
92
92
|
"the console does not know the token given: make one on the Agents page and try again",
|
|
93
93
|
],
|
|
94
94
|
},
|
|
95
|
+
logins: {
|
|
96
|
+
usage: "logins",
|
|
97
|
+
about:
|
|
98
|
+
"The consoles this machine is signed in to, each with the account, what the token is called there, since when, and which is the default; never a token.",
|
|
99
|
+
},
|
|
95
100
|
logout: {
|
|
96
|
-
usage: "logout",
|
|
101
|
+
usage: "logout [--url <origin>] [--account <login>]",
|
|
97
102
|
about:
|
|
98
|
-
"Signs this agent out: gives the token up
|
|
103
|
+
"Signs this agent out of one console: gives the token up there, so that it is good for nothing from now on, and forgets it here. Which console: --url, else the one this directory is bound to, else the default, else the one console signed in to; --account says which account where the console has several. A console out of reach leaves the token to the Agents page.",
|
|
99
104
|
},
|
|
100
105
|
whoami: {
|
|
101
106
|
usage: "whoami",
|
|
102
107
|
about:
|
|
103
|
-
"Who the token acts as, which console
|
|
108
|
+
"Who the token acts as, which console the command talks to from here and as which account, and which project this directory works in.",
|
|
104
109
|
},
|
|
105
110
|
projects: {
|
|
106
111
|
usage: "projects",
|
|
@@ -108,9 +113,9 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
108
113
|
"The projects you may work in: each with its key, its name, what you are in it, and what waits in it. Every command on the board works in one project.",
|
|
109
114
|
},
|
|
110
115
|
use: {
|
|
111
|
-
usage: "use <key>",
|
|
116
|
+
usage: "use <key> [--url <origin>] [--account <login>]",
|
|
112
117
|
about:
|
|
113
|
-
"Says which project this directory works in: writes .skillcdn-console.json here, which the commands read from this directory or one above it, and which is meant to be committed. --project <key> on any command, or CONSOLE_PROJECT in the environment, wins over it.",
|
|
118
|
+
"Says which project this directory works in: writes .skillcdn-console.json here, which the commands read from this directory or one above it, and which is meant to be committed in a private repository and left out of a public one. The file names the project; and the console, where that is not the default login here or --url says so; and the account, where the console has several logins or --account says so. Never a token. --project <key> on any command, or CONSOLE_PROJECT in the environment, wins over the project it names.",
|
|
114
119
|
refusals: ["project.not_found: no project has the key, or it is not yours to see"],
|
|
115
120
|
},
|
|
116
121
|
work: {
|
|
@@ -120,19 +125,23 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
120
125
|
},
|
|
121
126
|
tasks: {
|
|
122
127
|
usage:
|
|
123
|
-
"tasks [--state <state>] [--open] [--mine] [--category <key>] [--goal <id>] [--due <day|today|week|overdue>] [--limit <n>] [--offset <n>]",
|
|
124
|
-
about: `The tasks on the board, newest first: number, state, priority, title, who owns and works on each, its category and its due day, and what waits on it. --open keeps the ones not done or dropped, --mine those assigned to you, --category and --goal those sorted into one, --due those due by a day: today, within the week, or overdue (the open ones past their day). A page at a time: ${DEFAULT_PAGE_LIMIT} unless --limit says otherwise, from --offset on; a last line says when there is more. States: idea, ready, in_progress, in_review, done, dropped.`,
|
|
128
|
+
"tasks [--state <state>] [--open] [--mine] [--category <key>] [--goal <id>] [--due <day|today|week|overdue>] [--unassigned] [--archived] [--limit <n>] [--offset <n>]",
|
|
129
|
+
about: `The tasks on the board, newest first: number, state, priority, title, who owns and works on each, its category and its due day, and what waits on it. --open keeps the ones not done or dropped, --mine those assigned to you, --unassigned those assigned to nobody (not with --mine), --category and --goal those sorted into one, --due those due by a day: today, within the week, or overdue (the open ones past their day). The tasks put away (ADR-0029) are left out unless --archived asks for them alone. A page at a time: ${DEFAULT_PAGE_LIMIT} unless --limit says otherwise, from --offset on; a last line says when there is more. States: idea, ready, in_progress, in_review, done, dropped.`,
|
|
125
130
|
},
|
|
126
131
|
task: {
|
|
127
|
-
usage: `task <number|id> | task new <title> [--body <markdown>|--file <path>] ${TASK_FIELD_FLAGS} | task edit <number|id> [--title <title>] [--body <markdown>|--file <path>] ${TASK_FIELD_FLAGS}
|
|
132
|
+
usage: `task <number|id> | task new <title> [--body <markdown>|--file <path>] ${TASK_FIELD_FLAGS} | task edit <number|id> [--title <title>] [--body <markdown>|--file <path>] ${TASK_FIELD_FLAGS} | task archive <number|id> | task archive --goal <id> | task restore <number|id>`,
|
|
128
133
|
about:
|
|
129
|
-
"One task in full, with its plan (category, goal, start and due days), what happened to it (when it was started and done, which the board keeps itself), the decisions about it, the runs on it and the discussion on it, each comment whole with its files; or a new task written down; or a task changed, only in what the flags say, where none clears a field (priorities: low, normal, high, urgent).",
|
|
134
|
+
"One task in full, with its plan (category, goal, start and due days), what happened to it (when it was started and done, which the board keeps itself, and when it was put away), the decisions about it, the runs on it and the discussion on it, each comment whole with its files; or a new task written down; or a task changed, only in what the flags say, where none clears a field (priorities: low, normal, high, urgent). archive puts a done or dropped task away (ADR-0029): out of the listings, the board and the calendar, open by its number still; with --goal, every done or dropped task of the goal at once, for an owner. restore brings one back.",
|
|
130
135
|
limits: [
|
|
131
136
|
`title: one line, up to ${MAX_TITLE_LENGTH} characters, saying what is to be done on its own; what it refers to goes in the body`,
|
|
132
137
|
`body: ${MARKDOWN}`,
|
|
133
138
|
...TASK_FIELD_LIMITS,
|
|
134
139
|
],
|
|
135
|
-
refusals: [
|
|
140
|
+
refusals: [
|
|
141
|
+
"task.not_found: no task has that number or id",
|
|
142
|
+
"task.open: an open task is not put away; one done or dropped is",
|
|
143
|
+
...TASK_FIELD_REFUSALS,
|
|
144
|
+
],
|
|
136
145
|
},
|
|
137
146
|
goals: {
|
|
138
147
|
usage: "goals [--category <key>] [--state <state>]",
|
|
@@ -181,9 +190,9 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
181
190
|
},
|
|
182
191
|
project: {
|
|
183
192
|
usage:
|
|
184
|
-
'project <key> | project new <key> "<name>" [--description <markdown>|--file <path>] [--visibility workspace|private] [--skills <address>|none] [--color <name>] [--symbol <text>] | project edit <key> [--name "<name>"] [the same flags; none clears] | project icon <key> <file> | project icon <key> --remove',
|
|
193
|
+
'project <key> | project new <key> "<name>" [--description <markdown>|--file <path>] [--visibility workspace|private] [--skills <address>|none] [--color <name>] [--symbol <text>] | project edit <key> [--name "<name>"] [the same flags; none clears] | project icon <key> <file> | project icon <key> --remove | project pack-token <key> --stdin | project pack-token <key> --remove',
|
|
185
194
|
about:
|
|
186
|
-
"One project in full; or a project made, with you as its owner, private unless --visibility workspace says everyone of the workspace works in it; or one changed, only in what the flags say, for an owner; or its image for its mark, set from a file of this machine or taken away. The organization's skills are the project's unless --skills names an address of its own.",
|
|
195
|
+
"One project in full; or a project made, with you as its owner, private unless --visibility workspace says everyone of the workspace works in it; or one changed, only in what the flags say, for an owner; or its image for its mark, set from a file of this machine or taken away; or its pack token (ADR-0028), the token a person made at SkillCDN for a private pack, read from standard input and never an argument, which the console keeps sealed to read the pack with, or taken away. The organization's skills are the project's unless --skills names an address of its own.",
|
|
187
196
|
limits: [
|
|
188
197
|
`key: ${KEY}, up to ${MAX_PROJECT_KEY_LENGTH} characters; it does not change once made`,
|
|
189
198
|
`name: one line, up to ${MAX_PROJECT_NAME_LENGTH} characters; description: up to ${MAX_PROJECT_DESCRIPTION_LENGTH}`,
|
|
@@ -206,9 +215,9 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
206
215
|
},
|
|
207
216
|
member: {
|
|
208
217
|
usage:
|
|
209
|
-
"member add <login> [--role owner|member] | member role <login> <owner|member> | member remove <login>",
|
|
218
|
+
"member add <login> [--role owner|member] [--project <key>[,<key>...]] | member role <login> <owner|member> | member remove <login>",
|
|
210
219
|
about:
|
|
211
|
-
"Lists a person of the workspace in the project, as a member unless --role says owner; changes what they are in it; or takes them off the list. For an owner of the project.",
|
|
220
|
+
"Lists a person of the workspace in the project, as a member unless --role says owner; changes what they are in it; or takes them off the list. For an owner of the project. With --project naming several keys with commas, member add lists the person in each of them in turn, one line per project; one listed already is said so, and the rest go on.",
|
|
212
221
|
refusals: [
|
|
213
222
|
"auth.forbidden: only an owner of the project lists its members",
|
|
214
223
|
"member.invalid_person: the person is not of the workspace",
|
|
@@ -237,7 +246,17 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
237
246
|
skills: {
|
|
238
247
|
usage: "skills",
|
|
239
248
|
about:
|
|
240
|
-
"The
|
|
249
|
+
"The skills of the project's pack, as SkillCDN serves them at the project's address: each with its description, the path of its SKILL.md, which console skill reads it by, and the URI you load it by through your own SkillCDN connection where your host has one; and where the console's own skills are on this machine. A private pack is read with the pack token the project holds (ADR-0028). --json adds the page of each, for a person.",
|
|
250
|
+
},
|
|
251
|
+
skill: {
|
|
252
|
+
usage: "skill <path> [--file <path>]",
|
|
253
|
+
about:
|
|
254
|
+
"One skill of the project's pack, whole, as load_skill lays it out for you: the rules of the repository from its root to the nearest manifest, the skill's body, the files it includes, each under a line that names its path; then the files it has and what it refers to. Read by the console from the SkillCDN deployment, with the pack token the project holds where the pack is private, so you need no connection of your own. <path> is the path of the SKILL.md from the repository's root, as console skills lists it. --file <path> reads a file of the pack instead, whole, or what a folder holds. What you read is the pack's, under its license: what a private pack says stays in your work and is not copied into reports or pages beyond what the work needs.",
|
|
255
|
+
refusals: [
|
|
256
|
+
"status not_found: the pack is not served to the console; private, with no pack token on the project",
|
|
257
|
+
"status token_invalid: the pack token the project holds no longer works; an owner sets a new one",
|
|
258
|
+
"status failed, for a file: SkillCDN will not carry it, too large or not text",
|
|
259
|
+
],
|
|
241
260
|
},
|
|
242
261
|
rules: {
|
|
243
262
|
usage:
|
|
@@ -275,7 +294,7 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
275
294
|
"hand-in": {
|
|
276
295
|
usage: "hand-in <https url | file path> [--label <words>]",
|
|
277
296
|
about:
|
|
278
|
-
"Hands in what was made: a link (a branch, a pull request, a document, a page), or a file from this machine, which the console keeps and shows on the task.",
|
|
297
|
+
"Hands in what was made: a link (a branch, a pull request, a document, a page), or a file from this machine, which the console keeps and shows on the task; a picture is shown there small and large, and a report that names it as  shows it where the words are.",
|
|
279
298
|
limits: [
|
|
280
299
|
"a link: https only",
|
|
281
300
|
`a file: up to ${MAX_FILE_BYTES} bytes, not empty; it is called by its name, without the path`,
|
|
@@ -395,7 +414,7 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
395
414
|
attach: {
|
|
396
415
|
usage: "attach <path> <file> [--label <words>]",
|
|
397
416
|
about:
|
|
398
|
-
"Attaches a file from this machine to a page: the console keeps it, and the page
|
|
417
|
+
"Attaches a file from this machine to a page: the console keeps it, and the page lists it; a picture is shown where the body names it as .",
|
|
399
418
|
limits: [
|
|
400
419
|
`a file: up to ${MAX_FILE_BYTES} bytes, not empty; it is called by its name, without the path`,
|
|
401
420
|
`at most ${MAX_FILES_PER_DOCUMENT} files on one page`,
|
|
@@ -449,14 +468,18 @@ Exit codes: 0 done; 1 the console refused, or could not be reached (the reason i
|
|
|
449
468
|
What the console refuses is printed as its code and its words. Everywhere:
|
|
450
469
|
${COMMON_REFUSALS.map((refusal) => ` ${refusal}`).join("\n")}
|
|
451
470
|
|
|
452
|
-
|
|
453
|
-
|
|
471
|
+
Which console a command talks to: --url, else CONSOLE_URL in the environment, else the console
|
|
472
|
+
.skillcdn-console.json binds this directory to, else the default login. The token is then the one
|
|
473
|
+
kept for that console alone (CONSOLE_TOKEN only together with CONSOLE_URL, for a hook or a job), in
|
|
474
|
+
$XDG_CONFIG_HOME/skillcdn-console/credentials.json (~/.config when XDG_CONFIG_HOME is unset);
|
|
475
|
+
a console nobody is signed in to here gets no request. --account <login> says which account where
|
|
476
|
+
a console has several. console logins lists them.
|
|
454
477
|
`;
|
|
455
478
|
|
|
456
479
|
const SECTIONS: readonly { readonly title: string; readonly commands: readonly string[] }[] = [
|
|
457
480
|
{
|
|
458
481
|
title: "Signing in, once, as a person, and the project to work in",
|
|
459
|
-
commands: ["login", "logout", "whoami", "projects", "use"],
|
|
482
|
+
commands: ["login", "logins", "logout", "whoami", "projects", "use"],
|
|
460
483
|
},
|
|
461
484
|
{
|
|
462
485
|
title: "The board",
|
|
@@ -472,6 +495,7 @@ const SECTIONS: readonly { readonly title: string; readonly commands: readonly s
|
|
|
472
495
|
"runs",
|
|
473
496
|
"run",
|
|
474
497
|
"skills",
|
|
498
|
+
"skill",
|
|
475
499
|
"rules",
|
|
476
500
|
],
|
|
477
501
|
},
|
package/src/client.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
} from "./routes.js";
|
|
13
13
|
import {
|
|
14
14
|
type RestAnswerInput,
|
|
15
|
+
type RestArchivedTasks,
|
|
15
16
|
type RestArtifactInput,
|
|
16
17
|
type RestCategories,
|
|
17
18
|
type RestCategory,
|
|
@@ -43,6 +44,7 @@ import {
|
|
|
43
44
|
type RestMemberPatch,
|
|
44
45
|
type RestMembers,
|
|
45
46
|
type RestMePatch,
|
|
47
|
+
type RestPackTokenInput,
|
|
46
48
|
type RestPeople,
|
|
47
49
|
type RestPerson,
|
|
48
50
|
type RestPersonPatch,
|
|
@@ -59,6 +61,8 @@ import {
|
|
|
59
61
|
type RestRunEndInput,
|
|
60
62
|
type RestRunInput,
|
|
61
63
|
type RestRuns,
|
|
64
|
+
type RestSkillFile,
|
|
65
|
+
type RestSkillLoad,
|
|
62
66
|
type RestSkills,
|
|
63
67
|
type RestTask,
|
|
64
68
|
type RestTaskInput,
|
|
@@ -70,6 +74,7 @@ import {
|
|
|
70
74
|
type RestVersion,
|
|
71
75
|
type RestVersions,
|
|
72
76
|
type RestWork,
|
|
77
|
+
restArchivedTasksSchema,
|
|
73
78
|
restCategoriesSchema,
|
|
74
79
|
restCategorySchema,
|
|
75
80
|
restClaimSchema,
|
|
@@ -98,6 +103,8 @@ import {
|
|
|
98
103
|
restRulesSchema,
|
|
99
104
|
restRunSchema,
|
|
100
105
|
restRunsSchema,
|
|
106
|
+
restSkillFileSchema,
|
|
107
|
+
restSkillLoadSchema,
|
|
101
108
|
restSkillsSchema,
|
|
102
109
|
restTaskSchema,
|
|
103
110
|
restTasksSchema,
|
|
@@ -212,8 +219,12 @@ export interface TaskFilter extends Page {
|
|
|
212
219
|
readonly goal?: string | undefined;
|
|
213
220
|
/** The id of the person the tasks are assigned to. */
|
|
214
221
|
readonly assignee?: string | undefined;
|
|
222
|
+
/** True for the tasks assigned to nobody. */
|
|
223
|
+
readonly unassigned?: boolean | undefined;
|
|
215
224
|
/** A day (`2026-10-20`): the tasks due on it or before it. */
|
|
216
225
|
readonly dueBy?: string | undefined;
|
|
226
|
+
/** True for the tasks put away alone (ADR-0029); false, or left out, for the current ones. */
|
|
227
|
+
readonly archived?: boolean | undefined;
|
|
217
228
|
}
|
|
218
229
|
|
|
219
230
|
/** What a folder's listing, or a search, of the documents is narrowed to. */
|
|
@@ -249,6 +260,11 @@ export interface ProjectClient {
|
|
|
249
260
|
task(ref: string, signal?: AbortSignal): Promise<RestTask>;
|
|
250
261
|
createTask(input: RestTaskInput): Promise<RestTask>;
|
|
251
262
|
updateTask(id: string, patch: RestTaskPatch): Promise<RestTask>;
|
|
263
|
+
/** Puts a done or dropped task away (ADR-0029), or brings one back. */
|
|
264
|
+
archiveTask(id: string): Promise<RestTask>;
|
|
265
|
+
restoreTask(id: string): Promise<RestTask>;
|
|
266
|
+
/** Puts every done or dropped task of a goal away at once; for an owner. Answers how many. */
|
|
267
|
+
archiveTasksOfGoal(goalId: string): Promise<RestArchivedTasks>;
|
|
252
268
|
/** The decisions, or only those that wait, or only those about one task; a page of them. */
|
|
253
269
|
decisions(
|
|
254
270
|
filter?: { readonly open?: boolean; readonly task?: string } & Page,
|
|
@@ -294,6 +310,18 @@ export interface ProjectClient {
|
|
|
294
310
|
eventStreamUrl(after: number): string;
|
|
295
311
|
/** The project's skills, as SkillCDN serves them at its address, or the organization's. */
|
|
296
312
|
skills(signal?: AbortSignal): Promise<RestSkills>;
|
|
313
|
+
/** One skill of the pack, a page of it (`load_skill`), read by the console with the pack token the project holds (ADR-0028). */
|
|
314
|
+
skill(path: string, cursor?: string, signal?: AbortSignal): Promise<RestSkillLoad>;
|
|
315
|
+
/** A file of the pack, a page of it, or what a folder holds (`read_repo_file`). */
|
|
316
|
+
skillFile(
|
|
317
|
+
path: string,
|
|
318
|
+
page?: { readonly offset?: number | undefined; readonly limit?: number | undefined },
|
|
319
|
+
signal?: AbortSignal,
|
|
320
|
+
): Promise<RestSkillFile>;
|
|
321
|
+
/** Sets the pack token the project reads a private pack with; for an owner. The token travels once and is answered never. */
|
|
322
|
+
setPackToken(input: RestPackTokenInput): Promise<RestProject>;
|
|
323
|
+
/** Takes the pack token away; for an owner. */
|
|
324
|
+
removePackToken(): Promise<RestProject>;
|
|
297
325
|
/** The rules that hold in the project (ADR-0023): the workspace's, and what the project adds. */
|
|
298
326
|
rules(signal?: AbortSignal): Promise<RestProjectRules>;
|
|
299
327
|
/** A folder's pages and folders, or the pages a search finds. */
|
|
@@ -553,10 +581,12 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
|
|
|
553
581
|
"GET",
|
|
554
582
|
withQuery(at("tasks"), {
|
|
555
583
|
state: filter.state,
|
|
584
|
+
archived: flag(filter.archived),
|
|
556
585
|
open: flag(filter.open),
|
|
557
586
|
category: filter.category,
|
|
558
587
|
goal: filter.goal,
|
|
559
588
|
assignee: filter.assignee,
|
|
589
|
+
unassigned: flag(filter.unassigned),
|
|
560
590
|
dueBy: filter.dueBy,
|
|
561
591
|
limit: number(filter.limit),
|
|
562
592
|
offset: number(filter.offset),
|
|
@@ -570,6 +600,12 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
|
|
|
570
600
|
createTask: (input) => request("POST", `${base}${at("tasks")}`, input, restTaskSchema),
|
|
571
601
|
updateTask: (id, patch) =>
|
|
572
602
|
request("PATCH", `${base}${at("tasks", id)}`, patch, restTaskSchema),
|
|
603
|
+
archiveTask: (id) =>
|
|
604
|
+
request("POST", `${base}${at("tasks", id)}/archive`, undefined, restTaskSchema),
|
|
605
|
+
restoreTask: (id) =>
|
|
606
|
+
request("POST", `${base}${at("tasks", id)}/restore`, undefined, restTaskSchema),
|
|
607
|
+
archiveTasksOfGoal: (goalId) =>
|
|
608
|
+
request("POST", `${base}${at("tasks")}/archive`, { goalId }, restArchivedTasksSchema),
|
|
573
609
|
decisions: (filter = {}, signal) =>
|
|
574
610
|
request(
|
|
575
611
|
"GET",
|
|
@@ -658,6 +694,30 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
|
|
|
658
694
|
eventStreamUrl: (after) => withQuery(`${at("events")}/stream`, { after: String(after) }),
|
|
659
695
|
skills: (signal) =>
|
|
660
696
|
request("GET", `${base}${at("skills")}`, undefined, restSkillsSchema, signal),
|
|
697
|
+
skill: (path, cursor, signal) =>
|
|
698
|
+
request(
|
|
699
|
+
"GET",
|
|
700
|
+
withQuery(`${at("skills")}/one`, { path, cursor }),
|
|
701
|
+
undefined,
|
|
702
|
+
restSkillLoadSchema,
|
|
703
|
+
signal,
|
|
704
|
+
),
|
|
705
|
+
skillFile: (path, page = {}, signal) =>
|
|
706
|
+
request(
|
|
707
|
+
"GET",
|
|
708
|
+
withQuery(`${at("skills")}/file`, {
|
|
709
|
+
path,
|
|
710
|
+
offset: page.offset === undefined ? undefined : String(page.offset),
|
|
711
|
+
limit: page.limit === undefined ? undefined : String(page.limit),
|
|
712
|
+
}),
|
|
713
|
+
undefined,
|
|
714
|
+
restSkillFileSchema,
|
|
715
|
+
signal,
|
|
716
|
+
),
|
|
717
|
+
setPackToken: (input) =>
|
|
718
|
+
request("PUT", `${base}${at()}/pack-token`, input, restProjectSchema),
|
|
719
|
+
removePackToken: () =>
|
|
720
|
+
request("DELETE", `${base}${at()}/pack-token`, undefined, restProjectSchema),
|
|
661
721
|
rules: (signal) =>
|
|
662
722
|
request("GET", `${base}${at("rules")}`, undefined, restProjectRulesSchema, signal),
|
|
663
723
|
documents: (filter = {}, signal) =>
|