@humain/humain-code 0.4.12 → 0.4.13
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 +15 -1
- package/dist/bun/sandbox-env-setup.js +1 -1
- package/dist/bun/sandbox-env-setup.js.map +1 -1
- package/dist/bundle/agent-monitor.js +1 -1
- package/dist/bundle/chunks/anthropic-messages-YSAHA7QM.js +67 -0
- package/dist/bundle/chunks/azure-openai-responses-Z5XYDPHS.js +15 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +393 -314
- package/dist/bundle/chunks/{chunk-EDKZRYWJ.js → chunk-2TTB6GIB.js} +2 -2
- package/dist/bundle/chunks/{chunk-HSDTSUZE.js → chunk-36Q5UVQL.js} +47 -89
- package/dist/bundle/chunks/chunk-4DXXZHY2.js +540 -0
- package/dist/bundle/chunks/{chunk-BKJU56SM.js → chunk-A7QKOI62.js} +142 -126
- package/dist/bundle/chunks/{chunk-UW4GMZL3.js → chunk-AIXI6RIE.js} +264 -248
- package/dist/bundle/chunks/{chunk-V5ZF7Q7L.js → chunk-BVHXWQLD.js} +52 -47
- package/dist/bundle/chunks/{chunk-I2ZWZAIV.js → chunk-COF5P635.js} +222 -148
- package/dist/bundle/chunks/{chunk-SCIGZFN5.js → chunk-DNGJMRJW.js} +11 -11
- package/dist/bundle/chunks/{chunk-XGO43DKL.js → chunk-DUSJT2W4.js} +21 -25
- package/dist/bundle/chunks/chunk-EYIYBQAR.js +7 -0
- package/dist/bundle/chunks/chunk-FRUFMISJ.js +505 -0
- package/dist/bundle/chunks/{chunk-R5VIAWGA.js → chunk-H2FY3PEV.js} +9 -8
- package/dist/bundle/chunks/{chunk-KGI4EX6R.js → chunk-JNHXXVLA.js} +126 -125
- package/dist/bundle/chunks/{chunk-45ZBHMQG.js → chunk-JQCWRL5K.js} +4 -4
- package/dist/bundle/chunks/{chunk-AS2Y2MO6.js → chunk-KK3KUUMM.js} +643 -624
- package/dist/bundle/chunks/{chunk-6KAMTNN3.js → chunk-L3J4P5JR.js} +1 -1
- package/dist/bundle/chunks/chunk-L6Z6JKKC.js +3 -0
- package/dist/bundle/chunks/{chunk-DZ5C66IU.js → chunk-LUL775V7.js} +33 -33
- package/dist/bundle/chunks/{chunk-BRXQUQSC.js → chunk-MF2NEHP4.js} +778 -775
- package/dist/bundle/chunks/chunk-MG5PX4KU.js +31 -0
- package/dist/bundle/chunks/{chunk-LCOHFEZZ.js → chunk-NNKA2PAP.js} +1 -1
- package/dist/bundle/chunks/{chunk-HMWAH7ZY.js → chunk-OX2IBCCA.js} +53 -49
- package/dist/bundle/chunks/{chunk-WBJN6PEI.js → chunk-QYCOHSI7.js} +1 -1
- package/dist/bundle/chunks/{chunk-NLTW6A7G.js → chunk-TC7EANW4.js} +3730 -3353
- package/dist/bundle/chunks/{chunk-77EWF2NW.js → chunk-TJG52LZB.js} +1 -1
- package/dist/bundle/chunks/{chunk-5XD3DHYL.js → chunk-UDVC7A5S.js} +1 -1
- package/dist/bundle/chunks/chunk-UGXYG7HN.js +22 -0
- package/dist/bundle/chunks/{chunk-VYIIPF57.js → chunk-UHLW4KJ7.js} +419 -413
- package/dist/bundle/chunks/{chunk-FF26YENK.js → chunk-W2QRCQBX.js} +4 -3
- package/dist/bundle/chunks/chunk-XQRYOCHA.js +26 -0
- package/dist/bundle/chunks/{chunk-7Z5MWPYE.js → chunk-Y3RFGBG2.js} +1 -1
- package/dist/bundle/chunks/chunk-YJ3NQWES.js +9 -0
- package/dist/bundle/chunks/{chunk-YJBE3IGR.js → chunk-YRCLNWFV.js} +20 -20
- package/dist/bundle/chunks/chunk-YZMQXAJM.js +8 -0
- package/dist/bundle/chunks/{chunk-BHM75BJJ.js → chunk-Z74ZYQPX.js} +207 -79
- package/dist/bundle/chunks/{cli-5ACW3WND.js → cli-SRI4UOSL.js} +6 -6
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-FZ3UQCZ7.js → cloudflare-workers-ai-system-one-JGN7NZCV.js} +1 -1
- package/dist/bundle/chunks/codemode-worker.js +27 -14
- package/dist/bundle/chunks/{compat-KXWWOFHQ.js → compat-PCHMBE76.js} +6 -6
- package/dist/bundle/chunks/dist-MNSGVI4C.js +7 -0
- package/dist/bundle/chunks/{dist-6SWVHFCS.js → dist-UWE5M6HK.js} +211 -8
- package/dist/bundle/chunks/{dist-cjs-RL2OCAP2.js → dist-cjs-4BMVQ74V.js} +1 -1
- package/dist/bundle/chunks/{easter-egg-3d-3L3IKAT6.js → easter-egg-3d-ZJ2JUFOA.js} +1 -1
- package/dist/bundle/chunks/es-YEFEOGR3.js +1905 -0
- package/dist/bundle/chunks/{esm-763X2IA7.js → esm-NCUV2DF7.js} +1 -1
- package/dist/bundle/chunks/{event-streams-R5OECII4.js → event-streams-NXFTZDSF.js} +1 -1
- package/dist/bundle/chunks/execute-LRTXH4YJ.js +553 -0
- package/dist/bundle/chunks/{extract-DLZ425VI.js → extract-OZW5JHG6.js} +140 -120
- package/dist/bundle/chunks/{google-generative-ai-JD2FVOIX.js → google-generative-ai-YXXFSTX7.js} +2 -2
- package/dist/bundle/chunks/{google-vertex-PFBMDCBW.js → google-vertex-3IVWLYJ5.js} +2 -2
- package/dist/bundle/chunks/host-2RMBOGA7.js +2 -0
- package/dist/bundle/chunks/{mistral-conversations-D74NZ65O.js → mistral-conversations-Y7GWO3QB.js} +14 -13
- package/dist/bundle/chunks/{node-W47VUEGE.js → node-ELWNZC34.js} +328 -337
- package/dist/bundle/chunks/{node-4GGYDW5Q.js → node-SPBTZUUS.js} +26 -25
- package/dist/bundle/chunks/{openai-codex-responses-JAAA7MSS.js → openai-codex-responses-NSXWHIDT.js} +3 -4
- package/dist/bundle/chunks/{openai-completions-PGPMGQPU.js → openai-completions-WGBQHTYA.js} +9 -8
- package/dist/bundle/chunks/{openai-decisions-QQ4MEABI.js → openai-decisions-QWEISDVO.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-FG2R2M4L.js → openai-responses-OKGCSIEY.js} +6 -6
- package/dist/bundle/chunks/{openrouter-images-NTBP3UUE.js → openrouter-images-BMVMAROU.js} +1 -1
- package/dist/bundle/chunks/{pi-messages-JD4O7KIP.js → pi-messages-XNEG23NU.js} +1 -1
- package/dist/bundle/chunks/runtime-VGSK3QCM.js +2 -0
- package/dist/bundle/chunks/{typesafe-system-one-TTC7YCO3.js → typesafe-system-one-62YHYXZV.js} +1 -1
- package/dist/bundle/chunks/{undici-EEOUTE5F.js → undici-7EW63V4X.js} +1 -1
- package/dist/bundle/chunks/virtual-modules-JSGQ72M6.js +5 -0
- package/dist/bundle/cli-runtime.js +3 -3
- package/dist/bundle/flow/package.json +5 -6
- package/dist/bundle/index.js +6 -6
- package/dist/bundle/rpc-entry.js +2 -2
- package/dist/coordination/adapter/delivery.d.ts.map +1 -1
- package/dist/coordination/adapter/delivery.js +1 -0
- package/dist/coordination/adapter/delivery.js.map +1 -1
- package/dist/coordination/adapter/index.d.ts.map +1 -1
- package/dist/coordination/adapter/index.js +3 -1
- package/dist/coordination/adapter/index.js.map +1 -1
- package/dist/coordination/adapter/receipts.d.ts +2 -1
- package/dist/coordination/adapter/receipts.d.ts.map +1 -1
- package/dist/coordination/adapter/receipts.js +7 -4
- package/dist/coordination/adapter/receipts.js.map +1 -1
- package/dist/coordination/adapter/supervisor.d.ts.map +1 -1
- package/dist/coordination/adapter/supervisor.js +8 -0
- package/dist/coordination/adapter/supervisor.js.map +1 -1
- package/dist/coordination/broker/broker.d.ts +11 -0
- package/dist/coordination/broker/broker.d.ts.map +1 -1
- package/dist/coordination/broker/broker.js +195 -18
- package/dist/coordination/broker/broker.js.map +1 -1
- package/dist/coordination/client/client.d.ts +5 -0
- package/dist/coordination/client/client.d.ts.map +1 -1
- package/dist/coordination/client/client.js +23 -9
- package/dist/coordination/client/client.js.map +1 -1
- package/dist/coordination/transport/protocol.d.ts.map +1 -1
- package/dist/coordination/transport/protocol.js +8 -1
- package/dist/coordination/transport/protocol.js.map +1 -1
- package/dist/coordination/transport/types.d.ts +6 -0
- package/dist/coordination/transport/types.d.ts.map +1 -1
- package/dist/coordination/transport/types.js +2 -1
- package/dist/coordination/transport/types.js.map +1 -1
- package/dist/core/agent-session.d.ts +44 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +305 -124
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +20 -13
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/auto-effort.d.ts +16 -0
- package/dist/core/auto-effort.d.ts.map +1 -0
- package/dist/core/auto-effort.js +69 -0
- package/dist/core/auto-effort.js.map +1 -0
- package/dist/core/auto-session-namer.d.ts.map +1 -1
- package/dist/core/auto-session-namer.js +2 -12
- package/dist/core/auto-session-namer.js.map +1 -1
- package/dist/core/bug-report.d.ts +11 -1
- package/dist/core/bug-report.d.ts.map +1 -1
- package/dist/core/bug-report.js +2 -2
- package/dist/core/bug-report.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +3 -2
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +1 -1
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +13 -4
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +94 -5
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/utils.d.ts +6 -0
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +7 -8
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +4 -2
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +6 -3
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +33 -7
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/key-id-schema.d.ts +6 -0
- package/dist/core/key-id-schema.d.ts.map +1 -0
- package/dist/core/key-id-schema.js +16 -0
- package/dist/core/key-id-schema.js.map +1 -0
- package/dist/core/keybindings-schema.d.ts +4 -0
- package/dist/core/keybindings-schema.d.ts.map +1 -0
- package/dist/core/keybindings-schema.js +16 -0
- package/dist/core/keybindings-schema.js.map +1 -0
- package/dist/core/keybindings.d.ts +198 -63
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +26 -23
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-config.d.ts +695 -74
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +16 -166
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +39 -4
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +3 -3
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js +2 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts +13 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +110 -27
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +5 -1
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/session-export.d.ts.map +1 -1
- package/dist/core/session-export.js +2 -2
- package/dist/core/session-export.js.map +1 -1
- package/dist/core/session-manager.d.ts +36 -5
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +164 -40
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +65 -0
- package/dist/core/settings-defaults.d.ts.map +1 -0
- package/dist/core/settings-defaults.js +66 -0
- package/dist/core/settings-defaults.js.map +1 -0
- package/dist/core/settings-manager.d.ts +10 -175
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +64 -44
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +257 -0
- package/dist/core/settings-schema.d.ts.map +1 -0
- package/dist/core/settings-schema.js +311 -0
- package/dist/core/settings-schema.js.map +1 -0
- package/dist/core/tools/edit-diff.d.ts +4 -1
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js +480 -29
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +18 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +46 -0
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/bash.d.ts.map +1 -1
- package/dist/core/tools/renderers/bash.js +17 -46
- package/dist/core/tools/renderers/bash.js.map +1 -1
- package/dist/core/tools/renderers/edit.d.ts +19 -1
- package/dist/core/tools/renderers/edit.d.ts.map +1 -1
- package/dist/core/tools/renderers/edit.js +38 -7
- package/dist/core/tools/renderers/edit.js.map +1 -1
- package/dist/core/tools/renderers/find.d.ts.map +1 -1
- package/dist/core/tools/renderers/find.js +3 -0
- package/dist/core/tools/renderers/find.js.map +1 -1
- package/dist/core/tools/renderers/grep.d.ts.map +1 -1
- package/dist/core/tools/renderers/grep.js +3 -0
- package/dist/core/tools/renderers/grep.js.map +1 -1
- package/dist/core/tools/renderers/highlighting.d.ts +13 -0
- package/dist/core/tools/renderers/highlighting.d.ts.map +1 -0
- package/dist/core/tools/renderers/highlighting.js +42 -0
- package/dist/core/tools/renderers/highlighting.js.map +1 -0
- package/dist/core/tools/renderers/ls.d.ts.map +1 -1
- package/dist/core/tools/renderers/ls.js +3 -0
- package/dist/core/tools/renderers/ls.js.map +1 -1
- package/dist/core/tools/renderers/read.d.ts.map +1 -1
- package/dist/core/tools/renderers/read.js +3 -0
- package/dist/core/tools/renderers/read.js.map +1 -1
- package/dist/core/tools/renderers/write.d.ts.map +1 -1
- package/dist/core/tools/renderers/write.js +3 -1
- package/dist/core/tools/renderers/write.js.map +1 -1
- package/dist/core/tools/subagent.d.ts +4 -0
- package/dist/core/tools/subagent.d.ts.map +1 -1
- package/dist/core/tools/subagent.js +85 -8
- package/dist/core/tools/subagent.js.map +1 -1
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js +92 -44
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/usage-totals.d.ts +8 -1
- package/dist/core/usage-totals.d.ts.map +1 -1
- package/dist/core/usage-totals.js +106 -10
- package/dist/core/usage-totals.js.map +1 -1
- package/dist/extensions/codemode/execute.d.ts.map +1 -1
- package/dist/extensions/codemode/execute.js +64 -45
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/codemode/index.d.ts.map +1 -1
- package/dist/extensions/codemode/index.js +2 -1
- package/dist/extensions/codemode/index.js.map +1 -1
- package/dist/extensions/codemode/renderer.d.ts +2 -2
- package/dist/extensions/codemode/renderer.d.ts.map +1 -1
- package/dist/extensions/codemode/renderer.js +9 -3
- package/dist/extensions/codemode/renderer.js.map +1 -1
- package/dist/extensions/codemode/tool.d.ts +6 -12
- package/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/dist/extensions/codemode/tool.js +44 -32
- package/dist/extensions/codemode/tool.js.map +1 -1
- package/dist/extensions/mcp/cli.js +5 -8
- package/dist/extensions/mcp/cli.js.map +1 -1
- package/dist/extensions/mcp/index.d.ts.map +1 -1
- package/dist/extensions/mcp/index.js +26 -23
- package/dist/extensions/mcp/index.js.map +1 -1
- package/dist/extensions/mcp/resources.d.ts +0 -6
- package/dist/extensions/mcp/resources.d.ts.map +1 -1
- package/dist/extensions/mcp/resources.js +1 -1
- package/dist/extensions/mcp/resources.js.map +1 -1
- package/dist/extensions/mcp/runtime.d.ts +3 -6
- package/dist/extensions/mcp/runtime.d.ts.map +1 -1
- package/dist/extensions/mcp/runtime.js +4 -39
- package/dist/extensions/mcp/runtime.js.map +1 -1
- package/dist/extensions/mcp/tools.d.ts +2 -3
- package/dist/extensions/mcp/tools.d.ts.map +1 -1
- package/dist/extensions/mcp/tools.js +62 -6
- package/dist/extensions/mcp/tools.js.map +1 -1
- package/dist/extensions/tool-search/tool.d.ts +0 -2
- package/dist/extensions/tool-search/tool.d.ts.map +1 -1
- package/dist/extensions/tool-search/tool.js +2 -4
- package/dist/extensions/tool-search/tool.js.map +1 -1
- package/dist/humain/adhd/index.d.ts +3 -2
- package/dist/humain/adhd/index.d.ts.map +1 -1
- package/dist/humain/adhd/index.js +22 -10
- package/dist/humain/adhd/index.js.map +1 -1
- package/dist/humain/bedrock-provider/vendor/index.bundle.mjs +306 -20
- package/dist/humain/caveman/index.d.ts +4 -2
- package/dist/humain/caveman/index.d.ts.map +1 -1
- package/dist/humain/caveman/index.js +51 -16
- package/dist/humain/caveman/index.js.map +1 -1
- package/dist/humain/ponytail/index.d.ts +2 -0
- package/dist/humain/ponytail/index.d.ts.map +1 -1
- package/dist/humain/ponytail/index.js +2 -0
- package/dist/humain/ponytail/index.js.map +1 -1
- package/dist/humain/ponytail/vendor/hooks/ponytail-config.d.ts.map +1 -1
- package/dist/humain/ponytail/vendor/hooks/ponytail-config.js +39 -9
- package/dist/humain/ponytail/vendor/hooks/ponytail-config.js.map +1 -1
- package/dist/humain/ponytail/vendor/hooks/ponytail-instructions.js +1 -1
- package/dist/humain/ponytail/vendor/hooks/ponytail-instructions.js.map +1 -1
- package/dist/humain/ponytail/vendor/pi-extension/index.d.ts +4 -0
- package/dist/humain/ponytail/vendor/pi-extension/index.d.ts.map +1 -1
- package/dist/humain/ponytail/vendor/pi-extension/index.js +8 -0
- package/dist/humain/ponytail/vendor/pi-extension/index.js.map +1 -1
- package/dist/humain/web-access/vendor/baizhi.js.map +1 -1
- package/dist/humain/web-access/vendor/brave.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/brave.js +19 -2
- package/dist/humain/web-access/vendor/brave.js.map +1 -1
- package/dist/humain/web-access/vendor/ceramic.d.ts +4 -0
- package/dist/humain/web-access/vendor/ceramic.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/ceramic.js +212 -0
- package/dist/humain/web-access/vendor/ceramic.js.map +1 -0
- package/dist/humain/web-access/vendor/content-find.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/content-find.js +2 -1
- package/dist/humain/web-access/vendor/content-find.js.map +1 -1
- package/dist/humain/web-access/vendor/curator-page.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/curator-page.js +3 -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 +2 -0
- package/dist/humain/web-access/vendor/curator-server.js.map +1 -1
- package/dist/humain/web-access/vendor/duckduckgo.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/duckduckgo.js +5 -1
- package/dist/humain/web-access/vendor/duckduckgo.js.map +1 -1
- package/dist/humain/web-access/vendor/endpoint-pdf-extract.d.ts +23 -0
- package/dist/humain/web-access/vendor/endpoint-pdf-extract.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/endpoint-pdf-extract.js +193 -0
- package/dist/humain/web-access/vendor/endpoint-pdf-extract.js.map +1 -0
- package/dist/humain/web-access/vendor/extract.d.ts +5 -1
- package/dist/humain/web-access/vendor/extract.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/extract.js +49 -12
- package/dist/humain/web-access/vendor/extract.js.map +1 -1
- package/dist/humain/web-access/vendor/fetch-params.d.ts +2 -0
- package/dist/humain/web-access/vendor/fetch-params.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/fetch-params.js +9 -0
- package/dist/humain/web-access/vendor/fetch-params.js.map +1 -1
- package/dist/humain/web-access/vendor/gemini-api.d.ts +5 -0
- package/dist/humain/web-access/vendor/gemini-api.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/gemini-api.js +16 -0
- package/dist/humain/web-access/vendor/gemini-api.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 +48 -172
- package/dist/humain/web-access/vendor/gemini-search.js.map +1 -1
- package/dist/humain/web-access/vendor/github-extract.d.ts +7 -0
- package/dist/humain/web-access/vendor/github-extract.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/github-extract.js +31 -2
- package/dist/humain/web-access/vendor/github-extract.js.map +1 -1
- package/dist/humain/web-access/vendor/github-issue-pr.d.ts +2 -0
- package/dist/humain/web-access/vendor/github-issue-pr.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/github-issue-pr.js +86 -74
- package/dist/humain/web-access/vendor/github-issue-pr.js.map +1 -1
- package/dist/humain/web-access/vendor/index.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/index.js +68 -27
- package/dist/humain/web-access/vendor/index.js.map +1 -1
- package/dist/humain/web-access/vendor/openai-search.js +3 -3
- package/dist/humain/web-access/vendor/openai-search.js.map +1 -1
- package/dist/humain/web-access/vendor/page-query.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/page-query.js +6 -9
- package/dist/humain/web-access/vendor/page-query.js.map +1 -1
- package/dist/humain/web-access/vendor/parallel-mcp.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/parallel-mcp.js +2 -0
- package/dist/humain/web-access/vendor/parallel-mcp.js.map +1 -1
- package/dist/humain/web-access/vendor/pdf-extract.d.ts +1 -1
- package/dist/humain/web-access/vendor/pdf-extract.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/pdf-extract.js +31 -1
- package/dist/humain/web-access/vendor/pdf-extract.js.map +1 -1
- package/dist/humain/web-access/vendor/perplexity.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/perplexity.js +21 -2
- package/dist/humain/web-access/vendor/perplexity.js.map +1 -1
- package/dist/humain/web-access/vendor/query-rewrite.js +1 -1
- package/dist/humain/web-access/vendor/query-rewrite.js.map +1 -1
- package/dist/humain/web-access/vendor/ssrf-protection.d.ts +4 -0
- package/dist/humain/web-access/vendor/ssrf-protection.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/ssrf-protection.js +19 -4
- package/dist/humain/web-access/vendor/ssrf-protection.js.map +1 -1
- package/dist/humain/web-access/vendor/storage.d.ts +14 -0
- package/dist/humain/web-access/vendor/storage.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/storage.js +48 -0
- package/dist/humain/web-access/vendor/storage.js.map +1 -1
- package/dist/humain/web-access/vendor/summary-review.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/summary-review.js +18 -6
- package/dist/humain/web-access/vendor/summary-review.js.map +1 -1
- package/dist/humain/web-access/vendor/tool-arguments.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/tool-arguments.js +5 -2
- package/dist/humain/web-access/vendor/tool-arguments.js.map +1 -1
- package/dist/humain/web-access/vendor/utils.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/utils.js +21 -6
- package/dist/humain/web-access/vendor/utils.js.map +1 -1
- package/dist/humain/web-access/vendor/video-extract.js +6 -2
- package/dist/humain/web-access/vendor/video-extract.js.map +1 -1
- package/dist/humain/web-access/vendor/web-tool-core.d.ts +2 -1
- package/dist/humain/web-access/vendor/web-tool-core.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/web-tool-core.js +56 -13
- package/dist/humain/web-access/vendor/web-tool-core.js.map +1 -1
- package/dist/humain/web-access/vendor/zai.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.js +3 -3
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +21 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +79 -10
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +8 -3
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +156 -133
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/mermaid.js +1 -1
- package/dist/modes/interactive/components/mermaid.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +10 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +83 -7
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +2 -2
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/components/themed-text.d.ts.map +1 -1
- package/dist/modes/interactive/components/themed-text.js +3 -1
- package/dist/modes/interactive/components/themed-text.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +7 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +36 -19
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/transcript-container.d.ts +12 -0
- package/dist/modes/interactive/components/transcript-container.d.ts.map +1 -0
- package/dist/modes/interactive/components/transcript-container.js +31 -0
- package/dist/modes/interactive/components/transcript-container.js.map +1 -0
- package/dist/modes/interactive/components/user-message.d.ts +6 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +20 -5
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +20 -5
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js +42 -3
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +2 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +125 -19
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.d.ts +28 -0
- package/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.js +105 -0
- package/dist/modes/interactive/theme/theme-schema.js.map +1 -0
- package/dist/modes/interactive/theme/theme-tokens.d.ts +257 -0
- package/dist/modes/interactive/theme/theme-tokens.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-tokens.js +94 -0
- package/dist/modes/interactive/theme/theme-tokens.js.map +1 -0
- package/dist/modes/interactive/theme/theme.d.ts +15 -16
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +26 -29
- 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 +4 -0
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/utils/child-process.d.ts +0 -7
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js +12 -3
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +6 -1
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/image-convert.d.ts +7 -0
- package/dist/utils/image-convert.d.ts.map +1 -1
- package/dist/utils/image-convert.js +35 -3
- package/dist/utils/image-convert.js.map +1 -1
- package/dist/utils/image-resize.d.ts.map +1 -1
- package/dist/utils/image-resize.js +2 -2
- package/dist/utils/image-resize.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts +7 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +54 -3
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/windows-path.js +1 -1
- package/dist/utils/windows-path.js.map +1 -1
- package/dist/utils/zip.d.ts.map +1 -1
- package/dist/utils/zip.js +3 -1
- package/dist/utils/zip.js.map +1 -1
- package/docs/auto-session-namer.md +4 -0
- package/docs/cli-integration.md +1 -1
- package/docs/cli.md +1 -1
- package/docs/codemode.md +1 -1
- package/docs/compaction.md +9 -5
- package/docs/coordination.md +7 -0
- package/docs/environment-variables.md +1 -0
- package/docs/extensions.md +7 -4
- package/docs/keybindings.md +1 -0
- package/docs/mcp.md +1 -1
- package/docs/models.md +1 -0
- package/docs/providers.md +20 -0
- package/docs/session-format.md +16 -2
- package/docs/settings.md +16 -1
- package/docs/themes.md +4 -2
- package/docs/tui.md +1 -1
- package/docs/usage.md +6 -2
- package/examples/extensions/custom-provider-anthropic/package-lock.json +6 -6
- package/examples/extensions/custom-provider-anthropic/package.json +2 -2
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/dynamic-resources/dynamic.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +20 -20
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/overlay-test.ts +2 -2
- package/examples/extensions/plan-mode/index.ts +6 -2
- package/examples/extensions/sandbox/package-lock.json +8 -8
- package/examples/extensions/sandbox/package.json +2 -2
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/plugins/pi-example-plugin/package.json +2 -2
- package/examples/plugins/pi-example-plugin/src/contract.ts +1 -1
- package/examples/plugins/pi-example-plugin/src/session.ts +1 -1
- package/examples/plugins/pi-example-plugin/src/tui.ts +1 -1
- package/npm-shrinkwrap.json +174 -190
- package/package.json +24 -23
- package/schemas/keybindings.schema.json +397 -0
- package/schemas/models.schema.json +1157 -0
- package/schemas/settings.schema.json +875 -0
- package/schemas/theme.schema.json +365 -0
- package/src/coordination/UPSTREAM.md +36 -3
- package/src/coordination/upstream.json +3 -2
- package/src/humain/adhd/UPSTREAM.md +21 -3
- package/src/humain/adhd/upstream.json +1 -1
- package/src/humain/caveman/UPSTREAM.md +24 -3
- package/src/humain/ponytail/UPSTREAM.md +51 -4
- package/src/humain/ponytail/upstream.json +12 -12
- package/src/humain/ponytail/vendor/skills/ponytail/SKILL.md +1 -1
- package/src/humain/ponytail/vendor/skills/ponytail-audit/SKILL.md +1 -1
- package/src/humain/ponytail/vendor/skills/ponytail-debt/SKILL.md +13 -10
- package/src/humain/ponytail/vendor/skills/ponytail-help/SKILL.md +1 -1
- package/src/humain/ponytail/vendor/skills/ponytail-review/SKILL.md +1 -1
- package/src/humain/web-access/UPSTREAM.md +55 -1
- package/src/humain/web-access/upstream.json +4 -4
- package/dist/bundle/chunks/anthropic-messages-UNHXXOD4.js +0 -70
- package/dist/bundle/chunks/azure-openai-responses-4QRYJCC2.js +0 -14
- package/dist/bundle/chunks/chunk-GVVRXZHN.js +0 -17
- package/dist/bundle/chunks/chunk-QMUIATLD.js +0 -209
- package/dist/bundle/chunks/chunk-QSPDLT2R.js +0 -160
- package/dist/bundle/chunks/chunk-SZRZXVVZ.js +0 -125
- package/dist/bundle/chunks/chunk-XMHLSV3I.js +0 -48
- package/dist/bundle/chunks/chunk-YKZGL4MB.js +0 -86
- package/dist/bundle/chunks/dist-VNSMKBZ6.js +0 -7
- package/dist/bundle/chunks/es-N6YFJOD7.js +0 -1901
- package/dist/bundle/chunks/execute-4X6G65NZ.js +0 -536
- package/dist/bundle/chunks/host-4J7H7KDS.js +0 -2
- package/dist/bundle/chunks/runtime-SI76JZNE.js +0 -2
- package/dist/bundle/chunks/virtual-modules-GZY3Y4GX.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/coordination/transport/protocol.ts"],"names":[],"mappings":"AAAA,iHAAiH;AACjH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAiBzC;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAExC,mHAAmH;AACnH,MAAM,CAAC,MAAM,gBAAgB,GAAG,yDAAyD,CAAC;AAE1F,MAAM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,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,GAAG,sBAAsB,IAAI,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EAChG,CAAC;QACF,OAAO;YACN,EAAE,EAAE,KAAK;YACT,MAAM,EAAE,wBAAwB,sBAAsB,wCAAwC;SAC9F,CAAC;IACH,CAAC;IACD,OAAO;QACN,EAAE,EAAE,IAAI;QACR,KAAK,EAAE;YACN,MAAM;YACN,OAAO,EAAE,CAAC,GAAG,OAAO,CAAa;YACjC,IAAI;YACJ,MAAM;YACN,YAAY,EAAE,CAAC,GAAG,YAAY,CAAa;YAC3C,YAAY,EAAE,MAAM;YACpB,YAAY,EAAE,CAAC,GAAG,YAAY,CAAa;YAC3C,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACvC;KACD,CAAC;AACH,CAAC","sourcesContent":["// Derived from pi-intercom (MIT, Copyright (c) 2026 Nico Bailon), commit a5fad4df; modified for HUMAIN Code CLI.\nimport { createHash } from \"node:crypto\";\nimport type {\n\tAttachment,\n\tHandoffInput,\n\tHandoffVerification,\n\tMessage,\n\tMessageControl,\n\tMessageProvenance,\n\tMessageReceipt,\n\tMessageReceiptStatus,\n\tOwnershipMode,\n\tRecordState,\n\tSessionInfo,\n\tSessionRegistration,\n\tTouchedPath,\n} from \"./types.ts\";\n\n/**\n * Longest message id, in UTF-16 code units. The broker rejects longer ids before persisting, so every\n * accepted message can be acknowledged and the worst-case mailbox snapshot stays bounded.\n */\nexport const MAX_MESSAGE_ID_CHARS = 128;\n\n/** Detail of a `deferred` receipt for a message whose id another sender's message still holds at the recipient. */\nexport const ID_IN_USE_DETAIL = \"message id is still held by another sender; retry later\";\n\nexport function isValidMessageId(value: unknown): value is string {\n\treturn typeof value === \"string\" && value.length > 0 && value.length <= MAX_MESSAGE_ID_CHARS;\n}\n\n/** Longest accepted value, in UTF-16 code units, for each client-supplied session metadata string. */\nexport const MAX_SESSION_FIELD_CHARS = {\n\tid: 256,\n\tname: 256,\n\tmodel: 256,\n\tstatus: 256,\n\tbranch: 256,\n\tcwd: 4096,\n\tworktreeRoot: 4096,\n\trepo: 256,\n\tfocus: 256,\n\tsubpath: 4096,\n} as const;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\n/** True for a string no longer than `maxChars`. */\nexport function isBoundedString(value: unknown, maxChars: number): value is string {\n\treturn typeof value === \"string\" && value.length <= maxChars;\n}\n\nfunction isOptionalBoundedString(value: unknown, maxChars: number): boolean {\n\treturn value === undefined || isBoundedString(value, maxChars);\n}\n\nfunction isMessageReceiptStatus(value: unknown): value is MessageReceiptStatus {\n\treturn (\n\t\tvalue === \"receiver_received\" ||\n\t\tvalue === \"queued\" ||\n\t\tvalue === \"injected\" ||\n\t\tvalue === \"not_injected\" ||\n\t\tvalue === \"deferred\" ||\n\t\tvalue === \"acknowledged\" ||\n\t\tvalue === \"expired\" ||\n\t\tvalue === \"cancelled\" ||\n\t\tvalue === \"superseded\" ||\n\t\tvalue === \"cancellation_requested\"\n\t);\n}\n\n/** Longest `detail` (UTF-16 code units) the broker relays in a message receipt; longer ones are truncated. */\nexport const MAX_RECEIPT_DETAIL_CHARS = 1024;\n\n/** Longest accepted `requestId` (UTF-16 code units) on a list request, so its reply always fits a frame. */\nexport const MAX_REQUEST_ID_CHARS = 256;\n/**\n * Largest requestId the protocol accepts, in serialized size: isRequestId allows any 1..MAX_REQUEST_ID_CHARS\n * UTF-16 units, and a control char JSON-escapes to 6 bytes (\\u0001), more than any other unit.\n */\nexport const WORST_CASE_REQUEST_ID = \"\\u0001\".repeat(MAX_REQUEST_ID_CHARS);\n\n/** Cap UTF-16 code units without splitting a surrogate pair. */\nexport function truncateChars(text: string, maxChars: number): string {\n\tif (text.length <= maxChars) return text;\n\tconst cut = text.slice(0, maxChars);\n\tconst last = cut.charCodeAt(cut.length - 1);\n\t// Do not leave the first half of a surrogate pair dangling at the end.\n\treturn last >= 0xd800 && last <= 0xdbff ? cut.slice(0, -1) : cut;\n}\n\n/**\n * The receipt the broker relays: a new object holding only the known fields, with `detail` bounded. Fields\n * a sender adds beyond the schema never reach the peer.\n */\nexport function canonicalMessageReceipt(receipt: MessageReceipt): MessageReceipt {\n\treturn {\n\t\tmessageId: receipt.messageId,\n\t\tstatus: receipt.status,\n\t\ttimestamp: receipt.timestamp,\n\t\t...(receipt.detail !== undefined ? { detail: truncateChars(receipt.detail, MAX_RECEIPT_DETAIL_CHARS) } : {}),\n\t};\n}\n\nexport function isMessageReceipt(value: unknown): value is MessageReceipt {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\tif (\n\t\ttypeof value.messageId !== \"string\" ||\n\t\t!isMessageReceiptStatus(value.status) ||\n\t\ttypeof value.timestamp !== \"number\"\n\t) {\n\t\treturn false;\n\t}\n\treturn value.detail === undefined || typeof value.detail === \"string\";\n}\n\nexport function isMessageControl(value: unknown): value is MessageControl {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\tif (typeof value.messageId !== \"string\" || typeof value.timestamp !== \"number\") {\n\t\treturn false;\n\t}\n\tif (value.action !== \"cancel\" && value.action !== \"supersede\") {\n\t\treturn false;\n\t}\n\tif (value.supersededBy !== undefined && typeof value.supersededBy !== \"string\") {\n\t\treturn false;\n\t}\n\treturn value.detail === undefined || typeof value.detail === \"string\";\n}\n\nfunction isAttachment(value: unknown): value is Attachment {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\tif (value.type !== \"file\" && value.type !== \"snippet\" && value.type !== \"context\") {\n\t\treturn false;\n\t}\n\n\tif (typeof value.name !== \"string\" || typeof value.content !== \"string\") {\n\t\treturn false;\n\t}\n\n\treturn value.language === undefined || typeof value.language === \"string\";\n}\n\nfunction isMessageProvenance(value: unknown): value is MessageProvenance {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\treturn (\n\t\tvalue.type === \"extension_outbox\" &&\n\t\ttypeof value.extensionId === \"string\" &&\n\t\ttypeof value.extensionName === \"string\" &&\n\t\ttypeof value.requestId === \"string\"\n\t);\n}\n\nexport function isMessage(value: unknown): value is Message {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\tif (typeof value.id !== \"string\" || typeof value.timestamp !== \"number\") {\n\t\treturn false;\n\t}\n\n\tfor (const key of [\n\t\t\"senderSequence\",\n\t\t\"brokerReceivedAt\",\n\t\t\"brokerDeliveredAt\",\n\t\t\"receiverReceivedAt\",\n\t\t\"injectedAt\",\n\t] as const) {\n\t\tif (value[key] !== undefined && typeof value[key] !== \"number\") {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (value.supersedes !== undefined && typeof value.supersedes !== \"string\") {\n\t\treturn false;\n\t}\n\n\tif (value.retryOf !== undefined && typeof value.retryOf !== \"string\") {\n\t\treturn false;\n\t}\n\n\tif (value.replyTo !== undefined && typeof value.replyTo !== \"string\") {\n\t\treturn false;\n\t}\n\n\tif (value.expectsReply !== undefined && typeof value.expectsReply !== \"boolean\") {\n\t\treturn false;\n\t}\n\n\tif (value.provenance !== undefined && !isMessageProvenance(value.provenance)) {\n\t\treturn false;\n\t}\n\n\tif (!isRecord(value.content) || typeof value.content.text !== \"string\") {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\tvalue.content.attachments === undefined ||\n\t\t(Array.isArray(value.content.attachments) && value.content.attachments.every(isAttachment))\n\t);\n}\n\n/**\n * Canonical authored-message identity used by the broker's replay guard: the SHA-256 hex digest of the\n * canonical serialization, so retained delivery records stay small whatever the message size.\n */\nexport function messageDeliveryFingerprint(message: Message, targetId: string): string {\n\tconst canonical = JSON.stringify({\n\t\ttargetId,\n\t\ttext: message.content.text,\n\t\tattachments: message.content.attachments,\n\t\treplyTo: message.replyTo,\n\t\texpectsReply: message.expectsReply,\n\t\tsupersedes: message.supersedes,\n\t\tretryOf: message.retryOf,\n\t\tprovenance: message.provenance,\n\t});\n\treturn createHash(\"sha256\").update(canonical).digest(\"hex\");\n}\n\nexport function isTouchedPaths(value: unknown): value is TouchedPath[] {\n\treturn (\n\t\tArray.isArray(value) &&\n\t\tvalue.length <= 20 &&\n\t\tvalue.every(\n\t\t\t(entry) =>\n\t\t\t\tisRecord(entry) &&\n\t\t\t\tisBoundedString(entry.path, 4096) &&\n\t\t\t\tentry.path.length > 0 &&\n\t\t\t\t!entry.path.startsWith(\"/\") &&\n\t\t\t\t!entry.path.split(\"/\").includes(\"..\") &&\n\t\t\t\ttypeof entry.timestamp === \"number\" &&\n\t\t\t\tNumber.isFinite(entry.timestamp) &&\n\t\t\t\tentry.timestamp >= 0,\n\t\t) &&\n\t\tnew Set(value.map((entry) => entry.path)).size === value.length\n\t);\n}\n\nfunction isDiscoveryPresence(value: Record<string, unknown>): boolean {\n\treturn (\n\t\tisOptionalBoundedString(value.repo, 256) &&\n\t\tisOptionalBoundedString(value.focus, 256) &&\n\t\t(value.focus === undefined || !/[\\r\\n\\u2028\\u2029]/.test(String(value.focus))) &&\n\t\tisOptionalBoundedString(value.subpath, 4096) &&\n\t\t(value.touchedPaths === undefined || isTouchedPaths(value.touchedPaths))\n\t);\n}\n\nexport function isSessionInfo(value: unknown): value is SessionInfo {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\tif (\n\t\t!isBoundedString(value.id, MAX_SESSION_FIELD_CHARS.id) ||\n\t\t!isBoundedString(value.cwd, MAX_SESSION_FIELD_CHARS.cwd) ||\n\t\t!isBoundedString(value.model, MAX_SESSION_FIELD_CHARS.model) ||\n\t\ttypeof value.pid !== \"number\" ||\n\t\ttypeof value.startedAt !== \"number\" ||\n\t\ttypeof value.lastActivity !== \"number\"\n\t) {\n\t\treturn false;\n\t}\n\n\tif (value.endpointEpoch !== undefined && typeof value.endpointEpoch !== \"string\") {\n\t\treturn false;\n\t}\n\n\tif (!isOptionalBoundedString(value.name, MAX_SESSION_FIELD_CHARS.name)) {\n\t\treturn false;\n\t}\n\n\tif (value.runtimeFallbackAlias !== undefined && typeof value.runtimeFallbackAlias !== \"boolean\") {\n\t\treturn false;\n\t}\n\n\tif (!isOptionalBoundedString(value.status, MAX_SESSION_FIELD_CHARS.status)) {\n\t\treturn false;\n\t}\n\n\tif (value.peerUid !== undefined && typeof value.peerUid !== \"number\") {\n\t\treturn false;\n\t}\n\n\tfor (const key of [\"contextPct\", \"contextTokens\", \"contextWindow\"] as const) {\n\t\tif (value[key] !== undefined && typeof value[key] !== \"number\") {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (!isOptionalBoundedString(value.worktreeRoot, MAX_SESSION_FIELD_CHARS.worktreeRoot)) {\n\t\treturn false;\n\t}\n\tif (!isOptionalBoundedString(value.branch, MAX_SESSION_FIELD_CHARS.branch)) {\n\t\treturn false;\n\t}\n\n\treturn isDiscoveryPresence(value) && (value.trustedLocal === undefined || typeof value.trustedLocal === \"boolean\");\n}\n\nexport function isSessionId(value: unknown): value is string {\n\treturn isBoundedString(value, MAX_SESSION_FIELD_CHARS.id) && value.trim().length > 0;\n}\n\nexport function isSessionRegistration(value: unknown): value is SessionRegistration {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\tif (\n\t\t!isBoundedString(value.cwd, MAX_SESSION_FIELD_CHARS.cwd) ||\n\t\t!isBoundedString(value.model, MAX_SESSION_FIELD_CHARS.model) ||\n\t\ttypeof value.pid !== \"number\" ||\n\t\ttypeof value.startedAt !== \"number\" ||\n\t\ttypeof value.lastActivity !== \"number\"\n\t) {\n\t\treturn false;\n\t}\n\n\tif (!isOptionalBoundedString(value.name, MAX_SESSION_FIELD_CHARS.name)) {\n\t\treturn false;\n\t}\n\tif (value.runtimeFallbackAlias !== undefined && typeof value.runtimeFallbackAlias !== \"boolean\") {\n\t\treturn false;\n\t}\n\tif (value.extensions !== undefined && !Array.isArray(value.extensions)) {\n\t\treturn false;\n\t}\n\tif (!isOptionalBoundedString(value.worktreeRoot, MAX_SESSION_FIELD_CHARS.worktreeRoot)) {\n\t\treturn false;\n\t}\n\tif (!isOptionalBoundedString(value.branch, MAX_SESSION_FIELD_CHARS.branch)) {\n\t\treturn false;\n\t}\n\tif (value.ownership !== undefined && !isOwnershipMode(value.ownership)) {\n\t\treturn false;\n\t}\n\n\treturn isDiscoveryPresence(value) && isOptionalBoundedString(value.status, MAX_SESSION_FIELD_CHARS.status);\n}\n\nexport const MAX_RECORD_VALUE_BYTES = 65536;\nexport const MAX_RECORD_VALUE_DEPTH = 16;\nexport const MAX_RECORD_ARTIFACT_REFS = 64;\nexport const MAX_RECORDS = 1024;\nexport const RECORD_KEY_PATTERN = /^[a-z0-9][a-z0-9._-]{0,127}$/;\nexport const RESERVED_RECORD_KEYS: readonly string[] = [\"presence\", \"policy\", \"integration\"];\nexport const RESERVED_NAMESPACE_PREFIX = \"humain.coord.\";\nexport const RECORD_NAMESPACE_PREFIX = \"humain.coord.record:\";\nexport const POLICY_NAMESPACE = \"humain.coord.policy\";\nexport const ARTIFACT_NAMESPACE_PREFIX = \"humain.coord.artifact:\";\n\nexport const MAX_ARTIFACT_BYTES = 16 * 1024 * 1024;\nexport const ARTIFACT_QUOTA_BYTES = 256 * 1024 * 1024;\nexport const MAX_ARTIFACTS = 1024;\nexport const MAX_ARTIFACT_NAME_CHARS = 256;\nexport const MAX_ARTIFACT_NAME_SEGMENTS = 8;\nexport const ARTIFACT_SEGMENT_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;\nexport const STAGED_FILE_PATTERN = /^[a-f0-9]{32}\\.part$/;\nexport const ARTIFACT_RETENTION_MS = 7 * 24 * 60 * 60 * 1000;\nexport const RECORD_TOMBSTONE_RETENTION_MS = ARTIFACT_RETENTION_MS;\nexport const STALE_STAGED_FILE_MS = 60 * 60 * 1000;\n\nconst FORBIDDEN_JSON_KEYS: ReadonlySet<string> = new Set([\"__proto__\", \"constructor\", \"prototype\"]);\n\nexport interface JsonSafeLimits {\n\tmaxBytes: number;\n\tmaxDepth: number;\n}\nexport type JsonSafeResult = { ok: true; bytes: number } | { ok: false; reason: string };\n\n/** The first reason `value` is not JSON-safe, or undefined. `depth` is the nesting level of `value`'s container. */\nfunction findJsonUnsafe(\n\tvalue: unknown,\n\tdepth: number,\n\tmaxDepth: number,\n\tancestors: Set<object>,\n\tbudget: { remaining: number; limit: number },\n): string | undefined {\n\t// Running strict lower bound of serialized bytes: each value and each piece of punctuation is charged once,\n\t// at its minimum size, so total work is O(limit) and nothing that fits in the limit is rejected here.\n\tconst overBudget = `value is larger than the limit of ${budget.limit} bytes`;\n\tif (value === null) {\n\t\tbudget.remaining -= 4;\n\t\treturn budget.remaining < 0 ? overBudget : undefined;\n\t}\n\tswitch (typeof value) {\n\t\tcase \"boolean\":\n\t\t\tbudget.remaining -= 4;\n\t\t\treturn budget.remaining < 0 ? overBudget : undefined;\n\t\tcase \"string\":\n\t\t\tbudget.remaining -= 2;\n\t\t\treturn budget.remaining < 0 ? overBudget : undefined;\n\t\tcase \"number\":\n\t\t\tif (!Number.isFinite(value)) return \"numbers must be finite\";\n\t\t\tbudget.remaining -= 1;\n\t\t\treturn budget.remaining < 0 ? overBudget : undefined;\n\t\tcase \"object\":\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn `${typeof value} values are not JSON`;\n\t}\n\tif (ancestors.has(value)) return \"value contains a cycle\";\n\tif (depth > maxDepth) return `value is nested deeper than ${maxDepth} levels`;\n\tancestors.add(value);\n\ttry {\n\t\tif (Array.isArray(value)) {\n\t\t\tif (Object.getPrototypeOf(value) !== Array.prototype) return \"only plain arrays are allowed\";\n\t\t\t// Brackets plus separators; elements charge themselves. Checked before enumerating.\n\t\t\tbudget.remaining -= 2 + Math.max(0, value.length - 1);\n\t\t\tif (budget.remaining < 0) return overBudget;\n\t\t\tfor (const key of Reflect.ownKeys(value)) {\n\t\t\t\tif (typeof key === \"symbol\") return \"symbol keys are not JSON\";\n\t\t\t\tif (key === \"length\") continue;\n\t\t\t\tconst index = Number(key);\n\t\t\t\tif (!Number.isInteger(index) || index < 0 || index >= value.length || String(index) !== key)\n\t\t\t\t\treturn `arrays must not have non-index key \"${key}\"`;\n\t\t\t\tif (!Object.getOwnPropertyDescriptor(value, key)?.enumerable)\n\t\t\t\t\treturn `non-enumerable key \"${key}\" is not JSON`;\n\t\t\t}\n\t\t\tfor (let index = 0; index < value.length; index += 1) {\n\t\t\t\tif (!Object.hasOwn(value, index)) return \"arrays must not have holes\";\n\t\t\t\tconst reason = findJsonUnsafe(value[index], depth + 1, maxDepth, ancestors, budget);\n\t\t\t\tif (reason) return reason;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\tconst prototype = Object.getPrototypeOf(value);\n\t\tif (prototype !== Object.prototype && prototype !== null) return \"only plain objects are allowed\";\n\t\tbudget.remaining -= 2; // braces\n\t\tif (budget.remaining < 0) return overBudget;\n\t\tlet first = true;\n\t\tfor (const key of Reflect.ownKeys(value)) {\n\t\t\tif (typeof key === \"symbol\") return \"symbol keys are not JSON\";\n\t\t\tif (!Object.getOwnPropertyDescriptor(value, key)?.enumerable) return `non-enumerable key \"${key}\" is not JSON`;\n\t\t\t// `\"\":` is 3 bytes, plus a separator after the first entry; the value charges itself.\n\t\t\tbudget.remaining -= first ? 3 : 4;\n\t\t\tif (budget.remaining < 0) return overBudget;\n\t\t\tfirst = false;\n\t\t\tif (FORBIDDEN_JSON_KEYS.has(key)) return `key \"${key}\" is not allowed`;\n\t\t\tconst reason = findJsonUnsafe((value as Record<string, unknown>)[key], depth + 1, maxDepth, ancestors, budget);\n\t\t\tif (reason) return reason;\n\t\t}\n\t\treturn undefined;\n\t} finally {\n\t\tancestors.delete(value);\n\t}\n}\n\n/**\n * Accepts null, boolean, finite number, string, arrays and plain objects (prototype Object.prototype or null)\n * of those. Rejects: the own keys \"__proto__\", \"constructor\", \"prototype\" at any depth; undefined, function,\n * symbol, bigint; NaN and +-Infinity; non-plain objects (Map, Date, class instances); sparse array holes;\n * cycles; nesting deeper than maxDepth (root container = depth 1); and a JSON.stringify size above maxBytes,\n * measured as UTF-8 bytes. A running byte lower bound aborts oversized\n * containers early; exact size is checked last.\n */\nexport function validateJsonSafe(value: unknown, limits: JsonSafeLimits): JsonSafeResult {\n\tconst reason = findJsonUnsafe(value, 1, limits.maxDepth, new Set(), {\n\t\tremaining: limits.maxBytes,\n\t\tlimit: limits.maxBytes,\n\t});\n\tif (reason) return { ok: false, reason };\n\tconst bytes = Buffer.byteLength(JSON.stringify(value), \"utf8\");\n\tif (bytes > limits.maxBytes)\n\t\treturn { ok: false, reason: `value is ${bytes} bytes; the limit is ${limits.maxBytes}` };\n\treturn { ok: true, bytes };\n}\n\nexport function isRequestId(value: unknown): value is string {\n\treturn isBoundedString(value, MAX_REQUEST_ID_CHARS) && value.length > 0;\n}\n\nexport function isOwnershipMode(value: unknown): value is OwnershipMode {\n\treturn value === \"on\" || value === \"off\";\n}\n\nexport function isRecordKey(value: unknown): value is string {\n\treturn typeof value === \"string\" && RECORD_KEY_PATTERN.test(value);\n}\n\nexport function isReservedRecordKey(key: string): boolean {\n\treturn RESERVED_RECORD_KEYS.some((reserved) => key === reserved || key.startsWith(`${reserved}.`));\n}\n\nexport function isReservedNamespace(namespace: string): boolean {\n\treturn namespace.startsWith(RESERVED_NAMESPACE_PREFIX);\n}\n\nexport function isSha256Hex(value: unknown): value is string {\n\treturn typeof value === \"string\" && /^[a-f0-9]{64}$/.test(value);\n}\n\nexport function isArtifactName(value: unknown): value is string {\n\tif (typeof value !== \"string\" || value.length === 0 || value.length > MAX_ARTIFACT_NAME_CHARS) return false;\n\tconst segments = value.split(\"/\");\n\treturn (\n\t\tsegments.length <= MAX_ARTIFACT_NAME_SEGMENTS &&\n\t\tsegments.every((segment) => ARTIFACT_SEGMENT_PATTERN.test(segment))\n\t);\n}\n\nexport function isRecordState(value: unknown): value is RecordState {\n\treturn value === \"open\" || value === \"done\";\n}\nexport const INTEGRATION_NAMESPACE = \"humain.coord.integration\";\nexport const HANDOFF_KEY_PREFIX = \"integration.handoff.\";\nexport const RESOLUTION_KEY_PREFIX = \"integration.resolution.\";\nexport const MAX_HANDOFFS = 48;\nexport const MAX_HANDOFF_COMMITS = 32;\nexport const MAX_HANDOFF_DEPENDENCIES = 16;\nexport const MAX_HANDOFF_VERIFICATIONS = 16;\nexport const MAX_HANDOFF_ARTIFACT_REFS = 16;\nexport const MAX_BRANCH_NAME_CHARS = 200;\nexport const MAX_VERIFICATION_COMMAND_CHARS = 256;\nexport const MAX_VERIFICATION_SUMMARY_CHARS = 512;\nexport const MAX_HANDOFF_NOTE_CHARS = 1024;\nexport const MAX_ATTEMPTS = 6;\nexport const MAX_WRITERS = 6;\nexport const MAX_CHECKOUT_ROOT_CHARS = 512;\nexport const MAX_CONFLICT_FILES = 10;\nexport const MAX_CONFLICT_FILE_CHARS = 80;\nexport const MAX_EVIDENCE_CHARS = 256;\n\n/** Actions only a human may cause: they exist as client methods for the /coordinate command, never in the tool. */\nexport const INTEGRATION_AUTHORITY_ACTIONS = [\n\t\"owner_assign\",\n\t\"owner_transfer\",\n\t\"owner_release\",\n\t\"owner_reconcile\",\n\t\"writer_assign\",\n\t\"writer_release\",\n] as const;\n/** Actions agents may request; the broker still enforces the lease, generation and writer rules. */\nexport const INTEGRATION_AGENT_ACTIONS = [\n\t\"status\",\n\t\"handoff_publish\",\n\t\"handoff_list\",\n\t\"handoff_get\",\n\t\"handoff_reclaim\",\n\t\"integrate_begin\",\n\t\"integrate_report\",\n] as const;\n\nfunction hasControlChars(value: string, allowNewline = false): boolean {\n\tfor (let index = 0; index < value.length; index += 1) {\n\t\tconst code = value.charCodeAt(index);\n\t\tif (code === 0x0a && allowNewline) continue;\n\t\tif (code < 0x20 || code === 0x7f) return true;\n\t}\n\treturn false;\n}\n\n/** A full Git object id: 40 (SHA-1) or 64 (SHA-256) lowercase hex digits. Never starts with \"-\". */\nexport function isGitObjectId(value: unknown): value is string {\n\treturn typeof value === \"string\" && /^(?:[a-f0-9]{40}|[a-f0-9]{64})$/.test(value);\n}\n\nexport function isHandoffId(value: unknown): value is string {\n\treturn typeof value === \"string\" && /^[a-f0-9]{16}$/.test(value);\n}\n\n/**\n * Branch short names under refs/heads/, following the `git check-ref-format` rules without running Git, and\n * stricter: printable ASCII only, at most MAX_BRANCH_NAME_CHARS, never \"HEAD\" or \"@\", never a leading \"-\" (it\n * would be read as an option). Implemented here so the broker never shells out.\n */\nexport function isValidBranchName(value: unknown): value is string {\n\tif (typeof value !== \"string\" || value.length === 0 || value.length > MAX_BRANCH_NAME_CHARS) return false;\n\tif (!/^[\\x21-\\x7e]+$/.test(value)) return false;\n\tif (value === \"@\" || value === \"HEAD\") return false;\n\tif (value.startsWith(\"-\") || value.startsWith(\"/\") || value.endsWith(\"/\") || value.endsWith(\".\")) return false;\n\tif (value.includes(\"..\") || value.includes(\"//\") || value.includes(\"@{\")) return false;\n\tif (/[~^:?*[\\\\]/.test(value)) return false;\n\treturn value.split(\"/\").every((part) => !part.startsWith(\".\") && !part.endsWith(\".lock\"));\n}\n\nexport type HandoffInputResult = { ok: true; value: HandoffInput } | { ok: false; reason: string };\n\nfunction uniqueStrings(values: unknown[], isValid: (value: unknown) => boolean): boolean {\n\tfor (let index = 0; index < values.length; index += 1) {\n\t\tif (!Object.hasOwn(values, index) || !isValid(values[index])) return false;\n\t}\n\treturn new Set(values).size === values.length;\n}\n\nfunction parseVerification(value: unknown): HandoffVerification | string {\n\tif (!isRecord(value)) return \"each verification must be an object\";\n\tconst { command, result, summary } = value;\n\tif (\n\t\ttypeof command !== \"string\" ||\n\t\tcommand.length === 0 ||\n\t\tcommand.length > MAX_VERIFICATION_COMMAND_CHARS ||\n\t\thasControlChars(command)\n\t) {\n\t\treturn `verification command must be 1-${MAX_VERIFICATION_COMMAND_CHARS} characters without control characters`;\n\t}\n\tif (result !== \"passed\" && result !== \"failed\" && result !== \"not_run\") {\n\t\treturn 'verification result must be \"passed\", \"failed\" or \"not_run\"';\n\t}\n\tif (\n\t\tsummary !== undefined &&\n\t\t(typeof summary !== \"string\" || summary.length > MAX_VERIFICATION_SUMMARY_CHARS || hasControlChars(summary))\n\t) {\n\t\treturn `verification summary must be at most ${MAX_VERIFICATION_SUMMARY_CHARS} characters without control characters`;\n\t}\n\treturn { command, result, ...(summary !== undefined ? { summary } : {}) };\n}\n\n/**\n * Validates a handoff published by a worker and returns a canonical copy (unknown fields dropped). Commits are\n * listed oldest first, the last one is the tip, all ids have the same length as the base and none equals it.\n */\nexport function validateHandoffInput(value: unknown): HandoffInputResult {\n\tif (!isRecord(value)) return { ok: false, reason: \"handoff must be an object\" };\n\tconst { branch, commits, base, target, dependencies = [], verification = [], artifactRefs = [], note } = value;\n\tif (!isValidBranchName(branch)) return { ok: false, reason: \"branch is not a valid branch name\" };\n\tif (!isValidBranchName(target)) return { ok: false, reason: \"target is not a valid branch name\" };\n\tif (!isGitObjectId(base)) return { ok: false, reason: \"base must be a full commit id\" };\n\tif (\n\t\t!Array.isArray(commits) ||\n\t\tcommits.length === 0 ||\n\t\tcommits.length > MAX_HANDOFF_COMMITS ||\n\t\t!uniqueStrings(commits, isGitObjectId)\n\t) {\n\t\treturn { ok: false, reason: `commits must be 1-${MAX_HANDOFF_COMMITS} unique full commit ids` };\n\t}\n\tif (commits.includes(base) || commits.some((commit) => commit.length !== base.length)) {\n\t\treturn { ok: false, reason: \"commits must not contain the base and must use the same id length as it\" };\n\t}\n\tif (\n\t\t!Array.isArray(dependencies) ||\n\t\tdependencies.length > MAX_HANDOFF_DEPENDENCIES ||\n\t\t!uniqueStrings(dependencies, isHandoffId)\n\t) {\n\t\treturn { ok: false, reason: `dependencies must be at most ${MAX_HANDOFF_DEPENDENCIES} unique handoff ids` };\n\t}\n\tif (!Array.isArray(verification) || verification.length > MAX_HANDOFF_VERIFICATIONS) {\n\t\treturn { ok: false, reason: `verification must be an array of at most ${MAX_HANDOFF_VERIFICATIONS} entries` };\n\t}\n\tconst checks: HandoffVerification[] = [];\n\tfor (const entry of verification) {\n\t\tconst parsed = parseVerification(entry);\n\t\tif (typeof parsed === \"string\") return { ok: false, reason: parsed };\n\t\tchecks.push(parsed);\n\t}\n\tif (\n\t\t!Array.isArray(artifactRefs) ||\n\t\tartifactRefs.length > MAX_HANDOFF_ARTIFACT_REFS ||\n\t\t!uniqueStrings(artifactRefs, isSha256Hex)\n\t) {\n\t\treturn {\n\t\t\tok: false,\n\t\t\treason: `artifactRefs must be at most ${MAX_HANDOFF_ARTIFACT_REFS} unique SHA-256 hex strings`,\n\t\t};\n\t}\n\tif (\n\t\tnote !== undefined &&\n\t\t(typeof note !== \"string\" || note.length > MAX_HANDOFF_NOTE_CHARS || hasControlChars(note, true))\n\t) {\n\t\treturn {\n\t\t\tok: false,\n\t\t\treason: `note must be at most ${MAX_HANDOFF_NOTE_CHARS} characters without control characters`,\n\t\t};\n\t}\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tbranch,\n\t\t\tcommits: [...commits] as string[],\n\t\t\tbase,\n\t\t\ttarget,\n\t\t\tdependencies: [...dependencies] as string[],\n\t\t\tverification: checks,\n\t\t\tartifactRefs: [...artifactRefs] as string[],\n\t\t\t...(note !== undefined ? { note } : {}),\n\t\t},\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/coordination/transport/protocol.ts"],"names":[],"mappings":"AAAA,iHAAiH;AACjH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAiBzC;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAExC,mHAAmH;AACnH,MAAM,CAAC,MAAM,gBAAgB,GAAG,yDAAyD,CAAC;AAE1F,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC9C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,oBAAoB,CAAC;AAC9F,CAAC;AAED,sGAAsG;AACtG,MAAM,CAAC,MAAM,uBAAuB,GA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O;YACN,EAAE,EAAE,KAAK;YACT,MAAM,EAAE,gCAAgC,yBAAyB,6BAA6B;SAC9F,CAAC;IACH,CAAC;IACD,IACC,IAAI,KAAK,SAAS;QAClB,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,GAAG,sBAAsB,IAAI,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EAChG,CAAC;QACF,OAAO;YACN,EAAE,EAAE,KAAK;YACT,MAAM,EAAE,wBAAwB,sBAAsB,wCAAwC;SAC9F,CAAC;IACH,CAAC;IACD,OAAO;QACN,EAAE,EAAE,IAAI;QACR,KAAK,EAAE;YACN,MAAM;YACN,OAAO,EAAE,CAAC,GAAG,OAAO,CAAa;YACjC,IAAI;YACJ,MAAM;YACN,YAAY,EAAE,CAAC,GAAG,YAAY,CAAa;YAC3C,YAAY,EAAE,MAAM;YACpB,YAAY,EAAE,CAAC,GAAG,YAAY,CAAa;YAC3C,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACvC;KACD,CAAC;AACH,CAAC","sourcesContent":["// Derived from pi-intercom (MIT, Copyright (c) 2026 Nico Bailon), commit 14731a48; modified for HUMAIN Code CLI.\nimport { createHash } from \"node:crypto\";\nimport type {\n\tAttachment,\n\tHandoffInput,\n\tHandoffVerification,\n\tMessage,\n\tMessageControl,\n\tMessageProvenance,\n\tMessageReceipt,\n\tMessageReceiptStatus,\n\tOwnershipMode,\n\tRecordState,\n\tSessionInfo,\n\tSessionRegistration,\n\tTouchedPath,\n} from \"./types.ts\";\n\n/**\n * Longest message id, in UTF-16 code units. The broker rejects longer ids before persisting, so every\n * accepted message can be acknowledged and the worst-case mailbox snapshot stays bounded.\n */\nexport const MAX_MESSAGE_ID_CHARS = 128;\n\n/** Detail of a `deferred` receipt for a message whose id another sender's message still holds at the recipient. */\nexport const ID_IN_USE_DETAIL = \"message id is still held by another sender; retry later\";\n\nexport function isValidMessageId(value: unknown): value is string {\n\treturn typeof value === \"string\" && value.length > 0 && value.length <= MAX_MESSAGE_ID_CHARS;\n}\n\n/** Longest accepted value, in UTF-16 code units, for each client-supplied session metadata string. */\nexport const MAX_SESSION_FIELD_CHARS = {\n\tid: 256,\n\tname: 256,\n\tmodel: 256,\n\tstatus: 256,\n\tbranch: 256,\n\tcwd: 4096,\n\tworktreeRoot: 4096,\n\trepo: 256,\n\tfocus: 256,\n\tsubpath: 4096,\n} as const;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\n/** True for a string no longer than `maxChars`. */\nexport function isBoundedString(value: unknown, maxChars: number): value is string {\n\treturn typeof value === \"string\" && value.length <= maxChars;\n}\n\nfunction isOptionalBoundedString(value: unknown, maxChars: number): boolean {\n\treturn value === undefined || isBoundedString(value, maxChars);\n}\n\nfunction isMessageReceiptStatus(value: unknown): value is MessageReceiptStatus {\n\treturn (\n\t\tvalue === \"receiver_received\" ||\n\t\tvalue === \"queued\" ||\n\t\tvalue === \"injected\" ||\n\t\tvalue === \"not_injected\" ||\n\t\tvalue === \"deferred\" ||\n\t\tvalue === \"acknowledged\" ||\n\t\tvalue === \"expired\" ||\n\t\tvalue === \"cancelled\" ||\n\t\tvalue === \"superseded\" ||\n\t\tvalue === \"cancellation_requested\"\n\t);\n}\n\n/** Longest `detail` (UTF-16 code units) the broker relays in a message receipt; longer ones are truncated. */\nexport const MAX_RECEIPT_DETAIL_CHARS = 1024;\n\n/** Longest accepted `requestId` (UTF-16 code units) on a list request, so its reply always fits a frame. */\nexport const MAX_REQUEST_ID_CHARS = 256;\n/**\n * Largest requestId the protocol accepts, in serialized size: isRequestId allows any 1..MAX_REQUEST_ID_CHARS\n * UTF-16 units, and a control char JSON-escapes to 6 bytes (\\u0001), more than any other unit.\n */\nexport const WORST_CASE_REQUEST_ID = \"\\u0001\".repeat(MAX_REQUEST_ID_CHARS);\n\n/** Cap UTF-16 code units without splitting a surrogate pair. */\nexport function truncateChars(text: string, maxChars: number): string {\n\tif (text.length <= maxChars) return text;\n\tconst cut = text.slice(0, maxChars);\n\tconst last = cut.charCodeAt(cut.length - 1);\n\t// Do not leave the first half of a surrogate pair dangling at the end.\n\treturn last >= 0xd800 && last <= 0xdbff ? cut.slice(0, -1) : cut;\n}\n\n/**\n * The receipt the broker relays: a new object holding only the known fields, with `detail` bounded. Fields\n * a sender adds beyond the schema never reach the peer.\n */\nexport function canonicalMessageReceipt(receipt: MessageReceipt): MessageReceipt {\n\treturn {\n\t\tmessageId: receipt.messageId,\n\t\tstatus: receipt.status,\n\t\ttimestamp: receipt.timestamp,\n\t\t...(receipt.detail !== undefined ? { detail: truncateChars(receipt.detail, MAX_RECEIPT_DETAIL_CHARS) } : {}),\n\t};\n}\n\nexport function isMessageReceipt(value: unknown): value is MessageReceipt {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\tif (\n\t\ttypeof value.messageId !== \"string\" ||\n\t\t!isMessageReceiptStatus(value.status) ||\n\t\ttypeof value.timestamp !== \"number\"\n\t) {\n\t\treturn false;\n\t}\n\treturn value.detail === undefined || typeof value.detail === \"string\";\n}\n\nexport function isMessageControl(value: unknown): value is MessageControl {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\tif (typeof value.messageId !== \"string\" || typeof value.timestamp !== \"number\") {\n\t\treturn false;\n\t}\n\tif (value.action !== \"cancel\" && value.action !== \"supersede\") {\n\t\treturn false;\n\t}\n\tif (value.supersededBy !== undefined && typeof value.supersededBy !== \"string\") {\n\t\treturn false;\n\t}\n\treturn value.detail === undefined || typeof value.detail === \"string\";\n}\n\nfunction isAttachment(value: unknown): value is Attachment {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\tif (value.type !== \"file\" && value.type !== \"snippet\" && value.type !== \"context\") {\n\t\treturn false;\n\t}\n\n\tif (typeof value.name !== \"string\" || typeof value.content !== \"string\") {\n\t\treturn false;\n\t}\n\n\treturn value.language === undefined || typeof value.language === \"string\";\n}\n\nfunction isMessageProvenance(value: unknown): value is MessageProvenance {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\treturn (\n\t\tvalue.type === \"extension_outbox\" &&\n\t\ttypeof value.extensionId === \"string\" &&\n\t\ttypeof value.extensionName === \"string\" &&\n\t\ttypeof value.requestId === \"string\"\n\t);\n}\n\nexport function isMessage(value: unknown): value is Message {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\tif (typeof value.id !== \"string\" || typeof value.timestamp !== \"number\") {\n\t\treturn false;\n\t}\n\n\tfor (const key of [\n\t\t\"senderSequence\",\n\t\t\"brokerReceivedAt\",\n\t\t\"brokerDeliveredAt\",\n\t\t\"receiverReceivedAt\",\n\t\t\"injectedAt\",\n\t] as const) {\n\t\tif (value[key] !== undefined && typeof value[key] !== \"number\") {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (value.supersedes !== undefined && typeof value.supersedes !== \"string\") {\n\t\treturn false;\n\t}\n\n\tif (value.retryOf !== undefined && typeof value.retryOf !== \"string\") {\n\t\treturn false;\n\t}\n\n\tif (value.replyTo !== undefined && typeof value.replyTo !== \"string\") {\n\t\treturn false;\n\t}\n\n\tif (value.expectsReply !== undefined && typeof value.expectsReply !== \"boolean\") {\n\t\treturn false;\n\t}\n\n\tif (value.provenance !== undefined && !isMessageProvenance(value.provenance)) {\n\t\treturn false;\n\t}\n\n\tif (!isRecord(value.content) || typeof value.content.text !== \"string\") {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\tvalue.content.attachments === undefined ||\n\t\t(Array.isArray(value.content.attachments) && value.content.attachments.every(isAttachment))\n\t);\n}\n\n/**\n * Canonical authored-message identity used by the broker's replay guard: the SHA-256 hex digest of the\n * canonical serialization, so retained delivery records stay small whatever the message size.\n */\nexport function messageDeliveryFingerprint(message: Message, targetId: string): string {\n\tconst canonical = JSON.stringify({\n\t\ttargetId,\n\t\ttext: message.content.text,\n\t\tattachments: message.content.attachments,\n\t\treplyTo: message.replyTo,\n\t\texpectsReply: message.expectsReply,\n\t\tsupersedes: message.supersedes,\n\t\tretryOf: message.retryOf,\n\t\tprovenance: message.provenance,\n\t});\n\treturn createHash(\"sha256\").update(canonical).digest(\"hex\");\n}\n\nexport function isTouchedPaths(value: unknown): value is TouchedPath[] {\n\treturn (\n\t\tArray.isArray(value) &&\n\t\tvalue.length <= 20 &&\n\t\tvalue.every(\n\t\t\t(entry) =>\n\t\t\t\tisRecord(entry) &&\n\t\t\t\tisBoundedString(entry.path, 4096) &&\n\t\t\t\tentry.path.length > 0 &&\n\t\t\t\t!entry.path.startsWith(\"/\") &&\n\t\t\t\t!entry.path.split(\"/\").includes(\"..\") &&\n\t\t\t\ttypeof entry.timestamp === \"number\" &&\n\t\t\t\tNumber.isFinite(entry.timestamp) &&\n\t\t\t\tentry.timestamp >= 0,\n\t\t) &&\n\t\tnew Set(value.map((entry) => entry.path)).size === value.length\n\t);\n}\n\nfunction isDiscoveryPresence(value: Record<string, unknown>): boolean {\n\treturn (\n\t\tisOptionalBoundedString(value.repo, 256) &&\n\t\tisOptionalBoundedString(value.focus, 256) &&\n\t\t(value.focus === undefined || !/[\\r\\n\\u2028\\u2029]/.test(String(value.focus))) &&\n\t\tisOptionalBoundedString(value.subpath, 4096) &&\n\t\t(value.touchedPaths === undefined || isTouchedPaths(value.touchedPaths))\n\t);\n}\n\nexport function isSessionInfo(value: unknown): value is SessionInfo {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\tif (\n\t\t!isBoundedString(value.id, MAX_SESSION_FIELD_CHARS.id) ||\n\t\t!isBoundedString(value.cwd, MAX_SESSION_FIELD_CHARS.cwd) ||\n\t\t!isBoundedString(value.model, MAX_SESSION_FIELD_CHARS.model) ||\n\t\ttypeof value.pid !== \"number\" ||\n\t\ttypeof value.startedAt !== \"number\" ||\n\t\ttypeof value.lastActivity !== \"number\"\n\t) {\n\t\treturn false;\n\t}\n\n\tif (value.endpointEpoch !== undefined && typeof value.endpointEpoch !== \"string\") {\n\t\treturn false;\n\t}\n\n\tif (!isOptionalBoundedString(value.name, MAX_SESSION_FIELD_CHARS.name)) {\n\t\treturn false;\n\t}\n\n\tif (value.runtimeFallbackAlias !== undefined && typeof value.runtimeFallbackAlias !== \"boolean\") {\n\t\treturn false;\n\t}\n\n\tif (!isOptionalBoundedString(value.status, MAX_SESSION_FIELD_CHARS.status)) {\n\t\treturn false;\n\t}\n\n\tif (value.peerUid !== undefined && typeof value.peerUid !== \"number\") {\n\t\treturn false;\n\t}\n\n\tfor (const key of [\"contextPct\", \"contextTokens\", \"contextWindow\"] as const) {\n\t\tif (value[key] !== undefined && typeof value[key] !== \"number\") {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tif (!isOptionalBoundedString(value.worktreeRoot, MAX_SESSION_FIELD_CHARS.worktreeRoot)) {\n\t\treturn false;\n\t}\n\tif (!isOptionalBoundedString(value.branch, MAX_SESSION_FIELD_CHARS.branch)) {\n\t\treturn false;\n\t}\n\n\treturn isDiscoveryPresence(value) && (value.trustedLocal === undefined || typeof value.trustedLocal === \"boolean\");\n}\n\nexport function isSessionId(value: unknown): value is string {\n\treturn isBoundedString(value, MAX_SESSION_FIELD_CHARS.id) && value.trim().length > 0;\n}\n\nexport function isSessionRegistration(value: unknown): value is SessionRegistration {\n\tif (!isRecord(value)) {\n\t\treturn false;\n\t}\n\n\tif (\n\t\t!isBoundedString(value.cwd, MAX_SESSION_FIELD_CHARS.cwd) ||\n\t\t!isBoundedString(value.model, MAX_SESSION_FIELD_CHARS.model) ||\n\t\ttypeof value.pid !== \"number\" ||\n\t\ttypeof value.startedAt !== \"number\" ||\n\t\ttypeof value.lastActivity !== \"number\"\n\t) {\n\t\treturn false;\n\t}\n\n\tif (!isOptionalBoundedString(value.name, MAX_SESSION_FIELD_CHARS.name)) {\n\t\treturn false;\n\t}\n\tif (value.runtimeFallbackAlias !== undefined && typeof value.runtimeFallbackAlias !== \"boolean\") {\n\t\treturn false;\n\t}\n\tif (value.extensions !== undefined && !Array.isArray(value.extensions)) {\n\t\treturn false;\n\t}\n\tif (!isOptionalBoundedString(value.worktreeRoot, MAX_SESSION_FIELD_CHARS.worktreeRoot)) {\n\t\treturn false;\n\t}\n\tif (!isOptionalBoundedString(value.branch, MAX_SESSION_FIELD_CHARS.branch)) {\n\t\treturn false;\n\t}\n\tif (value.ownership !== undefined && !isOwnershipMode(value.ownership)) {\n\t\treturn false;\n\t}\n\tif (value.acknowledgesReceipts !== undefined && typeof value.acknowledgesReceipts !== \"boolean\") return false;\n\tif (\n\t\tvalue.livenessIntervalMs !== undefined &&\n\t\t(typeof value.livenessIntervalMs !== \"number\" ||\n\t\t\t!Number.isSafeInteger(value.livenessIntervalMs) ||\n\t\t\tvalue.livenessIntervalMs <= 0)\n\t)\n\t\treturn false;\n\n\treturn isDiscoveryPresence(value) && isOptionalBoundedString(value.status, MAX_SESSION_FIELD_CHARS.status);\n}\n\nexport const MAX_RECORD_VALUE_BYTES = 65536;\nexport const MAX_RECORD_VALUE_DEPTH = 16;\nexport const MAX_RECORD_ARTIFACT_REFS = 64;\nexport const MAX_RECORDS = 1024;\nexport const RECORD_KEY_PATTERN = /^[a-z0-9][a-z0-9._-]{0,127}$/;\nexport const RESERVED_RECORD_KEYS: readonly string[] = [\"presence\", \"policy\", \"integration\"];\nexport const RESERVED_NAMESPACE_PREFIX = \"humain.coord.\";\nexport const RECORD_NAMESPACE_PREFIX = \"humain.coord.record:\";\nexport const POLICY_NAMESPACE = \"humain.coord.policy\";\nexport const ARTIFACT_NAMESPACE_PREFIX = \"humain.coord.artifact:\";\n\nexport const MAX_ARTIFACT_BYTES = 16 * 1024 * 1024;\nexport const ARTIFACT_QUOTA_BYTES = 256 * 1024 * 1024;\nexport const MAX_ARTIFACTS = 1024;\nexport const MAX_ARTIFACT_NAME_CHARS = 256;\nexport const MAX_ARTIFACT_NAME_SEGMENTS = 8;\nexport const ARTIFACT_SEGMENT_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;\nexport const STAGED_FILE_PATTERN = /^[a-f0-9]{32}\\.part$/;\nexport const ARTIFACT_RETENTION_MS = 7 * 24 * 60 * 60 * 1000;\nexport const RECORD_TOMBSTONE_RETENTION_MS = ARTIFACT_RETENTION_MS;\nexport const STALE_STAGED_FILE_MS = 60 * 60 * 1000;\n\nconst FORBIDDEN_JSON_KEYS: ReadonlySet<string> = new Set([\"__proto__\", \"constructor\", \"prototype\"]);\n\nexport interface JsonSafeLimits {\n\tmaxBytes: number;\n\tmaxDepth: number;\n}\nexport type JsonSafeResult = { ok: true; bytes: number } | { ok: false; reason: string };\n\n/** The first reason `value` is not JSON-safe, or undefined. `depth` is the nesting level of `value`'s container. */\nfunction findJsonUnsafe(\n\tvalue: unknown,\n\tdepth: number,\n\tmaxDepth: number,\n\tancestors: Set<object>,\n\tbudget: { remaining: number; limit: number },\n): string | undefined {\n\t// Running strict lower bound of serialized bytes: each value and each piece of punctuation is charged once,\n\t// at its minimum size, so total work is O(limit) and nothing that fits in the limit is rejected here.\n\tconst overBudget = `value is larger than the limit of ${budget.limit} bytes`;\n\tif (value === null) {\n\t\tbudget.remaining -= 4;\n\t\treturn budget.remaining < 0 ? overBudget : undefined;\n\t}\n\tswitch (typeof value) {\n\t\tcase \"boolean\":\n\t\t\tbudget.remaining -= 4;\n\t\t\treturn budget.remaining < 0 ? overBudget : undefined;\n\t\tcase \"string\":\n\t\t\tbudget.remaining -= 2;\n\t\t\treturn budget.remaining < 0 ? overBudget : undefined;\n\t\tcase \"number\":\n\t\t\tif (!Number.isFinite(value)) return \"numbers must be finite\";\n\t\t\tbudget.remaining -= 1;\n\t\t\treturn budget.remaining < 0 ? overBudget : undefined;\n\t\tcase \"object\":\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn `${typeof value} values are not JSON`;\n\t}\n\tif (ancestors.has(value)) return \"value contains a cycle\";\n\tif (depth > maxDepth) return `value is nested deeper than ${maxDepth} levels`;\n\tancestors.add(value);\n\ttry {\n\t\tif (Array.isArray(value)) {\n\t\t\tif (Object.getPrototypeOf(value) !== Array.prototype) return \"only plain arrays are allowed\";\n\t\t\t// Brackets plus separators; elements charge themselves. Checked before enumerating.\n\t\t\tbudget.remaining -= 2 + Math.max(0, value.length - 1);\n\t\t\tif (budget.remaining < 0) return overBudget;\n\t\t\tfor (const key of Reflect.ownKeys(value)) {\n\t\t\t\tif (typeof key === \"symbol\") return \"symbol keys are not JSON\";\n\t\t\t\tif (key === \"length\") continue;\n\t\t\t\tconst index = Number(key);\n\t\t\t\tif (!Number.isInteger(index) || index < 0 || index >= value.length || String(index) !== key)\n\t\t\t\t\treturn `arrays must not have non-index key \"${key}\"`;\n\t\t\t\tif (!Object.getOwnPropertyDescriptor(value, key)?.enumerable)\n\t\t\t\t\treturn `non-enumerable key \"${key}\" is not JSON`;\n\t\t\t}\n\t\t\tfor (let index = 0; index < value.length; index += 1) {\n\t\t\t\tif (!Object.hasOwn(value, index)) return \"arrays must not have holes\";\n\t\t\t\tconst reason = findJsonUnsafe(value[index], depth + 1, maxDepth, ancestors, budget);\n\t\t\t\tif (reason) return reason;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\tconst prototype = Object.getPrototypeOf(value);\n\t\tif (prototype !== Object.prototype && prototype !== null) return \"only plain objects are allowed\";\n\t\tbudget.remaining -= 2; // braces\n\t\tif (budget.remaining < 0) return overBudget;\n\t\tlet first = true;\n\t\tfor (const key of Reflect.ownKeys(value)) {\n\t\t\tif (typeof key === \"symbol\") return \"symbol keys are not JSON\";\n\t\t\tif (!Object.getOwnPropertyDescriptor(value, key)?.enumerable) return `non-enumerable key \"${key}\" is not JSON`;\n\t\t\t// `\"\":` is 3 bytes, plus a separator after the first entry; the value charges itself.\n\t\t\tbudget.remaining -= first ? 3 : 4;\n\t\t\tif (budget.remaining < 0) return overBudget;\n\t\t\tfirst = false;\n\t\t\tif (FORBIDDEN_JSON_KEYS.has(key)) return `key \"${key}\" is not allowed`;\n\t\t\tconst reason = findJsonUnsafe((value as Record<string, unknown>)[key], depth + 1, maxDepth, ancestors, budget);\n\t\t\tif (reason) return reason;\n\t\t}\n\t\treturn undefined;\n\t} finally {\n\t\tancestors.delete(value);\n\t}\n}\n\n/**\n * Accepts null, boolean, finite number, string, arrays and plain objects (prototype Object.prototype or null)\n * of those. Rejects: the own keys \"__proto__\", \"constructor\", \"prototype\" at any depth; undefined, function,\n * symbol, bigint; NaN and +-Infinity; non-plain objects (Map, Date, class instances); sparse array holes;\n * cycles; nesting deeper than maxDepth (root container = depth 1); and a JSON.stringify size above maxBytes,\n * measured as UTF-8 bytes. A running byte lower bound aborts oversized\n * containers early; exact size is checked last.\n */\nexport function validateJsonSafe(value: unknown, limits: JsonSafeLimits): JsonSafeResult {\n\tconst reason = findJsonUnsafe(value, 1, limits.maxDepth, new Set(), {\n\t\tremaining: limits.maxBytes,\n\t\tlimit: limits.maxBytes,\n\t});\n\tif (reason) return { ok: false, reason };\n\tconst bytes = Buffer.byteLength(JSON.stringify(value), \"utf8\");\n\tif (bytes > limits.maxBytes)\n\t\treturn { ok: false, reason: `value is ${bytes} bytes; the limit is ${limits.maxBytes}` };\n\treturn { ok: true, bytes };\n}\n\nexport function isRequestId(value: unknown): value is string {\n\treturn isBoundedString(value, MAX_REQUEST_ID_CHARS) && value.length > 0;\n}\n\nexport function isOwnershipMode(value: unknown): value is OwnershipMode {\n\treturn value === \"on\" || value === \"off\";\n}\n\nexport function isRecordKey(value: unknown): value is string {\n\treturn typeof value === \"string\" && RECORD_KEY_PATTERN.test(value);\n}\n\nexport function isReservedRecordKey(key: string): boolean {\n\treturn RESERVED_RECORD_KEYS.some((reserved) => key === reserved || key.startsWith(`${reserved}.`));\n}\n\nexport function isReservedNamespace(namespace: string): boolean {\n\treturn namespace.startsWith(RESERVED_NAMESPACE_PREFIX);\n}\n\nexport function isSha256Hex(value: unknown): value is string {\n\treturn typeof value === \"string\" && /^[a-f0-9]{64}$/.test(value);\n}\n\nexport function isArtifactName(value: unknown): value is string {\n\tif (typeof value !== \"string\" || value.length === 0 || value.length > MAX_ARTIFACT_NAME_CHARS) return false;\n\tconst segments = value.split(\"/\");\n\treturn (\n\t\tsegments.length <= MAX_ARTIFACT_NAME_SEGMENTS &&\n\t\tsegments.every((segment) => ARTIFACT_SEGMENT_PATTERN.test(segment))\n\t);\n}\n\nexport function isRecordState(value: unknown): value is RecordState {\n\treturn value === \"open\" || value === \"done\";\n}\nexport const INTEGRATION_NAMESPACE = \"humain.coord.integration\";\nexport const HANDOFF_KEY_PREFIX = \"integration.handoff.\";\nexport const RESOLUTION_KEY_PREFIX = \"integration.resolution.\";\nexport const MAX_HANDOFFS = 48;\nexport const MAX_HANDOFF_COMMITS = 32;\nexport const MAX_HANDOFF_DEPENDENCIES = 16;\nexport const MAX_HANDOFF_VERIFICATIONS = 16;\nexport const MAX_HANDOFF_ARTIFACT_REFS = 16;\nexport const MAX_BRANCH_NAME_CHARS = 200;\nexport const MAX_VERIFICATION_COMMAND_CHARS = 256;\nexport const MAX_VERIFICATION_SUMMARY_CHARS = 512;\nexport const MAX_HANDOFF_NOTE_CHARS = 1024;\nexport const MAX_ATTEMPTS = 6;\nexport const MAX_WRITERS = 6;\nexport const MAX_CHECKOUT_ROOT_CHARS = 512;\nexport const MAX_CONFLICT_FILES = 10;\nexport const MAX_CONFLICT_FILE_CHARS = 80;\nexport const MAX_EVIDENCE_CHARS = 256;\n\n/** Actions only a human may cause: they exist as client methods for the /coordinate command, never in the tool. */\nexport const INTEGRATION_AUTHORITY_ACTIONS = [\n\t\"owner_assign\",\n\t\"owner_transfer\",\n\t\"owner_release\",\n\t\"owner_reconcile\",\n\t\"writer_assign\",\n\t\"writer_release\",\n] as const;\n/** Actions agents may request; the broker still enforces the lease, generation and writer rules. */\nexport const INTEGRATION_AGENT_ACTIONS = [\n\t\"status\",\n\t\"handoff_publish\",\n\t\"handoff_list\",\n\t\"handoff_get\",\n\t\"handoff_reclaim\",\n\t\"integrate_begin\",\n\t\"integrate_report\",\n] as const;\n\nfunction hasControlChars(value: string, allowNewline = false): boolean {\n\tfor (let index = 0; index < value.length; index += 1) {\n\t\tconst code = value.charCodeAt(index);\n\t\tif (code === 0x0a && allowNewline) continue;\n\t\tif (code < 0x20 || code === 0x7f) return true;\n\t}\n\treturn false;\n}\n\n/** A full Git object id: 40 (SHA-1) or 64 (SHA-256) lowercase hex digits. Never starts with \"-\". */\nexport function isGitObjectId(value: unknown): value is string {\n\treturn typeof value === \"string\" && /^(?:[a-f0-9]{40}|[a-f0-9]{64})$/.test(value);\n}\n\nexport function isHandoffId(value: unknown): value is string {\n\treturn typeof value === \"string\" && /^[a-f0-9]{16}$/.test(value);\n}\n\n/**\n * Branch short names under refs/heads/, following the `git check-ref-format` rules without running Git, and\n * stricter: printable ASCII only, at most MAX_BRANCH_NAME_CHARS, never \"HEAD\" or \"@\", never a leading \"-\" (it\n * would be read as an option). Implemented here so the broker never shells out.\n */\nexport function isValidBranchName(value: unknown): value is string {\n\tif (typeof value !== \"string\" || value.length === 0 || value.length > MAX_BRANCH_NAME_CHARS) return false;\n\tif (!/^[\\x21-\\x7e]+$/.test(value)) return false;\n\tif (value === \"@\" || value === \"HEAD\") return false;\n\tif (value.startsWith(\"-\") || value.startsWith(\"/\") || value.endsWith(\"/\") || value.endsWith(\".\")) return false;\n\tif (value.includes(\"..\") || value.includes(\"//\") || value.includes(\"@{\")) return false;\n\tif (/[~^:?*[\\\\]/.test(value)) return false;\n\treturn value.split(\"/\").every((part) => !part.startsWith(\".\") && !part.endsWith(\".lock\"));\n}\n\nexport type HandoffInputResult = { ok: true; value: HandoffInput } | { ok: false; reason: string };\n\nfunction uniqueStrings(values: unknown[], isValid: (value: unknown) => boolean): boolean {\n\tfor (let index = 0; index < values.length; index += 1) {\n\t\tif (!Object.hasOwn(values, index) || !isValid(values[index])) return false;\n\t}\n\treturn new Set(values).size === values.length;\n}\n\nfunction parseVerification(value: unknown): HandoffVerification | string {\n\tif (!isRecord(value)) return \"each verification must be an object\";\n\tconst { command, result, summary } = value;\n\tif (\n\t\ttypeof command !== \"string\" ||\n\t\tcommand.length === 0 ||\n\t\tcommand.length > MAX_VERIFICATION_COMMAND_CHARS ||\n\t\thasControlChars(command)\n\t) {\n\t\treturn `verification command must be 1-${MAX_VERIFICATION_COMMAND_CHARS} characters without control characters`;\n\t}\n\tif (result !== \"passed\" && result !== \"failed\" && result !== \"not_run\") {\n\t\treturn 'verification result must be \"passed\", \"failed\" or \"not_run\"';\n\t}\n\tif (\n\t\tsummary !== undefined &&\n\t\t(typeof summary !== \"string\" || summary.length > MAX_VERIFICATION_SUMMARY_CHARS || hasControlChars(summary))\n\t) {\n\t\treturn `verification summary must be at most ${MAX_VERIFICATION_SUMMARY_CHARS} characters without control characters`;\n\t}\n\treturn { command, result, ...(summary !== undefined ? { summary } : {}) };\n}\n\n/**\n * Validates a handoff published by a worker and returns a canonical copy (unknown fields dropped). Commits are\n * listed oldest first, the last one is the tip, all ids have the same length as the base and none equals it.\n */\nexport function validateHandoffInput(value: unknown): HandoffInputResult {\n\tif (!isRecord(value)) return { ok: false, reason: \"handoff must be an object\" };\n\tconst { branch, commits, base, target, dependencies = [], verification = [], artifactRefs = [], note } = value;\n\tif (!isValidBranchName(branch)) return { ok: false, reason: \"branch is not a valid branch name\" };\n\tif (!isValidBranchName(target)) return { ok: false, reason: \"target is not a valid branch name\" };\n\tif (!isGitObjectId(base)) return { ok: false, reason: \"base must be a full commit id\" };\n\tif (\n\t\t!Array.isArray(commits) ||\n\t\tcommits.length === 0 ||\n\t\tcommits.length > MAX_HANDOFF_COMMITS ||\n\t\t!uniqueStrings(commits, isGitObjectId)\n\t) {\n\t\treturn { ok: false, reason: `commits must be 1-${MAX_HANDOFF_COMMITS} unique full commit ids` };\n\t}\n\tif (commits.includes(base) || commits.some((commit) => commit.length !== base.length)) {\n\t\treturn { ok: false, reason: \"commits must not contain the base and must use the same id length as it\" };\n\t}\n\tif (\n\t\t!Array.isArray(dependencies) ||\n\t\tdependencies.length > MAX_HANDOFF_DEPENDENCIES ||\n\t\t!uniqueStrings(dependencies, isHandoffId)\n\t) {\n\t\treturn { ok: false, reason: `dependencies must be at most ${MAX_HANDOFF_DEPENDENCIES} unique handoff ids` };\n\t}\n\tif (!Array.isArray(verification) || verification.length > MAX_HANDOFF_VERIFICATIONS) {\n\t\treturn { ok: false, reason: `verification must be an array of at most ${MAX_HANDOFF_VERIFICATIONS} entries` };\n\t}\n\tconst checks: HandoffVerification[] = [];\n\tfor (const entry of verification) {\n\t\tconst parsed = parseVerification(entry);\n\t\tif (typeof parsed === \"string\") return { ok: false, reason: parsed };\n\t\tchecks.push(parsed);\n\t}\n\tif (\n\t\t!Array.isArray(artifactRefs) ||\n\t\tartifactRefs.length > MAX_HANDOFF_ARTIFACT_REFS ||\n\t\t!uniqueStrings(artifactRefs, isSha256Hex)\n\t) {\n\t\treturn {\n\t\t\tok: false,\n\t\t\treason: `artifactRefs must be at most ${MAX_HANDOFF_ARTIFACT_REFS} unique SHA-256 hex strings`,\n\t\t};\n\t}\n\tif (\n\t\tnote !== undefined &&\n\t\t(typeof note !== \"string\" || note.length > MAX_HANDOFF_NOTE_CHARS || hasControlChars(note, true))\n\t) {\n\t\treturn {\n\t\t\tok: false,\n\t\t\treason: `note must be at most ${MAX_HANDOFF_NOTE_CHARS} characters without control characters`,\n\t\t};\n\t}\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tbranch,\n\t\t\tcommits: [...commits] as string[],\n\t\t\tbase,\n\t\t\ttarget,\n\t\t\tdependencies: [...dependencies] as string[],\n\t\t\tverification: checks,\n\t\t\tartifactRefs: [...artifactRefs] as string[],\n\t\t\t...(note !== undefined ? { note } : {}),\n\t\t},\n\t};\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const EXTENSION_BUS_FEATURE = "extension-bus-v1";
|
|
2
2
|
export declare const EXACT_SEND_FEATURE = "exact-send-v1";
|
|
3
|
+
export declare const SESSION_HELD_ERROR_CODE = "E_SESSION_HELD";
|
|
3
4
|
export declare const COORD_RECORDS_FEATURE = "coord-records-v1";
|
|
4
5
|
export declare const COORD_INTEGRATION_FEATURE = "coord-integration-v1";
|
|
5
6
|
export type DeliveryState = "socket_delivered" | "queued" | "failed" | "unknown";
|
|
@@ -367,6 +368,10 @@ export type SessionRegistration = Omit<SessionInfo, "id" | "endpointEpoch" | "pe
|
|
|
367
368
|
extensions?: ExtensionCapability[];
|
|
368
369
|
/** Requested repository ownership policy. Not copied into SessionInfo. */
|
|
369
370
|
ownership?: OwnershipMode;
|
|
371
|
+
/** Promises receiver receipts before the broker may report socket delivery. */
|
|
372
|
+
acknowledgesReceipts?: boolean;
|
|
373
|
+
/** Promises a heartbeat at least this often; absent for plain clients. */
|
|
374
|
+
livenessIntervalMs?: number;
|
|
370
375
|
};
|
|
371
376
|
/** Every request has a requestId (1..MAX_REQUEST_ID_CHARS). */
|
|
372
377
|
export type RecordRequest = {
|
|
@@ -572,6 +577,7 @@ export type BrokerMessage = {
|
|
|
572
577
|
} | {
|
|
573
578
|
type: "error";
|
|
574
579
|
error: string;
|
|
580
|
+
code?: string;
|
|
575
581
|
} | ({
|
|
576
582
|
type: "delivered";
|
|
577
583
|
messageId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/coordination/transport/types.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AACxD,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAClD,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AACxD,eAAO,MAAM,yBAAyB,yBAAyB,CAAC;AAEhE,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEjF,MAAM,WAAW,eAAe;IAC/B,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,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E,GACvE;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GACrF;IACA,IAAI,EAAE,mBAAmB,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAChB,GACD;IACA,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAChB,GACD;IACA,IAAI,EAAE,wBAAwB,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,sBAAsB,CAAC;CAC7B,GACD,iBAAiB,GACjB,gBAAgB,GAChB;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,GAC/C;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,MAAM,EAAE,iBAAiB,CAAA;CAAE,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
// Derived from pi-intercom (MIT, Copyright (c) 2026 Nico Bailon), commit
|
|
1
|
+
// Derived from pi-intercom (MIT, Copyright (c) 2026 Nico Bailon), commit 14731a48; modified for HUMAIN Code CLI.
|
|
2
2
|
export const EXTENSION_BUS_FEATURE = "extension-bus-v1";
|
|
3
3
|
export const EXACT_SEND_FEATURE = "exact-send-v1";
|
|
4
|
+
export const SESSION_HELD_ERROR_CODE = "E_SESSION_HELD";
|
|
4
5
|
export const COORD_RECORDS_FEATURE = "coord-records-v1";
|
|
5
6
|
export const COORD_INTEGRATION_FEATURE = "coord-integration-v1";
|
|
6
7
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/coordination/transport/types.ts"],"names":[],"mappings":"AAAA,iHAAiH;AACjH,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AACxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAClD,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AACxD,MAAM,CAAC,MAAM,yBAAyB,GAAG,sBAAsB,CAAC","sourcesContent":["// Derived from pi-intercom (MIT, Copyright (c) 2026 Nico Bailon), commit a5fad4df; modified for HUMAIN Code CLI.\nexport const EXTENSION_BUS_FEATURE = \"extension-bus-v1\";\nexport const EXACT_SEND_FEATURE = \"exact-send-v1\";\nexport const COORD_RECORDS_FEATURE = \"coord-records-v1\";\nexport const COORD_INTEGRATION_FEATURE = \"coord-integration-v1\";\n\nexport type DeliveryState = \"socket_delivered\" | \"queued\" | \"failed\" | \"unknown\";\n\nexport interface DeliveryDetails {\n\tdelivery: DeliveryState;\n\tcode?: string;\n\tretryable: boolean;\n\toutcomeKnown: boolean;\n}\n\nexport interface PeerFilters {\n\trepo?: string;\n\tquery?: string;\n\tpath?: string;\n\t/** Used by repository-default broadcast and repository authority callers. */\n\tscope?: \"repo\" | \"device\";\n}\n\nexport interface TouchedPath {\n\tpath: string;\n\ttimestamp: number;\n}\n\nexport interface SessionInfo {\n\tid: string;\n\t/** Broker-owned lifetime of this live endpoint. */\n\tendpointEpoch?: string;\n\tname?: string;\n\t/** True only when the extension synthesized name for an unnamed runtime. */\n\truntimeFallbackAlias?: boolean;\n\tcwd: string;\n\tmodel: string;\n\tpid: number;\n\tstartedAt: number;\n\tlastActivity: number;\n\tstatus?: string;\n\tpeerUid?: number;\n\ttrustedLocal?: boolean;\n\t/** Live context-window usage, pushed via presence from the source session's\n\t * getContextUsage(). contextPct is 0..100 (rounded); contextTokens /\n\t * contextWindow are raw token counts. All optional: unknown right after a\n\t * compaction (before the next assistant response), when no model is selected,\n\t * or on older clients that never report it. */\n\tcontextPct?: number;\n\tcontextTokens?: number;\n\tcontextWindow?: number;\n\t/** Canonical worktree root of the session. */\n\tworktreeRoot?: string;\n\t/** Current branch, or \"HEAD\" when detached. */\n\tbranch?: string;\n\trepo?: string;\n\tfocus?: string;\n\tsubpath?: string;\n\ttouchedPaths?: TouchedPath[];\n}\n\nexport interface Message {\n\tid: string;\n\ttimestamp: number;\n\tsenderSequence?: number;\n\tbrokerReceivedAt?: number;\n\tbrokerDeliveredAt?: number;\n\treceiverReceivedAt?: number;\n\tinjectedAt?: number;\n\tsupersedes?: string;\n\tretryOf?: string;\n\treplyTo?: string;\n\texpectsReply?: boolean;\n\tprovenance?: MessageProvenance;\n\tcontent: {\n\t\ttext: string;\n\t\tattachments?: Attachment[];\n\t};\n}\n\nexport interface MessageProvenance {\n\ttype: \"extension_outbox\";\n\textensionId: string;\n\textensionName: string;\n\trequestId: string;\n}\n\nexport interface Attachment {\n\ttype: \"file\" | \"snippet\" | \"context\";\n\tname: string;\n\tcontent: string;\n\tlanguage?: string;\n}\n\nexport type MessageReceiptStatus =\n\t| \"receiver_received\"\n\t| \"queued\"\n\t| \"injected\"\n\t| \"not_injected\"\n\t| \"deferred\"\n\t| \"acknowledged\"\n\t| \"expired\"\n\t| \"cancelled\"\n\t| \"superseded\"\n\t| \"cancellation_requested\";\n\nexport interface MessageReceipt {\n\tmessageId: string;\n\tstatus: MessageReceiptStatus;\n\ttimestamp: number;\n\tdetail?: string;\n}\n\nexport type MessageControlAction = \"cancel\" | \"supersede\";\n\nexport interface MessageControl {\n\tmessageId: string;\n\taction: MessageControlAction;\n\ttimestamp: number;\n\tsupersededBy?: string;\n\tdetail?: string;\n}\n\nexport interface ExtensionCapability {\n\tnamespace: string;\n\townerEligible: boolean;\n}\n\nexport type OwnershipMode = \"on\" | \"off\";\nexport type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue };\nexport type RecordState = \"open\" | \"done\";\n\nexport interface RecordEnvelope {\n\tkey: string;\n\tschemaVersion: number;\n\tcreator: string;\n\towner: string;\n\t/** Broker assigned. Equals the ExtensionStateManager revision of the record namespace. Starts at 1. */\n\trevision: number;\n\tstate: RecordState;\n\t/** SHA-256 hex digests of artifacts this record keeps alive. At most 64. */\n\tartifactRefs: string[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n\tvalue: JsonValue;\n}\n\n/** Stored in place of an envelope after delete; keeps the revision sequence. Never sent to clients. */\nexport interface RecordTombstone {\n\tkey: string;\n\ttombstone: true;\n\trevision: number;\n\tdeletedAt: number;\n}\n\nexport type RecordSummary = Omit<RecordEnvelope, \"value\"> & { valueBytes: number };\n\nexport type PolicyChangeVia = \"first-participant\" | \"agreement\" | \"human-reset\";\n\nexport interface PolicyRecord {\n\tmode: OwnershipMode;\n\tsetBy: string;\n\tsetAt: number;\n\tvia: PolicyChangeVia;\n}\n\nexport interface PolicyProposal {\n\tmode: OwnershipMode;\n\tproposedBy: string;\n\tproposedAt: number;\n\t/** Session ids that agreed, proposer included. */\n\tagreedBy: string[];\n}\n\nexport interface PolicyNotice {\n\tkind: \"policy_conflict\";\n\trequested: OwnershipMode;\n\tcurrent: OwnershipMode;\n\t/** Set when a proposal for the requested mode is pending. */\n\tproposalPending: boolean;\n}\n\n/** The policy as seen by one session; the broker sends each session its own copy. */\nexport interface PolicyStatus {\n\t/** null until a first participant could persist one. */\n\tpolicy: PolicyRecord | null;\n\tpolicyAccepted: boolean;\n\trequestedOwnership?: OwnershipMode;\n\tproposal: PolicyProposal | null;\n\t/** Live session ids that have not agreed to the pending proposal. Empty without a proposal. */\n\tawaiting: string[];\n\tliveParticipantCount: number;\n\tnotice?: PolicyNotice;\n}\n\nexport interface ArtifactEntry {\n\tname: string;\n\tsha256: string;\n\tsize: number;\n\tpublisher: string;\n\tpublishedAt: number;\n\trecordKey?: string;\n}\n\nexport type CoordinationErrorCode =\n\t| \"E_INVALID_REQUEST\"\n\t| \"E_PERSIST_FAILED\"\n\t| \"E_POLICY_NOT_ACCEPTED\"\n\t| \"E_RESERVED_NAMESPACE\"\n\t| \"E_RESERVED_KEY\"\n\t| \"E_INVALID_RECORD\"\n\t| \"E_RECORD_EXISTS\"\n\t| \"E_RECORD_NOT_FOUND\"\n\t| \"E_REVISION_CONFLICT\"\n\t| \"E_RECORD_LIMIT\"\n\t| \"E_NOT_OWNER\"\n\t| \"E_OWNER_STALE\"\n\t| \"E_OWNER_LIVE\"\n\t| \"E_NO_TRANSFER_REQUEST\"\n\t| \"E_NO_PROPOSAL\"\n\t| \"E_PROPOSAL_PENDING\"\n\t| \"E_POLICY_UNCHANGED\"\n\t| \"E_ARTIFACT_INVALID\"\n\t| \"E_ARTIFACT_NOT_FOUND\"\n\t| \"E_ARTIFACT_EXISTS\"\n\t| \"E_ARTIFACT_TOO_LARGE\"\n\t| \"E_ARTIFACT_QUOTA\"\n\t| \"E_NO_INTEGRATION_OWNER\"\n\t| \"E_NOT_INTEGRATION_OWNER\"\n\t| \"E_LEASE_LOST\"\n\t| \"E_GENERATION_MISMATCH\"\n\t| \"E_OWNER_STATE\"\n\t| \"E_OPEN_ATTEMPT\"\n\t| \"E_ATTEMPT_NOT_FOUND\"\n\t| \"E_SESSION_NOT_LIVE\"\n\t| \"E_WRITER_REQUIRED\"\n\t| \"E_NO_WRITER\"\n\t| \"E_HANDOFF_INVALID\"\n\t| \"E_HANDOFF_NOT_FOUND\"\n\t| \"E_HANDOFF_STATE\"\n\t| \"E_INTEGRATION_LIMIT\"\n\t| \"E_DEPENDENCY_PENDING\"\n\t| \"E_PUBLISHER_LIVE\"\n\t| \"E_PUBLISHER_STALE\"\n\t| \"E_INTEGRATION_STATE_INVALID\";\n\nexport type HandoffStatus = \"queued\" | \"attempting\" | \"conflict\" | \"integrated\" | \"rejected\";\nexport type VerificationResult = \"passed\" | \"failed\" | \"not_run\";\n\n/** A check the publisher says it ran. Peer-reported: nothing verifies it. */\nexport interface HandoffVerification {\n\tcommand: string;\n\tresult: VerificationResult;\n\tsummary?: string;\n}\n\n/** What a worker publishes. Oldest commit first; the last commit is the tip. */\nexport interface HandoffInput {\n\tbranch: string;\n\tcommits: string[];\n\tbase: string;\n\ttarget: string;\n\tdependencies: string[];\n\tverification: HandoffVerification[];\n\tartifactRefs: string[];\n\tnote?: string;\n}\n\nexport interface HandoffSummary {\n\tid: string;\n\t/** Record key of the broker-written handoff record. */\n\tkey: string;\n\tpublisher: string;\n\t/** The publisher, or the integration owner after handoff_reclaim. */\n\towner: string;\n\tbranch: string;\n\ttarget: string;\n\ttip: string;\n\tcommitCount: number;\n\tstatus: HandoffStatus;\n\tpublishedAt: number;\n\tupdatedAt: number;\n\tattemptId?: string;\n\treclaimedAt?: number;\n}\n\nexport interface Handoff extends HandoffSummary {\n\tbase: string;\n\tcommits: string[];\n\tdependencies: string[];\n\tverification: HandoffVerification[];\n\tartifactRefs: string[];\n\tnote?: string;\n}\n\nexport type AttemptStatus = \"open\" | \"integrated\" | \"conflict\" | \"aborted\" | \"reconciled\";\nexport type ReconcileResolution = \"integrated\" | \"not-integrated\" | \"manual\";\nexport type ReportOutcome = \"integrated\" | \"conflict\" | \"aborted\" | \"rejected\";\n\n/**\n * Values the owner's adapter claimed when it began an attempt. The broker cannot run or verify Git: it checks\n * the shape and that `checkoutRoot` is the owner's registered worktree root, and nothing else trusts them.\n */\nexport interface ReportedAttemptState {\n\t/** Realpath of the owner's checkout, as its adapter reported it. */\n\tcheckoutRoot: string;\n\t/** Full id of the target's HEAD, as the owner's adapter reported it. */\n\texpectedHead: string;\n}\n\n/** What a human's inspection showed when they reconciled an attempt (\"unavailable\": Git could not be run there). */\nexport type InspectedState = \"integrated\" | \"aborted\" | \"conflict\" | \"unexpected\" | \"unavailable\";\n\n/**\n * One coordinated integration step: recorded when the owner's preflight passed, closed by a separate outcome.\n * `open` and `conflict` attempts are unresolved evidence: they are never pruned and only an owner report from\n * the same generation or a human reconciliation closes them.\n */\nexport interface IntegrationAttempt {\n\tid: string;\n\thandoffId: string;\n\t/** Fencing generation the attempt was started under. */\n\tgeneration: number;\n\townerSessionId: string;\n\tstartedAt: number;\n\tstatus: AttemptStatus;\n\t/** From the handoff record, never from a frame. */\n\ttarget: string;\n\t/** Adapter-reported claims (D18). */\n\treported: ReportedAttemptState;\n\t/** From the handoff record, never from a frame. */\n\ttip: string;\n\tfinishedAt?: number;\n\theadAfter?: string;\n\tconflictFiles?: string[];\n\tresolution?: ReconcileResolution;\n\t/** Set by a human reconciliation: what the inspection showed. */\n\tinspected?: InspectedState;\n\treconciledBy?: string;\n\t/** The explanation a human typed for a reconciliation, or the evidence an owner report carried. */\n\tevidence?: string;\n}\n\nexport interface IntegrationOwnerInfo {\n\tsessionId: string;\n\tassignedAt: number;\n\tassignedBy: string;\n\t/** \"lost\" once the owner's connection closed or the broker restarted; only a human action restores an owner. */\n\tlease: \"held\" | \"lost\";\n\tleaseLostAt?: number;\n}\n\nexport interface WriterAssignment {\n\tworktreeRoot: string;\n\tsessionId: string;\n\tassignedAt: number;\n\tassignedBy: string;\n}\n\n/** The integration state as seen by one session. */\nexport interface IntegrationStatus {\n\t/** Fencing generation: bumped on every assign, transfer, release and lease loss. */\n\tgeneration: number;\n\towner: IntegrationOwnerInfo | null;\n\t/** The caller is the owner and the lease is held. */\n\tcallerIsOwner: boolean;\n\twriters: WriterAssignment[];\n\t/** Other live sessions that report the caller's worktree root. */\n\tsharedWith: string[];\n\t/** The caller is the assigned writer of its worktree. */\n\tcallerIsWriter: boolean;\n\t/** The attempt without an outcome, if any (at most one). */\n\topenAttempt: IntegrationAttempt | null;\n\t/** Attempts that stopped on a conflict and are not resolved yet (D8). */\n\tconflictAttempts: IntegrationAttempt[];\n\tqueuedHandoffs: number;\n\t/** The stored integration state is invalid and integration is disabled (D17). */\n\tstateInvalid: boolean;\n}\n\nexport type ReportOutcomeInput = {\n\toutcome: ReportOutcome;\n\tattemptId?: string;\n\theadAfter?: string;\n\tconflictFiles?: string[];\n\tevidence?: string;\n};\n\n/** Every request has a requestId (1..MAX_REQUEST_ID_CHARS). */\nexport type IntegrationAction =\n\t| { action: \"status\" }\n\t| { action: \"owner_assign\"; sessionId: string }\n\t| { action: \"owner_transfer\"; sessionId: string }\n\t| { action: \"owner_release\" }\n\t| {\n\t\t\taction: \"owner_reconcile\";\n\t\t\tattemptId: string;\n\t\t\tresolution: ReconcileResolution;\n\t\t\tinspected: InspectedState;\n\t\t\theadAfter?: string;\n\t\t\tevidence: string;\n\t }\n\t| { action: \"writer_assign\"; sessionId: string }\n\t| { action: \"writer_release\"; sessionId: string }\n\t| { action: \"handoff_publish\"; handoff: HandoffInput; currentBranch?: string }\n\t| { action: \"handoff_list\" }\n\t| { action: \"handoff_get\"; id: string }\n\t| { action: \"handoff_reclaim\"; id: string; generation: number }\n\t| { action: \"integrate_begin\"; id: string; generation: number; checkoutRoot: string; expectedHead: string }\n\t| ({ action: \"integrate_report\"; id: string; generation: number } & ReportOutcomeInput);\n\nexport type IntegrationRequest = { type: \"integration_request\"; requestId: string } & IntegrationAction;\n\nexport type IntegrationReply = {\n\ttype: \"integration_result\";\n\trequestId: string;\n\tstatus: IntegrationStatus;\n\thandoff?: Handoff;\n\thandoffs?: HandoffSummary[];\n\tattempt?: IntegrationAttempt;\n\t/** handoff_publish: an integration owner with a held lease exists. */\n\townerAssigned?: boolean;\n};\n\nexport type SessionRegistration = Omit<SessionInfo, \"id\" | \"endpointEpoch\" | \"peerUid\" | \"trustedLocal\"> & {\n\textensions?: ExtensionCapability[];\n\t/** Requested repository ownership policy. Not copied into SessionInfo. */\n\townership?: OwnershipMode;\n};\n\n/** Every request has a requestId (1..MAX_REQUEST_ID_CHARS). */\nexport type RecordRequest =\n\t| {\n\t\t\ttype: \"record_create\";\n\t\t\trequestId: string;\n\t\t\tkey: string;\n\t\t\tschemaVersion: number;\n\t\t\tvalue: JsonValue;\n\t\t\tartifactRefs?: string[];\n\t }\n\t| { type: \"record_get\"; requestId: string; key: string }\n\t| { type: \"record_list\"; requestId: string; prefix?: string }\n\t| {\n\t\t\ttype: \"record_update\";\n\t\t\trequestId: string;\n\t\t\tkey: string;\n\t\t\texpectedRevision: number;\n\t\t\tvalue?: JsonValue;\n\t\t\tschemaVersion?: number;\n\t\t\tstate?: RecordState;\n\t\t\tartifactRefs?: string[];\n\t }\n\t| { type: \"record_delete\"; requestId: string; key: string; expectedRevision: number }\n\t| { type: \"record_transfer_request\"; requestId: string; key: string; expectedRevision: number }\n\t| { type: \"record_transfer_accept\"; requestId: string; key: string; requester: string; expectedRevision: number }\n\t| { type: \"record_reclaim\"; requestId: string; key: string; expectedRevision: number };\n\nexport type PolicyRequest =\n\t| { type: \"policy_accept\"; requestId: string }\n\t| { type: \"policy_agree\"; requestId: string }\n\t| { type: \"policy_reset\"; requestId: string; mode: OwnershipMode }\n\t| { type: \"policy_propose\"; requestId: string; mode: OwnershipMode };\n\nexport type ArtifactRequest =\n\t| {\n\t\t\ttype: \"artifact_publish\";\n\t\t\trequestId: string;\n\t\t\tname: string;\n\t\t\t/** Basename only, matching /^[a-f0-9]{32}\\.part$/, inside <runtime>/artifacts/incoming/. */\n\t\t\tstagedFile: string;\n\t\t\tsha256: string;\n\t\t\tsize: number;\n\t\t\trecordKey?: string;\n\t }\n\t| { type: \"artifact_fetch\"; requestId: string; name: string }\n\t| { type: \"artifact_list\"; requestId: string };\n\nexport type CoordinationReply =\n\t| {\n\t\t\ttype: \"record_result\";\n\t\t\trequestId: string;\n\t\t\trecord?: RecordEnvelope;\n\t\t\trecords?: RecordSummary[];\n\t\t\ttruncated?: boolean;\n\t\t\t/** record_delete: the tombstone revision. */\n\t\t\trevision?: number;\n\t\t\t/** record_get: session ids with a pending transfer request for this record. */\n\t\t\tpendingTransfers?: string[];\n\t }\n\t| { type: \"policy_result\"; requestId: string; status: PolicyStatus }\n\t| {\n\t\t\ttype: \"artifact_result\";\n\t\t\trequestId: string;\n\t\t\tartifact?: ArtifactEntry;\n\t\t\tartifacts?: ArtifactEntry[];\n\t\t\ttruncated?: boolean;\n\t\t\tblobPath?: string;\n\t }\n\t| {\n\t\t\ttype: \"coordination_error\";\n\t\t\trequestId: string;\n\t\t\tcode: CoordinationErrorCode;\n\t\t\tmessage: string;\n\t\t\t/** true only for E_PERSIST_FAILED. */\n\t\t\tretryable: boolean;\n\t\t\t/** E_REVISION_CONFLICT only. */\n\t\t\tcurrentRevision?: number | null;\n\t };\n\nexport type ClientMessage =\n\t| {\n\t\t\ttype: \"register\";\n\t\t\tversion: number;\n\t\t\tsession: SessionRegistration;\n\t\t\tsessionId?: string;\n\t\t\tstateId?: string;\n\t\t\tscopeId?: string;\n\t }\n\t| { type: \"unregister\" }\n\t| { type: \"health\"; requestId: string }\n\t| { type: \"extension_capabilities_update\"; extensions: ExtensionCapability[] }\n\t| ({ type: \"list\"; requestId: string } & PeerFilters)\n\t| { type: \"send\"; to: string; message: Message; targetId?: string; targetEpoch?: string }\n\t| { type: \"message_receipt\"; receipt: MessageReceipt }\n\t| { type: \"cancel_message\"; messageId: string }\n\t| { type: \"cancel_ask\"; messageId: string }\n\t| {\n\t\t\ttype: \"presence\";\n\t\t\trepo?: string;\n\t\t\tfocus?: string;\n\t\t\tsubpath?: string;\n\t\t\ttouchedPaths?: TouchedPath[];\n\t\t\tname?: string;\n\t\t\tbranch?: string;\n\t\t\truntimeFallbackAlias?: boolean;\n\t\t\tstatus?: string;\n\t\t\tmodel?: string;\n\t\t\tcontextPct?: number | null;\n\t\t\tcontextTokens?: number | null;\n\t\t\tcontextWindow?: number | null;\n\t }\n\t| {\n\t\t\ttype: \"extension_publish\";\n\t\t\tnamespace: string;\n\t\t\taudience: \"owner\" | \"capable\";\n\t\t\townerEpoch?: string;\n\t\t\townerOnly?: boolean;\n\t\t\tpayload: unknown;\n\t }\n\t| {\n\t\t\ttype: \"extension_state_commit\";\n\t\t\tnamespace: string;\n\t\t\townerEpoch: string;\n\t\t\texpectedRevision: number;\n\t\t\tpayload: unknown;\n\t }\n\t| RecordRequest\n\t| PolicyRequest\n\t| ArtifactRequest\n\t| IntegrationRequest;\n\nexport type BrokerMessage =\n\t| { type: \"registered\"; version: number; sessionId: string; features?: string[] }\n\t| { type: \"health_ok\"; requestId: string; protocol: string; version: number }\n\t/** `truncated` is set when sessions were dropped from the end so the reply fits one frame. */\n\t| { type: \"sessions\"; requestId: string; sessions: SessionInfo[]; truncated?: boolean }\n\t| { type: \"message\"; from: SessionInfo; message: Message }\n\t| { type: \"presence_update\"; session: SessionInfo }\n\t| { type: \"session_joined\"; session: SessionInfo }\n\t| { type: \"session_left\"; sessionId: string }\n\t| { type: \"error\"; error: string }\n\t| ({ type: \"delivered\"; messageId: string } & DeliveryDetails)\n\t| ({ type: \"delivery_failed\"; messageId: string; reason: string } & DeliveryDetails)\n\t| { type: \"message_receipt\"; from: SessionInfo; receipt: MessageReceipt }\n\t| { type: \"message_control\"; from: SessionInfo; control: MessageControl }\n\t| { type: \"extension_owner\"; namespace: string; ownerId?: string; ownerEpoch?: string }\n\t| {\n\t\t\ttype: \"extension_message\";\n\t\t\tnamespace: string;\n\t\t\tfromSessionId: string;\n\t\t\townerId?: string;\n\t\t\townerEpoch?: string;\n\t\t\tpayload: unknown;\n\t }\n\t| {\n\t\t\ttype: \"extension_state\";\n\t\t\tnamespace: string;\n\t\t\trevision: number;\n\t\t\tpayload: unknown;\n\t }\n\t| {\n\t\t\ttype: \"extension_state_result\";\n\t\t\tnamespace: string;\n\t\t\tcommitted: boolean;\n\t\t\trevision: number;\n\t\t\treason?: string;\n\t\t\tcode?: \"E_RESERVED_NAMESPACE\";\n\t }\n\t| CoordinationReply\n\t| IntegrationReply\n\t| { type: \"policy_status\"; status: PolicyStatus }\n\t| { type: \"integration_status\"; status: IntegrationStatus };\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/coordination/transport/types.ts"],"names":[],"mappings":"AAAA,iHAAiH;AACjH,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AACxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAClD,MAAM,CAAC,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AACxD,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AACxD,MAAM,CAAC,MAAM,yBAAyB,GAAG,sBAAsB,CAAC","sourcesContent":["// Derived from pi-intercom (MIT, Copyright (c) 2026 Nico Bailon), commit 14731a48; modified for HUMAIN Code CLI.\nexport const EXTENSION_BUS_FEATURE = \"extension-bus-v1\";\nexport const EXACT_SEND_FEATURE = \"exact-send-v1\";\nexport const SESSION_HELD_ERROR_CODE = \"E_SESSION_HELD\";\nexport const COORD_RECORDS_FEATURE = \"coord-records-v1\";\nexport const COORD_INTEGRATION_FEATURE = \"coord-integration-v1\";\n\nexport type DeliveryState = \"socket_delivered\" | \"queued\" | \"failed\" | \"unknown\";\n\nexport interface DeliveryDetails {\n\tdelivery: DeliveryState;\n\tcode?: string;\n\tretryable: boolean;\n\toutcomeKnown: boolean;\n}\n\nexport interface PeerFilters {\n\trepo?: string;\n\tquery?: string;\n\tpath?: string;\n\t/** Used by repository-default broadcast and repository authority callers. */\n\tscope?: \"repo\" | \"device\";\n}\n\nexport interface TouchedPath {\n\tpath: string;\n\ttimestamp: number;\n}\n\nexport interface SessionInfo {\n\tid: string;\n\t/** Broker-owned lifetime of this live endpoint. */\n\tendpointEpoch?: string;\n\tname?: string;\n\t/** True only when the extension synthesized name for an unnamed runtime. */\n\truntimeFallbackAlias?: boolean;\n\tcwd: string;\n\tmodel: string;\n\tpid: number;\n\tstartedAt: number;\n\tlastActivity: number;\n\tstatus?: string;\n\tpeerUid?: number;\n\ttrustedLocal?: boolean;\n\t/** Live context-window usage, pushed via presence from the source session's\n\t * getContextUsage(). contextPct is 0..100 (rounded); contextTokens /\n\t * contextWindow are raw token counts. All optional: unknown right after a\n\t * compaction (before the next assistant response), when no model is selected,\n\t * or on older clients that never report it. */\n\tcontextPct?: number;\n\tcontextTokens?: number;\n\tcontextWindow?: number;\n\t/** Canonical worktree root of the session. */\n\tworktreeRoot?: string;\n\t/** Current branch, or \"HEAD\" when detached. */\n\tbranch?: string;\n\trepo?: string;\n\tfocus?: string;\n\tsubpath?: string;\n\ttouchedPaths?: TouchedPath[];\n}\n\nexport interface Message {\n\tid: string;\n\ttimestamp: number;\n\tsenderSequence?: number;\n\tbrokerReceivedAt?: number;\n\tbrokerDeliveredAt?: number;\n\treceiverReceivedAt?: number;\n\tinjectedAt?: number;\n\tsupersedes?: string;\n\tretryOf?: string;\n\treplyTo?: string;\n\texpectsReply?: boolean;\n\tprovenance?: MessageProvenance;\n\tcontent: {\n\t\ttext: string;\n\t\tattachments?: Attachment[];\n\t};\n}\n\nexport interface MessageProvenance {\n\ttype: \"extension_outbox\";\n\textensionId: string;\n\textensionName: string;\n\trequestId: string;\n}\n\nexport interface Attachment {\n\ttype: \"file\" | \"snippet\" | \"context\";\n\tname: string;\n\tcontent: string;\n\tlanguage?: string;\n}\n\nexport type MessageReceiptStatus =\n\t| \"receiver_received\"\n\t| \"queued\"\n\t| \"injected\"\n\t| \"not_injected\"\n\t| \"deferred\"\n\t| \"acknowledged\"\n\t| \"expired\"\n\t| \"cancelled\"\n\t| \"superseded\"\n\t| \"cancellation_requested\";\n\nexport interface MessageReceipt {\n\tmessageId: string;\n\tstatus: MessageReceiptStatus;\n\ttimestamp: number;\n\tdetail?: string;\n}\n\nexport type MessageControlAction = \"cancel\" | \"supersede\";\n\nexport interface MessageControl {\n\tmessageId: string;\n\taction: MessageControlAction;\n\ttimestamp: number;\n\tsupersededBy?: string;\n\tdetail?: string;\n}\n\nexport interface ExtensionCapability {\n\tnamespace: string;\n\townerEligible: boolean;\n}\n\nexport type OwnershipMode = \"on\" | \"off\";\nexport type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue };\nexport type RecordState = \"open\" | \"done\";\n\nexport interface RecordEnvelope {\n\tkey: string;\n\tschemaVersion: number;\n\tcreator: string;\n\towner: string;\n\t/** Broker assigned. Equals the ExtensionStateManager revision of the record namespace. Starts at 1. */\n\trevision: number;\n\tstate: RecordState;\n\t/** SHA-256 hex digests of artifacts this record keeps alive. At most 64. */\n\tartifactRefs: string[];\n\tcreatedAt: number;\n\tupdatedAt: number;\n\tvalue: JsonValue;\n}\n\n/** Stored in place of an envelope after delete; keeps the revision sequence. Never sent to clients. */\nexport interface RecordTombstone {\n\tkey: string;\n\ttombstone: true;\n\trevision: number;\n\tdeletedAt: number;\n}\n\nexport type RecordSummary = Omit<RecordEnvelope, \"value\"> & { valueBytes: number };\n\nexport type PolicyChangeVia = \"first-participant\" | \"agreement\" | \"human-reset\";\n\nexport interface PolicyRecord {\n\tmode: OwnershipMode;\n\tsetBy: string;\n\tsetAt: number;\n\tvia: PolicyChangeVia;\n}\n\nexport interface PolicyProposal {\n\tmode: OwnershipMode;\n\tproposedBy: string;\n\tproposedAt: number;\n\t/** Session ids that agreed, proposer included. */\n\tagreedBy: string[];\n}\n\nexport interface PolicyNotice {\n\tkind: \"policy_conflict\";\n\trequested: OwnershipMode;\n\tcurrent: OwnershipMode;\n\t/** Set when a proposal for the requested mode is pending. */\n\tproposalPending: boolean;\n}\n\n/** The policy as seen by one session; the broker sends each session its own copy. */\nexport interface PolicyStatus {\n\t/** null until a first participant could persist one. */\n\tpolicy: PolicyRecord | null;\n\tpolicyAccepted: boolean;\n\trequestedOwnership?: OwnershipMode;\n\tproposal: PolicyProposal | null;\n\t/** Live session ids that have not agreed to the pending proposal. Empty without a proposal. */\n\tawaiting: string[];\n\tliveParticipantCount: number;\n\tnotice?: PolicyNotice;\n}\n\nexport interface ArtifactEntry {\n\tname: string;\n\tsha256: string;\n\tsize: number;\n\tpublisher: string;\n\tpublishedAt: number;\n\trecordKey?: string;\n}\n\nexport type CoordinationErrorCode =\n\t| \"E_INVALID_REQUEST\"\n\t| \"E_PERSIST_FAILED\"\n\t| \"E_POLICY_NOT_ACCEPTED\"\n\t| \"E_RESERVED_NAMESPACE\"\n\t| \"E_RESERVED_KEY\"\n\t| \"E_INVALID_RECORD\"\n\t| \"E_RECORD_EXISTS\"\n\t| \"E_RECORD_NOT_FOUND\"\n\t| \"E_REVISION_CONFLICT\"\n\t| \"E_RECORD_LIMIT\"\n\t| \"E_NOT_OWNER\"\n\t| \"E_OWNER_STALE\"\n\t| \"E_OWNER_LIVE\"\n\t| \"E_NO_TRANSFER_REQUEST\"\n\t| \"E_NO_PROPOSAL\"\n\t| \"E_PROPOSAL_PENDING\"\n\t| \"E_POLICY_UNCHANGED\"\n\t| \"E_ARTIFACT_INVALID\"\n\t| \"E_ARTIFACT_NOT_FOUND\"\n\t| \"E_ARTIFACT_EXISTS\"\n\t| \"E_ARTIFACT_TOO_LARGE\"\n\t| \"E_ARTIFACT_QUOTA\"\n\t| \"E_NO_INTEGRATION_OWNER\"\n\t| \"E_NOT_INTEGRATION_OWNER\"\n\t| \"E_LEASE_LOST\"\n\t| \"E_GENERATION_MISMATCH\"\n\t| \"E_OWNER_STATE\"\n\t| \"E_OPEN_ATTEMPT\"\n\t| \"E_ATTEMPT_NOT_FOUND\"\n\t| \"E_SESSION_NOT_LIVE\"\n\t| \"E_WRITER_REQUIRED\"\n\t| \"E_NO_WRITER\"\n\t| \"E_HANDOFF_INVALID\"\n\t| \"E_HANDOFF_NOT_FOUND\"\n\t| \"E_HANDOFF_STATE\"\n\t| \"E_INTEGRATION_LIMIT\"\n\t| \"E_DEPENDENCY_PENDING\"\n\t| \"E_PUBLISHER_LIVE\"\n\t| \"E_PUBLISHER_STALE\"\n\t| \"E_INTEGRATION_STATE_INVALID\";\n\nexport type HandoffStatus = \"queued\" | \"attempting\" | \"conflict\" | \"integrated\" | \"rejected\";\nexport type VerificationResult = \"passed\" | \"failed\" | \"not_run\";\n\n/** A check the publisher says it ran. Peer-reported: nothing verifies it. */\nexport interface HandoffVerification {\n\tcommand: string;\n\tresult: VerificationResult;\n\tsummary?: string;\n}\n\n/** What a worker publishes. Oldest commit first; the last commit is the tip. */\nexport interface HandoffInput {\n\tbranch: string;\n\tcommits: string[];\n\tbase: string;\n\ttarget: string;\n\tdependencies: string[];\n\tverification: HandoffVerification[];\n\tartifactRefs: string[];\n\tnote?: string;\n}\n\nexport interface HandoffSummary {\n\tid: string;\n\t/** Record key of the broker-written handoff record. */\n\tkey: string;\n\tpublisher: string;\n\t/** The publisher, or the integration owner after handoff_reclaim. */\n\towner: string;\n\tbranch: string;\n\ttarget: string;\n\ttip: string;\n\tcommitCount: number;\n\tstatus: HandoffStatus;\n\tpublishedAt: number;\n\tupdatedAt: number;\n\tattemptId?: string;\n\treclaimedAt?: number;\n}\n\nexport interface Handoff extends HandoffSummary {\n\tbase: string;\n\tcommits: string[];\n\tdependencies: string[];\n\tverification: HandoffVerification[];\n\tartifactRefs: string[];\n\tnote?: string;\n}\n\nexport type AttemptStatus = \"open\" | \"integrated\" | \"conflict\" | \"aborted\" | \"reconciled\";\nexport type ReconcileResolution = \"integrated\" | \"not-integrated\" | \"manual\";\nexport type ReportOutcome = \"integrated\" | \"conflict\" | \"aborted\" | \"rejected\";\n\n/**\n * Values the owner's adapter claimed when it began an attempt. The broker cannot run or verify Git: it checks\n * the shape and that `checkoutRoot` is the owner's registered worktree root, and nothing else trusts them.\n */\nexport interface ReportedAttemptState {\n\t/** Realpath of the owner's checkout, as its adapter reported it. */\n\tcheckoutRoot: string;\n\t/** Full id of the target's HEAD, as the owner's adapter reported it. */\n\texpectedHead: string;\n}\n\n/** What a human's inspection showed when they reconciled an attempt (\"unavailable\": Git could not be run there). */\nexport type InspectedState = \"integrated\" | \"aborted\" | \"conflict\" | \"unexpected\" | \"unavailable\";\n\n/**\n * One coordinated integration step: recorded when the owner's preflight passed, closed by a separate outcome.\n * `open` and `conflict` attempts are unresolved evidence: they are never pruned and only an owner report from\n * the same generation or a human reconciliation closes them.\n */\nexport interface IntegrationAttempt {\n\tid: string;\n\thandoffId: string;\n\t/** Fencing generation the attempt was started under. */\n\tgeneration: number;\n\townerSessionId: string;\n\tstartedAt: number;\n\tstatus: AttemptStatus;\n\t/** From the handoff record, never from a frame. */\n\ttarget: string;\n\t/** Adapter-reported claims (D18). */\n\treported: ReportedAttemptState;\n\t/** From the handoff record, never from a frame. */\n\ttip: string;\n\tfinishedAt?: number;\n\theadAfter?: string;\n\tconflictFiles?: string[];\n\tresolution?: ReconcileResolution;\n\t/** Set by a human reconciliation: what the inspection showed. */\n\tinspected?: InspectedState;\n\treconciledBy?: string;\n\t/** The explanation a human typed for a reconciliation, or the evidence an owner report carried. */\n\tevidence?: string;\n}\n\nexport interface IntegrationOwnerInfo {\n\tsessionId: string;\n\tassignedAt: number;\n\tassignedBy: string;\n\t/** \"lost\" once the owner's connection closed or the broker restarted; only a human action restores an owner. */\n\tlease: \"held\" | \"lost\";\n\tleaseLostAt?: number;\n}\n\nexport interface WriterAssignment {\n\tworktreeRoot: string;\n\tsessionId: string;\n\tassignedAt: number;\n\tassignedBy: string;\n}\n\n/** The integration state as seen by one session. */\nexport interface IntegrationStatus {\n\t/** Fencing generation: bumped on every assign, transfer, release and lease loss. */\n\tgeneration: number;\n\towner: IntegrationOwnerInfo | null;\n\t/** The caller is the owner and the lease is held. */\n\tcallerIsOwner: boolean;\n\twriters: WriterAssignment[];\n\t/** Other live sessions that report the caller's worktree root. */\n\tsharedWith: string[];\n\t/** The caller is the assigned writer of its worktree. */\n\tcallerIsWriter: boolean;\n\t/** The attempt without an outcome, if any (at most one). */\n\topenAttempt: IntegrationAttempt | null;\n\t/** Attempts that stopped on a conflict and are not resolved yet (D8). */\n\tconflictAttempts: IntegrationAttempt[];\n\tqueuedHandoffs: number;\n\t/** The stored integration state is invalid and integration is disabled (D17). */\n\tstateInvalid: boolean;\n}\n\nexport type ReportOutcomeInput = {\n\toutcome: ReportOutcome;\n\tattemptId?: string;\n\theadAfter?: string;\n\tconflictFiles?: string[];\n\tevidence?: string;\n};\n\n/** Every request has a requestId (1..MAX_REQUEST_ID_CHARS). */\nexport type IntegrationAction =\n\t| { action: \"status\" }\n\t| { action: \"owner_assign\"; sessionId: string }\n\t| { action: \"owner_transfer\"; sessionId: string }\n\t| { action: \"owner_release\" }\n\t| {\n\t\t\taction: \"owner_reconcile\";\n\t\t\tattemptId: string;\n\t\t\tresolution: ReconcileResolution;\n\t\t\tinspected: InspectedState;\n\t\t\theadAfter?: string;\n\t\t\tevidence: string;\n\t }\n\t| { action: \"writer_assign\"; sessionId: string }\n\t| { action: \"writer_release\"; sessionId: string }\n\t| { action: \"handoff_publish\"; handoff: HandoffInput; currentBranch?: string }\n\t| { action: \"handoff_list\" }\n\t| { action: \"handoff_get\"; id: string }\n\t| { action: \"handoff_reclaim\"; id: string; generation: number }\n\t| { action: \"integrate_begin\"; id: string; generation: number; checkoutRoot: string; expectedHead: string }\n\t| ({ action: \"integrate_report\"; id: string; generation: number } & ReportOutcomeInput);\n\nexport type IntegrationRequest = { type: \"integration_request\"; requestId: string } & IntegrationAction;\n\nexport type IntegrationReply = {\n\ttype: \"integration_result\";\n\trequestId: string;\n\tstatus: IntegrationStatus;\n\thandoff?: Handoff;\n\thandoffs?: HandoffSummary[];\n\tattempt?: IntegrationAttempt;\n\t/** handoff_publish: an integration owner with a held lease exists. */\n\townerAssigned?: boolean;\n};\n\nexport type SessionRegistration = Omit<SessionInfo, \"id\" | \"endpointEpoch\" | \"peerUid\" | \"trustedLocal\"> & {\n\textensions?: ExtensionCapability[];\n\t/** Requested repository ownership policy. Not copied into SessionInfo. */\n\townership?: OwnershipMode;\n\t/** Promises receiver receipts before the broker may report socket delivery. */\n\tacknowledgesReceipts?: boolean;\n\t/** Promises a heartbeat at least this often; absent for plain clients. */\n\tlivenessIntervalMs?: number;\n};\n\n/** Every request has a requestId (1..MAX_REQUEST_ID_CHARS). */\nexport type RecordRequest =\n\t| {\n\t\t\ttype: \"record_create\";\n\t\t\trequestId: string;\n\t\t\tkey: string;\n\t\t\tschemaVersion: number;\n\t\t\tvalue: JsonValue;\n\t\t\tartifactRefs?: string[];\n\t }\n\t| { type: \"record_get\"; requestId: string; key: string }\n\t| { type: \"record_list\"; requestId: string; prefix?: string }\n\t| {\n\t\t\ttype: \"record_update\";\n\t\t\trequestId: string;\n\t\t\tkey: string;\n\t\t\texpectedRevision: number;\n\t\t\tvalue?: JsonValue;\n\t\t\tschemaVersion?: number;\n\t\t\tstate?: RecordState;\n\t\t\tartifactRefs?: string[];\n\t }\n\t| { type: \"record_delete\"; requestId: string; key: string; expectedRevision: number }\n\t| { type: \"record_transfer_request\"; requestId: string; key: string; expectedRevision: number }\n\t| { type: \"record_transfer_accept\"; requestId: string; key: string; requester: string; expectedRevision: number }\n\t| { type: \"record_reclaim\"; requestId: string; key: string; expectedRevision: number };\n\nexport type PolicyRequest =\n\t| { type: \"policy_accept\"; requestId: string }\n\t| { type: \"policy_agree\"; requestId: string }\n\t| { type: \"policy_reset\"; requestId: string; mode: OwnershipMode }\n\t| { type: \"policy_propose\"; requestId: string; mode: OwnershipMode };\n\nexport type ArtifactRequest =\n\t| {\n\t\t\ttype: \"artifact_publish\";\n\t\t\trequestId: string;\n\t\t\tname: string;\n\t\t\t/** Basename only, matching /^[a-f0-9]{32}\\.part$/, inside <runtime>/artifacts/incoming/. */\n\t\t\tstagedFile: string;\n\t\t\tsha256: string;\n\t\t\tsize: number;\n\t\t\trecordKey?: string;\n\t }\n\t| { type: \"artifact_fetch\"; requestId: string; name: string }\n\t| { type: \"artifact_list\"; requestId: string };\n\nexport type CoordinationReply =\n\t| {\n\t\t\ttype: \"record_result\";\n\t\t\trequestId: string;\n\t\t\trecord?: RecordEnvelope;\n\t\t\trecords?: RecordSummary[];\n\t\t\ttruncated?: boolean;\n\t\t\t/** record_delete: the tombstone revision. */\n\t\t\trevision?: number;\n\t\t\t/** record_get: session ids with a pending transfer request for this record. */\n\t\t\tpendingTransfers?: string[];\n\t }\n\t| { type: \"policy_result\"; requestId: string; status: PolicyStatus }\n\t| {\n\t\t\ttype: \"artifact_result\";\n\t\t\trequestId: string;\n\t\t\tartifact?: ArtifactEntry;\n\t\t\tartifacts?: ArtifactEntry[];\n\t\t\ttruncated?: boolean;\n\t\t\tblobPath?: string;\n\t }\n\t| {\n\t\t\ttype: \"coordination_error\";\n\t\t\trequestId: string;\n\t\t\tcode: CoordinationErrorCode;\n\t\t\tmessage: string;\n\t\t\t/** true only for E_PERSIST_FAILED. */\n\t\t\tretryable: boolean;\n\t\t\t/** E_REVISION_CONFLICT only. */\n\t\t\tcurrentRevision?: number | null;\n\t };\n\nexport type ClientMessage =\n\t| {\n\t\t\ttype: \"register\";\n\t\t\tversion: number;\n\t\t\tsession: SessionRegistration;\n\t\t\tsessionId?: string;\n\t\t\tstateId?: string;\n\t\t\tscopeId?: string;\n\t }\n\t| { type: \"unregister\" }\n\t| { type: \"health\"; requestId: string }\n\t| { type: \"extension_capabilities_update\"; extensions: ExtensionCapability[] }\n\t| ({ type: \"list\"; requestId: string } & PeerFilters)\n\t| { type: \"send\"; to: string; message: Message; targetId?: string; targetEpoch?: string }\n\t| { type: \"message_receipt\"; receipt: MessageReceipt }\n\t| { type: \"cancel_message\"; messageId: string }\n\t| { type: \"cancel_ask\"; messageId: string }\n\t| {\n\t\t\ttype: \"presence\";\n\t\t\trepo?: string;\n\t\t\tfocus?: string;\n\t\t\tsubpath?: string;\n\t\t\ttouchedPaths?: TouchedPath[];\n\t\t\tname?: string;\n\t\t\tbranch?: string;\n\t\t\truntimeFallbackAlias?: boolean;\n\t\t\tstatus?: string;\n\t\t\tmodel?: string;\n\t\t\tcontextPct?: number | null;\n\t\t\tcontextTokens?: number | null;\n\t\t\tcontextWindow?: number | null;\n\t }\n\t| {\n\t\t\ttype: \"extension_publish\";\n\t\t\tnamespace: string;\n\t\t\taudience: \"owner\" | \"capable\";\n\t\t\townerEpoch?: string;\n\t\t\townerOnly?: boolean;\n\t\t\tpayload: unknown;\n\t }\n\t| {\n\t\t\ttype: \"extension_state_commit\";\n\t\t\tnamespace: string;\n\t\t\townerEpoch: string;\n\t\t\texpectedRevision: number;\n\t\t\tpayload: unknown;\n\t }\n\t| RecordRequest\n\t| PolicyRequest\n\t| ArtifactRequest\n\t| IntegrationRequest;\n\nexport type BrokerMessage =\n\t| { type: \"registered\"; version: number; sessionId: string; features?: string[] }\n\t| { type: \"health_ok\"; requestId: string; protocol: string; version: number }\n\t/** `truncated` is set when sessions were dropped from the end so the reply fits one frame. */\n\t| { type: \"sessions\"; requestId: string; sessions: SessionInfo[]; truncated?: boolean }\n\t| { type: \"message\"; from: SessionInfo; message: Message }\n\t| { type: \"presence_update\"; session: SessionInfo }\n\t| { type: \"session_joined\"; session: SessionInfo }\n\t| { type: \"session_left\"; sessionId: string }\n\t| { type: \"error\"; error: string; code?: string }\n\t| ({ type: \"delivered\"; messageId: string } & DeliveryDetails)\n\t| ({ type: \"delivery_failed\"; messageId: string; reason: string } & DeliveryDetails)\n\t| { type: \"message_receipt\"; from: SessionInfo; receipt: MessageReceipt }\n\t| { type: \"message_control\"; from: SessionInfo; control: MessageControl }\n\t| { type: \"extension_owner\"; namespace: string; ownerId?: string; ownerEpoch?: string }\n\t| {\n\t\t\ttype: \"extension_message\";\n\t\t\tnamespace: string;\n\t\t\tfromSessionId: string;\n\t\t\townerId?: string;\n\t\t\townerEpoch?: string;\n\t\t\tpayload: unknown;\n\t }\n\t| {\n\t\t\ttype: \"extension_state\";\n\t\t\tnamespace: string;\n\t\t\trevision: number;\n\t\t\tpayload: unknown;\n\t }\n\t| {\n\t\t\ttype: \"extension_state_result\";\n\t\t\tnamespace: string;\n\t\t\tcommitted: boolean;\n\t\t\trevision: number;\n\t\t\treason?: string;\n\t\t\tcode?: \"E_RESERVED_NAMESPACE\";\n\t }\n\t| CoordinationReply\n\t| IntegrationReply\n\t| { type: \"policy_status\"; status: PolicyStatus }\n\t| { type: \"integration_status\"; status: IntegrationStatus };\n"]}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
import { type Agent, type AgentEvent, type AgentMessage, type AgentState, type AgentTool, type ThinkingLevel } from "@earendil-works/pi-agent-core";
|
|
16
16
|
import type { ImageContent, Model, TextContent } from "@earendil-works/pi-ai/compat";
|
|
17
17
|
import { type NodeAccountFailureReason } from "../humain/node-account-failure.ts";
|
|
18
|
+
import { type AutoEffortResult } from "./auto-effort.ts";
|
|
18
19
|
import { type BashResult } from "./bash-executor.ts";
|
|
19
20
|
import type { CacheWarmer, CacheWarmingStatus } from "./cache-warmer.ts";
|
|
20
21
|
import { type CompactionResult } from "./compaction/index.ts";
|
|
@@ -70,6 +71,10 @@ export type AgentSessionEvent = WithParentToolCallId<Exclude<AgentEvent, {
|
|
|
70
71
|
} | {
|
|
71
72
|
type: "thinking_level_changed";
|
|
72
73
|
level: ThinkingLevel;
|
|
74
|
+
} | {
|
|
75
|
+
type: "auto_effort_state_changed";
|
|
76
|
+
selecting: boolean;
|
|
77
|
+
failure?: AutoEffortResult["failure"];
|
|
73
78
|
} | {
|
|
74
79
|
type: "compaction_end";
|
|
75
80
|
reason: "manual" | "threshold" | "overflow";
|
|
@@ -77,6 +82,8 @@ export type AgentSessionEvent = WithParentToolCallId<Exclude<AgentEvent, {
|
|
|
77
82
|
aborted: boolean;
|
|
78
83
|
willRetry: boolean;
|
|
79
84
|
errorMessage?: string;
|
|
85
|
+
/** All observed summary attempts are owned by these usage entries, even on failure. */
|
|
86
|
+
usageEntryIds?: string[];
|
|
80
87
|
} | {
|
|
81
88
|
type: "auto_retry_start";
|
|
82
89
|
attempt: number;
|
|
@@ -131,6 +138,8 @@ export type AgentSessionEvent = WithParentToolCallId<Exclude<AgentEvent, {
|
|
|
131
138
|
errorMessage: string;
|
|
132
139
|
} | {
|
|
133
140
|
type: "summarization_retry_scheduled";
|
|
141
|
+
/** Usage entries emitted before this backoff cover all attempts so far. */
|
|
142
|
+
usageEntryIds?: string[];
|
|
134
143
|
attempt: number;
|
|
135
144
|
maxAttempts: number;
|
|
136
145
|
delayMs: number;
|
|
@@ -265,6 +274,11 @@ export declare class AgentSession {
|
|
|
265
274
|
readonly sessionManager: SessionManager;
|
|
266
275
|
readonly settingsManager: SettingsManager;
|
|
267
276
|
private _scopedModels;
|
|
277
|
+
private _autoEffortInteractive;
|
|
278
|
+
private _autoEffortController?;
|
|
279
|
+
private _thinkingSelectionRevision;
|
|
280
|
+
private readonly _autoEffortInputs;
|
|
281
|
+
private readonly _autoEffortPendingInputs;
|
|
268
282
|
private _unsubscribeAgent?;
|
|
269
283
|
private _eventListeners;
|
|
270
284
|
private _isAgentRunActive;
|
|
@@ -319,6 +333,7 @@ export declare class AgentSession {
|
|
|
319
333
|
* retry is routed with it as `failed`, since the context no longer contains it.
|
|
320
334
|
*/
|
|
321
335
|
private _failedResponse;
|
|
336
|
+
private _contextEstimate;
|
|
322
337
|
private readonly _bashAbortControllers;
|
|
323
338
|
private _pendingBashMessages;
|
|
324
339
|
private _extensionRunner;
|
|
@@ -423,9 +438,19 @@ export declare class AgentSession {
|
|
|
423
438
|
* through the agent's tool pipeline with the session's hooks, against the callable tools.
|
|
424
439
|
*/
|
|
425
440
|
private _executeNestedToolCall;
|
|
426
|
-
/** Whether
|
|
441
|
+
/** Whether the current session projection exceeds the compaction threshold of `model`. */
|
|
427
442
|
private _exceedsCompactionThreshold;
|
|
443
|
+
/**
|
|
444
|
+
* The context size estimate of the current projection, kept until the projection changes: the compaction check
|
|
445
|
+
* runs before every request and the footer asks after every entry, and each estimate walks the whole context.
|
|
446
|
+
* `knownAfterCompaction` is false when the latest compaction has no projected assistant response with usage after it
|
|
447
|
+
* (the size is unknown until the next response).
|
|
448
|
+
*/
|
|
449
|
+
private _contextTokenEstimate;
|
|
428
450
|
private _compactBeforeNextAssistantResponse;
|
|
451
|
+
setAutoEffortInteractive(enabled: boolean): void;
|
|
452
|
+
get autoEffortSelecting(): boolean;
|
|
453
|
+
private _prepareAutoEffort;
|
|
429
454
|
private _installAgentRequestProjection;
|
|
430
455
|
private _dispatchTurnEndBoundary;
|
|
431
456
|
private _installAgentBoundaryHooks;
|
|
@@ -609,7 +634,21 @@ export declare class AgentSession {
|
|
|
609
634
|
* set, so the transcript's declarations are the whole loadout.
|
|
610
635
|
*/
|
|
611
636
|
private _restoreToolsFromTranscript;
|
|
612
|
-
|
|
637
|
+
/**
|
|
638
|
+
* Start a run from a user or custom message. The session counts as busy from here on, so
|
|
639
|
+
* messages sent while before_agent_start handlers run are queued into this run instead of
|
|
640
|
+
* starting another, and an abort requested meanwhile aborts the run as soon as it exists.
|
|
641
|
+
* @param onStarted Called once the run's messages are prepared, before the first request.
|
|
642
|
+
* @param autoEffortText Raw interactive input the automatic effort judge sees for a user trigger.
|
|
643
|
+
*/
|
|
644
|
+
private _startRun;
|
|
645
|
+
/**
|
|
646
|
+
* Prepare a run and return its starting messages: compact first when needed, emit
|
|
647
|
+
* before_agent_start, apply the run's prompt options and tool loadout, and build the starting
|
|
648
|
+
* message followed by pending nextTurn messages (consumed here) and handler messages, with a
|
|
649
|
+
* system patch first when the prompt changed.
|
|
650
|
+
*/
|
|
651
|
+
private _prepareRun;
|
|
613
652
|
private _handlePostAgentRun;
|
|
614
653
|
private _runBeforeSettleBoundary;
|
|
615
654
|
private _runInputHandlers;
|
|
@@ -756,6 +795,9 @@ export declare class AgentSession {
|
|
|
756
795
|
* Saves the clamped level to the session transcript only if the level actually changes.
|
|
757
796
|
* Persists the requested level to global defaults only when options.persist is true.
|
|
758
797
|
*/
|
|
798
|
+
get autoEffortEnabled(): boolean;
|
|
799
|
+
setAutoEffortSessionEnabled(enabled: boolean): void;
|
|
800
|
+
setManualThinkingLevel(level: ThinkingLevel, options?: ModelMutationOptions): void;
|
|
759
801
|
setThinkingLevel(level: ThinkingLevel, options?: ModelMutationOptions): void;
|
|
760
802
|
/**
|
|
761
803
|
* Cycle to next thinking level.
|