@xenosystem/agent-sdk 0.10.26 → 0.10.29

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.
@@ -1 +1 @@
1
- {"inputs":{"src/automation/types.ts":{"bytes":7431,"imports":[],"format":"esm"},"src/automation/operations.ts":{"bytes":3367,"imports":[],"format":"esm"},"src/automation/errors.ts":{"bytes":899,"imports":[],"format":"esm"},"src/security/path-policy.ts":{"bytes":5541,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/windows-process-containment.ts":{"bytes":51557,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/linux-process-containment.ts":{"bytes":5665,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/containment-certification.ts":{"bytes":13312,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/environment-policy.ts":{"bytes":1195,"imports":[],"format":"esm"},"src/security/mxc-containment.ts":{"bytes":28272,"imports":[{"path":"node:crypto","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},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:url","kind":"import-statement","external":true},{"path":"src/security/environment-policy.ts","kind":"import-statement","original":"./environment-policy.js"},{"path":"src/security/path-policy.ts","kind":"import-statement","original":"./path-policy.js"}],"format":"esm"},"src/security/process-containment.ts":{"bytes":17360,"imports":[{"path":"src/security/windows-process-containment.ts","kind":"import-statement","original":"./windows-process-containment.js"},{"path":"src/security/linux-process-containment.ts","kind":"import-statement","original":"./linux-process-containment.js"},{"path":"src/security/path-policy.ts","kind":"import-statement","original":"./path-policy.js"},{"path":"src/security/containment-certification.ts","kind":"import-statement","original":"./containment-certification.js"},{"path":"src/security/mxc-containment.ts","kind":"import-statement","original":"./mxc-containment.js"}],"format":"esm"},"src/security/secure-execution-contract.ts":{"bytes":24510,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"src/security/path-policy.ts","kind":"import-statement","original":"./path-policy.js"},{"path":"src/security/process-containment.ts","kind":"import-statement","original":"./process-containment.js"}],"format":"esm"},"src/automation/policy.ts":{"bytes":15653,"imports":[{"path":"src/security/secure-execution-contract.ts","kind":"import-statement","original":"../security/secure-execution-contract.js"},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/types.ts":{"bytes":11227,"imports":[],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1489,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/utils/custom-names.ts":{"bytes":2210,"imports":[],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25271,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/utils/custom-names.ts","kind":"import-statement","original":"../utils/custom-names.js"},{"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/automation/evidence.ts":{"bytes":8618,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"../artifacts/repository.js"},{"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/automation/errors.ts","kind":"import-statement","original":"./errors.js"}],"format":"esm"},"src/automation/durable-execution.ts":{"bytes":4647,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/automation/evidence.ts","kind":"import-statement","original":"./evidence.js"},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"}],"format":"esm"},"src/automation/executor.ts":{"bytes":16288,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/durable-execution.ts","kind":"import-statement","original":"./durable-execution.js"},{"path":"src/automation/evidence.ts","kind":"import-statement","original":"./evidence.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/policy.ts","kind":"import-statement","original":"./policy.js"}],"format":"esm"},"src/automation/execution-journal.ts":{"bytes":7254,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"node:sqlite","kind":"dynamic-import","external":true}],"format":"esm"},"src/automation/conformance.ts":{"bytes":4331,"imports":[{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/policy.ts","kind":"import-statement","original":"./policy.js"},{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/automation/http-adapter.ts":{"bytes":8862,"imports":[{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"}],"format":"esm"},"src/automation/browser-control-plane-adapter.ts":{"bytes":17420,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/utils/fs.ts":{"bytes":11685,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","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/version.ts":{"bytes":195,"imports":[],"format":"esm"},"src/artifacts/file-repository.ts":{"bytes":16401,"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/utils/fs.ts","kind":"import-statement","original":"../utils/fs.js"},{"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/utils/yaml.ts":{"bytes":5506,"imports":[],"format":"esm"},"src/utils/platform.ts":{"bytes":5600,"imports":[{"path":"node:os","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/agents/definitions.ts":{"bytes":20961,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/utils/yaml.ts","kind":"import-statement","original":"../utils/yaml.js"},{"path":"src/utils/platform.ts","kind":"import-statement","original":"../utils/platform.js"}],"format":"esm"},"src/agents/profiles.ts":{"bytes":33625,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/agents/definitions.ts","kind":"import-statement","original":"./definitions.js"}],"format":"esm"},"src/security/capability-lease.ts":{"bytes":29318,"imports":[{"path":"src/agents/profiles.ts","kind":"import-statement","original":"../agents/profiles.js"},{"path":"src/utils/custom-names.ts","kind":"import-statement","original":"../utils/custom-names.js"}],"format":"esm"},"src/automation/tool-pack.ts":{"bytes":19206,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"}],"format":"esm"},"src/automation/host-runtime.ts":{"bytes":30630,"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},{"path":"src/artifacts/file-repository.ts","kind":"import-statement","original":"../artifacts/file-repository.js"},{"path":"src/security/capability-lease.ts","kind":"import-statement","original":"../security/capability-lease.js"},{"path":"src/security/secure-execution-contract.ts","kind":"import-statement","original":"../security/secure-execution-contract.js"},{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/automation/executor.ts","kind":"import-statement","original":"./executor.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/tool-pack.ts","kind":"import-statement","original":"./tool-pack.js"},{"path":"src/automation/browser-control-plane-adapter.ts","kind":"import-statement","original":"./browser-control-plane-adapter.js"}],"format":"esm"},"src/automation/index.ts":{"bytes":449,"imports":[{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/policy.ts","kind":"import-statement","original":"./policy.js"},{"path":"src/automation/evidence.ts","kind":"import-statement","original":"./evidence.js"},{"path":"src/automation/executor.ts","kind":"import-statement","original":"./executor.js"},{"path":"src/automation/execution-journal.ts","kind":"import-statement","original":"./execution-journal.js"},{"path":"src/automation/durable-execution.ts","kind":"import-statement","original":"./durable-execution.js"},{"path":"src/automation/conformance.ts","kind":"import-statement","original":"./conformance.js"},{"path":"src/automation/http-adapter.ts","kind":"import-statement","original":"./http-adapter.js"},{"path":"src/automation/browser-control-plane-adapter.ts","kind":"import-statement","original":"./browser-control-plane-adapter.js"},{"path":"src/automation/host-runtime.ts","kind":"import-statement","original":"./host-runtime.js"},{"path":"src/automation/tool-pack.ts","kind":"import-statement","original":"./tool-pack.js"}],"format":"esm"}},"outputs":{"dist/automation/index.cjs":{"imports":[{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:os","kind":"require-call","external":true},{"path":"node:fs","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"node:fs","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"node:child_process","kind":"require-call","external":true},{"path":"node:fs","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:fs","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"node:crypto","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},{"path":"node:child_process","kind":"require-call","external":true},{"path":"node:url","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:buffer","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"node:sqlite","kind":"dynamic-import","external":true},{"path":"node:crypto","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},{"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/promises","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},{"path":"node:os","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/automation/index.ts","inputs":{"src/automation/index.ts":{"bytesInOutput":1420},"src/automation/types.ts":{"bytesInOutput":8},"src/automation/operations.ts":{"bytesInOutput":1656},"src/automation/errors.ts":{"bytesInOutput":129},"src/security/secure-execution-contract.ts":{"bytesInOutput":10455},"src/security/path-policy.ts":{"bytesInOutput":2595},"src/security/windows-process-containment.ts":{"bytesInOutput":47581},"src/security/linux-process-containment.ts":{"bytesInOutput":1926},"src/security/containment-certification.ts":{"bytesInOutput":6147},"src/security/mxc-containment.ts":{"bytesInOutput":6578},"src/security/process-containment.ts":{"bytesInOutput":6527},"src/automation/policy.ts":{"bytesInOutput":7901},"src/automation/evidence.ts":{"bytesInOutput":4454},"src/artifacts/types.ts":{"bytesInOutput":825},"src/artifacts/validation.ts":{"bytesInOutput":13385},"src/artifacts/hash.ts":{"bytesInOutput":130},"src/utils/custom-names.ts":{"bytesInOutput":125},"src/artifacts/repository.ts":{"bytesInOutput":13761},"src/automation/executor.ts":{"bytesInOutput":7134},"src/automation/durable-execution.ts":{"bytesInOutput":2222},"src/automation/execution-journal.ts":{"bytesInOutput":4239},"src/automation/conformance.ts":{"bytesInOutput":2208},"src/automation/http-adapter.ts":{"bytesInOutput":4320},"src/automation/browser-control-plane-adapter.ts":{"bytesInOutput":9665},"src/automation/host-runtime.ts":{"bytesInOutput":12873},"src/artifacts/file-repository.ts":{"bytesInOutput":6752},"src/utils/fs.ts":{"bytesInOutput":319},"src/control-plane/lock.ts":{"bytesInOutput":1067},"src/version.ts":{"bytesInOutput":17},"src/utils/platform.ts":{"bytesInOutput":95},"src/agents/profiles.ts":{"bytesInOutput":8624},"src/security/capability-lease.ts":{"bytesInOutput":14569},"src/automation/tool-pack.ts":{"bytesInOutput":10038}},"bytes":211490}}}
1
+ {"inputs":{"src/automation/types.ts":{"bytes":7431,"imports":[],"format":"esm"},"src/automation/operations.ts":{"bytes":3367,"imports":[],"format":"esm"},"src/automation/errors.ts":{"bytes":899,"imports":[],"format":"esm"},"src/security/path-policy.ts":{"bytes":5541,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/windows-process-containment.ts":{"bytes":51557,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/linux-process-containment.ts":{"bytes":5665,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/containment-certification.ts":{"bytes":13312,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/environment-policy.ts":{"bytes":1195,"imports":[],"format":"esm"},"src/security/mxc-containment.ts":{"bytes":28272,"imports":[{"path":"node:crypto","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},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:url","kind":"import-statement","external":true},{"path":"src/security/environment-policy.ts","kind":"import-statement","original":"./environment-policy.js"},{"path":"src/security/path-policy.ts","kind":"import-statement","original":"./path-policy.js"}],"format":"esm"},"src/security/process-containment.ts":{"bytes":17360,"imports":[{"path":"src/security/windows-process-containment.ts","kind":"import-statement","original":"./windows-process-containment.js"},{"path":"src/security/linux-process-containment.ts","kind":"import-statement","original":"./linux-process-containment.js"},{"path":"src/security/path-policy.ts","kind":"import-statement","original":"./path-policy.js"},{"path":"src/security/containment-certification.ts","kind":"import-statement","original":"./containment-certification.js"},{"path":"src/security/mxc-containment.ts","kind":"import-statement","original":"./mxc-containment.js"}],"format":"esm"},"src/security/secure-execution-contract.ts":{"bytes":24510,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"src/security/path-policy.ts","kind":"import-statement","original":"./path-policy.js"},{"path":"src/security/process-containment.ts","kind":"import-statement","original":"./process-containment.js"}],"format":"esm"},"src/automation/policy.ts":{"bytes":15653,"imports":[{"path":"src/security/secure-execution-contract.ts","kind":"import-statement","original":"../security/secure-execution-contract.js"},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/types.ts":{"bytes":11227,"imports":[],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1489,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/utils/custom-names.ts":{"bytes":2210,"imports":[],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25271,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/utils/custom-names.ts","kind":"import-statement","original":"../utils/custom-names.js"},{"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/automation/evidence.ts":{"bytes":8618,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"../artifacts/repository.js"},{"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/automation/errors.ts","kind":"import-statement","original":"./errors.js"}],"format":"esm"},"src/automation/durable-execution.ts":{"bytes":4647,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/automation/evidence.ts","kind":"import-statement","original":"./evidence.js"},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"}],"format":"esm"},"src/automation/executor.ts":{"bytes":16288,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/durable-execution.ts","kind":"import-statement","original":"./durable-execution.js"},{"path":"src/automation/evidence.ts","kind":"import-statement","original":"./evidence.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/policy.ts","kind":"import-statement","original":"./policy.js"}],"format":"esm"},"src/automation/execution-journal.ts":{"bytes":7254,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"node:sqlite","kind":"dynamic-import","external":true}],"format":"esm"},"src/automation/conformance.ts":{"bytes":4331,"imports":[{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/policy.ts","kind":"import-statement","original":"./policy.js"},{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/automation/http-adapter.ts":{"bytes":8862,"imports":[{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"}],"format":"esm"},"src/automation/browser-control-plane-adapter.ts":{"bytes":17420,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/utils/fs.ts":{"bytes":11685,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","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/version.ts":{"bytes":195,"imports":[],"format":"esm"},"src/artifacts/file-repository.ts":{"bytes":16401,"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/utils/fs.ts","kind":"import-statement","original":"../utils/fs.js"},{"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/utils/yaml.ts":{"bytes":5506,"imports":[],"format":"esm"},"src/utils/platform.ts":{"bytes":5600,"imports":[{"path":"node:os","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/agents/definitions.ts":{"bytes":23563,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/utils/yaml.ts","kind":"import-statement","original":"../utils/yaml.js"},{"path":"src/utils/platform.ts","kind":"import-statement","original":"../utils/platform.js"}],"format":"esm"},"src/agents/profiles.ts":{"bytes":33625,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/agents/definitions.ts","kind":"import-statement","original":"./definitions.js"}],"format":"esm"},"src/security/capability-lease.ts":{"bytes":29318,"imports":[{"path":"src/agents/profiles.ts","kind":"import-statement","original":"../agents/profiles.js"},{"path":"src/utils/custom-names.ts","kind":"import-statement","original":"../utils/custom-names.js"}],"format":"esm"},"src/automation/tool-pack.ts":{"bytes":19206,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"}],"format":"esm"},"src/automation/host-runtime.ts":{"bytes":30630,"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},{"path":"src/artifacts/file-repository.ts","kind":"import-statement","original":"../artifacts/file-repository.js"},{"path":"src/security/capability-lease.ts","kind":"import-statement","original":"../security/capability-lease.js"},{"path":"src/security/secure-execution-contract.ts","kind":"import-statement","original":"../security/secure-execution-contract.js"},{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/automation/executor.ts","kind":"import-statement","original":"./executor.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/tool-pack.ts","kind":"import-statement","original":"./tool-pack.js"},{"path":"src/automation/browser-control-plane-adapter.ts","kind":"import-statement","original":"./browser-control-plane-adapter.js"}],"format":"esm"},"src/automation/index.ts":{"bytes":449,"imports":[{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/policy.ts","kind":"import-statement","original":"./policy.js"},{"path":"src/automation/evidence.ts","kind":"import-statement","original":"./evidence.js"},{"path":"src/automation/executor.ts","kind":"import-statement","original":"./executor.js"},{"path":"src/automation/execution-journal.ts","kind":"import-statement","original":"./execution-journal.js"},{"path":"src/automation/durable-execution.ts","kind":"import-statement","original":"./durable-execution.js"},{"path":"src/automation/conformance.ts","kind":"import-statement","original":"./conformance.js"},{"path":"src/automation/http-adapter.ts","kind":"import-statement","original":"./http-adapter.js"},{"path":"src/automation/browser-control-plane-adapter.ts","kind":"import-statement","original":"./browser-control-plane-adapter.js"},{"path":"src/automation/host-runtime.ts","kind":"import-statement","original":"./host-runtime.js"},{"path":"src/automation/tool-pack.ts","kind":"import-statement","original":"./tool-pack.js"}],"format":"esm"}},"outputs":{"dist/automation/index.cjs":{"imports":[{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:os","kind":"require-call","external":true},{"path":"node:fs","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"node:fs","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"node:child_process","kind":"require-call","external":true},{"path":"node:fs","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:fs","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"node:crypto","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},{"path":"node:child_process","kind":"require-call","external":true},{"path":"node:url","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:buffer","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"node:sqlite","kind":"dynamic-import","external":true},{"path":"node:crypto","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},{"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/promises","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},{"path":"node:os","kind":"require-call","external":true},{"path":"node:crypto","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/automation/index.ts","inputs":{"src/automation/index.ts":{"bytesInOutput":1420},"src/automation/types.ts":{"bytesInOutput":8},"src/automation/operations.ts":{"bytesInOutput":1656},"src/automation/errors.ts":{"bytesInOutput":129},"src/security/secure-execution-contract.ts":{"bytesInOutput":10455},"src/security/path-policy.ts":{"bytesInOutput":2595},"src/security/windows-process-containment.ts":{"bytesInOutput":47581},"src/security/linux-process-containment.ts":{"bytesInOutput":1926},"src/security/containment-certification.ts":{"bytesInOutput":6147},"src/security/mxc-containment.ts":{"bytesInOutput":6578},"src/security/process-containment.ts":{"bytesInOutput":6527},"src/automation/policy.ts":{"bytesInOutput":7901},"src/automation/evidence.ts":{"bytesInOutput":4454},"src/artifacts/types.ts":{"bytesInOutput":825},"src/artifacts/validation.ts":{"bytesInOutput":13385},"src/artifacts/hash.ts":{"bytesInOutput":130},"src/utils/custom-names.ts":{"bytesInOutput":125},"src/artifacts/repository.ts":{"bytesInOutput":13761},"src/automation/executor.ts":{"bytesInOutput":7134},"src/automation/durable-execution.ts":{"bytesInOutput":2222},"src/automation/execution-journal.ts":{"bytesInOutput":4239},"src/automation/conformance.ts":{"bytesInOutput":2208},"src/automation/http-adapter.ts":{"bytesInOutput":4320},"src/automation/browser-control-plane-adapter.ts":{"bytesInOutput":9665},"src/automation/host-runtime.ts":{"bytesInOutput":12873},"src/artifacts/file-repository.ts":{"bytesInOutput":6752},"src/utils/fs.ts":{"bytesInOutput":319},"src/control-plane/lock.ts":{"bytesInOutput":1067},"src/version.ts":{"bytesInOutput":17},"src/utils/platform.ts":{"bytesInOutput":95},"src/agents/definitions.ts":{"bytesInOutput":20},"src/agents/profiles.ts":{"bytesInOutput":8624},"src/security/capability-lease.ts":{"bytesInOutput":14569},"src/automation/tool-pack.ts":{"bytesInOutput":10038}},"bytes":211510}}}
@@ -1 +1 @@
1
- {"inputs":{"src/automation/types.ts":{"bytes":7431,"imports":[],"format":"esm"},"src/automation/operations.ts":{"bytes":3367,"imports":[],"format":"esm"},"src/automation/errors.ts":{"bytes":899,"imports":[],"format":"esm"},"src/security/path-policy.ts":{"bytes":5541,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/windows-process-containment.ts":{"bytes":51557,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/linux-process-containment.ts":{"bytes":5665,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/containment-certification.ts":{"bytes":13312,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/environment-policy.ts":{"bytes":1195,"imports":[],"format":"esm"},"src/security/mxc-containment.ts":{"bytes":28272,"imports":[{"path":"node:crypto","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},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:url","kind":"import-statement","external":true},{"path":"src/security/environment-policy.ts","kind":"import-statement","original":"./environment-policy.js"},{"path":"src/security/path-policy.ts","kind":"import-statement","original":"./path-policy.js"}],"format":"esm"},"src/security/process-containment.ts":{"bytes":17360,"imports":[{"path":"src/security/windows-process-containment.ts","kind":"import-statement","original":"./windows-process-containment.js"},{"path":"src/security/linux-process-containment.ts","kind":"import-statement","original":"./linux-process-containment.js"},{"path":"src/security/path-policy.ts","kind":"import-statement","original":"./path-policy.js"},{"path":"src/security/containment-certification.ts","kind":"import-statement","original":"./containment-certification.js"},{"path":"src/security/mxc-containment.ts","kind":"import-statement","original":"./mxc-containment.js"}],"format":"esm"},"src/security/secure-execution-contract.ts":{"bytes":24510,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"src/security/path-policy.ts","kind":"import-statement","original":"./path-policy.js"},{"path":"src/security/process-containment.ts","kind":"import-statement","original":"./process-containment.js"}],"format":"esm"},"src/automation/policy.ts":{"bytes":15653,"imports":[{"path":"src/security/secure-execution-contract.ts","kind":"import-statement","original":"../security/secure-execution-contract.js"},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/types.ts":{"bytes":11227,"imports":[],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1489,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/utils/custom-names.ts":{"bytes":2210,"imports":[],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25271,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/utils/custom-names.ts","kind":"import-statement","original":"../utils/custom-names.js"},{"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/automation/evidence.ts":{"bytes":8618,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"../artifacts/repository.js"},{"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/automation/errors.ts","kind":"import-statement","original":"./errors.js"}],"format":"esm"},"src/automation/durable-execution.ts":{"bytes":4647,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/automation/evidence.ts","kind":"import-statement","original":"./evidence.js"},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"}],"format":"esm"},"src/automation/executor.ts":{"bytes":16288,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/durable-execution.ts","kind":"import-statement","original":"./durable-execution.js"},{"path":"src/automation/evidence.ts","kind":"import-statement","original":"./evidence.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/policy.ts","kind":"import-statement","original":"./policy.js"}],"format":"esm"},"src/automation/execution-journal.ts":{"bytes":7254,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"node:sqlite","kind":"dynamic-import","external":true}],"format":"esm"},"src/automation/conformance.ts":{"bytes":4331,"imports":[{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/policy.ts","kind":"import-statement","original":"./policy.js"},{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/automation/http-adapter.ts":{"bytes":8862,"imports":[{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"}],"format":"esm"},"src/automation/browser-control-plane-adapter.ts":{"bytes":17420,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/utils/fs.ts":{"bytes":11685,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","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/version.ts":{"bytes":195,"imports":[],"format":"esm"},"src/artifacts/file-repository.ts":{"bytes":16401,"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/utils/fs.ts","kind":"import-statement","original":"../utils/fs.js"},{"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/utils/yaml.ts":{"bytes":5506,"imports":[],"format":"esm"},"src/utils/platform.ts":{"bytes":5600,"imports":[{"path":"node:os","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/agents/definitions.ts":{"bytes":20961,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/utils/yaml.ts","kind":"import-statement","original":"../utils/yaml.js"},{"path":"src/utils/platform.ts","kind":"import-statement","original":"../utils/platform.js"}],"format":"esm"},"src/agents/profiles.ts":{"bytes":33625,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/agents/definitions.ts","kind":"import-statement","original":"./definitions.js"}],"format":"esm"},"src/security/capability-lease.ts":{"bytes":29318,"imports":[{"path":"src/agents/profiles.ts","kind":"import-statement","original":"../agents/profiles.js"},{"path":"src/utils/custom-names.ts","kind":"import-statement","original":"../utils/custom-names.js"}],"format":"esm"},"src/automation/tool-pack.ts":{"bytes":19206,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"}],"format":"esm"},"src/automation/host-runtime.ts":{"bytes":30630,"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},{"path":"src/artifacts/file-repository.ts","kind":"import-statement","original":"../artifacts/file-repository.js"},{"path":"src/security/capability-lease.ts","kind":"import-statement","original":"../security/capability-lease.js"},{"path":"src/security/secure-execution-contract.ts","kind":"import-statement","original":"../security/secure-execution-contract.js"},{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/automation/executor.ts","kind":"import-statement","original":"./executor.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/tool-pack.ts","kind":"import-statement","original":"./tool-pack.js"},{"path":"src/automation/browser-control-plane-adapter.ts","kind":"import-statement","original":"./browser-control-plane-adapter.js"}],"format":"esm"},"src/automation/index.ts":{"bytes":449,"imports":[{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/policy.ts","kind":"import-statement","original":"./policy.js"},{"path":"src/automation/evidence.ts","kind":"import-statement","original":"./evidence.js"},{"path":"src/automation/executor.ts","kind":"import-statement","original":"./executor.js"},{"path":"src/automation/execution-journal.ts","kind":"import-statement","original":"./execution-journal.js"},{"path":"src/automation/durable-execution.ts","kind":"import-statement","original":"./durable-execution.js"},{"path":"src/automation/conformance.ts","kind":"import-statement","original":"./conformance.js"},{"path":"src/automation/http-adapter.ts","kind":"import-statement","original":"./http-adapter.js"},{"path":"src/automation/browser-control-plane-adapter.ts","kind":"import-statement","original":"./browser-control-plane-adapter.js"},{"path":"src/automation/host-runtime.ts","kind":"import-statement","original":"./host-runtime.js"},{"path":"src/automation/tool-pack.ts","kind":"import-statement","original":"./tool-pack.js"}],"format":"esm"}},"outputs":{"dist/automation/index.js":{"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:crypto","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},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:url","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:buffer","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:sqlite","kind":"dynamic-import","external":true},{"path":"node:crypto","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},{"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/promises","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},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true}],"exports":["CliGovernedAutomationRuntime","SqliteAutomationExecutionJournal","XENO_AUTOMATION_OPERATIONS","XENO_AUTOMATION_PROTOCOL_VERSION","XENO_BROWSER_CONTROL_PLANE_OPERATIONS","XenoAutomationError","XenoBrowserControlPlaneAdapter","XenoGovernedAutomationExecutor","XenoHostGovernedAutomationRuntime","XenoLoopbackAutomationAdapter","assertRequiredXenoAutomationEvidence","assertValidXenoAutomationAdapterManifest","assertValidXenoAutomationRequest","assertXenoAutomationAdapterConformant","assertXenoAutomationAuthority","buildXenoAutomationCapabilityUse","createCliAutomationAuditSink","createCliGovernedAutomationRuntime","createXenoAutomationConformanceReport","createXenoGovernedAutomationTools","createXenoHostAutomationAuditSink","createXenoHostGovernedAutomationRuntime","describeXenoAutomationOperation","inspectCliAutomationStatus","inspectXenoHostAutomationStatus","isXenoAutomationOperation","materializeXenoAutomationEvidence","openSqliteAutomationExecutionJournal","pending","persistXenoAutomationEvidence","readCliAutomationEnvironment","readXenoHostAutomationEnvironment","renderCliAutomationStatus","renderXenoHostAutomationStatus","resolveXenoAutomationEvidencePolicy","runDurableAutomation"],"entryPoint":"src/automation/index.ts","inputs":{"src/automation/types.ts":{"bytesInOutput":8},"src/automation/index.ts":{"bytesInOutput":0},"src/automation/operations.ts":{"bytesInOutput":1656},"src/automation/errors.ts":{"bytesInOutput":129},"src/security/secure-execution-contract.ts":{"bytesInOutput":10453},"src/security/path-policy.ts":{"bytesInOutput":2570},"src/security/windows-process-containment.ts":{"bytesInOutput":47621},"src/security/linux-process-containment.ts":{"bytesInOutput":1948},"src/security/containment-certification.ts":{"bytesInOutput":6156},"src/security/mxc-containment.ts":{"bytesInOutput":6366},"src/security/process-containment.ts":{"bytesInOutput":6520},"src/automation/policy.ts":{"bytesInOutput":7893},"src/automation/evidence.ts":{"bytesInOutput":4449},"src/artifacts/types.ts":{"bytesInOutput":825},"src/artifacts/validation.ts":{"bytesInOutput":13370},"src/artifacts/hash.ts":{"bytesInOutput":126},"src/utils/custom-names.ts":{"bytesInOutput":125},"src/artifacts/repository.ts":{"bytesInOutput":13753},"src/automation/executor.ts":{"bytesInOutput":7132},"src/automation/durable-execution.ts":{"bytesInOutput":2222},"src/automation/execution-journal.ts":{"bytesInOutput":4236},"src/automation/conformance.ts":{"bytesInOutput":2199},"src/automation/http-adapter.ts":{"bytesInOutput":4320},"src/automation/browser-control-plane-adapter.ts":{"bytesInOutput":9666},"src/automation/host-runtime.ts":{"bytesInOutput":12795},"src/artifacts/file-repository.ts":{"bytesInOutput":6720},"src/utils/fs.ts":{"bytesInOutput":314},"src/control-plane/lock.ts":{"bytesInOutput":1054},"src/version.ts":{"bytesInOutput":17},"src/utils/platform.ts":{"bytesInOutput":96},"src/agents/profiles.ts":{"bytesInOutput":8624},"src/security/capability-lease.ts":{"bytesInOutput":14560},"src/automation/tool-pack.ts":{"bytesInOutput":10038}},"bytes":209313}}}
1
+ {"inputs":{"src/automation/types.ts":{"bytes":7431,"imports":[],"format":"esm"},"src/automation/operations.ts":{"bytes":3367,"imports":[],"format":"esm"},"src/automation/errors.ts":{"bytes":899,"imports":[],"format":"esm"},"src/security/path-policy.ts":{"bytes":5541,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/windows-process-containment.ts":{"bytes":51557,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/linux-process-containment.ts":{"bytes":5665,"imports":[{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/containment-certification.ts":{"bytes":13312,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/security/environment-policy.ts":{"bytes":1195,"imports":[],"format":"esm"},"src/security/mxc-containment.ts":{"bytes":28272,"imports":[{"path":"node:crypto","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},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:url","kind":"import-statement","external":true},{"path":"src/security/environment-policy.ts","kind":"import-statement","original":"./environment-policy.js"},{"path":"src/security/path-policy.ts","kind":"import-statement","original":"./path-policy.js"}],"format":"esm"},"src/security/process-containment.ts":{"bytes":17360,"imports":[{"path":"src/security/windows-process-containment.ts","kind":"import-statement","original":"./windows-process-containment.js"},{"path":"src/security/linux-process-containment.ts","kind":"import-statement","original":"./linux-process-containment.js"},{"path":"src/security/path-policy.ts","kind":"import-statement","original":"./path-policy.js"},{"path":"src/security/containment-certification.ts","kind":"import-statement","original":"./containment-certification.js"},{"path":"src/security/mxc-containment.ts","kind":"import-statement","original":"./mxc-containment.js"}],"format":"esm"},"src/security/secure-execution-contract.ts":{"bytes":24510,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"src/security/path-policy.ts","kind":"import-statement","original":"./path-policy.js"},{"path":"src/security/process-containment.ts","kind":"import-statement","original":"./process-containment.js"}],"format":"esm"},"src/automation/policy.ts":{"bytes":15653,"imports":[{"path":"src/security/secure-execution-contract.ts","kind":"import-statement","original":"../security/secure-execution-contract.js"},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/artifacts/types.ts":{"bytes":11227,"imports":[],"format":"esm"},"src/artifacts/hash.ts":{"bytes":1489,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/utils/custom-names.ts":{"bytes":2210,"imports":[],"format":"esm"},"src/artifacts/validation.ts":{"bytes":25271,"imports":[{"path":"src/artifacts/types.ts","kind":"import-statement","original":"./types.js"},{"path":"node:buffer","kind":"import-statement","external":true},{"path":"src/artifacts/hash.ts","kind":"import-statement","original":"./hash.js"},{"path":"src/utils/custom-names.ts","kind":"import-statement","original":"../utils/custom-names.js"},{"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/automation/evidence.ts":{"bytes":8618,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/artifacts/repository.ts","kind":"import-statement","original":"../artifacts/repository.js"},{"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/automation/errors.ts","kind":"import-statement","original":"./errors.js"}],"format":"esm"},"src/automation/durable-execution.ts":{"bytes":4647,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/automation/evidence.ts","kind":"import-statement","original":"./evidence.js"},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"}],"format":"esm"},"src/automation/executor.ts":{"bytes":16288,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/durable-execution.ts","kind":"import-statement","original":"./durable-execution.js"},{"path":"src/automation/evidence.ts","kind":"import-statement","original":"./evidence.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/policy.ts","kind":"import-statement","original":"./policy.js"}],"format":"esm"},"src/automation/execution-journal.ts":{"bytes":7254,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"node:sqlite","kind":"dynamic-import","external":true}],"format":"esm"},"src/automation/conformance.ts":{"bytes":4331,"imports":[{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/policy.ts","kind":"import-statement","original":"./policy.js"},{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"}],"format":"esm"},"src/automation/http-adapter.ts":{"bytes":8862,"imports":[{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"}],"format":"esm"},"src/automation/browser-control-plane-adapter.ts":{"bytes":17420,"imports":[{"path":"node:crypto","kind":"import-statement","external":true}],"format":"esm"},"src/utils/fs.ts":{"bytes":11685,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","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/version.ts":{"bytes":195,"imports":[],"format":"esm"},"src/artifacts/file-repository.ts":{"bytes":16401,"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/utils/fs.ts","kind":"import-statement","original":"../utils/fs.js"},{"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/utils/yaml.ts":{"bytes":5506,"imports":[],"format":"esm"},"src/utils/platform.ts":{"bytes":5600,"imports":[{"path":"node:os","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/agents/definitions.ts":{"bytes":23563,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"src/utils/yaml.ts","kind":"import-statement","original":"../utils/yaml.js"},{"path":"src/utils/platform.ts","kind":"import-statement","original":"../utils/platform.js"}],"format":"esm"},"src/agents/profiles.ts":{"bytes":33625,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/agents/definitions.ts","kind":"import-statement","original":"./definitions.js"}],"format":"esm"},"src/security/capability-lease.ts":{"bytes":29318,"imports":[{"path":"src/agents/profiles.ts","kind":"import-statement","original":"../agents/profiles.js"},{"path":"src/utils/custom-names.ts","kind":"import-statement","original":"../utils/custom-names.js"}],"format":"esm"},"src/automation/tool-pack.ts":{"bytes":19206,"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"}],"format":"esm"},"src/automation/host-runtime.ts":{"bytes":30630,"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},{"path":"src/artifacts/file-repository.ts","kind":"import-statement","original":"../artifacts/file-repository.js"},{"path":"src/security/capability-lease.ts","kind":"import-statement","original":"../security/capability-lease.js"},{"path":"src/security/secure-execution-contract.ts","kind":"import-statement","original":"../security/secure-execution-contract.js"},{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/automation/executor.ts","kind":"import-statement","original":"./executor.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/tool-pack.ts","kind":"import-statement","original":"./tool-pack.js"},{"path":"src/automation/browser-control-plane-adapter.ts","kind":"import-statement","original":"./browser-control-plane-adapter.js"}],"format":"esm"},"src/automation/index.ts":{"bytes":449,"imports":[{"path":"src/automation/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/automation/operations.ts","kind":"import-statement","original":"./operations.js"},{"path":"src/automation/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"src/automation/policy.ts","kind":"import-statement","original":"./policy.js"},{"path":"src/automation/evidence.ts","kind":"import-statement","original":"./evidence.js"},{"path":"src/automation/executor.ts","kind":"import-statement","original":"./executor.js"},{"path":"src/automation/execution-journal.ts","kind":"import-statement","original":"./execution-journal.js"},{"path":"src/automation/durable-execution.ts","kind":"import-statement","original":"./durable-execution.js"},{"path":"src/automation/conformance.ts","kind":"import-statement","original":"./conformance.js"},{"path":"src/automation/http-adapter.ts","kind":"import-statement","original":"./http-adapter.js"},{"path":"src/automation/browser-control-plane-adapter.ts","kind":"import-statement","original":"./browser-control-plane-adapter.js"},{"path":"src/automation/host-runtime.ts","kind":"import-statement","original":"./host-runtime.js"},{"path":"src/automation/tool-pack.ts","kind":"import-statement","original":"./tool-pack.js"}],"format":"esm"}},"outputs":{"dist/automation/index.js":{"imports":[{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:crypto","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},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:url","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:buffer","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:sqlite","kind":"dynamic-import","external":true},{"path":"node:crypto","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},{"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/promises","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},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:crypto","kind":"import-statement","external":true}],"exports":["CliGovernedAutomationRuntime","SqliteAutomationExecutionJournal","XENO_AUTOMATION_OPERATIONS","XENO_AUTOMATION_PROTOCOL_VERSION","XENO_BROWSER_CONTROL_PLANE_OPERATIONS","XenoAutomationError","XenoBrowserControlPlaneAdapter","XenoGovernedAutomationExecutor","XenoHostGovernedAutomationRuntime","XenoLoopbackAutomationAdapter","assertRequiredXenoAutomationEvidence","assertValidXenoAutomationAdapterManifest","assertValidXenoAutomationRequest","assertXenoAutomationAdapterConformant","assertXenoAutomationAuthority","buildXenoAutomationCapabilityUse","createCliAutomationAuditSink","createCliGovernedAutomationRuntime","createXenoAutomationConformanceReport","createXenoGovernedAutomationTools","createXenoHostAutomationAuditSink","createXenoHostGovernedAutomationRuntime","describeXenoAutomationOperation","inspectCliAutomationStatus","inspectXenoHostAutomationStatus","isXenoAutomationOperation","materializeXenoAutomationEvidence","openSqliteAutomationExecutionJournal","pending","persistXenoAutomationEvidence","readCliAutomationEnvironment","readXenoHostAutomationEnvironment","renderCliAutomationStatus","renderXenoHostAutomationStatus","resolveXenoAutomationEvidencePolicy","runDurableAutomation"],"entryPoint":"src/automation/index.ts","inputs":{"src/automation/types.ts":{"bytesInOutput":8},"src/automation/index.ts":{"bytesInOutput":0},"src/automation/operations.ts":{"bytesInOutput":1656},"src/automation/errors.ts":{"bytesInOutput":129},"src/security/secure-execution-contract.ts":{"bytesInOutput":10453},"src/security/path-policy.ts":{"bytesInOutput":2570},"src/security/windows-process-containment.ts":{"bytesInOutput":47621},"src/security/linux-process-containment.ts":{"bytesInOutput":1948},"src/security/containment-certification.ts":{"bytesInOutput":6156},"src/security/mxc-containment.ts":{"bytesInOutput":6366},"src/security/process-containment.ts":{"bytesInOutput":6520},"src/automation/policy.ts":{"bytesInOutput":7893},"src/automation/evidence.ts":{"bytesInOutput":4449},"src/artifacts/types.ts":{"bytesInOutput":825},"src/artifacts/validation.ts":{"bytesInOutput":13370},"src/artifacts/hash.ts":{"bytesInOutput":126},"src/utils/custom-names.ts":{"bytesInOutput":125},"src/artifacts/repository.ts":{"bytesInOutput":13753},"src/automation/executor.ts":{"bytesInOutput":7132},"src/automation/durable-execution.ts":{"bytesInOutput":2222},"src/automation/execution-journal.ts":{"bytesInOutput":4236},"src/automation/conformance.ts":{"bytesInOutput":2199},"src/automation/http-adapter.ts":{"bytesInOutput":4320},"src/automation/browser-control-plane-adapter.ts":{"bytesInOutput":9666},"src/automation/host-runtime.ts":{"bytesInOutput":12795},"src/artifacts/file-repository.ts":{"bytesInOutput":6720},"src/utils/fs.ts":{"bytesInOutput":314},"src/control-plane/lock.ts":{"bytesInOutput":1054},"src/version.ts":{"bytesInOutput":17},"src/utils/platform.ts":{"bytesInOutput":96},"src/agents/definitions.ts":{"bytesInOutput":20},"src/agents/profiles.ts":{"bytesInOutput":8624},"src/security/capability-lease.ts":{"bytesInOutput":14560},"src/automation/tool-pack.ts":{"bytesInOutput":10038}},"bytes":209333}}}
@@ -1,4 +1,4 @@
1
- "use strict";var ne=Object.defineProperty;var qe=Object.getOwnPropertyDescriptor;var Fe=Object.getOwnPropertyNames;var je=Object.prototype.hasOwnProperty;var He=(s,e)=>{for(var t in e)ne(s,t,{get:e[t],enumerable:!0})},Je=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Fe(e))!je.call(s,n)&&n!==t&&ne(s,n,{get:()=>e[n],enumerable:!(r=qe(e,n))||r.enumerable});return s};var Ke=s=>Je(ne({},"__esModule",{value:!0}),s);var vt={};He(vt,{AGENT_DAEMON_PROTOCOL_VERSION:()=>O,AgentDaemonClient:()=>le,AgentDaemonServer:()=>de,AgentEventStore:()=>W,AgentRunController:()=>ce,AgentRunStore:()=>L,MonitorManager:()=>fe,MonitorStopTool:()=>we,MonitorTool:()=>he,OtelExporter:()=>Re,PEER_MESSAGE_DEFAULT_TTL_MS:()=>Ue,PEER_PRESENCE_TTL_MS:()=>Ne,PEER_SCHEMA_VERSION:()=>P,PEER_TASK_TERMINAL_STATUSES:()=>Ve,PeerMessagingStore:()=>ve,UsageAccumulator:()=>Q,UsageLedger:()=>ke,WorkflowPlanner:()=>$,WorkflowRuntime:()=>me,WorkflowStore:()=>B,acquireControlPlaneLock:()=>M,createAgentRunId:()=>Te,defaultPeerDirectory:()=>Le,getAgentRunDir:()=>dt,getAgentRunStoreDir:()=>ct,isPeerTaskTerminal:()=>j,movesTrustUpward:()=>We,peerShortId:()=>ye,renderPeerLabel:()=>ee,resolvePeerTarget:()=>ht,toPeerPosture:()=>ft});module.exports=Ke(vt);var De=require("node:crypto"),f=require("node:fs"),m=require("node:path");var V="0.10.26";var A=require("node:fs"),se=require("node:os"),Ae=require("node:path");function ze(){return new Date().toISOString()}function Be(){return new Date(Date.now()-Math.floor(process.uptime()*1e3)).toISOString()}function Se(s){try{return JSON.parse((0,A.readFileSync)(s,"utf8"))}catch{return null}}function Qe(s){if(!s||s<=0)return!1;try{return process.kill(s,0),!0}catch{return!1}}function Ge(s){return s.hostname!==(0,se.hostname)()?!0:Qe(s.pid)}function Pe(s,e){(0,A.mkdirSync)((0,Ae.dirname)(s),{recursive:!0}),(0,A.writeFileSync)(s,JSON.stringify(e,null,2)+`
1
+ "use strict";var ne=Object.defineProperty;var qe=Object.getOwnPropertyDescriptor;var Fe=Object.getOwnPropertyNames;var je=Object.prototype.hasOwnProperty;var He=(s,e)=>{for(var t in e)ne(s,t,{get:e[t],enumerable:!0})},Je=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Fe(e))!je.call(s,n)&&n!==t&&ne(s,n,{get:()=>e[n],enumerable:!(r=qe(e,n))||r.enumerable});return s};var Ke=s=>Je(ne({},"__esModule",{value:!0}),s);var vt={};He(vt,{AGENT_DAEMON_PROTOCOL_VERSION:()=>O,AgentDaemonClient:()=>le,AgentDaemonServer:()=>de,AgentEventStore:()=>W,AgentRunController:()=>ce,AgentRunStore:()=>L,MonitorManager:()=>fe,MonitorStopTool:()=>we,MonitorTool:()=>he,OtelExporter:()=>Re,PEER_MESSAGE_DEFAULT_TTL_MS:()=>Ue,PEER_PRESENCE_TTL_MS:()=>Ne,PEER_SCHEMA_VERSION:()=>P,PEER_TASK_TERMINAL_STATUSES:()=>Ve,PeerMessagingStore:()=>ve,UsageAccumulator:()=>Q,UsageLedger:()=>ke,WorkflowPlanner:()=>$,WorkflowRuntime:()=>me,WorkflowStore:()=>B,acquireControlPlaneLock:()=>M,createAgentRunId:()=>Te,defaultPeerDirectory:()=>Le,getAgentRunDir:()=>dt,getAgentRunStoreDir:()=>ct,isPeerTaskTerminal:()=>j,movesTrustUpward:()=>We,peerShortId:()=>ye,renderPeerLabel:()=>ee,resolvePeerTarget:()=>ht,toPeerPosture:()=>ft});module.exports=Ke(vt);var De=require("node:crypto"),f=require("node:fs"),m=require("node:path");var V="0.10.29";var A=require("node:fs"),se=require("node:os"),Ae=require("node:path");function ze(){return new Date().toISOString()}function Be(){return new Date(Date.now()-Math.floor(process.uptime()*1e3)).toISOString()}function Se(s){try{return JSON.parse((0,A.readFileSync)(s,"utf8"))}catch{return null}}function Qe(s){if(!s||s<=0)return!1;try{return process.kill(s,0),!0}catch{return!1}}function Ge(s){return s.hostname!==(0,se.hostname)()?!0:Qe(s.pid)}function Pe(s,e){(0,A.mkdirSync)((0,Ae.dirname)(s),{recursive:!0}),(0,A.writeFileSync)(s,JSON.stringify(e,null,2)+`
2
2
  `,{encoding:"utf8",flag:"wx"})}function Xe(s,e){let t=Se(s);t?.pid!==e.pid||t.hostname!==e.hostname||(0,A.rmSync)(s,{force:!0})}function M(s,e,t){let r=ze(),n={schemaVersion:1,name:e,pid:process.pid,hostname:(0,se.hostname)(),processStartedAt:Be(),version:t,acquiredAt:r,updatedAt:r};try{Pe(s,n)}catch(o){if(o.code!=="EEXIST")throw o;let a=Se(s);if(a&&Ge(a))throw new Error(`${e} is already locked by PID ${a.pid} on ${a.hostname}.`);(0,A.rmSync)(s,{force:!0}),Pe(s,n)}return{record:n,release:()=>{Xe(s,n)}}}var Ee=require("node:crypto"),S=require("node:fs"),C=require("node:path");function xe(s){return(0,C.basename)(s).replace(/[^A-Za-z0-9_.-]/g,"_").slice(0,96)}function Ie(s){return(0,S.existsSync)(s)?(0,S.readFileSync)(s,"utf8").split(/\r?\n/).map(e=>e.trim()).filter(Boolean).map(e=>{try{return JSON.parse(e)}catch{return null}}).filter(e=>e!==null):[]}var W=class{constructor(e){this.runsDir=e;(0,S.mkdirSync)(this.runsDir,{recursive:!0})}runsDir;pathFor(e){return(0,C.join)(this.runsDir,xe(e),"events.jsonl")}append(e,t,r={},n=new Date().toISOString()){let o=this.pathFor(e);(0,S.mkdirSync)((0,C.dirname)(o),{recursive:!0});let i=M(`${o}.lock`,`events:${xe(e)}`,V);try{let a=Ie(o).reduce((x,p,d)=>Math.max(x,p.sequence??d),-1)+1,c={schemaVersion:1,eventId:`event_${(0,Ee.randomUUID)()}`,sequence:a,runId:e,type:t,timestamp:n,payload:r};return(0,S.appendFileSync)(o,`${JSON.stringify(c)}
3
3
  `,"utf8"),c}finally{i.release()}}read(e){return Ie(this.pathFor(e))}tail(e,t=100){let r=Math.max(0,Math.min(1e4,Math.trunc(t)));return r===0?[]:this.read(e).slice(-r)}};var _=require("node:os");var oe=require("node:path"),Et=(0,_.platform)();var bt=(0,_.release)(),Dt=(0,_.homedir)();function I(){let s=process.env.XENO_AGENT_HOME?.trim();return s?(0,oe.resolve)(s):(0,oe.resolve)((0,_.homedir)(),".xeno-agent")}var Ze=1,Ye=(0,m.join)(I(),"daemon"),ae=(0,m.join)(Ye,"runs");function k(){return new Date().toISOString()}function et(s=new Date){return s.toISOString().replace(/[^0-9]/g,"").slice(0,14)}function ie(s){return s.replace(/[^A-Za-z0-9_.-]/g,"_").slice(0,80)}function ue(s){return(0,m.resolve)(s)}function J(s){return ue(s).toLowerCase()}function be(s,e){let t=J(s),r=J(e);return t===r||t.startsWith(`${r}\\`)||t.startsWith(`${r}/`)}function tt(s,e){return!!(J(s.cwd)===J(e)||s.git?.root&&be(e,s.git.root)||s.git?.worktree&&be(e,s.git.worktree))}function rt(s){return ie(Buffer.from(ue(s)).toString("base64url"))}function nt(){return{input:0,output:0,total:0}}function H(s){try{return JSON.parse((0,f.readFileSync)(s,"utf8"))}catch{return null}}function st(s){return s instanceof Error&&/\balready locked by PID\b/.test(s.message)}function ot(s,e){(0,f.mkdirSync)((0,m.dirname)(s),{recursive:!0});let t=`${s}.${process.pid}.${Date.now()}.tmp`;(0,f.writeFileSync)(t,JSON.stringify(e,null,2)+`
4
4
  `,"utf8"),(0,f.renameSync)(t,s)}function it(s){if(!s||s<=0)return!1;try{return process.kill(s,0),!0}catch{return!1}}function at(s){return s==="completed"||s==="failed"||s==="cancelled"||s==="interrupted"}function ut(s,e){return s.pinned!==e.pinned?s.pinned?-1:1:Date.parse(e.updatedAt)-Date.parse(s.updatedAt)}function ct(){return ae}function dt(s){return(0,m.join)(ae,s)}function Te(s=new Date){return`run_${et(s)}_${(0,De.randomUUID)().slice(0,8)}`}var L=class{constructor(e=ae){this.runsDir=e;(0,f.mkdirSync)(this.runsDir,{recursive:!0}),this.eventStore=new W(this.runsDir)}runsDir;eventStore;create(e){let t=Te(),r=(0,m.join)(this.runsDir,t);(0,f.mkdirSync)(r,{recursive:!0});let n=k(),o=(0,m.join)(r,"events.jsonl"),i={schemaVersion:Ze,runId:t,sessionId:t,rootRunId:t,cwd:ue(e.cwd),workspaceId:rt(e.cwd),prompt:e.prompt,...e.title?{title:e.title}:{},status:"starting",model:e.model,...e.effort?{effort:e.effort}:{},...e.agent?{agent:e.agent}:{},...e.git?{git:e.git}:{},permissionMode:e.permissionMode,...e.cliVersion?{createdByCliVersion:e.cliVersion}:{},createdBySdkVersion:e.sdkVersion??V,createdAt:n,updatedAt:n,lastActivityAt:n,pinned:!!e.pinned,attachedClients:0,...e.cliVersion?{cliVersion:e.cliVersion}:{},...e.sdkVersion?{sdkVersion:e.sdkVersion}:{},stdoutPath:(0,m.join)(r,"stdout.log"),stderrPath:(0,m.join)(r,"stderr.log"),eventsPath:o,usage:nt(),children:[],tags:[]};return(0,f.writeFileSync)(i.stdoutPath,"","utf8"),(0,f.writeFileSync)(i.stderrPath,"","utf8"),(0,f.writeFileSync)(i.eventsPath,"","utf8"),this.write(i),this.appendEvent(t,"run_created",{cwd:i.cwd,model:i.model,...i.agent?{agent:i.agent}:{},...i.git?{git:i.git}:{},permissionMode:i.permissionMode,pinned:i.pinned}),i}get(e){let t=H(this.recordPath(e));return t?this.refreshRecordStatus(t):null}list(e={}){if(!(0,f.existsSync)(this.runsDir))return[];let t=(0,f.readdirSync)(this.runsDir,{withFileTypes:!0}).filter(r=>r.isDirectory()).map(r=>{try{return this.get(r.name)}catch(n){if(st(n))return H(this.recordPath(r.name));throw n}}).filter(r=>r!==null).filter(r=>e.all||!e.cwd||tt(r,e.cwd)).filter(r=>!e.status||e.status.includes(r.status)).sort(ut);return typeof e.limit=="number"&&e.limit>0?t.slice(0,e.limit):t}markSpawned(e,t,r){return this.update(e,n=>({...n,status:"running",workerPid:t,...r?{workerVersion:r}:{},startedAt:n.startedAt??k(),lastActivityAt:k()}))}markStarted(e,t){return this.update(e,r=>({...r,status:"running",workerPid:t.pid,...t.workerVersion?{workerVersion:t.workerVersion}:{},...t.model?{model:t.model}:{},...t.effort?{effort:t.effort}:{},startedAt:r.startedAt??k(),lastActivityAt:k()}))}markCompleted(e,t){return this.update(e,r=>({...r,status:t.status,...t.statusReason?{statusReason:t.statusReason}:{},exitCode:t.exitCode??null,usage:t.usage??r.usage,endedAt:k(),lastActivityAt:k()}))}markCancelled(e,t){return this.update(e,r=>({...r,status:"cancelled",statusReason:t,endedAt:k(),lastActivityAt:k()}))}markPaused(e,t="Paused by user."){let r=this.update(e,n=>({...n,status:"paused",statusReason:t,lastActivityAt:k()}));return r&&this.appendEvent(e,"run_paused",{reason:t}),r}markResumed(e,t="Resumed by user."){let r=this.update(e,n=>{let o={...n,status:"running",statusReason:t,lastActivityAt:k()};return delete o.endedAt,delete o.exitCode,o});return r&&this.appendEvent(e,"run_resumed",{reason:t}),r}setPinned(e,t){let r=this.update(e,n=>({...n,pinned:t,lastActivityAt:k()}));return r&&this.appendEvent(e,t?"run_pinned":"run_unpinned",{pinned:t}),r}appendEvent(e,t,r={}){let n=H(this.recordPath(e)),o=this.eventStore.append(e,t,r);n&&this.update(e,i=>({...i,lastActivityAt:o.timestamp}))}readEvents(e){return this.get(e)?this.eventStore.read(e):[]}delete(e){(0,f.rmSync)((0,m.join)(this.runsDir,e),{recursive:!0,force:!0})}refreshRecordStatus(e){if(at(e.status))return e;if(e.workerPid&&!it(e.workerPid)){let t={...e,status:"failed",statusReason:"Worker process is no longer running and did not record a terminal status.",endedAt:e.endedAt??k(),updatedAt:k()};return this.write(t),t}return e}update(e,t){let r=H(this.recordPath(e));if(!r)return null;let n=t(r);return n.updatedAt=k(),this.write(n),n}write(e){let t=M((0,m.join)(this.runDir(e.runId),"run.lock"),`run:${e.runId}`,V);try{ot(this.recordPath(e.runId),e)}finally{t.release()}}recordPath(e){return(0,m.join)(this.runsDir,ie((0,m.basename)(e)),"run.json")}runDir(e){return(0,m.join)(this.runsDir,ie((0,m.basename)(e)))}};function Me(s){return s==="completed"||s==="failed"||s==="cancelled"||s==="interrupted"}var ce=class{constructor(e={}){this.options=e;this.store=e.store??new L}options;store;create(e){return this.store.create(e)}async start(e){let t=this.create(e);if(!this.options.spawn)return t;try{let r=await this.options.spawn(t),n=this.store.markSpawned(t.runId,r.pid,r.workerVersion);if(!n)throw new Error(`Run disappeared during spawn: ${t.runId}`);return this.store.appendEvent(t.runId,"run_started",{pid:r.pid}),n}catch(r){let n=r instanceof Error?r.message:String(r);throw this.store.markCompleted(t.runId,{status:"failed",statusReason:n,exitCode:null}),this.store.appendEvent(t.runId,"run_start_failed",{reason:n}),r}}get(e){return this.store.get(e)}list(e={}){return this.store.list(e)}events(e,t){let r=this.store.readEvents(e);return t===void 0?r:r.slice(-Math.max(0,Math.trunc(t)))}async stop(e,t="Stopped by user."){let r=this.store.get(e);if(!r||Me(r.status))return r;await this.options.stop?.(r,t);let n=this.store.markCancelled(e,t);return n&&this.store.appendEvent(e,"run_cancelled",{reason:t}),n}async pause(e,t="Paused by user."){let r=this.store.get(e);return!r||Me(r.status)||r.status==="paused"?r:(await this.options.pause?.(r,t),this.store.markPaused(e,t))}async resume(e,t="Resumed by user."){let r=this.store.get(e);return!r||r.status!=="paused"?r:(await this.options.resume?.(r,t),this.store.markResumed(e,t))}complete(e,t,r={}){let n=this.store.markCompleted(e,{status:t,...r.reason?{statusReason:r.reason}:{},...r.exitCode!==void 0?{exitCode:r.exitCode}:{},...r.usage?{usage:r.usage}:{}});return n&&this.store.appendEvent(e,`run_${t}`,{...r.reason?{reason:r.reason}:{}}),n}};var K=require("node:crypto"),O=1;function lt(s,e){if(!s)return!1;let t=Buffer.from(s),r=Buffer.from(e);return t.length===r.length&&(0,K.timingSafeEqual)(t,r)}var de=class{constructor(e={}){this.options=e}options;handlers=new Map;register(e,t){let r=e.trim();if(!r)throw new Error("Daemon method name cannot be empty.");if(this.handlers.has(r))throw new Error(`Daemon method already registered: ${r}`);return this.handlers.set(r,t),this}registerController(e){return this.register("runs.start",t=>e.start(t)).register("runs.get",t=>e.get(t.runId)).register("runs.list",t=>e.list(t??{})).register("runs.events",t=>{let r=t;return e.events(r.runId,r.limit)}).register("runs.stop",t=>{let r=t;return e.stop(r.runId,r.reason)}).register("runs.pause",t=>{let r=t;return e.pause(r.runId,r.reason)}).register("runs.resume",t=>{let r=t;return e.resume(r.runId,r.reason)})}async handle(e){if(e.protocolVersion!==O)return this.error(e.id,"PROTOCOL_MISMATCH",`Unsupported protocol version: ${e.protocolVersion}`);if(this.options.authToken&&!lt(e.authToken,this.options.authToken))return this.error(e.id,"UNAUTHORIZED","Daemon authentication failed.");let t=this.handlers.get(e.method);if(!t)return this.error(e.id,"METHOD_NOT_FOUND",`Unknown daemon method: ${e.method}`);try{return{protocolVersion:O,id:e.id,result:await t(e.params,e)}}catch(r){return this.error(e.id,"INTERNAL_ERROR",r instanceof Error?r.message:String(r))}}error(e,t,r){return{protocolVersion:O,id:e,error:{code:t,message:r}}}},le=class{constructor(e,t={}){this.transport=e;this.options=t}transport;options;async request(e,t){let r={protocolVersion:O,id:`request_${(0,K.randomUUID)()}`,method:e,params:t,...this.options.authToken?{authToken:this.options.authToken}:{}},n=await this.transport(r);if(n.protocolVersion!==O||n.id!==r.id)throw new Error("Invalid daemon response identity.");if("error"in n){let o=new Error(n.error.message);throw o.code=n.error.code,o}return n.result}};var pe=require("node:crypto"),h=require("node:fs"),v=require("node:path");function z(s){return(0,v.basename)(s).replace(/[^A-Za-z0-9_.-]/g,"_").slice(0,96)}function ge(s){try{return JSON.parse((0,h.readFileSync)(s,"utf8"))}catch{return null}}function _e(s,e){(0,h.mkdirSync)((0,v.dirname)(s),{recursive:!0});let t=`${s}.${process.pid}.${Date.now()}.tmp`;(0,h.writeFileSync)(t,`${JSON.stringify(e,null,2)}
@@ -1,4 +1,4 @@
1
- import{randomUUID as Qe}from"node:crypto";import{existsSync as Ge,mkdirSync as B,readFileSync as Xe,readdirSync as Ze,renameSync as Ye,rmSync as et,writeFileSync as N}from"node:fs";import{basename as ge,dirname as tt,join as w,resolve as rt}from"node:path";var b="0.10.26";import{mkdirSync as Me,readFileSync as _e,rmSync as se,writeFileSync as Ce}from"node:fs";import{hostname as oe}from"node:os";import{dirname as Oe}from"node:path";function $e(){return new Date().toISOString()}function Ne(){return new Date(Date.now()-Math.floor(process.uptime()*1e3)).toISOString()}function ie(s){try{return JSON.parse(_e(s,"utf8"))}catch{return null}}function Ue(s){if(!s||s<=0)return!1;try{return process.kill(s,0),!0}catch{return!1}}function Ve(s){return s.hostname!==oe()?!0:Ue(s.pid)}function ne(s,e){Me(Oe(s),{recursive:!0}),Ce(s,JSON.stringify(e,null,2)+`
1
+ import{randomUUID as Qe}from"node:crypto";import{existsSync as Ge,mkdirSync as B,readFileSync as Xe,readdirSync as Ze,renameSync as Ye,rmSync as et,writeFileSync as N}from"node:fs";import{basename as ge,dirname as tt,join as w,resolve as rt}from"node:path";var b="0.10.29";import{mkdirSync as Me,readFileSync as _e,rmSync as se,writeFileSync as Ce}from"node:fs";import{hostname as oe}from"node:os";import{dirname as Oe}from"node:path";function $e(){return new Date().toISOString()}function Ne(){return new Date(Date.now()-Math.floor(process.uptime()*1e3)).toISOString()}function ie(s){try{return JSON.parse(_e(s,"utf8"))}catch{return null}}function Ue(s){if(!s||s<=0)return!1;try{return process.kill(s,0),!0}catch{return!1}}function Ve(s){return s.hostname!==oe()?!0:Ue(s.pid)}function ne(s,e){Me(Oe(s),{recursive:!0}),Ce(s,JSON.stringify(e,null,2)+`
2
2
  `,{encoding:"utf8",flag:"wx"})}function We(s,e){let t=ie(s);t?.pid!==e.pid||t.hostname!==e.hostname||se(s,{force:!0})}function x(s,e,t){let r=$e(),n={schemaVersion:1,name:e,pid:process.pid,hostname:oe(),processStartedAt:Ne(),version:t,acquiredAt:r,updatedAt:r};try{ne(s,n)}catch(o){if(o.code!=="EEXIST")throw o;let a=ie(s);if(a&&Ve(a))throw new Error(`${e} is already locked by PID ${a.pid} on ${a.hostname}.`);se(s,{force:!0}),ne(s,n)}return{record:n,release:()=>{We(s,n)}}}import{randomUUID as Le}from"node:crypto";import{appendFileSync as qe,existsSync as Fe,mkdirSync as ae,readFileSync as je}from"node:fs";import{basename as He,dirname as Je,join as Ke}from"node:path";function ue(s){return He(s).replace(/[^A-Za-z0-9_.-]/g,"_").slice(0,96)}function ce(s){return Fe(s)?je(s,"utf8").split(/\r?\n/).map(e=>e.trim()).filter(Boolean).map(e=>{try{return JSON.parse(e)}catch{return null}}).filter(e=>e!==null):[]}var O=class{constructor(e){this.runsDir=e;ae(this.runsDir,{recursive:!0})}runsDir;pathFor(e){return Ke(this.runsDir,ue(e),"events.jsonl")}append(e,t,r={},n=new Date().toISOString()){let o=this.pathFor(e);ae(Je(o),{recursive:!0});let i=x(`${o}.lock`,`events:${ue(e)}`,b);try{let a=ce(o).reduce((R,g,c)=>Math.max(R,g.sequence??c),-1)+1,u={schemaVersion:1,eventId:`event_${Le()}`,sequence:a,runId:e,type:t,timestamp:n,payload:r};return qe(o,`${JSON.stringify(u)}
3
3
  `,"utf8"),u}finally{i.release()}}read(e){return ce(this.pathFor(e))}tail(e,t=100){let r=Math.max(0,Math.min(1e4,Math.trunc(t)));return r===0?[]:this.read(e).slice(-r)}};import{homedir as le,platform as ze,release as Be}from"node:os";import{resolve as de}from"node:path";var ur=ze();var cr=Be(),dr=le();function v(){let s=process.env.XENO_AGENT_HOME?.trim();return s?de(s):de(le(),".xeno-agent")}var nt=1,st=w(v(),"daemon"),G=w(st,"runs");function m(){return new Date().toISOString()}function ot(s=new Date){return s.toISOString().replace(/[^0-9]/g,"").slice(0,14)}function Q(s){return s.replace(/[^A-Za-z0-9_.-]/g,"_").slice(0,80)}function X(s){return rt(s)}function U(s){return X(s).toLowerCase()}function pe(s,e){let t=U(s),r=U(e);return t===r||t.startsWith(`${r}\\`)||t.startsWith(`${r}/`)}function it(s,e){return!!(U(s.cwd)===U(e)||s.git?.root&&pe(e,s.git.root)||s.git?.worktree&&pe(e,s.git.worktree))}function at(s){return Q(Buffer.from(X(s)).toString("base64url"))}function ut(){return{input:0,output:0,total:0}}function $(s){try{return JSON.parse(Xe(s,"utf8"))}catch{return null}}function ct(s){return s instanceof Error&&/\balready locked by PID\b/.test(s.message)}function dt(s,e){B(tt(s),{recursive:!0});let t=`${s}.${process.pid}.${Date.now()}.tmp`;N(t,JSON.stringify(e,null,2)+`
4
4
  `,"utf8"),Ye(t,s)}function lt(s){if(!s||s<=0)return!1;try{return process.kill(s,0),!0}catch{return!1}}function gt(s){return s==="completed"||s==="failed"||s==="cancelled"||s==="interrupted"}function pt(s,e){return s.pinned!==e.pinned?s.pinned?-1:1:Date.parse(e.updatedAt)-Date.parse(s.updatedAt)}function Rr(){return G}function vr(s){return w(G,s)}function mt(s=new Date){return`run_${ot(s)}_${Qe().slice(0,8)}`}var V=class{constructor(e=G){this.runsDir=e;B(this.runsDir,{recursive:!0}),this.eventStore=new O(this.runsDir)}runsDir;eventStore;create(e){let t=mt(),r=w(this.runsDir,t);B(r,{recursive:!0});let n=m(),o=w(r,"events.jsonl"),i={schemaVersion:nt,runId:t,sessionId:t,rootRunId:t,cwd:X(e.cwd),workspaceId:at(e.cwd),prompt:e.prompt,...e.title?{title:e.title}:{},status:"starting",model:e.model,...e.effort?{effort:e.effort}:{},...e.agent?{agent:e.agent}:{},...e.git?{git:e.git}:{},permissionMode:e.permissionMode,...e.cliVersion?{createdByCliVersion:e.cliVersion}:{},createdBySdkVersion:e.sdkVersion??b,createdAt:n,updatedAt:n,lastActivityAt:n,pinned:!!e.pinned,attachedClients:0,...e.cliVersion?{cliVersion:e.cliVersion}:{},...e.sdkVersion?{sdkVersion:e.sdkVersion}:{},stdoutPath:w(r,"stdout.log"),stderrPath:w(r,"stderr.log"),eventsPath:o,usage:ut(),children:[],tags:[]};return N(i.stdoutPath,"","utf8"),N(i.stderrPath,"","utf8"),N(i.eventsPath,"","utf8"),this.write(i),this.appendEvent(t,"run_created",{cwd:i.cwd,model:i.model,...i.agent?{agent:i.agent}:{},...i.git?{git:i.git}:{},permissionMode:i.permissionMode,pinned:i.pinned}),i}get(e){let t=$(this.recordPath(e));return t?this.refreshRecordStatus(t):null}list(e={}){if(!Ge(this.runsDir))return[];let t=Ze(this.runsDir,{withFileTypes:!0}).filter(r=>r.isDirectory()).map(r=>{try{return this.get(r.name)}catch(n){if(ct(n))return $(this.recordPath(r.name));throw n}}).filter(r=>r!==null).filter(r=>e.all||!e.cwd||it(r,e.cwd)).filter(r=>!e.status||e.status.includes(r.status)).sort(pt);return typeof e.limit=="number"&&e.limit>0?t.slice(0,e.limit):t}markSpawned(e,t,r){return this.update(e,n=>({...n,status:"running",workerPid:t,...r?{workerVersion:r}:{},startedAt:n.startedAt??m(),lastActivityAt:m()}))}markStarted(e,t){return this.update(e,r=>({...r,status:"running",workerPid:t.pid,...t.workerVersion?{workerVersion:t.workerVersion}:{},...t.model?{model:t.model}:{},...t.effort?{effort:t.effort}:{},startedAt:r.startedAt??m(),lastActivityAt:m()}))}markCompleted(e,t){return this.update(e,r=>({...r,status:t.status,...t.statusReason?{statusReason:t.statusReason}:{},exitCode:t.exitCode??null,usage:t.usage??r.usage,endedAt:m(),lastActivityAt:m()}))}markCancelled(e,t){return this.update(e,r=>({...r,status:"cancelled",statusReason:t,endedAt:m(),lastActivityAt:m()}))}markPaused(e,t="Paused by user."){let r=this.update(e,n=>({...n,status:"paused",statusReason:t,lastActivityAt:m()}));return r&&this.appendEvent(e,"run_paused",{reason:t}),r}markResumed(e,t="Resumed by user."){let r=this.update(e,n=>{let o={...n,status:"running",statusReason:t,lastActivityAt:m()};return delete o.endedAt,delete o.exitCode,o});return r&&this.appendEvent(e,"run_resumed",{reason:t}),r}setPinned(e,t){let r=this.update(e,n=>({...n,pinned:t,lastActivityAt:m()}));return r&&this.appendEvent(e,t?"run_pinned":"run_unpinned",{pinned:t}),r}appendEvent(e,t,r={}){let n=$(this.recordPath(e)),o=this.eventStore.append(e,t,r);n&&this.update(e,i=>({...i,lastActivityAt:o.timestamp}))}readEvents(e){return this.get(e)?this.eventStore.read(e):[]}delete(e){et(w(this.runsDir,e),{recursive:!0,force:!0})}refreshRecordStatus(e){if(gt(e.status))return e;if(e.workerPid&&!lt(e.workerPid)){let t={...e,status:"failed",statusReason:"Worker process is no longer running and did not record a terminal status.",endedAt:e.endedAt??m(),updatedAt:m()};return this.write(t),t}return e}update(e,t){let r=$(this.recordPath(e));if(!r)return null;let n=t(r);return n.updatedAt=m(),this.write(n),n}write(e){let t=x(w(this.runDir(e.runId),"run.lock"),`run:${e.runId}`,b);try{dt(this.recordPath(e.runId),e)}finally{t.release()}}recordPath(e){return w(this.runsDir,Q(ge(e)),"run.json")}runDir(e){return w(this.runsDir,Q(ge(e)))}};function me(s){return s==="completed"||s==="failed"||s==="cancelled"||s==="interrupted"}var fe=class{constructor(e={}){this.options=e;this.store=e.store??new V}options;store;create(e){return this.store.create(e)}async start(e){let t=this.create(e);if(!this.options.spawn)return t;try{let r=await this.options.spawn(t),n=this.store.markSpawned(t.runId,r.pid,r.workerVersion);if(!n)throw new Error(`Run disappeared during spawn: ${t.runId}`);return this.store.appendEvent(t.runId,"run_started",{pid:r.pid}),n}catch(r){let n=r instanceof Error?r.message:String(r);throw this.store.markCompleted(t.runId,{status:"failed",statusReason:n,exitCode:null}),this.store.appendEvent(t.runId,"run_start_failed",{reason:n}),r}}get(e){return this.store.get(e)}list(e={}){return this.store.list(e)}events(e,t){let r=this.store.readEvents(e);return t===void 0?r:r.slice(-Math.max(0,Math.trunc(t)))}async stop(e,t="Stopped by user."){let r=this.store.get(e);if(!r||me(r.status))return r;await this.options.stop?.(r,t);let n=this.store.markCancelled(e,t);return n&&this.store.appendEvent(e,"run_cancelled",{reason:t}),n}async pause(e,t="Paused by user."){let r=this.store.get(e);return!r||me(r.status)||r.status==="paused"?r:(await this.options.pause?.(r,t),this.store.markPaused(e,t))}async resume(e,t="Resumed by user."){let r=this.store.get(e);return!r||r.status!=="paused"?r:(await this.options.resume?.(r,t),this.store.markResumed(e,t))}complete(e,t,r={}){let n=this.store.markCompleted(e,{status:t,...r.reason?{statusReason:r.reason}:{},...r.exitCode!==void 0?{exitCode:r.exitCode}:{},...r.usage?{usage:r.usage}:{}});return n&&this.store.appendEvent(e,`run_${t}`,{...r.reason?{reason:r.reason}:{}}),n}};import{randomUUID as ft,timingSafeEqual as ht}from"node:crypto";var D=1;function wt(s,e){if(!s)return!1;let t=Buffer.from(s),r=Buffer.from(e);return t.length===r.length&&ht(t,r)}var he=class{constructor(e={}){this.options=e}options;handlers=new Map;register(e,t){let r=e.trim();if(!r)throw new Error("Daemon method name cannot be empty.");if(this.handlers.has(r))throw new Error(`Daemon method already registered: ${r}`);return this.handlers.set(r,t),this}registerController(e){return this.register("runs.start",t=>e.start(t)).register("runs.get",t=>e.get(t.runId)).register("runs.list",t=>e.list(t??{})).register("runs.events",t=>{let r=t;return e.events(r.runId,r.limit)}).register("runs.stop",t=>{let r=t;return e.stop(r.runId,r.reason)}).register("runs.pause",t=>{let r=t;return e.pause(r.runId,r.reason)}).register("runs.resume",t=>{let r=t;return e.resume(r.runId,r.reason)})}async handle(e){if(e.protocolVersion!==D)return this.error(e.id,"PROTOCOL_MISMATCH",`Unsupported protocol version: ${e.protocolVersion}`);if(this.options.authToken&&!wt(e.authToken,this.options.authToken))return this.error(e.id,"UNAUTHORIZED","Daemon authentication failed.");let t=this.handlers.get(e.method);if(!t)return this.error(e.id,"METHOD_NOT_FOUND",`Unknown daemon method: ${e.method}`);try{return{protocolVersion:D,id:e.id,result:await t(e.params,e)}}catch(r){return this.error(e.id,"INTERNAL_ERROR",r instanceof Error?r.message:String(r))}}error(e,t,r){return{protocolVersion:D,id:e,error:{code:t,message:r}}}},we=class{constructor(e,t={}){this.transport=e;this.options=t}transport;options;async request(e,t){let r={protocolVersion:D,id:`request_${ft()}`,method:e,params:t,...this.options.authToken?{authToken:this.options.authToken}:{}},n=await this.transport(r);if(n.protocolVersion!==D||n.id!==r.id)throw new Error("Invalid daemon response identity.");if("error"in n){let o=new Error(n.error.message);throw o.code=n.error.code,o}return n.result}};import{randomUUID as ke}from"node:crypto";import{appendFileSync as kt,existsSync as Rt,mkdirSync as L,readFileSync as ye,readdirSync as vt,renameSync as yt,writeFileSync as Pt}from"node:fs";import{basename as At,dirname as Pe,join as y}from"node:path";function W(s){return At(s).replace(/[^A-Za-z0-9_.-]/g,"_").slice(0,96)}function Z(s){try{return JSON.parse(ye(s,"utf8"))}catch{return null}}function Re(s,e){L(Pe(s),{recursive:!0});let t=`${s}.${process.pid}.${Date.now()}.tmp`;Pt(t,`${JSON.stringify(e,null,2)}