@sentropic/h2a 0.85.24 → 0.86.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 +2 -3
- 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 +38 -0
- 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/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 +2 -2
- package/skills/h2a-run/SKILL.md +100 -0
- 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
|
@@ -1,35 +1,13 @@
|
|
|
1
|
-
import { execFileSync } from 'node:child_process';
|
|
2
|
-
import { existsSync } from 'node:fs';
|
|
3
|
-
import path from 'node:path';
|
|
4
1
|
import { j as json } from '../../../../../chunks/utils.js-C_3_iViC.js';
|
|
2
|
+
import { a as repoRoot, r as resolveTarget, p as putEnvelope } from '../../../../../chunks/h2a-bus.js-bLEJ_Adi.js';
|
|
5
3
|
import { l as loadReport, a as subjectOf, s as stepActionFr } from '../../../../../chunks/friendly.js-D4fjovnZ.js';
|
|
6
4
|
import '../../../../../chunks/utils2.js-BQzn9ikS.js';
|
|
5
|
+
import 'node:child_process';
|
|
6
|
+
import 'node:fs';
|
|
7
|
+
import 'node:os';
|
|
8
|
+
import 'node:path';
|
|
7
9
|
import 'node:url';
|
|
8
10
|
|
|
9
|
-
function repoRoot() {
|
|
10
|
-
return process.env.FOCUS_REPO_ROOT ?? path.resolve(process.cwd(), "..", "..");
|
|
11
|
-
}
|
|
12
|
-
function h2aBin(root) {
|
|
13
|
-
const installed = process.env.FOCUS_H2A_BIN?.trim();
|
|
14
|
-
if (installed) return installed;
|
|
15
|
-
return path.join(root, "packages", "h2a", "dist", "bin.js");
|
|
16
|
-
}
|
|
17
|
-
function liveSessionsForProject(root, project) {
|
|
18
|
-
const bin = h2aBin(root);
|
|
19
|
-
if (!existsSync(bin)) return [];
|
|
20
|
-
try {
|
|
21
|
-
const out = execFileSync("node", [bin, "sessions"], {
|
|
22
|
-
cwd: root,
|
|
23
|
-
encoding: "utf8",
|
|
24
|
-
maxBuffer: 64 * 1024 * 1024
|
|
25
|
-
});
|
|
26
|
-
const parsed = JSON.parse(out);
|
|
27
|
-
const arr = Array.isArray(parsed) ? parsed : parsed.sessions ?? [];
|
|
28
|
-
return arr.filter((x) => x.state === "live").filter((x) => (x.instance ?? "").includes(`:${project}:`)).filter((x) => /^(claude|codex|gemini|agy|hermes|opencode):/.test(x.instance ?? "")).sort((a, b) => (b.heartbeatAt ?? "").localeCompare(a.heartbeatAt ?? "")).map((x) => x.instance);
|
|
29
|
-
} catch {
|
|
30
|
-
return [];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
11
|
const POST = async ({ request }) => {
|
|
34
12
|
let body;
|
|
35
13
|
try {
|
|
@@ -49,16 +27,17 @@ const POST = async ({ request }) => {
|
|
|
49
27
|
const project = report.repo;
|
|
50
28
|
const question = d.gate?.blockedByTitle?.trim() || subjectOf(d);
|
|
51
29
|
const action = stepActionFr(d.step.code);
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
const target = emitter && live.includes(emitter) ? emitter : live[0];
|
|
55
|
-
if (!target) {
|
|
30
|
+
const resolution = resolveTarget(root);
|
|
31
|
+
if (!resolution.target) {
|
|
56
32
|
return json({
|
|
57
33
|
ok: true,
|
|
58
34
|
delivered: false,
|
|
59
|
-
|
|
35
|
+
reason: resolution.reason,
|
|
36
|
+
remedy: resolution.remedy,
|
|
37
|
+
note: resolution.remedy ?? `Aucune session h2a live sur « ${project} » : rien à qui remettre la décision.`
|
|
60
38
|
});
|
|
61
39
|
}
|
|
40
|
+
const target = resolution.target;
|
|
62
41
|
const envelope = {
|
|
63
42
|
protocol: "sentropic.h2a",
|
|
64
43
|
version: "0.1",
|
|
@@ -80,15 +59,7 @@ const POST = async ({ request }) => {
|
|
|
80
59
|
};
|
|
81
60
|
let recipientLive = false;
|
|
82
61
|
try {
|
|
83
|
-
|
|
84
|
-
"node",
|
|
85
|
-
[h2aBin(root), "inbox", "put", "--instance", target, "--json", JSON.stringify(envelope)],
|
|
86
|
-
{ cwd: root, encoding: "utf8" }
|
|
87
|
-
);
|
|
88
|
-
try {
|
|
89
|
-
recipientLive = Boolean(JSON.parse(out).recipientLive);
|
|
90
|
-
} catch {
|
|
91
|
-
}
|
|
62
|
+
recipientLive = putEnvelope(root, target, envelope).recipientLive;
|
|
92
63
|
} catch (e) {
|
|
93
64
|
return json({ ok: false, error: `Dépôt h2a échoué : ${e instanceof Error ? e.message : String(e)}` });
|
|
94
65
|
}
|
|
@@ -97,4 +68,4 @@ const POST = async ({ request }) => {
|
|
|
97
68
|
};
|
|
98
69
|
|
|
99
70
|
export { POST };
|
|
100
|
-
//# sourceMappingURL=_server.ts.js-
|
|
71
|
+
//# sourceMappingURL=_server.ts.js-hrbMnsV0.js.map
|
package/focus-app/server/chunks/entries/endpoints/api/decisions/inject/_server.ts.js-hrbMnsV0.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_server.ts.js-hrbMnsV0.js","sources":["../../../../../../../../.svelte-kit/output/server/entries/endpoints/api/decisions/inject/_server.ts.js"],"sourcesContent":["import { json } from \"@sveltejs/kit\";\nimport { r as repoRoot, a as resolveTarget, p as putEnvelope } from \"../../../../../chunks/h2a-bus.js\";\nimport { l as loadReport, a as subjectOf, s as stepActionFr } from \"../../../../../chunks/friendly.js\";\nconst POST = async ({ request }) => {\n let body;\n try {\n body = await request.json();\n } catch {\n return json({ ok: false, error: \"Corps de requête JSON invalide.\" }, { status: 400 });\n }\n const id = body?.id;\n if (typeof id !== \"string\") {\n return json({ ok: false, error: \"Champ `id` requis (identifiant de décision).\" }, { status: 400 });\n }\n const report = await loadReport();\n if (!report.ok) return json({ ok: false, error: report.error }, { status: 503 });\n const d = report.view.directives.find((x) => x.id === id);\n if (!d) return json({ ok: false, error: \"Décision inconnue.\" }, { status: 400 });\n const root = repoRoot();\n const project = report.repo;\n const question = d.gate?.blockedByTitle?.trim() || subjectOf(d);\n const action = stepActionFr(d.step.code);\n const resolution = resolveTarget(root);\n if (!resolution.target) {\n return json({\n ok: true,\n delivered: false,\n reason: resolution.reason,\n remedy: resolution.remedy,\n note: resolution.remedy ?? `Aucune session h2a live sur « ${project} » : rien à qui remettre la décision.`\n });\n }\n const target = resolution.target;\n const envelope = {\n protocol: \"sentropic.h2a\",\n version: \"0.1\",\n id: `env:focus-decision-${id}-${Date.now()}`,\n createdAt: (/* @__PURE__ */ new Date()).toISOString(),\n type: \"event\",\n actor: { instance: \"focus:local-human\", role: \"AGENTS\", scope: \"scope:default\" },\n to: [target],\n topic: \"focus.decision-inject\",\n body: {\n kind: \"decision-mandate\",\n decisionId: id,\n subject: subjectOf(d),\n question,\n action,\n workspace: d.target.workspace,\n note: \"Décision poussée depuis Focus par l’humain — à instruire/trancher dans track (cette injection ne signe rien).\"\n }\n };\n let recipientLive = false;\n try {\n recipientLive = putEnvelope(root, target, envelope).recipientLive;\n } catch (e) {\n return json({ ok: false, error: `Dépôt h2a échoué : ${e instanceof Error ? e.message : String(e)}` });\n }\n const note = recipientLive ? `Décision « ${question} » remise à la session live ${target} — elle la verra à sa prochaine relève d’inbox.` : `Décision « ${question} » déposée dans l’inbox de ${target}, mais la session ne répond plus (présence périmée). Elle sera lue si la session reprend.`;\n return json({ ok: true, delivered: true, target, recipientLive, note });\n};\nexport {\n POST\n};\n"],"names":[],"mappings":";;;;;;;;;;AAGK,MAAC,IAAI,GAAG,OAAO,EAAE,OAAO,EAAE,KAAK;AACpC,EAAE,IAAI,IAAI;AACV,EAAE,IAAI;AACN,IAAI,IAAI,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE;AAC/B,EAAE,CAAC,CAAC,MAAM;AACV,IAAI,OAAO,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,iCAAiC,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AACzF,EAAE;AACF,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE;AACrB,EAAE,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE;AAC9B,IAAI,OAAO,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,8CAA8C,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AACtG,EAAE;AACF,EAAE,MAAM,MAAM,GAAG,MAAM,UAAU,EAAE;AACnC,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAClF,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC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'../../../../../../chunks/utils.js-C_3_iViC.js';
|
|
2
|
+
import { b as agentMemoryDossier, f as findAgentMemoryDecision, c as findAgentMemoryOption } from '../../../../../../chunks/agent-memory-dossier.js-nmFG_rgx.js';
|
|
3
|
+
import { a as repoRoot, r as resolveTarget, p as putEnvelope } from '../../../../../../chunks/h2a-bus.js-bLEJ_Adi.js';
|
|
4
|
+
import '../../../../../../chunks/utils2.js-BQzn9ikS.js';
|
|
5
|
+
import 'node:child_process';
|
|
6
|
+
import 'node:fs';
|
|
7
|
+
import 'node:os';
|
|
8
|
+
import 'node:path';
|
|
9
|
+
|
|
10
|
+
const NOTE_MAX = 8e3;
|
|
11
|
+
function prepare(raw) {
|
|
12
|
+
if (typeof raw.decisionKey !== "string") {
|
|
13
|
+
return "Champ `decisionKey` requis (identifiant de décision).";
|
|
14
|
+
}
|
|
15
|
+
const decision = findAgentMemoryDecision(raw.decisionKey);
|
|
16
|
+
if (!decision) return `Décision inconnue dans ce dossier : ${raw.decisionKey}.`;
|
|
17
|
+
let option = null;
|
|
18
|
+
if (typeof raw.optionKey === "string" && raw.optionKey.length > 0) {
|
|
19
|
+
const found = findAgentMemoryOption(decision, raw.optionKey);
|
|
20
|
+
if (!found) return `Option inconnue pour ${decision.key} : ${raw.optionKey}.`;
|
|
21
|
+
option = { key: found.key, title: found.title };
|
|
22
|
+
}
|
|
23
|
+
if (raw.note !== void 0 && raw.note !== null && typeof raw.note !== "string") {
|
|
24
|
+
return `Champ \`note\` invalide pour ${decision.key} (texte attendu).`;
|
|
25
|
+
}
|
|
26
|
+
const note = typeof raw.note === "string" ? raw.note.trim() : "";
|
|
27
|
+
if (note.length > NOTE_MAX) {
|
|
28
|
+
return `Note trop longue pour ${decision.key} (${note.length} caractères, maximum ${NOTE_MAX}).`;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
decisionKey: decision.key,
|
|
32
|
+
question: decision.question,
|
|
33
|
+
// `null` — not absent — so the reader can tell "no option chosen" from "field forgotten".
|
|
34
|
+
selectedOption: option,
|
|
35
|
+
humanNote: note.length > 0 ? note : null
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const POST = async ({ request }) => {
|
|
39
|
+
let body;
|
|
40
|
+
try {
|
|
41
|
+
body = await request.json();
|
|
42
|
+
} catch {
|
|
43
|
+
return json({ ok: false, error: "Corps de requête JSON invalide." }, { status: 400 });
|
|
44
|
+
}
|
|
45
|
+
const raw = body ?? {};
|
|
46
|
+
const batch = Array.isArray(raw.answers);
|
|
47
|
+
const entries = batch ? raw.answers : [raw];
|
|
48
|
+
if (batch && entries.length === 0) {
|
|
49
|
+
return json({ ok: false, error: "Aucune réponse à transmettre." }, { status: 400 });
|
|
50
|
+
}
|
|
51
|
+
const prepared = [];
|
|
52
|
+
for (const entry of entries) {
|
|
53
|
+
const result = prepare(entry ?? {});
|
|
54
|
+
if (typeof result === "string") return json({ ok: false, error: result }, { status: 400 });
|
|
55
|
+
prepared.push(result);
|
|
56
|
+
}
|
|
57
|
+
const carrying = prepared.filter((a) => a.selectedOption || a.humanNote);
|
|
58
|
+
if (carrying.length === 0) {
|
|
59
|
+
return json(
|
|
60
|
+
{ ok: false, error: "Rien à inclure : sélectionnez une option ou écrivez une note avant de transmettre." },
|
|
61
|
+
{ status: 400 }
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
const root = repoRoot();
|
|
65
|
+
const requested = typeof raw.target === "string" ? raw.target : void 0;
|
|
66
|
+
const resolution = resolveTarget(root, { requested });
|
|
67
|
+
if (!resolution.target) {
|
|
68
|
+
return json({
|
|
69
|
+
ok: true,
|
|
70
|
+
delivered: false,
|
|
71
|
+
reason: resolution.reason,
|
|
72
|
+
roots: resolution.roots,
|
|
73
|
+
live: resolution.live.map((s) => ({
|
|
74
|
+
instance: s.instance,
|
|
75
|
+
name: s.name ?? null,
|
|
76
|
+
workspace: s.workspace?.path ?? null,
|
|
77
|
+
root: s.root ?? null
|
|
78
|
+
})),
|
|
79
|
+
remedy: resolution.remedy,
|
|
80
|
+
note: `${resolution.remedy} Vos réponses restent affichées ici et le jeu commité, lui, n'a pas bougé.`
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
const target = resolution.target;
|
|
84
|
+
const notesCarried = carrying.filter((a) => a.humanNote).length;
|
|
85
|
+
const envelope = {
|
|
86
|
+
protocol: "sentropic.h2a",
|
|
87
|
+
version: "0.1",
|
|
88
|
+
id: `env:focus-dossier-agent-memory-${batch ? "set" : carrying[0].decisionKey}-${Date.now()}`,
|
|
89
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
90
|
+
type: "event",
|
|
91
|
+
actor: { instance: "focus:local-human", role: "AGENTS", scope: "scope:default" },
|
|
92
|
+
to: [target],
|
|
93
|
+
topic: "focus.dossier-include",
|
|
94
|
+
body: {
|
|
95
|
+
kind: batch ? "dossier-answer-set" : "dossier-choice",
|
|
96
|
+
dossier: "agent-memory",
|
|
97
|
+
dossierTitle: agentMemoryDossier.title,
|
|
98
|
+
revision: agentMemoryDossier.revision,
|
|
99
|
+
// Single-answer envelopes keep their historical top-level shape so an existing reader still works;
|
|
100
|
+
// `answers` is always present, so a new reader needs exactly one code path.
|
|
101
|
+
...batch ? {} : {
|
|
102
|
+
decisionKey: carrying[0].decisionKey,
|
|
103
|
+
question: carrying[0].question,
|
|
104
|
+
selectedOption: carrying[0].selectedOption,
|
|
105
|
+
humanNote: carrying[0].humanNote
|
|
106
|
+
},
|
|
107
|
+
answers: carrying,
|
|
108
|
+
answerCount: carrying.length,
|
|
109
|
+
noteCount: notesCarried,
|
|
110
|
+
provenance: "Choix transmis depuis le dossier Focus par l’humain — ceci ne signe aucune décision, c’est son raisonnement remis dans la boucle de l’agent."
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
let recipientLive = false;
|
|
114
|
+
try {
|
|
115
|
+
recipientLive = putEnvelope(root, target, envelope, resolution.targetRoot).recipientLive;
|
|
116
|
+
} catch (e) {
|
|
117
|
+
return json({ ok: false, error: `Dépôt h2a échoué : ${e instanceof Error ? e.message : String(e)}` });
|
|
118
|
+
}
|
|
119
|
+
const what = batch ? `${carrying.length} réponse(s) (${notesCarried} note(s))` : `${carrying[0].decisionKey} : ${carrying[0].selectedOption ? `« ${carrying[0].selectedOption.title} »` : "votre note"}${carrying[0].humanNote ? " (note incluse)" : ""}`;
|
|
120
|
+
const where = resolution.targetRoot ? ` (racine h2a ${resolution.targetRoot})` : "";
|
|
121
|
+
const alsoLive = resolution.ambiguous ? ` ${resolution.candidates.length} sessions live répondent pour ce dépôt (${resolution.candidates.map((c) => c.instance).join(", ")}) — si ce n'est pas la bonne, changez de destinataire et renvoyez.` : "";
|
|
122
|
+
const message = recipientLive ? `${what} remis à la session live ${target}${where} — elle le verra à sa prochaine relève d’inbox.${alsoLive}` : `${what} déposé dans l’inbox de ${target}${where}, mais la session ne répond plus (présence périmée). Ce sera lu si elle reprend.${alsoLive}`;
|
|
123
|
+
return json({
|
|
124
|
+
ok: true,
|
|
125
|
+
delivered: true,
|
|
126
|
+
target,
|
|
127
|
+
targetRoot: resolution.targetRoot ?? null,
|
|
128
|
+
reason: resolution.reason,
|
|
129
|
+
ambiguous: resolution.ambiguous,
|
|
130
|
+
recipientLive,
|
|
131
|
+
answerCount: carrying.length,
|
|
132
|
+
noteCount: notesCarried,
|
|
133
|
+
note: message
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export { POST };
|
|
138
|
+
//# sourceMappingURL=_server.ts.js-Dw4odGdV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_server.ts.js-Dw4odGdV.js","sources":["../../../../../../../../../.svelte-kit/output/server/entries/endpoints/api/dossiers/agent-memory/include/_server.ts.js"],"sourcesContent":["import { json } from \"@sveltejs/kit\";\nimport { a as agentMemoryDossier, f as findAgentMemoryDecision, b as findAgentMemoryOption } from \"../../../../../../chunks/agent-memory-dossier.js\";\nimport { r as repoRoot, a as resolveTarget, p as putEnvelope } from \"../../../../../../chunks/h2a-bus.js\";\nconst NOTE_MAX = 8e3;\nfunction prepare(raw) {\n if (typeof raw.decisionKey !== \"string\") {\n return \"Champ `decisionKey` requis (identifiant de décision).\";\n }\n const decision = findAgentMemoryDecision(raw.decisionKey);\n if (!decision) return `Décision inconnue dans ce dossier : ${raw.decisionKey}.`;\n let option = null;\n if (typeof raw.optionKey === \"string\" && raw.optionKey.length > 0) {\n const found = findAgentMemoryOption(decision, raw.optionKey);\n if (!found) return `Option inconnue pour ${decision.key} : ${raw.optionKey}.`;\n option = { key: found.key, title: found.title };\n }\n if (raw.note !== void 0 && raw.note !== null && typeof raw.note !== \"string\") {\n return `Champ \\`note\\` invalide pour ${decision.key} (texte attendu).`;\n }\n const note = typeof raw.note === \"string\" ? raw.note.trim() : \"\";\n if (note.length > NOTE_MAX) {\n return `Note trop longue pour ${decision.key} (${note.length} caractères, maximum ${NOTE_MAX}).`;\n }\n return {\n decisionKey: decision.key,\n question: decision.question,\n // `null` — not absent — so the reader can tell \"no option chosen\" from \"field forgotten\".\n selectedOption: option,\n humanNote: note.length > 0 ? note : null\n };\n}\nconst POST = async ({ request }) => {\n let body;\n try {\n body = await request.json();\n } catch {\n return json({ ok: false, error: \"Corps de requête JSON invalide.\" }, { status: 400 });\n }\n const raw = body ?? {};\n const batch = Array.isArray(raw.answers);\n const entries = batch ? raw.answers : [raw];\n if (batch && entries.length === 0) {\n return json({ ok: false, error: \"Aucune réponse à transmettre.\" }, { status: 400 });\n }\n const prepared = [];\n for (const entry of entries) {\n const result = prepare(entry ?? {});\n if (typeof result === \"string\") return json({ ok: false, error: result }, { status: 400 });\n prepared.push(result);\n }\n const carrying = prepared.filter((a) => a.selectedOption || a.humanNote);\n if (carrying.length === 0) {\n return json(\n { ok: false, error: \"Rien à inclure : sélectionnez une option ou écrivez une note avant de transmettre.\" },\n { status: 400 }\n );\n }\n const root = repoRoot();\n const requested = typeof raw.target === \"string\" ? raw.target : void 0;\n const resolution = resolveTarget(root, { requested });\n if (!resolution.target) {\n return json({\n ok: true,\n delivered: false,\n reason: resolution.reason,\n roots: resolution.roots,\n live: resolution.live.map((s) => ({\n instance: s.instance,\n name: s.name ?? null,\n workspace: s.workspace?.path ?? null,\n root: s.root ?? null\n })),\n remedy: resolution.remedy,\n note: `${resolution.remedy} Vos réponses restent affichées ici et le jeu commité, lui, n'a pas bougé.`\n });\n }\n const target = resolution.target;\n const notesCarried = carrying.filter((a) => a.humanNote).length;\n const envelope = {\n protocol: \"sentropic.h2a\",\n version: \"0.1\",\n id: `env:focus-dossier-agent-memory-${batch ? \"set\" : carrying[0].decisionKey}-${Date.now()}`,\n createdAt: (/* @__PURE__ */ new Date()).toISOString(),\n type: \"event\",\n actor: { instance: \"focus:local-human\", role: \"AGENTS\", scope: \"scope:default\" },\n to: [target],\n topic: \"focus.dossier-include\",\n body: {\n kind: batch ? \"dossier-answer-set\" : \"dossier-choice\",\n dossier: \"agent-memory\",\n dossierTitle: agentMemoryDossier.title,\n revision: agentMemoryDossier.revision,\n // Single-answer envelopes keep their historical top-level shape so an existing reader still works;\n // `answers` is always present, so a new reader needs exactly one code path.\n ...batch ? {} : {\n decisionKey: carrying[0].decisionKey,\n question: carrying[0].question,\n selectedOption: carrying[0].selectedOption,\n humanNote: carrying[0].humanNote\n },\n answers: carrying,\n answerCount: carrying.length,\n noteCount: notesCarried,\n provenance: \"Choix transmis depuis le dossier Focus par l’humain — ceci ne signe aucune décision, c’est son raisonnement remis dans la boucle de l’agent.\"\n }\n };\n let recipientLive = false;\n try {\n recipientLive = putEnvelope(root, target, envelope, resolution.targetRoot).recipientLive;\n } catch (e) {\n return json({ ok: false, error: `Dépôt h2a échoué : ${e instanceof Error ? e.message : String(e)}` });\n }\n const what = batch ? `${carrying.length} réponse(s) (${notesCarried} note(s))` : `${carrying[0].decisionKey} : ${carrying[0].selectedOption ? `« ${carrying[0].selectedOption.title} »` : \"votre note\"}${carrying[0].humanNote ? \" (note incluse)\" : \"\"}`;\n const where = resolution.targetRoot ? ` (racine h2a ${resolution.targetRoot})` : \"\";\n const alsoLive = resolution.ambiguous ? ` ${resolution.candidates.length} sessions live répondent pour ce dépôt (${resolution.candidates.map((c) => c.instance).join(\", \")}) — si ce n'est pas la bonne, changez de destinataire et renvoyez.` : \"\";\n const message = recipientLive ? `${what} remis à la session live ${target}${where} — elle le verra à sa prochaine relève d’inbox.${alsoLive}` : `${what} déposé dans l’inbox de ${target}${where}, mais la session ne répond plus (présence périmée). Ce sera lu si elle reprend.${alsoLive}`;\n return json({\n ok: true,\n delivered: true,\n target,\n targetRoot: resolution.targetRoot ?? null,\n reason: resolution.reason,\n ambiguous: resolution.ambiguous,\n recipientLive,\n answerCount: carrying.length,\n noteCount: notesCarried,\n note: message\n });\n};\nexport {\n POST\n};\n"],"names":[],"mappings":";;;;;;;;;AAGA,MAAM,QAAQ,GAAG,GAAG;AACpB,SAAS,OAAO,CAAC,GAAG,EAAE;AACtB,EAAE,IAAI,OAAO,GAAG,CAAC,WAAW,KAAK,QAAQ,EAAE;AAC3C,IAAI,OAAO,uDAAuD;AAClE,EAAE;AACF,EAAE,MAAM,QAAQ,GAAG,uBAAuB,CAAC,GAAG,CAAC,WAAW,CAAC;AAC3D,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,oCAAoC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC;AACjF,EAAE,IAAI,MAAM,GAAG,IAAI;AACnB,EAAE,IAAI,OAAO,GAAG,CAAC,SAAS,KAAK,QAAQ,IAAI,GAAG,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;AACrE,IAAI,MAAM,KAAK,GAAG,qBAAqB,CAAC,QAAQ,EAAE,GAAG,CAAC,SAAS,CAAC;AAChE,IAAI,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,qBAAqB,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;AACjF,IAAI,MAAM,GAAG,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ACV,IAAI,UAAU,EAAE,UAAU,CAAC,UAAU,IAAI,IAAI;AAC7C,IAAI,MAAM,EAAE,UAAU,CAAC,MAAM;AAC7B,IAAI,SAAS,EAAE,UAAU,CAAC,SAAS;AACnC,IAAI,aAAa;AACjB,IAAI,WAAW,EAAE,QAAQ,CAAC,MAAM;AAChC,IAAI,SAAS,EAAE,YAAY;AAC3B,IAAI,IAAI,EAAE;AACV,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { j as json } from '../../../../../chunks/utils.js-C_3_iViC.js';
|
|
2
|
+
import { a as repoRoot, r as resolveTarget, b as repoIdentity } from '../../../../../chunks/h2a-bus.js-bLEJ_Adi.js';
|
|
3
|
+
import '../../../../../chunks/utils2.js-BQzn9ikS.js';
|
|
4
|
+
import 'node:child_process';
|
|
5
|
+
import 'node:fs';
|
|
6
|
+
import 'node:os';
|
|
7
|
+
import 'node:path';
|
|
8
|
+
|
|
9
|
+
const GET = async () => {
|
|
10
|
+
const root = repoRoot();
|
|
11
|
+
const resolution = resolveTarget(root);
|
|
12
|
+
const identity = repoIdentity(root);
|
|
13
|
+
return json({
|
|
14
|
+
ok: true,
|
|
15
|
+
target: resolution.target ?? null,
|
|
16
|
+
targetRoot: resolution.targetRoot ?? null,
|
|
17
|
+
reason: resolution.reason,
|
|
18
|
+
ambiguous: resolution.ambiguous,
|
|
19
|
+
// The roots searched: a machine can run several h2a buses that do not see each other, and a recipient
|
|
20
|
+
// is only addressable together with the root it reads.
|
|
21
|
+
roots: resolution.roots,
|
|
22
|
+
binMissing: resolution.binMissing,
|
|
23
|
+
remedy: resolution.remedy ?? null,
|
|
24
|
+
// The repo's own identity, so a human debugging "why does it not find my session" can see what we
|
|
25
|
+
// matched ON rather than having to read the source.
|
|
26
|
+
repo: { paths: identity.paths, names: identity.names },
|
|
27
|
+
live: resolution.live.map((s) => ({
|
|
28
|
+
instance: s.instance,
|
|
29
|
+
name: s.name ?? null,
|
|
30
|
+
workspace: s.workspace?.path ?? null,
|
|
31
|
+
root: s.root ?? null,
|
|
32
|
+
heartbeatAt: s.heartbeatAt ?? null,
|
|
33
|
+
// Whether this session matched THIS repo, as opposed to merely being alive somewhere else.
|
|
34
|
+
matchesRepo: resolution.candidates.some((c) => c.instance === s.instance),
|
|
35
|
+
default: s.instance === resolution.target
|
|
36
|
+
}))
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { GET };
|
|
41
|
+
//# sourceMappingURL=_server.ts.js-BLjYv7vg.js.map
|
package/focus-app/server/chunks/entries/endpoints/api/h2a/targets/_server.ts.js-BLjYv7vg.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_server.ts.js-BLjYv7vg.js","sources":["../../../../../../../../.svelte-kit/output/server/entries/endpoints/api/h2a/targets/_server.ts.js"],"sourcesContent":["import { json } from \"@sveltejs/kit\";\nimport { r as repoRoot, a as resolveTarget, b as repoIdentity } from \"../../../../../chunks/h2a-bus.js\";\nconst GET = async () => {\n const root = repoRoot();\n const resolution = resolveTarget(root);\n const identity = repoIdentity(root);\n return json({\n ok: true,\n target: resolution.target ?? null,\n targetRoot: resolution.targetRoot ?? null,\n reason: resolution.reason,\n ambiguous: resolution.ambiguous,\n // The roots searched: a machine can run several h2a buses that do not see each other, and a recipient\n // is only addressable together with the root it reads.\n roots: resolution.roots,\n binMissing: resolution.binMissing,\n remedy: resolution.remedy ?? null,\n // The repo's own identity, so a human debugging \"why does it not find my session\" can see what we\n // matched ON rather than having to read the source.\n repo: { paths: identity.paths, names: identity.names },\n live: resolution.live.map((s) => ({\n instance: s.instance,\n name: s.name ?? null,\n workspace: s.workspace?.path ?? null,\n root: s.root ?? null,\n heartbeatAt: s.heartbeatAt ?? null,\n // Whether this session matched THIS repo, as opposed to merely being alive somewhere else.\n matchesRepo: resolution.candidates.some((c) => c.instance === s.instance),\n default: s.instance === resolution.target\n }))\n });\n};\nexport {\n GET\n};\n"],"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AAE,CAAC,CAAC,QAAQ,KAAK,UAAU,CAAC;AACzC,KAAK,CAAC;AACN,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a4 as escape_html, a5 as getContext, Q as noop } from '../../chunks/index.js-
|
|
2
|
-
import { w as writable } from '../../chunks/exports.js-
|
|
1
|
+
import { a4 as escape_html, a5 as getContext, Q as noop } from '../../chunks/index.js-laGHLarB.js';
|
|
2
|
+
import { w as writable } from '../../chunks/exports.js-CdqPbjm1.js';
|
|
3
3
|
import '../../chunks/utils.js-C_3_iViC.js';
|
|
4
|
-
import '../../chunks/root.js-
|
|
4
|
+
import '../../chunks/root.js-CtVQOgDw.js';
|
|
5
5
|
import '../../chunks/utils2.js-BQzn9ikS.js';
|
|
6
6
|
import '../../chunks/false.js-B2gHlHjM.js';
|
|
7
7
|
|
|
@@ -47,4 +47,4 @@ function Error$1($$renderer, $$props) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export { Error$1 as default };
|
|
50
|
-
//# sourceMappingURL=error.svelte.js-
|
|
50
|
+
//# sourceMappingURL=error.svelte.js-RbeaNF5a.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.svelte.js-
|
|
1
|
+
{"version":3,"file":"error.svelte.js-RbeaNF5a.js","sources":["../../../../../.svelte-kit/output/server/entries/fallbacks/error.svelte.js"],"sourcesContent":["import { n as noop, g as getContext, e as escape_html } from \"../../chunks/index.js\";\nimport \"clsx\";\nimport { w as writable } from \"../../chunks/exports.js\";\nimport \"@sveltejs/kit/internal/server\";\nimport \"../../chunks/root.js\";\nimport \"@sveltejs/kit/internal\";\nimport \"../../chunks/utils2.js\";\nfunction create_updated_store() {\n const { set, subscribe } = writable(false);\n {\n return {\n subscribe,\n // eslint-disable-next-line @typescript-eslint/require-await\n check: async () => false\n };\n }\n}\nconst is_legacy = noop.toString().includes(\"$$\") || /function \\w+\\(\\) \\{\\}/.test(noop.toString());\nconst placeholder_url = \"a:\";\nif (is_legacy) {\n ({\n data: {},\n form: null,\n error: null,\n params: {},\n route: { id: null },\n state: {},\n status: -1,\n url: new URL(placeholder_url)\n });\n}\nconst stores = {\n updated: /* @__PURE__ */ create_updated_store()\n};\n({\n check: stores.updated.check\n});\nfunction context() {\n return getContext(\"__request__\");\n}\nconst page$1 = {\n get error() {\n return context().page.error;\n },\n get status() {\n return context().page.status;\n }\n};\nconst page = page$1;\nfunction Error$1($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n $$renderer2.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);\n });\n}\nexport {\n Error$1 as default\n};\n"],"names":[],"mappings":";;;;;;;AAOA,SAAS,oBAAoB,GAAG;AAChC,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC;AAC5C,EAAE;AACF,IAAI,OAAO;AACX,MAAM,SAAS;AACf;AACA,MAAM,KAAK,EAAE,YAAY;AACzB,KAAK;AACL,EAAE;AACF;AACA,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;AACjG,MAAM,eAAe,GAAG,IAAI;AAC5B,IAAI,SAAS,EAAE;AACf,EAAE,CAAC;AACH,IAOI,GAAG,EAAE,IAAI,GAAG,CAAC,eAAe;AAChC,GAAG;AACH;AACA,MAAM,MAAM,GAAG;AACf,EAAE,OAAO,kBAAkB,oBAAoB;AAC/C,CAAC;AACD,CAAC;AACD,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC;AACxB,CAAC;AACD,SAAS,OAAO,GAAG;AACnB,EAAE,OAAO,UAAU,CAAC,aAAa,CAAC;AAClC;AACA,MAAM,MAAM,GAAG;AACf,EAAE,IAAI,KAAK,GAAG;AACd,IAAI,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,KAAK;AAC/B,EAAE,CAAC;AACH,EAAE,IAAI,MAAM,GAAG;AACf,IAAI,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM;AAChC,EAAE;AACF,CAAC;AACD,MAAM,IAAI,GAAG,MAAM;AACnB,SAAS,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE;AACtC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AACvG,EAAE,CAAC,CAAC;AACJ;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a2 as head, a3 as attr, Z as derived } from '../../chunks/index.js-
|
|
1
|
+
import { a2 as head, a3 as attr, Z as derived } from '../../chunks/index.js-laGHLarB.js';
|
|
2
2
|
import '../../chunks/utils.js-C_3_iViC.js';
|
|
3
3
|
import '../../chunks/utils2.js-BQzn9ikS.js';
|
|
4
4
|
|
|
@@ -1417,4 +1417,4 @@ function _layout($$renderer, $$props) {
|
|
|
1417
1417
|
}
|
|
1418
1418
|
|
|
1419
1419
|
export { _layout as default };
|
|
1420
|
-
//# sourceMappingURL=_layout.svelte.js-
|
|
1420
|
+
//# sourceMappingURL=_layout.svelte.js-e1E_I04z.js.map
|