@skillcdn/console 0.5.0 → 0.5.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 +87 -12
- package/SKILLCDN.md +3 -3
- package/dist/agent-page.d.ts.map +1 -1
- package/dist/agent-page.js +7 -6
- package/dist/agent-page.js.map +1 -1
- package/dist/api.d.ts +9 -7
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +8 -6
- package/dist/api.js.map +1 -1
- package/dist/charts.d.ts +103 -0
- package/dist/charts.d.ts.map +1 -0
- package/dist/charts.js +182 -0
- package/dist/charts.js.map +1 -0
- package/dist/cli/cli.d.ts +58 -2
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +1742 -472
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/command-words.d.ts +20 -0
- package/dist/cli/command-words.d.ts.map +1 -0
- package/dist/cli/command-words.js +51 -0
- package/dist/cli/command-words.js.map +1 -0
- package/dist/cli/credentials.d.ts +54 -5
- package/dist/cli/credentials.d.ts.map +1 -1
- package/dist/cli/credentials.js +126 -20
- package/dist/cli/credentials.js.map +1 -1
- package/dist/cli/directory.d.ts +19 -4
- package/dist/cli/directory.d.ts.map +1 -1
- package/dist/cli/directory.js +16 -8
- package/dist/cli/directory.js.map +1 -1
- package/dist/cli/format.d.ts +70 -9
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +267 -40
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/help.d.ts +13 -4
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +101 -58
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/machine-check.d.ts +36 -0
- package/dist/cli/machine-check.d.ts.map +1 -0
- package/dist/cli/machine-check.js +151 -0
- package/dist/cli/machine-check.js.map +1 -0
- package/dist/cli/main.js +76 -2
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/pack.d.ts +69 -60
- package/dist/cli/pack.d.ts.map +1 -1
- package/dist/cli/pack.js +241 -270
- package/dist/cli/pack.js.map +1 -1
- package/dist/cli/plugin-check.d.ts +42 -0
- package/dist/cli/plugin-check.d.ts.map +1 -1
- package/dist/cli/plugin-check.js +221 -36
- package/dist/cli/plugin-check.js.map +1 -1
- package/dist/cli/plugin-cli.d.ts +6 -1
- package/dist/cli/plugin-cli.d.ts.map +1 -1
- package/dist/cli/plugin-cli.js +21 -4
- package/dist/cli/plugin-cli.js.map +1 -1
- package/dist/cli/plugin-main.js +1 -0
- package/dist/cli/plugin-main.js.map +1 -1
- package/dist/cli/runner-host.d.ts +7 -0
- package/dist/cli/runner-host.d.ts.map +1 -1
- package/dist/cli/runner-host.js +2 -0
- package/dist/cli/runner-host.js.map +1 -1
- package/dist/cli/secret-notes.d.ts +8 -0
- package/dist/cli/secret-notes.d.ts.map +1 -0
- package/dist/cli/secret-notes.js +48 -0
- package/dist/cli/secret-notes.js.map +1 -0
- package/dist/cli/serve.d.ts +33 -1
- package/dist/cli/serve.d.ts.map +1 -1
- package/dist/cli/serve.js +252 -3
- package/dist/cli/serve.js.map +1 -1
- package/dist/client.d.ts +54 -9
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +77 -80
- package/dist/client.js.map +1 -1
- package/dist/components/agent-page.d.ts +164 -8
- package/dist/components/agent-page.d.ts.map +1 -1
- package/dist/components/agent-page.js +588 -151
- package/dist/components/agent-page.js.map +1 -1
- package/dist/components/agents.d.ts.map +1 -1
- package/dist/components/agents.js +1 -1
- package/dist/components/agents.js.map +1 -1
- package/dist/components/board.d.ts.map +1 -1
- package/dist/components/board.js +3 -2
- package/dist/components/board.js.map +1 -1
- package/dist/components/categories.js +1 -1
- package/dist/components/categories.js.map +1 -1
- package/dist/components/charts.d.ts +157 -0
- package/dist/components/charts.d.ts.map +1 -0
- package/dist/components/charts.js +182 -0
- package/dist/components/charts.js.map +1 -0
- package/dist/components/decision-list.d.ts.map +1 -1
- package/dist/components/decision-list.js +1 -1
- package/dist/components/decision-list.js.map +1 -1
- package/dist/components/desk-records.d.ts +102 -0
- package/dist/components/desk-records.d.ts.map +1 -0
- package/dist/components/desk-records.js +221 -0
- package/dist/components/desk-records.js.map +1 -0
- package/dist/components/desk.d.ts +85 -0
- package/dist/components/desk.d.ts.map +1 -0
- package/dist/components/desk.js +135 -0
- package/dist/components/desk.js.map +1 -0
- package/dist/components/event-feed.d.ts.map +1 -1
- package/dist/components/event-feed.js +7 -3
- package/dist/components/event-feed.js.map +1 -1
- package/dist/components/goals.d.ts +2 -0
- package/dist/components/goals.d.ts.map +1 -1
- package/dist/components/goals.js +1 -1
- package/dist/components/goals.js.map +1 -1
- package/dist/components/home.d.ts.map +1 -1
- package/dist/components/home.js +14 -6
- package/dist/components/home.js.map +1 -1
- package/dist/components/icon.d.ts +31 -0
- package/dist/components/icon.d.ts.map +1 -0
- package/dist/components/icon.js +169 -0
- package/dist/components/icon.js.map +1 -0
- package/dist/components/markdown.d.ts +6 -0
- package/dist/components/markdown.d.ts.map +1 -1
- package/dist/components/markdown.js +10 -2
- package/dist/components/markdown.js.map +1 -1
- package/dist/components/people.js +1 -1
- package/dist/components/people.js.map +1 -1
- package/dist/components/plugin-frame.d.ts.map +1 -1
- package/dist/components/plugin-frame.js +7 -0
- package/dist/components/plugin-frame.js.map +1 -1
- package/dist/components/plugin-settings.d.ts.map +1 -1
- package/dist/components/plugin-settings.js +54 -3
- package/dist/components/plugin-settings.js.map +1 -1
- package/dist/components/projects.d.ts +17 -4
- package/dist/components/projects.d.ts.map +1 -1
- package/dist/components/projects.js +51 -12
- package/dist/components/projects.js.map +1 -1
- package/dist/components/rules.d.ts +8 -10
- package/dist/components/rules.d.ts.map +1 -1
- package/dist/components/rules.js +35 -13
- package/dist/components/rules.js.map +1 -1
- package/dist/components/sessions.d.ts.map +1 -1
- package/dist/components/sessions.js +3 -2
- package/dist/components/sessions.js.map +1 -1
- package/dist/components/setup.d.ts +9 -3
- package/dist/components/setup.d.ts.map +1 -1
- package/dist/components/setup.js +12 -6
- package/dist/components/setup.js.map +1 -1
- package/dist/components/shell.d.ts.map +1 -1
- package/dist/components/shell.js +3 -2
- package/dist/components/shell.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 +5 -2
- package/dist/components/ui.d.ts.map +1 -1
- package/dist/components/ui.js +10 -7
- package/dist/components/ui.js.map +1 -1
- package/dist/connect-page.js +1 -1
- package/dist/connect-page.js.map +1 -1
- package/dist/console.css +1172 -106
- package/dist/console.d.ts +5 -0
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +52 -39
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +32 -33
- package/dist/data.js.map +1 -1
- package/dist/desk-page.d.ts +38 -0
- package/dist/desk-page.d.ts.map +1 -0
- package/dist/desk-page.js +184 -0
- package/dist/desk-page.js.map +1 -0
- package/dist/desk-records-page.d.ts +18 -0
- package/dist/desk-records-page.d.ts.map +1 -0
- package/dist/desk-records-page.js +130 -0
- package/dist/desk-records-page.js.map +1 -0
- package/dist/desk-records.d.ts +247 -0
- package/dist/desk-records.d.ts.map +1 -0
- package/dist/desk-records.js +543 -0
- package/dist/desk-records.js.map +1 -0
- package/dist/desk.d.ts +122 -0
- package/dist/desk.d.ts.map +1 -0
- package/dist/desk.js +211 -0
- package/dist/desk.js.map +1 -0
- package/dist/feed-stream.d.ts +39 -0
- package/dist/feed-stream.d.ts.map +1 -0
- package/dist/feed-stream.js +117 -0
- package/dist/feed-stream.js.map +1 -0
- package/dist/home-tiles.d.ts +19 -3
- package/dist/home-tiles.d.ts.map +1 -1
- package/dist/home-tiles.js +147 -42
- package/dist/home-tiles.js.map +1 -1
- package/dist/i18n/en.d.ts +228 -6
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +309 -9
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +366 -85
- package/dist/i18n/ko.js.map +1 -1
- package/dist/i18n/particles.d.ts +7 -0
- package/dist/i18n/particles.d.ts.map +1 -0
- package/dist/i18n/particles.js +72 -0
- package/dist/i18n/particles.js.map +1 -0
- package/dist/icons/glyphs.d.ts +605 -0
- package/dist/icons/glyphs.d.ts.map +1 -0
- package/dist/icons/glyphs.js +104 -0
- package/dist/icons/glyphs.js.map +1 -0
- package/dist/icons/index.d.ts +59 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +157 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +20 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +20 -0
- package/dist/limits.js.map +1 -1
- package/dist/marks.d.ts +9 -0
- package/dist/marks.d.ts.map +1 -1
- package/dist/marks.js +9 -0
- package/dist/marks.js.map +1 -1
- package/dist/onboarding.d.ts +6 -0
- package/dist/onboarding.d.ts.map +1 -1
- package/dist/onboarding.js +5 -5
- package/dist/onboarding.js.map +1 -1
- package/dist/plugin/context.d.ts +42 -11
- package/dist/plugin/context.d.ts.map +1 -1
- package/dist/plugin/limits.d.ts +2 -0
- package/dist/plugin/limits.d.ts.map +1 -1
- package/dist/plugin/limits.js +2 -0
- package/dist/plugin/limits.js.map +1 -1
- package/dist/plugin/manifest.d.ts +13 -0
- package/dist/plugin/manifest.d.ts.map +1 -1
- package/dist/plugin/manifest.js +30 -3
- package/dist/plugin/manifest.js.map +1 -1
- package/dist/plugin/rest-schemas.d.ts +55 -0
- package/dist/plugin/rest-schemas.d.ts.map +1 -1
- package/dist/plugin/rest-schemas.js +37 -0
- package/dist/plugin/rest-schemas.js.map +1 -1
- package/dist/plugin/sandbox.d.ts.map +1 -1
- package/dist/plugin/sandbox.js +4 -1
- package/dist/plugin/sandbox.js.map +1 -1
- package/dist/plugin/testing.d.ts +6 -2
- package/dist/plugin/testing.d.ts.map +1 -1
- package/dist/plugin/testing.js +52 -10
- package/dist/plugin/testing.js.map +1 -1
- package/dist/plugin/web.d.ts +3 -0
- package/dist/plugin/web.d.ts.map +1 -1
- package/dist/plugin/web.js +5 -1
- package/dist/plugin/web.js.map +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/records.d.ts +283 -0
- package/dist/records.d.ts.map +1 -0
- package/dist/records.js +543 -0
- package/dist/records.js.map +1 -0
- package/dist/routes.d.ts +3 -1
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +3 -1
- package/dist/routes.js.map +1 -1
- package/dist/rules.d.ts +30 -11
- package/dist/rules.d.ts.map +1 -1
- package/dist/rules.js +98 -45
- package/dist/rules.js.map +1 -1
- package/dist/runner/acp.d.ts +1 -1
- package/dist/runner/acp.d.ts.map +1 -1
- package/dist/runner/acp.js +32 -21
- package/dist/runner/acp.js.map +1 -1
- package/dist/runner/awake.d.ts +35 -0
- package/dist/runner/awake.d.ts.map +1 -0
- package/dist/runner/awake.js +95 -0
- package/dist/runner/awake.js.map +1 -0
- package/dist/runner/claude.d.ts +1 -1
- package/dist/runner/claude.d.ts.map +1 -1
- package/dist/runner/claude.js +100 -18
- package/dist/runner/claude.js.map +1 -1
- package/dist/runner/codex.d.ts +1 -1
- package/dist/runner/codex.d.ts.map +1 -1
- package/dist/runner/codex.js +20 -17
- package/dist/runner/codex.js.map +1 -1
- package/dist/runner/config.d.ts +5 -0
- package/dist/runner/config.d.ts.map +1 -1
- package/dist/runner/config.js +9 -0
- package/dist/runner/config.js.map +1 -1
- package/dist/runner/desk.d.ts +43 -2
- package/dist/runner/desk.d.ts.map +1 -1
- package/dist/runner/desk.js +168 -13
- package/dist/runner/desk.js.map +1 -1
- package/dist/runner/process.d.ts.map +1 -1
- package/dist/runner/process.js +11 -4
- package/dist/runner/process.js.map +1 -1
- package/dist/runner/redact.d.ts +39 -4
- package/dist/runner/redact.d.ts.map +1 -1
- package/dist/runner/redact.js +81 -5
- package/dist/runner/redact.js.map +1 -1
- package/dist/runner/runner.d.ts +28 -3
- package/dist/runner/runner.d.ts.map +1 -1
- package/dist/runner/runner.js +371 -54
- package/dist/runner/runner.js.map +1 -1
- package/dist/runner/slack.d.ts.map +1 -1
- package/dist/runner/slack.js +10 -4
- package/dist/runner/slack.js.map +1 -1
- package/dist/runner/task-scheduler.d.ts +20 -0
- package/dist/runner/task-scheduler.d.ts.map +1 -1
- package/dist/runner/task-scheduler.js +34 -4
- package/dist/runner/task-scheduler.js.map +1 -1
- package/dist/runner/types.d.ts +51 -1
- package/dist/runner/types.d.ts.map +1 -1
- package/dist/runner/types.js +26 -0
- package/dist/runner/types.js.map +1 -1
- package/dist/runner.d.ts +6 -6
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +5 -5
- package/dist/runner.js.map +1 -1
- package/dist/schemas.d.ts +603 -6
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +156 -20
- package/dist/schemas.js.map +1 -1
- package/dist/services.d.ts +22 -5
- package/dist/services.d.ts.map +1 -1
- package/dist/services.js +41 -17
- package/dist/services.js.map +1 -1
- package/dist/setup-guide.d.ts +17 -4
- package/dist/setup-guide.d.ts.map +1 -1
- package/dist/setup-guide.js +48 -41
- package/dist/setup-guide.js.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +5 -1
- package/dist/tokens.js.map +1 -1
- package/dist/vocabulary.d.ts +21 -3
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +19 -3
- package/dist/vocabulary.js.map +1 -1
- package/docs/specs/cli.md +73 -44
- package/docs/specs/plugins.md +40 -22
- package/docs/specs/records.md +113 -0
- package/docs/specs/rest.md +30 -21
- package/docs/specs/runner.md +46 -22
- package/package.json +11 -2
- package/skills/building-a-console/SKILL.md +4 -4
- package/skills/building-a-plugin/SKILL.md +6 -6
- package/skills/deploying-a-console/SKILL.md +4 -4
- package/skills/deploying-a-console/references/resources.md +41 -4
- package/skills/deploying-a-console/references/running-it-again.md +3 -2
- package/skills/keeping-a-desk/SKILL.md +133 -0
- package/skills/keeping-a-desk/collections.md +96 -0
- package/skills/planning-the-board/SKILL.md +14 -18
- package/skills/planning-the-board/references/a-task.md +2 -2
- package/skills/planning-the-board/references/project-rules.md +13 -14
- package/skills/planning-the-board/references/setting-up.md +15 -13
- package/skills/running-an-agent/SKILL.md +47 -56
- package/skills/working-the-board/SKILL.md +63 -44
- package/skills/working-the-board/references/terms.md +9 -5
- package/skills/working-the-board/references/the-pack.md +12 -10
- package/skills/working-the-board/references/the-sentence.md +2 -2
- package/src/agent-page.tsx +16 -2
- package/src/api.ts +109 -3
- package/src/charts.ts +250 -0
- package/src/cli/cli.ts +2226 -580
- package/src/cli/command-words.ts +56 -0
- package/src/cli/credentials.ts +181 -20
- package/src/cli/directory.ts +28 -10
- package/src/cli/format.ts +332 -49
- package/src/cli/help.ts +113 -57
- package/src/cli/machine-check.ts +223 -0
- package/src/cli/main.ts +72 -2
- package/src/cli/pack.ts +333 -372
- package/src/cli/plugin-check.ts +275 -34
- package/src/cli/plugin-cli.ts +28 -4
- package/src/cli/plugin-main.ts +1 -0
- package/src/cli/runner-host.ts +8 -0
- package/src/cli/secret-notes.ts +63 -0
- package/src/cli/serve.ts +295 -2
- package/src/client.ts +215 -177
- package/src/components/agent-page.tsx +1044 -281
- package/src/components/agents.tsx +9 -5
- package/src/components/board.tsx +3 -15
- package/src/components/categories.tsx +2 -2
- package/src/components/charts.tsx +680 -0
- package/src/components/decision-list.tsx +11 -7
- package/src/components/desk-records.tsx +724 -0
- package/src/components/desk.tsx +471 -0
- package/src/components/event-feed.tsx +12 -3
- package/src/components/goals.tsx +33 -25
- package/src/components/home.tsx +42 -6
- package/src/components/icon.tsx +337 -0
- package/src/components/markdown.tsx +22 -2
- package/src/components/people.tsx +1 -1
- package/src/components/plugin-frame.tsx +7 -0
- package/src/components/plugin-settings.tsx +171 -12
- package/src/components/projects.tsx +68 -17
- package/src/components/rules.tsx +94 -34
- package/src/components/sessions.tsx +2 -13
- package/src/components/setup.tsx +20 -5
- package/src/components/shell.tsx +3 -20
- package/src/components/tokens.tsx +1 -1
- package/src/components/ui.tsx +16 -8
- package/src/connect-page.tsx +1 -1
- package/src/console.tsx +104 -62
- package/src/data.ts +37 -34
- package/src/desk-page.tsx +332 -0
- package/src/desk-records-page.tsx +256 -0
- package/src/desk-records.ts +808 -0
- package/src/desk.ts +329 -0
- package/src/feed-stream.ts +144 -0
- package/src/home-tiles.ts +170 -46
- package/src/i18n/en.ts +323 -11
- package/src/i18n/ko.ts +378 -87
- package/src/i18n/particles.ts +79 -0
- package/src/icons/glyphs.ts +112 -0
- package/src/icons/index.ts +195 -0
- package/src/index.ts +125 -0
- package/src/limits.ts +20 -0
- package/src/marks.ts +12 -0
- package/src/onboarding.ts +14 -6
- package/src/plugin/context.ts +55 -12
- package/src/plugin/limits.ts +2 -0
- package/src/plugin/manifest.ts +38 -2
- package/src/plugin/rest-schemas.ts +41 -0
- package/src/plugin/sandbox.ts +4 -1
- package/src/plugin/testing.ts +63 -12
- package/src/plugin/web.ts +9 -2
- package/src/plugin.ts +2 -0
- package/src/records.ts +702 -0
- package/src/routes.ts +3 -1
- package/src/rules.ts +108 -47
- package/src/runner/acp.ts +49 -30
- package/src/runner/awake.ts +135 -0
- package/src/runner/claude.ts +131 -26
- package/src/runner/codex.ts +37 -26
- package/src/runner/config.ts +9 -0
- package/src/runner/desk.ts +200 -15
- package/src/runner/process.ts +11 -4
- package/src/runner/redact.ts +92 -6
- package/src/runner/runner.ts +457 -56
- package/src/runner/slack.ts +10 -4
- package/src/runner/task-scheduler.ts +36 -4
- package/src/runner/types.ts +67 -1
- package/src/runner.ts +27 -2
- package/src/schemas.ts +177 -18
- package/src/services.ts +55 -16
- package/src/setup-guide.ts +49 -40
- package/src/styles/README.md +16 -5
- package/src/styles/base.css +17 -0
- package/src/styles/console.css +10 -0
- package/src/styles/drawn-by-pages.json +1 -1
- package/src/styles/pages/agents.css +103 -1
- package/src/styles/pages/board.css +0 -10
- package/src/styles/pages/calendar.css +1 -1
- package/src/styles/pages/connect.css +0 -10
- package/src/styles/pages/decisions.css +3 -1
- package/src/styles/pages/desk.css +126 -0
- package/src/styles/pages/documents.css +5 -0
- package/src/styles/pages/feed.css +5 -2
- package/src/styles/pages/home.css +5 -0
- package/src/styles/pages/roadmap.css +2 -2
- package/src/styles/pages/settings.css +11 -0
- package/src/styles/pages/task.css +0 -20
- package/src/styles/pages/thread.css +1 -1
- package/src/styles/parts/bars.css +80 -0
- package/src/styles/parts/calendar.css +1 -1
- package/src/styles/parts/callout.css +1 -0
- package/src/styles/parts/chart.css +173 -0
- package/src/styles/parts/detail.css +22 -0
- package/src/styles/parts/empty.css +2 -0
- package/src/styles/parts/eyebrow.css +1 -1
- package/src/styles/parts/facts.css +1 -1
- package/src/styles/parts/figures.css +65 -0
- package/src/styles/parts/form.css +2 -1
- package/src/styles/parts/icon.css +191 -0
- package/src/styles/parts/input.css +14 -4
- package/src/styles/parts/legend.css +48 -0
- package/src/styles/parts/mark.css +36 -0
- package/src/styles/parts/menu.css +1 -7
- package/src/styles/parts/page.css +1 -1
- package/src/styles/parts/panel.css +10 -0
- package/src/styles/parts/person.css +5 -2
- package/src/styles/parts/progress.css +5 -2
- package/src/styles/parts/rows.css +1 -0
- package/src/styles/parts/series.css +32 -0
- package/src/styles/parts/settings.css +5 -0
- package/src/styles/parts/share.css +25 -0
- package/src/styles/parts/spark.css +23 -0
- package/src/styles/parts/stat.css +69 -0
- package/src/styles/tokens.css +31 -10
- package/src/tokens.ts +5 -1
- package/src/vocabulary.ts +25 -3
- package/template/desk-web/README.md +8 -0
- package/template/desk-web/index.html +13 -0
- package/template/desk-web/package.json +25 -0
- package/template/desk-web/src/main.tsx +24 -0
- package/template/desk-web/src/page.tsx +51 -0
- package/template/desk-web/tsconfig.json +16 -0
- package/template/desk-web/vite.config.ts +15 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import type { SetupMachine } from "./setup-machine.js";
|
|
2
|
+
|
|
3
|
+
// 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 browser that product's browser tool works
|
|
5
|
+
// in. Everything that is missing is found in one look and said at once, with what installs it,
|
|
6
|
+
// so that the session that was given the line installs it all and runs the line again, and a
|
|
7
|
+
// person is asked to sign in once, on a machine that is ready. What the setup cannot see, a
|
|
8
|
+
// product's sign-in and a browser's extension, it says in a line and does not hold up for.
|
|
9
|
+
|
|
10
|
+
/** A product the package has a driver for, as a setup looks for it on a machine. */
|
|
11
|
+
interface Product {
|
|
12
|
+
readonly driver: string;
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly command: string;
|
|
15
|
+
/** What installs it for an OS account, by platform; `any` where one line does everywhere. */
|
|
16
|
+
readonly install: Readonly<Record<string, string>>;
|
|
17
|
+
/** The browser its own browser tool works in, and what that browser needs for it. */
|
|
18
|
+
readonly browser?: { readonly name: "chrome"; readonly needs: string } | undefined;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const PRODUCTS: readonly Product[] = [
|
|
22
|
+
{
|
|
23
|
+
driver: "claude",
|
|
24
|
+
name: "Claude Code",
|
|
25
|
+
command: "claude",
|
|
26
|
+
install: {
|
|
27
|
+
any: "npm install -g @anthropic-ai/claude-code",
|
|
28
|
+
// The runner starts a program, and npm makes a script of it there.
|
|
29
|
+
win32: "its native installer for Windows, which puts claude.exe on the PATH",
|
|
30
|
+
},
|
|
31
|
+
browser: { name: "chrome", needs: "the Claude in Chrome extension" },
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
driver: "codex",
|
|
35
|
+
name: "Codex",
|
|
36
|
+
command: "codex",
|
|
37
|
+
install: {
|
|
38
|
+
any: "npm install -g @openai/codex",
|
|
39
|
+
win32: "a build of it for Windows that is a program on the PATH",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
/** What a look at a machine found. */
|
|
45
|
+
export interface MachineLook {
|
|
46
|
+
/** The driver of the product found, or the one asked for; nothing where none was found. */
|
|
47
|
+
readonly driver: string | undefined;
|
|
48
|
+
/** What the product is called and the version it says, where it answered. */
|
|
49
|
+
readonly product: string | undefined;
|
|
50
|
+
/** The browser the product's browser tool works in, where the product has such a tool and the browser is there. */
|
|
51
|
+
readonly browser: "chrome" | undefined;
|
|
52
|
+
/** What is missing, a line each, with what installs it: the setup stops for any of these. */
|
|
53
|
+
readonly missing: readonly string[];
|
|
54
|
+
/** What the setup could not see and says once: it goes on. */
|
|
55
|
+
readonly notes: readonly string[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const answers = async (
|
|
59
|
+
machine: SetupMachine,
|
|
60
|
+
command: string,
|
|
61
|
+
args: readonly string[],
|
|
62
|
+
): Promise<string | undefined> => {
|
|
63
|
+
const ran = await machine.run(command, args);
|
|
64
|
+
return ran.code === 0 ? ran.out.trim().split(/\r?\n/)[0]?.trim() || "" : undefined;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/** What installs git for an OS account, by platform, in words a session acts on. */
|
|
68
|
+
function gitMissing(platform: string): string {
|
|
69
|
+
switch (platform) {
|
|
70
|
+
case "darwin":
|
|
71
|
+
return "git: the Command Line Tools are not installed, so git is a placeholder that opens a window. Install them: xcode-select --install, then Install in the window it opens on the machine's screen, pressed by whoever sees that screen.";
|
|
72
|
+
case "win32":
|
|
73
|
+
return "git: winget install --id Git.Git -e --source winget, then a new terminal so that it is on the PATH.";
|
|
74
|
+
default:
|
|
75
|
+
return "git: install it with the system's package manager, which takes an administrator (sudo apt-get install -y git, or the like).";
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** Whether Google Chrome is on the machine, looked for where each system keeps it. */
|
|
80
|
+
async function chromeThere(machine: SetupMachine): Promise<boolean> {
|
|
81
|
+
if (machine.platform === "darwin") {
|
|
82
|
+
return (
|
|
83
|
+
(await machine.exists("/Applications/Google Chrome.app")) ||
|
|
84
|
+
(await machine.exists(machine.path(machine.home, "Applications", "Google Chrome.app")))
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
if (machine.platform === "win32") {
|
|
88
|
+
for (const place of [
|
|
89
|
+
"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
|
|
90
|
+
"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
|
|
91
|
+
machine.path(
|
|
92
|
+
machine.home,
|
|
93
|
+
"AppData",
|
|
94
|
+
"Local",
|
|
95
|
+
"Google",
|
|
96
|
+
"Chrome",
|
|
97
|
+
"Application",
|
|
98
|
+
"chrome.exe",
|
|
99
|
+
),
|
|
100
|
+
]) {
|
|
101
|
+
if (await machine.exists(place)) {
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
for (const command of ["google-chrome", "google-chrome-stable"]) {
|
|
108
|
+
if ((await answers(machine, command, ["--version"])) !== undefined) {
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Looks at the machine: git, the product, its browser. `driver` names the product where whoever
|
|
117
|
+
* runs the setup said one, and the first of the package's products that answers is taken where
|
|
118
|
+
* they said none; `browser: false` is an agent that signs in at no page.
|
|
119
|
+
*/
|
|
120
|
+
export async function lookAtMachine(
|
|
121
|
+
machine: SetupMachine,
|
|
122
|
+
wanted: { readonly driver?: string | undefined; readonly browser: boolean },
|
|
123
|
+
): Promise<MachineLook> {
|
|
124
|
+
const missing: string[] = [];
|
|
125
|
+
const notes: string[] = [];
|
|
126
|
+
|
|
127
|
+
// On a Mac without the Command Line Tools, git is there and opens a window instead of
|
|
128
|
+
// answering: asked for only once the tools are known to be installed.
|
|
129
|
+
const tools =
|
|
130
|
+
machine.platform !== "darwin" || (await answers(machine, "xcode-select", ["-p"])) !== undefined;
|
|
131
|
+
if (!tools || (await answers(machine, "git", ["--version"])) === undefined) {
|
|
132
|
+
missing.push(gitMissing(machine.platform));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const install = (product: Product): string =>
|
|
136
|
+
product.install[machine.platform] ?? product.install.any ?? "as its maker says";
|
|
137
|
+
let found: { readonly product: Product; readonly version: string } | undefined;
|
|
138
|
+
const candidates =
|
|
139
|
+
wanted.driver === undefined
|
|
140
|
+
? PRODUCTS
|
|
141
|
+
: PRODUCTS.filter((product) => product.driver === wanted.driver);
|
|
142
|
+
for (const product of candidates) {
|
|
143
|
+
const version = await answers(machine, product.command, ["--version"]);
|
|
144
|
+
if (version !== undefined) {
|
|
145
|
+
found = { product, version };
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (found === undefined && candidates.length > 0) {
|
|
150
|
+
missing.push(
|
|
151
|
+
candidates.length === 1 && candidates[0] !== undefined
|
|
152
|
+
? `${candidates[0].name}: its command ${candidates[0].command} does not answer where this command looks for programs. Install it (${install(candidates[0])}) and sign it in with the agent's own subscription.`
|
|
153
|
+
: `the agent's product: none of ${candidates.map((product) => `${product.command} (${product.name})`).join(", ")} answers where this command looks for programs. Install the one the agent runs in (${candidates.map((product) => `${product.name}: ${install(product)}`).join("; ")}) and sign it in with the agent's own subscription. For another product, say --driver acp and name its command in the desk's runner.json.`,
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
let browser: "chrome" | undefined;
|
|
158
|
+
const tool = found?.product.browser;
|
|
159
|
+
if (tool !== undefined && wanted.browser) {
|
|
160
|
+
if (await chromeThere(machine)) {
|
|
161
|
+
browser = tool.name;
|
|
162
|
+
notes.push(
|
|
163
|
+
`Google Chrome is there. ${found?.product.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.`,
|
|
164
|
+
);
|
|
165
|
+
} else {
|
|
166
|
+
missing.push(
|
|
167
|
+
`Google Chrome: ${found?.product.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.`,
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if (found !== undefined) {
|
|
172
|
+
notes.push(
|
|
173
|
+
`Whether ${found.product.name} is signed in cannot be seen from here: where it is not, the agent's page says so once its first session starts.`,
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
return {
|
|
177
|
+
driver: found?.product.driver ?? wanted.driver,
|
|
178
|
+
product:
|
|
179
|
+
found === undefined
|
|
180
|
+
? undefined
|
|
181
|
+
: `${found.product.name}${found.version.length === 0 ? "" : ` (${found.version})`}`,
|
|
182
|
+
browser,
|
|
183
|
+
missing,
|
|
184
|
+
notes,
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Whether the machine is held awake by the runner's own helper, as the system says where it
|
|
190
|
+
* can be asked without an administrator: yes, no, or nothing where it cannot be asked.
|
|
191
|
+
*/
|
|
192
|
+
export async function heldAwake(machine: SetupMachine): Promise<boolean | undefined> {
|
|
193
|
+
if (machine.platform !== "darwin") {
|
|
194
|
+
return undefined;
|
|
195
|
+
}
|
|
196
|
+
const ran = await machine.run("pmset", ["-g", "assertions"]);
|
|
197
|
+
return ran.code === 0 ? /\(caffeinate\)/.test(ran.out) : undefined;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* What a setup says of sleep, a sentence by platform: that the machine is held awake where the
|
|
202
|
+
* system said so, that it is not where it said that, and where it cannot be asked, what the
|
|
203
|
+
* 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.
|
|
205
|
+
*/
|
|
206
|
+
export function awakeWords(platform: string, held: boolean | undefined, log?: string): string {
|
|
207
|
+
const back =
|
|
208
|
+
platform === "linux"
|
|
209
|
+
? ""
|
|
210
|
+
: " 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.";
|
|
211
|
+
if (held === false) {
|
|
212
|
+
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
|
+
}
|
|
214
|
+
if (held === true) {
|
|
215
|
+
return `The machine is kept from sleeping while the runner runs; a sleep someone asks for, or a lid that is closed, still ends that.${back}`;
|
|
216
|
+
}
|
|
217
|
+
const where = log === undefined ? "its own lines" : `its own lines (${log})`;
|
|
218
|
+
const otherwise =
|
|
219
|
+
platform === "win32"
|
|
220
|
+
? " Where they say it is not, or the machine sleeps all the same: powercfg /change standby-timeout-ac 0."
|
|
221
|
+
: " Where they say it is not, turn sleeping when idle off in the system's power settings.";
|
|
222
|
+
return `The runner asks the system to keep the machine from sleeping while it runs, and ${where} say whether that holds.${otherwise}${back}`;
|
|
223
|
+
}
|
package/src/cli/main.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
|
-
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { open, readdir, readFile, stat } from "node:fs/promises";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { hostname } from "node:os";
|
|
6
|
-
import { join } from "node:path";
|
|
6
|
+
import { join, resolve } from "node:path";
|
|
7
7
|
import process from "node:process";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
9
9
|
import * as z from "zod/mini";
|
|
10
10
|
import { userAgentOf } from "../compat.js";
|
|
11
|
+
import { isLfsPointer, MAX_LFS_POINTER_BYTES, RECORDS_DIR } from "../records.js";
|
|
11
12
|
import { runCli } from "./cli.js";
|
|
12
13
|
import { createFileStore, defaultConfigDir } from "./credentials.js";
|
|
13
14
|
import { createDirectoryStore } from "./directory.js";
|
|
14
15
|
import { detectInstall } from "./install.js";
|
|
15
16
|
import { createNoticeStore } from "./notices.js";
|
|
17
|
+
import { templateFiles } from "./plugin-init.js";
|
|
16
18
|
import { createRunnerHost } from "./runner-host.js";
|
|
17
19
|
import { listenOn } from "./serve.js";
|
|
18
20
|
import { createSetupMachine } from "./setup-machine.js";
|
|
@@ -30,6 +32,8 @@ const manifest = z
|
|
|
30
32
|
const version = manifest.success ? manifest.data.version : undefined;
|
|
31
33
|
/** The console's own skills, shipped with the package beside dist/ (ADR-0015); not there in a checkout before packing. */
|
|
32
34
|
const skillsDir = fileURLToPath(new URL("../../skills/", import.meta.url));
|
|
35
|
+
/** The shell of a desk's pages, shipped with the package beside dist/ as the plugin's template is (ADR-0115). */
|
|
36
|
+
const deskWebDir = join(packageDir, "template", "desk-web");
|
|
33
37
|
const configDir = defaultConfigDir(process.env);
|
|
34
38
|
|
|
35
39
|
process.exitCode = await runCli(process.argv.slice(2), {
|
|
@@ -44,6 +48,10 @@ process.exitCode = await runCli(process.argv.slice(2), {
|
|
|
44
48
|
readStdin,
|
|
45
49
|
readSecret,
|
|
46
50
|
hostname: hostname(),
|
|
51
|
+
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
52
|
+
// Whether a terminal shows what is printed as it is printed: an agent's host, a pipe and a
|
|
53
|
+
// file show it when the command ends, where login says its code and ends (ADR-0129).
|
|
54
|
+
terminal: process.stdout.isTTY === true,
|
|
47
55
|
readFile: readFileAt,
|
|
48
56
|
readBytes: readBytesAt,
|
|
49
57
|
writeBytes: writeBytesAt,
|
|
@@ -83,4 +91,66 @@ process.exitCode = await runCli(process.argv.slice(2), {
|
|
|
83
91
|
runner: createRunnerHost(process.cwd(), process.env),
|
|
84
92
|
// A machine is set up as the command was started: the same runtime, the same file, the same PATH.
|
|
85
93
|
machine: createSetupMachine(process.env, process.argv[1]),
|
|
94
|
+
// A desk's records (ADR-0117), as `desk check` reads them: the files under its `records/`,
|
|
95
|
+
// by paths the format's own schemas let through, which name no folder above it.
|
|
96
|
+
recordsAt: (directory) => {
|
|
97
|
+
const root = resolve(directory, RECORDS_DIR);
|
|
98
|
+
const at = (path: string): string =>
|
|
99
|
+
join(root, ...path.split("/").filter((part) => part.length > 0));
|
|
100
|
+
return {
|
|
101
|
+
directory: resolve(directory),
|
|
102
|
+
files: {
|
|
103
|
+
read: async (path) => {
|
|
104
|
+
try {
|
|
105
|
+
return await readFile(at(path), "utf8");
|
|
106
|
+
} catch {
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
size: async (path) => {
|
|
111
|
+
try {
|
|
112
|
+
const info = await stat(at(path));
|
|
113
|
+
return info.isFile() ? info.size : undefined;
|
|
114
|
+
} catch {
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
// A git LFS pointer is a few lines of text: its beginning says whether a file is one.
|
|
119
|
+
pointer: async (path) => {
|
|
120
|
+
try {
|
|
121
|
+
const file = await open(at(path), "r");
|
|
122
|
+
try {
|
|
123
|
+
const head = Buffer.alloc(MAX_LFS_POINTER_BYTES);
|
|
124
|
+
const { bytesRead } = await file.read(head, 0, head.length, 0);
|
|
125
|
+
return isLfsPointer(head.subarray(0, bytesRead).toString("utf8"));
|
|
126
|
+
} finally {
|
|
127
|
+
await file.close();
|
|
128
|
+
}
|
|
129
|
+
} catch {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
folders: async (path) => {
|
|
134
|
+
try {
|
|
135
|
+
return (await readdir(at(path), { withFileTypes: true }))
|
|
136
|
+
.filter((entry) => entry.isDirectory())
|
|
137
|
+
.map((entry) => entry.name);
|
|
138
|
+
} catch {
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
},
|
|
145
|
+
// The shell of a desk's pages (ADR-0115), read when `desk --web` asks for it.
|
|
146
|
+
deskWebTemplate: async () => {
|
|
147
|
+
if (!existsSync(deskWebDir)) {
|
|
148
|
+
return undefined;
|
|
149
|
+
}
|
|
150
|
+
const files = new Map<string, string>();
|
|
151
|
+
for (const path of await templateFiles(deskWebDir)) {
|
|
152
|
+
files.set(path, await readFile(join(deskWebDir, ...path.split("/")), "utf8"));
|
|
153
|
+
}
|
|
154
|
+
return files;
|
|
155
|
+
},
|
|
86
156
|
});
|