@songsid/agend 2.3.0-beta.2 → 2.3.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/README.zh-TW.md +7 -1
- package/dist/agent-cli-instructions.md +9 -2
- package/dist/agent-cli.js +63 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +4 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-file-read.d.ts +4 -1
- package/dist/agent-file-read.js +189 -16
- package/dist/agent-file-read.js.map +1 -1
- package/dist/agent-whats-new.d.ts +11 -0
- package/dist/agent-whats-new.js +29 -5
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/auth-api.d.ts +30 -1
- package/dist/auth-api.js +45 -13
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/authority-state.d.ts +38 -0
- package/dist/authority/authority-state.js +114 -0
- package/dist/authority/authority-state.js.map +1 -0
- package/dist/authority/session-authorizations.d.ts +43 -0
- package/dist/authority/session-authorizations.js +102 -0
- package/dist/authority/session-authorizations.js.map +1 -0
- package/dist/authority/web-authority.d.ts +120 -0
- package/dist/authority/web-authority.js +157 -0
- package/dist/authority/web-authority.js.map +1 -0
- package/dist/backend/claude-code.d.ts +2 -2
- package/dist/backend/claude-code.js +18 -8
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex-metadata.d.ts +8 -0
- package/dist/backend/codex-metadata.js +74 -17
- package/dist/backend/codex-metadata.js.map +1 -1
- package/dist/backend/codex.js +15 -2
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +2 -0
- package/dist/backend/credential-profile.js +2 -0
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/types.d.ts +6 -0
- package/dist/backend/types.js +15 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +120 -0
- package/dist/backend-availability.js +396 -0
- package/dist/backend-availability.js.map +1 -0
- package/dist/backend-command.d.ts +23 -3
- package/dist/backend-command.js +25 -4
- package/dist/backend-command.js.map +1 -1
- package/dist/bug-report-cli.d.ts +30 -0
- package/dist/bug-report-cli.js +138 -0
- package/dist/bug-report-cli.js.map +1 -0
- package/dist/bug-report.d.ts +47 -0
- package/dist/bug-report.js +136 -0
- package/dist/bug-report.js.map +1 -0
- package/dist/bundled-skills.d.ts +14 -0
- package/dist/bundled-skills.js +29 -0
- package/dist/bundled-skills.js.map +1 -0
- package/dist/cache-ledger.d.ts +16 -3
- package/dist/cache-ledger.js +33 -13
- package/dist/cache-ledger.js.map +1 -1
- package/dist/cache-service.d.ts +55 -3
- package/dist/cache-service.js +152 -16
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/adapters/discord-client-retirement.d.ts +5 -0
- package/dist/channel/adapters/discord-client-retirement.js +57 -0
- package/dist/channel/adapters/discord-client-retirement.js.map +1 -0
- package/dist/channel/adapters/discord.d.ts +9 -0
- package/dist/channel/adapters/discord.js +49 -4
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/mcp-tools.js +22 -11
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/types.d.ts +6 -0
- package/dist/classic-channel-manager.d.ts +10 -5
- package/dist/classic-channel-manager.js +12 -9
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli.js +224 -111
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.d.ts +6 -0
- package/dist/config-validator.js +129 -3
- package/dist/config-validator.js.map +1 -1
- package/dist/config.d.ts +13 -1
- package/dist/config.js +14 -5
- package/dist/config.js.map +1 -1
- package/dist/cross-instance-notice.d.ts +7 -0
- package/dist/cross-instance-notice.js +10 -0
- package/dist/cross-instance-notice.js.map +1 -1
- package/dist/daemon.d.ts +24 -1
- package/dist/daemon.js +151 -19
- package/dist/daemon.js.map +1 -1
- package/dist/decision-list.d.ts +25 -0
- package/dist/decision-list.js +30 -0
- package/dist/decision-list.js.map +1 -0
- package/dist/delivery-outbox.d.ts +10 -0
- package/dist/delivery-outbox.js +17 -1
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/diagnostic-redaction.d.ts +10 -0
- package/dist/diagnostic-redaction.js +167 -0
- package/dist/diagnostic-redaction.js.map +1 -0
- package/dist/fleet-context.d.ts +10 -0
- package/dist/fleet-manager.d.ts +505 -15
- package/dist/fleet-manager.js +1870 -204
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-process-handlers.d.ts +18 -0
- package/dist/fleet-process-handlers.js +69 -0
- package/dist/fleet-process-handlers.js.map +1 -0
- package/dist/fleet-traffic.d.ts +74 -0
- package/dist/fleet-traffic.js +196 -0
- package/dist/fleet-traffic.js.map +1 -0
- package/dist/general-knowledge/skills/bug-report/SKILL.md +31 -0
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +17 -6
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +6 -1
- package/dist/general-knowledge/skills/fleet-config/SKILL.md +2 -0
- package/dist/general-knowledge/skills/multi-channel/SKILL.md +3 -2
- package/dist/general-knowledge/skills/persona-emoji/SKILL.md +1 -1
- package/dist/general-knowledge/skills/scheduling/SKILL.md +4 -0
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +190 -47
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +545 -0
- package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
- package/dist/human-delivery-receipts.d.ts +24 -1
- package/dist/human-delivery-receipts.js +64 -11
- package/dist/human-delivery-receipts.js.map +1 -1
- package/dist/instance-config-impact.js +7 -1
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +10 -1
- package/dist/instance-lifecycle.js +79 -18
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instance-names.d.ts +4 -0
- package/dist/instance-names.js +12 -0
- package/dist/instance-names.js.map +1 -0
- package/dist/instructions.d.ts +12 -1
- package/dist/instructions.js +13 -2
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +173 -12
- package/dist/locale.js.map +1 -1
- package/dist/log-steps.d.ts +1 -0
- package/dist/log-steps.js +15 -0
- package/dist/log-steps.js.map +1 -1
- package/dist/login-controller.d.ts +45 -0
- package/dist/login-controller.js +101 -5
- package/dist/login-controller.js.map +1 -1
- package/dist/ls-attach-resolve.d.ts +96 -0
- package/dist/ls-attach-resolve.js +180 -0
- package/dist/ls-attach-resolve.js.map +1 -0
- package/dist/ls-rows.d.ts +12 -0
- package/dist/ls-rows.js +82 -3
- package/dist/ls-rows.js.map +1 -1
- package/dist/memory-hogs.d.ts +27 -0
- package/dist/memory-hogs.js +124 -0
- package/dist/memory-hogs.js.map +1 -0
- package/dist/needs-you.d.ts +10 -0
- package/dist/needs-you.js +2 -1
- package/dist/needs-you.js.map +1 -1
- package/dist/outbound-handlers.d.ts +11 -0
- package/dist/outbound-handlers.js +139 -11
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +200 -4
- package/dist/outbound-schemas.js +124 -11
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/public-web-gateway.js +17 -4
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/public-web-link.d.ts +9 -0
- package/dist/public-web-link.js +8 -0
- package/dist/public-web-link.js.map +1 -1
- package/dist/quickstart-api.d.ts +19 -1
- package/dist/quickstart-api.js +94 -4
- package/dist/quickstart-api.js.map +1 -1
- package/dist/reply-buttons-controller.d.ts +4 -0
- package/dist/reply-buttons-controller.js +2 -2
- package/dist/reply-buttons-controller.js.map +1 -1
- package/dist/restart-progress.d.ts +80 -1
- package/dist/restart-progress.js +306 -21
- package/dist/restart-progress.js.map +1 -1
- package/dist/rollout-index.d.ts +5 -0
- package/dist/rollout-index.js +26 -5
- package/dist/rollout-index.js.map +1 -1
- package/dist/scheduler/db.d.ts +40 -13
- package/dist/scheduler/db.js +123 -89
- package/dist/scheduler/db.js.map +1 -1
- package/dist/scheduler/task-board-text.d.ts +26 -0
- package/dist/scheduler/task-board-text.js +135 -0
- package/dist/scheduler/task-board-text.js.map +1 -0
- package/dist/scheduler/task-board.d.ts +650 -0
- package/dist/scheduler/task-board.js +1938 -0
- package/dist/scheduler/task-board.js.map +1 -0
- package/dist/scheduler/types.d.ts +6 -1
- package/dist/search/search-docs.d.ts +58 -0
- package/dist/search/search-docs.js +63 -0
- package/dist/search/search-docs.js.map +1 -0
- package/dist/search/search-index.d.ts +141 -0
- package/dist/search/search-index.js +440 -0
- package/dist/search/search-index.js.map +1 -0
- package/dist/search/search-store.d.ts +122 -0
- package/dist/search/search-store.js +236 -0
- package/dist/search/search-store.js.map +1 -0
- package/dist/search/search-worker.d.ts +1 -0
- package/dist/search/search-worker.js +163 -0
- package/dist/search/search-worker.js.map +1 -0
- package/dist/service-installer.js +12 -0
- package/dist/service-installer.js.map +1 -1
- package/dist/settings-api.d.ts +23 -0
- package/dist/settings-api.js +164 -3
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +104 -0
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-confirmation.d.ts +3 -1
- package/dist/settings-confirmation.js +2 -0
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.js +34 -3
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +11 -0
- package/dist/settings-http-confirmation.js +10 -0
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/setup-form.d.ts +1 -1
- package/dist/setup-form.js +23 -7
- package/dist/setup-form.js.map +1 -1
- package/dist/spawn-gate.d.ts +1 -0
- package/dist/spawn-gate.js +13 -3
- package/dist/spawn-gate.js.map +1 -1
- package/dist/task-board-tool.d.ts +25 -0
- package/dist/task-board-tool.js +154 -0
- package/dist/task-board-tool.js.map +1 -0
- package/dist/task-board-waker.d.ts +44 -0
- package/dist/task-board-waker.js +128 -0
- package/dist/task-board-waker.js.map +1 -0
- package/dist/tmux-exec-helper.d.ts +94 -0
- package/dist/tmux-exec-helper.js +407 -0
- package/dist/tmux-exec-helper.js.map +1 -0
- package/dist/tmux-manager.d.ts +5 -0
- package/dist/tmux-manager.js +42 -11
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tool-permissions.d.ts +0 -7
- package/dist/tool-permissions.js +44 -5
- package/dist/tool-permissions.js.map +1 -1
- package/dist/topic-commands.d.ts +17 -1
- package/dist/topic-commands.js +45 -19
- package/dist/topic-commands.js.map +1 -1
- package/dist/tunnel/cloudflared.js +37 -2
- package/dist/tunnel/cloudflared.js.map +1 -1
- package/dist/tunnel/types.d.ts +3 -1
- package/dist/tunnel/types.js.map +1 -1
- package/dist/types.d.ts +63 -1
- package/dist/ui/app-effects.js +90 -32
- package/dist/ui/backend-signin.js +297 -0
- package/dist/ui/chat-ambient.js +307 -0
- package/dist/ui/chat-effect-posters.js +8 -8
- package/dist/ui/chat-effects.js +110 -15
- package/dist/ui/chat-msg-actions.js +176 -0
- package/dist/ui/chat-render.js +21 -3
- package/dist/ui/chat-store.js +64 -12
- package/dist/ui/chat-strings.js +85 -8
- package/dist/ui/chat-thread.js +204 -21
- package/dist/ui/effect-trial-controller.js +13 -8
- package/dist/ui/effect-trial-panel.js +19 -16
- package/dist/ui/effects-waker.js +70 -0
- package/dist/ui/fleet-canvas-layout.js +117 -0
- package/dist/ui/fleet-canvas.js +555 -0
- package/dist/ui/fleet-org.js +27 -12
- package/dist/ui/fleet-route-scene.js +207 -0
- package/dist/ui/fleet-route-worker.js +21 -0
- package/dist/ui/fleet-route.js +88 -0
- package/dist/ui/fleet-task-card.js +436 -0
- package/dist/ui/fleet-task-common.js +448 -0
- package/dist/ui/fleet-tasks.js +535 -0
- package/dist/ui/fleet-traffic.js +359 -0
- package/dist/ui/fleet-usage.js +435 -0
- package/dist/ui/panel-chat.js +264 -66
- package/dist/ui/panel-details.js +2 -1
- package/dist/ui/panel-fleet.js +65 -83
- package/dist/ui/panel-needs.js +4 -2
- package/dist/ui/panel-settings.js +56 -11
- package/dist/ui/preview.js +3 -2
- package/dist/ui/search-dialog.js +349 -0
- package/dist/ui/settings-appearance.js +44 -19
- package/dist/ui/settings-apply.js +3 -3
- package/dist/ui/settings-catalog.js +92 -0
- package/dist/ui/settings-confirm.js +7 -2
- package/dist/ui/settings-dialogs.js +40 -12
- package/dist/ui/settings-effects.js +4 -3
- package/dist/ui/settings-guests.js +117 -0
- package/dist/ui/settings-learn.js +25 -0
- package/dist/ui/settings-model.js +15 -6
- package/dist/ui/settings-mods.js +23 -9
- package/dist/ui/settings-owner-effects.js +15 -13
- package/dist/ui/settings-strings.js +122 -42
- package/dist/ui/settings-web-authority.js +91 -0
- package/dist/ui/shared/agend-auth.js +1 -1
- package/dist/ui/shared/app-i18n.js +11 -2
- package/dist/ui/shared/app-prefs.js +17 -4
- package/dist/ui/shared/app-route.js +19 -1
- package/dist/ui/shared/app-session.js +2 -0
- package/dist/ui/shared/app-shell.js +174 -30
- package/dist/ui/shared/app-store.js +26 -1
- package/dist/ui/shared/app-stream.js +5 -1
- package/dist/ui/shared/app-themes.js +140 -7
- package/dist/ui/shared/app.css +705 -20
- package/dist/ui/shared/app.js +26 -15
- package/dist/ui/shared/card-strings.js +8 -0
- package/dist/ui/shared/effect-app-runtime.js +68 -19
- package/dist/ui/shared/effect-chat-runtime.js +16 -3
- package/dist/ui/shared/effect-frame.js +26 -7
- package/dist/ui/shared/effect-geometry.js +24 -9
- package/dist/ui/shared/effect-owner-source.js +8 -1
- package/dist/ui/shared/effect-policy.js +21 -7
- package/dist/ui/shared/effect-profiler.js +31 -9
- package/dist/ui/shared/effect-registry.js +97 -50
- package/dist/ui/shared/effect-stock-snapshot.js +9 -0
- package/dist/ui/shared/effect-stock-trust.js +62 -10
- package/dist/ui/shared/effect-trial-shadow.js +62 -0
- package/dist/ui/shared/effect-trial-source.js +1 -1
- package/dist/ui/shared/effect-trial-stage.js +54 -31
- package/dist/ui/shared/effect-trial.css +40 -0
- package/dist/ui/shared/fx-motion.js +67 -0
- package/dist/ui/shared/identity-card.js +100 -11
- package/dist/ui/shared/identity-color.js +14 -10
- package/dist/ui/shared/instance-nav.js +179 -23
- package/dist/ui/shared/owner-css.js +30 -1
- package/dist/ui/shared/panel-view.js +24 -4
- package/dist/ui/shared/tokens.css +9 -3
- package/dist/ui/shared/ui-icons.js +2 -0
- package/dist/ui/shared/ui-menu.js +20 -7
- package/dist/ui/shared/ui-toast.js +16 -3
- package/dist/ui/shared/usage-dialog.js +34 -3
- package/dist/ui/shared/view-strings.js +72 -0
- package/dist/ui/shared/web-authorize.js +198 -0
- package/dist/ui/web-terminal/terminal.css +4 -4
- package/dist/ui/web-terminal/terminal.html +1 -1
- package/dist/update-launch.d.ts +9 -0
- package/dist/update-launch.js +38 -12
- package/dist/update-launch.js.map +1 -1
- package/dist/usage/format-rich.js +6 -3
- package/dist/usage/format-rich.js.map +1 -1
- package/dist/usage/i18n-keys.d.ts +1 -1
- package/dist/usage/i18n-keys.js +2 -1
- package/dist/usage/i18n-keys.js.map +1 -1
- package/dist/usage/i18n.d.ts +13 -1
- package/dist/usage/i18n.js +29 -0
- package/dist/usage/i18n.js.map +1 -1
- package/dist/usage/providers.d.ts +81 -2
- package/dist/usage/providers.js +240 -38
- package/dist/usage/providers.js.map +1 -1
- package/dist/usage/usage-api.d.ts +5 -1
- package/dist/usage/usage-api.js +184 -58
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/usage-report.d.ts +158 -0
- package/dist/usage-report.js +226 -0
- package/dist/usage-report.js.map +1 -0
- package/dist/usage-rollup.d.ts +51 -0
- package/dist/usage-rollup.js +168 -0
- package/dist/usage-rollup.js.map +1 -0
- package/dist/user-systemd.d.ts +24 -0
- package/dist/user-systemd.js +75 -0
- package/dist/user-systemd.js.map +1 -0
- package/dist/view-api.d.ts +39 -0
- package/dist/view-api.js +69 -6
- package/dist/view-api.js.map +1 -1
- package/dist/web-ambient.d.ts +72 -0
- package/dist/web-ambient.js +161 -0
- package/dist/web-ambient.js.map +1 -0
- package/dist/web-api.d.ts +98 -14
- package/dist/web-api.js +1027 -83
- package/dist/web-api.js.map +1 -1
- package/dist/web-appearance-policy.d.ts +4 -6
- package/dist/web-appearance-policy.js +5 -12
- package/dist/web-appearance-policy.js.map +1 -1
- package/dist/web-appearance-tools.d.ts +3 -0
- package/dist/web-appearance-tools.js +22 -3
- package/dist/web-appearance-tools.js.map +1 -1
- package/dist/web-appearance-view.d.ts +27 -2
- package/dist/web-appearance-view.js +129 -14
- package/dist/web-appearance-view.js.map +1 -1
- package/dist/web-appearance.d.ts +17 -3
- package/dist/web-appearance.js +85 -8
- package/dist/web-appearance.js.map +1 -1
- package/dist/web-asset-parts.d.ts +2 -2
- package/dist/web-asset-parts.js +3 -3
- package/dist/web-asset-parts.js.map +1 -1
- package/dist/web-auth.js +3 -1
- package/dist/web-auth.js.map +1 -1
- package/dist/web-backend-login.d.ts +130 -0
- package/dist/web-backend-login.js +225 -0
- package/dist/web-backend-login.js.map +1 -0
- package/dist/web-card.d.ts +14 -0
- package/dist/web-card.js +40 -6
- package/dist/web-card.js.map +1 -1
- package/dist/web-channel-echo.d.ts +7 -1
- package/dist/web-channel-echo.js +6 -2
- package/dist/web-channel-echo.js.map +1 -1
- package/dist/web-chat-history.d.ts +83 -0
- package/dist/web-chat-history.js +137 -5
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-commands.d.ts +6 -1
- package/dist/web-commands.js +1 -1
- package/dist/web-commands.js.map +1 -1
- package/dist/web-effect-bootstrap.d.ts +12 -0
- package/dist/web-effect-bootstrap.js +49 -0
- package/dist/web-effect-bootstrap.js.map +1 -0
- package/dist/web-effect-bundle.js +46 -1
- package/dist/web-effect-bundle.js.map +1 -1
- package/dist/web-effect-playback.d.ts +30 -0
- package/dist/web-effect-playback.js +71 -0
- package/dist/web-effect-playback.js.map +1 -0
- package/dist/web-effect-profiles.d.ts +4 -4
- package/dist/web-effect-service.d.ts +11 -4
- package/dist/web-effect-service.js +25 -4
- package/dist/web-effect-service.js.map +1 -1
- package/dist/web-effect-tools.d.ts +1 -0
- package/dist/web-effect-tools.js +4 -4
- package/dist/web-effect-tools.js.map +1 -1
- package/dist/web-effect-trials.d.ts +2 -2
- package/dist/web-effect-trials.js +3 -3
- package/dist/web-effect-trials.js.map +1 -1
- package/dist/web-effect-upload.js +1 -1
- package/dist/web-effect-upload.js.map +1 -1
- package/dist/web-effect-worker.d.ts +1 -1
- package/dist/web-effect-worker.js +2 -2
- package/dist/web-effect-worker.js.map +1 -1
- package/dist/web-effect.d.ts +1 -1
- package/dist/web-guest-access.d.ts +126 -0
- package/dist/web-guest-access.js +238 -0
- package/dist/web-guest-access.js.map +1 -0
- package/dist/web-guest-rooms.d.ts +82 -0
- package/dist/web-guest-rooms.js +135 -0
- package/dist/web-guest-rooms.js.map +1 -0
- package/dist/web-host-guard.d.ts +11 -0
- package/dist/web-host-guard.js +11 -0
- package/dist/web-host-guard.js.map +1 -1
- package/dist/web-identity-color.d.ts +1 -1
- package/dist/web-identity-color.js +2 -2
- package/dist/web-identity-color.js.map +1 -1
- package/dist/web-identity-palette.d.ts +1 -1
- package/dist/web-identity-palette.js +2 -2
- package/dist/web-identity-palette.js.map +1 -1
- package/dist/web-image-meta.d.ts +13 -0
- package/dist/web-image-meta.js +62 -0
- package/dist/web-image-meta.js.map +1 -1
- package/dist/web-libavoid.d.ts +14 -0
- package/dist/web-libavoid.js +46 -0
- package/dist/web-libavoid.js.map +1 -0
- package/dist/web-login.d.ts +47 -0
- package/dist/web-login.js +115 -0
- package/dist/web-login.js.map +1 -1
- package/dist/web-mod-agent.d.ts +1 -1
- package/dist/web-mod-agent.js +7 -5
- package/dist/web-mod-agent.js.map +1 -1
- package/dist/web-mod-bundle.d.ts +9 -1
- package/dist/web-mod-bundle.js +62 -3
- package/dist/web-mod-bundle.js.map +1 -1
- package/dist/web-mod-export.d.ts +9 -0
- package/dist/web-mod-export.js +21 -0
- package/dist/web-mod-export.js.map +1 -1
- package/dist/web-mod-store.d.ts +7 -1
- package/dist/web-mod-store.js +19 -6
- package/dist/web-mod-store.js.map +1 -1
- package/dist/web-owner-css-store.d.ts +44 -1
- package/dist/web-owner-css-store.js +70 -9
- package/dist/web-owner-css-store.js.map +1 -1
- package/dist/web-prefs.d.ts +14 -0
- package/dist/web-prefs.js +37 -4
- package/dist/web-prefs.js.map +1 -1
- package/dist/web-preview.d.ts +6 -2
- package/dist/web-preview.js +4 -2
- package/dist/web-preview.js.map +1 -1
- package/dist/web-returning-device.d.ts +41 -0
- package/dist/web-returning-device.js +57 -5
- package/dist/web-returning-device.js.map +1 -1
- package/dist/web-session-authorization.d.ts +132 -0
- package/dist/web-session-authorization.js +193 -0
- package/dist/web-session-authorization.js.map +1 -0
- package/dist/web-session.d.ts +70 -10
- package/dist/web-session.js +137 -22
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +49 -2
- package/dist/web-settings-patch.js +145 -1
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/web-settings-tools.d.ts +94 -0
- package/dist/web-settings-tools.js +301 -0
- package/dist/web-settings-tools.js.map +1 -0
- package/dist/web-shell-routes.d.ts +1 -1
- package/dist/web-shell-routes.js +1 -1
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/web-terminal-http.js +15 -2
- package/dist/web-terminal-http.js.map +1 -1
- package/dist/web-theme-store.d.ts +39 -0
- package/dist/web-theme-store.js +122 -11
- package/dist/web-theme-store.js.map +1 -1
- package/dist/web-theme.d.ts +31 -0
- package/dist/web-theme.js +99 -2
- package/dist/web-theme.js.map +1 -1
- package/dist/web-upload.d.ts +13 -0
- package/dist/web-upload.js +39 -3
- package/dist/web-upload.js.map +1 -1
- package/dist/windows-shortcuts.d.ts +78 -0
- package/dist/windows-shortcuts.js +203 -0
- package/dist/windows-shortcuts.js.map +1 -0
- package/dist/workflow-templates/default.md +4 -1
- package/dist/yaml-shared-nodes.d.ts +25 -0
- package/dist/yaml-shared-nodes.js +185 -0
- package/dist/yaml-shared-nodes.js.map +1 -0
- package/launcher/agend-install.cjs +553 -0
- package/launcher/install-admission.cjs +4 -39
- package/launcher/postinstall.cjs +14 -12
- package/package.json +4 -2
- package/scripts/preinstall-guard.cjs +2 -5
- package/templates/windows-shortcuts.ps1 +181 -0
- package/launcher/old-updater-note.cjs +0 -48
|
@@ -0,0 +1,650 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The task board: projects → main tasks (M-n) → sub tasks (S-n) on the fleet's `tasks` table, and the rules every
|
|
3
|
+
* write goes through — who may move what, the reasons a move needs, dependencies, the person's confirmation gate and
|
|
4
|
+
* optimistic versions — plus the comments, progress log and history each card keeps. Design:
|
|
5
|
+
* docs/design/task-board.md (ported from taskhall, 任務會所).
|
|
6
|
+
*
|
|
7
|
+
* Storage is additive: new columns on `tasks` (nullable or with defaults) and new tables. A release without the board
|
|
8
|
+
* still reads and writes the same rows — it ignores the new columns — and the startup backfill gives anything it
|
|
9
|
+
* created a card number, a kind and a place in the order again (see migrate()).
|
|
10
|
+
*
|
|
11
|
+
* Who acts is an {@link Actor}: the signed-in person on the dashboard, an instance through its tools, or the board
|
|
12
|
+
* itself (derived moves). Only a person confirms or rejects work waiting for review, clears "needs review", moves a
|
|
13
|
+
* card to another project, or reopens a finished card; an instance moves its own cards along.
|
|
14
|
+
*/
|
|
15
|
+
import type Database from "better-sqlite3";
|
|
16
|
+
export declare const CARD_STATUSES: readonly ["open", "claimed", "blocked", "review", "done", "cancelled"];
|
|
17
|
+
export type CardStatus = (typeof CARD_STATUSES)[number];
|
|
18
|
+
/** Statuses still on the board (not finished). */
|
|
19
|
+
export declare const LIVE_CARD_STATUSES: CardStatus[];
|
|
20
|
+
export declare const CARD_PRIORITIES: readonly ["low", "normal", "high", "urgent"];
|
|
21
|
+
export type CardPriority = (typeof CARD_PRIORITIES)[number];
|
|
22
|
+
export declare const CARD_SIZES: readonly ["S", "M", "L"];
|
|
23
|
+
export type CardSize = (typeof CARD_SIZES)[number];
|
|
24
|
+
export type CardKind = "main" | "sub";
|
|
25
|
+
/** `script`: a dashboard request on the header token (the CLI, a script) — held to the rules an instance is held to. */
|
|
26
|
+
export interface Actor {
|
|
27
|
+
kind: "person" | "instance" | "script" | "system";
|
|
28
|
+
name: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const SYSTEM_ACTOR: Actor;
|
|
31
|
+
/** Field limits in characters (code points). Small on purpose: an agent reads the whole card. */
|
|
32
|
+
export declare const CARD_LIMITS: {
|
|
33
|
+
readonly title: 100;
|
|
34
|
+
readonly goal: 300;
|
|
35
|
+
readonly scope: 600;
|
|
36
|
+
readonly acceptanceItems: 10;
|
|
37
|
+
readonly acceptanceText: 150;
|
|
38
|
+
readonly context: 1000;
|
|
39
|
+
readonly state: 500;
|
|
40
|
+
readonly stateLines: 5;
|
|
41
|
+
readonly blockedReason: 400;
|
|
42
|
+
readonly result: 1000;
|
|
43
|
+
readonly reason: 400;
|
|
44
|
+
readonly log: 300;
|
|
45
|
+
readonly comment: 4000;
|
|
46
|
+
readonly projectName: 60;
|
|
47
|
+
readonly projectDescription: 300;
|
|
48
|
+
readonly assignee: 128;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* A refusal. `code` is its kind (and the HTTP status the dashboard gets); `key` and `args`, when set, name the same
|
|
52
|
+
* sentence for the dashboard to say in its own language (tasks.err.<key> with {0}, {1}… = args). Refusals only an
|
|
53
|
+
* instance can meet keep English only: they reach the instance, which reads the message.
|
|
54
|
+
*/
|
|
55
|
+
export declare class TaskBoardError extends Error {
|
|
56
|
+
readonly code: "not_found" | "invalid" | "too_long" | "forbidden" | "conflict" | "blocked_by_deps" | "needs_review" | "one_at_a_time";
|
|
57
|
+
readonly key?: string | undefined;
|
|
58
|
+
readonly args: Array<string | number>;
|
|
59
|
+
constructor(code: "not_found" | "invalid" | "too_long" | "forbidden" | "conflict" | "blocked_by_deps" | "needs_review" | "one_at_a_time", message: string, key?: string | undefined, args?: Array<string | number>);
|
|
60
|
+
}
|
|
61
|
+
/** A note after a write: English for the agents, a key and its values for the dashboard (tasks.note.<key>). */
|
|
62
|
+
export interface Note {
|
|
63
|
+
text: string;
|
|
64
|
+
key: string;
|
|
65
|
+
args: Array<string | number>;
|
|
66
|
+
}
|
|
67
|
+
export interface Project {
|
|
68
|
+
id: number;
|
|
69
|
+
name: string;
|
|
70
|
+
description: string;
|
|
71
|
+
archived: boolean;
|
|
72
|
+
sort: number;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
}
|
|
75
|
+
export interface AcceptanceItem {
|
|
76
|
+
text: string;
|
|
77
|
+
done: boolean;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Who handed a card out: the person who opened it on the dashboard, or the instance that opened it for another one (a
|
|
81
|
+
* coordinator such as a lead). A blocked card's question goes to an instance dispatcher first (step 2's wakes); it may
|
|
82
|
+
* answer it on the card and edit the card. Sub tasks take their main task's.
|
|
83
|
+
*/
|
|
84
|
+
export interface Dispatcher {
|
|
85
|
+
kind: "person" | "instance";
|
|
86
|
+
name: string;
|
|
87
|
+
}
|
|
88
|
+
/** What a write sets a dispatcher to: an instance by name, the person writing ({ kind: "person" }), or nobody. */
|
|
89
|
+
export type DispatcherInput = {
|
|
90
|
+
kind: "instance";
|
|
91
|
+
name: string;
|
|
92
|
+
} | {
|
|
93
|
+
kind: "person";
|
|
94
|
+
} | null;
|
|
95
|
+
/** A row as the rules see it: `uuid` is the key, `code` (M-3, S-34) the number people and agents use. */
|
|
96
|
+
export interface Card {
|
|
97
|
+
uuid: string;
|
|
98
|
+
code: string;
|
|
99
|
+
kind: CardKind;
|
|
100
|
+
projectId: number | null;
|
|
101
|
+
/** Sub tasks: the main task's uuid. */
|
|
102
|
+
parent: string | null;
|
|
103
|
+
title: string;
|
|
104
|
+
status: CardStatus;
|
|
105
|
+
assignee: string | null;
|
|
106
|
+
dispatcher: Dispatcher | null;
|
|
107
|
+
priority: CardPriority;
|
|
108
|
+
size: CardSize | null;
|
|
109
|
+
needsReview: boolean;
|
|
110
|
+
/** uuids of the cards to finish first (what the fleet's `task` tool has always stored). */
|
|
111
|
+
deps: string[];
|
|
112
|
+
goal: string;
|
|
113
|
+
scope: string;
|
|
114
|
+
acceptance: AcceptanceItem[];
|
|
115
|
+
context: string;
|
|
116
|
+
state: string;
|
|
117
|
+
blockedReason: string;
|
|
118
|
+
result: string;
|
|
119
|
+
sort: number;
|
|
120
|
+
createdBy: string;
|
|
121
|
+
version: number;
|
|
122
|
+
createdAt: string;
|
|
123
|
+
updatedAt: string;
|
|
124
|
+
startedAt: string | null;
|
|
125
|
+
submittedAt: string | null;
|
|
126
|
+
doneAt: string | null;
|
|
127
|
+
/** Highest entry id the assignee has acted after; later comments by others are new to it. */
|
|
128
|
+
seenEntryId: number;
|
|
129
|
+
}
|
|
130
|
+
export interface Progress {
|
|
131
|
+
total: number;
|
|
132
|
+
open: number;
|
|
133
|
+
claimed: number;
|
|
134
|
+
blocked: number;
|
|
135
|
+
review: number;
|
|
136
|
+
done: number;
|
|
137
|
+
}
|
|
138
|
+
/** A project's numbers on Home and in its header (projectStats). */
|
|
139
|
+
export interface ProjectStats {
|
|
140
|
+
mains: number;
|
|
141
|
+
units: Progress;
|
|
142
|
+
percent: number;
|
|
143
|
+
waiting: number;
|
|
144
|
+
blocked: number;
|
|
145
|
+
lastActivity: string | null;
|
|
146
|
+
}
|
|
147
|
+
/** A card as the dashboard draws it: references by card number. */
|
|
148
|
+
export interface CardView {
|
|
149
|
+
id: string;
|
|
150
|
+
uuid: string;
|
|
151
|
+
kind: CardKind;
|
|
152
|
+
projectId: number | null;
|
|
153
|
+
parentId: string | null;
|
|
154
|
+
title: string;
|
|
155
|
+
status: CardStatus;
|
|
156
|
+
assignee: string | null;
|
|
157
|
+
dispatcher: Dispatcher | null;
|
|
158
|
+
priority: CardPriority;
|
|
159
|
+
size: CardSize | null;
|
|
160
|
+
needsReview: boolean;
|
|
161
|
+
dependsOn: string[];
|
|
162
|
+
goal: string;
|
|
163
|
+
scope: string;
|
|
164
|
+
acceptance: AcceptanceItem[];
|
|
165
|
+
context: string;
|
|
166
|
+
state: string;
|
|
167
|
+
blockedReason: string;
|
|
168
|
+
result: string;
|
|
169
|
+
sort: number;
|
|
170
|
+
createdBy: string;
|
|
171
|
+
version: number;
|
|
172
|
+
createdAt: string;
|
|
173
|
+
updatedAt: string;
|
|
174
|
+
startedAt: string | null;
|
|
175
|
+
submittedAt: string | null;
|
|
176
|
+
doneAt: string | null;
|
|
177
|
+
/** A main task's sub-task progress (total 0 when it has none); null for a sub task. */
|
|
178
|
+
progress: Progress | null;
|
|
179
|
+
unmetDeps: string[];
|
|
180
|
+
commentCount: number;
|
|
181
|
+
/** Comments by others its assignee has not acted on yet. */
|
|
182
|
+
newCommentCount: number;
|
|
183
|
+
lastComment: {
|
|
184
|
+
author: string;
|
|
185
|
+
authorKind: Actor["kind"];
|
|
186
|
+
at: string;
|
|
187
|
+
} | null;
|
|
188
|
+
}
|
|
189
|
+
export type EntryKind = "log" | "comment" | "reject" | "approve";
|
|
190
|
+
export interface Entry {
|
|
191
|
+
id: number;
|
|
192
|
+
cardId: string;
|
|
193
|
+
kind: EntryKind;
|
|
194
|
+
author: string;
|
|
195
|
+
authorKind: Actor["kind"];
|
|
196
|
+
text: string;
|
|
197
|
+
at: string;
|
|
198
|
+
}
|
|
199
|
+
export type CardEventType = "created" | "updated" | "moved" | "assigned" | "commented" | "logged" | "reordered";
|
|
200
|
+
export interface CardEvent {
|
|
201
|
+
id: number;
|
|
202
|
+
at: string;
|
|
203
|
+
actor: string;
|
|
204
|
+
actorKind: Actor["kind"];
|
|
205
|
+
cardId: string;
|
|
206
|
+
type: CardEventType;
|
|
207
|
+
data: Record<string, unknown>;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Why an instance hears about one of its cards (step 2's wakes, task-board-waker.ts): someone else assigned it,
|
|
211
|
+
* started it, sent it back, answered its blocked question, commented, or finished the last card it waited for; the
|
|
212
|
+
* person confirmed it (its assignee and its dispatcher hear); it is blocked and the instance handed it out (decide);
|
|
213
|
+
* a main task went to the person by itself before its owner wrapped it up (wrap_up); or someone else cancelled it — a
|
|
214
|
+
* main task's cancel takes its unfinished sub tasks down with it, and their assignees hear (cancelled).
|
|
215
|
+
*/
|
|
216
|
+
export type WakeReason = "assigned" | "start" | "sent_back" | "answered" | "comment" | "ready" | "decide" | "approved" | "wrap_up" | "cancelled";
|
|
217
|
+
/** One card's news for one instance from one committed write. Never sent to a page (it carries titles and text). */
|
|
218
|
+
export interface Wake {
|
|
219
|
+
instance: string;
|
|
220
|
+
uuid: string;
|
|
221
|
+
code: string;
|
|
222
|
+
title: string;
|
|
223
|
+
/** The main task's number, for a sub task. */
|
|
224
|
+
parent: string | null;
|
|
225
|
+
reasons: WakeReason[];
|
|
226
|
+
/** Who did each (the last one, when several did the same). */
|
|
227
|
+
by: Partial<Record<WakeReason, string>>;
|
|
228
|
+
/** The words that came with a reason: a send-back's, an answer's, a comment's, a question's, a confirmation note. */
|
|
229
|
+
texts: Partial<Record<WakeReason, string>>;
|
|
230
|
+
}
|
|
231
|
+
/** What one committed write changed, for live views: the card numbers touched (none for a project change). */
|
|
232
|
+
export interface BoardChange {
|
|
233
|
+
/** The board's revision after this write (revision()). */
|
|
234
|
+
rev: number;
|
|
235
|
+
ids: string[];
|
|
236
|
+
actors: string[];
|
|
237
|
+
projects: boolean;
|
|
238
|
+
/** Whom to wake about what (the fleet's waker); a page is sent the rest. */
|
|
239
|
+
wakes: Wake[];
|
|
240
|
+
}
|
|
241
|
+
export interface CardDetail {
|
|
242
|
+
card: CardView;
|
|
243
|
+
parent: {
|
|
244
|
+
id: string;
|
|
245
|
+
title: string;
|
|
246
|
+
status: CardStatus;
|
|
247
|
+
} | null;
|
|
248
|
+
children: CardView[];
|
|
249
|
+
comments: Entry[];
|
|
250
|
+
logs: Entry[];
|
|
251
|
+
history: CardEvent[];
|
|
252
|
+
}
|
|
253
|
+
export interface NewCard {
|
|
254
|
+
/** Defaults to "sub" when a parent is given, else "main". */
|
|
255
|
+
kind?: CardKind;
|
|
256
|
+
/** Main tasks: a project id or name; none puts the card under "No project". */
|
|
257
|
+
project?: string | number | null;
|
|
258
|
+
/** Sub tasks: the main task's number, or "#n" for the n-th card of the same batch. */
|
|
259
|
+
parent?: string | null;
|
|
260
|
+
title: string;
|
|
261
|
+
goal?: string;
|
|
262
|
+
scope?: string;
|
|
263
|
+
acceptance?: string[];
|
|
264
|
+
context?: string;
|
|
265
|
+
size?: CardSize | null;
|
|
266
|
+
priority?: CardPriority;
|
|
267
|
+
/** Card numbers, or "#n" for the n-th card of the same batch. */
|
|
268
|
+
dependsOn?: string[];
|
|
269
|
+
assignee?: string | null;
|
|
270
|
+
/**
|
|
271
|
+
* Who handed it out. By default: the main task's for a sub task; else the person opening it on the dashboard, or the
|
|
272
|
+
* instance opening it for another one.
|
|
273
|
+
*/
|
|
274
|
+
dispatcher?: DispatcherInput;
|
|
275
|
+
/** Defaults to true for a main task and false for a sub task. */
|
|
276
|
+
needsReview?: boolean;
|
|
277
|
+
}
|
|
278
|
+
export interface CardPatch {
|
|
279
|
+
version?: number;
|
|
280
|
+
title?: string;
|
|
281
|
+
goal?: string;
|
|
282
|
+
scope?: string;
|
|
283
|
+
context?: string;
|
|
284
|
+
state?: string;
|
|
285
|
+
result?: string;
|
|
286
|
+
blockedReason?: string;
|
|
287
|
+
size?: CardSize | null;
|
|
288
|
+
priority?: CardPriority;
|
|
289
|
+
assignee?: string | null;
|
|
290
|
+
dispatcher?: DispatcherInput;
|
|
291
|
+
needsReview?: boolean;
|
|
292
|
+
dependsOn?: string[];
|
|
293
|
+
acceptance?: string[];
|
|
294
|
+
addAcceptance?: string[];
|
|
295
|
+
check?: number[];
|
|
296
|
+
uncheck?: number[];
|
|
297
|
+
/** Main tasks only, a person only: move to another project (null: no project); sub tasks follow. */
|
|
298
|
+
projectId?: number | null;
|
|
299
|
+
log?: string;
|
|
300
|
+
comment?: string;
|
|
301
|
+
}
|
|
302
|
+
export interface MoveOptions {
|
|
303
|
+
reason?: string;
|
|
304
|
+
result?: string;
|
|
305
|
+
comment?: string;
|
|
306
|
+
version?: number;
|
|
307
|
+
}
|
|
308
|
+
export interface MutationResult {
|
|
309
|
+
card: Card;
|
|
310
|
+
/** English, for the agents. */
|
|
311
|
+
notes: string[];
|
|
312
|
+
/** The same notes for the dashboard to say in its own language. */
|
|
313
|
+
said: Note[];
|
|
314
|
+
}
|
|
315
|
+
export interface MyWork {
|
|
316
|
+
/** Cards it works on itself: sub tasks, and main tasks without sub tasks. */
|
|
317
|
+
doing: Card[];
|
|
318
|
+
blocked: Card[];
|
|
319
|
+
review: Card[];
|
|
320
|
+
ready: Card[];
|
|
321
|
+
/** Cards it could take but for their dependencies, with the card numbers they wait for. */
|
|
322
|
+
waiting: Array<{
|
|
323
|
+
card: Card;
|
|
324
|
+
waitsFor: string[];
|
|
325
|
+
}>;
|
|
326
|
+
newComments: Array<{
|
|
327
|
+
card: Card;
|
|
328
|
+
entries: Entry[];
|
|
329
|
+
}>;
|
|
330
|
+
sentBack: Array<{
|
|
331
|
+
card: Card;
|
|
332
|
+
entry: Entry;
|
|
333
|
+
}>;
|
|
334
|
+
/** Main tasks it coordinates (they have sub tasks). */
|
|
335
|
+
mains: Array<{
|
|
336
|
+
card: Card;
|
|
337
|
+
progress: Progress;
|
|
338
|
+
}>;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* What a read leaves out: the comments, logs and send-backs of these authors (instances kept out of sight, over the
|
|
342
|
+
* public link — #2304 review). Their entries are not counted, named as a card's last comment, or found by search.
|
|
343
|
+
*/
|
|
344
|
+
export interface ReadScope {
|
|
345
|
+
leaveOutAuthors?: readonly string[];
|
|
346
|
+
}
|
|
347
|
+
export interface SearchHit {
|
|
348
|
+
card: Card;
|
|
349
|
+
/** Where the phrase was found, when not in the title. */
|
|
350
|
+
match: {
|
|
351
|
+
field: string;
|
|
352
|
+
text: string;
|
|
353
|
+
} | null;
|
|
354
|
+
}
|
|
355
|
+
/** "m3", "M - 3" → "M-3"; null when it is not a card number. */
|
|
356
|
+
export declare function cardCode(raw: string): string | null;
|
|
357
|
+
/** A card waits for the person's confirmation when it is finished. */
|
|
358
|
+
export declare function requiresReview(card: Pick<Card, "needsReview">): boolean;
|
|
359
|
+
/**
|
|
360
|
+
* What a finished card still lacks for the person's confirmation: unchecked acceptance items, no result. A main task
|
|
361
|
+
* goes to review by itself when its last sub task is done (often a reviewer's), before its owner wrapped it up.
|
|
362
|
+
*/
|
|
363
|
+
export declare function wrapUpGap(card: Pick<Card, "acceptance" | "result">): {
|
|
364
|
+
unchecked: number;
|
|
365
|
+
noResult: boolean;
|
|
366
|
+
} | null;
|
|
367
|
+
export declare class TaskBoard {
|
|
368
|
+
private readonly db;
|
|
369
|
+
private readonly now;
|
|
370
|
+
private listeners;
|
|
371
|
+
private cardLimit;
|
|
372
|
+
private pending;
|
|
373
|
+
private projectsChanged;
|
|
374
|
+
private notes;
|
|
375
|
+
/** The notes of the last write, until a caller of the `task` tool's old actions takes them (takeNotes). */
|
|
376
|
+
private lastNotes;
|
|
377
|
+
private codes;
|
|
378
|
+
constructor(db: Database.Database, now?: () => Date);
|
|
379
|
+
/** Called with what each committed write changed. Returns an unsubscribe function. */
|
|
380
|
+
onChange(listener: (change: BoardChange) => void): () => void;
|
|
381
|
+
/**
|
|
382
|
+
* Adds the board's columns and tables if missing, then backfills rows that have no card number yet (every task from
|
|
383
|
+
* before the board, and any a release without the board created since), drops comments and history whose task is
|
|
384
|
+
* gone, and lets main tasks catch up with their sub tasks. Safe to run on every open.
|
|
385
|
+
*/
|
|
386
|
+
migrate(): void;
|
|
387
|
+
/**
|
|
388
|
+
* Main tasks whose sub tasks moved while nothing derived them (under a release without the board). Read first; the
|
|
389
|
+
* write lock only when one is out of step.
|
|
390
|
+
*/
|
|
391
|
+
reconcile(): void;
|
|
392
|
+
/** The board's revision: it moves with every committed change, so a page reads the board again only when it moved. */
|
|
393
|
+
revision(): number;
|
|
394
|
+
listProjects(includeArchived?: boolean): Project[];
|
|
395
|
+
/** By id, or by name (case-insensitive). */
|
|
396
|
+
getProject(ref: string | number): Project;
|
|
397
|
+
createProject(actor: Actor, input: {
|
|
398
|
+
name: string;
|
|
399
|
+
description?: string;
|
|
400
|
+
}): Project;
|
|
401
|
+
updateProject(actor: Actor, id: number, patch: {
|
|
402
|
+
name?: string;
|
|
403
|
+
description?: string;
|
|
404
|
+
archived?: boolean;
|
|
405
|
+
}): Project;
|
|
406
|
+
private checkProjectName;
|
|
407
|
+
/** A new main task's project: the one asked for (not archived), or none. */
|
|
408
|
+
private projectForMain;
|
|
409
|
+
/** A card by number (M-3), uuid, or a unique uuid prefix of at least 8 hex digits. */
|
|
410
|
+
findCard(ref: string): Card | undefined;
|
|
411
|
+
getCard(ref: string): Card;
|
|
412
|
+
private byUuid;
|
|
413
|
+
/** A uuid's card number, for views and messages ("?" for one that is gone). */
|
|
414
|
+
codeOf(uuid: string): string;
|
|
415
|
+
children(uuid: string): Card[];
|
|
416
|
+
/** Sub tasks that still count (not cancelled). A main task with none is worked on directly. */
|
|
417
|
+
activeSubs(uuid: string): Card[];
|
|
418
|
+
progress(card: Card): Progress;
|
|
419
|
+
/**
|
|
420
|
+
* Dependencies that are not done (a cancelled one still holds its dependents, as the fleet's `task` tool always
|
|
421
|
+
* had it). A sub task also waits for its main task's. A dependency that no longer exists does not hold anything.
|
|
422
|
+
*/
|
|
423
|
+
unmetDeps(card: Card): Card[];
|
|
424
|
+
/**
|
|
425
|
+
* What the board shows: live cards, and finished ones from the last `days` — done or cancelled main tasks, done sub
|
|
426
|
+
* tasks — or every done main task with `allDone` (the Done column's "All"). Older finished work stays in the
|
|
427
|
+
* database and in the projects' numbers (projectStats), not in every board read.
|
|
428
|
+
*/
|
|
429
|
+
boardCards(days?: number, allDone?: boolean): Card[];
|
|
430
|
+
/**
|
|
431
|
+
* Each project's numbers (by id; "none" for No project) over all its cards, finished ones included: main tasks,
|
|
432
|
+
* work units (a main task's sub tasks, or one unit for a main task without them; a done main task counts all its
|
|
433
|
+
* units done), cards waiting for the person and blocked, and the last change. One pass over the table.
|
|
434
|
+
*/
|
|
435
|
+
projectStats(): Record<string, ProjectStats>;
|
|
436
|
+
view(card: Card, scope?: ReadScope): CardView;
|
|
437
|
+
/** ` AND <column> NOT IN (…)` for a scope's left-out authors, with its values (empty when none). */
|
|
438
|
+
private notBy;
|
|
439
|
+
/**
|
|
440
|
+
* Many cards as the dashboard draws them, from one read of what they need — every task's number, status,
|
|
441
|
+
* dependencies and parent, sub-task counts, comment counts, the last comment and the unseen ones — instead of a few
|
|
442
|
+
* queries per card: a board read stays a handful of statements however many cards it has (it runs on the fleet's
|
|
443
|
+
* event loop). Same answers as progress(), unmetDeps() and newComments() card by card.
|
|
444
|
+
*/
|
|
445
|
+
views(cards: Card[], scope?: ReadScope): CardView[];
|
|
446
|
+
detail(ref: string, scope?: ReadScope): CardDetail;
|
|
447
|
+
/** The latest `limit` entries of a card, oldest first. */
|
|
448
|
+
entries(uuid: string, kinds: EntryKind[], limit?: number): Entry[];
|
|
449
|
+
/** Comments and rejections by others that the assignee has not acted on yet. */
|
|
450
|
+
newComments(card: Card): Entry[];
|
|
451
|
+
events(uuid: string, limit?: number): CardEvent[];
|
|
452
|
+
private toEntry;
|
|
453
|
+
/**
|
|
454
|
+
* Cards matching a phrase in their number, title, text fields, checklist or comments; live cards first, newest
|
|
455
|
+
* first. `match` says where it matched when it is not the title.
|
|
456
|
+
*/
|
|
457
|
+
search(query: string, limit?: number, scope?: ReadScope): SearchHit[];
|
|
458
|
+
private matchOf;
|
|
459
|
+
/**
|
|
460
|
+
* Cards by project (an id or name; null: No project), main task (its sub tasks), assignee and status (live ones by
|
|
461
|
+
* default), main tasks first, then by status and priority; at most `limit` (default 50), with how many matched.
|
|
462
|
+
*/
|
|
463
|
+
listCards(filter: {
|
|
464
|
+
project?: string | number | null;
|
|
465
|
+
parent?: string;
|
|
466
|
+
assignee?: string;
|
|
467
|
+
status?: CardStatus[];
|
|
468
|
+
limit?: number;
|
|
469
|
+
}): {
|
|
470
|
+
cards: Card[];
|
|
471
|
+
total: number;
|
|
472
|
+
};
|
|
473
|
+
/** On the board's terms: in a project, a sub task, one with sub tasks, or one that waits for the person. */
|
|
474
|
+
isOnBoard(card: Card): boolean;
|
|
475
|
+
/**
|
|
476
|
+
* An instance's work, for `task mine`: what it is doing, what is blocked or waits for the person, what it can start
|
|
477
|
+
* (its own open cards, and the unassigned sub tasks of main tasks it coordinates, dependencies done) and what waits
|
|
478
|
+
* on dependencies; comments it has not seen and work sent back; the main tasks it coordinates and how far along.
|
|
479
|
+
*/
|
|
480
|
+
myWork(name: string): MyWork;
|
|
481
|
+
createCards(actor: Actor, input: {
|
|
482
|
+
project?: string | number | null;
|
|
483
|
+
parent?: string | null;
|
|
484
|
+
cards: NewCard[];
|
|
485
|
+
}): {
|
|
486
|
+
cards: Card[];
|
|
487
|
+
notes: string[];
|
|
488
|
+
said: Note[];
|
|
489
|
+
};
|
|
490
|
+
updateCard(actor: Actor, ref: string, patch: CardPatch): MutationResult;
|
|
491
|
+
moveCard(actor: Actor, ref: string, to: CardStatus, options?: MoveOptions): MutationResult & {
|
|
492
|
+
from: CardStatus;
|
|
493
|
+
};
|
|
494
|
+
/**
|
|
495
|
+
* Place a card between two neighbours of its column (`after` comes right before it, `before` right after it).
|
|
496
|
+
* Order is presentation only, so the version does not change.
|
|
497
|
+
*/
|
|
498
|
+
reorder(actor: Actor, ref: string, after: string | null, before: string | null): Card;
|
|
499
|
+
/**
|
|
500
|
+
* A task as the `task` tool has always opened it: a main task under no project, assigned only when asked, with no
|
|
501
|
+
* review gate unless a person later sets one. Dependencies are stored as given (ids are not checked).
|
|
502
|
+
*/
|
|
503
|
+
legacyCreate(actor: Actor, params: {
|
|
504
|
+
title: string;
|
|
505
|
+
description?: string;
|
|
506
|
+
priority?: CardPriority;
|
|
507
|
+
assignee?: string;
|
|
508
|
+
depends_on?: string[];
|
|
509
|
+
}): Card;
|
|
510
|
+
/**
|
|
511
|
+
* Whether the board's rules hold for the `task` tool on this card: it is in a project, is a sub task, has sub tasks,
|
|
512
|
+
* or waits for the person. The tool's own tasks outside all of that keep the tool's old leniency (anyone may move
|
|
513
|
+
* them), and a person is never held to an instance's rules.
|
|
514
|
+
*/
|
|
515
|
+
private heldToBoardRules;
|
|
516
|
+
/**
|
|
517
|
+
* `task claim`: an open task, every dependency done (a missing one counts as done). On the board, an instance claims
|
|
518
|
+
* as it would there: an unassigned card or its own, its main task's dependencies done too.
|
|
519
|
+
*/
|
|
520
|
+
legacyClaim(actor: Actor, uuid: string, assignee: string): Card;
|
|
521
|
+
/**
|
|
522
|
+
* `task done`: from open or claimed. A card that needs the person's confirmation goes to review instead, so no
|
|
523
|
+
* instance can finish one alone. On the board, an instance finishes as it would there: its own card, with a result
|
|
524
|
+
* (an open one is claimed first, under the same rules).
|
|
525
|
+
*/
|
|
526
|
+
legacyComplete(actor: Actor, uuid: string, result?: string): Card;
|
|
527
|
+
/**
|
|
528
|
+
* `task update`: status, assignee, result, priority. The review gate holds for everyone but a person: "done" on a
|
|
529
|
+
* card that needs confirmation becomes "review", and only a person takes a card out of review to done. On the
|
|
530
|
+
* board, an instance is held to the board's rules for each change (its own cards; moves as on the board).
|
|
531
|
+
*/
|
|
532
|
+
legacyUpdate(actor: Actor, uuid: string, params: {
|
|
533
|
+
status?: CardStatus;
|
|
534
|
+
assignee?: string;
|
|
535
|
+
result?: string;
|
|
536
|
+
priority?: CardPriority;
|
|
537
|
+
}): Card;
|
|
538
|
+
/**
|
|
539
|
+
* Cards moved by hand: sub tasks, and main tasks that have no sub tasks. `comment` is the move's own comment (a
|
|
540
|
+
* dispatcher's answer); `finishing`: a claim on the way to done (the `task` tool's done of an open card).
|
|
541
|
+
*/
|
|
542
|
+
private checkManualMove;
|
|
543
|
+
/**
|
|
544
|
+
* A main task with sub tasks follows them. By hand: block and unblock it, resubmit it after a rejection (its owner),
|
|
545
|
+
* and for a person approve, reject, reopen, cancel and restore it.
|
|
546
|
+
*/
|
|
547
|
+
private checkDerivedMove;
|
|
548
|
+
/** What leaving "in progress" as finished (review or done) needs. */
|
|
549
|
+
private checkFinish;
|
|
550
|
+
private canEdit;
|
|
551
|
+
/** Its dispatcher answering a blocked card says what was decided: the assignee reads it. */
|
|
552
|
+
private checkAnswer;
|
|
553
|
+
/**
|
|
554
|
+
* An instance works on one card of the board at a time — or as many as its `board_cards_at_once` allows: starting
|
|
555
|
+
* another (claiming, resuming a blocked one, taking one back from review) at its limit is refused. Blocked cards,
|
|
556
|
+
* main tasks that follow their sub tasks and cards it opened for itself do not count; the `task` tool's own tasks and
|
|
557
|
+
* cards it opened for itself are not limited, nor is a person.
|
|
558
|
+
*/
|
|
559
|
+
private checkOneAtATime;
|
|
560
|
+
/** The cards that keep `name` from starting `card` now: those it has in progress, once they reach its limit. */
|
|
561
|
+
private busyWith;
|
|
562
|
+
/** The fleet's `board_cards_at_once` for an instance: a whole number of at least 1, else 1. */
|
|
563
|
+
private limitOf;
|
|
564
|
+
/** For `mine`: the cards that count toward an instance's limit, when there are more than it allows (a person moved them). */
|
|
565
|
+
overLimit(name: string): {
|
|
566
|
+
count: number;
|
|
567
|
+
limit: number;
|
|
568
|
+
} | null;
|
|
569
|
+
/** How many handed-out cards each instance may have in progress (the fleet reads its config; default 1). */
|
|
570
|
+
setCardLimit(limit: (name: string) => number): void;
|
|
571
|
+
/** The board cards an instance works on itself right now (main tasks that follow their sub tasks aside). */
|
|
572
|
+
inProgress(name: string): Card[];
|
|
573
|
+
private personOnly;
|
|
574
|
+
/** Status bookkeeping shared by every move, then what the move sets off. */
|
|
575
|
+
private applyMove;
|
|
576
|
+
/**
|
|
577
|
+
* A main task with sub tasks follows them: open until something starts, in progress while they run, and when they
|
|
578
|
+
* are all done, review (or done, for one that skips the person's confirmation). Only a person moves it from review
|
|
579
|
+
* to done. A blocked or cancelled main task is left alone, and so is one without sub tasks (it is moved by hand).
|
|
580
|
+
*/
|
|
581
|
+
/** What a main task's sub tasks make its status (its own, when it is blocked, cancelled or has none). */
|
|
582
|
+
private derivedStatus;
|
|
583
|
+
private deriveMain;
|
|
584
|
+
/** Cancelling a main task cancels its unfinished sub tasks (the event remembers where each was). */
|
|
585
|
+
private cancelSubs;
|
|
586
|
+
/** Restoring a main task brings back the sub tasks its cancellation took down, where they were. */
|
|
587
|
+
private restoreSubs;
|
|
588
|
+
/** `card` is done: the open cards that waited for it and wait for nothing else now can start. */
|
|
589
|
+
private noteUnblocked;
|
|
590
|
+
/** Every card's place again 1, 2, 3… in the same order (reorder() calls it when two neighbours touch). */
|
|
591
|
+
private renumber;
|
|
592
|
+
/** Several of the board's writes as one: all of them or none (the `task` tool's update with fields and a status). */
|
|
593
|
+
atomically<T>(fn: () => T): T;
|
|
594
|
+
/** This write's notes so far, both ways. */
|
|
595
|
+
private spoken;
|
|
596
|
+
/** A note of this write: English for agents, its key and values for the dashboard. */
|
|
597
|
+
private say;
|
|
598
|
+
/** The last write's notes (English), once: the `task` tool's old actions return them with their answer. */
|
|
599
|
+
takeNotes(): string[];
|
|
600
|
+
/**
|
|
601
|
+
* Whom this write wakes, read from its events once it is all written (still inside it): an instance hears only about
|
|
602
|
+
* what someone else did to a card that is its own — or that it handed out (a blocked question, a confirmation). The
|
|
603
|
+
* board's own catch-up wakes nobody, except that a card finishing — by hand or by itself — readies the cards that
|
|
604
|
+
* waited only for it. wakeHolds() then drops what no longer stands.
|
|
605
|
+
*/
|
|
606
|
+
private settleWakes;
|
|
607
|
+
/** A finished card readies the open cards that waited only for it (a sub task also waits for its main task's). */
|
|
608
|
+
private wakeReady;
|
|
609
|
+
/**
|
|
610
|
+
* What of a wake still stands now (at the end of its write, and again when the fleet sends it): a finished card is
|
|
611
|
+
* news only as a confirmation; a card that is no longer the instance's is not; a question only while the card is
|
|
612
|
+
* blocked and the instance still handed it out; a wrap-up only while it waits unfinished; and an assignment or a
|
|
613
|
+
* comment only once the card can start (its "ready" wakes it then). What asks the instance to act holds only while
|
|
614
|
+
* it still can (#2303 review): "ready" while the card is open with nothing left to wait for, "start" and "answered"
|
|
615
|
+
* while it is in progress, "sent back" while it is back with the instance; a comment only while its assignee has not
|
|
616
|
+
* read it (its own write since showed it, as the `task` tool's answer). null when nothing is left.
|
|
617
|
+
*/
|
|
618
|
+
wakeHolds(wake: Wake): Wake | null;
|
|
619
|
+
/**
|
|
620
|
+
* One write, all or nothing (BEGIN IMMEDIATE: the CLI and the fleet share this file). Listeners hear about it after
|
|
621
|
+
* it commits; a nested call joins the outer write.
|
|
622
|
+
*/
|
|
623
|
+
private tx;
|
|
624
|
+
private nowIso;
|
|
625
|
+
private nextCode;
|
|
626
|
+
private nextSort;
|
|
627
|
+
/** A card number, uuid, or "#n" for the n-th card of the same batch → that card's uuid. */
|
|
628
|
+
private resolveRef;
|
|
629
|
+
/** A sub task's parent: a main task that is not cancelled. */
|
|
630
|
+
private resolveParent;
|
|
631
|
+
/** Valid, unique dependency uuids. Cycles are checked once the change is written (assertNoCycle). */
|
|
632
|
+
private checkDeps;
|
|
633
|
+
/** What a card waits on: its dependencies; a sub task also its main task's; a main task its sub tasks. */
|
|
634
|
+
private waitsOn;
|
|
635
|
+
/** Refuse a dependency loop reachable from `start`, counting the implicit main/sub waits. */
|
|
636
|
+
private assertNoCycle;
|
|
637
|
+
private checkVersion;
|
|
638
|
+
private assign;
|
|
639
|
+
/**
|
|
640
|
+
* Any write by the assignee counts as having seen the comments so far, so the unseen ones go in its reply first;
|
|
641
|
+
* otherwise a comment posted mid-task would be acknowledged without being read.
|
|
642
|
+
*/
|
|
643
|
+
private surfaceComments;
|
|
644
|
+
private markSeen;
|
|
645
|
+
private entry;
|
|
646
|
+
private event;
|
|
647
|
+
private insert;
|
|
648
|
+
/** Empty text is stored as NULL in the columns the `task` tool has always had (description, result, depends_on). */
|
|
649
|
+
private save;
|
|
650
|
+
}
|