@ai-agent-forge/agent-forge 0.86.4 → 0.86.6
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/CHANGELOG.md +52 -0
- package/dist/bundle/.build-manifest.json +470 -404
- package/dist/bundle/chunks/anthropic-messages-ALDZBUKI.js +6 -0
- package/dist/bundle/chunks/anthropic.js +2 -2
- package/dist/bundle/chunks/{azure-openai-responses-WQCZWFAH.js → azure-openai-responses-A2WJWZFB.js} +1 -1
- package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
- package/dist/bundle/chunks/chunk-A7GUOX2H.js +141 -0
- package/dist/bundle/chunks/{chunk-WGLBM2BP.js → chunk-CIX3FSBK.js} +1 -1
- package/dist/bundle/chunks/{chunk-ZV3W36HK.js → chunk-EALJ5DDX.js} +99 -92
- package/dist/bundle/chunks/chunk-OO6DJ3CL.js +31 -0
- package/dist/bundle/chunks/{chunk-PE3XUHPT.js → chunk-SQFG22WN.js} +1 -1
- package/dist/bundle/chunks/{chunk-V46XUTK3.js → chunk-Y7HXTASS.js} +1 -1
- package/dist/bundle/chunks/{chunk-3WE3W52L.js → chunk-YJCQVXW5.js} +1 -1
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/{google-generative-ai-LQ375GYC.js → google-generative-ai-NIB4WONV.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-HXSRAKEZ.js → google-vertex-DCPYUEUO.js} +1 -1
- package/dist/bundle/chunks/{mistral-conversations-CSNMFR4J.js → mistral-conversations-OC6LA5XL.js} +1 -1
- package/dist/bundle/chunks/{openai-codex-responses-YDJSZOIH.js → openai-codex-responses-IO2X4Y7L.js} +1 -1
- package/dist/bundle/chunks/openai-codex.js +2 -2
- package/dist/bundle/chunks/{openai-completions-UPRWTQPT.js → openai-completions-XYQQHETU.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-O63W6HQ3.js → openai-responses-DLIRN3CI.js} +1 -1
- package/dist/bundle/chunks/{openrouter-images-G3GT5BVT.js → openrouter-images-G4GQRUSG.js} +1 -1
- package/dist/bundle/chunks/openrouter.js +2 -2
- package/dist/bundle/chunks/{pi-messages-SLF355GF.js → pi-messages-E6RRYBO7.js} +1 -1
- package/dist/bundle/chunks/radius.js +2 -2
- package/dist/bundle/chunks/{virtual-modules-O72ICTMQ.js → virtual-modules-3IZ4MYSQ.js} +1 -1
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/capabilities/builtin.d.ts +4 -2
- package/dist/capabilities/builtin.d.ts.map +1 -1
- package/dist/capabilities/builtin.js +5 -1
- package/dist/capabilities/builtin.js.map +1 -1
- package/dist/cli/plugin-command.d.ts.map +1 -1
- package/dist/cli/plugin-command.js +51 -5
- package/dist/cli/plugin-command.js.map +1 -1
- package/dist/core/agent-session-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-compaction.js +13 -5
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/agent-session-internal.d.ts +2 -4
- package/dist/core/agent-session-internal.d.ts.map +1 -1
- package/dist/core/agent-session-internal.js.map +1 -1
- package/dist/core/agent-session-paths.d.ts +2 -0
- package/dist/core/agent-session-paths.d.ts.map +1 -1
- package/dist/core/agent-session-paths.js +2 -1
- package/dist/core/agent-session-paths.js.map +1 -1
- package/dist/core/agent-session-projection.d.ts +10 -4
- package/dist/core/agent-session-projection.d.ts.map +1 -1
- package/dist/core/agent-session-projection.js +17 -4
- package/dist/core/agent-session-projection.js.map +1 -1
- package/dist/core/agent-session.d.ts +19 -5
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +30 -4
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/bootstrap-lifecycle.d.ts +1 -1
- package/dist/core/extensions/bootstrap-lifecycle.d.ts.map +1 -1
- package/dist/core/extensions/bootstrap-lifecycle.js +5 -2
- package/dist/core/extensions/bootstrap-lifecycle.js.map +1 -1
- package/dist/core/extensions/capability-runtime-store.d.ts.map +1 -1
- package/dist/core/extensions/capability-runtime-store.js +1 -0
- package/dist/core/extensions/capability-runtime-store.js.map +1 -1
- package/dist/core/extensions/capability-runtime-types.d.ts +16 -1
- package/dist/core/extensions/capability-runtime-types.d.ts.map +1 -1
- package/dist/core/extensions/capability-runtime-types.js.map +1 -1
- package/dist/core/extensions/capability-runtime.d.ts.map +1 -1
- package/dist/core/extensions/capability-runtime.js +38 -2
- package/dist/core/extensions/capability-runtime.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/lifecycle-catalog.d.ts +46 -0
- package/dist/core/extensions/lifecycle-catalog.d.ts.map +1 -1
- package/dist/core/extensions/lifecycle-catalog.js +101 -0
- package/dist/core/extensions/lifecycle-catalog.js.map +1 -1
- package/dist/core/extensions/provider-failover.d.ts +106 -0
- package/dist/core/extensions/provider-failover.d.ts.map +1 -0
- package/dist/core/extensions/provider-failover.js +692 -0
- package/dist/core/extensions/provider-failover.js.map +1 -0
- package/dist/core/facade/coding-agent-facade.d.ts +13 -6
- package/dist/core/facade/coding-agent-facade.d.ts.map +1 -1
- package/dist/core/facade/coding-agent-facade.js +3 -1
- package/dist/core/facade/coding-agent-facade.js.map +1 -1
- package/dist/core/keybindings.d.ts +6 -6
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +23 -6
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-config.d.ts +102 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +46 -14
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +15 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +30 -18
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +4 -9
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +107 -24
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +2 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +10 -5
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +71 -5
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +138 -9
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +17 -2
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +6 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +26 -0
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/tool-definition.d.ts +21 -2
- package/dist/core/tools/tool-definition.d.ts.map +1 -1
- package/dist/core/tools/tool-definition.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +3 -6
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/agents-view.d.ts +57 -0
- package/dist/modes/interactive/components/agents-view.d.ts.map +1 -0
- package/dist/modes/interactive/components/agents-view.js +260 -0
- package/dist/modes/interactive/components/agents-view.js.map +1 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +2 -2
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +7 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +51 -6
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +12 -2
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +1 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +89 -10
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +3 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +9 -3
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/workflow-view.d.ts +119 -0
- package/dist/modes/interactive/components/workflow-view.d.ts.map +1 -0
- package/dist/modes/interactive/components/workflow-view.js +638 -0
- package/dist/modes/interactive/components/workflow-view.js.map +1 -0
- package/dist/modes/interactive/interactive-commands.d.ts +22 -0
- package/dist/modes/interactive/interactive-commands.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-commands.js +56 -0
- package/dist/modes/interactive/interactive-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +51 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +218 -37
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/interactive-selectors.d.ts +2 -4
- package/dist/modes/interactive/interactive-selectors.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-selectors.js +10 -1
- package/dist/modes/interactive/interactive-selectors.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +5 -0
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +3 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +4 -2
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +1 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/plugins/ecosystem/bootstrap-factory-manifest.d.ts.map +1 -1
- package/dist/plugins/ecosystem/bootstrap-factory-manifest.js +7 -0
- package/dist/plugins/ecosystem/bootstrap-factory-manifest.js.map +1 -1
- package/dist/plugins/ecosystem/cli.d.ts.map +1 -1
- package/dist/plugins/ecosystem/cli.js +1 -1
- package/dist/plugins/ecosystem/cli.js.map +1 -1
- package/dist/plugins/ecosystem/install-store-paths.d.ts +15 -0
- package/dist/plugins/ecosystem/install-store-paths.d.ts.map +1 -0
- package/dist/plugins/ecosystem/install-store-paths.js +58 -0
- package/dist/plugins/ecosystem/install-store-paths.js.map +1 -0
- package/dist/plugins/ecosystem/node-disk-registry-source.d.ts.map +1 -1
- package/dist/plugins/ecosystem/node-disk-registry-source.js +3 -8
- package/dist/plugins/ecosystem/node-disk-registry-source.js.map +1 -1
- package/dist/plugins/ecosystem/node-package-install-host.d.ts.map +1 -1
- package/dist/plugins/ecosystem/node-package-install-host.js +9 -1
- package/dist/plugins/ecosystem/node-package-install-host.js.map +1 -1
- package/dist/plugins/ecosystem/node-package-install-persistence.d.ts.map +1 -1
- package/dist/plugins/ecosystem/node-package-install-persistence.js +3 -8
- package/dist/plugins/ecosystem/node-package-install-persistence.js.map +1 -1
- package/dist/profile/plugin-profiles.d.ts +2 -0
- package/dist/profile/plugin-profiles.d.ts.map +1 -1
- package/dist/profile/plugin-profiles.js +4 -0
- package/dist/profile/plugin-profiles.js.map +1 -1
- package/dist/profiles/builtin-suites.d.ts +19 -2
- package/dist/profiles/builtin-suites.d.ts.map +1 -1
- package/dist/profiles/builtin-suites.js +20 -2
- package/dist/profiles/builtin-suites.js.map +1 -1
- package/dist/profiles/suite-loader.d.ts.map +1 -1
- package/dist/profiles/suite-loader.js +4 -1
- package/dist/profiles/suite-loader.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +10 -10
- package/dist/utils/clipboard.js.map +1 -1
- package/docs/keybindings.md +8 -8
- package/docs/models.md +1 -1
- package/docs/rpc.md +3 -1
- package/docs/settings.md +2 -1
- package/package.json +4 -4
- package/dist/bundle/chunks/anthropic-messages-EVFQ6MLR.js +0 -6
- package/dist/bundle/chunks/chunk-F6SBZUJG.js +0 -141
- package/dist/bundle/chunks/chunk-NUHFSC37.js +0 -25
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-view.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/workflow-view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAkB,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEpG,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAQ5D,MAAM,cAAc,GAAsB,CAAC,SAAS,EAAE,QAAQ,EAAE,iBAAiB,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAuDrH,SAAS,QAAQ,CAAC,KAAc,EAAoC;IACnE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAAA,CAC5E;AAED,SAAS,iBAAiB,CAAC,KAAc,EAAsB;IAC9D,OAAO,OAAO,KA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;aAAM,IAAI,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,qBAAqB,CAAC,EAAE,CAAC;YACvD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7C,CAAC;aAAM,IAAI,OAAO,KAAK,GAAG,EAAE,CAAC;YAC5B,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACzB,CAAC;aAAM,IAAI,OAAO,KAAK,GAAG,EAAE,CAAC;YAC5B,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACxB,CAAC;aAAM,IAAI,OAAO,KAAK,GAAG,EAAE,CAAC;YAC5B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACtB,CAAC;aAAM,IAAI,OAAO,KAAK,GAAG,EAAE,CAAC;YAC5B,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACxB,CAAC;IAAA,CACD;CACD","sourcesContent":["/**\n * Workflow overlay view (§9 L2/L3 of docs/design/工作流编排插件设计.md).\n *\n * Read-only panorama (L2) and transition stream (L3) rendered from the\n * session's `workflow.state` / `workflow.transition` custom entries — the\n * same isomorphic read the footer performs on `goal.state`, so the plugin\n * does not need to be present and this module never imports plugin code.\n * Waiting-condition labels mirror the engine's `computeWaitingOn` order\n * (active-limit precedes write-scope conflict); plan lookups read the latest\n * `plan.state` snapshot the same way.\n *\n * Operations are never executed here: approve/reject/skip/cancel forward an\n * action text (e.g. `approve stage s2-review`) to the conversation input and\n * the main agent drives it through workflow_advance — rendering and execution\n * stay separated (设计 §9 L2 \"转发到对话\").\n */\n\nimport { type Component, Container, getKeybindings, Text, truncateToWidth } from \"@agent-forge/tui\";\nimport type { SessionEntry } from \"../../../core/session-manager.ts\";\nimport { theme } from \"../theme/theme.ts\";\nimport { DynamicBorder } from \"./dynamic-border.ts\";\nimport { keyHint, rawKeyHint } from \"./keybinding-hints.ts\";\n\n// ---------------------------------------------------------------------------\n// View model (pure; exported for tests)\n// ---------------------------------------------------------------------------\n\ntype StageStatus = \"pending\" | \"active\" | \"awaiting_review\" | \"completed\" | \"failed\" | \"skipped\";\n\nconst STAGE_STATUSES: readonly string[] = [\"pending\", \"active\", \"awaiting_review\", \"completed\", \"failed\", \"skipped\"];\n\n/** One selectable stage row of the L2 panorama tree. */\nexport interface WorkflowStageRow {\n\tworkflowId: string;\n\tstageId: string;\n\ttitle: string;\n\tdepth: number;\n\tstatus: StageStatus;\n\t/** §8.1 waiting-condition label, or null when nothing blocks the stage. */\n\twaitingOn: string | null;\n\tattempts: number;\n\tevidenceCount: number;\n\t/** Conflicting active write stage id (write-scope marker), or null. */\n\tscopeConflict: string | null;\n\t/** Diamond edge collapsed to a back-reference instead of a duplicate subtree. */\n\tbackReference: boolean;\n}\n\n/** One workflow block of the L2 panorama. */\nexport interface WorkflowBlock {\n\tworkflowId: string;\n\ttitle: string;\n\tstatus: string;\n\trevision: number;\n\tgoalId: string | undefined;\n\tactiveCount: number;\n\tmaxActiveStages: number;\n\tretreatCount: number;\n\tmaxRetreats: number;\n\tdiagnostics: string[];\n\tstages: WorkflowStageRow[];\n}\n\n/** One L3 transition row (already newest-first, capped by the builder). */\nexport interface WorkflowTransitionRow {\n\trevision: number;\n\tworkflowId: string;\n\tstageId: string | undefined;\n\tfrom: string;\n\tto: string;\n\ttrigger: string;\n\tcode: string;\n\tmessage: string;\n\tdetail: string | undefined;\n}\n\nexport interface WorkflowViewModel {\n\t/** Undefined when the session has no `workflow.state` entry at all. */\n\tpanorama: WorkflowBlock[] | undefined;\n\ttransitions: WorkflowTransitionRow[];\n\t/** Newest non-terminal workflow id (footer's pick), for workflow-level actions. */\n\tactiveWorkflowId: string | undefined;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction stringOrUndefined(value: unknown): string | undefined {\n\treturn typeof value === \"string\" ? value : undefined;\n}\n\ninterface ParsedStageSpec {\n\tid: string;\n\ttitle: string;\n\tdependsOn: string[];\n\tplanId: string | undefined;\n\tkind: \"read\" | \"write\";\n\tscope: string[] | undefined;\n\tacceptanceIds: string[];\n}\n\ninterface ParsedStageRuntime {\n\tstageId: string;\n\tstatus: StageStatus;\n\tattempts: number;\n\tevidenceCount: number;\n\tcoveredAcceptanceIds: Set<string>;\n}\n\ninterface ParsedWorkflow {\n\tid: string;\n\ttitle: string;\n\tstatus: string;\n\trevision: number;\n\tgoalId: string | undefined;\n\tmaxActiveStages: number;\n\tmaxRetreats: number;\n\tretreatCount: number;\n\tdiagnostics: string[];\n\tstages: ParsedStageSpec[];\n\truntime: Map<string, ParsedStageRuntime>;\n}\n\nfunction parseStageSpec(value: unknown): ParsedStageSpec | undefined {\n\tif (!isRecord(value)) return undefined;\n\tconst id = stringOrUndefined(value.id);\n\tif (id === undefined) return undefined;\n\tconst dependsOn = Array.isArray(value.dependsOn) ? value.dependsOn.filter(isString) : [];\n\tconst acceptance =\n\t\tisRecord(value.objective) && Array.isArray(value.objective.acceptance) ? value.objective.acceptance : [];\n\tconst scope = Array.isArray(value.scope) ? value.scope.filter(isString) : undefined;\n\treturn {\n\t\tid,\n\t\ttitle: stringOrUndefined(value.title) ?? id,\n\t\tdependsOn,\n\t\tplanId: stringOrUndefined(value.planId),\n\t\tkind: value.kind === \"read\" ? \"read\" : \"write\",\n\t\tscope: scope !== undefined && scope.length > 0 ? scope : undefined,\n\t\tacceptanceIds: acceptance\n\t\t\t.map((item) => (isRecord(item) ? stringOrUndefined(item.id) : undefined))\n\t\t\t.filter((item): item is string => item !== undefined),\n\t};\n}\n\nfunction isString(value: unknown): value is string {\n\treturn typeof value === \"string\";\n}\n\nfunction parseStageRuntime(value: unknown): ParsedStageRuntime | undefined {\n\tif (!isRecord(value)) return undefined;\n\tconst stageId = stringOrUndefined(value.stageId);\n\tconst status = stringOrUndefined(value.status);\n\tif (stageId === undefined || status === undefined || !STAGE_STATUSES.includes(status)) return undefined;\n\tconst evidence = Array.isArray(value.evidence) ? value.evidence : [];\n\tconst covered = new Set<string>();\n\tlet evidenceCount = 0;\n\tfor (const item of evidence) {\n\t\tif (!isRecord(item)) continue;\n\t\tevidenceCount++;\n\t\tconst acceptanceId = stringOrUndefined(item.acceptanceId);\n\t\tif (acceptanceId !== undefined) covered.add(acceptanceId);\n\t}\n\treturn {\n\t\tstageId,\n\t\tstatus: status as StageStatus,\n\t\tattempts: typeof value.attempts === \"number\" ? value.attempts : 0,\n\t\tevidenceCount,\n\t\tcoveredAcceptanceIds: covered,\n\t};\n}\n\nfunction parseWorkflowRecord(value: unknown): ParsedWorkflow | undefined {\n\tif (!isRecord(value)) return undefined;\n\tconst id = stringOrUndefined(value.id);\n\tconst title = stringOrUndefined(value.title);\n\tconst status = stringOrUndefined(value.status);\n\tif (id === undefined || title === undefined || status === undefined) return undefined;\n\tconst stages: ParsedStageSpec[] = [];\n\tfor (const item of Array.isArray(value.stages) ? value.stages : []) {\n\t\tconst spec = parseStageSpec(item);\n\t\tif (spec !== undefined) stages.push(spec);\n\t}\n\tconst runtime = new Map<string, ParsedStageRuntime>();\n\tfor (const item of Array.isArray(value.runtime) ? value.runtime : []) {\n\t\tconst parsed = parseStageRuntime(item);\n\t\tif (parsed !== undefined) runtime.set(parsed.stageId, parsed);\n\t}\n\tconst diagnostics = Array.isArray(value.diagnostics) ? value.diagnostics.filter(isString) : [];\n\treturn {\n\t\tid,\n\t\ttitle,\n\t\tstatus,\n\t\trevision: typeof value.revision === \"number\" ? value.revision : 0,\n\t\tgoalId: stringOrUndefined(value.goalId),\n\t\tmaxActiveStages: typeof value.maxActiveStages === \"number\" ? value.maxActiveStages : 4,\n\t\tmaxRetreats: typeof value.maxRetreats === \"number\" ? value.maxRetreats : 3,\n\t\tretreatCount: typeof value.retreatCount === \"number\" ? value.retreatCount : 0,\n\t\tdiagnostics,\n\t\tstages,\n\t\truntime,\n\t};\n}\n\n/** Latest `plan.state` snapshot reduced to id -> status (plan-dangling / plan-incomplete labels). */\nfunction parsePlanStatuses(data: unknown): Map<string, string> {\n\tconst statuses = new Map<string, string>();\n\tif (!isRecord(data) || !Array.isArray(data.plans)) return statuses;\n\tfor (const item of data.plans) {\n\t\tif (!isRecord(item)) continue;\n\t\tconst id = stringOrUndefined(item.id);\n\t\tconst status = stringOrUndefined(item.status);\n\t\tif (id !== undefined && status !== undefined) statuses.set(id, status);\n\t}\n\treturn statuses;\n}\n\nfunction parseTransition(value: unknown): WorkflowTransitionRow | undefined {\n\tif (!isRecord(value)) return undefined;\n\tconst workflowId = stringOrUndefined(value.workflowId);\n\tconst from = stringOrUndefined(value.from);\n\tconst to = stringOrUndefined(value.to);\n\tconst reason = isRecord(value.reason) ? value.reason : undefined;\n\tconst code = reason !== undefined ? stringOrUndefined(reason.code) : undefined;\n\tif (\n\t\tworkflowId === undefined ||\n\t\tfrom === undefined ||\n\t\tto === undefined ||\n\t\tcode === undefined ||\n\t\ttypeof value.revision !== \"number\"\n\t) {\n\t\treturn undefined;\n\t}\n\treturn {\n\t\trevision: value.revision,\n\t\tworkflowId,\n\t\tstageId: stringOrUndefined(value.stageId),\n\t\tfrom,\n\t\tto,\n\t\ttrigger: stringOrUndefined(value.trigger) ?? \"tool\",\n\t\tcode,\n\t\tmessage: reason !== undefined ? (stringOrUndefined(reason.message) ?? \"\") : \"\",\n\t\tdetail: reason !== undefined ? stringOrUndefined(reason.detail) : undefined,\n\t};\n}\n\nfunction scopesIntersect(a: string[] | undefined, b: string[] | undefined): boolean {\n\tif (a === undefined || a.length === 0 || b === undefined || b.length === 0) return true;\n\treturn a.some((tag) => b.includes(tag));\n}\n\nfunction findScopeConflict(workflow: ParsedWorkflow, spec: ParsedStageSpec): string | null {\n\tif (spec.kind !== \"write\") return null;\n\tfor (const other of workflow.stages) {\n\t\tif (other.id === spec.id || other.kind !== \"write\") continue;\n\t\tif (workflow.runtime.get(other.id)?.status !== \"active\") continue;\n\t\tif (scopesIntersect(spec.scope, other.scope)) return other.id;\n\t}\n\treturn null;\n}\n\nfunction uncoveredAcceptanceIds(spec: ParsedStageSpec, runtime: ParsedStageRuntime | undefined): string[] {\n\tif (runtime === undefined) return [...spec.acceptanceIds];\n\treturn spec.acceptanceIds.filter((id) => !runtime.coveredAcceptanceIds.has(id));\n}\n\n/**\n * §8.1 waiting-condition label, mirroring the engine's `computeWaitingOn`\n * check order (active-limit precedes write-scope conflict) so the overlay\n * names the same condition the audit stream recorded. Plan lookups use the\n * latest `plan.state` snapshot instead of the engine's live dependency.\n */\nfunction computeWaitingOn(\n\tworkflow: ParsedWorkflow,\n\tspec: ParsedStageSpec,\n\truntime: ParsedStageRuntime | undefined,\n\tplanStatuses: Map<string, string>,\n): string | null {\n\tconst status = runtime?.status ?? \"pending\";\n\tif (status === \"awaiting_review\") return \"review\";\n\tif (status === \"pending\") {\n\t\tif (workflow.status === \"draft\") return \"not-yet-active\";\n\t\tif ((runtime?.attempts ?? 0) > 0) {\n\t\t\tif (spec.acceptanceIds.length === 0) return \"retry-wait\";\n\t\t\treturn `acceptance-missing:[${uncoveredAcceptanceIds(spec, runtime).join(\", \")}]`;\n\t\t}\n\t\tconst incomplete = spec.dependsOn.filter((dep) => {\n\t\t\tconst dependency = workflow.runtime.get(dep)?.status;\n\t\t\treturn dependency !== \"completed\" && dependency !== \"skipped\";\n\t\t});\n\t\tif (incomplete.length > 0) return `deps-incomplete:[${incomplete.join(\", \")}]`;\n\t\tif (spec.planId !== undefined && !planStatuses.has(spec.planId)) return \"plan-dangling\";\n\t\tconst activeCount = [...workflow.runtime.values()].filter((item) => item.status === \"active\").length;\n\t\tif (activeCount >= workflow.maxActiveStages) return \"active-limit\";\n\t\tconst conflict = findScopeConflict(workflow, spec);\n\t\tif (conflict !== null) return `write-scope-conflict:[${conflict}]`;\n\t\treturn \"not-yet-active\";\n\t}\n\tif (status === \"active\") {\n\t\tif (spec.planId === undefined) return null;\n\t\tconst planStatus = planStatuses.get(spec.planId);\n\t\tif (planStatus === undefined) return \"plan-dangling\";\n\t\tif (planStatus !== \"completed\") return \"plan-incomplete\";\n\t\treturn null;\n\t}\n\treturn null;\n}\n\nfunction buildStageRows(workflow: ParsedWorkflow, planStatuses: Map<string, string>): WorkflowStageRow[] {\n\tconst rows: WorkflowStageRow[] = [];\n\tconst visited = new Set<string>();\n\tconst walk = (spec: ParsedStageSpec, depth: number): void => {\n\t\tif (visited.has(spec.id)) {\n\t\t\trows.push({\n\t\t\t\tworkflowId: workflow.id,\n\t\t\t\tstageId: spec.id,\n\t\t\t\ttitle: spec.title,\n\t\t\t\tdepth,\n\t\t\t\tstatus: workflow.runtime.get(spec.id)?.status ?? \"pending\",\n\t\t\t\twaitingOn: null,\n\t\t\t\tattempts: 0,\n\t\t\t\tevidenceCount: 0,\n\t\t\t\tscopeConflict: null,\n\t\t\t\tbackReference: true,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tvisited.add(spec.id);\n\t\tconst runtime = workflow.runtime.get(spec.id);\n\t\trows.push({\n\t\t\tworkflowId: workflow.id,\n\t\t\tstageId: spec.id,\n\t\t\ttitle: spec.title,\n\t\t\tdepth,\n\t\t\tstatus: runtime?.status ?? \"pending\",\n\t\t\twaitingOn: computeWaitingOn(workflow, spec, runtime, planStatuses),\n\t\t\tattempts: runtime?.attempts ?? 0,\n\t\t\tevidenceCount: runtime?.evidenceCount ?? 0,\n\t\t\tscopeConflict: findScopeConflict(workflow, spec),\n\t\t\tbackReference: false,\n\t\t});\n\t\tfor (const child of workflow.stages.filter((item) => item.dependsOn.includes(spec.id))) {\n\t\t\twalk(child, depth + 1);\n\t\t}\n\t};\n\tfor (const root of workflow.stages.filter((item) => item.dependsOn.length === 0)) {\n\t\twalk(root, 0);\n\t}\n\t// Stages unreachable from a root (defensive; the engine validates acyclic\n\t// graphs) still render at the top level, mirroring the L1 text panorama.\n\tfor (const spec of workflow.stages) {\n\t\tif (!visited.has(spec.id)) walk(spec, 0);\n\t}\n\treturn rows;\n}\n\n/**\n * Build the L2/L3 view model from session entries: the latest\n * `workflow.state` snapshot plus the `workflow.transition` audit stream\n * (newest first, capped). Malformed records are skipped, never thrown.\n */\nexport function buildWorkflowViewModel(entries: readonly SessionEntry[], transitionLimit = 30): WorkflowViewModel {\n\tlet stateData: unknown;\n\tlet hasStateEntry = false;\n\tlet planData: unknown;\n\tconst transitions: WorkflowTransitionRow[] = [];\n\tfor (const entry of entries) {\n\t\tif (entry.type !== \"custom\") continue;\n\t\tif (entry.customType === \"workflow.state\") {\n\t\t\thasStateEntry = true;\n\t\t\tstateData = entry.data;\n\t\t} else if (entry.customType === \"plan.state\") {\n\t\t\tplanData = entry.data;\n\t\t} else if (entry.customType === \"workflow.transition\") {\n\t\t\tconst parsed = parseTransition(entry.data);\n\t\t\tif (parsed !== undefined) transitions.push(parsed);\n\t\t}\n\t}\n\n\tconst planStatuses = parsePlanStatuses(planData);\n\tlet blocks: WorkflowBlock[] | undefined;\n\tif (hasStateEntry) {\n\t\tconst workflows = isRecord(stateData) && Array.isArray(stateData.workflows) ? stateData.workflows : [];\n\t\tblocks = workflows\n\t\t\t.map((item) => {\n\t\t\t\tconst parsed = parseWorkflowRecord(item);\n\t\t\t\tif (parsed === undefined) return undefined;\n\t\t\t\treturn {\n\t\t\t\t\tworkflowId: parsed.id,\n\t\t\t\t\ttitle: parsed.title,\n\t\t\t\t\tstatus: parsed.status,\n\t\t\t\t\trevision: parsed.revision,\n\t\t\t\t\tgoalId: parsed.goalId,\n\t\t\t\t\tactiveCount: [...parsed.runtime.values()].filter((item) => item.status === \"active\").length,\n\t\t\t\t\tmaxActiveStages: parsed.maxActiveStages,\n\t\t\t\t\tretreatCount: parsed.retreatCount,\n\t\t\t\t\tmaxRetreats: parsed.maxRetreats,\n\t\t\t\t\tdiagnostics: [...parsed.diagnostics],\n\t\t\t\t\tstages: buildStageRows(parsed, planStatuses),\n\t\t\t\t} satisfies WorkflowBlock;\n\t\t\t})\n\t\t\t.filter((block): block is WorkflowBlock => block !== undefined);\n\t}\n\n\tconst activeRecord = blocks?.filter((block) => block.status === \"draft\" || block.status === \"running\").at(-1);\n\tconst activeWorkflowId = activeRecord?.workflowId ?? blocks?.at(-1)?.workflowId;\n\n\treturn {\n\t\tpanorama: blocks,\n\t\ttransitions: transitions.slice(-transitionLimit).reverse(),\n\t\tactiveWorkflowId,\n\t};\n}\n\n/** Forwarded action vocabulary (§9 L2): rendered here, executed via workflow_advance by the main agent. */\nexport type WorkflowForwardAction = \"approve\" | \"reject\" | \"skip\" | \"cancel\";\n\n/** Action text injected into the conversation input, e.g. `approve stage s2-review`. */\nexport function buildWorkflowActionText(\n\taction: WorkflowForwardAction,\n\tworkflowId: string,\n\tstageId: string | undefined,\n): string {\n\tif (action === \"cancel\" || stageId === undefined) return `cancel workflow ${workflowId}`;\n\treturn `${action} stage ${stageId}`;\n}\n\n// ---------------------------------------------------------------------------\n// Component (L2 panorama + L3 log)\n// ---------------------------------------------------------------------------\n\n/** Selectable row shape used by the component; stage rows carry action targets. */\ninterface ViewRow {\n\ttext: string;\n\tstage: { workflowId: string; stageId: string } | undefined;\n}\n\nfunction stageStatusColor(status: StageStatus): (text: string) => string {\n\tswitch (status) {\n\t\tcase \"active\":\n\t\t\treturn (text) => theme.fg(\"accent\", text);\n\t\tcase \"awaiting_review\":\n\t\t\treturn (text) => theme.fg(\"warning\", text);\n\t\tcase \"completed\":\n\t\t\treturn (text) => theme.fg(\"success\", text);\n\t\tcase \"failed\":\n\t\t\treturn (text) => theme.fg(\"error\", text);\n\t\tcase \"skipped\":\n\t\t\treturn (text) => theme.fg(\"dim\", text);\n\t\tcase \"pending\":\n\t\t\treturn (text) => theme.fg(\"muted\", text);\n\t}\n}\n\nfunction workflowStatusColor(status: string): (text: string) => string {\n\tif (status === \"running\") return (text) => theme.fg(\"accent\", text);\n\tif (status === \"completed\") return (text) => theme.fg(\"success\", text);\n\tif (status === \"failed\") return (text) => theme.fg(\"error\", text);\n\treturn (text) => theme.fg(\"dim\", text);\n}\n\nfunction transitionCodeColor(code: string): (text: string) => string {\n\tif (code.includes(\"failed\") || code.includes(\"retreat\") || code.includes(\"error\") || code.includes(\"limit\")) {\n\t\treturn (text) => theme.fg(\"error\", text);\n\t}\n\tif (code.includes(\"held\") || code.includes(\"retry\") || code.includes(\"amended\")) {\n\t\treturn (text) => theme.fg(\"warning\", text);\n\t}\n\treturn (text) => theme.fg(\"muted\", text);\n}\n\n/** Renders the visible row window; reads live state from the owning component. */\nclass WorkflowRowsView implements Component {\n\tprivate view: WorkflowViewComponent;\n\n\tconstructor(view: WorkflowViewComponent) {\n\t\tthis.view = view;\n\t}\n\n\tinvalidate(): void {}\n\n\trender(width: number): string[] {\n\t\treturn this.view.renderRows(width);\n\t}\n}\n\nexport interface WorkflowViewConfig {\n\t/** Entries provider; rescanned when the array identity or length changes (append-only sessions). */\n\tgetEntries: () => readonly SessionEntry[];\n\t/** Maximum visible rows before the list scrolls. */\n\tmaxRows: number;\n\t/** Request a TUI re-render (used for transient status flashes). */\n\trequestRender?: () => void;\n}\n\nexport class WorkflowViewComponent extends Container {\n\tpublic onClose?: () => void;\n\tpublic onForwardAction?: (text: string) => void;\n\n\tprivate config: WorkflowViewConfig;\n\tprivate mode: \"panorama\" | \"log\" = \"panorama\";\n\tprivate rows: ViewRow[] = [];\n\tprivate selectedIndex = 0;\n\tprivate offset = 0;\n\tprivate titleText: Text;\n\tprivate modeHintText: Text;\n\tprivate helpText: Text;\n\tprivate flashText: Text;\n\tprivate cache: { entries: readonly SessionEntry[]; length: number; model: WorkflowViewModel } | undefined;\n\tprivate flashTimeout: ReturnType<typeof setTimeout> | null = null;\n\n\tconstructor(config: WorkflowViewConfig) {\n\t\tsuper();\n\n\t\tthis.config = config;\n\t\tthis.titleText = new Text(theme.fg(\"accent\", theme.bold(\" Workflow Overview\")), 1, 0);\n\t\tthis.modeHintText = new Text(\"\", 1, 0);\n\t\tthis.helpText = new Text(\"\", 1, 0);\n\t\tthis.flashText = new Text(\"\", 1, 0);\n\t\tthis.updateModeTexts();\n\n\t\tthis.addChild(new DynamicBorder());\n\t\tthis.addChild(this.titleText);\n\t\tthis.addChild(this.modeHintText);\n\t\tthis.addChild(new WorkflowRowsView(this));\n\t\tthis.addChild(this.flashText);\n\t\tthis.addChild(this.helpText);\n\t\tthis.addChild(new DynamicBorder());\n\t}\n\n\tdispose(): void {\n\t\tif (this.flashTimeout !== null) {\n\t\t\tclearTimeout(this.flashTimeout);\n\t\t\tthis.flashTimeout = null;\n\t\t}\n\t}\n\n\tprivate updateModeTexts(): void {\n\t\tconst label = this.mode === \"panorama\" ? \"panorama\" : \"transition log (newest first)\";\n\t\tthis.modeHintText.setText(theme.fg(\"dim\", ` ${label}`));\n\t\tthis.helpText.setText(this.buildHelpLine());\n\t}\n\n\tprivate buildHelpLine(): string {\n\t\tconst parts = [rawKeyHint(\"↑↓\", \"move\")];\n\t\tif (this.mode === \"panorama\") {\n\t\t\tparts.push(\n\t\t\t\trawKeyHint(\"tab/l\", \"log\"),\n\t\t\t\trawKeyHint(\"a\", \"approve\"),\n\t\t\t\trawKeyHint(\"r\", \"reject\"),\n\t\t\t\trawKeyHint(\"s\", \"skip\"),\n\t\t\t\trawKeyHint(\"c\", \"cancel\"),\n\t\t\t);\n\t\t} else {\n\t\t\tparts.push(rawKeyHint(\"tab/l\", \"panorama\"));\n\t\t}\n\t\tparts.push(keyHint(\"tui.select.cancel\", \"close\"));\n\t\treturn ` ${parts.join(\" \")}`;\n\t}\n\n\tprivate getModel(): WorkflowViewModel {\n\t\tconst entries = this.config.getEntries();\n\t\tif (this.cache && this.cache.entries === entries && this.cache.length === entries.length) {\n\t\t\treturn this.cache.model;\n\t\t}\n\t\tconst model = buildWorkflowViewModel(entries);\n\t\tthis.cache = { entries, length: entries.length, model };\n\t\treturn model;\n\t}\n\n\tprivate buildRows(model: WorkflowViewModel): ViewRow[] {\n\t\tconst rows: ViewRow[] = [];\n\t\tif (this.mode === \"log\") {\n\t\t\tif (model.transitions.length === 0) {\n\t\t\t\trows.push({ text: \" no workflow transitions recorded\", stage: undefined });\n\t\t\t\treturn rows;\n\t\t\t}\n\t\t\tfor (const transition of model.transitions) {\n\t\t\t\tconst stage = transition.stageId !== undefined ? `/${transition.stageId}` : \"\";\n\t\t\t\tconst detail = transition.detail !== undefined ? ` — ${transition.detail}` : \"\";\n\t\t\t\tconst code = transitionCodeColor(transition.code)(transition.code);\n\t\t\t\trows.push({\n\t\t\t\t\ttext: ` #${transition.revision} ${transition.workflowId}${stage} ${transition.from} -> ${transition.to} [${transition.trigger}] ${code}: ${transition.message}${detail}`,\n\t\t\t\t\tstage: undefined,\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn rows;\n\t\t}\n\n\t\tconst blocks = model.panorama;\n\t\tif (blocks === undefined) {\n\t\t\trows.push({ text: \" no workflow.state entry in this session\", stage: undefined });\n\t\t\treturn rows;\n\t\t}\n\t\tif (blocks.length === 0) {\n\t\t\trows.push({ text: \" no workflows in this session; create one with workflow_set\", stage: undefined });\n\t\t\treturn rows;\n\t\t}\n\t\tfor (const block of blocks) {\n\t\t\tconst status = workflowStatusColor(block.status)(block.status);\n\t\t\trows.push({\n\t\t\t\ttext: ` workflow \"${block.title}\" (${block.workflowId}) — ${status} · revision ${block.revision} · active ${block.activeCount}/${block.maxActiveStages} · retreats ${block.retreatCount}/${block.maxRetreats}`,\n\t\t\t\tstage: undefined,\n\t\t\t});\n\t\t\tif (block.goalId !== undefined) {\n\t\t\t\trows.push({ text: ` goal: ${block.goalId}`, stage: undefined });\n\t\t\t}\n\t\t\tfor (const stage of block.stages) {\n\t\t\t\trows.push({\n\t\t\t\t\ttext: this.formatStageRow(stage),\n\t\t\t\t\tstage: { workflowId: block.workflowId, stageId: stage.stageId },\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (block.diagnostics.length > 0) {\n\t\t\t\trows.push({ text: \" diagnostics:\", stage: undefined });\n\t\t\t\tfor (const diagnostic of block.diagnostics) {\n\t\t\t\t\trows.push({ text: theme.fg(\"warning\", ` - ${diagnostic}`), stage: undefined });\n\t\t\t\t}\n\t\t\t}\n\t\t\trows.push({ text: \"\", stage: undefined });\n\t\t}\n\t\treturn rows;\n\t}\n\n\tprivate formatStageRow(stage: WorkflowStageRow): string {\n\t\tconst pad = \" \".repeat(stage.depth + 1);\n\t\tif (stage.backReference) {\n\t\t\treturn `${pad} -> ${stage.stageId} (shown above)`;\n\t\t}\n\t\tconst bits = [`- ${stage.stageId} [${stageStatusColor(stage.status)(stage.status)}] ${stage.title}`];\n\t\tif (stage.waitingOn !== null) bits.push(theme.fg(\"dim\", `— waiting: ${stage.waitingOn}`));\n\t\tif (stage.attempts > 0) bits.push(theme.fg(\"dim\", `· attempts ${stage.attempts}`));\n\t\tif (stage.evidenceCount > 0) bits.push(theme.fg(\"dim\", `· evidence ${stage.evidenceCount}`));\n\t\tif (stage.scopeConflict !== null) {\n\t\t\tbits.push(theme.fg(\"warning\", `⚠ scope:${stage.scopeConflict}`));\n\t\t}\n\t\treturn `${pad}${bits.join(\" \")}`;\n\t}\n\n\t/** Rows are rebuilt lazily on access; the key couples rebuild + selection restore. */\n\tprivate syncRows(): void {\n\t\tconst model = this.getModel();\n\t\tconst previous = this.rows[this.selectedIndex]?.stage;\n\t\tthis.rows = this.buildRows(model);\n\t\tif (previous !== undefined) {\n\t\t\tconst restored = this.rows.findIndex((row) => row.stage?.stageId === previous.stageId);\n\t\t\tif (restored !== -1) this.selectedIndex = restored;\n\t\t}\n\t\tif (this.selectedIndex >= this.rows.length) this.selectedIndex = Math.max(0, this.rows.length - 1);\n\t\tthis.clampOffset();\n\t}\n\n\tprivate clampOffset(): void {\n\t\tconst maxRows = Math.max(1, this.config.maxRows);\n\t\tif (this.selectedIndex < this.offset) this.offset = this.selectedIndex;\n\t\tif (this.selectedIndex >= this.offset + maxRows) this.offset = this.selectedIndex - maxRows + 1;\n\t\tif (this.offset < 0) this.offset = 0;\n\t}\n\n\trenderRows(width: number): string[] {\n\t\tthis.syncRows();\n\t\tconst maxRows = Math.max(1, this.config.maxRows);\n\t\tconst lines: string[] = [];\n\t\tfor (let index = this.offset; index < Math.min(this.rows.length, this.offset + maxRows); index++) {\n\t\t\tconst row = this.rows[index];\n\t\t\tif (row === undefined) continue;\n\t\t\tconst selected = index === this.selectedIndex;\n\t\t\tconst prefix = selected ? theme.fg(\"accent\", \"→ \") : \" \";\n\t\t\tlines.push(truncateToWidth(`${prefix}${row.text}`, width));\n\t\t}\n\t\tconst hiddenAbove = this.offset;\n\t\tconst hiddenBelow = this.rows.length - this.offset - maxRows;\n\t\tconst hidden: string[] = [];\n\t\tif (hiddenAbove > 0) hidden.push(`↑${hiddenAbove}`);\n\t\tif (hiddenBelow > 0) hidden.push(`↓${hiddenBelow}`);\n\t\t// Fixed output height (exactly maxRows content rows plus this final\n\t\t// indicator row), the same contract as agents-view renderRows: the\n\t\t// overlay's grid footprint must not change with mode switches or row\n\t\t// counts, or the chat/editor layout boundary moves between frames.\n\t\twhile (lines.length < maxRows) lines.push(truncateToWidth(\" \", width));\n\t\tlines.push(truncateToWidth(hidden.length > 0 ? theme.fg(\"dim\", ` ${hidden.join(\" \")}`) : \" \", width));\n\t\treturn lines;\n\t}\n\n\tprivate move(delta: number): void {\n\t\tif (this.rows.length === 0) return;\n\t\tthis.selectedIndex = Math.min(this.rows.length - 1, Math.max(0, this.selectedIndex + delta));\n\t\tthis.clampOffset();\n\t}\n\n\tprivate flash(message: string): void {\n\t\tthis.flashText.setText(theme.fg(\"warning\", ` ${message}`));\n\t\tif (this.flashTimeout !== null) clearTimeout(this.flashTimeout);\n\t\tthis.flashTimeout = setTimeout(() => {\n\t\t\tthis.flashText.setText(\"\");\n\t\t\tthis.flashTimeout = null;\n\t\t\tthis.config.requestRender?.();\n\t\t}, 2500);\n\t\tthis.config.requestRender?.();\n\t}\n\n\tprivate toggleMode(): void {\n\t\tthis.mode = this.mode === \"panorama\" ? \"log\" : \"panorama\";\n\t\tthis.selectedIndex = 0;\n\t\tthis.offset = 0;\n\t\tthis.updateModeTexts();\n\t\tthis.config.requestRender?.();\n\t}\n\n\tprivate forward(action: WorkflowForwardAction): void {\n\t\tconst selected = this.rows[this.selectedIndex];\n\t\tif (selected?.stage === undefined) {\n\t\t\tif (action === \"cancel\") {\n\t\t\t\tconst workflowId = this.getModel().activeWorkflowId;\n\t\t\t\tif (workflowId === undefined) {\n\t\t\t\t\tthis.flash(\"No workflow to cancel\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.onForwardAction?.(buildWorkflowActionText(action, workflowId, undefined));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.flash(\"Select a stage row first\");\n\t\t\treturn;\n\t\t}\n\t\tthis.onForwardAction?.(buildWorkflowActionText(action, selected.stage.workflowId, selected.stage.stageId));\n\t}\n\n\thandleInput(keyData: string): void {\n\t\tconst kb = getKeybindings();\n\t\tif (kb.matches(keyData, \"tui.select.cancel\")) {\n\t\t\tthis.onClose?.();\n\t\t} else if (kb.matches(keyData, \"tui.input.tab\") || keyData === \"l\") {\n\t\t\tthis.toggleMode();\n\t\t} else if (kb.matches(keyData, \"tui.select.up\") || keyData === \"k\") {\n\t\t\tthis.move(-1);\n\t\t} else if (kb.matches(keyData, \"tui.select.down\") || keyData === \"j\") {\n\t\t\tthis.move(1);\n\t\t} else if (kb.matches(keyData, \"tui.select.pageUp\")) {\n\t\t\tthis.move(-Math.max(1, this.config.maxRows));\n\t\t} else if (kb.matches(keyData, \"tui.select.pageDown\")) {\n\t\t\tthis.move(Math.max(1, this.config.maxRows));\n\t\t} else if (keyData === \"a\") {\n\t\t\tthis.forward(\"approve\");\n\t\t} else if (keyData === \"r\") {\n\t\t\tthis.forward(\"reject\");\n\t\t} else if (keyData === \"s\") {\n\t\t\tthis.forward(\"skip\");\n\t\t} else if (keyData === \"c\") {\n\t\t\tthis.forward(\"cancel\");\n\t\t}\n\t}\n}\n"]}
|
|
@@ -24,6 +24,9 @@ export interface CommandDispatchHost {
|
|
|
24
24
|
}): Promise<void>;
|
|
25
25
|
handleNameCommand(text: string): void;
|
|
26
26
|
handleSessionCommand(): void;
|
|
27
|
+
/** Interrupt grading (§4.2): terminate every background subagent; the
|
|
28
|
+
* /stop-agents command's single execution face. */
|
|
29
|
+
handleStopAgentsCommand(): void;
|
|
27
30
|
handleMetricsCommand(turnsArg: string | undefined): void;
|
|
28
31
|
handleChangelogCommand(): void;
|
|
29
32
|
handleHelpCommand(): void;
|
|
@@ -39,9 +42,14 @@ export interface CommandDispatchHost {
|
|
|
39
42
|
handleDebugCommand(): void;
|
|
40
43
|
handleArminSaysHi(): void;
|
|
41
44
|
showSessionSelector(): void;
|
|
45
|
+
showAgentsView(): void;
|
|
46
|
+
handleQueueCommand(text: string | undefined): Promise<void>;
|
|
47
|
+
handleDequeueCommand(): void;
|
|
48
|
+
handleEditorCommand(): Promise<void>;
|
|
42
49
|
shutdown(options?: {
|
|
43
50
|
fromSignal?: boolean;
|
|
44
51
|
}): Promise<void>;
|
|
52
|
+
showWorkflowView(): void;
|
|
45
53
|
}
|
|
46
54
|
export interface CommandDispatchEntry {
|
|
47
55
|
/** Command word including the leading slash, e.g. "/model". */
|
|
@@ -65,4 +73,18 @@ export interface CommandDispatchMatch {
|
|
|
65
73
|
export declare const COMMAND_DISPATCH_ENTRIES: readonly CommandDispatchEntry[];
|
|
66
74
|
/** Find the entry matching text: exact command, or command prefix plus argument. */
|
|
67
75
|
export declare function matchCommandDispatchEntry(entries: readonly CommandDispatchEntry[], text: string): CommandDispatchMatch | undefined;
|
|
76
|
+
/** Minimal command shape the completion filter works on (mirrors SlashCommand). */
|
|
77
|
+
export interface CompletionCommandInput {
|
|
78
|
+
readonly name: string;
|
|
79
|
+
readonly description: string;
|
|
80
|
+
readonly argumentHint?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Capability commands that collide with a builtin, prompt-template, or skill
|
|
84
|
+
* command name are rejected by AgentSession at invocation time rather than
|
|
85
|
+
* silently resolving to one source, so the colliding capability command is
|
|
86
|
+
* withheld from the completion list entirely (both sides stay executable via
|
|
87
|
+
* their own paths; neither is offered as an ambiguous completion).
|
|
88
|
+
*/
|
|
89
|
+
export declare function filterCapabilityCommandsForCompletions(capabilityCommands: readonly CompletionCommandInput[], reservedNames: readonly Iterable<string>[]): CompletionCommandInput[];
|
|
68
90
|
//# sourceMappingURL=interactive-commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-commands.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-commands.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IACnC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,oBAAoB,IAAI,IAAI,CAAC;IAC7B,kBAAkB,IAAI,IAAI,CAAC;IAC3B,kBAAkB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjD,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAAE,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAAC,eAAe,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvG,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,oBAAoB,IAAI,IAAI,CAAC;IAC7B,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IACzD,sBAAsB,IAAI,IAAI,CAAC;IA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,EAAE,oBAAoB,CAAC;IAC5B,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CACxB;AAED,eAAO,MAAM,wBAAwB,EAAE,SAAS,oBAAoB,EAuInE,CAAC;AAEF,oFAAoF;AACpF,wBAAgB,yBAAyB,CACxC,OAAO,EAAE,SAAS,oBAAoB,EAAE,EACxC,IAAI,EAAE,MAAM,GACV,oBAAoB,GAAG,SAAS,CAYlC","sourcesContent":["/**\n * Slash-command dispatch table for the interactive mode editor submit handler.\n * Extracted from InteractiveMode.setupEditorSubmitHandler; entry order mirrors\n * the original if-chain and each run body mirrors its branch verbatim\n * (await/no-await and editor clearing order included).\n */\n\n/**\n * Narrow facade InteractiveMode exposes to the dispatch table. Entries resolve\n * handlers through this interface at dispatch time, so instance-level\n * overrides keep working.\n */\nexport interface CommandDispatchHost {\n\tsetEditorText(text: string): void;\n\tshowSettingsSelector(): void;\n\tshowModelsSelector(): void;\n\thandleModelCommand(searchTerm?: string): Promise<void>;\n\thandleThinkingCommand(searchTerm?: string): void;\n\thandleSuiteCommand(suiteId?: string): void;\n\thandleExportCommand(text: string): Promise<void>;\n\thandleImportCommand(text: string): Promise<void>;\n\thandleCopyCommand(options?: { flashConfirmation?: boolean; preferSelection?: boolean }): Promise<void>;\n\thandleNameCommand(text: string): void;\n\thandleSessionCommand(): void;\n\thandleMetricsCommand(turnsArg: string | undefined): void;\n\thandleChangelogCommand(): void;\n\thandleHelpCommand(): void;\n\thandleHotkeysCommand(): void;\n\tshowUserMessageSelector(): void;\n\thandleCloneCommand(): Promise<void>;\n\tshowTreeSelector(initialSelectedId?: string): void;\n\thandleLoginCommand(providerRef?: string): Promise<void>;\n\tshowOAuthSelector(mode: \"login\" | \"logout\"): Promise<void>;\n\thandleClearCommand(): Promise<void>;\n\thandleCompactCommand(customInstructions?: string): Promise<void>;\n\thandleReloadCommand(): Promise<void>;\n\thandleDebugCommand(): void;\n\thandleArminSaysHi(): void;\n\tshowSessionSelector(): void;\n\tshutdown(options?: { fromSignal?: boolean }): Promise<void>;\n}\n\nexport interface CommandDispatchEntry {\n\t/** Command word including the leading slash, e.g. \"/model\". */\n\tcommand: string;\n\t/**\n\t * Slice offset of the optional argument for prefix commands\n\t * (\"/model claude\" -> text.slice(7).trim()); omit for exact-match commands.\n\t */\n\targOffset?: number;\n\t/** Report a blank (empty after trim) argument as undefined. */\n\tblankArgToUndefined?: boolean;\n\t/** Clear the editor text before running the handler instead of after. */\n\tclearEditorBeforeRun?: boolean;\n\t/** Handler; receives the full submitted text and the extracted argument. */\n\trun: (host: CommandDispatchHost, text: string, arg: string | undefined) => Promise<void> | void;\n}\n\nexport interface CommandDispatchMatch {\n\tentry: CommandDispatchEntry;\n\targ: string | undefined;\n}\n\nexport const COMMAND_DISPATCH_ENTRIES: readonly CommandDispatchEntry[] = [\n\t{\n\t\tcommand: \"/settings\",\n\t\trun: (host) => {\n\t\t\thost.showSettingsSelector();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/scoped-models\",\n\t\tclearEditorBeforeRun: true,\n\t\trun: async (host) => {\n\t\t\tawait host.showModelsSelector();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/model\",\n\t\targOffset: 7,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => host.handleModelCommand(arg),\n\t},\n\t{\n\t\tcommand: \"/thinking\",\n\t\targOffset: 10,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => {\n\t\t\thost.handleThinkingCommand(arg);\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/suite\",\n\t\targOffset: 7,\n\t\tblankArgToUndefined: true,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => {\n\t\t\thost.handleSuiteCommand(arg);\n\t\t},\n\t},\n\t// /export, /import and /name are prefix commands whose handlers parse the\n\t// full text themselves; argOffset only enables prefix matching here.\n\t{ command: \"/export\", argOffset: 8, run: (host, text) => host.handleExportCommand(text) },\n\t{ command: \"/import\", argOffset: 8, run: (host, text) => host.handleImportCommand(text) },\n\t{ command: \"/copy\", run: (host) => host.handleCopyCommand() },\n\t{\n\t\tcommand: \"/name\",\n\t\targOffset: 6,\n\t\trun: (host, text) => {\n\t\t\thost.handleNameCommand(text);\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/session\",\n\t\trun: (host) => {\n\t\t\thost.handleSessionCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/metrics\",\n\t\targOffset: 9,\n\t\tblankArgToUndefined: true,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => {\n\t\t\thost.handleMetricsCommand(arg);\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/changelog\",\n\t\trun: (host) => {\n\t\t\thost.handleChangelogCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/help\",\n\t\trun: (host) => {\n\t\t\thost.handleHelpCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/hotkeys\",\n\t\trun: (host) => {\n\t\t\thost.handleHotkeysCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/fork\",\n\t\trun: (host) => {\n\t\t\thost.showUserMessageSelector();\n\t\t},\n\t},\n\t{ command: \"/clone\", clearEditorBeforeRun: true, run: (host) => host.handleCloneCommand() },\n\t{\n\t\tcommand: \"/tree\",\n\t\trun: (host) => {\n\t\t\thost.showTreeSelector();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/login\",\n\t\targOffset: 7,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => host.handleLoginCommand(arg),\n\t},\n\t// Original branch does not await showOAuthSelector; keep it fire-and-forget.\n\t{\n\t\tcommand: \"/logout\",\n\t\trun: (host) => {\n\t\t\tvoid host.showOAuthSelector(\"logout\");\n\t\t},\n\t},\n\t{ command: \"/new\", clearEditorBeforeRun: true, run: (host) => host.handleClearCommand() },\n\t{\n\t\tcommand: \"/compact\",\n\t\targOffset: 9,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => host.handleCompactCommand(arg),\n\t},\n\t{ command: \"/reload\", clearEditorBeforeRun: true, run: (host) => host.handleReloadCommand() },\n\t{\n\t\tcommand: \"/debug\",\n\t\trun: (host) => {\n\t\t\thost.handleDebugCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/arminsayshi\",\n\t\trun: (host) => {\n\t\t\thost.handleArminSaysHi();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/resume\",\n\t\trun: (host) => {\n\t\t\thost.showSessionSelector();\n\t\t},\n\t},\n\t{ command: \"/quit\", clearEditorBeforeRun: true, run: (host) => host.shutdown() },\n];\n\n/** Find the entry matching text: exact command, or command prefix plus argument. */\nexport function matchCommandDispatchEntry(\n\tentries: readonly CommandDispatchEntry[],\n\ttext: string,\n): CommandDispatchMatch | undefined {\n\tfor (const entry of entries) {\n\t\tif (text === entry.command) {\n\t\t\treturn { entry, arg: undefined };\n\t\t}\n\t\tif (entry.argOffset === undefined || !text.startsWith(`${entry.command} `)) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst arg = text.slice(entry.argOffset).trim();\n\t\treturn { entry, arg: entry.blankArgToUndefined && arg.length === 0 ? undefined : arg };\n\t}\n\treturn undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interactive-commands.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-commands.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IACnC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,oBAAoB,IAAI,IAAI,CAAC;IAC7B,kBAAkB,IAAI,IAAI,CAAC;IAC3B,kBAAkB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjD,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3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;;GAMG;AACH,wBAAgB,sCAAsC,CACrD,kBAAkB,EAAE,SAAS,sBAAsB,EAAE,EACrD,aAAa,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,EAAE,GACxC,sBAAsB,EAAE,CAU1B","sourcesContent":["/**\n * Slash-command dispatch table for the interactive mode editor submit handler.\n * Extracted from InteractiveMode.setupEditorSubmitHandler; entry order mirrors\n * the original if-chain and each run body mirrors its branch verbatim\n * (await/no-await and editor clearing order included).\n */\n\n/**\n * Narrow facade InteractiveMode exposes to the dispatch table. Entries resolve\n * handlers through this interface at dispatch time, so instance-level\n * overrides keep working.\n */\nexport interface CommandDispatchHost {\n\tsetEditorText(text: string): void;\n\tshowSettingsSelector(): void;\n\tshowModelsSelector(): void;\n\thandleModelCommand(searchTerm?: string): Promise<void>;\n\thandleThinkingCommand(searchTerm?: string): void;\n\thandleSuiteCommand(suiteId?: string): void;\n\thandleExportCommand(text: string): Promise<void>;\n\thandleImportCommand(text: string): Promise<void>;\n\thandleCopyCommand(options?: { flashConfirmation?: boolean; preferSelection?: boolean }): Promise<void>;\n\thandleNameCommand(text: string): void;\n\thandleSessionCommand(): void;\n\t/** Interrupt grading (§4.2): terminate every background subagent; the\n\t * /stop-agents command's single execution face. */\n\thandleStopAgentsCommand(): void;\n\thandleMetricsCommand(turnsArg: string | undefined): void;\n\thandleChangelogCommand(): void;\n\thandleHelpCommand(): void;\n\thandleHotkeysCommand(): void;\n\tshowUserMessageSelector(): void;\n\thandleCloneCommand(): Promise<void>;\n\tshowTreeSelector(initialSelectedId?: string): void;\n\thandleLoginCommand(providerRef?: string): Promise<void>;\n\tshowOAuthSelector(mode: \"login\" | \"logout\"): Promise<void>;\n\thandleClearCommand(): Promise<void>;\n\thandleCompactCommand(customInstructions?: string): Promise<void>;\n\thandleReloadCommand(): Promise<void>;\n\thandleDebugCommand(): void;\n\thandleArminSaysHi(): void;\n\tshowSessionSelector(): void;\n\tshowAgentsView(): void;\n\thandleQueueCommand(text: string | undefined): Promise<void>;\n\thandleDequeueCommand(): void;\n\thandleEditorCommand(): Promise<void>;\n\tshutdown(options?: { fromSignal?: boolean }): Promise<void>;\n\tshowWorkflowView(): void;\n}\n\nexport interface CommandDispatchEntry {\n\t/** Command word including the leading slash, e.g. \"/model\". */\n\tcommand: string;\n\t/**\n\t * Slice offset of the optional argument for prefix commands\n\t * (\"/model claude\" -> text.slice(7).trim()); omit for exact-match commands.\n\t */\n\targOffset?: number;\n\t/** Report a blank (empty after trim) argument as undefined. */\n\tblankArgToUndefined?: boolean;\n\t/** Clear the editor text before running the handler instead of after. */\n\tclearEditorBeforeRun?: boolean;\n\t/** Handler; receives the full submitted text and the extracted argument. */\n\trun: (host: CommandDispatchHost, text: string, arg: string | undefined) => Promise<void> | void;\n}\n\nexport interface CommandDispatchMatch {\n\tentry: CommandDispatchEntry;\n\targ: string | undefined;\n}\n\nexport const COMMAND_DISPATCH_ENTRIES: readonly CommandDispatchEntry[] = [\n\t{\n\t\tcommand: \"/settings\",\n\t\trun: (host) => {\n\t\t\thost.showSettingsSelector();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/scoped-models\",\n\t\tclearEditorBeforeRun: true,\n\t\trun: async (host) => {\n\t\t\tawait host.showModelsSelector();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/model\",\n\t\targOffset: 7,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => host.handleModelCommand(arg),\n\t},\n\t{\n\t\tcommand: \"/thinking\",\n\t\targOffset: 10,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => {\n\t\t\thost.handleThinkingCommand(arg);\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/suite\",\n\t\targOffset: 7,\n\t\tblankArgToUndefined: true,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => {\n\t\t\thost.handleSuiteCommand(arg);\n\t\t},\n\t},\n\t// /export, /import and /name are prefix commands whose handlers parse the\n\t// full text themselves; argOffset only enables prefix matching here.\n\t{ command: \"/export\", argOffset: 8, run: (host, text) => host.handleExportCommand(text) },\n\t{ command: \"/import\", argOffset: 8, run: (host, text) => host.handleImportCommand(text) },\n\t{ command: \"/copy\", run: (host) => host.handleCopyCommand() },\n\t{\n\t\tcommand: \"/name\",\n\t\targOffset: 6,\n\t\trun: (host, text) => {\n\t\t\thost.handleNameCommand(text);\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/session\",\n\t\trun: (host) => {\n\t\t\thost.handleSessionCommand();\n\t\t},\n\t},\n\t// Interrupt grading (设计 子代理运行时 §4.2, 2026-10-02): the only explicit\n\t// face for terminating background subagents — Esc never cancels them.\n\t{\n\t\tcommand: \"/stop-agents\",\n\t\trun: (host) => {\n\t\t\thost.handleStopAgentsCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/metrics\",\n\t\targOffset: 9,\n\t\tblankArgToUndefined: true,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => {\n\t\t\thost.handleMetricsCommand(arg);\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/changelog\",\n\t\trun: (host) => {\n\t\t\thost.handleChangelogCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/help\",\n\t\trun: (host) => {\n\t\t\thost.handleHelpCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/hotkeys\",\n\t\trun: (host) => {\n\t\t\thost.handleHotkeysCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/fork\",\n\t\trun: (host) => {\n\t\t\thost.showUserMessageSelector();\n\t\t},\n\t},\n\t{ command: \"/clone\", clearEditorBeforeRun: true, run: (host) => host.handleCloneCommand() },\n\t{\n\t\tcommand: \"/tree\",\n\t\trun: (host) => {\n\t\t\thost.showTreeSelector();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/login\",\n\t\targOffset: 7,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => host.handleLoginCommand(arg),\n\t},\n\t// Original branch does not await showOAuthSelector; keep it fire-and-forget.\n\t{\n\t\tcommand: \"/logout\",\n\t\trun: (host) => {\n\t\t\tvoid host.showOAuthSelector(\"logout\");\n\t\t},\n\t},\n\t{ command: \"/new\", clearEditorBeforeRun: true, run: (host) => host.handleClearCommand() },\n\t{\n\t\tcommand: \"/compact\",\n\t\targOffset: 9,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => host.handleCompactCommand(arg),\n\t},\n\t{ command: \"/reload\", clearEditorBeforeRun: true, run: (host) => host.handleReloadCommand() },\n\t{\n\t\tcommand: \"/debug\",\n\t\trun: (host) => {\n\t\t\thost.handleDebugCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/arminsayshi\",\n\t\trun: (host) => {\n\t\t\thost.handleArminSaysHi();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/resume\",\n\t\trun: (host) => {\n\t\t\thost.showSessionSelector();\n\t\t},\n\t},\n\t// Read-only subagent session browser (view-family command: sync, no editor\n\t// clearing), grouped with /resume ahead of the /workflow view overlay.\n\t{\n\t\tcommand: \"/agents\",\n\t\trun: (host) => {\n\t\t\thost.showAgentsView();\n\t\t},\n\t},\n\t// Follow-up queue face (single-entry iron law: /queue replaces the shipped\n\t// ctrl+q default). A bare /queue prints usage — the editor buffer is\n\t// cleared on submit before the command runs, so there is no editor\n\t// content to queue (the configurable keybinding keeps that behavior).\n\t{\n\t\tcommand: \"/queue\",\n\t\targOffset: 7,\n\t\tblankArgToUndefined: true,\n\t\trun: (host, _text, arg) => host.handleQueueCommand(arg),\n\t},\n\t{ command: \"/dequeue\", run: (host) => host.handleDequeueCommand() },\n\t{ command: \"/editor\", run: (host) => host.handleEditorCommand() },\n\t{ command: \"/quit\", clearEditorBeforeRun: true, run: (host) => host.shutdown() },\n\t// Exact-match only: every other /workflow subcommand (why/log/...) keeps\n\t// flowing to the plugin's text command path untouched (§9 L2).\n\t{\n\t\tcommand: \"/workflow view\",\n\t\trun: (host) => {\n\t\t\thost.showWorkflowView();\n\t\t},\n\t},\n];\n\n/** Find the entry matching text: exact command, or command prefix plus argument. */\nexport function matchCommandDispatchEntry(\n\tentries: readonly CommandDispatchEntry[],\n\ttext: string,\n): CommandDispatchMatch | undefined {\n\tfor (const entry of entries) {\n\t\tif (text === entry.command) {\n\t\t\treturn { entry, arg: undefined };\n\t\t}\n\t\tif (entry.argOffset === undefined || !text.startsWith(`${entry.command} `)) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst arg = text.slice(entry.argOffset).trim();\n\t\treturn { entry, arg: entry.blankArgToUndefined && arg.length === 0 ? undefined : arg };\n\t}\n\treturn undefined;\n}\n\n/** Minimal command shape the completion filter works on (mirrors SlashCommand). */\nexport interface CompletionCommandInput {\n\treadonly name: string;\n\treadonly description: string;\n\treadonly argumentHint?: string;\n}\n\n/**\n * Capability commands that collide with a builtin, prompt-template, or skill\n * command name are rejected by AgentSession at invocation time rather than\n * silently resolving to one source, so the colliding capability command is\n * withheld from the completion list entirely (both sides stay executable via\n * their own paths; neither is offered as an ambiguous completion).\n */\nexport function filterCapabilityCommandsForCompletions(\n\tcapabilityCommands: readonly CompletionCommandInput[],\n\treservedNames: readonly Iterable<string>[],\n): CompletionCommandInput[] {\n\tconst reserved = new Set<string>();\n\tfor (const names of reservedNames) for (const name of names) reserved.add(name);\n\treturn capabilityCommands\n\t\t.filter((command) => !reserved.has(command.name))\n\t\t.map((command) => ({\n\t\t\tname: command.name,\n\t\t\tdescription: command.description,\n\t\t\t...(command.argumentHint !== undefined ? { argumentHint: command.argumentHint } : {}),\n\t\t}));\n}\n"]}
|
|
@@ -59,6 +59,14 @@ export const COMMAND_DISPATCH_ENTRIES = [
|
|
|
59
59
|
host.handleSessionCommand();
|
|
60
60
|
},
|
|
61
61
|
},
|
|
62
|
+
// Interrupt grading (设计 子代理运行时 §4.2, 2026-10-02): the only explicit
|
|
63
|
+
// face for terminating background subagents — Esc never cancels them.
|
|
64
|
+
{
|
|
65
|
+
command: "/stop-agents",
|
|
66
|
+
run: (host) => {
|
|
67
|
+
host.handleStopAgentsCommand();
|
|
68
|
+
},
|
|
69
|
+
},
|
|
62
70
|
{
|
|
63
71
|
command: "/metrics",
|
|
64
72
|
argOffset: 9,
|
|
@@ -138,7 +146,35 @@ export const COMMAND_DISPATCH_ENTRIES = [
|
|
|
138
146
|
host.showSessionSelector();
|
|
139
147
|
},
|
|
140
148
|
},
|
|
149
|
+
// Read-only subagent session browser (view-family command: sync, no editor
|
|
150
|
+
// clearing), grouped with /resume ahead of the /workflow view overlay.
|
|
151
|
+
{
|
|
152
|
+
command: "/agents",
|
|
153
|
+
run: (host) => {
|
|
154
|
+
host.showAgentsView();
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
// Follow-up queue face (single-entry iron law: /queue replaces the shipped
|
|
158
|
+
// ctrl+q default). A bare /queue prints usage — the editor buffer is
|
|
159
|
+
// cleared on submit before the command runs, so there is no editor
|
|
160
|
+
// content to queue (the configurable keybinding keeps that behavior).
|
|
161
|
+
{
|
|
162
|
+
command: "/queue",
|
|
163
|
+
argOffset: 7,
|
|
164
|
+
blankArgToUndefined: true,
|
|
165
|
+
run: (host, _text, arg) => host.handleQueueCommand(arg),
|
|
166
|
+
},
|
|
167
|
+
{ command: "/dequeue", run: (host) => host.handleDequeueCommand() },
|
|
168
|
+
{ command: "/editor", run: (host) => host.handleEditorCommand() },
|
|
141
169
|
{ command: "/quit", clearEditorBeforeRun: true, run: (host) => host.shutdown() },
|
|
170
|
+
// Exact-match only: every other /workflow subcommand (why/log/...) keeps
|
|
171
|
+
// flowing to the plugin's text command path untouched (§9 L2).
|
|
172
|
+
{
|
|
173
|
+
command: "/workflow view",
|
|
174
|
+
run: (host) => {
|
|
175
|
+
host.showWorkflowView();
|
|
176
|
+
},
|
|
177
|
+
},
|
|
142
178
|
];
|
|
143
179
|
/** Find the entry matching text: exact command, or command prefix plus argument. */
|
|
144
180
|
export function matchCommandDispatchEntry(entries, text) {
|
|
@@ -154,4 +190,24 @@ export function matchCommandDispatchEntry(entries, text) {
|
|
|
154
190
|
}
|
|
155
191
|
return undefined;
|
|
156
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* Capability commands that collide with a builtin, prompt-template, or skill
|
|
195
|
+
* command name are rejected by AgentSession at invocation time rather than
|
|
196
|
+
* silently resolving to one source, so the colliding capability command is
|
|
197
|
+
* withheld from the completion list entirely (both sides stay executable via
|
|
198
|
+
* their own paths; neither is offered as an ambiguous completion).
|
|
199
|
+
*/
|
|
200
|
+
export function filterCapabilityCommandsForCompletions(capabilityCommands, reservedNames) {
|
|
201
|
+
const reserved = new Set();
|
|
202
|
+
for (const names of reservedNames)
|
|
203
|
+
for (const name of names)
|
|
204
|
+
reserved.add(name);
|
|
205
|
+
return capabilityCommands
|
|
206
|
+
.filter((command) => !reserved.has(command.name))
|
|
207
|
+
.map((command) => ({
|
|
208
|
+
name: command.name,
|
|
209
|
+
description: command.description,
|
|
210
|
+
...(command.argumentHint !== undefined ? { argumentHint: command.argumentHint } : {}),
|
|
211
|
+
}));
|
|
212
|
+
}
|
|
157
213
|
//# sourceMappingURL=interactive-commands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-commands.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-commands.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA0DH,MAAM,CAAC,MAAM,wBAAwB,GAAoC;IACxE;QACC,OAAO,EAAE,WAAW;QACpB,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;YACd,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAAA,CAC5B;KACD;IACD;QACC,OAAO,EAAE,gBAAgB;QACzB,oBAAoB,EAAE,IAAI;QAC1B,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC;YACpB,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAAA,CAChC;KACD;IACD;QACC,OAAO,EAAE,QAAQ;QACjB,SAAS,EAAE,CAAC;QACZ,oBAAoB,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E,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE;CAChF,CAAC;AAEF,oFAAoF;AACpF,MAAM,UAAU,yBAAyB,CACxC,OAAwC,EACxC,IAAY,EACuB;IACnC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;YAC5B,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;QAClC,CAAC;QACD,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC;YAC5E,SAAS;QACV,CAAC;QACD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC;QAC/C,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,mBAAmB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IACxF,CAAC;IACD,OAAO,SAAS,CAAC;AAAA,CACjB","sourcesContent":["/**\n * Slash-command dispatch table for the interactive mode editor submit handler.\n * Extracted from InteractiveMode.setupEditorSubmitHandler; entry order mirrors\n * the original if-chain and each run body mirrors its branch verbatim\n * (await/no-await and editor clearing order included).\n */\n\n/**\n * Narrow facade InteractiveMode exposes to the dispatch table. Entries resolve\n * handlers through this interface at dispatch time, so instance-level\n * overrides keep working.\n */\nexport interface CommandDispatchHost {\n\tsetEditorText(text: string): void;\n\tshowSettingsSelector(): void;\n\tshowModelsSelector(): void;\n\thandleModelCommand(searchTerm?: string): Promise<void>;\n\thandleThinkingCommand(searchTerm?: string): void;\n\thandleSuiteCommand(suiteId?: string): void;\n\thandleExportCommand(text: string): Promise<void>;\n\thandleImportCommand(text: string): Promise<void>;\n\thandleCopyCommand(options?: { flashConfirmation?: boolean; preferSelection?: boolean }): Promise<void>;\n\thandleNameCommand(text: string): void;\n\thandleSessionCommand(): void;\n\thandleMetricsCommand(turnsArg: string | undefined): void;\n\thandleChangelogCommand(): void;\n\thandleHelpCommand(): void;\n\thandleHotkeysCommand(): void;\n\tshowUserMessageSelector(): void;\n\thandleCloneCommand(): Promise<void>;\n\tshowTreeSelector(initialSelectedId?: string): void;\n\thandleLoginCommand(providerRef?: string): Promise<void>;\n\tshowOAuthSelector(mode: \"login\" | \"logout\"): Promise<void>;\n\thandleClearCommand(): Promise<void>;\n\thandleCompactCommand(customInstructions?: string): Promise<void>;\n\thandleReloadCommand(): Promise<void>;\n\thandleDebugCommand(): void;\n\thandleArminSaysHi(): void;\n\tshowSessionSelector(): void;\n\tshutdown(options?: { fromSignal?: boolean }): Promise<void>;\n}\n\nexport interface CommandDispatchEntry {\n\t/** Command word including the leading slash, e.g. \"/model\". */\n\tcommand: string;\n\t/**\n\t * Slice offset of the optional argument for prefix commands\n\t * (\"/model claude\" -> text.slice(7).trim()); omit for exact-match commands.\n\t */\n\targOffset?: number;\n\t/** Report a blank (empty after trim) argument as undefined. */\n\tblankArgToUndefined?: boolean;\n\t/** Clear the editor text before running the handler instead of after. */\n\tclearEditorBeforeRun?: boolean;\n\t/** Handler; receives the full submitted text and the extracted argument. */\n\trun: (host: CommandDispatchHost, text: string, arg: string | undefined) => Promise<void> | void;\n}\n\nexport interface CommandDispatchMatch {\n\tentry: CommandDispatchEntry;\n\targ: string | undefined;\n}\n\nexport const COMMAND_DISPATCH_ENTRIES: readonly CommandDispatchEntry[] = [\n\t{\n\t\tcommand: \"/settings\",\n\t\trun: (host) => {\n\t\t\thost.showSettingsSelector();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/scoped-models\",\n\t\tclearEditorBeforeRun: true,\n\t\trun: async (host) => {\n\t\t\tawait host.showModelsSelector();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/model\",\n\t\targOffset: 7,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => host.handleModelCommand(arg),\n\t},\n\t{\n\t\tcommand: \"/thinking\",\n\t\targOffset: 10,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => {\n\t\t\thost.handleThinkingCommand(arg);\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/suite\",\n\t\targOffset: 7,\n\t\tblankArgToUndefined: true,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => {\n\t\t\thost.handleSuiteCommand(arg);\n\t\t},\n\t},\n\t// /export, /import and /name are prefix commands whose handlers parse the\n\t// full text themselves; argOffset only enables prefix matching here.\n\t{ command: \"/export\", argOffset: 8, run: (host, text) => host.handleExportCommand(text) },\n\t{ command: \"/import\", argOffset: 8, run: (host, text) => host.handleImportCommand(text) },\n\t{ command: \"/copy\", run: (host) => host.handleCopyCommand() },\n\t{\n\t\tcommand: \"/name\",\n\t\targOffset: 6,\n\t\trun: (host, text) => {\n\t\t\thost.handleNameCommand(text);\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/session\",\n\t\trun: (host) => {\n\t\t\thost.handleSessionCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/metrics\",\n\t\targOffset: 9,\n\t\tblankArgToUndefined: true,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => {\n\t\t\thost.handleMetricsCommand(arg);\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/changelog\",\n\t\trun: (host) => {\n\t\t\thost.handleChangelogCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/help\",\n\t\trun: (host) => {\n\t\t\thost.handleHelpCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/hotkeys\",\n\t\trun: (host) => {\n\t\t\thost.handleHotkeysCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/fork\",\n\t\trun: (host) => {\n\t\t\thost.showUserMessageSelector();\n\t\t},\n\t},\n\t{ command: \"/clone\", clearEditorBeforeRun: true, run: (host) => host.handleCloneCommand() },\n\t{\n\t\tcommand: \"/tree\",\n\t\trun: (host) => {\n\t\t\thost.showTreeSelector();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/login\",\n\t\targOffset: 7,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => host.handleLoginCommand(arg),\n\t},\n\t// Original branch does not await showOAuthSelector; keep it fire-and-forget.\n\t{\n\t\tcommand: \"/logout\",\n\t\trun: (host) => {\n\t\t\tvoid host.showOAuthSelector(\"logout\");\n\t\t},\n\t},\n\t{ command: \"/new\", clearEditorBeforeRun: true, run: (host) => host.handleClearCommand() },\n\t{\n\t\tcommand: \"/compact\",\n\t\targOffset: 9,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => host.handleCompactCommand(arg),\n\t},\n\t{ command: \"/reload\", clearEditorBeforeRun: true, run: (host) => host.handleReloadCommand() },\n\t{\n\t\tcommand: \"/debug\",\n\t\trun: (host) => {\n\t\t\thost.handleDebugCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/arminsayshi\",\n\t\trun: (host) => {\n\t\t\thost.handleArminSaysHi();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/resume\",\n\t\trun: (host) => {\n\t\t\thost.showSessionSelector();\n\t\t},\n\t},\n\t{ command: \"/quit\", clearEditorBeforeRun: true, run: (host) => host.shutdown() },\n];\n\n/** Find the entry matching text: exact command, or command prefix plus argument. */\nexport function matchCommandDispatchEntry(\n\tentries: readonly CommandDispatchEntry[],\n\ttext: string,\n): CommandDispatchMatch | undefined {\n\tfor (const entry of entries) {\n\t\tif (text === entry.command) {\n\t\t\treturn { entry, arg: undefined };\n\t\t}\n\t\tif (entry.argOffset === undefined || !text.startsWith(`${entry.command} `)) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst arg = text.slice(entry.argOffset).trim();\n\t\treturn { entry, arg: entry.blankArgToUndefined && arg.length === 0 ? undefined : arg };\n\t}\n\treturn undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interactive-commands.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-commands.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAkEH,MAAM,CAAC,MAAM,wBAAwB,GAAoC;IACxE;QACC,OAAO,EAAE,WAAW;QACpB,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;YACd,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAAA,CAC5B;KACD;IACD;QACC,OAAO,EAAE,gBAAgB;QACzB,oBAAoB,EAAE,IAAI;QAC1B,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC;YACpB,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAAA,CAChC;KACD;IACD;QACC,OAAO,EAAE,QAAQ;QACjB,SAAS,EAAE,CAAC;QACZ,oBAAoB,EAAE,IAAI;QAC1B,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC;KACvD;IACD;QACC,OAAO,EAAE,WAAW;QACpB,SAAS,EAAE,EAAE;QACb,oBAAoB,EAAE,IAAI;QAC1B,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC;YAC1B,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC;QAAA,CAChC;KACD;IACD;QACC,OAAO,EAAE,QAAQ;QACjB,SAAS,EAAE,CAAC;QACZ,mBAAmB,EAAE,IAAI;QACzB,oBAAoB,EAAE,IAAI;QAC1B,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC;YAC1B,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAAA,CAC7B;KACD;IACD,0EAA0E;IAC1E,qEAAqE;IACrE,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,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AAa;QAAE,KAAK,MAAM,IAAI,IAAI,KAAK;YAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChF,OAAO,kBAAkB;SACvB,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;SAChD,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAClB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,GAAG,CAAC,OAAO,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACrF,CAAC,CAAC,CAAC;AAAA,CACL","sourcesContent":["/**\n * Slash-command dispatch table for the interactive mode editor submit handler.\n * Extracted from InteractiveMode.setupEditorSubmitHandler; entry order mirrors\n * the original if-chain and each run body mirrors its branch verbatim\n * (await/no-await and editor clearing order included).\n */\n\n/**\n * Narrow facade InteractiveMode exposes to the dispatch table. Entries resolve\n * handlers through this interface at dispatch time, so instance-level\n * overrides keep working.\n */\nexport interface CommandDispatchHost {\n\tsetEditorText(text: string): void;\n\tshowSettingsSelector(): void;\n\tshowModelsSelector(): void;\n\thandleModelCommand(searchTerm?: string): Promise<void>;\n\thandleThinkingCommand(searchTerm?: string): void;\n\thandleSuiteCommand(suiteId?: string): void;\n\thandleExportCommand(text: string): Promise<void>;\n\thandleImportCommand(text: string): Promise<void>;\n\thandleCopyCommand(options?: { flashConfirmation?: boolean; preferSelection?: boolean }): Promise<void>;\n\thandleNameCommand(text: string): void;\n\thandleSessionCommand(): void;\n\t/** Interrupt grading (§4.2): terminate every background subagent; the\n\t * /stop-agents command's single execution face. */\n\thandleStopAgentsCommand(): void;\n\thandleMetricsCommand(turnsArg: string | undefined): void;\n\thandleChangelogCommand(): void;\n\thandleHelpCommand(): void;\n\thandleHotkeysCommand(): void;\n\tshowUserMessageSelector(): void;\n\thandleCloneCommand(): Promise<void>;\n\tshowTreeSelector(initialSelectedId?: string): void;\n\thandleLoginCommand(providerRef?: string): Promise<void>;\n\tshowOAuthSelector(mode: \"login\" | \"logout\"): Promise<void>;\n\thandleClearCommand(): Promise<void>;\n\thandleCompactCommand(customInstructions?: string): Promise<void>;\n\thandleReloadCommand(): Promise<void>;\n\thandleDebugCommand(): void;\n\thandleArminSaysHi(): void;\n\tshowSessionSelector(): void;\n\tshowAgentsView(): void;\n\thandleQueueCommand(text: string | undefined): Promise<void>;\n\thandleDequeueCommand(): void;\n\thandleEditorCommand(): Promise<void>;\n\tshutdown(options?: { fromSignal?: boolean }): Promise<void>;\n\tshowWorkflowView(): void;\n}\n\nexport interface CommandDispatchEntry {\n\t/** Command word including the leading slash, e.g. \"/model\". */\n\tcommand: string;\n\t/**\n\t * Slice offset of the optional argument for prefix commands\n\t * (\"/model claude\" -> text.slice(7).trim()); omit for exact-match commands.\n\t */\n\targOffset?: number;\n\t/** Report a blank (empty after trim) argument as undefined. */\n\tblankArgToUndefined?: boolean;\n\t/** Clear the editor text before running the handler instead of after. */\n\tclearEditorBeforeRun?: boolean;\n\t/** Handler; receives the full submitted text and the extracted argument. */\n\trun: (host: CommandDispatchHost, text: string, arg: string | undefined) => Promise<void> | void;\n}\n\nexport interface CommandDispatchMatch {\n\tentry: CommandDispatchEntry;\n\targ: string | undefined;\n}\n\nexport const COMMAND_DISPATCH_ENTRIES: readonly CommandDispatchEntry[] = [\n\t{\n\t\tcommand: \"/settings\",\n\t\trun: (host) => {\n\t\t\thost.showSettingsSelector();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/scoped-models\",\n\t\tclearEditorBeforeRun: true,\n\t\trun: async (host) => {\n\t\t\tawait host.showModelsSelector();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/model\",\n\t\targOffset: 7,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => host.handleModelCommand(arg),\n\t},\n\t{\n\t\tcommand: \"/thinking\",\n\t\targOffset: 10,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => {\n\t\t\thost.handleThinkingCommand(arg);\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/suite\",\n\t\targOffset: 7,\n\t\tblankArgToUndefined: true,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => {\n\t\t\thost.handleSuiteCommand(arg);\n\t\t},\n\t},\n\t// /export, /import and /name are prefix commands whose handlers parse the\n\t// full text themselves; argOffset only enables prefix matching here.\n\t{ command: \"/export\", argOffset: 8, run: (host, text) => host.handleExportCommand(text) },\n\t{ command: \"/import\", argOffset: 8, run: (host, text) => host.handleImportCommand(text) },\n\t{ command: \"/copy\", run: (host) => host.handleCopyCommand() },\n\t{\n\t\tcommand: \"/name\",\n\t\targOffset: 6,\n\t\trun: (host, text) => {\n\t\t\thost.handleNameCommand(text);\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/session\",\n\t\trun: (host) => {\n\t\t\thost.handleSessionCommand();\n\t\t},\n\t},\n\t// Interrupt grading (设计 子代理运行时 §4.2, 2026-10-02): the only explicit\n\t// face for terminating background subagents — Esc never cancels them.\n\t{\n\t\tcommand: \"/stop-agents\",\n\t\trun: (host) => {\n\t\t\thost.handleStopAgentsCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/metrics\",\n\t\targOffset: 9,\n\t\tblankArgToUndefined: true,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => {\n\t\t\thost.handleMetricsCommand(arg);\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/changelog\",\n\t\trun: (host) => {\n\t\t\thost.handleChangelogCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/help\",\n\t\trun: (host) => {\n\t\t\thost.handleHelpCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/hotkeys\",\n\t\trun: (host) => {\n\t\t\thost.handleHotkeysCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/fork\",\n\t\trun: (host) => {\n\t\t\thost.showUserMessageSelector();\n\t\t},\n\t},\n\t{ command: \"/clone\", clearEditorBeforeRun: true, run: (host) => host.handleCloneCommand() },\n\t{\n\t\tcommand: \"/tree\",\n\t\trun: (host) => {\n\t\t\thost.showTreeSelector();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/login\",\n\t\targOffset: 7,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => host.handleLoginCommand(arg),\n\t},\n\t// Original branch does not await showOAuthSelector; keep it fire-and-forget.\n\t{\n\t\tcommand: \"/logout\",\n\t\trun: (host) => {\n\t\t\tvoid host.showOAuthSelector(\"logout\");\n\t\t},\n\t},\n\t{ command: \"/new\", clearEditorBeforeRun: true, run: (host) => host.handleClearCommand() },\n\t{\n\t\tcommand: \"/compact\",\n\t\targOffset: 9,\n\t\tclearEditorBeforeRun: true,\n\t\trun: (host, _text, arg) => host.handleCompactCommand(arg),\n\t},\n\t{ command: \"/reload\", clearEditorBeforeRun: true, run: (host) => host.handleReloadCommand() },\n\t{\n\t\tcommand: \"/debug\",\n\t\trun: (host) => {\n\t\t\thost.handleDebugCommand();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/arminsayshi\",\n\t\trun: (host) => {\n\t\t\thost.handleArminSaysHi();\n\t\t},\n\t},\n\t{\n\t\tcommand: \"/resume\",\n\t\trun: (host) => {\n\t\t\thost.showSessionSelector();\n\t\t},\n\t},\n\t// Read-only subagent session browser (view-family command: sync, no editor\n\t// clearing), grouped with /resume ahead of the /workflow view overlay.\n\t{\n\t\tcommand: \"/agents\",\n\t\trun: (host) => {\n\t\t\thost.showAgentsView();\n\t\t},\n\t},\n\t// Follow-up queue face (single-entry iron law: /queue replaces the shipped\n\t// ctrl+q default). A bare /queue prints usage — the editor buffer is\n\t// cleared on submit before the command runs, so there is no editor\n\t// content to queue (the configurable keybinding keeps that behavior).\n\t{\n\t\tcommand: \"/queue\",\n\t\targOffset: 7,\n\t\tblankArgToUndefined: true,\n\t\trun: (host, _text, arg) => host.handleQueueCommand(arg),\n\t},\n\t{ command: \"/dequeue\", run: (host) => host.handleDequeueCommand() },\n\t{ command: \"/editor\", run: (host) => host.handleEditorCommand() },\n\t{ command: \"/quit\", clearEditorBeforeRun: true, run: (host) => host.shutdown() },\n\t// Exact-match only: every other /workflow subcommand (why/log/...) keeps\n\t// flowing to the plugin's text command path untouched (§9 L2).\n\t{\n\t\tcommand: \"/workflow view\",\n\t\trun: (host) => {\n\t\t\thost.showWorkflowView();\n\t\t},\n\t},\n];\n\n/** Find the entry matching text: exact command, or command prefix plus argument. */\nexport function matchCommandDispatchEntry(\n\tentries: readonly CommandDispatchEntry[],\n\ttext: string,\n): CommandDispatchMatch | undefined {\n\tfor (const entry of entries) {\n\t\tif (text === entry.command) {\n\t\t\treturn { entry, arg: undefined };\n\t\t}\n\t\tif (entry.argOffset === undefined || !text.startsWith(`${entry.command} `)) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst arg = text.slice(entry.argOffset).trim();\n\t\treturn { entry, arg: entry.blankArgToUndefined && arg.length === 0 ? undefined : arg };\n\t}\n\treturn undefined;\n}\n\n/** Minimal command shape the completion filter works on (mirrors SlashCommand). */\nexport interface CompletionCommandInput {\n\treadonly name: string;\n\treadonly description: string;\n\treadonly argumentHint?: string;\n}\n\n/**\n * Capability commands that collide with a builtin, prompt-template, or skill\n * command name are rejected by AgentSession at invocation time rather than\n * silently resolving to one source, so the colliding capability command is\n * withheld from the completion list entirely (both sides stay executable via\n * their own paths; neither is offered as an ambiguous completion).\n */\nexport function filterCapabilityCommandsForCompletions(\n\tcapabilityCommands: readonly CompletionCommandInput[],\n\treservedNames: readonly Iterable<string>[],\n): CompletionCommandInput[] {\n\tconst reserved = new Set<string>();\n\tfor (const names of reservedNames) for (const name of names) reserved.add(name);\n\treturn capabilityCommands\n\t\t.filter((command) => !reserved.has(command.name))\n\t\t.map((command) => ({\n\t\t\tname: command.name,\n\t\t\tdescription: command.description,\n\t\t\t...(command.argumentHint !== undefined ? { argumentHint: command.argumentHint } : {}),\n\t\t}));\n}\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import type { ThinkingLevel } from "@agent-forge/agent-core";
|
|
6
6
|
import { type AuthEvent, type AuthPrompt } from "@agent-forge/ai";
|
|
7
7
|
import type { Api, ImageContent, Model } from "@agent-forge/ai/compat";
|
|
8
|
-
import type { AutocompleteProvider, EditorComponent, Terminal } from "@agent-forge/tui";
|
|
8
|
+
import type { AutocompleteProvider, EditorComponent, Terminal, WheelScrollLines } from "@agent-forge/tui";
|
|
9
9
|
import { type Component, Container, type TUI, TuiAltScreen, TuiMainScreen } from "@agent-forge/tui";
|
|
10
10
|
import { type AgentSessionRuntime } from "../../core/agent-session-runtime.ts";
|
|
11
11
|
import type { AgentSessionRuntimeDiagnostic } from "../../core/agent-session-services.ts";
|
|
@@ -121,11 +121,28 @@ interface InteractiveTuiOptions {
|
|
|
121
121
|
terminal?: Terminal;
|
|
122
122
|
onRightClickPaste?: () => void;
|
|
123
123
|
fullscreenCopyOnSelect?: boolean;
|
|
124
|
+
fullscreenWheelScrollLines?: WheelScrollLines;
|
|
124
125
|
}
|
|
125
126
|
/** Composition root for selecting the interactive terminal renderer. */
|
|
126
127
|
export declare function createInteractiveTui(options: InteractiveTuiOptions): TuiMainScreen | TuiAltScreen;
|
|
127
128
|
/** Stable reference for components while InteractiveMode replaces the active renderer. */
|
|
128
129
|
export declare function createInteractiveTuiReference(getTui: () => TUI): TUI;
|
|
130
|
+
/**
|
|
131
|
+
* Provider failover footer ticker (设计 供应商能力槽位与主备切换 §4.7 Phase 3):
|
|
132
|
+
* while the latest `provider.failover.state` snapshot reports an open breaker, the
|
|
133
|
+
* footer countdown must advance once per second, so re-render on a 1s interval
|
|
134
|
+
* (countdown-timer.ts 同构). The interval is created on the first refresh that
|
|
135
|
+
* sees an open state and cleared as soon as the state leaves open — no leak.
|
|
136
|
+
*/
|
|
137
|
+
export declare class ProviderFailoverTicker {
|
|
138
|
+
private intervalId;
|
|
139
|
+
private readonly isOpen;
|
|
140
|
+
private readonly requestRender;
|
|
141
|
+
constructor(isOpen: () => boolean, requestRender: () => void);
|
|
142
|
+
/** Re-evaluate the open state: start ticking when open, stop when not. */
|
|
143
|
+
refresh(): void;
|
|
144
|
+
dispose(): void;
|
|
145
|
+
}
|
|
129
146
|
export declare class InteractiveMode implements DialogUiHost, authFlow.AuthUiHost, selectorsFlow.SelectorsHost {
|
|
130
147
|
private runtimeHost;
|
|
131
148
|
private renderer;
|
|
@@ -155,6 +172,12 @@ export declare class InteractiveMode implements DialogUiHost, authFlow.AuthUiHos
|
|
|
155
172
|
private activeSelectorDispose?;
|
|
156
173
|
/** Host-visible for ./interactive-dialog-ui.ts (S5 slice 2). */
|
|
157
174
|
footer: FooterComponent;
|
|
175
|
+
/**
|
|
176
|
+
* Re-renders the footer once per second while the provider failover breaker is
|
|
177
|
+
* open (§4.7 Phase 3). Optional-typed to match the prototype-based test stubs
|
|
178
|
+
* (constructor always assigns it on real instances).
|
|
179
|
+
*/
|
|
180
|
+
private failoverTicker;
|
|
158
181
|
/** Host-visible for ./interactive-dialog-ui.ts (S5 slice 2). */
|
|
159
182
|
footerContainer: Container;
|
|
160
183
|
/** Host-visible for ./interactive-dialog-ui.ts (S5 slice 2). */
|
|
@@ -431,6 +454,12 @@ export declare class InteractiveMode implements DialogUiHost, authFlow.AuthUiHos
|
|
|
431
454
|
private handleCtrlZ;
|
|
432
455
|
private handleFollowUp;
|
|
433
456
|
private handleDequeue;
|
|
457
|
+
/** /queue command host face (single-entry iron law): queues the given text for after the current run. A bare /queue cannot mirror the keybinding — the editor buffer is cleared on submit before the command runs — so it prints usage instead of silently doing nothing. */
|
|
458
|
+
handleQueueCommand(text: string | undefined): Promise<void>;
|
|
459
|
+
/** /dequeue command host face: restore queued messages back to the editor. */
|
|
460
|
+
handleDequeueCommand(): void;
|
|
461
|
+
/** /editor command host face: edit the current input in an external editor. */
|
|
462
|
+
handleEditorCommand(): Promise<void>;
|
|
434
463
|
/** Host-visible for ./interactive-auth.ts (S5 slice 3). */
|
|
435
464
|
updateEditorBorderColor(): void;
|
|
436
465
|
private cycleThinkingLevel;
|
|
@@ -494,6 +523,7 @@ export declare class InteractiveMode implements DialogUiHost, authFlow.AuthUiHos
|
|
|
494
523
|
getUserMessagesForForking(): Array<{
|
|
495
524
|
entryId: string;
|
|
496
525
|
text: string;
|
|
526
|
+
replySummary?: string;
|
|
497
527
|
}>;
|
|
498
528
|
/**
|
|
499
529
|
* Bound suite id of a listed session (设计 §10.1), read from the session
|
|
@@ -529,6 +559,21 @@ export declare class InteractiveMode implements DialogUiHost, authFlow.AuthUiHos
|
|
|
529
559
|
showUserMessageSelector(): void;
|
|
530
560
|
/** /clone command entry; implementation in ./interactive-selectors.ts (S5 slice 5). */
|
|
531
561
|
handleCloneCommand(): Promise<void>;
|
|
562
|
+
/**
|
|
563
|
+
* Workflow overlay (§9 L2/L3): read-only panorama + transition log from
|
|
564
|
+
* `workflow.state`/`workflow.transition` entries. Actions are forwarded to
|
|
565
|
+
* the editor as reviewable text; the main agent executes them via
|
|
566
|
+
* workflow_advance (rendering and execution stay separated).
|
|
567
|
+
*/
|
|
568
|
+
showWorkflowView(): void;
|
|
569
|
+
/**
|
|
570
|
+
* Subagent session browser (/agents): read-only list + detail of this
|
|
571
|
+
* session's subagent transcripts from the D-060 §3 on-disk store — the same
|
|
572
|
+
* parent-scoped summary source as the subagent_list model tool (only this
|
|
573
|
+
* session's children, newest first). Detail entries load lazily per
|
|
574
|
+
* session; a failed load renders inside the view instead of throwing.
|
|
575
|
+
*/
|
|
576
|
+
showAgentsView(): void;
|
|
532
577
|
showTreeSelector(initialSelectedId?: string): void;
|
|
533
578
|
showSessionSelector(): void;
|
|
534
579
|
private handleResumeSession;
|
|
@@ -612,6 +657,11 @@ export declare class InteractiveMode implements DialogUiHost, authFlow.AuthUiHos
|
|
|
612
657
|
preferSelection?: boolean;
|
|
613
658
|
}): Promise<void>;
|
|
614
659
|
handleNameCommand(text: string): void;
|
|
660
|
+
/**
|
|
661
|
+
* 中断分级(设计 子代理运行时 §4.2,2026-10-02):/stop-agents 的唯一执行
|
|
662
|
+
* 面——终止全部后台子代理(不触当前回合)。Esc 从不做这件事。
|
|
663
|
+
*/
|
|
664
|
+
handleStopAgentsCommand(): void;
|
|
615
665
|
handleSessionCommand(): void;
|
|
616
666
|
handleMetricsCommand(turnsArg: string | undefined): void;
|
|
617
667
|
handleChangelogCommand(): void;
|