{"_id":"@acpjs/core","_rev":"9-c8d3f236a92a68952a806047f61d4d85","name":"@acpjs/core","dist-tags":{"latest":"0.8.0"},"versions":{"0.1.0":{"name":"@acpjs/core","version":"0.1.0","license":"MIT","_id":"@acpjs/core@0.1.0","maintainers":[{"name":"zhangyu1995","email":"723156735@qq.com"}],"dist":{"shasum":"326b557c433fd228fe565de98e12335348015bd8","tarball":"https://registry.npmjs.org/@acpjs/core/-/core-0.1.0.tgz","fileCount":6,"integrity":"sha512-TqUsohn0v2bjETtH4eCaMjR5SLZCsTTSXlYg5xIdjFCrVKryzg8S589JY8Q9OCSjU7Y8K4o4Rd0cX9DOAEhb4w==","signatures":[{"sig":"MEQCIFVHfEYzXZI2LuhuPhKxKMsi9Jt7VVD9WGU7zps5LSBoAiB2UESM6LqlRGjTv3VyI40TowT9sU8uDmwCctPA51GrUQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":191244},"type":"module","_from":"file:acpjs-core-0.1.0.tgz","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsdown","clean":"rm -rf dist .turbo","typecheck":"tsc --noEmit"},"_npmUser":{"name":"zhangyu1995","email":"723156735@qq.com"},"_resolved":"/private/var/folders/vk/zq50554n5_50fh580y6f7yfw0000gn/T/4135359eaeb0e9851a9b46db0783970a/acpjs-core-0.1.0.tgz","_integrity":"sha512-TqUsohn0v2bjETtH4eCaMjR5SLZCsTTSXlYg5xIdjFCrVKryzg8S589JY8Q9OCSjU7Y8K4o4Rd0cX9DOAEhb4w==","_npmVersion":"11.8.0","description":"acpjs AcpHost: agent process lifecycle, ACP connection, event normalization/numbering, fs/terminal defaults, permission routing, restart and StorageAdapter scheduling.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"zod":"^4.4.3","@acpjs/protocol":"0.1.0","@agentclientprotocol/sdk":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^25.9.2","@acpjs/fixture-agent":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.0_1781345503919_0.13252071080290007","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@acpjs/core","version":"0.2.0","license":"MIT","_id":"@acpjs/core@0.2.0","maintainers":[{"name":"zhangyu1995","email":"723156735@qq.com"}],"homepage":"https://github.com/zhangyu1818/acpjs#readme","bugs":{"url":"https://github.com/zhangyu1818/acpjs/issues"},"dist":{"shasum":"1fa352992922b32edbecb2a75b7668da9333c269","tarball":"https://registry.npmjs.org/@acpjs/core/-/core-0.2.0.tgz","fileCount":6,"integrity":"sha512-5itvf9+MfFQiFRFPakT4zGfvRhPDnVlQYBYx5gEUBTafIPF2O+wZ8/TB77zthBmSF3JOnnCcZOiHwp6b0Hc1FA==","signatures":[{"sig":"MEUCIQCEuKYiH9sso1i8acacaJ0CyGBhc9UTLDxVLR8DeoLXbAIgcScg+1RIKUc3PuPTWHm3JtZkqyxUspGmFbBcKQIFef4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@acpjs%2fcore@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":286418},"type":"module","_from":"file:acpjs-core-0.2.0.tgz","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsdown","clean":"rm -rf dist .turbo","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e19e674e-81cb-4a3c-8da7-bef2190d98e6"}},"_resolved":"/tmp/ff70709e0247a27a262fd42fe9931980/acpjs-core-0.2.0.tgz","_integrity":"sha512-5itvf9+MfFQiFRFPakT4zGfvRhPDnVlQYBYx5gEUBTafIPF2O+wZ8/TB77zthBmSF3JOnnCcZOiHwp6b0Hc1FA==","repository":{"url":"git+https://github.com/zhangyu1818/acpjs.git","type":"git","directory":"packages/core"},"_npmVersion":"11.17.0","description":"acpjs AcpHost: agent process lifecycle, ACP connection, event normalization/numbering, fs/terminal defaults, permission routing, restart and StorageAdapter scheduling.","directories":{},"_nodeVersion":"24.16.0","dependencies":{"zod":"^4.4.3","@acpjs/protocol":"0.2.0","@agentclientprotocol/sdk":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^25.9.2","@acpjs/fixture-agent":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.2.0_1781626127022_0.03074508242758034","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@acpjs/core","version":"0.3.0","license":"MIT","_id":"@acpjs/core@0.3.0","maintainers":[{"name":"zhangyu1995","email":"723156735@qq.com"}],"homepage":"https://github.com/zhangyu1818/acpjs#readme","bugs":{"url":"https://github.com/zhangyu1818/acpjs/issues"},"dist":{"shasum":"b4d268a42a63aefdd1e1caf4d9043afdf222870b","tarball":"https://registry.npmjs.org/@acpjs/core/-/core-0.3.0.tgz","fileCount":6,"integrity":"sha512-L9RRN5VdyEMnOZIKUK74ry3T263KRz7PZ5VtCN5mhRqCTnINWTTj+CWB81BOINfhY/i1c8fCWKl4dus1UKpjdA==","signatures":[{"sig":"MEYCIQDXkvZAGczIlVhPJQ51/hPnZbLPO5HIDKQamBOdM2j9rwIhANpWRHu7mafB1RVinH7+oKglrLaS7pJAolWtUxXaRvKr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@acpjs%2fcore@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":286896},"type":"module","_from":"file:acpjs-core-0.3.0.tgz","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsdown","clean":"rm -rf dist .turbo","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e19e674e-81cb-4a3c-8da7-bef2190d98e6"}},"_resolved":"/tmp/e0b374633ab8d2fe231ac2803a7b8706/acpjs-core-0.3.0.tgz","_integrity":"sha512-L9RRN5VdyEMnOZIKUK74ry3T263KRz7PZ5VtCN5mhRqCTnINWTTj+CWB81BOINfhY/i1c8fCWKl4dus1UKpjdA==","repository":{"url":"git+https://github.com/zhangyu1818/acpjs.git","type":"git","directory":"packages/core"},"_npmVersion":"11.17.0","description":"acpjs AcpHost: agent process lifecycle, ACP connection, event normalization/numbering, fs/terminal defaults, permission routing, restart and StorageAdapter scheduling.","directories":{},"_nodeVersion":"24.16.0","dependencies":{"zod":"^4.4.3","@acpjs/protocol":"0.3.0","@agentclientprotocol/sdk":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^25.9.2","@acpjs/fixture-agent":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.3.0_1781667912116_0.48374119455590026","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@acpjs/core","version":"0.3.1","license":"MIT","_id":"@acpjs/core@0.3.1","maintainers":[{"name":"zhangyu1995","email":"723156735@qq.com"}],"homepage":"https://github.com/zhangyu1818/acpjs#readme","bugs":{"url":"https://github.com/zhangyu1818/acpjs/issues"},"dist":{"shasum":"9323284a7dacef7d1340507fd6f369c968a34cc8","tarball":"https://registry.npmjs.org/@acpjs/core/-/core-0.3.1.tgz","fileCount":6,"integrity":"sha512-rChLU7x5IjaYvmg96ktoWRXgLbG1H2MWLiohEPipCeLKTEO99+WsE1uamq5basQgJXJVG3aH1nCiIfDtQeyL4Q==","signatures":[{"sig":"MEUCIQDI81iwWubsU+BOpOYqBPl8LU0183iKmL6fBgZUFb91ggIgTkUQgD4YBBBhntQqWvxXSW6DviYf6gQGtSNY8pCW9rs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@acpjs%2fcore@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":287346},"type":"module","_from":"file:acpjs-core-0.3.1.tgz","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsdown","clean":"rm -rf dist .turbo","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e19e674e-81cb-4a3c-8da7-bef2190d98e6"}},"_resolved":"/tmp/e0feea6c25f22c842a82071db8120b74/acpjs-core-0.3.1.tgz","_integrity":"sha512-rChLU7x5IjaYvmg96ktoWRXgLbG1H2MWLiohEPipCeLKTEO99+WsE1uamq5basQgJXJVG3aH1nCiIfDtQeyL4Q==","repository":{"url":"git+https://github.com/zhangyu1818/acpjs.git","type":"git","directory":"packages/core"},"_npmVersion":"11.17.0","description":"acpjs AcpHost: agent process lifecycle, ACP connection, event normalization/numbering, fs/terminal defaults, permission routing, restart and StorageAdapter scheduling.","directories":{},"_nodeVersion":"24.16.0","dependencies":{"zod":"^4.4.3","@acpjs/protocol":"0.3.1","@agentclientprotocol/sdk":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^25.9.2","@acpjs/fixture-agent":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.3.1_1781672298128_0.03308396665456059","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@acpjs/core","version":"0.4.0","license":"MIT","_id":"@acpjs/core@0.4.0","maintainers":[{"name":"zhangyu1995","email":"723156735@qq.com"}],"homepage":"https://github.com/zhangyu1818/acpjs#readme","bugs":{"url":"https://github.com/zhangyu1818/acpjs/issues"},"dist":{"shasum":"f6e1544f0be401206fad23cd87a0d3fb8873930f","tarball":"https://registry.npmjs.org/@acpjs/core/-/core-0.4.0.tgz","fileCount":6,"integrity":"sha512-qlTwPJgeEuF/oDvaMc7zHc0ZB1tMX+cY4TJ3kJu0D7f0PhtlClnA8rsV+CsvhyjvWpdP1AKj27MyOBunaAwzvg==","signatures":[{"sig":"MEYCIQCbu1VGBenw7J/JL6gbdX4lO1+Zuef03WzczChD1ke77gIhAOHaWACEJXCdNcE4ce/QLVzP2KsuqXzD6SlgX6nNmUNJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@acpjs%2fcore@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":289867},"type":"module","_from":"file:acpjs-core-0.4.0.tgz","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsdown","clean":"rm -rf dist .turbo","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e19e674e-81cb-4a3c-8da7-bef2190d98e6"}},"_resolved":"/tmp/e363e08ef83898efd132c6d958993442/acpjs-core-0.4.0.tgz","_integrity":"sha512-qlTwPJgeEuF/oDvaMc7zHc0ZB1tMX+cY4TJ3kJu0D7f0PhtlClnA8rsV+CsvhyjvWpdP1AKj27MyOBunaAwzvg==","repository":{"url":"git+https://github.com/zhangyu1818/acpjs.git","type":"git","directory":"packages/core"},"_npmVersion":"11.17.0","description":"acpjs AcpHost: agent process lifecycle, ACP connection, event normalization/numbering, fs/terminal defaults, permission routing, restart and StorageAdapter scheduling.","directories":{},"_nodeVersion":"24.16.0","dependencies":{"zod":"^4.4.3","@acpjs/protocol":"0.4.0","@agentclientprotocol/sdk":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^25.9.2","@acpjs/fixture-agent":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.4.0_1781835448415_0.969982948046352","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@acpjs/core","version":"0.5.0","license":"MIT","_id":"@acpjs/core@0.5.0","maintainers":[{"name":"zhangyu1995","email":"723156735@qq.com"}],"homepage":"https://github.com/zhangyu1818/acpjs#readme","bugs":{"url":"https://github.com/zhangyu1818/acpjs/issues"},"dist":{"shasum":"eb7ec625a7d3479f87f6906cdd498996b5a93635","tarball":"https://registry.npmjs.org/@acpjs/core/-/core-0.5.0.tgz","fileCount":6,"integrity":"sha512-VsmsOb/SLUmQiVeJ49qhkDA0DMdAVa7GrhZpARev0m57NfTdlkaDmOVm/gjQ2t/SmshZQi/OOELxYqWdBOxkMA==","signatures":[{"sig":"MEQCIFguPUkvW328hKpBcLs3Q785plbPSIZzoaoOPbboUkONAiAFDKvET/bGJ+GMM2qT3wLGNJgmiBDF6VDRUr6U+bpSvw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@acpjs%2fcore@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":293713},"type":"module","_from":"file:acpjs-core-0.5.0.tgz","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsdown","clean":"rm -rf dist .turbo","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e19e674e-81cb-4a3c-8da7-bef2190d98e6"}},"_resolved":"/tmp/771fcd775b6c05f76526efc4bd8f8966/acpjs-core-0.5.0.tgz","_integrity":"sha512-VsmsOb/SLUmQiVeJ49qhkDA0DMdAVa7GrhZpARev0m57NfTdlkaDmOVm/gjQ2t/SmshZQi/OOELxYqWdBOxkMA==","repository":{"url":"git+https://github.com/zhangyu1818/acpjs.git","type":"git","directory":"packages/core"},"_npmVersion":"11.17.0","description":"acpjs AcpHost: agent process lifecycle, ACP connection, event normalization/numbering, fs/terminal defaults, permission routing, restart and StorageAdapter scheduling.","directories":{},"_nodeVersion":"24.16.0","dependencies":{"zod":"^4.4.3","@acpjs/protocol":"0.5.0","@agentclientprotocol/sdk":"^0.25.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^25.9.2","@acpjs/fixture-agent":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.5.0_1782054706472_0.24520274163487232","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@acpjs/core","version":"0.6.0","license":"MIT","_id":"@acpjs/core@0.6.0","maintainers":[{"name":"zhangyu1995","email":"723156735@qq.com"}],"homepage":"https://github.com/zhangyu1818/acpjs#readme","bugs":{"url":"https://github.com/zhangyu1818/acpjs/issues"},"dist":{"shasum":"fcee1311f8c5feb8fdbeafcef16e4d8d66cedd18","tarball":"https://registry.npmjs.org/@acpjs/core/-/core-0.6.0.tgz","fileCount":6,"integrity":"sha512-xPBFrBBAtFynYe3e3nAHA7/f1d7Cip011oE1RfAPEOxVMRYiSeKs3eWPjesA7OcMTmeVTRNvhqNPnTJxKlwuAA==","signatures":[{"sig":"MEUCIQD1KOL/h315Bx4v7FCkrbLkl7Y0RW1zAhhcMdoaN7yw6QIgJNRIODwVB9fMRq6kt4TlxxNaEEpwkN28P0t2UuzpMrg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@acpjs%2fcore@0.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":311715},"type":"module","_from":"file:acpjs-core-0.6.0.tgz","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsdown","clean":"rm -rf dist .turbo","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e19e674e-81cb-4a3c-8da7-bef2190d98e6"}},"_resolved":"/tmp/0a41b6a7a96506bdae297ac004a33f27/acpjs-core-0.6.0.tgz","_integrity":"sha512-xPBFrBBAtFynYe3e3nAHA7/f1d7Cip011oE1RfAPEOxVMRYiSeKs3eWPjesA7OcMTmeVTRNvhqNPnTJxKlwuAA==","repository":{"url":"git+https://github.com/zhangyu1818/acpjs.git","type":"git","directory":"packages/core"},"_npmVersion":"11.17.0","description":"acpjs AcpHost: agent process lifecycle, ACP connection, event normalization/numbering, fs/terminal defaults, permission routing, restart and StorageAdapter scheduling.","directories":{},"_nodeVersion":"24.17.0","dependencies":{"zod":"^4.4.3","@acpjs/protocol":"0.6.0","@agentclientprotocol/sdk":"^0.29.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^25.9.2","@acpjs/fixture-agent":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.6.0_1782356283305_0.47629141001521313","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@acpjs/core","version":"0.7.0","license":"MIT","_id":"@acpjs/core@0.7.0","maintainers":[{"name":"zhangyu1995","email":"723156735@qq.com"}],"homepage":"https://github.com/zhangyu1818/acpjs#readme","bugs":{"url":"https://github.com/zhangyu1818/acpjs/issues"},"dist":{"shasum":"6a4c7eb41ead1033657367eed06858a84b5ac928","tarball":"https://registry.npmjs.org/@acpjs/core/-/core-0.7.0.tgz","fileCount":6,"integrity":"sha512-0LYDGzXY9L6Vxr+NNOOzTRtSXe6WL+PSSQE9LsUjiUfRpPvDqVyUJZR+r7crkTuJ7+btaYFwG16/hcFOp6wNSg==","signatures":[{"sig":"MEUCIBQxEmgTkYZu3yZHe9kGuXrMDYcXE4XuyTqTdtFi3gHsAiEA2lQ/tTTgwN1Mzvlmi4QGowXfSRZU5oc8h18BdUlSDho=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@acpjs%2fcore@0.7.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":311752},"type":"module","_from":"file:acpjs-core-0.7.0.tgz","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsdown","clean":"rm -rf dist .turbo","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e19e674e-81cb-4a3c-8da7-bef2190d98e6"}},"_resolved":"/tmp/95ae6fccd7fd31883d475cf5e13dbf0f/acpjs-core-0.7.0.tgz","_integrity":"sha512-0LYDGzXY9L6Vxr+NNOOzTRtSXe6WL+PSSQE9LsUjiUfRpPvDqVyUJZR+r7crkTuJ7+btaYFwG16/hcFOp6wNSg==","repository":{"url":"git+https://github.com/zhangyu1818/acpjs.git","type":"git","directory":"packages/core"},"_npmVersion":"11.17.0","description":"acpjs AcpHost: agent process lifecycle, ACP connection, event normalization/numbering, fs/terminal defaults, permission routing, restart and StorageAdapter scheduling.","directories":{},"_nodeVersion":"24.17.0","dependencies":{"zod":"^4.4.3","@acpjs/protocol":"0.6.0","@agentclientprotocol/sdk":"^0.29.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^25.9.2","@acpjs/fixture-agent":"0.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.7.0_1782373214368_0.44446016239855735","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@acpjs/core","version":"0.8.0","description":"acpjs AcpHost: agent process lifecycle, ACP connection, event normalization/numbering, fs/terminal defaults, permission routing, restart and StorageAdapter scheduling.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/zhangyu1818/acpjs.git","directory":"packages/core"},"type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"publishConfig":{"access":"public"},"dependencies":{"@agentclientprotocol/sdk":"^1.0.0","zod":"^4.4.3","@acpjs/protocol":"0.7.0"},"devDependencies":{"@types/node":"^25.9.2","@acpjs/fixture-agent":"0.0.0"},"engines":{"node":">=24"},"scripts":{"build":"tsdown","test":"vitest run","typecheck":"tsc --noEmit","clean":"rm -rf dist .turbo"},"_id":"@acpjs/core@0.8.0","bugs":{"url":"https://github.com/zhangyu1818/acpjs/issues"},"homepage":"https://github.com/zhangyu1818/acpjs#readme","_integrity":"sha512-Lfez7Un/CN8oTtQLSisBMj50O4Sb7j0yO815lCwLAiPm8Id2m02Dp7DN/Wc/SpkfR/TxPKqYDlA61nO3P2iXhg==","_resolved":"/tmp/af093db3b46af2e7f7d513da0aa68f05/acpjs-core-0.8.0.tgz","_from":"file:acpjs-core-0.8.0.tgz","_nodeVersion":"24.17.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-Lfez7Un/CN8oTtQLSisBMj50O4Sb7j0yO815lCwLAiPm8Id2m02Dp7DN/Wc/SpkfR/TxPKqYDlA61nO3P2iXhg==","shasum":"ad36742b1cd1cfd62d62e70ada69515aa3318470","tarball":"https://registry.npmjs.org/@acpjs/core/-/core-0.8.0.tgz","fileCount":6,"unpackedSize":301780,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@acpjs%2fcore@0.8.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDTws5DTPtgPW2NzYIRBjfwYGg3NI6cAywuqHN4dzGBtAIhAPQptd+oA+WE4YTJdSZWyGnPj2YKFINLxc6eqIezZ3s7"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e19e674e-81cb-4a3c-8da7-bef2190d98e6"}},"directories":{},"maintainers":[{"name":"zhangyu1995","email":"723156735@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.8.0_1782490776910_0.7895316367701672"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-13T10:11:43.621Z","modified":"2026-06-26T16:19:37.408Z","0.1.0":"2026-06-13T10:11:44.054Z","0.2.0":"2026-06-16T16:08:47.175Z","0.3.0":"2026-06-17T03:45:12.283Z","0.3.1":"2026-06-17T04:58:18.280Z","0.4.0":"2026-06-19T02:17:28.600Z","0.5.0":"2026-06-21T15:11:46.657Z","0.6.0":"2026-06-25T02:58:03.446Z","0.7.0":"2026-06-25T07:40:14.526Z","0.8.0":"2026-06-26T16:19:37.057Z"},"bugs":{"url":"https://github.com/zhangyu1818/acpjs/issues"},"license":"MIT","homepage":"https://github.com/zhangyu1818/acpjs#readme","repository":{"type":"git","url":"git+https://github.com/zhangyu1818/acpjs.git","directory":"packages/core"},"description":"acpjs AcpHost: agent process lifecycle, ACP connection, event normalization/numbering, fs/terminal defaults, permission routing, restart and StorageAdapter scheduling.","maintainers":[{"name":"zhangyu1995","email":"723156735@qq.com"}],"readme":"# @acpjs/core\n\nNode `AcpHost` runtime. Spawns ACP agent subprocesses over the official SDK, normalizes protocol notifications into numbered `@acpjs/protocol` events, replays the log for late subscribers, routes permissions, provides default fs, opt-in terminal handling, crash recovery, and `StorageAdapter` scheduling.\n\n## Install\n\n```sh\npnpm add @acpjs/core\n```\n\nESM-only, `node >= 24`. Runtime deps: `@acpjs/protocol`, `@agentclientprotocol/sdk`, `zod`.\n\n## Usage\n\n```ts\nimport { createAcpHost } from '@acpjs/core'\n\nconst host = createAcpHost({ restart: 'on-crash' })\n\nconst agent = await host.spawnAgent({\n  id: 'my-agent',\n  command: 'npx',\n  args: ['some-acp-agent'],\n})\nconst { sessionId } = await host.createSession(agent.agentId, {\n  cwd: process.cwd(),\n  mcpServers: [],\n  additionalDirectories: [],\n})\n\nconst unsubscribe = host.subscribe(sessionId, 0, (event) =>\n  console.log(event.seq, event.type),\n)\nconst result = await host.prompt(sessionId, [{ type: 'text', text: 'hello' }])\n\nunsubscribe()\nawait host.closeSession(sessionId)\nawait host.dispose()\n```\n\n## Exports\n\n- `createAcpHost(options?): AcpHost` (the `AcpHost` class is also exported)\n- `createHostEndpoint(host): EnvelopeEndpoint` — wraps a host as the HostClientTransport endpoint for `@acpjs/client`.\n- `AcpError` — carries a host-boundary `code` from `ACPJS_ERROR_CODES` (`acpjs/*`).\n- `resolveHostOptions(options)`, `resolveAgentDefinition(definition)` — config pipeline; validation failures throw `AcpError` (`acpjs/config-invalid`); resolved products are frozen.\n- `deriveClientCapabilities(fs, terminal)` — reports only the methods a handler implements.\n- `normalizeSessionUpdate(update): NormalizedUpdate` — maps the 13 `SessionUpdate` variants to event type/payload/extensions; unmodeled → `unrecognized-update`.\n- `createMemoryStorage()`, `createJsonlStorage(file)` — built-in `StorageAdapter`s.\n- `createDefaultFsHandler()`, `createDefaultTerminalHandler()`.\n- Types: `HostOptions`, `ResolvedHostOptions`, `AgentDefinition`, `ResolvedAgentDefinition`, `FsHandler`, `TerminalHandler`, `RestartBackoff`, `AgentSnapshot`, `SessionSnapshot`, `CreateOrLoadSessionParams`, `ResumeSessionParams`, `CreateSessionResult`, `SessionConfigValue`, `PromptResult`, `EventSubscriber`, `StorageAdapter`, `SessionMeta`, `NormalizedUpdate`.\n\n### `AcpHost` methods\n\n- Agents: `spawnAgent(definition)`, `getAgent(agentId)`, `getAgents()`, `disposeAgent(agentId)`\n- Auth: `authenticate(agentId, methodId)` sends the `authenticate` RPC; `logout(agentId)` gated on `auth.logout` capability (else `acpjs/capability-unsupported`). Sends RPC only — does not pick method, store credentials, or track login state.\n- Sessions: `createSession(agentId, { cwd, mcpServers, additionalDirectories })`, `loadSession(...)`, `resumeSession(...)`, `listSessions(agentId, { cursor?, cwd? })`, `deleteSession(agentId, sessionId)`, `prompt(sessionId, ContentBlock[])`, `cancel(sessionId)`, `closeSession(sessionId)`, `setMode(sessionId, modeId)`, `setConfigOption(sessionId, configId, value)`, `getSession(sessionId)`, `getSessions()`\n- Events: `subscribe(sessionId | undefined, fromSeq, callback)` — pass `undefined` for the host stream (agent/session/permission projections + diagnostics).\n- Permissions: `respondPermission(requestId, outcome)`\n- Recovery: `restoreSessions()` — rebuilds `disconnected` sessions from storage.\n- `dispose()`, `disposeAgent(agentId)` (idempotent; sessions → `disconnected`, agent removed from registry, emits `agent-removed`).\n\n## HostOptions\n\n| Field            | Default                                        | Notes                                                                      |\n| ---------------- | ---------------------------------------------- | -------------------------------------------------------------------------- |\n| `restart`        | `'never'`                                      | `'on-crash'` restarts only on a `crashed` exit.                            |\n| `restartLimit`   | `3`                                            | Max consecutive restarts; `ready` resets the counter.                      |\n| `restartBackoff` | `{ initialMs: 1000, factor: 2, maxMs: 30000 }` | Exponential backoff.                                                       |\n| `storage`        | in-memory                                      | `StorageAdapter`.                                                          |\n| `fs`             | built-in Node fs                               | Replaced wholesale when injected; drives the initialize capability report. |\n| `terminal`       | disabled                                       | Requires a complete handler with `cleanupSession`.                         |\n| `killTimeoutMs`  | `5000`                                         | dispose graceful-shutdown timeout; SIGKILL after.                          |\n\nFrozen once constructed; rebuild the host to change it.\n\n## Snapshots\n\n- `AgentSnapshot`: `{ agentId, status, restartCount, reason?, exit?, capabilities?, authMethods? }`. `authMethods` = advertised methods from `initialize` (read this to pick a `methodId` for `authenticate`). `capabilities.auth.logout` gates `logout`.\n- `SessionSnapshot`: `{ sessionId, status, agentId?, cwd, mcpServers?, additionalDirectories, agentDefinitionId?, title?, updatedAt? }`.\n\n## Host stream diagnostics (`code` values)\n\n`agent/spawn`, `agent/spawn-failed`, `agent/initialized`, `agent/initialize-failed`, `agent/exit`, `agent/process-error`, `agent/stderr`, `agent/restart-scheduled`, `agent/restart-suppressed`, `agent/restart-exhausted`, `agent/kill`, `session/recovery-skipped`, `session/load-failed`, `storage/write-failed`, `event/unserializable`, `subscriber/error`. Diagnostics never participate in `SessionState` reduction. `agent/spawn` records env key names only, never values.\n\n## Key semantics\n\n- **agentId / requestId**: `agent-<n>` / `perm-<n>`, monotonic per host lifetime, never reused.\n- **cwd**: `AgentDefinition.cwd` defaults to host process cwd; absolutized via `path.resolve`.\n- **prompt protocol errors**: `prompt` rejects on agent JSON-RPC errors (does not fabricate a `StopReason`); envelope callers receive `acpjs/agent-error` with the original error in `data`.\n- **normalization key-omission**: `null` optional fields are omitted, except `session_info_update` `title`/`updatedAt` (clear) and `tool_call(_update)` `rawInput`/`rawOutput` (passthrough). Top-level `_meta` → `extensions._meta`; other unknown fields → `extensions.<key>`.\n- **capability gating**: `session/list|resume` check `sessionCapabilities.<x> != null`; `loadSession` checks the top-level boolean; `set_mode`/`set_config_option` check whether modes/configOptions were ever seen. Local close/delete always available; remote close/delete is best-effort and resolves on the local tombstone (does not wait for ACP ACK).\n- **load/resume staging**: unknown load/resume is invisible until the RPC succeeds. `load` buffers replayed updates, then emits `session-reset` + replay + config + active; `resume` rejects replayed history.\n- **restart pre-ready failures**: during a restart cycle, spawn/initialize failures keep consuming restart budget; the first (non-cyclic) failure is not retried.\n- **storage**: event writes are queued; failures emit `storage/write-failed` (not retried). Close/delete tombstones are strict commits — if unwritable, the API rejects. `restoreSessions` skips closed/deleted and non-clone-safe events; restored sessions are `disconnected`.\n- **terminal ownership**: the host records the owning `sessionId` per `terminalId` and rejects cross-session terminal ops with `acpjs/invalid-params`.\n- **protocol version**: `initialize` response `protocolVersion !== PROTOCOL_VERSION` → process killed, judged `initialize-failed` (no downgrade).\n- **unserializable payloads**: events failing structured clone are rejected → `event/unserializable` diagnostic.\n","readmeFilename":"README.md"}