zidane 7.2.4 → 8.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +34 -6
- package/dist/{acp-D-tVyUjw.js → acp-DQDhi2dj.js} +230 -77
- package/dist/acp-DQDhi2dj.js.map +1 -0
- package/dist/acp-cli.d.ts +1 -1
- package/dist/acp-cli.js +9 -66
- package/dist/acp-cli.js.map +1 -1
- package/dist/acp.d.ts +10 -590
- package/dist/acp.d.ts.map +1 -1
- package/dist/acp.js +3 -3
- package/dist/{agent-D0zZnGbt.js → agent-DSLNmBp0.js} +14401 -13214
- package/dist/agent-DSLNmBp0.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +3 -2
- package/dist/aliasing-lVFbm81n.js +217 -0
- package/dist/aliasing-lVFbm81n.js.map +1 -0
- package/dist/{anthropic-C2aole0G.js → anthropic-CD00LhUP.js} +1442 -1264
- package/dist/anthropic-CD00LhUP.js.map +1 -0
- package/dist/artifacts-CV2hUKnL.js.map +1 -1
- package/dist/{atomic-write-B7zr1ddF.js → atomic-write-Ijgf2Mhc.js} +13 -3
- package/dist/atomic-write-Ijgf2Mhc.js.map +1 -0
- package/dist/call-tool-dHlbGOIY.js +70 -0
- package/dist/call-tool-dHlbGOIY.js.map +1 -0
- package/dist/chat/pure.d.ts +372 -6
- package/dist/chat/pure.d.ts.map +1 -1
- package/dist/chat/pure.js +35 -244
- package/dist/chat/pure.js.map +1 -1
- package/dist/{approvals-DKaJZYlm.js → chat-JPJJ8uu5.js} +15879 -14631
- package/dist/chat-JPJJ8uu5.js.map +1 -0
- package/dist/chat.d.ts +4 -6
- package/dist/chat.js +23 -12
- package/dist/cli-shared-C-YCaglL.js +159 -0
- package/dist/cli-shared-C-YCaglL.js.map +1 -0
- package/dist/client-core-BQSyDALT.d.ts +2115 -0
- package/dist/client-core-BQSyDALT.d.ts.map +1 -0
- package/dist/codemode-worker.d.ts +1 -0
- package/dist/codemode-worker.js +155 -0
- package/dist/codemode-worker.js.map +1 -0
- package/dist/codemode.d.ts +352 -0
- package/dist/codemode.d.ts.map +1 -0
- package/dist/codemode.js +5 -0
- package/dist/connection-Dr-Js4yZ.d.ts +28 -0
- package/dist/connection-Dr-Js4yZ.d.ts.map +1 -0
- package/dist/connection-loop-gdh22LTI.js +112 -0
- package/dist/connection-loop-gdh22LTI.js.map +1 -0
- package/dist/context-segments-BHKlagL6.js +1016 -0
- package/dist/context-segments-BHKlagL6.js.map +1 -0
- package/dist/{context-transport-T_6AYIvy.js → context-transport-DSMTUsK1.js} +3 -3
- package/dist/{context-transport-T_6AYIvy.js.map → context-transport-DSMTUsK1.js.map} +1 -1
- package/dist/contexts/daytona.d.ts +19 -8
- package/dist/contexts/daytona.d.ts.map +1 -1
- package/dist/contexts/daytona.js +1 -440
- package/dist/contexts/docker.d.ts +36 -7
- package/dist/contexts/docker.d.ts.map +1 -1
- package/dist/contexts/docker.js +1 -456
- package/dist/contexts/e2b.d.ts +68 -13
- package/dist/contexts/e2b.d.ts.map +1 -1
- package/dist/contexts/e2b.js +1 -382
- package/dist/contexts/sandbox.d.ts +1 -1
- package/dist/contexts/sandbox.js +5 -0
- package/dist/contexts/sandbox.js.map +1 -1
- package/dist/{contexts-CRE9pw07.js → contexts-d7UolYot.js} +1059 -524
- package/dist/contexts-d7UolYot.js.map +1 -0
- package/dist/contexts.d.ts +3 -3
- package/dist/contexts.js +1 -1
- package/dist/cred-keys-GpBg71cP.js +105 -0
- package/dist/cred-keys-GpBg71cP.js.map +1 -0
- package/dist/{auth-BG2rVKSt.js → credentials-JttEuRON.js} +55 -206
- package/dist/credentials-JttEuRON.js.map +1 -0
- package/dist/{cursor-iojRXHF9.js → cursor-CdjaQTBW.js} +3 -3
- package/dist/{cursor-iojRXHF9.js.map → cursor-CdjaQTBW.js.map} +1 -1
- package/dist/daemon-cli.d.ts +1 -1
- package/dist/daemon-cli.js +3 -2
- package/dist/daemon-cli.js.map +1 -1
- package/dist/daytona-DG3omipZ.js +513 -0
- package/dist/daytona-DG3omipZ.js.map +1 -0
- package/dist/defaults-Cx3zvDOV.js +23 -0
- package/dist/defaults-Cx3zvDOV.js.map +1 -0
- package/dist/dispatcher-BMlu2BmZ.js +4941 -0
- package/dist/dispatcher-BMlu2BmZ.js.map +1 -0
- package/dist/docker-BZhMMJUp.js +727 -0
- package/dist/docker-BZhMMJUp.js.map +1 -0
- package/dist/e2b-CEVOdRib.js +480 -0
- package/dist/e2b-CEVOdRib.js.map +1 -0
- package/dist/edit-utils-EGosADZq.js +234 -0
- package/dist/edit-utils-EGosADZq.js.map +1 -0
- package/dist/environment-8wsKE2Ln.js +214 -0
- package/dist/environment-8wsKE2Ln.js.map +1 -0
- package/dist/eval-BNcvle_J.js +1595 -0
- package/dist/eval-BNcvle_J.js.map +1 -0
- package/dist/eval.d.ts +2 -2
- package/dist/eval.js +1 -1489
- package/dist/executor-Cx5-8yqi.js +621 -0
- package/dist/executor-Cx5-8yqi.js.map +1 -0
- package/dist/extension-authoring-DyGGmq9V.js +385 -0
- package/dist/extension-authoring-DyGGmq9V.js.map +1 -0
- package/dist/extensions.d.ts +2 -2
- package/dist/extensions.js +3 -3
- package/dist/{fetch-url-DX75gpL0.js → fetch-url-Ct2TjDWt.js} +4 -4
- package/dist/{fetch-url-DX75gpL0.js.map → fetch-url-Ct2TjDWt.js.map} +1 -1
- package/dist/{format-BF745pLL.js → format-C2NQEVUH.js} +39 -2
- package/dist/format-C2NQEVUH.js.map +1 -0
- package/dist/format-bytes-C7tfc3Zm.js +55 -0
- package/dist/format-bytes-C7tfc3Zm.js.map +1 -0
- package/dist/headless-C_rNUuYC.js +960 -0
- package/dist/headless-C_rNUuYC.js.map +1 -0
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +1 -413
- package/dist/{history-search-C4bk1Wz_.js → history-search-CcYzF8-0.js} +7 -3
- package/dist/history-search-CcYzF8-0.js.map +1 -0
- package/dist/history-search-worker.d.ts +1 -1
- package/dist/history-search-worker.js +1 -1
- package/dist/host-D7NrI03V.js +378 -0
- package/dist/host-D7NrI03V.js.map +1 -0
- package/dist/host-signals-BcP5QKUD.js +118 -0
- package/dist/host-signals-BcP5QKUD.js.map +1 -0
- package/dist/identity-CwfO8K-t.js +26 -0
- package/dist/identity-CwfO8K-t.js.map +1 -0
- package/dist/{index-BgN1T3lk.d.ts → index-BGe1fQT7.d.ts} +10987 -9320
- package/dist/index-BGe1fQT7.d.ts.map +1 -0
- package/dist/index-BVQsIKGn.d.ts +448 -0
- package/dist/index-BVQsIKGn.d.ts.map +1 -0
- package/dist/{index-C6NEd5y_.d.ts → index-CHABJd-L.d.ts} +3386 -502
- package/dist/index-CHABJd-L.d.ts.map +1 -0
- package/dist/{index-C37_ppWv.d.ts → index-D6a7qXpg.d.ts} +2 -3
- package/dist/index-D6a7qXpg.d.ts.map +1 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +27 -23
- package/dist/{completion-core-BRo86R_L.js → inline-ghost-BVRQeGoL.js} +50 -2
- package/dist/inline-ghost-BVRQeGoL.js.map +1 -0
- package/dist/ipc/remote.d.ts +313 -0
- package/dist/ipc/remote.d.ts.map +1 -0
- package/dist/ipc/remote.js +4 -0
- package/dist/ipc.d.ts +6 -964
- package/dist/ipc.js +403 -4
- package/dist/ipc.js.map +1 -0
- package/dist/{isolation-Kfoof0MM.d.ts → isolation-D9L650W5.d.ts} +100 -15
- package/dist/isolation-D9L650W5.d.ts.map +1 -0
- package/dist/json-rpc--HXQti1E.js +350 -0
- package/dist/json-rpc--HXQti1E.js.map +1 -0
- package/dist/links-j8rED1sR.js +603 -0
- package/dist/links-j8rED1sR.js.map +1 -0
- package/dist/local-terminal-D8QThwo_.js +252 -0
- package/dist/local-terminal-D8QThwo_.js.map +1 -0
- package/dist/{logger--C1VQjwJ.js → logger-Gtqlayx8.js} +199 -173
- package/dist/logger-Gtqlayx8.js.map +1 -0
- package/dist/logs-view-CWG8aUAG.js.map +1 -1
- package/dist/{mcp-CgNd-f3F.js → mcp-_wecH9Qe.js} +608 -562
- package/dist/mcp-_wecH9Qe.js.map +1 -0
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +2 -2
- package/dist/media-sniff-UKijEaiQ.js.map +1 -1
- package/dist/{messages-2jcOA_5R.js → messages-BqiwcD2Q.js} +1017 -1014
- package/dist/messages-BqiwcD2Q.js.map +1 -0
- package/dist/{oauth-DxHO17JE.js → oauth-Px_pBB9W.js} +5 -5
- package/dist/{oauth-DxHO17JE.js.map → oauth-Px_pBB9W.js.map} +1 -1
- package/dist/{openai-compat-Dy56weK8.js → openai-compat-CFrpH7uq.js} +432 -589
- package/dist/openai-compat-CFrpH7uq.js.map +1 -0
- package/dist/orchestration-BCGmB8Ps.js +511 -0
- package/dist/orchestration-BCGmB8Ps.js.map +1 -0
- package/dist/output/stream-json.d.ts +1 -2
- package/dist/output/stream-json.d.ts.map +1 -1
- package/dist/output/stream-json.js +1 -1
- package/dist/output/terminal.d.ts +1 -2
- package/dist/output/terminal.d.ts.map +1 -1
- package/dist/output/terminal.js +13 -7
- package/dist/output/terminal.js.map +1 -1
- package/dist/{plugins-gbI7SBA6.js → plugins-DS7mahzZ.js} +20 -101
- package/dist/plugins-DS7mahzZ.js.map +1 -0
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.js +1 -2
- package/dist/prelude-Cxo4t74B.js +517 -0
- package/dist/prelude-Cxo4t74B.js.map +1 -0
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -2
- package/dist/project-root-B8zADr4o.js +167 -0
- package/dist/project-root-B8zADr4o.js.map +1 -0
- package/dist/project-user-paths-BSgtrRxl.js +58 -0
- package/dist/project-user-paths-BSgtrRxl.js.map +1 -0
- package/dist/{prompts-Pqc3JdW_.d.ts → prompts-DYcvqShf.d.ts} +14 -11
- package/dist/prompts-DYcvqShf.d.ts.map +1 -0
- package/dist/protocol-DnhqqSmE.js +13 -0
- package/dist/protocol-DnhqqSmE.js.map +1 -0
- package/dist/providers/anthropic.d.ts +2 -2
- package/dist/providers/anthropic.js +1 -2
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/arcee.js +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/baseten.js +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/cerebras.js +3 -2
- package/dist/providers/cerebras.js.map +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/local.js +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai-compat.js +1 -2
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.js +15 -12
- package/dist/providers/openai.js.map +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/openrouter.js +3 -2
- package/dist/providers/openrouter.js.map +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +3 -3
- package/dist/{providers-BVhnFyiY.js → providers-XUR7F4Hi.js} +4 -4
- package/dist/{providers-BVhnFyiY.js.map → providers-XUR7F4Hi.js.map} +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +4 -4
- package/dist/registry-D6ShBWJU.js +5234 -0
- package/dist/registry-D6ShBWJU.js.map +1 -0
- package/dist/remote-hosts-BtA_9ZGp.js +97 -0
- package/dist/remote-hosts-BtA_9ZGp.js.map +1 -0
- package/dist/restate.d.ts +2 -3
- package/dist/restate.d.ts.map +1 -1
- package/dist/restate.js +631 -572
- package/dist/restate.js.map +1 -1
- package/dist/run-summary-CklLiZ4y.js +288 -0
- package/dist/run-summary-CklLiZ4y.js.map +1 -0
- package/dist/{sandbox-BH0WQkXn.d.ts → sandbox-C5dR5DwQ.d.ts} +6 -3
- package/dist/sandbox-C5dR5DwQ.d.ts.map +1 -0
- package/dist/session/sqlite.d.ts +1 -2
- package/dist/session/sqlite.d.ts.map +1 -1
- package/dist/session/sqlite.js +1 -616
- package/dist/session-factory-BUGY5P40.js +1576 -0
- package/dist/session-factory-BUGY5P40.js.map +1 -0
- package/dist/{session-BqRP1hS7.js → session-xh9JXu6i.js} +94 -52
- package/dist/session-xh9JXu6i.js.map +1 -0
- package/dist/session.d.ts +1 -1
- package/dist/session.js +2 -2
- package/dist/settings-keys-Ckf29NeM.js +677 -0
- package/dist/settings-keys-Ckf29NeM.js.map +1 -0
- package/dist/shell-path-Dqaoow2J.js +412 -0
- package/dist/shell-path-Dqaoow2J.js.map +1 -0
- package/dist/{skills-BC3dodWp.js → skills-DKqZJm4X.js} +430 -470
- package/dist/skills-DKqZJm4X.js.map +1 -0
- package/dist/skills.d.ts +2 -2
- package/dist/skills.js +1 -2
- package/dist/source-mPExaUm8.js +381 -0
- package/dist/source-mPExaUm8.js.map +1 -0
- package/dist/sqlite-DV1DQzN2.js +698 -0
- package/dist/sqlite-DV1DQzN2.js.map +1 -0
- package/dist/{src-CkNQKFKr.js → src-BRMYRJib.js} +903 -1121
- package/dist/src-BRMYRJib.js.map +1 -0
- package/dist/{stdio-DPpBDPx5.js → stdio-C6YyoW3I.js} +4 -4
- package/dist/{stdio-DPpBDPx5.js.map → stdio-C6YyoW3I.js.map} +1 -1
- package/dist/{stdio-loader-Bbx19dMZ.js → stdio-loader-C830Vg-Z.js} +4 -4
- package/dist/{stdio-loader-Bbx19dMZ.js.map → stdio-loader-C830Vg-Z.js.map} +1 -1
- package/dist/system-prompt-MNVHatSD.d.ts.map +1 -1
- package/dist/timeout-DEaqslLO.d.ts.map +1 -1
- package/dist/todo-edits-Dn251YUP.js +1790 -0
- package/dist/todo-edits-Dn251YUP.js.map +1 -0
- package/dist/{turn-operations-DrbJlpq9.js → tool-formatters-IQFDrdrs.js} +1456 -2120
- package/dist/tool-formatters-IQFDrdrs.js.map +1 -0
- package/dist/tool-state-Dku6YqAB.js +989 -0
- package/dist/tool-state-Dku6YqAB.js.map +1 -0
- package/dist/tools/fetch-url.d.ts +1 -2
- package/dist/tools/fetch-url.d.ts.map +1 -1
- package/dist/tools/fetch-url.js +1 -2
- package/dist/tools/prompts.d.ts +1 -1
- package/dist/tools/prompts.js +7 -7
- package/dist/tools/prompts.js.map +1 -1
- package/dist/tools/web-search.d.ts +1 -2
- package/dist/tools/web-search.d.ts.map +1 -1
- package/dist/tools/web-search.js +2 -2
- package/dist/tools/web-search.js.map +1 -1
- package/dist/tools-_DnT3AGM.js +578 -0
- package/dist/tools-_DnT3AGM.js.map +1 -0
- package/dist/tools.d.ts +3 -3
- package/dist/tools.js +4 -2
- package/dist/tui.d.ts +534 -517
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +34933 -27242
- package/dist/tui.js.map +1 -1
- package/dist/turn-operations-B8sokwi5.js +333 -0
- package/dist/turn-operations-B8sokwi5.js.map +1 -0
- package/dist/turn-operations-DQX5ZZni.d.ts +3089 -0
- package/dist/turn-operations-DQX5ZZni.d.ts.map +1 -0
- package/dist/types-C7ZFOztE.d.ts +132 -0
- package/dist/types-C7ZFOztE.d.ts.map +1 -0
- package/dist/types-CH5XpIHw.js +114 -0
- package/dist/types-CH5XpIHw.js.map +1 -0
- package/dist/{types-CWgENVLY.js → types-Cu0ZGDu9.js} +10 -6
- package/dist/types-Cu0ZGDu9.js.map +1 -0
- package/dist/types-IqegbJEE.d.ts +624 -0
- package/dist/types-IqegbJEE.d.ts.map +1 -0
- package/dist/types.d.ts +4 -4
- package/dist/types.js +1 -1
- package/dist/url-D8HCl65b.js +1259 -0
- package/dist/url-D8HCl65b.js.map +1 -0
- package/dist/wasm-BVT-j5cl.js +33 -0
- package/dist/wasm-BVT-j5cl.js.map +1 -0
- package/dist/workspace-exec-stream-SV2R9d5S.js +355 -0
- package/dist/workspace-exec-stream-SV2R9d5S.js.map +1 -0
- package/dist/ws-CIHMvlSh.js +952 -0
- package/dist/ws-CIHMvlSh.js.map +1 -0
- package/dist/ws-client-N7NxzvQp.js +230 -0
- package/dist/ws-client-N7NxzvQp.js.map +1 -0
- package/dist/{xai-CazjStOK.js → xai-CvJTeLrI.js} +165 -5
- package/dist/xai-CvJTeLrI.js.map +1 -0
- package/dist/xdg-zweed0-t.js +117 -0
- package/dist/xdg-zweed0-t.js.map +1 -0
- package/docs/ACP.md +52 -0
- package/docs/ARCHITECTURE.md +103 -6
- package/docs/ARTIFACTS.md +8 -4
- package/docs/CHAT.md +165 -14
- package/docs/EXECUTION_CONTEXT.md +8 -0
- package/docs/EXTENSIONS.md +123 -2
- package/docs/HEADLESS.md +2 -0
- package/docs/IPC.md +775 -64
- package/docs/MACHINES.md +456 -0
- package/docs/PANELS.md +3 -0
- package/docs/README.md +4 -0
- package/docs/RESTATE.md +3 -2
- package/docs/RUN_IN_BACKGROUND.md +10 -2
- package/docs/SERVER.md +1085 -0
- package/docs/SKILL.md +6 -1
- package/docs/TERMINAL.md +75 -0
- package/docs/TUI.md +65 -14
- package/package.json +58 -26
- package/scripts/eval.ts +4 -0
- package/dist/acp-D-tVyUjw.js.map +0 -1
- package/dist/agent-D0zZnGbt.js.map +0 -1
- package/dist/anthropic-C2aole0G.js.map +0 -1
- package/dist/approvals-DKaJZYlm.js.map +0 -1
- package/dist/atomic-write-B7zr1ddF.js.map +0 -1
- package/dist/auth-BG2rVKSt.js.map +0 -1
- package/dist/completion-core-BRo86R_L.js.map +0 -1
- package/dist/contexts/daytona.js.map +0 -1
- package/dist/contexts/docker.js.map +0 -1
- package/dist/contexts/e2b.js.map +0 -1
- package/dist/contexts-CRE9pw07.js.map +0 -1
- package/dist/eval.js.map +0 -1
- package/dist/format-BF745pLL.js.map +0 -1
- package/dist/glob-DluQFSw1.js +0 -270
- package/dist/glob-DluQFSw1.js.map +0 -1
- package/dist/headless.js.map +0 -1
- package/dist/history-search-C4bk1Wz_.js.map +0 -1
- package/dist/index-BgN1T3lk.d.ts.map +0 -1
- package/dist/index-C37_ppWv.d.ts.map +0 -1
- package/dist/index-C6NEd5y_.d.ts.map +0 -1
- package/dist/ipc-zVSyo6K1.js +0 -331
- package/dist/ipc-zVSyo6K1.js.map +0 -1
- package/dist/ipc.d.ts.map +0 -1
- package/dist/isolation-Kfoof0MM.d.ts.map +0 -1
- package/dist/json-rpc-rSWMUh9b.js +0 -192
- package/dist/json-rpc-rSWMUh9b.js.map +0 -1
- package/dist/logger--C1VQjwJ.js.map +0 -1
- package/dist/mcp-CgNd-f3F.js.map +0 -1
- package/dist/messages-2jcOA_5R.js.map +0 -1
- package/dist/openai-compat-Dy56weK8.js.map +0 -1
- package/dist/output-cap-C9zukcCj.js +0 -100
- package/dist/output-cap-C9zukcCj.js.map +0 -1
- package/dist/panels-B6gRk4bf.js +0 -789
- package/dist/panels-B6gRk4bf.js.map +0 -1
- package/dist/plugins-gbI7SBA6.js.map +0 -1
- package/dist/prompts-Pqc3JdW_.d.ts.map +0 -1
- package/dist/run-summary-BU_NgwUT.js +0 -269
- package/dist/run-summary-BU_NgwUT.js.map +0 -1
- package/dist/sandbox-BH0WQkXn.d.ts.map +0 -1
- package/dist/session/sqlite.js.map +0 -1
- package/dist/session-BqRP1hS7.js.map +0 -1
- package/dist/shell-path-h5czzllR.js +0 -1549
- package/dist/shell-path-h5czzllR.js.map +0 -1
- package/dist/skills-BC3dodWp.js.map +0 -1
- package/dist/src-CkNQKFKr.js.map +0 -1
- package/dist/todo-edits-UOwgxGKu.js +0 -528
- package/dist/todo-edits-UOwgxGKu.js.map +0 -1
- package/dist/tool-formatters-DoRLnfuD.d.ts +0 -759
- package/dist/tool-formatters-DoRLnfuD.d.ts.map +0 -1
- package/dist/transcript-anchors-BeudMbXx.d.ts +0 -1762
- package/dist/transcript-anchors-BeudMbXx.d.ts.map +0 -1
- package/dist/turn-operations-C8bMBDl_.d.ts +0 -1258
- package/dist/turn-operations-C8bMBDl_.d.ts.map +0 -1
- package/dist/turn-operations-DrbJlpq9.js.map +0 -1
- package/dist/types-CWgENVLY.js.map +0 -1
- package/dist/xai-CazjStOK.js.map +0 -1
|
@@ -1,759 +0,0 @@
|
|
|
1
|
-
import { Fd as SessionMeta, Hf as ModelInfo, Id as Settings, Ld as StreamEvent, Lf as ProviderAuth, Rf as ProviderKey, U_ as SessionTurn } from "./index-BgN1T3lk.js";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/chat/turn-selection.d.ts
|
|
5
|
-
/** Tools whose `tool-result` event is suppressed when `showEditDiffs` is on. */
|
|
6
|
-
declare const EDIT_TOOL_NAMES: ReadonlySet<string>;
|
|
7
|
-
/**
|
|
8
|
-
* Keep turn-selection mode alive after deleting its active row. Prefer the
|
|
9
|
-
* row that slides into the deleted index; at the tail, select the new last
|
|
10
|
-
* row. Returns null only when no selectable rows survive.
|
|
11
|
-
*/
|
|
12
|
-
declare function selectionAfterTurnRemoval(before: readonly string[], removedId: string, after: readonly string[]): string | null;
|
|
13
|
-
/**
|
|
14
|
-
* Recognize a tool-result body as carrying NON-success information so the
|
|
15
|
-
* renderer doesn't suppress it under `showEditDiffs`. Three categories:
|
|
16
|
-
*
|
|
17
|
-
* - `edit` → "Edit error: …"
|
|
18
|
-
* - `write_file` permission errors wrapped by the loop → "Tool failed: …"
|
|
19
|
-
* - `multi_edit` → legacy single-line error `multi_edit error: …`, OR
|
|
20
|
-
* a result carrying an `<edit-outcomes>…</edit-outcomes>` annotation
|
|
21
|
-
* block. The TUI only appends the annotation when at least one hunk
|
|
22
|
-
* was NOT applied, so its mere presence is the signal — the result
|
|
23
|
-
* body needs to stay visible next to the diff so the user can read
|
|
24
|
-
* denial / skip / failure reasons longer than the per-hunk badge.
|
|
25
|
-
* - Fully-denied gate emit (`[fully denied] <edit-outcomes>…`) likewise
|
|
26
|
-
* stays visible.
|
|
27
|
-
*
|
|
28
|
-
* Exported for unit-testability of the visibility matrix.
|
|
29
|
-
*/
|
|
30
|
-
declare function isEditErrorResult(text: string): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* `callId` prefix minted by the TUI's `!` bash mode (see `runBashCommand`
|
|
33
|
-
* in `src/tui/app.tsx`). The prefix is the durable signal — it survives
|
|
34
|
-
* persistence and replay — that a `shell` tool exchange was USER-initiated,
|
|
35
|
-
* so renderers can keep it visible even when the tool-display settings
|
|
36
|
-
* hide model-driven plumbing: the user typed the command and expects to
|
|
37
|
-
* see it and what it printed.
|
|
38
|
-
*/
|
|
39
|
-
declare const BASH_CALL_ID_PREFIX = "bash_";
|
|
40
|
-
/** Is this event a user-initiated `!` bash exchange (vs. a model-driven shell call)? */
|
|
41
|
-
declare function isUserBashEvent(event: Pick<StreamEvent, 'tool' | 'callId'>): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Retro-tag live `user-prompt` events with the id of their persisted turn.
|
|
44
|
-
*
|
|
45
|
-
* Live prompt echoes are appended to the stream BEFORE `agent.run()` mints
|
|
46
|
-
* and persists the user turn, so they carry no `turnId` — which makes them
|
|
47
|
-
* invisible to select-turn navigation, hover, and click (all keyed on
|
|
48
|
-
* `turnId`), while the SAME prompt becomes selectable after a session reload
|
|
49
|
-
* (replay tags every event). Hosts call this when the seeded turns land
|
|
50
|
-
* (e.g. the `session:turns` hook, which fires right after the prompt turn
|
|
51
|
-
* persists, before the first model turn).
|
|
52
|
-
*
|
|
53
|
-
* Matching rule, per prompt-bearing turn: the NEWEST `user-prompt` event
|
|
54
|
-
* that has no `turnId` yet and whose text equals one of the turn's text
|
|
55
|
-
* blocks — or the turn's `display` echo when the caller supplies one
|
|
56
|
-
* (run-minted prompt turns never carry `display` themselves; the TUI's
|
|
57
|
-
* command `runAgent` path injects the origin display onto a copy after the
|
|
58
|
-
* sub-run resolves, since the echo event's text is the short display line,
|
|
59
|
-
* not the full prompt). A prompt turn qualifies with at least one non-blank
|
|
60
|
-
* text block, OR — the attachment-only submit — with media blocks
|
|
61
|
-
* (document/image/audio/video) and no tool plumbing; the latter matches the
|
|
62
|
-
* newest untagged blank-text event that carries attachment chips. Tool-
|
|
63
|
-
* result-only user turns contribute nothing and synthetic loop-continue
|
|
64
|
-
* turns match no untagged event, so both fall through harmlessly.
|
|
65
|
-
*
|
|
66
|
-
* Pure — returns the SAME array instance when nothing matched, so hosts
|
|
67
|
-
* can cheaply skip a re-render.
|
|
68
|
-
*/
|
|
69
|
-
declare function retagUserPromptEvents(events: readonly StreamEvent[], appendedTurns: readonly SessionTurn[]): readonly StreamEvent[];
|
|
70
|
-
/**
|
|
71
|
-
* Reduce persisted turns to the prompt refs the retag needs, dropping
|
|
72
|
-
* non-prompt turns (assistant, tool results) entirely.
|
|
73
|
-
*
|
|
74
|
-
* Shared by the in-process path and the daemon broadcast so both select the
|
|
75
|
-
* same turns as "prompts" — a divergence here would make a prompt selectable
|
|
76
|
-
* on one surface and not the other.
|
|
77
|
-
*/
|
|
78
|
-
declare function promptTurnRefs(turns: readonly SessionTurn[]): PromptTurnRef[];
|
|
79
|
-
/**
|
|
80
|
-
* The minimum a prompt turn must carry to be matched against its live echo.
|
|
81
|
-
*
|
|
82
|
-
* Exists because the daemon has to send this over a wire: a full `SessionTurn`
|
|
83
|
-
* carries every content block, including base64 image and document payloads,
|
|
84
|
-
* which would be megabytes per prompt to ship for the sake of attaching an id.
|
|
85
|
-
*/
|
|
86
|
-
interface PromptTurnRef {
|
|
87
|
-
id: string;
|
|
88
|
-
/** Text blocks plus the `display` override, if any. */
|
|
89
|
-
texts: readonly string[];
|
|
90
|
-
attachmentOnly: boolean;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Attach persisted turn ids to the live `user-prompt` events they correspond
|
|
94
|
-
* to, so a just-sent prompt becomes selectable (hover, click, edit, delete)
|
|
95
|
-
* without waiting for a session reload.
|
|
96
|
-
*
|
|
97
|
-
* Matching is newest-first and one-to-one: identical prompt text sent twice
|
|
98
|
-
* must bind to two different turns, so each ref consumes exactly one untagged
|
|
99
|
-
* event.
|
|
100
|
-
*/
|
|
101
|
-
declare function retagUserPromptEventsFromRefs(events: readonly StreamEvent[], refs: readonly PromptTurnRef[]): readonly StreamEvent[];
|
|
102
|
-
/**
|
|
103
|
-
* Per-event visibility — filters honor user toggles and the
|
|
104
|
-
* `hideSubagentOutput` setting. When subagent output is hidden:
|
|
105
|
-
* - Child-agent events are filtered down to the `spawn-start` /
|
|
106
|
-
* `spawn-end` markers so the user still sees "🌱 working… 🌳 done".
|
|
107
|
-
* - The parent's `tool-result` for `spawn` is hidden too. Its body
|
|
108
|
-
* duplicates `spawn-end`'s stats line *and* the parent's next
|
|
109
|
-
* markdown turn; showing it again produces an extra
|
|
110
|
-
* `┃ [sub-agent child-1] Completed …` block users just want gone.
|
|
111
|
-
*
|
|
112
|
-
* Renderer-agnostic — returns plain `boolean` so TUI / GUI consumers
|
|
113
|
-
* can filter events identically.
|
|
114
|
-
*/
|
|
115
|
-
/** `notice.label` the host stamps on prompt-cache break/expiry rows (`host/engine.ts`). */
|
|
116
|
-
declare const CACHE_NOTICE_LABEL = "cache";
|
|
117
|
-
declare function isVisible(event: StreamEvent, settings: Settings): boolean;
|
|
118
|
-
/**
|
|
119
|
-
* Build the `resultTurnId → owningAssistantTurnId` map used by the select-
|
|
120
|
-
* turn mode to coalesce a tool-call's surrounding turns into ONE navigation
|
|
121
|
-
* stop.
|
|
122
|
-
*
|
|
123
|
-
* Protocol shape: every `tool_call` block in an assistant turn is closed by
|
|
124
|
-
* a matching `tool_result` block in the *next* user turn (the agent loop's
|
|
125
|
-
* history validator depends on this). When the next user turn's only events
|
|
126
|
-
* are `tool-result`s — i.e. it's pure plumbing for the prior assistant
|
|
127
|
-
* turn — we map it back to that assistant turn here. The select-turn nav
|
|
128
|
-
* index ({@link selectableTurnIds}) skips owned turns, and the renderer's
|
|
129
|
-
* highlight gate ({@link isTurnHighlighted}) extends the selection accent
|
|
130
|
-
* from the assistant turn to the events of any turn it owns. Net effect:
|
|
131
|
-
*
|
|
132
|
-
* - Navigation never lands the cursor on a result-only turn whose own
|
|
133
|
-
* events may be hidden by `showToolResults: false` — the cursor
|
|
134
|
-
* wouldn't be visible.
|
|
135
|
-
* - Selecting an assistant turn highlights the call AND its result as
|
|
136
|
-
* one unit, matching the user's mental model of "one message".
|
|
137
|
-
*
|
|
138
|
-
* Owner-lookup is conservative: result-only turns with no matching prior
|
|
139
|
-
* assistant turn (orphaned — usually because the parent was deleted)
|
|
140
|
-
* stay selectable so the user can act on them via the turn-details modal.
|
|
141
|
-
*
|
|
142
|
-
* Subagent (`childId` set) events are ignored — they live in a separate
|
|
143
|
-
* conversation tree.
|
|
144
|
-
*/
|
|
145
|
-
declare function turnSelectionOwnership(events: readonly StreamEvent[]): Map<string, string>;
|
|
146
|
-
/**
|
|
147
|
-
* Render-time check: should `event` paint with the selection accent?
|
|
148
|
-
*
|
|
149
|
-
* `true` when the event's own turn is selected, OR when the selected turn
|
|
150
|
-
* `owns` the event's turn via {@link turnSelectionOwnership} (the call and
|
|
151
|
-
* its tool-result rows highlight together). `false` when nothing is
|
|
152
|
-
* selected or the relationship doesn't apply.
|
|
153
|
-
*
|
|
154
|
-
* Pure. Renderer-agnostic — the TUI's `<Transcript>` uses it; a GUI's
|
|
155
|
-
* equivalent walks the same rule.
|
|
156
|
-
*/
|
|
157
|
-
declare function isTurnHighlighted(event: Pick<StreamEvent, 'turnId'>, selectedTurnId: string | null, ownership: ReadonlyMap<string, string>): boolean;
|
|
158
|
-
/**
|
|
159
|
-
* Deduplicated, in-order list of **parent-conversation** turn ids that appear
|
|
160
|
-
* in a rendered transcript — the navigation index for the TUI's select-turn
|
|
161
|
-
* mode. Three classes of turns are deliberately skipped:
|
|
162
|
-
*
|
|
163
|
-
* - **Subagent turns** (`childId` set). Nested execution detail; the
|
|
164
|
-
* user's mental model of a "message" is the conversational exchange,
|
|
165
|
-
* not each spawn turn. Also filtered out by `isVisible` under
|
|
166
|
-
* `hideSubagentOutput: true` — selecting them would highlight nothing.
|
|
167
|
-
* - **Result-only turns** — see {@link turnSelectionOwnership}. These get
|
|
168
|
-
* coalesced into the assistant turn that emitted their tool_calls.
|
|
169
|
-
* - **Settings-hidden turns** (when `settings` is supplied). A turn whose
|
|
170
|
-
* every event fails {@link isVisible} would render no rows — landing
|
|
171
|
-
* the cursor there hides it from the user entirely. The check is opt-
|
|
172
|
-
* in so SDK callers without a Settings object keep the legacy
|
|
173
|
-
* "everything visible" behavior.
|
|
174
|
-
*
|
|
175
|
-
* Synthetic events (separator, spawn-start, spawn-end) have no `turnId` and
|
|
176
|
-
* are skipped naturally.
|
|
177
|
-
*/
|
|
178
|
-
declare function selectableTurnIds(events: readonly StreamEvent[], settings?: Settings, visible?: (event: StreamEvent) => boolean): string[];
|
|
179
|
-
//#endregion
|
|
180
|
-
//#region src/chat/cred-keys.d.ts
|
|
181
|
-
/**
|
|
182
|
-
* Credential-file key arithmetic, split from `./credentials` so the rules can
|
|
183
|
-
* be enforced where credentials themselves must not be pulled in.
|
|
184
|
-
*
|
|
185
|
-
* `./credentials` reaches the provider registry (and through it the pi-ai
|
|
186
|
-
* factories) for `credKeyOf`; the extension loader — an edge entrypoint that
|
|
187
|
-
* validates descriptor keys at registration time — must stay clear of that
|
|
188
|
-
* graph. This module is string arithmetic with no imports.
|
|
189
|
-
*/
|
|
190
|
-
/**
|
|
191
|
-
* Separator between a provider's canonical key and a slot qualifier. Every
|
|
192
|
-
* non-canonical slot (`#alt`, `#account:N`) starts with it, so the character is
|
|
193
|
-
* reserved in descriptor credential keys outright.
|
|
194
|
-
*/
|
|
195
|
-
declare const CRED_KEY_SLOT_SEPARATOR = "#";
|
|
196
|
-
/**
|
|
197
|
-
* Reserved suffix marking a provider's SECOND credential slot.
|
|
198
|
-
*
|
|
199
|
-
* Not usable as (or as the tail of) a descriptor's credential key: `foo#alt`
|
|
200
|
-
* holds `foo`'s alternate credential, so a provider claiming that name would
|
|
201
|
-
* share storage with it.
|
|
202
|
-
*/
|
|
203
|
-
declare const ALTERNATE_CRED_KEY_SUFFIX = "#alt";
|
|
204
|
-
/**
|
|
205
|
-
* Reserved infix marking one of a provider's ADDITIONAL OAuth accounts:
|
|
206
|
-
* `foo#account:1`, `foo#account:2`, …
|
|
207
|
-
*/
|
|
208
|
-
declare const ACCOUNT_CRED_KEY_INFIX = "#account:";
|
|
209
|
-
/**
|
|
210
|
-
* File key holding a provider's second credential, when it has one of each kind.
|
|
211
|
-
*
|
|
212
|
-
* The canonical key always holds the credential the user prefers; this sibling
|
|
213
|
-
* holds the other. That one invariant is what makes preference selection free:
|
|
214
|
-
* every existing reader (`applyApiKeyEnv`, the harness provider factories)
|
|
215
|
-
* already resolves the canonical key, so "switch priority" is just moving two
|
|
216
|
-
* objects between two keys — no precedence flag to interpret, no resolution
|
|
217
|
-
* order to keep in sync across layers.
|
|
218
|
-
*
|
|
219
|
-
* A sibling key rather than a nested field because the canonical entry gets
|
|
220
|
-
* REPLACED wholesale on token refresh; anything nested inside it would be
|
|
221
|
-
* dropped by the next rotation. And older zidane versions look credentials up
|
|
222
|
-
* by `credKeyOf`, so a suffixed key is simply invisible to them — they read the
|
|
223
|
-
* preferred credential and behave exactly as before, which is why this needs no
|
|
224
|
-
* migration or schema version.
|
|
225
|
-
*/
|
|
226
|
-
declare function alternateCredKey(fileKey: string): string;
|
|
227
|
-
/**
|
|
228
|
-
* File key holding one of a provider's non-active OAuth accounts.
|
|
229
|
-
*
|
|
230
|
-
* Same sibling-key reasoning as {@link alternateCredKey}: the canonical key is
|
|
231
|
-
* the active one, so a provider with three OAuth grants stores the active one
|
|
232
|
-
* canonically and the other two under `#account:N`. `#alt` stays dedicated to
|
|
233
|
-
* the other-kind (API key) alternate so files written by builds that predate
|
|
234
|
-
* multi-account keep meaning the same thing.
|
|
235
|
-
*/
|
|
236
|
-
declare function accountCredKey(fileKey: string, n: number): string;
|
|
237
|
-
/** True when `key` is one of `fileKey`'s `#account:N` slots. */
|
|
238
|
-
declare function isAccountCredKey(fileKey: string, key: string): boolean;
|
|
239
|
-
/**
|
|
240
|
-
* Name shown for an OAuth account that was never given one.
|
|
241
|
-
*
|
|
242
|
-
* Also what a first OAuth login is stored under, so a second account has
|
|
243
|
-
* something to be told apart from. Pre-multi-account files hold unnamed
|
|
244
|
-
* grants; {@link oauthAccountLabel} makes them read the same.
|
|
245
|
-
*/
|
|
246
|
-
declare const DEFAULT_OAUTH_ACCOUNT_LABEL = "Default";
|
|
247
|
-
/** Trimmed user-given account name, or {@link DEFAULT_OAUTH_ACCOUNT_LABEL}. */
|
|
248
|
-
declare function oauthAccountLabel(credential: {
|
|
249
|
-
label?: unknown;
|
|
250
|
-
}): string;
|
|
251
|
-
/**
|
|
252
|
-
* True when a key claims a reserved slot namespace.
|
|
253
|
-
*
|
|
254
|
-
* Built-in keys are plain identifiers (`anthropic`, `openai-codex`), but
|
|
255
|
-
* `ProviderDescriptor.key` / `credentialFileKey` are open strings — so the
|
|
256
|
-
* reservation is checked, not assumed.
|
|
257
|
-
*/
|
|
258
|
-
declare function isReservedCredKey(fileKey: string): boolean;
|
|
259
|
-
//#endregion
|
|
260
|
-
//#region src/chat/daemon-health.d.ts
|
|
261
|
-
/**
|
|
262
|
-
* Daemon connection health — the one model behind the status dot in both
|
|
263
|
-
* clients' footers.
|
|
264
|
-
*
|
|
265
|
-
* Three states, because "connected: boolean" cannot express the one users
|
|
266
|
-
* actually want to see: a daemon that is being spawned or reconnected is not
|
|
267
|
-
* DOWN, and painting it red for the seconds that takes teaches people to
|
|
268
|
-
* ignore red. So:
|
|
269
|
-
*
|
|
270
|
-
* - `connected` — handshake done, signals live. green (accent)
|
|
271
|
-
* - `connecting` — spawning / reconnecting / first attempt. amber (warn)
|
|
272
|
-
* - `disconnected` — reachable daemon absent, last attempt failed. red (error)
|
|
273
|
-
*
|
|
274
|
-
* Tones are theme SLOTS, not colors, so the dot recolors with the palette on
|
|
275
|
-
* both surfaces. Node-free; re-exported from `zidane/chat/pure`.
|
|
276
|
-
*/
|
|
277
|
-
type DaemonHealth = 'connected' | 'connecting' | 'disconnected';
|
|
278
|
-
type DaemonHealthTone = 'accent' | 'warn' | 'error';
|
|
279
|
-
interface DaemonHealthStyle {
|
|
280
|
-
tone: DaemonHealthTone;
|
|
281
|
-
/** Tooltip / accessibility text. The dot itself carries no words. */
|
|
282
|
-
label: string;
|
|
283
|
-
}
|
|
284
|
-
declare const DAEMON_HEALTH_GLYPH = "\u25CF";
|
|
285
|
-
declare const DAEMON_HEALTH_STYLE: Readonly<Record<DaemonHealth, DaemonHealthStyle>>;
|
|
286
|
-
//#endregion
|
|
287
|
-
//#region src/chat/safe-mode-context.d.ts
|
|
288
|
-
/**
|
|
289
|
-
* Outcome of an approval prompt. Four bulk decisions match the original
|
|
290
|
-
* single-edit modal contract; `partial` is the multi-edit branch — the
|
|
291
|
-
* user accepted a subset of an `edit` / `multi_edit` / `write_file` call.
|
|
292
|
-
*
|
|
293
|
-
* `partial.mask` is 1:1 with the call's hunks (in input order): `true`
|
|
294
|
-
* means apply, `false` means deny. The gate handler walks the mask to
|
|
295
|
-
* build per-hunk outcomes; the TUI rebinds `ctx.input.edits` to the
|
|
296
|
-
* approved subset and the renderer reconstructs the full per-hunk view
|
|
297
|
-
* from the `<edit-outcomes>` annotation appended to the tool result.
|
|
298
|
-
*/
|
|
299
|
-
type ApprovalDecision = 'accept-once' | 'accept-session' | 'accept-safelist' | 'deny' | {
|
|
300
|
-
kind: 'partial';
|
|
301
|
-
mask: readonly boolean[];
|
|
302
|
-
};
|
|
303
|
-
/**
|
|
304
|
-
* Identifies the caller behind an approval prompt — the parent agent or
|
|
305
|
-
* a specific subagent (`child-N`). The modal's right-side title pins the
|
|
306
|
-
* label so the user knows which agent issued the call when subagents
|
|
307
|
-
* bubble their gates up through the parent's hook bus.
|
|
308
|
-
*/
|
|
309
|
-
type ApprovalOriginator = {
|
|
310
|
-
kind: 'parent';
|
|
311
|
-
} | {
|
|
312
|
-
kind: 'child';
|
|
313
|
-
label: string;
|
|
314
|
-
};
|
|
315
|
-
interface ApprovalRequest {
|
|
316
|
-
id: string;
|
|
317
|
-
tool: string;
|
|
318
|
-
input: Record<string, unknown>;
|
|
319
|
-
resolve: (decision: ApprovalDecision) => void;
|
|
320
|
-
/** Caller attribution. Absent ≡ `{ kind: 'parent' }`. */
|
|
321
|
-
originator?: ApprovalOriginator;
|
|
322
|
-
/**
|
|
323
|
-
* Cross-window correlation id (the daemon's approval request id) for
|
|
324
|
-
* entries surfaced by the daemon runtime. Lets `dropByCorrelation`
|
|
325
|
-
* retract this entry when ANOTHER window resolves the same shared
|
|
326
|
-
* approval, without re-sending a decision. Absent for local-runtime
|
|
327
|
-
* approvals.
|
|
328
|
-
*/
|
|
329
|
-
correlationId?: string;
|
|
330
|
-
}
|
|
331
|
-
/** Function signature consumed by `tool:gate` handlers + the child-tool wrap. */
|
|
332
|
-
type RequestApproval = (tool: string, input: Record<string, unknown>, originator?: ApprovalOriginator, correlationId?: string) => Promise<ApprovalDecision>;
|
|
333
|
-
interface SafeModeActions {
|
|
334
|
-
/** Request a decision; resolves once the user picks. */
|
|
335
|
-
requestApproval: RequestApproval;
|
|
336
|
-
/** Resolve the head and shift the queue forward. */
|
|
337
|
-
resolveHead: (decision: ApprovalDecision) => void;
|
|
338
|
-
/** Resolve all pending with `deny`. Used on abort / hard exit. */
|
|
339
|
-
denyAll: () => void;
|
|
340
|
-
/**
|
|
341
|
-
* Remove the entry whose `correlationId` matches, WITHOUT resolving it
|
|
342
|
-
* (the daemon already did, in another window). No-op when absent.
|
|
343
|
-
*/
|
|
344
|
-
dropByCorrelation: (correlationId: string) => void;
|
|
345
|
-
}
|
|
346
|
-
/**
|
|
347
|
-
* Owns the queue + actions. Splits the value across two contexts so a queue
|
|
348
|
-
* change doesn't invalidate every callback memo that closes over the actions.
|
|
349
|
-
*/
|
|
350
|
-
declare function SafeModeProvider({
|
|
351
|
-
children
|
|
352
|
-
}: {
|
|
353
|
-
children: ReactNode;
|
|
354
|
-
}): import("react").JSX.Element;
|
|
355
|
-
declare function useSafeModeQueue(): readonly ApprovalRequest[];
|
|
356
|
-
declare function useSafeModeActions(): SafeModeActions;
|
|
357
|
-
//#endregion
|
|
358
|
-
//#region src/chat/history-search.d.ts
|
|
359
|
-
interface HighlightRange {
|
|
360
|
-
start: number;
|
|
361
|
-
end: number;
|
|
362
|
-
}
|
|
363
|
-
interface HighlightSegment {
|
|
364
|
-
text: string;
|
|
365
|
-
highlighted: boolean;
|
|
366
|
-
}
|
|
367
|
-
interface SearchExcerpt {
|
|
368
|
-
text: string;
|
|
369
|
-
highlighted: HighlightRange[];
|
|
370
|
-
}
|
|
371
|
-
interface SearchTurnMatch {
|
|
372
|
-
turn: SessionTurn;
|
|
373
|
-
text: string;
|
|
374
|
-
highlighted: HighlightRange[];
|
|
375
|
-
excerpts: SearchExcerpt[];
|
|
376
|
-
score: number;
|
|
377
|
-
matchKind: 'exact-phrase' | 'exact-terms' | 'fuzzy';
|
|
378
|
-
}
|
|
379
|
-
type SearchTurnResult = SearchTurnMatch;
|
|
380
|
-
interface SearchSessionResult {
|
|
381
|
-
id: string;
|
|
382
|
-
score: number;
|
|
383
|
-
matchKind: 'exact-phrase' | 'exact-terms' | 'fuzzy';
|
|
384
|
-
turn: SessionTurn;
|
|
385
|
-
text: string;
|
|
386
|
-
highlighted: HighlightRange[];
|
|
387
|
-
excerpts: SearchExcerpt[];
|
|
388
|
-
}
|
|
389
|
-
interface SessionSearchExcerpt extends SearchExcerpt {
|
|
390
|
-
turnId: string;
|
|
391
|
-
role: SessionTurn['role'];
|
|
392
|
-
}
|
|
393
|
-
/** Aggregated row-level match used by the conversations list. */
|
|
394
|
-
interface SessionHistoryMatch {
|
|
395
|
-
score: number;
|
|
396
|
-
matchedTurnIds: string[];
|
|
397
|
-
excerpts: SessionSearchExcerpt[];
|
|
398
|
-
}
|
|
399
|
-
interface IndexedSearchTurn {
|
|
400
|
-
turn: SessionTurn;
|
|
401
|
-
/** Attachment/base64-free text shown in search results. */
|
|
402
|
-
text: string;
|
|
403
|
-
/** Pre-normalized once, reused for every query. */
|
|
404
|
-
lowerText: string;
|
|
405
|
-
}
|
|
406
|
-
interface SessionSearchIndex {
|
|
407
|
-
turns: IndexedSearchTurn[];
|
|
408
|
-
}
|
|
409
|
-
declare function buildSessionSearchIndex(turns: readonly SessionTurn[]): SessionSearchIndex;
|
|
410
|
-
/** Yielding index builder for TUI callers — never monopolizes a frame. */
|
|
411
|
-
declare function buildSessionSearchIndexAsync(turns: readonly SessionTurn[], options?: {
|
|
412
|
-
yieldEvery?: number;
|
|
413
|
-
onProgress?: (indexed: number, total: number) => void;
|
|
414
|
-
signal?: AbortSignal;
|
|
415
|
-
}): Promise<SessionSearchIndex>;
|
|
416
|
-
declare function searchSessionIndex(index: SessionSearchIndex, query: string, limit?: number): SearchTurnMatch[];
|
|
417
|
-
/** Yielding matcher for very large indexes; progress is checked per chunk. */
|
|
418
|
-
declare function searchSessionIndexAsync(index: SessionSearchIndex, query: string, options?: {
|
|
419
|
-
limit?: number;
|
|
420
|
-
yieldEvery?: number;
|
|
421
|
-
onProgress?: (searched: number, total: number) => void;
|
|
422
|
-
signal?: AbortSignal;
|
|
423
|
-
}): Promise<SearchTurnMatch[]>;
|
|
424
|
-
declare function searchTurns(turns: readonly SessionTurn[], query: string, limit?: number): SearchTurnMatch[];
|
|
425
|
-
declare function searchSessionTurns(turns: readonly SessionTurn[], query: string, maxExcerpts?: number): SearchSessionResult[];
|
|
426
|
-
declare function searchSessionHistory(turns: readonly SessionTurn[], query: string, maxExcerpts?: number): SessionHistoryMatch | null;
|
|
427
|
-
declare function searchSessionHistoryIndex(index: SessionSearchIndex, query: string, maxExcerpts?: number): SessionHistoryMatch | null;
|
|
428
|
-
declare function searchSessionHistoryIndexAsync(index: SessionSearchIndex, query: string, maxExcerpts?: number, onProgress?: (searched: number, total: number) => void, signal?: AbortSignal): Promise<SessionHistoryMatch | null>;
|
|
429
|
-
declare function filterSessionSearchCatalog(sessions: readonly SessionMeta[], query: string, contentMatches: ReadonlyMap<string, SessionHistoryMatch>): SessionMeta[];
|
|
430
|
-
declare function searchHighlightRanges(text: string, query: string): HighlightRange[];
|
|
431
|
-
declare function highlightSegments(text: string, ranges: readonly HighlightRange[]): HighlightSegment[];
|
|
432
|
-
/**
|
|
433
|
-
* Search-specific serializer. Unlike `turnAsText`, it never serializes media,
|
|
434
|
-
* document attachments, encrypted reasoning, or base64-looking payloads.
|
|
435
|
-
*/
|
|
436
|
-
declare function searchableTurnText(turn: SessionTurn): string;
|
|
437
|
-
//#endregion
|
|
438
|
-
//#region src/chat/markdown-segments.d.ts
|
|
439
|
-
/**
|
|
440
|
-
* One block returned by {@link splitMarkdownCodeBlocks}. Prose segments
|
|
441
|
-
* carry their original markdown (including blank lines that bracketed
|
|
442
|
-
* the fence) so the surrounding paragraph spacing stays faithful to the
|
|
443
|
-
* original input. Code segments carry the raw body — fence markers and
|
|
444
|
-
* info-string stripped — so a "copy code" action lands what the user
|
|
445
|
-
* actually sees, byte-for-byte.
|
|
446
|
-
*/
|
|
447
|
-
interface MarkdownSegment {
|
|
448
|
-
kind: 'prose' | 'code';
|
|
449
|
-
content: string;
|
|
450
|
-
/** Info-string (e.g. `ts`, `python`). Empty when the fence had none. */
|
|
451
|
-
lang?: string;
|
|
452
|
-
/**
|
|
453
|
-
* `true` on a code segment whose closing fence hasn't arrived yet —
|
|
454
|
-
* i.e. the trailing block during streaming. Consumers can render this
|
|
455
|
-
* in "streaming" mode (no copy affordance, partial-highlight pipeline)
|
|
456
|
-
* until the closer lands and it flips to a regular closed segment.
|
|
457
|
-
*/
|
|
458
|
-
open?: boolean;
|
|
459
|
-
}
|
|
460
|
-
/**
|
|
461
|
-
* Split markdown text into alternating prose / fenced-code segments.
|
|
462
|
-
*
|
|
463
|
-
* Recognizes both ` ``` ` and `~~~` fences, with arbitrary length ≥ 3,
|
|
464
|
-
* matching CommonMark's "fence indicator must be at least as long to
|
|
465
|
-
* close" rule. Info-strings (the bit after the opening fence) are kept
|
|
466
|
-
* as the `lang` hint; any trailing whitespace is trimmed. Closing
|
|
467
|
-
* fences are detected on a line of their own (whitespace tolerated).
|
|
468
|
-
*
|
|
469
|
-
* Unclosed fences fall back to emitting the would-be-code body as a
|
|
470
|
-
* trailing prose segment so no content is dropped — finalized markdown
|
|
471
|
-
* isn't expected to ship one, but the fallback keeps the renderer
|
|
472
|
-
* truthful when the model produces malformed output.
|
|
473
|
-
*
|
|
474
|
-
* Exported for unit tests.
|
|
475
|
-
*/
|
|
476
|
-
declare function splitMarkdownCodeBlocks(text: string): MarkdownSegment[];
|
|
477
|
-
/**
|
|
478
|
-
* Lift indented fenced code blocks to column 0 while preserving the code
|
|
479
|
-
* body's relative indentation.
|
|
480
|
-
*
|
|
481
|
-
* OpenTUI's markdown renderNode hook only receives top-level code tokens.
|
|
482
|
-
* A common assistant shape is:
|
|
483
|
-
*
|
|
484
|
-
* - Run this:
|
|
485
|
-
* ```bash
|
|
486
|
-
* command
|
|
487
|
-
* ```
|
|
488
|
-
*
|
|
489
|
-
* Marked parses that as code inside a list token, so the TUI loses the
|
|
490
|
-
* code-panel wrapper and copy affordance. Normalizing just the fence's list
|
|
491
|
-
* indentation keeps the prose readable while routing the snippet through
|
|
492
|
-
* the same top-level renderer as ordinary fences.
|
|
493
|
-
*/
|
|
494
|
-
declare function normalizeMarkdownCodeFences(text: string): string;
|
|
495
|
-
/**
|
|
496
|
-
* Default per-chunk target for {@link chunkMarkdownForRender}. Chosen from
|
|
497
|
-
* measurement: marked's lexer (which OpenTUI's `<markdown>` runs
|
|
498
|
-
* internally) is O(n²) over paragraph-heavy input — ~500ms at 64KiB,
|
|
499
|
-
* ~2s at 128KiB, ~6s at 256KiB on an M-series laptop — while staying
|
|
500
|
-
* comfortably in the linear zone below ~32KiB (≤ ~200ms). Chunking a
|
|
501
|
-
* large document into ≤24KiB pieces keeps the total render linear in
|
|
502
|
-
* document size with a small constant.
|
|
503
|
-
*/
|
|
504
|
-
declare const MARKDOWN_RENDER_CHUNK_TARGET_BYTES = 24576;
|
|
505
|
-
/**
|
|
506
|
-
* Split a large markdown document into render-safe chunks at blank-line
|
|
507
|
-
* boundaries outside code fences, each roughly `targetBytes` long.
|
|
508
|
-
*
|
|
509
|
-
* Rendering the chunks as SIBLING markdown renderables (with a one-row
|
|
510
|
-
* gap standing in for the consumed blank line) is visually equivalent to
|
|
511
|
-
* one renderable, but sidesteps the quadratic lexer cost documented on
|
|
512
|
-
* {@link MARKDOWN_RENDER_CHUNK_TARGET_BYTES}. Chunk boundaries are
|
|
513
|
-
* prefix-stable: appending text (streaming) can only ever change the
|
|
514
|
-
* LAST chunk, so keyed-by-index consumers reconcile cheaply.
|
|
515
|
-
*
|
|
516
|
-
* Returns `[text]` untouched for anything at or under the target.
|
|
517
|
-
*/
|
|
518
|
-
declare function chunkMarkdownForRender(text: string, targetBytes?: number): string[];
|
|
519
|
-
//#endregion
|
|
520
|
-
//#region src/chat/model-catalog.d.ts
|
|
521
|
-
/** A model entry as displayed in the cross-provider picker. */
|
|
522
|
-
interface CatalogEntry {
|
|
523
|
-
providerKey: ProviderKey;
|
|
524
|
-
providerLabel: string;
|
|
525
|
-
model: ModelInfo;
|
|
526
|
-
/**
|
|
527
|
-
* The provider does not (or no longer) list this model: the entry was
|
|
528
|
-
* synthesized from an `include` pair, so `model` is a stub carrying the id
|
|
529
|
-
* and nothing else. Renderers should say so rather than print stub
|
|
530
|
-
* metadata as if it were real.
|
|
531
|
-
*/
|
|
532
|
-
offCatalog?: boolean;
|
|
533
|
-
/**
|
|
534
|
-
* Pre-computed lowercase corpus for substring search across the
|
|
535
|
-
* provider key, label, model id, and display name. Built once at
|
|
536
|
-
* catalog-assembly time so filtering on every keystroke is
|
|
537
|
-
* O(catalogSize × queryLength), not O(catalogSize × fieldCount ×
|
|
538
|
-
* lowercase-overhead × queryLength).
|
|
539
|
-
*/
|
|
540
|
-
searchCorpus: string;
|
|
541
|
-
}
|
|
542
|
-
/**
|
|
543
|
-
* Build the unified catalog from a list of available providers.
|
|
544
|
-
*
|
|
545
|
-
* Provider order is preserved (callers typically pass the picker order
|
|
546
|
-
* — alphabetical, auth-detection order, etc.); model order inside each
|
|
547
|
-
* provider matches whatever `modelsFor` returns. The current selection
|
|
548
|
-
* (when set) is bubbled to the top of its provider's section so it
|
|
549
|
-
* shows first without disturbing relative ordering elsewhere.
|
|
550
|
-
*
|
|
551
|
-
* `modelsFor` is injected (not imported from `./providers`) so the same
|
|
552
|
-
* helper works with hosts that supply their own model resolver via
|
|
553
|
-
* `ResolvedConfig.modelsFor`.
|
|
554
|
-
*
|
|
555
|
-
* `include` guarantees a pair is listed even when the provider stopped
|
|
556
|
-
* serving it. Persisted picks outlive catalogs (a provider retires an id, a
|
|
557
|
-
* user typed one by hand), and an entry that isn't in the list can't be
|
|
558
|
-
* selected away from, and the picker would keep re-persisting it. Synthesized
|
|
559
|
-
* entries carry `offCatalog: true` and a stub `ModelInfo`.
|
|
560
|
-
*/
|
|
561
|
-
declare function buildModelCatalog(opts: {
|
|
562
|
-
providers: readonly ProviderAuth[];
|
|
563
|
-
modelsFor: (key: ProviderKey) => readonly ModelInfo[]; /** Optional currently-selected pair — promoted to the top of its provider group. */
|
|
564
|
-
current?: {
|
|
565
|
-
providerKey: ProviderKey;
|
|
566
|
-
modelId: string;
|
|
567
|
-
} | null; /** Pairs that must appear even if unserved, e.g. the active pick + fallback chain. */
|
|
568
|
-
include?: readonly {
|
|
569
|
-
providerKey: ProviderKey;
|
|
570
|
-
modelId: string;
|
|
571
|
-
}[];
|
|
572
|
-
}): CatalogEntry[];
|
|
573
|
-
/**
|
|
574
|
-
* Filter `catalog` by a user query. Empty / whitespace-only queries
|
|
575
|
-
* pass everything through unchanged (`O(1)` short-circuit). Multi-term
|
|
576
|
-
* queries (space-separated) require EVERY term to appear somewhere in
|
|
577
|
-
* the entry's search corpus — so `"claude opus"` matches `claude-opus-4`
|
|
578
|
-
* regardless of how the words are interleaved with provider names.
|
|
579
|
-
*
|
|
580
|
-
* Match is case-insensitive (the corpus is pre-lowercased; the query
|
|
581
|
-
* is lowercased once per call).
|
|
582
|
-
*/
|
|
583
|
-
declare function filterModelCatalog(catalog: readonly CatalogEntry[], query: string): CatalogEntry[];
|
|
584
|
-
/**
|
|
585
|
-
* Find a catalog entry's index by its `{providerKey, modelId}` tuple.
|
|
586
|
-
* Returns `-1` when not present. Useful when re-rendering the picker
|
|
587
|
-
* (a query just narrowed the list, where did the selection land?).
|
|
588
|
-
*/
|
|
589
|
-
declare function indexOfEntry(catalog: readonly CatalogEntry[], target: {
|
|
590
|
-
providerKey: ProviderKey;
|
|
591
|
-
modelId: string;
|
|
592
|
-
} | null | undefined): number;
|
|
593
|
-
/**
|
|
594
|
-
* Read a query that matched nothing as "use this model id anyway".
|
|
595
|
-
*
|
|
596
|
-
* A bare id is meaningless without a provider, so the first term is checked
|
|
597
|
-
* against every provider's key and label (case-insensitive): `xai grok-9` and
|
|
598
|
-
* `Anthropic claude-next` name their provider explicitly, anything else is
|
|
599
|
-
* attributed to `fallbackProviderKey` (the picker's current pick). Returns
|
|
600
|
-
* `null` when nothing usable is left, including when the whole query is just a
|
|
601
|
-
* provider name.
|
|
602
|
-
*/
|
|
603
|
-
declare function parseCustomModelQuery(query: string, providers: readonly Pick<ProviderAuth, 'key' | 'label'>[], fallbackProviderKey: ProviderKey | null): {
|
|
604
|
-
providerKey: ProviderKey;
|
|
605
|
-
providerLabel: string;
|
|
606
|
-
modelId: string;
|
|
607
|
-
} | null;
|
|
608
|
-
//#endregion
|
|
609
|
-
//#region src/chat/prompt-segments.d.ts
|
|
610
|
-
/**
|
|
611
|
-
* Pure string + reference math for rendering a submitted prompt with chip
|
|
612
|
-
* pills around completion references. Renderer-agnostic — the TUI walks
|
|
613
|
-
* the segments into OpenTUI `<text>` nodes, a GUI walks them into JSX
|
|
614
|
-
* spans + `<span class="chip">` pills. No layout engine assumptions.
|
|
615
|
-
*/
|
|
616
|
-
/**
|
|
617
|
-
* Highlight span — half-open `[start, end)` over the source string.
|
|
618
|
-
*
|
|
619
|
-
* Offsets are JS string indices (UTF-16 code units) — the same convention used
|
|
620
|
-
* everywhere else in the chat layer (`text[i]`, `m.index`, `String.slice`).
|
|
621
|
-
* Surrogate pairs that straddle a span boundary would render malformed, but
|
|
622
|
-
* realistic prompts in this surface (terminal text + ASCII triggers) keep that
|
|
623
|
-
* risk theoretical; callers feeding emoji-heavy content should normalize to
|
|
624
|
-
* codepoint walks upstream.
|
|
625
|
-
*/
|
|
626
|
-
interface PromptSegmentRef {
|
|
627
|
-
start: number;
|
|
628
|
-
end: number;
|
|
629
|
-
/** Provider id tagging this span (`'skills'`, `'files'`, …). Free-form. */
|
|
630
|
-
providerId: string;
|
|
631
|
-
}
|
|
632
|
-
/**
|
|
633
|
-
* One atomic unit emitted by {@link splitPromptSegments}. Plain segments
|
|
634
|
-
* are word-sized so wraps land cleanly between words; chip segments
|
|
635
|
-
* carry the source `providerId` (`'skills'`, `'files'`, …) so renderers
|
|
636
|
-
* can pick per-kind colors without re-walking the ref list.
|
|
637
|
-
*/
|
|
638
|
-
type PromptSegment = {
|
|
639
|
-
kind: 'plain';
|
|
640
|
-
text: string;
|
|
641
|
-
} | {
|
|
642
|
-
kind: 'chip';
|
|
643
|
-
text: string;
|
|
644
|
-
providerId: string;
|
|
645
|
-
};
|
|
646
|
-
/**
|
|
647
|
-
* Split a prompt buffer into word-sized atomic segments suitable for a
|
|
648
|
-
* flex-row + flex-wrap renderer (TUI) or a `display: inline` flow with
|
|
649
|
-
* inline-block chips (GUI). Each chip becomes one segment (atomic —
|
|
650
|
-
* never broken across rows); each plain run is split into "word +
|
|
651
|
-
* trailing space" units so wraps land at clean word boundaries.
|
|
652
|
-
*
|
|
653
|
-
* Robust to:
|
|
654
|
-
* - Overlapping refs — sorted by start; later refs that overlap are
|
|
655
|
-
* dropped via the first-wins rule.
|
|
656
|
-
* - Out-of-bounds refs — dropped entirely when `end > text.length` or
|
|
657
|
-
* `start >= text.length`. Partial clipping would silently truncate
|
|
658
|
-
* a chip's label; the caller is in a better position to surface the
|
|
659
|
-
* mismatch (typically a stale `refs` array referencing a previous text).
|
|
660
|
-
* - Whitespace-only plain runs — emitted as their own plain segment
|
|
661
|
-
* so chip-adjacent-to-chip cases keep the original spacing.
|
|
662
|
-
*
|
|
663
|
-
* Word splitter rationale: `\S+\s*` keeps trailing whitespace attached
|
|
664
|
-
* to its preceding word so wrap boundaries land between words (cleanly).
|
|
665
|
-
* A leading-whitespace-only segment is captured by `\s+` so we don't
|
|
666
|
-
* drop it entirely when the plain run starts with a space.
|
|
667
|
-
*/
|
|
668
|
-
declare function splitPromptSegments(text: string, refs: readonly PromptSegmentRef[]): PromptSegment[];
|
|
669
|
-
//#endregion
|
|
670
|
-
//#region src/chat/tool-formatters.d.ts
|
|
671
|
-
/**
|
|
672
|
-
* Per-tool display metadata + one-line formatters consumed by any
|
|
673
|
-
* surface that renders a `tool` event in `'formatted'` mode (see
|
|
674
|
-
* `Settings.toolCallDisplay`).
|
|
675
|
-
*
|
|
676
|
-
* Each native tool gets a curated entry — a `displayName` verb that
|
|
677
|
-
* reads in sentence case (e.g. "Read", "Shell") and a `format` callback
|
|
678
|
-
* that pulls the most informative bits out of the model's raw input to
|
|
679
|
-
* a single scannable line. Unknown tools (MCP servers, host-added
|
|
680
|
-
* tools, future zidane additions) fall back to {@link formatToolCall}
|
|
681
|
-
* returning `null` — the renderer then shows a minimal `↳ <name>` line.
|
|
682
|
-
*
|
|
683
|
-
* Renderer-agnostic: returns plain data (`{ target, meta }`) so the
|
|
684
|
-
* TUI's React/OpenTUI surface and any future GUI consumer can paint
|
|
685
|
-
* the same shape in their own style. Lives in `zidane/chat` because
|
|
686
|
-
* it has no rendering concerns; the TUI just consumes it.
|
|
687
|
-
*/
|
|
688
|
-
interface ToolFormatLine {
|
|
689
|
-
/**
|
|
690
|
-
* Primary target — typically a path, command, pattern, or
|
|
691
|
-
* task description. Renderer paints this in the model accent color
|
|
692
|
-
* so the eye lands on it first.
|
|
693
|
-
*/
|
|
694
|
-
target?: string;
|
|
695
|
-
/**
|
|
696
|
-
* Secondary annotations rendered after the target, joined with
|
|
697
|
-
* ` · ` separators. Use for line ranges (`L10-25`), limits, flags,
|
|
698
|
-
* or any short suffix that adds context without bloating the line.
|
|
699
|
-
*/
|
|
700
|
-
meta?: readonly string[];
|
|
701
|
-
/**
|
|
702
|
-
* Optional SECOND line — the payload behind the action (a prompt sent to
|
|
703
|
-
* another session). Renderers paint it dimmed under the header and clamp
|
|
704
|
-
* it (two lines in the GUI, one terminal row in the TUI); it is never
|
|
705
|
-
* squeezed into the header line, which stays single-line.
|
|
706
|
-
*/
|
|
707
|
-
detail?: string;
|
|
708
|
-
/**
|
|
709
|
-
* The session this call targets, when the tool addresses one. `target`
|
|
710
|
-
* carries the short id as a fallback; a renderer with the session list in
|
|
711
|
-
* scope shows the session's TITLE instead.
|
|
712
|
-
*/
|
|
713
|
-
sessionId?: string;
|
|
714
|
-
}
|
|
715
|
-
interface ToolDisplayMeta {
|
|
716
|
-
/**
|
|
717
|
-
* Title-case display verb (e.g. `Read`, `Shell`, `Edit`). When the
|
|
718
|
-
* label depends on an input field (e.g. `skills_use`'s
|
|
719
|
-
* `mode: 'activate' | 'deactivate'` → `Enable` / `Disable`), supply
|
|
720
|
-
* a function instead and read the field defensively. The function
|
|
721
|
-
* form is called whenever {@link displayNameFor} has the call's
|
|
722
|
-
* input in scope; callers without input fall back to the function's
|
|
723
|
-
* `input: undefined` branch, which should return a stable default.
|
|
724
|
-
*/
|
|
725
|
-
displayName: string | ((input: Record<string, unknown> | undefined) => string);
|
|
726
|
-
/**
|
|
727
|
-
* Pull a {@link ToolFormatLine} out of the raw model input. Returns
|
|
728
|
-
* `null` when the shape isn't what the tool expects (typed defensively
|
|
729
|
-
* — we never want a malformed call to crash the transcript).
|
|
730
|
-
*/
|
|
731
|
-
format: (input: Record<string, unknown>) => ToolFormatLine | null;
|
|
732
|
-
}
|
|
733
|
-
declare const TOOL_DISPLAY: Readonly<Record<string, ToolDisplayMeta>>;
|
|
734
|
-
/**
|
|
735
|
-
* Resolve the display verb for a tool. Native tools use their curated
|
|
736
|
-
* entry from {@link TOOL_DISPLAY}; everything else gets a sentence-case
|
|
737
|
-
* version of the raw name (`my_host_tool` → `My host tool`) so an MCP /
|
|
738
|
-
* host tool still reads cleanly in the transcript without shouting
|
|
739
|
-
* Title Case at every word.
|
|
740
|
-
*
|
|
741
|
-
* MCP convention: every tool surfaced by `mcp/connectMcpServers` is
|
|
742
|
-
* namespaced as `mcp_<server>_<tool>` (see `src/mcp/index.ts`). The
|
|
743
|
-
* `mcp_` prefix is plumbing — strip it before casing so the label
|
|
744
|
-
* reads as `Github create issue` instead of `Mcp github create issue`.
|
|
745
|
-
* The server name leads, which doubles as a free visual grouping
|
|
746
|
-
* affordance ("everything starting with `Github` came from the github
|
|
747
|
-
* MCP server").
|
|
748
|
-
*/
|
|
749
|
-
declare function displayNameFor(name: string, input?: Record<string, unknown>): string;
|
|
750
|
-
/**
|
|
751
|
-
* Run a tool's curated formatter and return the result, or `null` when
|
|
752
|
-
* no formatter is registered / the input shape doesn't match. Renderer
|
|
753
|
-
* decides what to do with `null` — typically: show `↳ <displayName>`
|
|
754
|
-
* with no target / meta tail.
|
|
755
|
-
*/
|
|
756
|
-
declare function formatToolCall(name: string, input: Record<string, unknown>): ToolFormatLine | null;
|
|
757
|
-
//#endregion
|
|
758
|
-
export { ACCOUNT_CRED_KEY_INFIX as $, filterSessionSearchCatalog as A, searchableTurnText as B, SearchSessionResult as C, SessionSearchIndex as D, SessionSearchExcerpt as E, searchSessionHistoryIndexAsync as F, SafeModeProvider as G, ApprovalRequest as H, searchSessionIndex as I, DAEMON_HEALTH_GLYPH as J, useSafeModeActions as K, searchSessionIndexAsync as L, searchHighlightRanges as M, searchSessionHistory as N, buildSessionSearchIndex as O, searchSessionHistoryIndex as P, DaemonHealthTone as Q, searchSessionTurns as R, SearchExcerpt as S, SessionHistoryMatch as T, RequestApproval as U, ApprovalDecision as V, SafeModeActions as W, DaemonHealth as X, DAEMON_HEALTH_STYLE as Y, DaemonHealthStyle as Z, normalizeMarkdownCodeFences as _, retagUserPromptEvents as _t, formatToolCall as a, isAccountCredKey as at, HighlightSegment as b, selectionAfterTurnRemoval as bt, splitPromptSegments as c, BASH_CALL_ID_PREFIX as ct, filterModelCatalog as d, PromptTurnRef as dt, ALTERNATE_CRED_KEY_SUFFIX as et, indexOfEntry as f, isEditErrorResult as ft, chunkMarkdownForRender as g, promptTurnRefs as gt, MarkdownSegment as h, isVisible as ht, displayNameFor as i, alternateCredKey as it, highlightSegments as j, buildSessionSearchIndexAsync as k, CatalogEntry as l, CACHE_NOTICE_LABEL as lt, MARKDOWN_RENDER_CHUNK_TARGET_BYTES as m, isUserBashEvent as mt, ToolDisplayMeta as n, DEFAULT_OAUTH_ACCOUNT_LABEL as nt, PromptSegment as o, isReservedCredKey as ot, parseCustomModelQuery as p, isTurnHighlighted as pt, useSafeModeQueue as q, ToolFormatLine as r, accountCredKey as rt, PromptSegmentRef as s, oauthAccountLabel as st, TOOL_DISPLAY as t, CRED_KEY_SLOT_SEPARATOR as tt, buildModelCatalog as u, EDIT_TOOL_NAMES as ut, splitMarkdownCodeBlocks as v, retagUserPromptEventsFromRefs as vt, SearchTurnResult as w, IndexedSearchTurn as x, turnSelectionOwnership as xt, HighlightRange as y, selectableTurnIds as yt, searchTurns as z };
|
|
759
|
-
//# sourceMappingURL=tool-formatters-DoRLnfuD.d.ts.map
|