@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
|
@@ -18,6 +18,7 @@ import type { RestEvent, RestMe, RestPlugin, RestProject } from "../schemas.js";
|
|
|
18
18
|
import { CONSOLE_TOKENS } from "../tokens.js";
|
|
19
19
|
import { wordsForFailure } from "../use-action.js";
|
|
20
20
|
import { CONSOLE_LANGUAGES, languagesFirst } from "../vocabulary.js";
|
|
21
|
+
import { pluginEventsReaderOf } from "./plugin-events.js";
|
|
21
22
|
import { cx, Spinner } from "./ui.js";
|
|
22
23
|
import { weekStartOf } from "./workspace.js";
|
|
23
24
|
|
|
@@ -29,8 +30,6 @@ import { weekStartOf } from "./workspace.js";
|
|
|
29
30
|
|
|
30
31
|
/** How tall a page's frame may grow: far above any page, below what would break the layout. */
|
|
31
32
|
const MAX_PAGE_HEIGHT = 20_000;
|
|
32
|
-
/** How often the plugin's own events are asked for while a frame listens for them. */
|
|
33
|
-
const EVENTS_POLL_MS = 5_000;
|
|
34
33
|
/**
|
|
35
34
|
* How long after a frame has loaded, or said it is ready, the spinner stands in its place when
|
|
36
35
|
* the page has not grown: a page that draws nothing to measure, or says no height.
|
|
@@ -246,8 +245,9 @@ export function PluginFrame(props: PluginFrameProps) {
|
|
|
246
245
|
const drawWait = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);
|
|
247
246
|
const emptyHeight = useRef<number | undefined>(undefined);
|
|
248
247
|
const subscribed = useRef<Set<BridgeEventKind>>(new Set());
|
|
248
|
+
/** Whether the frame listens for the plugin's own events, as it said with `subscribe`. */
|
|
249
|
+
const [hearing, setHearing] = useState(false);
|
|
249
250
|
const ready = useRef(false);
|
|
250
|
-
const lastPluginEvent = useRef(0);
|
|
251
251
|
const seenEvents = useRef(0);
|
|
252
252
|
const path = props.path ?? "";
|
|
253
253
|
const scoped = useMemo(() => client.plugin(plugin.key), [client, plugin.key]);
|
|
@@ -266,6 +266,7 @@ export function PluginFrame(props: PluginFrameProps) {
|
|
|
266
266
|
setDrawing(true);
|
|
267
267
|
emptyHeight.current = undefined;
|
|
268
268
|
clearTimeout(drawWait.current);
|
|
269
|
+
setHearing(false);
|
|
269
270
|
}, [src]);
|
|
270
271
|
useEffect(() => () => clearTimeout(drawWait.current), []);
|
|
271
272
|
const drawn = useCallback(() => {
|
|
@@ -395,6 +396,7 @@ export function PluginFrame(props: PluginFrameProps) {
|
|
|
395
396
|
return;
|
|
396
397
|
case "subscribe":
|
|
397
398
|
subscribed.current = new Set(message.kinds);
|
|
399
|
+
setHearing(message.kinds.includes("plugin"));
|
|
398
400
|
return;
|
|
399
401
|
default:
|
|
400
402
|
return;
|
|
@@ -449,43 +451,17 @@ export function PluginFrame(props: PluginFrameProps) {
|
|
|
449
451
|
}
|
|
450
452
|
}, [events, plugin.key, post]);
|
|
451
453
|
|
|
452
|
-
// The plugin's own events,
|
|
454
|
+
// The plugin's own events, while the frame listens for them: heard through the one reader of
|
|
455
|
+
// the plugin's events on the page, which its other frames share, from where the stream stood
|
|
456
|
+
// when the first of them listened.
|
|
453
457
|
useEffect(() => {
|
|
454
|
-
if (
|
|
458
|
+
if (!hearing) {
|
|
455
459
|
return;
|
|
456
460
|
}
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
scoped
|
|
462
|
-
.pluginEvents({ after: lastPluginEvent.current, limit: 50 })
|
|
463
|
-
.then((page) => {
|
|
464
|
-
for (const event of page.items) {
|
|
465
|
-
lastPluginEvent.current = Math.max(lastPluginEvent.current, event.id);
|
|
466
|
-
post({ v: PLUGIN_BRIDGE_VERSION, t: "event", kind: "plugin", data: event });
|
|
467
|
-
}
|
|
468
|
-
})
|
|
469
|
-
.catch(() => undefined);
|
|
470
|
-
}, EVENTS_POLL_MS);
|
|
471
|
-
return () => clearInterval(timer);
|
|
472
|
-
}, [scoped, post]);
|
|
473
|
-
|
|
474
|
-
// What the plugin emitted before the frame came is not replayed: the stream is read from now.
|
|
475
|
-
useEffect(() => {
|
|
476
|
-
scoped
|
|
477
|
-
.pluginEvents({ after: 0, limit: 1 })
|
|
478
|
-
.then((page) => {
|
|
479
|
-
if (page.more || page.items.length > 0) {
|
|
480
|
-
// The newest number is past the first page; a frame hears of what comes after it listens.
|
|
481
|
-
return scoped.pluginEvents({ after: 0, limit: 200 }).then((all) => {
|
|
482
|
-
lastPluginEvent.current = all.items.at(-1)?.id ?? 0;
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
return undefined;
|
|
486
|
-
})
|
|
487
|
-
.catch(() => undefined);
|
|
488
|
-
}, [scoped]);
|
|
461
|
+
return pluginEventsReaderOf(client, plugin.key).listen((event) => {
|
|
462
|
+
post({ v: PLUGIN_BRIDGE_VERSION, t: "event", kind: "plugin", data: event });
|
|
463
|
+
});
|
|
464
|
+
}, [hearing, client, plugin.key, post]);
|
|
489
465
|
|
|
490
466
|
if (unavailable) {
|
|
491
467
|
return <p className="sc-plugin-frame-unavailable">{words.frameUnavailable}</p>;
|
|
@@ -494,7 +470,7 @@ export function PluginFrame(props: PluginFrameProps) {
|
|
|
494
470
|
<div
|
|
495
471
|
className={cx(
|
|
496
472
|
"sc-plugin-frame-box",
|
|
497
|
-
isWidget
|
|
473
|
+
!isWidget && "sc-plugin-frame-box-page",
|
|
498
474
|
drawing && "sc-plugin-frame-loading",
|
|
499
475
|
)}
|
|
500
476
|
style={isWidget ? undefined : { height: `${height}px` }}
|
|
@@ -12,6 +12,7 @@ import type {
|
|
|
12
12
|
RestPluginEnableInput,
|
|
13
13
|
RestPluginGrant,
|
|
14
14
|
RestPluginGrantInput,
|
|
15
|
+
RestPluginJob,
|
|
15
16
|
RestPluginSetting,
|
|
16
17
|
RestProject,
|
|
17
18
|
RestTeam,
|
|
@@ -122,6 +123,10 @@ export function PluginSettingsList(props: PluginSettingsListProps) {
|
|
|
122
123
|
</span>
|
|
123
124
|
</a>
|
|
124
125
|
<span className="sc-task-row-meta">
|
|
126
|
+
{/* A plugin that runs with something wrong in it, a job that keeps failing say (ADR-0128). */}
|
|
127
|
+
{plugin.problems.length > 0 && plugin.state !== "failed" && (
|
|
128
|
+
<Badge tone="danger">{settings.hasProblems}</Badge>
|
|
129
|
+
)}
|
|
125
130
|
<Badge tone={STATE_TONES[plugin.state]}>
|
|
126
131
|
{words.vocabulary.pluginState[plugin.state] ?? plugin.state}
|
|
127
132
|
</Badge>
|
|
@@ -194,6 +199,32 @@ function TickRow(props: {
|
|
|
194
199
|
);
|
|
195
200
|
}
|
|
196
201
|
|
|
202
|
+
/**
|
|
203
|
+
* How a job stands, in a line (ADR-0128): when it last ran and how that went, since when it has
|
|
204
|
+
* failed where it failed more than once running, and when it runs next.
|
|
205
|
+
*/
|
|
206
|
+
function jobStanding(
|
|
207
|
+
settings: Messages["plugins"]["settings"],
|
|
208
|
+
job: RestPluginJob,
|
|
209
|
+
language: string,
|
|
210
|
+
): string {
|
|
211
|
+
const parts: string[] = [];
|
|
212
|
+
if (job.lastRunAt === null || job.lastOutcome === null) {
|
|
213
|
+
parts.push(settings.jobNotRun);
|
|
214
|
+
} else if (job.lastOutcome === "ok") {
|
|
215
|
+
parts.push(settings.jobRan(formatInstant(job.lastRunAt, language)));
|
|
216
|
+
} else {
|
|
217
|
+
parts.push(settings.jobFailed(formatInstant(job.lastRunAt, language)));
|
|
218
|
+
if (job.failedSince !== null && job.failedSince !== job.lastRunAt) {
|
|
219
|
+
parts.push(settings.jobFailingSince(formatInstant(job.failedSince, language)));
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
if (job.nextAt !== null) {
|
|
223
|
+
parts.push(settings.jobNext(formatInstant(job.nextAt, language)));
|
|
224
|
+
}
|
|
225
|
+
return parts.join(" \u00b7 ");
|
|
226
|
+
}
|
|
227
|
+
|
|
197
228
|
/** What the plugin is on and holds, a row each; nothing where there is nothing to say yet. */
|
|
198
229
|
function Overview(props: {
|
|
199
230
|
readonly detail: RestPluginDetail;
|
|
@@ -311,6 +342,26 @@ function Overview(props: {
|
|
|
311
342
|
),
|
|
312
343
|
});
|
|
313
344
|
}
|
|
345
|
+
// The jobs as the scheduler keeps them (ADR-0128); a console before 0.5.1 names none.
|
|
346
|
+
if (detail.jobs !== undefined && detail.jobs.length > 0) {
|
|
347
|
+
rows.push({
|
|
348
|
+
key: "jobs",
|
|
349
|
+
name: settings.jobs,
|
|
350
|
+
value: (
|
|
351
|
+
<ul className="sc-plugin-held">
|
|
352
|
+
{detail.jobs.map((job) => (
|
|
353
|
+
<li key={job.name}>
|
|
354
|
+
<span className="sc-plugin-tick-name">
|
|
355
|
+
<code>{job.name}</code>
|
|
356
|
+
{job.lastOutcome === "failed" && <Badge tone="danger">{settings.jobFailing}</Badge>}
|
|
357
|
+
</span>
|
|
358
|
+
<span className="sc-plugin-tick-under"> {jobStanding(settings, job, language)}</span>
|
|
359
|
+
</li>
|
|
360
|
+
))}
|
|
361
|
+
</ul>
|
|
362
|
+
),
|
|
363
|
+
});
|
|
364
|
+
}
|
|
314
365
|
if (detail.operations.length > 0) {
|
|
315
366
|
rows.push({
|
|
316
367
|
key: "operations",
|
|
@@ -728,7 +779,7 @@ function SettingsForm(props: {
|
|
|
728
779
|
const rows = (shown: readonly RestPluginSetting[]) =>
|
|
729
780
|
shown.map((setting) => (
|
|
730
781
|
<div key={setting.key} className="sc-settings-row">
|
|
731
|
-
<div
|
|
782
|
+
<div>
|
|
732
783
|
<label className="sc-settings-label" htmlFor={`${prefix}-${setting.key}`}>
|
|
733
784
|
{pluginWord(setting.name, props.language)}
|
|
734
785
|
{setting.required && " *"}
|
|
@@ -790,7 +841,11 @@ function SettingsForm(props: {
|
|
|
790
841
|
*/
|
|
791
842
|
function secretStanding(
|
|
792
843
|
settings: Messages["plugins"]["settings"],
|
|
793
|
-
setting:
|
|
844
|
+
setting: {
|
|
845
|
+
readonly setAt: string | null;
|
|
846
|
+
readonly source?: string | null | undefined;
|
|
847
|
+
readonly expiresAt?: string | null | undefined;
|
|
848
|
+
},
|
|
794
849
|
language: string,
|
|
795
850
|
): string {
|
|
796
851
|
const when = formatInstant(setting.setAt ?? "", language);
|
|
@@ -831,7 +886,7 @@ function SecretRow(props: {
|
|
|
831
886
|
const { setting } = props;
|
|
832
887
|
return (
|
|
833
888
|
<div className="sc-settings-row">
|
|
834
|
-
<div
|
|
889
|
+
<div>
|
|
835
890
|
<label className="sc-settings-label" htmlFor={id}>
|
|
836
891
|
{pluginWord(setting.name, props.language)}
|
|
837
892
|
{setting.required && " *"}
|
|
@@ -879,6 +934,96 @@ function SecretRow(props: {
|
|
|
879
934
|
);
|
|
880
935
|
}
|
|
881
936
|
|
|
937
|
+
/**
|
|
938
|
+
* A secret kept per key (ADR-0111): how many keys hold a value of how many it may keep, each key
|
|
939
|
+
* on a line with how its value stands and the way to remove it, and a key and a value to set one
|
|
940
|
+
* by hand. The values are never shown; the keys are no secret.
|
|
941
|
+
*/
|
|
942
|
+
function KeyedSecretRow(props: {
|
|
943
|
+
readonly setting: RestPluginSetting;
|
|
944
|
+
readonly language: string;
|
|
945
|
+
readonly busy: boolean;
|
|
946
|
+
readonly onSet: (key: string, value: string) => void;
|
|
947
|
+
readonly onRemove: (key: string) => void;
|
|
948
|
+
}) {
|
|
949
|
+
const words = useWords();
|
|
950
|
+
const settings = words.plugins.settings;
|
|
951
|
+
const [key, setKey] = useState("");
|
|
952
|
+
const [value, setValue] = useState("");
|
|
953
|
+
const id = useId();
|
|
954
|
+
const { setting } = props;
|
|
955
|
+
const keys = setting.keys ?? [];
|
|
956
|
+
const max = setting.keyed?.max ?? keys.length;
|
|
957
|
+
return (
|
|
958
|
+
<div className="sc-settings-row">
|
|
959
|
+
<div>
|
|
960
|
+
<label className="sc-settings-label" htmlFor={id}>
|
|
961
|
+
{pluginWord(setting.name, props.language)}
|
|
962
|
+
</label>
|
|
963
|
+
<p className="sc-settings-hint">
|
|
964
|
+
{keys.length === 0 ? settings.secretKeysNone : settings.secretKeys(keys.length, max)}
|
|
965
|
+
</p>
|
|
966
|
+
{setting.hosts !== null && setting.hosts !== undefined && setting.hosts.length > 0 && (
|
|
967
|
+
<p className="sc-settings-hint">{settings.secretHosts(setting.hosts.join(", "))}</p>
|
|
968
|
+
)}
|
|
969
|
+
{setting.description !== null && (
|
|
970
|
+
<p className="sc-settings-hint">{pluginWord(setting.description, props.language)}</p>
|
|
971
|
+
)}
|
|
972
|
+
</div>
|
|
973
|
+
<div className="sc-settings-control">
|
|
974
|
+
{keys.map((kept) => (
|
|
975
|
+
<div key={kept.key} className="sc-plugin-line">
|
|
976
|
+
<div>
|
|
977
|
+
<code className="sc-project-key">{kept.key}</code>
|
|
978
|
+
<p className="sc-settings-hint">{secretStanding(settings, kept, props.language)}</p>
|
|
979
|
+
</div>
|
|
980
|
+
<Button
|
|
981
|
+
variant="ghost"
|
|
982
|
+
size="sm"
|
|
983
|
+
disabled={props.busy}
|
|
984
|
+
aria-label={settings.secretKeyRemove(kept.key)}
|
|
985
|
+
onClick={() => props.onRemove(kept.key)}
|
|
986
|
+
>
|
|
987
|
+
{words.common.remove}
|
|
988
|
+
</Button>
|
|
989
|
+
</div>
|
|
990
|
+
))}
|
|
991
|
+
<input
|
|
992
|
+
id={id}
|
|
993
|
+
className="sc-input"
|
|
994
|
+
autoComplete="off"
|
|
995
|
+
spellCheck={false}
|
|
996
|
+
placeholder={settings.secretKeyNew}
|
|
997
|
+
aria-label={settings.secretKeyNew}
|
|
998
|
+
value={key}
|
|
999
|
+
onChange={(event) => setKey(event.target.value)}
|
|
1000
|
+
/>
|
|
1001
|
+
<div className="sc-plugin-line">
|
|
1002
|
+
<input
|
|
1003
|
+
className="sc-input sc-plugin-line-input"
|
|
1004
|
+
type="password"
|
|
1005
|
+
autoComplete="off"
|
|
1006
|
+
placeholder={settings.secretNew}
|
|
1007
|
+
aria-label={settings.secretNew}
|
|
1008
|
+
value={value}
|
|
1009
|
+
onChange={(event) => setValue(event.target.value)}
|
|
1010
|
+
/>
|
|
1011
|
+
<Button
|
|
1012
|
+
disabled={props.busy || key.trim().length === 0 || value.length === 0}
|
|
1013
|
+
onClick={() => {
|
|
1014
|
+
props.onSet(key.trim(), value);
|
|
1015
|
+
setKey("");
|
|
1016
|
+
setValue("");
|
|
1017
|
+
}}
|
|
1018
|
+
>
|
|
1019
|
+
{words.common.save}
|
|
1020
|
+
</Button>
|
|
1021
|
+
</div>
|
|
1022
|
+
</div>
|
|
1023
|
+
</div>
|
|
1024
|
+
);
|
|
1025
|
+
}
|
|
1026
|
+
|
|
882
1027
|
/**
|
|
883
1028
|
* Enabling: the capabilities the plugin requires, on and not the administrator's to turn off, and
|
|
884
1029
|
* those it can go without, off until chosen, those consented to before on already (ADR-0060); the
|
|
@@ -1323,17 +1468,14 @@ function RoleRow(props: {
|
|
|
1323
1468
|
{description !== "" && <p className="sc-settings-hint">{description}</p>}
|
|
1324
1469
|
</div>
|
|
1325
1470
|
<div>
|
|
1326
|
-
<div className="sc-chips
|
|
1327
|
-
{props.isDefault && <Chip
|
|
1328
|
-
{role.follows === "reports" &&
|
|
1329
|
-
<Chip className="sc-plugin-holder">{settings.whoeverManages}</Chip>
|
|
1330
|
-
)}
|
|
1471
|
+
<div className="sc-chips">
|
|
1472
|
+
{props.isDefault && <Chip>{settings.everyMember}</Chip>}
|
|
1473
|
+
{role.follows === "reports" && <Chip>{settings.whoeverManages}</Chip>}
|
|
1331
1474
|
{grants.map((grant) => {
|
|
1332
1475
|
const holder = holderOf(grant, settings);
|
|
1333
1476
|
return (
|
|
1334
1477
|
<Chip
|
|
1335
1478
|
key={grant.id}
|
|
1336
|
-
className="sc-plugin-holder"
|
|
1337
1479
|
onRemove={() => props.onRevoke(grant.id)}
|
|
1338
1480
|
removeLabel={`${settings.revoke}: ${holder}`}
|
|
1339
1481
|
disabled={props.busy}
|
|
@@ -1511,7 +1653,10 @@ export function PluginSettingsView(props: PluginSettingsViewProps) {
|
|
|
1511
1653
|
<p className="sc-lead">{pluginWord(detail.description, language)}</p>
|
|
1512
1654
|
{error !== undefined && <Callout tone="danger">{error}</Callout>}
|
|
1513
1655
|
{detail.problems.length > 0 && (
|
|
1514
|
-
<Callout
|
|
1656
|
+
<Callout
|
|
1657
|
+
tone="danger"
|
|
1658
|
+
title={detail.state === "failed" ? settings.problems : settings.problemsRunning}
|
|
1659
|
+
>
|
|
1515
1660
|
<ul className="sc-plugin-problems">
|
|
1516
1661
|
{detail.problems.map((problem) => (
|
|
1517
1662
|
<li key={problem}>{problem}</li>
|
|
@@ -1567,16 +1712,27 @@ export function PluginSettingsView(props: PluginSettingsViewProps) {
|
|
|
1567
1712
|
/>
|
|
1568
1713
|
{detail.settings
|
|
1569
1714
|
.filter((setting) => setting.type === "secret")
|
|
1570
|
-
.map((setting) =>
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1715
|
+
.map((setting) =>
|
|
1716
|
+
setting.keyed !== null && setting.keyed !== undefined ? (
|
|
1717
|
+
<KeyedSecretRow
|
|
1718
|
+
key={setting.key}
|
|
1719
|
+
setting={setting}
|
|
1720
|
+
language={language}
|
|
1721
|
+
busy={busy}
|
|
1722
|
+
onSet={(key, value) => change(() => plugin.setSecret(setting.key, value, key))}
|
|
1723
|
+
onRemove={(key) => change(() => plugin.removeSecret(setting.key, key))}
|
|
1724
|
+
/>
|
|
1725
|
+
) : (
|
|
1726
|
+
<SecretRow
|
|
1727
|
+
key={setting.key}
|
|
1728
|
+
setting={setting}
|
|
1729
|
+
language={language}
|
|
1730
|
+
busy={busy}
|
|
1731
|
+
onSet={(value) => change(() => plugin.setSecret(setting.key, value))}
|
|
1732
|
+
onRemove={() => change(() => plugin.removeSecret(setting.key))}
|
|
1733
|
+
/>
|
|
1734
|
+
),
|
|
1735
|
+
)}
|
|
1580
1736
|
</div>
|
|
1581
1737
|
</section>
|
|
1582
1738
|
)}
|
|
@@ -1608,7 +1764,7 @@ export function PluginSettingsView(props: PluginSettingsViewProps) {
|
|
|
1608
1764
|
<h2 className="sc-section-title">{settings.data}</h2>
|
|
1609
1765
|
<div>
|
|
1610
1766
|
<div className="sc-settings-row">
|
|
1611
|
-
<div
|
|
1767
|
+
<div>
|
|
1612
1768
|
<p className="sc-settings-label">{settings.export}</p>
|
|
1613
1769
|
<p className="sc-settings-hint">{settings.exportHint}</p>
|
|
1614
1770
|
</div>
|
|
@@ -1619,7 +1775,7 @@ export function PluginSettingsView(props: PluginSettingsViewProps) {
|
|
|
1619
1775
|
</div>
|
|
1620
1776
|
</div>
|
|
1621
1777
|
<div className="sc-settings-row">
|
|
1622
|
-
<div
|
|
1778
|
+
<div>
|
|
1623
1779
|
<p className="sc-settings-label">{settings.purge}</p>
|
|
1624
1780
|
<p className="sc-settings-hint">{settings.purgeHint}</p>
|
|
1625
1781
|
</div>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { type FormEvent, type ReactNode, useEffect,
|
|
1
|
+
import { type FormEvent, type ReactNode, useEffect, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
COLOR_NAMES,
|
|
4
4
|
type ColorName,
|
|
5
5
|
MAX_PROJECT_DESCRIPTION_LENGTH,
|
|
6
|
+
MAX_PROJECT_ICON_BYTES,
|
|
6
7
|
MAX_PROJECT_KEY_LENGTH,
|
|
7
8
|
MAX_PROJECT_NAME_LENGTH,
|
|
8
9
|
MAX_PROJECT_SYMBOL_LENGTH,
|
|
@@ -25,7 +26,7 @@ import {
|
|
|
25
26
|
import { useWords } from "../i18n/index.js";
|
|
26
27
|
import { Picker } from "./picker.js";
|
|
27
28
|
import { peopleSearch } from "./searches.js";
|
|
28
|
-
import { Badge, Button, cx, PersonChip, personName, Time } from "./ui.js";
|
|
29
|
+
import { Badge, Button, cx, PersonChip, PersonOption, personName, Time } from "./ui.js";
|
|
29
30
|
|
|
30
31
|
/**
|
|
31
32
|
* A project's mark: its symbol on its colour, so that projects tell apart at a glance; its own
|
|
@@ -141,18 +142,34 @@ export function ProjectForm(props: ProjectFormProps) {
|
|
|
141
142
|
const [symbol, setSymbol] = useState(project?.symbol ?? "");
|
|
142
143
|
/** The image for the mark: a file chosen, `null` for none any more, nothing to keep the project's. */
|
|
143
144
|
const [icon, setIcon] = useState<File | null | undefined>(undefined);
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
145
|
+
// The image chosen, as an address the mark can show before it is saved: the file's own bytes,
|
|
146
|
+
// read here. The pages' policy lets an image come from the console or from a `data:` address
|
|
147
|
+
// and from nowhere else, so an address of the browser's own for the file (`blob:`) is refused
|
|
148
|
+
// and the mark would stay its symbol. A file larger than an icon may be is not read: the
|
|
149
|
+
// console refuses it when the form is sent.
|
|
150
|
+
const [chosenSrc, setChosenSrc] = useState<string | undefined>(undefined);
|
|
151
|
+
useEffect(() => {
|
|
152
|
+
setChosenSrc(undefined);
|
|
153
|
+
if (
|
|
154
|
+
!(icon instanceof File) ||
|
|
155
|
+
icon.size > MAX_PROJECT_ICON_BYTES ||
|
|
156
|
+
typeof FileReader === "undefined"
|
|
157
|
+
) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
const reader = new FileReader();
|
|
161
|
+
reader.onload = () => {
|
|
162
|
+
if (typeof reader.result === "string") {
|
|
163
|
+
setChosenSrc(reader.result);
|
|
152
164
|
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
165
|
+
};
|
|
166
|
+
reader.readAsDataURL(icon);
|
|
167
|
+
// Another file chosen, or the form gone, before this one was read: its answer is dropped.
|
|
168
|
+
return () => {
|
|
169
|
+
reader.onload = null;
|
|
170
|
+
reader.abort();
|
|
171
|
+
};
|
|
172
|
+
}, [icon]);
|
|
156
173
|
const kept = icon === undefined ? (project?.icon ?? null) : null;
|
|
157
174
|
/** The mark as it will be, from what is typed and chosen so far. */
|
|
158
175
|
const preview = {
|
|
@@ -471,6 +488,7 @@ export function MemberList(props: MemberListProps) {
|
|
|
471
488
|
search={peopleSearch(candidates)}
|
|
472
489
|
keyOf={(person) => person.id}
|
|
473
490
|
render={(person) => <PersonChip person={person} size="sm" />}
|
|
491
|
+
renderOption={(person) => <PersonOption person={person} />}
|
|
474
492
|
label={members.person}
|
|
475
493
|
placeholder={members.chooseSomeone}
|
|
476
494
|
disabled={props.busy === true}
|
|
@@ -505,7 +523,7 @@ export function MemberList(props: MemberListProps) {
|
|
|
505
523
|
)}
|
|
506
524
|
{props.onAdd !== undefined && props.lookup !== undefined && props.open !== true && (
|
|
507
525
|
<form
|
|
508
|
-
className="sc-form sc-member-form
|
|
526
|
+
className="sc-form sc-member-form"
|
|
509
527
|
aria-label={members.addByLoginAria}
|
|
510
528
|
onSubmit={(event) => {
|
|
511
529
|
event.preventDefault();
|
|
@@ -580,7 +598,7 @@ export function PackTokenForm(props: PackTokenFormProps) {
|
|
|
580
598
|
const ready = typed.length >= 8 && !/\s/.test(typed);
|
|
581
599
|
return (
|
|
582
600
|
<form
|
|
583
|
-
className="sc-form
|
|
601
|
+
className="sc-form"
|
|
584
602
|
aria-label={pack.pasteAria}
|
|
585
603
|
onSubmit={(event: FormEvent) => {
|
|
586
604
|
event.preventDefault();
|