@skillcdn/console 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/agent-page.d.ts.map +1 -1
- package/dist/agent-page.js +58 -35
- package/dist/agent-page.js.map +1 -1
- package/dist/agent-usage.d.ts +51 -0
- package/dist/agent-usage.d.ts.map +1 -0
- package/dist/agent-usage.js +77 -0
- package/dist/agent-usage.js.map +1 -0
- package/dist/api.d.ts +4 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +4 -2
- package/dist/api.js.map +1 -1
- package/dist/cli/cli.d.ts +9 -2
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +491 -125
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/format.d.ts +46 -4
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +163 -45
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +62 -13
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/machine-check.d.ts +24 -5
- package/dist/cli/machine-check.d.ts.map +1 -1
- package/dist/cli/machine-check.js +128 -16
- package/dist/cli/machine-check.js.map +1 -1
- package/dist/cli/pack.d.ts +11 -8
- package/dist/cli/pack.d.ts.map +1 -1
- package/dist/cli/pack.js +63 -28
- package/dist/cli/pack.js.map +1 -1
- package/dist/cli/runner-host.d.ts +2 -0
- package/dist/cli/runner-host.d.ts.map +1 -1
- package/dist/cli/runner-host.js +1 -0
- package/dist/cli/runner-host.js.map +1 -1
- package/dist/cli/secret-notes.d.ts.map +1 -1
- package/dist/cli/secret-notes.js +9 -1
- package/dist/cli/secret-notes.js.map +1 -1
- package/dist/cli/terminal.d.ts +10 -2
- package/dist/cli/terminal.d.ts.map +1 -1
- package/dist/cli/terminal.js +16 -4
- package/dist/cli/terminal.js.map +1 -1
- package/dist/client.d.ts +30 -7
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +13 -1
- package/dist/client.js.map +1 -1
- package/dist/components/agent-page.d.ts +76 -18
- package/dist/components/agent-page.d.ts.map +1 -1
- package/dist/components/agent-page.js +183 -53
- package/dist/components/agent-page.js.map +1 -1
- package/dist/components/agents.d.ts +2 -0
- package/dist/components/agents.d.ts.map +1 -1
- package/dist/components/agents.js +6 -5
- package/dist/components/agents.js.map +1 -1
- package/dist/components/calendar.d.ts +24 -4
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +79 -36
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/categories.js +2 -2
- package/dist/components/categories.js.map +1 -1
- package/dist/components/comments.js +2 -2
- package/dist/components/comments.js.map +1 -1
- package/dist/components/decision-list.d.ts.map +1 -1
- package/dist/components/decision-list.js +5 -5
- package/dist/components/decision-list.js.map +1 -1
- package/dist/components/documents.d.ts.map +1 -1
- package/dist/components/documents.js +4 -4
- package/dist/components/documents.js.map +1 -1
- package/dist/components/event-feed.d.ts +2 -3
- package/dist/components/event-feed.d.ts.map +1 -1
- package/dist/components/event-feed.js +4 -184
- package/dist/components/event-feed.js.map +1 -1
- package/dist/components/goals.d.ts.map +1 -1
- package/dist/components/goals.js +3 -3
- package/dist/components/goals.js.map +1 -1
- package/dist/components/home.js +9 -9
- package/dist/components/home.js.map +1 -1
- package/dist/components/icon.d.ts.map +1 -1
- package/dist/components/icon.js +11 -2
- package/dist/components/icon.js.map +1 -1
- package/dist/components/notifications.d.ts +65 -0
- package/dist/components/notifications.d.ts.map +1 -0
- package/dist/components/notifications.js +162 -0
- package/dist/components/notifications.js.map +1 -0
- package/dist/components/pack-connect.js +1 -1
- package/dist/components/pack-connect.js.map +1 -1
- package/dist/components/pack-token.js +1 -1
- package/dist/components/pack-token.js.map +1 -1
- package/dist/components/people.js +2 -2
- package/dist/components/people.js.map +1 -1
- package/dist/components/pictures.js +1 -1
- package/dist/components/pictures.js.map +1 -1
- package/dist/components/plugin-settings.d.ts +22 -1
- package/dist/components/plugin-settings.d.ts.map +1 -1
- package/dist/components/plugin-settings.js +63 -11
- package/dist/components/plugin-settings.js.map +1 -1
- package/dist/components/projects.js +1 -1
- package/dist/components/projects.js.map +1 -1
- package/dist/components/roadmap.js +2 -2
- package/dist/components/roadmap.js.map +1 -1
- package/dist/components/rules.js +2 -2
- package/dist/components/rules.js.map +1 -1
- package/dist/components/runs.d.ts.map +1 -1
- package/dist/components/runs.js +1 -1
- package/dist/components/runs.js.map +1 -1
- package/dist/components/sessions.js +1 -1
- package/dist/components/sessions.js.map +1 -1
- package/dist/components/shell.d.ts +2 -0
- package/dist/components/shell.d.ts.map +1 -1
- package/dist/components/shell.js +1 -1
- package/dist/components/shell.js.map +1 -1
- package/dist/components/sign-in.js +2 -2
- package/dist/components/sign-in.js.map +1 -1
- package/dist/components/skills.d.ts.map +1 -1
- package/dist/components/skills.js +1 -1
- package/dist/components/skills.js.map +1 -1
- package/dist/components/task-view.d.ts +6 -0
- package/dist/components/task-view.d.ts.map +1 -1
- package/dist/components/task-view.js +3 -2
- package/dist/components/task-view.js.map +1 -1
- package/dist/components/tokens.js +1 -1
- package/dist/components/tokens.js.map +1 -1
- package/dist/components/ui.d.ts +21 -2
- package/dist/components/ui.d.ts.map +1 -1
- package/dist/components/ui.js +24 -3
- package/dist/components/ui.js.map +1 -1
- package/dist/components/work.js +1 -1
- package/dist/components/work.js.map +1 -1
- package/dist/console.css +506 -289
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +193 -16
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts +17 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +31 -0
- package/dist/data.js.map +1 -1
- package/dist/desk-page.js +5 -5
- package/dist/desk-page.js.map +1 -1
- package/dist/feed-words.d.ts +5 -0
- package/dist/feed-words.d.ts.map +1 -0
- package/dist/feed-words.js +193 -0
- package/dist/feed-words.js.map +1 -0
- package/dist/i18n/en.d.ts +93 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +103 -15
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +105 -22
- package/dist/i18n/ko.js.map +1 -1
- package/dist/icons/glyphs.d.ts +370 -104
- package/dist/icons/glyphs.d.ts.map +1 -1
- package/dist/icons/glyphs.js +72 -66
- package/dist/icons/glyphs.js.map +1 -1
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/index.js +9 -1
- package/dist/icons/index.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +7 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +7 -0
- package/dist/limits.js.map +1 -1
- package/dist/notifications.d.ts +124 -0
- package/dist/notifications.d.ts.map +1 -0
- package/dist/notifications.js +147 -0
- package/dist/notifications.js.map +1 -0
- package/dist/onboarding.d.ts.map +1 -1
- package/dist/onboarding.js +7 -12
- package/dist/onboarding.js.map +1 -1
- package/dist/plugin/capabilities.d.ts +1 -1
- package/dist/plugin/capabilities.d.ts.map +1 -1
- package/dist/plugin/capabilities.js +10 -0
- package/dist/plugin/capabilities.js.map +1 -1
- package/dist/plugin/context.d.ts +85 -1
- package/dist/plugin/context.d.ts.map +1 -1
- package/dist/plugin/limits.d.ts +7 -0
- package/dist/plugin/limits.d.ts.map +1 -1
- package/dist/plugin/limits.js +7 -0
- package/dist/plugin/limits.js.map +1 -1
- package/dist/plugin/manifest.d.ts +8 -0
- package/dist/plugin/manifest.d.ts.map +1 -1
- package/dist/plugin/manifest.js +13 -0
- package/dist/plugin/manifest.js.map +1 -1
- package/dist/plugin/rest-schemas.d.ts +22 -0
- package/dist/plugin/rest-schemas.d.ts.map +1 -1
- package/dist/plugin/rest-schemas.js +19 -3
- package/dist/plugin/rest-schemas.js.map +1 -1
- package/dist/plugin/testing.d.ts +2 -0
- package/dist/plugin/testing.d.ts.map +1 -1
- package/dist/plugin/testing.js +2 -0
- package/dist/plugin/testing.js.map +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/router.d.ts +6 -0
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +5 -0
- package/dist/router.js.map +1 -1
- package/dist/routes.d.ts +2 -0
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +2 -0
- package/dist/routes.js.map +1 -1
- package/dist/rules.js +1 -1
- package/dist/rules.js.map +1 -1
- package/dist/runner/acp.d.ts.map +1 -1
- package/dist/runner/acp.js +12 -97
- package/dist/runner/acp.js.map +1 -1
- package/dist/runner/browser.d.ts +50 -0
- package/dist/runner/browser.d.ts.map +1 -0
- package/dist/runner/browser.js +104 -0
- package/dist/runner/browser.js.map +1 -0
- package/dist/runner/claude.d.ts +1 -2
- package/dist/runner/claude.d.ts.map +1 -1
- package/dist/runner/claude.js +352 -13
- package/dist/runner/claude.js.map +1 -1
- package/dist/runner/codex.d.ts +9 -10
- package/dist/runner/codex.d.ts.map +1 -1
- package/dist/runner/codex.js +809 -346
- package/dist/runner/codex.js.map +1 -1
- package/dist/runner/config.d.ts +14 -3
- package/dist/runner/config.d.ts.map +1 -1
- package/dist/runner/config.js +27 -7
- package/dist/runner/config.js.map +1 -1
- package/dist/runner/desk.d.ts +3 -1
- package/dist/runner/desk.d.ts.map +1 -1
- package/dist/runner/desk.js +17 -5
- package/dist/runner/desk.js.map +1 -1
- package/dist/runner/message.d.ts +53 -3
- package/dist/runner/message.d.ts.map +1 -1
- package/dist/runner/message.js +201 -20
- package/dist/runner/message.js.map +1 -1
- package/dist/runner/registry.d.ts +6 -0
- package/dist/runner/registry.d.ts.map +1 -1
- package/dist/runner/registry.js.map +1 -1
- package/dist/runner/rpc.d.ts +31 -0
- package/dist/runner/rpc.d.ts.map +1 -0
- package/dist/runner/rpc.js +102 -0
- package/dist/runner/rpc.js.map +1 -0
- package/dist/runner/runner.d.ts +41 -1
- package/dist/runner/runner.d.ts.map +1 -1
- package/dist/runner/runner.js +695 -52
- package/dist/runner/runner.js.map +1 -1
- package/dist/runner/slack.d.ts +17 -8
- package/dist/runner/slack.d.ts.map +1 -1
- package/dist/runner/slack.js +1250 -78
- package/dist/runner/slack.js.map +1 -1
- package/dist/runner/types.d.ts +160 -8
- package/dist/runner/types.d.ts.map +1 -1
- package/dist/runner/types.js.map +1 -1
- package/dist/runner/usage.d.ts +105 -0
- package/dist/runner/usage.d.ts.map +1 -0
- package/dist/runner/usage.js +218 -0
- package/dist/runner/usage.js.map +1 -0
- package/dist/runner.d.ts +4 -4
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +3 -3
- package/dist/runner.js.map +1 -1
- package/dist/schemas.d.ts +673 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +205 -1
- package/dist/schemas.js.map +1 -1
- package/dist/services.js +3 -3
- package/dist/services.js.map +1 -1
- package/dist/setup-guide.d.ts +4 -3
- package/dist/setup-guide.d.ts.map +1 -1
- package/dist/setup-guide.js +11 -13
- package/dist/setup-guide.js.map +1 -1
- package/dist/text.d.ts +7 -0
- package/dist/text.d.ts.map +1 -1
- package/dist/text.js +18 -0
- package/dist/text.js.map +1 -1
- package/dist/vocabulary.d.ts +4 -2
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +4 -1
- package/dist/vocabulary.js.map +1 -1
- package/docs/specs/cli.md +26 -19
- package/docs/specs/plugins.md +16 -10
- package/docs/specs/rest.md +28 -10
- package/docs/specs/runner.md +132 -44
- package/package.json +4 -4
- package/skills/building-a-console/SKILL.md +2 -2
- package/skills/building-a-console/references/configuring.md +1 -1
- package/skills/building-a-plugin/SKILL.md +4 -4
- package/skills/planning-the-board/SKILL.md +1 -1
- package/skills/planning-the-board/references/setting-up.md +2 -2
- package/skills/running-an-agent/SKILL.md +15 -64
- package/skills/running-an-agent/references/preparing-the-machine.md +17 -0
- package/skills/running-an-agent/references/several-tasks.md +37 -0
- package/skills/running-an-agent/references/slack-app.md +70 -13
- package/skills/running-an-agent/references/the-account-and-the-invitation.md +5 -0
- package/skills/running-an-agent/references/what-was-not-seen-run-yet.md +3 -0
- package/skills/running-an-agent/references/when-the-agent-could-not-go-on.md +16 -0
- package/skills/running-an-agent/references/your-first-task.md +14 -0
- package/skills/working-the-board/SKILL.md +9 -12
- package/skills/working-the-board/references/a-pack-skills-questions.md +3 -0
- package/skills/working-the-board/references/a-plugins-commands.md +3 -0
- package/skills/working-the-board/references/a-review.md +3 -0
- package/skills/working-the-board/references/an-open-run.md +3 -0
- package/skills/working-the-board/references/requirements.md +7 -0
- package/skills/working-the-board/references/the-pack.md +2 -2
- package/skills/working-the-board/references/what-they-were-told.md +3 -0
- package/skills/working-the-board/references/work-given-in-chat.md +5 -0
- package/src/agent-page.tsx +76 -47
- package/src/agent-usage.ts +113 -0
- package/src/api.ts +62 -0
- package/src/cli/cli.ts +634 -162
- package/src/cli/format.ts +190 -47
- package/src/cli/help.ts +77 -12
- package/src/cli/machine-check.ts +182 -29
- package/src/cli/pack.ts +81 -40
- package/src/cli/runner-host.ts +3 -0
- package/src/cli/secret-notes.ts +9 -1
- package/src/cli/terminal.ts +20 -4
- package/src/client.ts +94 -6
- package/src/components/agent-page.tsx +280 -63
- package/src/components/agents.tsx +23 -3
- package/src/components/calendar.tsx +93 -37
- package/src/components/categories.tsx +2 -2
- package/src/components/comments.tsx +5 -5
- package/src/components/decision-list.tsx +13 -10
- package/src/components/documents.tsx +13 -8
- package/src/components/event-feed.tsx +4 -203
- package/src/components/goals.tsx +6 -4
- package/src/components/home.tsx +12 -12
- package/src/components/icon.tsx +16 -3
- package/src/components/notifications.tsx +419 -0
- package/src/components/pack-connect.tsx +1 -1
- package/src/components/pack-token.tsx +5 -5
- package/src/components/people.tsx +3 -3
- package/src/components/pictures.tsx +1 -1
- package/src/components/plugin-settings.tsx +128 -23
- package/src/components/projects.tsx +1 -1
- package/src/components/roadmap.tsx +2 -2
- package/src/components/rules.tsx +2 -2
- package/src/components/runs.tsx +6 -3
- package/src/components/sessions.tsx +2 -2
- package/src/components/shell.tsx +3 -0
- package/src/components/sign-in.tsx +3 -3
- package/src/components/skills.tsx +5 -3
- package/src/components/task-view.tsx +18 -7
- package/src/components/tokens.tsx +2 -2
- package/src/components/ui.tsx +70 -5
- package/src/components/work.tsx +2 -2
- package/src/console.tsx +269 -12
- package/src/data.ts +54 -0
- package/src/desk-page.tsx +5 -5
- package/src/feed-words.ts +214 -0
- package/src/i18n/en.ts +114 -15
- package/src/i18n/ko.ts +115 -22
- package/src/icons/glyphs.ts +74 -68
- package/src/icons/index.ts +9 -1
- package/src/index.ts +11 -0
- package/src/limits.ts +7 -0
- package/src/notifications.ts +205 -0
- package/src/onboarding.ts +10 -14
- package/src/plugin/capabilities.ts +13 -0
- package/src/plugin/context.ts +87 -0
- package/src/plugin/limits.ts +7 -0
- package/src/plugin/manifest.ts +14 -0
- package/src/plugin/rest-schemas.ts +27 -3
- package/src/plugin/testing.ts +4 -0
- package/src/plugin.ts +2 -0
- package/src/router.ts +7 -0
- package/src/routes.ts +2 -0
- package/src/rules.ts +1 -1
- package/src/runner/acp.ts +12 -118
- package/src/runner/browser.ts +128 -0
- package/src/runner/claude.ts +399 -12
- package/src/runner/codex.ts +904 -400
- package/src/runner/config.ts +30 -7
- package/src/runner/desk.ts +22 -6
- package/src/runner/message.ts +251 -21
- package/src/runner/registry.ts +6 -0
- package/src/runner/rpc.ts +140 -0
- package/src/runner/runner.ts +863 -53
- package/src/runner/slack.ts +1535 -85
- package/src/runner/types.ts +150 -5
- package/src/runner/usage.ts +299 -0
- package/src/runner.ts +16 -1
- package/src/schemas.ts +249 -0
- package/src/services.ts +3 -3
- package/src/setup-guide.ts +12 -14
- package/src/styles/README.md +11 -7
- package/src/styles/console.css +2 -0
- package/src/styles/drawn-by-pages.json +7 -82
- package/src/styles/pages/agents.css +46 -35
- package/src/styles/pages/calendar.css +0 -1
- package/src/styles/pages/connect.css +0 -14
- package/src/styles/pages/decisions.css +2 -43
- package/src/styles/pages/documents.css +0 -29
- package/src/styles/pages/home.css +4 -16
- package/src/styles/pages/people.css +2 -17
- package/src/styles/pages/plugins.css +9 -12
- package/src/styles/pages/roadmap.css +0 -16
- package/src/styles/pages/settings.css +0 -28
- package/src/styles/pages/sign-in.css +2 -17
- package/src/styles/pages/thread.css +4 -50
- package/src/styles/pages/work.css +0 -5
- package/src/styles/parts/button.css +31 -0
- package/src/styles/parts/count.css +10 -0
- package/src/styles/parts/divider.css +17 -0
- package/src/styles/parts/frame.css +12 -0
- package/src/styles/parts/icon.css +39 -0
- package/src/styles/parts/menu.css +184 -0
- package/src/styles/parts/panel.css +7 -0
- package/src/styles/parts/progress.css +63 -0
- package/src/styles/parts/settings.css +2 -0
- package/src/styles/parts/sheet.css +28 -0
- package/src/styles/parts/text.css +34 -0
- package/src/text.ts +19 -0
- package/src/vocabulary.ts +4 -1
- package/template/plugin/package.json +1 -1
package/src/cli/help.ts
CHANGED
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
MAX_NOTE_LENGTH,
|
|
29
29
|
MAX_OPTION_LABEL_LENGTH,
|
|
30
30
|
MAX_OPTIONS,
|
|
31
|
+
MAX_OWN_RESETS_PER_HOUR,
|
|
31
32
|
MAX_OWN_WAKE_DAYS,
|
|
32
33
|
MAX_OWN_WAKES,
|
|
33
34
|
MAX_OWN_WAKES_PER_HOUR,
|
|
@@ -52,6 +53,14 @@ import {
|
|
|
52
53
|
MIN_HANDLE_LENGTH,
|
|
53
54
|
MIN_OPTIONS,
|
|
54
55
|
} from "../limits.js";
|
|
56
|
+
import {
|
|
57
|
+
MAX_NOTIFICATION_PROJECTS_OFF,
|
|
58
|
+
MAX_NOTIFICATIONS_PAGE,
|
|
59
|
+
MAX_NOTIFICATIONS_READ,
|
|
60
|
+
NOTIFICATION_KINDS,
|
|
61
|
+
NOTIFICATIONS_KEPT_DAYS,
|
|
62
|
+
NOTIFICATIONS_PAGE,
|
|
63
|
+
} from "../notifications.js";
|
|
55
64
|
import { COLOR_NAMES } from "../vocabulary.js";
|
|
56
65
|
|
|
57
66
|
// What the command says about itself: for an agent that meets it for the first time, and for a
|
|
@@ -128,6 +137,10 @@ const TASK_FIELD_REFUSALS = [
|
|
|
128
137
|
"task.invalid_parent: the parent is not a task of the project, or would make a loop",
|
|
129
138
|
];
|
|
130
139
|
|
|
140
|
+
/** What a command of the notifications (ADR-0157) meets at a console of before them, which has none of their routes. */
|
|
141
|
+
const NO_NOTIFICATIONS =
|
|
142
|
+
"a console older than the command has no notifications yet: the command says so, and ends with 1";
|
|
143
|
+
|
|
131
144
|
export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
132
145
|
login: {
|
|
133
146
|
usage:
|
|
@@ -184,6 +197,53 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
184
197
|
about:
|
|
185
198
|
"What is on your plate across the projects you may see: the open tasks you work on, the sooner due first, each with its project; and the decisions waiting for your answer (ADR-0042), each with who asked it and when, which is since when it waits. Needs no project. --person <login> shows another person's plate, for an administrator or for an owner of a project they are in: the open tasks they work on within the projects you may see, without the decisions.",
|
|
186
199
|
},
|
|
200
|
+
notifications: {
|
|
201
|
+
usage:
|
|
202
|
+
"notifications [--unread] [--limit <n>] [--offset <n>] | notifications --read <id> [<id>...] | notifications --read-all",
|
|
203
|
+
synopsis: "What the board told you, newest first; or some of it marked read.",
|
|
204
|
+
about: `What the board told you (ADR-0157), the newest first, across the projects you may see: the console decides whom a thing that happens is told to and keeps the record, for a person as for an agent account, and for an agent account what it is told is also what wakes it. One line each: its id, unread or read, when, why you are told, which is the kind (console notify says each) with (followed) where you are told because you turned the task's notifications on yourself, the project's key where it happened in one, and what happened, who did it and then the feed's sentence for it, which names a task by its number; a decision's id follows it, as console decision and console answer take it. A line after them says how many are unread, with what marks them read. --unread keeps the ones you have not read. A page at a time: ${NOTIFICATIONS_PAGE} unless --limit says otherwise, from --offset on; a last line says when there is more. Reading the listing marks nothing: --read marks the notifications named, by the ids the listing prints, and --read-all every one, and either says how many were marked and how many are still unread. Needs no project.`,
|
|
205
|
+
limits: [
|
|
206
|
+
`limit: 1 to ${MAX_NOTIFICATIONS_PAGE}`,
|
|
207
|
+
`read: up to ${MAX_NOTIFICATIONS_READ} ids at once`,
|
|
208
|
+
`a notification is kept for ${NOTIFICATIONS_KEPT_DAYS} days; what happened stays in the feed`,
|
|
209
|
+
],
|
|
210
|
+
refusals: [
|
|
211
|
+
"--read without an id, --read with --read-all, or either with --unread, --limit or --offset: not understood, and nothing is asked of the console",
|
|
212
|
+
NO_NOTIFICATIONS,
|
|
213
|
+
],
|
|
214
|
+
},
|
|
215
|
+
notify: {
|
|
216
|
+
usage:
|
|
217
|
+
"notify [--on <kind>]... [--off <kind>]... [--project-off <key>]... [--project-on <key>]... [--own-agents on|off] | notify --reset",
|
|
218
|
+
overview: "notify [--on <kind>]... [--off <kind>]... [flags] | notify --reset",
|
|
219
|
+
synopsis:
|
|
220
|
+
"What you are told of: each kind on or off, the projects turned off; or some changed.",
|
|
221
|
+
about:
|
|
222
|
+
"What you are told of (ADR-0157). Alone: a line per kind, on or off, with what it is of, and (default: ...) where you chose otherwise than a member who chose nothing has; then the projects you turned off, and whether what an agent of your own did as you is told to you. The kinds: assigned, a task was given to you, as its owner or to work on; ready, a task you work on is ready to begin, and not planned for a later day; moved, a task you own went from one state to another; changed, the title, the body or the days of a task of yours changed; commented, someone wrote on a task of yours; archived, a task of yours was put away; decision, a decision waits for you; answered, a decision you raised was answered; agent, an agent account that reports to you stopped, was refused, failed or is not heard from, or runs again after, or raised a decision for you. A person who chose nothing is told of agent alone, which is what cannot wait. An agent account is told of ready, commented, decision, answered and agent, what asks something of it: nobody attends it, and what it is told of is what wakes it. --on <kind> and --off <kind>, each given again for several, turn a kind on or off, the others staying as they are. These are of everything you are told. What a plugin sends on of it, to a messenger say, is chosen at that plugin, on a page or by a command of its own (console plugin <key>), and not here: a plugin is handed whom the console told, and a kind that is off tells you only of a task you turned on yourself. --project-off <key> turns a project off, of which you are then told nothing but what happens on a task you turned on yourself (console follow); --project-on <key> turns it on again. --own-agents on has you told of what an agent of your own did as you; off, which it is until said, leaves that out. --reset, alone, puts everything back to what a member who chose nothing has. After a change the settings are printed as they are now. One task is yours to turn on or off apart from the kinds: console follow <number> and console mute <number>. Needs no project.",
|
|
223
|
+
limits: [
|
|
224
|
+
`kind: one of ${NOTIFICATION_KINDS.join(", ")}`,
|
|
225
|
+
`at most ${MAX_NOTIFICATION_PROJECTS_OFF} projects turned off`,
|
|
226
|
+
],
|
|
227
|
+
refusals: [
|
|
228
|
+
"a kind that is none of them, a kind or a project said both on and off, or --reset beside another flag: not understood, and nothing is asked of the console",
|
|
229
|
+
"project.not_found: no project has a key named, or it is not yours to see; nothing was changed",
|
|
230
|
+
NO_NOTIFICATIONS,
|
|
231
|
+
],
|
|
232
|
+
},
|
|
233
|
+
follow: {
|
|
234
|
+
usage: "follow <number|id>",
|
|
235
|
+
synopsis: "Turns a task's notifications on for you.",
|
|
236
|
+
about:
|
|
237
|
+
"Turns a task's notifications on for you (ADR-0157). A task is on to begin with where it is yours, its owner's or a worker's, and a kind you have on would tell you of it (console notify), and off otherwise. Turned on where it was off to begin with, it tells you of everything that happens on it, a comment, a move, a change, whatever kinds you have on and in a project you turned off too; turned on again after console mute, where it was on to begin with, it tells you by your kinds as before. It is your own choice of that one task, and changes what nobody else is told. console task <number> says whether a task's notifications are on.",
|
|
238
|
+
refusals: ["task.not_found: no task has that number or id", NO_NOTIFICATIONS],
|
|
239
|
+
},
|
|
240
|
+
mute: {
|
|
241
|
+
usage: "mute <number|id>",
|
|
242
|
+
synopsis: "Turns a task's notifications off for you.",
|
|
243
|
+
about:
|
|
244
|
+
"Turns a task's notifications off for you (ADR-0157): you are told of nothing of it, whatever you are to it and whatever kinds you have on, so that an agent account is not woken by it either. It is your own choice of that one task, and changes what nobody else is told. console follow <number> turns them on again. console task <number> says whether a task's notifications are on.",
|
|
245
|
+
refusals: ["task.not_found: no task has that number or id", NO_NOTIFICATIONS],
|
|
246
|
+
},
|
|
187
247
|
tasks: {
|
|
188
248
|
usage:
|
|
189
249
|
"tasks [--state <state>] [--open] [--mine] [--category <key>] [--goal <id>] [--due <day|today|week|overdue>] [--unassigned] [--search <words>] [--archived] [--limit <n>] [--offset <n>]",
|
|
@@ -198,7 +258,7 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
198
258
|
"task <number|id> | task new <title> [flags] | task edit <number|id> [flags] | task archive <number|id>|--goal <id> | task restore <number|id>",
|
|
199
259
|
synopsis: "One task in full; or a task written, changed, put away or brought back.",
|
|
200
260
|
about:
|
|
201
|
-
"One task in full, with the address of its page (page: ..., what a person told of the task is given to open), its plan (category, goal, start and due days), what happened to it (when it was started and done, which the board keeps itself, and when it was put away), the decisions about it, the runs on it and the discussion on it, each comment whole with its files; or a new task written down; or a task changed, only in what the flags say, where none clears a field (priorities: low, normal, high, urgent). task new --take writes the task and takes it in one command, for work given in chat: it prints what task new prints, the number first, then what console take prints, with --rules and --agent as take has them; the task is written ready where no state is said, and a state that cannot be taken, done or dropped, is refused before anything is written. Where the take fails after the task was written, the command says so with the number: console take <number> is the way on, and the task is not written again. Where the run began and only the reading of what a take prints failed, it says that the task is taken, by which run, and that it is not taken again. archive puts a task away, whatever its state (ADR-0029, ADR-0030): out of the listings, the board and the calendar, open by its number still; with --goal, every done or dropped task of the goal at once, for an owner. restore brings one back.",
|
|
261
|
+
"One task in full, with the address of its page (page: ..., what a person told of the task is given to open), whether its notifications are on for you (notifications: on or off, console follow and console mute), its plan (category, goal, start and due days), what happened to it (when it was started and done, which the board keeps itself, and when it was put away), the decisions about it, the runs on it and the discussion on it, each comment whole with its files; or a new task written down; or a task changed, only in what the flags say, where none clears a field (priorities: low, normal, high, urgent). task new --take writes the task and takes it in one command, for work given in chat: it prints what task new prints, the number first, then what console take prints, with --rules and --agent as take has them; the task is written ready where no state is said, and a state that cannot be taken, done or dropped, is refused before anything is written. Where the take fails after the task was written, the command says so with the number: console take <number> is the way on, and the task is not written again. Where the run began and only the reading of what a take prints failed, it says that the task is taken, by which run, and that it is not taken again. archive puts a task away, whatever its state (ADR-0029, ADR-0030): out of the listings, the board and the calendar, open by its number still; with --goal, every done or dropped task of the goal at once, for an owner. restore brings one back.",
|
|
202
262
|
limits: [
|
|
203
263
|
`title: one line, up to ${MAX_TITLE_LENGTH} characters, saying what is to be done on its own; what it refers to goes in the body`,
|
|
204
264
|
`body: ${MARKDOWN}`,
|
|
@@ -266,13 +326,13 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
266
326
|
},
|
|
267
327
|
agent: {
|
|
268
328
|
usage:
|
|
269
|
-
'agent <handle> [--avatar <file>] [--account <service>=<name|none>]... [--day-start <HH:MM|none>] [--day-end <HH:MM|none>] | agent new <handle> [--login <login>] [--name "<name>"] [--title "<title>"] [--manager <login|me>] [--host gh|google] [--seed <seed>] [--convert] | agent tell <handle> "<words>" [--file <path>] | agent interrupt|stop|restart|reset|wake <handle> ["<words>"] | agent wake me ["<words>"] [--in <minutes> | --at <HH:MM>] [--key <name>] | agent wake me --cancel [--key <name>] | agent set <handle> [--model <name|none>] [--effort <level|none>] | agent signals <handle|me> [--limit <n>] [--before <number>] | agent secrets <handle> | agent secret <handle> <name> [--file <path>] [--expires <day|none>] | agent secret <handle> <name> --remove | agent invite <handle> [--
|
|
329
|
+
'agent <handle> [--avatar <file>] [--account <service>=<name|none>]... [--day-start <HH:MM|none>] [--day-end <HH:MM|none>] | agent new <handle> [--login <login>] [--name "<name>"] [--title "<title>"] [--manager <login|me>] [--host gh|google] [--seed <seed>] [--convert] | agent tell <handle> "<words>" [--file <path>] | agent interrupt|stop|restart|reset|wake <handle> ["<words>"] | agent wake me ["<words>"] [--in <minutes> | --at <HH:MM>] [--key <name>] | agent wake me --cancel [--key <name>] | agent reset me "<why>" [--file <path>] | agent set <handle> [--model <name|none>] [--effort <level|none>] | agent signals <handle|me> [--limit <n>] [--before <number>] | agent messages <source>:<conversation>[:<thread>] [--limit <n>] [--after <moment>] | agent secrets <handle> | agent secret <handle> <name> [--file <path>] [--expires <day|none>] | agent secret <handle> <name> --remove | agent invite <handle> [--out <path>] | agent invite <handle> --revoke | agent setup --console <origin> --code <code> [--guide] [--desk <dir>] [--new-desk] [--no-service] [--driver <name>] [--browser headless|chrome] [--no-browser] | agent setup --refresh [--desk <dir>]',
|
|
270
330
|
overview:
|
|
271
|
-
"agent <handle> | agent new <handle> [flags] | agent tell|interrupt|stop|restart|reset|set|wake|signals|secrets|invite <handle> | agent secret <handle> <name>",
|
|
331
|
+
"agent <handle> | agent new <handle> [flags] | agent tell|interrupt|stop|restart|reset|set|wake|signals|secrets|invite <handle> | agent secret <handle> <name> | agent messages <source>:<conversation>",
|
|
272
332
|
synopsis:
|
|
273
333
|
"One agent account and how it stands; or one made, told, stopped, started, or its secrets seeded, by whoever may.",
|
|
274
334
|
about:
|
|
275
|
-
"One agent account by its handle, with or without the @: its line as console agents prints it, and whether you supervise it. With --avatar, its avatar is written as a PNG file of 1024 pixels a side, to the path given, or into a directory under the handle's name: the picture is drawn here from the parts the console keeps (ADR-0084), for the profile of the agent's account elsewhere, at a messenger or at the identity provider, where the agent puts it with that service's own tool or in a browser. With --account <service>=<name>, given once for each, the accounts the agent holds elsewhere are recorded on it (ADR-0089), what it is called at each service by the service's short name, github=acme-mira say, and never a secret, so that whoever takes the account out reads what to close; =none takes one away. The account records its own, and a supervisor may. --day-start and --day-end keep the hours of its day, in the workspace's time zone (ADR-0085): at the start, 09:00 where none is said, the console sends it the day's briefing, its tasks planned for today, those carried over and the decisions that wait, and on the week's first day the week's; at the end, where it has one, a wrap, to write the day down and push its desk; none takes an hour away. By the account, or a supervisor. new makes an agent account, for an administrator: the handle it is called by, which never changes; --login, the account it will sign in with at the identity provider, a login at the git host or an address at Google, which a person makes there, and which is made of the workspace's short name, the handle and its domain where the workspace names its identity service and none is said (--host says the provider where the login's shape does not); --name, the handle capitalized when left out; --title, what it does; --manager, whom it reports to, you when left out; and the project it starts in, this directory's or --project. The member's row is written at once, so that work is assigned to it before anyone signed in with it. At Google its first sign-in with that address binds the provider's account to it. At a git host, where a login is whoever's registers it, the console asks the organization which account the login is and binds the row to that account at once (ADR-0126): the answer says confirmed, and that account alone is let in, whatever it is called by then; or not confirmed, where the organization has no member called so or could not be asked, and the account is let in once it is a member there, or where this console reads no organization at the host, and whoever holds the login is let in until the account has signed in. The console rolls its avatar, from --seed where one is given. A login a member already carries is refused (agent.login_is_member), so that nobody is made an agent account by a name that happens to be theirs; --convert says that the member is to become the account, once and for good, with everything they did. The pages make one from proposals instead: Agents, Add an agent account. tell, interrupt, stop, restart, reset, set and wake are a supervisor's signals to the account's runner (ADR-0085), sent in the supervisor's own name and kept on the account's record: tell says something to the agent, which reads it after the tool call it is at; interrupt stops what it is doing first, and without words has it read now what it was told and has not come to; stop ends its session, and nothing reaches it until it is started again; restart starts it with the conversation it had, for a product that hung or a sign-in that was mended; reset starts it with a new conversation, for one that cannot go on, and nothing else begins one for it; set chooses the model and the level of effort it runs with, among those its product offers, none for the product's own; wake says there is something to do. The words are given as an argument, with --file, or as - on standard input. wake me is the account's own (ADR-0145), on the command signed in as the account: a wake it raises for itself, which its runner takes as any wake, for whoever prepared its machine or signed something in there to say so, and for the agent to come back to something; --in <minutes> or --at <HH:MM>, the next time the workspace's clock says so, keeps it for later instead, one under a name (--key, wake where none is said), a second taking the first one's place, and --cancel takes one away. A wake and nothing else: what tells, stops or starts an agent stays its supervisors'. An agent the model refused, or whose product failed, waits: what a supervisor sends is tried at once, in the same conversation, so another model, another effort or other words are the first things to try. signals reads the record, the newest first: who told the agent what, and when, and of each whether it is delivered, the product having taken it or the record saying what became of it, or waiting for that, as the account's runner last said (ADR-0131); the account reads its own as console agent signals me. secrets and secret are a supervisor's part of the account's secret store (ADR-0087): secrets lists the names it keeps, with when each was set and the day it ends on where one is known; secret seeds one, write-only, so that a person or an agent above hands the account a credential it cannot make for itself, the value typed unseen at the terminal, or read from standard input when piped, or from --file, and never an argument; --expires says the day the value ends on, a product's long-lived token say; --remove takes one away. Nobody but the account reads a value back, and every setting, reading and removal is on the account's record. invite makes the invitation that leads a machine to the account (ADR-0088), for a supervisor: a code of eight letters and digits, shown this once, with the one line to say to the agent's product on its machine and the address where a person reads the same guide; made again, it takes the place of the one before, and --revoke takes it away. The code is no credential: it says which account a setup is for and opens the guide, good until its day or until the account's command has signed in, and the account is entered through its own sign-in alone. setup is the machine's own, run in the agent's OS account where an agent account is being set up, signed in nowhere yet. With the console and the code of the invitation's line, it prints the guide of that account's setup, the part of whoever prepares the machine and no more (ADR-0140), written for that account and the services of its workspace, and nothing secret; --guide stops there, and --json prints what the code opened and the guide whole, in its parts, with what the agent does when it starts and what it asks for. Then it goes on by itself. It looks at the machine first and says everything that is missing at once, with what installs it, and sets nothing up until it is there: git, the command of the agent's product, the first of claude and codex that answers or the one --driver names, and for a product with a browser tool of its own the browser that tool works in, unless --no-browser says the agent signs in at no page. Then it asks to be signed in as the account, opens the page in the machine's browser and waits until the account, signed in there, says that the command is it; a sign-in that turns out to be anyone else's is given up and nothing is set up. Signed in, it settles the desk, --desk <dir>, or this directory where it is a desk, or desk in the OS account's home: one that is there is left as it is; one the account pushed before is cloned from its git host, read with the account's own secret git.token, which is handed to git in the environment and never on a command line; otherwise a new one is written from the template, over no file that is there, its runner.json naming the product and the browser found, and --new-desk writes a new one whatever the account keeps. A desk it wrote or cloned is a repository whose git reads git.token from the account's store when the workspace's git host asks, in place of the machine's own helpers, so that the agent pushes with nothing typed and no copy kept elsewhere. It writes the service that keeps the runner running, launchd on macOS, a unit of the account's own systemd on Linux and a scheduled task on Windows, loads it, says whether the runner is heard from, waits a little for the agent's first session, and ends by saying where to watch it, that the machine's part ends there, and whether the machine is kept from sleeping; where no service is written, on another platform or with --no-service, it says how the runner is started by hand. It needs no administrator's rights. --refresh derives a machine again, by the account's own command in its desk, when the services or the account changed: what is missing of the desk is written, the service is written again where it changed and read when it is next loaded, and the services are said as they are now; it never unloads a service, which may be running under it.",
|
|
335
|
+
"One agent account by its handle, with or without the @: its line as console agents prints it, and whether you supervise it. With --avatar, its avatar is written as a PNG file of 1024 pixels a side, to the path given, or into a directory under the handle's name: the picture is drawn here from the parts the console keeps (ADR-0084), for the profile of the agent's account elsewhere, at a messenger or at the identity provider, where the agent puts it with that service's own tool or in a browser. With --account <service>=<name>, given once for each, the accounts the agent holds elsewhere are recorded on it (ADR-0089), what it is called at each service by the service's short name, github=acme-mira say, and never a secret, so that whoever takes the account out reads what to close; =none takes one away. The account records its own, and a supervisor may. --day-start and --day-end keep the hours of its day, in the workspace's time zone (ADR-0085): at the start, 09:00 where none is said, the console sends it the day's briefing, its tasks planned for today, those carried over and the decisions that wait, and on the week's first day the week's; at the end, where it has one, a wrap, to write the day down and push its desk; none takes an hour away. By the account, or a supervisor. new makes an agent account, for an administrator: the handle it is called by, which never changes; --login, the account it will sign in with at the identity provider, a login at the git host or an address at Google, which a person makes there, and which is made of the workspace's short name, the handle and its domain where the workspace names its identity service and none is said (--host says the provider where the login's shape does not); --name, the handle capitalized when left out; --title, what it does; --manager, whom it reports to, you when left out; and the project it starts in, this directory's or --project. The member's row is written at once, so that work is assigned to it before anyone signed in with it. At Google its first sign-in with that address binds the provider's account to it. At a git host, where a login is whoever's registers it, the console asks the organization which account the login is and binds the row to that account at once (ADR-0126): the answer says confirmed, and that account alone is let in, whatever it is called by then; or not confirmed, where the organization has no member called so or could not be asked, and the account is let in once it is a member there, or where this console reads no organization at the host, and whoever holds the login is let in until the account has signed in. The console rolls its avatar, from --seed where one is given. A login a member already carries is refused (agent.login_is_member), so that nobody is made an agent account by a name that happens to be theirs; --convert says that the member is to become the account, once and for good, with everything they did. The pages make one from proposals instead: Agents, Add an agent account. tell, interrupt, stop, restart, reset, set and wake are a supervisor's signals to the account's runner (ADR-0085), sent in the supervisor's own name and kept on the account's record: tell says something to the agent, which reads it after the tool call it is at; interrupt stops what it is doing first, and without words has it read now what it was told and has not come to; stop ends its session, and nothing reaches it until it is started again; restart starts it with the conversation it had, for a product that hung or a sign-in that was mended; reset starts it with a new conversation, at once, for one that cannot go on: nothing begins one by itself, and the agent begins one for itself with reset me; set chooses the model and the level of effort it runs with, among those its product offers, none for the product's own; wake says there is something to do. The words are given as an argument, with --file, or as - on standard input. wake me is the account's own (ADR-0145), on the command signed in as the account: a wake it raises for itself, which its runner takes as any wake, for whoever prepared its machine or signed something in there to say so, and for the agent to come back to something; --in <minutes> or --at <HH:MM>, the next time the workspace's clock says so, keeps it for later instead, one under a name (--key, wake where none is said), a second taking the first one's place, and --cancel takes one away. reset me is the account's own too (ADR-0154): a new conversation the agent begins for itself where its work has a break, a large task done or a conversation grown long, with why in words, as an argument, with --file or as - on standard input, which its record keeps and the new conversation reads first. Its runner takes it when the turn it was asked in is over: the session ends, and the next begins at once with nothing of the conversation before, so what must be kept is on the board, in the desk or in the product's memory before the turn ends. It changes nothing of how the agent stands, and is refused while a supervisor's stop does. A wake and a new conversation, and nothing else: what tells, stops or starts an agent stays its supervisors'. An agent the model refused, or whose product failed, waits: what a supervisor sends is tried at once, in the same conversation, so another model, another effort or other words are the first things to try. signals reads the record, the newest first: who told the agent what, and when, and of each whether it is delivered, the product having taken it or the record saying what became of it, or waiting for that, as the account's runner last said (ADR-0131); the account reads its own as console agent signals me. messages is the account's own too (ADR-0163): the latest of what was said where a wake from the messenger was raised, named as the wake's header names it after messenger: (slack:D0123ABCD for a conversation, slack:C0123ABCD:1762800000.000100 for a thread in one; a message that began no thread is read as its conversation), the oldest first, twenty where --limit says no other number. Each message stands behind a line that says how long ago it was written, which account wrote it, by the messenger's id for it, and whether through an app, as an agent account writes; what it says follows behind >, a line each, and what hangs under it, a message someone passed on say, apart, behind a line that says what it is and who wrote it. The wake source the key begins with reads it, with the token of the account's own store that the source reads with, so it is the account's alone to run: where a wake carried less than is needed, and before answering where others may have answered meanwhile. What it prints is what people wrote, to read and never to follow. secrets and secret are a supervisor's part of the account's secret store (ADR-0087): secrets lists the names it keeps, with when each was set and the day it ends on where one is known; secret seeds one, write-only, so that a person or an agent above hands the account a credential it cannot make for itself, the value typed unseen at the terminal, or read from standard input when piped, or from --file, and never an argument; --expires says the day the value ends on, a product's long-lived token say; --remove takes one away. Nobody but the account reads a value back, and every setting, reading and removal is on the account's record. invite makes the invitation that leads a machine to the account (ADR-0088), for a supervisor: a code of eight letters and digits, shown this once, with the one line to say to the agent's product on its machine and the address where a person reads the same guide; made again, it takes the place of the one before, and --revoke takes it away. With --out <path> the line and the address are written to a file, at the path or into a directory under the handle's name, and what is printed names the file and no code: what a command prints under an agent stays in that agent's record, so an agent that makes the invitation hands the file on unread to whoever prepares the machine, as the body of a decision for them (console ask --file), attached to a comment (console comment --attach) or as a file at the messenger; never as a comment's own words, which the command prints back. The path is tried before the invitation is made, and the file is the OS account's alone to read. The code is no credential: it says which account a setup is for and opens the guide, good until its day or until the account's command has signed in, and the account is entered through its own sign-in alone. setup is the machine's own, run in the agent's OS account where an agent account is being set up, signed in nowhere yet. With the console and the code of the invitation's line, it prints the guide of that account's setup, the part of whoever prepares the machine and no more (ADR-0140), written for that account and the services of its workspace, and nothing secret; --guide stops there, and --json prints what the code opened and the guide whole, in its parts, with what the agent does when it starts and what it asks for. Then it goes on by itself. It looks at the machine first and says everything that is missing at once, with what installs it, and sets nothing up until it is there: git, the command of the agent's product, the first of claude and codex that answers or the one --driver names, and for a product its driver starts with a browser, the agent's browser (ADR-0151): Google Chrome and the program that drives it with no window (chrome-devtools-mcp), which need no screen, no extension and no sign-in, unless --browser chrome names the product's own browser tool instead, in a Chrome with a window, or --no-browser says the agent signs in at no page, and its desk names none. Then it asks to be signed in as the account, opens the page in the machine's browser and waits until the account, signed in there, says that the command is it; a sign-in that turns out to be anyone else's is given up and nothing is set up. Signed in, it settles the desk, --desk <dir>, or this directory where it is a desk, or desk in the OS account's home: one that is there is left as it is; one the account pushed before is cloned from its git host, read with the account's own secret git.token, which is handed to git in the environment and never on a command line; otherwise a new one is written from the template, over no file that is there, its runner.json naming the product and the browser found, and --new-desk writes a new one whatever the account keeps. A desk it wrote or cloned is a repository whose git reads git.token from the account's store when the workspace's git host asks, in place of the machine's own helpers, so that the agent pushes with nothing typed and no copy kept elsewhere. It writes the service that keeps the runner running, launchd on macOS, a unit of the account's own systemd on Linux and a scheduled task on Windows, loads it, says whether the runner is heard from, waits a little for the agent's first session, and ends by saying where to watch it, that the machine's part ends there, whether the machine is kept from sleeping and, on a Mac, which of its settings would still leave the agent unheard with nobody there (a sleep when idle, a restart the account is not logged in after, updates that restart it), each with what to change and its cost; where no service is written, on another platform or with --no-service, it says how the runner is started by hand. It needs no administrator's rights. --refresh derives a machine again, by the account's own command in its desk, when the services or the account changed: what is missing of the desk is written, the service is written again where it changed and read when it is next loaded, and the services are said as they are now; it never unloads a service, which may be running under it.",
|
|
276
336
|
limits: [
|
|
277
337
|
`handle: ${MIN_HANDLE_LENGTH} to ${MAX_HANDLE_LENGTH} lowercase letters, digits and hyphens, a letter or a digit first and last; none of new, me, proposals, setup`,
|
|
278
338
|
`name: one line, up to ${MAX_PERSON_NAME_LENGTH} characters; title: one line, up to ${MAX_PERSON_TITLE_LENGTH}`,
|
|
@@ -294,6 +354,8 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
294
354
|
"auth.forbidden, of a signal or a secret: only a supervisor of the account sends one, seeds or removes one",
|
|
295
355
|
"signal.not_offered: the model or the effort is none of those the agent's product offers",
|
|
296
356
|
`signal.too_many, of wake me: the account raised as many wakes for itself within the hour as it may, ${MAX_OWN_WAKES_PER_HOUR}`,
|
|
357
|
+
`signal.too_many, of reset me: the account began as many conversations for itself within the hour as it may, ${MAX_OWN_RESETS_PER_HOUR}`,
|
|
358
|
+
"agent.stopped, of reset me: a supervisor's stop stands, and whoever starts the agent again says with which conversation",
|
|
297
359
|
`wake.too_many: the account keeps as many wakes for later as it may, ${MAX_OWN_WAKES}; take one away with --cancel`,
|
|
298
360
|
"wake.not_found: the account keeps no wake of that name",
|
|
299
361
|
"secret.not_found: the account keeps no secret of that name",
|
|
@@ -469,13 +531,13 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
469
531
|
},
|
|
470
532
|
skills: {
|
|
471
533
|
usage:
|
|
472
|
-
"skills | skills <folder|file> [--limit <n>] [--cursor <cursor>] | skills --search <words> [<folder>|--path <folder>] [--limit <n>] [--cursor <cursor>] | skills --rows [<folder|file>] [--heading <words>] [--format csv|json] [--out <path>] | skills --code [<folder|file>] [--heading <words>] [--grep <pattern>] [--out <path>]",
|
|
534
|
+
"skills [--cursor <cursor>] | skills <folder|file> [--limit <n>] [--cursor <cursor>] | skills --search <words> [<folder>|--path <folder>] [--limit <n>] [--cursor <cursor>] | skills --rows [<folder|file>] [--heading <words>] [--format csv|json] [--out <path>] | skills --code [<folder|file>] [--heading <words>] [--grep <pattern>] [--out <path>]",
|
|
473
535
|
overview:
|
|
474
536
|
"skills | skills <folder|file> [--rows|--code] | skills --search <words> [<folder>] [flags]",
|
|
475
537
|
synopsis:
|
|
476
538
|
"The project's pack, the organization's where none is named: skills; a folder or an outline; tables or code as data; a search.",
|
|
477
539
|
about:
|
|
478
|
-
"The project's pack, read by the console at the project's address, or the organization's: at a SkillCDN deployment, with the pack token the project holds where the pack is private (ADR-0028), or from a directory on the console's machine for a local address (ADR-0031). In a directory that names no project, a desk or a folder a repository is about to be made in, the organization's pack, read with the workspace's SkillCDN token, for every member (ADR-0113): every form below reads it the same, under a first line that says whose pack it is, which --rows, --code and --json leave out. Alone: where the pack is and what a client is told of it on connect, then every skill with the path of its SKILL.md and every document, as a connection of your own would list them, and where the console's own skills are on this machine. With a folder (. for the root): a page of what it holds, as browse_repo lays it out for a model: its skills, its folders with what each holds and the README that introduces it, its files; 50 entries unless --limit says otherwise (up to 200), and a page that ends before the folder does names its nextCursor, which --cursor continues. With a file's path: the file's outline, every heading with its level and the offset and limit that read its section with console skill --file, paged the same way; a file that is not Markdown has none; a document that has tables or fenced code blocks says how many, and the command that reads them as data. With --rows: the tables of the document, or of every document under the folder (the whole pack when none is named), as data (ADR-0100), for a program to take whole where a model would copy them out row by row: one CSV, a header of path, heading and every column name the tables have, then a line per row in reading order, a table that stands in several sections and files under one header coming out as one; every page the pack answers, joined; --format json prints an array of rows instead, each with its path, its heading and its cells by column name. With --code: the fenced code blocks, as written, each under a line that names its file, the section it stands in and what it says it is written in; --grep <pattern> keeps the blocks whose text matches, a regular expression as JavaScript reads one, run on this machine. --heading <words> keeps the tables or the blocks under a heading whose path holds every word. --out <path> writes the file there, or into a directory, and says how much was written, instead of printing; --json gives the tables with their columns and rows, or the blocks, as the pack answered them. A read as data that the pack refuses fails, with why on standard error, so that what a program takes is never a refusal. With --search: what the words find, as search_repo does: skills first, with the files of theirs that matched, then documents, each with the sections of it that matched and what reads each, in relevance order; words in the language the pack is written in, and meaning too where the deployment searches by it, which the result then says; within the folder when one is named, after the words or with --path <folder>; 10 unless --limit says otherwise, up to 25, and a nextCursor line says when more matched, which --cursor continues. The text is the one an MCP client's model is given, with the reads named as these commands, and each read is the skillcdn command's own, printed by that command's reads (ADR-0124): skillcdn skills, browse, find, rows and code, page for page. A read the pack refused ends the command with exit 1 and the refusal on standard error, the listing too. --json answers with the console's own JSON: what the pack answered, in the shapes of the main repository's REST API, a page as it came, the tables or the blocks joined.",
|
|
540
|
+
"The project's pack, read by the console at the project's address, or the organization's: at a SkillCDN deployment, with the pack token the project holds where the pack is private (ADR-0028), or from a directory on the console's machine for a local address (ADR-0031). In a directory that names no project, a desk or a folder a repository is about to be made in, the organization's pack, read with the workspace's SkillCDN token, for every member (ADR-0113): every form below reads it the same, under a first line that says whose pack it is, which --rows, --code and --json leave out. Alone: where the pack is and what a client is told of it on connect, then every skill with the path of its SKILL.md and every document, as a connection of your own would list them, and where the console's own skills are on this machine; a listing longer than one command's output comes in pages, each ending with the command that lists the rest, with its --cursor. With a folder (. for the root): a page of what it holds, as browse_repo lays it out for a model: its skills, its folders with what each holds and the README that introduces it, its files; 50 entries unless --limit says otherwise (up to 200), and a page that ends before the folder does names its nextCursor, which --cursor continues. With a file's path: the file's outline, every heading with its level and the offset and limit that read its section with console skill --file, paged the same way; a file that is not Markdown has none; a document that has tables or fenced code blocks says how many, and the command that reads them as data. With --rows: the tables of the document, or of every document under the folder (the whole pack when none is named), as data (ADR-0100), for a program to take whole where a model would copy them out row by row: one CSV, a header of path, heading and every column name the tables have, then a line per row in reading order, a table that stands in several sections and files under one header coming out as one; every page the pack answers, joined; --format json prints an array of rows instead, each with its path, its heading and its cells by column name. With --code: the fenced code blocks, as written, each under a line that names its file, the section it stands in and what it says it is written in; --grep <pattern> keeps the blocks whose text matches, a regular expression as JavaScript reads one, run on this machine. --heading <words> keeps the tables or the blocks under a heading whose path holds every word. --out <path> writes the file there, or into a directory, and says how much was written, instead of printing; --json gives the tables with their columns and rows, or the blocks, as the pack answered them. A read as data that the pack refuses fails, with why on standard error, so that what a program takes is never a refusal. With --search: what the words find, as search_repo does: skills first, with the files of theirs that matched, then documents, each with the sections of it that matched and what reads each, in relevance order; words in the language the pack is written in, and meaning too where the deployment searches by it, which the result then says; within the folder when one is named, after the words or with --path <folder>; 10 unless --limit says otherwise, up to 25, and a nextCursor line says when more matched, which --cursor continues. The text is the one an MCP client's model is given, with the reads named as these commands, and each read is the skillcdn command's own, printed by that command's reads (ADR-0124): skillcdn skills, browse, find, rows and code, page for page. A read the pack refused ends the command with exit 1 and the refusal on standard error, the listing too. --json answers with the console's own JSON: what the pack answered, in the shapes of the main repository's REST API, a page as it came, the tables or the blocks joined.",
|
|
479
541
|
limits: [
|
|
480
542
|
"search: 1 to 500 characters; limit: 1 to 25 with --search, 1 to 200 for a folder or an outline",
|
|
481
543
|
"heading: up to 500 characters",
|
|
@@ -494,7 +556,7 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
494
556
|
synopsis:
|
|
495
557
|
"One skill of the pack, its rules first, a long one in parts; or with --file a page of a file, or what a folder holds.",
|
|
496
558
|
about:
|
|
497
|
-
"One skill of the project's pack, or of the organization's where no project is named (ADR-0113), as load_skill lays it out for a model and as skillcdn skill prints it (ADR-0124): the rules of the repository from its root to the nearest manifest, the skill's instructions, the files it includes, then its supporting files and what it refers to. A skill of up to 28000
|
|
559
|
+
"One skill of the project's pack, or of the organization's where no project is named (ADR-0113), as load_skill lays it out for a model and as skillcdn skill prints it (ADR-0124): the rules of the repository from its root to the nearest manifest, the skill's instructions, the files it includes, then its supporting files and what it refers to. A skill of up to 28000 bytes is printed whole; a longer one in parts, since a host shows an agent no more of one command's output: a part says at its head and at its end that the skill goes on, with how many pages follow it where the pack counts them, and its last line is the command that prints the next part, with its --cursor; the last part says that the skill is complete. Read every part before using the skill. Read by the console from the pack, with the pack token the project holds where the pack is private, so you need no connection of your own. <path> is the path of the SKILL.md from the repository's root, as console skills lists it, or of the skill's folder, which is read as its SKILL.md, or the URI the pack names it by (skill://<host>/<owner>/<name>/<path>). --file <path> reads a page of a file of the pack instead, as read_repo_file does and as skillcdn file prints it (ADR-0124), or what a folder holds, and takes no skill's path beside it: the text as written from character --offset, 24000 characters ended at the end of a line unless --limit says otherwise (up to 100000), and a page that ends before the file does says where the next begins; a search or an outline (console skills <file>) names a section by its offset and limit. A read the pack refused ends the command with exit 1 and the refusal on standard error. --json answers with what the pack answered, in the shapes of the main repository's REST API: a skill whole, its pages joined, from --cursor where one is given, and a file's page as the API gives it, 40000 characters unless --limit says otherwise.",
|
|
498
560
|
limits: [
|
|
499
561
|
"offset: 0 or more; limit: 1 to 100000 characters; both with --file",
|
|
500
562
|
"cursor: the one the part before ended with; with a skill's path, never with --file",
|
|
@@ -517,7 +579,6 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
517
579
|
"What agents are asked on this board (ADR-0023, ADR-0120), under a first line that says what follows (ADR-0119): the mark of the rules, which parts there are and how many characters each is, who adds nothing, and that a later take of the session leaves them out with console take <number> --rules <mark>. Then the parts, what differs first and what always holds last: what this project adds; a section Plugins, which names the plugins bound to the project that you hold a role in, or at the workspace every plugin you may use, a line each with the sentence its manifest gives agents and where to start: console plugin <key>; what the organization adds; and the console's rules, which always hold and which nobody edits. Where they differ the earlier part holds, and none takes back what the console's rules say never happens. The mark is the same for the same rules, and another once a rule changed, for another project's and in another language. rules write writes what this project adds, for an owner, or with --workspace what the organization adds, for an administrator; none puts what was added away. Without a project named, rules shows what the organization adds and the console's rules alone.",
|
|
518
580
|
limits: [
|
|
519
581
|
`body: Markdown, up to ${MAX_RULES_LENGTH} characters: what is added, and nothing of the console's rules`,
|
|
520
|
-
"--workspace: a console before 0.5.1 keeps what is written as the organization's whole rules, in the place of its own; the command asks the console first, and writes nothing there",
|
|
521
582
|
],
|
|
522
583
|
refusals: [
|
|
523
584
|
"auth.forbidden: an owner writes what a project adds, an administrator what the organization adds",
|
|
@@ -542,7 +603,7 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
542
603
|
limits: [
|
|
543
604
|
"a command line: up to 200 words of up to 50,000 characters each; one file, up to the file bound (console help hand-in), with the plugin's files capability",
|
|
544
605
|
"records: a page of up to 200; where: a field the collection indexes",
|
|
545
|
-
"events: a page of up to 100, 50 unless said
|
|
606
|
+
"events: a page of up to 100, 50 unless said",
|
|
546
607
|
"enable: consent names every capability the manifest requires, and the optional ones to turn on; settings and secrets as the manifest bounds them",
|
|
547
608
|
"capabilities: --consent names the optional capabilities the plugin holds from now on, none for none of them; those it requires stay",
|
|
548
609
|
],
|
|
@@ -684,7 +745,7 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
684
745
|
usage: 'fail [--summary "<markdown>"|--file <path>] [--run <id>]',
|
|
685
746
|
overview: 'fail [--summary "<markdown>"|--file <path>]',
|
|
686
747
|
synopsis: "Ends the run: the work could not be done.",
|
|
687
|
-
about: `Ends the run: the work could not be done, and the task goes up for review, for a person to look at why (ADR-0114). The summary says why, and what is left. The command then reads the task and says the state it is in:
|
|
748
|
+
about: `Ends the run: the work could not be done, and the task goes up for review, for a person to look at why (ADR-0114). The summary says why, and what is left. The command then reads the task and says the state it is in: it is left in progress where a person moved it meanwhile or another run is open on it. ${ON_THE_RUN}`,
|
|
688
749
|
limits: [`summary: Markdown, up to ${MAX_SUMMARY_LENGTH} characters`],
|
|
689
750
|
refusals: RUN_REFUSALS,
|
|
690
751
|
},
|
|
@@ -692,7 +753,7 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
692
753
|
usage: 'abandon [<run id>] [--summary "<markdown>"]',
|
|
693
754
|
synopsis: "Leaves a run and gives its task back.",
|
|
694
755
|
about:
|
|
695
|
-
"Leaves a run, one taken by mistake or one that will not come back: the task goes back to the state the take found it in (ADR-0114), unless a person moved it meanwhile. The command then reads the task and says the state it is in
|
|
756
|
+
"Leaves a run, one taken by mistake or one that will not come back: the task goes back to the state the take found it in (ADR-0114), unless a person moved it meanwhile. The command then reads the task and says the state it is in. A person gives up this way on a run of theirs, and an owner of the project on anyone's.",
|
|
696
757
|
limits: [`summary: Markdown, up to ${MAX_SUMMARY_LENGTH} characters`],
|
|
697
758
|
refusals: RUN_REFUSALS,
|
|
698
759
|
},
|
|
@@ -829,7 +890,7 @@ export const COMMAND_HELP: Readonly<Record<string, CommandHelp>> = {
|
|
|
829
890
|
usage: "runner",
|
|
830
891
|
synopsis: "For an agent account's machine: keeps its agent's session going, in its desk.",
|
|
831
892
|
about:
|
|
832
|
-
"For an agent account's machine: the runner of the account the command is signed in as (console login --self), started in its desk. It starts the agent's product there, hands it what the console sends, a supervisor's tell or a wake, as messages under a header only the session knows, reports what the product does as the session's transcript, and says every thirty seconds that it is there. It restarts nothing by itself: an agent that cannot go on waits, and its supervisor's next word is tried. runner.json in the desk names the product's driver, claude, codex or acp, the wake sources beside the console's own, the secrets a session is handed, and, as browser, the browser
|
|
893
|
+
"For an agent account's machine: the runner of the account the command is signed in as (console login --self), started in its desk. It starts the agent's product there, hands it what the console sends, a supervisor's tell or a wake, as messages under a header only the session knows, reports what the product does as the session's transcript, and says every thirty seconds that it is there. It restarts nothing by itself: an agent that cannot go on waits, and its supervisor's next word is tried. runner.json in the desk names the product's driver, claude, codex or acp, the wake sources beside the console's own, the secrets a session is handed, and, as browser, the agent's browser: headless, a Chrome with no window that a program the product is started with drives, which is what a file that names none means; chrome, the product's own browser tool in a Chrome with a window; or none. A runner.json that changed is taken by itself (ADR-0144): the runner ends between two turns and begins again with it, in the same process and with the same conversation; one that does not read changes nothing, and the agent is told what is wrong with it. While it runs, the machine is kept from sleeping when idle, through the system's own helper and with no setting of the machine changed. Stop it with Ctrl+C; where the service that keeps it running names its own process (CONSOLE_RUNNER_KEEPER), it stops when that process is gone.",
|
|
833
894
|
refusals: [
|
|
834
895
|
"a runner is an agent account's own: sign the command in as the account, console login --self",
|
|
835
896
|
"runner.json does not read: nothing of it is used",
|
|
@@ -893,6 +954,10 @@ const SECTIONS: readonly { readonly title: string; readonly commands: readonly s
|
|
|
893
954
|
title: "The board",
|
|
894
955
|
commands: [
|
|
895
956
|
"work",
|
|
957
|
+
"notifications",
|
|
958
|
+
"notify",
|
|
959
|
+
"follow",
|
|
960
|
+
"mute",
|
|
896
961
|
"tasks",
|
|
897
962
|
"task",
|
|
898
963
|
"goals",
|
package/src/cli/machine-check.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import { HEADLESS_TOOL, headlessToolCommand, headlessToolKnowsWords } from "../runner/browser.js";
|
|
2
|
+
import type { RunnerBrowser } from "../runner/config.js";
|
|
1
3
|
import type { SetupMachine } from "./setup-machine.js";
|
|
2
4
|
|
|
3
5
|
// What `console agent setup` looks for on a machine before it asks anyone to sign in (ADR-0140):
|
|
4
|
-
// git, the command of the agent's product, and the
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
6
|
+
// git, the command of the agent's product, and the agent's browser, which is a Chrome with no
|
|
7
|
+
// window and the program that drives it unless whoever runs the setup names the product's own
|
|
8
|
+
// browser tool (ADR-0151). Everything that is missing is found in one look and said at once,
|
|
9
|
+
// with what installs it, so that the session that was given the line installs it all and runs
|
|
10
|
+
// the line again, and a person is asked to sign in once, on a machine that is ready. What the
|
|
11
|
+
// setup cannot see, a product's sign-in and a browser's extension, it says in a line and does
|
|
12
|
+
// not hold up for.
|
|
9
13
|
|
|
10
14
|
/** A product the package has a driver for, as a setup looks for it on a machine. */
|
|
11
15
|
interface Product {
|
|
@@ -14,8 +18,14 @@ interface Product {
|
|
|
14
18
|
readonly command: string;
|
|
15
19
|
/** What installs it for an OS account, by platform; `any` where one line does everywhere. */
|
|
16
20
|
readonly install: Readonly<Record<string, string>>;
|
|
17
|
-
/**
|
|
18
|
-
|
|
21
|
+
/**
|
|
22
|
+
* The browsers its driver starts it with, by the names `runner.json` takes (ADR-0151):
|
|
23
|
+
* `headless` asks nothing of the product, and `chrome` is the product's own browser tool,
|
|
24
|
+
* with what that tool needs in the browser. Left out, its driver starts it with none.
|
|
25
|
+
*/
|
|
26
|
+
readonly browsers?:
|
|
27
|
+
| { readonly headless?: true; readonly chrome?: { readonly needs: string } }
|
|
28
|
+
| undefined;
|
|
19
29
|
}
|
|
20
30
|
|
|
21
31
|
const PRODUCTS: readonly Product[] = [
|
|
@@ -28,7 +38,7 @@ const PRODUCTS: readonly Product[] = [
|
|
|
28
38
|
// The runner starts a program, and npm makes a script of it there.
|
|
29
39
|
win32: "its native installer for Windows, which puts claude.exe on the PATH",
|
|
30
40
|
},
|
|
31
|
-
|
|
41
|
+
browsers: { headless: true, chrome: { needs: "the Claude in Chrome extension" } },
|
|
32
42
|
},
|
|
33
43
|
{
|
|
34
44
|
driver: "codex",
|
|
@@ -41,14 +51,22 @@ const PRODUCTS: readonly Product[] = [
|
|
|
41
51
|
},
|
|
42
52
|
];
|
|
43
53
|
|
|
54
|
+
/** The browsers a setup looks for, and the one for none: what a new desk may name from a setup. */
|
|
55
|
+
export type SetupBrowser = Exclude<RunnerBrowser, "window">;
|
|
56
|
+
|
|
44
57
|
/** What a look at a machine found. */
|
|
45
58
|
export interface MachineLook {
|
|
46
59
|
/** The driver of the product found, or the one asked for; nothing where none was found. */
|
|
47
60
|
readonly driver: string | undefined;
|
|
48
61
|
/** What the product is called and the version it says, where it answered. */
|
|
49
62
|
readonly product: string | undefined;
|
|
50
|
-
/**
|
|
51
|
-
|
|
63
|
+
/**
|
|
64
|
+
* The agent's browser, as a new desk names it: the one asked for, where the product is
|
|
65
|
+
* started with it and it is there, and `none` where none was asked for. Nothing where the
|
|
66
|
+
* product is started with none, or none was found: the desk then names what a `runner.json`
|
|
67
|
+
* that says nothing means.
|
|
68
|
+
*/
|
|
69
|
+
readonly browser: SetupBrowser | undefined;
|
|
52
70
|
/** What is missing, a line each, with what installs it: the setup stops for any of these. */
|
|
53
71
|
readonly missing: readonly string[];
|
|
54
72
|
/** What the setup could not see and says once: it goes on. */
|
|
@@ -76,12 +94,19 @@ function gitMissing(platform: string): string {
|
|
|
76
94
|
}
|
|
77
95
|
}
|
|
78
96
|
|
|
79
|
-
/**
|
|
80
|
-
|
|
97
|
+
/**
|
|
98
|
+
* Whether Google Chrome is on the machine, looked for where each system keeps it. `by` says
|
|
99
|
+
* who starts it. A person, or a product's tool in a browser that is open, takes it wherever it
|
|
100
|
+
* is. The program that starts one with no window looks in the system's own place and nowhere
|
|
101
|
+
* else: a copy in the OS account's own Applications on a Mac, or a command of its name on
|
|
102
|
+
* Linux that is not its maker's package, is none that program finds.
|
|
103
|
+
*/
|
|
104
|
+
async function chromeThere(machine: SetupMachine, by: "person" | "program"): Promise<boolean> {
|
|
81
105
|
if (machine.platform === "darwin") {
|
|
82
106
|
return (
|
|
83
107
|
(await machine.exists("/Applications/Google Chrome.app")) ||
|
|
84
|
-
(
|
|
108
|
+
(by === "person" &&
|
|
109
|
+
(await machine.exists(machine.path(machine.home, "Applications", "Google Chrome.app"))))
|
|
85
110
|
);
|
|
86
111
|
}
|
|
87
112
|
if (machine.platform === "win32") {
|
|
@@ -104,6 +129,9 @@ async function chromeThere(machine: SetupMachine): Promise<boolean> {
|
|
|
104
129
|
}
|
|
105
130
|
return false;
|
|
106
131
|
}
|
|
132
|
+
if (by === "program") {
|
|
133
|
+
return machine.exists("/opt/google/chrome/chrome");
|
|
134
|
+
}
|
|
107
135
|
for (const command of ["google-chrome", "google-chrome-stable"]) {
|
|
108
136
|
if ((await answers(machine, command, ["--version"])) !== undefined) {
|
|
109
137
|
return true;
|
|
@@ -112,14 +140,27 @@ async function chromeThere(machine: SetupMachine): Promise<boolean> {
|
|
|
112
140
|
return false;
|
|
113
141
|
}
|
|
114
142
|
|
|
143
|
+
/** Where Google Chrome is put for the program that starts it with no window, in a few words for a line that asks for it. */
|
|
144
|
+
function chromePlace(platform: string): string {
|
|
145
|
+
switch (platform) {
|
|
146
|
+
case "darwin":
|
|
147
|
+
return " in /Applications, where the program that starts it looks";
|
|
148
|
+
case "linux":
|
|
149
|
+
return " from its maker's package (google-chrome-stable), which takes an administrator";
|
|
150
|
+
default:
|
|
151
|
+
return "";
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
115
155
|
/**
|
|
116
156
|
* Looks at the machine: git, the product, its browser. `driver` names the product where whoever
|
|
117
157
|
* runs the setup said one, and the first of the package's products that answers is taken where
|
|
118
|
-
* they said none; `browser
|
|
158
|
+
* they said none; `browser` is the browser asked for, `headless` where whoever runs the setup
|
|
159
|
+
* said none, and `none` for an agent that signs in at no page.
|
|
119
160
|
*/
|
|
120
161
|
export async function lookAtMachine(
|
|
121
162
|
machine: SetupMachine,
|
|
122
|
-
wanted: { readonly driver?: string | undefined; readonly browser:
|
|
163
|
+
wanted: { readonly driver?: string | undefined; readonly browser: SetupBrowser },
|
|
123
164
|
): Promise<MachineLook> {
|
|
124
165
|
const missing: string[] = [];
|
|
125
166
|
const notes: string[] = [];
|
|
@@ -154,17 +195,52 @@ export async function lookAtMachine(
|
|
|
154
195
|
);
|
|
155
196
|
}
|
|
156
197
|
|
|
157
|
-
let browser: "
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
);
|
|
198
|
+
let browser: SetupBrowser | undefined = wanted.browser === "none" ? "none" : undefined;
|
|
199
|
+
if (found !== undefined && wanted.browser !== "none") {
|
|
200
|
+
const { name, browsers } = found.product;
|
|
201
|
+
const tool = browsers?.chrome;
|
|
202
|
+
if (wanted.browser === "headless" && browsers?.headless === true) {
|
|
203
|
+
// Nothing of it is the product's or a person's: the browser and the program that drives
|
|
204
|
+
// it are both seen from here, and there is no extension and no sign-in to say a line of.
|
|
205
|
+
const chrome = await chromeThere(machine, "program");
|
|
206
|
+
const program = headlessToolCommand(machine.platform, ["--version"]);
|
|
207
|
+
const answered = await answers(machine, program.command, program.args);
|
|
208
|
+
const drives = answered !== undefined;
|
|
209
|
+
// One that answers and is older than the words it is started with: what npm installs,
|
|
210
|
+
// without a word, on a Node.js older than the program needs.
|
|
211
|
+
const old = answered !== undefined && !headlessToolKnowsWords(answered);
|
|
212
|
+
if (!chrome) {
|
|
213
|
+
missing.push(
|
|
214
|
+
`Google Chrome: the agent's browser is a Chrome with no window, which ${name} is started with, and the agent signs in at its services in it. Install it${chromePlace(machine.platform)}. For an agent that signs in at no page, say --no-browser.`,
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
if (!drives) {
|
|
218
|
+
missing.push(
|
|
219
|
+
`${HEADLESS_TOOL.command}: the program that drives a Chrome with no window for ${name} does not answer. Install it: ${HEADLESS_TOOL.install}. It runs on ${HEADLESS_TOOL.needs}: where it is installed and does not answer, the machine's Node.js is older.${tool === undefined ? "" : ` For ${name}'s own browser tool instead, in a Chrome with a window and ${tool.needs}, say --browser chrome.`}`,
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
if (old) {
|
|
223
|
+
missing.push(
|
|
224
|
+
`${HEADLESS_TOOL.command}: the one on this machine is ${/^v?[\d.]{1,20}/.exec(answered ?? "")?.[0] ?? "old"}, older than ${HEADLESS_TOOL.least}, the first that knows the words ${name} starts it with. npm installs one that old where the machine's Node.js is older than the program needs, ${HEADLESS_TOOL.needs}: update Node.js, then ${HEADLESS_TOOL.install}.`,
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
if (chrome && drives && !old) {
|
|
228
|
+
browser = "headless";
|
|
229
|
+
}
|
|
230
|
+
} else if (wanted.browser === "chrome" && tool !== undefined) {
|
|
231
|
+
if (await chromeThere(machine, "person")) {
|
|
232
|
+
browser = "chrome";
|
|
233
|
+
notes.push(
|
|
234
|
+
`Google Chrome is there. ${name}'s browser tool also takes ${tool.needs} in it, signed in as the agent's subscription account: install it now where it is not there.`,
|
|
235
|
+
);
|
|
236
|
+
} else {
|
|
237
|
+
missing.push(
|
|
238
|
+
`Google Chrome: ${name}'s browser tool works in it, and the agent signs in at its services with that tool. Install it, and ${tool.needs} in it. For an agent that signs in at no page, say --no-browser.`,
|
|
239
|
+
);
|
|
240
|
+
}
|
|
165
241
|
} else {
|
|
166
|
-
|
|
167
|
-
`
|
|
242
|
+
notes.push(
|
|
243
|
+
`No browser for ${name}: its driver starts it with none${browsers === undefined ? "" : ` of the kind ${wanted.browser}`}, whatever the desk's runner.json names.`,
|
|
168
244
|
);
|
|
169
245
|
}
|
|
170
246
|
}
|
|
@@ -201,13 +277,14 @@ export async function heldAwake(machine: SetupMachine): Promise<boolean | undefi
|
|
|
201
277
|
* What a setup says of sleep, a sentence by platform: that the machine is held awake where the
|
|
202
278
|
* system said so, that it is not where it said that, and where it cannot be asked, what the
|
|
203
279
|
* runner does and where it says whether that holds; then what is left to whoever keeps the
|
|
204
|
-
* machine. `log` is where the runner's own lines are.
|
|
280
|
+
* machine. `log` is where the runner's own lines are. Of a Mac's restart it says nothing: its
|
|
281
|
+
* settings are read, and `standsInTheWay` says what they leave to do.
|
|
205
282
|
*/
|
|
206
283
|
export function awakeWords(platform: string, held: boolean | undefined, log?: string): string {
|
|
207
284
|
const back =
|
|
208
|
-
platform === "
|
|
209
|
-
? ""
|
|
210
|
-
: "
|
|
285
|
+
platform === "win32"
|
|
286
|
+
? " After a restart the runner starts when this OS account is logged in: turn on automatic login for it where the machine is to come back by itself."
|
|
287
|
+
: "";
|
|
211
288
|
if (held === false) {
|
|
212
289
|
return `The machine is not held awake by the runner: set it never to sleep when idle (System Settings, Energy; or sudo pmset -a sleep 0, which takes an administrator), or the agent is not heard from once it sleeps.${back}`;
|
|
213
290
|
}
|
|
@@ -221,3 +298,79 @@ export function awakeWords(platform: string, held: boolean | undefined, log?: st
|
|
|
221
298
|
: " Where they say it is not, turn sleeping when idle off in the system's power settings.";
|
|
222
299
|
return `The runner asks the system to keep the machine from sleeping while it runs, and ${where} say whether that holds.${otherwise}${back}`;
|
|
223
300
|
}
|
|
301
|
+
|
|
302
|
+
/** A setting of the system as a program prints it, trimmed; nothing where it did not answer. */
|
|
303
|
+
const setting = async (
|
|
304
|
+
machine: SetupMachine,
|
|
305
|
+
command: string,
|
|
306
|
+
args: readonly string[],
|
|
307
|
+
): Promise<string | undefined> => {
|
|
308
|
+
const ran = await machine.run(command, args);
|
|
309
|
+
return ran.code === 0 ? ran.out.trim() : undefined;
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* The settings of a Mac that leave an agent unheard once nobody is at the machine, a line each
|
|
314
|
+
* with what to change and what the change costs, for whoever keeps the machine: a sleep when
|
|
315
|
+
* idle, a power failure it does not start after, and a restart, an update's own among them,
|
|
316
|
+
* that the OS account is not logged in after. Each is read as any account may read it; one
|
|
317
|
+
* that does not answer is not spoken of, and nothing is changed. Elsewhere there is nothing to
|
|
318
|
+
* read: a Linux account's service starts with the machine, and `awakeWords` says Windows' part.
|
|
319
|
+
*/
|
|
320
|
+
export async function standsInTheWay(machine: SetupMachine): Promise<readonly string[]> {
|
|
321
|
+
if (machine.platform !== "darwin") {
|
|
322
|
+
return [];
|
|
323
|
+
}
|
|
324
|
+
const lines: string[] = [];
|
|
325
|
+
const power = (await setting(machine, "pmset", ["-g"])) ?? "";
|
|
326
|
+
const minutes = /^\s*sleep\s+(\d+)/m.exec(power)?.[1];
|
|
327
|
+
if (minutes !== undefined && minutes !== "0") {
|
|
328
|
+
lines.push(
|
|
329
|
+
`Sleep: the machine is set to sleep after ${minutes} idle ${minutes === "1" ? "minute" : "minutes"}. The runner holds that off only while it runs, and a machine that did fall asleep stays asleep until someone wakes it. Set it never to sleep: sudo pmset -a sleep 0, which takes an administrator, or System Settings, Energy. The cost is the power of a machine that is always on; the display still sleeps.`,
|
|
330
|
+
);
|
|
331
|
+
}
|
|
332
|
+
if (/^\s*autorestart\s+0\b/m.test(power)) {
|
|
333
|
+
lines.push(
|
|
334
|
+
"A power failure: the machine stays off when the power comes back. Have it start by itself: sudo pmset -a autorestart 1, or System Settings, Energy. It costs nothing but that the machine starts with nobody there.",
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// A launch agent runs while its account is logged in, and macOS logs one account in by
|
|
339
|
+
// itself, and none while the disk is encrypted. Whether it is encrypted is not guessed: where
|
|
340
|
+
// the program that says so does not answer, nothing is said of a restart, since the advice
|
|
341
|
+
// for a disk that is not encrypted is one an encrypted Mac cannot follow.
|
|
342
|
+
const vault = await setting(machine, "fdesetup", ["status"]);
|
|
343
|
+
const encrypted = vault === undefined ? undefined : /FileVault is On/i.test(vault);
|
|
344
|
+
// The key is not there where nobody set a login, and reading it then fails: that is an answer.
|
|
345
|
+
const auto =
|
|
346
|
+
(await setting(machine, "defaults", [
|
|
347
|
+
"read",
|
|
348
|
+
"/Library/Preferences/com.apple.loginwindow",
|
|
349
|
+
"autoLoginUser",
|
|
350
|
+
])) ?? "";
|
|
351
|
+
// What a program printed is said back only where it reads as an account's name.
|
|
352
|
+
const other = /^[\w.-]{1,64}$/.test(auto) ? auto : "another account";
|
|
353
|
+
const back = encrypted === false && auto === machine.user;
|
|
354
|
+
if (encrypted === true) {
|
|
355
|
+
lines.push(
|
|
356
|
+
`A restart: FileVault is on, and with it macOS logs no account in by itself, so after every restart the runner waits until someone logs in as ${machine.user} at the machine. To come back by itself the machine gives FileVault up (sudo fdesetup disable) and logs ${machine.user} in automatically (System Settings, Users & Groups; an administrator). The cost: the disk is no longer locked with a password, so whoever takes the machine reads all of it, the agent's sign-ins among it. Keep FileVault where that weighs more, and name who logs in after a restart.`,
|
|
357
|
+
);
|
|
358
|
+
} else if (encrypted === false && !back) {
|
|
359
|
+
lines.push(
|
|
360
|
+
auto.length === 0
|
|
361
|
+
? `A restart: no account is logged in by itself, so after every restart the runner waits until someone logs in as ${machine.user} at the machine. Turn automatic login on for ${machine.user} (System Settings, Users & Groups; an administrator). The cost: whoever starts the machine is in that account without its password. macOS logs one account in so: where several agents share the machine, choose which, and name who logs the others in after a restart.`
|
|
362
|
+
: `A restart: macOS logs one account in by itself, and here that is ${other}, so after every restart the runner of ${machine.user} waits until someone logs in as ${machine.user} at the machine. Choose which account the machine logs in by itself, and name who logs the others in after a restart.`,
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
const updates = await setting(machine, "defaults", [
|
|
366
|
+
"read",
|
|
367
|
+
"/Library/Preferences/com.apple.SoftwareUpdate",
|
|
368
|
+
"AutomaticallyInstallMacOSUpdates",
|
|
369
|
+
]);
|
|
370
|
+
if (!back && (updates === "1" || updates?.toLowerCase() === "true")) {
|
|
371
|
+
lines.push(
|
|
372
|
+
"Updates: macOS installs its updates by itself and restarts for them, at night as a rule, which leaves the agent unheard until someone logs in. Turn that off (System Settings, General, Software Update, Automatic Updates: Install macOS updates) where nobody is there to log in. The cost: the system's fixes wait until a person installs them, so someone has to.",
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
return lines;
|
|
376
|
+
}
|