@humain/humain-code 0.8.4 → 0.8.7
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 +31 -0
- package/dist/bundle/agent-monitor.js +1 -1
- package/dist/bundle/chunks/{anthropic-messages-42CGJCSR.js → anthropic-messages-QMSJV4J5.js} +3 -3
- package/dist/bundle/chunks/{ask-VH7GNX75.js → ask-VVSJA5VG.js} +2 -2
- package/dist/bundle/chunks/{azure-openai-responses-DOKKMBUN.js → azure-openai-responses-P57ZD6XP.js} +3 -3
- package/dist/bundle/chunks/chunk-2QVKRSKH.js +4 -0
- package/dist/bundle/chunks/{chunk-OTVHRZ67.js → chunk-3BZUQ54Z.js} +1 -1
- package/dist/bundle/chunks/{chunk-XGOJCV6Z.js → chunk-4K6ISLTX.js} +1 -1
- package/dist/bundle/chunks/{chunk-BNZZJ4LO.js → chunk-4QVJYVS5.js} +1 -1
- package/dist/bundle/chunks/{chunk-MXF3KYLZ.js → chunk-4UXFF4IH.js} +1 -1
- package/dist/bundle/chunks/{chunk-J5YFXMTM.js → chunk-6PJEPQBW.js} +2 -2
- package/dist/bundle/chunks/{chunk-4SL6URR3.js → chunk-7X7QN6MX.js} +5 -3
- package/dist/bundle/chunks/{chunk-XGSJX23G.js → chunk-A7AH3VMJ.js} +69 -66
- package/dist/bundle/chunks/{chunk-H35P7ROY.js → chunk-B345VDHB.js} +9 -7
- package/dist/bundle/chunks/{chunk-A5ZMBTTM.js → chunk-B57IK7TV.js} +2 -2
- package/dist/bundle/chunks/{chunk-KJ3QRSSY.js → chunk-BVBEJBVY.js} +1 -1
- package/dist/bundle/chunks/{chunk-AER66CNP.js → chunk-BXDTDGHH.js} +1 -1
- package/dist/bundle/chunks/chunk-CDLUE6BJ.js +4 -0
- package/dist/bundle/chunks/{chunk-FLWO3H5J.js → chunk-DBC6XUKA.js} +1 -1
- package/dist/bundle/chunks/{chunk-HWXQCJDP.js → chunk-EB2ZJYOO.js} +295 -254
- package/dist/bundle/chunks/{chunk-4BNDLR6C.js → chunk-EK4QE622.js} +147 -37
- package/dist/bundle/chunks/{chunk-K5EFEIFP.js → chunk-H6CKS7HC.js} +1 -1
- package/dist/bundle/chunks/{chunk-UTRUALFN.js → chunk-HV25WMNO.js} +1 -1
- package/dist/bundle/chunks/{chunk-73YX5XGR.js → chunk-IP7R6BIN.js} +1079 -657
- package/dist/bundle/chunks/{chunk-HRNYDRL7.js → chunk-J5R2BQJS.js} +1 -1
- package/dist/bundle/chunks/{chunk-5C5K4EVJ.js → chunk-JNSFJADB.js} +1 -1
- package/dist/bundle/chunks/{chunk-CG43CMFH.js → chunk-KBIPIIKE.js} +1 -1
- package/dist/bundle/chunks/{chunk-CIAXW64K.js → chunk-MS3SLC2V.js} +10 -10
- package/dist/bundle/chunks/{chunk-WCKS2DPT.js → chunk-NO6T6CDO.js} +1 -1
- package/dist/bundle/chunks/{chunk-EVDQRT3I.js → chunk-NSSJ6OJK.js} +141 -225
- package/dist/bundle/chunks/{chunk-MZYHSWHX.js → chunk-OR3ORXP3.js} +2 -2
- package/dist/bundle/chunks/{chunk-MLOUZAVZ.js → chunk-PU7SKUJ6.js} +2 -2
- package/dist/bundle/chunks/{chunk-QZXLTW7V.js → chunk-RRGJHRKF.js} +1 -1
- package/dist/bundle/chunks/{chunk-625QJSFJ.js → chunk-SDPK3KZ3.js} +1 -1
- package/dist/bundle/chunks/{chunk-ZFFDBTG3.js → chunk-SPLJOIKL.js} +1 -1
- package/dist/bundle/chunks/{chunk-O44A4E4K.js → chunk-TNKPCYIM.js} +1 -1
- package/dist/bundle/chunks/{chunk-5KUCY54O.js → chunk-UY5TOBH2.js} +1 -1
- package/dist/bundle/chunks/{chunk-ARTF7ZMQ.js → chunk-VFPA5KPR.js} +1 -1
- package/dist/bundle/chunks/chunk-VP27C46J.js +23 -0
- package/dist/bundle/chunks/{chunk-B3FT6L6S.js → chunk-XZJT5U3V.js} +1 -1
- package/dist/bundle/chunks/{chunk-UOSJTMCL.js → chunk-YCGPXBJP.js} +1 -1
- package/dist/bundle/chunks/{chunk-52642TYH.js → chunk-YRSNKHEF.js} +389 -783
- package/dist/bundle/chunks/{chunk-MQYR4Q6X.js → chunk-YSRWNEZW.js} +1 -1
- package/dist/bundle/chunks/{chunk-SOE25WIS.js → chunk-ZAO4KC6J.js} +1054 -1069
- package/dist/bundle/chunks/{chunk-V2HTCZRF.js → chunk-ZXOTVZUX.js} +1 -1
- package/dist/bundle/chunks/{chunk-T5WECB2D.js → chunk-ZZNGVD5Q.js} +1 -1
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-ZAZW4M4B.js → cloudflare-workers-ai-system-one-4BO66KHO.js} +1 -1
- package/dist/bundle/chunks/{compat-7UJJAO4E.js → compat-EOHVO2W3.js} +4 -4
- package/dist/bundle/chunks/{curator-server-MW645JI3.js → curator-server-72V7LMHQ.js} +1 -1
- package/dist/bundle/chunks/{dist-7PCCEUQF.js → dist-FW7ELRQH.js} +1 -1
- package/dist/bundle/chunks/{dist-I53JI67E.js → dist-YEVRRTWL.js} +8 -8
- package/dist/bundle/chunks/{dist-VXQT3DQY.js → dist-ZRUKAVTU.js} +3 -3
- package/dist/bundle/chunks/{doctor-KJVAYG3F.js → doctor-HJKC434Y.js} +29 -28
- package/dist/bundle/chunks/{easter-egg-3d-Z24JLXD4.js → easter-egg-3d-M37PJBL5.js} +1 -1
- package/dist/bundle/chunks/entry-M5TRX7N4.js +2 -0
- package/dist/bundle/chunks/{execute-C4BZQRPQ.js → execute-MIXK3CFW.js} +2 -2
- package/dist/bundle/chunks/{extract-XVQCIS7D.js → extract-WB6Y6ISY.js} +2 -2
- package/dist/bundle/chunks/{flow-implementer-GE2ARQKR.js → flow-implementer-ZNK5KVOG.js} +5 -5
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/{google-generative-ai-P2P45MYP.js → google-generative-ai-B2BT7X4W.js} +3 -3
- package/dist/bundle/chunks/{google-vertex-SHY4IS5F.js → google-vertex-PCFDFRHY.js} +3 -3
- package/dist/bundle/chunks/{host-YESS2VAB.js → host-RF6R6GLZ.js} +1 -1
- package/dist/bundle/chunks/{inprocess-MGMVI6HN.js → inprocess-6MLIANGV.js} +6 -6
- package/dist/bundle/chunks/interactive-mode-QKREO5BH.js +6 -0
- package/dist/bundle/chunks/{llama-cpp-classify-RSRH4KV2.js → llama-cpp-classify-DMJSUUAD.js} +1 -1
- package/dist/bundle/chunks/{mistral-conversations-YTMJKHHI.js → mistral-conversations-OXWTIYWX.js} +2 -2
- package/dist/bundle/chunks/{openai-codex-responses-NUCJOJSZ.js → openai-codex-responses-YGXOZKWL.js} +3 -3
- package/dist/bundle/chunks/{openai-completions-E5NRJUHA.js → openai-completions-WDVOHMN6.js} +4 -4
- package/dist/bundle/chunks/{openai-decisions-342J5ZYG.js → openai-decisions-45LGQAD5.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-BN5Z4HFI.js → openai-responses-OZDPUN4M.js} +3 -3
- package/dist/bundle/chunks/{openrouter-images-7RNG3JVF.js → openrouter-images-2IKRVRTZ.js} +2 -2
- package/dist/bundle/chunks/{pi-messages-2L7FV5OK.js → pi-messages-VZOJLMWW.js} +2 -2
- package/dist/bundle/chunks/{questionnaire-session-XEVAK7JS.js → questionnaire-session-RSZE5I3P.js} +2 -2
- package/dist/bundle/chunks/{session-picker-666KJIVM.js → session-picker-EUPZJEFF.js} +2 -2
- package/dist/bundle/chunks/{startup-ui-INEVSNGK.js → startup-ui-RTSTUGUC.js} +2 -2
- package/dist/bundle/chunks/{typesafe-system-one-UJUNSZG4.js → typesafe-system-one-IVWD24CQ.js} +1 -1
- package/dist/bundle/chunks/{virtual-modules-UXSSFNV5.js → virtual-modules-LS3DOCYU.js} +8 -8
- package/dist/bundle/cli-runtime.js +5 -5
- package/dist/bundle/flow/package.json +1 -1
- package/dist/bundle/index.js +11 -11
- package/dist/bundle/rpc-entry.js +5 -5
- package/dist/coordination/adapter/delivery.d.ts +6 -0
- package/dist/coordination/adapter/delivery.d.ts.map +1 -1
- package/dist/coordination/adapter/delivery.js +39 -4
- package/dist/coordination/adapter/delivery.js.map +1 -1
- package/dist/coordination/adapter/index.d.ts +2 -0
- package/dist/coordination/adapter/index.d.ts.map +1 -1
- package/dist/coordination/adapter/index.js +26 -0
- package/dist/coordination/adapter/index.js.map +1 -1
- package/dist/coordination/adapter/tool.js +3 -3
- package/dist/coordination/adapter/tool.js.map +1 -1
- package/dist/core/bug-report.d.ts +24 -1
- package/dist/core/bug-report.d.ts.map +1 -1
- package/dist/core/bug-report.js +216 -19
- package/dist/core/bug-report.js.map +1 -1
- package/dist/core/extensions/containment.d.ts +26 -0
- package/dist/core/extensions/containment.d.ts.map +1 -0
- package/dist/core/extensions/containment.js +66 -0
- package/dist/core/extensions/containment.js.map +1 -0
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +65 -7
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +2 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +55 -10
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +5 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js +4 -1
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +2 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +4 -0
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/keybindings.d.ts +16 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +2 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +5 -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 +10 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +31 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +5 -0
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +8 -0
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/forge-build-token.d.ts +3 -0
- package/dist/forge-build-token.d.ts.map +1 -0
- package/dist/forge-build-token.js +17 -0
- package/dist/forge-build-token.js.map +1 -0
- package/dist/humain/checklist/vendor/commands.d.ts +7 -0
- package/dist/humain/checklist/vendor/commands.d.ts.map +1 -1
- package/dist/humain/checklist/vendor/commands.js +85 -21
- package/dist/humain/checklist/vendor/commands.js.map +1 -1
- package/dist/humain/checklist/vendor/index.d.ts.map +1 -1
- package/dist/humain/checklist/vendor/index.js +4 -3
- package/dist/humain/checklist/vendor/index.js.map +1 -1
- package/dist/humain/flow-loader.d.ts.map +1 -1
- package/dist/humain/flow-loader.js +31 -5
- package/dist/humain/flow-loader.js.map +1 -1
- package/dist/humain/hcode/build-token.d.ts +35 -0
- package/dist/humain/hcode/build-token.d.ts.map +1 -0
- package/dist/humain/hcode/build-token.js +406 -0
- package/dist/humain/hcode/build-token.js.map +1 -0
- package/dist/humain/hcode/contracts.d.ts +3 -1
- package/dist/humain/hcode/contracts.d.ts.map +1 -1
- package/dist/humain/hcode/contracts.js +7 -4
- package/dist/humain/hcode/contracts.js.map +1 -1
- package/dist/humain/hcode/notices.d.ts +5 -0
- package/dist/humain/hcode/notices.d.ts.map +1 -1
- package/dist/humain/hcode/notices.js +5 -0
- package/dist/humain/hcode/notices.js.map +1 -1
- package/dist/humain/hcode/provider.d.ts.map +1 -1
- package/dist/humain/hcode/provider.js +1 -1
- package/dist/humain/hcode/provider.js.map +1 -1
- package/dist/humain/hcode/run-credential.d.ts +3 -1
- package/dist/humain/hcode/run-credential.d.ts.map +1 -1
- package/dist/humain/hcode/run-credential.js +123 -19
- package/dist/humain/hcode/run-credential.js.map +1 -1
- package/dist/humain/hcode/sandbox.d.ts.map +1 -1
- package/dist/humain/hcode/sandbox.js +10 -4
- package/dist/humain/hcode/sandbox.js.map +1 -1
- package/dist/humain/web-access/vendor/index.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/index.js +11 -1
- package/dist/humain/web-access/vendor/index.js.map +1 -1
- package/dist/modes/interactive/bug-report.d.ts.map +1 -1
- package/dist/modes/interactive/bug-report.js +48 -12
- package/dist/modes/interactive/bug-report.js.map +1 -1
- package/dist/modes/interactive/chat-viewport.d.ts +4 -0
- package/dist/modes/interactive/chat-viewport.d.ts.map +1 -1
- package/dist/modes/interactive/chat-viewport.js +29 -5
- package/dist/modes/interactive/chat-viewport.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +2 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +29 -12
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +6 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +20 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/status-line.js +2 -2
- package/dist/modes/interactive/components/status-line.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +18 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +91 -3
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tool-group.d.ts +22 -0
- package/dist/modes/interactive/components/tool-group.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-group.js +117 -0
- package/dist/modes/interactive/components/tool-group.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +15 -3
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +183 -52
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/sidebar/git-work.d.ts +18 -0
- package/dist/modes/interactive/sidebar/git-work.d.ts.map +1 -0
- package/dist/modes/interactive/sidebar/git-work.js +56 -0
- package/dist/modes/interactive/sidebar/git-work.js.map +1 -0
- package/dist/modes/interactive/sidebar/sidebar-component.d.ts +13 -0
- package/dist/modes/interactive/sidebar/sidebar-component.d.ts.map +1 -0
- package/dist/modes/interactive/sidebar/sidebar-component.js +61 -0
- package/dist/modes/interactive/sidebar/sidebar-component.js.map +1 -0
- package/dist/modes/interactive/sidebar/sidebar-model.d.ts +69 -0
- package/dist/modes/interactive/sidebar/sidebar-model.d.ts.map +1 -0
- package/dist/modes/interactive/sidebar/sidebar-model.js +217 -0
- package/dist/modes/interactive/sidebar/sidebar-model.js.map +1 -0
- package/dist/modes/interactive/tool-grouping.d.ts +11 -0
- package/dist/modes/interactive/tool-grouping.d.ts.map +1 -0
- package/dist/modes/interactive/tool-grouping.js +32 -0
- package/dist/modes/interactive/tool-grouping.js.map +1 -0
- package/docs/coordination.md +7 -3
- package/docs/environment-variables.md +14 -0
- package/docs/extensions.md +2 -0
- package/docs/flow.md +2 -0
- package/docs/forge-run-bootstrap.md +77 -42
- package/docs/humain-code.md +1 -1
- package/docs/keybindings.md +2 -0
- package/docs/providers.md +14 -0
- package/docs/settings.md +16 -1
- package/docs/slash-commands.md +3 -0
- package/examples/sdk/12-full-control.ts +1 -1
- package/npm-shrinkwrap.json +7 -6
- package/package.json +3 -2
- package/schemas/keybindings.schema.json +8 -0
- package/schemas/settings.schema.json +29 -0
- package/src/humain/caveman/UPSTREAM.md +15 -3
- package/src/humain/caveman/upstream.json +2 -2
- package/src/humain/web-access/UPSTREAM.md +8 -0
- package/dist/bundle/chunks/chunk-HWFAAGYK.js +0 -23
- package/dist/bundle/chunks/chunk-RP6MWUAP.js +0 -4
- package/dist/bundle/chunks/entry-3EL6GOWK.js +0 -2
- package/dist/bundle/chunks/interactive-mode-HHWOE4FD.js +0 -5
- /package/dist/bundle/chunks/{chunk-T7F2TEIS.js → chunk-3IX4NEXK.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.8.7] - 2026-12-01
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Reissues exactly the frozen 0.8.6 release content plus the live-hydrated model-fixture/typecheck fix (!248). Version 0.8.6 was tagged but never published: its tag pipeline failed before npm publication.
|
|
10
|
+
- Updated test and SDK-example model IDs for the live catalog, and made MR/main CI run the same live-hydrated typecheck as tag verification. Only transport outages may warn and use pinned data in MR/main CI; catalog/type errors stay fatal and tags never fall back. No additional runtime features or post-freeze main changes are included; that release train moves to 0.8.8.
|
|
11
|
+
- Contracts remain `@humain/humain-code-contracts` 0.4.25, with unchanged source and measured pinned-Linux pack integrity. See [0.8.7 release notes](../../docs/releases/0.8.7.md) and the 0.8.6 section below for the reissued content.
|
|
12
|
+
|
|
13
|
+
## [0.8.6] - 2026-12-01
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Added an optional fullscreen sidebar for session usage, work, running agents and checklist progress. Enable with `/sidebar on`; it is off by default and hides below 100 columns (!227).
|
|
18
|
+
- Managed Builds can use Forge's exact private inference origins with Node startup CA trust and IP-SAN verification. Environment/base validation stays coupled and launch credentials and CA configuration are removed before app/tool child inheritance; desktop startup is unchanged (!234).
|
|
19
|
+
- Build sessions can refresh run-scoped inference credentials in process when Forge enables the refresh launch contract, with private rotating-handle storage and exact-request recovery (!237). This release does not enable Forge Build token switches.
|
|
20
|
+
- Optional `toolDisplay: grouped` provides quieter tool transcripts; the default display is unchanged (!221).
|
|
21
|
+
- Added developer UI frame/CPU budget tooling for sidebar and grouped-display work (!218).
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- Directed coordination progress notices update passive peer state without waking the owner's chat; questions and answers retain immediate delivery (!239, #400).
|
|
26
|
+
- Reduced terminal rendering grapheme/compositing allocations without changing the default display (!227).
|
|
27
|
+
- Refreshed Claude Code compatibility identity to 2.1.333 and Caveman metadata to 5.1.0 (!242).
|
|
28
|
+
- Publish matching `@humain/humain-code-contracts` 0.4.25 for the shared Build private-inference resolver; downstream activation and deployment retain their own qualification gates.
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- Contained delayed extension actions after session replacement/reload, and let `/bug` export a safely reduced diagnostic ZIP when optional fields exceed projection limits (!232, #398). This is the main-line delivery of the 0.8.5 crash fix.
|
|
33
|
+
- Eval2 agents create verifier-readable workspace files while private runtime stores stay owner-only (!169).
|
|
34
|
+
- Made contracts flow-sizing regression tests compare scaling rather than a fixed wall-clock deadline (!231; no production behavior change).
|
|
35
|
+
|
|
5
36
|
## [0.8.4] - 2026-11-30
|
|
6
37
|
|
|
7
38
|
### Added
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
-
import{runAgentMonitorCommand}from"./chunks/chunk-
|
|
2
|
+
import{runAgentMonitorCommand}from"./chunks/chunk-J5R2BQJS.js";import"./chunks/chunk-SDPK3KZ3.js";import"./chunks/chunk-3IX4NEXK.js";import"./chunks/chunk-II5C7G67.js";import"./chunks/chunk-NPVRWPGX.js";import"./chunks/chunk-B47PNNLL.js";import"./chunks/chunk-2QVKRSKH.js";import"./chunks/chunk-PPGSQZZF.js";import"./chunks/chunk-MHQNLTZR.js";import"./chunks/chunk-QESIDBMW.js";import"./chunks/chunk-VEGJT52D.js";import"./chunks/chunk-CKFLQGJN.js";import"./chunks/chunk-JXWJOIH4.js";process.exitCode=await runAgentMonitorCommand(process.env);
|
package/dist/bundle/chunks/{anthropic-messages-42CGJCSR.js → anthropic-messages-QMSJV4J5.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
2
|
import{combineAbortSignals}from"./chunk-HCHCYBNK.js";import{buildCopilotDynamicHeaders,hasCopilotVisionInput}from"./chunk-JEJQVFWK.js";import{applyOpenRouterReportedCost,isOpenRouterModel}from"./chunk-J7AP2BUJ.js";import{APIError,Anthropic}from"./chunk-IMRZP5SC.js";import{collectReasoningDrops,isDroppedBlock}from"./chunk-FDRBTGFJ.js";import{cacheJsonSerialization,shortHash}from"./chunk-ENBDASDN.js";import{adjustMaxTokensForThinking,buildBaseOptions,clampMaxTokensToContext,
|
|
3
|
-
getJsonSchemaToolParameters,prefersJsonSchemaStrictSampling,resolveJsonSchemaStrictSampling,splitErrorToolResultImages,transformMessages}from"./chunk-
|
|
4
|
-
import{registerSessionResourceCleanup}from"./chunk-ZG74NES2.js";import{calculateCost,getCurrentTools,getInitialSystemMessage,resolveTranscript}from"./chunk-
|
|
5
|
-
parseJsonWithRepair}from"./chunk-LYZ37DJP.js";import"./chunk-AQ4EXORZ.js";import{AssistantMessageEventStream}from"./chunk-MZRTVX7F.js";import{PROVIDER_CLIENT_VERSIONS,SubmissionAdmissionError,appendAssistantMessageDiagnostic,createAssistantMessageDiagnostic,createRequestObserver,findSubmissionAdmissionError,getIdentityHeaders,getModelHeaders,getSystemMessageText,headersToRecord,mergeHeaders,renderSystemMessageUpdate,reportContentProgress}from"./chunk-
|
|
3
|
+
getJsonSchemaToolParameters,prefersJsonSchemaStrictSampling,resolveJsonSchemaStrictSampling,splitErrorToolResultImages,transformMessages}from"./chunk-HV25WMNO.js";import{sanitizeSurrogates}from"./chunk-L2ZPNLYD.js";import{getServerRetryDelayMs,retryProviderRequest}from"./chunk-JNSFJADB.js";import{ANTHROPIC_FEDERATION_RULE_ID_ENV,ANTHROPIC_IDENTITY_TOKEN_FILE_ENV,ANTHROPIC_ORGANIZATION_ID_ENV,ANTHROPIC_SERVICE_ACCOUNT_ID_ENV,ANTHROPIC_WORKSPACE_ID_ENV}from"./chunk-7H2WNBX7.js";
|
|
4
|
+
import{registerSessionResourceCleanup}from"./chunk-ZG74NES2.js";import{calculateCost,getCurrentTools,getInitialSystemMessage,resolveTranscript}from"./chunk-BVBEJBVY.js";import{hasIncompleteUsage}from"./chunk-YTVFIA3A.js";import{iterateSseMessages}from"./chunk-PZ7NYBHJ.js";import{appendProviderHttpStatusDiagnostic,normalizeProviderError,safeJsonStringify}from"./chunk-KBIPIIKE.js";import{getProviderEnvValue}from"./chunk-FACBDLFU.js";import{ToolCallArgumentsStream,
|
|
5
|
+
parseJsonWithRepair}from"./chunk-LYZ37DJP.js";import"./chunk-AQ4EXORZ.js";import{AssistantMessageEventStream}from"./chunk-MZRTVX7F.js";import{PROVIDER_CLIENT_VERSIONS,SubmissionAdmissionError,appendAssistantMessageDiagnostic,createAssistantMessageDiagnostic,createRequestObserver,findSubmissionAdmissionError,getIdentityHeaders,getModelHeaders,getSystemMessageText,headersToRecord,mergeHeaders,renderSystemMessageUpdate,reportContentProgress}from"./chunk-H6CKS7HC.js";import"./chunk-JXWJOIH4.js";function supportsDisabledAnthropicThinking(model){let name=`${model.id} ${model.name}`.toLowerCase().replace(/[.\s]+/g,"-");return model.thinkingLevelMap?.off!==null&&!/(?:fable-5|mythos-(?:5|preview)|opus-5-5|sonnet-5-5)(?:-|$)/.test(name)}function resolveCacheRetention(cacheRetention,env){return cacheRetention||(getProviderEnvValue("HUMAIN_TERMINAL_CACHE_RETENTION",env)==="long"||getProviderEnvValue("PI_CACHE_RETENTION",env)==="long"?"long":"short")}function getCacheControl(model,cacheRetention,env){let retention=resolveCacheRetention(cacheRetention,env);if(retention==="none")return{retention};let ttl=retention==="long"&&getAnthropicCompat(model).supportsLongCacheRetention?"1h":void 0;return{retention,cacheControl:{type:"ephemera\
|
|
6
6
|
l",...ttl&&{ttl}}}}var claudeCodeVersion=PROVIDER_CLIENT_VERSIONS.claudeCode,claudeCodeTools=["Read","Write","Edit","Bash","Grep","Glob","AskUserQuestion","EnterPlanMode","ExitPlanMode","KillShell","NotebookEdit","Skill","Task","TaskOutput","TodoWrite","WebFetch","WebSearch"],ccToolLookup=new Map(claudeCodeTools.map(t=>[t.toLowerCase(),t])),toClaudeCodeName=name=>ccToolLookup.get(name.toLowerCase())??name,fromClaudeCodeName=(name,tools)=>{if(tools&&tools.length>0){let lowerName=name.toLowerCase(),
|
|
7
7
|
matchedTool=tools.find(tool=>tool.name.toLowerCase()===lowerName);if(matchedTool)return matchedTool.name}return name};function convertImageBlock(image){return{type:"image",source:{type:"base64",media_type:image.mimeType,data:image.data}}}function convertContentBlocks(content){if(!content.some(c=>c.type==="image"))return sanitizeSurrogates(content.map(c=>c.text).join(`
|
|
8
8
|
`));let blocks=content.map(block=>block.type==="text"?{type:"text",text:sanitizeSurrogates(block.text)}:convertImageBlock(block));return blocks.some(b=>b.type==="text")||blocks.unshift({type:"text",text:"(see attached image)"}),blocks}var FINE_GRAINED_TOOL_STREAMING_BETA="fine-grained-tool-streaming-2025-05-14",INTERLEAVED_THINKING_BETA="interleaved-thinking-2025-05-14",SERVER_SIDE_FALLBACK_BETA="server-side-fallback-2026-07-01",MID_CONVERSATION_OUTPUT_CONFIG_BETA="mid-conversation-output-config\
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
-
import{COLLAPSE_KEY_OFF,I18N_NAMESPACE,NO_INPUT_PLACEHOLDER,ROW_INTENT_META,SUPPORTED_LOCALES,displayLabel,formatAnswerScalar,formatKeySpecForDisplay,loadConfig,registerStrings,resolveCollapseKey,resolveNotesKey,sentinelsToAppend,stripFenceMarkers,t,validateGuidanceFields}from"./chunk-
|
|
2
|
+
import{COLLAPSE_KEY_OFF,I18N_NAMESPACE,NO_INPUT_PLACEHOLDER,ROW_INTENT_META,SUPPORTED_LOCALES,displayLabel,formatAnswerScalar,formatKeySpecForDisplay,loadConfig,registerStrings,resolveCollapseKey,resolveNotesKey,sentinelsToAppend,stripFenceMarkers,t,validateGuidanceFields}from"./chunk-SPLJOIKL.js";import{SettingsManager}from"./chunk-7X7QN6MX.js";import"./chunk-CDLUE6BJ.js";import{isKeyRelease,isKeyRepeat,matchesKey,truncateToWidth,visibleWidth,wrapTextWithAnsi}from"./chunk-B345VDHB.js";
|
|
3
3
|
import"./chunk-F6ZAYLU2.js";import"./chunk-F74XLJPC.js";import"./chunk-BIC5BSNX.js";import"./chunk-QESIDBMW.js";import{typebox_exports}from"./chunk-VEGJT52D.js";import{getHumainModuleAssetsDir}from"./chunk-CKFLQGJN.js";import"./chunk-JXWJOIH4.js";import{join as join2}from"node:path";import{pathToFileURL}from"node:url";import{readFileSync}from"node:fs";import{fileURLToPath}from"node:url";function registerLocalesFromDir(namespace,packageUrl,options){let label2=options?.label??namespace,byLocale={};for(let{code}of SUPPORTED_LOCALES)byLocale[code]=loadOneLocale(packageUrl,code,label2);registerStrings(namespace,byLocale)}function loadOneLocale(packageUrl,code,label2){try{let filePath=fileURLToPath(new URL(`./locales/${code}.json`,packageUrl));return JSON.parse(readFileSync(filePath,"utf-8"))}catch(err){return console.warn(`${label2}: failed to load locales/${code}.json \u2014 falling bac\
|
|
4
4
|
k to English (${err.message})`),{}}}var ASK_USER_PROMPT_EVENT="rpiv:ask-user:prompt",ASK_USER_BLOCKED_EVENT="rpiv:ask-user:blocked",ASK_USER_ANSWER_EVENT="rpiv:ask-user:answer",ASK_USER_ANSWER_RESULT_EVENT="rpiv:ask-user:answer-result";var reject=(code,reason)=>({ok:!1,code,reason}),isRecord=v=>typeof v=="object"&&v!==null&&!Array.isArray(v);function noteOf(v){let trimmed=v?.trim();return trimmed||void 0}function resolveExternalAnswer(questions,payload){let{answers,globalNote,cancel}=payload;if(cancel!==void 0&&typeof cancel!="boolean")return reject("invalid_payload","cancel must be a boolean");if(globalNote!==void 0&&typeof globalNote!="string")return reject("invalid_payload","globalNote must be a string");let note=noteOf(globalNote),
|
|
5
5
|
withNote=note?{globalNote:note}:{};if(cancel===!0)return answers!==void 0&&!(Array.isArray(answers)&&answers.length===0)?reject("invalid_payload","cancel takes no answers"):{ok:!0,result:{answers:[],cancelled:!0,...withNote}};if(!Array.isArray(answers))return reject("invalid_payload","answers must be an array");let byQuestion=new Map;for(let entry of answers){if(!isRecord(entry))return reject("invalid_payload","each answer must be an object");let index=entry.questionIndex;if(!Number.isInteger(index))
|
|
@@ -60,7 +60,7 @@ content.find(c=>c.type==="text")?.text??"").split(`
|
|
|
60
60
|
let payload={active,toolCallId};pi.events.emit(ASK_USER_BLOCKED_EVENT,payload),pi.events.emit(HERDR_BLOCKED_EVENT,{active,label:active?blockedMessage():void 0})}function rejectWithoutUi(){return buildToolResult(ERROR_NO_UI,{answers:[],cancelled:!0,error:"no_ui"})}async function runRpcPath(pi,ui,typed,toolCallId){emitAskUserBlockedEvent(pi,!0,toolCallId);try{return emitTerminalAttention(),buildQuestionnaireResponse(await runRpcQuestionnaire(ui,typed),typed)}finally{emitAskUserBlockedEvent(pi,!1,toolCallId)}}
|
|
61
61
|
var ASK_USER_QUESTION_TOOL_NAME="ask_user_question",ERROR_NO_UI="Error: UI not available (running in non-interactive mode)",ERROR_NO_CUSTOM_UI="Error: this client cannot render the questionnaire (custom UI is unavailable, e.g. RPC/ACP hosts such as Zed or Paseo). The user never saw the questions \u2014 do NOT treat this as a decline. Ask the questions as plain chat text instead, without using this tool.",ERROR_SESSION_LOAD_FAILED="Error: the questionnaire UI failed to load \u2014 the host's installed\
|
|
62
62
|
dependencies were likely replaced or removed on disk while Pi was running (e.g. a package-manager install touched the store). The user never saw the questions \u2014 do NOT treat this as a decline. Ask the questions as plain chat text instead, and tell the user that restoring this tool requires repairing the install if needed and restarting Pi.",ERROR_STALE_MODULE_CACHE="Error: the questionnaire UI cannot load \u2014 the host's module cache went stale after an earlier failed load (typically dependen\
|
|
63
|
-
cies replaced on disk mid-session). This is unrecoverable within the current Pi process. The user never saw the questions \u2014 do NOT treat this as a decline. Ask the questions as plain chat text instead, and tell the user to restart Pi to restore this tool.",BEL="\x07";function emitTerminalAttention(){try{process.stdout.isTTY&&process.stdout.write(BEL)}catch{}}var PREWARM_DELAY_MS=2e3;async function loadQuestionnaireSession(){let mod;try{mod=await import("./questionnaire-session-
|
|
63
|
+
cies replaced on disk mid-session). This is unrecoverable within the current Pi process. The user never saw the questions \u2014 do NOT treat this as a decline. Ask the questions as plain chat text instead, and tell the user to restart Pi to restore this tool.",BEL="\x07";function emitTerminalAttention(){try{process.stdout.isTTY&&process.stdout.write(BEL)}catch{}}var PREWARM_DELAY_MS=2e3;async function loadQuestionnaireSession(){let mod;try{mod=await import("./questionnaire-session-RSZE5I3P.js")}catch(e){
|
|
64
64
|
let cause=e instanceof Error?e.message:String(e);return{ok:!1,error:"session_load_failed",message:`${ERROR_SESSION_LOAD_FAILED} (cause: ${cause})`}}if(typeof mod.QuestionnaireSession!="function"){let keys=JSON.stringify(Object.keys(mod));return{ok:!1,error:"stale_module_cache",message:`${ERROR_STALE_MODULE_CACHE} (resolved namespace keys: ${keys})`}}return{ok:!0,module:mod}}function registerCollapseKeyListener(ctx,collapseKey,sessionRef,overlayHandleRef){if(collapseKey===COLLAPSE_KEY_OFF||typeof ctx.
|
|
65
65
|
ui.onTerminalInput!="function")return;let hasAnnouncedHide=!1;return ctx.ui.onTerminalInput(data=>{let handle=overlayHandleRef.current;if(handle&&!(!handle.isHidden()&&!handle.isFocused())&&matchesKey(data,collapseKey))return isKeyRelease(data)||isKeyRepeat(data)?{consume:!0}:(sessionRef.current?.toggleCollapsedExternal(),handle.isHidden()&&!hasAnnouncedHide&&(hasAnnouncedHide=!0,ctx.ui.notify?.(`ask_user_question hidden \u2014 press ${formatKeySpecForDisplay(collapseKey)} to reopen`,"info")),{consume:!0})})}
|
|
66
66
|
function makeSessionFactory(config){let{ctx,typed,itemsByTab,collapseKey,notesKey,canReopenWhileHidden,presentation,sessionRef,open,Session}=config;return(tui,theme,keybindings,done)=>{if(!presentation.overlay&&mustYieldInlineSlot(tui))return done(YIELD_TO_OVERLAY),INERT_COMPONENT;if(open.settled)return done(open.settled),INERT_COMPONENT;open.attach(done);let session=new Session({tui,theme,params:typed,itemsByTab,done:result=>open.settle(result),keybindings,editInput:async value=>{try{let editorCommand=SettingsManager.
|
package/dist/bundle/chunks/{azure-openai-responses-DOKKMBUN.js → azure-openai-responses-P57ZD6XP.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
-
import{prepareResponsesPrompt,processResponsesStream}from"./chunk-
|
|
3
|
-
import{getServerRetryDelayMs,retryProviderRequest}from"./chunk-
|
|
4
|
-
import"./chunk-AQ4EXORZ.js";import{AssistantMessageEventStream}from"./chunk-MZRTVX7F.js";import{createRequestObserver,getIdentityHeaders,headersToRecord,observeFetch}from"./chunk-
|
|
2
|
+
import{prepareResponsesPrompt,processResponsesStream}from"./chunk-OR3ORXP3.js";import{iterateOpenAIStream}from"./chunk-7PAXKU7M.js";import{clampOpenAIPromptCacheKey}from"./chunk-PRRNXB7S.js";import{AzureOpenAI}from"./chunk-2CYGUEQO.js";import"./chunk-FDRBTGFJ.js";import{cacheJsonSerialization}from"./chunk-ENBDASDN.js";import{buildBaseOptions,createGrammarToolInputProperties,resolveSamplingParams}from"./chunk-HV25WMNO.js";import"./chunk-L2ZPNLYD.js";
|
|
3
|
+
import{getServerRetryDelayMs,retryProviderRequest}from"./chunk-JNSFJADB.js";import{resolveAzureConfig,resolveDeploymentName}from"./chunk-CIA6V3BP.js";import{clampThinkingLevel,getDeclaredTools,resolveTranscript}from"./chunk-BVBEJBVY.js";import"./chunk-YTVFIA3A.js";import"./chunk-PZ7NYBHJ.js";import{appendProviderHttpStatusDiagnostic,formatProviderError,normalizeProviderError}from"./chunk-KBIPIIKE.js";import"./chunk-FACBDLFU.js";import"./chunk-LYZ37DJP.js";
|
|
4
|
+
import"./chunk-AQ4EXORZ.js";import{AssistantMessageEventStream}from"./chunk-MZRTVX7F.js";import{createRequestObserver,getIdentityHeaders,headersToRecord,observeFetch}from"./chunk-H6CKS7HC.js";import"./chunk-JXWJOIH4.js";var AZURE_TOOL_CALL_PROVIDERS=new Set(["openai","openai-codex","opencode","azure"]),OPENAI_RESPONSES_MIN_OUTPUT_TOKENS=16,stream=(model,context,options)=>{let stream2=new AssistantMessageEventStream,normalizedContext=resolveTranscript(context,model.compat?.supportsMidConvoSystemMessages);return(async()=>{let deploymentName=resolveDeploymentName(model,options),output={role:"assistant",content:[],api:"azure-openai-responses",provider:model.provider,model:model.id,usage:{usageIncomplete:!0,input:0,
|
|
5
5
|
output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()};try{let apiKey=options?.apiKey;if(!apiKey)throw new Error(`No API key for provider: ${model.provider}`);let observe=createRequestObserver(options,{api:model.api,provider:model.provider,model:model.id,operation:"chat"}),client=createClient(model,apiKey,options,observeFetch(options?.fetch,observe)),grammarToolInputProperties=createGrammarToolInputProperties(
|
|
6
6
|
getDeclaredTools(normalizedContext.messages),model.compat?.supportsOpenAIGrammarTools??!1),params=buildParams(model,normalizedContext,options,deploymentName,grammarToolInputProperties),onPayload=options?.onPayload,nextParams=await onPayload?.call(options,params,model);nextParams!==void 0&&(params=nextParams),onPayload||cacheJsonSerialization(params.input);let requestOptions={...options?.signal?{signal:options.signal}:{},...options?.timeoutMs!==void 0?{timeout:options.timeoutMs}:{},maxRetries:0},
|
|
7
7
|
{data:openaiStream,response}=await retryProviderRequest(()=>client.responses.create(params,requestOptions).withResponse(),{maxRetries:options?.maxRetries,maxRetryDelayMs:options?.maxRetryDelayMs,signal:options?.signal,onErrorResponse:errorResponse=>options?.onResponse?.(errorResponse,model)});if(await options?.onResponse?.({status:response.status,headers:headersToRecord(response.headers)},model),stream2.push({type:"start",partial:output}),await processResponsesStream(iterateOpenAIStream(openaiStream,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
+
var ERROR_MESSAGES={forge_origin_invalid:"Invalid Forge origin.",forge_run_credential_invalid:"Invalid Forge run credential."},BuildInferenceError=class extends Error{code;constructor(code){super(ERROR_MESSAGES[code]),this.name="BuildInferenceError",this.code=code}},ENVIRONMENTS=[["dev","https://code.dev.humain.com"],["staging","https://code.stg.humain.com"],["production","https://code.humain.com"],["dev","https://inference.code.dev.humain.com"],["staging","https://inference.code.stg.humain.com"],
|
|
3
|
+
["production","https://inference.code.humain.com"],["dev","https://10.160.3.240"],["staging","https://10.146.15.230"],["production","https://10.128.6.230"]].map(([id,origin])=>({id,origin,inferenceBaseUrl:`${origin}/api/inference`}));function resolveBuildInferenceEnvironment(origin,credential){let environment=ENVIRONMENTS.find(candidate=>candidate.origin===origin);if(!environment)throw new BuildInferenceError("forge_origin_invalid");if(credential===void 0||!/^frt_v1_[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$/.
|
|
4
|
+
test(credential))throw new BuildInferenceError("forge_run_credential_invalid");return{...environment}}function isBuildInferenceBase(baseUrl,environment){return baseUrl===environment.inferenceBaseUrl&&ENVIRONMENTS.some(candidate=>candidate.id===environment.id&&candidate.origin===environment.origin&&candidate.inferenceBaseUrl===environment.inferenceBaseUrl)}export{BuildInferenceError,resolveBuildInferenceEnvironment,isBuildInferenceBase};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
-
import{fetchWithRetry,getPiUserAgent}from"./chunk-
|
|
2
|
+
import{fetchWithRetry,getPiUserAgent}from"./chunk-A7AH3VMJ.js";import{require_semver}from"./chunk-OADQOW67.js";import{APP_COMMAND,ENV_OFFLINE,ENV_SKIP_VERSION_CHECK,getVersionCheckUrl}from"./chunk-CKFLQGJN.js";import{__toESM}from"./chunk-JXWJOIH4.js";var import_semver=__toESM(require_semver(),1);var DEFAULT_VERSION_CHECK_TIMEOUT_MS=1e4;function formatVersionCheckError(error){let rootMessage=error instanceof Error&&error.message?error.message:String(error),cause=error instanceof Error?error.cause:void 0,causes=cause instanceof AggregateError?cause.errors:cause===void 0?[]:[cause],codes=causes.map(value=>typeof value=="object"&&value!==null&&"code"in value&&typeof value.code=="string"?value.code:void 0).filter(code=>code!==void 0);if(codes.length>0)return`${rootMessage} (${[...new Set(codes)].
|
|
3
3
|
join(", ")})`;let causeMessage=causes.find(value=>value instanceof Error&&!!value.message)?.message;return causeMessage?`${rootMessage} (cause: ${causeMessage})`:rootMessage}function comparePackageVersions(leftVersion,rightVersion){let left=(0,import_semver.valid)(leftVersion.trim()),right=(0,import_semver.valid)(rightVersion.trim());if(!(!left||!right))return(0,import_semver.compare)(left,right)}function isNewerPackageVersion(candidateVersion,currentVersion){let comparison=comparePackageVersions(
|
|
4
4
|
candidateVersion,currentVersion);return comparison!==void 0?comparison>0:candidateVersion.trim()!==currentVersion.trim()}async function getLatestPiRelease(currentVersion,options={}){if(process.env[ENV_OFFLINE])return;let response=await fetchWithRetry(getVersionCheckUrl(),{headers:{"User-Agent":getPiUserAgent(currentVersion),accept:"application/json"}},{maxRetries:options.retry?2:0,timeoutMs:options.timeoutMs??DEFAULT_VERSION_CHECK_TIMEOUT_MS});if(!response.ok)return;let data=await response.json();
|
|
5
5
|
if(typeof data.version!="string"||!data.version.trim())return;let packageField=data.packageName??data.name,packageName=typeof packageField=="string"&&packageField.trim()?packageField.trim():void 0,note=typeof data.note=="string"&&data.note.trim()?data.note.trim():void 0;return{version:data.version.trim(),packageName,...note?{note}:{}}}async function getLatestPiVersion(currentVersion,options={}){return(await getLatestPiRelease(currentVersion,options))?.version}async function checkForNewPiVersion(currentVersion){
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
-
import{theme}from"./chunk-
|
|
2
|
+
import{theme}from"./chunk-DBC6XUKA.js";var DynamicBorder=class{color;constructor(color=str=>theme.fg("border",str)){this.color=color}invalidate(){}render(width){return[this.color("\u2500".repeat(Math.max(1,width)))]}};export{DynamicBorder};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
-
import{resolveSchemaRef}from"./chunk-
|
|
2
|
+
import{resolveSchemaRef}from"./chunk-PU7SKUJ6.js";import{typebox_exports}from"./chunk-VEGJT52D.js";var TOOL_SEARCH_TOOL_NAME="tool_search",DEFAULT_TOOL_SEARCH_LIMIT=8,wordSegmenter=new Intl.Segmenter(void 0,{granularity:"word"}),STOP_WORDS=new Set(["a","an","and","are","as","at","be","by","for","from","in","is","it","of","on","or","that","the","this","to","with"]);function stem(term){return term.length>4&&term.endsWith("ies")?`${term.slice(0,-3)}y`:term.length>4&&/(ches|shes|sses|xes|zes)$/.test(term)?term.slice(0,-2):term.length>3&&term.endsWith("s")&&!term.endsWith("ss")?term.slice(0,-1):term}
|
|
3
3
|
function tokenize(text){let normalized=text.normalize("NFC").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").toLowerCase().replace(/[^\p{L}\p{M}\p{N}]+/gu," ");return(/^[a-z0-9 ]*$/.test(normalized)?normalized.split(" "):Array.from(wordSegmenter.segment(normalized),segment=>segment.isWordLike?segment.segment:"")).filter(word=>word.length>0&&!STOP_WORDS.has(word)).map(word=>/^[a-z0-9]+$/.test(word)?stem(word):word)}function isObject(value){return typeof value=="obje\
|
|
4
4
|
ct"&&value!==null&&!Array.isArray(value)}function schemaText(schema,root,parts,seen){if(isObject(schema)){if(typeof schema.$ref=="string"){let target=resolveSchemaRef(schema.$ref,root);isObject(target)&&!seen.has(target)&&(seen.add(target),schemaText(target,root,parts,seen))}if(typeof schema.description=="string"&&parts.push(schema.description),isObject(schema.properties))for(let[name,property]of Object.entries(schema.properties))parts.push(name),schemaText(property,root,parts,seen);schemaText(schema.
|
|
5
5
|
items,root,parts,seen);for(let key of["anyOf","oneOf","allOf"]){let variants=schema[key];if(Array.isArray(variants))for(let variant of variants)schemaText(variant,root,parts,seen)}}}function createToolSearchDocument(tool,namespace){let parts=[tool.description];schemaText(tool.parameters,tool.parameters,parts,new Set([tool.parameters]));let namespaceText=namespace?[namespace.name,namespace.description??"",namespace.instructions??""].join(" "):"";return{name:tool.name,text:parts.filter(part=>part.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
-
import{theme}from"./chunk-
|
|
2
|
+
import{theme}from"./chunk-DBC6XUKA.js";import{getKeybindings}from"./chunk-B345VDHB.js";function formatKeyPart(part,options){let displayPart=process.platform==="darwin"&&part.toLowerCase()==="alt"?"option":part;return options.capitalize?displayPart.charAt(0).toUpperCase()+displayPart.slice(1):displayPart}function formatKeyText(key,options={}){return key.split("/").map(k=>k.split("+").map(part=>formatKeyPart(part,options)).join("+")).join("/")}function formatKeys(keys,options={}){return keys.length===0?"":formatKeyText(keys.join("/"),options)}function keyText(keybinding){return formatKeys(
|
|
3
3
|
getKeybindings().getKeys(keybinding))}function keyDisplayText(keybinding){return formatKeys(getKeybindings().getKeys(keybinding),{capitalize:!0})}function keyHint(keybinding,description){return theme.fg("dim",keyText(keybinding))+theme.fg("muted",` ${description}`)}function selectNavigationHint(){let up=keyText("tui.select.up"),down=keyText("tui.select.down");return rawKeyHint(up==="up"&&down==="down"?"\u2191\u2193":[up,down].filter(Boolean).join("/"),"navigate")}function rawKeyHint(key,description){
|
|
4
4
|
return theme.fg("dim",formatKeyText(key))+theme.fg("muted",` ${description}`)}export{formatKeyText,keyText,keyDisplayText,keyHint,selectNavigationHint,rawKeyHint};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
2
|
import{ALL_CAPABILITIES,CI_ID_RE,DEFAULT_PROVIDER_PREFERENCE,FLOW_APPROVED_INPUTS_FILE,LINEAGE_ENV,MAX_RECOVERY_RAW_BYTES,METHOD,THINKING_LEVELS,TIER_CAPABILITIES,TIER_LITERALS,billingRouteFor,buildAliasTable,classifyModelName,classifyTimeout,dispatchAdmissionBlocked,dispatchCustody,dispatchCustodyDiagnostic,exactModelBindingsFor,formatDuration,isCredentialName,isQuotaError,isThinkingLevel,killProcessTree,lineageMarker,listDispatchProcesses,liveDispatchPids,mergeLayers,ownedDispatchIdentities,providerFallbacksFor,
|
|
3
|
-
readFlowAssetJson,redactCheckArgv,redactCredentials,registerDispatchPid,rereviewFloor,resolveAlias,resolveExactAlias,sanitizeControlChars,sanitizeRepairFeedback,scanEvents,scanLineage,shortName,summarizeStderr,tierIndex,tierOf,tierOfModel,tiersToBindings}from"./chunk-D6ZWWDW5.js";import{assertDhRetryAdmission,resolveDhEffectiveTerminals}from"./chunk-MAEKQSFU.js";import{ScrollView,getKeybindings,truncateToWidth,visibleWidth,wrapTextWithAnsi}from"./chunk-
|
|
3
|
+
readFlowAssetJson,redactCheckArgv,redactCredentials,registerDispatchPid,rereviewFloor,resolveAlias,resolveExactAlias,sanitizeControlChars,sanitizeRepairFeedback,scanEvents,scanLineage,shortName,summarizeStderr,tierIndex,tierOf,tierOfModel,tiersToBindings}from"./chunk-D6ZWWDW5.js";import{assertDhRetryAdmission,resolveDhEffectiveTerminals}from"./chunk-MAEKQSFU.js";import{ScrollView,getKeybindings,truncateToWidth,visibleWidth,wrapTextWithAnsi}from"./chunk-B345VDHB.js";import{FLOW_ID_PATTERN,
|
|
4
4
|
FLOW_MODEL_ID_PATTERN,FlowContractError,FlowCountSchema,FlowDigestSchema,FlowFailureClassSchema,FlowIdSchema,FlowMicrousdSchema,FlowModelRefSchema,FlowPositiveIntSchema,FlowProfileRefSchema,FlowReasonClassSchema,FlowRoleSchema,FlowSelectionEffortSchema,FlowSizeSchema,FlowTimestampSchema,StrictObject,canonicalWithout,compileFlow,hasDuplicateModels,lit,parseFlowData,partialByRole,verifyFlowDigest}from"./chunk-II5C7G67.js";import{typebox_exports}from"./chunk-VEGJT52D.js";var FlowProfileError=class extends Error{code;path;constructor(code2,message,path){super(message),this.name="FlowProfileError",this.code=code2,path!==void 0&&(this.path=path)}};import{stripVTControlCharacters}from"node:util";var FlowEffortSchema=typebox_exports.Union([typebox_exports.Literal("low"),typebox_exports.Literal("medium"),typebox_exports.Literal("high")]),FlowRoleBindingSchema=StrictObject({primary:FlowModelRefSchema,backups:typebox_exports.Array(FlowModelRefSchema,{maxItems:8}),effort:FlowEffortSchema}),FLOW_MODEL_SELECTION_TIERS=["cheap","mid","premium","frontier"],FLOW_MODEL_SELECTION_CAPABILITIES=["scout","scope_scout","worker","implementation_fast","analysis_mid","technical_lead","lead_small","lead","\
|
|
5
5
|
lead_large","implementation_strong","technical_review","integration_review","migration_review","performance_review","api_contract_review","qa_agent","analysis_strong","architect","security_review","triage"],FlowTierSelectionSchema=StrictObject({primary:typebox_exports.Optional(FlowModelRefSchema),backups:typebox_exports.Optional(typebox_exports.Array(FlowModelRefSchema,{maxItems:8}))}),FlowCapabilitySelectionSchema=StrictObject({primary:typebox_exports.Optional(FlowModelRefSchema),backups:typebox_exports.
|
|
6
6
|
Optional(typebox_exports.Array(FlowModelRefSchema,{maxItems:8})),effort:typebox_exports.Optional(FlowSelectionEffortSchema)}),optionalEach=(keys,schema)=>StrictObject(Object.fromEntries(keys.map(key=>[key,typebox_exports.Optional(schema)]))),FlowModelSelectionSchema=StrictObject({tiers:typebox_exports.Optional(optionalEach(FLOW_MODEL_SELECTION_TIERS,FlowTierSelectionSchema)),capabilities:typebox_exports.Optional(optionalEach(FLOW_MODEL_SELECTION_CAPABILITIES,FlowCapabilitySelectionSchema))}),FlowProfileV1Schema=StrictObject(
|
|
@@ -1728,7 +1728,7 @@ file,{size:stat.size,mtimeMs:stat.mtimeMs,evidence}),evidence}catch{return unava
|
|
|
1728
1728
|
]`,i=close}else re+=ch.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}return new RegExp(`^${re}$`)},matches=["/"];for(let component of word.split("/").filter(Boolean)){let next=[];for(let dir of matches){if(!/[*?[]/.test(component)){let path=`${dir==="/"?"":dir}/${component}`;(component==="."||component===".."||existsSync6(path))&&next.push(path);continue}let entries;try{entries=readdirSync4(dir)}catch{continue}let re=pattern(component);for(let entry of entries)(component.startsWith(".")||!entry.startsWith(
|
|
1729
1729
|
"."))&&re.test(entry)&&next.push(`${dir==="/"?"":dir}/${entry}`)}if(matches=next,!matches.length)return word;if(matches.length>64)return null}return matches.length===1?matches[0]:null}function resolveCdTarget(raw){if(!raw.startsWith("/"))return{uncertain:raw};let components=raw.split("/").filter(c=>c!==""),current="/";for(let i=0;i<components.length;i++){let component=components[i];if(component===".")continue;if(component===".."){current=dirname11(current);continue}let next=join15(current,component);
|
|
1730
1730
|
try{current=realpathSync7(next)}catch(err){if(err.code!=="ENOENT")return{uncertain:raw};try{return lstatSync9(next),{uncertain:raw}}catch{}let rest=components.slice(i);return rest.includes("..")?{uncertain:raw}:{path:join15(current,...rest.filter(c=>c!=="."))}}}return{path:current}}function hasGitEntryAbove(abs){for(let dir=abs;;dir=dirname11(dir)){try{return lstatSync9(join15(dir,".git")),!0}catch(error){let code2=error.code;if(code2!=="ENOENT"&&code2!=="ENOTDIR")return!0}if(dirname11(dir)===dir)
|
|
1731
|
-
return!1}}function dispatchRepairChildren(tasks,deps){return deps.dispatchParallel(deps.cwd,deps.runId,tasks,deps.adapter,deps.ctx,deps.run)}function createChildDispatch(deps){let inProcess=process.env.HUMAIN_TERMINAL_FLOW_INPROCESS==="1";return async(tasks,input)=>{for(let task of tasks)task.trace?.logicalTaskId&&deps.repairBudget.inherit(task.trace.logicalTaskId,task.taskId);if(inProcess&&input&&tasks.length===1&&tasks[0].stage==="implementation"){let{inProcessContext}=await import("./inprocess-
|
|
1731
|
+
return!1}}function dispatchRepairChildren(tasks,deps){return deps.dispatchParallel(deps.cwd,deps.runId,tasks,deps.adapter,deps.ctx,deps.run)}function createChildDispatch(deps){let inProcess=process.env.HUMAIN_TERMINAL_FLOW_INPROCESS==="1";return async(tasks,input)=>{for(let task of tasks)task.trace?.logicalTaskId&&deps.repairBudget.inherit(task.trace.logicalTaskId,task.taskId);if(inProcess&&input&&tasks.length===1&&tasks[0].stage==="implementation"){let{inProcessContext}=await import("./inprocess-6MLIANGV.js");
|
|
1732
1732
|
return deps.dispatchParallel(deps.cwd,deps.runId,tasks,deps.adapter,inProcessContext(deps.ctx,input),deps.run)}return deps.dispatchParallel(deps.cwd,deps.runId,tasks,deps.adapter,deps.ctx,deps.run)}}var RETRY_SUFFIX=/-retry-(\d+)$/;function leadTaskIdFor(taskId){return taskId.replace(RETRY_SUFFIX,"")}function retryNumberFor(taskId){let m=RETRY_SUFFIX.exec(taskId);return m?Number(m[1]):null}var ESCALATION_RETRY_LABEL=/^retry-\d+$/;function finalAttemptFor(attempts){let last=attempts[attempts.length-1];if(last.result.exitCode===0)return{final:last.result,succeeded:!0};for(let i=attempts.length-2;i>=0&&attempts.slice(i+1).every(a=>ESCALATION_RETRY_LABEL.test(a.label));i--)if(attempts[i].result.
|
|
1733
1733
|
exitCode===0)return{final:attempts[i].result,succeeded:!0};return{final:last.result,succeeded:!1}}function collectLeadAttempts(leadResults,resumedAttemptResults,escalationResults,retriedLeadTaskIds=[],resumedLeadTaskIds=[]){let resumedByTaskId=new Map;for(let r of resumedAttemptResults){let list2=resumedByTaskId.get(r.taskId)??[];list2.push(r),resumedByTaskId.set(r.taskId,list2)}let retriedSet=new Set(retriedLeadTaskIds),resumedSet=new Set(resumedLeadTaskIds),retriesByLead=new Map;for(let r of escalationResults){
|
|
1734
1734
|
if(retryNumberFor(r.taskId)===null)continue;let leadTaskId=leadTaskIdFor(r.taskId),list2=retriesByLead.get(leadTaskId)??[];list2.push(r),retriesByLead.set(leadTaskId,list2)}for(let list2 of retriesByLead.values())list2.sort((a,b)=>(retryNumberFor(a.taskId)??0)-(retryNumberFor(b.taskId)??0));return leadResults.map(r=>{let leadTaskId=r.taskId,attempts=[...resumedByTaskId.get(leadTaskId)??[],r].map((result,i)=>({label:i===0?"original":resumedSet.has(leadTaskId)&&i===1?"resume":retriedSet.has(leadTaskId)?
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
-
import{SETTINGS_DEFAULTS}from"./chunk-
|
|
2
|
+
import{SETTINGS_DEFAULTS}from"./chunk-CDLUE6BJ.js";import{require_proper_lockfile}from"./chunk-F6ZAYLU2.js";import{require_undici}from"./chunk-F74XLJPC.js";import{CONFIG_DIR_NAME,getAgentDir,isBunRuntime,normalizePath,resolvePath,stripBom}from"./chunk-CKFLQGJN.js";import{__toESM}from"./chunk-JXWJOIH4.js";var undici=__toESM(require_undici(),1);import{EventEmitter}from"node:events";var DEFAULT_HTTP_IDLE_TIMEOUT_MS=3e5,DEFAULT_AUTO_SELECT_FAMILY_ATTEMPT_TIMEOUT_MS=2e3,HTTP_IDLE_TIMEOUT_CHOICES=[{label:"30 sec",timeoutMs:3e4},{label:"1 min",timeoutMs:6e4},{label:"2 min",timeoutMs:12e4},{label:"5 min",timeoutMs:3e5},{label:"disabled",timeoutMs:0}],originalGlobalFetch=globalThis.fetch,installedGlobalFetch;function parseHttpIdleTimeoutMs(value){if(typeof value=="string"){let trimmed=value.trim();return trimmed.toLowerCase()==="disabled"?0:trimmed.length===0?void 0:parseHttpIdleTimeoutMs(
|
|
3
3
|
Number(trimmed))}if(!(typeof value!="number"||!Number.isFinite(value)||value<0))return Math.floor(value)}function formatHttpIdleTimeoutMs(timeoutMs){let choice=HTTP_IDLE_TIMEOUT_CHOICES.find(item=>item.timeoutMs===timeoutMs);return choice?choice.label:`${timeoutMs/1e3} sec`}function applyHttpProxySettings(httpProxy){let proxy=httpProxy?.trim();proxy&&(process.env.HTTP_PROXY??=proxy,process.env.HTTPS_PROXY??=proxy)}var ignoreUndiciDispatcherError=_error=>{};function withUndiciErrorListener(dispatcher){
|
|
4
4
|
return dispatcher instanceof EventEmitter&&EventEmitter.prototype.on.call(dispatcher,"error",ignoreUndiciDispatcherError),dispatcher}function createUndiciClient(origin,options){return withUndiciErrorListener(new undici.Client(origin,options))}function createUndiciOriginDispatcher(origin,options){let dispatcherOptions=options;return dispatcherOptions.connections===1?createUndiciClient(origin,dispatcherOptions):withUndiciErrorListener(new undici.Pool(origin,{...dispatcherOptions,factory:createUndiciClient}))}
|
|
5
5
|
var NULL_BODY_STATUSES=new Set([101,103,204,205,304]);function idleTimeoutError(timeoutMs){return new DOMException(`No data from the server for ${timeoutMs/1e3} s (HTTP idle timeout)`,"TimeoutError")}function withBodyIdleTimeout(response,controller,timeoutMs){let reader=response.body.getReader(),timedOut,body=new ReadableStream({async pull(streamController){let timer=setTimeout(()=>{timedOut=idleTimeoutError(timeoutMs),controller.abort(timedOut)},timeoutMs),result;try{result=await reader.read()}catch(error){
|
|
@@ -86,5 +86,7 @@ enabledModels=patterns,this.markModified("enabledModels"),this.save()}getDoubleE
|
|
|
86
86
|
this.globalSettings.treeFilterMode=mode,this.markModified("treeFilterMode"),this.save()}getShowHardwareCursor(){return this.settings.showHardwareCursor!==void 0?this.settings.showHardwareCursor:process.env.HUMAIN_TERMINAL_HARDWARE_CURSOR==="1"||process.env.PI_HARDWARE_CURSOR==="1"}setShowHardwareCursor(enabled){this.globalSettings.showHardwareCursor=enabled,this.markModified("showHardwareCursor"),this.save()}getEditorPaddingX(){return this.settings.editorPaddingX??SETTINGS_DEFAULTS.editorPaddingX}setEditorPaddingX(padding){
|
|
87
87
|
this.globalSettings.editorPaddingX=Math.max(0,Math.min(3,Math.floor(padding))),this.markModified("editorPaddingX"),this.save()}getOutputPad(){return this.settings.outputPad===0?0:SETTINGS_DEFAULTS.outputPad}setOutputPad(padding){this.globalSettings.outputPad=padding,this.markModified("outputPad"),this.save()}getAutocompleteMaxVisible(){return this.settings.autocompleteMaxVisible??SETTINGS_DEFAULTS.autocompleteMaxVisible}setAutocompleteMaxVisible(maxVisible){this.globalSettings.autocompleteMaxVisible=
|
|
88
88
|
Math.max(3,Math.min(20,Math.floor(maxVisible))),this.markModified("autocompleteMaxVisible"),this.save()}getCodeBlockIndent(){return this.settings.markdown?.codeBlockIndent??SETTINGS_DEFAULTS.markdown.codeBlockIndent}getMermaidRenderingMode(){let mode=this.settings.markdown?.mermaid;return mode==="off"||mode==="final"?mode:SETTINGS_DEFAULTS.markdown.mermaid}setMermaidRenderingMode(mode){this.globalSettings.markdown??={},this.globalSettings.markdown.mermaid=mode,this.markModified("markdown","merma\
|
|
89
|
-
id"),this.save()}
|
|
90
|
-
|
|
89
|
+
id"),this.save()}getToolDisplay(){return this.settings.toolDisplay==="grouped"?"grouped":SETTINGS_DEFAULTS.toolDisplay}setToolDisplay(value){this.globalSettings.toolDisplay=value,this.markModified("toolDisplay"),this.save()}getSidebarSettings(){let width=this.settings.sidebar?.width;return{enabled:this.settings.sidebar?.enabled===!0,width:typeof width=="number"&&Number.isFinite(width)?Math.max(24,Math.min(48,Math.floor(width))):SETTINGS_DEFAULTS.sidebar.width}}setSidebarSettings(patch){let normalized={
|
|
90
|
+
...patch};normalized.width!==void 0&&(normalized.width=Number.isFinite(normalized.width)?Math.max(24,Math.min(48,Math.floor(normalized.width))):SETTINGS_DEFAULTS.sidebar.width),this.globalSettings.sidebar={...this.globalSettings.sidebar,...normalized};for(let key of Object.keys(normalized))this.markModified("sidebar",key);this.save()}getChecklistSettings(){return{enabled:this.settings.checklist?.enabled??SETTINGS_DEFAULTS.checklist.enabled,sidebarPinned:this.settings.checklist?.sidebarPinned??SETTINGS_DEFAULTS.
|
|
91
|
+
checklist.sidebarPinned}}setChecklistSettings(patch){this.globalSettings.checklist={...this.globalSettings.checklist,...patch};for(let key of Object.keys(patch))this.markModified("checklist",key);this.save()}getWarnings(){return{...this.settings.warnings??{}}}setWarnings(warnings){this.globalSettings.warnings={...warnings},this.markModified("warnings"),this.save()}getNotices(){return{...SETTINGS_DEFAULTS.notices,...this.settings.notices}}setNotice(key,shown){this.globalSettings.notices={...this.
|
|
92
|
+
globalSettings.notices,[key]:shown},this.markModified("notices",key),this.save()}};export{HTTP_IDLE_TIMEOUT_CHOICES,formatHttpIdleTimeoutMs,applyHttpProxySettings,configureHttpDispatcher,CACHE_WARMING_MODES,DEFAULT_TOOL_NAMES,isToolModifier,getToolListError,applyToolModifiers,SettingsManager};
|