kaizen-agent 1.86.0 → 1.87.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 +1 -1
- package/cli/annotate-proxy.ts +6 -3
- package/cli/build-web.ts +46 -16
- package/cli/dev.ts +67 -0
- package/cli/docs.ts +1 -1
- package/cli/notes.ts +9 -3
- package/cli/ports.ts +121 -0
- package/cli/settings.ts +16 -17
- package/cli/state.ts +15 -29
- package/cli/task-service.ts +79 -17
- package/cli/tasks.ts +2 -2
- package/cli/term-image.ts +18 -0
- package/cli/ui-audit.allow.json +0 -1
- package/cli/ui-audit.ts +12 -12
- package/cli/web.ts +188 -58
- package/package.json +21 -4
- package/skills/kaizen/spec.md +10 -3
- package/tsconfig.json +16 -0
- package/web/README.md +105 -0
- package/web/{annotate.js → annotate/annotate.ts} +51 -50
- package/web/boot/boot.ts +7 -0
- package/web/components/annotate/annotate-bar.tsx +78 -0
- package/web/components/annotate/annotate-panel.tsx +20 -0
- package/web/components/annotate/annotate-settings.tsx +60 -0
- package/web/components/annotate/index.ts +1 -0
- package/web/components/annotate/notes-list.tsx +75 -0
- package/web/components/board/board-card.tsx +177 -0
- package/web/components/board/board-column.tsx +212 -0
- package/web/components/board/board-mode-switch.tsx +21 -0
- package/web/components/board/board-popups.tsx +45 -0
- package/web/components/board/card-footer.tsx +58 -0
- package/web/components/board/card-form.tsx +168 -0
- package/web/components/board/card-kids.tsx +53 -0
- package/web/components/board/clear-menu.tsx +36 -0
- package/web/components/board/filter-box.tsx +42 -0
- package/web/components/board/index.ts +6 -0
- package/web/components/board/run-form.tsx +129 -0
- package/web/components/board/severity-menu.tsx +44 -0
- package/web/components/board/status-strip.tsx +75 -0
- package/web/components/board/task-form.tsx +140 -0
- package/web/components/board/ws-card.tsx +38 -0
- package/web/components/context/context-panel.tsx +244 -0
- package/web/components/context/index.ts +1 -0
- package/web/components/decision/decision-bar.tsx +422 -0
- package/web/components/decision/index.ts +1 -0
- package/web/components/decision/inline-form.tsx +47 -0
- package/web/components/decision/plan-answers-form.tsx +78 -0
- package/web/components/decision/revise-form.tsx +65 -0
- package/web/components/decision/task-reply-form.tsx +48 -0
- package/web/components/footer/foot-bar.tsx +67 -0
- package/web/components/footer/index.ts +1 -0
- package/web/components/git/git-ask.tsx +88 -0
- package/web/components/git/git-commits.tsx +53 -0
- package/web/components/git/git-confirm.tsx +78 -0
- package/web/components/git/git-counts.tsx +10 -0
- package/web/components/git/git-files.tsx +113 -0
- package/web/components/git/git-head.tsx +70 -0
- package/web/components/git/git-icon.tsx +25 -0
- package/web/components/git/git-message.tsx +44 -0
- package/web/components/git/git-split.tsx +64 -0
- package/web/components/git/git-tab.tsx +55 -0
- package/web/components/git/index.ts +1 -0
- package/web/components/home/chat-list.tsx +57 -0
- package/web/components/home/home-composer.tsx +169 -0
- package/web/components/home/home-message.tsx +120 -0
- package/web/components/home/home-window.tsx +253 -0
- package/web/components/home/home-ws-add.tsx +47 -0
- package/web/components/home/index.ts +6 -0
- package/web/components/home/onboarding-dialog.tsx +371 -0
- package/web/components/icebox/board-chip.tsx +27 -0
- package/web/components/icebox/board-menu.tsx +41 -0
- package/web/components/icebox/bulk-bar.tsx +41 -0
- package/web/components/icebox/capture-box.tsx +155 -0
- package/web/components/icebox/choice-menu.tsx +39 -0
- package/web/components/icebox/collection-dialog.tsx +60 -0
- package/web/components/icebox/favicon.tsx +39 -0
- package/web/components/icebox/index.ts +10 -0
- package/web/components/icebox/kind-label.tsx +22 -0
- package/web/components/icebox/kind-menu.tsx +20 -0
- package/web/components/icebox/promote-form.tsx +93 -0
- package/web/components/icebox/reply-box.tsx +88 -0
- package/web/components/icebox/request-actions.tsx +141 -0
- package/web/components/icebox/request-badges.tsx +13 -0
- package/web/components/icebox/request-card.tsx +99 -0
- package/web/components/icebox/request-detail.tsx +43 -0
- package/web/components/icebox/request-images.tsx +33 -0
- package/web/components/icebox/request-phone-row.tsx +181 -0
- package/web/components/icebox/request-row.tsx +120 -0
- package/web/components/icebox/service-chip.tsx +58 -0
- package/web/components/icebox/snooze-menu.tsx +83 -0
- package/web/components/icebox/source-card.tsx +225 -0
- package/web/components/icebox/source-drawer.tsx +112 -0
- package/web/components/icebox/source-form.tsx +147 -0
- package/web/components/icebox/swipe-deck.tsx +242 -0
- package/web/components/layout/index.ts +1 -0
- package/web/components/layout/page-frame.tsx +44 -0
- package/web/components/markdown/index.ts +1 -0
- package/web/components/markdown/markdown.tsx +156 -0
- package/web/components/notebook/editor-pane.tsx +23 -0
- package/web/components/notebook/index.ts +5 -0
- package/web/components/notebook/note-body.tsx +172 -0
- package/web/components/notebook/note-tree.tsx +99 -0
- package/web/components/notebook/notes-head.tsx +37 -0
- package/web/components/notebook/notes-side.tsx +46 -0
- package/web/components/notes/index.ts +1 -0
- package/web/components/notes/note-composer.tsx +90 -0
- package/web/components/notes/notes-chat.tsx +58 -0
- package/web/components/panes/browser-pane.tsx +281 -0
- package/web/components/panes/index.ts +3 -0
- package/web/components/panes/preview-pane.tsx +91 -0
- package/web/components/panes/terminal-pane.tsx +52 -0
- package/web/components/phone/haptic.tsx +29 -0
- package/web/components/phone/index.ts +6 -0
- package/web/components/phone/phone-card.tsx +118 -0
- package/web/components/phone/phone-home.tsx +304 -0
- package/web/components/phone/phone-sheets.tsx +103 -0
- package/web/components/phone/qr-code.tsx +6 -0
- package/web/components/phone/usage-chips.tsx +85 -0
- package/web/components/phone/whatsapp-card.tsx +85 -0
- package/web/components/project/add-project-dialog.tsx +435 -0
- package/web/components/project/index.ts +3 -0
- package/web/components/project/project-bar.tsx +101 -0
- package/web/components/project/ws-menu.tsx +21 -0
- package/web/components/rail/agent-chips.tsx +110 -0
- package/web/components/rail/index.ts +4 -0
- package/web/components/rail/rail-filter.tsx +118 -0
- package/web/components/rail/rail-list.tsx +259 -0
- package/web/components/rail/source-marks.tsx +21 -0
- package/web/components/resources/index.ts +1 -0
- package/web/components/resources/resources-popup.tsx +490 -0
- package/web/components/run/doc-body.tsx +123 -0
- package/web/components/run/file-viewer.tsx +53 -0
- package/web/components/run/fix-form.tsx +88 -0
- package/web/components/run/index.ts +16 -0
- package/web/components/run/inline-md.tsx +30 -0
- package/web/components/run/key-hint.tsx +29 -0
- package/web/components/run/pane-gutter.tsx +52 -0
- package/web/components/run/pane-header.tsx +35 -0
- package/web/components/run/pane.tsx +140 -0
- package/web/components/run/panel-grip.tsx +49 -0
- package/web/components/run/panel-head.tsx +56 -0
- package/web/components/run/panel-tabs.tsx +35 -0
- package/web/components/run/phase-steps.tsx +37 -0
- package/web/components/run/project-notes.tsx +49 -0
- package/web/components/run/run-add-menu.tsx +80 -0
- package/web/components/run/run-bar.tsx +40 -0
- package/web/components/run/run-empty.tsx +10 -0
- package/web/components/run/run-footer.tsx +53 -0
- package/web/components/run/run-history.tsx +24 -0
- package/web/components/run/run-panes.tsx +78 -0
- package/web/components/run/run-picker.tsx +51 -0
- package/web/components/run/run-progress.tsx +30 -0
- package/web/components/run/run-tabs.tsx +147 -0
- package/web/components/run/run-wait.tsx +18 -0
- package/web/components/search/index.ts +1 -0
- package/web/components/search/search-palette.tsx +159 -0
- package/web/components/settings/account-rows.tsx +128 -0
- package/web/components/settings/agent-rows.tsx +249 -0
- package/web/components/settings/automation-rows.tsx +211 -0
- package/web/components/settings/browser-row.tsx +111 -0
- package/web/components/settings/cleanup-row.tsx +32 -0
- package/web/components/settings/commit-input.tsx +39 -0
- package/web/components/settings/index.ts +4 -0
- package/web/components/settings/integration-row.tsx +158 -0
- package/web/components/settings/mic-row.tsx +48 -0
- package/web/components/settings/orchestration-flow.tsx +87 -0
- package/web/components/settings/setting-row.tsx +131 -0
- package/web/components/settings/settings-item.tsx +78 -0
- package/web/components/settings/settings-loading.tsx +41 -0
- package/web/components/settings/settings-nav.tsx +119 -0
- package/web/components/settings/settings-scope.tsx +66 -0
- package/web/components/settings/settings-section.tsx +33 -0
- package/web/components/settings/skill-card.tsx +131 -0
- package/web/components/settings/stepper.tsx +74 -0
- package/web/components/settings/update-bar.tsx +167 -0
- package/web/components/shared/action-menu.tsx +76 -0
- package/web/components/shared/ask-host.tsx +18 -0
- package/web/components/shared/attach-button.tsx +23 -0
- package/web/components/shared/chip.tsx +19 -0
- package/web/components/shared/client-mark.tsx +15 -0
- package/web/components/shared/confirm-dialog.tsx +35 -0
- package/web/components/shared/empty-state.tsx +29 -0
- package/web/components/shared/field.tsx +77 -0
- package/web/components/shared/filter-popover.tsx +29 -0
- package/web/components/shared/form-frame.tsx +19 -0
- package/web/components/shared/icon-button.tsx +50 -0
- package/web/components/shared/index.ts +18 -0
- package/web/components/shared/mic-button.tsx +75 -0
- package/web/components/shared/pager.tsx +49 -0
- package/web/components/shared/picker.tsx +108 -0
- package/web/components/shared/project-mark.tsx +38 -0
- package/web/components/shared/segmented.tsx +43 -0
- package/web/components/shared/state-dot.tsx +4 -0
- package/web/components/shared/status-mark.tsx +26 -0
- package/web/components/shell/index.ts +3 -0
- package/web/components/shell/rail.tsx +259 -0
- package/web/components/shell/sprite.tsx +124 -0
- package/web/components/shell/wordmark.tsx +13 -0
- package/web/components/task/artifact-view.tsx +148 -0
- package/web/components/task/chat-bubble.tsx +43 -0
- package/web/components/task/filter-menu.tsx +38 -0
- package/web/components/task/index.ts +7 -0
- package/web/components/task/result-checks.tsx +34 -0
- package/web/components/task/result-view.tsx +113 -0
- package/web/components/task/status-badge.tsx +24 -0
- package/web/components/task/task-row.tsx +34 -0
- package/web/components/task/typing-dots.tsx +16 -0
- package/web/components/terminal/index.ts +3 -0
- package/web/components/terminal/terminal-bar.tsx +91 -0
- package/web/components/terminal/terminal-grid.tsx +149 -0
- package/web/components/terminal/terminal-modes.tsx +23 -0
- package/web/components/terminal/terminal-tile.tsx +139 -0
- package/web/dist/annotate.js +24 -0
- package/web/dist/board.css +718 -0
- package/web/dist/board.js +115 -0
- package/web/dist/boot.js +2 -0
- package/web/dist/notebook.css +319 -0
- package/web/dist/notebook.js +89 -0
- package/web/dist/popup.css +41 -0
- package/web/dist/popup.js +13 -0
- package/web/{term.js → dist/term.js} +48 -48
- package/web/dist/ui.css +3 -0
- package/web/dist/video.js +108 -0
- package/web/html/board.html +17 -0
- package/web/html/notes.html +14 -0
- package/web/html/popup.html +13 -0
- package/web/{video.html → html/video.html} +14 -15
- package/web/lib/annotate/index.ts +2 -0
- package/web/lib/annotate/notes.ts +105 -0
- package/web/lib/annotate/page.ts +121 -0
- package/web/lib/annotate/rules.ts +37 -0
- package/web/lib/annotate/session.ts +336 -0
- package/web/lib/board/board-actions.ts +119 -0
- package/web/lib/board/board-open.ts +12 -0
- package/web/lib/board/board-store.ts +159 -0
- package/web/lib/board/filter-box.ts +7 -0
- package/web/lib/board/index.ts +10 -0
- package/web/lib/board/nav.ts +29 -0
- package/web/lib/board/on-state.ts +90 -0
- package/web/lib/board/popups.ts +22 -0
- package/web/lib/board/snapshot.ts +105 -0
- package/web/lib/board/strip.ts +43 -0
- package/web/{board → lib/board}/ws-board.ts +1 -1
- package/web/lib/context/context-rules.ts +27 -0
- package/web/lib/context/context-store.ts +95 -0
- package/web/lib/context/feed.ts +28 -0
- package/web/lib/context/index.ts +3 -0
- package/web/lib/core/api.ts +86 -0
- package/web/lib/core/ask.ts +24 -0
- package/web/lib/core/board.ts +290 -0
- package/web/lib/core/brief.ts +31 -0
- package/web/lib/core/format.ts +8 -0
- package/web/lib/core/host.ts +107 -0
- package/web/lib/core/index.ts +16 -0
- package/web/{board → lib/core}/labels.ts +6 -5
- package/web/lib/core/layers.ts +7 -0
- package/web/lib/core/leave.ts +7 -0
- package/web/lib/core/motion.ts +10 -0
- package/web/{board/toast.ts → lib/core/notices.ts} +2 -20
- package/web/lib/core/notifier.ts +15 -0
- package/web/lib/core/store.ts +39 -0
- package/web/lib/core/term-handle.ts +8 -0
- package/web/lib/core/toast.ts +29 -0
- package/web/lib/core/utils.ts +15 -0
- package/web/lib/decision/index.ts +1 -0
- package/web/lib/decision/plan-questions.ts +39 -0
- package/web/lib/dictation/chunks.ts +93 -0
- package/web/lib/dictation/dictation-store.ts +22 -0
- package/web/lib/dictation/engine.ts +265 -0
- package/web/lib/dictation/index.ts +5 -0
- package/web/lib/dictation/mic.ts +42 -0
- package/web/lib/dictation/terminal-dictation.ts +50 -0
- package/web/lib/footer/footer-rules.ts +13 -0
- package/web/lib/footer/footer-store.ts +42 -0
- package/web/lib/footer/index.ts +2 -0
- package/web/lib/git/git-actions.ts +110 -0
- package/web/lib/git/git-panel.ts +43 -0
- package/web/lib/git/git-store.ts +47 -0
- package/web/lib/git/git.ts +170 -0
- package/web/lib/git/index.ts +4 -0
- package/web/lib/home/home-engine.ts +16 -0
- package/web/lib/home/home-events.ts +9 -0
- package/web/lib/home/home-store.ts +247 -0
- package/web/lib/home/home-window.ts +193 -0
- package/web/lib/home/home.ts +85 -0
- package/web/lib/home/index.ts +7 -0
- package/web/lib/home/onboarding.ts +199 -0
- package/web/lib/home/use-float-drag.ts +62 -0
- package/web/lib/icebox/icebox-actions.ts +518 -0
- package/web/lib/icebox/icebox-store.ts +112 -0
- package/web/lib/icebox/icebox-view.ts +48 -0
- package/web/lib/icebox/icebox.ts +273 -0
- package/web/lib/icebox/index.ts +8 -0
- package/web/lib/icebox/use-card-drag.ts +82 -0
- package/web/lib/icebox/use-ice-keys.ts +75 -0
- package/web/lib/icebox/use-icebox.ts +41 -0
- package/web/lib/icebox/use-row-swipe.ts +107 -0
- package/web/lib/markdown/index.ts +1 -0
- package/web/lib/markdown/markdown.ts +136 -0
- package/web/lib/notebook/autosave.ts +131 -0
- package/web/lib/notebook/deal.ts +58 -0
- package/web/lib/notebook/engine-complete.ts +128 -0
- package/web/lib/notebook/engine-preview.ts +287 -0
- package/web/lib/notebook/engine-types.ts +26 -0
- package/web/lib/notebook/engine-widgets.ts +218 -0
- package/web/lib/notebook/engine.ts +74 -0
- package/web/lib/notebook/index.ts +9 -0
- package/web/lib/notebook/kit-loader.ts +16 -0
- package/web/lib/notebook/kit.ts +12 -0
- package/web/{notes-lib.ts → lib/notebook/text.ts} +11 -10
- package/web/lib/notebook/vault-actions.ts +239 -0
- package/web/lib/notebook/vault-rules.ts +74 -0
- package/web/lib/notebook/vault-session.ts +73 -0
- package/web/lib/notebook/vault-store.ts +63 -0
- package/web/lib/notes/index.ts +4 -0
- package/web/lib/notes/md-html.ts +115 -0
- package/web/lib/notes/notes-actions.ts +32 -0
- package/web/lib/notes/notes-store.ts +22 -0
- package/web/lib/notes/notes.ts +58 -0
- package/web/{board → lib/notes}/rich.ts +1 -2
- package/web/lib/phone/index.ts +7 -0
- package/web/lib/phone/phone-actions.ts +77 -0
- package/web/lib/phone/phone-home.ts +102 -0
- package/web/lib/phone/phone-setup.ts +59 -0
- package/web/lib/phone/phone-sheet.ts +25 -0
- package/web/lib/phone/phone-store.ts +32 -0
- package/web/lib/phone/sheet-swipe.ts +55 -0
- package/web/lib/phone/use-phone-setup.ts +89 -0
- package/web/lib/project/add-project.ts +37 -0
- package/web/lib/project/branch.ts +14 -0
- package/web/lib/project/index.ts +5 -0
- package/web/lib/project/project-bar.ts +76 -0
- package/web/lib/project/project-pick.ts +36 -0
- package/web/lib/project/ws-menu.ts +8 -0
- package/web/lib/rail/agents.ts +63 -0
- package/web/lib/rail/card-links.ts +20 -0
- package/web/lib/rail/index.ts +7 -0
- package/web/lib/rail/rail-actions.ts +74 -0
- package/web/lib/rail/rail-boot.ts +99 -0
- package/web/lib/rail/rail-store.ts +85 -0
- package/web/lib/rail/rules.ts +241 -0
- package/web/lib/rail/source-marks.ts +17 -0
- package/web/lib/rail/use-rank-drag.ts +108 -0
- package/web/lib/resources/index.ts +3 -0
- package/web/lib/resources/resources-actions.ts +59 -0
- package/web/lib/resources/resources-store.ts +48 -0
- package/web/lib/resources/rules.ts +56 -0
- package/web/lib/router/index.ts +3 -0
- package/web/lib/router/route-rules.ts +96 -0
- package/web/lib/router/route-store.ts +115 -0
- package/web/lib/router/use-route-classes.ts +15 -0
- package/web/lib/run/browser.ts +53 -0
- package/web/lib/run/card-terminal.ts +32 -0
- package/web/lib/run/doc.ts +42 -0
- package/web/lib/run/grip.ts +8 -0
- package/web/lib/run/index.ts +19 -0
- package/web/lib/run/kept.ts +58 -0
- package/web/lib/run/layout-store.ts +156 -0
- package/web/lib/run/layout.ts +195 -0
- package/web/lib/run/panel-actions.ts +104 -0
- package/web/lib/run/panel-derive.ts +148 -0
- package/web/lib/run/panel-store.ts +125 -0
- package/web/lib/run/preview.ts +105 -0
- package/web/lib/run/run-actions.ts +118 -0
- package/web/lib/run/run-view-store.ts +134 -0
- package/web/lib/run/term-loader.ts +19 -0
- package/web/lib/run/use-panel-run.ts +125 -0
- package/web/lib/run/use-run-lifecycle.ts +70 -0
- package/web/lib/run/viewer.ts +12 -0
- package/web/lib/run/workspace.ts +281 -0
- package/web/lib/run/ws-actions.ts +293 -0
- package/web/lib/run/ws-derive.ts +50 -0
- package/web/lib/run/ws-draw.ts +102 -0
- package/web/lib/run/ws-store.ts +21 -0
- package/web/lib/run/ws-tabs.ts +125 -0
- package/web/lib/search/index.ts +3 -0
- package/web/lib/search/search-match.ts +48 -0
- package/web/lib/search/search-rows.ts +228 -0
- package/web/lib/search/search.ts +30 -0
- package/web/lib/search/use-search-rows.ts +22 -0
- package/web/lib/server/attention.ts +29 -0
- package/web/lib/server/index.ts +6 -0
- package/web/lib/server/poll-rules.ts +57 -0
- package/web/lib/server/poller.ts +210 -0
- package/web/lib/server/server-store.ts +39 -0
- package/web/lib/server/types.ts +31 -0
- package/web/lib/server/use-server.ts +19 -0
- package/web/lib/settings/agent-favicons.ts +14 -0
- package/web/lib/settings/index.ts +7 -0
- package/web/lib/settings/panel-settings.ts +29 -0
- package/web/lib/settings/settings-actions.ts +357 -0
- package/web/lib/settings/settings-store.ts +114 -0
- package/web/lib/settings/settings.ts +413 -0
- package/web/lib/settings/skill-icons.ts +24 -0
- package/web/lib/settings/update.ts +70 -0
- package/web/lib/shared/data-urls.ts +32 -0
- package/web/lib/shared/index.ts +4 -0
- package/web/lib/shared/use-draft.ts +38 -0
- package/web/lib/shared/use-narrow.ts +11 -0
- package/web/lib/shared/use-pager.ts +24 -0
- package/web/lib/shell/appearance.ts +97 -0
- package/web/lib/shell/help-store.ts +4 -0
- package/web/lib/shell/index.ts +4 -0
- package/web/lib/shell/shell-store.ts +23 -0
- package/web/lib/shell/stored-look.ts +47 -0
- package/web/lib/task/index.ts +7 -0
- package/web/lib/task/task-results.ts +92 -0
- package/web/lib/task/tasks.ts +134 -0
- package/web/lib/task/use-live-frame.ts +85 -0
- package/web/lib/task/use-saved-text.ts +25 -0
- package/web/lib/task/use-task.ts +161 -0
- package/web/lib/task/use-tasks.ts +50 -0
- package/web/{board → lib/task}/zoom.ts +25 -12
- package/web/lib/terminal/hidden-badge.ts +15 -0
- package/web/lib/terminal/index.ts +8 -0
- package/web/lib/terminal/layout.ts +138 -0
- package/web/{term-font.ts → lib/terminal/term-font.ts} +3 -2
- package/web/lib/terminal/terminal-store.ts +65 -0
- package/web/lib/terminal/terms-feed.ts +37 -0
- package/web/lib/terminal/use-arranged.ts +15 -0
- package/web/lib/terminal/use-terminal-keys.ts +37 -0
- package/web/lib/url/index.ts +1 -0
- package/web/lib/url/safe-url.ts +9 -0
- package/web/notebook/notebook.ts +27 -0
- package/web/notebook/notes-lib.ts +3 -0
- package/web/pages/board/App.tsx +76 -0
- package/web/pages/board/header.tsx +83 -0
- package/web/pages/board/help.tsx +59 -0
- package/web/pages/board/host-bridge.ts +94 -0
- package/web/pages/board/host.tsx +19 -0
- package/web/pages/board/keys.ts +112 -0
- package/web/pages/board/live.ts +39 -0
- package/web/pages/board/main.ts +32 -0
- package/web/pages/board/pages.tsx +86 -0
- package/web/pages/board/panel.tsx +157 -0
- package/web/pages/board/portal.tsx +39 -0
- package/web/pages/board/use-boot.ts +13 -0
- package/web/pages/board/views.ts +63 -0
- package/web/pages/board-page.tsx +62 -0
- package/web/pages/home-page.tsx +127 -0
- package/web/pages/icebox-page.tsx +440 -0
- package/web/pages/notebook/App.tsx +35 -0
- package/web/pages/notebook-page.tsx +50 -0
- package/web/pages/popup/App.tsx +207 -0
- package/web/pages/settings-page.tsx +111 -0
- package/web/pages/task-page.tsx +397 -0
- package/web/pages/tasks-page.tsx +151 -0
- package/web/pages/terminal-page.tsx +15 -0
- package/web/popup/popup.ts +7 -0
- package/web/{term.ts → term/term.ts} +48 -20
- package/web/ui/alert-dialog.tsx +39 -0
- package/web/ui/badge.tsx +20 -0
- package/web/ui/button.tsx +37 -0
- package/web/ui/checkbox.tsx +20 -0
- package/web/ui/command.tsx +41 -0
- package/web/ui/dialog.tsx +28 -0
- package/web/ui/dropdown-menu.tsx +54 -0
- package/web/ui/icon.tsx +17 -0
- package/web/ui/index.ts +21 -0
- package/web/ui/input.tsx +9 -0
- package/web/ui/label.tsx +7 -0
- package/web/ui/legacy/board.css +715 -0
- package/web/{notes.html → ui/legacy/notes.css} +23 -157
- package/web/ui/legacy/popup.css +40 -0
- package/web/ui/popover.tsx +28 -0
- package/web/ui/select.tsx +61 -0
- package/web/ui/sheet.tsx +43 -0
- package/web/ui/skeleton.tsx +6 -0
- package/web/ui/sonner.tsx +25 -0
- package/web/ui/spinner.tsx +12 -0
- package/web/ui/switch.tsx +18 -0
- package/web/ui/tabs.tsx +18 -0
- package/web/ui/textarea.tsx +14 -0
- package/web/ui/theme.css +125 -0
- package/web/ui/toggle.tsx +8 -0
- package/web/ui/tooltip.tsx +26 -0
- package/web/{video.ts → video/video.ts} +5 -5
- package/web/board/add-project.ts +0 -147
- package/web/board/agent-favicons.ts +0 -9
- package/web/board/agent-term.ts +0 -51
- package/web/board/annotate-lib.ts +0 -19
- package/web/board/annotate.ts +0 -221
- package/web/board/api.ts +0 -180
- package/web/board/approvals.ts +0 -109
- package/web/board/badge.ts +0 -115
- package/web/board/cards.ts +0 -1080
- package/web/board/chat.ts +0 -128
- package/web/board/context.ts +0 -248
- package/web/board/dictation.ts +0 -343
- package/web/board/dom.ts +0 -132
- package/web/board/drafts.ts +0 -21
- package/web/board/fixes.ts +0 -89
- package/web/board/git.ts +0 -416
- package/web/board/home-ws.ts +0 -266
- package/web/board/home.ts +0 -421
- package/web/board/icebox.ts +0 -1788
- package/web/board/keys.ts +0 -121
- package/web/board/live.ts +0 -87
- package/web/board/main.ts +0 -94
- package/web/board/markdown.ts +0 -210
- package/web/board/onboarding.ts +0 -227
- package/web/board/panel.ts +0 -437
- package/web/board/phone-setup.ts +0 -79
- package/web/board/phone.ts +0 -219
- package/web/board/projects.ts +0 -277
- package/web/board/resources.ts +0 -170
- package/web/board/run-pick.ts +0 -41
- package/web/board/run-view.ts +0 -1316
- package/web/board/search-match.ts +0 -20
- package/web/board/search.ts +0 -330
- package/web/board/settings-accounts.ts +0 -76
- package/web/board/settings-agents.ts +0 -102
- package/web/board/settings-automations.ts +0 -71
- package/web/board/settings-cleanup.ts +0 -42
- package/web/board/settings-orchestration.ts +0 -32
- package/web/board/settings-pages.ts +0 -62
- package/web/board/settings-skills.ts +0 -103
- package/web/board/settings-voice.ts +0 -28
- package/web/board/settings.ts +0 -490
- package/web/board/store.ts +0 -47
- package/web/board/task-page.ts +0 -628
- package/web/board/task-results.ts +0 -234
- package/web/board/tasks.ts +0 -242
- package/web/board/terms.ts +0 -390
- package/web/board/update.ts +0 -171
- package/web/board/viewer.ts +0 -47
- package/web/board/views.ts +0 -164
- package/web/board/whatsapp-setup.ts +0 -149
- package/web/board/workspace.ts +0 -650
- package/web/board/ws-board-ui.ts +0 -95
- package/web/board/ws-tabs.ts +0 -227
- package/web/board.html +0 -1563
- package/web/board.js +0 -505
- package/web/notebook.js +0 -519
- package/web/notebook.ts +0 -1254
- package/web/popup.html +0 -141
- package/web/video.js +0 -575
- /package/web/{term.css → dist/term.css} +0 -0
- /package/web/{board/term-sessions.ts → lib/terminal/sessions.ts} +0 -0
- /package/web/{board/terminal-viewport.ts → lib/terminal/viewport.ts} +0 -0
- /package/web/{term-paste.ts → term/term-paste.ts} +0 -0
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { post } from "./api.ts";
|
|
2
|
-
import { $, html } from "./dom.ts";
|
|
3
|
-
import { toast } from "./toast.ts";
|
|
4
|
-
|
|
5
|
-
// Settings → General → Storage: the two halves of `kaizen prune`, one button each, so
|
|
6
|
-
// clearing dead launch records never takes run history with it.
|
|
7
|
-
export type Cleanup = { project: string | null; keep: number; records: { abandoned: number; unowned: number; gone: number }; runs: number; rescued: number };
|
|
8
|
-
|
|
9
|
-
const total = (d: Cleanup) => d.records.abandoned + d.records.unowned + d.records.gone;
|
|
10
|
-
const btn = (id: string, text: string, n: number) => html`<button type="button" class="btn" id="${id}"${n ? "" : " disabled"}>${text}</button>`;
|
|
11
|
-
|
|
12
|
-
export const cleanupRows = (d: Cleanup) => [
|
|
13
|
-
{
|
|
14
|
-
label: "Clean launch records",
|
|
15
|
-
control: btn("s-clean-records", "Clean up", total(d)),
|
|
16
|
-
hint: `${total(d)} older than a week: ${d.records.abandoned} abandoned · ${d.records.unowned} unowned · ${d.records.gone} run gone`,
|
|
17
|
-
id: "s-clean-records",
|
|
18
|
-
q: "cleanup clean launch records sessions prune",
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
label: "Delete old runs",
|
|
22
|
-
control: btn("s-clean-runs", "Delete", d.runs),
|
|
23
|
-
hint: `${d.runs} finished runs beyond the newest ${d.keep}${d.rescued ? `; ${d.rescued} open backlog items move to backlog.md` : ""}`,
|
|
24
|
-
id: "s-clean-runs",
|
|
25
|
-
q: "cleanup delete old runs prune history",
|
|
26
|
-
},
|
|
27
|
-
];
|
|
28
|
-
|
|
29
|
-
export function wireCleanup(d: Cleanup, redraw: () => Promise<unknown>) {
|
|
30
|
-
const where = d.project ? ` in ${d.project}` : "";
|
|
31
|
-
const go = (id: string, what: string, ask: string) => {
|
|
32
|
-
const b = $(id);
|
|
33
|
-
if (b) b.onclick = async () => {
|
|
34
|
-
if (!confirm(ask)) return;
|
|
35
|
-
const j = await post("/cleanup", { what });
|
|
36
|
-
toast(j.error ?? `Removed ${j.removed}`);
|
|
37
|
-
await redraw();
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
go("s-clean-records", "records", `Delete ${total(d)} launch records${where}?`);
|
|
41
|
-
go("s-clean-runs", "runs", `Permanently delete ${d.runs} finished runs${where}? Their plans, reviews and reports go, and this cannot be undone.`);
|
|
42
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { AGENT_FAVICONS } from "./agent-favicons.ts";
|
|
2
|
-
import { html } from "./dom.ts";
|
|
3
|
-
|
|
4
|
-
// Names worth suggesting, per tool, from the tool's own docs; typing any other name stays allowed.
|
|
5
|
-
// ponytail: claude only, add another tool's names when its own CLI help lists them.
|
|
6
|
-
const SUGGEST: Record<string, string[]> = { claude: ["haiku", "sonnet", "opus"] };
|
|
7
|
-
|
|
8
|
-
// The worker model row's label (the tool's icon and name) and its input with that tool's suggestions.
|
|
9
|
-
export const modelLabel = (r: { key: string; label: string }) =>
|
|
10
|
-
html`<img class="ag-i" src="${AGENT_FAVICONS[r.key.split(".").pop()!] ?? ""}" alt="" width="16" height="16" style="width:16px;height:16px;vertical-align:-3px;margin-right:6px;border-radius:3px">${r.label.replace(/^(Worker|Handoff) model: /, "")}`;
|
|
11
|
-
export const modelInput = (r: { key: string; value: string }, id: string) => {
|
|
12
|
-
const tool = r.key.split(".").pop()!;
|
|
13
|
-
return html`<span><input class="sel" id="${id}" value="${r.value}" placeholder="inherit" list="${id}-dl" spellcheck="false" autocomplete="off">${SUGGEST[tool] ? html`<datalist id="${id}-dl">${SUGGEST[tool]!.map((m) => html`<option value="${m}"></option>`)}</datalist>` : ""}</span>`;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
// Settings → Orchestration: a picture of the flow, and warnings where they apply, above the three rows. The rows themselves are the generic ones.
|
|
17
|
-
const note = (text: unknown, q: string) => html`<div class="srow" data-q="orchestration workers ${q}"><p class="hint">${text}</p></div>`;
|
|
18
|
-
|
|
19
|
-
// The plan reaches the conductor, which hands out tasks; workers bring work back; it goes on to review. Joined by beams of light. currentColor and var(--accent), so it follows light and
|
|
20
|
-
// dark. CSS only; with reduced motion the lines simply stay lit.
|
|
21
|
-
const flow = html`<div class="orch-flow" data-q="orchestration workers flow plan merge review"><svg viewBox="0 0 910 250" width="100%" role="img" aria-label="A conductor takes the approved plan and hands tasks to workers. Each worker brings its work back to the conductor, which merges it and sends it to review.">
|
|
22
|
-
<style>.orch-flow svg{display:block;overflow:visible;width:100%!important;height:auto!important;max-width:none!important;fill:none}.orch-l{fill:none;stroke:currentColor;stroke-width:2;opacity:.16}.orch-b{fill:none;stroke:var(--accent);stroke-width:3;stroke-linecap:round;filter:drop-shadow(0 0 5px var(--accent))}.orch-flow rect{fill:var(--bg);stroke:currentColor;stroke-width:1.5}.orch-i path,.orch-i circle{fill:none;stroke:var(--accent);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.orch-flow text{fill:currentColor;stroke:none;font:600 15px var(--mono,ui-monospace,monospace)}@keyframes orch-beam{from{stroke-dashoffset:125}to{stroke-dashoffset:-25}}@media (prefers-reduced-motion:no-preference){.orch-b{stroke-dasharray:25 100;stroke-dashoffset:125;animation:orch-beam 4s linear infinite}}</style>
|
|
23
|
-
<path class="orch-l" d="M150 125H200"/><path class="orch-l" d="M265 96V50Q265 32 283 32H500"/><path class="orch-l" d="M265 154V200Q265 218 283 218H500"/><path class="orch-l" d="M500 60H335Q317 60 317 78V96"/><path class="orch-l" d="M500 190H335Q317 190 317 172V154"/><path class="orch-l" d="M382 125H740"/>
|
|
24
|
-
<path class="orch-b" pathLength="100" style="animation-delay:0s" d="M150 125H200"/><path class="orch-b" pathLength="100" style="animation-delay:0.5s" d="M265 96V50Q265 32 283 32H500"/><path class="orch-b" pathLength="100" style="animation-delay:0.5s" d="M265 154V200Q265 218 283 218H500"/><path class="orch-b" pathLength="100" style="animation-delay:1.7s" d="M500 60H335Q317 60 317 78V96"/><path class="orch-b" pathLength="100" style="animation-delay:1.7s" d="M500 190H335Q317 190 317 172V154"/><path class="orch-b" pathLength="100" style="animation-delay:2.8s" d="M382 125H740"/>
|
|
25
|
-
<g transform="translate(20 96)"><rect width="130" height="58" rx="12"/><g transform="translate(18 21) scale(1.15)" class="orch-i"><path d="M1 1h7l4 4v9H1zM8 1v4h4"/></g><text x="44" y="35">plan</text></g><g transform="translate(200 96)"><rect width="182" height="58" rx="12"/><g transform="translate(18 21) scale(1.15)" class="orch-i"><circle cx="6.5" cy="6.5" r="2.5"/><path d="M6.5 0v3M6.5 10v3M0 6.5h3M10 6.5h3"/></g><text x="44" y="35">conductor</text></g><g transform="translate(500 18)"><rect width="160" height="58" rx="12"/><g transform="translate(18 21) scale(1.15)" class="orch-i"><path d="M1 2l4 3-4 3M7 10h5"/></g><text x="44" y="35">worker 1</text></g><g transform="translate(500 174)"><rect width="160" height="58" rx="12"/><g transform="translate(18 21) scale(1.15)" class="orch-i"><path d="M1 2l4 3-4 3M7 10h5"/></g><text x="44" y="35">worker 2</text></g><g transform="translate(740 96)"><rect width="150" height="58" rx="12"/><g transform="translate(18 21) scale(1.15)" class="orch-i"><circle cx="6.5" cy="6.5" r="6"/><path d="M4 6.5l2 2 3.5-4"/></g><text x="44" y="35">review</text></g>
|
|
26
|
-
</svg></div>`;
|
|
27
|
-
|
|
28
|
-
export const orchestrationRows = (d: { windows: boolean; bypass: boolean }) =>
|
|
29
|
-
html`${flow}<div class="sgrp">
|
|
30
|
-
${d.windows ? note("Not available on Windows: workers run in real terminals on Linux and macOS. Orchestration reads as off here.", "windows") : ""}
|
|
31
|
-
${d.bypass ? note("Warning: bypass skips every prompt in every worker. Each worker tab and the run's card say so.", "bypass permissions") : ""}
|
|
32
|
-
</div>`;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
// Settings' sidebar, grouped as macOS System Settings is: short groups of pages, each with
|
|
2
|
-
// its icon tile. Only the page knows this: a setting's `group` in cli/settings.ts still
|
|
3
|
-
// decides its scope and the TUI's headings.
|
|
4
|
-
export type SettingsPage = { id: string; title: string; desc: string; ico: string };
|
|
5
|
-
export const SETTINGS_NAV: [string, SettingsPage[]][] = [
|
|
6
|
-
["App", [
|
|
7
|
-
{ id: "general", title: "General", desc: "About kaizen, storage, folders and how the app opens.", ico: "gear" },
|
|
8
|
-
{ id: "appearance", title: "Appearance", desc: "Theme, color and motion in this browser.", ico: "sun" },
|
|
9
|
-
{ id: "notifications", title: "Notifications", desc: "Notices and sounds in this browser.", ico: "inbox" },
|
|
10
|
-
{ id: "keyboard", title: "Keyboard & Dictation", desc: "Shortcuts, and speech-to-text dictation run in the browser.", ico: "kbd" },
|
|
11
|
-
{ id: "terminal", title: "Terminal", desc: "Board terminals and the terminal dashboard.", ico: "term" },
|
|
12
|
-
]],
|
|
13
|
-
["Agents", [
|
|
14
|
-
{ id: "agents", title: "Agents", desc: "Manage AI agents, set a default, and customize commands.", ico: "ai" },
|
|
15
|
-
{ id: "models", title: "Models", desc: "The model each agent runs its stages and handoff sessions on.", ico: "mem" },
|
|
16
|
-
{ id: "accounts", title: "AI Accounts", desc: "Who is signed in to each AI tool kaizen runs. Add accounts only to switch between more than one.", ico: "link" },
|
|
17
|
-
{ id: "skills", title: "Skills", desc: "What your agents can do. Changes apply to new sessions.", ico: "note" },
|
|
18
|
-
]],
|
|
19
|
-
["Workflow", [
|
|
20
|
-
{ id: "runs", title: "Runs", desc: "How a run is carried out: who builds, who reviews, and what it remembers.", ico: "play" },
|
|
21
|
-
{ id: "approvals", title: "Approvals", desc: "Where a run stops and waits for you.", ico: "check" },
|
|
22
|
-
{ id: "autofix", title: "Auto-fix", desc: "What happens to review findings.", ico: "bug" },
|
|
23
|
-
{ id: "orchestration", title: "Orchestration", desc: "Split a run into workers, each in its own terminal. Off by default.", ico: "lgrid" },
|
|
24
|
-
{ id: "automations", title: "Automations", desc: "Schedules that start a run in this project.", ico: "clock" },
|
|
25
|
-
{ id: "git", title: "Git", desc: "Branches and commits for each run.", ico: "pen" },
|
|
26
|
-
]],
|
|
27
|
-
["Connections", [
|
|
28
|
-
{ id: "integrations", title: "Integrations", desc: "Request sources, your Google account, and web research.", ico: "ext" },
|
|
29
|
-
{ id: "mobile", title: "Phone", desc: "Open kaizen from your phone, and send files to WhatsApp.", ico: "phone" },
|
|
30
|
-
]],
|
|
31
|
-
];
|
|
32
|
-
// Pages that were merged into another: an old `?page=` address still opens the right one.
|
|
33
|
-
const PAGE_ALIAS: Record<string, string> = { voice: "keyboard", shortcuts: "keyboard" };
|
|
34
|
-
export const pageId = (id: string) => PAGE_ALIAS[id] ?? id;
|
|
35
|
-
// Subsections that should come first on their page, whatever order their rows arrive in.
|
|
36
|
-
export const SUB_ORDER: Record<string, string[]> = { general: ["Storage", "Folders", "App"], keyboard: ["Shortcuts", "Dictation"] };
|
|
37
|
-
// First match wins: [key pattern, page, subsection].
|
|
38
|
-
const PLACES: [RegExp, string, string][] = [
|
|
39
|
-
[/^(preset|runner|explore\.|build\.|review\.executor)/, "runs", "Workflow"],
|
|
40
|
-
[/^review\.(write_memory|memory_max_lines)$/, "runs", "Memory"],
|
|
41
|
-
[/^(subagents\.|agent\.model\.)/, "models", "Models"],
|
|
42
|
-
[/^agent\.handoff_model\./, "models", "Handoff session"],
|
|
43
|
-
[/^agent\.default$/, "agents", "Default agent"],
|
|
44
|
-
[/^agent\./, "agents", "Running agents"],
|
|
45
|
-
[/^orchestration\./, "orchestration", "Workers"],
|
|
46
|
-
[/^dictation\./, "keyboard", "Dictation"],
|
|
47
|
-
[/^sources\./, "integrations", "Request sources"],
|
|
48
|
-
[/^(mode|approvals\.|auto_accept)/, "approvals", "Approvals"],
|
|
49
|
-
[/^auto_fix\./, "autofix", "Auto-fix"],
|
|
50
|
-
[/^auto_guard\./, "autofix", "Auto mode guard"],
|
|
51
|
-
[/^git\./, "git", "Git"],
|
|
52
|
-
[/^ui\./, "terminal", "Terminal"],
|
|
53
|
-
[/^board\.chat_hotkey$/, "keyboard", "Shortcuts"],
|
|
54
|
-
[/^board\.(projects_dir|video_dir)$/, "general", "Folders"],
|
|
55
|
-
[/^board\./, "general", "App"],
|
|
56
|
-
[/^state\./, "general", "Storage"],
|
|
57
|
-
];
|
|
58
|
-
// A setting nobody has placed yet still shows, on General.
|
|
59
|
-
export const placeOf = (key: string): [string, string] => {
|
|
60
|
-
const p = PLACES.find(([re]) => re.test(key));
|
|
61
|
-
return p ? [p[1], p[2]] : ["general", "Other"];
|
|
62
|
-
};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { AGENT_FAVICONS } from "./agent-favicons.ts";
|
|
2
|
-
import { post } from "./api.ts";
|
|
3
|
-
import { $, html, raw, toggleSwitch } from "./dom.ts";
|
|
4
|
-
import { toast } from "./toast.ts";
|
|
5
|
-
|
|
6
|
-
// Settings → Skills: one row per bundled skill, grouped. /skills scans the folders, so
|
|
7
|
-
// a new skill shows here with no change to this file.
|
|
8
|
-
type Row = { id: string; title: string; description: string; group: string; off: boolean; agents: { agent: string; state: string }[]; needs: { name: string; found: boolean }[]; offByDefault?: boolean; note?: string; status?: string; rea?: { installed: string | null; latest: string | null; update: boolean; outside: boolean; node?: NodeNeed | null } };
|
|
9
|
-
// REA runs on the PC's Node.js: missing, or older than REA accepts. `command` is what the server will run.
|
|
10
|
-
type NodeNeed = { state: "missing" | "old"; have?: string; how: "winget" | "brew" | "link"; command?: string; url?: string };
|
|
11
|
-
const GROUPS: [string, string][] = [["core", "Core"], ["media", "Media"], ["optional", "Optional"]];
|
|
12
|
-
const WORD: Record<string, string> = { installed: "installed", missing: "missing", other: "your own copy" };
|
|
13
|
-
|
|
14
|
-
const AGENT_CMD: Record<string, string> = { "Claude Code": "claude", Codex: "codex", Antigravity: "agy", OpenCode: "opencode", Cursor: "cursor", "Gemini CLI": "gemini" };
|
|
15
|
-
// One drawn mark per skill, by id; a skill without one gets the puzzle piece.
|
|
16
|
-
const SKILL_ICONS: Record<string, string> = {
|
|
17
|
-
kaizen: '<path d="M4 7h11M4 12h7M4 17h11"/><path d="m16 11 2 2 3-4"/>',
|
|
18
|
-
"kaizen-help": '<circle cx="12" cy="12" r="9"/><path d="M9.5 9.5a2.5 2.5 0 1 1 3.8 2.1c-.9.6-1.3 1.1-1.3 2.1"/><path d="M12 17h.01"/>',
|
|
19
|
-
"kaizen-book": '<path d="M12 6c-2-1.5-5-2-8-2v15c3 0 6 .5 8 2 2-1.5 5-2 8-2V4c-3 0-6 .5-8 2Z"/><path d="M12 6v15"/>',
|
|
20
|
-
"kaizen-deck": '<rect x="3" y="4" width="18" height="12" rx="1"/><path d="M12 16v4M8 20h8M8 12l3-3 2 2 3-3"/>',
|
|
21
|
-
"kaizen-computer": '<rect x="3" y="4" width="18" height="12" rx="1"/><path d="M8 20h8M12 16v4M9 8l5 3-2 .8-.8 2Z"/>',
|
|
22
|
-
"kaizen-game": '<rect x="2" y="7" width="20" height="11" rx="5"/><path d="M7 10.5v4M5 12.5h4"/><circle cx="16" cy="11.5" r=".6"/><circle cx="18" cy="13.5" r=".6"/>',
|
|
23
|
-
"kaizen-video": '<rect x="3" y="6" width="13" height="12" rx="2"/><path d="m16 10 5-3v10l-5-3"/>',
|
|
24
|
-
rea: '<circle cx="10.5" cy="10.5" r="6"/><path d="m15 15 6 6"/><path d="M8.5 9 7 10.5 8.5 12M12.5 9l1.5 1.5-1.5 1.5"/>',
|
|
25
|
-
};
|
|
26
|
-
const PUZZLE = '<path d="M10 4a2 2 0 1 1 4 0v2h5v5h-2a2 2 0 1 0 0 4h2v5H5v-5h2a2 2 0 1 0 0-4H5V6h5Z"/>';
|
|
27
|
-
const skillIcon = (id: string) => raw(`<svg class="sk-i" viewBox="0 0 24 24" aria-hidden="true">${SKILL_ICONS[id] ?? PUZZLE}</svg>`);
|
|
28
|
-
|
|
29
|
-
// What each off-by-default skill asks before it turns on.
|
|
30
|
-
const WARN: Record<string, string> = {
|
|
31
|
-
"kaizen-computer": "Let agents read and operate the apps on your desktop?\n\nThey see the window text of the apps they open and can click, set values and type in them, as you. A password manager is blocked by its name only, so one inside a browser or under another name is not. Any other open app is in reach. Turn on?",
|
|
32
|
-
"lemo-opuscar": "Add film styles from Lemo-Opuscar?\n\nThe first time an agent uses it, it downloads the Lemo-Opuscar style library from github.com/lemomo-ai/lemo-opuscar (MIT) into ~/lemo-opuscar and installs its Node and Python packages there. It needs git, Node, Python and ffmpeg, and it runs that project's code on your computer. Turn on?",
|
|
33
|
-
};
|
|
34
|
-
const row = (s: Row) =>
|
|
35
|
-
html`<div class="sk" data-q="${[s.title, s.id, s.description, s.group, "skill"].join(" ").toLowerCase()}">
|
|
36
|
-
<div class="sk-h">${skillIcon(s.id)}<span class="sk-n"><b>${s.title}${s.status && s.status !== "stable" ? html` <em class="sk-st">${s.status === "beta" ? "Beta" : "Experimental"}</em>` : ""}</b><span>${s.description}</span></span>
|
|
37
|
-
${s.group === "core" ? (s.agents.some((a) => a.state !== "installed") ? html`<button type="button" class="btn" data-repair="${s.id}" data-own="${String(s.agents.some((a) => a.state === "other"))}">Repair</button>` : html`<span class="hint">Always on</span>`) : html`${s.rea?.node ? nodeButton(s.rea.node) : ""}${s.rea?.update ? html`<button type="button" class="btn" data-rea-update="1">Update to ${s.rea.latest}</button>` : ""}${!s.rea && !s.off && s.agents.some((a) => a.state === "missing") ? html`<button type="button" class="btn" data-skill="${s.id}" data-on="true">Install</button>` : ""}${toggleSwitch(!s.off, { sm: true, attrs: { "data-skill": s.id, "data-on": String(s.off), "data-warn": String(!!s.offByDefault), "aria-label": s.title, title: s.off ? "Off" : "On" } })}`}</div>
|
|
38
|
-
<div class="sk-a">${s.agents.map((a) => html`<img class="sk-ag${a.state === "installed" ? "" : " off"}" src="${AGENT_FAVICONS[AGENT_CMD[a.agent] ?? ""] ?? ""}" width="18" height="18" alt="${a.agent}: ${WORD[a.state] ?? a.state}" title="${a.agent}: ${WORD[a.state] ?? a.state}">`)}${s.needs.map((n) => html`<span class="${n.found ? "" : "miss"}">Needs ${n.name}${n.found ? "" : " (not found)"}</span>`)}${s.note ? html`<span>${s.note}</span>` : ""}</div>
|
|
39
|
-
</div>`;
|
|
40
|
-
|
|
41
|
-
export const skillRows = (skills: Row[]) =>
|
|
42
|
-
html`${GROUPS.filter(([g]) => skills.some((s) => s.group === g)).map(([g, label], i) => html`<h3 class="sg">${label}${i ? "" : html` <button type="button" id="sk-recheck">Re-check</button>`}</h3><div class="sgrp">${skills.filter((s) => s.group === g).map(row)}</div>`)}`;
|
|
43
|
-
|
|
44
|
-
const nodeWord = (n: NodeNeed) => n.state === "missing" ? "Install Node.js" : "Update Node.js";
|
|
45
|
-
const nodeButton = (n: NodeNeed) => n.how === "link"
|
|
46
|
-
? html`<a class="btn" href="${n.url}" target="_blank" rel="noopener">Get Node.js</a>`
|
|
47
|
-
: html`<button type="button" class="btn" data-rea-node="${n.state}" data-cmd="${n.command}">${nodeWord(n)}</button>`;
|
|
48
|
-
|
|
49
|
-
// REA: the board runs REA's dry run first and shows what would change; only a yes to that
|
|
50
|
-
// exact plan is applied. Off runs REA's own uninstall, whoever set REA up.
|
|
51
|
-
async function reaSwitch(on: boolean, update: boolean, redraw: () => Promise<unknown>) {
|
|
52
|
-
if (!on) {
|
|
53
|
-
if (!confirm("Turn REA off?\n\nThis runs REA's own uninstall: it removes REA's MCP registration and skill from every agent, also a REA you set up yourself outside kaizen. Ghidra, Java and REA's data stay.")) return;
|
|
54
|
-
toast("Removing REA…");
|
|
55
|
-
const j = await post("/rea", { step: "off" });
|
|
56
|
-
if (!j.error) toast(j.hint ? `REA removed. Claude still has one: run ${j.hint}` : "REA removed. Restart your agents");
|
|
57
|
-
return redraw();
|
|
58
|
-
}
|
|
59
|
-
toast(update ? "Checking the newest REA…" : "Asking REA what it would change… (first time downloads REA)");
|
|
60
|
-
const plan = await post("/rea", { step: "plan", update });
|
|
61
|
-
if (plan.error) return redraw();
|
|
62
|
-
const files = plan.files?.length ? plan.files.map((f: string) => " " + f).join("\n") : " (REA did not list files)";
|
|
63
|
-
if (!confirm(`${update ? "Update" : "Set up"} REA ${plan.version} for: ${plan.clients.join(", ")}\n\nREA's setup will change:\n${files}\n\nIt backs each file up first. Agents can then run REA's reverse-engineering tools on files you point them at. Go ahead?`)) return;
|
|
64
|
-
toast(update ? "Updating REA…" : "Setting up REA…");
|
|
65
|
-
const j = await post("/rea", { step: "apply", confirm: true, token: plan.token });
|
|
66
|
-
if (!j.error) toast(`REA ${j.version} is set up. Restart your agents to load its tools`);
|
|
67
|
-
return redraw();
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export function wireSkills(redraw: () => Promise<unknown>, token = "") {
|
|
71
|
-
const again = $("sk-recheck");
|
|
72
|
-
if (again) again.onclick = () => redraw();
|
|
73
|
-
const up = $("pbody").querySelector<HTMLElement>("[data-rea-update]");
|
|
74
|
-
if (up) up.onclick = () => reaSwitch(true, true, redraw);
|
|
75
|
-
const nb = $("pbody").querySelector<HTMLElement>("[data-rea-node]");
|
|
76
|
-
if (nb) nb.onclick = async () => {
|
|
77
|
-
const what = nb.dataset.reaNode === "missing" ? "Install" : "Update";
|
|
78
|
-
if (!confirm(`${what} Node.js?\n\nREA needs it. kaizen will run:\n ${nb.dataset.cmd}\n\nThis installs Node.js for the whole computer, so other apps that use Node.js get it too. Your system may ask for permission. Go ahead?`)) return;
|
|
79
|
-
nb.setAttribute("disabled", "");
|
|
80
|
-
toast(`${what === "Install" ? "Installing" : "Updating"} Node.js… this can take a few minutes`);
|
|
81
|
-
const j = await post("/rea", { step: "node", confirm: true, token });
|
|
82
|
-
if (!j.error) toast("Node.js is ready. Restart any agents that are open so REA's tools load");
|
|
83
|
-
await redraw();
|
|
84
|
-
};
|
|
85
|
-
// A core skill one agent is missing: relink it; a real folder in the way is replaced only after asking.
|
|
86
|
-
$("pbody").querySelectorAll<HTMLElement>("[data-repair]").forEach((b) => (b.onclick = async () => {
|
|
87
|
-
const own = b.dataset.own === "true";
|
|
88
|
-
if (own && !confirm("Replace your own copy?\n\nFor at least one agent, a folder or link of the same name is in the way. It is deleted and kaizen's skill is linked in its place. Go ahead?")) return;
|
|
89
|
-
const j = await post("/skills", { id: b.dataset.repair, repair: true, ...(own ? { replace: true, token } : {}) });
|
|
90
|
-
toast(j.error ? j.error : "Repaired. Applies to new sessions");
|
|
91
|
-
await redraw();
|
|
92
|
-
}));
|
|
93
|
-
$("pbody").querySelectorAll<HTMLElement>("[data-skill]").forEach((b) => (b.onclick = async () => {
|
|
94
|
-
const on = b.dataset.on === "true";
|
|
95
|
-
if (b.dataset.skill === "rea") return reaSwitch(on, false, redraw);
|
|
96
|
-
// An off-by-default skill gives agents a power the user never had to grant: say so, then ask.
|
|
97
|
-
const warn = on && b.dataset.warn === "true";
|
|
98
|
-
if (warn && !confirm(WARN[b.dataset.skill!] ?? "Turn this skill on?")) return;
|
|
99
|
-
const j = await post("/skills", { id: b.dataset.skill, on, ...(warn ? { confirm: true, token } : {}) });
|
|
100
|
-
toast(j.error ? j.error : "Saved. Applies to new sessions");
|
|
101
|
-
await redraw();
|
|
102
|
-
}));
|
|
103
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { $, html } from "./dom.ts";
|
|
2
|
-
|
|
3
|
-
// The microphone dictation uses, per browser. No choice means the system default.
|
|
4
|
-
const KEY = "kz-mic";
|
|
5
|
-
export const savedMic = () => { try { return localStorage.getItem(KEY) || ""; } catch { return ""; } };
|
|
6
|
-
export const micAudio = (device = "") => ({ channelCount: 1, noiseSuppression: true, echoCancellation: true, ...(device ? { deviceId: { exact: device } } : {}) });
|
|
7
|
-
|
|
8
|
-
// An unplugged choice falls back to the default, and says so. Anything else is the caller's.
|
|
9
|
-
export async function openMic(get: (audio: object) => Promise<MediaStream>, device: string, warn: (m: string) => void) {
|
|
10
|
-
try { return await get(micAudio(device)); } catch (err: any) {
|
|
11
|
-
if (!device || err?.name !== "OverconstrainedError") throw err;
|
|
12
|
-
warn("Chosen microphone not found. Using the default");
|
|
13
|
-
return get(micAudio());
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export const micRow = () => html`<select class="sel" id="v-mic" aria-labelledby="v-mic-l"><option value="">System default</option></select>`;
|
|
18
|
-
|
|
19
|
-
// Device names appear only once the browser has microphone permission.
|
|
20
|
-
export async function fillMics() {
|
|
21
|
-
const s = $("v-mic") as HTMLSelectElement | null;
|
|
22
|
-
if (!s || !navigator.mediaDevices?.enumerateDevices) return;
|
|
23
|
-
const saved = savedMic();
|
|
24
|
-
const mics = (await navigator.mediaDevices.enumerateDevices().catch(() => [])).filter((d) => d.kind === "audioinput" && d.deviceId && d.deviceId !== "default");
|
|
25
|
-
s.innerHTML = html`<option value="">System default</option>${mics.map((d, i) => html`<option value="${d.deviceId}">${d.label || `Microphone ${i + 1}`}</option>`)}`.s;
|
|
26
|
-
s.value = mics.some((d) => d.deviceId === saved) ? saved : "";
|
|
27
|
-
s.onchange = () => { try { localStorage.setItem(KEY, s.value); } catch { /* this browser keeps nothing */ } };
|
|
28
|
-
}
|