@draht/coding-agent 2026.10.4 → 2026.10.8-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +32 -6
- package/dist/bundle/chunks/{anthropic-messages-GAKYXF65.js → anthropic-messages-E2P6C3P7.js} +1 -1
- package/dist/bundle/chunks/anthropic.js +1 -1
- package/dist/bundle/chunks/{azure-openai-responses-ZIXMK6JO.js → azure-openai-responses-JZMSTDIM.js} +1 -1
- package/dist/bundle/chunks/bedrock-converse-stream.js +20 -20
- package/dist/bundle/chunks/chunk-2JZLKNZ4.js +3 -0
- package/dist/bundle/chunks/chunk-5QJFWTKA.js +4 -0
- package/dist/bundle/chunks/{chunk-XKDTJ4YR.js → chunk-6QIFWMDF.js} +1 -1
- package/dist/bundle/chunks/{chunk-5VZWYVZB.js → chunk-AHGUOQPH.js} +2 -2
- package/dist/bundle/chunks/{chunk-H6FT43VC.js → chunk-BOGY4QVF.js} +4 -4
- package/dist/bundle/chunks/{chunk-RZKPFWMH.js → chunk-D3HO453P.js} +2 -2
- package/dist/bundle/chunks/{chunk-KVH4HR57.js → chunk-FHX2S5IG.js} +1 -1
- package/dist/bundle/chunks/chunk-GBFVS2SF.js +12 -0
- package/dist/bundle/chunks/chunk-GD2WVXWT.js +65 -0
- package/dist/bundle/chunks/{chunk-Z2INEV2J.js → chunk-KJJJSTND.js} +307 -168
- package/dist/bundle/chunks/{chunk-BXSHCX3G.js → chunk-KY2BG6BC.js} +1 -1
- package/dist/bundle/chunks/chunk-LO6CVU2L.js +6 -0
- package/dist/bundle/chunks/chunk-PGJAHC3R.js +107 -0
- package/dist/bundle/chunks/chunk-QVFELZW2.js +312 -0
- package/dist/bundle/chunks/{chunk-COF5JT7R.js → chunk-QVTLBSTH.js} +1 -1
- package/dist/bundle/chunks/{chunk-DPE4ALPU.js → chunk-U6LDZZGM.js} +10 -10
- package/dist/bundle/chunks/{chunk-D6TMD5Q2.js → chunk-UTRX2VHB.js} +8 -8
- package/dist/bundle/chunks/{chunk-LDAOC5RB.js → chunk-VQOV5VFH.js} +1 -1
- package/dist/bundle/chunks/chunk-VXUJMEMO.js +2 -0
- package/dist/bundle/chunks/{cli-SR5QBZH4.js → cli-O6OWCY7N.js} +1 -1
- package/dist/bundle/chunks/execute-4JU5WQXP.js +18 -0
- package/dist/bundle/chunks/google-antigravity.js +1 -1
- package/dist/bundle/chunks/google-gemini-cli.js +1 -1
- package/dist/bundle/chunks/{google-generative-ai-RPUPQ6PM.js → google-generative-ai-HPNDIAZD.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-EZES5QVQ.js → google-vertex-KPAWJ4SP.js} +1 -1
- package/dist/bundle/chunks/https-proxy-agent-WQIRL24U.js +13 -0
- package/dist/bundle/chunks/lib-ULKZYRGD.js +9 -0
- package/dist/bundle/chunks/{mistral-conversations-AOYGU43Y.js → mistral-conversations-FMSPWQ7A.js} +1 -1
- package/dist/bundle/chunks/{multipart-parser-AZP5BX2W.js → multipart-parser-HMCXZ4BD.js} +1 -1
- package/dist/bundle/chunks/{node-LQ52KV6B.js → node-4JNG6XQO.js} +1 -1
- package/dist/bundle/chunks/{node-C2JGH2OB.js → node-6IIDYB3K.js} +1 -1
- package/dist/bundle/chunks/openai-chatgpt.js +1 -1
- package/dist/bundle/chunks/{openai-codex-responses-M2Y77JEQ.js → openai-codex-responses-TU7NGPXE.js} +1 -1
- package/dist/bundle/chunks/openai-codex.js +1 -1
- package/dist/bundle/chunks/{openai-completions-A4OKYOYV.js → openai-completions-GANCQQO5.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-6IXV53T3.js → openai-responses-ASDPAX3E.js} +1 -1
- package/dist/bundle/chunks/{openrouter-images-LYV4NKFM.js → openrouter-images-NROSQXMZ.js} +1 -1
- package/dist/bundle/chunks/openrouter.js +1 -1
- package/dist/bundle/chunks/{pi-messages-KKMEUT3Z.js → pi-messages-2QEJYOAO.js} +1 -1
- package/dist/bundle/chunks/radius.js +1 -1
- package/dist/bundle/chunks/{runtime-6YJPGSP7.js → runtime-FIGQHW75.js} +1 -1
- package/dist/bundle/chunks/runtime-TJ3EAMJK.js +3 -0
- package/dist/bundle/chunks/{settings-manager-D2EG7WDO.js → settings-manager-HC5RR36T.js} +1 -1
- package/dist/bundle/chunks/src-KDGO7EGF.js +4 -0
- package/dist/bundle/chunks/virtual-modules-UIGTRGHQ.js +2 -0
- package/dist/bundle/chunks/xai.js +1 -1
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.js +3 -3
- package/dist/cli/args.js.map +1 -1
- package/dist/core/builtins/duet.d.ts +5 -2
- package/dist/core/builtins/duet.d.ts.map +1 -1
- package/dist/core/builtins/duet.js +65 -27
- package/dist/core/builtins/duet.js.map +1 -1
- package/dist/core/builtins/index.d.ts.map +1 -1
- package/dist/core/builtins/index.js +2 -0
- package/dist/core/builtins/index.js.map +1 -1
- package/dist/core/builtins/polyphase.d.ts +15 -0
- package/dist/core/builtins/polyphase.d.ts.map +1 -0
- package/dist/core/builtins/polyphase.js +196 -0
- package/dist/core/builtins/polyphase.js.map +1 -0
- package/dist/core/builtins/subagent.d.ts +44 -34
- package/dist/core/builtins/subagent.d.ts.map +1 -1
- package/dist/core/builtins/subagent.js +827 -560
- package/dist/core/builtins/subagent.js.map +1 -1
- package/dist/core/extensions/types.d.ts +17 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/keybindings.d.ts +30 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +24 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-resolver.js +4 -4
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/multi-agent/permission-gate.d.ts.map +1 -1
- package/dist/core/multi-agent/permission-gate.js +4 -1
- package/dist/core/multi-agent/permission-gate.js.map +1 -1
- package/dist/core/polyphase/approval.d.ts +35 -0
- package/dist/core/polyphase/approval.d.ts.map +1 -0
- package/dist/core/polyphase/approval.js +184 -0
- package/dist/core/polyphase/approval.js.map +1 -0
- package/dist/core/polyphase/child-events.d.ts +107 -0
- package/dist/core/polyphase/child-events.d.ts.map +1 -0
- package/dist/core/polyphase/child-events.js +862 -0
- package/dist/core/polyphase/child-events.js.map +1 -0
- package/dist/core/polyphase/child-process.d.ts +65 -0
- package/dist/core/polyphase/child-process.d.ts.map +1 -0
- package/dist/core/polyphase/child-process.js +361 -0
- package/dist/core/polyphase/child-process.js.map +1 -0
- package/dist/core/polyphase/commands.d.ts +44 -0
- package/dist/core/polyphase/commands.d.ts.map +1 -0
- package/dist/core/polyphase/commands.js +244 -0
- package/dist/core/polyphase/commands.js.map +1 -0
- package/dist/core/polyphase/details.d.ts +40 -0
- package/dist/core/polyphase/details.d.ts.map +1 -0
- package/dist/core/polyphase/details.js +538 -0
- package/dist/core/polyphase/details.js.map +1 -0
- package/dist/core/polyphase/emitter.d.ts +20 -0
- package/dist/core/polyphase/emitter.d.ts.map +1 -0
- package/dist/core/polyphase/emitter.js +90 -0
- package/dist/core/polyphase/emitter.js.map +1 -0
- package/dist/core/polyphase/jsonl-reader.d.ts +31 -0
- package/dist/core/polyphase/jsonl-reader.d.ts.map +1 -0
- package/dist/core/polyphase/jsonl-reader.js +161 -0
- package/dist/core/polyphase/jsonl-reader.js.map +1 -0
- package/dist/core/polyphase/keyword.d.ts +27 -0
- package/dist/core/polyphase/keyword.d.ts.map +1 -0
- package/dist/core/polyphase/keyword.js +97 -0
- package/dist/core/polyphase/keyword.js.map +1 -0
- package/dist/core/polyphase/limiter.d.ts +38 -0
- package/dist/core/polyphase/limiter.d.ts.map +1 -0
- package/dist/core/polyphase/limiter.js +129 -0
- package/dist/core/polyphase/limiter.js.map +1 -0
- package/dist/core/polyphase/model-selection.d.ts +35 -0
- package/dist/core/polyphase/model-selection.d.ts.map +1 -0
- package/dist/core/polyphase/model-selection.js +72 -0
- package/dist/core/polyphase/model-selection.js.map +1 -0
- package/dist/core/polyphase/render/format.d.ts +52 -0
- package/dist/core/polyphase/render/format.d.ts.map +1 -0
- package/dist/core/polyphase/render/format.js +169 -0
- package/dist/core/polyphase/render/format.js.map +1 -0
- package/dist/core/polyphase/render/renderers.d.ts +63 -0
- package/dist/core/polyphase/render/renderers.d.ts.map +1 -0
- package/dist/core/polyphase/render/renderers.js +277 -0
- package/dist/core/polyphase/render/renderers.js.map +1 -0
- package/dist/core/polyphase/render/run-block.d.ts +45 -0
- package/dist/core/polyphase/render/run-block.d.ts.map +1 -0
- package/dist/core/polyphase/render/run-block.js +843 -0
- package/dist/core/polyphase/render/run-block.js.map +1 -0
- package/dist/core/polyphase/render/snapshot.d.ts +106 -0
- package/dist/core/polyphase/render/snapshot.d.ts.map +1 -0
- package/dist/core/polyphase/render/snapshot.js +292 -0
- package/dist/core/polyphase/render/snapshot.js.map +1 -0
- package/dist/core/polyphase/result-text.d.ts +41 -0
- package/dist/core/polyphase/result-text.d.ts.map +1 -0
- package/dist/core/polyphase/result-text.js +326 -0
- package/dist/core/polyphase/result-text.js.map +1 -0
- package/dist/core/polyphase/session.d.ts +33 -0
- package/dist/core/polyphase/session.d.ts.map +1 -0
- package/dist/core/polyphase/session.js +106 -0
- package/dist/core/polyphase/session.js.map +1 -0
- package/dist/core/polyphase/settings.d.ts +18 -0
- package/dist/core/polyphase/settings.d.ts.map +1 -0
- package/dist/core/polyphase/settings.js +93 -0
- package/dist/core/polyphase/settings.js.map +1 -0
- package/dist/core/polyphase/store.d.ts +197 -0
- package/dist/core/polyphase/store.d.ts.map +1 -0
- package/dist/core/polyphase/store.js +558 -0
- package/dist/core/polyphase/store.js.map +1 -0
- package/dist/core/polyphase/types.d.ts +371 -0
- package/dist/core/polyphase/types.d.ts.map +1 -0
- package/dist/core/polyphase/types.js +36 -0
- package/dist/core/polyphase/types.js.map +1 -0
- package/dist/core/polyphase/ui/controller.d.ts +28 -0
- package/dist/core/polyphase/ui/controller.d.ts.map +1 -0
- package/dist/core/polyphase/ui/controller.js +150 -0
- package/dist/core/polyphase/ui/controller.js.map +1 -0
- package/dist/core/polyphase/ui/dock.d.ts +27 -0
- package/dist/core/polyphase/ui/dock.d.ts.map +1 -0
- package/dist/core/polyphase/ui/dock.js +121 -0
- package/dist/core/polyphase/ui/dock.js.map +1 -0
- package/dist/core/polyphase/ui/inspector.d.ts +117 -0
- package/dist/core/polyphase/ui/inspector.d.ts.map +1 -0
- package/dist/core/polyphase/ui/inspector.js +1016 -0
- package/dist/core/polyphase/ui/inspector.js.map +1 -0
- package/dist/core/polyphase/ui/transcript-layout.d.ts +55 -0
- package/dist/core/polyphase/ui/transcript-layout.d.ts.map +1 -0
- package/dist/core/polyphase/ui/transcript-layout.js +210 -0
- package/dist/core/polyphase/ui/transcript-layout.js.map +1 -0
- package/dist/core/polyphase/update-pump.d.ts +18 -0
- package/dist/core/polyphase/update-pump.d.ts.map +1 -0
- package/dist/core/polyphase/update-pump.js +132 -0
- package/dist/core/polyphase/update-pump.js.map +1 -0
- package/dist/core/polyphase/workflow/agent-host.d.ts +26 -0
- package/dist/core/polyphase/workflow/agent-host.d.ts.map +1 -0
- package/dist/core/polyphase/workflow/agent-host.js +187 -0
- package/dist/core/polyphase/workflow/agent-host.js.map +1 -0
- package/dist/core/polyphase/workflow/guidance.d.ts +19 -0
- package/dist/core/polyphase/workflow/guidance.d.ts.map +1 -0
- package/dist/core/polyphase/workflow/guidance.js +119 -0
- package/dist/core/polyphase/workflow/guidance.js.map +1 -0
- package/dist/core/polyphase/workflow/launch.d.ts +41 -0
- package/dist/core/polyphase/workflow/launch.d.ts.map +1 -0
- package/dist/core/polyphase/workflow/launch.js +173 -0
- package/dist/core/polyphase/workflow/launch.js.map +1 -0
- package/dist/core/polyphase/workflow/meta.d.ts +43 -0
- package/dist/core/polyphase/workflow/meta.d.ts.map +1 -0
- package/dist/core/polyphase/workflow/meta.js +529 -0
- package/dist/core/polyphase/workflow/meta.js.map +1 -0
- package/dist/core/polyphase/workflow/prelude.d.ts +24 -0
- package/dist/core/polyphase/workflow/prelude.d.ts.map +1 -0
- package/dist/core/polyphase/workflow/prelude.js +93 -0
- package/dist/core/polyphase/workflow/prelude.js.map +1 -0
- package/dist/core/polyphase/workflow/runtime.d.ts +79 -0
- package/dist/core/polyphase/workflow/runtime.d.ts.map +1 -0
- package/dist/core/polyphase/workflow/runtime.js +217 -0
- package/dist/core/polyphase/workflow/runtime.js.map +1 -0
- package/dist/core/polyphase/workflow/runtime.lazy.d.ts +3 -0
- package/dist/core/polyphase/workflow/runtime.lazy.d.ts.map +1 -0
- package/dist/core/polyphase/workflow/runtime.lazy.js +3 -0
- package/dist/core/polyphase/workflow/runtime.lazy.js.map +1 -0
- package/dist/core/polyphase/workflow/saved.d.ts +55 -0
- package/dist/core/polyphase/workflow/saved.d.ts.map +1 -0
- package/dist/core/polyphase/workflow/saved.js +299 -0
- package/dist/core/polyphase/workflow/saved.js.map +1 -0
- package/dist/core/polyphase/workflow/structured-output.d.ts +22 -0
- package/dist/core/polyphase/workflow/structured-output.d.ts.map +1 -0
- package/dist/core/polyphase/workflow/structured-output.js +66 -0
- package/dist/core/polyphase/workflow/structured-output.js.map +1 -0
- package/dist/core/polyphase/workflow/tool.d.ts +24 -0
- package/dist/core/polyphase/workflow/tool.d.ts.map +1 -0
- package/dist/core/polyphase/workflow/tool.js +139 -0
- package/dist/core/polyphase/workflow/tool.js.map +1 -0
- package/dist/core/sdk.d.ts +1 -1
- package/dist/core/sdk.js +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +27 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/socket-server/permission-relay.js +4 -0
- package/dist/core/socket-server/permission-relay.js.map +1 -1
- package/dist/core/trust-manager.d.ts +3 -2
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +5 -2
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/experimental/micro/runtime.js +1 -1
- package/dist/experimental/micro/runtime.js.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts +7 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js +18 -0
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +11 -2
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +9 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/prompts/commands/orchestrate.md +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +7 -1
- package/dist/utils/shell.js.map +1 -1
- package/docs/docs.json +4 -0
- package/docs/duet.md +3 -3
- package/docs/environment-variables.md +11 -0
- package/docs/json.md +7 -0
- package/docs/keybindings.md +20 -0
- package/docs/polyphase.md +391 -0
- package/docs/rpc-commands.md +9 -9
- package/docs/settings.md +12 -0
- package/docs/virtual-models.md +3 -3
- package/examples/extensions/preset.ts +3 -3
- package/examples/extensions/subagent/README.md +1 -1
- package/examples/extensions/subagent/agents/planner.md +1 -1
- package/examples/extensions/subagent/agents/reviewer.md +1 -1
- package/examples/extensions/subagent/agents/scout.md +1 -1
- package/examples/extensions/subagent/agents/worker.md +1 -1
- package/examples/extensions/summarize.ts +3 -3
- package/examples/sdk/02-custom-model.ts +1 -1
- package/examples/sdk/12-full-control.ts +1 -1
- package/examples/sdk/README.md +1 -1
- package/package.json +10 -10
- package/prompts/commands/orchestrate.md +1 -1
- package/dist/bundle/chunks/chunk-6MSE6LZ3.js +0 -6
- package/dist/bundle/chunks/chunk-6ZJKIMU7.js +0 -2
- package/dist/bundle/chunks/chunk-736QBNUZ.js +0 -12
- package/dist/bundle/chunks/chunk-CEJJ5XF2.js +0 -170
- package/dist/bundle/chunks/chunk-IWTUBX6V.js +0 -4
- package/dist/bundle/chunks/chunk-TIA2T6EO.js +0 -3
- package/dist/bundle/chunks/execute-VCYDHEYA.js +0 -328
- package/dist/bundle/chunks/https-proxy-agent-O2PVUIOI.js +0 -13
- package/dist/bundle/chunks/lib-XOG5PI3Y.js +0 -9
- package/dist/bundle/chunks/src-TIBHS42X.js +0 -4
- package/dist/bundle/chunks/virtual-modules-JTCGDL2Z.js +0 -2
- /package/dist/bundle/chunks/{chunk-ZZD35WKM.js → chunk-FBU742QF.js} +0 -0
- /package/dist/bundle/chunks/{chunk-SVNWI7EV.js → chunk-XHCO4PPH.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.js","sourceRoot":"","sources":["../../../../src/core/polyphase/ui/controller.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAK5C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAA6B,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAqB/E,MAAM,eAAe,GAAG,WAAW,CAAC;AAEpC,SAAS,eAAe;IACvB,OAAO;QACN,aAAa,EAAE,GAAG,EAAE,GAAE,CAAC;QACvB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;QACxB,eAAe,EAAE,GAAG,EAAE,CAAC,KAAK;QAC5B,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;QACzB,aAAa,EAAE,GAAG,EAAE,GAAE,CAAC;QACvB,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;KACjB,CAAC;AACH,CAAC;AAED,MAAM,yBAAyB;IACb,OAAO,CAAqB;IAC5B,wBAAwB,CAAa;IACrC,gBAAgB,CAAa;IAC7B,uBAAuB,CAAa;IAE7C,eAAe,GAAG,KAAK,CAAC;IACxB,UAAU,CAA2B;IACrC,WAAW,GAAG,KAAK,C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;YACb,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,CAC5B,eAAe,EACf,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAChF,EAAE,SAAS,EAAE,aAAa,EAAE,CAC5B,CAAC;QACH,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;QAC3D,CAAC;IACF,CAAC;IAED,OAAO;QACN,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAChC,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAC/B,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACtB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;YACzB,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;IACF,CAAC;CACD;AAED,MAAM,UAAU,kBAAkB,CAAC,OAA2B;IAC7D,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,KAAK,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK;QAAE,OAAO,eAAe,EAAE,CAAC;IAC/E,OAAO,IAAI,yBAAyB,CAAC,OAAO,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["/**\n * `installPolyphaseUi`: wires the `alt+a` agent inspector overlay and the above-editor dock\n * widget into one TUI session. Inert outside `ctx.mode === \"tui\" && ctx.hasUI` (§12.1, §12.7).\n */\n\nimport { getKeybindings } from \"@draht/tui\";\nimport type { ExtensionContext, UIPromptKind } from \"../../extensions/types.ts\";\nimport type { ArchivedRun } from \"../details.ts\";\nimport type { PolyphaseSession } from \"../session.ts\";\nimport type { SavedWorkflowSummary } from \"../workflow/saved.ts\";\nimport { PolyphaseDock } from \"./dock.ts\";\nimport { type InspectorInitialView, PolyphaseInspector } from \"./inspector.ts\";\n\nexport interface PolyphaseUiOptions {\n\tctx: ExtensionContext;\n\tsession: PolyphaseSession;\n\tgetArchivedRuns(): readonly ArchivedRun[];\n\tgetSavedWorkflows(): readonly SavedWorkflowSummary[];\n\t/** `!hideThinkingBlock` is the inspector's initial thinking visibility (§12.3). Defaults to\n\t * showing thinking when omitted. */\n\thideThinkingBlock?(): boolean;\n}\n\nexport interface PolyphaseUiController {\n\topenInspector(initial?: InspectorInitialView): void;\n\tcloseInspector(): void;\n\tisInspectorOpen(): boolean;\n\tnotePromptStart(kind: UIPromptKind): void;\n\tnotePromptEnd(): void;\n\tdispose(): void;\n}\n\nconst DOCK_WIDGET_KEY = \"polyphase\";\n\nfunction inertController(): PolyphaseUiController {\n\treturn {\n\t\topenInspector: () => {},\n\t\tcloseInspector: () => {},\n\t\tisInspectorOpen: () => false,\n\t\tnotePromptStart: () => {},\n\t\tnotePromptEnd: () => {},\n\t\tdispose: () => {},\n\t};\n}\n\nclass PolyphaseUiControllerImpl implements PolyphaseUiController {\n\tprivate readonly options: PolyphaseUiOptions;\n\tprivate readonly unsubscribeTerminalInput: () => void;\n\tprivate readonly unsubscribeStore: () => void;\n\tprivate readonly unsubscribeParentPrompt: () => void;\n\n\tprivate inspectorActive = false;\n\tprivate activeDone: (() => void) | undefined;\n\tprivate dockVisible = false;\n\t/** The runner (`extensions/runner.ts` `withUIPrompt`) emits `ui_prompt_start`/`ui_prompt_end`\n\t * only for the outermost prompt bracket, so this is always 0 or 1 - counting every pair,\n\t * including our own inspector's \"custom\" prompt, keeps it correct when a nested prompt (e.g.\n\t * the subagent gate's confirm) starts before our bracket has finished closing: the runner\n\t * folds that nested prompt into the still-open outer bracket instead of starting a new one,\n\t * so `outerPromptCount` only reaches 0 once the whole bracket - nested confirm included - ends.\n\t * `handleTerminalInput` checks `inspectorActive` before this count, so our own prompt alone\n\t * never blocks opening or closing. */\n\tprivate outerPromptCount = 0;\n\tprivate disposed = false;\n\n\tconstructor(options: PolyphaseUiOptions) {\n\t\tthis.options = options;\n\t\tthis.unsubscribeTerminalInput = options.ctx.ui.onTerminalInput((data) => this.handleTerminalInput(data));\n\t\tthis.unsubscribeStore = options.session.store.subscribe((change) => {\n\t\t\tif (change.type === \"runs\" && change.coarse) this.syncDockVisibility();\n\t\t});\n\t\tthis.unsubscribeParentPrompt = options.session.onParentPrompt(() => this.closeInspector());\n\t\tthis.syncDockVisibility();\n\t}\n\n\tprivate handleTerminalInput(data: string): { consume?: boolean } | undefined {\n\t\tif (!getKeybindings().matches(data, \"app.polyphase.inspector\")) return undefined;\n\t\tif (this.inspectorActive) {\n\t\t\tthis.closeInspector();\n\t\t\treturn { consume: true };\n\t\t}\n\t\tif (this.outerPromptCount > 0) return undefined;\n\t\tthis.openInspector();\n\t\treturn { consume: true };\n\t}\n\n\topenInspector(initial: InspectorInitialView = { view: \"auto\" }): void {\n\t\tif (this.disposed || this.inspectorActive) return;\n\t\tthis.inspectorActive = true;\n\t\tthis.options.session.setInspectorOpen(true);\n\t\tconst settle = () => {\n\t\t\tthis.inspectorActive = false;\n\t\t\tthis.activeDone = undefined;\n\t\t\tthis.options.session.setInspectorOpen(false);\n\t\t};\n\t\tthis.options.ctx.ui\n\t\t\t.custom<void>(\n\t\t\t\t(tui, theme, keybindings, done) => {\n\t\t\t\t\tconst inspector = new PolyphaseInspector({\n\t\t\t\t\t\tsession: this.options.session,\n\t\t\t\t\t\ttui,\n\t\t\t\t\t\ttheme,\n\t\t\t\t\t\tkeybindings,\n\t\t\t\t\t\tgetArchivedRuns: () => this.options.getArchivedRuns(),\n\t\t\t\t\t\tgetSavedWorkflows: () => this.options.getSavedWorkflows(),\n\t\t\t\t\t\tinitial,\n\t\t\t\t\t\tshowThinking: !(this.options.hideThinkingBlock?.() ?? false),\n\t\t\t\t\t\tclose: () => done(undefined),\n\t\t\t\t\t\tinsertCommand: (text) => this.options.ctx.ui.setEditorText(text),\n\t\t\t\t\t});\n\t\t\t\t\t// Assigned only once construction succeeds, so a throwing constructor never leaves\n\t\t\t\t\t// `activeDone` pointing at a factory call that never produced a component.\n\t\t\t\t\tthis.activeDone = () => done(undefined);\n\t\t\t\t\treturn inspector;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toverlay: true,\n\t\t\t\t\toverlayOptions: () => ({ anchor: \"center\", width: \"100%\", maxHeight: \"100%\", margin: 1 }),\n\t\t\t\t},\n\t\t\t)\n\t\t\t// Both outcomes must clear `inspectorActive`/`activeDone` and flip the pump back to its\n\t\t\t// slow interval - otherwise a throwing factory (or a rejecting `custom()`) leaves the\n\t\t\t// inspector permanently unopenable and the session stuck on the fast inspector interval.\n\t\t\t.then(settle, settle);\n\t}\n\n\tcloseInspector(): void {\n\t\tif (!this.inspectorActive) return;\n\t\tthis.activeDone?.();\n\t}\n\n\tisInspectorOpen(): boolean {\n\t\treturn this.inspectorActive;\n\t}\n\n\tnotePromptStart(_kind: UIPromptKind): void {\n\t\tif (this.disposed) return;\n\t\tthis.outerPromptCount++;\n\t}\n\n\tnotePromptEnd(): void {\n\t\tif (this.disposed) return;\n\t\tthis.outerPromptCount = Math.max(0, this.outerPromptCount - 1);\n\t}\n\n\tprivate syncDockVisibility(): void {\n\t\tif (this.disposed) return;\n\t\tconst shouldShow = this.options.session.store.totals().running > 0 && this.options.session.settings().dock;\n\t\tif (shouldShow === this.dockVisible) return;\n\t\tthis.dockVisible = shouldShow;\n\t\tthis.setDockWidget(shouldShow);\n\t}\n\n\tprivate setDockWidget(visible: boolean): void {\n\t\tif (visible) {\n\t\t\tthis.options.ctx.ui.setWidget(\n\t\t\t\tDOCK_WIDGET_KEY,\n\t\t\t\t(tui, theme) => new PolyphaseDock({ session: this.options.session, tui, theme }),\n\t\t\t\t{ placement: \"aboveEditor\" },\n\t\t\t);\n\t\t} else {\n\t\t\tthis.options.ctx.ui.setWidget(DOCK_WIDGET_KEY, undefined);\n\t\t}\n\t}\n\n\tdispose(): void {\n\t\tif (this.disposed) return;\n\t\tthis.disposed = true;\n\t\tthis.unsubscribeTerminalInput();\n\t\tthis.unsubscribeStore();\n\t\tthis.unsubscribeParentPrompt();\n\t\tthis.closeInspector();\n\t\tif (this.dockVisible) {\n\t\t\tthis.dockVisible = false;\n\t\t\tthis.setDockWidget(false);\n\t\t}\n\t}\n}\n\nexport function installPolyphaseUi(options: PolyphaseUiOptions): PolyphaseUiController {\n\tif (options.ctx.mode !== \"tui\" || !options.ctx.hasUI) return inertController();\n\treturn new PolyphaseUiControllerImpl(options);\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `PolyphaseDock`: the one-line summary widget shown above the editor while any run is active
|
|
3
|
+
* (`ctx.ui.setWidget("polyphase", ..., { placement: "aboveEditor" })`). See DESIGN.md §12.6.
|
|
4
|
+
* Owns no timers: it reads the store at render time and asks the TUI to re-render on every flush.
|
|
5
|
+
*/
|
|
6
|
+
import type { Component, TUI } from "@draht/tui";
|
|
7
|
+
import type { Theme } from "../../../modes/interactive/theme/theme.ts";
|
|
8
|
+
import type { PolyphaseSession } from "../session.ts";
|
|
9
|
+
export interface PolyphaseDockDeps {
|
|
10
|
+
session: PolyphaseSession;
|
|
11
|
+
tui: TUI;
|
|
12
|
+
theme: Theme;
|
|
13
|
+
now?: () => number;
|
|
14
|
+
}
|
|
15
|
+
/** `Component` for `ctx.ui.setWidget`'s `(tui, theme) => Component & { dispose?(): void }` factory. */
|
|
16
|
+
export declare class PolyphaseDock implements Component {
|
|
17
|
+
private readonly deps;
|
|
18
|
+
private readonly unsubscribe;
|
|
19
|
+
private cacheKey;
|
|
20
|
+
private cachedLines;
|
|
21
|
+
constructor(deps: PolyphaseDockDeps);
|
|
22
|
+
render(width: number): string[];
|
|
23
|
+
invalidate(): void;
|
|
24
|
+
dispose(): void;
|
|
25
|
+
private now;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=dock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dock.d.ts","sourceRoot":"","sources":["../../../../src/core/polyphase/ui/dock.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAIvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAMtD,MAAM,WAAW,iBAAiB;IACjC,OAAO,EAAE,gBAAgB,CAAC;IAC1B,GAAG,EAAE,GAAG,CAAC;IACT,KAAK,EAAE,KAAK,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACnB;AA+CD,uGAAuG;AACvG,qBAAa,aAAc,YAAW,SAAS;IAC9C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAoB;IACzC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IACzC,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,WAAW,CAAgB;IAEnC,YAAY,IAAI,EAAE,iBAAiB,EAKlC;IAED,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAsC9B;IAED,UAAU,IAAI,IAAI,CAEjB;IAED,OAAO,IAAI,IAAI,CAEd;IAED,OAAO,CAAC,GAAG;CAGX"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `PolyphaseDock`: the one-line summary widget shown above the editor while any run is active
|
|
3
|
+
* (`ctx.ui.setWidget("polyphase", ..., { placement: "aboveEditor" })`). See DESIGN.md §12.6.
|
|
4
|
+
* Owns no timers: it reads the store at render time and asks the TUI to re-render on every flush.
|
|
5
|
+
*/
|
|
6
|
+
import { keyHint } from "../../../modes/interactive/components/keybinding-hints.js";
|
|
7
|
+
import { fitLine, formatCost, spinnerFrame } from "../render/format.js";
|
|
8
|
+
import { layoutRun } from "../render/run-block.js";
|
|
9
|
+
import { snapshotFromRun } from "../render/snapshot.js";
|
|
10
|
+
const DOCK_MAX_LINES = 10;
|
|
11
|
+
const COMMAND_RUN_MAX_LINES = 8;
|
|
12
|
+
/** Live counts only: running runs, and the done/failed/cancelled/queued/active/cost of those
|
|
13
|
+
* runs' own agents (§12.6's "2 runs · 3 running · 1 queued · 6 done" reads as running runs plus an
|
|
14
|
+
* agent-level breakdown within them) — never `store.totals()`'s session-wide retained totals,
|
|
15
|
+
* which include every finished run still kept for `/workflows list` and the inspector. */
|
|
16
|
+
function liveSummary(runs) {
|
|
17
|
+
const summary = { runs: 0, active: 0, queued: 0, done: 0, failed: 0, cancelled: 0, cost: 0 };
|
|
18
|
+
for (const run of runs) {
|
|
19
|
+
if (run.status !== "running")
|
|
20
|
+
continue;
|
|
21
|
+
summary.runs++;
|
|
22
|
+
for (const agent of run.agents) {
|
|
23
|
+
if (agent.status === "queued")
|
|
24
|
+
summary.queued++;
|
|
25
|
+
if (agent.status === "starting" || agent.status === "running")
|
|
26
|
+
summary.active++;
|
|
27
|
+
if (agent.status === "done")
|
|
28
|
+
summary.done++;
|
|
29
|
+
if (agent.status === "failed")
|
|
30
|
+
summary.failed++;
|
|
31
|
+
if (agent.status === "cancelled")
|
|
32
|
+
summary.cancelled++;
|
|
33
|
+
summary.cost += agent.state.usage?.cost.total ?? 0;
|
|
34
|
+
summary.cost += agent.state.liveUsage?.cost.total ?? 0;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return summary;
|
|
38
|
+
}
|
|
39
|
+
function summaryLine(summary, theme, now) {
|
|
40
|
+
const parts = ["polyphase", `${summary.runs} run${summary.runs === 1 ? "" : "s"}`];
|
|
41
|
+
if (summary.active > 0)
|
|
42
|
+
parts.push(`${summary.active} running`);
|
|
43
|
+
if (summary.queued > 0)
|
|
44
|
+
parts.push(`${summary.queued} queued`);
|
|
45
|
+
if (summary.done > 0)
|
|
46
|
+
parts.push(`${summary.done} done`);
|
|
47
|
+
if (summary.failed > 0)
|
|
48
|
+
parts.push(`${summary.failed} failed`);
|
|
49
|
+
if (summary.cancelled > 0)
|
|
50
|
+
parts.push(`${summary.cancelled} cancelled`);
|
|
51
|
+
const cost = formatCost(summary.cost);
|
|
52
|
+
if (cost)
|
|
53
|
+
parts.push(cost);
|
|
54
|
+
parts.push(keyHint("app.polyphase.inspector", "inspect"));
|
|
55
|
+
return `${theme.fg("accent", spinnerFrame(now))} ${parts.join(" · ")}`;
|
|
56
|
+
}
|
|
57
|
+
/** `Component` for `ctx.ui.setWidget`'s `(tui, theme) => Component & { dispose?(): void }` factory. */
|
|
58
|
+
export class PolyphaseDock {
|
|
59
|
+
deps;
|
|
60
|
+
unsubscribe;
|
|
61
|
+
cacheKey;
|
|
62
|
+
cachedLines = [];
|
|
63
|
+
constructor(deps) {
|
|
64
|
+
this.deps = deps;
|
|
65
|
+
this.unsubscribe = deps.session.store.subscribe(() => {
|
|
66
|
+
deps.tui.requestRender();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
render(width) {
|
|
70
|
+
const now = this.now();
|
|
71
|
+
const store = this.deps.session.store;
|
|
72
|
+
const runs = store.runs();
|
|
73
|
+
// Recomputing `totals()` plus a `snapshotFromRun`/`layoutRun` pass per running command
|
|
74
|
+
// workflow on every render (including every editor keystroke, since the TUI redraws the
|
|
75
|
+
// whole screen on each one) would walk every retained run's agents and up to 200 log lines
|
|
76
|
+
// each time. Every input that can change what this widget shows bumps some run's `version`,
|
|
77
|
+
// so a signature of (width, spinner frame, run versions) is enough to skip that work when
|
|
78
|
+
// nothing has actually changed since the last render.
|
|
79
|
+
const spinner = spinnerFrame(now);
|
|
80
|
+
// A second-granularity term alongside the spinner frame: the frame alone cycles every second
|
|
81
|
+
// (4 frames at 250ms each), so a render exactly N seconds after the last one would otherwise
|
|
82
|
+
// hit the cache and show a stale elapsed time from `layoutRun`'s live duration.
|
|
83
|
+
const key = `${width}|${spinner}|${Math.floor(now / 1000)}|${runs.map((run) => `${run.id}:${run.version}`).join(",")}`;
|
|
84
|
+
if (key === this.cacheKey)
|
|
85
|
+
return this.cachedLines;
|
|
86
|
+
this.cacheKey = key;
|
|
87
|
+
const lines = [fitLine(summaryLine(liveSummary(runs), this.deps.theme, now), width)];
|
|
88
|
+
for (const run of runs) {
|
|
89
|
+
if (lines.length >= DOCK_MAX_LINES)
|
|
90
|
+
break;
|
|
91
|
+
if (run.status !== "running" || run.kind !== "workflow" || run.origin !== "command")
|
|
92
|
+
continue;
|
|
93
|
+
const snapshot = snapshotFromRun(run, { now, tailItems: 0 });
|
|
94
|
+
const body = layoutRun(snapshot, width, this.deps.theme, {
|
|
95
|
+
expanded: false,
|
|
96
|
+
partial: true,
|
|
97
|
+
focus: true,
|
|
98
|
+
maxLines: COMMAND_RUN_MAX_LINES,
|
|
99
|
+
hints: false,
|
|
100
|
+
now,
|
|
101
|
+
});
|
|
102
|
+
for (const line of body) {
|
|
103
|
+
if (lines.length >= DOCK_MAX_LINES)
|
|
104
|
+
break;
|
|
105
|
+
lines.push(fitLine(line, width));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
this.cachedLines = lines;
|
|
109
|
+
return lines;
|
|
110
|
+
}
|
|
111
|
+
invalidate() {
|
|
112
|
+
this.cacheKey = undefined;
|
|
113
|
+
}
|
|
114
|
+
dispose() {
|
|
115
|
+
this.unsubscribe();
|
|
116
|
+
}
|
|
117
|
+
now() {
|
|
118
|
+
return this.deps.now ? this.deps.now() : Date.now();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=dock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dock.js","sourceRoot":"","sources":["../../../../src/core/polyphase/ui/dock.ts"],"names":[],"mappings":"AAAA;;;;GAIG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B,CAAC;IAEO,GAAG;QACV,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IACrD,CAAC;CACD","sourcesContent":["/**\n * `PolyphaseDock`: the one-line summary widget shown above the editor while any run is active\n * (`ctx.ui.setWidget(\"polyphase\", ..., { placement: \"aboveEditor\" })`). See DESIGN.md §12.6.\n * Owns no timers: it reads the store at render time and asks the TUI to re-render on every flush.\n */\n\nimport type { Component, TUI } from \"@draht/tui\";\nimport { keyHint } from \"../../../modes/interactive/components/keybinding-hints.ts\";\nimport type { Theme } from \"../../../modes/interactive/theme/theme.ts\";\nimport { fitLine, formatCost, spinnerFrame } from \"../render/format.ts\";\nimport { layoutRun } from \"../render/run-block.ts\";\nimport { snapshotFromRun } from \"../render/snapshot.ts\";\nimport type { PolyphaseSession } from \"../session.ts\";\nimport type { RunView } from \"../types.ts\";\n\nconst DOCK_MAX_LINES = 10;\nconst COMMAND_RUN_MAX_LINES = 8;\n\nexport interface PolyphaseDockDeps {\n\tsession: PolyphaseSession;\n\ttui: TUI;\n\ttheme: Theme;\n\tnow?: () => number;\n}\n\ninterface DockSummary {\n\truns: number;\n\tactive: number;\n\tqueued: number;\n\tdone: number;\n\tfailed: number;\n\tcancelled: number;\n\tcost: number;\n}\n\n/** Live counts only: running runs, and the done/failed/cancelled/queued/active/cost of those\n * runs' own agents (§12.6's \"2 runs · 3 running · 1 queued · 6 done\" reads as running runs plus an\n * agent-level breakdown within them) — never `store.totals()`'s session-wide retained totals,\n * which include every finished run still kept for `/workflows list` and the inspector. */\nfunction liveSummary(runs: readonly RunView[]): DockSummary {\n\tconst summary: DockSummary = { runs: 0, active: 0, queued: 0, done: 0, failed: 0, cancelled: 0, cost: 0 };\n\tfor (const run of runs) {\n\t\tif (run.status !== \"running\") continue;\n\t\tsummary.runs++;\n\t\tfor (const agent of run.agents) {\n\t\t\tif (agent.status === \"queued\") summary.queued++;\n\t\t\tif (agent.status === \"starting\" || agent.status === \"running\") summary.active++;\n\t\t\tif (agent.status === \"done\") summary.done++;\n\t\t\tif (agent.status === \"failed\") summary.failed++;\n\t\t\tif (agent.status === \"cancelled\") summary.cancelled++;\n\t\t\tsummary.cost += agent.state.usage?.cost.total ?? 0;\n\t\t\tsummary.cost += agent.state.liveUsage?.cost.total ?? 0;\n\t\t}\n\t}\n\treturn summary;\n}\n\nfunction summaryLine(summary: DockSummary, theme: Theme, now: number): string {\n\tconst parts = [\"polyphase\", `${summary.runs} run${summary.runs === 1 ? \"\" : \"s\"}`];\n\tif (summary.active > 0) parts.push(`${summary.active} running`);\n\tif (summary.queued > 0) parts.push(`${summary.queued} queued`);\n\tif (summary.done > 0) parts.push(`${summary.done} done`);\n\tif (summary.failed > 0) parts.push(`${summary.failed} failed`);\n\tif (summary.cancelled > 0) parts.push(`${summary.cancelled} cancelled`);\n\tconst cost = formatCost(summary.cost);\n\tif (cost) parts.push(cost);\n\tparts.push(keyHint(\"app.polyphase.inspector\", \"inspect\"));\n\treturn `${theme.fg(\"accent\", spinnerFrame(now))} ${parts.join(\" · \")}`;\n}\n\n/** `Component` for `ctx.ui.setWidget`'s `(tui, theme) => Component & { dispose?(): void }` factory. */\nexport class PolyphaseDock implements Component {\n\tprivate readonly deps: PolyphaseDockDeps;\n\tprivate readonly unsubscribe: () => void;\n\tprivate cacheKey: string | undefined;\n\tprivate cachedLines: string[] = [];\n\n\tconstructor(deps: PolyphaseDockDeps) {\n\t\tthis.deps = deps;\n\t\tthis.unsubscribe = deps.session.store.subscribe(() => {\n\t\t\tdeps.tui.requestRender();\n\t\t});\n\t}\n\n\trender(width: number): string[] {\n\t\tconst now = this.now();\n\t\tconst store = this.deps.session.store;\n\t\tconst runs = store.runs();\n\t\t// Recomputing `totals()` plus a `snapshotFromRun`/`layoutRun` pass per running command\n\t\t// workflow on every render (including every editor keystroke, since the TUI redraws the\n\t\t// whole screen on each one) would walk every retained run's agents and up to 200 log lines\n\t\t// each time. Every input that can change what this widget shows bumps some run's `version`,\n\t\t// so a signature of (width, spinner frame, run versions) is enough to skip that work when\n\t\t// nothing has actually changed since the last render.\n\t\tconst spinner = spinnerFrame(now);\n\t\t// A second-granularity term alongside the spinner frame: the frame alone cycles every second\n\t\t// (4 frames at 250ms each), so a render exactly N seconds after the last one would otherwise\n\t\t// hit the cache and show a stale elapsed time from `layoutRun`'s live duration.\n\t\tconst key = `${width}|${spinner}|${Math.floor(now / 1000)}|${runs.map((run) => `${run.id}:${run.version}`).join(\",\")}`;\n\t\tif (key === this.cacheKey) return this.cachedLines;\n\t\tthis.cacheKey = key;\n\n\t\tconst lines: string[] = [fitLine(summaryLine(liveSummary(runs), this.deps.theme, now), width)];\n\t\tfor (const run of runs) {\n\t\t\tif (lines.length >= DOCK_MAX_LINES) break;\n\t\t\tif (run.status !== \"running\" || run.kind !== \"workflow\" || run.origin !== \"command\") continue;\n\t\t\tconst snapshot = snapshotFromRun(run, { now, tailItems: 0 });\n\t\t\tconst body = layoutRun(snapshot, width, this.deps.theme, {\n\t\t\t\texpanded: false,\n\t\t\t\tpartial: true,\n\t\t\t\tfocus: true,\n\t\t\t\tmaxLines: COMMAND_RUN_MAX_LINES,\n\t\t\t\thints: false,\n\t\t\t\tnow,\n\t\t\t});\n\t\t\tfor (const line of body) {\n\t\t\t\tif (lines.length >= DOCK_MAX_LINES) break;\n\t\t\t\tlines.push(fitLine(line, width));\n\t\t\t}\n\t\t}\n\t\tthis.cachedLines = lines;\n\t\treturn lines;\n\t}\n\n\tinvalidate(): void {\n\t\tthis.cacheKey = undefined;\n\t}\n\n\tdispose(): void {\n\t\tthis.unsubscribe();\n\t}\n\n\tprivate now(): number {\n\t\treturn this.deps.now ? this.deps.now() : Date.now();\n\t}\n}\n"]}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `PolyphaseInspector`: the `alt+a` popup overlay listing runs and following an agent's live
|
|
3
|
+
* transcript. See DESIGN.md §12.1-12.6, §12.8.
|
|
4
|
+
*/
|
|
5
|
+
import type { Component, Focusable, KeybindingsManager, TUI } from "@draht/tui";
|
|
6
|
+
import type { Theme } from "../../../modes/interactive/theme/theme.ts";
|
|
7
|
+
import type { ArchivedRun } from "../details.ts";
|
|
8
|
+
import type { PolyphaseSession } from "../session.ts";
|
|
9
|
+
import type { SavedWorkflowSummary } from "../workflow/saved.ts";
|
|
10
|
+
export type InspectorInitialView = {
|
|
11
|
+
view: "auto";
|
|
12
|
+
} | {
|
|
13
|
+
view: "runs";
|
|
14
|
+
} | {
|
|
15
|
+
view: "run";
|
|
16
|
+
runId: string;
|
|
17
|
+
} | {
|
|
18
|
+
view: "agent";
|
|
19
|
+
runId: string;
|
|
20
|
+
agentIndex: number;
|
|
21
|
+
};
|
|
22
|
+
export interface InspectorDeps {
|
|
23
|
+
session: PolyphaseSession;
|
|
24
|
+
tui: TUI;
|
|
25
|
+
theme: Theme;
|
|
26
|
+
keybindings: KeybindingsManager;
|
|
27
|
+
getArchivedRuns(): readonly ArchivedRun[];
|
|
28
|
+
getSavedWorkflows(): readonly SavedWorkflowSummary[];
|
|
29
|
+
initial: InspectorInitialView;
|
|
30
|
+
showThinking: boolean;
|
|
31
|
+
close(): void;
|
|
32
|
+
insertCommand(text: string): void;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The `alt+a` popup. `render()` recomputes the live runs-view list, the current run's agent list
|
|
36
|
+
* and the selected agent's transcript window on every call, since those come straight from the
|
|
37
|
+
* live store; nothing here owns a timer. Dirtiness (when to re-render at all) is the caller's job,
|
|
38
|
+
* driven by `session.store`'s flush notifications.
|
|
39
|
+
*/
|
|
40
|
+
export declare class PolyphaseInspector implements Component, Focusable {
|
|
41
|
+
focused: boolean;
|
|
42
|
+
private readonly deps;
|
|
43
|
+
private readonly transcriptCache;
|
|
44
|
+
private readonly unsubscribe;
|
|
45
|
+
private mode;
|
|
46
|
+
private currentRunId;
|
|
47
|
+
private currentAgentIndex;
|
|
48
|
+
private runsRows;
|
|
49
|
+
private runsSelection;
|
|
50
|
+
private runsSelectionKey;
|
|
51
|
+
private runSelection;
|
|
52
|
+
private following;
|
|
53
|
+
/** Anchors the paused window to an item (`seq`) and a line within it, not an absolute line index:
|
|
54
|
+
* the transcript keeps at most `maxItems`, so a paused run that keeps producing output evicts
|
|
55
|
+
* older items and shifts every absolute line index after them. Resolved back to an absolute line
|
|
56
|
+
* on each render via `resolvePauseEndLine`. See `renderAgentDetailBody`. */
|
|
57
|
+
private pauseAnchor;
|
|
58
|
+
private lastTranscriptTotalLines;
|
|
59
|
+
private lastTranscriptRanges;
|
|
60
|
+
private lastDetailBodyHeight;
|
|
61
|
+
private lastRenderWidth;
|
|
62
|
+
private showThinking;
|
|
63
|
+
private showToolPreviews;
|
|
64
|
+
private armed;
|
|
65
|
+
private footerNotice;
|
|
66
|
+
constructor(deps: InspectorDeps);
|
|
67
|
+
handleInput(data: string): void;
|
|
68
|
+
render(width: number): string[];
|
|
69
|
+
invalidate(): void;
|
|
70
|
+
dispose(): void;
|
|
71
|
+
private now;
|
|
72
|
+
private resolveInitialView;
|
|
73
|
+
private selectFirstActiveAgentForCurrentRun;
|
|
74
|
+
/** Resolves the runs-view selection by the identity of the previously selected row (its runId or
|
|
75
|
+
* saved-workflow name), not its index, so a live update that reorders rows between a render and the
|
|
76
|
+
* next key press does not silently select a different run. Falls back to a clamped index when the
|
|
77
|
+
* previous row is gone (e.g. an archived run was pruned). */
|
|
78
|
+
private resolveRunsSelectionIndex;
|
|
79
|
+
private resetFollowing;
|
|
80
|
+
private isSplitActive;
|
|
81
|
+
private goBack;
|
|
82
|
+
private confirmSelection;
|
|
83
|
+
private moveSelection;
|
|
84
|
+
/** Shared by the agent detail view and, in split view, by page keys on the run view: both drive
|
|
85
|
+
* the same `following`/`pauseAnchor` pair against whichever agent is currently shown on the
|
|
86
|
+
* right. */
|
|
87
|
+
private scrollTranscript;
|
|
88
|
+
/** Page keys scroll the right pane in split view (§12.2) instead of moving the left selection by
|
|
89
|
+
* a page. Up/down always move the left selection; only page keys are redirected. */
|
|
90
|
+
private handlePage;
|
|
91
|
+
private cycleAgent;
|
|
92
|
+
private toggleFollow;
|
|
93
|
+
private handleCancelKey;
|
|
94
|
+
private cancelTarget;
|
|
95
|
+
private buildRunsRows;
|
|
96
|
+
private currentRunSnapshot;
|
|
97
|
+
private sortedAgentsOf;
|
|
98
|
+
private currentRunAgents;
|
|
99
|
+
private currentAgentRow;
|
|
100
|
+
private currentAgentTranscriptFor;
|
|
101
|
+
private formatRunsRow;
|
|
102
|
+
private renderRunsBody;
|
|
103
|
+
private formatAgentRow;
|
|
104
|
+
private runTitleForHeader;
|
|
105
|
+
private runHeaderRight;
|
|
106
|
+
private renderRunBody;
|
|
107
|
+
private renderSplitBody;
|
|
108
|
+
private renderAgentDetailBody;
|
|
109
|
+
/** `width` is the same inner width the caller laid its body out to, so a hint line that does not
|
|
110
|
+
* fit is ellipsised like every other row instead of being hard-cut by `sideLine`'s padding,
|
|
111
|
+
* which carries no ellipsis of its own. */
|
|
112
|
+
private footerLine;
|
|
113
|
+
private runsHintLine;
|
|
114
|
+
private runHintLine;
|
|
115
|
+
private agentHintLine;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=inspector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspector.d.ts","sourceRoot":"","sources":["../../../../src/core/polyphase/ui/inspector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAGhF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAejD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,KA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