@dsh-cove/dsh-web-all 0.0.0-stage → 0.4.4
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/LICENSE +202 -0
- package/README.i18n.yaml +6 -0
- package/README.md +205 -2
- package/README.zh.md +205 -0
- package/cordis.patch.yml +59 -0
- package/lib/client.js +25413 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +20024 -0
- package/lib/invariant.js +6 -0
- package/lib/types/client/compat.d.ts +29 -0
- package/lib/types/client/compat.d.ts.map +1 -0
- package/lib/types/client/compat.js +69 -0
- package/lib/types/client/conversation/git-branch.d.ts +13 -0
- package/lib/types/client/conversation/git-branch.d.ts.map +1 -0
- package/lib/types/client/conversation/git-branch.js +121 -0
- package/lib/types/client/conversation/git-graph/api.d.ts +42 -0
- package/lib/types/client/conversation/git-graph/api.d.ts.map +1 -0
- package/lib/types/client/conversation/git-graph/api.js +72 -0
- package/lib/types/client/conversation/git-graph/branch-chip.d.ts +47 -0
- package/lib/types/client/conversation/git-graph/branch-chip.d.ts.map +1 -0
- package/lib/types/client/conversation/git-graph/branch-chip.js +268 -0
- package/lib/types/client/conversation/git-graph/branch-popover.d.ts +32 -0
- package/lib/types/client/conversation/git-graph/branch-popover.d.ts.map +1 -0
- package/lib/types/client/conversation/git-graph/branch-popover.js +108 -0
- package/lib/types/client/conversation/git-graph/chip.d.ts +24 -0
- package/lib/types/client/conversation/git-graph/chip.d.ts.map +1 -0
- package/lib/types/client/conversation/git-graph/chip.js +15 -0
- package/lib/types/client/conversation/git-graph/create-branch-dialog.d.ts +30 -0
- package/lib/types/client/conversation/git-graph/create-branch-dialog.d.ts.map +1 -0
- package/lib/types/client/conversation/git-graph/create-branch-dialog.js +52 -0
- package/lib/types/client/conversation/git-graph/error-copy.d.ts +17 -0
- package/lib/types/client/conversation/git-graph/error-copy.d.ts.map +1 -0
- package/lib/types/client/conversation/git-graph/error-copy.js +44 -0
- package/lib/types/client/conversation/git-graph/graph-dialog.d.ts +21 -0
- package/lib/types/client/conversation/git-graph/graph-dialog.d.ts.map +1 -0
- package/lib/types/client/conversation/git-graph/graph-dialog.js +112 -0
- package/lib/types/client/conversation/git-graph/hero-seat.d.ts +53 -0
- package/lib/types/client/conversation/git-graph/hero-seat.d.ts.map +1 -0
- package/lib/types/client/conversation/git-graph/hero-seat.js +54 -0
- package/lib/types/client/conversation/git-graph/locales.d.ts +88 -0
- package/lib/types/client/conversation/git-graph/locales.d.ts.map +1 -0
- package/lib/types/client/conversation/git-graph/locales.js +85 -0
- package/lib/types/client/conversation/git-graph/sse-leader.d.ts +37 -0
- package/lib/types/client/conversation/git-graph/sse-leader.d.ts.map +1 -0
- package/lib/types/client/conversation/git-graph/sse-leader.js +101 -0
- package/lib/types/client/conversation/index.d.ts +43 -0
- package/lib/types/client/conversation/index.d.ts.map +1 -0
- package/lib/types/client/conversation/index.js +39 -0
- package/lib/types/client/conversation/selector-context.d.ts +12 -0
- package/lib/types/client/conversation/selector-context.d.ts.map +1 -0
- package/lib/types/client/conversation/selector-context.js +11 -0
- package/lib/types/client/conversation/session-lane-chip.d.ts +72 -0
- package/lib/types/client/conversation/session-lane-chip.d.ts.map +1 -0
- package/lib/types/client/conversation/session-lane-chip.js +163 -0
- package/lib/types/client/conversation/session-lane-locales.d.ts +22 -0
- package/lib/types/client/conversation/session-lane-locales.d.ts.map +1 -0
- package/lib/types/client/conversation/session-lane-locales.js +29 -0
- package/lib/types/client/conversation/subagent-model-dom.d.ts +16 -0
- package/lib/types/client/conversation/subagent-model-dom.d.ts.map +1 -0
- package/lib/types/client/conversation/subagent-model-dom.js +138 -0
- package/lib/types/client/conversation/subagent-model.d.ts +17 -0
- package/lib/types/client/conversation/subagent-model.d.ts.map +1 -0
- package/lib/types/client/conversation/subagent-model.js +156 -0
- package/lib/types/client/conversation/worktree/api.d.ts +97 -0
- package/lib/types/client/conversation/worktree/api.d.ts.map +1 -0
- package/lib/types/client/conversation/worktree/api.js +239 -0
- package/lib/types/client/conversation/worktree/dialogs/DeleteWorktreeDialog.d.ts +35 -0
- package/lib/types/client/conversation/worktree/dialogs/DeleteWorktreeDialog.d.ts.map +1 -0
- package/lib/types/client/conversation/worktree/dialogs/DeleteWorktreeDialog.js +55 -0
- package/lib/types/client/conversation/worktree/dialogs/PrCreateDialog.d.ts +27 -0
- package/lib/types/client/conversation/worktree/dialogs/PrCreateDialog.d.ts.map +1 -0
- package/lib/types/client/conversation/worktree/dialogs/PrCreateDialog.js +49 -0
- package/lib/types/client/conversation/worktree/lane-binding.d.ts +46 -0
- package/lib/types/client/conversation/worktree/lane-binding.d.ts.map +1 -0
- package/lib/types/client/conversation/worktree/lane-binding.js +60 -0
- package/lib/types/client/conversation/worktree/lane-menu.d.ts +51 -0
- package/lib/types/client/conversation/worktree/lane-menu.d.ts.map +1 -0
- package/lib/types/client/conversation/worktree/lane-menu.js +140 -0
- package/lib/types/client/conversation/worktree/lane-open.d.ts +126 -0
- package/lib/types/client/conversation/worktree/lane-open.d.ts.map +1 -0
- package/lib/types/client/conversation/worktree/lane-open.js +140 -0
- package/lib/types/client/conversation/worktree/lane-workspace-sweeper.d.ts +79 -0
- package/lib/types/client/conversation/worktree/lane-workspace-sweeper.d.ts.map +1 -0
- package/lib/types/client/conversation/worktree/lane-workspace-sweeper.js +116 -0
- package/lib/types/client/conversation/worktree/lifecycle.d.ts +29 -0
- package/lib/types/client/conversation/worktree/lifecycle.d.ts.map +1 -0
- package/lib/types/client/conversation/worktree/lifecycle.js +67 -0
- package/lib/types/client/conversation/worktree/locales.d.ts +58 -0
- package/lib/types/client/conversation/worktree/locales.d.ts.map +1 -0
- package/lib/types/client/conversation/worktree/locales.js +86 -0
- package/lib/types/client/conversation/worktree/semantic.d.ts +11 -0
- package/lib/types/client/conversation/worktree/semantic.d.ts.map +1 -0
- package/lib/types/client/conversation/worktree/semantic.js +10 -0
- package/lib/types/client/index.d.ts +14 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/index.js +45 -0
- package/lib/types/client/lark-inbox/i18n.d.ts +63 -0
- package/lib/types/client/lark-inbox/i18n.d.ts.map +1 -0
- package/lib/types/client/lark-inbox/i18n.js +119 -0
- package/lib/types/client/lark-inbox/wizard.d.ts +19 -0
- package/lib/types/client/lark-inbox/wizard.d.ts.map +1 -0
- package/lib/types/client/lark-inbox/wizard.js +158 -0
- package/lib/types/client/notify/i18n.d.ts +47 -0
- package/lib/types/client/notify/i18n.d.ts.map +1 -0
- package/lib/types/client/notify/i18n.js +87 -0
- package/lib/types/client/settings/family-scope.d.ts +23 -0
- package/lib/types/client/settings/family-scope.d.ts.map +1 -0
- package/lib/types/client/settings/family-scope.js +30 -0
- package/lib/types/client/settings/lark-inbox.d.ts +73 -0
- package/lib/types/client/settings/lark-inbox.d.ts.map +1 -0
- package/lib/types/client/settings/lark-inbox.js +144 -0
- package/lib/types/client/settings/notify.d.ts +66 -0
- package/lib/types/client/settings/notify.d.ts.map +1 -0
- package/lib/types/client/settings/notify.js +139 -0
- package/lib/types/client/settings/primitives-0.2.d.ts +137 -0
- package/lib/types/client/settings/primitives-0.2.d.ts.map +1 -0
- package/lib/types/client/settings/primitives-0.2.js +8 -0
- package/lib/types/client/sidebar/RenderBoundary.d.ts +17 -0
- package/lib/types/client/sidebar/RenderBoundary.d.ts.map +1 -0
- package/lib/types/client/sidebar/RenderBoundary.js +18 -0
- package/lib/types/client/sidebar/agent-browser.d.ts +9 -0
- package/lib/types/client/sidebar/agent-browser.d.ts.map +1 -0
- package/lib/types/client/sidebar/agent-browser.js +102 -0
- package/lib/types/client/sidebar/diff-view.d.ts +58 -0
- package/lib/types/client/sidebar/diff-view.d.ts.map +1 -0
- package/lib/types/client/sidebar/diff-view.js +223 -0
- package/lib/types/client/sidebar/git-workbench.d.ts +41 -0
- package/lib/types/client/sidebar/git-workbench.d.ts.map +1 -0
- package/lib/types/client/sidebar/git-workbench.js +480 -0
- package/lib/types/client/sidebar/icons.d.ts +9 -0
- package/lib/types/client/sidebar/icons.d.ts.map +1 -0
- package/lib/types/client/sidebar/icons.js +6 -0
- package/lib/types/client/sidebar/index.d.ts +19 -0
- package/lib/types/client/sidebar/index.d.ts.map +1 -0
- package/lib/types/client/sidebar/index.js +12 -0
- package/lib/types/client/sidebar/native-panels.d.ts +19 -0
- package/lib/types/client/sidebar/native-panels.d.ts.map +1 -0
- package/lib/types/client/sidebar/native-panels.js +103 -0
- package/lib/types/client/sidebar/page-shell.d.ts +52 -0
- package/lib/types/client/sidebar/page-shell.d.ts.map +1 -0
- package/lib/types/client/sidebar/page-shell.js +18 -0
- package/lib/types/client/sidebar/panels/memoir/api.d.ts +258 -0
- package/lib/types/client/sidebar/panels/memoir/api.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/memoir/api.js +135 -0
- package/lib/types/client/sidebar/panels/memoir/controller.d.ts +22 -0
- package/lib/types/client/sidebar/panels/memoir/controller.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/memoir/controller.js +38 -0
- package/lib/types/client/sidebar/panels/memoir/cwd.d.ts +80 -0
- package/lib/types/client/sidebar/panels/memoir/cwd.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/memoir/cwd.js +96 -0
- package/lib/types/client/sidebar/panels/memoir/i18n.d.ts +21 -0
- package/lib/types/client/sidebar/panels/memoir/i18n.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/memoir/i18n.js +288 -0
- package/lib/types/client/sidebar/panels/memoir/panel-activation.d.ts +11 -0
- package/lib/types/client/sidebar/panels/memoir/panel-activation.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/memoir/panel-activation.js +37 -0
- package/lib/types/client/sidebar/panels/memoir/panel.d.ts +26 -0
- package/lib/types/client/sidebar/panels/memoir/panel.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/memoir/panel.js +423 -0
- package/lib/types/client/sidebar/panels/memoir/styles.d.ts +22 -0
- package/lib/types/client/sidebar/panels/memoir/styles.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/memoir/styles.js +774 -0
- package/lib/types/client/sidebar/panels/memoir/types.d.ts +7 -0
- package/lib/types/client/sidebar/panels/memoir/types.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/memoir/types.js +5 -0
- package/lib/types/client/sidebar/panels/ssh/ClusterTab.d.ts +8 -0
- package/lib/types/client/sidebar/panels/ssh/ClusterTab.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/ssh/ClusterTab.js +53 -0
- package/lib/types/client/sidebar/panels/ssh/HostFormDialog.d.ts +13 -0
- package/lib/types/client/sidebar/panels/ssh/HostFormDialog.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/ssh/HostFormDialog.js +110 -0
- package/lib/types/client/sidebar/panels/ssh/HostsTab.d.ts +26 -0
- package/lib/types/client/sidebar/panels/ssh/HostsTab.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/ssh/HostsTab.js +175 -0
- package/lib/types/client/sidebar/panels/ssh/SshPanel.d.ts +14 -0
- package/lib/types/client/sidebar/panels/ssh/SshPanel.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/ssh/SshPanel.js +34 -0
- package/lib/types/client/sidebar/panels/ssh/TerminalTab.d.ts +18 -0
- package/lib/types/client/sidebar/panels/ssh/TerminalTab.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/ssh/TerminalTab.js +207 -0
- package/lib/types/client/sidebar/panels/ssh/TransferTab.d.ts +8 -0
- package/lib/types/client/sidebar/panels/ssh/TransferTab.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/ssh/TransferTab.js +168 -0
- package/lib/types/client/sidebar/panels/ssh/TunnelsTab.d.ts +18 -0
- package/lib/types/client/sidebar/panels/ssh/TunnelsTab.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/ssh/TunnelsTab.js +161 -0
- package/lib/types/client/sidebar/panels/ssh/api.d.ts +80 -0
- package/lib/types/client/sidebar/panels/ssh/api.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/ssh/api.js +333 -0
- package/lib/types/client/sidebar/panels/ssh/controller.d.ts +23 -0
- package/lib/types/client/sidebar/panels/ssh/controller.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/ssh/controller.js +41 -0
- package/lib/types/client/sidebar/panels/ssh/helpers.d.ts +44 -0
- package/lib/types/client/sidebar/panels/ssh/helpers.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/ssh/helpers.js +53 -0
- package/lib/types/client/sidebar/panels/ssh/locales.d.ts +155 -0
- package/lib/types/client/sidebar/panels/ssh/locales.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/ssh/locales.js +312 -0
- package/lib/types/client/sidebar/panels/ssh/xterm.css.d.ts +3 -0
- package/lib/types/client/sidebar/panels/ssh/xterm.css.d.ts.map +1 -0
- package/lib/types/client/sidebar/panels/ssh/xterm.css.js +2 -0
- package/lib/types/client/sidebar/right-pane-i18n.d.ts +121 -0
- package/lib/types/client/sidebar/right-pane-i18n.d.ts.map +1 -0
- package/lib/types/client/sidebar/right-pane-i18n.js +239 -0
- package/lib/types/client/sidebar/right-pane.d.ts +27 -0
- package/lib/types/client/sidebar/right-pane.d.ts.map +1 -0
- package/lib/types/client/sidebar/right-pane.js +112 -0
- package/lib/types/client/sidebar/scope.d.ts +17 -0
- package/lib/types/client/sidebar/scope.d.ts.map +1 -0
- package/lib/types/client/sidebar/scope.js +41 -0
- package/lib/types/client/trust.d.ts +78 -0
- package/lib/types/client/trust.d.ts.map +1 -0
- package/lib/types/client/trust.js +130 -0
- package/lib/types/client/ui-icons.d.ts +19 -0
- package/lib/types/client/ui-icons.d.ts.map +1 -0
- package/lib/types/client/ui-icons.js +33 -0
- package/lib/types/core/git-graph/commands.d.ts +36 -0
- package/lib/types/core/git-graph/commands.d.ts.map +1 -0
- package/lib/types/core/git-graph/commands.js +122 -0
- package/lib/types/core/git-graph/protocol.d.ts +104 -0
- package/lib/types/core/git-graph/protocol.d.ts.map +1 -0
- package/lib/types/core/git-graph/protocol.js +142 -0
- package/lib/types/core/index.d.ts +3 -0
- package/lib/types/core/index.d.ts.map +1 -0
- package/lib/types/core/index.js +2 -0
- package/lib/types/core/lark-inbox/gating.d.ts +21 -0
- package/lib/types/core/lark-inbox/gating.d.ts.map +1 -0
- package/lib/types/core/lark-inbox/gating.js +17 -0
- package/lib/types/core/lark-inbox/queue.d.ts +27 -0
- package/lib/types/core/lark-inbox/queue.d.ts.map +1 -0
- package/lib/types/core/lark-inbox/queue.js +78 -0
- package/lib/types/core/memoir/protocol.d.ts +42 -0
- package/lib/types/core/memoir/protocol.d.ts.map +1 -0
- package/lib/types/core/memoir/protocol.js +8 -0
- package/lib/types/core/no-browser-auth/contract.d.ts +22 -0
- package/lib/types/core/no-browser-auth/contract.d.ts.map +1 -0
- package/lib/types/core/no-browser-auth/contract.js +9 -0
- package/lib/types/core/notify/contract.d.ts +133 -0
- package/lib/types/core/notify/contract.d.ts.map +1 -0
- package/lib/types/core/notify/contract.js +186 -0
- package/lib/types/core/notify/feed.d.ts +116 -0
- package/lib/types/core/notify/feed.d.ts.map +1 -0
- package/lib/types/core/notify/feed.js +214 -0
- package/lib/types/core/playwright-sessions/contracts.d.ts +98 -0
- package/lib/types/core/playwright-sessions/contracts.d.ts.map +1 -0
- package/lib/types/core/playwright-sessions/contracts.js +68 -0
- package/lib/types/core/playwright-sessions/control.d.ts +19 -0
- package/lib/types/core/playwright-sessions/control.d.ts.map +1 -0
- package/lib/types/core/playwright-sessions/control.js +9 -0
- package/lib/types/core/playwright-sessions/index.d.ts +4 -0
- package/lib/types/core/playwright-sessions/index.d.ts.map +1 -0
- package/lib/types/core/playwright-sessions/index.js +3 -0
- package/lib/types/core/playwright-sessions/names.d.ts +4 -0
- package/lib/types/core/playwright-sessions/names.d.ts.map +1 -0
- package/lib/types/core/playwright-sessions/names.js +84 -0
- package/lib/types/core/playwright-sessions/schema.d.ts +4 -0
- package/lib/types/core/playwright-sessions/schema.d.ts.map +1 -0
- package/lib/types/core/playwright-sessions/schema.js +90 -0
- package/lib/types/core/playwright-sessions/wire.d.ts +78 -0
- package/lib/types/core/playwright-sessions/wire.d.ts.map +1 -0
- package/lib/types/core/playwright-sessions/wire.js +103 -0
- package/lib/types/core/remote-access/paths.d.ts +19 -0
- package/lib/types/core/remote-access/paths.d.ts.map +1 -0
- package/lib/types/core/remote-access/paths.js +18 -0
- package/lib/types/core/remote-web-ui/security.d.ts +35 -0
- package/lib/types/core/remote-web-ui/security.d.ts.map +1 -0
- package/lib/types/core/remote-web-ui/security.js +146 -0
- package/lib/types/core/right-pane/protocol.d.ts +25 -0
- package/lib/types/core/right-pane/protocol.d.ts.map +1 -0
- package/lib/types/core/right-pane/protocol.js +91 -0
- package/lib/types/core/schedule-mode/index.d.ts +7 -0
- package/lib/types/core/schedule-mode/index.d.ts.map +1 -0
- package/lib/types/core/schedule-mode/index.js +6 -0
- package/lib/types/core/schedule-mode/native.d.ts +35 -0
- package/lib/types/core/schedule-mode/native.d.ts.map +1 -0
- package/lib/types/core/schedule-mode/native.js +82 -0
- package/lib/types/core/schedule-mode/types.d.ts +177 -0
- package/lib/types/core/schedule-mode/types.d.ts.map +1 -0
- package/lib/types/core/schedule-mode/types.js +65 -0
- package/lib/types/core/schedule-mode/view.d.ts +62 -0
- package/lib/types/core/schedule-mode/view.d.ts.map +1 -0
- package/lib/types/core/schedule-mode/view.js +4 -0
- package/lib/types/core/ssh/protocol.d.ts +215 -0
- package/lib/types/core/ssh/protocol.d.ts.map +1 -0
- package/lib/types/core/ssh/protocol.js +23 -0
- package/lib/types/core/subagent-model/badges.d.ts +73 -0
- package/lib/types/core/subagent-model/badges.d.ts.map +1 -0
- package/lib/types/core/subagent-model/badges.js +105 -0
- package/lib/types/core/worktree/invariant.d.ts +62 -0
- package/lib/types/core/worktree/invariant.d.ts.map +1 -0
- package/lib/types/core/worktree/invariant.js +72 -0
- package/lib/types/core/worktree/manifest.d.ts +71 -0
- package/lib/types/core/worktree/manifest.d.ts.map +1 -0
- package/lib/types/core/worktree/manifest.js +98 -0
- package/lib/types/core/worktree/paths.d.ts +60 -0
- package/lib/types/core/worktree/paths.d.ts.map +1 -0
- package/lib/types/core/worktree/paths.js +118 -0
- package/lib/types/core/worktree/pr-create.d.ts +67 -0
- package/lib/types/core/worktree/pr-create.d.ts.map +1 -0
- package/lib/types/core/worktree/pr-create.js +118 -0
- package/lib/types/core/worktree/protocol.d.ts +7 -0
- package/lib/types/core/worktree/protocol.d.ts.map +1 -0
- package/lib/types/core/worktree/protocol.js +6 -0
- package/lib/types/core/worktree/types.d.ts +292 -0
- package/lib/types/core/worktree/types.d.ts.map +1 -0
- package/lib/types/core/worktree/types.js +14 -0
- package/lib/types/core/worktree/workspace-model.d.ts +56 -0
- package/lib/types/core/worktree/workspace-model.d.ts.map +1 -0
- package/lib/types/core/worktree/workspace-model.js +14 -0
- package/lib/types/host/services/access-trust/index.d.ts +54 -0
- package/lib/types/host/services/access-trust/index.d.ts.map +1 -0
- package/lib/types/host/services/access-trust/index.js +82 -0
- package/lib/types/host/services/access-trust/trust.d.ts +70 -0
- package/lib/types/host/services/access-trust/trust.d.ts.map +1 -0
- package/lib/types/host/services/access-trust/trust.js +187 -0
- package/lib/types/host/services/codex-bridge/bridge.d.ts +106 -0
- package/lib/types/host/services/codex-bridge/bridge.d.ts.map +1 -0
- package/lib/types/host/services/codex-bridge/bridge.js +321 -0
- package/lib/types/host/services/codex-bridge/codex-auth.d.ts +108 -0
- package/lib/types/host/services/codex-bridge/codex-auth.d.ts.map +1 -0
- package/lib/types/host/services/codex-bridge/codex-auth.js +241 -0
- package/lib/types/host/services/codex-bridge/dsh-integration.d.ts +58 -0
- package/lib/types/host/services/codex-bridge/dsh-integration.d.ts.map +1 -0
- package/lib/types/host/services/codex-bridge/dsh-integration.js +120 -0
- package/lib/types/host/services/codex-bridge/http.d.ts +43 -0
- package/lib/types/host/services/codex-bridge/http.d.ts.map +1 -0
- package/lib/types/host/services/codex-bridge/http.js +92 -0
- package/lib/types/host/services/codex-bridge/index.d.ts +63 -0
- package/lib/types/host/services/codex-bridge/index.d.ts.map +1 -0
- package/lib/types/host/services/codex-bridge/index.js +111 -0
- package/lib/types/host/services/codex-bridge/loopback.d.ts +25 -0
- package/lib/types/host/services/codex-bridge/loopback.d.ts.map +1 -0
- package/lib/types/host/services/codex-bridge/loopback.js +68 -0
- package/lib/types/host/services/codex-bridge/routes.d.ts +31 -0
- package/lib/types/host/services/codex-bridge/routes.d.ts.map +1 -0
- package/lib/types/host/services/codex-bridge/routes.js +126 -0
- package/lib/types/host/services/family-config.d.ts +71 -0
- package/lib/types/host/services/family-config.d.ts.map +1 -0
- package/lib/types/host/services/family-config.js +166 -0
- package/lib/types/host/services/family-namespaces.d.ts +24 -0
- package/lib/types/host/services/family-namespaces.d.ts.map +1 -0
- package/lib/types/host/services/family-namespaces.js +30 -0
- package/lib/types/host/services/git-graph/index.d.ts +6 -0
- package/lib/types/host/services/git-graph/index.d.ts.map +1 -0
- package/lib/types/host/services/git-graph/index.js +7 -0
- package/lib/types/host/services/git-graph/routes.d.ts +4 -0
- package/lib/types/host/services/git-graph/routes.d.ts.map +1 -0
- package/lib/types/host/services/git-graph/routes.js +241 -0
- package/lib/types/host/services/git-graph/service.d.ts +52 -0
- package/lib/types/host/services/git-graph/service.d.ts.map +1 -0
- package/lib/types/host/services/git-graph/service.js +301 -0
- package/lib/types/host/services/index.d.ts +23 -0
- package/lib/types/host/services/index.d.ts.map +1 -0
- package/lib/types/host/services/index.js +80 -0
- package/lib/types/host/services/lark-inbox/config.d.ts +24 -0
- package/lib/types/host/services/lark-inbox/config.d.ts.map +1 -0
- package/lib/types/host/services/lark-inbox/config.js +48 -0
- package/lib/types/host/services/lark-inbox/gateway.d.ts +53 -0
- package/lib/types/host/services/lark-inbox/gateway.d.ts.map +1 -0
- package/lib/types/host/services/lark-inbox/gateway.js +171 -0
- package/lib/types/host/services/lark-inbox/host-routes.d.ts +22 -0
- package/lib/types/host/services/lark-inbox/host-routes.d.ts.map +1 -0
- package/lib/types/host/services/lark-inbox/host-routes.js +146 -0
- package/lib/types/host/services/lark-inbox/inbox-store.d.ts +39 -0
- package/lib/types/host/services/lark-inbox/inbox-store.d.ts.map +1 -0
- package/lib/types/host/services/lark-inbox/inbox-store.js +124 -0
- package/lib/types/host/services/lark-inbox/index.d.ts +26 -0
- package/lib/types/host/services/lark-inbox/index.d.ts.map +1 -0
- package/lib/types/host/services/lark-inbox/index.js +135 -0
- package/lib/types/host/services/lark-inbox/tools.d.ts +7 -0
- package/lib/types/host/services/lark-inbox/tools.d.ts.map +1 -0
- package/lib/types/host/services/lark-inbox/tools.js +119 -0
- package/lib/types/host/services/lark-inbox/wizard.d.ts +62 -0
- package/lib/types/host/services/lark-inbox/wizard.d.ts.map +1 -0
- package/lib/types/host/services/lark-inbox/wizard.js +211 -0
- package/lib/types/host/services/lifecycle.d.ts +29 -0
- package/lib/types/host/services/lifecycle.d.ts.map +1 -0
- package/lib/types/host/services/lifecycle.js +93 -0
- package/lib/types/host/services/memoir/index.d.ts +40 -0
- package/lib/types/host/services/memoir/index.d.ts.map +1 -0
- package/lib/types/host/services/memoir/index.js +52 -0
- package/lib/types/host/services/memoir/routes.d.ts +30 -0
- package/lib/types/host/services/memoir/routes.d.ts.map +1 -0
- package/lib/types/host/services/memoir/routes.js +364 -0
- package/lib/types/host/services/memoir/settings.d.ts +27 -0
- package/lib/types/host/services/memoir/settings.d.ts.map +1 -0
- package/lib/types/host/services/memoir/settings.js +120 -0
- package/lib/types/host/services/memoir/store.d.ts +35 -0
- package/lib/types/host/services/memoir/store.d.ts.map +1 -0
- package/lib/types/host/services/memoir/store.js +124 -0
- package/lib/types/host/services/memoir/tools.d.ts +8 -0
- package/lib/types/host/services/memoir/tools.d.ts.map +1 -0
- package/lib/types/host/services/memoir/tools.js +154 -0
- package/lib/types/host/services/no-browser-auth/index.d.ts +25 -0
- package/lib/types/host/services/no-browser-auth/index.d.ts.map +1 -0
- package/lib/types/host/services/no-browser-auth/index.js +42 -0
- package/lib/types/host/services/notify/config.d.ts +105 -0
- package/lib/types/host/services/notify/config.d.ts.map +1 -0
- package/lib/types/host/services/notify/config.js +123 -0
- package/lib/types/host/services/notify/feishu-sender.d.ts +120 -0
- package/lib/types/host/services/notify/feishu-sender.d.ts.map +1 -0
- package/lib/types/host/services/notify/feishu-sender.js +186 -0
- package/lib/types/host/services/notify/host-routes.d.ts +69 -0
- package/lib/types/host/services/notify/host-routes.d.ts.map +1 -0
- package/lib/types/host/services/notify/host-routes.js +112 -0
- package/lib/types/host/services/notify/index.d.ts +80 -0
- package/lib/types/host/services/notify/index.d.ts.map +1 -0
- package/lib/types/host/services/notify/index.js +263 -0
- package/lib/types/host/services/playwright-sessions/child.d.ts +76 -0
- package/lib/types/host/services/playwright-sessions/child.d.ts.map +1 -0
- package/lib/types/host/services/playwright-sessions/child.js +197 -0
- package/lib/types/host/services/playwright-sessions/controller.d.ts +25 -0
- package/lib/types/host/services/playwright-sessions/controller.d.ts.map +1 -0
- package/lib/types/host/services/playwright-sessions/controller.js +104 -0
- package/lib/types/host/services/playwright-sessions/index.d.ts +6 -0
- package/lib/types/host/services/playwright-sessions/index.d.ts.map +1 -0
- package/lib/types/host/services/playwright-sessions/index.js +161 -0
- package/lib/types/host/services/playwright-sessions/live-view.d.ts +32 -0
- package/lib/types/host/services/playwright-sessions/live-view.d.ts.map +1 -0
- package/lib/types/host/services/playwright-sessions/live-view.js +188 -0
- package/lib/types/host/services/playwright-sessions/manager.d.ts +87 -0
- package/lib/types/host/services/playwright-sessions/manager.d.ts.map +1 -0
- package/lib/types/host/services/playwright-sessions/manager.js +203 -0
- package/lib/types/host/services/playwright-sessions/profile-gc.d.ts +39 -0
- package/lib/types/host/services/playwright-sessions/profile-gc.d.ts.map +1 -0
- package/lib/types/host/services/playwright-sessions/profile-gc.js +72 -0
- package/lib/types/host/services/playwright-sessions/routes.d.ts +18 -0
- package/lib/types/host/services/playwright-sessions/routes.d.ts.map +1 -0
- package/lib/types/host/services/playwright-sessions/routes.js +87 -0
- package/lib/types/host/services/remote-access/boot-scripts.d.ts +55 -0
- package/lib/types/host/services/remote-access/boot-scripts.d.ts.map +1 -0
- package/lib/types/host/services/remote-access/boot-scripts.js +109 -0
- package/lib/types/host/services/remote-access/index.d.ts +28 -0
- package/lib/types/host/services/remote-access/index.d.ts.map +1 -0
- package/lib/types/host/services/remote-access/index.js +47 -0
- package/lib/types/host/services/remote-access/routes.d.ts +42 -0
- package/lib/types/host/services/remote-access/routes.d.ts.map +1 -0
- package/lib/types/host/services/remote-access/routes.js +119 -0
- package/lib/types/host/services/remote-web-ui/index.d.ts +21 -0
- package/lib/types/host/services/remote-web-ui/index.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/index.js +325 -0
- package/lib/types/host/services/remote-web-ui/server-mode/accounts.d.ts +115 -0
- package/lib/types/host/services/remote-web-ui/server-mode/accounts.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server-mode/accounts.js +396 -0
- package/lib/types/host/services/remote-web-ui/server-mode/cookie.d.ts +28 -0
- package/lib/types/host/services/remote-web-ui/server-mode/cookie.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server-mode/cookie.js +48 -0
- package/lib/types/host/services/remote-web-ui/server-mode/dsh-home.d.ts +17 -0
- package/lib/types/host/services/remote-web-ui/server-mode/dsh-home.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server-mode/dsh-home.js +40 -0
- package/lib/types/host/services/remote-web-ui/server-mode/external-auth.d.ts +73 -0
- package/lib/types/host/services/remote-web-ui/server-mode/external-auth.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server-mode/external-auth.js +242 -0
- package/lib/types/host/services/remote-web-ui/server-mode/fence.d.ts +23 -0
- package/lib/types/host/services/remote-web-ui/server-mode/fence.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server-mode/fence.js +24 -0
- package/lib/types/host/services/remote-web-ui/server-mode/gateway-routes.d.ts +89 -0
- package/lib/types/host/services/remote-web-ui/server-mode/gateway-routes.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server-mode/gateway-routes.js +768 -0
- package/lib/types/host/services/remote-web-ui/server-mode/gateway.d.ts +99 -0
- package/lib/types/host/services/remote-web-ui/server-mode/gateway.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server-mode/gateway.js +679 -0
- package/lib/types/host/services/remote-web-ui/server-mode/http.d.ts +43 -0
- package/lib/types/host/services/remote-web-ui/server-mode/http.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server-mode/http.js +92 -0
- package/lib/types/host/services/remote-web-ui/server-mode/integrated-auth.d.ts +42 -0
- package/lib/types/host/services/remote-web-ui/server-mode/integrated-auth.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server-mode/integrated-auth.js +73 -0
- package/lib/types/host/services/remote-web-ui/server-mode/lan.d.ts +13 -0
- package/lib/types/host/services/remote-web-ui/server-mode/lan.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server-mode/lan.js +17 -0
- package/lib/types/host/services/remote-web-ui/server-mode/loopback.d.ts +25 -0
- package/lib/types/host/services/remote-web-ui/server-mode/loopback.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server-mode/loopback.js +68 -0
- package/lib/types/host/services/remote-web-ui/server-mode/posture.d.ts +75 -0
- package/lib/types/host/services/remote-web-ui/server-mode/posture.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server-mode/posture.js +116 -0
- package/lib/types/host/services/remote-web-ui/server-mode/roles.d.ts +44 -0
- package/lib/types/host/services/remote-web-ui/server-mode/roles.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server-mode/roles.js +47 -0
- package/lib/types/host/services/remote-web-ui/server-mode/server-boot.d.ts +21 -0
- package/lib/types/host/services/remote-web-ui/server-mode/server-boot.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server-mode/server-boot.js +37 -0
- package/lib/types/host/services/remote-web-ui/server-mode/sessions.d.ts +111 -0
- package/lib/types/host/services/remote-web-ui/server-mode/sessions.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server-mode/sessions.js +298 -0
- package/lib/types/host/services/remote-web-ui/server.d.ts +82 -0
- package/lib/types/host/services/remote-web-ui/server.d.ts.map +1 -0
- package/lib/types/host/services/remote-web-ui/server.js +492 -0
- package/lib/types/host/services/resources.d.ts +9 -0
- package/lib/types/host/services/resources.d.ts.map +1 -0
- package/lib/types/host/services/resources.js +98 -0
- package/lib/types/host/services/right-pane/browser.d.ts +42 -0
- package/lib/types/host/services/right-pane/browser.d.ts.map +1 -0
- package/lib/types/host/services/right-pane/browser.js +106 -0
- package/lib/types/host/services/right-pane/index.d.ts +22 -0
- package/lib/types/host/services/right-pane/index.d.ts.map +1 -0
- package/lib/types/host/services/right-pane/index.js +114 -0
- package/lib/types/host/services/right-pane/wire.d.ts +6 -0
- package/lib/types/host/services/right-pane/wire.d.ts.map +1 -0
- package/lib/types/host/services/right-pane/wire.js +9 -0
- package/lib/types/host/services/schedule-mode/config.d.ts +11 -0
- package/lib/types/host/services/schedule-mode/config.d.ts.map +1 -0
- package/lib/types/host/services/schedule-mode/config.js +15 -0
- package/lib/types/host/services/schedule-mode/engine.d.ts +150 -0
- package/lib/types/host/services/schedule-mode/engine.d.ts.map +1 -0
- package/lib/types/host/services/schedule-mode/engine.js +672 -0
- package/lib/types/host/services/schedule-mode/index.d.ts +33 -0
- package/lib/types/host/services/schedule-mode/index.d.ts.map +1 -0
- package/lib/types/host/services/schedule-mode/index.js +175 -0
- package/lib/types/host/services/schedule-mode/routes.d.ts +31 -0
- package/lib/types/host/services/schedule-mode/routes.d.ts.map +1 -0
- package/lib/types/host/services/schedule-mode/routes.js +109 -0
- package/lib/types/host/services/schedule-mode/session-create.d.ts +27 -0
- package/lib/types/host/services/schedule-mode/session-create.d.ts.map +1 -0
- package/lib/types/host/services/schedule-mode/session-create.js +21 -0
- package/lib/types/host/services/schedule-mode/store.d.ts +36 -0
- package/lib/types/host/services/schedule-mode/store.d.ts.map +1 -0
- package/lib/types/host/services/schedule-mode/store.js +309 -0
- package/lib/types/host/services/schedule-mode/tools.d.ts +13 -0
- package/lib/types/host/services/schedule-mode/tools.d.ts.map +1 -0
- package/lib/types/host/services/schedule-mode/tools.js +132 -0
- package/lib/types/host/services/ssh/engine.d.ts +162 -0
- package/lib/types/host/services/ssh/engine.d.ts.map +1 -0
- package/lib/types/host/services/ssh/engine.js +699 -0
- package/lib/types/host/services/ssh/host-keys.d.ts +10 -0
- package/lib/types/host/services/ssh/host-keys.d.ts.map +1 -0
- package/lib/types/host/services/ssh/host-keys.js +108 -0
- package/lib/types/host/services/ssh/index.d.ts +38 -0
- package/lib/types/host/services/ssh/index.d.ts.map +1 -0
- package/lib/types/host/services/ssh/index.js +47 -0
- package/lib/types/host/services/ssh/routes.d.ts +29 -0
- package/lib/types/host/services/ssh/routes.d.ts.map +1 -0
- package/lib/types/host/services/ssh/routes.js +465 -0
- package/lib/types/host/services/ssh/store.d.ts +40 -0
- package/lib/types/host/services/ssh/store.d.ts.map +1 -0
- package/lib/types/host/services/ssh/store.js +330 -0
- package/lib/types/host/services/ssh/terminal-ws.d.ts +9 -0
- package/lib/types/host/services/ssh/terminal-ws.d.ts.map +1 -0
- package/lib/types/host/services/ssh/terminal-ws.js +142 -0
- package/lib/types/host/services/ssh/tools.d.ts +11 -0
- package/lib/types/host/services/ssh/tools.d.ts.map +1 -0
- package/lib/types/host/services/ssh/tools.js +270 -0
- package/lib/types/host/services/web-render/contracts.d.ts +93 -0
- package/lib/types/host/services/web-render/contracts.d.ts.map +1 -0
- package/lib/types/host/services/web-render/contracts.js +60 -0
- package/lib/types/host/services/web-render/index.d.ts +58 -0
- package/lib/types/host/services/web-render/index.d.ts.map +1 -0
- package/lib/types/host/services/web-render/index.js +90 -0
- package/lib/types/host/services/web-render/provider.d.ts +37 -0
- package/lib/types/host/services/web-render/provider.d.ts.map +1 -0
- package/lib/types/host/services/web-render/provider.js +274 -0
- package/lib/types/host/services/web-search-anthropic/contracts.d.ts +117 -0
- package/lib/types/host/services/web-search-anthropic/contracts.d.ts.map +1 -0
- package/lib/types/host/services/web-search-anthropic/contracts.js +90 -0
- package/lib/types/host/services/web-search-anthropic/index.d.ts +53 -0
- package/lib/types/host/services/web-search-anthropic/index.d.ts.map +1 -0
- package/lib/types/host/services/web-search-anthropic/index.js +123 -0
- package/lib/types/host/services/web-search-anthropic/provider.d.ts +101 -0
- package/lib/types/host/services/web-search-anthropic/provider.d.ts.map +1 -0
- package/lib/types/host/services/web-search-anthropic/provider.js +237 -0
- package/lib/types/host/services/worktree/git-runner.d.ts +82 -0
- package/lib/types/host/services/worktree/git-runner.d.ts.map +1 -0
- package/lib/types/host/services/worktree/git-runner.js +81 -0
- package/lib/types/host/services/worktree/git.d.ts +94 -0
- package/lib/types/host/services/worktree/git.d.ts.map +1 -0
- package/lib/types/host/services/worktree/git.js +153 -0
- package/lib/types/host/services/worktree/http.d.ts +12 -0
- package/lib/types/host/services/worktree/http.d.ts.map +1 -0
- package/lib/types/host/services/worktree/http.js +34 -0
- package/lib/types/host/services/worktree/index.d.ts +38 -0
- package/lib/types/host/services/worktree/index.d.ts.map +1 -0
- package/lib/types/host/services/worktree/index.js +78 -0
- package/lib/types/host/services/worktree/lane-tool.d.ts +22 -0
- package/lib/types/host/services/worktree/lane-tool.d.ts.map +1 -0
- package/lib/types/host/services/worktree/lane-tool.js +92 -0
- package/lib/types/host/services/worktree/manager.d.ts +410 -0
- package/lib/types/host/services/worktree/manager.d.ts.map +1 -0
- package/lib/types/host/services/worktree/manager.js +1485 -0
- package/lib/types/host/services/worktree/model-override.d.ts +20 -0
- package/lib/types/host/services/worktree/model-override.d.ts.map +1 -0
- package/lib/types/host/services/worktree/model-override.js +35 -0
- package/lib/types/host/services/worktree/routes.d.ts +50 -0
- package/lib/types/host/services/worktree/routes.d.ts.map +1 -0
- package/lib/types/host/services/worktree/routes.js +695 -0
- package/lib/types/host/services/worktree/run-command.d.ts +26 -0
- package/lib/types/host/services/worktree/run-command.d.ts.map +1 -0
- package/lib/types/host/services/worktree/run-command.js +36 -0
- package/lib/types/host/services/worktree/session-lane/manager.d.ts +109 -0
- package/lib/types/host/services/worktree/session-lane/manager.d.ts.map +1 -0
- package/lib/types/host/services/worktree/session-lane/manager.js +172 -0
- package/lib/types/host/services/worktree/workspace-model-routes.d.ts +21 -0
- package/lib/types/host/services/worktree/workspace-model-routes.d.ts.map +1 -0
- package/lib/types/host/services/worktree/workspace-model-routes.js +198 -0
- package/lib/types/host/services/worktree/workspace-model.d.ts +48 -0
- package/lib/types/host/services/worktree/workspace-model.d.ts.map +1 -0
- package/lib/types/host/services/worktree/workspace-model.js +113 -0
- package/lib/types/index.d.ts +47 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +52 -0
- package/lib/types/invariant.d.ts +4 -0
- package/lib/types/invariant.d.ts.map +1 -0
- package/lib/types/invariant.js +3 -0
- package/package.json +153 -3
- package/presets/code-vibe/THIRD_PARTY_NOTICES.md +55 -0
- package/presets/code-vibe/skills/UPSTREAM.md +104 -0
- package/presets/code-vibe/skills/agent-experience/SKILL.md +15 -0
- package/presets/code-vibe/skills/agent-operation/SKILL.md +43 -0
- package/presets/code-vibe/skills/code-review/SKILL.md +45 -0
- package/presets/code-vibe/skills/dsh-ci-test-reliability/SKILL.md +133 -0
- package/presets/code-vibe/skills/dsh-ci-test-reliability/references/ci-flake-diagnosis.md +60 -0
- package/presets/code-vibe/skills/dsh-find-simplifications/SKILL.md +69 -0
- package/presets/code-vibe/skills/dsh-find-simplifications/references/historical-patterns.md +45 -0
- package/presets/code-vibe/skills/dsh-merging-stacked-prs/SKILL.md +129 -0
- package/presets/code-vibe/skills/dsh-prose-standard/SKILL.md +83 -0
- package/presets/code-vibe/skills/dsh-prose-standard/references/examples.md +169 -0
- package/presets/code-vibe/skills/dsh-speed-up-perf/SKILL.md +94 -0
- package/presets/code-vibe/skills/dsh-trim-cot-leakage/SKILL.md +47 -0
- package/presets/code-vibe/skills/dsh-trim-cot-leakage/references/examples.md +275 -0
- package/presets/code-vibe/skills/dsh-trim-cot-leakage/references/recall-batteries.md +52 -0
- package/presets/code-vibe/skills/frontend-design/SKILL.md +60 -0
- package/presets/code-vibe/skills/frontend-design/references/critique-format.md +35 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/LOAD-MAP.md +81 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/README.md +53 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/anchor.md +51 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/audit/ai-tells.md +59 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/audit/web-interface.md +14 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/change-control.md +62 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/copy.md +65 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/craft-knobs.md +61 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/debug-playbook.md +37 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/exemplars/README.md +64 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/plan-architecture.checklist.json +13 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/product-judgment.md +113 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/system-architecture.md +108 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/tokens/README.md +26 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/tokens/color-roles.md +49 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/tokens/motion.md +51 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/tokens/scale.md +89 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/ui-page-gate.md +61 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/ui-surface.checklist.json +49 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/ux.md +76 -0
- package/presets/code-vibe/skills/frontend-design/references/design-standards/visual.md +52 -0
- package/presets/code-vibe/skills/frontend-design/references/perceptible-path.md +27 -0
- package/presets/code-vibe/skills/frontend-design/references/product-package.md +80 -0
- package/presets/code-vibe/skills/frontend-design/references/scheme-antipatterns.md +21 -0
- package/presets/code-vibe/skills/quality-review/SKILL.md +57 -0
- package/presets/code-vibe/skills/quality-review/references/bounded-verify.md +37 -0
- package/presets/code-vibe/skills/quality-review/references/browser-verify.md +81 -0
- package/presets/code-vibe/skills/quality-review/references/evidence-contract.md +194 -0
- package/presets/code-vibe/skills/quality-review/references/falsify-checklist.md +44 -0
- package/presets/code-vibe/skills/quality-review/references/human-acceptance-pack.md +68 -0
- package/presets/code-vibe/skills/quality-review/references/product-regression.md +51 -0
- package/presets/code-vibe/skills/quality-review/references/ux-standards.md +37 -0
- package/presets/code-vibe/skills/quality-review/references/ux-walkthrough.md +49 -0
- package/presets/code-vibe/skills/quality-review/references/validation-report.md +22 -0
- package/presets/code-vibe/skills/quality-review/references/verification-loop.md +95 -0
- package/presets/code-vibe/skills/quality-review/references/version-acceptance-matrix.md +131 -0
- package/presets/code-vibe/skills/record-browser-gif/SKILL.md +174 -0
- package/presets/code-vibe/skills/record-browser-gif/scripts/encode_gif.py +337 -0
- package/presets/code-vibe/skills/record-browser-gif/scripts/test_encode_gif.py +103 -0
- package/presets/code-vibe/skills/wish-programming/SKILL.md +150 -0
- package/presets/code-vibe/skills/wish-programming/references/roles/arch-reviewer.md +26 -0
- package/presets/code-vibe/skills/wish-programming/references/roles/design-reviewer.md +32 -0
- package/presets/code-vibe/skills/wish-programming/references/roles/pm-reviewer.md +26 -0
- package/presets/code-vibe/skills/wish-programming/references/roles/qa-reviewer.md +16 -0
- package/presets/code-vibe/skills/wish-programming/references/roles/security-reviewer.md +16 -0
- package/presets/code-vibe/skills/wish-programming/references/roles/sre-reviewer.md +16 -0
- package/presets/code-vibe/skills/wish-programming/references/roles/ux-adversary.md +16 -0
- package/presets/code-vibe/skills/wish-programming/references/templates/arch.md.tpl +51 -0
- package/presets/code-vibe/skills/wish-programming/references/templates/brief.md.tpl +36 -0
- package/presets/code-vibe/skills/wish-programming/references/templates/confirmation-pack.md +54 -0
- package/presets/code-vibe/skills/wish-programming/references/templates/design-spec.md.tpl +49 -0
- package/presets/code-vibe/skills/wish-programming/references/templates/module-readme.md +37 -0
- package/presets/code-vibe/skills/wish-programming/references/templates/product.md.tpl +74 -0
- package/presets/code-vibe/skills/wish-programming/references/templates/requirements.md.tpl +31 -0
- package/presets/code-vibe/skills/wish-programming/references/workflow-template.md +122 -0
- package/presets/code-vibe/skills/wish-programming/scripts/MANIFEST.sha256 +11 -0
- package/presets/code-vibe/skills/wish-programming/scripts/check_spec.py +416 -0
- package/presets/code-vibe/skills/wish-programming/scripts/check_whitelist.py +193 -0
- package/presets/code-vibe/skills/wish-programming/scripts/coverage_check.py +199 -0
- package/presets/code-vibe/skills/wish-programming/scripts/gate-lock.sh +46 -0
- package/presets/code-vibe/skills/wish-programming/scripts/journey.sh +281 -0
- package/presets/code-vibe/skills/wish-programming/scripts/project.sh +152 -0
- package/presets/code-vibe/skills/wish-programming/scripts/replay.sh +65 -0
- package/presets/code-vibe/skills/wish-programming/scripts/scan_drift.py +79 -0
- package/presets/code-vibe/skills/wish-programming/scripts/verify.sh +169 -0
- package/presets/code-vibe/skills/wish-programming/scripts/verify_preset_budgets.py +218 -0
- package/presets/code-vibe/skills/wish-programming/scripts/wish.sh +150 -0
- package/presets/code-vibe.patch.yml +325 -0
- package/presets/hiopen.patch.yml +109 -0
- package/src/client/compat.ts +86 -0
- package/src/client/conversation/conversation.module.css +264 -0
- package/src/client/conversation/git-branch.tsx +152 -0
- package/src/client/conversation/git-graph/LICENSE.git-graph +202 -0
- package/src/client/conversation/git-graph/api.ts +85 -0
- package/src/client/conversation/git-graph/branch-chip.tsx +354 -0
- package/src/client/conversation/git-graph/branch-popover.tsx +185 -0
- package/src/client/conversation/git-graph/chip.tsx +47 -0
- package/src/client/conversation/git-graph/create-branch-dialog.tsx +108 -0
- package/src/client/conversation/git-graph/error-copy.ts +50 -0
- package/src/client/conversation/git-graph/git-graph.module.css +792 -0
- package/src/client/conversation/git-graph/graph-dialog.tsx +196 -0
- package/src/client/conversation/git-graph/hero-seat.ts +76 -0
- package/src/client/conversation/git-graph/locales.ts +90 -0
- package/src/client/conversation/git-graph/sse-leader.ts +124 -0
- package/src/client/conversation/index.ts +82 -0
- package/src/client/conversation/selector-context.tsx +24 -0
- package/src/client/conversation/session-lane-chip.tsx +262 -0
- package/src/client/conversation/session-lane-locales.ts +34 -0
- package/src/client/conversation/subagent-model-dom.ts +157 -0
- package/src/client/conversation/subagent-model.ts +198 -0
- package/src/client/conversation/worktree/api.ts +283 -0
- package/src/client/conversation/worktree/dialogs/DeleteWorktreeDialog.tsx +111 -0
- package/src/client/conversation/worktree/dialogs/PrCreateDialog.tsx +114 -0
- package/src/client/conversation/worktree/lane-binding.ts +77 -0
- package/src/client/conversation/worktree/lane-menu.tsx +247 -0
- package/src/client/conversation/worktree/lane-open.ts +204 -0
- package/src/client/conversation/worktree/lane-workspace-sweeper.ts +136 -0
- package/src/client/conversation/worktree/lifecycle.ts +75 -0
- package/src/client/conversation/worktree/locales.ts +97 -0
- package/src/client/conversation/worktree/semantic.ts +10 -0
- package/src/client/conversation/worktree/worktree.module.css +70 -0
- package/src/client/css-modules.d.ts +8 -0
- package/src/client/index.ts +58 -0
- package/src/client/lark-inbox/i18n.ts +125 -0
- package/src/client/lark-inbox/lark-wizard.module.css +88 -0
- package/src/client/lark-inbox/wizard.tsx +211 -0
- package/src/client/notify/i18n.ts +93 -0
- package/src/client/settings/family-scope.ts +45 -0
- package/src/client/settings/lark-inbox.tsx +319 -0
- package/src/client/settings/notify.tsx +288 -0
- package/src/client/settings/primitives-0.2.ts +148 -0
- package/src/client/settings/settings-shell.module.css +56 -0
- package/src/client/sidebar/RenderBoundary.tsx +17 -0
- package/src/client/sidebar/agent-browser.tsx +114 -0
- package/src/client/sidebar/diff-view.tsx +314 -0
- package/src/client/sidebar/git-workbench.tsx +700 -0
- package/src/client/sidebar/icons.tsx +23 -0
- package/src/client/sidebar/index.ts +28 -0
- package/src/client/sidebar/native-panels.tsx +149 -0
- package/src/client/sidebar/page-shell.module.css +96 -0
- package/src/client/sidebar/page-shell.tsx +86 -0
- package/src/client/sidebar/panels/memoir/api.ts +300 -0
- package/src/client/sidebar/panels/memoir/controller.ts +47 -0
- package/src/client/sidebar/panels/memoir/cwd.ts +140 -0
- package/src/client/sidebar/panels/memoir/i18n.ts +300 -0
- package/src/client/sidebar/panels/memoir/panel-activation.ts +42 -0
- package/src/client/sidebar/panels/memoir/panel.tsx +869 -0
- package/src/client/sidebar/panels/memoir/styles.ts +776 -0
- package/src/client/sidebar/panels/memoir/types.ts +7 -0
- package/src/client/sidebar/panels/ssh/ClusterTab.tsx +123 -0
- package/src/client/sidebar/panels/ssh/HostFormDialog.tsx +243 -0
- package/src/client/sidebar/panels/ssh/HostsTab.tsx +290 -0
- package/src/client/sidebar/panels/ssh/SshPanel.tsx +76 -0
- package/src/client/sidebar/panels/ssh/TerminalTab.tsx +290 -0
- package/src/client/sidebar/panels/ssh/TransferTab.tsx +232 -0
- package/src/client/sidebar/panels/ssh/TunnelsTab.tsx +204 -0
- package/src/client/sidebar/panels/ssh/api.ts +388 -0
- package/src/client/sidebar/panels/ssh/controller.ts +48 -0
- package/src/client/sidebar/panels/ssh/helpers.ts +70 -0
- package/src/client/sidebar/panels/ssh/locales.ts +318 -0
- package/src/client/sidebar/panels/ssh/panel.module.css +801 -0
- package/src/client/sidebar/panels/ssh/xterm.css.ts +2 -0
- package/src/client/sidebar/right-pane-i18n.ts +243 -0
- package/src/client/sidebar/right-pane.tsx +156 -0
- package/src/client/sidebar/scope.ts +54 -0
- package/src/client/sidebar/sidebar-header.module.css +72 -0
- package/src/client/sidebar/sidebar.module.css +619 -0
- package/src/client/trust.ts +187 -0
- package/src/client/ui-icons.ts +35 -0
- package/src/core/git-graph/commands.ts +107 -0
- package/src/core/git-graph/protocol.ts +238 -0
- package/src/core/index.ts +2 -0
- package/src/core/lark-inbox/gating.ts +35 -0
- package/src/core/lark-inbox/queue.ts +100 -0
- package/src/core/memoir/protocol.ts +46 -0
- package/src/core/no-browser-auth/contract.ts +25 -0
- package/src/core/notify/contract.ts +236 -0
- package/src/core/notify/feed.ts +235 -0
- package/src/core/playwright-sessions/contracts.ts +143 -0
- package/src/core/playwright-sessions/control.ts +33 -0
- package/src/core/playwright-sessions/index.ts +3 -0
- package/src/core/playwright-sessions/names.ts +83 -0
- package/src/core/playwright-sessions/schema.ts +102 -0
- package/src/core/playwright-sessions/wire.ts +142 -0
- package/src/core/remote-access/paths.ts +23 -0
- package/src/core/remote-web-ui/security.ts +171 -0
- package/src/core/right-pane/protocol.ts +94 -0
- package/src/core/schedule-mode/index.ts +6 -0
- package/src/core/schedule-mode/native.ts +105 -0
- package/src/core/schedule-mode/types.ts +182 -0
- package/src/core/schedule-mode/view.ts +66 -0
- package/src/core/ssh/protocol.ts +212 -0
- package/src/core/subagent-model/badges.ts +161 -0
- package/src/core/worktree/invariant.ts +101 -0
- package/src/core/worktree/manifest.ts +135 -0
- package/src/core/worktree/paths.ts +123 -0
- package/src/core/worktree/pr-create.ts +157 -0
- package/src/core/worktree/protocol.ts +7 -0
- package/src/core/worktree/types.ts +317 -0
- package/src/core/worktree/workspace-model.ts +61 -0
- package/src/host/services/access-trust/index.ts +127 -0
- package/src/host/services/access-trust/trust.ts +189 -0
- package/src/host/services/codex-bridge/bridge.ts +392 -0
- package/src/host/services/codex-bridge/codex-auth.ts +352 -0
- package/src/host/services/codex-bridge/dsh-integration.ts +169 -0
- package/src/host/services/codex-bridge/http.ts +105 -0
- package/src/host/services/codex-bridge/index.ts +154 -0
- package/src/host/services/codex-bridge/loopback.ts +63 -0
- package/src/host/services/codex-bridge/routes.ts +143 -0
- package/src/host/services/family-config.ts +224 -0
- package/src/host/services/family-namespaces.ts +39 -0
- package/src/host/services/git-graph/index.ts +11 -0
- package/src/host/services/git-graph/routes.ts +212 -0
- package/src/host/services/git-graph/service.ts +305 -0
- package/src/host/services/index.ts +94 -0
- package/src/host/services/lark-inbox/config.ts +66 -0
- package/src/host/services/lark-inbox/gateway.ts +184 -0
- package/src/host/services/lark-inbox/host-routes.ts +113 -0
- package/src/host/services/lark-inbox/inbox-store.ts +160 -0
- package/src/host/services/lark-inbox/index.ts +141 -0
- package/src/host/services/lark-inbox/tools.ts +124 -0
- package/src/host/services/lark-inbox/wizard.ts +206 -0
- package/src/host/services/lifecycle.ts +107 -0
- package/src/host/services/memoir/index.ts +80 -0
- package/src/host/services/memoir/routes.ts +346 -0
- package/src/host/services/memoir/settings.ts +122 -0
- package/src/host/services/memoir/store.ts +132 -0
- package/src/host/services/memoir/tools.ts +158 -0
- package/src/host/services/no-browser-auth/index.ts +70 -0
- package/src/host/services/notify/config.ts +178 -0
- package/src/host/services/notify/feishu-sender.ts +220 -0
- package/src/host/services/notify/host-routes.ts +133 -0
- package/src/host/services/notify/index.ts +305 -0
- package/src/host/services/playwright-sessions/child.ts +251 -0
- package/src/host/services/playwright-sessions/controller.ts +102 -0
- package/src/host/services/playwright-sessions/index.ts +146 -0
- package/src/host/services/playwright-sessions/live-view.ts +225 -0
- package/src/host/services/playwright-sessions/manager.ts +239 -0
- package/src/host/services/playwright-sessions/profile-gc.ts +97 -0
- package/src/host/services/playwright-sessions/routes.ts +90 -0
- package/src/host/services/remote-access/boot-scripts.ts +118 -0
- package/src/host/services/remote-access/index.ts +62 -0
- package/src/host/services/remote-access/routes.ts +137 -0
- package/src/host/services/remote-web-ui/index.ts +344 -0
- package/src/host/services/remote-web-ui/server-mode/accounts.ts +423 -0
- package/src/host/services/remote-web-ui/server-mode/cookie.ts +57 -0
- package/src/host/services/remote-web-ui/server-mode/dsh-home.ts +42 -0
- package/src/host/services/remote-web-ui/server-mode/external-auth.ts +296 -0
- package/src/host/services/remote-web-ui/server-mode/fence.ts +27 -0
- package/src/host/services/remote-web-ui/server-mode/gateway-routes.ts +797 -0
- package/src/host/services/remote-web-ui/server-mode/gateway.ts +684 -0
- package/src/host/services/remote-web-ui/server-mode/http.ts +105 -0
- package/src/host/services/remote-web-ui/server-mode/integrated-auth.ts +118 -0
- package/src/host/services/remote-web-ui/server-mode/lan.ts +19 -0
- package/src/host/services/remote-web-ui/server-mode/loopback.ts +63 -0
- package/src/host/services/remote-web-ui/server-mode/posture.ts +154 -0
- package/src/host/services/remote-web-ui/server-mode/roles.ts +51 -0
- package/src/host/services/remote-web-ui/server-mode/server-boot.ts +38 -0
- package/src/host/services/remote-web-ui/server-mode/sessions.ts +347 -0
- package/src/host/services/remote-web-ui/server.ts +591 -0
- package/src/host/services/resources.ts +78 -0
- package/src/host/services/right-pane/browser.ts +106 -0
- package/src/host/services/right-pane/index.ts +117 -0
- package/src/host/services/right-pane/wire.ts +10 -0
- package/src/host/services/schedule-mode/config.ts +26 -0
- package/src/host/services/schedule-mode/engine.ts +689 -0
- package/src/host/services/schedule-mode/index.ts +214 -0
- package/src/host/services/schedule-mode/routes.ts +130 -0
- package/src/host/services/schedule-mode/session-create.ts +36 -0
- package/src/host/services/schedule-mode/store.ts +304 -0
- package/src/host/services/schedule-mode/tools.ts +154 -0
- package/src/host/services/ssh/engine.ts +675 -0
- package/src/host/services/ssh/host-keys.ts +99 -0
- package/src/host/services/ssh/index.ts +84 -0
- package/src/host/services/ssh/routes.ts +442 -0
- package/src/host/services/ssh/store.ts +310 -0
- package/src/host/services/ssh/terminal-ws.ts +157 -0
- package/src/host/services/ssh/tools.ts +279 -0
- package/src/host/services/web-render/contracts.ts +138 -0
- package/src/host/services/web-render/index.ts +112 -0
- package/src/host/services/web-render/provider.ts +282 -0
- package/src/host/services/web-search-anthropic/contracts.ts +163 -0
- package/src/host/services/web-search-anthropic/index.ts +152 -0
- package/src/host/services/web-search-anthropic/provider.ts +325 -0
- package/src/host/services/worktree/git-runner.ts +124 -0
- package/src/host/services/worktree/git.ts +183 -0
- package/src/host/services/worktree/http.ts +36 -0
- package/src/host/services/worktree/index.ts +92 -0
- package/src/host/services/worktree/lane-tool.ts +100 -0
- package/src/host/services/worktree/manager.ts +1553 -0
- package/src/host/services/worktree/model-override.ts +43 -0
- package/src/host/services/worktree/routes.ts +570 -0
- package/src/host/services/worktree/run-command.ts +66 -0
- package/src/host/services/worktree/session-lane/manager.ts +228 -0
- package/src/host/services/worktree/workspace-model-routes.ts +156 -0
- package/src/host/services/worktree/workspace-model.ts +132 -0
- package/src/index.ts +84 -0
- package/src/invariant.ts +4 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conversation header chip: which branch this conversation runs on, rendered
|
|
3
|
+
* immediately after the session title.
|
|
4
|
+
*
|
|
5
|
+
* Seat: `conversation.session.header.actions` (declared `kind: "list"`,
|
|
6
|
+
* `scope: "session"`), i.e. the same header row as the title, to its right.
|
|
7
|
+
* The chip owns four rules:
|
|
8
|
+
* 1. it always answers "which branch is this conversation on": a lane shows
|
|
9
|
+
* its branch plus the lane's state, and a conversation on the repository's
|
|
10
|
+
* main checkout shows `Main checkout · <branch>`;
|
|
11
|
+
* 2. for a lane it is also the worktree's whole lifecycle surface — clicking
|
|
12
|
+
* it opens {@link LaneMenu} (facts, submit PR, clean up, remove). There is
|
|
13
|
+
* no sidebar page for that anymore;
|
|
14
|
+
* 3. it renders nothing when the session has no repository (or the host half
|
|
15
|
+
* predates the routes) — a header must never break because of a chip;
|
|
16
|
+
* 4. it never changes the branch: selection stays in the composer picker, so
|
|
17
|
+
* exactly one control decides which branch a conversation starts on.
|
|
18
|
+
*
|
|
19
|
+
* Data: `POST /worktree/lane` resolves the lane from the session id alone, and
|
|
20
|
+
* `POST /git/status` resolves the main-checkout branch for the session's cwd.
|
|
21
|
+
* @module dsh-client-ui-worktree/client/session-lane-chip
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import { useCallback, useEffect, useRef, useState } from 'react'
|
|
25
|
+
import type { Context as ClientContext } from '@deepseek-ai/cordis'
|
|
26
|
+
import type { PropsLocale, PropsRuntime, Translate } from '@deepseek-ai/dsh-client-ui-slots'
|
|
27
|
+
import type {} from '@deepseek-ai/dsh-client-ui-renderer/client'
|
|
28
|
+
import type {} from '@deepseek-ai/dsh-client-ui-conversation/client'
|
|
29
|
+
import type { RepoStatus } from '../../core/git-graph/protocol.ts'
|
|
30
|
+
import type { LaneLookupInput, LaneView } from '../../core/worktree/types.ts'
|
|
31
|
+
import { IconBranchOutline16 } from '../ui-icons.ts'
|
|
32
|
+
import { WORKTREE_PART_LANE_CHIP, WORKTREE_PLUGIN } from './worktree/semantic.ts'
|
|
33
|
+
import { WorktreeApi } from './worktree/api.ts'
|
|
34
|
+
import { LaneMenu } from './worktree/lane-menu.tsx'
|
|
35
|
+
import { createLaneBinder, type LaneBinder } from './worktree/lane-binding.ts'
|
|
36
|
+
import { GitApi } from './git-graph/api.ts'
|
|
37
|
+
import { en, zh, type SessionLaneKey } from './session-lane-locales.ts'
|
|
38
|
+
import css from './conversation.module.css'
|
|
39
|
+
|
|
40
|
+
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
41
|
+
interface LocaleNamespaceMap {
|
|
42
|
+
/** Conversation header lane chip copy. */
|
|
43
|
+
'web-all-session-lane': SessionLaneKey
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** The browser session summary the chip reads the cwd and run state from. */
|
|
48
|
+
interface SessionSummaryLike {
|
|
49
|
+
byId?: Record<string, { cwd?: string; running?: boolean } | undefined>
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** The client service surface the chip uses to find the session's cwd. */
|
|
53
|
+
interface SessionsFace {
|
|
54
|
+
list?: { getSnapshot?: () => SessionSummaryLike | undefined }
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** The injected face the position module hands the chip. */
|
|
58
|
+
export interface SessionLaneInjected {
|
|
59
|
+
/** Lane lookup (session id only; the host resolves the cwd). */
|
|
60
|
+
lane: Pick<WorktreeApi, 'lane'>['lane']
|
|
61
|
+
/** Repository snapshot for the session's cwd; null when it is not a repo. */
|
|
62
|
+
repoStatus: (sessionId: string) => Promise<RepoStatus | null>
|
|
63
|
+
/** Whether the conversation is running a turn (teardown has to wait). */
|
|
64
|
+
running: (sessionId: string) => boolean
|
|
65
|
+
/** Worktree API for the lane menu's actions (it owns their dialogs). */
|
|
66
|
+
api: WorktreeApi
|
|
67
|
+
/** Namespace-bound translator for the lane menu and dialogs. */
|
|
68
|
+
worktreeT: PropsLocale<'worktree'>['t']
|
|
69
|
+
/** Namespace-bound translator for the chip itself. */
|
|
70
|
+
t: Translate<SessionLaneKey>
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The status word for one lane. Precedence is deliberate: uncommitted work
|
|
75
|
+
* is the most actionable fact, then merge state, then the PR, then whether
|
|
76
|
+
* anything was pushed at all.
|
|
77
|
+
*/
|
|
78
|
+
export function laneStatusKey(
|
|
79
|
+
lane: Pick<LaneView, 'dirty' | 'merged' | 'prNumber' | 'pushed'>,
|
|
80
|
+
): SessionLaneKey {
|
|
81
|
+
if ((lane.dirty ?? 0) > 0) return 'lane.dirty'
|
|
82
|
+
if (lane.merged) return 'lane.merged'
|
|
83
|
+
if (lane.prNumber !== null) return 'lane.pr'
|
|
84
|
+
if (lane.pushed) return 'lane.pushed'
|
|
85
|
+
return 'lane.local'
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The header chip: the branch this conversation is on, and — on a lane — the
|
|
90
|
+
* way to finish that branch off.
|
|
91
|
+
* Renders nothing unless the conversation belongs to a git repository.
|
|
92
|
+
*/
|
|
93
|
+
export function SessionLaneChip(
|
|
94
|
+
props: PropsRuntime<'conversation.session.header.actions'> & { sessionId?: string } & SessionLaneInjected,
|
|
95
|
+
) {
|
|
96
|
+
const { sessionId, lane: lookup, repoStatus, running, api, worktreeT, t } = props
|
|
97
|
+
const [lane, setLane] = useState<LaneView | null>(null)
|
|
98
|
+
const [repo, setRepo] = useState<RepoStatus | null>(null)
|
|
99
|
+
const [open, setOpen] = useState(false)
|
|
100
|
+
const [bindFailed, setBindFailed] = useState(false)
|
|
101
|
+
// One binder per mounted chip: it holds the per-session "already attempted"
|
|
102
|
+
// set, so a refused binding is reported instead of retried forever.
|
|
103
|
+
const binderRef = useRef<LaneBinder | null>(null)
|
|
104
|
+
// The binder resolves through the same lookup the chip already receives, so
|
|
105
|
+
// the two never disagree about which lane this conversation is on.
|
|
106
|
+
binderRef.current ??= createLaneBinder({ lane: lookup, bindLane: (input) => api.bindLane(input) })
|
|
107
|
+
const binder = binderRef.current
|
|
108
|
+
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
if (sessionId === undefined) {
|
|
111
|
+
setLane(null)
|
|
112
|
+
setRepo(null)
|
|
113
|
+
return
|
|
114
|
+
}
|
|
115
|
+
let live = true
|
|
116
|
+
const refresh = (): void => {
|
|
117
|
+
// `binder.bind` resolves the lane AND records the pairing when the host
|
|
118
|
+
// does not have it yet (see the module doc).
|
|
119
|
+
void Promise.all([binder.bind(sessionId), repoStatus(sessionId)]).then(
|
|
120
|
+
([binding, repoValue]) => {
|
|
121
|
+
if (!live) return
|
|
122
|
+
setBindFailed(binding.bindFailed)
|
|
123
|
+
setLane(binding.lane)
|
|
124
|
+
setRepo(repoValue)
|
|
125
|
+
},
|
|
126
|
+
() => { if (live) { setLane(null); setRepo(null) } },
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
refresh()
|
|
130
|
+
// The branch can change while the session id stays the same (a
|
|
131
|
+
// mid-conversation branch switch, or a cleanup that archived the lane) and
|
|
132
|
+
// there is no push channel, so revalidate whenever the tab is looked at.
|
|
133
|
+
const revalidate = (): void => {
|
|
134
|
+
if (document.visibilityState === 'visible') refresh()
|
|
135
|
+
}
|
|
136
|
+
document.addEventListener('visibilitychange', revalidate)
|
|
137
|
+
window.addEventListener('focus', revalidate)
|
|
138
|
+
return () => {
|
|
139
|
+
live = false
|
|
140
|
+
document.removeEventListener('visibilitychange', revalidate)
|
|
141
|
+
window.removeEventListener('focus', revalidate)
|
|
142
|
+
}
|
|
143
|
+
}, [sessionId, lookup, repoStatus, binder])
|
|
144
|
+
|
|
145
|
+
/** Re-read the lane after the menu changed it (PR, refresh, teardown). */
|
|
146
|
+
const reload = useCallback((): void => {
|
|
147
|
+
if (sessionId === undefined) return
|
|
148
|
+
void lookup({ sessionId }).then((value) => { setLane(value) }, () => { /* keep the last answer */ })
|
|
149
|
+
}, [lookup, sessionId])
|
|
150
|
+
|
|
151
|
+
if (lane !== null && lane.branch !== null && sessionId !== undefined) {
|
|
152
|
+
const status = t(laneStatusKey(lane), { number: lane.prNumber ?? 0 })
|
|
153
|
+
return (
|
|
154
|
+
<span className={css.laneChipWrap}>
|
|
155
|
+
<button
|
|
156
|
+
type="button"
|
|
157
|
+
className={css.laneChip}
|
|
158
|
+
data-dsh-plugin={WORKTREE_PLUGIN}
|
|
159
|
+
data-dsh-part={WORKTREE_PART_LANE_CHIP}
|
|
160
|
+
title={t('lane.aria', { branch: lane.branch })}
|
|
161
|
+
aria-haspopup="menu"
|
|
162
|
+
aria-expanded={open}
|
|
163
|
+
onClick={() => { setOpen((value) => !value) }}
|
|
164
|
+
>
|
|
165
|
+
<IconBranchOutline16 size={14} />
|
|
166
|
+
<span className={css.laneBranch}>{lane.branch}</span>
|
|
167
|
+
<span className={css.laneStatus}>{status}</span>
|
|
168
|
+
{(lane.permissionPresetApplied === false || bindFailed) && (
|
|
169
|
+
<span className={css.laneWarning}>{t('lane.presetMissing')}</span>
|
|
170
|
+
)}
|
|
171
|
+
</button>
|
|
172
|
+
{open && (
|
|
173
|
+
<LaneMenu
|
|
174
|
+
sessionId={sessionId}
|
|
175
|
+
lane={lane}
|
|
176
|
+
api={api}
|
|
177
|
+
running={running(sessionId)}
|
|
178
|
+
ownLane
|
|
179
|
+
onClose={() => { setOpen(false) }}
|
|
180
|
+
onChanged={reload}
|
|
181
|
+
t={worktreeT}
|
|
182
|
+
/>
|
|
183
|
+
)}
|
|
184
|
+
</span>
|
|
185
|
+
)
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// No lane: the conversation works on the repository's main checkout. The
|
|
189
|
+
// branch is still the answer to "which branch am I on", so say it — but there
|
|
190
|
+
// is no lane to finish off, so this one stays read-only.
|
|
191
|
+
if (repo === null || repo.branch === '') return null
|
|
192
|
+
|
|
193
|
+
return (
|
|
194
|
+
<span
|
|
195
|
+
className={css.laneChip}
|
|
196
|
+
data-dsh-plugin={WORKTREE_PLUGIN}
|
|
197
|
+
data-dsh-part={WORKTREE_PART_LANE_CHIP}
|
|
198
|
+
data-dsh-kind="main"
|
|
199
|
+
title={t('lane.mainCheckoutAria', { branch: repo.branch })}
|
|
200
|
+
>
|
|
201
|
+
<IconBranchOutline16 size={14} />
|
|
202
|
+
<span className={css.laneStatus}>{t('lane.mainCheckout')}</span>
|
|
203
|
+
<span className={css.laneBranch}>{repo.branch}</span>
|
|
204
|
+
</span>
|
|
205
|
+
)
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export { en as sessionLaneEn, zh as sessionLaneZh }
|
|
209
|
+
export type { SessionLaneKey }
|
|
210
|
+
|
|
211
|
+
/** Optional service lookup that survives a missing or reshaped service. */
|
|
212
|
+
function optionalService<T>(ctx: ClientContext, name: string): T | undefined {
|
|
213
|
+
try {
|
|
214
|
+
return (ctx.get as unknown as (id: string, strict?: boolean) => unknown)(name, false) as T | undefined
|
|
215
|
+
} catch {
|
|
216
|
+
return undefined
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Mount the lane chip on the session-header actions seat. The seat is
|
|
222
|
+
* `scope: "session"`, so the runtime injects the session id and the chip
|
|
223
|
+
* needs no other identity.
|
|
224
|
+
*/
|
|
225
|
+
export function mountSessionLaneChip(ctx: ClientContext): () => void {
|
|
226
|
+
const api = new WorktreeApi()
|
|
227
|
+
const git = new GitApi()
|
|
228
|
+
const translate = ctx.locale.bind('web-all-session-lane')
|
|
229
|
+
const t: Translate<SessionLaneKey> = (key, params) => translate(key, params)
|
|
230
|
+
const worktreeTranslate = ctx.locale.bind('worktree')
|
|
231
|
+
const worktreeT: PropsLocale<'worktree'>['t'] = (key, params) => worktreeTranslate(key, params)
|
|
232
|
+
const sessions = (): SessionsFace | undefined => optionalService<SessionsFace>(ctx, 'sessions')
|
|
233
|
+
// Identity matters: the chip's effect lists these as dependencies, so a
|
|
234
|
+
// per-render closure would refetch on every render. Create them once for the
|
|
235
|
+
// lifetime of the mount.
|
|
236
|
+
const lane = (input: LaneLookupInput) => api.lane(input)
|
|
237
|
+
const repoStatus = async (sessionId: string): Promise<RepoStatus | null> => {
|
|
238
|
+
const cwd = sessions()?.list?.getSnapshot?.()?.byId?.[sessionId]?.cwd
|
|
239
|
+
if (typeof cwd !== 'string' || cwd === '') return null
|
|
240
|
+
const result = await git.status(cwd)
|
|
241
|
+
return result.ok ? result.value : null
|
|
242
|
+
}
|
|
243
|
+
const running = (sessionId: string): boolean =>
|
|
244
|
+
sessions()?.list?.getSnapshot?.()?.byId?.[sessionId]?.running === true
|
|
245
|
+
const face = (props: PropsRuntime<'conversation.session.header.actions'>) => (
|
|
246
|
+
<SessionLaneChip
|
|
247
|
+
{...props}
|
|
248
|
+
lane={lane}
|
|
249
|
+
repoStatus={repoStatus}
|
|
250
|
+
running={running}
|
|
251
|
+
api={api}
|
|
252
|
+
worktreeT={worktreeT}
|
|
253
|
+
t={t}
|
|
254
|
+
/>
|
|
255
|
+
)
|
|
256
|
+
return ctx.slots.inject('conversation.session.header.actions', () => ctx.slots.register({
|
|
257
|
+
name: 'conversation.session.header.actions',
|
|
258
|
+
id: 'web-all-session-lane-chip',
|
|
259
|
+
order: 100,
|
|
260
|
+
inject: (sessionId: string) => ({ sessionId }),
|
|
261
|
+
}, face))
|
|
262
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `web-all-session-lane` dictionaries: the conversation header lane chip.
|
|
3
|
+
* `zh` is the key source; `en` mirrors its key set exactly.
|
|
4
|
+
* @module dsh-client-ui-worktree/client/session-lane-locales
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/** Chinese dictionary (key source). */
|
|
8
|
+
export const zh = {
|
|
9
|
+
'lane.aria': '当前分支目录:{branch}',
|
|
10
|
+
'lane.local': '未推送',
|
|
11
|
+
'lane.dirty': '有未提交改动',
|
|
12
|
+
'lane.pushed': '已推送',
|
|
13
|
+
'lane.pr': 'PR #{number}',
|
|
14
|
+
'lane.merged': '已合并',
|
|
15
|
+
'lane.presetMissing': '需完全权限才能提交',
|
|
16
|
+
'lane.mainCheckout': '项目主目录',
|
|
17
|
+
'lane.mainCheckoutAria': '当前对话在项目主目录:{branch}',
|
|
18
|
+
} as const
|
|
19
|
+
|
|
20
|
+
/** The session-lane namespace key union. */
|
|
21
|
+
export type SessionLaneKey = keyof typeof zh
|
|
22
|
+
|
|
23
|
+
/** English dictionary (complete mirror of `zh`). */
|
|
24
|
+
export const en: Record<SessionLaneKey, string> = {
|
|
25
|
+
'lane.aria': 'Current branch directory: {branch}',
|
|
26
|
+
'lane.local': 'Not pushed',
|
|
27
|
+
'lane.dirty': 'Uncommitted changes',
|
|
28
|
+
'lane.pushed': 'Pushed',
|
|
29
|
+
'lane.pr': 'PR #{number}',
|
|
30
|
+
'lane.merged': 'Merged',
|
|
31
|
+
'lane.presetMissing': 'needs full access to commit',
|
|
32
|
+
'lane.mainCheckout': 'Main directory',
|
|
33
|
+
'lane.mainCheckoutAria': "This conversation is in the project's main directory: {branch}",
|
|
34
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Position-owned DOM presentation for subagent model badges. The conversation
|
|
3
|
+
* module is the only owner of this augmentation; the 0.2 fact resolution stays
|
|
4
|
+
* under src/core/subagent-model.
|
|
5
|
+
*
|
|
6
|
+
* Badge text now comes from the sessions list snapshot (each child row's
|
|
7
|
+
* `modelSelection` projection), so a scan is a single synchronous pass: rows
|
|
8
|
+
* whose text matches a known child label get the badge, rows without a known
|
|
9
|
+
* model are simply left alone.
|
|
10
|
+
*/
|
|
11
|
+
import css from './conversation.module.css'
|
|
12
|
+
|
|
13
|
+
export const SUBAGENT_MODEL_PLUGIN = 'subagent-model'
|
|
14
|
+
export const SUBAGENT_MODEL_PART = 'badge'
|
|
15
|
+
|
|
16
|
+
export interface SubagentBadgeDeps {
|
|
17
|
+
/** Child label (or row title) → child session id. */
|
|
18
|
+
readonly labels: ReadonlyMap<string, string>
|
|
19
|
+
/** Child session id → rendered `model` or `model · effort`. */
|
|
20
|
+
readonly models: ReadonlyMap<string, string>
|
|
21
|
+
readonly ariaLabel: (modelAndEffort: string) => string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const BADGE_SELECTOR = `[data-dsh-plugin="${SUBAGENT_MODEL_PLUGIN}"]`
|
|
25
|
+
const TOOL_ROW_PREFIX = 'Tool call subagent'
|
|
26
|
+
const CATALOG_ROLE = 'treeitem'
|
|
27
|
+
|
|
28
|
+
/** Augment catalog rows and all tool rows beneath root. */
|
|
29
|
+
export function scanSubagentRows(root: ParentNode, deps: SubagentBadgeDeps): void {
|
|
30
|
+
scanSubagentCatalogRows(root, deps)
|
|
31
|
+
if (deps.labels.size === 0) return
|
|
32
|
+
const pattern = compileLabelPattern(deps.labels)
|
|
33
|
+
const seen = new Set<string>()
|
|
34
|
+
for (const child of elementChildren(root)) {
|
|
35
|
+
walkToolRows(child, deps, pattern, seen)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Augment only structured subagent catalog rows. */
|
|
40
|
+
export function scanSubagentCatalogRows(root: ParentNode, deps: SubagentBadgeDeps): void {
|
|
41
|
+
if (deps.labels.size === 0) return
|
|
42
|
+
const pattern = compileLabelPattern(deps.labels)
|
|
43
|
+
let rows: NodeListOf<Element>
|
|
44
|
+
try {
|
|
45
|
+
rows = root.querySelectorAll(`[role="${CATALOG_ROLE}"]`)
|
|
46
|
+
} catch {
|
|
47
|
+
return
|
|
48
|
+
}
|
|
49
|
+
for (const row of Array.from(rows)) {
|
|
50
|
+
try {
|
|
51
|
+
const text = row.textContent ?? ''
|
|
52
|
+
if (!text.includes('·') && !text.includes('tok')) continue
|
|
53
|
+
const childId = matchChildId(text, deps.labels, pattern)
|
|
54
|
+
if (childId === undefined) continue
|
|
55
|
+
const metrics = row.querySelector('[class*="metrics"]')
|
|
56
|
+
const labelNode = row.querySelector('[class*="label"]')
|
|
57
|
+
const anchor = metrics ?? labelNode?.parentElement ?? row
|
|
58
|
+
handleRow(row, anchor, childId, deps)
|
|
59
|
+
} catch {
|
|
60
|
+
// One malformed row must not break progressive enhancement.
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Augment tool-call rows inside a mutation-affected subtree. */
|
|
66
|
+
export function scanSubagentToolRows(root: ParentNode, deps: SubagentBadgeDeps): void {
|
|
67
|
+
if (deps.labels.size === 0) return
|
|
68
|
+
const pattern = compileLabelPattern(deps.labels)
|
|
69
|
+
const seen = new Set<string>()
|
|
70
|
+
for (const child of elementChildren(root)) {
|
|
71
|
+
walkToolRows(child, deps, pattern, seen)
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function elementChildren(root: ParentNode): Element[] {
|
|
76
|
+
if (root instanceof Element) return [root]
|
|
77
|
+
if ('children' in root) return Array.from(root.children)
|
|
78
|
+
return []
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function walkToolRows(
|
|
82
|
+
node: Element,
|
|
83
|
+
deps: SubagentBadgeDeps,
|
|
84
|
+
pattern: RegExp,
|
|
85
|
+
seen: Set<string>,
|
|
86
|
+
): boolean {
|
|
87
|
+
let descendantMatched = false
|
|
88
|
+
for (const child of Array.from(node.children)) {
|
|
89
|
+
if (walkToolRows(child, deps, pattern, seen)) descendantMatched = true
|
|
90
|
+
}
|
|
91
|
+
if (descendantMatched) return true
|
|
92
|
+
const text = node.textContent ?? ''
|
|
93
|
+
if (!text.includes(TOOL_ROW_PREFIX)) return false
|
|
94
|
+
const childId = matchChildId(text, deps.labels, pattern)
|
|
95
|
+
if (childId === undefined) return false
|
|
96
|
+
handleRow(node, node, childId, deps)
|
|
97
|
+
seen.add(childId)
|
|
98
|
+
return true
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function handleRow(
|
|
102
|
+
row: Element,
|
|
103
|
+
anchor: Element,
|
|
104
|
+
childId: string,
|
|
105
|
+
deps: SubagentBadgeDeps,
|
|
106
|
+
): void {
|
|
107
|
+
const text = deps.models.get(childId)
|
|
108
|
+
// No projection value yet: leave whatever is already rendered in place.
|
|
109
|
+
if (text === undefined) return
|
|
110
|
+
const existing = row.querySelector<HTMLElement>(BADGE_SELECTOR)
|
|
111
|
+
if (existing !== null) {
|
|
112
|
+
existing.textContent = text
|
|
113
|
+
existing.title = text
|
|
114
|
+
existing.setAttribute('aria-label', deps.ariaLabel(text))
|
|
115
|
+
return
|
|
116
|
+
}
|
|
117
|
+
const badge = document.createElement('span')
|
|
118
|
+
badge.className = css.subagentModelBadge ?? ''
|
|
119
|
+
badge.textContent = text
|
|
120
|
+
badge.title = text
|
|
121
|
+
badge.setAttribute('aria-label', deps.ariaLabel(text))
|
|
122
|
+
badge.setAttribute('data-dsh-plugin', SUBAGENT_MODEL_PLUGIN)
|
|
123
|
+
badge.setAttribute('data-dsh-part', SUBAGENT_MODEL_PART)
|
|
124
|
+
anchor.appendChild(badge)
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function compileLabelPattern(labels: ReadonlyMap<string, string>): RegExp {
|
|
128
|
+
const alternatives = [...labels.keys()]
|
|
129
|
+
.filter(label => label.length > 0)
|
|
130
|
+
.sort((a, b) => b.length - a.length)
|
|
131
|
+
.map(escapeRegExp)
|
|
132
|
+
return alternatives.length === 0
|
|
133
|
+
? /(?!)/g
|
|
134
|
+
: new RegExp(`(?:${alternatives.join('|')})`, 'g')
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function matchChildId(
|
|
138
|
+
text: string,
|
|
139
|
+
labels: ReadonlyMap<string, string>,
|
|
140
|
+
pattern: RegExp,
|
|
141
|
+
): string | undefined {
|
|
142
|
+
pattern.lastIndex = 0
|
|
143
|
+
let best: string | undefined
|
|
144
|
+
let bestLabel: string | undefined
|
|
145
|
+
for (const match of text.matchAll(pattern)) {
|
|
146
|
+
const candidate = match[0]
|
|
147
|
+
if (labels.has(candidate) && (bestLabel === undefined || candidate.length > bestLabel.length)) {
|
|
148
|
+
bestLabel = candidate
|
|
149
|
+
best = labels.get(candidate)
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return best
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function escapeRegExp(value: string): string {
|
|
156
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
|
157
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conversation-owned subagent model surface.
|
|
3
|
+
*
|
|
4
|
+
* It augments already-rendered catalog/tool rows with each child's model and
|
|
5
|
+
* reasoning effort, read from the sessions list snapshot's `modelSelection`
|
|
6
|
+
* projection (DSH 0.2). Nothing is fetched and no child session is opened or
|
|
7
|
+
* retained: the rows the badge targets are rendered by the official UI, and the
|
|
8
|
+
* projections that describe them travel with the same list snapshot.
|
|
9
|
+
*
|
|
10
|
+
* The conversation position is a root scope, so the current session comes from
|
|
11
|
+
* the public `uiSession.adapter.current` binding (the private `uiSession.current`
|
|
12
|
+
* and the workspace selection cell remain as fallbacks for older cohorts).
|
|
13
|
+
*/
|
|
14
|
+
import type { Context as ClientContext } from '@deepseek-ai/cordis'
|
|
15
|
+
import type { ISessions } from '@deepseek-ai/dsh-api-session-controller/client'
|
|
16
|
+
import type {} from '@deepseek-ai/dsh-client-locale/client'
|
|
17
|
+
import {
|
|
18
|
+
resolveSubagentBadges,
|
|
19
|
+
type SubagentListSnapshotLike,
|
|
20
|
+
} from '../../core/subagent-model/badges.ts'
|
|
21
|
+
import {
|
|
22
|
+
scanSubagentCatalogRows,
|
|
23
|
+
scanSubagentRows,
|
|
24
|
+
scanSubagentToolRows,
|
|
25
|
+
} from './subagent-model-dom.ts'
|
|
26
|
+
import { NS, type ConversationLocaleKey } from './index.ts'
|
|
27
|
+
|
|
28
|
+
const SCAN_DEBOUNCE_MS = 300
|
|
29
|
+
|
|
30
|
+
/** A useSyncExternalStore-compatible source (cordis binding source or snapshot store). */
|
|
31
|
+
interface SnapshotSource<T> {
|
|
32
|
+
getSnapshot(): T
|
|
33
|
+
subscribe(listener: () => void): () => void
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** The selection faces the conversation root may read for "the session I am in". */
|
|
37
|
+
interface SelectionFaces {
|
|
38
|
+
uiSession?: {
|
|
39
|
+
adapter?: { current?: SnapshotSource<{ key?: string } | undefined> }
|
|
40
|
+
current?: SnapshotSource<{ key?: string } | undefined>
|
|
41
|
+
}
|
|
42
|
+
uiWorkspace?: { selection?: SnapshotSource<{ sessionId?: string } | undefined> }
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const zh = {
|
|
46
|
+
'subagentModel.badge.aria': '子代理模型与推理深度 {model}',
|
|
47
|
+
} as const
|
|
48
|
+
|
|
49
|
+
const en: Record<keyof typeof zh, string> = {
|
|
50
|
+
'subagentModel.badge.aria': 'Subagent model and reasoning effort {model}',
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Take one optional service without requiring it in the plugin's inject list. */
|
|
54
|
+
function optionalService<T>(ctx: ClientContext, name: string): T | undefined {
|
|
55
|
+
try {
|
|
56
|
+
return (ctx.get as unknown as (id: string, strict?: boolean) => unknown)(name, false) as T | undefined
|
|
57
|
+
} catch {
|
|
58
|
+
return undefined
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Read a source without letting a hostile or proxied face throw. */
|
|
63
|
+
function read<T>(reader: () => T): T | undefined {
|
|
64
|
+
try {
|
|
65
|
+
return reader()
|
|
66
|
+
} catch {
|
|
67
|
+
return undefined
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** The session the operator is in: public adapter binding first. */
|
|
72
|
+
function currentSessionId(faces: SelectionFaces): string | undefined {
|
|
73
|
+
const candidates = [
|
|
74
|
+
read(() => faces.uiSession?.adapter?.current?.getSnapshot()?.key),
|
|
75
|
+
read(() => faces.uiSession?.current?.getSnapshot()?.key),
|
|
76
|
+
read(() => faces.uiWorkspace?.selection?.getSnapshot()?.sessionId),
|
|
77
|
+
]
|
|
78
|
+
for (const candidate of candidates) {
|
|
79
|
+
if (typeof candidate === 'string' && candidate !== '') return candidate
|
|
80
|
+
}
|
|
81
|
+
return undefined
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** Mount the read-only model badge observer within the conversation position. */
|
|
85
|
+
export function mountSubagentModel(ctx: ClientContext): () => void {
|
|
86
|
+
const sessions = optionalService<ISessions>(ctx, 'sessions')
|
|
87
|
+
if (sessions === undefined || typeof sessions.list?.subscribe !== 'function') return () => {}
|
|
88
|
+
const disposers: Array<() => void> = []
|
|
89
|
+
|
|
90
|
+
try {
|
|
91
|
+
disposers.push(ctx.locale.register(NS, { zh, en }))
|
|
92
|
+
} catch {
|
|
93
|
+
// A duplicate namespace registration must not break the web shell.
|
|
94
|
+
}
|
|
95
|
+
const translate = ctx.locale.bind(NS)
|
|
96
|
+
const ariaLabel = (value: string): string => translate(
|
|
97
|
+
'subagentModel.badge.aria' as ConversationLocaleKey,
|
|
98
|
+
{ model: value },
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
const labels = new Map<string, string>()
|
|
102
|
+
const models = new Map<string, string>()
|
|
103
|
+
const dirtyRoots = new Set<Element>()
|
|
104
|
+
let scanTimer: ReturnType<typeof setTimeout> | undefined
|
|
105
|
+
let idleHandle: number | undefined
|
|
106
|
+
let fullScanPending = true
|
|
107
|
+
|
|
108
|
+
/** The selection faces, re-read per scan so a late service is picked up. */
|
|
109
|
+
const selectionFaces = (): SelectionFaces => ({
|
|
110
|
+
uiSession: optionalService<SelectionFaces['uiSession']>(ctx, 'uiSession'),
|
|
111
|
+
uiWorkspace: optionalService<SelectionFaces['uiWorkspace']>(ctx, 'uiWorkspace'),
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
/** Project the list snapshot into the DOM matcher's two maps. */
|
|
115
|
+
const rebuild = (): void => {
|
|
116
|
+
labels.clear()
|
|
117
|
+
models.clear()
|
|
118
|
+
const snapshot = sessions.list.getSnapshot() as unknown as SubagentListSnapshotLike
|
|
119
|
+
const { badges } = resolveSubagentBadges(snapshot, currentSessionId(selectionFaces()))
|
|
120
|
+
for (const badge of badges) {
|
|
121
|
+
for (const label of badge.labels) labels.set(label, badge.childId)
|
|
122
|
+
if (badge.modelText !== undefined) models.set(badge.childId, badge.modelText)
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const scheduleScan = (): void => {
|
|
127
|
+
if (scanTimer !== undefined) clearTimeout(scanTimer)
|
|
128
|
+
scanTimer = setTimeout(() => {
|
|
129
|
+
scanTimer = undefined
|
|
130
|
+
const requestIdle = (globalThis as {
|
|
131
|
+
requestIdleCallback?: (callback: () => void) => number
|
|
132
|
+
}).requestIdleCallback
|
|
133
|
+
if (typeof requestIdle === 'function') {
|
|
134
|
+
idleHandle = requestIdle(() => { runScan() })
|
|
135
|
+
} else {
|
|
136
|
+
runScan()
|
|
137
|
+
}
|
|
138
|
+
}, SCAN_DEBOUNCE_MS)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function runScan(): void {
|
|
142
|
+
if (typeof document === 'undefined' || document.body === null) return
|
|
143
|
+
try {
|
|
144
|
+
rebuild()
|
|
145
|
+
const deps = { labels, models, ariaLabel }
|
|
146
|
+
if (fullScanPending) scanSubagentRows(document.body, deps)
|
|
147
|
+
else scanSubagentCatalogRows(document.body, deps)
|
|
148
|
+
fullScanPending = false
|
|
149
|
+
for (const root of dirtyRoots) {
|
|
150
|
+
if (!root.isConnected) continue
|
|
151
|
+
scanSubagentToolRows(root, deps)
|
|
152
|
+
}
|
|
153
|
+
dirtyRoots.clear()
|
|
154
|
+
} catch {
|
|
155
|
+
// The badge is progressive enhancement and never blocks the shell.
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (typeof document !== 'undefined' && document.body !== null && typeof MutationObserver !== 'undefined') {
|
|
160
|
+
const observer = new MutationObserver((records) => {
|
|
161
|
+
for (const record of records) {
|
|
162
|
+
const nodes = record.addedNodes.length > 0 ? record.addedNodes : [record.target]
|
|
163
|
+
for (const node of Array.from(nodes)) {
|
|
164
|
+
const element = node instanceof Element ? node : node.parentElement
|
|
165
|
+
if (element === null) continue
|
|
166
|
+
dirtyRoots.add(element)
|
|
167
|
+
while (dirtyRoots.size > 32) {
|
|
168
|
+
const oldest = dirtyRoots.values().next().value
|
|
169
|
+
if (oldest === undefined) break
|
|
170
|
+
dirtyRoots.delete(oldest)
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
scheduleScan()
|
|
175
|
+
})
|
|
176
|
+
observer.observe(document.body, { childList: true, subtree: true })
|
|
177
|
+
const unsubscribe = sessions.list.subscribe(() => {
|
|
178
|
+
fullScanPending = true
|
|
179
|
+
scheduleScan()
|
|
180
|
+
})
|
|
181
|
+
scheduleScan()
|
|
182
|
+
disposers.push(() => {
|
|
183
|
+
observer.disconnect()
|
|
184
|
+
unsubscribe()
|
|
185
|
+
if (scanTimer !== undefined) clearTimeout(scanTimer)
|
|
186
|
+
if (idleHandle !== undefined) {
|
|
187
|
+
const cancelIdle = (globalThis as {
|
|
188
|
+
cancelIdleCallback?: (handle: number) => void
|
|
189
|
+
}).cancelIdleCallback
|
|
190
|
+
cancelIdle?.(idleHandle)
|
|
191
|
+
}
|
|
192
|
+
})
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
return () => {
|
|
196
|
+
for (const dispose of disposers.reverse()) dispose()
|
|
197
|
+
}
|
|
198
|
+
}
|