@humain/humain-code 0.7.0 → 0.8.0
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 +139 -0
- package/README.md +2 -2
- package/dist/bundle/agent-monitor.js +1 -1
- package/dist/bundle/chunks/anthropic-messages-UZB5HJE3.js +77 -0
- package/dist/bundle/chunks/anthropic.js +25 -24
- package/dist/bundle/chunks/azure-openai-responses-J3LCMWPQ.js +15 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +460 -431
- package/dist/bundle/chunks/bowser-DXKSTXFQ.js +89 -0
- package/dist/bundle/chunks/{chunk-HTA325LJ.js → chunk-2NVGOSBN.js} +1 -1
- package/dist/bundle/chunks/{chunk-5B25YXF7.js → chunk-3CGMVKHA.js} +13 -3
- package/dist/bundle/chunks/{chunk-SCINMV4X.js → chunk-46C6D7UC.js} +22 -21
- package/dist/bundle/chunks/{chunk-RS6PZK35.js → chunk-4EV7CK26.js} +249 -216
- package/dist/bundle/chunks/{chunk-T7BXP46S.js → chunk-4SFWYKL5.js} +1848 -1662
- package/dist/bundle/chunks/{chunk-TGDPZCSW.js → chunk-4TDNOR36.js} +1 -1
- package/dist/bundle/chunks/{chunk-C6VERWRZ.js → chunk-4XF5JX7X.js} +1 -1
- package/dist/bundle/chunks/chunk-6HTHDVJC.js +4 -0
- package/dist/bundle/chunks/{chunk-2G7YVAVF.js → chunk-7EONJCBE.js} +1 -1
- package/dist/bundle/chunks/chunk-7H2WNBX7.js +11 -0
- package/dist/bundle/chunks/{chunk-2FYYW6FY.js → chunk-7OZNMWAJ.js} +1 -1
- package/dist/bundle/chunks/{chunk-R6YQR7TZ.js → chunk-7WE77IE3.js} +1 -1
- package/dist/bundle/chunks/{chunk-Z5YLKK3S.js → chunk-7WETECIB.js} +1 -1
- package/dist/bundle/chunks/{chunk-EIC7CQX3.js → chunk-AI7EHDAX.js} +1 -1
- package/dist/bundle/chunks/{chunk-KRCX3ZBA.js → chunk-APNPBT7Y.js} +1 -1
- package/dist/bundle/chunks/{chunk-4HTVBBJD.js → chunk-ATFZAFMS.js} +2 -2
- package/dist/bundle/chunks/{chunk-R5OOX7RW.js → chunk-B47PNNLL.js} +9 -2
- package/dist/bundle/chunks/{chunk-AZXVJN6E.js → chunk-C4DHVDYT.js} +1 -1
- package/dist/bundle/chunks/{chunk-4PRNKB6V.js → chunk-CET2MXXN.js} +7 -7
- package/dist/bundle/chunks/{chunk-66FZJO75.js → chunk-CU6KU7JK.js} +472 -3924
- package/dist/bundle/chunks/{chunk-MD7K7RPN.js → chunk-D3KYOSQY.js} +1 -1
- package/dist/bundle/chunks/{chunk-I3NDOUHE.js → chunk-DCXHRP6C.js} +1 -1
- package/dist/bundle/chunks/{chunk-OB332KMV.js → chunk-DD5UT56Y.js} +46 -32
- package/dist/bundle/chunks/{chunk-G4QPSFBF.js → chunk-EMBIUIQ2.js} +216 -223
- package/dist/bundle/chunks/{chunk-Q7VXYXY3.js → chunk-ENBDASDN.js} +2 -2
- package/dist/bundle/chunks/{chunk-2H3LUS62.js → chunk-FJIISX5W.js} +241 -229
- package/dist/bundle/chunks/{chunk-WQOOJP7U.js → chunk-GV5OVRKK.js} +1 -1
- package/dist/bundle/chunks/{chunk-KTSJYIYC.js → chunk-HHWVVNGG.js} +1 -1
- package/dist/bundle/chunks/{chunk-4JRER4XK.js → chunk-HQMUDHC3.js} +19 -19
- package/dist/bundle/chunks/{chunk-WQ7EJQIT.js → chunk-IOLLZXQN.js} +225 -239
- package/dist/bundle/chunks/chunk-IXQYPQRQ.js +2079 -0
- package/dist/bundle/chunks/{chunk-RU7ADKA7.js → chunk-J4GII2EE.js} +112 -96
- package/dist/bundle/chunks/chunk-J5TSAJGC.js +22 -0
- package/dist/bundle/chunks/{chunk-QT6ZHDMP.js → chunk-JBSWWCT5.js} +1 -1
- package/dist/bundle/chunks/{chunk-P6AXBESH.js → chunk-JV7VHOAY.js} +1119 -1098
- package/dist/bundle/chunks/{chunk-PWUDFU5V.js → chunk-JWOPWHVH.js} +4 -4
- package/dist/bundle/chunks/{chunk-4V5VL2BO.js → chunk-KLSRGGOH.js} +131 -154
- package/dist/bundle/chunks/{chunk-JF7FYXAI.js → chunk-KONLZKPL.js} +7 -6
- package/dist/bundle/chunks/{chunk-32QLLD2P.js → chunk-KQXXBQ57.js} +360 -332
- package/dist/bundle/chunks/{chunk-UZNIPOGS.js → chunk-L4J7SMJB.js} +1 -1
- package/dist/bundle/chunks/chunk-MPRAQ6ZI.js +41 -0
- package/dist/bundle/chunks/{chunk-GUHNFZ2Q.js → chunk-NNWNIBLG.js} +20 -19
- package/dist/bundle/chunks/{chunk-TWAHPPXN.js → chunk-OVDMYBIT.js} +1307 -1194
- package/dist/bundle/chunks/{chunk-WAPZN4KP.js → chunk-P2Y2H7SD.js} +2 -2
- package/dist/bundle/chunks/{chunk-PPBDDQHP.js → chunk-PGVDL4KB.js} +7 -6
- package/dist/bundle/chunks/{chunk-XHDVDJM7.js → chunk-PVNXN2TC.js} +7 -7
- package/dist/bundle/chunks/{chunk-RNBZBCH2.js → chunk-QJB5YI3I.js} +1 -1
- package/dist/bundle/chunks/{chunk-I5E7RQ5V.js → chunk-QRYDGY5I.js} +5 -5
- package/dist/bundle/chunks/{chunk-4QAXV5T6.js → chunk-R3VDXQW2.js} +9 -9
- package/dist/bundle/chunks/chunk-SKCJ25SX.js +24 -0
- package/dist/bundle/chunks/chunk-SQ7NTRLJ.js +77 -0
- package/dist/bundle/chunks/{chunk-SSRCVJZK.js → chunk-TYN46EVI.js} +5 -5
- package/dist/bundle/chunks/{chunk-6E6RHNOU.js → chunk-UXM4WFLH.js} +12 -11
- package/dist/bundle/chunks/{chunk-LB4CIS4F.js → chunk-VCMXBP5S.js} +17 -17
- package/dist/bundle/chunks/{chunk-N2SNMUD3.js → chunk-VKQNYZUA.js} +1 -1
- package/dist/bundle/chunks/{chunk-JYWUOKOI.js → chunk-WBSGWISD.js} +367 -353
- package/dist/bundle/chunks/{chunk-3EDMWQ35.js → chunk-WGXMYMPE.js} +17 -15
- package/dist/bundle/chunks/chunk-WRYGY5XG.js +24 -0
- package/dist/bundle/chunks/{chunk-GRJUKEE3.js → chunk-XVIQYONJ.js} +4 -4
- package/dist/bundle/chunks/chunk-YSWDFV2L.js +11 -0
- package/dist/bundle/chunks/{chunk-AEWYICBL.js → chunk-Z5UFSRO4.js} +2 -2
- package/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
- package/dist/bundle/chunks/chunk-ZTG5OKI7.js +3 -0
- package/dist/bundle/chunks/{cli-H4LJNE2V.js → cli-6DJO467D.js} +2 -2
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-T5R2RVFQ.js → cloudflare-workers-ai-system-one-ETKC6B2S.js} +1 -1
- package/dist/bundle/chunks/codemode-worker.js +68 -68
- package/dist/bundle/chunks/compat-HS4ARZK3.js +15 -0
- package/dist/bundle/chunks/curator-server-TC7RVVN2.js +3600 -0
- package/dist/bundle/chunks/dist-35STTNYA.js +37 -0
- package/dist/bundle/chunks/{dist-FMWWM4H7.js → dist-5AQPJ2TI.js} +2 -2
- package/dist/bundle/chunks/{dist-NHQTBDHT.js → dist-DYB3AR7C.js} +91 -257
- package/dist/bundle/chunks/dist-NMEXYUP3.js +11 -0
- package/dist/bundle/chunks/dist-cjs-EROMDUKS.js +193 -0
- package/dist/bundle/chunks/{easter-egg-3d-BUEOC3NO.js → easter-egg-3d-VVUF3C3X.js} +1 -1
- package/dist/bundle/chunks/entry-2GZ3PTWQ.js +2 -0
- package/dist/bundle/chunks/{entry-A2CSLKHC.js → entry-SRYLSS5P.js} +3 -3
- package/dist/bundle/chunks/{event-streams-7YGFEPBZ.js → event-streams-F67JLS6B.js} +1 -1
- package/dist/bundle/chunks/{execute-MY5JSEPV.js → execute-I3WGGPWL.js} +2 -2
- package/dist/bundle/chunks/{extract-PTGACPGP.js → extract-QHZTEVJP.js} +68 -65
- package/dist/bundle/chunks/{flow-implementer-APJFY4YI.js → flow-implementer-QMN3HKE2.js} +8 -9
- package/dist/bundle/chunks/github-copilot.js +55 -45
- package/dist/bundle/chunks/google-generative-ai-ZND73WDQ.js +22 -0
- package/dist/bundle/chunks/google-vertex-YAH62YRM.js +25 -0
- package/dist/bundle/chunks/host-Q565BCXB.js +3 -0
- package/dist/bundle/chunks/image-resize-worker.js +3 -3
- package/dist/bundle/chunks/{index.bundle-THL4EUSU.js → index.bundle-HONF3PUD.js} +177 -176
- package/dist/bundle/chunks/{inprocess-5NP5VJHZ.js → inprocess-453SLFL5.js} +6 -6
- package/dist/bundle/chunks/interactive-mode-MVZOJ5OU.js +5 -0
- package/dist/bundle/chunks/{llama-cpp-classify-GJAXULWL.js → llama-cpp-classify-Z4GZY4GC.js} +1 -1
- package/dist/bundle/chunks/mistral-conversations-7I5JURDP.js +43 -0
- package/dist/bundle/chunks/{node-ZFIIS5IM.js → node-IMSYVRPL.js} +53 -30
- package/dist/bundle/chunks/{node-UNHECG4X.js → node-MHHE76P4.js} +475 -440
- package/dist/bundle/chunks/{openai-codex-responses-S7CMCAOY.js → openai-codex-responses-LTHOMN37.js} +30 -29
- package/dist/bundle/chunks/openai-codex.js +9 -8
- package/dist/bundle/chunks/{openai-completions-2Z57N7PC.js → openai-completions-W2X635EE.js} +22 -22
- package/dist/bundle/chunks/{openai-decisions-JIOJDB4C.js → openai-decisions-TN2GNOYI.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-5VBZSTHL.js → openai-responses-DVY4QXOG.js} +4 -5
- package/dist/bundle/chunks/{openrouter-images-S6O7DBEJ.js → openrouter-images-SE2JMS44.js} +1 -1
- package/dist/bundle/chunks/openrouter.js +9 -8
- package/dist/bundle/chunks/pdfjs-FE3L72A6.js +3662 -0
- package/dist/bundle/chunks/{pdfjs-decoders-OFXX4HDZ.js → pdfjs-decoders-VCMCTQJ2.js} +1 -1
- package/dist/bundle/chunks/pdfjs-jbig2_nowasm_fallback-I4K6AIV4.js +295 -0
- package/dist/bundle/chunks/pdfjs-openjpeg-PYQCV6CM.js +590 -0
- package/dist/bundle/chunks/pdfjs-openjpeg_nowasm_fallback-G363SGDI.js +775 -0
- package/dist/bundle/chunks/{pi-messages-SMLN5J2W.js → pi-messages-WAS6Z5L5.js} +11 -11
- package/dist/bundle/chunks/radius.js +8 -7
- package/dist/bundle/chunks/{runtime-OYTWXIUM.js → runtime-H7LYNKCZ.js} +1 -1
- package/dist/bundle/chunks/session-picker-XNVLSJ22.js +4 -0
- package/dist/bundle/chunks/startup-ui-3TCT465D.js +3 -0
- package/dist/bundle/chunks/{trace-command-YLDYCL55.js → trace-command-7ORDQ3JS.js} +4 -4
- package/dist/bundle/chunks/{typesafe-system-one-7BEL3H5N.js → typesafe-system-one-AAZH6S3I.js} +1 -1
- package/dist/bundle/chunks/{undici-C6S56CGI.js → undici-WVNE45GY.js} +1 -1
- package/dist/bundle/chunks/virtual-modules-CIVXCEAN.js +28 -0
- package/dist/bundle/cli-runtime.js +5 -5
- package/dist/bundle/flow/package.json +5 -5
- package/dist/bundle/index.js +13 -13
- package/dist/bundle/orchestrate/package.json +22 -6
- package/dist/bundle/rpc-entry.js +4 -5
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +4 -3
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +9 -6
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js +9 -6
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +8 -4
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +11 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +19 -0
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +0 -2
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +0 -2
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +31 -39
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +231 -535
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/anthropic-subscription-usage.d.ts +4 -2
- package/dist/core/anthropic-subscription-usage.d.ts.map +1 -1
- package/dist/core/anthropic-subscription-usage.js +32 -16
- package/dist/core/anthropic-subscription-usage.js.map +1 -1
- package/dist/core/auto-session-namer.js +1 -1
- package/dist/core/auto-session-namer.js.map +1 -1
- package/dist/core/cache-warmer.d.ts.map +1 -1
- package/dist/core/cache-warmer.js +2 -0
- package/dist/core/cache-warmer.js.map +1 -1
- package/dist/core/exec.d.ts +1 -0
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +4 -1
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/ansi-to-html.d.ts +6 -1
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/dist/core/export-html/ansi-to-html.js +57 -20
- package/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/dist/core/export-html/template.js +1 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +2 -3
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +18 -1
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +5 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +5 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/flow-implementer.d.ts.map +1 -1
- package/dist/core/flow-implementer.js +3 -9
- package/dist/core/flow-implementer.js.map +1 -1
- package/dist/core/keybindings.d.ts +40 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +5 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-config.d.ts +13 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-registry.d.ts +3 -0
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +32 -8
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +0 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +3 -10
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +18 -7
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +41 -8
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/oauth-account-pool.d.ts +5 -0
- package/dist/core/oauth-account-pool.d.ts.map +1 -1
- package/dist/core/oauth-account-pool.js +34 -3
- package/dist/core/oauth-account-pool.js.map +1 -1
- package/dist/core/package-manager.d.ts +16 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +46 -3
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-ai-schemas.d.ts +1 -0
- package/dist/core/pi-ai-schemas.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +7 -0
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader.d.ts +5 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +2 -0
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/run-outcome.d.ts +6 -3
- package/dist/core/run-outcome.d.ts.map +1 -1
- package/dist/core/run-outcome.js +36 -9
- package/dist/core/run-outcome.js.map +1 -1
- package/dist/core/run-preflight.d.ts +1 -1
- package/dist/core/run-preflight.d.ts.map +1 -1
- package/dist/core/run-preflight.js +19 -11
- package/dist/core/run-preflight.js.map +1 -1
- package/dist/core/sdk.d.ts +0 -6
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +7 -16
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +0 -5
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +0 -9
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +0 -4
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +0 -1
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/tools/bash-jobs.d.ts.map +1 -1
- package/dist/core/tools/bash-jobs.js +2 -9
- package/dist/core/tools/bash-jobs.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +28 -16
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +4 -1
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/read.d.ts +8 -4
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +10 -15
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/renderers/read.d.ts.map +1 -1
- package/dist/core/tools/renderers/read.js +6 -2
- package/dist/core/tools/renderers/read.js.map +1 -1
- package/dist/core/tools/subagent-worktree.d.ts.map +1 -1
- package/dist/core/tools/subagent-worktree.js +2 -10
- package/dist/core/tools/subagent-worktree.js.map +1 -1
- package/dist/core/trace-client/credential-store.d.ts.map +1 -1
- package/dist/core/trace-client/credential-store.js +9 -5
- package/dist/core/trace-client/credential-store.js.map +1 -1
- package/dist/extensions/codemode/execute.js +2 -2
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +6 -4
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/extensions/usage/account-reconnect.d.ts +5 -0
- package/dist/extensions/usage/account-reconnect.d.ts.map +1 -0
- package/dist/extensions/usage/account-reconnect.js +12 -0
- package/dist/extensions/usage/account-reconnect.js.map +1 -0
- package/dist/extensions/usage/hcode-overview.d.ts +6 -19
- package/dist/extensions/usage/hcode-overview.d.ts.map +1 -1
- package/dist/extensions/usage/hcode-overview.js +86 -100
- package/dist/extensions/usage/hcode-overview.js.map +1 -1
- package/dist/extensions/usage/index.d.ts.map +1 -1
- package/dist/extensions/usage/index.js +74 -98
- package/dist/extensions/usage/index.js.map +1 -1
- package/dist/extensions/usage/overview.d.ts +22 -17
- package/dist/extensions/usage/overview.d.ts.map +1 -1
- package/dist/extensions/usage/overview.js +98 -13
- package/dist/extensions/usage/overview.js.map +1 -1
- package/dist/extensions/usage/popup.d.ts +9 -14
- package/dist/extensions/usage/popup.d.ts.map +1 -1
- package/dist/extensions/usage/popup.js +78 -165
- package/dist/extensions/usage/popup.js.map +1 -1
- package/dist/humain/bedrock-provider/vendor/index.bundle.mjs +4 -1
- package/dist/humain/flow-command.js +1 -1
- package/dist/humain/flow-command.js.map +1 -1
- package/dist/humain/flow-loader.d.ts +9 -4
- package/dist/humain/flow-loader.d.ts.map +1 -1
- package/dist/humain/flow-loader.js +30 -21
- package/dist/humain/flow-loader.js.map +1 -1
- package/dist/humain/gateway/client.d.ts +3 -1
- package/dist/humain/gateway/client.d.ts.map +1 -1
- package/dist/humain/gateway/client.js +10 -5
- package/dist/humain/gateway/client.js.map +1 -1
- package/dist/humain/gateway/login.d.ts.map +1 -1
- package/dist/humain/gateway/login.js +160 -53
- package/dist/humain/gateway/login.js.map +1 -1
- package/dist/humain/hcode/account-store.d.ts +29 -5
- package/dist/humain/hcode/account-store.d.ts.map +1 -1
- package/dist/humain/hcode/account-store.js +224 -124
- package/dist/humain/hcode/account-store.js.map +1 -1
- package/dist/humain/hcode/account.d.ts +6 -0
- package/dist/humain/hcode/account.d.ts.map +1 -1
- package/dist/humain/hcode/account.js +348 -129
- package/dist/humain/hcode/account.js.map +1 -1
- package/dist/humain/hcode/catalog-watch.d.ts +21 -0
- package/dist/humain/hcode/catalog-watch.d.ts.map +1 -0
- package/dist/humain/hcode/catalog-watch.js +46 -0
- package/dist/humain/hcode/catalog-watch.js.map +1 -0
- package/dist/humain/hcode/contracts.d.ts +16 -1
- package/dist/humain/hcode/contracts.d.ts.map +1 -1
- package/dist/humain/hcode/contracts.js +122 -128
- package/dist/humain/hcode/contracts.js.map +1 -1
- package/dist/humain/hcode/environment.d.ts +3 -1
- package/dist/humain/hcode/environment.d.ts.map +1 -1
- package/dist/humain/hcode/environment.js +12 -2
- package/dist/humain/hcode/environment.js.map +1 -1
- package/dist/humain/hcode/facade.d.ts +26 -6
- package/dist/humain/hcode/facade.d.ts.map +1 -1
- package/dist/humain/hcode/facade.js +148 -38
- package/dist/humain/hcode/facade.js.map +1 -1
- package/dist/humain/hcode/http.d.ts +3 -1
- package/dist/humain/hcode/http.d.ts.map +1 -1
- package/dist/humain/hcode/http.js +44 -23
- package/dist/humain/hcode/http.js.map +1 -1
- package/dist/humain/hcode/images.d.ts +67 -0
- package/dist/humain/hcode/images.d.ts.map +1 -0
- package/dist/humain/hcode/images.js +463 -0
- package/dist/humain/hcode/images.js.map +1 -0
- package/dist/humain/hcode/login-copy.d.ts +28 -0
- package/dist/humain/hcode/login-copy.d.ts.map +1 -0
- package/dist/humain/hcode/login-copy.js +74 -0
- package/dist/humain/hcode/login-copy.js.map +1 -0
- package/dist/humain/hcode/login-failure.d.ts +26 -0
- package/dist/humain/hcode/login-failure.d.ts.map +1 -0
- package/dist/humain/hcode/login-failure.js +50 -0
- package/dist/humain/hcode/login-failure.js.map +1 -0
- package/dist/humain/hcode/notices.d.ts +24 -1
- package/dist/humain/hcode/notices.d.ts.map +1 -1
- package/dist/humain/hcode/notices.js +93 -7
- package/dist/humain/hcode/notices.js.map +1 -1
- package/dist/humain/hcode/provider.d.ts +7 -3
- package/dist/humain/hcode/provider.d.ts.map +1 -1
- package/dist/humain/hcode/provider.js +123 -19
- package/dist/humain/hcode/provider.js.map +1 -1
- package/dist/humain/hcode/selection.d.ts +2 -0
- package/dist/humain/hcode/selection.d.ts.map +1 -1
- package/dist/humain/hcode/selection.js +8 -1
- package/dist/humain/hcode/selection.js.map +1 -1
- package/dist/humain/hcode/transport.d.ts +13 -10
- package/dist/humain/hcode/transport.d.ts.map +1 -1
- package/dist/humain/hcode/transport.js +103 -148
- package/dist/humain/hcode/transport.js.map +1 -1
- package/dist/humain/hcode/wire.d.ts +3 -0
- package/dist/humain/hcode/wire.d.ts.map +1 -1
- package/dist/humain/hcode/wire.js +11 -0
- package/dist/humain/hcode/wire.js.map +1 -1
- package/dist/humain/metadata/contracts.d.ts +1 -0
- package/dist/humain/metadata/contracts.d.ts.map +1 -1
- package/dist/humain/metadata/contracts.js +2 -1
- package/dist/humain/metadata/contracts.js.map +1 -1
- package/dist/humain/web-access/vendor/anysearch.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/anysearch.js +7 -3
- package/dist/humain/web-access/vendor/anysearch.js.map +1 -1
- package/dist/humain/web-access/vendor/autom.d.ts +4 -0
- package/dist/humain/web-access/vendor/autom.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/autom.js +191 -0
- package/dist/humain/web-access/vendor/autom.js.map +1 -0
- package/dist/humain/web-access/vendor/cloro.d.ts +4 -0
- package/dist/humain/web-access/vendor/cloro.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/cloro.js +236 -0
- package/dist/humain/web-access/vendor/cloro.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 +7 -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 +6 -0
- package/dist/humain/web-access/vendor/curator-server.js.map +1 -1
- package/dist/humain/web-access/vendor/domain-filter-normalization.d.ts +8 -0
- package/dist/humain/web-access/vendor/domain-filter-normalization.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/domain-filter-normalization.js +37 -0
- package/dist/humain/web-access/vendor/domain-filter-normalization.js.map +1 -1
- package/dist/humain/web-access/vendor/duckduckgo-rate-limit.d.ts +28 -8
- package/dist/humain/web-access/vendor/duckduckgo-rate-limit.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/duckduckgo-rate-limit.js +135 -34
- package/dist/humain/web-access/vendor/duckduckgo-rate-limit.js.map +1 -1
- package/dist/humain/web-access/vendor/duckduckgo.d.ts +1 -1
- package/dist/humain/web-access/vendor/duckduckgo.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/duckduckgo.js +10 -3
- package/dist/humain/web-access/vendor/duckduckgo.js.map +1 -1
- package/dist/humain/web-access/vendor/extract.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/extract.js +61 -5
- package/dist/humain/web-access/vendor/extract.js.map +1 -1
- package/dist/humain/web-access/vendor/gemini-search.d.ts +3 -3
- package/dist/humain/web-access/vendor/gemini-search.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/gemini-search.js +35 -5
- package/dist/humain/web-access/vendor/gemini-search.js.map +1 -1
- package/dist/humain/web-access/vendor/index.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/index.js +8 -1
- package/dist/humain/web-access/vendor/index.js.map +1 -1
- package/dist/humain/web-access/vendor/page-query.d.ts +5 -0
- package/dist/humain/web-access/vendor/page-query.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/page-query.js +12 -2
- package/dist/humain/web-access/vendor/page-query.js.map +1 -1
- package/dist/humain/web-access/vendor/specstream.d.ts +6 -0
- package/dist/humain/web-access/vendor/specstream.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/specstream.js +253 -0
- package/dist/humain/web-access/vendor/specstream.js.map +1 -0
- package/dist/humain/web-access/vendor/tool-activation.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/tool-activation.js +21 -5
- package/dist/humain/web-access/vendor/tool-activation.js.map +1 -1
- package/dist/humain/web-access/vendor/upgrade-notice.d.ts +1 -1
- package/dist/humain/web-access/vendor/upgrade-notice.js +1 -1
- package/dist/humain/web-access/vendor/upgrade-notice.js.map +1 -1
- package/dist/humain/web-access/vendor/utils.d.ts +1 -0
- package/dist/humain/web-access/vendor/utils.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/utils.js +3 -0
- package/dist/humain/web-access/vendor/utils.js.map +1 -1
- package/dist/humain/web-access/vendor/video-extract.js +2 -2
- package/dist/humain/web-access/vendor/video-extract.js.map +1 -1
- package/dist/humain/web-access/vendor/web-tool-core.d.ts +13 -0
- package/dist/humain/web-access/vendor/web-tool-core.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/web-tool-core.js +16 -5
- package/dist/humain/web-access/vendor/web-tool-core.js.map +1 -1
- package/dist/humain/web-access/vendor/youtube-extract.js +2 -2
- package/dist/humain/web-access/vendor/youtube-extract.js.map +1 -1
- package/dist/index.d.ts +0 -2
- 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 +96 -28
- package/dist/main.js.map +1 -1
- package/dist/modes/diagnostics-stderr.d.ts +4 -0
- package/dist/modes/diagnostics-stderr.d.ts.map +1 -0
- package/dist/modes/diagnostics-stderr.js +11 -0
- package/dist/modes/diagnostics-stderr.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +5 -2
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +14 -5
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts +2 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js +6 -0
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +10 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +101 -23
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +5 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +17 -6
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/radius-login-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/radius-login-selector.js +2 -1
- package/dist/modes/interactive/components/radius-login-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +13 -6
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +8 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +41 -9
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.js +5 -1
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +0 -17
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +1 -78
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/components/themed-text.d.ts +1 -1
- package/dist/modes/interactive/components/themed-text.d.ts.map +1 -1
- package/dist/modes/interactive/components/themed-text.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +5 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +3 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/trust-selector.js +14 -5
- package/dist/modes/interactive/components/trust-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +2 -2
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +20 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +605 -223
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-catalog-refresh.d.ts +4 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -1
- package/dist/modes/interactive/model-catalog-refresh.js +40 -1
- package/dist/modes/interactive/model-catalog-refresh.js.map +1 -1
- package/dist/modes/interactive/oauth-account-format.d.ts +6 -2
- package/dist/modes/interactive/oauth-account-format.d.ts.map +1 -1
- package/dist/modes/interactive/oauth-account-format.js +12 -3
- package/dist/modes/interactive/oauth-account-format.js.map +1 -1
- package/dist/modes/interactive/session-share.js +2 -0
- package/dist/modes/interactive/session-share.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +1 -0
- 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 +30 -32
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +26 -39
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +1 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +14 -1
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/abort.d.ts +5 -0
- package/dist/utils/abort.d.ts.map +1 -1
- package/dist/utils/abort.js +9 -0
- package/dist/utils/abort.js.map +1 -1
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +3 -2
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/flush-stdout.d.ts +8 -0
- package/dist/utils/flush-stdout.d.ts.map +1 -0
- package/dist/utils/flush-stdout.js +23 -0
- package/dist/utils/flush-stdout.js.map +1 -0
- package/dist/utils/image-process.d.ts +2 -0
- package/dist/utils/image-process.d.ts.map +1 -1
- package/dist/utils/image-process.js +3 -3
- package/dist/utils/image-process.js.map +1 -1
- package/dist/utils/image-resize-core.js +2 -2
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/shell.d.ts +2 -0
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +19 -0
- package/dist/utils/shell.js.map +1 -1
- package/docs/cli.md +1 -1
- package/docs/development.md +0 -13
- package/docs/extensions.md +6 -4
- package/docs/flow.md +4 -62
- package/docs/humain-code-forge-architecture.md +1 -47
- package/docs/humain-code-forge-flow-walkthrough.md +1 -1
- package/docs/humain-code.md +1 -1
- package/docs/keybindings.md +2 -0
- package/docs/llama-cpp.md +5 -5
- package/docs/models-configuration.md +4 -2
- package/docs/nvidia-rtx-llama-cpp.md +5 -5
- package/docs/providers.md +14 -9
- package/docs/rpc-commands.md +1 -1
- package/docs/run-preflight.md +1 -1
- package/docs/slash-commands.md +1 -1
- package/docs/tui.md +2 -0
- package/examples/README.md +0 -3
- package/examples/extensions/custom-provider-anthropic/package-lock.json +4 -4
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/gondolin/index.ts +4 -7
- package/examples/tsconfig.json +96 -76
- package/npm-shrinkwrap.json +285 -764
- package/package.json +24 -37
- package/schemas/keybindings.schema.json +20 -0
- package/schemas/models.schema.json +5 -1
- package/schemas/settings.schema.json +0 -13
- package/src/humain/web-access/UPSTREAM.md +52 -1
- package/src/humain/web-access/upstream.json +5 -5
- package/src/humain/web-access/vendor/CHANGELOG.md +29 -0
- package/dist/bundle/chunks/adaptive-peer-worker-X2ZNZE3S.js +0 -8
- package/dist/bundle/chunks/adaptive-session-host-7KDSQV5I.js +0 -162
- package/dist/bundle/chunks/anthropic-messages-TQK3FUV3.js +0 -68
- package/dist/bundle/chunks/azure-openai-responses-JY7OSLH2.js +0 -15
- package/dist/bundle/chunks/chunk-5L4PBYC7.js +0 -11
- package/dist/bundle/chunks/chunk-6PNQYO6A.js +0 -10
- package/dist/bundle/chunks/chunk-CRN54O4D.js +0 -24
- package/dist/bundle/chunks/chunk-CTU2ECLD.js +0 -7
- package/dist/bundle/chunks/chunk-DBL35X7L.js +0 -3
- package/dist/bundle/chunks/chunk-GME4AWDG.js +0 -23
- package/dist/bundle/chunks/chunk-GTILMMUF.js +0 -12
- package/dist/bundle/chunks/chunk-J57HOSWD.js +0 -21
- package/dist/bundle/chunks/chunk-KQM7ZGL6.js +0 -11
- package/dist/bundle/chunks/chunk-MX4Q4W6H.js +0 -214
- package/dist/bundle/chunks/chunk-NXA6NEHE.js +0 -54
- package/dist/bundle/chunks/chunk-PJACZCIR.js +0 -2
- package/dist/bundle/chunks/chunk-T5A6T24H.js +0 -93
- package/dist/bundle/chunks/chunk-WCFHG6NO.js +0 -16
- package/dist/bundle/chunks/chunk-ZJUU6WOV.js +0 -2052
- package/dist/bundle/chunks/compat-ZK2DIW3P.js +0 -15
- package/dist/bundle/chunks/dist-EY7YKQHB.js +0 -11
- package/dist/bundle/chunks/dist-J5IUPLMH.js +0 -37
- package/dist/bundle/chunks/dist-cjs-2SKN226B.js +0 -184
- package/dist/bundle/chunks/entry-AL54ZGYO.js +0 -2
- package/dist/bundle/chunks/es5-GYTRHFKS.js +0 -77
- package/dist/bundle/chunks/google-generative-ai-UL7YEQ6J.js +0 -21
- package/dist/bundle/chunks/google-vertex-OTMSPUYH.js +0 -26
- package/dist/bundle/chunks/host-75YAHLDR.js +0 -3
- package/dist/bundle/chunks/interactive-mode-IW4PIVAQ.js +0 -5
- package/dist/bundle/chunks/mistral-conversations-E72Y6OC3.js +0 -43
- package/dist/bundle/chunks/pdfjs-AKD6EBKN.js +0 -3614
- package/dist/bundle/chunks/pdfjs-jbig2_nowasm_fallback-FH3KJM4H.js +0 -326
- package/dist/bundle/chunks/pdfjs-openjpeg-SKR7C34X.js +0 -671
- package/dist/bundle/chunks/pdfjs-openjpeg_nowasm_fallback-VUBL7UEE.js +0 -974
- package/dist/bundle/chunks/session-picker-DM6S37IF.js +0 -4
- package/dist/bundle/chunks/startup-ui-4GGLWNSU.js +0 -3
- package/dist/bundle/chunks/virtual-modules-TI3W24YL.js +0 -28
- package/dist/core/internal-process.d.ts +0 -23
- package/dist/core/internal-process.d.ts.map +0 -1
- package/dist/core/internal-process.js +0 -88
- package/dist/core/internal-process.js.map +0 -1
- package/dist/humain/adaptive-execution.d.ts +0 -51
- package/dist/humain/adaptive-execution.d.ts.map +0 -1
- package/dist/humain/adaptive-execution.js +0 -100
- package/dist/humain/adaptive-execution.js.map +0 -1
- package/dist/humain/adaptive-peer-process.d.ts +0 -44
- package/dist/humain/adaptive-peer-process.d.ts.map +0 -1
- package/dist/humain/adaptive-peer-process.js +0 -159
- package/dist/humain/adaptive-peer-process.js.map +0 -1
- package/dist/humain/adaptive-peer-worker.d.ts +0 -3
- package/dist/humain/adaptive-peer-worker.d.ts.map +0 -1
- package/dist/humain/adaptive-peer-worker.js +0 -122
- package/dist/humain/adaptive-peer-worker.js.map +0 -1
- package/dist/humain/adaptive-runtime-types.d.ts +0 -621
- package/dist/humain/adaptive-runtime-types.d.ts.map +0 -1
- package/dist/humain/adaptive-runtime-types.js +0 -3
- package/dist/humain/adaptive-runtime-types.js.map +0 -1
- package/dist/humain/adaptive-session-host.d.ts +0 -113
- package/dist/humain/adaptive-session-host.d.ts.map +0 -1
- package/dist/humain/adaptive-session-host.js +0 -1838
- package/dist/humain/adaptive-session-host.js.map +0 -1
- package/dist/utils/deprecation.d.ts +0 -4
- package/dist/utils/deprecation.d.ts.map +0 -1
- package/dist/utils/deprecation.js +0 -13
- package/dist/utils/deprecation.js.map +0 -1
- package/examples/plugins/pi-example-plugin/README.md +0 -38
- package/examples/plugins/pi-example-plugin/package.json +0 -10
- package/examples/plugins/pi-example-plugin/src/contract.ts +0 -13
- package/examples/plugins/pi-example-plugin/src/session.ts +0 -24
- package/examples/plugins/pi-example-plugin/src/tui.ts +0 -31
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
import { SafeCredentialError } from "../../core/safe-credential-error.js";
|
|
3
3
|
import { raceWithAbortSignal } from "../../utils/abort.js";
|
|
4
4
|
import { resolveHcodeEnvironment } from "./environment.js";
|
|
5
|
+
import { HCODE_LOGIN_FAILURES, HcodeHttpError } from "./login-failure.js";
|
|
5
6
|
export const HCODE_PROVIDER = "humain-code-account";
|
|
6
7
|
export const HCODE_MAX_CATALOG_RESPONSE_BYTES = 4194304;
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
// Control requests (config, discovery, device and token endpoints, account, catalog) outlast Forge's 3,000 ms bearer
|
|
9
|
+
// check plus policy and transport work, and a slow issuer's token reply, whose loss would spend a device code.
|
|
10
|
+
const HCODE_CONTROL_TIMEOUT_MS = 10_000;
|
|
11
|
+
/** Shutdown/revocation keeps its independent 3,000 ms bound, not the longer control budget. */
|
|
12
|
+
export const HCODE_REVOCATION_TIMEOUT_MS = 3_000;
|
|
11
13
|
const METHODS = {
|
|
12
14
|
"/api/user/account": "GET",
|
|
13
15
|
"/api/inference/models": "GET",
|
|
@@ -39,7 +41,7 @@ export function assertHcodeRequest(url, init, environment = resolveHcodeEnvironm
|
|
|
39
41
|
export async function readHcodeJson(response, max = 1048576, signal) {
|
|
40
42
|
if (!response.ok) {
|
|
41
43
|
await response.body?.cancel().catch(() => { });
|
|
42
|
-
throw new
|
|
44
|
+
throw new HcodeHttpError("unavailable");
|
|
43
45
|
}
|
|
44
46
|
const reader = response.body?.getReader();
|
|
45
47
|
if (!reader || Number(response.headers.get("content-length")) > max) {
|
|
@@ -50,7 +52,10 @@ export async function readHcodeJson(response, max = 1048576, signal) {
|
|
|
50
52
|
let size = 0;
|
|
51
53
|
try {
|
|
52
54
|
for (;;) {
|
|
53
|
-
const
|
|
55
|
+
const read = reader.read();
|
|
56
|
+
const next = await (signal ? raceWithAbortSignal(read, signal) : read).catch(() => {
|
|
57
|
+
throw new HcodeHttpError("unavailable");
|
|
58
|
+
});
|
|
54
59
|
if (next.done)
|
|
55
60
|
break;
|
|
56
61
|
size += next.value.byteLength;
|
|
@@ -58,34 +63,44 @@ export async function readHcodeJson(response, max = 1048576, signal) {
|
|
|
58
63
|
throw new Error("Invalid HUMAIN Code response.");
|
|
59
64
|
chunks.push(next.value);
|
|
60
65
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
try {
|
|
67
|
+
return JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(Buffer.concat(chunks)));
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
throw new Error("Invalid HUMAIN Code response.");
|
|
71
|
+
}
|
|
65
72
|
}
|
|
66
73
|
finally {
|
|
67
74
|
void reader.cancel().catch(() => { });
|
|
68
75
|
}
|
|
69
76
|
}
|
|
70
77
|
/** Executes one bounded control request. Never follows redirects or retries. */
|
|
71
|
-
export async function hcodeJson(fetcher, url, init) {
|
|
78
|
+
export async function hcodeJson(fetcher, url, init, timeoutMs = HCODE_CONTROL_TIMEOUT_MS) {
|
|
72
79
|
const path = new URL(url).pathname;
|
|
73
80
|
const catalog = path === "/api/inference/models";
|
|
74
|
-
const
|
|
81
|
+
const account = path === "/api/user/account";
|
|
82
|
+
// Only the account read names its failing stage; the fixed text replaces the transport or parse error.
|
|
83
|
+
const accountFailure = (stage, error) => account ? new SafeCredentialError(HCODE_LOGIN_FAILURES[stage]) : error;
|
|
75
84
|
const controller = new AbortController();
|
|
76
85
|
const signal = init.signal ? AbortSignal.any([init.signal, controller.signal]) : controller.signal;
|
|
77
86
|
let timer;
|
|
78
87
|
try {
|
|
79
88
|
return await Promise.race([
|
|
80
89
|
(async () => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
90
|
+
let response;
|
|
91
|
+
try {
|
|
92
|
+
response = await fetcher(url, {
|
|
93
|
+
...init,
|
|
94
|
+
signal,
|
|
95
|
+
redirect: "error",
|
|
96
|
+
credentials: "omit",
|
|
97
|
+
cache: "no-store",
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
throw accountFailure("accountTransport", new HcodeHttpError("unavailable"));
|
|
102
|
+
}
|
|
103
|
+
if (account && !response.ok) {
|
|
89
104
|
void response.body?.cancel().catch(() => { });
|
|
90
105
|
// The server's body and authentication headers are untrusted and may contain credentials.
|
|
91
106
|
const reason = response.status === 401
|
|
@@ -97,18 +112,24 @@ export async function hcodeJson(fetcher, url, init) {
|
|
|
97
112
|
: "account request rejected";
|
|
98
113
|
throw new SafeCredentialError(`HUMAIN Code rejected the sign-in (${response.status}: ${reason}).`);
|
|
99
114
|
}
|
|
100
|
-
|
|
115
|
+
try {
|
|
116
|
+
return await readHcodeJson(response, catalog ? HCODE_MAX_CATALOG_RESPONSE_BYTES : 1048576, signal);
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
throw accountFailure("accountResponse", error);
|
|
120
|
+
}
|
|
101
121
|
})(),
|
|
102
122
|
new Promise((_resolve, reject) => {
|
|
103
123
|
timer = setTimeout(() => {
|
|
124
|
+
reject(accountFailure("accountTransport", new HcodeHttpError("timeout")));
|
|
104
125
|
controller.abort();
|
|
105
|
-
reject(new Error("HUMAIN Code request timed out."));
|
|
106
126
|
}, timeoutMs);
|
|
107
127
|
}),
|
|
108
128
|
]);
|
|
109
129
|
}
|
|
110
130
|
catch (error) {
|
|
111
|
-
|
|
131
|
+
// The timeout aborts the request signal itself; only caller cancellation hides a named stage.
|
|
132
|
+
if ((error instanceof SafeCredentialError || error instanceof HcodeHttpError) && !init.signal?.aborted)
|
|
112
133
|
throw error;
|
|
113
134
|
throw new Error("HUMAIN Code request unavailable.");
|
|
114
135
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/humain/hcode/http.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAyB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAClF,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC;AACpD,MAAM,CAAC,MAAM,gCAAgC,GAAG,OAAO,CAAC;AACxD,8FAA8F;AAC9F,MAAM,6BAA6B,GAAG,MAAM,CAAC;AAC7C,gGAAgG;AAChG,MAAM,wBAAwB,GAAG,KAAK,CAAC;AACvC,MAAM,OAAO,GAAqC;IACjD,mBAAmB,EAAE,KAAK;IAC1B,uBAAuB,EAAE,KAAK;IAC9B,yBAAyB,EAAE,MAAM;IACjC,iBAAiB,EAAE,KAA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// Built-in environment destinations and bounded, non-reflecting control-plane HTTP reads.\nimport { SafeCredentialError } from \"../../core/safe-credential-error.ts\";\nimport { raceWithAbortSignal } from \"../../utils/abort.ts\";\nimport { type HcodeEnvironment, resolveHcodeEnvironment } from \"./environment.ts\";\nexport const HCODE_PROVIDER = \"humain-code-account\";\nexport const HCODE_MAX_CATALOG_RESPONSE_BYTES = 4194304;\n// Account/catalog reads outlast Forge's 3,000 ms bearer check plus policy and transport work.\nconst HCODE_CONTROL_READ_TIMEOUT_MS = 10_000;\n// Shutdown/revocation keeps its independent 3,000 ms bound, not the longer control-read budget.\nconst HCODE_REQUEST_TIMEOUT_MS = 3_000;\nconst METHODS: Readonly<Record<string, string>> = {\n\t\"/api/user/account\": \"GET\",\n\t\"/api/inference/models\": \"GET\",\n\t\"/api/inference/messages\": \"POST\",\n\t\"/api/user/usage\": \"GET\",\n\t\"/api/analytics/cli\": \"POST\",\n};\n\n/** Rejects every destination outside the fixed managed HTTP resource set before touching credentials. */\nexport function assertHcodeRequest(\n\turl: string,\n\tinit: RequestInit,\n\tenvironment: HcodeEnvironment = resolveHcodeEnvironment(),\n): void {\n\tconst parsed = new URL(url);\n\tif (\n\t\tparsed.origin !== environment.origin ||\n\t\tparsed.username ||\n\t\tparsed.password ||\n\t\tparsed.hash ||\n\t\tparsed.href !== url ||\n\t\tMETHODS[parsed.pathname] !== (init.method ?? \"GET\").toUpperCase()\n\t)\n\t\tthrow new Error(\"Unsupported HUMAIN Code request destination.\");\n\tif (parsed.pathname !== \"/api/user/usage\" && parsed.search)\n\t\tthrow new Error(\"Unsupported HUMAIN Code request query.\");\n\tif (parsed.pathname === \"/api/user/usage\") {\n\t\tconst names = [...parsed.searchParams.keys()];\n\t\tif (new Set(names).size !== names.length || names.some((key) => ![\"cursor\", \"limit\", \"surface\"].includes(key)))\n\t\t\tthrow new Error(\"Unsupported HUMAIN Code request query.\");\n\t}\n\tif (init.redirect !== undefined && init.redirect !== \"error\") throw new Error(\"HUMAIN Code redirects are disabled.\");\n}\n\n/** Reads a bounded response without reflecting remote content or errors. */\nexport async function readHcodeJson(response: Response, max = 1048576, signal?: AbortSignal): Promise<unknown> {\n\tif (!response.ok) {\n\t\tawait response.body?.cancel().catch(() => {});\n\t\tthrow new Error(\"HUMAIN Code request unavailable.\");\n\t}\n\tconst reader = response.body?.getReader();\n\tif (!reader || Number(response.headers.get(\"content-length\")) > max) {\n\t\tawait reader?.cancel().catch(() => {});\n\t\tthrow new Error(\"Invalid HUMAIN Code response.\");\n\t}\n\tconst chunks: Uint8Array[] = [];\n\tlet size = 0;\n\ttry {\n\t\tfor (;;) {\n\t\t\tconst next = signal ? await raceWithAbortSignal(reader.read(), signal) : await reader.read();\n\t\t\tif (next.done) break;\n\t\t\tsize += next.value.byteLength;\n\t\t\tif (size > max) throw new Error(\"Invalid HUMAIN Code response.\");\n\t\t\tchunks.push(next.value);\n\t\t}\n\t\treturn JSON.parse(new TextDecoder(\"utf-8\", { fatal: true }).decode(Buffer.concat(chunks)));\n\t} catch {\n\t\tthrow new Error(\"Invalid HUMAIN Code response.\");\n\t} finally {\n\t\tvoid reader.cancel().catch(() => {});\n\t}\n}\n\n/** Executes one bounded control request. Never follows redirects or retries. */\nexport async function hcodeJson(fetcher: typeof fetch, url: string, init: RequestInit): Promise<unknown> {\n\tconst path = new URL(url).pathname;\n\tconst catalog = path === \"/api/inference/models\";\n\tconst timeoutMs = catalog || path === \"/api/user/account\" ? HCODE_CONTROL_READ_TIMEOUT_MS : HCODE_REQUEST_TIMEOUT_MS;\n\tconst controller = new AbortController();\n\tconst signal = init.signal ? AbortSignal.any([init.signal, controller.signal]) : controller.signal;\n\tlet timer: ReturnType<typeof setTimeout> | undefined;\n\ttry {\n\t\treturn await Promise.race([\n\t\t\t(async () => {\n\t\t\t\tconst response = await fetcher(url, {\n\t\t\t\t\t...init,\n\t\t\t\t\tsignal,\n\t\t\t\t\tredirect: \"error\",\n\t\t\t\t\tcredentials: \"omit\",\n\t\t\t\t\tcache: \"no-store\",\n\t\t\t\t});\n\t\t\t\tif (path === \"/api/user/account\" && !response.ok) {\n\t\t\t\t\tvoid response.body?.cancel().catch(() => {});\n\t\t\t\t\t// The server's body and authentication headers are untrusted and may contain credentials.\n\t\t\t\t\tconst reason =\n\t\t\t\t\t\tresponse.status === 401\n\t\t\t\t\t\t\t? \"account bearer validation failed\"\n\t\t\t\t\t\t\t: response.status === 403\n\t\t\t\t\t\t\t\t? \"account access denied\"\n\t\t\t\t\t\t\t\t: response.status === 503\n\t\t\t\t\t\t\t\t\t? \"account service unavailable\"\n\t\t\t\t\t\t\t\t\t: \"account request rejected\";\n\t\t\t\t\tthrow new SafeCredentialError(`HUMAIN Code rejected the sign-in (${response.status}: ${reason}).`);\n\t\t\t\t}\n\t\t\t\treturn readHcodeJson(response, catalog ? HCODE_MAX_CATALOG_RESPONSE_BYTES : 1048576, signal);\n\t\t\t})(),\n\t\t\tnew Promise<never>((_resolve, reject) => {\n\t\t\t\ttimer = setTimeout(() => {\n\t\t\t\t\tcontroller.abort();\n\t\t\t\t\treject(new Error(\"HUMAIN Code request timed out.\"));\n\t\t\t\t}, timeoutMs);\n\t\t\t}),\n\t\t]);\n\t} catch (error) {\n\t\tif (error instanceof SafeCredentialError && !signal.aborted) throw error;\n\t\tthrow new Error(\"HUMAIN Code request unavailable.\");\n\t} finally {\n\t\tclearTimeout(timer);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/humain/hcode/http.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAyB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC1E,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,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mBAAmB,CAAC,qCAAqC,QAAQ,CAAC,MAAM,KAAK,MAAM,IAAI,CAAC,CAAC;gBACpG,CAAC;gBACD,IAAI,CAAC;oBACJ,OAAO,MAAM,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBACpG,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBAChB,MAAM,cAAc,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;gBAChD,CAAC;YACF,CAAC,CAAC,EAAE;YACJ,IAAI,OAAO,CAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE;gBACvC,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;oBACvB,MAAM,CAAC,cAAc,CAAC,kBAAkB,EAAE,IAAI,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;oBAC1E,UAAU,CAAC,KAAK,EAAE,CAAC;gBACpB,CAAC,EAAE,SAAS,CAAC,CAAC;YACf,CAAC,CAAC;SACF,CAAC,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,8FAA8F;QAC9F,IAAI,CAAC,KAAK,YAAY,mBAAmB,IAAI,KAAK,YAAY,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO;YACrG,MAAM,KAAK,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACrD,CAAC;YAAS,CAAC;QACV,YAAY,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;AACF,CAAC","sourcesContent":["// Built-in environment destinations and bounded, non-reflecting control-plane HTTP reads.\nimport { SafeCredentialError } from \"../../core/safe-credential-error.ts\";\nimport { raceWithAbortSignal } from \"../../utils/abort.ts\";\nimport { type HcodeEnvironment, resolveHcodeEnvironment } from \"./environment.ts\";\nimport { HCODE_LOGIN_FAILURES, HcodeHttpError } from \"./login-failure.ts\";\nexport const HCODE_PROVIDER = \"humain-code-account\";\nexport const HCODE_MAX_CATALOG_RESPONSE_BYTES = 4194304;\n// Control requests (config, discovery, device and token endpoints, account, catalog) outlast Forge's 3,000 ms bearer\n// check plus policy and transport work, and a slow issuer's token reply, whose loss would spend a device code.\nconst HCODE_CONTROL_TIMEOUT_MS = 10_000;\n/** Shutdown/revocation keeps its independent 3,000 ms bound, not the longer control budget. */\nexport const HCODE_REVOCATION_TIMEOUT_MS = 3_000;\nconst METHODS: Readonly<Record<string, string>> = {\n\t\"/api/user/account\": \"GET\",\n\t\"/api/inference/models\": \"GET\",\n\t\"/api/inference/messages\": \"POST\",\n\t\"/api/user/usage\": \"GET\",\n\t\"/api/analytics/cli\": \"POST\",\n};\n\n/** Rejects every destination outside the fixed managed HTTP resource set before touching credentials. */\nexport function assertHcodeRequest(\n\turl: string,\n\tinit: RequestInit,\n\tenvironment: HcodeEnvironment = resolveHcodeEnvironment(),\n): void {\n\tconst parsed = new URL(url);\n\tif (\n\t\tparsed.origin !== environment.origin ||\n\t\tparsed.username ||\n\t\tparsed.password ||\n\t\tparsed.hash ||\n\t\tparsed.href !== url ||\n\t\tMETHODS[parsed.pathname] !== (init.method ?? \"GET\").toUpperCase()\n\t)\n\t\tthrow new Error(\"Unsupported HUMAIN Code request destination.\");\n\tif (parsed.pathname !== \"/api/user/usage\" && parsed.search)\n\t\tthrow new Error(\"Unsupported HUMAIN Code request query.\");\n\tif (parsed.pathname === \"/api/user/usage\") {\n\t\tconst names = [...parsed.searchParams.keys()];\n\t\tif (new Set(names).size !== names.length || names.some((key) => ![\"cursor\", \"limit\", \"surface\"].includes(key)))\n\t\t\tthrow new Error(\"Unsupported HUMAIN Code request query.\");\n\t}\n\tif (init.redirect !== undefined && init.redirect !== \"error\") throw new Error(\"HUMAIN Code redirects are disabled.\");\n}\n\n/** Reads a bounded response without reflecting remote content or errors. */\nexport async function readHcodeJson(response: Response, max = 1048576, signal?: AbortSignal): Promise<unknown> {\n\tif (!response.ok) {\n\t\tawait response.body?.cancel().catch(() => {});\n\t\tthrow new HcodeHttpError(\"unavailable\");\n\t}\n\tconst reader = response.body?.getReader();\n\tif (!reader || Number(response.headers.get(\"content-length\")) > max) {\n\t\tawait reader?.cancel().catch(() => {});\n\t\tthrow new Error(\"Invalid HUMAIN Code response.\");\n\t}\n\tconst chunks: Uint8Array[] = [];\n\tlet size = 0;\n\ttry {\n\t\tfor (;;) {\n\t\t\tconst read = reader.read();\n\t\t\tconst next = await (signal ? raceWithAbortSignal(read, signal) : read).catch(() => {\n\t\t\t\tthrow new HcodeHttpError(\"unavailable\");\n\t\t\t});\n\t\t\tif (next.done) break;\n\t\t\tsize += next.value.byteLength;\n\t\t\tif (size > max) throw new Error(\"Invalid HUMAIN Code response.\");\n\t\t\tchunks.push(next.value);\n\t\t}\n\t\ttry {\n\t\t\treturn JSON.parse(new TextDecoder(\"utf-8\", { fatal: true }).decode(Buffer.concat(chunks)));\n\t\t} catch {\n\t\t\tthrow new Error(\"Invalid HUMAIN Code response.\");\n\t\t}\n\t} finally {\n\t\tvoid reader.cancel().catch(() => {});\n\t}\n}\n\n/** Executes one bounded control request. Never follows redirects or retries. */\nexport async function hcodeJson(\n\tfetcher: typeof fetch,\n\turl: string,\n\tinit: RequestInit,\n\ttimeoutMs = HCODE_CONTROL_TIMEOUT_MS,\n): Promise<unknown> {\n\tconst path = new URL(url).pathname;\n\tconst catalog = path === \"/api/inference/models\";\n\tconst account = path === \"/api/user/account\";\n\t// Only the account read names its failing stage; the fixed text replaces the transport or parse error.\n\tconst accountFailure = (stage: \"accountTransport\" | \"accountResponse\", error: unknown) =>\n\t\taccount ? new SafeCredentialError(HCODE_LOGIN_FAILURES[stage]) : error;\n\tconst controller = new AbortController();\n\tconst signal = init.signal ? AbortSignal.any([init.signal, controller.signal]) : controller.signal;\n\tlet timer: ReturnType<typeof setTimeout> | undefined;\n\ttry {\n\t\treturn await Promise.race([\n\t\t\t(async () => {\n\t\t\t\tlet response: Response;\n\t\t\t\ttry {\n\t\t\t\t\tresponse = await fetcher(url, {\n\t\t\t\t\t\t...init,\n\t\t\t\t\t\tsignal,\n\t\t\t\t\t\tredirect: \"error\",\n\t\t\t\t\t\tcredentials: \"omit\",\n\t\t\t\t\t\tcache: \"no-store\",\n\t\t\t\t\t});\n\t\t\t\t} catch {\n\t\t\t\t\tthrow accountFailure(\"accountTransport\", new HcodeHttpError(\"unavailable\"));\n\t\t\t\t}\n\t\t\t\tif (account && !response.ok) {\n\t\t\t\t\tvoid response.body?.cancel().catch(() => {});\n\t\t\t\t\t// The server's body and authentication headers are untrusted and may contain credentials.\n\t\t\t\t\tconst reason =\n\t\t\t\t\t\tresponse.status === 401\n\t\t\t\t\t\t\t? \"account bearer validation failed\"\n\t\t\t\t\t\t\t: response.status === 403\n\t\t\t\t\t\t\t\t? \"account access denied\"\n\t\t\t\t\t\t\t\t: response.status === 503\n\t\t\t\t\t\t\t\t\t? \"account service unavailable\"\n\t\t\t\t\t\t\t\t\t: \"account request rejected\";\n\t\t\t\t\tthrow new SafeCredentialError(`HUMAIN Code rejected the sign-in (${response.status}: ${reason}).`);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\treturn await readHcodeJson(response, catalog ? HCODE_MAX_CATALOG_RESPONSE_BYTES : 1048576, signal);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthrow accountFailure(\"accountResponse\", error);\n\t\t\t\t}\n\t\t\t})(),\n\t\t\tnew Promise<never>((_resolve, reject) => {\n\t\t\t\ttimer = setTimeout(() => {\n\t\t\t\t\treject(accountFailure(\"accountTransport\", new HcodeHttpError(\"timeout\")));\n\t\t\t\t\tcontroller.abort();\n\t\t\t\t}, timeoutMs);\n\t\t\t}),\n\t\t]);\n\t} catch (error) {\n\t\t// The timeout aborts the request signal itself; only caller cancellation hides a named stage.\n\t\tif ((error instanceof SafeCredentialError || error instanceof HcodeHttpError) && !init.signal?.aborted)\n\t\t\tthrow error;\n\t\tthrow new Error(\"HUMAIN Code request unavailable.\");\n\t} finally {\n\t\tclearTimeout(timer);\n\t}\n}\n"]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { AgentMessage } from "@earendil-works/pi-agent-core";
|
|
2
|
+
import type { Api, Model } from "@earendil-works/pi-ai";
|
|
3
|
+
/** Why an image cannot be part of a HUMAIN Code request. */
|
|
4
|
+
export type HcodeImageReason = "blocked" | "unsupported" | "perMessage" | "perRequest" | "aggregateBytes" | "requestBytes" | "size" | "invalid";
|
|
5
|
+
export declare const hcodeActivePrompts: WeakSet<readonly unknown[]>;
|
|
6
|
+
/** Observe serialized image omissions for this session's requests, not other sessions sharing the provider. */
|
|
7
|
+
export declare function observeHcodeImageOmissions<T>(observe: (message: string) => void, run: () => T, { autoResizeImages, onImageSizeRefusal, }?: {
|
|
8
|
+
autoResizeImages?: boolean;
|
|
9
|
+
onImageSizeRefusal?: () => void;
|
|
10
|
+
}): T;
|
|
11
|
+
/** Record fresh attachments refused before dispatch so the session can omit them from subsequent projections. */
|
|
12
|
+
export declare function reportHcodeImageSizeRefusal(): void;
|
|
13
|
+
/** Report wire-level omissions after the final transport dispatches the request. */
|
|
14
|
+
export declare function reportHcodeImageOmissions(count: number, model: Model<Api>): void;
|
|
15
|
+
/** Format the notice presented to the caller for projected or serialized omissions. */
|
|
16
|
+
export declare function hcodeImageOmissionNotice(count: number, reason: HcodeImageReason, model: Model<Api>): string;
|
|
17
|
+
/** Request messages with every image fitted, and the images that had to be left out (by message index). */
|
|
18
|
+
export interface FittedHcodeImages {
|
|
19
|
+
messages: AgentMessage[];
|
|
20
|
+
omitted: {
|
|
21
|
+
index: number;
|
|
22
|
+
reason: HcodeImageReason;
|
|
23
|
+
}[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Downscale or recompress every image to the model's catalog limits. Newer messages keep their images
|
|
27
|
+
* first; images over the count limits or that cannot fit become a text note, so one bad image never
|
|
28
|
+
* blocks later requests. Original messages are not changed.
|
|
29
|
+
*/
|
|
30
|
+
export declare function fitHcodeImages(model: Model<Api>, messages: AgentMessage[], { autoResizeImages, blockImages }: {
|
|
31
|
+
autoResizeImages: boolean;
|
|
32
|
+
blockImages: boolean;
|
|
33
|
+
}, fresh: ReadonlySet<AgentMessage>, rejected?: ReadonlySet<AgentMessage>): Promise<FittedHcodeImages>;
|
|
34
|
+
type PayloadMessage = {
|
|
35
|
+
content: string | readonly {
|
|
36
|
+
type: string;
|
|
37
|
+
}[];
|
|
38
|
+
};
|
|
39
|
+
/** Isolate the transcript from payload hooks and retain image provenance across reordering or cloning. */
|
|
40
|
+
export declare function hcodeImagePayloadDraft<T extends {
|
|
41
|
+
context: {
|
|
42
|
+
messages: PayloadMessage[];
|
|
43
|
+
};
|
|
44
|
+
}>(payload: T, active: ReadonlySet<number>): {
|
|
45
|
+
draft: T;
|
|
46
|
+
protectedMessages: (messages: PayloadMessage[]) => Set<number>;
|
|
47
|
+
};
|
|
48
|
+
/** The catalog and hard wire limits apply to the exact JSON, including image metadata and options. */
|
|
49
|
+
export declare function fitHcodeRequestSize<T extends {
|
|
50
|
+
role: string;
|
|
51
|
+
content: string | readonly {
|
|
52
|
+
type: string;
|
|
53
|
+
}[];
|
|
54
|
+
}>(model: Model<Api>, messages: T[], active: ReadonlySet<number>, serialize: (messages: T[]) => string): Promise<{
|
|
55
|
+
body: string;
|
|
56
|
+
omitted: number;
|
|
57
|
+
} | undefined>;
|
|
58
|
+
/** One plain message per refusal cause, naming the catalog limit that applies. */
|
|
59
|
+
export declare function hcodeImageMessage(reason: HcodeImageReason, model: Model<Api>): string;
|
|
60
|
+
/** Refuse a request whose images do not meet the model's limits; the final guard before the wire. */
|
|
61
|
+
export declare function validateHcodeImages(model: Model<Api>, messages: readonly {
|
|
62
|
+
content: string | readonly {
|
|
63
|
+
type: string;
|
|
64
|
+
}[];
|
|
65
|
+
}[]): Promise<void>;
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=images.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
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