@xenosystem/agent-sdk 0.8.13 → 0.9.8

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.
Files changed (85) hide show
  1. package/LICENSE +15 -15
  2. package/README.md +511 -511
  3. package/dist/agents/metafile-cjs.json +1 -1
  4. package/dist/agents/metafile-esm.json +1 -1
  5. package/dist/artifacts/index.cjs +1 -1
  6. package/dist/artifacts/index.js +1 -1
  7. package/dist/artifacts/metafile-cjs.json +1 -1
  8. package/dist/artifacts/metafile-esm.json +1 -1
  9. package/dist/automation/metafile-cjs.json +1 -1
  10. package/dist/automation/metafile-esm.json +1 -1
  11. package/dist/control-plane/index.cjs +1 -1
  12. package/dist/control-plane/index.js +1 -1
  13. package/dist/control-plane/metafile-cjs.json +1 -1
  14. package/dist/control-plane/metafile-esm.json +1 -1
  15. package/dist/control-room/metafile-cjs.json +1 -1
  16. package/dist/control-room/metafile-esm.json +1 -1
  17. package/dist/electron/index.cjs +140 -138
  18. package/dist/electron/index.js +139 -137
  19. package/dist/electron/metafile-cjs.json +1 -1
  20. package/dist/electron/metafile-esm.json +1 -1
  21. package/dist/governance/metafile-cjs.json +1 -1
  22. package/dist/governance/metafile-esm.json +1 -1
  23. package/dist/hooks/metafile-cjs.json +1 -1
  24. package/dist/hooks/metafile-esm.json +1 -1
  25. package/dist/hosted/metafile-cjs.json +1 -1
  26. package/dist/hosted/metafile-esm.json +1 -1
  27. package/dist/index.cjs +322 -320
  28. package/dist/index.d.cts +14 -2
  29. package/dist/index.d.ts +14 -2
  30. package/dist/index.js +322 -320
  31. package/dist/intelligence/metafile-cjs.json +1 -1
  32. package/dist/intelligence/metafile-esm.json +1 -1
  33. package/dist/mcp/metafile-cjs.json +1 -1
  34. package/dist/mcp/metafile-esm.json +1 -1
  35. package/dist/metafile-cjs.json +1 -1
  36. package/dist/metafile-esm.json +1 -1
  37. package/dist/oracle/metafile-cjs.json +1 -1
  38. package/dist/oracle/metafile-esm.json +1 -1
  39. package/dist/providers/metafile-cjs.json +1 -1
  40. package/dist/providers/metafile-esm.json +1 -1
  41. package/dist/recipes/metafile-cjs.json +1 -1
  42. package/dist/recipes/metafile-esm.json +1 -1
  43. package/dist/research/metafile-cjs.json +1 -1
  44. package/dist/research/metafile-esm.json +1 -1
  45. package/dist/session/index.cjs +1 -1
  46. package/dist/session/index.js +1 -1
  47. package/dist/session/metafile-cjs.json +1 -1
  48. package/dist/session/metafile-esm.json +1 -1
  49. package/dist/sharing/metafile-cjs.json +1 -1
  50. package/dist/sharing/metafile-esm.json +1 -1
  51. package/dist/skills/metafile-cjs.json +1 -1
  52. package/dist/skills/metafile-esm.json +1 -1
  53. package/dist/soul/metafile-cjs.json +1 -1
  54. package/dist/soul/metafile-esm.json +1 -1
  55. package/dist/terminal/metafile-cjs.json +1 -1
  56. package/dist/terminal/metafile-esm.json +1 -1
  57. package/dist/ui/metafile-cjs.json +1 -1
  58. package/dist/ui/metafile-esm.json +1 -1
  59. package/dist/utils/metafile-cjs.json +1 -1
  60. package/dist/utils/metafile-esm.json +1 -1
  61. package/native/mxc/LICENSE.microsoft-mxc-sdk.md +20 -20
  62. package/native/mxc/README.md +25 -25
  63. package/native/mxc/bin/arm64/lxc-exec +0 -0
  64. package/native/mxc/bin/arm64/mxc-exec-mac +0 -0
  65. package/native/mxc/bin/x64/lxc-exec +0 -0
  66. package/native/mxc/package.json +58 -58
  67. package/ownership/CLEAN_ROOM_CONTRIBUTOR_GUIDE.md +63 -63
  68. package/ownership/audit.mjs +727 -727
  69. package/ownership/evidence/PROPRIETARY-COMMAND-1/implementation-record.md +77 -77
  70. package/ownership/evidence/PROPRIETARY-COMMAND-1/provenance-review.md +51 -51
  71. package/ownership/evidence/PROPRIETARY-MEDIA-1/implementation-record.md +131 -131
  72. package/ownership/evidence/PROPRIETARY-MEDIA-1/provenance-review.md +50 -50
  73. package/ownership/evidence/PROPRIETARY-PTY-1/implementation-record.md +86 -86
  74. package/ownership/evidence/PROPRIETARY-PTY-1/provenance-review.md +52 -52
  75. package/ownership/evidence/PROPRIETARY-RUNTIME-1/implementation-record.md +68 -68
  76. package/ownership/evidence/PROPRIETARY-RUNTIME-1/provenance-review.md +32 -32
  77. package/ownership/evidence/PROPRIETARY-TOOLCHAIN-1/implementation-record.md +53 -53
  78. package/ownership/evidence/PROPRIETARY-TOOLCHAIN-1/provenance-review.md +32 -32
  79. package/ownership/evidence/PROPRIETARY-UI-1/implementation-record.md +96 -96
  80. package/ownership/evidence/PROPRIETARY-UI-1/provenance-review.md +46 -46
  81. package/ownership/ownership-policy.json +1 -1
  82. package/ownership/ownership-policy.schema.json +192 -192
  83. package/ownership/templates/clean-room-implementation-record.md +70 -70
  84. package/ownership/templates/provenance-review.md +51 -51
  85. package/package.json +1 -1
@@ -1 +1 @@
1
- {"inputs":{"src/artifacts/hash.ts":{"bytes":1530,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/artifacts/types.ts":{"bytes":9397,"imports":[],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25931,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":833,"imports":[],"format":"esm"},"src/oracle/protocol.ts":{"bytes":24342,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"../artifacts/hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"../artifacts/types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"../artifacts/validation.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/oracle/index.ts":{"bytes":32,"imports":[{"path":"src/oracle/protocol.ts","kind":"import-statement","original":"./protocol.js"}],"format":"esm"}},"outputs":{"dist/oracle/index.cjs":{"imports":[{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:buffer","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/oracle/index.ts","inputs":{"src/oracle/index.ts":{"bytesInOutput":243},"src/oracle/protocol.ts":{"bytesInOutput":10786},"src/artifacts/hash.ts":{"bytesInOutput":715},"src/artifacts/validation.ts":{"bytesInOutput":10650},"src/utils/text-security.ts":{"bytesInOutput":179}},"bytes":23195}}}
1
+ {"inputs":{"src/artifacts/hash.ts":{"bytes":1489,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/artifacts/types.ts":{"bytes":9012,"imports":[],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25422,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":809,"imports":[],"format":"esm"},"src/oracle/protocol.ts":{"bytes":23835,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"../artifacts/hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"../artifacts/types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"../artifacts/validation.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/oracle/index.ts":{"bytes":31,"imports":[{"path":"src/oracle/protocol.ts","kind":"import-statement","original":"./protocol.js"}],"format":"esm"}},"outputs":{"dist/oracle/index.cjs":{"imports":[{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:buffer","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/oracle/index.ts","inputs":{"src/oracle/index.ts":{"bytesInOutput":243},"src/oracle/protocol.ts":{"bytesInOutput":10786},"src/artifacts/hash.ts":{"bytesInOutput":715},"src/artifacts/validation.ts":{"bytesInOutput":10650},"src/utils/text-security.ts":{"bytesInOutput":179}},"bytes":23195}}}
@@ -1 +1 @@
1
- {"inputs":{"src/artifacts/hash.ts":{"bytes":1530,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/artifacts/types.ts":{"bytes":9397,"imports":[],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25931,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":833,"imports":[],"format":"esm"},"src/oracle/protocol.ts":{"bytes":24342,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"../artifacts/hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"../artifacts/types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"../artifacts/validation.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/oracle/index.ts":{"bytes":32,"imports":[{"path":"src/oracle/protocol.ts","kind":"import-statement","original":"./protocol.js"}],"format":"esm"}},"outputs":{"dist/oracle/index.js":{"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:buffer","kind":"import-statement","external":true}],"exports":["XENO_ORACLE_REPORT_SCHEMA_VERSION","XenoOracleCoordinator","XenoOracleValidationError","assertValidXenoOracleReport","xenoArtifactToOracleReport","xenoOracleReportToArtifact"],"entryPoint":"src/oracle/index.ts","inputs":{"src/oracle/protocol.ts":{"bytesInOutput":10768},"src/artifacts/hash.ts":{"bytesInOutput":712},"src/artifacts/validation.ts":{"bytesInOutput":10642},"src/utils/text-security.ts":{"bytesInOutput":179},"src/oracle/index.ts":{"bytesInOutput":0}},"bytes":22506}}}
1
+ {"inputs":{"src/artifacts/hash.ts":{"bytes":1489,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/artifacts/types.ts":{"bytes":9012,"imports":[],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25422,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":809,"imports":[],"format":"esm"},"src/oracle/protocol.ts":{"bytes":23835,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"../artifacts/hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"../artifacts/types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"../artifacts/validation.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/oracle/index.ts":{"bytes":31,"imports":[{"path":"src/oracle/protocol.ts","kind":"import-statement","original":"./protocol.js"}],"format":"esm"}},"outputs":{"dist/oracle/index.js":{"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:buffer","kind":"import-statement","external":true}],"exports":["XENO_ORACLE_REPORT_SCHEMA_VERSION","XenoOracleCoordinator","XenoOracleValidationError","assertValidXenoOracleReport","xenoArtifactToOracleReport","xenoOracleReportToArtifact"],"entryPoint":"src/oracle/index.ts","inputs":{"src/oracle/protocol.ts":{"bytesInOutput":10768},"src/artifacts/hash.ts":{"bytesInOutput":712},"src/artifacts/validation.ts":{"bytesInOutput":10642},"src/utils/text-security.ts":{"bytesInOutput":179},"src/oracle/index.ts":{"bytesInOutput":0}},"bytes":22506}}}
@@ -1 +1 @@
1
- {"inputs":{"src/config/models.ts":{"bytes":11671,"imports":[],"format":"esm"},"src/core/llm-provider.ts":{"bytes":12540,"imports":[],"format":"esm"},"src/providers/DualLLMProvider.ts":{"bytes":19754,"imports":[{"path":"src/config/models.ts","kind":"import-statement","original":"../config/models.js"},{"path":"src/core/llm-provider.ts","kind":"import-statement","original":"../core/llm-provider.js"}],"format":"esm"},"src/utils/tool-result-content.ts":{"bytes":4887,"imports":[],"format":"esm"},"src/observability/telemetry.ts":{"bytes":7495,"imports":[{"path":"node:perf_hooks","kind":"import-statement","external":true}],"format":"esm"},"src/observability/index.ts":{"bytes":33,"imports":[{"path":"src/observability/telemetry.ts","kind":"import-statement","original":"./telemetry.js"}],"format":"esm"},"src/providers/provider-errors.ts":{"bytes":6785,"imports":[{"path":"src/observability/index.ts","kind":"import-statement","original":"../observability/index.js"}],"format":"esm"},"src/providers/endpoint-policy.ts":{"bytes":5679,"imports":[{"path":"node:dns/promises","kind":"import-statement","external":true},{"path":"node:net","kind":"import-statement","external":true},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"}],"format":"esm"},"src/providers/bounded-provider-transport.ts":{"bytes":11504,"imports":[{"path":"node:perf_hooks","kind":"import-statement","external":true},{"path":"src/observability/index.ts","kind":"import-statement","original":"../observability/index.js"},{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"}],"format":"esm"},"src/utils/json-schema.ts":{"bytes":44449,"imports":[{"path":"node:net","kind":"import-statement","external":true}],"format":"esm"},"src/providers/tool-schema-projection.ts":{"bytes":12530,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/utils/json-schema.ts","kind":"import-statement","original":"../utils/json-schema.js"}],"format":"esm"},"src/providers/direct-provider.ts":{"bytes":43193,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/utils/tool-result-content.ts","kind":"import-statement","original":"../utils/tool-result-content.js"},{"path":"src/providers/bounded-provider-transport.ts","kind":"import-statement","original":"./bounded-provider-transport.js"},{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"},{"path":"src/providers/tool-schema-projection.ts","kind":"import-statement","original":"./tool-schema-projection.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":833,"imports":[],"format":"esm"},"src/providers/catalog.ts":{"bytes":22681,"imports":[{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1530,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/control-plane/lock.ts":{"bytes":2591,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/providers/file-connection-store.ts":{"bytes":8464,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"../artifacts/hash.js"},{"path":"src/control-plane/lock.ts","kind":"import-statement","original":"../control-plane/lock.js"},{"path":"src/providers/catalog.ts","kind":"import-statement","original":"./catalog.js"}],"format":"esm"},"src/providers/index.ts":{"bytes":1557,"imports":[{"path":"src/providers/DualLLMProvider.ts","kind":"import-statement","original":"./DualLLMProvider.js"},{"path":"src/providers/direct-provider.ts","kind":"import-statement","original":"./direct-provider.js"},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"},{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/providers/tool-schema-projection.ts","kind":"import-statement","original":"./tool-schema-projection.js"},{"path":"src/providers/catalog.ts","kind":"import-statement","original":"./catalog.js"},{"path":"src/providers/file-connection-store.ts","kind":"import-statement","original":"./file-connection-store.js"}],"format":"esm"}},"outputs":{"dist/providers/index.cjs":{"imports":[{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:perf_hooks","kind":"require-call","external":true},{"path":"node:dns/promises","kind":"require-call","external":true},{"path":"node:net","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:net","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:fs/promises","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"node:fs","kind":"require-call","external":true},{"path":"node:os","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/providers/index.ts","inputs":{"src/providers/index.ts":{"bytesInOutput":699},"src/config/models.ts":{"bytesInOutput":50},"src/core/llm-provider.ts":{"bytesInOutput":1072},"src/providers/DualLLMProvider.ts":{"bytesInOutput":5733},"src/providers/direct-provider.ts":{"bytesInOutput":21433},"src/utils/tool-result-content.ts":{"bytesInOutput":435},"src/providers/bounded-provider-transport.ts":{"bytesInOutput":5113},"src/observability/telemetry.ts":{"bytesInOutput":1599},"src/observability/index.ts":{"bytesInOutput":0},"src/providers/endpoint-policy.ts":{"bytesInOutput":2961},"src/providers/provider-errors.ts":{"bytesInOutput":3038},"src/providers/tool-schema-projection.ts":{"bytesInOutput":5704},"src/utils/json-schema.ts":{"bytesInOutput":19783},"src/utils/text-security.ts":{"bytesInOutput":180},"src/providers/catalog.ts":{"bytesInOutput":10865},"src/providers/file-connection-store.ts":{"bytesInOutput":3787},"src/artifacts/hash.ts":{"bytesInOutput":564},"src/control-plane/lock.ts":{"bytesInOutput":1067}},"bytes":85070}}}
1
+ {"inputs":{"src/config/models.ts":{"bytes":11270,"imports":[],"format":"esm"},"src/core/llm-provider.ts":{"bytes":12241,"imports":[],"format":"esm"},"src/providers/DualLLMProvider.ts":{"bytes":19125,"imports":[{"path":"src/config/models.ts","kind":"import-statement","original":"../config/models.js"},{"path":"src/core/llm-provider.ts","kind":"import-statement","original":"../core/llm-provider.js"}],"format":"esm"},"src/utils/tool-result-content.ts":{"bytes":4750,"imports":[],"format":"esm"},"src/observability/telemetry.ts":{"bytes":7271,"imports":[{"path":"node:perf_hooks","kind":"import-statement","external":true}],"format":"esm"},"src/observability/index.ts":{"bytes":32,"imports":[{"path":"src/observability/telemetry.ts","kind":"import-statement","original":"./telemetry.js"}],"format":"esm"},"src/providers/provider-errors.ts":{"bytes":6585,"imports":[{"path":"src/observability/index.ts","kind":"import-statement","original":"../observability/index.js"}],"format":"esm"},"src/providers/endpoint-policy.ts":{"bytes":5557,"imports":[{"path":"node:dns/promises","kind":"import-statement","external":true},{"path":"node:net","kind":"import-statement","external":true},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"}],"format":"esm"},"src/providers/bounded-provider-transport.ts":{"bytes":11196,"imports":[{"path":"node:perf_hooks","kind":"import-statement","external":true},{"path":"src/observability/index.ts","kind":"import-statement","original":"../observability/index.js"},{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"}],"format":"esm"},"src/utils/json-schema.ts":{"bytes":43478,"imports":[{"path":"node:net","kind":"import-statement","external":true}],"format":"esm"},"src/providers/tool-schema-projection.ts":{"bytes":12249,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/utils/json-schema.ts","kind":"import-statement","original":"../utils/json-schema.js"}],"format":"esm"},"src/providers/direct-provider.ts":{"bytes":42229,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/utils/tool-result-content.ts","kind":"import-statement","original":"../utils/tool-result-content.js"},{"path":"src/providers/bounded-provider-transport.ts","kind":"import-statement","original":"./bounded-provider-transport.js"},{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"},{"path":"src/providers/tool-schema-projection.ts","kind":"import-statement","original":"./tool-schema-projection.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":809,"imports":[],"format":"esm"},"src/providers/catalog.ts":{"bytes":22193,"imports":[{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1489,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/control-plane/lock.ts":{"bytes":2496,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/providers/file-connection-store.ts":{"bytes":8269,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"../artifacts/hash.js"},{"path":"src/control-plane/lock.ts","kind":"import-statement","original":"../control-plane/lock.js"},{"path":"src/providers/catalog.ts","kind":"import-statement","original":"./catalog.js"}],"format":"esm"},"src/providers/index.ts":{"bytes":1500,"imports":[{"path":"src/providers/DualLLMProvider.ts","kind":"import-statement","original":"./DualLLMProvider.js"},{"path":"src/providers/direct-provider.ts","kind":"import-statement","original":"./direct-provider.js"},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"},{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/providers/tool-schema-projection.ts","kind":"import-statement","original":"./tool-schema-projection.js"},{"path":"src/providers/catalog.ts","kind":"import-statement","original":"./catalog.js"},{"path":"src/providers/file-connection-store.ts","kind":"import-statement","original":"./file-connection-store.js"}],"format":"esm"}},"outputs":{"dist/providers/index.cjs":{"imports":[{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:perf_hooks","kind":"require-call","external":true},{"path":"node:dns/promises","kind":"require-call","external":true},{"path":"node:net","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:net","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:fs/promises","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"node:fs","kind":"require-call","external":true},{"path":"node:os","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/providers/index.ts","inputs":{"src/providers/index.ts":{"bytesInOutput":699},"src/config/models.ts":{"bytesInOutput":50},"src/core/llm-provider.ts":{"bytesInOutput":1072},"src/providers/DualLLMProvider.ts":{"bytesInOutput":5733},"src/providers/direct-provider.ts":{"bytesInOutput":21433},"src/utils/tool-result-content.ts":{"bytesInOutput":435},"src/providers/bounded-provider-transport.ts":{"bytesInOutput":5113},"src/observability/telemetry.ts":{"bytesInOutput":1599},"src/observability/index.ts":{"bytesInOutput":0},"src/providers/endpoint-policy.ts":{"bytesInOutput":2961},"src/providers/provider-errors.ts":{"bytesInOutput":3038},"src/providers/tool-schema-projection.ts":{"bytesInOutput":5704},"src/utils/json-schema.ts":{"bytesInOutput":19783},"src/utils/text-security.ts":{"bytesInOutput":180},"src/providers/catalog.ts":{"bytesInOutput":10865},"src/providers/file-connection-store.ts":{"bytesInOutput":3787},"src/artifacts/hash.ts":{"bytesInOutput":564},"src/control-plane/lock.ts":{"bytesInOutput":1067}},"bytes":85070}}}
@@ -1 +1 @@
1
- {"inputs":{"src/config/models.ts":{"bytes":11671,"imports":[],"format":"esm"},"src/core/llm-provider.ts":{"bytes":12540,"imports":[],"format":"esm"},"src/providers/DualLLMProvider.ts":{"bytes":19754,"imports":[{"path":"src/config/models.ts","kind":"import-statement","original":"../config/models.js"},{"path":"src/core/llm-provider.ts","kind":"import-statement","original":"../core/llm-provider.js"}],"format":"esm"},"src/utils/tool-result-content.ts":{"bytes":4887,"imports":[],"format":"esm"},"src/observability/telemetry.ts":{"bytes":7495,"imports":[{"path":"node:perf_hooks","kind":"import-statement","external":true}],"format":"esm"},"src/observability/index.ts":{"bytes":33,"imports":[{"path":"src/observability/telemetry.ts","kind":"import-statement","original":"./telemetry.js"}],"format":"esm"},"src/providers/provider-errors.ts":{"bytes":6785,"imports":[{"path":"src/observability/index.ts","kind":"import-statement","original":"../observability/index.js"}],"format":"esm"},"src/providers/endpoint-policy.ts":{"bytes":5679,"imports":[{"path":"node:dns/promises","kind":"import-statement","external":true},{"path":"node:net","kind":"import-statement","external":true},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"}],"format":"esm"},"src/providers/bounded-provider-transport.ts":{"bytes":11504,"imports":[{"path":"node:perf_hooks","kind":"import-statement","external":true},{"path":"src/observability/index.ts","kind":"import-statement","original":"../observability/index.js"},{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"}],"format":"esm"},"src/utils/json-schema.ts":{"bytes":44449,"imports":[{"path":"node:net","kind":"import-statement","external":true}],"format":"esm"},"src/providers/tool-schema-projection.ts":{"bytes":12530,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/utils/json-schema.ts","kind":"import-statement","original":"../utils/json-schema.js"}],"format":"esm"},"src/providers/direct-provider.ts":{"bytes":43193,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/utils/tool-result-content.ts","kind":"import-statement","original":"../utils/tool-result-content.js"},{"path":"src/providers/bounded-provider-transport.ts","kind":"import-statement","original":"./bounded-provider-transport.js"},{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"},{"path":"src/providers/tool-schema-projection.ts","kind":"import-statement","original":"./tool-schema-projection.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":833,"imports":[],"format":"esm"},"src/providers/catalog.ts":{"bytes":22681,"imports":[{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1530,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/control-plane/lock.ts":{"bytes":2591,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/providers/file-connection-store.ts":{"bytes":8464,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"../artifacts/hash.js"},{"path":"src/control-plane/lock.ts","kind":"import-statement","original":"../control-plane/lock.js"},{"path":"src/providers/catalog.ts","kind":"import-statement","original":"./catalog.js"}],"format":"esm"},"src/providers/index.ts":{"bytes":1557,"imports":[{"path":"src/providers/DualLLMProvider.ts","kind":"import-statement","original":"./DualLLMProvider.js"},{"path":"src/providers/direct-provider.ts","kind":"import-statement","original":"./direct-provider.js"},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"},{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/providers/tool-schema-projection.ts","kind":"import-statement","original":"./tool-schema-projection.js"},{"path":"src/providers/catalog.ts","kind":"import-statement","original":"./catalog.js"},{"path":"src/providers/file-connection-store.ts","kind":"import-statement","original":"./file-connection-store.js"}],"format":"esm"}},"outputs":{"dist/providers/index.js":{"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:perf_hooks","kind":"import-statement","external":true},{"path":"node:dns/promises","kind":"import-statement","external":true},{"path":"node:net","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:net","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"exports":["BUILT_IN_XENO_PROVIDER_PRESETS","DualLLMProvider","FileXenoProviderConnectionStore","ProviderError","ToolSchemaProjectionError","XENO_PROVIDER_CATALOG_SCHEMA_VERSION","XENO_PROVIDER_CONNECTION_STORE_SCHEMA_VERSION","XenoProviderCatalog","assertDirectEndpointResolution","classifyProviderHttpError","createDirectProvider","directProviderConfigFromConnection","parseRetryAfter","probeXenoProvider","projectToolDefinitionsForProvider","projectToolSchemaForProvider","providerCapabilityError","providerProtocolError","selectXenoProviderRoute","validateDirectEndpoint"],"entryPoint":"src/providers/index.ts","inputs":{"src/config/models.ts":{"bytesInOutput":50},"src/core/llm-provider.ts":{"bytesInOutput":1072},"src/providers/DualLLMProvider.ts":{"bytesInOutput":5733},"src/providers/index.ts":{"bytesInOutput":0},"src/providers/direct-provider.ts":{"bytesInOutput":21409},"src/utils/tool-result-content.ts":{"bytesInOutput":435},"src/providers/bounded-provider-transport.ts":{"bytesInOutput":5090},"src/observability/telemetry.ts":{"bytesInOutput":1599},"src/observability/index.ts":{"bytesInOutput":0},"src/providers/endpoint-policy.ts":{"bytesInOutput":2943},"src/providers/provider-errors.ts":{"bytesInOutput":3038},"src/providers/tool-schema-projection.ts":{"bytesInOutput":5702},"src/utils/json-schema.ts":{"bytesInOutput":19764},"src/utils/text-security.ts":{"bytesInOutput":180},"src/providers/catalog.ts":{"bytesInOutput":10865},"src/providers/file-connection-store.ts":{"bytesInOutput":3786},"src/artifacts/hash.ts":{"bytesInOutput":564},"src/control-plane/lock.ts":{"bytesInOutput":1054}},"bytes":83931}}}
1
+ {"inputs":{"src/config/models.ts":{"bytes":11270,"imports":[],"format":"esm"},"src/core/llm-provider.ts":{"bytes":12241,"imports":[],"format":"esm"},"src/providers/DualLLMProvider.ts":{"bytes":19125,"imports":[{"path":"src/config/models.ts","kind":"import-statement","original":"../config/models.js"},{"path":"src/core/llm-provider.ts","kind":"import-statement","original":"../core/llm-provider.js"}],"format":"esm"},"src/utils/tool-result-content.ts":{"bytes":4750,"imports":[],"format":"esm"},"src/observability/telemetry.ts":{"bytes":7271,"imports":[{"path":"node:perf_hooks","kind":"import-statement","external":true}],"format":"esm"},"src/observability/index.ts":{"bytes":32,"imports":[{"path":"src/observability/telemetry.ts","kind":"import-statement","original":"./telemetry.js"}],"format":"esm"},"src/providers/provider-errors.ts":{"bytes":6585,"imports":[{"path":"src/observability/index.ts","kind":"import-statement","original":"../observability/index.js"}],"format":"esm"},"src/providers/endpoint-policy.ts":{"bytes":5557,"imports":[{"path":"node:dns/promises","kind":"import-statement","external":true},{"path":"node:net","kind":"import-statement","external":true},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"}],"format":"esm"},"src/providers/bounded-provider-transport.ts":{"bytes":11196,"imports":[{"path":"node:perf_hooks","kind":"import-statement","external":true},{"path":"src/observability/index.ts","kind":"import-statement","original":"../observability/index.js"},{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"}],"format":"esm"},"src/utils/json-schema.ts":{"bytes":43478,"imports":[{"path":"node:net","kind":"import-statement","external":true}],"format":"esm"},"src/providers/tool-schema-projection.ts":{"bytes":12249,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/utils/json-schema.ts","kind":"import-statement","original":"../utils/json-schema.js"}],"format":"esm"},"src/providers/direct-provider.ts":{"bytes":42229,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/utils/tool-result-content.ts","kind":"import-statement","original":"../utils/tool-result-content.js"},{"path":"src/providers/bounded-provider-transport.ts","kind":"import-statement","original":"./bounded-provider-transport.js"},{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"},{"path":"src/providers/tool-schema-projection.ts","kind":"import-statement","original":"./tool-schema-projection.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":809,"imports":[],"format":"esm"},"src/providers/catalog.ts":{"bytes":22193,"imports":[{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1489,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/control-plane/lock.ts":{"bytes":2496,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/providers/file-connection-store.ts":{"bytes":8269,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"../artifacts/hash.js"},{"path":"src/control-plane/lock.ts","kind":"import-statement","original":"../control-plane/lock.js"},{"path":"src/providers/catalog.ts","kind":"import-statement","original":"./catalog.js"}],"format":"esm"},"src/providers/index.ts":{"bytes":1500,"imports":[{"path":"src/providers/DualLLMProvider.ts","kind":"import-statement","original":"./DualLLMProvider.js"},{"path":"src/providers/direct-provider.ts","kind":"import-statement","original":"./direct-provider.js"},{"path":"src/providers/provider-errors.ts","kind":"import-statement","original":"./provider-errors.js"},{"path":"src/providers/endpoint-policy.ts","kind":"import-statement","original":"./endpoint-policy.js"},{"path":"src/providers/tool-schema-projection.ts","kind":"import-statement","original":"./tool-schema-projection.js"},{"path":"src/providers/catalog.ts","kind":"import-statement","original":"./catalog.js"},{"path":"src/providers/file-connection-store.ts","kind":"import-statement","original":"./file-connection-store.js"}],"format":"esm"}},"outputs":{"dist/providers/index.js":{"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:perf_hooks","kind":"import-statement","external":true},{"path":"node:dns/promises","kind":"import-statement","external":true},{"path":"node:net","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:net","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"exports":["BUILT_IN_XENO_PROVIDER_PRESETS","DualLLMProvider","FileXenoProviderConnectionStore","ProviderError","ToolSchemaProjectionError","XENO_PROVIDER_CATALOG_SCHEMA_VERSION","XENO_PROVIDER_CONNECTION_STORE_SCHEMA_VERSION","XenoProviderCatalog","assertDirectEndpointResolution","classifyProviderHttpError","createDirectProvider","directProviderConfigFromConnection","parseRetryAfter","probeXenoProvider","projectToolDefinitionsForProvider","projectToolSchemaForProvider","providerCapabilityError","providerProtocolError","selectXenoProviderRoute","validateDirectEndpoint"],"entryPoint":"src/providers/index.ts","inputs":{"src/config/models.ts":{"bytesInOutput":50},"src/core/llm-provider.ts":{"bytesInOutput":1072},"src/providers/DualLLMProvider.ts":{"bytesInOutput":5733},"src/providers/index.ts":{"bytesInOutput":0},"src/providers/direct-provider.ts":{"bytesInOutput":21409},"src/utils/tool-result-content.ts":{"bytesInOutput":435},"src/providers/bounded-provider-transport.ts":{"bytesInOutput":5090},"src/observability/telemetry.ts":{"bytesInOutput":1599},"src/observability/index.ts":{"bytesInOutput":0},"src/providers/endpoint-policy.ts":{"bytesInOutput":2943},"src/providers/provider-errors.ts":{"bytesInOutput":3038},"src/providers/tool-schema-projection.ts":{"bytesInOutput":5702},"src/utils/json-schema.ts":{"bytesInOutput":19764},"src/utils/text-security.ts":{"bytesInOutput":180},"src/providers/catalog.ts":{"bytesInOutput":10865},"src/providers/file-connection-store.ts":{"bytesInOutput":3786},"src/artifacts/hash.ts":{"bytesInOutput":564},"src/control-plane/lock.ts":{"bytesInOutput":1054}},"bytes":83931}}}
@@ -1 +1 @@
1
- {"inputs":{"src/artifacts/types.ts":{"bytes":9397,"imports":[],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1530,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25931,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/evidence-graph.ts":{"bytes":9299,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/repository.ts":{"bytes":30001,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/control-plane/lock.ts":{"bytes":2591,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/version.ts":{"bytes":37,"imports":[],"format":"esm"},"src/artifacts/file-repository.ts":{"bytes":16811,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/control-plane/lock.ts","kind":"import-statement","original":"../control-plane/lock.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/diff-artifact.ts":{"bytes":18491,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/review-service.ts":{"bytes":8903,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"}],"format":"esm"},"src/artifacts/spec-lifecycle.ts":{"bytes":31787,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/multi-agent-review.ts":{"bytes":30924,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/legacy-adapters.ts":{"bytes":11181,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"}],"format":"esm"},"src/artifacts/index.ts":{"bytes":396,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/evidence-graph.ts","kind":"import-statement","original":"./evidence-graph.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/file-repository.ts","kind":"import-statement","original":"./file-repository.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/spec-lifecycle.ts","kind":"import-statement","original":"./spec-lifecycle.js"},{"path":"src/artifacts/multi-agent-review.ts","kind":"import-statement","original":"./multi-agent-review.js"},{"path":"src/artifacts/legacy-adapters.ts","kind":"import-statement","original":"./legacy-adapters.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":833,"imports":[],"format":"esm"},"src/recipes/protocol.ts":{"bytes":20322,"imports":[{"path":"src/artifacts/index.ts","kind":"import-statement","original":"../artifacts/index.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/recipes/index.ts":{"bytes":32,"imports":[{"path":"src/recipes/protocol.ts","kind":"import-statement","original":"./protocol.js"}],"format":"esm"}},"outputs":{"dist/recipes/index.cjs":{"imports":[{"path":"node:crypto","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/recipes/index.ts","inputs":{"src/recipes/index.ts":{"bytesInOutput":249},"src/artifacts/index.ts":{"bytesInOutput":0},"src/artifacts/hash.ts":{"bytesInOutput":715},"src/artifacts/validation.ts":{"bytesInOutput":50},"src/artifacts/file-repository.ts":{"bytesInOutput":20},"src/artifacts/diff-artifact.ts":{"bytesInOutput":20},"src/utils/text-security.ts":{"bytesInOutput":179},"src/recipes/protocol.ts":{"bytesInOutput":10069}},"bytes":11921}}}
1
+ {"inputs":{"src/artifacts/types.ts":{"bytes":9012,"imports":[],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1489,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25422,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/evidence-graph.ts":{"bytes":9069,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/repository.ts":{"bytes":29289,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/control-plane/lock.ts":{"bytes":2496,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/version.ts":{"bytes":36,"imports":[],"format":"esm"},"src/artifacts/file-repository.ts":{"bytes":16334,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/control-plane/lock.ts","kind":"import-statement","original":"../control-plane/lock.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/diff-artifact.ts":{"bytes":17998,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/review-service.ts":{"bytes":8672,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"}],"format":"esm"},"src/artifacts/spec-lifecycle.ts":{"bytes":31007,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/multi-agent-review.ts":{"bytes":30258,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/legacy-adapters.ts":{"bytes":10908,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"}],"format":"esm"},"src/artifacts/index.ts":{"bytes":385,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/evidence-graph.ts","kind":"import-statement","original":"./evidence-graph.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/file-repository.ts","kind":"import-statement","original":"./file-repository.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/spec-lifecycle.ts","kind":"import-statement","original":"./spec-lifecycle.js"},{"path":"src/artifacts/multi-agent-review.ts","kind":"import-statement","original":"./multi-agent-review.js"},{"path":"src/artifacts/legacy-adapters.ts","kind":"import-statement","original":"./legacy-adapters.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":809,"imports":[],"format":"esm"},"src/recipes/protocol.ts":{"bytes":19944,"imports":[{"path":"src/artifacts/index.ts","kind":"import-statement","original":"../artifacts/index.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/recipes/index.ts":{"bytes":31,"imports":[{"path":"src/recipes/protocol.ts","kind":"import-statement","original":"./protocol.js"}],"format":"esm"}},"outputs":{"dist/recipes/index.cjs":{"imports":[{"path":"node:crypto","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/recipes/index.ts","inputs":{"src/recipes/index.ts":{"bytesInOutput":249},"src/artifacts/index.ts":{"bytesInOutput":0},"src/artifacts/hash.ts":{"bytesInOutput":715},"src/artifacts/validation.ts":{"bytesInOutput":50},"src/artifacts/file-repository.ts":{"bytesInOutput":20},"src/artifacts/diff-artifact.ts":{"bytesInOutput":20},"src/utils/text-security.ts":{"bytesInOutput":179},"src/recipes/protocol.ts":{"bytesInOutput":10069}},"bytes":11921}}}
@@ -1 +1 @@
1
- {"inputs":{"src/artifacts/types.ts":{"bytes":9397,"imports":[],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1530,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25931,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/evidence-graph.ts":{"bytes":9299,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/repository.ts":{"bytes":30001,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/control-plane/lock.ts":{"bytes":2591,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/version.ts":{"bytes":37,"imports":[],"format":"esm"},"src/artifacts/file-repository.ts":{"bytes":16811,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/control-plane/lock.ts","kind":"import-statement","original":"../control-plane/lock.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/diff-artifact.ts":{"bytes":18491,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/review-service.ts":{"bytes":8903,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"}],"format":"esm"},"src/artifacts/spec-lifecycle.ts":{"bytes":31787,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/multi-agent-review.ts":{"bytes":30924,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/legacy-adapters.ts":{"bytes":11181,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"}],"format":"esm"},"src/artifacts/index.ts":{"bytes":396,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/evidence-graph.ts","kind":"import-statement","original":"./evidence-graph.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/file-repository.ts","kind":"import-statement","original":"./file-repository.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/spec-lifecycle.ts","kind":"import-statement","original":"./spec-lifecycle.js"},{"path":"src/artifacts/multi-agent-review.ts","kind":"import-statement","original":"./multi-agent-review.js"},{"path":"src/artifacts/legacy-adapters.ts","kind":"import-statement","original":"./legacy-adapters.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":833,"imports":[],"format":"esm"},"src/recipes/protocol.ts":{"bytes":20322,"imports":[{"path":"src/artifacts/index.ts","kind":"import-statement","original":"../artifacts/index.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/recipes/index.ts":{"bytes":32,"imports":[{"path":"src/recipes/protocol.ts","kind":"import-statement","original":"./protocol.js"}],"format":"esm"}},"outputs":{"dist/recipes/index.js":{"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"exports":["XENO_RECIPE_SCHEMA_VERSION","XenoRecipeValidationError","assertValidXenoRecipeDefinition","compileXenoRecipe","parseXenoRecipeDefinition","serializeXenoRecipe","xenoRecipeFingerprint"],"entryPoint":"src/recipes/index.ts","inputs":{"src/artifacts/index.ts":{"bytesInOutput":0},"src/artifacts/hash.ts":{"bytesInOutput":712},"src/artifacts/validation.ts":{"bytesInOutput":49},"src/artifacts/file-repository.ts":{"bytesInOutput":20},"src/artifacts/diff-artifact.ts":{"bytesInOutput":20},"src/utils/text-security.ts":{"bytesInOutput":179},"src/recipes/protocol.ts":{"bytesInOutput":10072},"src/recipes/index.ts":{"bytesInOutput":0}},"bytes":11270}}}
1
+ {"inputs":{"src/artifacts/types.ts":{"bytes":9012,"imports":[],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1489,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25422,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/evidence-graph.ts":{"bytes":9069,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/repository.ts":{"bytes":29289,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/control-plane/lock.ts":{"bytes":2496,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/version.ts":{"bytes":36,"imports":[],"format":"esm"},"src/artifacts/file-repository.ts":{"bytes":16334,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/control-plane/lock.ts","kind":"import-statement","original":"../control-plane/lock.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/diff-artifact.ts":{"bytes":17998,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/review-service.ts":{"bytes":8672,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"}],"format":"esm"},"src/artifacts/spec-lifecycle.ts":{"bytes":31007,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/multi-agent-review.ts":{"bytes":30258,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/legacy-adapters.ts":{"bytes":10908,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"}],"format":"esm"},"src/artifacts/index.ts":{"bytes":385,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/evidence-graph.ts","kind":"import-statement","original":"./evidence-graph.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/file-repository.ts","kind":"import-statement","original":"./file-repository.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/spec-lifecycle.ts","kind":"import-statement","original":"./spec-lifecycle.js"},{"path":"src/artifacts/multi-agent-review.ts","kind":"import-statement","original":"./multi-agent-review.js"},{"path":"src/artifacts/legacy-adapters.ts","kind":"import-statement","original":"./legacy-adapters.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":809,"imports":[],"format":"esm"},"src/recipes/protocol.ts":{"bytes":19944,"imports":[{"path":"src/artifacts/index.ts","kind":"import-statement","original":"../artifacts/index.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/recipes/index.ts":{"bytes":31,"imports":[{"path":"src/recipes/protocol.ts","kind":"import-statement","original":"./protocol.js"}],"format":"esm"}},"outputs":{"dist/recipes/index.js":{"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"exports":["XENO_RECIPE_SCHEMA_VERSION","XenoRecipeValidationError","assertValidXenoRecipeDefinition","compileXenoRecipe","parseXenoRecipeDefinition","serializeXenoRecipe","xenoRecipeFingerprint"],"entryPoint":"src/recipes/index.ts","inputs":{"src/artifacts/index.ts":{"bytesInOutput":0},"src/artifacts/hash.ts":{"bytesInOutput":712},"src/artifacts/validation.ts":{"bytesInOutput":49},"src/artifacts/file-repository.ts":{"bytesInOutput":20},"src/artifacts/diff-artifact.ts":{"bytesInOutput":20},"src/utils/text-security.ts":{"bytesInOutput":179},"src/recipes/protocol.ts":{"bytesInOutput":10072},"src/recipes/index.ts":{"bytesInOutput":0}},"bytes":11270}}}
@@ -1 +1 @@
1
- {"inputs":{"src/artifacts/types.ts":{"bytes":9397,"imports":[],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1530,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25931,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/evidence-graph.ts":{"bytes":9299,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/repository.ts":{"bytes":30001,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/control-plane/lock.ts":{"bytes":2591,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/version.ts":{"bytes":37,"imports":[],"format":"esm"},"src/artifacts/file-repository.ts":{"bytes":16811,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/control-plane/lock.ts","kind":"import-statement","original":"../control-plane/lock.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/diff-artifact.ts":{"bytes":18491,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/review-service.ts":{"bytes":8903,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"}],"format":"esm"},"src/artifacts/spec-lifecycle.ts":{"bytes":31787,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/multi-agent-review.ts":{"bytes":30924,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/legacy-adapters.ts":{"bytes":11181,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"}],"format":"esm"},"src/artifacts/index.ts":{"bytes":396,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/evidence-graph.ts","kind":"import-statement","original":"./evidence-graph.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/file-repository.ts","kind":"import-statement","original":"./file-repository.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/spec-lifecycle.ts","kind":"import-statement","original":"./spec-lifecycle.js"},{"path":"src/artifacts/multi-agent-review.ts","kind":"import-statement","original":"./multi-agent-review.js"},{"path":"src/artifacts/legacy-adapters.ts","kind":"import-statement","original":"./legacy-adapters.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":833,"imports":[],"format":"esm"},"src/research/source-research.ts":{"bytes":19344,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/index.ts","kind":"import-statement","original":"../artifacts/index.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/research/index.ts":{"bytes":39,"imports":[{"path":"src/research/source-research.ts","kind":"import-statement","original":"./source-research.js"}],"format":"esm"}},"outputs":{"dist/research/index.cjs":{"imports":[{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/research/index.ts","inputs":{"src/research/index.ts":{"bytesInOutput":343},"src/research/source-research.ts":{"bytesInOutput":9356},"src/artifacts/index.ts":{"bytesInOutput":0},"src/artifacts/hash.ts":{"bytesInOutput":715},"src/artifacts/validation.ts":{"bytesInOutput":50},"src/artifacts/file-repository.ts":{"bytesInOutput":20},"src/artifacts/diff-artifact.ts":{"bytesInOutput":20},"src/utils/text-security.ts":{"bytesInOutput":179}},"bytes":11390}}}
1
+ {"inputs":{"src/artifacts/types.ts":{"bytes":9012,"imports":[],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1489,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25422,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/evidence-graph.ts":{"bytes":9069,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/repository.ts":{"bytes":29289,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/control-plane/lock.ts":{"bytes":2496,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/version.ts":{"bytes":36,"imports":[],"format":"esm"},"src/artifacts/file-repository.ts":{"bytes":16334,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/control-plane/lock.ts","kind":"import-statement","original":"../control-plane/lock.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/diff-artifact.ts":{"bytes":17998,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/review-service.ts":{"bytes":8672,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"}],"format":"esm"},"src/artifacts/spec-lifecycle.ts":{"bytes":31007,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/multi-agent-review.ts":{"bytes":30258,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/legacy-adapters.ts":{"bytes":10908,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"}],"format":"esm"},"src/artifacts/index.ts":{"bytes":385,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/evidence-graph.ts","kind":"import-statement","original":"./evidence-graph.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/file-repository.ts","kind":"import-statement","original":"./file-repository.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/spec-lifecycle.ts","kind":"import-statement","original":"./spec-lifecycle.js"},{"path":"src/artifacts/multi-agent-review.ts","kind":"import-statement","original":"./multi-agent-review.js"},{"path":"src/artifacts/legacy-adapters.ts","kind":"import-statement","original":"./legacy-adapters.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":809,"imports":[],"format":"esm"},"src/research/source-research.ts":{"bytes":18957,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/index.ts","kind":"import-statement","original":"../artifacts/index.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/research/index.ts":{"bytes":38,"imports":[{"path":"src/research/source-research.ts","kind":"import-statement","original":"./source-research.js"}],"format":"esm"}},"outputs":{"dist/research/index.cjs":{"imports":[{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/research/index.ts","inputs":{"src/research/index.ts":{"bytesInOutput":343},"src/research/source-research.ts":{"bytesInOutput":9356},"src/artifacts/index.ts":{"bytesInOutput":0},"src/artifacts/hash.ts":{"bytesInOutput":715},"src/artifacts/validation.ts":{"bytesInOutput":50},"src/artifacts/file-repository.ts":{"bytesInOutput":20},"src/artifacts/diff-artifact.ts":{"bytesInOutput":20},"src/utils/text-security.ts":{"bytesInOutput":179}},"bytes":11390}}}
@@ -1 +1 @@
1
- {"inputs":{"src/artifacts/types.ts":{"bytes":9397,"imports":[],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1530,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25931,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/evidence-graph.ts":{"bytes":9299,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/repository.ts":{"bytes":30001,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/control-plane/lock.ts":{"bytes":2591,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/version.ts":{"bytes":37,"imports":[],"format":"esm"},"src/artifacts/file-repository.ts":{"bytes":16811,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/control-plane/lock.ts","kind":"import-statement","original":"../control-plane/lock.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/diff-artifact.ts":{"bytes":18491,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/review-service.ts":{"bytes":8903,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"}],"format":"esm"},"src/artifacts/spec-lifecycle.ts":{"bytes":31787,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/multi-agent-review.ts":{"bytes":30924,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/legacy-adapters.ts":{"bytes":11181,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"}],"format":"esm"},"src/artifacts/index.ts":{"bytes":396,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/evidence-graph.ts","kind":"import-statement","original":"./evidence-graph.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/file-repository.ts","kind":"import-statement","original":"./file-repository.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/spec-lifecycle.ts","kind":"import-statement","original":"./spec-lifecycle.js"},{"path":"src/artifacts/multi-agent-review.ts","kind":"import-statement","original":"./multi-agent-review.js"},{"path":"src/artifacts/legacy-adapters.ts","kind":"import-statement","original":"./legacy-adapters.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":833,"imports":[],"format":"esm"},"src/research/source-research.ts":{"bytes":19344,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/index.ts","kind":"import-statement","original":"../artifacts/index.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/research/index.ts":{"bytes":39,"imports":[{"path":"src/research/source-research.ts","kind":"import-statement","original":"./source-research.js"}],"format":"esm"}},"outputs":{"dist/research/index.js":{"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true}],"exports":["XENO_SOURCE_RESEARCH_SCHEMA_VERSION","XenoSourceResearchValidationError","assertValidXenoSourceResearchReport","createXenoSourceResearchExcerpt","createXenoSourceResearchReport","normalizeSourceText","xenoArtifactToSourceResearchReport","xenoSourceResearchReportToArtifact"],"entryPoint":"src/research/index.ts","inputs":{"src/research/source-research.ts":{"bytesInOutput":9342},"src/artifacts/index.ts":{"bytesInOutput":0},"src/artifacts/hash.ts":{"bytesInOutput":712},"src/artifacts/validation.ts":{"bytesInOutput":49},"src/artifacts/file-repository.ts":{"bytesInOutput":20},"src/artifacts/diff-artifact.ts":{"bytesInOutput":20},"src/utils/text-security.ts":{"bytesInOutput":179},"src/research/index.ts":{"bytesInOutput":0}},"bytes":10634}}}
1
+ {"inputs":{"src/artifacts/types.ts":{"bytes":9012,"imports":[],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1489,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25422,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/evidence-graph.ts":{"bytes":9069,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/repository.ts":{"bytes":29289,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/control-plane/lock.ts":{"bytes":2496,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/version.ts":{"bytes":36,"imports":[],"format":"esm"},"src/artifacts/file-repository.ts":{"bytes":16334,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/control-plane/lock.ts","kind":"import-statement","original":"../control-plane/lock.js"},{"path":"src/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/diff-artifact.ts":{"bytes":17998,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/review-service.ts":{"bytes":8672,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"}],"format":"esm"},"src/artifacts/spec-lifecycle.ts":{"bytes":31007,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/multi-agent-review.ts":{"bytes":30258,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"}],"format":"esm"},"src/artifacts/legacy-adapters.ts":{"bytes":10908,"imports":[{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"}],"format":"esm"},"src/artifacts/index.ts":{"bytes":385,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/artifacts/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/artifacts/evidence-graph.ts","kind":"import-statement","original":"./evidence-graph.js"},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"./repository.js"},{"path":"src/artifacts/file-repository.ts","kind":"import-statement","original":"./file-repository.js"},{"path":"src/artifacts/diff-artifact.ts","kind":"import-statement","original":"./diff-artifact.js"},{"path":"src/artifacts/review-service.ts","kind":"import-statement","original":"./review-service.js"},{"path":"src/artifacts/spec-lifecycle.ts","kind":"import-statement","original":"./spec-lifecycle.js"},{"path":"src/artifacts/multi-agent-review.ts","kind":"import-statement","original":"./multi-agent-review.js"},{"path":"src/artifacts/legacy-adapters.ts","kind":"import-statement","original":"./legacy-adapters.js"}],"format":"esm"},"src/utils/text-security.ts":{"bytes":809,"imports":[],"format":"esm"},"src/research/source-research.ts":{"bytes":18957,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/index.ts","kind":"import-statement","original":"../artifacts/index.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"../utils/text-security.js"}],"format":"esm"},"src/research/index.ts":{"bytes":38,"imports":[{"path":"src/research/source-research.ts","kind":"import-statement","original":"./source-research.js"}],"format":"esm"}},"outputs":{"dist/research/index.js":{"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true}],"exports":["XENO_SOURCE_RESEARCH_SCHEMA_VERSION","XenoSourceResearchValidationError","assertValidXenoSourceResearchReport","createXenoSourceResearchExcerpt","createXenoSourceResearchReport","normalizeSourceText","xenoArtifactToSourceResearchReport","xenoSourceResearchReportToArtifact"],"entryPoint":"src/research/index.ts","inputs":{"src/research/source-research.ts":{"bytesInOutput":9342},"src/artifacts/index.ts":{"bytesInOutput":0},"src/artifacts/hash.ts":{"bytesInOutput":712},"src/artifacts/validation.ts":{"bytesInOutput":49},"src/artifacts/file-repository.ts":{"bytesInOutput":20},"src/artifacts/diff-artifact.ts":{"bytesInOutput":20},"src/utils/text-security.ts":{"bytesInOutput":179},"src/research/index.ts":{"bytesInOutput":0}},"bytes":10634}}}
@@ -46,7 +46,7 @@ ${this.stringify(t.data)}
46
46
  `)+`
47
47
  `;await f(this.transcriptPath,a);let l=this.buildMarkdownDocument(o,"session store");if(await f(this.markdownPath,l),!this.workspaceMirrorDisabled){let c=await this.resolveWorkspaceMarkdownPath();if(c)try{let u=this.buildMarkdownDocument(o,"workspace mirror");await f(c,u)}catch(u){this.workspaceMirrorDisabled=!0,E("Transcript workspace mirror disabled",u)}}}async truncateAfterMessageCount(t){let e=await m(this.transcriptPath);if(!e)return;let r=H(e),i=Math.max(0,t),s=0,o=[];for(let c of r){if(c.type==="user_message"||c.type==="assistant_message"){if(s>=i)break;s+=1}o.push(c)}let a=o.length>0?o.map(c=>JSON.stringify(c)).join(`
48
48
  `)+`
49
- `:"";await f(this.transcriptPath,a);let l=this.buildMarkdownDocument(o,"session store");if(await f(this.markdownPath,l),!this.workspaceMirrorDisabled){let c=await this.resolveWorkspaceMarkdownPath();if(c)try{let u=this.buildMarkdownDocument(o,"workspace mirror");await f(c,u)}catch(u){this.workspaceMirrorDisabled=!0,E("Transcript workspace mirror disabled",u)}}}getSequence(){return this.sequence}async initialize(){try{let t=await m(this.transcriptPath);if(!t){this.sequence=0;return}let e=H(t);if(e.length===0){this.sequence=0;return}let r=e[e.length-1];this.sequence=r.sequence+1}catch(t){let e=t instanceof Error?t.message:String(t);E(`Transcript initialization warning: ${e}. Starting with empty transcript.`),this.sequence=0}}async flush(){await this.writeQueue}};var W=y(require("path"),1),Nt=require("crypto"),Bt=require("fs/promises");var le={View:"Read",Replace:"Write",GlobTool:"Glob",GrepTool:"Grep",SQLiteAnalyze:"SqliteAnalyze",ReadNotebook:"NotebookRead",NotebookEditCell:"NotebookEdit"};function nt(n){return le[n]??n}var A=class{sessionDir;checkpointsDir;autoInterval;lastCheckpointMessageCount=0;constructor(t,e){this.sessionDir=t,this.checkpointsDir=W.join(t,"checkpoints"),this.autoInterval=e?.autoInterval??10}async initialize(){let t=await this.list();t.length>0&&(this.lastCheckpointMessageCount=t[0].messageCount)}async create(t){await B(this.checkpointsDir);let e=(0,Nt.randomUUID)(),r={id:e,name:t.description,trigger:t.trigger,createdAt:new Date().toISOString(),messageCount:t.messages.length,tokenCount:this.estimateTokens(t.messages)},i={info:r,messages:t.messages},s=W.join(this.checkpointsDir,`${e}.json`);return await f(s,JSON.stringify(i,null,2)),this.lastCheckpointMessageCount=t.messages.length,r}async list(){let t=await Ct(this.checkpointsDir,/\.json$/),e=[];for(let r of t){let i=await m(r);if(i){let s=k(i,null);if(s){let o=await(0,Bt.stat)(r);e.push({info:s.info,modifiedAtMs:o.mtimeMs})}}}return e.sort((r,i)=>new Date(i.info.createdAt).getTime()-new Date(r.info.createdAt).getTime()||i.modifiedAtMs-r.modifiedAtMs).map(({info:r})=>r)}async restore(t){let e=W.join(this.checkpointsDir,`${t}.json`),r;try{r=await m(e)}catch(s){let o=s instanceof Error?s.message:String(s);throw new Error(`Failed to read checkpoint ${t}: ${o}`)}if(!r)throw new Error(`Checkpoint not found: ${t} (path: ${e})`);let i=k(r,null);if(!i)throw new Error(`Invalid checkpoint data for ${t}: JSON parse failed`);if(!i.messages||!Array.isArray(i.messages))throw new Error(`Invalid checkpoint data for ${t}: missing or invalid messages array`);if(!i.info)throw new Error(`Invalid checkpoint data for ${t}: missing info object`);return{messages:i.messages,info:i.info}}shouldAutoCheckpoint(t){return t-this.lastCheckpointMessageCount>=this.autoInterval}static isDangerousOperation(t,e){if(t=nt(t),t==="Write")return!0;if(t==="Bash"){let i=e.command?.toLowerCase()||"";return["rm ","del ","git push","git reset","drop ","truncate"].some(o=>i.includes(o))}return!1}async delete(t){let e=W.join(this.checkpointsDir,`${t}.json`);await b(e)}estimateTokens(t){let e=0;for(let r of t)if(typeof r.content=="string")e+=Math.ceil(r.content.length/4);else if(Array.isArray(r.content))for(let i of r.content)"text"in i&&(e+=Math.ceil(i.text.length/4));return e}};var R=y(require("path"),1),wt=y(require("os"),1),L=y(require("fs"),1);var ue=Symbol.for("@xenosystem/agent-sdk/shutdown-registry"),pe=globalThis,ft=pe[ue]??={cleanups:new Set,exitHandlerRegistered:!1,signalHandlersInstalled:!1},ht=ft.cleanups;function de(){for(let n of ht)try{n()}catch{}}function Lt(n){return ht.add(n),!ft.exitHandlerRegistered&&typeof process<"u"&&typeof process.on=="function"&&(ft.exitHandlerRegistered=!0,process.on("exit",de)),()=>{ht.delete(n)}}var jt="0.8.13";var ge=1e4,me=6e4,fe="session.lock",he="lock.json",U=new Set;function we(){for(let n of U)try{L.unlinkSync(n)}catch{}U.clear()}Lt(we);var _=class n{sessionDir;lockPath;legacyLockPath;sessionId;heartbeatTimer;constructor(t){this.sessionDir=t,this.lockPath=R.join(t,fe),this.legacyLockPath=R.join(t,he),this.sessionId=R.basename(t)}async acquire(){let t=new Date().toISOString(),e={schemaVersion:1,name:`session:${this.sessionId}`,sessionId:this.sessionId,pid:process.pid,hostname:wt.hostname(),processStartedAt:new Date(Date.now()-Math.floor(process.uptime()*1e3)).toISOString(),version:jt,acquiredAt:t,updatedAt:t,heartbeat:t},r=R.dirname(this.lockPath);await L.promises.mkdir(r,{recursive:!0});let i=await this.findExistingLockPath();if(i){if(!await this.isStalePath(i)){let o=await this.readLockAt(i);throw new Error(`Session ${this.sessionId} is already locked by PID ${o?.pid} on ${o?.hostname}`)}await b(i)}try{await L.promises.writeFile(this.lockPath,JSON.stringify(e,null,2),{flag:"wx",encoding:"utf-8"}),U.add(this.lockPath)}catch(s){if(s.code==="EEXIST"){if(!await this.isStalePath(this.lockPath)){let l=await this.readLockAt(this.lockPath);throw new Error(`Session ${this.sessionId} is already locked by PID ${l?.pid} on ${l?.hostname}`)}await b(this.lockPath);try{await L.promises.writeFile(this.lockPath,JSON.stringify(e,null,2),{flag:"wx",encoding:"utf-8"})}catch(l){throw l.code==="EEXIST"?new Error(`Session ${this.sessionId} lock was acquired by another process during stale recovery`):l}U.add(this.lockPath)}else throw s}}async release(){this.stopHeartbeat(),U.delete(this.lockPath),await b(this.lockPath)}async isLocked(){let t=await this.findExistingLockPath();return t?!await this.isStalePath(t):!1}async isStale(){let t=await this.findExistingLockPath();return t?this.isStalePath(t):!1}async isStalePath(t){let e=await this.readLockAt(t);if(!e)return!1;let r=new Date(e.heartbeat).getTime();return Date.now()-r>me}startHeartbeat(t=ge){this.heartbeatTimer&&this.stopHeartbeat(),this.heartbeatTimer=setInterval(async()=>{try{await this.updateHeartbeat()}catch(e){let r=e instanceof Error?e.message:String(e);if(e?.code==="ENOENT"){I("SessionLock: Session directory removed, stopping heartbeat"),this.stopHeartbeat();return}I(`SessionLock: Failed to update heartbeat: ${r}`)}},t),this.heartbeatTimer.unref()}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0)}async updateHeartbeat(){let t=await this.readLockAt(this.lockPath);t&&(t.pid!==process.pid||t.hostname!==wt.hostname()||(t.heartbeat=new Date().toISOString(),t.updatedAt=t.heartbeat,await f(this.lockPath,JSON.stringify(t,null,2))))}async readLock(){let t=await this.findExistingLockPath();return t?this.readLockAt(t):null}async readLockAt(t){let e=await m(t);return e?k(e,null):null}async findExistingLockPath(){return await m(this.lockPath)?this.lockPath:await m(this.legacyLockPath)?this.legacyLockPath:null}static async cleanStale(t){let e=await Z(t),r=[];for(let i of e){let s=new n(i);if(await s.isStale()){let a=await s.findExistingLockPath();a&&await b(a),r.push(R.basename(i))}}return r}};var v=y(require("path"),1),Gt=y(require("os"),1);var P=y(require("path"),1);function ye(n,t){let e=P.resolve(n),r=P.resolve(n,t);return r===e?!0:e===P.parse(e).root?r.startsWith(e):r.startsWith(e+P.sep)}function O(n,t){if(P.isAbsolute(t))return P.resolve(t);if(!ye(n,t))throw new Error(`PathSecurity: Path traversal attempt detected: ${t}`);return P.resolve(n,t)}var $=y(require("path"),1),kt=y(require("os"),1);var yt=1,ke="recent.json";function j(n=kt.homedir()){return $.join(n,".xeno-agent",ke)}function J(n){let t=$.normalize(n).replace(/[\\/]+$/,""),e=t.length>0?t:$.parse($.normalize(n)).root;return process.platform==="win32"?e.toLowerCase():e}async function F(n=kt.homedir()){let t={version:yt,entries:{}},e=j(n);if(!Y(e))return t;let r=await m(e);if(!r)return t;let i=k(r,null);if(!i||typeof i!="object")return t;let s=i;if(s.version!==yt||!s.entries||typeof s.entries!="object")return t;let o={};for(let[a,l]of Object.entries(s.entries)){if(!l||typeof l!="object")continue;let c=l;typeof c.sessionId!="string"||c.sessionId.length===0||typeof c.endedAt=="string"&&(o[a]={sessionId:c.sessionId,endedAt:c.endedAt,role:typeof c.role=="string"?c.role:void 0})}return{version:yt,entries:o}}async function it(n,t={}){let e=await F(t.homeDir),r=J(n),i=e.entries[r];if(i&&!(t.role&&i.role&&i.role!==t.role))return i}async function st(n,t={}){let e=await F(t.homeDir),r=J(n.cwd);e.entries[r]={sessionId:n.sessionId,role:n.role,endedAt:n.endedAt??new Date().toISOString()};let i=j(t.homeDir);await f(i,JSON.stringify(e,null,2)+`
49
+ `:"";await f(this.transcriptPath,a);let l=this.buildMarkdownDocument(o,"session store");if(await f(this.markdownPath,l),!this.workspaceMirrorDisabled){let c=await this.resolveWorkspaceMarkdownPath();if(c)try{let u=this.buildMarkdownDocument(o,"workspace mirror");await f(c,u)}catch(u){this.workspaceMirrorDisabled=!0,E("Transcript workspace mirror disabled",u)}}}getSequence(){return this.sequence}async initialize(){try{let t=await m(this.transcriptPath);if(!t){this.sequence=0;return}let e=H(t);if(e.length===0){this.sequence=0;return}let r=e[e.length-1];this.sequence=r.sequence+1}catch(t){let e=t instanceof Error?t.message:String(t);E(`Transcript initialization warning: ${e}. Starting with empty transcript.`),this.sequence=0}}async flush(){await this.writeQueue}};var W=y(require("path"),1),Nt=require("crypto"),Bt=require("fs/promises");var le={View:"Read",Replace:"Write",GlobTool:"Glob",GrepTool:"Grep",SQLiteAnalyze:"SqliteAnalyze",ReadNotebook:"NotebookRead",NotebookEditCell:"NotebookEdit"};function nt(n){return le[n]??n}var A=class{sessionDir;checkpointsDir;autoInterval;lastCheckpointMessageCount=0;constructor(t,e){this.sessionDir=t,this.checkpointsDir=W.join(t,"checkpoints"),this.autoInterval=e?.autoInterval??10}async initialize(){let t=await this.list();t.length>0&&(this.lastCheckpointMessageCount=t[0].messageCount)}async create(t){await B(this.checkpointsDir);let e=(0,Nt.randomUUID)(),r={id:e,name:t.description,trigger:t.trigger,createdAt:new Date().toISOString(),messageCount:t.messages.length,tokenCount:this.estimateTokens(t.messages)},i={info:r,messages:t.messages},s=W.join(this.checkpointsDir,`${e}.json`);return await f(s,JSON.stringify(i,null,2)),this.lastCheckpointMessageCount=t.messages.length,r}async list(){let t=await Ct(this.checkpointsDir,/\.json$/),e=[];for(let r of t){let i=await m(r);if(i){let s=k(i,null);if(s){let o=await(0,Bt.stat)(r);e.push({info:s.info,modifiedAtMs:o.mtimeMs})}}}return e.sort((r,i)=>new Date(i.info.createdAt).getTime()-new Date(r.info.createdAt).getTime()||i.modifiedAtMs-r.modifiedAtMs).map(({info:r})=>r)}async restore(t){let e=W.join(this.checkpointsDir,`${t}.json`),r;try{r=await m(e)}catch(s){let o=s instanceof Error?s.message:String(s);throw new Error(`Failed to read checkpoint ${t}: ${o}`)}if(!r)throw new Error(`Checkpoint not found: ${t} (path: ${e})`);let i=k(r,null);if(!i)throw new Error(`Invalid checkpoint data for ${t}: JSON parse failed`);if(!i.messages||!Array.isArray(i.messages))throw new Error(`Invalid checkpoint data for ${t}: missing or invalid messages array`);if(!i.info)throw new Error(`Invalid checkpoint data for ${t}: missing info object`);return{messages:i.messages,info:i.info}}shouldAutoCheckpoint(t){return t-this.lastCheckpointMessageCount>=this.autoInterval}static isDangerousOperation(t,e){if(t=nt(t),t==="Write")return!0;if(t==="Bash"){let i=e.command?.toLowerCase()||"";return["rm ","del ","git push","git reset","drop ","truncate"].some(o=>i.includes(o))}return!1}async delete(t){let e=W.join(this.checkpointsDir,`${t}.json`);await b(e)}estimateTokens(t){let e=0;for(let r of t)if(typeof r.content=="string")e+=Math.ceil(r.content.length/4);else if(Array.isArray(r.content))for(let i of r.content)"text"in i&&(e+=Math.ceil(i.text.length/4));return e}};var R=y(require("path"),1),wt=y(require("os"),1),L=y(require("fs"),1);var ue=Symbol.for("@xenosystem/agent-sdk/shutdown-registry"),pe=globalThis,ft=pe[ue]??={cleanups:new Set,exitHandlerRegistered:!1,signalHandlersInstalled:!1},ht=ft.cleanups;function de(){for(let n of ht)try{n()}catch{}}function Lt(n){return ht.add(n),!ft.exitHandlerRegistered&&typeof process<"u"&&typeof process.on=="function"&&(ft.exitHandlerRegistered=!0,process.on("exit",de)),()=>{ht.delete(n)}}var jt="0.9.8";var ge=1e4,me=6e4,fe="session.lock",he="lock.json",U=new Set;function we(){for(let n of U)try{L.unlinkSync(n)}catch{}U.clear()}Lt(we);var _=class n{sessionDir;lockPath;legacyLockPath;sessionId;heartbeatTimer;constructor(t){this.sessionDir=t,this.lockPath=R.join(t,fe),this.legacyLockPath=R.join(t,he),this.sessionId=R.basename(t)}async acquire(){let t=new Date().toISOString(),e={schemaVersion:1,name:`session:${this.sessionId}`,sessionId:this.sessionId,pid:process.pid,hostname:wt.hostname(),processStartedAt:new Date(Date.now()-Math.floor(process.uptime()*1e3)).toISOString(),version:jt,acquiredAt:t,updatedAt:t,heartbeat:t},r=R.dirname(this.lockPath);await L.promises.mkdir(r,{recursive:!0});let i=await this.findExistingLockPath();if(i){if(!await this.isStalePath(i)){let o=await this.readLockAt(i);throw new Error(`Session ${this.sessionId} is already locked by PID ${o?.pid} on ${o?.hostname}`)}await b(i)}try{await L.promises.writeFile(this.lockPath,JSON.stringify(e,null,2),{flag:"wx",encoding:"utf-8"}),U.add(this.lockPath)}catch(s){if(s.code==="EEXIST"){if(!await this.isStalePath(this.lockPath)){let l=await this.readLockAt(this.lockPath);throw new Error(`Session ${this.sessionId} is already locked by PID ${l?.pid} on ${l?.hostname}`)}await b(this.lockPath);try{await L.promises.writeFile(this.lockPath,JSON.stringify(e,null,2),{flag:"wx",encoding:"utf-8"})}catch(l){throw l.code==="EEXIST"?new Error(`Session ${this.sessionId} lock was acquired by another process during stale recovery`):l}U.add(this.lockPath)}else throw s}}async release(){this.stopHeartbeat(),U.delete(this.lockPath),await b(this.lockPath)}async isLocked(){let t=await this.findExistingLockPath();return t?!await this.isStalePath(t):!1}async isStale(){let t=await this.findExistingLockPath();return t?this.isStalePath(t):!1}async isStalePath(t){let e=await this.readLockAt(t);if(!e)return!1;let r=new Date(e.heartbeat).getTime();return Date.now()-r>me}startHeartbeat(t=ge){this.heartbeatTimer&&this.stopHeartbeat(),this.heartbeatTimer=setInterval(async()=>{try{await this.updateHeartbeat()}catch(e){let r=e instanceof Error?e.message:String(e);if(e?.code==="ENOENT"){I("SessionLock: Session directory removed, stopping heartbeat"),this.stopHeartbeat();return}I(`SessionLock: Failed to update heartbeat: ${r}`)}},t),this.heartbeatTimer.unref()}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0)}async updateHeartbeat(){let t=await this.readLockAt(this.lockPath);t&&(t.pid!==process.pid||t.hostname!==wt.hostname()||(t.heartbeat=new Date().toISOString(),t.updatedAt=t.heartbeat,await f(this.lockPath,JSON.stringify(t,null,2))))}async readLock(){let t=await this.findExistingLockPath();return t?this.readLockAt(t):null}async readLockAt(t){let e=await m(t);return e?k(e,null):null}async findExistingLockPath(){return await m(this.lockPath)?this.lockPath:await m(this.legacyLockPath)?this.legacyLockPath:null}static async cleanStale(t){let e=await Z(t),r=[];for(let i of e){let s=new n(i);if(await s.isStale()){let a=await s.findExistingLockPath();a&&await b(a),r.push(R.basename(i))}}return r}};var v=y(require("path"),1),Gt=y(require("os"),1);var P=y(require("path"),1);function ye(n,t){let e=P.resolve(n),r=P.resolve(n,t);return r===e?!0:e===P.parse(e).root?r.startsWith(e):r.startsWith(e+P.sep)}function O(n,t){if(P.isAbsolute(t))return P.resolve(t);if(!ye(n,t))throw new Error(`PathSecurity: Path traversal attempt detected: ${t}`);return P.resolve(n,t)}var $=y(require("path"),1),kt=y(require("os"),1);var yt=1,ke="recent.json";function j(n=kt.homedir()){return $.join(n,".xeno-agent",ke)}function J(n){let t=$.normalize(n).replace(/[\\/]+$/,""),e=t.length>0?t:$.parse($.normalize(n)).root;return process.platform==="win32"?e.toLowerCase():e}async function F(n=kt.homedir()){let t={version:yt,entries:{}},e=j(n);if(!Y(e))return t;let r=await m(e);if(!r)return t;let i=k(r,null);if(!i||typeof i!="object")return t;let s=i;if(s.version!==yt||!s.entries||typeof s.entries!="object")return t;let o={};for(let[a,l]of Object.entries(s.entries)){if(!l||typeof l!="object")continue;let c=l;typeof c.sessionId!="string"||c.sessionId.length===0||typeof c.endedAt=="string"&&(o[a]={sessionId:c.sessionId,endedAt:c.endedAt,role:typeof c.role=="string"?c.role:void 0})}return{version:yt,entries:o}}async function it(n,t={}){let e=await F(t.homeDir),r=J(n),i=e.entries[r];if(i&&!(t.role&&i.role&&i.role!==t.role))return i}async function st(n,t={}){let e=await F(t.homeDir),r=J(n.cwd);e.entries[r]={sessionId:n.sessionId,role:n.role,endedAt:n.endedAt??new Date().toISOString()};let i=j(t.homeDir);await f(i,JSON.stringify(e,null,2)+`
50
50
  `)}async function Ft(n,t={}){let e=await F(t.homeDir),r=J(n);if(!(r in e.entries))return;delete e.entries[r];let i=j(t.homeDir);await f(i,JSON.stringify(e,null,2)+`
51
51
  `)}async function q(n,t={}){let e=await F(t.homeDir),r=!1;for(let[s,o]of Object.entries(e.entries))o.sessionId===n&&(delete e.entries[s],r=!0);if(!r)return;let i=j(t.homeDir);await f(i,JSON.stringify(e,null,2)+`
52
52
  `)}var N=class{static getSessionsDir(){let t=process.env.XENO_AGENT_HOME?.trim()||v.join(Gt.homedir(),".xeno-agent");return v.join(t,"sessions")}static async list(t){let e=this.getSessionsDir(),r=typeof t?.limit=="number"&&Number.isFinite(t.limit)?Math.max(0,Math.floor(t.limit)):void 0;if(r===0)return[];let i=t?.workingDirectory?this.normalizeWorkingDirectory(t.workingDirectory):void 0;if(!Y(e))return[];let s=await Z(e),o=[];for(let a of s){let l=await this.loadMeta(a);l&&(t?.status&&!t.status.includes(l.status)||t?.role&&l.role!==t.role||i&&this.normalizeWorkingDirectory(l.workingDirectory)!==i||o.push(l))}return o.sort((a,l)=>new Date(l.lastActivity).getTime()-new Date(a.lastActivity).getTime()),r!==void 0?o.slice(0,r):o}static async find(t){let e=this.getSessionsDir(),r=O(e,t);return await this.loadMeta(r)}static async findMostRecent(t){let e=typeof t=="string"?{role:t}:t??{};if(e.workingDirectory){let s=await it(e.workingDirectory,{...e.role!==void 0?{role:e.role}:{}});if(s){let o=await this.find(s.sessionId);if(o){if(!(e.role&&o.role!==e.role)){if(this.normalizeWorkingDirectory(o.workingDirectory)===this.normalizeWorkingDirectory(e.workingDirectory))return o}}else await q(s.sessionId)}}let i=(await this.list({...e.role!==void 0?{role:e.role}:{},...e.workingDirectory!==void 0?{workingDirectory:e.workingDirectory}:{},limit:1}))[0]??null;if(i&&e.workingDirectory)try{await st({cwd:i.workingDirectory,sessionId:i.id,role:i.role,endedAt:i.lastActivity})}catch{}return i}static async delete(t){let e=this.getSessionsDir(),r=O(e,t);await Mt(r),await q(t)}static async purgeWorkingDirectory(t,e){let r=new Set(e?.excludeSessionIds??[]),i=await this.list({workingDirectory:t}),s=[],o=[];for(let a of i){if(r.has(a.id)){o.push(a.id);continue}await this.delete(a.id),await this.deleteWorkspaceMirror(t,a.id),s.push(a.id)}return{deletedIds:s,skippedIds:o}}static async updateMeta(t,e){let r=this.getSessionsDir(),i=O(r,t),s=v.join(i,"meta.json"),o=await m(s);if(!o)throw new Error(`Session not found: ${t}`);let a=k(o,null);if(!a)throw new Error(`Invalid session metadata: ${t}`);let l={...a,...e,updatedAt:new Date().toISOString()};return await f(s,JSON.stringify(l,null,2)),l}static async loadMeta(t){let e=v.join(t,"meta.json"),r=await m(e);if(!r)return null;let i=k(r,null);if(!i)return null;let s=i.formatVersion;return{...i,formatVersion:typeof s=="number"&&Number.isFinite(s)&&s>0?s:1}}static getSessionDir(t){return O(this.getSessionsDir(),t)}static normalizeWorkingDirectory(t){let e=v.normalize(t).replace(/[\\/]+$/,""),r=e.length>0?e:v.parse(v.normalize(t)).root;return process.platform==="win32"?r.toLowerCase():r}static async deleteWorkspaceMirror(t,e){let r=v.join(t,".xeno","sessions",`${e}.md`);await b(r)}};var at=y(require("path"),1);var ct=class n{sessionDir;_meta;_transcript;_checkpoints;_lock;constructor(t,e,r,i,s){this.sessionDir=t,this._meta=e,this._transcript=r,this._checkpoints=i,this._lock=s}static async create(t){let e=t.role??"default",r=Q(e),i=N.getSessionDir(r),s=null,o=null;try{await B(i);let a={id:r,role:e,status:"creating",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),lastActivity:new Date().toISOString(),workingDirectory:t.workingDirectory,model:t.model,parentSession:t.parentSession,checkpoints:[],messageCount:0,tokenUsage:{input:0,output:0,total:0},formatVersion:1},l=at.join(i,"meta.json");await f(l,JSON.stringify(a,null,2)),o=new M(i);let c=new A(i);s=new _(i),await s.acquire(),s.startHeartbeat(),await o.append({type:"session_start",data:{sessionId:r,role:e,workingDirectory:t.workingDirectory,model:t.model,formatVersion:1}});let u=new n(i,a,o,c,s);return await u.updateMeta({status:"active"}),u}catch(a){if(s)try{s.stopHeartbeat(),await s.release()}catch(l){I("Error releasing lock during cleanup",l)}throw a}}static async resume(t){let e=N.getSessionDir(t.sessionId),r=null,i=null;try{let s=at.join(e,"meta.json"),o=await m(s);if(!o)throw new Error(`SessionManager: Session not found: ${t.sessionId}`);let a=k(o,null);if(!a)throw new Error(`SessionManager: Invalid session metadata: ${t.sessionId}`);a.formatVersion=St(a),i=new M(e),await i.initialize();let l=new A(e);if(r=new _(e),await r.acquire(),r.startHeartbeat(),t.fromCheckpoint){let{info:u}=await l.restore(t.fromCheckpoint);a.messageCount=u.messageCount,await i.append({type:"checkpoint",data:{id:t.fromCheckpoint,trigger:"manual",messageCount:u.messageCount}})}let c=new n(e,a,i,l,r);return await c.updateMeta({status:"active",lastActivity:new Date().toISOString()}),c}catch(s){if(r)try{r.stopHeartbeat(),await r.release()}catch(o){I("Error releasing lock during cleanup",o)}throw s}}get meta(){return{...this._meta}}get transcript(){return this._transcript}get checkpoints(){return this._checkpoints}async updateMeta(t){this._meta={...this._meta,...t,updatedAt:new Date().toISOString()};let e=at.join(this.sessionDir,"meta.json"),r=3,i=null;for(let s=0;s<r;s++)try{await f(e,JSON.stringify(this._meta,null,2));return}catch(o){i=o instanceof Error?o:new Error(String(o)),E(`Failed to write session metadata (attempt ${s+1}/${r}): ${i.message}`),s<r-1&&await new Promise(a=>setTimeout(a,Math.pow(2,s)*100))}I(`Failed to write session metadata after ${r} attempts. Session will continue but metadata may be stale.`)}async end(t="completed"){await this._transcript.append({type:"session_end",data:{reason:t==="completed"?"completed":"user_exit",messageCount:this._meta.messageCount,totalTokens:this._meta.tokenUsage.total}}),await this._transcript.flush(),await this.updateMeta({status:t}),this._lock.stopHeartbeat(),await this._lock.release()}async recordUserMessage(t){await this._transcript.append({type:"user_message",data:{role:"user",content:t}}),await this.updateMeta({messageCount:this._meta.messageCount+1,lastActivity:new Date().toISOString()})}async recordDirectShellResult(t){let e=et(t);return await this._transcript.append({type:"user_message",data:e}),await this.updateMeta({messageCount:this._meta.messageCount+1,lastActivity:new Date().toISOString()}),e}async recordAssistantMessage(t,e){await this._transcript.append({type:"assistant_message",data:{role:"assistant",content:t},tokenCount:e}),await this.updateMeta({messageCount:this._meta.messageCount+1,lastActivity:new Date().toISOString()})}async recordTokenUsage(t,e){let r={input:this._meta.tokenUsage.input+t,output:this._meta.tokenUsage.output+e,total:this._meta.tokenUsage.total+t+e};await this.updateMeta({tokenUsage:r})}async recordDelegationSummary(t){await this._transcript.append({type:"delegation_summary",data:t}),await this.updateMeta({lastActivity:new Date().toISOString()})}async updateMessageCount(t){t!==this._meta.messageCount&&await this.updateMeta({messageCount:t,lastActivity:new Date().toISOString()})}};function St(n){let t=n?.formatVersion;return typeof t=="number"&&Number.isFinite(t)&&t>0?t:1}var z=require("node:crypto"),Qt=require("node:child_process"),p=require("node:fs/promises"),Yt=require("node:os"),d=y(require("node:path"),1);var xt=2,Ht=400,Pt=80,Tt=12,Wt=3e4,vt=64*1024*1024;function Ut(n){let t=n.replace(/\r\n/g,`
@@ -46,7 +46,7 @@ ${this.stringify(t.data)}
46
46
  `)+`
47
47
  `;await m(this.transcriptPath,a);let l=this.buildMarkdownDocument(o,"session store");if(await m(this.markdownPath,l),!this.workspaceMirrorDisabled){let c=await this.resolveWorkspaceMarkdownPath();if(c)try{let u=this.buildMarkdownDocument(o,"workspace mirror");await m(c,u)}catch(u){this.workspaceMirrorDisabled=!0,T("Transcript workspace mirror disabled",u)}}}async truncateAfterMessageCount(t){let e=await g(this.transcriptPath);if(!e)return;let r=L(e),n=Math.max(0,t),s=0,o=[];for(let c of r){if(c.type==="user_message"||c.type==="assistant_message"){if(s>=n)break;s+=1}o.push(c)}let a=o.length>0?o.map(c=>JSON.stringify(c)).join(`
48
48
  `)+`
49
- `:"";await m(this.transcriptPath,a);let l=this.buildMarkdownDocument(o,"session store");if(await m(this.markdownPath,l),!this.workspaceMirrorDisabled){let c=await this.resolveWorkspaceMarkdownPath();if(c)try{let u=this.buildMarkdownDocument(o,"workspace mirror");await m(c,u)}catch(u){this.workspaceMirrorDisabled=!0,T("Transcript workspace mirror disabled",u)}}}getSequence(){return this.sequence}async initialize(){try{let t=await g(this.transcriptPath);if(!t){this.sequence=0;return}let e=L(t);if(e.length===0){this.sequence=0;return}let r=e[e.length-1];this.sequence=r.sequence+1}catch(t){let e=t instanceof Error?t.message:String(t);T(`Transcript initialization warning: ${e}. Starting with empty transcript.`),this.sequence=0}}async flush(){await this.writeQueue}};import*as j from"path";import{randomUUID as ee}from"crypto";import{stat as re}from"fs/promises";var te={View:"Read",Replace:"Write",GlobTool:"Glob",GrepTool:"Grep",SQLiteAnalyze:"SqliteAnalyze",ReadNotebook:"NotebookRead",NotebookEditCell:"NotebookEdit"};function K(i){return te[i]??i}var _=class{sessionDir;checkpointsDir;autoInterval;lastCheckpointMessageCount=0;constructor(t,e){this.sessionDir=t,this.checkpointsDir=j.join(t,"checkpoints"),this.autoInterval=e?.autoInterval??10}async initialize(){let t=await this.list();t.length>0&&(this.lastCheckpointMessageCount=t[0].messageCount)}async create(t){await M(this.checkpointsDir);let e=ee(),r={id:e,name:t.description,trigger:t.trigger,createdAt:new Date().toISOString(),messageCount:t.messages.length,tokenCount:this.estimateTokens(t.messages)},n={info:r,messages:t.messages},s=j.join(this.checkpointsDir,`${e}.json`);return await m(s,JSON.stringify(n,null,2)),this.lastCheckpointMessageCount=t.messages.length,r}async list(){let t=await Tt(this.checkpointsDir,/\.json$/),e=[];for(let r of t){let n=await g(r);if(n){let s=w(n,null);if(s){let o=await re(r);e.push({info:s.info,modifiedAtMs:o.mtimeMs})}}}return e.sort((r,n)=>new Date(n.info.createdAt).getTime()-new Date(r.info.createdAt).getTime()||n.modifiedAtMs-r.modifiedAtMs).map(({info:r})=>r)}async restore(t){let e=j.join(this.checkpointsDir,`${t}.json`),r;try{r=await g(e)}catch(s){let o=s instanceof Error?s.message:String(s);throw new Error(`Failed to read checkpoint ${t}: ${o}`)}if(!r)throw new Error(`Checkpoint not found: ${t} (path: ${e})`);let n=w(r,null);if(!n)throw new Error(`Invalid checkpoint data for ${t}: JSON parse failed`);if(!n.messages||!Array.isArray(n.messages))throw new Error(`Invalid checkpoint data for ${t}: missing or invalid messages array`);if(!n.info)throw new Error(`Invalid checkpoint data for ${t}: missing info object`);return{messages:n.messages,info:n.info}}shouldAutoCheckpoint(t){return t-this.lastCheckpointMessageCount>=this.autoInterval}static isDangerousOperation(t,e){if(t=K(t),t==="Write")return!0;if(t==="Bash"){let n=e.command?.toLowerCase()||"";return["rm ","del ","git push","git reset","drop ","truncate"].some(o=>n.includes(o))}return!1}async delete(t){let e=j.join(this.checkpointsDir,`${t}.json`);await v(e)}estimateTokens(t){let e=0;for(let r of t)if(typeof r.content=="string")e+=Math.ceil(r.content.length/4);else if(Array.isArray(r.content))for(let n of r.content)"text"in n&&(e+=Math.ceil(n.text.length/4));return e}};import*as b from"path";import*as lt from"os";import*as O from"fs";var ne=Symbol.for("@xenosystem/agent-sdk/shutdown-registry"),ie=globalThis,at=ie[ne]??={cleanups:new Set,exitHandlerRegistered:!1,signalHandlersInstalled:!1},ct=at.cleanups;function se(){for(let i of ct)try{i()}catch{}}function Mt(i){return ct.add(i),!at.exitHandlerRegistered&&typeof process<"u"&&typeof process.on=="function"&&(at.exitHandlerRegistered=!0,process.on("exit",se)),()=>{ct.delete(i)}}var At="0.8.13";var oe=1e4,ae=6e4,ce="session.lock",le="lock.json",F=new Set;function ue(){for(let i of F)try{O.unlinkSync(i)}catch{}F.clear()}Mt(ue);var $=class i{sessionDir;lockPath;legacyLockPath;sessionId;heartbeatTimer;constructor(t){this.sessionDir=t,this.lockPath=b.join(t,ce),this.legacyLockPath=b.join(t,le),this.sessionId=b.basename(t)}async acquire(){let t=new Date().toISOString(),e={schemaVersion:1,name:`session:${this.sessionId}`,sessionId:this.sessionId,pid:process.pid,hostname:lt.hostname(),processStartedAt:new Date(Date.now()-Math.floor(process.uptime()*1e3)).toISOString(),version:At,acquiredAt:t,updatedAt:t,heartbeat:t},r=b.dirname(this.lockPath);await O.promises.mkdir(r,{recursive:!0});let n=await this.findExistingLockPath();if(n){if(!await this.isStalePath(n)){let o=await this.readLockAt(n);throw new Error(`Session ${this.sessionId} is already locked by PID ${o?.pid} on ${o?.hostname}`)}await v(n)}try{await O.promises.writeFile(this.lockPath,JSON.stringify(e,null,2),{flag:"wx",encoding:"utf-8"}),F.add(this.lockPath)}catch(s){if(s.code==="EEXIST"){if(!await this.isStalePath(this.lockPath)){let l=await this.readLockAt(this.lockPath);throw new Error(`Session ${this.sessionId} is already locked by PID ${l?.pid} on ${l?.hostname}`)}await v(this.lockPath);try{await O.promises.writeFile(this.lockPath,JSON.stringify(e,null,2),{flag:"wx",encoding:"utf-8"})}catch(l){throw l.code==="EEXIST"?new Error(`Session ${this.sessionId} lock was acquired by another process during stale recovery`):l}F.add(this.lockPath)}else throw s}}async release(){this.stopHeartbeat(),F.delete(this.lockPath),await v(this.lockPath)}async isLocked(){let t=await this.findExistingLockPath();return t?!await this.isStalePath(t):!1}async isStale(){let t=await this.findExistingLockPath();return t?this.isStalePath(t):!1}async isStalePath(t){let e=await this.readLockAt(t);if(!e)return!1;let r=new Date(e.heartbeat).getTime();return Date.now()-r>ae}startHeartbeat(t=oe){this.heartbeatTimer&&this.stopHeartbeat(),this.heartbeatTimer=setInterval(async()=>{try{await this.updateHeartbeat()}catch(e){let r=e instanceof Error?e.message:String(e);if(e?.code==="ENOENT"){R("SessionLock: Session directory removed, stopping heartbeat"),this.stopHeartbeat();return}R(`SessionLock: Failed to update heartbeat: ${r}`)}},t),this.heartbeatTimer.unref()}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0)}async updateHeartbeat(){let t=await this.readLockAt(this.lockPath);t&&(t.pid!==process.pid||t.hostname!==lt.hostname()||(t.heartbeat=new Date().toISOString(),t.updatedAt=t.heartbeat,await m(this.lockPath,JSON.stringify(t,null,2))))}async readLock(){let t=await this.findExistingLockPath();return t?this.readLockAt(t):null}async readLockAt(t){let e=await g(t);return e?w(e,null):null}async findExistingLockPath(){return await g(this.lockPath)?this.lockPath:await g(this.legacyLockPath)?this.legacyLockPath:null}static async cleanStale(t){let e=await V(t),r=[];for(let n of e){let s=new i(n);if(await s.isStale()){let a=await s.findExistingLockPath();a&&await v(a),r.push(b.basename(n))}}return r}};import*as x from"path";import*as _t from"os";import*as S from"path";function pe(i,t){let e=S.resolve(i),r=S.resolve(i,t);return r===e?!0:e===S.parse(e).root?r.startsWith(e):r.startsWith(e+S.sep)}function I(i,t){if(S.isAbsolute(t))return S.resolve(t);if(!pe(i,t))throw new Error(`PathSecurity: Path traversal attempt detected: ${t}`);return S.resolve(i,t)}import*as C from"path";import*as pt from"os";var ut=1,de="recent.json";function G(i=pt.homedir()){return C.join(i,".xeno-agent",de)}function Q(i){let t=C.normalize(i).replace(/[\\/]+$/,""),e=t.length>0?t:C.parse(C.normalize(i)).root;return process.platform==="win32"?e.toLowerCase():e}async function H(i=pt.homedir()){let t={version:ut,entries:{}},e=G(i);if(!z(e))return t;let r=await g(e);if(!r)return t;let n=w(r,null);if(!n||typeof n!="object")return t;let s=n;if(s.version!==ut||!s.entries||typeof s.entries!="object")return t;let o={};for(let[a,l]of Object.entries(s.entries)){if(!l||typeof l!="object")continue;let c=l;typeof c.sessionId!="string"||c.sessionId.length===0||typeof c.endedAt=="string"&&(o[a]={sessionId:c.sessionId,endedAt:c.endedAt,role:typeof c.role=="string"?c.role:void 0})}return{version:ut,entries:o}}async function dt(i,t={}){let e=await H(t.homeDir),r=Q(i),n=e.entries[r];if(n&&!(t.role&&n.role&&n.role!==t.role))return n}async function gt(i,t={}){let e=await H(t.homeDir),r=Q(i.cwd);e.entries[r]={sessionId:i.sessionId,role:i.role,endedAt:i.endedAt??new Date().toISOString()};let n=G(t.homeDir);await m(n,JSON.stringify(e,null,2)+`
49
+ `:"";await m(this.transcriptPath,a);let l=this.buildMarkdownDocument(o,"session store");if(await m(this.markdownPath,l),!this.workspaceMirrorDisabled){let c=await this.resolveWorkspaceMarkdownPath();if(c)try{let u=this.buildMarkdownDocument(o,"workspace mirror");await m(c,u)}catch(u){this.workspaceMirrorDisabled=!0,T("Transcript workspace mirror disabled",u)}}}getSequence(){return this.sequence}async initialize(){try{let t=await g(this.transcriptPath);if(!t){this.sequence=0;return}let e=L(t);if(e.length===0){this.sequence=0;return}let r=e[e.length-1];this.sequence=r.sequence+1}catch(t){let e=t instanceof Error?t.message:String(t);T(`Transcript initialization warning: ${e}. Starting with empty transcript.`),this.sequence=0}}async flush(){await this.writeQueue}};import*as j from"path";import{randomUUID as ee}from"crypto";import{stat as re}from"fs/promises";var te={View:"Read",Replace:"Write",GlobTool:"Glob",GrepTool:"Grep",SQLiteAnalyze:"SqliteAnalyze",ReadNotebook:"NotebookRead",NotebookEditCell:"NotebookEdit"};function K(i){return te[i]??i}var _=class{sessionDir;checkpointsDir;autoInterval;lastCheckpointMessageCount=0;constructor(t,e){this.sessionDir=t,this.checkpointsDir=j.join(t,"checkpoints"),this.autoInterval=e?.autoInterval??10}async initialize(){let t=await this.list();t.length>0&&(this.lastCheckpointMessageCount=t[0].messageCount)}async create(t){await M(this.checkpointsDir);let e=ee(),r={id:e,name:t.description,trigger:t.trigger,createdAt:new Date().toISOString(),messageCount:t.messages.length,tokenCount:this.estimateTokens(t.messages)},n={info:r,messages:t.messages},s=j.join(this.checkpointsDir,`${e}.json`);return await m(s,JSON.stringify(n,null,2)),this.lastCheckpointMessageCount=t.messages.length,r}async list(){let t=await Tt(this.checkpointsDir,/\.json$/),e=[];for(let r of t){let n=await g(r);if(n){let s=w(n,null);if(s){let o=await re(r);e.push({info:s.info,modifiedAtMs:o.mtimeMs})}}}return e.sort((r,n)=>new Date(n.info.createdAt).getTime()-new Date(r.info.createdAt).getTime()||n.modifiedAtMs-r.modifiedAtMs).map(({info:r})=>r)}async restore(t){let e=j.join(this.checkpointsDir,`${t}.json`),r;try{r=await g(e)}catch(s){let o=s instanceof Error?s.message:String(s);throw new Error(`Failed to read checkpoint ${t}: ${o}`)}if(!r)throw new Error(`Checkpoint not found: ${t} (path: ${e})`);let n=w(r,null);if(!n)throw new Error(`Invalid checkpoint data for ${t}: JSON parse failed`);if(!n.messages||!Array.isArray(n.messages))throw new Error(`Invalid checkpoint data for ${t}: missing or invalid messages array`);if(!n.info)throw new Error(`Invalid checkpoint data for ${t}: missing info object`);return{messages:n.messages,info:n.info}}shouldAutoCheckpoint(t){return t-this.lastCheckpointMessageCount>=this.autoInterval}static isDangerousOperation(t,e){if(t=K(t),t==="Write")return!0;if(t==="Bash"){let n=e.command?.toLowerCase()||"";return["rm ","del ","git push","git reset","drop ","truncate"].some(o=>n.includes(o))}return!1}async delete(t){let e=j.join(this.checkpointsDir,`${t}.json`);await v(e)}estimateTokens(t){let e=0;for(let r of t)if(typeof r.content=="string")e+=Math.ceil(r.content.length/4);else if(Array.isArray(r.content))for(let n of r.content)"text"in n&&(e+=Math.ceil(n.text.length/4));return e}};import*as b from"path";import*as lt from"os";import*as O from"fs";var ne=Symbol.for("@xenosystem/agent-sdk/shutdown-registry"),ie=globalThis,at=ie[ne]??={cleanups:new Set,exitHandlerRegistered:!1,signalHandlersInstalled:!1},ct=at.cleanups;function se(){for(let i of ct)try{i()}catch{}}function Mt(i){return ct.add(i),!at.exitHandlerRegistered&&typeof process<"u"&&typeof process.on=="function"&&(at.exitHandlerRegistered=!0,process.on("exit",se)),()=>{ct.delete(i)}}var At="0.9.8";var oe=1e4,ae=6e4,ce="session.lock",le="lock.json",F=new Set;function ue(){for(let i of F)try{O.unlinkSync(i)}catch{}F.clear()}Mt(ue);var $=class i{sessionDir;lockPath;legacyLockPath;sessionId;heartbeatTimer;constructor(t){this.sessionDir=t,this.lockPath=b.join(t,ce),this.legacyLockPath=b.join(t,le),this.sessionId=b.basename(t)}async acquire(){let t=new Date().toISOString(),e={schemaVersion:1,name:`session:${this.sessionId}`,sessionId:this.sessionId,pid:process.pid,hostname:lt.hostname(),processStartedAt:new Date(Date.now()-Math.floor(process.uptime()*1e3)).toISOString(),version:At,acquiredAt:t,updatedAt:t,heartbeat:t},r=b.dirname(this.lockPath);await O.promises.mkdir(r,{recursive:!0});let n=await this.findExistingLockPath();if(n){if(!await this.isStalePath(n)){let o=await this.readLockAt(n);throw new Error(`Session ${this.sessionId} is already locked by PID ${o?.pid} on ${o?.hostname}`)}await v(n)}try{await O.promises.writeFile(this.lockPath,JSON.stringify(e,null,2),{flag:"wx",encoding:"utf-8"}),F.add(this.lockPath)}catch(s){if(s.code==="EEXIST"){if(!await this.isStalePath(this.lockPath)){let l=await this.readLockAt(this.lockPath);throw new Error(`Session ${this.sessionId} is already locked by PID ${l?.pid} on ${l?.hostname}`)}await v(this.lockPath);try{await O.promises.writeFile(this.lockPath,JSON.stringify(e,null,2),{flag:"wx",encoding:"utf-8"})}catch(l){throw l.code==="EEXIST"?new Error(`Session ${this.sessionId} lock was acquired by another process during stale recovery`):l}F.add(this.lockPath)}else throw s}}async release(){this.stopHeartbeat(),F.delete(this.lockPath),await v(this.lockPath)}async isLocked(){let t=await this.findExistingLockPath();return t?!await this.isStalePath(t):!1}async isStale(){let t=await this.findExistingLockPath();return t?this.isStalePath(t):!1}async isStalePath(t){let e=await this.readLockAt(t);if(!e)return!1;let r=new Date(e.heartbeat).getTime();return Date.now()-r>ae}startHeartbeat(t=oe){this.heartbeatTimer&&this.stopHeartbeat(),this.heartbeatTimer=setInterval(async()=>{try{await this.updateHeartbeat()}catch(e){let r=e instanceof Error?e.message:String(e);if(e?.code==="ENOENT"){R("SessionLock: Session directory removed, stopping heartbeat"),this.stopHeartbeat();return}R(`SessionLock: Failed to update heartbeat: ${r}`)}},t),this.heartbeatTimer.unref()}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0)}async updateHeartbeat(){let t=await this.readLockAt(this.lockPath);t&&(t.pid!==process.pid||t.hostname!==lt.hostname()||(t.heartbeat=new Date().toISOString(),t.updatedAt=t.heartbeat,await m(this.lockPath,JSON.stringify(t,null,2))))}async readLock(){let t=await this.findExistingLockPath();return t?this.readLockAt(t):null}async readLockAt(t){let e=await g(t);return e?w(e,null):null}async findExistingLockPath(){return await g(this.lockPath)?this.lockPath:await g(this.legacyLockPath)?this.legacyLockPath:null}static async cleanStale(t){let e=await V(t),r=[];for(let n of e){let s=new i(n);if(await s.isStale()){let a=await s.findExistingLockPath();a&&await v(a),r.push(b.basename(n))}}return r}};import*as x from"path";import*as _t from"os";import*as S from"path";function pe(i,t){let e=S.resolve(i),r=S.resolve(i,t);return r===e?!0:e===S.parse(e).root?r.startsWith(e):r.startsWith(e+S.sep)}function I(i,t){if(S.isAbsolute(t))return S.resolve(t);if(!pe(i,t))throw new Error(`PathSecurity: Path traversal attempt detected: ${t}`);return S.resolve(i,t)}import*as C from"path";import*as pt from"os";var ut=1,de="recent.json";function G(i=pt.homedir()){return C.join(i,".xeno-agent",de)}function Q(i){let t=C.normalize(i).replace(/[\\/]+$/,""),e=t.length>0?t:C.parse(C.normalize(i)).root;return process.platform==="win32"?e.toLowerCase():e}async function H(i=pt.homedir()){let t={version:ut,entries:{}},e=G(i);if(!z(e))return t;let r=await g(e);if(!r)return t;let n=w(r,null);if(!n||typeof n!="object")return t;let s=n;if(s.version!==ut||!s.entries||typeof s.entries!="object")return t;let o={};for(let[a,l]of Object.entries(s.entries)){if(!l||typeof l!="object")continue;let c=l;typeof c.sessionId!="string"||c.sessionId.length===0||typeof c.endedAt=="string"&&(o[a]={sessionId:c.sessionId,endedAt:c.endedAt,role:typeof c.role=="string"?c.role:void 0})}return{version:ut,entries:o}}async function dt(i,t={}){let e=await H(t.homeDir),r=Q(i),n=e.entries[r];if(n&&!(t.role&&n.role&&n.role!==t.role))return n}async function gt(i,t={}){let e=await H(t.homeDir),r=Q(i.cwd);e.entries[r]={sessionId:i.sessionId,role:i.role,endedAt:i.endedAt??new Date().toISOString()};let n=G(t.homeDir);await m(n,JSON.stringify(e,null,2)+`
50
50
  `)}async function ge(i,t={}){let e=await H(t.homeDir),r=Q(i);if(!(r in e.entries))return;delete e.entries[r];let n=G(t.homeDir);await m(n,JSON.stringify(e,null,2)+`
51
51
  `)}async function Y(i,t={}){let e=await H(t.homeDir),r=!1;for(let[s,o]of Object.entries(e.entries))o.sessionId===i&&(delete e.entries[s],r=!0);if(!r)return;let n=G(t.homeDir);await m(n,JSON.stringify(e,null,2)+`
52
52
  `)}var N=class{static getSessionsDir(){let t=process.env.XENO_AGENT_HOME?.trim()||x.join(_t.homedir(),".xeno-agent");return x.join(t,"sessions")}static async list(t){let e=this.getSessionsDir(),r=typeof t?.limit=="number"&&Number.isFinite(t.limit)?Math.max(0,Math.floor(t.limit)):void 0;if(r===0)return[];let n=t?.workingDirectory?this.normalizeWorkingDirectory(t.workingDirectory):void 0;if(!z(e))return[];let s=await V(e),o=[];for(let a of s){let l=await this.loadMeta(a);l&&(t?.status&&!t.status.includes(l.status)||t?.role&&l.role!==t.role||n&&this.normalizeWorkingDirectory(l.workingDirectory)!==n||o.push(l))}return o.sort((a,l)=>new Date(l.lastActivity).getTime()-new Date(a.lastActivity).getTime()),r!==void 0?o.slice(0,r):o}static async find(t){let e=this.getSessionsDir(),r=I(e,t);return await this.loadMeta(r)}static async findMostRecent(t){let e=typeof t=="string"?{role:t}:t??{};if(e.workingDirectory){let s=await dt(e.workingDirectory,{...e.role!==void 0?{role:e.role}:{}});if(s){let o=await this.find(s.sessionId);if(o){if(!(e.role&&o.role!==e.role)){if(this.normalizeWorkingDirectory(o.workingDirectory)===this.normalizeWorkingDirectory(e.workingDirectory))return o}}else await Y(s.sessionId)}}let n=(await this.list({...e.role!==void 0?{role:e.role}:{},...e.workingDirectory!==void 0?{workingDirectory:e.workingDirectory}:{},limit:1}))[0]??null;if(n&&e.workingDirectory)try{await gt({cwd:n.workingDirectory,sessionId:n.id,role:n.role,endedAt:n.lastActivity})}catch{}return n}static async delete(t){let e=this.getSessionsDir(),r=I(e,t);await bt(r),await Y(t)}static async purgeWorkingDirectory(t,e){let r=new Set(e?.excludeSessionIds??[]),n=await this.list({workingDirectory:t}),s=[],o=[];for(let a of n){if(r.has(a.id)){o.push(a.id);continue}await this.delete(a.id),await this.deleteWorkspaceMirror(t,a.id),s.push(a.id)}return{deletedIds:s,skippedIds:o}}static async updateMeta(t,e){let r=this.getSessionsDir(),n=I(r,t),s=x.join(n,"meta.json"),o=await g(s);if(!o)throw new Error(`Session not found: ${t}`);let a=w(o,null);if(!a)throw new Error(`Invalid session metadata: ${t}`);let l={...a,...e,updatedAt:new Date().toISOString()};return await m(s,JSON.stringify(l,null,2)),l}static async loadMeta(t){let e=x.join(t,"meta.json"),r=await g(e);if(!r)return null;let n=w(r,null);if(!n)return null;let s=n.formatVersion;return{...n,formatVersion:typeof s=="number"&&Number.isFinite(s)&&s>0?s:1}}static getSessionDir(t){return I(this.getSessionsDir(),t)}static normalizeWorkingDirectory(t){let e=x.normalize(t).replace(/[\\/]+$/,""),r=e.length>0?e:x.parse(x.normalize(t)).root;return process.platform==="win32"?r.toLowerCase():r}static async deleteWorkspaceMirror(t,e){let r=x.join(t,".xeno","sessions",`${e}.md`);await v(r)}};import*as tt from"path";var mt=class i{sessionDir;_meta;_transcript;_checkpoints;_lock;constructor(t,e,r,n,s){this.sessionDir=t,this._meta=e,this._transcript=r,this._checkpoints=n,this._lock=s}static async create(t){let e=t.role??"default",r=it(e),n=N.getSessionDir(r),s=null,o=null;try{await M(n);let a={id:r,role:e,status:"creating",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),lastActivity:new Date().toISOString(),workingDirectory:t.workingDirectory,model:t.model,parentSession:t.parentSession,checkpoints:[],messageCount:0,tokenUsage:{input:0,output:0,total:0},formatVersion:1},l=tt.join(n,"meta.json");await m(l,JSON.stringify(a,null,2)),o=new A(n);let c=new _(n);s=new $(n),await s.acquire(),s.startHeartbeat(),await o.append({type:"session_start",data:{sessionId:r,role:e,workingDirectory:t.workingDirectory,model:t.model,formatVersion:1}});let u=new i(n,a,o,c,s);return await u.updateMeta({status:"active"}),u}catch(a){if(s)try{s.stopHeartbeat(),await s.release()}catch(l){R("Error releasing lock during cleanup",l)}throw a}}static async resume(t){let e=N.getSessionDir(t.sessionId),r=null,n=null;try{let s=tt.join(e,"meta.json"),o=await g(s);if(!o)throw new Error(`SessionManager: Session not found: ${t.sessionId}`);let a=w(o,null);if(!a)throw new Error(`SessionManager: Invalid session metadata: ${t.sessionId}`);a.formatVersion=Ot(a),n=new A(e),await n.initialize();let l=new _(e);if(r=new $(e),await r.acquire(),r.startHeartbeat(),t.fromCheckpoint){let{info:u}=await l.restore(t.fromCheckpoint);a.messageCount=u.messageCount,await n.append({type:"checkpoint",data:{id:t.fromCheckpoint,trigger:"manual",messageCount:u.messageCount}})}let c=new i(e,a,n,l,r);return await c.updateMeta({status:"active",lastActivity:new Date().toISOString()}),c}catch(s){if(r)try{r.stopHeartbeat(),await r.release()}catch(o){R("Error releasing lock during cleanup",o)}throw s}}get meta(){return{...this._meta}}get transcript(){return this._transcript}get checkpoints(){return this._checkpoints}async updateMeta(t){this._meta={...this._meta,...t,updatedAt:new Date().toISOString()};let e=tt.join(this.sessionDir,"meta.json"),r=3,n=null;for(let s=0;s<r;s++)try{await m(e,JSON.stringify(this._meta,null,2));return}catch(o){n=o instanceof Error?o:new Error(String(o)),T(`Failed to write session metadata (attempt ${s+1}/${r}): ${n.message}`),s<r-1&&await new Promise(a=>setTimeout(a,Math.pow(2,s)*100))}R(`Failed to write session metadata after ${r} attempts. Session will continue but metadata may be stale.`)}async end(t="completed"){await this._transcript.append({type:"session_end",data:{reason:t==="completed"?"completed":"user_exit",messageCount:this._meta.messageCount,totalTokens:this._meta.tokenUsage.total}}),await this._transcript.flush(),await this.updateMeta({status:t}),this._lock.stopHeartbeat(),await this._lock.release()}async recordUserMessage(t){await this._transcript.append({type:"user_message",data:{role:"user",content:t}}),await this.updateMeta({messageCount:this._meta.messageCount+1,lastActivity:new Date().toISOString()})}async recordDirectShellResult(t){let e=st(t);return await this._transcript.append({type:"user_message",data:e}),await this.updateMeta({messageCount:this._meta.messageCount+1,lastActivity:new Date().toISOString()}),e}async recordAssistantMessage(t,e){await this._transcript.append({type:"assistant_message",data:{role:"assistant",content:t},tokenCount:e}),await this.updateMeta({messageCount:this._meta.messageCount+1,lastActivity:new Date().toISOString()})}async recordTokenUsage(t,e){let r={input:this._meta.tokenUsage.input+t,output:this._meta.tokenUsage.output+e,total:this._meta.tokenUsage.total+t+e};await this.updateMeta({tokenUsage:r})}async recordDelegationSummary(t){await this._transcript.append({type:"delegation_summary",data:t}),await this.updateMeta({lastActivity:new Date().toISOString()})}async updateMessageCount(t){t!==this._meta.messageCount&&await this.updateMeta({messageCount:t,lastActivity:new Date().toISOString()})}};function Ot(i){let t=i?.formatVersion;return typeof t=="number"&&Number.isFinite(t)&&t>0?t:1}import{randomUUID as rt}from"node:crypto";import{spawn as me}from"node:child_process";import{mkdir as U,readFile as W,readdir as $t,realpath as nt,rm as et,stat as fe,unlink as Nt,writeFile as ft}from"node:fs/promises";import{tmpdir as he}from"node:os";import p from"node:path";var ht=2,Bt=400,wt=80,kt=12,Lt=3e4,yt=64*1024*1024;function jt(i){let t=i.replace(/\r\n/g,`