@sentropic/h2a 0.85.25 → 0.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/dist/bin.js +51 -2
- package/dist/bin.js.map +1 -1
- package/dist/cli-command-map.d.ts +119 -0
- package/dist/cli-command-map.d.ts.map +1 -0
- package/dist/cli-command-map.js +396 -0
- package/dist/cli-command-map.js.map +1 -0
- package/dist/cli-contract.d.ts.map +1 -1
- package/dist/cli-contract.js +39 -1
- package/dist/cli-contract.js.map +1 -1
- package/dist/cli.d.ts +25 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +356 -7
- package/dist/cli.js.map +1 -1
- package/dist/identity.d.ts +37 -3
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +0 -0
- package/dist/identity.js.map +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/runtime/enrollment/ceremony.d.ts +542 -0
- package/dist/runtime/enrollment/ceremony.d.ts.map +1 -0
- package/dist/runtime/enrollment/ceremony.js +777 -0
- package/dist/runtime/enrollment/ceremony.js.map +1 -0
- package/dist/runtime/enrollment/index.d.ts +16 -0
- package/dist/runtime/enrollment/index.d.ts.map +1 -0
- package/dist/runtime/enrollment/index.js +16 -0
- package/dist/runtime/enrollment/index.js.map +1 -0
- package/dist/runtime/feed/descriptors.d.ts +261 -0
- package/dist/runtime/feed/descriptors.d.ts.map +1 -0
- package/dist/runtime/feed/descriptors.js +425 -0
- package/dist/runtime/feed/descriptors.js.map +1 -0
- package/dist/runtime/feed/index.d.ts +12 -0
- package/dist/runtime/feed/index.d.ts.map +1 -0
- package/dist/runtime/feed/index.js +12 -0
- package/dist/runtime/feed/index.js.map +1 -0
- package/dist/runtime/identity/index.d.ts +3 -3
- package/dist/runtime/identity/index.d.ts.map +1 -1
- package/dist/runtime/identity/index.js +2 -2
- package/dist/runtime/identity/index.js.map +1 -1
- package/dist/runtime/identity/live.d.ts +68 -0
- package/dist/runtime/identity/live.d.ts.map +1 -1
- package/dist/runtime/identity/live.js +78 -2
- package/dist/runtime/identity/live.js.map +1 -1
- package/dist/runtime/identity/readers.d.ts +89 -5
- package/dist/runtime/identity/readers.d.ts.map +1 -1
- package/dist/runtime/identity/readers.js +242 -33
- package/dist/runtime/identity/readers.js.map +1 -1
- package/dist/runtime/local-files/presence.d.ts +16 -1
- package/dist/runtime/local-files/presence.d.ts.map +1 -1
- package/dist/runtime/local-files/presence.js +32 -20
- package/dist/runtime/local-files/presence.js.map +1 -1
- package/dist/runtime/loop/index.d.ts +5 -0
- package/dist/runtime/loop/index.d.ts.map +1 -1
- package/dist/runtime/loop/index.js +48 -5
- package/dist/runtime/loop/index.js.map +1 -1
- package/dist/runtime/mcp/agent-launch.d.ts +15 -1
- package/dist/runtime/mcp/agent-launch.d.ts.map +1 -1
- package/dist/runtime/mcp/agent-launch.js +45 -4
- package/dist/runtime/mcp/agent-launch.js.map +1 -1
- package/dist/runtime/mcp/index.d.ts +1 -1
- package/dist/runtime/mcp/index.d.ts.map +1 -1
- package/dist/runtime/mcp/index.js +1 -1
- package/dist/runtime/mcp/index.js.map +1 -1
- package/dist/runtime/mcp/server.d.ts +3 -1
- package/dist/runtime/mcp/server.d.ts.map +1 -1
- package/dist/runtime/mcp/server.js +7 -2
- package/dist/runtime/mcp/server.js.map +1 -1
- package/dist/runtime/mcp/sessions.d.ts +19 -0
- package/dist/runtime/mcp/sessions.d.ts.map +1 -1
- package/dist/runtime/mcp/sessions.js +44 -2
- package/dist/runtime/mcp/sessions.js.map +1 -1
- package/dist/runtime/mcp/stdio.d.ts +8 -0
- package/dist/runtime/mcp/stdio.d.ts.map +1 -1
- package/dist/runtime/mcp/stdio.js +42 -0
- package/dist/runtime/mcp/stdio.js.map +1 -1
- package/dist/runtime/mcp-registry/broker.d.ts +175 -0
- package/dist/runtime/mcp-registry/broker.d.ts.map +1 -0
- package/dist/runtime/mcp-registry/broker.js +203 -0
- package/dist/runtime/mcp-registry/broker.js.map +1 -0
- package/dist/runtime/mcp-registry/broker.typecheck.d.ts +2 -0
- package/dist/runtime/mcp-registry/broker.typecheck.d.ts.map +1 -0
- package/dist/runtime/mcp-registry/broker.typecheck.js +48 -0
- package/dist/runtime/mcp-registry/broker.typecheck.js.map +1 -0
- package/dist/runtime/mirror/accept.d.ts +43 -5
- package/dist/runtime/mirror/accept.d.ts.map +1 -1
- package/dist/runtime/mirror/accept.js +55 -7
- package/dist/runtime/mirror/accept.js.map +1 -1
- package/dist/runtime/mirror/build.d.ts +23 -4
- package/dist/runtime/mirror/build.d.ts.map +1 -1
- package/dist/runtime/mirror/build.js +34 -4
- package/dist/runtime/mirror/build.js.map +1 -1
- package/dist/runtime/mirror/index.d.ts +3 -0
- package/dist/runtime/mirror/index.d.ts.map +1 -1
- package/dist/runtime/mirror/index.js +3 -0
- package/dist/runtime/mirror/index.js.map +1 -1
- package/dist/runtime/mirror/ingest.d.ts +109 -0
- package/dist/runtime/mirror/ingest.d.ts.map +1 -0
- package/dist/runtime/mirror/ingest.js +117 -0
- package/dist/runtime/mirror/ingest.js.map +1 -0
- package/dist/runtime/mirror/push-daemon.d.ts +376 -0
- package/dist/runtime/mirror/push-daemon.d.ts.map +1 -0
- package/dist/runtime/mirror/push-daemon.js +644 -0
- package/dist/runtime/mirror/push-daemon.js.map +1 -0
- package/dist/runtime/mirror/sanitize.d.ts +477 -0
- package/dist/runtime/mirror/sanitize.d.ts.map +1 -0
- package/dist/runtime/mirror/sanitize.js +625 -0
- package/dist/runtime/mirror/sanitize.js.map +1 -0
- package/dist/runtime/mirror/serve.d.ts.map +1 -1
- package/dist/runtime/mirror/serve.js +104 -24
- package/dist/runtime/mirror/serve.js.map +1 -1
- package/dist/runtime/reporting/report-ai.d.ts.map +1 -1
- package/dist/runtime/reporting/report-ai.js +1 -0
- package/dist/runtime/reporting/report-ai.js.map +1 -1
- package/dist/runtime/reporting/stdin.d.ts +2 -0
- package/dist/runtime/reporting/stdin.d.ts.map +1 -0
- package/dist/runtime/reporting/stdin.js +8 -0
- package/dist/runtime/reporting/stdin.js.map +1 -0
- package/dist/status-surface.d.ts +167 -0
- package/dist/status-surface.d.ts.map +1 -0
- package/dist/status-surface.js +670 -0
- package/dist/status-surface.js.map +1 -0
- package/dist/types.d.ts +17 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -1
- package/dist/vendor/harness/skills/manifest.d.ts.map +1 -1
- package/dist/vendor/harness/skills/manifest.js +2 -0
- package/dist/vendor/harness/skills/manifest.js.map +1 -1
- package/focus-app/client/_app/immutable/assets/{0.BdzHFb9q.css → 0.CgEVz9YW.css} +1 -1
- package/focus-app/client/_app/immutable/assets/0.CgEVz9YW.css.br +0 -0
- package/focus-app/client/_app/immutable/assets/0.CgEVz9YW.css.gz +0 -0
- package/focus-app/client/_app/immutable/assets/2.DaTmt6o7.css +1 -0
- package/focus-app/client/_app/immutable/assets/2.DaTmt6o7.css.br +0 -0
- package/focus-app/client/_app/immutable/assets/2.DaTmt6o7.css.gz +0 -0
- package/focus-app/client/_app/immutable/assets/3.vWQUAHjz.css +1 -0
- package/focus-app/client/_app/immutable/assets/3.vWQUAHjz.css.br +0 -0
- package/focus-app/client/_app/immutable/assets/3.vWQUAHjz.css.gz +0 -0
- package/focus-app/client/_app/immutable/assets/AppShell.CDPwj3zU.css +1 -0
- package/focus-app/client/_app/immutable/assets/AppShell.CDPwj3zU.css.br +0 -0
- package/focus-app/client/_app/immutable/assets/AppShell.CDPwj3zU.css.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/{Cj6wo28J.js → 1NK_OeRJ.js} +1 -1
- package/focus-app/client/_app/immutable/chunks/1NK_OeRJ.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/1NK_OeRJ.js.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/{Bs3f1UbD.js → B1veta3r.js} +2 -2
- package/focus-app/client/_app/immutable/chunks/B1veta3r.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/B1veta3r.js.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/{DEmooz0s.js → BZ4lcC0v.js} +1 -1
- package/focus-app/client/_app/immutable/chunks/BZ4lcC0v.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/BZ4lcC0v.js.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/Bu7F9NOv.js +2 -0
- package/focus-app/client/_app/immutable/chunks/Bu7F9NOv.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/Bu7F9NOv.js.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/C6KhNEX3.js +1 -0
- package/focus-app/client/_app/immutable/chunks/C6KhNEX3.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/C6KhNEX3.js.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/DIljKPJN.js +1 -0
- package/focus-app/client/_app/immutable/chunks/DIljKPJN.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/DIljKPJN.js.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/iXQate3J.js +2 -0
- package/focus-app/client/_app/immutable/chunks/iXQate3J.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/iXQate3J.js.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/{ZxFklh9T.js → kCE9wz0g.js} +1 -1
- package/focus-app/client/_app/immutable/chunks/kCE9wz0g.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/kCE9wz0g.js.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/x-hq5fDG.js +1 -0
- package/focus-app/client/_app/immutable/chunks/x-hq5fDG.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/x-hq5fDG.js.gz +0 -0
- package/focus-app/client/_app/immutable/entry/app.C1sDdCg5.js +2 -0
- package/focus-app/client/_app/immutable/entry/app.C1sDdCg5.js.br +0 -0
- package/focus-app/client/_app/immutable/entry/app.C1sDdCg5.js.gz +0 -0
- package/focus-app/client/_app/immutable/entry/start.X3j_A5RN.js +1 -0
- package/focus-app/client/_app/immutable/entry/start.X3j_A5RN.js.br +2 -0
- package/focus-app/client/_app/immutable/entry/start.X3j_A5RN.js.gz +0 -0
- package/focus-app/client/_app/immutable/nodes/0.gLl44WzG.js +5 -0
- package/focus-app/client/_app/immutable/nodes/0.gLl44WzG.js.br +0 -0
- package/focus-app/client/_app/immutable/nodes/0.gLl44WzG.js.gz +0 -0
- package/focus-app/client/_app/immutable/nodes/1.DUrghq2x.js +1 -0
- package/focus-app/client/_app/immutable/nodes/1.DUrghq2x.js.br +0 -0
- package/focus-app/client/_app/immutable/nodes/1.DUrghq2x.js.gz +0 -0
- package/focus-app/client/_app/immutable/nodes/2.Bp7JE7Pz.js +1 -0
- package/focus-app/client/_app/immutable/nodes/2.Bp7JE7Pz.js.br +0 -0
- package/focus-app/client/_app/immutable/nodes/2.Bp7JE7Pz.js.gz +0 -0
- package/focus-app/client/_app/immutable/nodes/3.Cml8enOG.js +12 -0
- package/focus-app/client/_app/immutable/nodes/3.Cml8enOG.js.br +0 -0
- package/focus-app/client/_app/immutable/nodes/3.Cml8enOG.js.gz +0 -0
- package/focus-app/client/_app/version.json +1 -1
- package/focus-app/client/_app/version.json.br +0 -0
- package/focus-app/client/_app/version.json.gz +0 -0
- package/focus-app/h2a-focus.json +108 -80
- package/focus-app/handler.js +7 -7
- package/focus-app/index.js +7 -7
- package/focus-app/server/chunks/chunks/AppShell.js-6Pi87dO0.js +1353 -0
- package/focus-app/server/chunks/chunks/AppShell.js-6Pi87dO0.js.map +1 -0
- package/focus-app/server/chunks/chunks/agent-memory-dossier.js-nmFG_rgx.js +1036 -0
- package/focus-app/server/chunks/chunks/agent-memory-dossier.js-nmFG_rgx.js.map +1 -0
- package/focus-app/server/chunks/chunks/{exports.js-DUTkELZq.js → exports.js-CdqPbjm1.js} +3 -3
- package/focus-app/server/chunks/chunks/{exports.js-DUTkELZq.js.map → exports.js-CdqPbjm1.js.map} +1 -1
- package/focus-app/server/chunks/chunks/h2a-bus.js-bLEJ_Adi.js +233 -0
- package/focus-app/server/chunks/chunks/h2a-bus.js-bLEJ_Adi.js.map +1 -0
- package/focus-app/server/chunks/chunks/{index.js-Di21TltP.js → index.js-laGHLarB.js} +5 -2
- package/focus-app/server/chunks/chunks/index.js-laGHLarB.js.map +1 -0
- package/focus-app/server/chunks/chunks/{internal.js-33vbd70h.js → internal.js-C6T8nHkl.js} +4 -4
- package/focus-app/server/chunks/chunks/{internal.js-33vbd70h.js.map → internal.js-C6T8nHkl.js.map} +1 -1
- package/focus-app/server/chunks/chunks/{root.js-DO1m-gJA.js → root.js-CtVQOgDw.js} +2 -2
- package/focus-app/server/chunks/chunks/{root.js-DO1m-gJA.js.map → root.js-CtVQOgDw.js.map} +1 -1
- package/focus-app/server/chunks/entries/endpoints/api/decisions/inject/{_server.ts.js-j0NNcOSZ.js → _server.ts.js-hrbMnsV0.js} +13 -42
- package/focus-app/server/chunks/entries/endpoints/api/decisions/inject/_server.ts.js-hrbMnsV0.js.map +1 -0
- package/focus-app/server/chunks/entries/endpoints/api/dossiers/agent-memory/include/_server.ts.js-Dw4odGdV.js +138 -0
- package/focus-app/server/chunks/entries/endpoints/api/dossiers/agent-memory/include/_server.ts.js-Dw4odGdV.js.map +1 -0
- package/focus-app/server/chunks/entries/endpoints/api/h2a/targets/_server.ts.js-BLjYv7vg.js +41 -0
- package/focus-app/server/chunks/entries/endpoints/api/h2a/targets/_server.ts.js-BLjYv7vg.js.map +1 -0
- package/focus-app/server/chunks/entries/fallbacks/{error.svelte.js-Dj3sETSX.js → error.svelte.js-RbeaNF5a.js} +4 -4
- package/focus-app/server/chunks/entries/fallbacks/{error.svelte.js-Dj3sETSX.js.map → error.svelte.js-RbeaNF5a.js.map} +1 -1
- package/focus-app/server/chunks/entries/pages/{_layout.svelte.js-BoLsbuC2.js → _layout.svelte.js-e1E_I04z.js} +2 -2
- package/focus-app/server/chunks/entries/pages/{_layout.svelte.js-BoLsbuC2.js.map → _layout.svelte.js-e1E_I04z.js.map} +1 -1
- package/focus-app/server/chunks/entries/pages/{_page.svelte.js-QDldMYhk.js → _page.svelte.js-DbaEG23x.js} +31 -1373
- package/focus-app/server/chunks/entries/pages/_page.svelte.js-DbaEG23x.js.map +1 -0
- package/focus-app/server/chunks/entries/pages/dossier/agent-memory/_page.server.ts.js-CFC-wn6U.js +88 -0
- package/focus-app/server/chunks/entries/pages/dossier/agent-memory/_page.server.ts.js-CFC-wn6U.js.map +1 -0
- package/focus-app/server/chunks/entries/pages/dossier/agent-memory/_page.svelte.js-BpR26NMa.js +1574 -0
- package/focus-app/server/chunks/entries/pages/dossier/agent-memory/_page.svelte.js-BpR26NMa.js.map +1 -0
- package/focus-app/server/chunks/{handler-Cp_5hLyY.js → handler-Be3dyNi0.js} +3 -3
- package/focus-app/server/chunks/{handler-Cp_5hLyY.js.map → handler-Be3dyNi0.js.map} +1 -1
- package/focus-app/server/chunks/{index.js-CBh7Wjqp.js → index.js-siUxMMnK.js} +3 -3
- package/focus-app/server/chunks/{index.js-CBh7Wjqp.js.map → index.js-siUxMMnK.js.map} +1 -1
- package/focus-app/server/chunks/manifest.js-CXJqSHHn.js +78 -0
- package/focus-app/server/chunks/manifest.js-CXJqSHHn.js.map +1 -0
- package/focus-app/server/chunks/nodes/0.js-leU6sfRR.js +9 -0
- package/focus-app/server/chunks/nodes/{0.js-4wlmdsk8.js.map → 0.js-leU6sfRR.js.map} +1 -1
- package/focus-app/server/chunks/nodes/1.js-os6QXm6B.js +9 -0
- package/focus-app/server/chunks/nodes/{1.js-B-LpY-lC.js.map → 1.js-os6QXm6B.js.map} +1 -1
- package/focus-app/server/chunks/nodes/2.js-DAaLjh93.js +19 -0
- package/focus-app/server/chunks/nodes/2.js-DAaLjh93.js.map +1 -0
- package/focus-app/server/chunks/nodes/3.js-Cmgi6Uy0.js +18 -0
- package/focus-app/server/chunks/nodes/3.js-Cmgi6Uy0.js.map +1 -0
- package/package.json +5 -5
- package/skills/h2a-run/SKILL.md +100 -0
- package/skills/harness/SKILL.md +3 -1
- package/skills/harness/review/SKILL.md +99 -8
- package/skills/harness/security/SKILL.md +55 -0
- package/skills/harness/track-report/SKILL.md +103 -0
- package/skills/harness/using-harness/SKILL.md +3 -1
- package/focus-app/client/_app/immutable/assets/0.BdzHFb9q.css.br +0 -2
- package/focus-app/client/_app/immutable/assets/0.BdzHFb9q.css.gz +0 -0
- package/focus-app/client/_app/immutable/assets/2.Ddxq02y4.css +0 -1
- package/focus-app/client/_app/immutable/assets/2.Ddxq02y4.css.br +0 -0
- package/focus-app/client/_app/immutable/assets/2.Ddxq02y4.css.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/Bs3f1UbD.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/Bs3f1UbD.js.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/Bv8OL8ib.js +0 -1
- package/focus-app/client/_app/immutable/chunks/Bv8OL8ib.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/Bv8OL8ib.js.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/CVq_IFFr.js +0 -2
- package/focus-app/client/_app/immutable/chunks/CVq_IFFr.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/CVq_IFFr.js.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/Cj6wo28J.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/Cj6wo28J.js.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/DEmooz0s.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/DEmooz0s.js.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/DQIRXgdC.js +0 -2
- package/focus-app/client/_app/immutable/chunks/DQIRXgdC.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/DQIRXgdC.js.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/ZxFklh9T.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/ZxFklh9T.js.gz +0 -0
- package/focus-app/client/_app/immutable/chunks/_wRuVGPs.js +0 -1
- package/focus-app/client/_app/immutable/chunks/_wRuVGPs.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/_wRuVGPs.js.gz +0 -0
- package/focus-app/client/_app/immutable/entry/app.6DKouWRt.js +0 -2
- package/focus-app/client/_app/immutable/entry/app.6DKouWRt.js.br +0 -0
- package/focus-app/client/_app/immutable/entry/app.6DKouWRt.js.gz +0 -0
- package/focus-app/client/_app/immutable/entry/start.DlLmkUb7.js +0 -1
- package/focus-app/client/_app/immutable/entry/start.DlLmkUb7.js.br +0 -2
- package/focus-app/client/_app/immutable/entry/start.DlLmkUb7.js.gz +0 -0
- package/focus-app/client/_app/immutable/nodes/0.CuSOF0Of.js +0 -5
- package/focus-app/client/_app/immutable/nodes/0.CuSOF0Of.js.br +0 -0
- package/focus-app/client/_app/immutable/nodes/0.CuSOF0Of.js.gz +0 -0
- package/focus-app/client/_app/immutable/nodes/1.D39jdnqm.js +0 -1
- package/focus-app/client/_app/immutable/nodes/1.D39jdnqm.js.br +0 -0
- package/focus-app/client/_app/immutable/nodes/1.D39jdnqm.js.gz +0 -0
- package/focus-app/client/_app/immutable/nodes/2.CnU8ifRl.js +0 -1
- package/focus-app/client/_app/immutable/nodes/2.CnU8ifRl.js.br +0 -0
- package/focus-app/client/_app/immutable/nodes/2.CnU8ifRl.js.gz +0 -0
- package/focus-app/server/chunks/chunks/index.js-Di21TltP.js.map +0 -1
- package/focus-app/server/chunks/entries/endpoints/api/decisions/inject/_server.ts.js-j0NNcOSZ.js.map +0 -1
- package/focus-app/server/chunks/entries/pages/_page.svelte.js-QDldMYhk.js.map +0 -1
- package/focus-app/server/chunks/manifest.js-Cm6cC7mC.js +0 -56
- package/focus-app/server/chunks/manifest.js-Cm6cC7mC.js.map +0 -1
- package/focus-app/server/chunks/nodes/0.js-4wlmdsk8.js +0 -9
- package/focus-app/server/chunks/nodes/1.js-B-LpY-lC.js +0 -9
- package/focus-app/server/chunks/nodes/2.js-F6jp5eD9.js +0 -19
- package/focus-app/server/chunks/nodes/2.js-F6jp5eD9.js.map +0 -1
|
@@ -0,0 +1,625 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EVO-13 / feed-contract P1 — the mirror's **SEND BOUNDARY**.
|
|
3
|
+
*
|
|
4
|
+
* The feed (`runtime/feed/descriptors.ts`) sanitizes what a browser READS. That
|
|
5
|
+
* protects nothing that has already come to rest on someone else's disk: the
|
|
6
|
+
* mirror push (`build.ts` → `remote/client.ts`) used to ship `listPresence(...)`
|
|
7
|
+
* records and registry rows **verbatim**, so `launchContext.cwd`, the full
|
|
8
|
+
* command line, the tmux session/pane, the pid, `workspace.path` and the
|
|
9
|
+
* `file://<root>` endpoint uri all landed in the hosted store — the exact fields
|
|
10
|
+
* the feed contract exists to keep out of a browser.
|
|
11
|
+
*
|
|
12
|
+
* The rule this module implements:
|
|
13
|
+
*
|
|
14
|
+
* **Sanitize at the boundary you are responsible for; never assume an upstream
|
|
15
|
+
* or downstream sanitizer.** A read-side sanitizer does not protect data at
|
|
16
|
+
* rest. The send boundary is ours, so it sanitizes.
|
|
17
|
+
*
|
|
18
|
+
* ── AND THE SAME RULE APPLIED TO THIS FILE'S OWN COMMENTS ───────────────────
|
|
19
|
+
*
|
|
20
|
+
* **When a comment here cites another module's validator, CALL IT and check
|
|
21
|
+
* what it actually rejects. Do not read its name, its type signature, or its
|
|
22
|
+
* docstring and infer.**
|
|
23
|
+
*
|
|
24
|
+
* This is written down because the file broke its own rule three times, and each
|
|
25
|
+
* time it took a measurement to notice — a comment assuming a sibling guard is
|
|
26
|
+
* the same mistake as code assuming one:
|
|
27
|
+
*
|
|
28
|
+
* - `isH2AActorRegistration` "requires `endpoints` to be an array" — it does,
|
|
29
|
+
* but it is **never called on any production path**, so it required nothing.
|
|
30
|
+
* - `isH2AEnvelope` "requires a vocabulary role" — it checks `actor.instance`
|
|
31
|
+
* and nothing else (see {@link sanitizeActorForMirror}).
|
|
32
|
+
* - `isActorRef` (`envelope.ts:27`) does check the role vocabulary, and is
|
|
33
|
+
* referenced **nowhere**. Reading it as live would have been the third.
|
|
34
|
+
*
|
|
35
|
+
* A false claim about a sibling guard is worse than no claim: it supplies a
|
|
36
|
+
* reason to delete a protection that works. Every guard citation below has been
|
|
37
|
+
* exercised, and what each one ACTUALLY enforces is recorded at its use site:
|
|
38
|
+
*
|
|
39
|
+
* | Cited guard | What it really enforces |
|
|
40
|
+
* |--------------------------|----------------------------------------------|
|
|
41
|
+
* | `isH2AWorkspaceRef` | `id`/`host`/`label` required; `path` rejected |
|
|
42
|
+
* | | when present-but-empty; EXTRA KEYS TOLERATED |
|
|
43
|
+
* | `isH2ASession` | rejects missing `interests`/`subscribedTopics`|
|
|
44
|
+
* | | and a non-vocabulary topic; tolerates extra |
|
|
45
|
+
* | | top-level keys |
|
|
46
|
+
* | `isInterests` | `scopes`+`negotiations` string arrays only; |
|
|
47
|
+
* | | EXTRA NESTED KEYS TOLERATED (the P1 leak) |
|
|
48
|
+
* | `isH2AActorRegistration` | would reject `endpoints: "nope"` — but has NO |
|
|
49
|
+
* | | production caller, so it guards nothing |
|
|
50
|
+
* | `isH2AEnvelope` | `actor.instance` is a string. NOT `role`. |
|
|
51
|
+
* | `canAttestComprehension` | `(role, rights = [])`; both call sites pass |
|
|
52
|
+
* | | `registration.capabilities` — claim holds |
|
|
53
|
+
* | `deriveLiveness` | reads `mirroredAt` to gate staleness |
|
|
54
|
+
* | | (`descriptors.ts:410`) — claim holds |
|
|
55
|
+
*
|
|
56
|
+
* Note the shape of the three tolerances: every one of these guards is a
|
|
57
|
+
* SPOT-CHECK that accepts unknown keys. None of them is an allowlist. That is
|
|
58
|
+
* precisely why this module cannot delegate to any of them.
|
|
59
|
+
*
|
|
60
|
+
* ── Why an ALLOWLIST, and why it is a *type*, not a filter ──────────────────
|
|
61
|
+
*
|
|
62
|
+
* A denylist that strips `cwd`/`command`/`tmux`/`pid` starts leaking silently
|
|
63
|
+
* the day someone adds a field to `H2ASession`. So every COMPOSITE type that
|
|
64
|
+
* travels — each payload member **and every composite nested inside one** — gets
|
|
65
|
+
* a FIELD PLAN: an object that classifies **every** field of the source type as
|
|
66
|
+
* `send`, `withhold` or `narrow`. Three properties follow, in increasing order
|
|
67
|
+
* of strength:
|
|
68
|
+
*
|
|
69
|
+
* 1. *Nothing unclassified can travel.* The builders iterate the PLAN's keys and
|
|
70
|
+
* read only those off the record. A field absent from the plan is never even
|
|
71
|
+
* read, so it cannot reach the wire whatever wrote it (including an `as any`
|
|
72
|
+
* cast or a JS caller). This holds at EVERY level, not merely at the top of
|
|
73
|
+
* each payload member: every composite listed in the table below is rebuilt
|
|
74
|
+
* field-by-field from its own plan, never copied by reference. It does NOT
|
|
75
|
+
* hold for the element VALUES inside arrays of primitives — those are free
|
|
76
|
+
* text, no field allowlist can constrain them, and they are handled as a
|
|
77
|
+
* disclosed gap (see the table's second half).
|
|
78
|
+
* 2. *Nothing unclassified can be added quietly.* Each plan is checked with
|
|
79
|
+
* `satisfies { [K in keyof Required<Source>]: ... }`, so adding a field to
|
|
80
|
+
* ANY type in the table **fails the build** until it is explicitly
|
|
81
|
+
* classified. The ratchet is the compiler, not a reviewer's attention — and
|
|
82
|
+
* because the nested types carry plans of their own, the ratchet reaches
|
|
83
|
+
* downward instead of stopping at the payload member. (Before the nested
|
|
84
|
+
* plans it did stop there: a field added to `H2ASessionInterests` or to the
|
|
85
|
+
* endpoints element type compiled clean and travelled.)
|
|
86
|
+
* 3. *The wire type cannot drift from the plan.* `H2AMirrored*` is written out
|
|
87
|
+
* explicitly (it IS the wire contract, so it should be readable), and a
|
|
88
|
+
* compile-time equality assertion pins its key set to the plan's `send` +
|
|
89
|
+
* `narrow` keys. Change one without the other and the build fails.
|
|
90
|
+
*
|
|
91
|
+
* This is the same reasoning that makes `sanitizeDeclaredCapabilities` correct:
|
|
92
|
+
* it ITERATES the closed vocabulary (`H2A_DECLARED_CAPABILITIES.filter(...)`)
|
|
93
|
+
* instead of removing known-bad values. Here the "vocabulary" is the field set.
|
|
94
|
+
*
|
|
95
|
+
* ── Every composite type that travels, and its plan ────────────────────────
|
|
96
|
+
*
|
|
97
|
+
* Property 1 is worth exactly as much as this list is complete, so the list is
|
|
98
|
+
* exhaustive by construction: `buildInstanceMirror` puts three member arrays in
|
|
99
|
+
* the body and nothing else, and every entry here is reachable from one of them.
|
|
100
|
+
*
|
|
101
|
+
* H2ASession → PRESENCE_PLAN
|
|
102
|
+
* ├─ H2ASessionInterests → INTERESTS_PLAN
|
|
103
|
+
* ├─ H2AAgentVersion → VERSION_PLAN
|
|
104
|
+
* └─ H2AWorkspaceRef → WORKSPACE_PLAN
|
|
105
|
+
* H2AActorRegistration → REGISTRATION_PLAN
|
|
106
|
+
* ├─ endpoints[] element {kind,uri} → ENDPOINT_PLAN
|
|
107
|
+
* └─ H2AWorkspaceRef → WORKSPACE_PLAN
|
|
108
|
+
* H2ASubagentBinding → SUBAGENT_PLAN
|
|
109
|
+
*
|
|
110
|
+
* Every composite above has a plan. **NOT covered, and cannot be**: arrays of
|
|
111
|
+
* primitives and free-text scalars, because a field allowlist classifies FIELDS
|
|
112
|
+
* and these have none — their risk is in the VALUE. Transmitted: the element
|
|
113
|
+
* values of `interests.scopes[]`, `interests.negotiations[]`, `scopes[]`,
|
|
114
|
+
* `capabilities[]`, `declaredCapabilities[]`, `acceptedPolicies[]`,
|
|
115
|
+
* `publicKeys[]`, `roles[]`, `subscribedTopics[]`, and the scalars `name`,
|
|
116
|
+
* `principal`, `conductor`, `agentUuid`, `workspace.label`, `workspace.host`,
|
|
117
|
+
* `workspace.id`, `version.cli`, `version.skill`. `roles[]` and
|
|
118
|
+
* `subscribedTopics[]` are closed vocabularies in the TYPE but are not
|
|
119
|
+
* re-intersected against that vocabulary here. The others are agent-settable:
|
|
120
|
+
* `h2a_session_open` copies `interests.scopes` verbatim from its caller
|
|
121
|
+
* (`runtime/mcp/sessions.ts`), and `h2a_register_instance` accepts an arbitrary
|
|
122
|
+
* object, so a scope of `"scope:/home/you/private"` or a conductor of
|
|
123
|
+
* `"file:///home/you/…"` comes to rest on the hosted disk with no privilege, no
|
|
124
|
+
* malformed record and no older CLI involved. That is a disclosed, bounded gap —
|
|
125
|
+
* joint plan § 9 item 1, feed contract "Send boundary" — not something these
|
|
126
|
+
* plans close, and the concern is DATA AT REST on someone else's disk, not only
|
|
127
|
+
* how a panel renders it.
|
|
128
|
+
*
|
|
129
|
+
* The ENVELOPE around the body is NOT all literals — an earlier version of this
|
|
130
|
+
* comment claimed it was, and that was false. `protocol` / `version` / `id` /
|
|
131
|
+
* `type` / `target` / `createdAt` are built from constants, the instance id and
|
|
132
|
+
* the injected clock. But `actor` is assembled from the REGISTRATION:
|
|
133
|
+
* `buildInstanceMirror` wrote `role: reg.roles?.[0]`, which is a source record's
|
|
134
|
+
* field reaching the wire outside every plan in this module — demonstrated with
|
|
135
|
+
* a `roles` array whose first element was a real filesystem path, which came to
|
|
136
|
+
* rest on the receiver. `scope` was a hardcoded `"scope:default"`, i.e. the one
|
|
137
|
+
* remaining literal in the one place with no plan and no ratchet: the day
|
|
138
|
+
* somebody made it `reg.scopes?.[0]` — the obvious edit — a record field would
|
|
139
|
+
* have ridden out with no compile-time and no test signal.
|
|
140
|
+
*
|
|
141
|
+
* So `actor` now has a boundary like everything else, and it is a stronger one
|
|
142
|
+
* than a plan: {@link sanitizeActorForMirror} derives it from the ALREADY
|
|
143
|
+
* SANITIZED `H2AMirroredRegistration`, never from the raw record. That makes the
|
|
144
|
+
* property structural rather than reviewed — the envelope cannot carry a field
|
|
145
|
+
* the registration plan does not already transmit, because the raw record is not
|
|
146
|
+
* in scope at the point the actor is built. `role` is additionally re-intersected
|
|
147
|
+
* against the `H2A_ROLES` vocabulary at runtime, so the path in the example above
|
|
148
|
+
* no longer reaches the wire at all, and the unvalidated `reg.roles?.[0]` — which
|
|
149
|
+
* on the string `"NOTANARRAY"` quietly yielded the single character `"N"` — is
|
|
150
|
+
* gone with it.
|
|
151
|
+
*
|
|
152
|
+
* ── What this module is NOT ────────────────────────────────────────────────
|
|
153
|
+
*
|
|
154
|
+
* Everything here is PURE and happens **before signing**, so the signature still
|
|
155
|
+
* covers exactly the bytes transmitted. Nothing about the signing primitive, the
|
|
156
|
+
* sequence fencing or the accept-side verification changes.
|
|
157
|
+
*
|
|
158
|
+
* It is also only the SEND half. The ingester (`serve.ts`) still writes whatever
|
|
159
|
+
* a *verified* sender hands it, so an older CLI that predates this module keeps
|
|
160
|
+
* pushing raw records. Applying these same functions on the ingest path is the
|
|
161
|
+
* symmetric half of the rule and is recorded as owed — see the feed contract's
|
|
162
|
+
* "Send boundary" section.
|
|
163
|
+
*/
|
|
164
|
+
import { H2A_ROLES } from "@sentropic/h2a";
|
|
165
|
+
/** Transmitted as-is. Only for fields that are provably not sender-private. */
|
|
166
|
+
const SEND = { kind: "send" };
|
|
167
|
+
/** Never transmitted, with the reason recorded in the closed vocabulary. */
|
|
168
|
+
function withhold(because) {
|
|
169
|
+
return { kind: "withhold", because };
|
|
170
|
+
}
|
|
171
|
+
/** Transmitted, but through its own nested allowlist. */
|
|
172
|
+
function narrow(fn) {
|
|
173
|
+
return { kind: "narrow", narrow: fn };
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Objects this module built field-by-field from a plan.
|
|
177
|
+
*
|
|
178
|
+
* The membership test is what makes "a composite is REBUILT, never passed
|
|
179
|
+
* through" checkable at runtime instead of merely intended. See
|
|
180
|
+
* {@link isPlanBuilt} and the `narrow` branch of {@link applyPlan}.
|
|
181
|
+
*/
|
|
182
|
+
const PLAN_BUILT = new WeakSet();
|
|
183
|
+
/**
|
|
184
|
+
* The RUNTIME twin of {@link MirrorSendableValue}.
|
|
185
|
+
*
|
|
186
|
+
* It exists because the compile-time constraint proves something about the
|
|
187
|
+
* PLAN, not about the VALUE. `applyPlan` receives records from
|
|
188
|
+
* `store.findInstance` / `listPresence`, and a registration is accepted and
|
|
189
|
+
* written with **no validation at all** (`registerInstance` validates nothing;
|
|
190
|
+
* `handleRegisterInstance` checks `typeof === "object"` and stops). So the
|
|
191
|
+
* declared type of a field is a hope about the data, not a fact about it: a
|
|
192
|
+
* `principal` declared `string` can hold `{cwd, command}` at runtime, and a
|
|
193
|
+
* `send` classification would copy that object wholesale.
|
|
194
|
+
*/
|
|
195
|
+
function isSendableAtRuntime(value) {
|
|
196
|
+
const isPrimitive = (v) => typeof v === "string" || typeof v === "number" || typeof v === "boolean";
|
|
197
|
+
if (isPrimitive(value))
|
|
198
|
+
return true;
|
|
199
|
+
return Array.isArray(value) && value.every(isPrimitive);
|
|
200
|
+
}
|
|
201
|
+
/** Whether a narrow's output was really rebuilt from a plan (arrays: elementwise). */
|
|
202
|
+
function isPlanBuilt(value) {
|
|
203
|
+
if (value === null || typeof value !== "object")
|
|
204
|
+
return true;
|
|
205
|
+
if (Array.isArray(value))
|
|
206
|
+
return value.every(isPlanBuilt);
|
|
207
|
+
return PLAN_BUILT.has(value);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Apply a plan: iterate the PLAN (never the record's own keys) and copy only
|
|
211
|
+
* what it permits.
|
|
212
|
+
*
|
|
213
|
+
* Iterating the plan is what makes this an allowlist rather than a filter — an
|
|
214
|
+
* unclassified field on `record` is not skipped, it is never looked at. Absent
|
|
215
|
+
* values are omitted rather than serialized as `undefined`, so the payload keeps
|
|
216
|
+
* the same "optional field absent" shape the store and the guards expect.
|
|
217
|
+
*
|
|
218
|
+
* ── THE TWO RUNTIME CHECKS, AND WHY A TYPE IS NOT ENOUGH ───────────────────
|
|
219
|
+
*
|
|
220
|
+
* Both exist because this function's input is UNVALIDATED. The compile-time
|
|
221
|
+
* ratchet governs the plan; nothing governs the record.
|
|
222
|
+
*
|
|
223
|
+
* - A `send` value that is not a primitive or an array of primitives is
|
|
224
|
+
* DROPPED. The declared type says what the field must be, so anything else is
|
|
225
|
+
* a lie, and a lie shaped like an object is how a `cwd` and a command line
|
|
226
|
+
* ride out through a field declared `string`. Dropped rather than thrown:
|
|
227
|
+
* throwing here would let any hostile registry row kill the push for every
|
|
228
|
+
* session on the machine, trading availability for a confidentiality win
|
|
229
|
+
* that dropping already secures. If the dropped field was required, the
|
|
230
|
+
* receiver's own guard rejects the record — fail-closed, and visible.
|
|
231
|
+
* - A `narrow` whose output was not itself built by this function is DROPPED.
|
|
232
|
+
* `NarrowPlan.narrow` is an arbitrary callback returning `unknown`, so
|
|
233
|
+
* `narrow((value) => value)` — an identity narrow — type-checks and copies a
|
|
234
|
+
* composite wholesale, which is precisely the leak the plans exist to stop.
|
|
235
|
+
* The compiler cannot reject it (identity returns a structurally compatible
|
|
236
|
+
* type), so the membership test in {@link PLAN_BUILT} does.
|
|
237
|
+
*
|
|
238
|
+
* `null` is passed THROUGH to a narrow rather than short-circuited, so the
|
|
239
|
+
* narrow's own hostile-input handling can run. That is what makes
|
|
240
|
+
* `endpoints: null` produce `[]` instead of an absent field.
|
|
241
|
+
*/
|
|
242
|
+
function applyPlan(record, plan) {
|
|
243
|
+
const out = {};
|
|
244
|
+
PLAN_BUILT.add(out);
|
|
245
|
+
// The record itself may be null/undefined or not an object at all — every
|
|
246
|
+
// narrow must be TOTAL, because nothing validated what is in the store.
|
|
247
|
+
const source = (record ?? {});
|
|
248
|
+
for (const field of Object.keys(plan)) {
|
|
249
|
+
const step = plan[field];
|
|
250
|
+
if (step === undefined || step.kind === "withhold")
|
|
251
|
+
continue;
|
|
252
|
+
const value = source[field];
|
|
253
|
+
if (value === undefined)
|
|
254
|
+
continue;
|
|
255
|
+
if (step.kind === "narrow") {
|
|
256
|
+
const narrowed = step.narrow(value);
|
|
257
|
+
if (narrowed === undefined || narrowed === null)
|
|
258
|
+
continue;
|
|
259
|
+
if (!isPlanBuilt(narrowed))
|
|
260
|
+
continue;
|
|
261
|
+
out[field] = narrowed;
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
if (value === null)
|
|
265
|
+
continue;
|
|
266
|
+
if (!isSendableAtRuntime(value))
|
|
267
|
+
continue;
|
|
268
|
+
out[field] = value;
|
|
269
|
+
}
|
|
270
|
+
return out;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* {@link applyPlan} and the plan constructors, exported for the send-boundary
|
|
274
|
+
* tests ONLY.
|
|
275
|
+
*
|
|
276
|
+
* Exporting internals to test them is usually a smell. It is justified here
|
|
277
|
+
* because the property under test is "a hostile PLAN cannot defeat the
|
|
278
|
+
* boundary", and a plan cannot be made hostile from outside without these. The
|
|
279
|
+
* alternative — trusting that no future plan uses an identity narrow — is the
|
|
280
|
+
* assumption this module exists to eliminate.
|
|
281
|
+
*/
|
|
282
|
+
export const MIRROR_TEST_HOOKS = {
|
|
283
|
+
applyPlan,
|
|
284
|
+
send: SEND,
|
|
285
|
+
narrow,
|
|
286
|
+
withhold
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* Fields present on `record` that the plan does not classify at all.
|
|
290
|
+
*
|
|
291
|
+
* **This is a TEST-TIME assertion helper, not a runtime half of the ratchet.**
|
|
292
|
+
* It is called from `test/mirror-send-boundary.test.js` and from nowhere on the
|
|
293
|
+
* send path, and the earlier claim that it "covers the paths the compiler cannot
|
|
294
|
+
* see" was wider than what is built — a guard that is never invoked cannot cover
|
|
295
|
+
* anything. It is kept, and kept exported, because it is what lets a test fail by
|
|
296
|
+
* NAMING the unclassified field instead of asserting an opaque key-set equality.
|
|
297
|
+
*
|
|
298
|
+
* It is deliberately not wired into the builders. Two reasons, and the second is
|
|
299
|
+
* the honest one: (a) throwing on an unclassified field would turn an additive,
|
|
300
|
+
* harmless field into a dead mirror pipeline — availability lost for no
|
|
301
|
+
* confidentiality gained, since `applyPlan` never reads the field anyway; and
|
|
302
|
+
* (b) the alternative, warning or counting, would make this module impure, and
|
|
303
|
+
* the purity claim above ("everything here is PURE and happens before signing")
|
|
304
|
+
* is load-bearing for the signature argument. The ratchet that actually holds is
|
|
305
|
+
* the compiler (`satisfies MirrorPlanFor<Source>` on every plan in the table) plus
|
|
306
|
+
* plan-iteration in {@link applyPlan}. There is no runtime ratchet; if one is
|
|
307
|
+
* wanted it belongs in the caller, where a side effect is allowed.
|
|
308
|
+
*/
|
|
309
|
+
export function unclassifiedMirrorFields(record, plan) {
|
|
310
|
+
return Object.keys(record).filter((field) => !(field in plan));
|
|
311
|
+
}
|
|
312
|
+
const WORKSPACE_PLAN = {
|
|
313
|
+
id: SEND,
|
|
314
|
+
host: SEND,
|
|
315
|
+
label: SEND,
|
|
316
|
+
path: withhold("filesystem-path"),
|
|
317
|
+
repo: withhold("not-consumed-downstream")
|
|
318
|
+
};
|
|
319
|
+
/** The plan, for tests. */
|
|
320
|
+
export const MIRROR_WORKSPACE_PLAN = WORKSPACE_PLAN;
|
|
321
|
+
const _workspaceKeysMatchPlan = true;
|
|
322
|
+
void _workspaceKeysMatchPlan;
|
|
323
|
+
export function sanitizeWorkspaceRefForMirror(workspace) {
|
|
324
|
+
return applyPlan(workspace, WORKSPACE_PLAN);
|
|
325
|
+
}
|
|
326
|
+
// ─── Version stamp ──────────────────────────────────────────────────────────
|
|
327
|
+
const VERSION_PLAN = {
|
|
328
|
+
cli: SEND,
|
|
329
|
+
skill: SEND
|
|
330
|
+
};
|
|
331
|
+
/** The plan, for tests. */
|
|
332
|
+
export const MIRROR_VERSION_PLAN = VERSION_PLAN;
|
|
333
|
+
function sanitizeVersionForMirror(version) {
|
|
334
|
+
return applyPlan(version, VERSION_PLAN);
|
|
335
|
+
}
|
|
336
|
+
const INTERESTS_PLAN = {
|
|
337
|
+
scopes: SEND,
|
|
338
|
+
negotiations: SEND
|
|
339
|
+
};
|
|
340
|
+
/** The plan, for tests. */
|
|
341
|
+
export const MIRROR_INTERESTS_PLAN = INTERESTS_PLAN;
|
|
342
|
+
const _interestsKeysMatchPlan = true;
|
|
343
|
+
void _interestsKeysMatchPlan;
|
|
344
|
+
function sanitizeInterestsForMirror(interests) {
|
|
345
|
+
return applyPlan(interests, INTERESTS_PLAN);
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Every field of `H2ASession`, classified.
|
|
349
|
+
*
|
|
350
|
+
* The `send` set is exactly what a consumer of the mirror demonstrably needs:
|
|
351
|
+
* - `sessionId` / `instance` — the row's own identity (`accept.ts` authorizes a
|
|
352
|
+
* session by `instance`; the feed keys rows on both);
|
|
353
|
+
* - `startedAt` / `heartbeatAt` / `state` / `lastMcpActivityAt` — the liveness
|
|
354
|
+
* derivation (`deriveSessionState`, `deriveLiveness`, `isSessionExpired`);
|
|
355
|
+
* - `interests` / `subscribedTopics` — required by `isH2ASession`, so the
|
|
356
|
+
* hosted `writePresence` rejects the record without them;
|
|
357
|
+
* - `host` / `name` / `workspace` — the feed's `host`, `topicOrTitle`,
|
|
358
|
+
* `displayName` and `workspaceLabel`;
|
|
359
|
+
* - `workStatus` / `version` — closed vocabularies, shown by `h2a_discover_*`.
|
|
360
|
+
*/
|
|
361
|
+
const PRESENCE_PLAN = {
|
|
362
|
+
sessionId: SEND,
|
|
363
|
+
instance: SEND,
|
|
364
|
+
host: SEND,
|
|
365
|
+
name: SEND,
|
|
366
|
+
startedAt: SEND,
|
|
367
|
+
heartbeatAt: SEND,
|
|
368
|
+
state: SEND,
|
|
369
|
+
// Narrowed, not SEND: `isInterests` tolerates extra keys, so a `SEND` here
|
|
370
|
+
// shipped the caller's whole object by reference. See INTERESTS_PLAN.
|
|
371
|
+
interests: narrow(sanitizeInterestsForMirror),
|
|
372
|
+
// Element values are NOT re-intersected against the closed topic vocabulary.
|
|
373
|
+
// Recorded, not fixed: `writePresence`/`isH2ASession` reject a non-vocabulary
|
|
374
|
+
// topic at the sender, so the real pipeline cannot reach this; calling
|
|
375
|
+
// `sanitizePresenceForMirror` directly with a hostile element can. Pure
|
|
376
|
+
// defence-in-depth, tracked with the free-text gap.
|
|
377
|
+
subscribedTopics: SEND,
|
|
378
|
+
workStatus: SEND,
|
|
379
|
+
lastMcpActivityAt: SEND,
|
|
380
|
+
version: narrow(sanitizeVersionForMirror),
|
|
381
|
+
workspace: narrow(sanitizeWorkspaceRefForMirror),
|
|
382
|
+
// The working directory, the command line and the terminal coordinates: the
|
|
383
|
+
// whole point of the exercise. Captured at launch for LOCAL relance (DEC-084)
|
|
384
|
+
// — a relauncher on another host could not use them even if it wanted to.
|
|
385
|
+
launchContext: withhold("command-line"),
|
|
386
|
+
pid: withhold("process-identity"),
|
|
387
|
+
// Not privacy — PROVENANCE. `mirroredAt` is the receiving side's own record of
|
|
388
|
+
// when it ingested a row, and `deriveLiveness` reads it to decide `stale`. A
|
|
389
|
+
// sender-supplied value would be a forged freshness claim feeding a liveness
|
|
390
|
+
// decision, so the sender does not get to make it. `serve.ts` stamps it.
|
|
391
|
+
mirroredAt: withhold("receiver-stamped")
|
|
392
|
+
};
|
|
393
|
+
/** The plan, for tests and for callers that want to state the contract. */
|
|
394
|
+
export const MIRROR_PRESENCE_PLAN = PRESENCE_PLAN;
|
|
395
|
+
const _presenceKeysMatchPlan = true;
|
|
396
|
+
void _presenceKeysMatchPlan;
|
|
397
|
+
/** One presence record → the record as it may leave the machine. */
|
|
398
|
+
export function sanitizePresenceForMirror(session) {
|
|
399
|
+
return applyPlan(session, PRESENCE_PLAN);
|
|
400
|
+
}
|
|
401
|
+
// ─── Registration ───────────────────────────────────────────────────────────
|
|
402
|
+
/**
|
|
403
|
+
* Endpoint uri schemes that may leave the machine: a NETWORK locator is
|
|
404
|
+
* meaningful to a receiver, a `file://` uri is a path on the sender's disk.
|
|
405
|
+
*
|
|
406
|
+
* Allowlisted by scheme rather than by `kind` deliberately. `kind` is a
|
|
407
|
+
* self-declared label — a `file://` uri labelled `kind: "remote"` would sail
|
|
408
|
+
* through a kind-based check, while the scheme is the thing that actually
|
|
409
|
+
* determines whether the value is a path. The only writer in the tree today
|
|
410
|
+
* emits `{ kind: "local-files", uri: "file://<root>" }` (`identity/live.ts`),
|
|
411
|
+
* i.e. the agent's h2a root — under `$HOME` on every developer machine.
|
|
412
|
+
*
|
|
413
|
+
* ── What this filter does NOT do ───────────────────────────────────────────
|
|
414
|
+
*
|
|
415
|
+
* It answers "is this a NETWORK LOCATOR", not "does this value contain a path or
|
|
416
|
+
* a secret". A bounded, disclosed gap with a known shape: all of
|
|
417
|
+
* `http://localhost/home/you/…`, `https://h/?cwd=/home/you/…`,
|
|
418
|
+
* `https://h/#/home/you/…` and `https://user:sk-live-…@h/` (credentials in the
|
|
419
|
+
* URI's userinfo) are network locators and therefore travel. Mirror endpoint
|
|
420
|
+
* URLs are exactly the kind of value that carries a token, so this is worth
|
|
421
|
+
* naming rather than leaving implied. Content-checking a URI is a different
|
|
422
|
+
* mitigation in kind (userinfo stripping, query/fragment policy) and is tracked
|
|
423
|
+
* with the free-text gap, not silently folded in here.
|
|
424
|
+
*/
|
|
425
|
+
const MIRRORABLE_ENDPOINT_SCHEMES = ["http:", "https:", "ws:", "wss:"];
|
|
426
|
+
const ENDPOINT_PLAN = {
|
|
427
|
+
kind: SEND,
|
|
428
|
+
uri: SEND
|
|
429
|
+
};
|
|
430
|
+
/** The plan, for tests. */
|
|
431
|
+
export const MIRROR_ENDPOINT_PLAN = ENDPOINT_PLAN;
|
|
432
|
+
const _endpointKeysMatchPlan = true;
|
|
433
|
+
void _endpointKeysMatchPlan;
|
|
434
|
+
/**
|
|
435
|
+
* Endpoints reachable by a receiver — from an explicit filter, so an empty list
|
|
436
|
+
* is the established fact "no endpoint of this registration is addressable from
|
|
437
|
+
* off this machine", never a defaulted `[]`. Each survivor is then rebuilt from
|
|
438
|
+
* {@link ENDPOINT_PLAN} rather than passed through.
|
|
439
|
+
*
|
|
440
|
+
* `Array.isArray` FIRST, and not as a formality. `isH2AActorRegistration`
|
|
441
|
+
* (`types.ts`) would require this field to be an array, but it **is never called
|
|
442
|
+
* on any production path** — its only non-test references in the tree are its
|
|
443
|
+
* definition, the barrel re-export and this comment. Neither
|
|
444
|
+
* `store.registerInstance` nor `handleRegisterInstance` invokes it; the latter
|
|
445
|
+
* validates its input as `typeof === "object"` and nothing more, so
|
|
446
|
+
* `registerInstance({… endpoints: "nope"})` is accepted and written to
|
|
447
|
+
* `instances.jsonl`. Without the guard, `endpoints.filter` throws a `TypeError`
|
|
448
|
+
* that propagates out of `buildInstanceMirror` and kills the push — a fault this
|
|
449
|
+
* module would have INTRODUCED, since the pre-fix builder shipped `reg` verbatim
|
|
450
|
+
* and never touched `endpoints`. Confidentiality-neutral, availability-negative:
|
|
451
|
+
* exactly the failure a guard justified by a premise that does not exist creates.
|
|
452
|
+
*
|
|
453
|
+
* ── `endpoints: null` — RECORDED IN ROUND 3, CLOSED IN ROUND 5 ────────────
|
|
454
|
+
*
|
|
455
|
+
* The earlier note said this was recorded and left to the ingest half. That was
|
|
456
|
+
* wrong on ownership, and the second review leg was right to push back: the SEND
|
|
457
|
+
* side was emitting a row that violated its OWN declared wire type, so the fix
|
|
458
|
+
* belongs here regardless of what the receiver does.
|
|
459
|
+
*
|
|
460
|
+
* The mechanism: {@link applyPlan} used to skip null BEFORE invoking the narrow,
|
|
461
|
+
* so `Array.isArray` inside {@link sanitizeEndpointsForMirror} — the guard
|
|
462
|
+
* written precisely for this — could never fire for `null`. The field came out
|
|
463
|
+
* ABSENT rather than `[]`, and `runtime/drumbeat/relaunchers.ts:296` reads
|
|
464
|
+
* `store?.findInstance(instance)?.endpoints.find(…)`, whose optional chain stops
|
|
465
|
+
* BEFORE `.endpoints`. A guard that could not fire, which is the same shape this
|
|
466
|
+
* module keeps finding elsewhere.
|
|
467
|
+
*
|
|
468
|
+
* Now closed on both sides: `null` flows through to the narrow (which returns
|
|
469
|
+
* `[]`), and {@link sanitizeRegistrationForMirror} makes the array
|
|
470
|
+
* unconditional, covering the `undefined` case too. Both are pinned by tests.
|
|
471
|
+
*/
|
|
472
|
+
function sanitizeEndpointsForMirror(endpoints) {
|
|
473
|
+
if (!Array.isArray(endpoints))
|
|
474
|
+
return [];
|
|
475
|
+
return endpoints
|
|
476
|
+
.filter((endpoint) => {
|
|
477
|
+
let scheme;
|
|
478
|
+
try {
|
|
479
|
+
scheme = new URL(endpoint.uri).protocol;
|
|
480
|
+
}
|
|
481
|
+
catch {
|
|
482
|
+
return false; // unparseable, or not an object at all → cannot vouch for it
|
|
483
|
+
}
|
|
484
|
+
return MIRRORABLE_ENDPOINT_SCHEMES.includes(scheme);
|
|
485
|
+
})
|
|
486
|
+
.map((endpoint) => applyPlan(endpoint, ENDPOINT_PLAN));
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Every field of `H2AActorRegistration`, classified.
|
|
490
|
+
*
|
|
491
|
+
* `capabilities` is transmitted DELIBERATELY, though it is authority-bearing and
|
|
492
|
+
* the feed never displays it. Two gates on the RECEIVING side read it off the
|
|
493
|
+
* registry row: the subagent capability ceiling (`subagents.ts`
|
|
494
|
+
* `capabilities-exceed-parent` compares a binding against `parent.capabilities`)
|
|
495
|
+
* and the attestation right (`canAttestComprehension(role,
|
|
496
|
+
* registration.capabilities)` in `mcp/handlers.ts`). Withholding it would not be
|
|
497
|
+
* "sanitizing" — it would silently change an authorization outcome on the
|
|
498
|
+
* receiver, which is a worse failure than the one being fixed. It carries no
|
|
499
|
+
* path, no command and no process identity.
|
|
500
|
+
*/
|
|
501
|
+
const REGISTRATION_PLAN = {
|
|
502
|
+
id: SEND,
|
|
503
|
+
instance: SEND,
|
|
504
|
+
roles: SEND,
|
|
505
|
+
scopes: SEND,
|
|
506
|
+
capabilities: SEND,
|
|
507
|
+
declaredCapabilities: SEND,
|
|
508
|
+
publicKeys: SEND,
|
|
509
|
+
acceptedPolicies: SEND,
|
|
510
|
+
createdAt: SEND,
|
|
511
|
+
principal: SEND,
|
|
512
|
+
conductor: SEND,
|
|
513
|
+
agentUuid: SEND,
|
|
514
|
+
name: SEND,
|
|
515
|
+
endpoints: narrow(sanitizeEndpointsForMirror),
|
|
516
|
+
workspace: narrow(sanitizeWorkspaceRefForMirror)
|
|
517
|
+
};
|
|
518
|
+
/** The plan, for tests. */
|
|
519
|
+
export const MIRROR_REGISTRATION_PLAN = REGISTRATION_PLAN;
|
|
520
|
+
const _registrationKeysMatchPlan = true;
|
|
521
|
+
void _registrationKeysMatchPlan;
|
|
522
|
+
export function sanitizeRegistrationForMirror(registration) {
|
|
523
|
+
const out = applyPlan(registration, REGISTRATION_PLAN);
|
|
524
|
+
// `endpoints` is REQUIRED by `H2AMirroredRegistration`, and the receiver
|
|
525
|
+
// dereferences it WITHOUT optional chaining (`relaunchers.ts:296`:
|
|
526
|
+
// `…?.endpoints.find(…)` — the chain stops before `.endpoints`). `applyPlan`
|
|
527
|
+
// omits a source field that is `undefined`, so without this the emitted row
|
|
528
|
+
// would violate its own declared wire type and hand the receiver a
|
|
529
|
+
// `TypeError`. `null` is already handled — it now flows through the narrow,
|
|
530
|
+
// which returns `[]` — so this closes the remaining `undefined` case and makes
|
|
531
|
+
// the array unconditional.
|
|
532
|
+
if (!Array.isArray(out.endpoints))
|
|
533
|
+
out.endpoints = [];
|
|
534
|
+
return out;
|
|
535
|
+
}
|
|
536
|
+
// ─── Envelope actor ─────────────────────────────────────────────────────────
|
|
537
|
+
/** Role used when the registration declares none usable. */
|
|
538
|
+
const MIRROR_FALLBACK_ROLE = "AGENTS";
|
|
539
|
+
/** Scope used when the registration declares none usable. */
|
|
540
|
+
const MIRROR_FALLBACK_SCOPE = "scope:default";
|
|
541
|
+
/**
|
|
542
|
+
* First usable element of a declared list, or the fallback.
|
|
543
|
+
*
|
|
544
|
+
* `Array.isArray` first, and not as a formality — the same reason it guards
|
|
545
|
+
* {@link sanitizeEndpointsForMirror}. `h2a_register_instance` accepts an
|
|
546
|
+
* arbitrary object and `isH2AActorRegistration` is not called on any production
|
|
547
|
+
* path, so `roles` can be a bare string at runtime despite its `H2ARole[]` type.
|
|
548
|
+
* The previous `reg.roles?.[0]` then indexed the STRING: `"NOTANARRAY"` yielded
|
|
549
|
+
* `"N"`, a value that is not a role, not a diagnostic, and travelled anyway.
|
|
550
|
+
*/
|
|
551
|
+
function firstDeclared(values, fallback) {
|
|
552
|
+
if (!Array.isArray(values))
|
|
553
|
+
return fallback;
|
|
554
|
+
const first = values[0];
|
|
555
|
+
return typeof first === "string" && first.length > 0 ? first : fallback;
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* The envelope's `actor`, derived from the SANITIZED registration.
|
|
559
|
+
*
|
|
560
|
+
* Taking `H2AMirroredRegistration` rather than `H2AActorRegistration` is the
|
|
561
|
+
* whole point and is worth not "simplifying" later: the raw record is not in
|
|
562
|
+
* scope here, so this function CANNOT read a withheld field even by mistake.
|
|
563
|
+
* Every value it can reach has already been through {@link REGISTRATION_PLAN},
|
|
564
|
+
* which makes "the envelope carries nothing the body does not already carry" a
|
|
565
|
+
* consequence of the signature instead of a claim in a comment.
|
|
566
|
+
*
|
|
567
|
+
* `role` is re-intersected against `H2A_ROLES`. That is a genuinely closed
|
|
568
|
+
* vocabulary check, not a shape check: `roles[]` element VALUES are otherwise
|
|
569
|
+
* free text (disclosed above), and this is the one place where an element value
|
|
570
|
+
* escapes the body into the envelope, so it is the one place worth closing.
|
|
571
|
+
*
|
|
572
|
+
* ── STRUCK, AND LEFT VISIBLE ON PURPOSE ────────────────────────────────────
|
|
573
|
+
*
|
|
574
|
+
* An earlier version of this comment continued: ~~"`isH2AEnvelope` requires a
|
|
575
|
+
* vocabulary role anyway, so a non-role here produced an envelope that fails the
|
|
576
|
+
* protocol's own guard."~~ **That is false.** `isH2AEnvelope` delegates to
|
|
577
|
+
* `validateH2AEnvelope` (`envelope.ts:109`), which checks `actor` only for
|
|
578
|
+
* `typeof actor.instance === "string"`. It never looks at `role`. Measured:
|
|
579
|
+
*
|
|
580
|
+
* isH2AEnvelope(actor.role = "/home/antoinefa/NOTAROLE") -> true
|
|
581
|
+
* isH2AEnvelope(actor with no role at all) -> true
|
|
582
|
+
* isH2AEnvelope(actor with no instance) -> false
|
|
583
|
+
*
|
|
584
|
+
* There IS a function that checks the vocabulary — `isActorRef`, `envelope.ts:27`
|
|
585
|
+
* — but it is module-private and referenced nowhere in the tree. A guard that
|
|
586
|
+
* cannot fire.
|
|
587
|
+
*
|
|
588
|
+
* The sentence is struck rather than deleted because of what it was doing: it
|
|
589
|
+
* supplied a REASON TO DELETE THE RE-INTERSECTION BELOW. "The protocol guard
|
|
590
|
+
* catches it anyway" is exactly the argument someone would use to remove that
|
|
591
|
+
* line, and removing it restores the leak. A false justification for a live
|
|
592
|
+
* guard is more dangerous than no justification at all — nothing downstream
|
|
593
|
+
* validates this field, so the check here is the only one there is.
|
|
594
|
+
*
|
|
595
|
+
* `scope` is NOT closed — there is no scope vocabulary to close it against — but
|
|
596
|
+
* it is now sourced from the sanitized registration rather than hardcoded, so
|
|
597
|
+
* the trap is disarmed by construction: the "obvious edit" has already been made
|
|
598
|
+
* here, safely, under test. Its value is free text and rides out under the same
|
|
599
|
+
* disclosed gap as `scopes[]` in the body, which already transmits it verbatim.
|
|
600
|
+
*/
|
|
601
|
+
export function sanitizeActorForMirror(instance, mirrored) {
|
|
602
|
+
const declaredRole = firstDeclared(mirrored.roles, MIRROR_FALLBACK_ROLE);
|
|
603
|
+
return {
|
|
604
|
+
instance,
|
|
605
|
+
role: H2A_ROLES.includes(declaredRole)
|
|
606
|
+
? declaredRole
|
|
607
|
+
: MIRROR_FALLBACK_ROLE,
|
|
608
|
+
scope: firstDeclared(mirrored.scopes, MIRROR_FALLBACK_SCOPE)
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
const SUBAGENT_PLAN = {
|
|
612
|
+
id: SEND,
|
|
613
|
+
parentInstance: SEND,
|
|
614
|
+
name: SEND,
|
|
615
|
+
capabilities: SEND,
|
|
616
|
+
createdAt: SEND
|
|
617
|
+
};
|
|
618
|
+
/** The plan, for tests. */
|
|
619
|
+
export const MIRROR_SUBAGENT_PLAN = SUBAGENT_PLAN;
|
|
620
|
+
const _subagentKeysMatchPlan = true;
|
|
621
|
+
void _subagentKeysMatchPlan;
|
|
622
|
+
export function sanitizeSubagentForMirror(binding) {
|
|
623
|
+
return applyPlan(binding, SUBAGENT_PLAN);
|
|
624
|
+
}
|
|
625
|
+
//# sourceMappingURL=sanitize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize.js","sourceRoot":"","sources":["../../../src/runtime/mirror/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkKG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAoG3C,+EAA+E;AAC/E,MAAM,IAAI,GAAa,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAExC,4EAA4E;AAC5E,SAAS,QAAQ,CAAC,OAA6B;IAC7C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;AACvC,CAAC;AAED,yDAAyD;AACzD,SAAS,MAAM,CAAI,EAAsC;IACvD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AACxC,CAAC;AAsBD;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,IAAI,OAAO,EAAU,CAAC;AAEzC;;;;;;;;;;;GAWG;AACH,SAAS,mBAAmB,CAAC,KAAc;IACzC,MAAM,WAAW,GAAG,CAAC,CAAU,EAAW,EAAE,CAC1C,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,SAAS,CAAC;IAC3E,IAAI,WAAW,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACpC,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AAC1D,CAAC;AAED,sFAAsF;AACtF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,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC1E,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,UAAU,sBAAsB,CACpC,QAAgB,EAChB,QAAiC;IAEjC,MAAM,YAAY,GAAG,aAAa,CAAC,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC;IACzE,OAAO;QACL,QAAQ;QACR,IAAI,EAAG,SAA+B,CAAC,QAAQ,CAAC,YAAY,CAAC;YAC3D,CAAC,CAAE,YAAwB;YAC3B,CAAC,CAAC,oBAAoB;QACxB,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;KAC7D,CAAC;AACJ,CAAC;AAmBD,MAAM,aAAa,GAAG;IACpB,EAAE,EAAE,IAAI;IACR,cAAc,EAAE,IAAI;IACpB,IAAI,EAAE,IAAI;IACV,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE,IAAI;CAC4B,CAAC;AAE9C,2BAA2B;AAC3B,MAAM,CAAC,MAAM,oBAAoB,GAC/B,aAAiE,CAAC;AAOpE,MAAM,sBAAsB,GAA0B,IAAI,CAAC;AAC3D,KAAK,sBAAsB,CAAC;AAE5B,MAAM,UAAU,yBAAyB,CACvC,OAA2B;IAE3B,OAAO,SAAS,CAAC,OAAO,EAAE,aAAa,CAA0C,CAAC;AACpF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../../src/runtime/mirror/serve.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../../src/runtime/mirror/serve.ts"],"names":[],"mappings":"AAgDA,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AAGtD,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAAgD,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACxG,OAAO,EAAwB,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AA+B5E,MAAM,WAAW,2BAA2B;IAC1C,kFAAkF;IAClF,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAED,8DAA8D;AAC9D,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAmBxE;AAED,8DAA8D;AAC9D,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,GAAE,2BAAgC,GAAG,MAAM,CA4GzG"}
|