@humain/humain-code 0.5.4 → 0.6.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 +170 -0
- package/dist/bundle/agent-monitor.js +1 -1
- package/dist/bundle/chunks/anthropic-messages-FGFIMZUF.js +66 -0
- package/dist/bundle/chunks/azure-openai-responses-6JNTC7KO.js +15 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +261 -237
- package/dist/bundle/chunks/chunk-2H3LUS62.js +1966 -0
- package/dist/bundle/chunks/{chunk-GEISZXXH.js → chunk-4ZBGTJJM.js} +1 -1
- package/dist/bundle/chunks/{chunk-QWXPGBAG.js → chunk-5JSLXC2A.js} +1 -1
- package/dist/bundle/chunks/{chunk-L2VKM23Q.js → chunk-6DE7LJKV.js} +21 -21
- package/dist/bundle/chunks/{chunk-V62QBESW.js → chunk-6E6RHNOU.js} +11 -10
- package/dist/bundle/chunks/chunk-7RZ5BS7U.js +2 -0
- package/dist/bundle/chunks/chunk-AHSNQWZU.js +24 -0
- package/dist/bundle/chunks/{chunk-UJLCKIMZ.js → chunk-AOH2O5CP.js} +3469 -3133
- package/dist/bundle/chunks/{chunk-ODJUBJK2.js → chunk-B7NJMF7B.js} +11 -11
- package/dist/bundle/chunks/chunk-BQ3TMEWD.js +7 -0
- package/dist/bundle/chunks/{chunk-KKCMWB63.js → chunk-C6VERWRZ.js} +1 -1
- package/dist/bundle/chunks/{chunk-CN3Q5UNB.js → chunk-CFHOPLW5.js} +658 -574
- package/dist/bundle/chunks/chunk-CVC2GV26.js +1986 -0
- package/dist/bundle/chunks/{chunk-DU6POZ7E.js → chunk-DHW3REC5.js} +1 -1
- package/dist/bundle/chunks/{chunk-UTNHGOFS.js → chunk-EDONIPUJ.js} +38 -38
- package/dist/bundle/chunks/{chunk-FO2NYB6O.js → chunk-FDGW5ZTG.js} +1147 -1110
- package/dist/bundle/chunks/{chunk-XQX7S3GM.js → chunk-GICL5V54.js} +1 -1
- package/dist/bundle/chunks/chunk-H7Y4QY7K.js +11 -0
- package/dist/bundle/chunks/chunk-HW6HMUXS.js +188 -0
- package/dist/bundle/chunks/chunk-I6AQOITY.js +53 -0
- package/dist/bundle/chunks/{chunk-ZI7TK7HM.js → chunk-IADQJFNH.js} +21 -17
- package/dist/bundle/chunks/chunk-J7AP2BUJ.js +3 -0
- package/dist/bundle/chunks/chunk-JFE52VSN.js +120 -0
- package/dist/bundle/chunks/{chunk-MIJHJNNQ.js → chunk-LDGCU6PD.js} +127 -3
- package/dist/bundle/chunks/{chunk-PS7DGA7B.js → chunk-M4CHQBAI.js} +1 -1
- package/dist/bundle/chunks/{chunk-YDBNMIA3.js → chunk-NN53K2QQ.js} +19 -1
- package/dist/bundle/chunks/{chunk-RTXDU3AA.js → chunk-ONR6Q3II.js} +255 -195
- package/dist/bundle/chunks/{chunk-Y3OPKKDR.js → chunk-P4P7OZ7R.js} +34 -32
- package/dist/bundle/chunks/{chunk-OZNC2W4B.js → chunk-PCTLFSQG.js} +444 -411
- package/dist/bundle/chunks/{chunk-YFBDR4IW.js → chunk-PNGNZXOI.js} +3 -3
- package/dist/bundle/chunks/{chunk-UDB6NI4G.js → chunk-RGUZULEE.js} +593 -481
- package/dist/bundle/chunks/chunk-RO5YPAJH.js +23 -0
- package/dist/bundle/chunks/{chunk-A6B2QMA7.js → chunk-RU7ADKA7.js} +176 -162
- package/dist/bundle/chunks/{chunk-JCXXRCP6.js → chunk-T3KDZFM4.js} +16 -16
- package/dist/bundle/chunks/{chunk-HT5YN3LX.js → chunk-TEOMXMW6.js} +3 -3
- package/dist/bundle/chunks/{chunk-HIZWUSPN.js → chunk-VEGJT52D.js} +77 -77
- package/dist/bundle/chunks/{chunk-IDU5BNNI.js → chunk-XMZGB3H4.js} +12 -3
- package/dist/bundle/chunks/chunk-YEPHPMQC.js +647 -0
- package/dist/bundle/chunks/{chunk-XA7CJAYH.js → chunk-YRUIJ5AH.js} +48 -42
- package/dist/bundle/chunks/{cli-ENEFJH2B.js → cli-BNCWK54K.js} +21 -17
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-T7TPP7SQ.js → cloudflare-workers-ai-system-one-KI6W3USX.js} +1 -1
- package/dist/bundle/chunks/codemode-worker.js +81 -75
- package/dist/bundle/chunks/compat-I5VPOXFT.js +13 -0
- package/dist/bundle/chunks/dist-J5IUPLMH.js +37 -0
- package/dist/bundle/chunks/{dist-RKNCFFGM.js → dist-SKBR3C7C.js} +720 -696
- package/dist/bundle/chunks/dist-TVRQXUY6.js +8 -0
- package/dist/bundle/chunks/{dist-cjs-HTASUQXQ.js → dist-cjs-2SKN226B.js} +77 -77
- package/dist/bundle/chunks/{easter-egg-3d-YOPLCOVW.js → easter-egg-3d-673VRP6Y.js} +1 -1
- package/dist/bundle/chunks/{esm-R6HJ4QEG.js → esm-WPALMLUO.js} +3 -3
- package/dist/bundle/chunks/{event-streams-BR2IL6C5.js → event-streams-7YGFEPBZ.js} +1 -1
- package/dist/bundle/chunks/{execute-2JXEKQ2X.js → execute-PIUR5MUV.js} +23 -23
- package/dist/bundle/chunks/{extract-OTCGZGTL.js → extract-4O5Z5725.js} +74 -71
- package/dist/bundle/chunks/github-copilot.js +50 -51
- package/dist/bundle/chunks/google-generative-ai-635YZEHN.js +22 -0
- package/dist/bundle/chunks/google-vertex-I3ZJ3SB2.js +26 -0
- package/dist/bundle/chunks/host-OQOEIWHK.js +2 -0
- package/dist/bundle/chunks/image-resize-worker.js +3 -2
- package/dist/bundle/chunks/kimi-coding.js +13 -14
- package/dist/bundle/chunks/{llama-cpp-classify-B3G57LVR.js → llama-cpp-classify-PP63BYDF.js} +1 -1
- package/dist/bundle/chunks/meta.js +10 -10
- package/dist/bundle/chunks/mistral-conversations-OKG5GKXR.js +42 -0
- package/dist/bundle/chunks/{node-VSA4ZN7D.js → node-UGQUSQE6.js} +1 -1
- package/dist/bundle/chunks/{node-SJPZTR4K.js → node-UNHECG4X.js} +168 -157
- package/dist/bundle/chunks/openai-codex-responses-6JYZIFT4.js +100 -0
- package/dist/bundle/chunks/openai-completions-YBNI6CAP.js +82 -0
- package/dist/bundle/chunks/{openai-decisions-WOWUC65P.js → openai-decisions-5G5YBFRQ.js} +1 -1
- package/dist/bundle/chunks/openai-responses-C3APJ6MK.js +27 -0
- package/dist/bundle/chunks/{openrouter-images-5K47HDAT.js → openrouter-images-FCJT7C7I.js} +2 -2
- package/dist/bundle/chunks/{pdfjs-EK6K7CXX.js → pdfjs-AKD6EBKN.js} +196 -175
- package/dist/bundle/chunks/pdfjs-decoders-OFXX4HDZ.js +2 -0
- package/dist/bundle/chunks/pdfjs-jbig2-TXR26KRI.js +278 -0
- package/dist/bundle/chunks/pdfjs-jbig2_nowasm_fallback-FH3KJM4H.js +326 -0
- package/dist/bundle/chunks/pdfjs-openjpeg-SKR7C34X.js +671 -0
- package/dist/bundle/chunks/pdfjs-openjpeg_nowasm_fallback-VUBL7UEE.js +974 -0
- package/dist/bundle/chunks/pi-messages-UHYZYEOC.js +25 -0
- package/dist/bundle/chunks/radius.js +8 -8
- package/dist/bundle/chunks/{runtime-K3F2QDQP.js → runtime-KE3HDSRT.js} +1 -1
- package/dist/bundle/chunks/{turndown.cjs-U7XOXH4O.js → turndown.cjs-WKGZX7NZ.js} +1 -1
- package/dist/bundle/chunks/{typesafe-system-one-43OCHGKP.js → typesafe-system-one-VYVAMWQV.js} +1 -1
- package/dist/bundle/chunks/{undici-EK3EUI2E.js → undici-C6S56CGI.js} +1 -1
- package/dist/bundle/chunks/virtual-modules-KDUZIB3W.js +23 -0
- package/dist/bundle/cli-runtime.js +3 -3
- package/dist/bundle/flow/package.json +5 -5
- package/dist/bundle/index.js +10 -10
- package/dist/bundle/rpc-entry.js +3 -3
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +9 -8
- package/dist/cli/args.js.map +1 -1
- package/dist/config.d.ts +12 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +29 -5
- package/dist/config.js.map +1 -1
- package/dist/coordination/adapter/tool.d.ts +8 -5
- package/dist/coordination/adapter/tool.d.ts.map +1 -1
- package/dist/coordination/adapter/tool.js +32 -6
- package/dist/coordination/adapter/tool.js.map +1 -1
- package/dist/coordination/client/client.d.ts.map +1 -1
- package/dist/coordination/client/client.js +19 -1
- package/dist/coordination/client/client.js.map +1 -1
- package/dist/core/agent-session-runtime.js +3 -3
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +23 -3
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +142 -39
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/anthropic-subscription-usage.d.ts +4 -0
- package/dist/core/anthropic-subscription-usage.d.ts.map +1 -1
- package/dist/core/anthropic-subscription-usage.js +71 -1
- package/dist/core/anthropic-subscription-usage.js.map +1 -1
- package/dist/core/bug-report.d.ts +4 -4
- package/dist/core/codex-reset.d.ts +45 -0
- package/dist/core/codex-reset.d.ts.map +1 -0
- package/dist/core/codex-reset.js +190 -0
- package/dist/core/codex-reset.js.map +1 -0
- package/dist/core/codex-usage.d.ts +4 -2
- package/dist/core/codex-usage.d.ts.map +1 -1
- package/dist/core/codex-usage.js +9 -4
- package/dist/core/codex-usage.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +3 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +25 -10
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +37 -3
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +274 -65
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/utils.d.ts +19 -6
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +49 -11
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/exec.d.ts +9 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +105 -61
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/template.css +9 -0
- package/dist/core/export-html/template.html +2 -0
- package/dist/core/export-html/template.js +200 -62
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +3 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +7 -6
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/pi-ai-extension-view.d.ts +19 -0
- package/dist/core/extensions/pi-ai-extension-view.d.ts.map +1 -0
- package/dist/core/extensions/pi-ai-extension-view.js +22 -0
- package/dist/core/extensions/pi-ai-extension-view.js.map +1 -0
- package/dist/core/extensions/types.d.ts +27 -4
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/virtual-modules.js +8 -7
- package/dist/core/extensions/virtual-modules.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts +7 -0
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +107 -0
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/keybindings.d.ts +56 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +14 -2
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +9 -4
- package/dist/core/mcp-servers.d.ts.map +1 -1
- package/dist/core/mcp-servers.js +15 -5
- package/dist/core/mcp-servers.js.map +1 -1
- package/dist/core/model-config.d.ts +1691 -2042
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +2 -3
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-registry.d.ts +35 -4
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +70 -8
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +16 -10
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +21 -17
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager.d.ts +29 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +311 -60
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-ai-schemas.d.ts +164 -0
- package/dist/core/pi-ai-schemas.d.ts.map +1 -0
- package/dist/core/pi-ai-schemas.js +21 -0
- package/dist/core/pi-ai-schemas.js.map +1 -0
- package/dist/core/pi-manifest.d.ts +1 -0
- package/dist/core/pi-manifest.d.ts.map +1 -1
- package/dist/core/pi-manifest.js +4 -0
- package/dist/core/pi-manifest.js.map +1 -1
- package/dist/core/project-trust.js +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/resource-loader.d.ts +4 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +38 -23
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +4 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +7 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +66 -26
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +2 -0
- package/dist/core/settings-defaults.d.ts.map +1 -1
- package/dist/core/settings-defaults.js +2 -0
- package/dist/core/settings-defaults.js.map +1 -1
- package/dist/core/settings-manager.d.ts +19 -8
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +70 -16
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +15 -2
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +37 -3
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +6 -14
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.js +2 -2
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/source-info.d.ts +9 -0
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js +13 -0
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/subscription-credits.d.ts +14 -0
- package/dist/core/subscription-credits.d.ts.map +1 -0
- package/dist/core/subscription-credits.js +10 -0
- package/dist/core/subscription-credits.js.map +1 -0
- package/dist/core/subscription-reset-status.d.ts +10 -0
- package/dist/core/subscription-reset-status.d.ts.map +1 -0
- package/dist/core/subscription-reset-status.js +2 -0
- package/dist/core/subscription-reset-status.js.map +1 -0
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +5 -6
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +2 -2
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts +3 -3
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +2 -4
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +2 -2
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +2 -2
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +7 -3
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts +2 -2
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts +2 -2
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +4 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +42 -12
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/edit.d.ts.map +1 -1
- package/dist/core/tools/renderers/edit.js +3 -3
- package/dist/core/tools/renderers/edit.js.map +1 -1
- package/dist/core/tools/renderers/write.d.ts.map +1 -1
- package/dist/core/tools/renderers/write.js +37 -29
- package/dist/core/tools/renderers/write.js.map +1 -1
- package/dist/core/tools/subagent.d.ts +9 -8
- package/dist/core/tools/subagent.d.ts.map +1 -1
- package/dist/core/tools/subagent.js +8 -5
- package/dist/core/tools/subagent.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +11 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/write.d.ts +2 -2
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +14 -8
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/usage-totals.d.ts.map +1 -1
- package/dist/core/usage-totals.js +2 -0
- package/dist/core/usage-totals.js.map +1 -1
- package/dist/extensions/codemode/renderer.d.ts.map +1 -1
- package/dist/extensions/codemode/renderer.js +17 -9
- package/dist/extensions/codemode/renderer.js.map +1 -1
- package/dist/extensions/codemode/tool.d.ts +2 -1
- package/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/dist/extensions/codemode/tool.js +33 -8
- package/dist/extensions/codemode/tool.js.map +1 -1
- package/dist/extensions/llama/ui.d.ts.map +1 -1
- package/dist/extensions/llama/ui.js +16 -4
- package/dist/extensions/llama/ui.js.map +1 -1
- package/dist/extensions/mcp/cli.d.ts.map +1 -1
- package/dist/extensions/mcp/cli.js +34 -8
- package/dist/extensions/mcp/cli.js.map +1 -1
- package/dist/extensions/mcp/index.js +4 -3
- package/dist/extensions/mcp/index.js.map +1 -1
- package/dist/extensions/mcp/oauth.d.ts +1 -1
- package/dist/extensions/mcp/oauth.d.ts.map +1 -1
- package/dist/extensions/mcp/oauth.js +7 -3
- package/dist/extensions/mcp/oauth.js.map +1 -1
- package/dist/extensions/mcp/ui.d.ts +1 -0
- package/dist/extensions/mcp/ui.d.ts.map +1 -1
- package/dist/extensions/mcp/ui.js +56 -28
- package/dist/extensions/mcp/ui.js.map +1 -1
- package/dist/extensions/tool-search/tool.d.ts +21 -6
- package/dist/extensions/tool-search/tool.d.ts.map +1 -1
- package/dist/extensions/tool-search/tool.js +104 -36
- package/dist/extensions/tool-search/tool.js.map +1 -1
- package/dist/extensions/usage/confirmation.d.ts +40 -0
- package/dist/extensions/usage/confirmation.d.ts.map +1 -0
- package/dist/extensions/usage/confirmation.js +198 -0
- package/dist/extensions/usage/confirmation.js.map +1 -0
- package/dist/extensions/usage/index.d.ts +4 -4
- package/dist/extensions/usage/index.d.ts.map +1 -1
- package/dist/extensions/usage/index.js +352 -33
- package/dist/extensions/usage/index.js.map +1 -1
- package/dist/extensions/usage/overview.d.ts +8 -1
- package/dist/extensions/usage/overview.d.ts.map +1 -1
- package/dist/extensions/usage/overview.js +54 -11
- package/dist/extensions/usage/overview.js.map +1 -1
- package/dist/extensions/usage/popup.d.ts +37 -6
- package/dist/extensions/usage/popup.d.ts.map +1 -1
- package/dist/extensions/usage/popup.js +396 -45
- package/dist/extensions/usage/popup.js.map +1 -1
- package/dist/humain/bedrock-provider/vendor/index.bundle.mjs +564 -130
- package/dist/humain/node-provider.d.ts.map +1 -1
- package/dist/humain/node-provider.js +1 -0
- package/dist/humain/node-provider.js.map +1 -1
- package/dist/humain/web-access/host.d.ts +2 -1
- package/dist/humain/web-access/host.d.ts.map +1 -1
- package/dist/humain/web-access/host.js +1 -1
- package/dist/humain/web-access/host.js.map +1 -1
- package/dist/humain/web-access/vendor/brave-rate-limit.d.ts +2 -0
- package/dist/humain/web-access/vendor/brave-rate-limit.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/brave-rate-limit.js +2 -2
- package/dist/humain/web-access/vendor/brave-rate-limit.js.map +1 -1
- package/dist/humain/web-access/vendor/cloudflare-search.d.ts +5 -0
- package/dist/humain/web-access/vendor/cloudflare-search.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/cloudflare-search.js +230 -0
- package/dist/humain/web-access/vendor/cloudflare-search.js.map +1 -0
- package/dist/humain/web-access/vendor/curator-page.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/curator-page.js +18 -1
- package/dist/humain/web-access/vendor/curator-page.js.map +1 -1
- package/dist/humain/web-access/vendor/curator-server.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/curator-server.js +12 -0
- package/dist/humain/web-access/vendor/curator-server.js.map +1 -1
- package/dist/humain/web-access/vendor/duckduckgo-rate-limit.d.ts +33 -0
- package/dist/humain/web-access/vendor/duckduckgo-rate-limit.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/duckduckgo-rate-limit.js +84 -0
- package/dist/humain/web-access/vendor/duckduckgo-rate-limit.js.map +1 -0
- package/dist/humain/web-access/vendor/duckduckgo.d.ts +3 -0
- package/dist/humain/web-access/vendor/duckduckgo.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/duckduckgo.js +54 -49
- package/dist/humain/web-access/vendor/duckduckgo.js.map +1 -1
- package/dist/humain/web-access/vendor/exa.d.ts +8 -3
- package/dist/humain/web-access/vendor/exa.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/exa.js +129 -14
- package/dist/humain/web-access/vendor/exa.js.map +1 -1
- package/dist/humain/web-access/vendor/extract.d.ts +1 -1
- package/dist/humain/web-access/vendor/extract.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/extract.js +68 -10
- package/dist/humain/web-access/vendor/extract.js.map +1 -1
- package/dist/humain/web-access/vendor/fetch-params.d.ts +2 -1
- package/dist/humain/web-access/vendor/fetch-params.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/fetch-params.js +2 -2
- package/dist/humain/web-access/vendor/fetch-params.js.map +1 -1
- package/dist/humain/web-access/vendor/field-extract.d.ts +38 -0
- package/dist/humain/web-access/vendor/field-extract.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/field-extract.js +350 -0
- package/dist/humain/web-access/vendor/field-extract.js.map +1 -0
- package/dist/humain/web-access/vendor/gemini-search.d.ts +15 -4
- package/dist/humain/web-access/vendor/gemini-search.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/gemini-search.js +198 -16
- package/dist/humain/web-access/vendor/gemini-search.js.map +1 -1
- package/dist/humain/web-access/vendor/github-api.js +1 -1
- package/dist/humain/web-access/vendor/github-api.js.map +1 -1
- package/dist/humain/web-access/vendor/github-extract.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/github-extract.js +3 -2
- package/dist/humain/web-access/vendor/github-extract.js.map +1 -1
- package/dist/humain/web-access/vendor/index.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/index.js +137 -118
- package/dist/humain/web-access/vendor/index.js.map +1 -1
- package/dist/humain/web-access/vendor/mistral-search.js +1 -1
- package/dist/humain/web-access/vendor/mistral-search.js.map +1 -1
- package/dist/humain/web-access/vendor/ninerouter.d.ts +4 -0
- package/dist/humain/web-access/vendor/ninerouter.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/ninerouter.js +110 -0
- package/dist/humain/web-access/vendor/ninerouter.js.map +1 -0
- package/dist/humain/web-access/vendor/offtopic-judge.d.ts +27 -0
- package/dist/humain/web-access/vendor/offtopic-judge.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/offtopic-judge.js +61 -0
- package/dist/humain/web-access/vendor/offtopic-judge.js.map +1 -0
- package/dist/humain/web-access/vendor/openai-search.d.ts +1 -1
- package/dist/humain/web-access/vendor/openai-search.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/openai-search.js +39 -13
- package/dist/humain/web-access/vendor/openai-search.js.map +1 -1
- package/dist/humain/web-access/vendor/outcrawl.d.ts +4 -0
- package/dist/humain/web-access/vendor/outcrawl.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/outcrawl.js +196 -0
- package/dist/humain/web-access/vendor/outcrawl.js.map +1 -0
- package/dist/humain/web-access/vendor/page-query.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/page-query.js +13 -3
- package/dist/humain/web-access/vendor/page-query.js.map +1 -1
- package/dist/humain/web-access/vendor/pdf-extract.d.ts +1 -3
- package/dist/humain/web-access/vendor/pdf-extract.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/pdf-extract.js +0 -2
- package/dist/humain/web-access/vendor/pdf-extract.js.map +1 -1
- package/dist/humain/web-access/vendor/perplexity.d.ts +3 -0
- package/dist/humain/web-access/vendor/perplexity.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/perplexity.js.map +1 -1
- package/dist/humain/web-access/vendor/query-rewrite.d.ts +2 -2
- package/dist/humain/web-access/vendor/query-rewrite.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/query-rewrite.js +39 -13
- package/dist/humain/web-access/vendor/query-rewrite.js.map +1 -1
- package/dist/humain/web-access/vendor/searchapi.d.ts +4 -0
- package/dist/humain/web-access/vendor/searchapi.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/searchapi.js +195 -0
- package/dist/humain/web-access/vendor/searchapi.js.map +1 -0
- package/dist/humain/web-access/vendor/sofya.d.ts +4 -0
- package/dist/humain/web-access/vendor/sofya.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/sofya.js +193 -0
- package/dist/humain/web-access/vendor/sofya.js.map +1 -0
- package/dist/humain/web-access/vendor/source-check.d.ts +5 -1
- package/dist/humain/web-access/vendor/source-check.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/source-check.js +34 -16
- package/dist/humain/web-access/vendor/source-check.js.map +1 -1
- package/dist/humain/web-access/vendor/ssrf-protection.d.ts +7 -0
- package/dist/humain/web-access/vendor/ssrf-protection.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/ssrf-protection.js +24 -1
- package/dist/humain/web-access/vendor/ssrf-protection.js.map +1 -1
- package/dist/humain/web-access/vendor/summary-model-scope.d.ts +8 -3
- package/dist/humain/web-access/vendor/summary-model-scope.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/summary-model-scope.js +15 -1
- package/dist/humain/web-access/vendor/summary-model-scope.js.map +1 -1
- package/dist/humain/web-access/vendor/summary-review.d.ts +7 -2
- package/dist/humain/web-access/vendor/summary-review.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/summary-review.js +32 -28
- package/dist/humain/web-access/vendor/summary-review.js.map +1 -1
- package/dist/humain/web-access/vendor/tabstack.d.ts +6 -0
- package/dist/humain/web-access/vendor/tabstack.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/tabstack.js +236 -0
- package/dist/humain/web-access/vendor/tabstack.js.map +1 -0
- package/dist/humain/web-access/vendor/tool-arguments.js +1 -1
- package/dist/humain/web-access/vendor/tool-arguments.js.map +1 -1
- package/dist/humain/web-access/vendor/upgrade-notice.d.ts +8 -0
- package/dist/humain/web-access/vendor/upgrade-notice.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/upgrade-notice.js +46 -0
- package/dist/humain/web-access/vendor/upgrade-notice.js.map +1 -0
- package/dist/humain/web-access/vendor/utils.d.ts +9 -0
- package/dist/humain/web-access/vendor/utils.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/utils.js +113 -27
- package/dist/humain/web-access/vendor/utils.js.map +1 -1
- package/dist/humain/web-access/vendor/web-tool-contract.d.ts +4 -0
- package/dist/humain/web-access/vendor/web-tool-contract.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/web-tool-contract.js.map +1 -1
- package/dist/humain/web-access/vendor/web-tool-core.d.ts +17 -1
- package/dist/humain/web-access/vendor/web-tool-core.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/web-tool-core.js +99 -22
- package/dist/humain/web-access/vendor/web-tool-core.js.map +1 -1
- package/dist/humain/web-access/vendor/xai-search.d.ts +1 -1
- package/dist/humain/web-access/vendor/xai-search.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/xai-search.js +6 -5
- package/dist/humain/web-access/vendor/xai-search.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +20 -9
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-code-block.d.ts +34 -0
- package/dist/modes/interactive/components/assistant-code-block.d.ts.map +1 -0
- package/dist/modes/interactive/components/assistant-code-block.js +160 -0
- package/dist/modes/interactive/components/assistant-code-block.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +31 -10
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +276 -73
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +2 -1
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +4 -17
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +7 -0
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +2 -1
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +2 -1
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/dist/modes/interactive/components/diff.js +3 -1
- package/dist/modes/interactive/components/diff.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +2 -0
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +4 -0
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +4 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +6 -5
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +5 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +107 -11
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts +2 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.js +3 -2
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -1
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
- package/dist/modes/interactive/components/mermaid.js +18 -6
- package/dist/modes/interactive/components/mermaid.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +17 -6
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +1 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +13 -4
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +14 -3
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts +4 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js +86 -22
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +2 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +16 -24
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.js +2 -0
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +2 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +15 -5
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +1 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +5 -6
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +9 -1
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +4 -3
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +20 -18
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts +1 -0
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +16 -4
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +6 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +259 -83
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-search.d.ts +10 -0
- package/dist/modes/interactive/model-search.d.ts.map +1 -1
- package/dist/modes/interactive/model-search.js +21 -0
- package/dist/modes/interactive/model-search.js.map +1 -1
- package/dist/modes/interactive/oauth-account-format.d.ts +10 -1
- package/dist/modes/interactive/oauth-account-format.d.ts.map +1 -1
- package/dist/modes/interactive/oauth-account-format.js +42 -0
- package/dist/modes/interactive/oauth-account-format.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +10 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +28 -24
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +3 -2
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +55 -4
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js +5 -2
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/clipboard-command.d.ts.map +1 -1
- package/dist/utils/clipboard-command.js +4 -0
- package/dist/utils/clipboard-command.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts +8 -0
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js +31 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/git.d.ts +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js +5 -3
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js +96 -6
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/paths.d.ts +17 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +42 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/shell.d.ts +2 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +12 -2
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts +5 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +156 -11
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +30 -35
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/cli.md +22 -12
- package/docs/compaction.md +32 -8
- package/docs/coordination.md +2 -0
- package/docs/custom-provider.md +4 -2
- package/docs/environment-variables.md +2 -0
- package/docs/extensions.md +3169 -229
- package/docs/flow.md +2 -0
- package/docs/keybindings.md +24 -2
- package/docs/llama-cpp.md +30 -19
- package/docs/mcp.md +4 -2
- package/docs/message-types.md +7 -7
- package/docs/packages.md +27 -1
- package/docs/sessions.md +11 -3
- package/docs/settings.md +21 -9
- package/docs/slash-commands.md +51 -11
- package/docs/terminal-setup.md +3 -1
- package/docs/tmux.md +6 -0
- package/docs/tui.md +3 -1
- package/docs/windows.md +27 -0
- package/examples/extensions/README.md +2 -1
- package/examples/extensions/custom-provider-anthropic/index.ts +27 -31
- package/examples/extensions/custom-provider-anthropic/package-lock.json +7 -7
- package/examples/extensions/custom-provider-anthropic/package.json +2 -2
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/debug-provider.ts +2 -2
- package/examples/extensions/gondolin/package-lock.json +14 -24
- package/examples/extensions/gondolin/package.json +2 -2
- package/examples/extensions/preset.ts +2 -0
- package/examples/extensions/reload-runtime.ts +17 -5
- package/examples/extensions/todo.ts +7 -0
- package/examples/extensions/tools.ts +2 -0
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/tsconfig.json +252 -0
- package/npm-shrinkwrap.json +289 -277
- package/package.json +29 -29
- package/schemas/keybindings.schema.json +28 -0
- package/schemas/models.schema.json +36 -36
- package/schemas/settings.schema.json +49 -0
- package/src/humain/ponytail/UPSTREAM.md +16 -2
- package/src/humain/ponytail/upstream.json +4 -4
- package/src/humain/web-access/UPSTREAM.md +48 -1
- package/src/humain/web-access/upstream.json +9 -6
- package/src/humain/web-access/vendor/CHANGELOG.md +1223 -0
- package/dist/bundle/chunks/anthropic-messages-ZP5KUK52.js +0 -67
- package/dist/bundle/chunks/azure-openai-responses-QJFYQ3DF.js +0 -15
- package/dist/bundle/chunks/chunk-2GCMACT4.js +0 -1956
- package/dist/bundle/chunks/chunk-AO6FF5JL.js +0 -21
- package/dist/bundle/chunks/chunk-EY3LZOUP.js +0 -1963
- package/dist/bundle/chunks/chunk-M74U5X4S.js +0 -119
- package/dist/bundle/chunks/chunk-N7CQ3UV3.js +0 -80
- package/dist/bundle/chunks/chunk-OR25QDSS.js +0 -365
- package/dist/bundle/chunks/chunk-PH7UP57J.js +0 -6
- package/dist/bundle/chunks/chunk-QW6PTCAB.js +0 -10
- package/dist/bundle/chunks/chunk-ROZV2IYD.js +0 -125
- package/dist/bundle/chunks/chunk-YFOLLX5D.js +0 -23
- package/dist/bundle/chunks/chunk-ZR4GF4WU.js +0 -54
- package/dist/bundle/chunks/compat-CJBWWYHE.js +0 -13
- package/dist/bundle/chunks/dist-IBUWEKEE.js +0 -24
- package/dist/bundle/chunks/dist-YFMJEHPH.js +0 -8
- package/dist/bundle/chunks/google-generative-ai-HVPCGIZ6.js +0 -21
- package/dist/bundle/chunks/google-vertex-UM5MAALA.js +0 -25
- package/dist/bundle/chunks/host-ZHEL5XQW.js +0 -2
- package/dist/bundle/chunks/mistral-conversations-AH72RLXK.js +0 -44
- package/dist/bundle/chunks/openai-codex-responses-L366637C.js +0 -98
- package/dist/bundle/chunks/openai-completions-ZP62QXJX.js +0 -83
- package/dist/bundle/chunks/openai-responses-DXUGSUTN.js +0 -26
- package/dist/bundle/chunks/pi-messages-MOQQDZBK.js +0 -23
- package/dist/bundle/chunks/virtual-modules-5D6QIJPN.js +0 -5
- package/examples/extensions/sandbox/index.ts +0 -321
- package/examples/extensions/sandbox/package-lock.json +0 -66
- package/examples/extensions/sandbox/package.json +0 -19
|
@@ -12,7 +12,7 @@ import { normalizeFetchContentParams } from "./fetch-params.js";
|
|
|
12
12
|
import { answerFromPage } from "./page-query.js";
|
|
13
13
|
import { rewriteSearchQuery } from "./query-rewrite.js";
|
|
14
14
|
import { clearCloneCache, releaseClonesUnusedSince, touchClones } from "./github-extract.js";
|
|
15
|
-
import { ALL_SEARCH_PROVIDERS, getAllowedSearchProviders, getConfiguredSearchRouting,
|
|
15
|
+
import { ALL_SEARCH_PROVIDERS, getAllowedSearchProviders, getConfiguredSearchRouting, parseProviderArgument, RESOLVED_SEARCH_PROVIDERS, search } from "./gemini-search.js";
|
|
16
16
|
import { formatSeconds, getWebSearchConfigDir, resolveCuratorNetworkConfig, runWithProxy } from "./utils.js";
|
|
17
17
|
import { deleteHeldResult, generateId, getAllResults, holdResults, loadSessionResults, releaseResults, storeFetchedContentResult, } from "./storage.js";
|
|
18
18
|
import { activityMonitor } from "./activity.js";
|
|
@@ -39,6 +39,7 @@ import { isSearch1APIAvailable } from "./search1api.js";
|
|
|
39
39
|
import { isSearchinfinityAvailable } from "./searchinfinity.js";
|
|
40
40
|
import { isQueritAvailable } from "./querit.js";
|
|
41
41
|
import { isTavilyAvailable } from "./tavily.js";
|
|
42
|
+
import { isTabstackAvailable } from "./tabstack.js";
|
|
42
43
|
import { isYouAvailable } from "./you.js";
|
|
43
44
|
import { isFirecrawlAvailable } from "./firecrawl.js";
|
|
44
45
|
import { isJinaSearchAvailable } from "./jina-search.js";
|
|
@@ -61,15 +62,21 @@ import { isSerplyAvailable } from "./serply.js";
|
|
|
61
62
|
import { isKeenableAvailable } from "./keenable.js";
|
|
62
63
|
import { isCeramicAvailable } from "./ceramic.js";
|
|
63
64
|
import { isLinkupAvailable } from "./linkup.js";
|
|
65
|
+
import { isNineRouterAvailable } from "./ninerouter.js";
|
|
66
|
+
import { isCloudflareSearchAvailable } from "./cloudflare-search.js";
|
|
67
|
+
import { isSearchApiAvailable } from "./searchapi.js";
|
|
68
|
+
import { isOutcrawlAvailable } from "./outcrawl.js";
|
|
69
|
+
import { isSofyaAvailable } from "./sofya.js";
|
|
64
70
|
import { isDeepSeekAvailable } from "./deepseek.js";
|
|
65
71
|
import { isBaizhiAvailable } from "./baizhi.js";
|
|
66
72
|
import { isZaiAvailable } from "./zai.js";
|
|
67
73
|
import { isValyuAvailable } from "./valyu.js";
|
|
68
74
|
import { isXcrawlAvailable } from "./xcrawl.js";
|
|
69
75
|
import { buildSearchErrorPlan } from "./render-search-error.js";
|
|
70
|
-
import { findModelWithProviderRouting, isModelInScope,
|
|
76
|
+
import { findModelWithProviderRouting, isModelInScope, resolveHelperModelSelector } from "./summary-model-scope.js";
|
|
71
77
|
import { registerCuratorRunLifecycle, resolveWebSearchWorkflow } from "./curator-run.js";
|
|
72
78
|
import { registerWebToolActivation } from "./tool-activation.js";
|
|
79
|
+
import { showUpgradeNotice } from "./upgrade-notice.js";
|
|
73
80
|
import { createWebToolCore, DEFAULT_TOOL_NAMES, expandQueryString, fetchAllContent, fetchUncoveredContent, getMaxInlineContentChars, isToolEnabled, loadConfig, markToolError, normalizeProviderInput, normalizeQueryList, normalizeRecencyFilter, parseConfigRoot, registeredFetchToolNames, resolveFetchModeConfig, resolveRequestedProvider, runSearchQueries, storedContentSourceNames, stripThumbnails, toCuratorProvider, WEB_SEARCH_CONFIG_PATH, withRegisteredFetchOptions, } from "./web-tool-core.js";
|
|
74
81
|
// Match pi-ai's StringEnum without loading its compat barrel during registration.
|
|
75
82
|
function StringEnum(values, options) {
|
|
@@ -105,6 +112,20 @@ const fetchContentOutputSchema = Type.Object({
|
|
|
105
112
|
mimeType: Type.Optional(Type.String()),
|
|
106
113
|
status: Type.Optional(Type.Number()),
|
|
107
114
|
duration: Type.Optional(Type.Number()),
|
|
115
|
+
extraction: Type.Optional(Type.Union([
|
|
116
|
+
Type.Object({
|
|
117
|
+
fields: Type.Record(Type.String(), Type.Object({
|
|
118
|
+
status: Type.Union([Type.Literal("extracted"), Type.Literal("uncertain"), Type.Literal("null")], { description: "null means not on the page" }),
|
|
119
|
+
value: Type.Optional(Type.Unknown({ description: "Typed value when extracted" })),
|
|
120
|
+
guess: Type.Optional(Type.Unknown({ description: "Unconfirmed value when uncertain" })),
|
|
121
|
+
confidence: Type.Optional(Type.Number()),
|
|
122
|
+
line: Type.Optional(Type.String({ description: "Page line the text or number value was found on" })),
|
|
123
|
+
notFound: Type.Optional(Type.Boolean({ description: "Uncertain because the text is not on the page" })),
|
|
124
|
+
})),
|
|
125
|
+
cut: Type.Boolean({ description: "Only the first part of the page was read" }),
|
|
126
|
+
}),
|
|
127
|
+
Type.Object({ error: Type.String({ description: "Why extraction failed for this fetched page" }) }),
|
|
128
|
+
], { description: "Extract mode only, for each fetched URL" })),
|
|
108
129
|
})),
|
|
109
130
|
});
|
|
110
131
|
/** Shared collapsed/expanded renderer for an error/cancel plan produced by
|
|
@@ -145,6 +166,7 @@ const FETCH_MODE_DESCRIPTIONS = {
|
|
|
145
166
|
readable: "extract readable content as markdown",
|
|
146
167
|
raw: "return the exact textual body using direct HTTP only",
|
|
147
168
|
answer: "answer a prompt using only fetched content",
|
|
169
|
+
extract: "read typed values named in fields",
|
|
148
170
|
};
|
|
149
171
|
// Keep primary query indexes stable for curator slots, then interleave additional
|
|
150
172
|
// provider entries deterministically instead of assigning by completion order.
|
|
@@ -154,12 +176,6 @@ function curatorResultIndex(queryIndex, entryIndex, queryCount) {
|
|
|
154
176
|
function curatorResultIndexCapacity(queryCount) {
|
|
155
177
|
return queryCount * RESOLVED_SEARCH_PROVIDERS.length;
|
|
156
178
|
}
|
|
157
|
-
function searchProviderSchema(description, allowedProviders) {
|
|
158
|
-
return Type.Union([
|
|
159
|
-
StringEnum(["auto", "all", ...allowedProviders]),
|
|
160
|
-
Type.Array(StringEnum([...allowedProviders]), { minItems: 1 }),
|
|
161
|
-
], { description });
|
|
162
|
-
}
|
|
163
179
|
function isCommandEnabled(config, name) {
|
|
164
180
|
return config.commands?.[name]?.enabled !== false;
|
|
165
181
|
}
|
|
@@ -240,6 +256,21 @@ export function getSummaryInstructions() {
|
|
|
240
256
|
const trimmed = value.trim();
|
|
241
257
|
return trimmed.length > 0 ? trimmed : undefined;
|
|
242
258
|
}
|
|
259
|
+
function readHelperModelKey(key) {
|
|
260
|
+
const value = loadConfig()[key];
|
|
261
|
+
if (value === undefined)
|
|
262
|
+
return undefined;
|
|
263
|
+
const message = `${key} in ${WEB_SEARCH_CONFIG_PATH} must be "current", "current:<level>", or "provider/model-id[:<level>]"`;
|
|
264
|
+
if (typeof value !== "string")
|
|
265
|
+
throw new Error(message);
|
|
266
|
+
try {
|
|
267
|
+
resolveHelperModelSelector(value, key);
|
|
268
|
+
}
|
|
269
|
+
catch {
|
|
270
|
+
throw new Error(message);
|
|
271
|
+
}
|
|
272
|
+
return value.trim();
|
|
273
|
+
}
|
|
243
274
|
function shouldAutoOpenCuratorBrowser(config) {
|
|
244
275
|
if (config.autoOpenBrowser === false)
|
|
245
276
|
return false;
|
|
@@ -261,6 +292,7 @@ async function getProviderAvailability(ctx) {
|
|
|
261
292
|
searchinfinity: allowedProviders.has("searchinfinity") && isSearchinfinityAvailable(),
|
|
262
293
|
querit: allowedProviders.has("querit") && isQueritAvailable(),
|
|
263
294
|
tavily: allowedProviders.has("tavily") && isTavilyAvailable(),
|
|
295
|
+
tabstack: allowedProviders.has("tabstack") && isTabstackAvailable(),
|
|
264
296
|
you: allowedProviders.has("you") && isYouAvailable(),
|
|
265
297
|
firecrawl: allowedProviders.has("firecrawl") && isFirecrawlAvailable(),
|
|
266
298
|
jina: allowedProviders.has("jina") && isJinaSearchAvailable(),
|
|
@@ -290,6 +322,11 @@ async function getProviderAvailability(ctx) {
|
|
|
290
322
|
keenable: allowedProviders.has("keenable") && isKeenableAvailable(),
|
|
291
323
|
ceramic: allowedProviders.has("ceramic") && isCeramicAvailable(),
|
|
292
324
|
linkup: allowedProviders.has("linkup") && isLinkupAvailable(),
|
|
325
|
+
ninerouter: allowedProviders.has("ninerouter") && isNineRouterAvailable(),
|
|
326
|
+
cloudflare: allowedProviders.has("cloudflare") && isCloudflareSearchAvailable(),
|
|
327
|
+
searchapi: allowedProviders.has("searchapi") && isSearchApiAvailable(),
|
|
328
|
+
outcrawl: allowedProviders.has("outcrawl") && isOutcrawlAvailable(),
|
|
329
|
+
sofya: allowedProviders.has("sofya") && isSofyaAvailable(),
|
|
293
330
|
deepseek: allowedProviders.has("deepseek") && isDeepSeekAvailable(),
|
|
294
331
|
};
|
|
295
332
|
return {
|
|
@@ -630,13 +667,9 @@ export default function (pi) {
|
|
|
630
667
|
throw new Error(`toolActivation "none" in ${WEB_SEARCH_CONFIG_PATH} requires toolExposure "deferred"`);
|
|
631
668
|
}
|
|
632
669
|
const allowedSearchProviders = initConfig.webSearch?.allowedProviders === undefined ? RESOLVED_SEARCH_PROVIDERS : getAllowedSearchProviders();
|
|
633
|
-
const
|
|
634
|
-
|
|
635
|
-
const
|
|
636
|
-
? `all has no eligible allowed providers; explicit-only allowed providers (${allExcludedProviders.map(providerLabel).join(", ")}) remain excluded`
|
|
637
|
-
: allExcludedProviders.length > 0
|
|
638
|
-
? `all searches eligible allowed providers (${allEligibleProviders.map(providerLabel).join(", ")}); explicit-only allowed providers (${allExcludedProviders.map(providerLabel).join(", ")}) remain excluded`
|
|
639
|
-
: `all searches every eligible allowed provider (${allEligibleProviders.map(providerLabel).join(", ")})`;
|
|
670
|
+
const modelProviders = allowedSearchProviders.filter(provider => provider === "openai" || provider === "xai" || provider === "mistral" || provider === "gemini");
|
|
671
|
+
// Depends on config only, never on credentials, so definitions stay byte-stable across environments.
|
|
672
|
+
const providerDescription = `auto, all, a name, or comma-separated names; omit for the configured default.${initConfig.webSearch?.allowedProviders === undefined ? "" : ` Allowed: ${allowedSearchProviders.join(", ")}.`}`;
|
|
640
673
|
const curatorRunState = registerCuratorRunLifecycle(pi);
|
|
641
674
|
const toolNames = resolveToolNames(initConfig);
|
|
642
675
|
const webSearchEnabled = isToolEnabled(initConfig, "webSearch");
|
|
@@ -658,12 +691,9 @@ export default function (pi) {
|
|
|
658
691
|
// at tools that are disabled or were renamed after init.
|
|
659
692
|
const registeredToolNames = registeredFetchToolNames(coreSettings);
|
|
660
693
|
const storedContentSources = storedContentSourceNames(coreSettings);
|
|
661
|
-
const searchQueryDescription = webSearchEnabled
|
|
662
|
-
? `Get content for this query (${toolNames.webSearch})`
|
|
663
|
-
: "Get content for a stored search query";
|
|
664
694
|
const fetchContentStorageNote = getSearchContentEnabled
|
|
665
|
-
? `Full
|
|
666
|
-
: "Full
|
|
695
|
+
? `Full content is stored for retrieval with ${toolNames.getSearchContent}.`
|
|
696
|
+
: "Full content is stored, but the retrieval tool is not registered.";
|
|
667
697
|
const fetchModeDescription = fetchModeConfig.allowedModes
|
|
668
698
|
.map(mode => `${mode}${mode === fetchModeConfig.defaultMode ? " (default)" : ""}: ${FETCH_MODE_DESCRIPTIONS[mode]}`)
|
|
669
699
|
.join("; ");
|
|
@@ -835,8 +865,9 @@ export default function (pi) {
|
|
|
835
865
|
if (selectedResults.length === 0) {
|
|
836
866
|
throw new Error("No selected results available for summary generation");
|
|
837
867
|
}
|
|
868
|
+
const configuredSummaryModel = readHelperModelKey("summaryModel");
|
|
838
869
|
try {
|
|
839
|
-
return await generateSummaryDraft(selectedResults, summaryContext, signal, modelOverride, feedback, undefined, getSummaryGenerationDeadlineMs(), getSummaryInstructions());
|
|
870
|
+
return await generateSummaryDraft(selectedResults, summaryContext, signal, modelOverride?.trim() || configuredSummaryModel, feedback, undefined, getSummaryGenerationDeadlineMs(), getSummaryInstructions(), { preferredFallback: configuredSummaryModel === undefined });
|
|
840
871
|
}
|
|
841
872
|
catch (err) {
|
|
842
873
|
const isEmptyResponse = err instanceof Error && err.message.includes("Summary model returned empty response");
|
|
@@ -856,8 +887,7 @@ export default function (pi) {
|
|
|
856
887
|
const summaryModels = [];
|
|
857
888
|
const seen = new Set();
|
|
858
889
|
const availableValues = new Set();
|
|
859
|
-
const addModel = (
|
|
860
|
-
const value = `${provider}/${id}`;
|
|
890
|
+
const addModel = (value) => {
|
|
861
891
|
if (seen.has(value))
|
|
862
892
|
return;
|
|
863
893
|
seen.add(value);
|
|
@@ -867,16 +897,12 @@ export default function (pi) {
|
|
|
867
897
|
if (!isModelInScope(model, summaryContext.scopedModels))
|
|
868
898
|
continue;
|
|
869
899
|
availableValues.add(`${model.provider}/${model.id}`);
|
|
870
|
-
addModel(model.provider
|
|
900
|
+
addModel(`${model.provider}/${model.id}`);
|
|
871
901
|
}
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
: null;
|
|
875
|
-
if (summaryContext.model && currentModelValue && !seen.has(currentModelValue) && isModelInScope(summaryContext.model, summaryContext.scopedModels)) {
|
|
876
|
-
addModel(summaryContext.model.provider, summaryContext.model.id);
|
|
902
|
+
if (summaryContext.model && isModelInScope(summaryContext.model, summaryContext.scopedModels)) {
|
|
903
|
+
addModel(`${summaryContext.model.provider}/${summaryContext.model.id}`);
|
|
877
904
|
}
|
|
878
|
-
const
|
|
879
|
-
const configuredSummaryModel = typeof config.summaryModel === "string" ? config.summaryModel.trim() : "";
|
|
905
|
+
const configuredSummaryModel = readHelperModelKey("summaryModel");
|
|
880
906
|
const preferredDefaults = [
|
|
881
907
|
{ provider: "anthropic", id: "claude-haiku-4-5" },
|
|
882
908
|
{ provider: "openai-codex", id: "gpt-5.6-luna" },
|
|
@@ -885,30 +911,17 @@ export default function (pi) {
|
|
|
885
911
|
{ provider: "openai", id: "gpt-5-mini" },
|
|
886
912
|
{ provider: "deepseek", id: "deepseek-v4-flash" },
|
|
887
913
|
];
|
|
888
|
-
const resolveAvailableModelValue = (selector) => {
|
|
889
|
-
const parsed = splitThinkingSuffix(selector);
|
|
890
|
-
const slashIndex = parsed.value.indexOf("/");
|
|
891
|
-
if (slashIndex <= 0 || slashIndex >= parsed.value.length - 1)
|
|
892
|
-
return null;
|
|
893
|
-
const model = findModelWithProviderRouting(summaryContext.modelRegistry, parsed.value.slice(0, slashIndex), parsed.value.slice(slashIndex + 1));
|
|
894
|
-
if (!model)
|
|
895
|
-
return null;
|
|
896
|
-
const value = `${model.provider}/${model.id}`;
|
|
897
|
-
if (!availableValues.has(value))
|
|
898
|
-
return null;
|
|
899
|
-
if (selector !== value && !seen.has(selector)) {
|
|
900
|
-
seen.add(selector);
|
|
901
|
-
summaryModels.push({ value: selector, label: selector });
|
|
902
|
-
}
|
|
903
|
-
return selector;
|
|
904
|
-
};
|
|
905
914
|
let defaultSummaryModel = null;
|
|
906
|
-
if (configuredSummaryModel
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
915
|
+
if (configuredSummaryModel !== undefined) {
|
|
916
|
+
const spec = resolveHelperModelSelector(configuredSummaryModel, "summary model", summaryContext.model);
|
|
917
|
+
// With no concrete value to show, list nothing so the curator sends Auto (the configured selector).
|
|
918
|
+
if (!spec)
|
|
919
|
+
return { summaryModels: [], defaultSummaryModel: configuredSummaryModel, preferredFallback: false };
|
|
920
|
+
// The curator groups choices by provider, so `current` must be concrete. Unavailable models stay listed so failures are visible.
|
|
921
|
+
defaultSummaryModel = `${spec.provider}/${spec.id}${spec.thinkingLevel ? `:${spec.thinkingLevel}` : ""}`;
|
|
922
|
+
addModel(defaultSummaryModel);
|
|
910
923
|
}
|
|
911
|
-
|
|
924
|
+
else {
|
|
912
925
|
for (const preferred of preferredDefaults) {
|
|
913
926
|
const model = findModelWithProviderRouting(summaryContext.modelRegistry, preferred.provider, preferred.id);
|
|
914
927
|
const value = model ? `${model.provider}/${model.id}` : null;
|
|
@@ -918,7 +931,7 @@ export default function (pi) {
|
|
|
918
931
|
}
|
|
919
932
|
}
|
|
920
933
|
}
|
|
921
|
-
return { summaryModels, defaultSummaryModel };
|
|
934
|
+
return { summaryModels, defaultSummaryModel, preferredFallback: configuredSummaryModel === undefined };
|
|
922
935
|
}
|
|
923
936
|
function resolveSummaryForSubmit(payload, resultsByIndex) {
|
|
924
937
|
const submittedSummary = typeof payload.summary === "string" ? payload.summary.trim() : "";
|
|
@@ -1136,7 +1149,7 @@ export default function (pi) {
|
|
|
1136
1149
|
return runWithProxy(pc.proxy, async () => {
|
|
1137
1150
|
if (pendingCurates.get(callId) !== pc)
|
|
1138
1151
|
throw new Error("Curator session is no longer active.");
|
|
1139
|
-
return rewriteSearchQuery(query, pc.summaryContext, rewriteSignal);
|
|
1152
|
+
return rewriteSearchQuery(query, pc.summaryContext, rewriteSignal, readHelperModelKey("queryRewriteModel"));
|
|
1140
1153
|
});
|
|
1141
1154
|
},
|
|
1142
1155
|
});
|
|
@@ -1248,7 +1261,11 @@ export default function (pi) {
|
|
|
1248
1261
|
if (event.parentToolCallId && event.toolName === toolNames.webSearch)
|
|
1249
1262
|
nestedSearchCallIds.add(event.toolCallId);
|
|
1250
1263
|
});
|
|
1251
|
-
pi.on("session_start", async (_event, ctx) => {
|
|
1264
|
+
pi.on("session_start", async (_event, ctx) => {
|
|
1265
|
+
nestedSearchCallIds.clear();
|
|
1266
|
+
startSession(ctx);
|
|
1267
|
+
void showUpgradeNotice(ctx).catch((error) => console.error("Failed to show the pi-web-access upgrade notice:", error));
|
|
1268
|
+
});
|
|
1252
1269
|
pi.on("session_tree", async (_event, ctx) => { nestedSearchCallIds.clear(); startSession(ctx); });
|
|
1253
1270
|
pi.on("session_shutdown", () => {
|
|
1254
1271
|
nestedSearchCallIds.clear();
|
|
@@ -1264,24 +1281,23 @@ export default function (pi) {
|
|
|
1264
1281
|
pi.registerTool({
|
|
1265
1282
|
name: toolNames.webSearch,
|
|
1266
1283
|
label: "Web Search",
|
|
1267
|
-
prepareArguments: (args) => parseStringifiedArrays(args, ["
|
|
1268
|
-
description: `Search the web
|
|
1269
|
-
promptSnippet: "
|
|
1284
|
+
prepareArguments: (args) => parseStringifiedArrays(args, ["queries", "domainFilter"]),
|
|
1285
|
+
description: `Search the web for sources or answers.${getSearchContentEnabled ? ` Full results are stored for retrieval with ${toolNames.getSearchContent} by responseId.` : ""} Prefer 2-4 varied queries.`,
|
|
1286
|
+
promptSnippet: "Web research. Prefer {queries:[...]} with 2-4 varied angles; omit provider unless overriding the default.",
|
|
1270
1287
|
parameters: Type.Object({
|
|
1271
|
-
query: Type.Optional(Type.String(
|
|
1272
|
-
queries: Type.Optional(Type.Array(Type.String(), { description: "
|
|
1273
|
-
numResults: Type.Optional(Type.Integer({ minimum: 1, maximum: 20, description: "
|
|
1274
|
-
includeContent: Type.Optional(Type.Boolean({ description: "
|
|
1275
|
-
recencyFilter: Type.Optional(StringEnum(["day", "week", "month", "year"]
|
|
1276
|
-
domainFilter: Type.Optional(Type.Array(Type.String(), { description: "
|
|
1277
|
-
category: Type.Optional(Type.String({ description: "Exa only
|
|
1278
|
-
|
|
1288
|
+
query: Type.Optional(Type.String()),
|
|
1289
|
+
queries: Type.Optional(Type.Array(Type.String(), { description: "Run concurrently (up to three at a time); vary the angle" })),
|
|
1290
|
+
numResults: Type.Optional(Type.Integer({ minimum: 1, maximum: 20, description: "Default 5" })),
|
|
1291
|
+
includeContent: Type.Optional(Type.Boolean({ description: "Also fetch full page content" })),
|
|
1292
|
+
recencyFilter: Type.Optional(StringEnum(["day", "week", "month", "year"])),
|
|
1293
|
+
domainFilter: Type.Optional(Type.Array(Type.String(), { description: "Prefix - to exclude" })),
|
|
1294
|
+
category: Type.Optional(Type.String({ description: "Exa only, e.g. news" })),
|
|
1295
|
+
...(modelProviders.length > 0 ? { model: Type.Optional(Type.String({ description: `Model ID; needs provider ${modelProviders.join(", ")}` })) } : {}),
|
|
1296
|
+
provider: Type.Optional(Type.String({ description: providerDescription })),
|
|
1279
1297
|
workflow: Type.Optional(StringEnum(["none", "summary-review", "auto-summary"], {
|
|
1280
|
-
description: "
|
|
1281
|
-
})),
|
|
1282
|
-
proxy: Type.Optional(Type.String({
|
|
1283
|
-
description: "http(s) or socks proxy URL (e.g. http://host:port or socks5h://host:port) used for every outbound request in this call (search APIs and content fetches). Node fetch ignores HTTP(S)_PROXY env vars, so set this (or `proxy` in web-search.json) when direct access is blocked; empty string forces direct access.",
|
|
1298
|
+
description: "Default none; summary-review opens the curator; auto-summary summarizes",
|
|
1284
1299
|
})),
|
|
1300
|
+
proxy: Type.Optional(Type.String({ description: "Proxy URL; omit by default (env proxy vars ignored); \"\" forces direct" })),
|
|
1285
1301
|
}),
|
|
1286
1302
|
outputSchema: webSearchOutputSchema,
|
|
1287
1303
|
exposure: toolExposure,
|
|
@@ -1311,6 +1327,12 @@ export default function (pi) {
|
|
|
1311
1327
|
details: { error: "Missing extension context" },
|
|
1312
1328
|
};
|
|
1313
1329
|
}
|
|
1330
|
+
if (shouldCurate && params.model !== undefined) {
|
|
1331
|
+
return {
|
|
1332
|
+
content: [{ type: "text", text: "Error: model cannot be used with workflow \"summary-review\". Pass workflow \"none\" or \"auto-summary\" to search with a specific model." }],
|
|
1333
|
+
details: { error: "model is not supported with summary-review" },
|
|
1334
|
+
};
|
|
1335
|
+
}
|
|
1314
1336
|
if (shouldCurate) {
|
|
1315
1337
|
closeCurator(callId);
|
|
1316
1338
|
let resolvePromise = () => { };
|
|
@@ -1327,7 +1349,7 @@ export default function (pi) {
|
|
|
1327
1349
|
: searchAbort.signal;
|
|
1328
1350
|
let cancelled = false;
|
|
1329
1351
|
const requestedProvider = resolveRequestedProvider(params.provider);
|
|
1330
|
-
const providerFromConfig = (
|
|
1352
|
+
const providerFromConfig = (parseProviderArgument(params.provider) ?? "auto") === "auto";
|
|
1331
1353
|
const bootstrap = await loadCuratorBootstrap(requestedProvider, ctx, {
|
|
1332
1354
|
numResults: params.numResults,
|
|
1333
1355
|
recencyFilter,
|
|
@@ -1528,7 +1550,7 @@ export default function (pi) {
|
|
|
1528
1550
|
scopedModels: ctx.scopedModels,
|
|
1529
1551
|
};
|
|
1530
1552
|
const summaryModelChoices = await loadSummaryModelChoices(summaryContext);
|
|
1531
|
-
const generated = await generateSummaryDraft(searchResults, summaryContext, signal, summaryModelChoices.defaultSummaryModel ?? undefined, undefined, undefined, getSummaryGenerationDeadlineMs(), getSummaryInstructions());
|
|
1553
|
+
const generated = await generateSummaryDraft(searchResults, summaryContext, signal, summaryModelChoices.defaultSummaryModel ?? undefined, undefined, undefined, getSummaryGenerationDeadlineMs(), getSummaryInstructions(), { preferredFallback: summaryModelChoices.preferredFallback });
|
|
1532
1554
|
return { approvedSummary: generated.summary, summaryMeta: generated.meta };
|
|
1533
1555
|
};
|
|
1534
1556
|
}
|
|
@@ -1748,19 +1770,17 @@ export default function (pi) {
|
|
|
1748
1770
|
pi.registerTool({
|
|
1749
1771
|
name: toolNames.sourceCheck,
|
|
1750
1772
|
label: "Source Check",
|
|
1751
|
-
description: "Gather web
|
|
1752
|
-
promptSnippet: "Gather
|
|
1773
|
+
description: "Gather cited web passages about a claim for manual review.",
|
|
1774
|
+
promptSnippet: "Gather source evidence with passage citations for a claim.",
|
|
1753
1775
|
parameters: Type.Object({
|
|
1754
|
-
claim: Type.String({ description: "
|
|
1755
|
-
queries: Type.Optional(Type.Array(Type.String(), { description: "
|
|
1756
|
-
numResults: Type.Optional(Type.Integer({ minimum: 1, maximum: 20, description: "
|
|
1757
|
-
fetchContent: Type.Optional(Type.Boolean({ description: "Fetch
|
|
1758
|
-
recencyFilter: Type.Optional(StringEnum(["day", "week", "month", "year"]
|
|
1759
|
-
domainFilter: Type.Optional(Type.Array(Type.String(), { description: "
|
|
1760
|
-
provider: Type.Optional(
|
|
1761
|
-
proxy: Type.Optional(Type.String({
|
|
1762
|
-
description: "http(s) or socks proxy URL (e.g. http://host:port or socks5h://host:port) used for every outbound request in this call (search APIs and result-page fetches). Empty string forces direct access.",
|
|
1763
|
-
})),
|
|
1776
|
+
claim: Type.String({ description: "Assertion to check" }),
|
|
1777
|
+
queries: Type.Optional(Type.Array(Type.String(), { description: "Default: the claim" })),
|
|
1778
|
+
numResults: Type.Optional(Type.Integer({ minimum: 1, maximum: 20, description: "Default 5" })),
|
|
1779
|
+
fetchContent: Type.Optional(Type.Boolean({ description: "Fetch top 5 pages for exact passages" })),
|
|
1780
|
+
recencyFilter: Type.Optional(StringEnum(["day", "week", "month", "year"])),
|
|
1781
|
+
domainFilter: Type.Optional(Type.Array(Type.String(), { description: "Prefix - to exclude" })),
|
|
1782
|
+
provider: Type.Optional(Type.String({ description: providerDescription })),
|
|
1783
|
+
proxy: Type.Optional(Type.String({ description: "Proxy URL; omit by default; \"\" forces direct" })),
|
|
1764
1784
|
}),
|
|
1765
1785
|
exposure: toolExposure,
|
|
1766
1786
|
async execute(_callId, params, signal, _onUpdate, ctx) {
|
|
@@ -1771,46 +1791,45 @@ export default function (pi) {
|
|
|
1771
1791
|
pi.registerTool({
|
|
1772
1792
|
name: toolNames.fetchContent,
|
|
1773
1793
|
label: "Fetch Content",
|
|
1774
|
-
description: `Fetch
|
|
1775
|
-
promptSnippet:
|
|
1794
|
+
description: `Fetch web pages, PDFs, GitHub repos, images, YouTube and local video, as the mode allows. ${fetchContentStorageNote}`,
|
|
1795
|
+
promptSnippet: `Use to fetch URL content, direct images, GitHub repos, and videos.${fetchModeConfig.allowedModes.includes("extract") ? ' For specific values (a price, version, date or limit), use mode "extract" with fields instead of reading the whole page.' : ""}`,
|
|
1776
1796
|
parameters: Type.Object({
|
|
1777
|
-
url: Type.Optional(Type.String(
|
|
1778
|
-
urls: Type.Optional(Type.Array(Type.String()
|
|
1779
|
-
forceClone: Type.Optional(Type.Boolean({
|
|
1780
|
-
description: "Force cloning large GitHub repositories that exceed the size threshold",
|
|
1781
|
-
})),
|
|
1797
|
+
url: Type.Optional(Type.String()),
|
|
1798
|
+
urls: Type.Optional(Type.Array(Type.String())),
|
|
1799
|
+
forceClone: Type.Optional(Type.Boolean({ description: "Clone GitHub repos over the size limit" })),
|
|
1782
1800
|
prompt: Type.Optional(Type.String({
|
|
1783
1801
|
description: fetchModeConfig.allowedModes.includes("answer")
|
|
1784
|
-
? "Question
|
|
1785
|
-
: "Question
|
|
1802
|
+
? "Question for video analysis or answer mode"
|
|
1803
|
+
: "Question for video analysis",
|
|
1786
1804
|
})),
|
|
1787
1805
|
mode: Type.Optional(StringEnum(fetchModeConfig.allowedModes, {
|
|
1788
|
-
description:
|
|
1806
|
+
description: `${fetchModeDescription}.`,
|
|
1789
1807
|
})),
|
|
1790
1808
|
...(fetchModeConfig.allowedModes.includes("answer") ? {
|
|
1791
1809
|
answerModel: Type.Optional(Type.String({
|
|
1792
|
-
description: "
|
|
1810
|
+
description: "provider/model-id for answer mode",
|
|
1811
|
+
})),
|
|
1812
|
+
} : {}),
|
|
1813
|
+
...(fetchModeConfig.allowedModes.includes("extract") ? {
|
|
1814
|
+
fields: Type.Optional(Type.Record(Type.String(), Type.String(), {
|
|
1815
|
+
description: "For extract: name → \"type\" or \"type: what to find\"; types: text, number, integer, date, time, datetime, duration[.unit], list[.number|.date]",
|
|
1793
1816
|
})),
|
|
1794
1817
|
} : {}),
|
|
1795
1818
|
timestamp: Type.Optional(Type.String({
|
|
1796
|
-
description: "
|
|
1819
|
+
description: "Video frame time ('1:23:45') or range ('23:41-25:00'); needs ffmpeg",
|
|
1797
1820
|
})),
|
|
1798
1821
|
frames: Type.Optional(Type.Integer({
|
|
1799
1822
|
minimum: 1,
|
|
1800
1823
|
maximum: 12,
|
|
1801
|
-
description: "
|
|
1802
|
-
})),
|
|
1803
|
-
model: Type.Optional(Type.String({
|
|
1804
|
-
description: "Override the Gemini model for video/YouTube analysis (e.g. 'gemini-3.6-flash'). Defaults to config or gemini-3.6-flash.",
|
|
1824
|
+
description: "Frames over a range, 5s apart from one time, or over the video",
|
|
1805
1825
|
})),
|
|
1826
|
+
model: Type.Optional(Type.String({ description: "Gemini model for video analysis" })),
|
|
1806
1827
|
auth: Type.Optional(Type.Union([Type.String(), Type.Boolean()], {
|
|
1807
|
-
description: "
|
|
1808
|
-
})),
|
|
1809
|
-
proxy: Type.Optional(Type.String({
|
|
1810
|
-
description: "http(s) or socks proxy URL (e.g. http://host:port or socks5h://host:port) used for this fetch. Needed when the target is unreachable directly; localhost and NO_PROXY hosts always bypass the proxy. Empty string forces direct access.",
|
|
1828
|
+
description: "authFetch profile name, or true for the only one",
|
|
1811
1829
|
})),
|
|
1830
|
+
proxy: Type.Optional(Type.String({ description: "Proxy URL; omit by default; \"\" forces direct" })),
|
|
1812
1831
|
redirects: Type.Optional(StringEnum(["same-origin"], {
|
|
1813
|
-
description: "Refuse cross-origin redirects
|
|
1832
|
+
description: "Refuse cross-origin redirects",
|
|
1814
1833
|
})),
|
|
1815
1834
|
}),
|
|
1816
1835
|
outputSchema: fetchContentOutputSchema,
|
|
@@ -1944,21 +1963,21 @@ export default function (pi) {
|
|
|
1944
1963
|
pi.registerTool({
|
|
1945
1964
|
name: toolNames.getSearchContent,
|
|
1946
1965
|
label: "Get Search Content",
|
|
1947
|
-
description: `
|
|
1948
|
-
promptSnippet: `Use after ${storedContentSources} to
|
|
1966
|
+
description: `Page through or search stored content from ${storedContentSources} by responseId.`,
|
|
1967
|
+
promptSnippet: `Use after ${storedContentSources} to read stored content; findText finds passages without paging.`,
|
|
1949
1968
|
parameters: Type.Object({
|
|
1950
|
-
responseId: Type.String(
|
|
1951
|
-
query: Type.Optional(Type.String(
|
|
1952
|
-
queryIndex: Type.Optional(Type.Integer({ minimum: 0
|
|
1953
|
-
url: Type.Optional(Type.String(
|
|
1954
|
-
urlIndex: Type.Optional(Type.Integer({ minimum: 0
|
|
1955
|
-
offset: Type.Optional(Type.Integer({ minimum: 0
|
|
1956
|
-
limit: Type.Optional(Type.Integer({ minimum: 1, maximum: maxInlineContentChars, description: "
|
|
1969
|
+
responseId: Type.String(),
|
|
1970
|
+
query: Type.Optional(Type.String()),
|
|
1971
|
+
queryIndex: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1972
|
+
url: Type.Optional(Type.String()),
|
|
1973
|
+
urlIndex: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1974
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1975
|
+
limit: Type.Optional(Type.Integer({ minimum: 1, maximum: maxInlineContentChars, description: "Characters, default the maximum" })),
|
|
1957
1976
|
findText: Type.Optional(Type.Union([
|
|
1958
1977
|
Type.String({ minLength: 1, maxLength: 500 }),
|
|
1959
1978
|
Type.Array(Type.String({ minLength: 1, maxLength: 500 }), { minItems: 1, maxItems: 10 }),
|
|
1960
|
-
], { description: "
|
|
1961
|
-
findMode: Type.Optional(StringEnum(["exact", "case-insensitive", "fuzzy"]
|
|
1979
|
+
], { description: "Find passages instead of paging" })),
|
|
1980
|
+
findMode: Type.Optional(StringEnum(["exact", "case-insensitive", "fuzzy"])),
|
|
1962
1981
|
}),
|
|
1963
1982
|
exposure: toolExposure,
|
|
1964
1983
|
async execute(_toolCallId, rawParams) {
|
|
@@ -2195,7 +2214,7 @@ export default function (pi) {
|
|
|
2195
2214
|
if (commandHandle && !isCommandActive()) {
|
|
2196
2215
|
throw new Error("Curator session is no longer active.");
|
|
2197
2216
|
}
|
|
2198
|
-
return rewriteSearchQuery(query, summaryContext, rewriteSignal);
|
|
2217
|
+
return rewriteSearchQuery(query, summaryContext, rewriteSignal, readHelperModelKey("queryRewriteModel"));
|
|
2199
2218
|
},
|
|
2200
2219
|
});
|
|
2201
2220
|
commandHandle = handle;
|