@skillcdn/console 0.3.0 → 0.3.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.
Files changed (129) hide show
  1. package/README.md +3 -3
  2. package/dist/api.d.ts +2 -2
  3. package/dist/api.d.ts.map +1 -1
  4. package/dist/api.js +2 -2
  5. package/dist/api.js.map +1 -1
  6. package/dist/cli/cli.d.ts +1 -1
  7. package/dist/cli/cli.d.ts.map +1 -1
  8. package/dist/cli/cli.js +185 -28
  9. package/dist/cli/cli.js.map +1 -1
  10. package/dist/cli/credentials.d.ts +5 -0
  11. package/dist/cli/credentials.d.ts.map +1 -1
  12. package/dist/cli/credentials.js +2 -0
  13. package/dist/cli/credentials.js.map +1 -1
  14. package/dist/cli/directory.d.ts +7 -0
  15. package/dist/cli/directory.d.ts.map +1 -1
  16. package/dist/cli/directory.js +7 -0
  17. package/dist/cli/directory.js.map +1 -1
  18. package/dist/cli/format.d.ts +10 -1
  19. package/dist/cli/format.d.ts.map +1 -1
  20. package/dist/cli/format.js +67 -13
  21. package/dist/cli/format.js.map +1 -1
  22. package/dist/cli/help.d.ts.map +1 -1
  23. package/dist/cli/help.js +30 -13
  24. package/dist/cli/help.js.map +1 -1
  25. package/dist/client.d.ts +26 -1
  26. package/dist/client.d.ts.map +1 -1
  27. package/dist/client.js +14 -1
  28. package/dist/client.js.map +1 -1
  29. package/dist/components/calendar.d.ts +5 -1
  30. package/dist/components/calendar.d.ts.map +1 -1
  31. package/dist/components/calendar.js +3 -3
  32. package/dist/components/calendar.js.map +1 -1
  33. package/dist/components/event-feed.d.ts.map +1 -1
  34. package/dist/components/event-feed.js +2 -0
  35. package/dist/components/event-feed.js.map +1 -1
  36. package/dist/components/pack-connect.d.ts +23 -0
  37. package/dist/components/pack-connect.d.ts.map +1 -0
  38. package/dist/components/pack-connect.js +86 -0
  39. package/dist/components/pack-connect.js.map +1 -0
  40. package/dist/components/pack-token.d.ts +27 -0
  41. package/dist/components/pack-token.d.ts.map +1 -0
  42. package/dist/components/pack-token.js +11 -0
  43. package/dist/components/pack-token.js.map +1 -0
  44. package/dist/components/projects.d.ts +13 -0
  45. package/dist/components/projects.d.ts.map +1 -1
  46. package/dist/components/projects.js +37 -5
  47. package/dist/components/projects.js.map +1 -1
  48. package/dist/components/work.d.ts +3 -1
  49. package/dist/components/work.d.ts.map +1 -1
  50. package/dist/components/work.js +1 -1
  51. package/dist/components/work.js.map +1 -1
  52. package/dist/components/workspace.d.ts +46 -0
  53. package/dist/components/workspace.d.ts.map +1 -0
  54. package/dist/components/workspace.js +124 -0
  55. package/dist/components/workspace.js.map +1 -0
  56. package/dist/console.css +156 -0
  57. package/dist/console.d.ts.map +1 -1
  58. package/dist/console.js +60 -21
  59. package/dist/console.js.map +1 -1
  60. package/dist/data.d.ts +16 -1
  61. package/dist/data.d.ts.map +1 -1
  62. package/dist/data.js +37 -0
  63. package/dist/data.js.map +1 -1
  64. package/dist/dates.d.ts +12 -2
  65. package/dist/dates.d.ts.map +1 -1
  66. package/dist/dates.js +20 -2
  67. package/dist/dates.js.map +1 -1
  68. package/dist/i18n/en.d.ts +53 -0
  69. package/dist/i18n/en.d.ts.map +1 -1
  70. package/dist/i18n/en.js +65 -8
  71. package/dist/i18n/en.js.map +1 -1
  72. package/dist/i18n/ko.d.ts.map +1 -1
  73. package/dist/i18n/ko.js +60 -7
  74. package/dist/i18n/ko.js.map +1 -1
  75. package/dist/index.d.ts +3 -0
  76. package/dist/index.d.ts.map +1 -1
  77. package/dist/index.js +3 -0
  78. package/dist/index.js.map +1 -1
  79. package/dist/router.d.ts +4 -4
  80. package/dist/router.d.ts.map +1 -1
  81. package/dist/router.js +11 -2
  82. package/dist/router.js.map +1 -1
  83. package/dist/routes.d.ts +4 -0
  84. package/dist/routes.d.ts.map +1 -1
  85. package/dist/routes.js +4 -0
  86. package/dist/routes.js.map +1 -1
  87. package/dist/schemas.d.ts +182 -2
  88. package/dist/schemas.d.ts.map +1 -1
  89. package/dist/schemas.js +110 -13
  90. package/dist/schemas.js.map +1 -1
  91. package/dist/vocabulary.d.ts +19 -1
  92. package/dist/vocabulary.d.ts.map +1 -1
  93. package/dist/vocabulary.js +16 -0
  94. package/dist/vocabulary.js.map +1 -1
  95. package/docs/specs/cli.md +16 -11
  96. package/docs/specs/rest.md +31 -8
  97. package/package.json +2 -2
  98. package/skills/building-a-console/SKILL.md +5 -5
  99. package/skills/building-a-console/references/the-look-from-a-website.md +39 -0
  100. package/skills/deploying-a-console/SKILL.md +8 -7
  101. package/skills/working-the-board/SKILL.md +2 -2
  102. package/skills/working-the-board/references/setting-up.md +1 -1
  103. package/skills/working-the-board/references/terms.md +2 -0
  104. package/skills/working-the-board/references/the-sentence.md +1 -1
  105. package/src/api.ts +16 -0
  106. package/src/cli/cli.ts +253 -33
  107. package/src/cli/credentials.ts +7 -0
  108. package/src/cli/directory.ts +9 -0
  109. package/src/cli/format.ts +72 -13
  110. package/src/cli/help.ts +36 -13
  111. package/src/client.ts +84 -0
  112. package/src/components/calendar.tsx +8 -2
  113. package/src/components/event-feed.tsx +2 -0
  114. package/src/components/pack-connect.tsx +179 -0
  115. package/src/components/pack-token.tsx +74 -0
  116. package/src/components/projects.tsx +108 -9
  117. package/src/components/work.tsx +4 -1
  118. package/src/components/workspace.tsx +298 -0
  119. package/src/console.tsx +173 -29
  120. package/src/data.ts +57 -0
  121. package/src/dates.ts +23 -2
  122. package/src/i18n/en.ts +76 -8
  123. package/src/i18n/ko.ts +67 -7
  124. package/src/index.ts +16 -0
  125. package/src/router.ts +17 -5
  126. package/src/routes.ts +4 -0
  127. package/src/schemas.ts +129 -12
  128. package/src/styles/console.css +156 -0
  129. package/src/vocabulary.ts +25 -0
package/README.md CHANGED
@@ -41,7 +41,7 @@ const { items } = await client.tasks({ state: "ready" });
41
41
  npm install -g @skillcdn/console # where the agent runs
42
42
  console login --url https://console.example # shows an address and a code; a person approves, and the token arrives here
43
43
  console project new web "The web app" # a project of your own, as on the pages; member, category and person role do the rest
44
- console use web # the project this directory works in; .skillcdn-console.json, committed
44
+ console use web # the project this directory works in; .skillcdn-console.json, committed; prints the sentence for AGENTS.md
45
45
  console take 7 # a run begins on task #7 of the project, for the person the token is
46
46
  console report "Found the cause: the parser trusts its input."
47
47
  console hand-in ./report.md --label "the report" # a file the console keeps, or an https link
@@ -57,7 +57,7 @@ console serve dist # a console of your own, built
57
57
 
58
58
  - **`console`** is the agent's side of the console ([docs/specs/cli.md](https://github.com/skillcdn/console/blob/main/docs/specs/cli.md)): a thin client of the REST API with no logic of its own, no dependencies beyond the package's, and no cost to an agent until it is used. The package states Node.js 24 as its floor and is tested on it; 22 runs the command today, checked by hand on each release. `console help` says everything an agent needs and `console --version` which version this is; `--json` answers with the console's own JSON; the exit code says whether the console did it (`0`), refused or could not be reached (`1`), did not understand (`2`), or a decision still waits (`3`), or the command and the console do not go together (`4`: the console refuses a command outside the versions it takes, and the command prints the update to make where it is installed, for the machine, in the project or fetched for the run; `console whoami` says both versions and the install, and a command behind or ahead within the range is told once a day on stderr).
59
59
  - **A person signs it in once per console:** `login` checks the token against the console and keeps it as a login, with the console's address and the account, in `$XDG_CONFIG_HOME/skillcdn-console/credentials.json` (`~/.config` when unset); a machine holds a login per console and account, and a token goes only to the console that issued it. `CONSOLE_URL` and `CONSOLE_TOKEN` in the environment, together, stand in for a login at that address, for a hook or a job. A token is never taken on the command line.
60
- - **Configuring, as the person** ([ADR-0021](https://github.com/skillcdn/console/blob/main/docs/adr/0021-a-token-configures-as-its-person-does.md)): `people`, `person role`, `person add`, `person remove`, `person deactivate`, `person reactivate`, `project new`, `project edit`, `project icon`, `members`, `member add`, `member role`, `member remove`, `category new`, `category edit`, `category remove` and `rules write` do what an administrator or an owner does on the pages, with the same refusals (`auth.forbidden` where the person may not), and the event names the agent beside the person. The tokens themselves have no command but `logout`, which gives the command's own up: they are made and removed on the Agents page, signed in.
60
+ - **Configuring, as the person** ([ADR-0021](https://github.com/skillcdn/console/blob/main/docs/adr/0021-a-token-configures-as-its-person-does.md)): `workspace`, `workspace edit`, `people`, `person role`, `person add`, `person remove`, `person deactivate`, `person reactivate`, `project new`, `project edit`, `project icon`, `members`, `member add`, `member role`, `member remove`, `category new`, `category edit`, `category remove` and `rules write` do what an administrator or an owner does on the pages, with the same refusals (`auth.forbidden` where the person may not), and the event names the agent beside the person. The tokens themselves have no command but `logout`, which gives the command's own up: they are made and removed on the Agents page, signed in.
61
61
  - **The project's pack** is read as the `skillcdn` command reads one ([ADR-0031](https://github.com/skillcdn/console/blob/main/docs/adr/0031-the-console-reads-a-pack-as-the-skillcdn-command-does-and-a-local-one-from-a-directory.md)): `console skills` prints what a client is told on connect and every skill and document, `console skills <folder>` a folder whole, `console skills --search <words>` what the words find, `console skill <path>` a skill whole with its rules first, and `console skill --file <path>` a file, each rendered with the main repository's own renderers and the reads named as the console's commands, so that an agent reads here what it would read over MCP; a pack is at a SkillCDN deployment, or in a directory on the console's machine where no deployment is reachable.
62
62
  - **The project's documents** are the agent's to read and write: `docs`, `doc`, `write`, `attach`, `archive` and `restore`, by path; a link in a body to a page's path refers to the page.
63
63
  - **Every command on the board works in one project:** `--project <key>`, else `CONSOLE_PROJECT`, else what `console use <key>` wrote to `.skillcdn-console.json` in the working directory or one above it, a file meant to be committed. `console projects` lists the projects the person may work in.
@@ -76,7 +76,7 @@ createConsole({
76
76
  }).mount(document.getElementById("root"));
77
77
  ```
78
78
 
79
- - **The components** take their data as props and nothing from the network: `Board` (one column per state, the sooner due first; given `onMove`, a card is dragged to another column with a mouse, or with a finger that rests on it a moment first; given `editHref` and `onArchive`, each card has a menu with the way to the task's form and, once it is done or dropped, the way to put it away), `TaskCard`, `BoardFilters` with `filterTasks` and `byDue` (the board narrowed by category, goal, person and one's own), `TaskList` (tasks as rows, a page at a time), `TaskView` (one task with its plan, its moments, its decisions and its parts), `TaskForm` (with the `categories` and the `goals` to choose from), `Calendar` and `Workload` with `workloadOf` (a month with each task across its planned days, a bar in a lane of its own, or on its one day, a due day or a start, the person who has each before its title, with a legend of the colours of the `categories` given, and who has what; `weekSegments` lays the bars; `TaskTip` is the task under the pointer in full, with the facts its page lists, within its item and above or below it as `placeTip` says, where there is more room, its goal named from the `goals` given; the composition narrows the page with `BoardFilters` as it does the board, the address carrying the filter with the month), `GoalList`, `GoalView` and `GoalForm` (the roadmap, one goal with its tasks by state, and the way to set one, with the `categories` to sort it into and its start and target days, ADR-0026), `GoalTimeline` with `timelineBars` (the roadmap as months: six from the month given, each goal planned in days a bar from its start to its target in the colour of its category, filled as far as its tasks are done, today marked, and the goals without days named below; `Calendar` given `goalHref` marks each goal's target day on the month), `WorkList` (a person's own work across projects), `CategoryList` (the categories, with the ways an administrator keeps them), `DecisionList` and `DecisionCard` (the waiting ones as cards, each with the way to answer, one of the options or a line of one's own; the answered ones as the record, `DecisionLog`, a row each with who asked and when, through which agent, the answer with the word given, marked when it is the person's own, and who answered and when, twenty to a page, each page at an address given `pageHref` and `page`, or turned in place), `DecisionForm`, `EventFeed` (a sentence per event, newest first, a page at a time; `describeEvent` makes the sentence), `Shell` (the header with the workspace, the project, the tabs of the pages and the person's menu), `SignIn` (one button per provider the deployment offers), `TokenList`, `TokenForm` and `NewToken` (the agents a person connected, as the tokens they hold, the way to make one by hand, and the one just made with its secret shown once), `ConnectCodeForm`, `ConnectApproval` and `ConnectWords` (an agent connecting with a code: where the code is typed, what asks under it with the way to approve or refuse it, and what to tell the agent; `ConnectPage` composes the first two for a code), `PeopleList` (everyone in, with what each is and what let them in, the logins let in that nobody signed in with yet, and the deactivated, with the ways for an administrator to change a role, take a person out or back in, and take a listing away) and `ListingForm` (where an administrator lets someone in by login), `ProjectMark` (a project's mark: its own image when it has one, else its symbol on its colour, or the ones chosen from its key and its name; `sm`, `md` or `lg`), `ProjectList`, `ProjectForm` and `MemberList` (the projects a person may see with what they are in each, the way to make or change one, its mark included, with an image chosen for it (`onSubmit` gets the file, or `null` to take the image away), and those listed in a project with the way for an owner to add, change and remove them; `ProjectRoleBadge`, `PROJECT_ROLE_LABELS`, `VISIBILITY_LABELS` and `keyOf` with them), `SkillList` (a project's skills as SkillCDN serves them at its address, each with where a person reads it and what an agent loads it by, and how an agent is connected to it), `RulesView` and `RulesForm` (the rules of the board, ADR-0023: what holds and where it comes from, the console's own, a page written or none, with `{language}` filled with the language the pages speak, folded under its facts where asked, and the ways to write them, put them away and go back to the console's own for whoever may; the form starts from what holds and saves nothing that would change nothing), `FolderView`, `DocumentList`, `DocumentSearch`, `DocumentView`, `DocumentForm`, `DocumentFiles` and `DocumentCrumbs` (a project's documents: a folder's folders and pages, the way to find pages by their words, one page with its versions, what it links to, what refers to it and its files, a picture among them shown where the body names it, and the forms to write and attach, a picture pasted into the body attached once the page is written; `DocsPage` composes them for a path), `RunList` and `RunCard` (an agent's run on a task: what it reported, what it handed in, links and files alike, a picture among them small and large as a comment's is and placed in a report by its file name, what it waits for, and when an open one was last heard from; `RunStatusBadge` and `RUN_STATUS_LABELS` with them, and `fileHref` for where a file is read), `TaskThread`, `CommentCard` and `CommentForm` (the discussion on a task, ADR-0024: the comments, the runs and the decisions as one thread in the order they came, which `threadOf` orders, each comment with who said it, through which agent, its text with the pictures it names in place and its other files after it, pictures being what `isPicture` says, and the form at the end, where a picture pasted in goes with the comment; `TaskView` shows the thread given `comments` and `onComment`, and its `fileHref` names any file of the project by its id), and `Markdown`, which renders what people and agents wrote as elements, never as HTML, with links to the web only and pictures over https only, or, given `fileSrc`, from the file of that name, and, given `docHref`, a link to a page's path as a link to the page. `DecisionCard` reads as a record, with the context, the rationale and what followed, which `onUpdate` lets a person write. The small blocks (`Button`, `CopyButton` (a text put on the clipboard), `Badge`, `Avatar` (`xs` to `lg`), `PersonChip` with `personName` (a person by the name the host gives, the login where there is none), `Callout`, `EmptyState`, `Spinner`, `Time`, `Day`, `CategoryBadge`, `DueBadge`, `GoalStateBadge`, `ProgressBar`, `ShowMore` with `usePaged` and `PAGE_SIZE`, a long list growing a page at a time, and `Pager` with `pageOf` and `RECORD_PAGE_SIZE`, a list turned by pages), the words of the vocabulary (`STATE_LABELS`, `PRIORITY_LABELS`, `ROLE_LABELS`, with `RoleBadge`) and the day helpers (`today`, `addDays`, `daysBetween`, `monthGrid`, `formatDay`, `formatMonth` and the rest, days being the strings the API spells them as) are exported too.
79
+ - **The components** take their data as props and nothing from the network: `Board` (one column per state, the sooner due first; given `onMove`, a card is dragged to another column with a mouse, or with a finger that rests on it a moment first; given `editHref` and `onArchive`, each card has a menu with the way to the task's form and, once it is done or dropped, the way to put it away), `TaskCard`, `BoardFilters` with `filterTasks` and `byDue` (the board narrowed by category, goal, person and one's own), `TaskList` (tasks as rows, a page at a time), `TaskView` (one task with its plan, its moments, its decisions and its parts), `TaskForm` (with the `categories` and the `goals` to choose from), `Calendar` and `Workload` with `workloadOf` (a month with each task across its planned days, a bar in a lane of its own, or on its one day, a due day or a start, the person who has each before its title, with a legend of the colours of the `categories` given, and who has what; `weekSegments` lays the bars; `TaskTip` is the task under the pointer in full, with the facts its page lists, within its item and above or below it as `placeTip` says, where there is more room, its goal named from the `goals` given; the composition narrows the page with `BoardFilters` as it does the board, the address carrying the filter with the month), `GoalList`, `GoalView` and `GoalForm` (the roadmap, one goal with its tasks by state, and the way to set one, with the `categories` to sort it into and its start and target days, ADR-0026), `GoalTimeline` with `timelineBars` (the roadmap as months: six from the month given, each goal planned in days a bar from its start to its target in the colour of its category, filled as far as its tasks are done, today marked, and the goals without days named below; `Calendar` given `goalHref` marks each goal's target day on the month), `WorkList` (a person's own work across projects), `CategoryList` (the categories, with the ways an administrator keeps them), `DecisionList` and `DecisionCard` (the waiting ones as cards, each with the way to answer, one of the options or a line of one's own; the answered ones as the record, `DecisionLog`, a row each with who asked and when, through which agent, the answer with the word given, marked when it is the person's own, and who answered and when, twenty to a page, each page at an address given `pageHref` and `page`, or turned in place), `DecisionForm`, `EventFeed` (a sentence per event, newest first, a page at a time; `describeEvent` makes the sentence), `Shell` (the header with the workspace, the project, the tabs of the pages and the person's menu), `SignIn` (one button per provider the deployment offers), `TokenList`, `TokenForm` and `NewToken` (the agents a person connected, as the tokens they hold, the way to make one by hand, and the one just made with its secret shown once), `ConnectCodeForm`, `ConnectApproval` and `ConnectWords` (an agent connecting with a code: where the code is typed, what asks under it with the way to approve or refuse it, and what to tell the agent; `ConnectPage` composes the first two for a code), `PeopleList` (everyone in, with what each is and what let them in, the logins let in that nobody signed in with yet, and the deactivated, with the ways for an administrator to change a role, take a person out or back in, and take a listing away) and `ListingForm` (where an administrator lets someone in by login), `ProjectMark` (a project's mark: its own image when it has one, else its symbol on its colour, or the ones chosen from its key and its name; `sm`, `md` or `lg`), `ProjectList`, `ProjectForm` and `MemberList` (the projects a person may see with what they are in each, the way to make or change one, its mark included, with an image chosen for it (`onSubmit` gets the file, or `null` to take the image away), and those listed in a project with the way for an owner to add, change and remove them; `ProjectRoleBadge`, `PROJECT_ROLE_LABELS`, `VISIBILITY_LABELS` and `keyOf` with them), `PackTokenForm`, `PackConnect` and `PackTokenWays` (the SkillCDN token a private pack is read with: pasted, or connected with a code approved at SkillCDN, the console asked again at the interval the deployment named; and the two ways side by side, as a project's Settings page and the workspace's offer them), `WorkspaceSettingsView` and `WorkspaceSettingsForm` (the workspace's settings as rows: who sees whom, the day the week begins on and the time zone, picked by area with `timeZoneGroups`, `deviceTimeZone` and `offsetOf`), `SkillList` (a project's skills as SkillCDN serves them at its address, each with where a person reads it and what an agent loads it by, and how an agent is connected to it), `RulesView` and `RulesForm` (the rules of the board, ADR-0023: what holds and where it comes from, the console's own, a page written or none, with `{language}` filled with the language the pages speak, folded under its facts where asked, and the ways to write them, put them away and go back to the console's own for whoever may; the form starts from what holds and saves nothing that would change nothing), `FolderView`, `DocumentList`, `DocumentSearch`, `DocumentView`, `DocumentForm`, `DocumentFiles` and `DocumentCrumbs` (a project's documents: a folder's folders and pages, the way to find pages by their words, one page with its versions, what it links to, what refers to it and its files, a picture among them shown where the body names it, and the forms to write and attach, a picture pasted into the body attached once the page is written; `DocsPage` composes them for a path), `RunList` and `RunCard` (an agent's run on a task: what it reported, what it handed in, links and files alike, a picture among them small and large as a comment's is and placed in a report by its file name, what it waits for, and when an open one was last heard from; `RunStatusBadge` and `RUN_STATUS_LABELS` with them, and `fileHref` for where a file is read), `TaskThread`, `CommentCard` and `CommentForm` (the discussion on a task, ADR-0024: the comments, the runs and the decisions as one thread in the order they came, which `threadOf` orders, each comment with who said it, through which agent, its text with the pictures it names in place and its other files after it, pictures being what `isPicture` says, and the form at the end, where a picture pasted in goes with the comment; `TaskView` shows the thread given `comments` and `onComment`, and its `fileHref` names any file of the project by its id), and `Markdown`, which renders what people and agents wrote as elements, never as HTML, with links to the web only and pictures over https only, or, given `fileSrc`, from the file of that name, and, given `docHref`, a link to a page's path as a link to the page. `DecisionCard` reads as a record, with the context, the rationale and what followed, which `onUpdate` lets a person write. The small blocks (`Button`, `CopyButton` (a text put on the clipboard), `Badge`, `Avatar` (`xs` to `lg`), `PersonChip` with `personName` (a person by the name the host gives, the login where there is none), `Callout`, `EmptyState`, `Spinner`, `Time`, `Day`, `CategoryBadge`, `DueBadge`, `GoalStateBadge`, `ProgressBar`, `ShowMore` with `usePaged` and `PAGE_SIZE`, a long list growing a page at a time, and `Pager` with `pageOf` and `RECORD_PAGE_SIZE`, a list turned by pages), the words of the vocabulary (`STATE_LABELS`, `PRIORITY_LABELS`, `ROLE_LABELS`, with `RoleBadge`) and the day helpers (`today`, `addDays`, `daysBetween`, `monthGrid`, `formatDay`, `formatMonth` and the rest, days being the strings the API spells them as) are exported too.
80
80
  - **The composition:** `createConsole(config)` returns `{ App, mount }`. `App` is the whole console as one component; `mount(container)` renders it and returns the way to take it down. `config.baseUrl` is the origin of the API (the page's own when left out), `config.components` the pieces to replace (`ConsoleComponents` names them with the props each takes), `config.languages` the packs the pages speak, `config.brand` the addresses of a symbol and a wordmark to show beside the name (ADR-0013; the default console passes those of `@skillcdn/brand`, the main repository's package of its marks), `config.client` a client of your own, for tests. The SkillCDN name and marks are trademarks of KDX Labs under the main repository's trademark policy, not under this package's MIT license; a custom console brings its own marks through the same slot. A console that holds a token rather than a session (one of your own, served by `console serve`) is told so by the API (`me.agent`, the token's name) and offers nothing a token cannot do: no agents page and no sign-out, since the tokens themselves are a person's own doing; everything else, configuring included, it does on the token as the person (ADR-0021), and it keeps the choice of language on the person. The pages route in the browser and every form has an address (ADR-0010): the projects at `/`, the person's own work at `/work`, the workspace's settings at `/settings` (its rules, its categories at `/categories`, where its skills come from), a project's pages under `/projects/<key>` (its roadmap, calendar and settings among them), a task by its number, a goal and a decision by their ids, a document by its path, and the query for how a page is shown, the board's filters, the calendar's month, the week of the person's work and the settings' forms among it (`matchRoute(pathname, search)`, `PATHS`, `projectHref`, `boardHref`, `taskHref`, `goalHref`, `calendarHref`, `workHref`, `personWorkHref`, `decisionHref`, `docHref`, `settingsHref`, `projectSettingsHref`, `newTaskHref`, `newGoalHref`, `newDecisionHref`, and `movedFrom` for the addresses of before); every link to one of them is followed in place, with one history entry per step; the workspace is loaded once and the project the page is on whole, kept current by the project's stream (`useConsoleData(client, projectKey)`, for a composition of your own).
81
81
  - **Pages of your own:** `config.pages` adds tabs beside the console's. Each is a `CustomPage`: a `key` (what the address says: `/pages/<key>` on the workspace, `/projects/<project>/pages/<key>` on a project), a `label` (one word, or a word by language tag with `en` standing in), a `level` (`workspace`, or `project` for a tab on every project), `wide` for a page that takes the whole window, and `render(context)`, which gets what the default pages get: the `data` of `useConsoleData` with its actions, the `project` the page is on, the `client`, the `navigation`, the `words` and the `language`. `customPageHref` names the address and `customPageLabel` the tab's word. A page that is not among the pages given shows nothing there.
82
82
  - **The languages:** every word the pages show is in a pack (`Messages`, keyed as `en` is), English and Korean ship (`ENGLISH`, `KOREAN`, `DEFAULT_LANGUAGES`), and a component takes its words from the language above it (`useWords`, `useLanguage`, `LanguageContext`), English where there is none. The person's choice is kept on them (`client.updateMe({ language })`) and the browser's languages decide before one (`chooseLanguage`, `packFor`). `createConsole({ languages })` replaces the packs the default console speaks, so that a custom console adds a language of its own; a pack is complete by type.
package/dist/api.d.ts CHANGED
@@ -7,7 +7,7 @@ export { DEFAULT_PAGE_LIMIT, DEFAULT_TOKEN_DAYS, EVENTS_PAGE_LIMIT, LIST_LIMIT,
7
7
  export { projectColorOf, projectSymbolOf } from "./marks.js";
8
8
  export { AUTH_ROUTES, CLAIM_PATH, categoryPath, connectPath, isSignInFailure, loginPath, PROJECT_COLLECTIONS, type ProjectCollection, personTokensPath, personWorkPath, projectIconPath, projectPath, REST_ROUTES, RETURN_TO_PARAM, restPath, rulesPath, SIGN_IN_FAILURES, SIGN_IN_PARAM, type SignInFailure, signInPath, } from "./routes.js";
9
9
  export { fillRules, isReferenceRules, languageNameOf, PROJECT_RULES_TEMPLATE, REFERENCE_RULES, RULES_LANGUAGE_PLACEHOLDER, RULES_PATH, RULES_TITLE, } from "./rules.js";
10
- export { hostOfLogin, isLoginAt, type RestAnswerInput, type RestArchivedTasks, type RestArchiveTasksInput, type RestArtifact, type RestArtifactInput, type RestBacklink, type RestCategories, type RestCategory, type RestCategoryInput, type RestCategoryPatch, type RestClaim, type RestClaimInput, type RestComment, type RestCommentFile, type RestCommentInput, type RestComments, type RestConnectInput, type RestConnection, type RestConnectRequest, type RestDecision, type RestDecisionInput, type RestDecisionOption, type RestDecisionPatch, type RestDecisions, type RestDocument, type RestDocumentFile, type RestDocumentInput, type RestDocumentLink, type RestDocumentSummary, type RestDocuments, type RestError, type RestEvent, type RestEventData, type RestEvents, type RestFile, type RestFileInput, type RestGoal, type RestGoalInput, type RestGoalPatch, type RestGoals, type RestListing, type RestListingInput, type RestMe, type RestMember, type RestMemberInput, type RestMemberPatch, type RestMembers, type RestMePatch, type RestOrganization, type RestPackRefusal, type RestPackTokenInput, type RestPeople, type RestPerson, type RestPersonPatch, type RestPersonWork, type RestProject, type RestProjectIcon, type RestProjectInput, type RestProjectPatch, type RestProjectRules, type RestProjects, type RestProvider, type RestReport, type RestReportInput, type RestRules, type RestRulesInput, type RestRun, type RestRunEndInput, type RestRunInput, type RestRuns, type RestSkill, type RestSkillBrowse, type RestSkillFile, type RestSkillFind, type RestSkillLoad, type RestSkills, type RestTask, type RestTaskCounts, type RestTaskInput, type RestTaskLink, type RestTaskPatch, type RestTasks, type RestToken, type RestTokenCreated, type RestTokenInput, type RestTokens, type RestVersion, type RestVersionSummary, type RestVersions, type RestWork, restAnswerInputSchema, restArchivedTasksSchema, restArchiveTasksInputSchema, restArtifactInputSchema, restArtifactSchema, restBacklinkSchema, restCategoriesSchema, restCategoryInputSchema, restCategoryPatchSchema, restCategorySchema, restClaimInputSchema, restClaimSchema, restCommentFileSchema, restCommentInputSchema, restCommentSchema, restCommentsSchema, restConnectInputSchema, restConnectionSchema, restConnectRequestSchema, restDecisionInputSchema, restDecisionOptionSchema, restDecisionPatchSchema, restDecisionSchema, restDecisionsSchema, restDocumentFileSchema, restDocumentInputSchema, restDocumentLinkSchema, restDocumentSchema, restDocumentSummarySchema, restDocumentsSchema, restErrorSchema, restEventDataSchema, restEventSchema, restEventsSchema, restFileInputSchema, restFileSchema, restGoalInputSchema, restGoalPatchSchema, restGoalSchema, restGoalsSchema, restListingInputSchema, restListingSchema, restMemberInputSchema, restMemberPatchSchema, restMemberSchema, restMembersSchema, restMePatchSchema, restMeSchema, restOrganizationSchema, restPackRefusalSchema, restPackTokenInputSchema, restPeopleSchema, restPersonPatchSchema, restPersonSchema, restPersonWorkSchema, restProjectIconSchema, restProjectInputSchema, restProjectPatchSchema, restProjectRulesSchema, restProjectSchema, restProjectsSchema, restProviderSchema, restReportInputSchema, restReportSchema, restRulesInputSchema, restRulesSchema, restRunEndInputSchema, restRunInputSchema, restRunSchema, restRunsSchema, restSkillBrowseSchema, restSkillFileSchema, restSkillFindSchema, restSkillLoadSchema, restSkillSchema, restSkillsSchema, restTaskCountsSchema, restTaskInputSchema, restTaskLinkSchema, restTaskPatchSchema, restTaskSchema, restTasksSchema, restTokenCreatedSchema, restTokenInputSchema, restTokenSchema, restTokensSchema, restVersionSchema, restVersionSummarySchema, restVersionsSchema, restWorkSchema, } from "./schemas.js";
10
+ export { hostOfLogin, isLoginAt, type RestAnswerInput, type RestArchivedTasks, type RestArchiveTasksInput, type RestArtifact, type RestArtifactInput, type RestBacklink, type RestCategories, type RestCategory, type RestCategoryInput, type RestCategoryPatch, type RestClaim, type RestClaimInput, type RestComment, type RestCommentFile, type RestCommentInput, type RestComments, type RestConnectInput, type RestConnection, type RestConnectRequest, type RestDecision, type RestDecisionInput, type RestDecisionOption, type RestDecisionPatch, type RestDecisions, type RestDocument, type RestDocumentFile, type RestDocumentInput, type RestDocumentLink, type RestDocumentSummary, type RestDocuments, type RestError, type RestEvent, type RestEventData, type RestEvents, type RestFile, type RestFileInput, type RestGoal, type RestGoalInput, type RestGoalPatch, type RestGoals, type RestListing, type RestListingInput, type RestMe, type RestMember, type RestMemberInput, type RestMemberPatch, type RestMembers, type RestMePatch, type RestOrganization, type RestPackConnect, type RestPackConnectStarted, type RestPackRefusal, type RestPackTokenInput, type RestPeople, type RestPerson, type RestPersonPatch, type RestPersonWork, type RestProject, type RestProjectIcon, type RestProjectInput, type RestProjectPatch, type RestProjectRules, type RestProjects, type RestProvider, type RestReport, type RestReportInput, type RestRules, type RestRulesInput, type RestRun, type RestRunEndInput, type RestRunInput, type RestRuns, type RestSkill, type RestSkillBrowse, type RestSkillFile, type RestSkillFind, type RestSkillLoad, type RestSkills, type RestTask, type RestTaskCounts, type RestTaskInput, type RestTaskLink, type RestTaskPatch, type RestTasks, type RestToken, type RestTokenCreated, type RestTokenInput, type RestTokens, type RestVersion, type RestVersionSummary, type RestVersions, type RestWork, type RestWorkspace, type RestWorkspacePackConnect, type RestWorkspacePatch, restAnswerInputSchema, restArchivedTasksSchema, restArchiveTasksInputSchema, restArtifactInputSchema, restArtifactSchema, restBacklinkSchema, restCategoriesSchema, restCategoryInputSchema, restCategoryPatchSchema, restCategorySchema, restClaimInputSchema, restClaimSchema, restCommentFileSchema, restCommentInputSchema, restCommentSchema, restCommentsSchema, restConnectInputSchema, restConnectionSchema, restConnectRequestSchema, restDecisionInputSchema, restDecisionOptionSchema, restDecisionPatchSchema, restDecisionSchema, restDecisionsSchema, restDocumentFileSchema, restDocumentInputSchema, restDocumentLinkSchema, restDocumentSchema, restDocumentSummarySchema, restDocumentsSchema, restErrorSchema, restEventDataSchema, restEventSchema, restEventsSchema, restFileInputSchema, restFileSchema, restGoalInputSchema, restGoalPatchSchema, restGoalSchema, restGoalsSchema, restListingInputSchema, restListingSchema, restMemberInputSchema, restMemberPatchSchema, restMemberSchema, restMembersSchema, restMePatchSchema, restMeSchema, restOrganizationSchema, restPackConnectSchema, restPackConnectStartedSchema, restPackRefusalSchema, restPackTokenInputSchema, restPeopleSchema, restPersonPatchSchema, restPersonSchema, restPersonWorkSchema, restProjectIconSchema, restProjectInputSchema, restProjectPatchSchema, restProjectRulesSchema, restProjectSchema, restProjectsSchema, restProviderSchema, restReportInputSchema, restReportSchema, restRulesInputSchema, restRulesSchema, restRunEndInputSchema, restRunInputSchema, restRunSchema, restRunsSchema, restSkillBrowseSchema, restSkillFileSchema, restSkillFindSchema, restSkillLoadSchema, restSkillSchema, restSkillsSchema, restTaskCountsSchema, restTaskInputSchema, restTaskLinkSchema, restTaskPatchSchema, restTaskSchema, restTasksSchema, restTokenCreatedSchema, restTokenInputSchema, restTokenSchema, restTokensSchema, restVersionSchema, restVersionSummarySchema, restVersionsSchema, restWorkSchema, restWorkspacePackConnectSchema, restWorkspacePatchSchema, restWorkspaceSchema, } from "./schemas.js";
11
11
  export { hasForbiddenCodePoint } from "./text.js";
12
- export { ARTIFACT_KINDS, type ArtifactKind, CATEGORY_COLORS, type CategoryColor, COLOR_NAMES, type ColorName, EVENT_KINDS, type EventKind, GOAL_STATES, type GoalState, isProviderKey, LINK_SOURCES, type LinkSource, MEMBERSHIP_SOURCES, type MembershipSource, OPEN_TASK_STATES, PERSON_ROLES, PERSON_STATUSES, type PersonRole, type PersonStatus, PROJECT_ICON_TYPES, PROJECT_ROLES, PROJECT_VISIBILITIES, PROVIDER_KEYS, type ProjectIconType, type ProjectRole, type ProjectVisibility, type ProviderKey, RULES_SOURCES, RUN_ENDINGS, RUN_STATUSES, type RulesSource, type RunEnding, type RunStatus, SKILLS_STATUSES, type SkillsStatus, TASK_PRIORITIES, TASK_STATES, type TaskPriority, type TaskState, } from "./vocabulary.js";
12
+ export { ARTIFACT_KINDS, type ArtifactKind, CATEGORY_COLORS, type CategoryColor, COLOR_NAMES, type ColorName, EVENT_KINDS, type EventKind, GOAL_STATES, type GoalState, isProviderKey, LINK_SOURCES, type LinkSource, MEMBERSHIP_SOURCES, type MembershipSource, OPEN_TASK_STATES, PACK_CONNECT_ENDINGS, type PackConnectEnding, PEOPLE_VISIBILITIES, PERSON_ROLES, PERSON_STATUSES, type PeopleVisibility, type PersonRole, type PersonStatus, PROJECT_ICON_TYPES, PROJECT_ROLES, PROJECT_VISIBILITIES, PROVIDER_KEYS, type ProjectIconType, type ProjectRole, type ProjectVisibility, type ProviderKey, RULES_SOURCES, RUN_ENDINGS, RUN_STATUSES, type RulesSource, type RunEnding, type RunStatus, SKILLS_STATUSES, type SkillsStatus, TASK_PRIORITIES, TASK_STATES, type TaskPriority, type TaskState, WEEK_STARTS, type WeekStart, } from "./vocabulary.js";
13
13
  //# sourceMappingURL=api.d.ts.map
package/dist/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,IAAI,EACT,KAAK,aAAa,EAClB,KAAK,UAAU,GAChB,MAAM,aAAa,CAAC;AACrB,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kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,eAAe,EACf,KAAK,YAAY,EACjB,eAAe,EACf,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,SAAS,GACf,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,IAAI,EACT,KAAK,aAAa,EAClB,KAAK,UAAU,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,WAAW,EACX,eAAe,EACf,WAAW,EACX,eAAe,EACf,WAAW,EACX,aAAa,EACb,OAAO,EACP,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,cAAc,EACd,KAAK,OAAO,EACZ,KAAK,YAAY,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,oBAAoB,GACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,aAAa,EACb,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,MAAM,GACP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,kBAAkB,EA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jB,KAAK,SAAS,EACd,WAAW,EACX,KAAK,SAAS,GACf,MAAM,iBAAiB,CAAC"}
package/dist/api.js CHANGED
@@ -11,7 +11,7 @@ export { DEFAULT_PAGE_LIMIT, DEFAULT_TOKEN_DAYS, EVENTS_PAGE_LIMIT, LIST_LIMIT,
11
11
  export { projectColorOf, projectSymbolOf } from "./marks.js";
12
12
  export { AUTH_ROUTES, CLAIM_PATH, categoryPath, connectPath, isSignInFailure, loginPath, PROJECT_COLLECTIONS, personTokensPath, personWorkPath, projectIconPath, projectPath, REST_ROUTES, RETURN_TO_PARAM, restPath, rulesPath, SIGN_IN_FAILURES, SIGN_IN_PARAM, signInPath, } from "./routes.js";
13
13
  export { fillRules, isReferenceRules, languageNameOf, PROJECT_RULES_TEMPLATE, REFERENCE_RULES, RULES_LANGUAGE_PLACEHOLDER, RULES_PATH, RULES_TITLE, } from "./rules.js";
14
- export { hostOfLogin, isLoginAt, restAnswerInputSchema, restArchivedTasksSchema, restArchiveTasksInputSchema, restArtifactInputSchema, restArtifactSchema, restBacklinkSchema, restCategoriesSchema, restCategoryInputSchema, restCategoryPatchSchema, restCategorySchema, restClaimInputSchema, restClaimSchema, restCommentFileSchema, restCommentInputSchema, restCommentSchema, restCommentsSchema, restConnectInputSchema, restConnectionSchema, restConnectRequestSchema, restDecisionInputSchema, restDecisionOptionSchema, restDecisionPatchSchema, restDecisionSchema, restDecisionsSchema, restDocumentFileSchema, restDocumentInputSchema, restDocumentLinkSchema, restDocumentSchema, restDocumentSummarySchema, restDocumentsSchema, restErrorSchema, restEventDataSchema, restEventSchema, restEventsSchema, restFileInputSchema, restFileSchema, restGoalInputSchema, restGoalPatchSchema, restGoalSchema, restGoalsSchema, restListingInputSchema, restListingSchema, restMemberInputSchema, restMemberPatchSchema, restMemberSchema, restMembersSchema, restMePatchSchema, restMeSchema, restOrganizationSchema, restPackRefusalSchema, restPackTokenInputSchema, restPeopleSchema, restPersonPatchSchema, restPersonSchema, restPersonWorkSchema, restProjectIconSchema, restProjectInputSchema, restProjectPatchSchema, restProjectRulesSchema, restProjectSchema, restProjectsSchema, restProviderSchema, restReportInputSchema, restReportSchema, restRulesInputSchema, restRulesSchema, restRunEndInputSchema, restRunInputSchema, restRunSchema, restRunsSchema, restSkillBrowseSchema, restSkillFileSchema, restSkillFindSchema, restSkillLoadSchema, restSkillSchema, restSkillsSchema, restTaskCountsSchema, restTaskInputSchema, restTaskLinkSchema, restTaskPatchSchema, restTaskSchema, restTasksSchema, restTokenCreatedSchema, restTokenInputSchema, restTokenSchema, restTokensSchema, restVersionSchema, restVersionSummarySchema, restVersionsSchema, restWorkSchema, } from "./schemas.js";
14
+ export { hostOfLogin, isLoginAt, restAnswerInputSchema, restArchivedTasksSchema, restArchiveTasksInputSchema, restArtifactInputSchema, restArtifactSchema, restBacklinkSchema, restCategoriesSchema, restCategoryInputSchema, restCategoryPatchSchema, restCategorySchema, restClaimInputSchema, restClaimSchema, restCommentFileSchema, restCommentInputSchema, restCommentSchema, restCommentsSchema, restConnectInputSchema, restConnectionSchema, restConnectRequestSchema, restDecisionInputSchema, restDecisionOptionSchema, restDecisionPatchSchema, restDecisionSchema, restDecisionsSchema, restDocumentFileSchema, restDocumentInputSchema, restDocumentLinkSchema, restDocumentSchema, restDocumentSummarySchema, restDocumentsSchema, restErrorSchema, restEventDataSchema, restEventSchema, restEventsSchema, restFileInputSchema, restFileSchema, restGoalInputSchema, restGoalPatchSchema, restGoalSchema, restGoalsSchema, restListingInputSchema, restListingSchema, restMemberInputSchema, restMemberPatchSchema, restMemberSchema, restMembersSchema, restMePatchSchema, restMeSchema, restOrganizationSchema, restPackConnectSchema, restPackConnectStartedSchema, restPackRefusalSchema, restPackTokenInputSchema, restPeopleSchema, restPersonPatchSchema, restPersonSchema, restPersonWorkSchema, restProjectIconSchema, restProjectInputSchema, restProjectPatchSchema, restProjectRulesSchema, restProjectSchema, restProjectsSchema, restProviderSchema, restReportInputSchema, restReportSchema, restRulesInputSchema, restRulesSchema, restRunEndInputSchema, restRunInputSchema, restRunSchema, restRunsSchema, restSkillBrowseSchema, restSkillFileSchema, restSkillFindSchema, restSkillLoadSchema, restSkillSchema, restSkillsSchema, restTaskCountsSchema, restTaskInputSchema, restTaskLinkSchema, restTaskPatchSchema, restTaskSchema, restTasksSchema, restTokenCreatedSchema, restTokenInputSchema, restTokenSchema, restTokensSchema, restVersionSchema, restVersionSummarySchema, restVersionsSchema, restWorkSchema, restWorkspacePackConnectSchema, restWorkspacePatchSchema, restWorkspaceSchema, } from "./schemas.js";
15
15
  export { hasForbiddenCodePoint } from "./text.js";
16
- export { ARTIFACT_KINDS, CATEGORY_COLORS, COLOR_NAMES, EVENT_KINDS, GOAL_STATES, isProviderKey, LINK_SOURCES, MEMBERSHIP_SOURCES, OPEN_TASK_STATES, PERSON_ROLES, PERSON_STATUSES, PROJECT_ICON_TYPES, PROJECT_ROLES, PROJECT_VISIBILITIES, PROVIDER_KEYS, RULES_SOURCES, RUN_ENDINGS, RUN_STATUSES, SKILLS_STATUSES, TASK_PRIORITIES, TASK_STATES, } from "./vocabulary.js";
16
+ export { ARTIFACT_KINDS, CATEGORY_COLORS, COLOR_NAMES, EVENT_KINDS, GOAL_STATES, isProviderKey, LINK_SOURCES, MEMBERSHIP_SOURCES, OPEN_TASK_STATES, PACK_CONNECT_ENDINGS, PEOPLE_VISIBILITIES, PERSON_ROLES, PERSON_STATUSES, PROJECT_ICON_TYPES, PROJECT_ROLES, PROJECT_VISIBILITIES, PROVIDER_KEYS, RULES_SOURCES, RUN_ENDINGS, RUN_STATUSES, SKILLS_STATUSES, TASK_PRIORITIES, TASK_STATES, WEEK_STARTS, } from "./vocabulary.js";
17
17
  //# sourceMappingURL=api.js.map
package/dist/api.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,8FAA8F;AAC9F,+FAA+F;AAC/F,2FAA2F;AAE3F,OAAO,EAAE,UAAU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AAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EACL,cAAc,EAEd,eAAe,EAEf,WAAW,EAEX,WAAW,EAEX,WAAW,EAEX,aAAa,EACb,YAAY,EAEZ,kBAAkB,EAElB,gBAAgB,EAChB,YAAY,EACZ,eAAe,EAGf,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,aAAa,EAKb,aAAa,EACb,WAAW,EACX,YAAY,EAIZ,eAAe,EAEf,eAAe,EACf,WAAW,GAGZ,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,8FAA8F;AAC9F,+FAA+F;AAC/F,2FAA2F;AAE3F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,QAAQ,EAIR,YAAY,GAUb,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,aAAa,EACb,cAAc,EACd,mBAAmB,EAInB,WAAW,EACX,eAAe,EACf,WAAW,EACX,eAAe,EACf,WAAW,EACX,aAAa,EACb,OAAO,EACP,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,cAAc,GAGf,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,qBAAqB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e,EACf,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,8BAA8B,EAC9B,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EACL,cAAc,EAEd,eAAe,EAEf,WAAW,EAEX,WAAW,EAEX,WAAW,EAEX,aAAa,EACb,YAAY,EAEZ,kBAAkB,EAElB,gBAAgB,EAChB,oBAAoB,EAEpB,mBAAmB,EACnB,YAAY,EACZ,eAAe,EAIf,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,aAAa,EAKb,aAAa,EACb,WAAW,EACX,YAAY,EAIZ,eAAe,EAEf,eAAe,EACf,WAAW,EAGX,WAAW,GAEZ,MAAM,iBAAiB,CAAC"}
package/dist/cli/cli.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type FetchLike } from "../client.js";
2
2
  import { type CredentialStore } from "./credentials.js";
3
- import type { DirectoryStore } from "./directory.js";
3
+ import { type DirectoryStore } from "./directory.js";
4
4
  import { type Install } from "./install.js";
5
5
  import type { NoticeStore } from "./notices.js";
6
6
  import { type Listen } from "./serve.js";
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli/cli.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAoCtB,OAAO,EACL,KAAK,eAAe,EASrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA6BxE,OAAO,EAAmB,KAAK,OAAO,EAAoB,MAAM,cAAc,CAAC;AAC/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAiBhD,OAAO,EAA0C,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC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,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,4GAA4G;IAC5G,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,+GAA+G;IAC/G,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,mFAAmF;IACnF,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC3C,qHAAqH;IACrH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,0FAA0F;IAC1F,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAouFD,yFAAyF;AACzF,wBAAsB,MAAM,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAiDhF"}
package/dist/cli/cli.js CHANGED
@@ -6,10 +6,11 @@ import { addDays, dayOf as dayOfDate, isDay } from "../dates.js";
6
6
  import { DEFAULT_PAGE_LIMIT, LIST_LIMIT, MAX_OPTIONS, MIN_OPTIONS } from "../limits.js";
7
7
  import { fillRules, RULES_PATH, RULES_TITLE } from "../rules.js";
8
8
  import { hostOfLogin, } from "../schemas.js";
9
- import { COLOR_NAMES, GOAL_STATES, PERSON_ROLES, PROJECT_ROLES, PROJECT_VISIBILITIES, PROVIDER_KEYS, TASK_PRIORITIES, TASK_STATES, } from "../vocabulary.js";
9
+ import { COLOR_NAMES, GOAL_STATES, PEOPLE_VISIBILITIES, PERSON_ROLES, PROJECT_ROLES, PROJECT_VISIBILITIES, PROVIDER_KEYS, TASK_PRIORITIES, TASK_STATES, WEEK_STARTS, } from "../vocabulary.js";
10
10
  import { loadWebRoot, WebRootError } from "../web.js";
11
11
  import { CredentialsError, EMPTY_CREDENTIALS, loginsAt, resolveLogin, withLogin, withoutLogin, } from "./credentials.js";
12
- import { formatAnswer, formatCategoryLine, formatComment, formatDecision, formatDecisionLine, formatDocument, formatDocuments, formatGoal, formatGoalLine, formatListingLine, formatMemberLine, formatMore, formatOptions, formatPersonLine, formatPersonWork, formatProject, formatProjectLine, formatRules, formatRun, formatRunLine, formatTask, formatTaskLine, formatVersion, formatVersionLine, formatWork, } from "./format.js";
12
+ import { THE_SENTENCE } from "./directory.js";
13
+ import { formatAnswer, formatCategoryLine, formatComment, formatDecision, formatDecisionLine, formatDocument, formatDocuments, formatGoal, formatGoalLine, formatListingLine, formatMemberLine, formatMore, formatOptions, formatPersonLine, formatPersonWork, formatProject, formatProjectLine, formatRules, formatRun, formatRunLine, formatTask, formatTaskLine, formatVersion, formatVersionLine, formatWork, formatWorkspace, moment, setMomentZone, } from "./format.js";
13
14
  import { COMMAND_HELP, helpFor, ownSkillPath, usage } from "./help.js";
14
15
  import { describeInstall, updateCommandFor } from "./install.js";
15
16
  import { bodyOfFile, bodyOfFolder, bodyOfSkill, formatSkillBrowse, formatSkillFile, formatSkillFind, formatSkillLoad, formatSkills, joinFile, joinFolder, joinSkill, skillPathIn, summaryOf, } from "./pack.js";
@@ -149,6 +150,12 @@ async function open(io, values) {
149
150
  throw failed(wordsOf(resolved));
150
151
  }
151
152
  const { url, token } = resolved;
153
+ // Moments are printed in the workspace's time zone as the login kept it (ADR-0035); the
154
+ // environment's pair keeps nothing, and they stay as the API gives them.
155
+ setMomentZone(resolved.via === "login"
156
+ ? credentials?.logins.find((kept) => kept.url === url && kept.account === resolved.account)
157
+ ?.timeZone
158
+ : undefined);
152
159
  const client = clientOf(io, url, token);
153
160
  const projectKey = async () => text(values, "project") ?? io.env.CONSOLE_PROJECT ?? directory?.project;
154
161
  return {
@@ -291,15 +298,20 @@ async function personIdOf(session, value) {
291
298
  }
292
299
  return (await personOf(session, value)).id;
293
300
  }
294
- /** The person a login names, among the workspace's; the logins are as people sign in. */
301
+ /**
302
+ * The person a login names, among the workspace's, found by their exact login as people sign in
303
+ * (ADR-0035): whom the console shows the person, and, for an owner of a project, anyone of the
304
+ * workspace, so that someone the People page does not show can still be listed.
305
+ */
295
306
  async function personOf(session, login) {
296
- const { items } = await session.client.people();
297
- const found = items.find((person) => person.login.toLowerCase() === login.toLowerCase());
307
+ const found = await session.client.findPerson(login);
298
308
  if (found === undefined) {
299
- throw misuse(`Nobody of the workspace is called ${login}. console people lists everyone, by login.`);
309
+ throw misuse(`Nobody of the workspace is called ${login}, or they are not yours to see. console people lists whom you see, by login.`);
300
310
  }
301
311
  return found;
302
312
  }
313
+ /** Who sees whom, as the command takes it: with a hyphen or an underscore. */
314
+ const peopleVisibilityOf = (value) => wordOf(value.replaceAll("-", "_"), PEOPLE_VISIBILITIES, "who sees whom");
303
315
  /** One word of a vocabulary, or the refusal to understand. */
304
316
  function wordOf(value, words, what) {
305
317
  const found = words.find((word) => word === value);
@@ -413,7 +425,14 @@ async function keep(io, url, token, agent, asDefault) {
413
425
  .giveUpToken()
414
426
  .catch(() => undefined);
415
427
  }
416
- const next = withLogin(credentials, { url, account: person.login, token, agent, since: new Date(io.now()).toISOString() }, { default: asDefault });
428
+ const next = withLogin(credentials, {
429
+ url,
430
+ account: person.login,
431
+ token,
432
+ agent,
433
+ since: new Date(io.now()).toISOString(),
434
+ timeZone: me.workspace.timeZone ?? undefined,
435
+ }, { default: asDefault });
417
436
  const kept = await io.store.save(next);
418
437
  const standing = next.default === url ? ", the default console here" : "";
419
438
  io.stdout(`${agent === undefined ? "Signed in" : `Connected as "${agent}"`} to ${me.workspace.name} at ${url} as ${person.login} (${person.role})${standing}. The token is kept in ${kept}.\nNext, say which project this directory works in: console use <key> (console projects lists them).\n`);
@@ -557,6 +576,21 @@ function agentOf(env) {
557
576
  }
558
577
  return undefined;
559
578
  }
579
+ /**
580
+ * Keeps the workspace's time zone on the login the command used (ADR-0035), so that moments are
581
+ * printed in it from now on without asking; the environment's pair keeps nothing.
582
+ */
583
+ async function rememberZone(io, session, zone) {
584
+ setMomentZone(zone);
585
+ if (session.via !== "login" || session.credentials === undefined) {
586
+ return;
587
+ }
588
+ const kept = session.credentials.logins.find((login) => login.url === session.url && login.account === session.account);
589
+ if (kept === undefined || kept.timeZone === zone) {
590
+ return;
591
+ }
592
+ await io.store.save(withLogin(session.credentials, { ...kept, timeZone: zone }));
593
+ }
560
594
  const whoami = async (args, io) => {
561
595
  const { values } = parse(args, {}, false);
562
596
  const session = await open(io, values);
@@ -565,6 +599,7 @@ const whoami = async (args, io) => {
565
599
  if (person === null) {
566
600
  throw failed("The console does not know this token. Sign in again: console login");
567
601
  }
602
+ await rememberZone(io, session, me.workspace.timeZone ?? undefined);
568
603
  const key = await session.projectKey();
569
604
  const command = parseVersion(io.version);
570
605
  const server = parseVersion(me.console?.version);
@@ -628,7 +663,14 @@ const use = async (args, io) => {
628
663
  const bound = pinUrl
629
664
  ? ` at ${session.url}${pinAccount && session.account !== undefined ? ` as ${session.account}` : ""}`
630
665
  : "";
631
- answer(io, session, project, () => `Working in ${project.name} (${project.key})${bound} from this directory on: kept in ${kept}, which is meant to be committed in a private repository and left out of a public one. What its people ask of agents: console rules.`);
666
+ answer(io, session, project, () => [
667
+ `Working in ${project.name} (${project.key})${bound} from this directory on: kept in ${kept}, which is meant to be committed in a private repository and left out of a public one. What its people ask of agents: console rules.`,
668
+ // Nothing sends an agent to the console until the checkout says so; the sentence is the
669
+ // skill's (references/the-sentence.md), printed here as `skillcdn use` prints its own.
670
+ "Then put this sentence into the checkout's agreement (AGENTS.md, or CLAUDE.md where that is the file agents read), as it is, so that every agent working here is sent to the console:",
671
+ "",
672
+ THE_SENTENCE,
673
+ ].join("\n"));
632
674
  return EXIT.ok;
633
675
  };
634
676
  const tasks = async (args, io) => {
@@ -979,7 +1021,7 @@ const newTask = async (args, io) => {
979
1021
  ...(body === undefined ? {} : { body }),
980
1022
  ...fields,
981
1023
  });
982
- answer(io, session, made, () => `Task #${made.number} written: ${made.title}\nid: ${made.id}`);
1024
+ answer(io, session, made, () => `Task #${made.number} written: ${made.title}\ntask id: ${made.id}`);
983
1025
  return EXIT.ok;
984
1026
  };
985
1027
  const editTask = async (args, io) => {
@@ -1169,6 +1211,9 @@ const take = async (args, io) => {
1169
1211
  };
1170
1212
  answer(io, session, { run, task: taken, comments: comments.items, rules }, () => [
1171
1213
  `Run ${run.id} began on #${found.number} ${found.title}, as "${run.agent}" for ${run.person.login}. The task is in progress and theirs.${tookOver}${elsewhere}`,
1214
+ // The ids on a line of their own, each named: a run's and a task's begin alike, and a
1215
+ // task has a number for people as well.
1216
+ `run id: ${run.id} task id: ${found.id} (task #${found.number})`,
1172
1217
  "",
1173
1218
  formatTask(taken, undefined, undefined, comments.items),
1174
1219
  "",
@@ -1283,7 +1328,7 @@ const ask = async (args, io) => {
1283
1328
  // The id is printed before any waiting, so that a wait cut short loses nothing.
1284
1329
  io.stdout(session.json
1285
1330
  ? `${JSON.stringify(raised, null, 2)}\n`
1286
- : `Decision ${raised.id} raised on run ${runId}; the run waits for a person.\n${formatOptions(raised)}\n`);
1331
+ : `Decision ${raised.id} raised on run ${runId}; the run waits for a person.\ndecision id: ${raised.id}\n${formatOptions(raised)}\n`);
1287
1332
  return settle(io, session, project, raised, seconds, true);
1288
1333
  };
1289
1334
  const decision = async (args, io) => {
@@ -1488,7 +1533,7 @@ const newGoal = async (args, io) => {
1488
1533
  ...(startsOn === undefined ? {} : { startsOn }),
1489
1534
  ...(dueOn === undefined ? {} : { dueOn }),
1490
1535
  });
1491
- answer(io, session, made, () => `Goal set: ${made.title}\nid: ${made.id}`);
1536
+ answer(io, session, made, () => `Goal set: ${made.title}\ngoal id: ${made.id}`);
1492
1537
  return EXIT.ok;
1493
1538
  };
1494
1539
  const editGoal = async (args, io) => {
@@ -1683,6 +1728,66 @@ const people = async (args, io) => {
1683
1728
  answer(io, session, found, () => [...found.items.map(formatPersonLine), ...found.listed.map(formatListingLine)].join("\n"));
1684
1729
  return EXIT.ok;
1685
1730
  };
1731
+ // The workspace's settings (ADR-0035): read by everyone, changed by an administrator, themselves
1732
+ // on the Settings page or through their agent here (ADR-0021).
1733
+ const WORKSPACE_FLAGS = "--people-visibility <everyone|shared-projects>, --week-start <auto|monday|sunday>, --time-zone <zone|none>";
1734
+ const WORKSPACE_USAGE = `Say what to do: console workspace | console workspace edit [${WORKSPACE_FLAGS.replaceAll(", ", "] [")}] | console workspace pack-token --connect|--stdin|--remove`;
1735
+ const workspace = async (args, io) => {
1736
+ const [verb, ...rest] = args;
1737
+ if (verb === undefined || verb.startsWith("--")) {
1738
+ const { values } = parse(args, {}, false);
1739
+ const session = await open(io, values);
1740
+ const me = await session.client.me();
1741
+ await rememberZone(io, session, me.workspace.timeZone ?? undefined);
1742
+ answer(io, session, me.workspace, () => formatWorkspace(me.workspace));
1743
+ return EXIT.ok;
1744
+ }
1745
+ if (verb === "edit") {
1746
+ const { values } = parse(rest, {
1747
+ "people-visibility": { type: "string" },
1748
+ "week-start": { type: "string" },
1749
+ "time-zone": { type: "string" },
1750
+ }, false);
1751
+ const visibility = text(values, "people-visibility");
1752
+ const weekStart = text(values, "week-start");
1753
+ const zone = text(values, "time-zone");
1754
+ if (visibility === undefined && weekStart === undefined && zone === undefined) {
1755
+ throw misuse(`Say what to change: ${WORKSPACE_FLAGS}`);
1756
+ }
1757
+ const session = await open(io, values);
1758
+ const changed = await session.client.updateWorkspace({
1759
+ ...(visibility === undefined ? {} : { peopleVisibility: peopleVisibilityOf(visibility) }),
1760
+ ...(weekStart === undefined
1761
+ ? {}
1762
+ : { weekStart: wordOf(weekStart, WEEK_STARTS, "a day the week begins on") }),
1763
+ ...(zone === undefined ? {} : { timeZone: zone === "none" ? null : zone }),
1764
+ });
1765
+ await rememberZone(io, session, changed.timeZone ?? undefined);
1766
+ answer(io, session, changed, () => formatWorkspace(changed));
1767
+ return EXIT.ok;
1768
+ }
1769
+ if (verb === "pack-token") {
1770
+ const { values, positionals } = parse(rest, PACK_TOKEN_FLAGS);
1771
+ if (positionals.length > 0) {
1772
+ throw misuse("The workspace's token names no project: console workspace pack-token --connect, --stdin or --remove");
1773
+ }
1774
+ const way = wayOf(values);
1775
+ const session = await open(io, values);
1776
+ const { client } = session;
1777
+ return packToken(io, session, way, {
1778
+ set: (token) => client.setWorkspacePackToken({ token }),
1779
+ remove: () => client.removeWorkspacePackToken(),
1780
+ connect: () => client.connectWorkspacePackToken(),
1781
+ async standing() {
1782
+ const state = await client.workspacePackTokenConnection();
1783
+ return state.status === "connected"
1784
+ ? { status: "connected", held: state.workspace }
1785
+ : state;
1786
+ },
1787
+ }, formatWorkspace);
1788
+ }
1789
+ throw misuse(WORKSPACE_USAGE);
1790
+ };
1686
1791
  const PERSON_USAGE = "Say what to do: console person role <login> <admin|member> | person add <login> [--host gh|google] | person remove <login> | person deactivate <login> | person reactivate <login>";
1687
1792
  const person = async (args, io) => {
1688
1793
  const what = args[0];
@@ -1780,30 +1885,79 @@ const editProject = async (args, io) => {
1780
1885
  answer(io, session, changed, () => formatProject(changed));
1781
1886
  return EXIT.ok;
1782
1887
  };
1783
- /** The pack token (ADR-0028): read from standard input and never from an argument, so that no shell keeps it. */
1784
- const projectPackToken = async (args, io) => {
1785
- const { values, positionals } = parse(args, {
1786
- stdin: { type: "boolean" },
1787
- remove: { type: "boolean" },
1788
- });
1789
- const key = theOne(positionals, "Say which project: console project pack-token <key> --stdin, or console project pack-token <key> --remove");
1790
- if (on(values, "stdin") === on(values, "remove")) {
1791
- throw misuse("Say one of --stdin, which reads the token from standard input, and --remove, which takes it away.");
1792
- }
1793
- const session = await open(io, values);
1794
- const project = session.client.project(key);
1795
- if (on(values, "remove")) {
1796
- const changed = await project.removePackToken();
1797
- answer(io, session, changed, () => formatProject(changed));
1888
+ /** How a pack's connection ended short of a token (ADR-0036), in words for the person. */
1889
+ const PACK_CONNECT_ENDED = {
1890
+ expired: "The code expired before anyone approved it. Run the command again for a new one.",
1891
+ declined: "The request was declined at SkillCDN, or the code was spent.",
1892
+ refused: "SkillCDN refused the request: the repository is not one the person may open, the pack is public and needs no token, or they hold as many tokens as one may.",
1893
+ };
1894
+ /** How a SkillCDN token is to change, one of the three the flags name. */
1895
+ const wayOf = (values) => {
1896
+ const ways = ["connect", "stdin", "remove"].filter((way) => on(values, way));
1897
+ const [way] = ways;
1898
+ if (way === undefined || ways.length !== 1) {
1899
+ throw misuse("Say one of --connect, which asks SkillCDN for a code a person approves; --stdin, which reads a token made by hand from standard input; and --remove, which takes the token away.");
1900
+ }
1901
+ return way;
1902
+ };
1903
+ /**
1904
+ * The SkillCDN token (ADR-0028): connected with a code a person approves at SkillCDN (ADR-0036),
1905
+ * or read from standard input and never from an argument, so that no shell keeps it; or taken
1906
+ * away. The same for a project's and for the workspace's.
1907
+ */
1908
+ async function packToken(io, session, way, holder, format) {
1909
+ if (way === "remove") {
1910
+ const changed = await holder.remove();
1911
+ answer(io, session, changed, () => format(changed));
1798
1912
  return EXIT.ok;
1799
1913
  }
1914
+ if (way === "connect") {
1915
+ const started = await holder.connect();
1916
+ io.stdout(`To connect the pack, a person who may open its repository opens ${started.url} signed in at SkillCDN, checks that the page shows the code ${started.code}, and approves; the console receives the SkillCDN token and keeps it sealed, shown to nobody.\nWaiting for that, until ${moment(started.expiresAt)}.\n`);
1917
+ for (;;) {
1918
+ await io.sleep(started.intervalSeconds * 1000);
1919
+ const state = await holder.standing();
1920
+ if (state.status === "pending") {
1921
+ continue;
1922
+ }
1923
+ if (state.status === "connected") {
1924
+ answer(io, session, state.held, () => `Connected.\n${format(state.held)}`);
1925
+ return EXIT.ok;
1926
+ }
1927
+ if (state.status === "ended") {
1928
+ throw failed(PACK_CONNECT_ENDED[state.reason]);
1929
+ }
1930
+ throw failed("The console no longer waits for the connection; run the command again for a new code.");
1931
+ }
1932
+ }
1800
1933
  const token = (await io.readStdin()).trim();
1801
1934
  if (token.length === 0) {
1802
1935
  throw failed("No token was given on standard input.");
1803
1936
  }
1804
- const changed = await project.setPackToken({ token });
1805
- answer(io, session, changed, () => formatProject(changed));
1937
+ const changed = await holder.set(token);
1938
+ answer(io, session, changed, () => format(changed));
1806
1939
  return EXIT.ok;
1940
+ }
1941
+ const PACK_TOKEN_FLAGS = {
1942
+ connect: { type: "boolean" },
1943
+ stdin: { type: "boolean" },
1944
+ remove: { type: "boolean" },
1945
+ };
1946
+ const projectPackToken = async (args, io) => {
1947
+ const { values, positionals } = parse(args, PACK_TOKEN_FLAGS);
1948
+ const key = theOne(positionals, "Say which project: console project pack-token <key> --connect, --stdin or --remove");
1949
+ const way = wayOf(values);
1950
+ const session = await open(io, values);
1951
+ const project = session.client.project(key);
1952
+ return packToken(io, session, way, {
1953
+ set: (token) => project.setPackToken({ token }),
1954
+ remove: () => project.removePackToken(),
1955
+ connect: () => project.connectPackToken(),
1956
+ async standing() {
1957
+ const state = await project.packTokenConnection();
1958
+ return state.status === "connected" ? { status: "connected", held: state.project } : state;
1959
+ },
1960
+ }, formatProject);
1807
1961
  };
1808
1962
  const projectIcon = async (args, io) => {
1809
1963
  const { values, positionals } = parse(args, { remove: { type: "boolean" } });
@@ -1990,6 +2144,7 @@ const COMMANDS = {
1990
2144
  rules,
1991
2145
  people,
1992
2146
  person,
2147
+ workspace,
1993
2148
  project,
1994
2149
  members,
1995
2150
  member,
@@ -2124,6 +2279,8 @@ function hintFor(error, io, seen) {
2124
2279
  return "The person is listed already. console member role <login> <owner|member> changes what they are.\n";
2125
2280
  case "member.not_found":
2126
2281
  return "The person is not listed in the project. console members lists those who are.\n";
2282
+ case "member.open_project":
2283
+ return "The project is open to the workspace, so everyone of it is a member already. console member add <login> --role owner lists an owner; console member role <login> member takes one back to member.\n";
2127
2284
  case "category.key_taken":
2128
2285
  return "A category has that key already. console categories lists them.\n";
2129
2286
  case "category.not_found":