@skillcdn/console 0.6.3 → 0.6.4

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.
Files changed (191) hide show
  1. package/README.md +6 -6
  2. package/dist/agent-page.d.ts.map +1 -1
  3. package/dist/agent-page.js +7 -3
  4. package/dist/agent-page.js.map +1 -1
  5. package/dist/api.d.ts +5 -4
  6. package/dist/api.d.ts.map +1 -1
  7. package/dist/api.js +5 -4
  8. package/dist/api.js.map +1 -1
  9. package/dist/cli/cli.d.ts.map +1 -1
  10. package/dist/cli/cli.js +660 -138
  11. package/dist/cli/cli.js.map +1 -1
  12. package/dist/cli/format.d.ts +32 -4
  13. package/dist/cli/format.d.ts.map +1 -1
  14. package/dist/cli/format.js +125 -4
  15. package/dist/cli/format.js.map +1 -1
  16. package/dist/cli/help.d.ts.map +1 -1
  17. package/dist/cli/help.js +91 -29
  18. package/dist/cli/help.js.map +1 -1
  19. package/dist/cli/pack.d.ts +11 -10
  20. package/dist/cli/pack.d.ts.map +1 -1
  21. package/dist/cli/pack.js +27 -41
  22. package/dist/cli/pack.js.map +1 -1
  23. package/dist/cli/plugin-cli.d.ts.map +1 -1
  24. package/dist/cli/plugin-cli.js +8 -5
  25. package/dist/cli/plugin-cli.js.map +1 -1
  26. package/dist/cli/runner-files.d.ts.map +1 -1
  27. package/dist/cli/runner-files.js +15 -0
  28. package/dist/cli/runner-files.js.map +1 -1
  29. package/dist/cli/skill-path.d.ts +11 -0
  30. package/dist/cli/skill-path.d.ts.map +1 -0
  31. package/dist/cli/skill-path.js +44 -0
  32. package/dist/cli/skill-path.js.map +1 -0
  33. package/dist/client.d.ts +17 -1
  34. package/dist/client.d.ts.map +1 -1
  35. package/dist/client.js +10 -1
  36. package/dist/client.js.map +1 -1
  37. package/dist/components/agent-page.d.ts +67 -5
  38. package/dist/components/agent-page.d.ts.map +1 -1
  39. package/dist/components/agent-page.js +161 -14
  40. package/dist/components/agent-page.js.map +1 -1
  41. package/dist/components/agents.d.ts +3 -4
  42. package/dist/components/agents.d.ts.map +1 -1
  43. package/dist/components/agents.js +7 -6
  44. package/dist/components/agents.js.map +1 -1
  45. package/dist/components/people.d.ts.map +1 -1
  46. package/dist/components/people.js +7 -2
  47. package/dist/components/people.js.map +1 -1
  48. package/dist/components/picker.d.ts +16 -0
  49. package/dist/components/picker.d.ts.map +1 -1
  50. package/dist/components/picker.js +69 -4
  51. package/dist/components/picker.js.map +1 -1
  52. package/dist/console.css +40 -0
  53. package/dist/console.d.ts.map +1 -1
  54. package/dist/console.js +1 -1
  55. package/dist/console.js.map +1 -1
  56. package/dist/i18n/en.d.ts +19 -5
  57. package/dist/i18n/en.d.ts.map +1 -1
  58. package/dist/i18n/en.js +26 -12
  59. package/dist/i18n/en.js.map +1 -1
  60. package/dist/i18n/ko.d.ts.map +1 -1
  61. package/dist/i18n/ko.js +22 -10
  62. package/dist/i18n/ko.js.map +1 -1
  63. package/dist/limits.d.ts +16 -0
  64. package/dist/limits.d.ts.map +1 -1
  65. package/dist/limits.js +16 -0
  66. package/dist/limits.js.map +1 -1
  67. package/dist/onboarding.d.ts +18 -6
  68. package/dist/onboarding.d.ts.map +1 -1
  69. package/dist/onboarding.js +42 -7
  70. package/dist/onboarding.js.map +1 -1
  71. package/dist/plugin/args.d.ts +24 -2
  72. package/dist/plugin/args.d.ts.map +1 -1
  73. package/dist/plugin/args.js +20 -2
  74. package/dist/plugin/args.js.map +1 -1
  75. package/dist/plugin/define.d.ts.map +1 -1
  76. package/dist/plugin/define.js +12 -3
  77. package/dist/plugin/define.js.map +1 -1
  78. package/dist/plugin/rest-schemas.d.ts +2 -0
  79. package/dist/plugin/rest-schemas.d.ts.map +1 -1
  80. package/dist/plugin/rest-schemas.js +1 -0
  81. package/dist/plugin/rest-schemas.js.map +1 -1
  82. package/dist/routes.d.ts +2 -0
  83. package/dist/routes.d.ts.map +1 -1
  84. package/dist/routes.js +2 -0
  85. package/dist/routes.js.map +1 -1
  86. package/dist/rules.d.ts +4 -1
  87. package/dist/rules.d.ts.map +1 -1
  88. package/dist/rules.js +5 -2
  89. package/dist/rules.js.map +1 -1
  90. package/dist/runner/claude.d.ts.map +1 -1
  91. package/dist/runner/claude.js +48 -0
  92. package/dist/runner/claude.js.map +1 -1
  93. package/dist/runner/codex.d.ts.map +1 -1
  94. package/dist/runner/codex.js +4 -1
  95. package/dist/runner/codex.js.map +1 -1
  96. package/dist/runner/desk.d.ts.map +1 -1
  97. package/dist/runner/desk.js +5 -4
  98. package/dist/runner/desk.js.map +1 -1
  99. package/dist/runner/runner.d.ts +16 -0
  100. package/dist/runner/runner.d.ts.map +1 -1
  101. package/dist/runner/runner.js +157 -8
  102. package/dist/runner/runner.js.map +1 -1
  103. package/dist/runner/slack.d.ts.map +1 -1
  104. package/dist/runner/slack.js +14 -3
  105. package/dist/runner/slack.js.map +1 -1
  106. package/dist/runner/types.d.ts +19 -0
  107. package/dist/runner/types.d.ts.map +1 -1
  108. package/dist/runner/types.js.map +1 -1
  109. package/dist/schemas.d.ts +475 -5
  110. package/dist/schemas.d.ts.map +1 -1
  111. package/dist/schemas.js +117 -12
  112. package/dist/schemas.js.map +1 -1
  113. package/dist/secret-file.d.ts +21 -0
  114. package/dist/secret-file.d.ts.map +1 -0
  115. package/dist/secret-file.js +59 -0
  116. package/dist/secret-file.js.map +1 -0
  117. package/dist/services.d.ts.map +1 -1
  118. package/dist/services.js +3 -2
  119. package/dist/services.js.map +1 -1
  120. package/dist/setup-guide.d.ts +2 -2
  121. package/dist/setup-guide.d.ts.map +1 -1
  122. package/dist/setup-guide.js +6 -5
  123. package/dist/setup-guide.js.map +1 -1
  124. package/dist/vocabulary.d.ts +10 -2
  125. package/dist/vocabulary.d.ts.map +1 -1
  126. package/dist/vocabulary.js +9 -2
  127. package/dist/vocabulary.js.map +1 -1
  128. package/docs/specs/cli.md +22 -16
  129. package/docs/specs/plugins.md +5 -4
  130. package/docs/specs/rest.md +24 -12
  131. package/docs/specs/runner.md +19 -12
  132. package/docs/start.md +4 -3
  133. package/package.json +3 -3
  134. package/skills/building-a-plugin/SKILL.md +2 -2
  135. package/skills/keeping-the-pack/SKILL.md +87 -0
  136. package/skills/planning-the-board/SKILL.md +6 -6
  137. package/skills/planning-the-board/references/a-task.md +1 -1
  138. package/skills/planning-the-board/references/setting-up.md +9 -5
  139. package/skills/running-an-agent/SKILL.md +15 -14
  140. package/skills/running-an-agent/references/preparing-the-machine.md +3 -2
  141. package/skills/running-an-agent/references/several-tasks.md +8 -2
  142. package/skills/running-an-agent/references/slack-app.md +10 -4
  143. package/skills/running-an-agent/references/the-account-and-the-invitation.md +1 -1
  144. package/skills/running-an-agent/references/what-was-not-seen-run-yet.md +3 -1
  145. package/skills/running-an-agent/references/when-the-agent-could-not-go-on.md +3 -3
  146. package/skills/running-an-agent/references/your-first-task.md +4 -3
  147. package/skills/working-the-board/SKILL.md +4 -4
  148. package/skills/working-the-board/references/terms.md +3 -1
  149. package/skills/working-the-board/references/the-pack.md +12 -5
  150. package/src/agent-page.tsx +19 -3
  151. package/src/api.ts +27 -0
  152. package/src/cli/cli.ts +847 -192
  153. package/src/cli/format.ts +158 -4
  154. package/src/cli/help.ts +102 -28
  155. package/src/cli/pack.ts +49 -58
  156. package/src/cli/plugin-cli.ts +8 -5
  157. package/src/cli/runner-files.ts +17 -0
  158. package/src/cli/skill-path.ts +51 -0
  159. package/src/client.ts +50 -0
  160. package/src/components/agent-page.tsx +309 -30
  161. package/src/components/agents.tsx +7 -23
  162. package/src/components/people.tsx +7 -3
  163. package/src/components/picker.tsx +79 -5
  164. package/src/console.tsx +0 -1
  165. package/src/i18n/en.ts +28 -13
  166. package/src/i18n/ko.ts +24 -10
  167. package/src/limits.ts +16 -0
  168. package/src/onboarding.ts +60 -21
  169. package/src/plugin/args.ts +29 -3
  170. package/src/plugin/define.ts +18 -3
  171. package/src/plugin/rest-schemas.ts +3 -0
  172. package/src/routes.ts +2 -0
  173. package/src/rules.ts +5 -2
  174. package/src/runner/claude.ts +53 -0
  175. package/src/runner/codex.ts +4 -1
  176. package/src/runner/desk.ts +5 -4
  177. package/src/runner/runner.ts +199 -9
  178. package/src/runner/slack.ts +18 -7
  179. package/src/runner/types.ts +16 -0
  180. package/src/schemas.ts +148 -10
  181. package/src/secret-file.ts +76 -0
  182. package/src/services.ts +3 -2
  183. package/src/setup-guide.ts +6 -5
  184. package/src/styles/README.md +1 -1
  185. package/src/styles/pages/agents.css +40 -0
  186. package/src/vocabulary.ts +12 -2
  187. package/dist/cli/command-words.d.ts +0 -20
  188. package/dist/cli/command-words.d.ts.map +0 -1
  189. package/dist/cli/command-words.js +0 -51
  190. package/dist/cli/command-words.js.map +0 -1
  191. package/src/cli/command-words.ts +0 -56
package/src/cli/pack.ts CHANGED
@@ -7,23 +7,20 @@ import {
7
7
  type Pack,
8
8
  PackError,
9
9
  type RowsPage,
10
+ shellLine,
10
11
  } from "@skillcdn/cli";
11
- import {
12
- isReadmePath,
13
- parseAddress,
14
- parseRepoPath,
15
- parseSkillUri,
16
- type RestBrowse,
17
- type RestFile,
18
- type RestFind,
19
- type RestMount,
20
- type RestSkill as RestSkillPage,
21
- type ToolWords,
22
- } from "@skillcdn/core";
12
+ import { isReadmePath, type ToolWords } from "@skillcdn/core";
13
+ import { parseAddress, parseRepoPath } from "@skillcdn/core/address";
14
+ import type {
15
+ RestBrowse,
16
+ RestFile,
17
+ RestFind,
18
+ RestMount,
19
+ RestSkill as RestSkillPage,
20
+ } from "@skillcdn/core/rest";
23
21
  import type { PackClient } from "../client.js";
24
22
  import type { RestSkills } from "../schemas.js";
25
23
  import type { SkillsStatus } from "../vocabulary.js";
26
- import { commandLine, NO_LINE_TO_RUN } from "./command-words.js";
27
24
 
28
25
  // The pack of the project, as the command prints it (ADR-0028, ADR-0031, ADR-0124): the console
29
26
  // answers what the pack's REST API answered, in the shapes of @skillcdn/core, and the command
@@ -33,6 +30,44 @@ import { commandLine, NO_LINE_TO_RUN } from "./command-words.js";
33
30
  // comes with its next version. What is here is the console's own: the pack made of the console's
34
31
  // answers, the lines around a listing, and the words of a pack the console could not read,
35
32
  // which is a project's or the organization's and whose token is the console's to hold.
33
+ //
34
+ // This module is the one place of the command that imports @skillcdn/cli and the main entry
35
+ // point of @skillcdn/core, and the command loads it only where a pack is read (ADR-0179):
36
+ // importing either loads the whole of the main repository's library, a quarter of a second
37
+ // every other command would pay for nothing. What the command takes of the library for a read
38
+ // it takes from here.
39
+
40
+ export {
41
+ PackError,
42
+ ReadMisuse,
43
+ readNumber,
44
+ readPack,
45
+ wroteLine,
46
+ } from "@skillcdn/cli";
47
+ export {
48
+ BROWSE_MAX_LIMIT,
49
+ FIND_MAX_LIMIT,
50
+ READ_FILE_MAX_LIMIT,
51
+ utf8Length,
52
+ } from "@skillcdn/core";
53
+
54
+ /**
55
+ * Words as one line printed for a person or an agent to run, after `command`, the command's own
56
+ * words: each spelled by the skillcdn command's own rule (`shellLine` of @skillcdn/cli), so that
57
+ * bash, zsh and PowerShell all take it whole as it is. Nothing where one of them has no such
58
+ * spelling: what to run is then said in a sentence, and no line is printed.
59
+ */
60
+ export function commandLine(command: string, words: readonly string[]): string | undefined {
61
+ const spelled = shellLine(words);
62
+ if (spelled === undefined) {
63
+ return undefined;
64
+ }
65
+ return spelled.length === 0 ? command : `${command} ${spelled}`;
66
+ }
67
+
68
+ /** Why a line is not printed for a person or an agent to run, said in its place. */
69
+ export const NO_LINE_TO_RUN =
70
+ "No line is printed to run: a word of it has no one spelling that bash, zsh and PowerShell all take whole.";
36
71
 
37
72
  /** How the results name the four reads of a pack read with `skills` and `skill`, so that an agent is told the command and not a tool. */
38
73
  export const packWords = (skills: string, skill: string): ToolWords => ({
@@ -255,7 +290,7 @@ function listingStart(cursor: string | undefined, commit: string, count: number)
255
290
  * A document's outline with the reads of its tables and its code blocks named as commands
256
291
  * (ADR-0100): where the console said an address of its own for one, the command that reads it,
257
292
  * `command` being the one the pack is read with, so that an agent is told what to run. Where the
258
- * path has no spelling both shells take whole, what to run is said in words, with why.
293
+ * path has no spelling every shell takes whole, what to run is said in words, with why.
259
294
  */
260
295
  function withDataCommands(read: Ready<RestBrowse>, command: string): Ready<RestBrowse> {
261
296
  const outline = read.outline;
@@ -454,50 +489,6 @@ export function skillsAround(
454
489
  };
455
490
  }
456
491
 
457
- /**
458
- * The `SKILL.md` a path names: the path itself where it names one, else the one in the folder
459
- * it names, since a skill is its folder and a listing cut short shows the folder alone; the
460
- * root's own for the dot, as the root is everywhere.
461
- */
462
- function skillFileOf(given: string): string {
463
- const path = given.replace(/\/+$/, "");
464
- if (path === "" || path === ".") {
465
- return "SKILL.md";
466
- }
467
- return path === "SKILL.md" || path.endsWith("/SKILL.md") ? path : `${path}/SKILL.md`;
468
- }
469
-
470
- /**
471
- * A skill's path as given, or taken out of the URI the listing names it by
472
- * (`skill://<host>/<owner>/<name>/<path>`); a URI of another pack would read this pack's skill
473
- * at the same path, or nothing, so it is said instead.
474
- */
475
- export function skillPathIn(
476
- given: string,
477
- packAddress: string | null,
478
- ): { readonly path: string } | { readonly error: string } {
479
- const uri = parseSkillUri(given);
480
- if (uri === undefined) {
481
- return given.startsWith("skill://")
482
- ? {
483
- error: `Not a skill's URI the console knows: ${given}. Say the path of its SKILL.md from the repository's root, or the URI console skills lists.`,
484
- }
485
- : { path: skillFileOf(given) };
486
- }
487
- const pack = packAddress === null ? undefined : parseAddress(packAddress);
488
- if (
489
- pack?.ok === true &&
490
- (uri.address.host !== pack.value.host ||
491
- uri.address.owner !== pack.value.owner ||
492
- uri.address.repo !== pack.value.repo)
493
- ) {
494
- return {
495
- error: `That URI is of another pack, /${uri.address.host}/${uri.address.owner}/${uri.address.repo}; this project's pack is at ${packAddress}. Say the path of the SKILL.md, or a URI console skills lists.`,
496
- };
497
- }
498
- return { path: uri.path };
499
- }
500
-
501
492
  /** Whether a read of data held nothing, by what the read says it holds: no table, or no code block. */
502
493
  export const holdsNothing = (holds: string | undefined): boolean =>
503
494
  holds !== undefined && /(^| )0 (tables|code blocks)$/.test(holds);
@@ -6,7 +6,6 @@ import { parseArgs } from "node:util";
6
6
  import type { ServerLoad } from "../plugin/load.js";
7
7
  import { isPluginKey, RESERVED_PLUGIN_KEYS } from "../plugin/manifest.js";
8
8
  import { lineRangeFrom, versionOfDependency } from "../plugin/semver.js";
9
- import { commandWord, NO_LINE_TO_RUN } from "./command-words.js";
10
9
  import { checkPlugin, MAX_CHECKED_FILE_BYTES, readConsoleClasses } from "./plugin-check.js";
11
10
  import { LANGUAGE_TAG, nameFromKey, PACKAGE_NAME, writePluginFromTemplate } from "./plugin-init.js";
12
11
 
@@ -204,11 +203,15 @@ async function init(args: readonly string[], io: PluginCliIo): Promise<number> {
204
203
  languages,
205
204
  });
206
205
  io.stdout(`Wrote the plugin ${key} into ${target}: ${written.length} files.\n`);
207
- // The folder as bash and PowerShell both take it whole; where it has no such spelling, it is
208
- // named above, and no line is printed to run.
209
- const into = commandWord(dir);
206
+ // The folder as every shell takes it whole, by the skillcdn command's own rule, whose
207
+ // library is loaded here and by nothing else of this command; where it has no such
208
+ // spelling, it is named above, and no line is printed to run. The plugin is written by
209
+ // then: where the library does not load, that is said all the same, the folder by name.
210
+ const reads = await import("./pack.js").catch(() => undefined);
211
+ const into = reads?.commandLine("", [dir])?.trim();
212
+ const noLine = reads === undefined || into !== undefined ? "" : ` ${reads.NO_LINE_TO_RUN}`;
210
213
  io.stdout(
211
- `Next: ${into === undefined ? "go into that folder" : `cd ${into}`}, install the dependencies (npm install), build (npm run build), run the tests (npm test), and check it as a console would (npm run check). The contract is docs/specs/plugins.md in node_modules/@skillcdn/console/.${into === undefined ? ` ${NO_LINE_TO_RUN}` : ""}\n`,
214
+ `Next: ${into === undefined ? "go into that folder" : `cd ${into}`}, install the dependencies (npm install), build (npm run build), run the tests (npm test), and check it as a console would (npm run check). The contract is docs/specs/plugins.md in node_modules/@skillcdn/console/.${noLine}\n`,
212
215
  );
213
216
  return PLUGIN_EXIT.ok;
214
217
  } catch (error) {
@@ -1,3 +1,4 @@
1
+ import { parseVersion } from "../compat.js";
1
2
  import type { KeptBySource, RunnerState } from "../runner/runner.js";
2
3
 
3
4
  // The runner's own files under the desk's `work/`, as `console runner` reads them back and
@@ -25,6 +26,8 @@ export function runnerStateOf(text: string | undefined): RunnerState | undefined
25
26
  const limited = "limited" in json ? json.limited : undefined;
26
27
  const kept: unknown = "kept" in json ? json.kept : undefined;
27
28
  const began: unknown = "began" in json ? json.began : undefined;
29
+ const unknown: unknown = "unknown" in json ? json.unknown : undefined;
30
+ const newer: unknown = "newer" in json ? json.newer : undefined;
28
31
  if (typeof delivered !== "number" || !Number.isSafeInteger(delivered) || delivered < 0) {
29
32
  return undefined;
30
33
  }
@@ -69,6 +72,20 @@ export function runnerStateOf(text: string | undefined): RunnerState | undefined
69
72
  // When the conversation kept began (ADR-0166): nothing for a file of before, or a number that
70
73
  // is none. One ahead of the machine's clock is the runner's to hold to it, which knows the time.
71
74
  ...(momentOf(began) === undefined ? {} : { began: momentOf(began) }),
75
+ // The kinds of output a driver had no reading for that a record says already (ADR-0182):
76
+ // each a line of the driver's own words, of printable ASCII, a few dozen at the most.
77
+ ...(Array.isArray(unknown)
78
+ ? {
79
+ unknown: unknown
80
+ .filter(
81
+ (what): what is string => typeof what === "string" && /^[ -~]{1,80}$/.test(what),
82
+ )
83
+ .slice(0, 32),
84
+ }
85
+ : {}),
86
+ // The console's version the agent was told a newer command exists for (ADR-0182): a version
87
+ // as the package spells one, or nothing.
88
+ ...(typeof newer === "string" && parseVersion(newer) !== undefined ? { newer } : {}),
72
89
  };
73
90
  }
74
91
 
@@ -0,0 +1,51 @@
1
+ import { parseAddress, parseSkillUri } from "@skillcdn/core/address";
2
+
3
+ // How a skill of a pack is named on the command line: by the path of its `SKILL.md`, by its
4
+ // folder, or by the URI the pack names it by. Apart from the pack the command prints
5
+ // (`pack.ts`), since a note on a skill names one too and reads no pack: this module takes the
6
+ // address scheme alone of the main repository's library, which loads next to nothing
7
+ // (ADR-0179).
8
+
9
+ /**
10
+ * The `SKILL.md` a path names: the path itself where it names one, else the one in the folder
11
+ * it names, since a skill is its folder and a listing cut short shows the folder alone; the
12
+ * root's own for the dot, as the root is everywhere.
13
+ */
14
+ function skillFileOf(given: string): string {
15
+ const path = given.replace(/\/+$/, "");
16
+ if (path === "" || path === ".") {
17
+ return "SKILL.md";
18
+ }
19
+ return path === "SKILL.md" || path.endsWith("/SKILL.md") ? path : `${path}/SKILL.md`;
20
+ }
21
+
22
+ /**
23
+ * A skill's path as given, or taken out of the URI the listing names it by
24
+ * (`skill://<host>/<owner>/<name>/<path>`); a URI of another pack would read this pack's skill
25
+ * at the same path, or nothing, so it is said instead.
26
+ */
27
+ export function skillPathIn(
28
+ given: string,
29
+ packAddress: string | null,
30
+ ): { readonly path: string } | { readonly error: string } {
31
+ const uri = parseSkillUri(given);
32
+ if (uri === undefined) {
33
+ return given.startsWith("skill://")
34
+ ? {
35
+ error: `Not a skill's URI the console knows: ${given}. Say the path of its SKILL.md from the repository's root, or the URI console skills lists.`,
36
+ }
37
+ : { path: skillFileOf(given) };
38
+ }
39
+ const pack = packAddress === null ? undefined : parseAddress(packAddress);
40
+ if (
41
+ pack?.ok === true &&
42
+ (uri.address.host !== pack.value.host ||
43
+ uri.address.owner !== pack.value.owner ||
44
+ uri.address.repo !== pack.value.repo)
45
+ ) {
46
+ return {
47
+ error: `That URI is of another pack, /${uri.address.host}/${uri.address.owner}/${uri.address.repo}; this project's pack is at ${packAddress}. Say the path of the SKILL.md, or a URI console skills lists.`,
48
+ };
49
+ }
50
+ return { path: uri.path };
51
+ }
package/src/client.ts CHANGED
@@ -83,6 +83,11 @@ import {
83
83
  type RestOwnWakes,
84
84
  type RestPackConnect,
85
85
  type RestPackConnectStarted,
86
+ type RestPackNote,
87
+ type RestPackNoteCloseInput,
88
+ type RestPackNoteInput,
89
+ type RestPackNoteLeft,
90
+ type RestPackNotes,
86
91
  type RestPackTokenInput,
87
92
  type RestPeople,
88
93
  type RestPerson,
@@ -205,6 +210,9 @@ import {
205
210
  restOwnWakesSchema,
206
211
  restPackConnectSchema,
207
212
  restPackConnectStartedSchema,
213
+ restPackNoteLeftSchema,
214
+ restPackNoteSchema,
215
+ restPackNotesSchema,
208
216
  restPeopleSchema,
209
217
  restPersonSchema,
210
218
  restPersonWorkBriefSchema,
@@ -819,6 +827,25 @@ export interface ConsoleClient {
819
827
  secretOffers(signal?: AbortSignal): Promise<RestAgentSecretOffers>;
820
828
  takeSecretOffer(id: string, input?: RestAgentSecretOfferTakeInput): Promise<RestAgentSecret>;
821
829
  leaveSecretOffer(id: string): Promise<void>;
830
+ /**
831
+ * The notes on the pack (ADR-0178). One left, by any member, for whoever keeps the pack: on a
832
+ * skill or a page by its path, or with no path for a job no skill fit. The notes the asker
833
+ * reads: everyone's for the keeper and an administrator, their own for anyone else. One
834
+ * closed, with what became of it: by the keeper or an administrator, or by its author, who
835
+ * takes it back.
836
+ */
837
+ leavePackNote(input: RestPackNoteInput): Promise<RestPackNoteLeft>;
838
+ packNotes(
839
+ query?: {
840
+ readonly state?: "open" | "all" | undefined;
841
+ readonly mine?: boolean | undefined;
842
+ readonly path?: string | undefined;
843
+ readonly limit?: number | undefined;
844
+ readonly offset?: number | undefined;
845
+ },
846
+ signal?: AbortSignal,
847
+ ): Promise<RestPackNotes>;
848
+ closePackNote(id: string, input: RestPackNoteCloseInput): Promise<RestPackNote>;
822
849
  /** The invitation that leads a machine to an agent account (ADR-0088), as it stands; for a supervisor. */
823
850
  agentInvitation(handle: string, signal?: AbortSignal): Promise<RestAgentInvitationState>;
824
851
  /** Makes the invitation, in place of the one there was: the code this once, and the command to run with it. */
@@ -1795,6 +1822,29 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
1795
1822
  ),
1796
1823
  leaveSecretOffer: (id) =>
1797
1824
  request("DELETE", `${base}${agentPath("me", "secret-offers", id)}`, undefined, undefined),
1825
+ leavePackNote: (input) =>
1826
+ request("POST", `${base}${REST_ROUTES.packNotes}`, input, restPackNoteLeftSchema),
1827
+ packNotes: (query, signal) =>
1828
+ request(
1829
+ "GET",
1830
+ withQuery(REST_ROUTES.packNotes, {
1831
+ state: query?.state,
1832
+ mine: query?.mine === true ? "true" : undefined,
1833
+ path: query?.path,
1834
+ limit: query?.limit === undefined ? undefined : String(query.limit),
1835
+ offset: query?.offset === undefined ? undefined : String(query.offset),
1836
+ }),
1837
+ undefined,
1838
+ restPackNotesSchema,
1839
+ signal,
1840
+ ),
1841
+ closePackNote: (id, input) =>
1842
+ request(
1843
+ "POST",
1844
+ `${base}${REST_ROUTES.packNotes}/${encodeURIComponent(id)}/close`,
1845
+ input,
1846
+ restPackNoteSchema,
1847
+ ),
1798
1848
  agentSecretAccesses: (handle, query, signal) =>
1799
1849
  request(
1800
1850
  "GET",