@skillcdn/console 0.4.7 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -14
- package/SKILLCDN.md +5 -3
- package/dist/agent-page.d.ts +44 -0
- package/dist/agent-page.d.ts.map +1 -0
- package/dist/agent-page.js +415 -0
- package/dist/agent-page.js.map +1 -0
- package/dist/agent-stream.d.ts +52 -0
- package/dist/agent-stream.d.ts.map +1 -0
- package/dist/agent-stream.js +155 -0
- package/dist/agent-stream.js.map +1 -0
- package/dist/api.d.ts +12 -6
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +11 -5
- package/dist/api.js.map +1 -1
- package/dist/avatar.d.ts +137 -0
- package/dist/avatar.d.ts.map +1 -0
- package/dist/avatar.js +1216 -0
- package/dist/avatar.js.map +1 -0
- 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 +39 -1
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +2424 -296
- 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 +59 -5
- package/dist/cli/credentials.d.ts.map +1 -1
- package/dist/cli/credentials.js +128 -16
- 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 +91 -8
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +386 -57
- 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 +202 -62
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/main.js +94 -0
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/pack.d.ts +69 -36
- package/dist/cli/pack.d.ts.map +1 -1
- package/dist/cli/pack.js +241 -188
- 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 +36 -0
- package/dist/cli/runner-host.d.ts.map +1 -0
- package/dist/cli/runner-host.js +154 -0
- package/dist/cli/runner-host.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 +275 -6
- package/dist/cli/serve.js.map +1 -1
- package/dist/cli/setup-machine.d.ts +36 -0
- package/dist/cli/setup-machine.d.ts.map +1 -0
- package/dist/cli/setup-machine.js +109 -0
- package/dist/cli/setup-machine.js.map +1 -0
- package/dist/client.d.ts +189 -10
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +192 -57
- package/dist/client.js.map +1 -1
- package/dist/compat.d.ts +1 -1
- package/dist/compat.js +2 -2
- package/dist/components/agent-page.d.ts +384 -0
- package/dist/components/agent-page.d.ts.map +1 -0
- package/dist/components/agent-page.js +985 -0
- package/dist/components/agent-page.js.map +1 -0
- package/dist/components/agents.d.ts +102 -0
- package/dist/components/agents.d.ts.map +1 -0
- package/dist/components/agents.js +246 -0
- package/dist/components/agents.js.map +1 -0
- package/dist/components/calendar.d.ts +17 -17
- package/dist/components/calendar.d.ts.map +1 -1
- package/dist/components/calendar.js +7 -2
- package/dist/components/calendar.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/comments.d.ts +2 -0
- package/dist/components/comments.d.ts.map +1 -1
- package/dist/components/comments.js +1 -1
- package/dist/components/comments.js.map +1 -1
- package/dist/components/connect.d.ts.map +1 -1
- package/dist/components/connect.js +7 -2
- package/dist/components/connect.js.map +1 -1
- package/dist/components/decision-form.d.ts +21 -0
- package/dist/components/decision-form.d.ts.map +1 -1
- package/dist/components/decision-form.js +20 -6
- package/dist/components/decision-form.js.map +1 -1
- package/dist/components/decision-list.d.ts +24 -0
- package/dist/components/decision-list.d.ts.map +1 -1
- package/dist/components/decision-list.js +54 -5
- 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 +26 -1
- package/dist/components/event-feed.js.map +1 -1
- package/dist/components/home.d.ts +12 -1
- package/dist/components/home.d.ts.map +1 -1
- package/dist/components/home.js +175 -16
- package/dist/components/home.js.map +1 -1
- package/dist/components/my-decisions.d.ts +5 -0
- package/dist/components/my-decisions.d.ts.map +1 -1
- package/dist/components/my-decisions.js +3 -3
- package/dist/components/my-decisions.js.map +1 -1
- package/dist/components/people.d.ts +17 -0
- package/dist/components/people.d.ts.map +1 -1
- package/dist/components/people.js +55 -19
- package/dist/components/people.js.map +1 -1
- package/dist/components/picker.d.ts +2 -0
- package/dist/components/picker.d.ts.map +1 -1
- package/dist/components/picker.js +1 -1
- package/dist/components/picker.js.map +1 -1
- package/dist/components/pictures.d.ts +38 -10
- package/dist/components/pictures.d.ts.map +1 -1
- package/dist/components/pictures.js +195 -40
- package/dist/components/pictures.js.map +1 -1
- package/dist/components/plugin-events.d.ts +29 -0
- package/dist/components/plugin-events.d.ts.map +1 -0
- package/dist/components/plugin-events.js +139 -0
- package/dist/components/plugin-events.js.map +1 -0
- package/dist/components/plugin-frame.d.ts.map +1 -1
- package/dist/components/plugin-frame.js +14 -37
- 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 +58 -7
- package/dist/components/plugin-settings.js.map +1 -1
- package/dist/components/projects.d.ts.map +1 -1
- package/dist/components/projects.js +30 -10
- 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 +36 -14
- package/dist/components/rules.js.map +1 -1
- package/dist/components/sessions.d.ts.map +1 -1
- package/dist/components/sessions.js +8 -4
- package/dist/components/sessions.js.map +1 -1
- package/dist/components/setup.d.ts +59 -0
- package/dist/components/setup.d.ts.map +1 -0
- package/dist/components/setup.js +93 -0
- package/dist/components/setup.js.map +1 -0
- package/dist/components/sign-in.js +1 -1
- package/dist/components/sign-in.js.map +1 -1
- package/dist/components/task-form.d.ts.map +1 -1
- package/dist/components/task-form.js +2 -2
- package/dist/components/task-form.js.map +1 -1
- package/dist/components/task-list.d.ts +7 -6
- package/dist/components/task-list.d.ts.map +1 -1
- package/dist/components/task-list.js.map +1 -1
- package/dist/components/task-view.d.ts +3 -0
- package/dist/components/task-view.d.ts.map +1 -1
- package/dist/components/task-view.js +1 -1
- package/dist/components/task-view.js.map +1 -1
- package/dist/components/ui.d.ts +78 -8
- package/dist/components/ui.d.ts.map +1 -1
- package/dist/components/ui.js +88 -9
- package/dist/components/ui.js.map +1 -1
- package/dist/components/work.d.ts +5 -5
- package/dist/components/work.d.ts.map +1 -1
- package/dist/components/work.js.map +1 -1
- package/dist/components/workspace.d.ts +17 -0
- package/dist/components/workspace.d.ts.map +1 -1
- package/dist/components/workspace.js +129 -2
- package/dist/components/workspace.js.map +1 -1
- package/dist/connect-page.d.ts.map +1 -1
- package/dist/connect-page.js +5 -2
- package/dist/connect-page.js.map +1 -1
- package/dist/console.css +7551 -4580
- package/dist/console.d.ts +20 -0
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +331 -57
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts +22 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +62 -34
- 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/glances.d.ts +39 -0
- package/dist/glances.d.ts.map +1 -0
- package/dist/glances.js +94 -0
- package/dist/glances.js.map +1 -0
- package/dist/home-tiles.d.ts +69 -5
- package/dist/home-tiles.d.ts.map +1 -1
- package/dist/home-tiles.js +347 -9
- package/dist/home-tiles.js.map +1 -1
- package/dist/i18n/en.d.ts +773 -3
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +770 -9
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/ko.d.ts.map +1 -1
- package/dist/i18n/ko.js +736 -9
- package/dist/i18n/ko.js.map +1 -1
- package/dist/index.d.ts +19 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +67 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +67 -0
- package/dist/limits.js.map +1 -1
- package/dist/onboarding.d.ts +21 -0
- package/dist/onboarding.d.ts.map +1 -0
- package/dist/onboarding.js +43 -0
- package/dist/onboarding.js.map +1 -0
- package/dist/persona.d.ts +34 -0
- package/dist/persona.d.ts.map +1 -0
- package/dist/persona.js +71 -0
- package/dist/persona.js.map +1 -0
- 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 +34 -4
- package/dist/plugin/manifest.js.map +1 -1
- package/dist/plugin/rest-schemas.d.ts +56 -0
- package/dist/plugin/rest-schemas.d.ts.map +1 -1
- package/dist/plugin/rest-schemas.js +42 -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.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/router.d.ts +50 -3
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +78 -7
- package/dist/router.js.map +1 -1
- package/dist/routes.d.ts +12 -2
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +14 -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 +99 -42
- package/dist/rules.js.map +1 -1
- package/dist/runner/acp.d.ts +20 -0
- package/dist/runner/acp.d.ts.map +1 -0
- package/dist/runner/acp.js +1132 -0
- package/dist/runner/acp.js.map +1 -0
- package/dist/runner/claude.d.ts +13 -0
- package/dist/runner/claude.d.ts.map +1 -0
- package/dist/runner/claude.js +615 -0
- package/dist/runner/claude.js.map +1 -0
- package/dist/runner/codex.d.ts +19 -0
- package/dist/runner/codex.d.ts.map +1 -0
- package/dist/runner/codex.js +597 -0
- package/dist/runner/codex.js.map +1 -0
- package/dist/runner/config.d.ts +35 -0
- package/dist/runner/config.d.ts.map +1 -0
- package/dist/runner/config.js +74 -0
- package/dist/runner/config.js.map +1 -0
- package/dist/runner/desk.d.ts +81 -0
- package/dist/runner/desk.d.ts.map +1 -0
- package/dist/runner/desk.js +303 -0
- package/dist/runner/desk.js.map +1 -0
- package/dist/runner/launchd.d.ts +7 -0
- package/dist/runner/launchd.d.ts.map +1 -0
- package/dist/runner/launchd.js +78 -0
- package/dist/runner/launchd.js.map +1 -0
- package/dist/runner/message.d.ts +66 -0
- package/dist/runner/message.d.ts.map +1 -0
- package/dist/runner/message.js +181 -0
- package/dist/runner/message.js.map +1 -0
- package/dist/runner/modules.d.ts +13 -0
- package/dist/runner/modules.d.ts.map +1 -0
- package/dist/runner/modules.js +30 -0
- package/dist/runner/modules.js.map +1 -0
- package/dist/runner/process.d.ts +7 -0
- package/dist/runner/process.d.ts.map +1 -0
- package/dist/runner/process.js +65 -0
- package/dist/runner/process.js.map +1 -0
- package/dist/runner/redact.d.ts +48 -0
- package/dist/runner/redact.d.ts.map +1 -0
- package/dist/runner/redact.js +214 -0
- package/dist/runner/redact.js.map +1 -0
- package/dist/runner/registry.d.ts +37 -0
- package/dist/runner/registry.d.ts.map +1 -0
- package/dist/runner/registry.js +26 -0
- package/dist/runner/registry.js.map +1 -0
- package/dist/runner/runner.d.ts +130 -0
- package/dist/runner/runner.d.ts.map +1 -0
- package/dist/runner/runner.js +1551 -0
- package/dist/runner/runner.js.map +1 -0
- package/dist/runner/slack.d.ts +16 -0
- package/dist/runner/slack.d.ts.map +1 -0
- package/dist/runner/slack.js +157 -0
- package/dist/runner/slack.js.map +1 -0
- package/dist/runner/systemd-user.d.ts +7 -0
- package/dist/runner/systemd-user.d.ts.map +1 -0
- package/dist/runner/systemd-user.js +93 -0
- package/dist/runner/systemd-user.js.map +1 -0
- package/dist/runner/task-scheduler.d.ts +38 -0
- package/dist/runner/task-scheduler.d.ts.map +1 -0
- package/dist/runner/task-scheduler.js +216 -0
- package/dist/runner/task-scheduler.js.map +1 -0
- package/dist/runner/types.d.ts +315 -0
- package/dist/runner/types.d.ts.map +1 -0
- package/dist/runner/types.js +24 -0
- package/dist/runner/types.js.map +1 -0
- package/dist/runner.d.ts +18 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +20 -0
- package/dist/runner.js.map +1 -0
- package/dist/schemas.d.ts +6082 -1295
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +930 -31
- package/dist/schemas.js.map +1 -1
- package/dist/services.d.ts +110 -0
- package/dist/services.d.ts.map +1 -0
- package/dist/services.js +305 -0
- package/dist/services.js.map +1 -0
- package/dist/setup-guide.d.ts +64 -0
- package/dist/setup-guide.d.ts.map +1 -0
- package/dist/setup-guide.js +256 -0
- package/dist/setup-guide.js.map +1 -0
- package/dist/setup-page.d.ts +6 -0
- package/dist/setup-page.d.ts.map +1 -0
- package/dist/setup-page.js +29 -0
- package/dist/setup-page.js.map +1 -0
- package/dist/sse.d.ts +15 -0
- package/dist/sse.d.ts.map +1 -0
- package/dist/sse.js +73 -0
- package/dist/sse.js.map +1 -0
- package/dist/tab-title.d.ts +6 -0
- package/dist/tab-title.d.ts.map +1 -0
- package/dist/tab-title.js +22 -0
- package/dist/tab-title.js.map +1 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +3 -0
- package/dist/tokens.js.map +1 -1
- package/dist/use-action.d.ts +5 -2
- package/dist/use-action.d.ts.map +1 -1
- package/dist/use-action.js +6 -1
- package/dist/use-action.js.map +1 -1
- package/dist/vocabulary.d.ts +84 -4
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +115 -3
- package/dist/vocabulary.js.map +1 -1
- package/docs/specs/cli.md +147 -41
- package/docs/specs/plugins.md +37 -27
- package/docs/specs/records.md +113 -0
- package/docs/specs/rest.md +155 -20
- package/docs/specs/runner.md +347 -0
- package/package.json +12 -3
- package/skills/building-a-console/SKILL.md +4 -4
- package/skills/building-a-console/references/configuring.md +1 -0
- package/skills/building-a-plugin/SKILL.md +7 -7
- package/skills/deploying-a-console/SKILL.md +4 -4
- package/skills/deploying-a-console/references/resources.md +48 -8
- 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 +22 -9
- package/skills/running-an-agent/SKILL.md +107 -0
- package/skills/running-an-agent/references/slack-app.md +61 -0
- package/skills/working-the-board/SKILL.md +66 -39
- package/skills/working-the-board/references/terms.md +9 -5
- package/skills/working-the-board/references/the-pack.md +14 -9
- package/skills/working-the-board/references/the-sentence.md +2 -2
- package/src/agent-page.tsx +1039 -0
- package/src/agent-stream.ts +199 -0
- package/src/api.ts +317 -2
- package/src/avatar.ts +1506 -0
- package/src/charts.ts +250 -0
- package/src/cli/cli.ts +3210 -503
- package/src/cli/command-words.ts +56 -0
- package/src/cli/credentials.ts +188 -16
- package/src/cli/directory.ts +28 -10
- package/src/cli/format.ts +470 -67
- package/src/cli/help.ts +233 -61
- package/src/cli/main.ts +89 -0
- package/src/cli/pack.ts +332 -263
- 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 +188 -0
- package/src/cli/serve.ts +320 -5
- package/src/cli/setup-machine.ts +153 -0
- package/src/client.ts +711 -126
- package/src/compat.ts +2 -2
- package/src/components/agent-page.tsx +1946 -0
- package/src/components/agents.tsx +638 -0
- package/src/components/calendar.tsx +74 -53
- package/src/components/charts.tsx +680 -0
- package/src/components/comments.tsx +3 -0
- package/src/components/connect.tsx +37 -2
- package/src/components/decision-form.tsx +89 -51
- package/src/components/decision-list.tsx +140 -4
- package/src/components/desk-records.tsx +724 -0
- package/src/components/desk.tsx +471 -0
- package/src/components/event-feed.tsx +30 -1
- package/src/components/home.tsx +353 -12
- package/src/components/my-decisions.tsx +8 -2
- package/src/components/people.tsx +300 -203
- package/src/components/picker.tsx +3 -1
- package/src/components/pictures.tsx +256 -44
- package/src/components/plugin-events.ts +159 -0
- package/src/components/plugin-frame.tsx +14 -38
- package/src/components/plugin-settings.tsx +178 -22
- package/src/components/projects.tsx +33 -15
- package/src/components/rules.tsx +96 -36
- package/src/components/sessions.tsx +7 -4
- package/src/components/setup.tsx +252 -0
- package/src/components/sign-in.tsx +1 -1
- package/src/components/task-form.tsx +11 -2
- package/src/components/task-list.tsx +7 -6
- package/src/components/task-view.tsx +4 -0
- package/src/components/ui.tsx +169 -25
- package/src/components/work.tsx +9 -9
- package/src/components/workspace.tsx +345 -4
- package/src/connect-page.tsx +15 -2
- package/src/console.tsx +657 -83
- package/src/data.ts +109 -43
- 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/glances.ts +132 -0
- package/src/home-tiles.ts +411 -9
- package/src/i18n/en.ts +828 -10
- package/src/i18n/ko.ts +792 -10
- package/src/index.ts +172 -3
- package/src/limits.ts +67 -0
- package/src/onboarding.ts +84 -0
- package/src/persona.ts +100 -0
- package/src/plugin/context.ts +55 -12
- package/src/plugin/limits.ts +2 -0
- package/src/plugin/manifest.ts +42 -3
- package/src/plugin/rest-schemas.ts +46 -0
- package/src/plugin/sandbox.ts +4 -1
- package/src/plugin/testing.ts +63 -12
- package/src/plugin.ts +2 -0
- package/src/records.ts +702 -0
- package/src/router.ts +120 -10
- package/src/routes.ts +17 -1
- package/src/rules.ts +109 -44
- package/src/runner/acp.ts +1267 -0
- package/src/runner/claude.ts +695 -0
- package/src/runner/codex.ts +691 -0
- package/src/runner/config.ts +97 -0
- package/src/runner/desk.ts +377 -0
- package/src/runner/launchd.ts +86 -0
- package/src/runner/message.ts +232 -0
- package/src/runner/modules.ts +30 -0
- package/src/runner/process.ts +72 -0
- package/src/runner/redact.ts +242 -0
- package/src/runner/registry.ts +67 -0
- package/src/runner/runner.ts +1879 -0
- package/src/runner/slack.ts +180 -0
- package/src/runner/systemd-user.ts +103 -0
- package/src/runner/task-scheduler.ts +236 -0
- package/src/runner/types.ts +334 -0
- package/src/runner.ts +110 -0
- package/src/schemas.ts +1183 -30
- package/src/services.ts +424 -0
- package/src/setup-guide.ts +336 -0
- package/src/setup-page.tsx +46 -0
- package/src/sse.ts +84 -0
- package/src/styles/README.md +111 -0
- package/src/styles/base.css +130 -0
- package/src/styles/console.css +85 -7095
- package/src/styles/drawn-by-pages.json +256 -0
- package/src/styles/pages/agents.css +1195 -0
- package/src/styles/pages/board.css +380 -0
- package/src/styles/pages/calendar.css +214 -0
- package/src/styles/pages/connect.css +182 -0
- package/src/styles/pages/decisions.css +370 -0
- package/src/styles/pages/desk.css +126 -0
- package/src/styles/pages/documents.css +273 -0
- package/src/styles/pages/feed.css +118 -0
- package/src/styles/pages/home.css +718 -0
- package/src/styles/pages/people.css +90 -0
- package/src/styles/pages/plugins.css +212 -0
- package/src/styles/pages/roadmap.css +377 -0
- package/src/styles/pages/settings.css +171 -0
- package/src/styles/pages/shell.css +208 -0
- package/src/styles/pages/sign-in.css +178 -0
- package/src/styles/pages/task.css +108 -0
- package/src/styles/pages/thread.css +331 -0
- package/src/styles/pages/work.css +68 -0
- package/src/styles/parts/avatar.css +82 -0
- package/src/styles/parts/badge.css +227 -0
- package/src/styles/parts/bars.css +80 -0
- package/src/styles/parts/button.css +99 -0
- package/src/styles/parts/calendar.css +547 -0
- package/src/styles/parts/callout.css +41 -0
- package/src/styles/parts/category.css +8 -0
- package/src/styles/parts/chart.css +173 -0
- package/src/styles/parts/chip.css +90 -0
- package/src/styles/parts/code.css +48 -0
- package/src/styles/parts/count.css +27 -0
- package/src/styles/parts/crumbs.css +61 -0
- package/src/styles/parts/detail.css +110 -0
- package/src/styles/parts/empty.css +21 -0
- package/src/styles/parts/eyebrow.css +9 -0
- package/src/styles/parts/facts.css +147 -0
- package/src/styles/parts/figures.css +65 -0
- package/src/styles/parts/files.css +38 -0
- package/src/styles/parts/filters.css +42 -0
- package/src/styles/parts/form.css +109 -0
- package/src/styles/parts/frame.css +45 -0
- package/src/styles/parts/input.css +243 -0
- package/src/styles/parts/legend.css +48 -0
- package/src/styles/parts/links.css +37 -0
- package/src/styles/parts/mark.css +79 -0
- package/src/styles/parts/menu.css +147 -0
- package/src/styles/parts/page.css +174 -0
- package/src/styles/parts/pager.css +19 -0
- package/src/styles/parts/panel.css +33 -0
- package/src/styles/parts/person.css +257 -0
- package/src/styles/parts/picker.css +185 -0
- package/src/styles/parts/progress.css +25 -0
- package/src/styles/parts/prose.css +128 -0
- package/src/styles/parts/rows.css +63 -0
- package/src/styles/parts/series.css +32 -0
- package/src/styles/parts/settings.css +101 -0
- package/src/styles/parts/share.css +25 -0
- package/src/styles/parts/spark.css +23 -0
- package/src/styles/parts/spinner.css +29 -0
- package/src/styles/parts/stat.css +69 -0
- package/src/styles/parts/steps.css +68 -0
- package/src/styles/parts/tabs.css +175 -0
- package/src/styles/parts/text.css +61 -0
- package/src/styles/parts/toggle.css +71 -0
- package/src/styles/parts/workers.css +37 -0
- package/src/styles/tokens.css +295 -0
- package/src/tab-title.ts +25 -0
- package/src/tokens.ts +3 -0
- package/src/use-action.ts +7 -2
- package/src/vocabulary.ts +151 -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,216 @@
|
|
|
1
|
+
import { KEEPER_VARIABLE } from "./types.js";
|
|
2
|
+
// The service that keeps a runner running on Windows (ADR-0085): a scheduled task of the agent's
|
|
3
|
+
// own OS account, registered by that account and started when it logs on. It needs no
|
|
4
|
+
// administrator's rights, and so it runs while the account is logged on at the machine: a task
|
|
5
|
+
// that runs with nobody logged on is refused to an account that registers it for itself, and
|
|
6
|
+
// that the account is logged on when the machine starts is for whoever prepares the machine.
|
|
7
|
+
// The system starts a task once and in a window, gives it the account's environment and not the
|
|
8
|
+
// one the machine was set up in, keeps none of its words, and ends it by ending the one process
|
|
9
|
+
// it started: so what the task starts is a few lines of the system's own shell, in no window,
|
|
10
|
+
// which start the runner with the setup's `PATH`, keep its lines in a log that is put aside
|
|
11
|
+
// when it is full, start it again when it ends and tell it which process keeps it. Written from
|
|
12
|
+
// the system's own documentation, the Task
|
|
13
|
+
// Scheduler's schema and schtasks, and run on Windows 11; the module says what to write and what
|
|
14
|
+
// to run, and whoever sets the machine up does it.
|
|
15
|
+
/** What the task is called before the name of its OS account: tasks are the machine's, one list for every account. */
|
|
16
|
+
export const TASK_NAME = "SkillCDN Console Runner";
|
|
17
|
+
/** How long the runner stays ended before it is started again, in seconds. */
|
|
18
|
+
const RESTART_SECONDS = 10;
|
|
19
|
+
/** The most a task's command line carries, with room left for the shell's own path. */
|
|
20
|
+
const MAX_COMMAND = 30_000;
|
|
21
|
+
/**
|
|
22
|
+
* How large the log is before it is put aside, in bytes, and how many logs put aside are kept:
|
|
23
|
+
* the runner's lines hold a few megabytes at most, on a machine that runs for years. The other
|
|
24
|
+
* services leave it to the system, whose journal keeps to a size of its own.
|
|
25
|
+
*/
|
|
26
|
+
export const MAX_LOG_BYTES = 4 * 1024 * 1024;
|
|
27
|
+
export const KEPT_LOGS = 3;
|
|
28
|
+
/** What a task's name, and so the name of an OS account in it, cannot hold. */
|
|
29
|
+
const UNNAMEABLE = /[\\/:*?"<>|]/;
|
|
30
|
+
/** The name of the task of one OS account. */
|
|
31
|
+
export const taskNameOf = (user) => `${TASK_NAME} (${user})`;
|
|
32
|
+
/** A text on one line, without what no line of the system's holds. */
|
|
33
|
+
const plain = (text) => [...text.replaceAll(/[\r\n]+/g, " ")]
|
|
34
|
+
.filter((sign) => (sign.codePointAt(0) ?? 0) >= 0x20)
|
|
35
|
+
.join("");
|
|
36
|
+
/**
|
|
37
|
+
* A text inside the definition's XML, in the letters every encoding shares: the system reads a
|
|
38
|
+
* definition that names no encoding in the machine's own, so a letter beyond them is written by
|
|
39
|
+
* its number.
|
|
40
|
+
*/
|
|
41
|
+
const escaped = (text) => [...text]
|
|
42
|
+
.map((sign) => {
|
|
43
|
+
const point = sign.codePointAt(0) ?? 0;
|
|
44
|
+
if (sign === "&") {
|
|
45
|
+
return "&";
|
|
46
|
+
}
|
|
47
|
+
if (sign === "<") {
|
|
48
|
+
return "<";
|
|
49
|
+
}
|
|
50
|
+
if (sign === ">") {
|
|
51
|
+
return ">";
|
|
52
|
+
}
|
|
53
|
+
return point > 0x7e ? `&#x${point.toString(16).toUpperCase()};` : sign;
|
|
54
|
+
})
|
|
55
|
+
.join("");
|
|
56
|
+
/** The signs the shell reads as the quote of a word said as it is: the plain one, and the four curled ones. */
|
|
57
|
+
const QUOTES = new Set([
|
|
58
|
+
"'",
|
|
59
|
+
...[0x2018, 0x2019, 0x201a, 0x201b].map((point) => String.fromCodePoint(point)),
|
|
60
|
+
]);
|
|
61
|
+
/** A stretch of a word as it is: quoted whole, and every sign the shell reads as that quote said twice. */
|
|
62
|
+
const quoted = (text) => `'${[...text].map((sign) => (QUOTES.has(sign) ? `${sign}${sign}` : sign)).join("")}'`;
|
|
63
|
+
/**
|
|
64
|
+
* A word of the shell's as it is, whatever it holds. The system fills in a variable named
|
|
65
|
+
* between two percent signs before the shell reads the line, so a percent sign is never
|
|
66
|
+
* written: the shell puts it there, by its number.
|
|
67
|
+
*/
|
|
68
|
+
const word = (text) => {
|
|
69
|
+
const parts = plain(text).split("%").map(quoted);
|
|
70
|
+
return parts.length === 1 ? (parts[0] ?? "''") : `(${parts.join(" + [char]37 + ")})`;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* What keeps a line in the log, as a function of the shell's, `Keep`: the log is put aside
|
|
74
|
+
* first where it is full, as `<log>.1`, the ones put aside before each moved one on and the
|
|
75
|
+
* oldest let go, and the line is added and the log let go of, so that it is read while the
|
|
76
|
+
* runner runs. Whoever writes the log bounds it: a runner that cannot start writes lines too.
|
|
77
|
+
* The log itself is moved first, to a spare name, `<log>.0`, and the ones put aside are
|
|
78
|
+
* touched only once that worked: a log that cannot be moved, read by something that holds it
|
|
79
|
+
* say, is added to as it is and put aside at a later line, and costs none of them, where
|
|
80
|
+
* letting the oldest go first lost one at every line. A spare name left by a step after it
|
|
81
|
+
* that did not work is gone on from, the log after it added to meanwhile. The log is `$log`;
|
|
82
|
+
* no quote and no percent sign is written, as nothing of the task's line may hold one.
|
|
83
|
+
*/
|
|
84
|
+
export function logKeeper(maxBytes = MAX_LOG_BYTES, kept = KEPT_LOGS) {
|
|
85
|
+
const aside = [
|
|
86
|
+
"$spare = $log + '.0'",
|
|
87
|
+
"if (-not [IO.File]::Exists($spare)) { [IO.File]::Move($log, $spare) }",
|
|
88
|
+
`$last = $log + '.${kept}'`,
|
|
89
|
+
"if ([IO.File]::Exists($last)) { [IO.File]::Delete($last) }",
|
|
90
|
+
`for ($i = ${kept - 1}; $i -ge 0; $i--) { $from = $log + '.' + $i; if ([IO.File]::Exists($from)) { [IO.File]::Move($from, $log + '.' + ($i + 1)) } }`,
|
|
91
|
+
].join("; ");
|
|
92
|
+
return `function Keep($line) { try { $now = [IO.FileInfo]$log; if ($now.Exists -and $now.Length -ge ${maxBytes}) { ${aside} } } catch { }; [IO.File]::AppendAllText($log, [string]$line + [Environment]::NewLine) }`;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* What the task starts, in the system's own shell and on one line: the runner in the desk with
|
|
96
|
+
* the `PATH` the machine was set up with, its lines added to the log as they come, and the
|
|
97
|
+
* runner again ten seconds after it ends, for as long as the task runs. The system ends a task
|
|
98
|
+
* by ending this shell and nothing the shell started, so the runner is told which process keeps
|
|
99
|
+
* it and ends when that one does, and a runner that was left all the same is ended before
|
|
100
|
+
* another is started: one runner for the account.
|
|
101
|
+
*/
|
|
102
|
+
export function taskScript(input, log) {
|
|
103
|
+
const [runner = "", ...words] = input.program;
|
|
104
|
+
const kept = "Keep $_";
|
|
105
|
+
return [
|
|
106
|
+
// A line the runner writes of an error is a line, and what it writes is read as it wrote it.
|
|
107
|
+
"$ErrorActionPreference = 'Continue'",
|
|
108
|
+
"[Console]::OutputEncoding = [Text.Encoding]::UTF8",
|
|
109
|
+
`$log = ${word(log)}`,
|
|
110
|
+
logKeeper(),
|
|
111
|
+
`$runner = ${word(runner)}`,
|
|
112
|
+
`$words = @(${words.map(word).join(", ")})`,
|
|
113
|
+
// A runner left behind is the same program, started with the same words to their end as
|
|
114
|
+
// this shell hands them on, a word with a space in it between quotes: it goes, with what
|
|
115
|
+
// it started.
|
|
116
|
+
"$tail = ' ' + (($words | ForEach-Object { if ($_ -match ' ') { [char]34 + $_ + [char]34 } else { $_ } }) -join ' ')",
|
|
117
|
+
"foreach ($left in @(Get-CimInstance Win32_Process)) { if ($left.ExecutablePath -eq $runner -and $left.CommandLine -and $left.CommandLine.EndsWith($tail, [StringComparison]::OrdinalIgnoreCase)) { & taskkill.exe /F /T /PID $left.ProcessId 2>&1 | Out-Null } }",
|
|
118
|
+
// The product, and what the agent runs, are found where they were when the machine was set up.
|
|
119
|
+
...(input.path === undefined ? [] : [`$env:PATH = ${word(input.path)}`]),
|
|
120
|
+
`$env:${KEEPER_VARIABLE} = [string]$PID`,
|
|
121
|
+
// The runner is started in the desk or not at all: a desk that is gone is a line of the log.
|
|
122
|
+
`try { Set-Location -LiteralPath ${word(input.desk)} -ErrorAction Stop } catch { ${kept}; exit 1 }`,
|
|
123
|
+
`while ($true) { & $runner @words 2>&1 | ForEach-Object { ${kept} }; Start-Sleep -Seconds ${RESTART_SECONDS} }`,
|
|
124
|
+
].join("; ");
|
|
125
|
+
}
|
|
126
|
+
/** The definition of the task: started when the account logs on, in no window, for as long as it runs. */
|
|
127
|
+
export function taskDefinition(input, log) {
|
|
128
|
+
return [
|
|
129
|
+
'<?xml version="1.0"?>',
|
|
130
|
+
'<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">',
|
|
131
|
+
" <RegistrationInfo>",
|
|
132
|
+
" <Description>The runner of an agent account of the SkillCDN Console</Description>",
|
|
133
|
+
" </RegistrationInfo>",
|
|
134
|
+
" <Triggers>",
|
|
135
|
+
" <LogonTrigger>",
|
|
136
|
+
" <Enabled>true</Enabled>",
|
|
137
|
+
` <UserId>${escaped(plain(input.user ?? ""))}</UserId>`,
|
|
138
|
+
" </LogonTrigger>",
|
|
139
|
+
" </Triggers>",
|
|
140
|
+
// The account that registers the task is the one it runs as: none is named, and none other can be.
|
|
141
|
+
" <Principals>",
|
|
142
|
+
' <Principal id="Author">',
|
|
143
|
+
" <LogonType>InteractiveToken</LogonType>",
|
|
144
|
+
" <RunLevel>LeastPrivilege</RunLevel>",
|
|
145
|
+
" </Principal>",
|
|
146
|
+
" </Principals>",
|
|
147
|
+
" <Settings>",
|
|
148
|
+
// One runner for the account: a second start, while it runs, starts nothing.
|
|
149
|
+
" <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>",
|
|
150
|
+
// A task is ended after three days, and on a battery, unless it says otherwise.
|
|
151
|
+
" <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>",
|
|
152
|
+
" <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>",
|
|
153
|
+
" <ExecutionTimeLimit>PT0S</ExecutionTimeLimit>",
|
|
154
|
+
" <AllowHardTerminate>true</AllowHardTerminate>",
|
|
155
|
+
" <AllowStartOnDemand>true</AllowStartOnDemand>",
|
|
156
|
+
" <Enabled>true</Enabled>",
|
|
157
|
+
// A task runs below everything else unless it says otherwise: the agent's work is no background work.
|
|
158
|
+
" <Priority>5</Priority>",
|
|
159
|
+
" </Settings>",
|
|
160
|
+
' <Actions Context="Author">',
|
|
161
|
+
" <Exec>",
|
|
162
|
+
" <Command>%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe</Command>",
|
|
163
|
+
` <Arguments>${escaped(`-NoProfile -NonInteractive -WindowStyle Hidden -Command "${taskScript(input, log)}"`)}</Arguments>`,
|
|
164
|
+
" </Exec>",
|
|
165
|
+
" </Actions>",
|
|
166
|
+
"</Task>",
|
|
167
|
+
"",
|
|
168
|
+
].join("\r\n");
|
|
169
|
+
}
|
|
170
|
+
export const taskScheduler = {
|
|
171
|
+
name: "task-scheduler",
|
|
172
|
+
platforms: ["win32"],
|
|
173
|
+
plan(input) {
|
|
174
|
+
const user = input.user === undefined ? "" : plain(input.user).trim();
|
|
175
|
+
if (user.length === 0 || UNNAMEABLE.test(user)) {
|
|
176
|
+
return { problem: "the system does not say the name of this OS account" };
|
|
177
|
+
}
|
|
178
|
+
if (input.program.length === 0) {
|
|
179
|
+
return { problem: "nothing says how the runner is started" };
|
|
180
|
+
}
|
|
181
|
+
const folder = `${input.home.replace(/[\\/]+$/, "")}\\AppData\\Local\\skillcdn-console`;
|
|
182
|
+
const definition = `${folder}\\runner-task.xml`;
|
|
183
|
+
const log = `${folder}\\runner.log`;
|
|
184
|
+
const named = { ...input, user };
|
|
185
|
+
const script = taskScript(named, log);
|
|
186
|
+
// The line is one word of a command line, between the one quote that ends it.
|
|
187
|
+
if (script.includes('"')) {
|
|
188
|
+
return {
|
|
189
|
+
problem: "a path or a name holds a quote, which a task's command line does not carry",
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
if (script.length > MAX_COMMAND) {
|
|
193
|
+
return { problem: "what starts the runner is longer than a task's command line carries" };
|
|
194
|
+
}
|
|
195
|
+
const name = taskNameOf(user);
|
|
196
|
+
const own = (...args) => ({ command: "schtasks", args });
|
|
197
|
+
const register = own("/Create", "/TN", name, "/XML", definition, "/F");
|
|
198
|
+
return {
|
|
199
|
+
files: [{ path: definition, text: taskDefinition(named, log), mode: 0o644 }],
|
|
200
|
+
commands: [
|
|
201
|
+
// The task is registered, in place of the one that was there; the one that runs is
|
|
202
|
+
// ended, and its runner with it; and it is started now, with what was written.
|
|
203
|
+
register,
|
|
204
|
+
{ ...own("/End", "/TN", name), mayFail: true },
|
|
205
|
+
own("/Run", "/TN", name),
|
|
206
|
+
],
|
|
207
|
+
// A definition written again is not the task until it is registered again: registering it
|
|
208
|
+
// ends nothing that runs.
|
|
209
|
+
reread: [register],
|
|
210
|
+
log,
|
|
211
|
+
failing: "A scheduled task is registered by the OS account it runs as, and starts when that account logs on: run this as the agent's own OS account, logged on at the machine, and see that the machine lets an account register a task of its own.",
|
|
212
|
+
reload: "when the task is next started: when the OS account next logs on, or once the task is ended and run again.",
|
|
213
|
+
};
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
//# sourceMappingURL=task-scheduler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-scheduler.js","sourceRoot":"","sources":["../../src/runner/task-scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAwD,MAAM,YAAY,CAAC;AAEnG,iGAAiG;AACjG,sFAAsF;AACtF,+FAA+F;AAC/F,6FAA6F;AAC7F,6FAA6F;AAC7F,gGAAgG;AAChG,gGAAgG;AAChG,8FAA8F;AAC9F,4FAA4F;AAC5F,gGAAgG;AAChG,2CAA2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AE,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;gBAC9C,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC;aACzB;YACD,0FAA0F;YAC1F,0BAA0B;YAC1B,MAAM,EAAE,CAAC,QAAQ,CAAC;YAClB,GAAG;YACH,OAAO,EACL,2OAA2O;YAC7O,MAAM,EACJ,2GAA2G;SAC9G,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import type { AgentStateReason, TranscriptKind } from "../vocabulary.js";
|
|
2
|
+
/** A fact about a block of a transcript: a word, a number, a yes or no. */
|
|
3
|
+
export type Fact = string | number | boolean | null;
|
|
4
|
+
/** A picture, as a supervisor sends one with a tell and as a tool returns one. */
|
|
5
|
+
export interface Picture {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly contentType: string;
|
|
8
|
+
readonly bytes: Uint8Array;
|
|
9
|
+
/**
|
|
10
|
+
* Where the runner wrote it, from the desk, for a picture that came with a signal: what a
|
|
11
|
+
* product that takes a picture as a file is handed. Nothing for a picture a tool returned.
|
|
12
|
+
*/
|
|
13
|
+
readonly path?: string | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* What a driver says while its product runs: a block of the transcript before its number, or
|
|
17
|
+
* one of the driver's own words to the runner.
|
|
18
|
+
*/
|
|
19
|
+
export type DriverEvent = {
|
|
20
|
+
readonly type: "event";
|
|
21
|
+
readonly kind: TranscriptKind;
|
|
22
|
+
readonly text: string;
|
|
23
|
+
readonly data?: Readonly<Record<string, Fact>> | undefined;
|
|
24
|
+
readonly pictures?: readonly Picture[] | undefined;
|
|
25
|
+
}
|
|
26
|
+
/** What the session runs with, as the product said when it started. */
|
|
27
|
+
| {
|
|
28
|
+
readonly type: "running";
|
|
29
|
+
readonly model: string | null;
|
|
30
|
+
readonly effort: string | null;
|
|
31
|
+
readonly version: string | null;
|
|
32
|
+
}
|
|
33
|
+
/** The id the product resumes the conversation from next time. */
|
|
34
|
+
| {
|
|
35
|
+
readonly type: "conversation";
|
|
36
|
+
readonly id: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The product took a message: the oldest it was sent and had not said so of. Said once for
|
|
40
|
+
* every message sent, when the product reads it, so that a message handed over in a turn is
|
|
41
|
+
* on the record where the agent came to it and not where it was written.
|
|
42
|
+
*/
|
|
43
|
+
| {
|
|
44
|
+
readonly type: "taken";
|
|
45
|
+
}
|
|
46
|
+
/** A turn completed: the agent is done with what it was sent, and waits for more. */
|
|
47
|
+
| {
|
|
48
|
+
readonly type: "turn_completed";
|
|
49
|
+
}
|
|
50
|
+
/** The agent cannot go on: the model refused, or the product failed; with why, in the heartbeat's words. */
|
|
51
|
+
| {
|
|
52
|
+
readonly type: "cannot_go_on";
|
|
53
|
+
readonly state: "refused" | "failed";
|
|
54
|
+
readonly reason: AgentStateReason;
|
|
55
|
+
}
|
|
56
|
+
/** The product's process is gone: by itself, or mid-turn. Always the last. */
|
|
57
|
+
| {
|
|
58
|
+
readonly type: "ended";
|
|
59
|
+
readonly how: "exited" | "crashed";
|
|
60
|
+
};
|
|
61
|
+
/** A message for the agent: `now` stops the turn first, `next` goes after the tool call under way. */
|
|
62
|
+
export interface DriverMessage {
|
|
63
|
+
readonly text: string;
|
|
64
|
+
readonly images: readonly Picture[];
|
|
65
|
+
readonly priority: "now" | "next";
|
|
66
|
+
}
|
|
67
|
+
/** One process of the product. */
|
|
68
|
+
export interface DriverSession {
|
|
69
|
+
send(message: DriverMessage): Promise<void>;
|
|
70
|
+
/** Stops the turn under way, and nothing else. */
|
|
71
|
+
interrupt(): Promise<void>;
|
|
72
|
+
/** The model and the effort, where the product takes them in a running session; false where it does not. */
|
|
73
|
+
set(choice: {
|
|
74
|
+
readonly model?: string | null | undefined;
|
|
75
|
+
readonly effort?: string | null | undefined;
|
|
76
|
+
}): Promise<boolean>;
|
|
77
|
+
/** Ends the process: asked first, then made to. */
|
|
78
|
+
stop(): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Whether this session's product takes a picture, where that is known only of a session: an
|
|
81
|
+
* agent says what it takes when it starts. Nothing while it is not known, and left out by a
|
|
82
|
+
* driver whose product always answers as `can.images` says.
|
|
83
|
+
*/
|
|
84
|
+
images?(): boolean | undefined;
|
|
85
|
+
/** What the product does, as whole blocks, until it ends. Read once. */
|
|
86
|
+
readonly events: AsyncIterable<DriverEvent>;
|
|
87
|
+
}
|
|
88
|
+
export interface StartOptions {
|
|
89
|
+
/** The desk: the directory the product works in. */
|
|
90
|
+
readonly cwd: string;
|
|
91
|
+
/** What is added to the product's environment: the secrets `runner.json` maps to variables. */
|
|
92
|
+
readonly env: Readonly<Record<string, string>>;
|
|
93
|
+
readonly model: string | null;
|
|
94
|
+
readonly effort: string | null;
|
|
95
|
+
/** The conversation to go on with, or nothing for a new one. */
|
|
96
|
+
readonly resume: string | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* The permission mode the product is started in, in the product's own word, as `runner.json`
|
|
99
|
+
* names it; the driver's own for a run nobody attends where nothing names one.
|
|
100
|
+
*/
|
|
101
|
+
readonly permissions?: string | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* What cuts a text to what the transcript shows of it. A driver cuts whatever it shows a
|
|
104
|
+
* part of through this, and never by itself first; left out, a text is cut as it is.
|
|
105
|
+
*/
|
|
106
|
+
readonly cut?: Cut | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* What keeps the end of a text to what the transcript shows of it, the secrets out first: the
|
|
109
|
+
* end of what the product wrote on its standard error, which says why it ended. A driver shows
|
|
110
|
+
* that through this (`errorsShown`); left out, a text is cut as it is.
|
|
111
|
+
*/
|
|
112
|
+
readonly cutEnd?: Cut | undefined;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* A text within `most` characters as the transcript shows it, ended by the mark of a cut where
|
|
116
|
+
* it was longer: the account's secrets are taken out first and the text is cut after, so that
|
|
117
|
+
* no part of one stands at the cut. `more` says that the text is itself the beginning of a
|
|
118
|
+
* longer one, which the driver kept to a bound: its last characters may begin a secret, and
|
|
119
|
+
* are not shown.
|
|
120
|
+
*/
|
|
121
|
+
export type Cut = (text: string, most: number, more?: boolean) => string;
|
|
122
|
+
/** A text cut as it is, with the mark of a cut: what a driver cuts with where it was handed nothing to cut with. */
|
|
123
|
+
export declare const plainCut: Cut;
|
|
124
|
+
/** The end of a text kept as it is, begun by the mark of a cut: what a driver keeps the end of a text with where it was handed nothing to. */
|
|
125
|
+
export declare const plainCutEnd: Cut;
|
|
126
|
+
/** How much of the end of what a product wrote on its standard error an event shows. */
|
|
127
|
+
export declare const MAX_ERRORS_SHOWN = 4000;
|
|
128
|
+
/**
|
|
129
|
+
* What a product wrote on its standard error as an event shows it: its end, within
|
|
130
|
+
* `MAX_ERRORS_SHOWN`, kept through `cutEnd`, so that the secrets are out before it is cut. A
|
|
131
|
+
* text whose beginning the child let go begins with the mark of a cut (`Child.errors`), and its
|
|
132
|
+
* first characters may be the end of a secret: they are not shown.
|
|
133
|
+
*/
|
|
134
|
+
export declare function errorsShown(errors: string, cutEnd: Cut): string;
|
|
135
|
+
/** What the installed product is and offers, asked without starting a session. */
|
|
136
|
+
export interface Probe {
|
|
137
|
+
readonly version: string | undefined;
|
|
138
|
+
readonly models: readonly string[];
|
|
139
|
+
readonly efforts: readonly string[];
|
|
140
|
+
}
|
|
141
|
+
/** The module that speaks to one product. */
|
|
142
|
+
export interface Driver {
|
|
143
|
+
readonly name: string;
|
|
144
|
+
/** What the product is called, and the versions of it the driver was tried with. */
|
|
145
|
+
readonly product: {
|
|
146
|
+
readonly name: string;
|
|
147
|
+
readonly tried: readonly string[];
|
|
148
|
+
};
|
|
149
|
+
readonly can: {
|
|
150
|
+
/** Whether a message reaches the agent after the tool call under way, and a turn is stopped for one. */
|
|
151
|
+
readonly steer: boolean;
|
|
152
|
+
/** Whether a message carries pictures the product sees. */
|
|
153
|
+
readonly images: boolean;
|
|
154
|
+
/** Whether the product takes a picture as a file in the desk, by its path, where others take its bytes. */
|
|
155
|
+
readonly imageFiles?: boolean | undefined;
|
|
156
|
+
/** Whether a conversation is gone on with from one session to the next. */
|
|
157
|
+
readonly resume: boolean;
|
|
158
|
+
/** Whether the model and the effort are taken in a running session. */
|
|
159
|
+
readonly set: boolean;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* The product's permission modes, in its own words: what runs without asking. `unattended` is
|
|
163
|
+
* the one the driver starts the product in where `runner.json` names none, and `least` the
|
|
164
|
+
* one it starts it in where what is named is none of the product's.
|
|
165
|
+
*/
|
|
166
|
+
readonly permissions: {
|
|
167
|
+
readonly modes: readonly string[];
|
|
168
|
+
readonly unattended: string;
|
|
169
|
+
readonly least: string;
|
|
170
|
+
};
|
|
171
|
+
probe(): Promise<Probe>;
|
|
172
|
+
start(options: StartOptions): DriverSession;
|
|
173
|
+
}
|
|
174
|
+
/** A child process as a driver needs one: lines in, lines out, and how it ended. */
|
|
175
|
+
export interface Child {
|
|
176
|
+
/** One line on its standard input. */
|
|
177
|
+
write(line: string): Promise<void>;
|
|
178
|
+
/** Closes its standard input: nothing more is coming. */
|
|
179
|
+
end(): void;
|
|
180
|
+
/** Its standard output, a line at a time, until it closes. Read once. */
|
|
181
|
+
readonly lines: AsyncIterable<string>;
|
|
182
|
+
/**
|
|
183
|
+
* The end of what it wrote on its standard error, bounded: where its beginning was let go, it
|
|
184
|
+
* begins with the mark of a cut (`…`), since what it begins with may be the end of a secret.
|
|
185
|
+
*/
|
|
186
|
+
errors(): string;
|
|
187
|
+
kill(signal: "SIGINT" | "SIGTERM" | "SIGKILL"): void;
|
|
188
|
+
/** How it ended: its exit code, or the signal that ended it; or why it never started. Never rejects. */
|
|
189
|
+
readonly exited: Promise<{
|
|
190
|
+
readonly code: number | null;
|
|
191
|
+
readonly signal: string | null;
|
|
192
|
+
readonly error?: string | undefined;
|
|
193
|
+
}>;
|
|
194
|
+
}
|
|
195
|
+
/** Starts a child process. One whose command is not there to start says so when it is asked how it ended. */
|
|
196
|
+
export type Spawn = (command: string, args: readonly string[], options: {
|
|
197
|
+
readonly cwd: string;
|
|
198
|
+
readonly env: Readonly<Record<string, string>>;
|
|
199
|
+
}) => Child;
|
|
200
|
+
/** A socket a wake source listens on: messages of text in, messages of text out. */
|
|
201
|
+
export interface WakeSocket {
|
|
202
|
+
/** What arrives, a message at a time, until the socket closes. Read once. */
|
|
203
|
+
readonly messages: AsyncIterable<string>;
|
|
204
|
+
send(text: string): void;
|
|
205
|
+
close(): void;
|
|
206
|
+
}
|
|
207
|
+
/** What a wake source is given of the runner and of the machine. */
|
|
208
|
+
export interface WakeHost {
|
|
209
|
+
/** A secret of the account's store, by name; nothing where it keeps none. */
|
|
210
|
+
secret(name: string): Promise<string | undefined>;
|
|
211
|
+
/** Raises a wake: the console records it, and it reaches the agent in order, as someone else's words. */
|
|
212
|
+
raise(wake: {
|
|
213
|
+
readonly key: string;
|
|
214
|
+
readonly text: string;
|
|
215
|
+
}): Promise<void>;
|
|
216
|
+
/** A line for whoever reads the runner's own output: never what a message says. */
|
|
217
|
+
log(line: string): void;
|
|
218
|
+
fetch(url: string, init: {
|
|
219
|
+
readonly method: string;
|
|
220
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
221
|
+
readonly signal: AbortSignal;
|
|
222
|
+
}): Promise<{
|
|
223
|
+
json(): Promise<unknown>;
|
|
224
|
+
}>;
|
|
225
|
+
socket(url: string): WakeSocket;
|
|
226
|
+
/** Waits so long, or less where the signal ends the wait. */
|
|
227
|
+
wait(ms: number, signal: AbortSignal): Promise<void>;
|
|
228
|
+
}
|
|
229
|
+
/** A module that raises wakes from outside the console. `console`, the console's own stream of signals, is the runner's own. */
|
|
230
|
+
export interface WakeSource {
|
|
231
|
+
readonly name: string;
|
|
232
|
+
/**
|
|
233
|
+
* Listens until it ends or the signal does, raising a wake for what is said to the agent. A
|
|
234
|
+
* source that ended is started again by the runner, after a while. `console` has none.
|
|
235
|
+
*/
|
|
236
|
+
run?(host: WakeHost, signal: AbortSignal): Promise<void>;
|
|
237
|
+
}
|
|
238
|
+
/** What a service is told of the runner it keeps running. */
|
|
239
|
+
export interface ServiceInput {
|
|
240
|
+
/** The desk, absolute: where the runner is started. */
|
|
241
|
+
readonly desk: string;
|
|
242
|
+
/** The home directory of the OS account the runner runs in, and the account's number where the system has one. */
|
|
243
|
+
readonly home: string;
|
|
244
|
+
readonly uid: number | undefined;
|
|
245
|
+
/** The name of that OS account, for a service that names it: a task of Windows is the machine's, called by whose it is. */
|
|
246
|
+
readonly user?: string | undefined;
|
|
247
|
+
/** What starts the runner: the runtime, the command and its words, absolute where they are files. */
|
|
248
|
+
readonly program: readonly string[];
|
|
249
|
+
/** Where the runner's process, and the product it starts, look for programs. */
|
|
250
|
+
readonly path: string | undefined;
|
|
251
|
+
}
|
|
252
|
+
/** A command a service has run. */
|
|
253
|
+
export interface ServiceCommand {
|
|
254
|
+
readonly command: string;
|
|
255
|
+
readonly args: readonly string[];
|
|
256
|
+
/** What is added to the environment it runs in. */
|
|
257
|
+
readonly env?: Readonly<Record<string, string>> | undefined;
|
|
258
|
+
readonly mayFail?: boolean | undefined;
|
|
259
|
+
/** For one that may fail: what is left to do where it did, in a sentence. */
|
|
260
|
+
readonly otherwise?: string | undefined;
|
|
261
|
+
/**
|
|
262
|
+
* How many times it is tried, a second apart, until it succeeds: for the first command after
|
|
263
|
+
* one the system answers before it has done what was asked. Once where nothing is said.
|
|
264
|
+
*/
|
|
265
|
+
readonly tries?: number | undefined;
|
|
266
|
+
}
|
|
267
|
+
/** What a service writes and runs to keep a runner running. Nothing of it needs an administrator's rights. */
|
|
268
|
+
export interface ServicePlan {
|
|
269
|
+
/** Whole files, each with the mode it is written in. */
|
|
270
|
+
readonly files: readonly {
|
|
271
|
+
readonly path: string;
|
|
272
|
+
readonly text: string;
|
|
273
|
+
readonly mode: number;
|
|
274
|
+
}[];
|
|
275
|
+
/**
|
|
276
|
+
* Commands, in order; one that fails where nothing was there before says so. One that may fail
|
|
277
|
+
* and did says what is left to do, where it names it: the setup prints that, and goes on.
|
|
278
|
+
*/
|
|
279
|
+
readonly commands: readonly ServiceCommand[];
|
|
280
|
+
/**
|
|
281
|
+
* What has the system read files written again, without ending the runner that may be
|
|
282
|
+
* running under the service: run by a refresh that changed one. None where the system reads
|
|
283
|
+
* a file only when it loads the service.
|
|
284
|
+
*/
|
|
285
|
+
readonly reread?: readonly ServiceCommand[] | undefined;
|
|
286
|
+
/** Where the runner's own lines are kept, for whoever looks when it is not heard from. */
|
|
287
|
+
readonly log: string;
|
|
288
|
+
/** What to look at when a command did not succeed, in a sentence. */
|
|
289
|
+
readonly failing: string;
|
|
290
|
+
/** When files written again are read, where the commands are not run: the end of a sentence. */
|
|
291
|
+
readonly reload: string;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* The variable a service's keeper names its own process in, by number, on a system that ends a
|
|
295
|
+
* keeper and leaves what it started: a runner told so looks for that process, and stops when it
|
|
296
|
+
* is gone.
|
|
297
|
+
*/
|
|
298
|
+
export declare const KEEPER_VARIABLE = "CONSOLE_RUNNER_KEEPER";
|
|
299
|
+
/** A module that keeps the runner running across restarts of the machine. */
|
|
300
|
+
export interface Service {
|
|
301
|
+
readonly name: string;
|
|
302
|
+
/** The platforms it keeps a runner running on, as the runtime names them (`darwin`). */
|
|
303
|
+
readonly platforms: readonly string[];
|
|
304
|
+
/** What to write and to run; or why it cannot, in a few words. */
|
|
305
|
+
plan(input: ServiceInput): ServicePlan | {
|
|
306
|
+
readonly problem: string;
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
/** A module that keeps one agent apart from another on a machine, and says whose the runner is. */
|
|
310
|
+
export interface Boundary {
|
|
311
|
+
readonly name: string;
|
|
312
|
+
/** The OS account the runner runs in. */
|
|
313
|
+
user(): string;
|
|
314
|
+
}
|
|
315
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"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,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,IAAI,IAAI,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** A text cut as it is, with the mark of a cut: what a driver cuts with where it was handed nothing to cut with. */
|
|
2
|
+
export const plainCut = (text, most) => text.length > most ? `${text.slice(0, most)}…` : text;
|
|
3
|
+
/** The end of a text kept as it is, begun by the mark of a cut: what a driver keeps the end of a text with where it was handed nothing to. */
|
|
4
|
+
export const plainCutEnd = (text, most, more = false) => text.length > most || more ? `…${text.slice(Math.max(0, text.length - most))}` : text;
|
|
5
|
+
/** How much of the end of what a product wrote on its standard error an event shows. */
|
|
6
|
+
export const MAX_ERRORS_SHOWN = 4000;
|
|
7
|
+
/**
|
|
8
|
+
* What a product wrote on its standard error as an event shows it: its end, within
|
|
9
|
+
* `MAX_ERRORS_SHOWN`, kept through `cutEnd`, so that the secrets are out before it is cut. A
|
|
10
|
+
* text whose beginning the child let go begins with the mark of a cut (`Child.errors`), and its
|
|
11
|
+
* first characters may be the end of a secret: they are not shown.
|
|
12
|
+
*/
|
|
13
|
+
export function errorsShown(errors, cutEnd) {
|
|
14
|
+
const text = errors.trim();
|
|
15
|
+
const more = text.startsWith("…");
|
|
16
|
+
return cutEnd(more ? text.slice(1) : text, MAX_ERRORS_SHOWN, more);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The variable a service's keeper names its own process in, by number, on a system that ends a
|
|
20
|
+
* keeper and leaves what it started: a runner told so looks for that process, and stops when it
|
|
21
|
+
* is gone.
|
|
22
|
+
*/
|
|
23
|
+
export const KEEPER_VARIABLE = "CONSOLE_RUNNER_KEEPER";
|
|
24
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/runner/types.ts"],"names":[],"mappings":"AA6HA,oHAAoH;AACpH,MAAM,CAAC,MAAM,QAAQ,GAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAC1C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AAExD,8IAA8I;AAC9I,MAAM,CAAC,MAAM,WAAW,GAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,EAAE,EAAE,CAC3D,IAAI,CAAC,MAAM,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAExF,wFAAwF;AACxF,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAErC;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,MAAc,EAAE,MAAW;IACrD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;IAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAClC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,gBAAgB,EAAE,IAAI,CAAC,CAAC;AACrE,CAAC;AAsKD;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,uBAAuB,CAAC"}
|
package/dist/runner.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { acpMode, createAcpDriver } from "./runner/acp.js";
|
|
2
|
+
export { createClaudeDriver } from "./runner/claude.js";
|
|
3
|
+
export { createCodexDriver } from "./runner/codex.js";
|
|
4
|
+
export { DEFAULT_RUNNER_CONFIG, parseRunnerConfig, type RunnerConfig, runnerConfigSchema, } from "./runner/config.js";
|
|
5
|
+
export { DESK_FOLDER, DESK_SECTIONS, type DeskInput, deskFiles, deskServicesOf, deskWebTitleOf, PERSON_DESK_SECTIONS, type PersonDeskInput, personDeskFiles, } from "./runner/desk.js";
|
|
6
|
+
export { LAUNCHD_LABEL, launchd, launchdUnit } from "./runner/launchd.js";
|
|
7
|
+
export { type Attached, attachedLine, composeSignals, deskName, fenced, GROUP_WINDOW_MS, headerOf, introOf, MAX_GROUP_LENGTH, MAX_GROUP_SIGNALS, makeMark, } from "./runner/message.js";
|
|
8
|
+
export { ownRunnerModules } from "./runner/modules.js";
|
|
9
|
+
export { createSpawn } from "./runner/process.js";
|
|
10
|
+
export { cutShown, cutShownEnd, formsOf, MAX_CUT_WINDOW, type Redactor, redactorOf, WITHHELD, } from "./runner/redact.js";
|
|
11
|
+
export { createRegistry, createRunnerModules, type DriverHost, type Registry, type RunnerModules, } from "./runner/registry.js";
|
|
12
|
+
export { AUTOSAVE_MESSAGE, BATCH_MS, COOL_DOWN_MS, createRunner, HEARTBEAT_MS, HOLD_MS, MAX_COOL_DOWN_MS, MAX_HOLD_MS, type Runner, type RunnerClient, type RunnerOptions, type RunnerState, } from "./runner/runner.js";
|
|
13
|
+
export { SLACK_APP_TOKEN, slack, slackWakeOf } from "./runner/slack.js";
|
|
14
|
+
export { SYSTEMD_UNIT, systemdUnit, systemdUser } from "./runner/systemd-user.js";
|
|
15
|
+
export { KEPT_LOGS, logKeeper, MAX_LOG_BYTES, TASK_NAME, taskDefinition, taskNameOf, taskScheduler, taskScript, } from "./runner/task-scheduler.js";
|
|
16
|
+
export type { Boundary, Child, Cut, Driver, DriverEvent, DriverMessage, DriverSession, Fact, Picture, Probe, Service, ServiceCommand, ServiceInput, ServicePlan, Spawn, StartOptions, WakeHost, WakeSocket, WakeSource, } from "./runner/types.js";
|
|
17
|
+
export { errorsShown, KEEPER_VARIABLE, MAX_ERRORS_SHOWN, plainCut, plainCutEnd, } from "./runner/types.js";
|
|
18
|
+
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,YAAY,EACjB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,WAAW,EACX,aAAa,EACb,KAAK,SAAS,EACd,SAAS,EACT,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,KAAK,eAAe,EACpB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EACL,KAAK,QAAQ,EACb,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,MAAM,EACN,eAAe,EACf,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EACL,QAAQ,EACR,WAAW,EACX,OAAO,EACP,cAAc,EACd,KAAK,QAAQ,EACb,UAAU,EACV,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,aAAa,GACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EACL,SAAS,EACT,SAAS,EACT,aAAa,EACb,SAAS,EACT,cAAc,EACd,UAAU,EACV,aAAa,EACb,UAAU,GACX,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,QAAQ,EACR,KAAK,EACL,GAAG,EACH,MAAM,EACN,WAAW,EACX,aAAa,EACb,aAAa,EACb,IAAI,EACJ,OAAO,EACP,KAAK,EACL,OAAO,EACP,cAAc,EACd,YAAY,EACZ,WAAW,EACX,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,UAAU,GACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,WAAW,GACZ,MAAM,mBAAmB,CAAC"}
|
package/dist/runner.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// The runner of an agent account (ADR-0085, docs/specs/runner.md), for whoever builds on it: a
|
|
2
|
+
// console of one's own that registers a driver for another product, or a test that runs one
|
|
3
|
+
// against a console. The command's `console runner` is made of the same.
|
|
4
|
+
export { acpMode, createAcpDriver } from "./runner/acp.js";
|
|
5
|
+
export { createClaudeDriver } from "./runner/claude.js";
|
|
6
|
+
export { createCodexDriver } from "./runner/codex.js";
|
|
7
|
+
export { DEFAULT_RUNNER_CONFIG, parseRunnerConfig, runnerConfigSchema, } from "./runner/config.js";
|
|
8
|
+
export { DESK_FOLDER, DESK_SECTIONS, deskFiles, deskServicesOf, deskWebTitleOf, PERSON_DESK_SECTIONS, personDeskFiles, } from "./runner/desk.js";
|
|
9
|
+
export { LAUNCHD_LABEL, launchd, launchdUnit } from "./runner/launchd.js";
|
|
10
|
+
export { attachedLine, composeSignals, deskName, fenced, GROUP_WINDOW_MS, headerOf, introOf, MAX_GROUP_LENGTH, MAX_GROUP_SIGNALS, makeMark, } from "./runner/message.js";
|
|
11
|
+
export { ownRunnerModules } from "./runner/modules.js";
|
|
12
|
+
export { createSpawn } from "./runner/process.js";
|
|
13
|
+
export { cutShown, cutShownEnd, formsOf, MAX_CUT_WINDOW, redactorOf, WITHHELD, } from "./runner/redact.js";
|
|
14
|
+
export { createRegistry, createRunnerModules, } from "./runner/registry.js";
|
|
15
|
+
export { AUTOSAVE_MESSAGE, BATCH_MS, COOL_DOWN_MS, createRunner, HEARTBEAT_MS, HOLD_MS, MAX_COOL_DOWN_MS, MAX_HOLD_MS, } from "./runner/runner.js";
|
|
16
|
+
export { SLACK_APP_TOKEN, slack, slackWakeOf } from "./runner/slack.js";
|
|
17
|
+
export { SYSTEMD_UNIT, systemdUnit, systemdUser } from "./runner/systemd-user.js";
|
|
18
|
+
export { KEPT_LOGS, logKeeper, MAX_LOG_BYTES, TASK_NAME, taskDefinition, taskNameOf, taskScheduler, taskScript, } from "./runner/task-scheduler.js";
|
|
19
|
+
export { errorsShown, KEEPER_VARIABLE, MAX_ERRORS_SHOWN, plainCut, plainCutEnd, } from "./runner/types.js";
|
|
20
|
+
//# sourceMappingURL=runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,4FAA4F;AAC5F,yEAAyE;AAEzE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,qBA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