{"_id":"psychoscript","_rev":"8-56712489ba2a3861fc0dcdbc8c56bf1d","name":"psychoscript","dist-tags":{"latest":"0.3.0"},"versions":{"0.0.0-stage":{"name":"psychoscript","version":"0.0.0-stage","_id":"psychoscript@0.0.0-stage","stub":true,"maintainers":[{"name":"thdxr","email":"d@ironbay.co"}],"dist":{"shasum":"255e76a78ed9807d4b449cb439ebc5aa6535891a","tarball":"https://registry.npmjs.org/psychoscript/-/psychoscript-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-Z3NIr1oUQ1Zh+zSy/j/PVS118a96CXtL4IXbPQeyGsQxUUMT+Kxi9NTVED2vzsnZct4/RjNA03EPEf9cxMBoGw==","signatures":[{"sig":"MEUCIQDooFegr/Iwj6aiyiFNHA4xrkilBGt1XhgxQOWBEcX/dwIgKkZ6kstqujP9C8I0rNkp1epVeg3Hgs7WyPBqATyDXaM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":334},"_npmUser":{"name":"thdxr","email":"d@ironbay.co"},"description":"Temporary package placeholder for staged publishing","directories":{}},"0.0.0":{"name":"psychoscript","version":"0.0.0","license":"MIT","_id":"psychoscript@0.0.0","maintainers":[{"name":"thdxr","email":"d@ironbay.co"}],"dist":{"shasum":"9b5e8a328065fc80688072795487f2107c5223e3","tarball":"https://registry.npmjs.org/psychoscript/-/psychoscript-0.0.0.tgz","fileCount":2,"integrity":"sha512-h3VxGE5Xvv/b/M8OAe4pUWmQIbMGJPwI9DN3aV2dK6xcaA7Dnob7yS9x6WYxVKuxklR5Pla8vgW+XNYUjCCV6A==","signatures":[{"sig":"MEYCIQD8caRLVbbntW2Ektogsn+phtoXgKlH9CazD+L8k4E/FQIhAOKVUXspWmXiLoANxw/l7IbzvNfut+WDIaZgzAnqKwma","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCICuRCeb0vPEJxucGHL+9PN8xNtDwDPcERsoom9yMMTBnAiEAjYiFc7bVyGc+EQ4VGpD1YZ5OZGNNfQ/Hsf3xbxTLgCY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":115},"_npmUser":{"name":"thdxr","email":"d@ironbay.co"},"_npmVersion":"11.18.0","description":"coming soon","directories":{},"_nodeVersion":"26.4.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/psychoscript_0.0.0_1794950941840_0.923288122222773","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"psychoscript","version":"0.1.0","keywords":["javascript","interpreter","sandbox","bytecode","vm","resumable","snapshot","effect"],"license":"MIT","_id":"psychoscript@0.1.0","maintainers":[{"name":"thdxr","email":"d@ironbay.co"}],"homepage":"https://github.com/anomalyco/psychoscript#readme","bugs":{"url":"https://github.com/anomalyco/psychoscript/issues"},"dist":{"shasum":"aa672274ce47dc1fe93725ca34534e58e49205f1","tarball":"https://registry.npmjs.org/psychoscript/-/psychoscript-0.1.0.tgz","fileCount":124,"integrity":"sha512-xUQ+8G6m4GQtuNC0CCyObMPIUN4CvEaPiHxsZnvAZp5JCrU75qdoXEHpjT8WmBaPv3RcV0ICFG/1AmvV0WxS8A==","signatures":[{"sig":"MEQCIHBkkzp8K2XZ2bZKAvIjsjo3ksXWQVk+XYKrBwAZmnbsAiBd+nJi1W5vmgI1ZhKm+Jwv3VisnKOSqq3XRBN6KRakFg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIEH8W6DnDJyg/R1C4U4V08BIjMu7EyFHFfUrPKs1g8OcAiB6T7hKsNYfrAJQXgy2FersY2HVR3DBsDLMsCyoObn5PQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/psychoscript@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1063121},"type":"module","_from":"file:/home/runner/work/_temp/package/package.tgz","$schema":"https://json.schemastore.org/package.json","engines":{"bun":">=1.4","node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"pack":"bun run script/pack.ts","test":"bun test","bench":"bun run script/bench.ts","build":"bun run script/build.ts","check":"bun run typecheck && bun test && bun run test:roundtrip && bun run pack","typecheck":"tsc --noEmit","prepublishOnly":"bun run build","test:roundtrip":"PSYCHOSCRIPT_ROUNDTRIP=1 bun test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"5350db28-bcf0-4f92-a1bc-9be40dac5acb"}},"_resolved":"/home/runner/work/_temp/package/package.tgz","_integrity":"sha512-xUQ+8G6m4GQtuNC0CCyObMPIUN4CvEaPiHxsZnvAZp5JCrU75qdoXEHpjT8WmBaPv3RcV0ICFG/1AmvV0WxS8A==","repository":{"url":"git+https://github.com/anomalyco/psychoscript.git","type":"git"},"_npmVersion":"11.13.0","description":"A confined, resumable JavaScript interpreter for Effect hosts: programs call only the functions the host gives them, and a run can be suspended to bytes and resumed later","directories":{},"sideEffects":false,"_nodeVersion":"24.16.0","dependencies":{"acorn":"8.15.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"4.1.0","@types/bun":"1.4.3","@tsconfig/bun":"1.0.9","@typescript/native":"npm:typescript@7.1.0-beta"},"peerDependencies":{"effect":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/psychoscript_0.1.0_1795126105619_0.7248775925329085","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"psychoscript","version":"0.1.1","keywords":["javascript","interpreter","sandbox","bytecode","vm","resumable","snapshot","effect"],"license":"MIT","_id":"psychoscript@0.1.1","maintainers":[{"name":"thdxr","email":"d@ironbay.co"}],"homepage":"https://github.com/anomalyco/psychoscript#readme","bugs":{"url":"https://github.com/anomalyco/psychoscript/issues"},"dist":{"shasum":"536ad8b0466df2427f1a806344bf3676aa481da9","tarball":"https://registry.npmjs.org/psychoscript/-/psychoscript-0.1.1.tgz","fileCount":124,"integrity":"sha512-f9y9VCe+zcCcs0lPI+zZIH7P400rDDSkwXnQYXw97VVzQ75Qu4M+IEYzuizC4wSeNtnhXA0CZI761Ba1aKXakQ==","signatures":[{"sig":"MEUCIH52Bg965N7I351RfzVQMdEVYgghOIFhUPH0tWJcRN/rAiEA+ReLI8SJkolZDVp0MSPYBCXiUsuTUcIWFiqqPASTIYc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIAOqmtaXiT3wkJP4abW1I1JZO718pqfJm8eRqIxSziV6AiEA5zqI0BG15bd3oxtm7HllvUNX5WbU7i6BY6Nmc1pGl4M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/psychoscript@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1066516},"type":"module","_from":"file:/home/runner/work/_temp/package/package.tgz","$schema":"https://json.schemastore.org/package.json","engines":{"bun":">=1.4","node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"pack":"bun run script/pack.ts","test":"bun test","bench":"bun run script/bench.ts","build":"bun run script/build.ts","check":"bun run typecheck && bun test && bun run test:roundtrip && bun run pack","typecheck":"tsc --noEmit","prepublishOnly":"bun run build","test:roundtrip":"PSYCHOSCRIPT_ROUNDTRIP=1 bun test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"5350db28-bcf0-4f92-a1bc-9be40dac5acb"}},"_resolved":"/home/runner/work/_temp/package/package.tgz","_integrity":"sha512-f9y9VCe+zcCcs0lPI+zZIH7P400rDDSkwXnQYXw97VVzQ75Qu4M+IEYzuizC4wSeNtnhXA0CZI761Ba1aKXakQ==","repository":{"url":"git+https://github.com/anomalyco/psychoscript.git","type":"git"},"_npmVersion":"11.13.0","description":"A confined, resumable JavaScript interpreter for Effect hosts: programs call only the functions the host gives them, and a run can be suspended to bytes and resumed later","directories":{},"sideEffects":false,"_nodeVersion":"24.16.0","dependencies":{"acorn":"8.15.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"4.1.0","@types/bun":"1.4.3","@tsconfig/bun":"1.0.9","@typescript/native":"npm:typescript@7.1.0-beta"},"peerDependencies":{"effect":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/psychoscript_0.1.1_1795133724695_0.29552073915694343","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"psychoscript","version":"0.1.2","keywords":["javascript","interpreter","sandbox","bytecode","vm","resumable","snapshot","effect"],"license":"MIT","_id":"psychoscript@0.1.2","maintainers":[{"name":"thdxr","email":"d@ironbay.co"}],"homepage":"https://github.com/anomalyco/psychoscript#readme","bugs":{"url":"https://github.com/anomalyco/psychoscript/issues"},"dist":{"shasum":"59e6600f84394ecb638be4c815788653450310be","tarball":"https://registry.npmjs.org/psychoscript/-/psychoscript-0.1.2.tgz","fileCount":124,"integrity":"sha512-eEuVbhaQ+3MEfi+LTNatMFY0OWcrmZjiUDd/4KVmWOCBTVYY87QoIc/DPNTDu+GVKHDeAPCsIqDq6wVyLMODXA==","signatures":[{"sig":"MEUCIQC+Zdc9rgGs9whTNjT6sjxQsGn5O9iXAsWC+B64rnal1AIgOiqbqJ7/gtQMQm83cFdBShCl5Oor2Nh7RE6VIKp1uFI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCi0cKvRSNXQVScYcUb1ZP3x0fo8Yznh3C3tSziEstkEwIgbc0FXWTLPD0kkbzpfcxiLHV21Azgk8tPvxNJ4nLC4qw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/psychoscript@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1072234},"type":"module","_from":"file:/home/runner/work/_temp/package/package.tgz","$schema":"https://json.schemastore.org/package.json","engines":{"bun":">=1.4","node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"pack":"bun run script/pack.ts","test":"bun test","bench":"bun run script/bench.ts","build":"bun run script/build.ts","check":"bun run typecheck && bun test && bun run test:roundtrip && bun run pack","typecheck":"tsc --noEmit","prepublishOnly":"bun run build","test:roundtrip":"PSYCHOSCRIPT_ROUNDTRIP=1 bun test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"5350db28-bcf0-4f92-a1bc-9be40dac5acb"}},"_resolved":"/home/runner/work/_temp/package/package.tgz","_integrity":"sha512-eEuVbhaQ+3MEfi+LTNatMFY0OWcrmZjiUDd/4KVmWOCBTVYY87QoIc/DPNTDu+GVKHDeAPCsIqDq6wVyLMODXA==","repository":{"url":"git+https://github.com/anomalyco/psychoscript.git","type":"git"},"_npmVersion":"11.13.0","description":"A confined, resumable JavaScript interpreter for Effect hosts: programs call only the functions the host gives them, and a run can be suspended to bytes and resumed later","directories":{},"sideEffects":false,"_nodeVersion":"24.16.0","dependencies":{"acorn":"8.15.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"4.1.0","@types/bun":"1.4.3","@tsconfig/bun":"1.0.9","@typescript/native":"npm:typescript@7.1.0-beta"},"peerDependencies":{"effect":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/psychoscript_0.1.2_1795134193178_0.34857875137516103","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"psychoscript","version":"0.2.0","keywords":["javascript","interpreter","sandbox","bytecode","vm","resumable","snapshot","effect"],"license":"MIT","_id":"psychoscript@0.2.0","maintainers":[{"name":"thdxr","email":"d@ironbay.co"}],"homepage":"https://github.com/anomalyco/psychoscript#readme","bugs":{"url":"https://github.com/anomalyco/psychoscript/issues"},"dist":{"shasum":"b00557db2a552c450c431cabb7adbc40f922d0b7","tarball":"https://registry.npmjs.org/psychoscript/-/psychoscript-0.2.0.tgz","fileCount":134,"integrity":"sha512-WKXM4sdLmnpVkAGtuvZdOzt/wcMolL5BYG0VcaayqDczYVo06qPpmk77ETwSz6I59D+4lLhPISgCfgGg/J9MMg==","signatures":[{"sig":"MEQCIBXq6lxjpnQl3IE3nTvloFVwFzwUelNws3rXz5T8UBLfAiBVqMCOMEqtCTs4UQGxKOBAAVHstfd5mu4rZtPIoEu2GA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDi9Sn2RWfX91ZxoB4Dlb1lnasGndgQ8vVxgRjq0/4vgwIhAKmRklZXbtFBAnD08+l/MTQVjzI/xA5NwV2pb/Ea8Lmy","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/psychoscript@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1095874},"type":"module","_from":"file:/home/runner/work/_temp/package/package.tgz","$schema":"https://json.schemastore.org/package.json","engines":{"bun":">=1.4","node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./effect":{"types":"./dist/effect/index.d.ts","default":"./dist/effect/index.js"},"./package.json":"./package.json"},"scripts":{"pack":"bun run script/pack.ts","test":"bun test","bench":"bun run script/bench.ts","build":"bun run script/build.ts","check":"bun run typecheck && bun test && bun run test:roundtrip && bun run pack","typecheck":"tsc --noEmit","prepublishOnly":"bun run build","test:roundtrip":"PSYCHOSCRIPT_ROUNDTRIP=1 bun test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"5350db28-bcf0-4f92-a1bc-9be40dac5acb"}},"_resolved":"/home/runner/work/_temp/package/package.tgz","_integrity":"sha512-WKXM4sdLmnpVkAGtuvZdOzt/wcMolL5BYG0VcaayqDczYVo06qPpmk77ETwSz6I59D+4lLhPISgCfgGg/J9MMg==","repository":{"url":"git+https://github.com/anomalyco/psychoscript.git","type":"git"},"_npmVersion":"11.13.0","description":"A confined, resumable JavaScript interpreter: programs call only the functions the host gives them, and a run can be suspended to bytes and resumed later","directories":{},"sideEffects":false,"_nodeVersion":"24.16.0","dependencies":{"acorn":"8.15.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"4.1.0","@types/bun":"1.4.3","@tsconfig/bun":"1.0.9","@typescript/native":"npm:typescript@7.1.0-beta"},"peerDependencies":{"effect":"^4.1.0"},"peerDependenciesMeta":{"effect":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/psychoscript_0.2.0_1795188900494_0.3885112758338295","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"psychoscript","version":"0.2.1","keywords":["javascript","interpreter","sandbox","bytecode","vm","resumable","snapshot","effect"],"license":"MIT","_id":"psychoscript@0.2.1","maintainers":[{"name":"thdxr","email":"d@ironbay.co"}],"homepage":"https://github.com/anomalyco/psychoscript#readme","bugs":{"url":"https://github.com/anomalyco/psychoscript/issues"},"dist":{"shasum":"f9fb2bf15d5c9f7f9d7c6ca7494b9ec967b37a95","tarball":"https://registry.npmjs.org/psychoscript/-/psychoscript-0.2.1.tgz","fileCount":136,"integrity":"sha512-kzDhlTdkk6DurnTMD95Vd98nfw5TFS6Sf4QyxEP0vclAlniB2vt2ZWjNwQ3NKXynfJL4lsbP+wjrRRdqkahUiw==","signatures":[{"sig":"MEUCIQCZiUhatOMaPxyRvEyIU1aIZU0KnbmiHdHXY9lJ5tPZEgIgLPV3zB4c31mdGG6QZxuX2MmlSz3Q3O2WFZUib2I+hXw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIATvb23HlJHQLqZNPijZd94no21f8EeS16siE0vOOD+bAiBnmMf3b6sKjYPgVJMgUKZzfZxAFVoSl0jusWTgi7NzTw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/psychoscript@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1097166},"type":"module","_from":"file:/home/runner/work/_temp/package/package.tgz","$schema":"https://json.schemastore.org/package.json","engines":{"bun":">=1.4","node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./effect":{"types":"./dist/effect/index.d.ts","default":"./dist/effect/index.js"},"./package.json":"./package.json"},"scripts":{"pack":"bun run script/pack.ts","test":"bun test","bench":"bun run script/bench.ts","build":"bun run script/build.ts","check":"bun run typecheck && bun test && bun run test:roundtrip && bun run pack","typecheck":"tsc --noEmit","prepublishOnly":"bun run build","test:roundtrip":"PSYCHOSCRIPT_ROUNDTRIP=1 bun test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"5350db28-bcf0-4f92-a1bc-9be40dac5acb"}},"_resolved":"/home/runner/work/_temp/package/package.tgz","_integrity":"sha512-kzDhlTdkk6DurnTMD95Vd98nfw5TFS6Sf4QyxEP0vclAlniB2vt2ZWjNwQ3NKXynfJL4lsbP+wjrRRdqkahUiw==","repository":{"url":"git+https://github.com/anomalyco/psychoscript.git","type":"git"},"_npmVersion":"11.13.0","description":"A confined, resumable JavaScript interpreter: programs call only the functions the host gives them, and a run can be suspended to bytes and resumed later","directories":{},"sideEffects":false,"_nodeVersion":"24.16.0","dependencies":{"acorn":"8.15.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"4.1.0","@types/bun":"1.4.3","@tsconfig/bun":"1.0.9","@typescript/native":"npm:typescript@7.1.0-beta"},"peerDependencies":{"effect":"^4.1.0"},"peerDependenciesMeta":{"effect":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/psychoscript_0.2.1_1795189588847_0.42463762416382067","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"_id":"psychoscript@0.3.0","bugs":{"url":"https://github.com/anomalyco/psychoscript/issues"},"dist":{"shasum":"096579caa9818fa9c7a75f4b02ee9a0fbbd4d62c","tarball":"https://registry.npmjs.org/psychoscript/-/psychoscript-0.3.0.tgz","fileCount":138,"integrity":"sha512-S4VohBlR6aXJtitKUZaYJ0OYs7AHjdKqBGYEL+6YoMU0oBFiVTFw8vTPrFujKBRuhjtj5kNu69CCJ/MBk4eM2g==","signatures":[{"sig":"MEQCIEQ4B81u2U3X974T6ZYu0HLdQG21H5FtIm7rAS7A8kA9AiAPGWzW6ZeyFtE1m3nxFgiQSq0alGBStq0KugeMvLiEQw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCaR8C6zwx3lBt6KkQAQ4rUXGBayQ1jHFj/EZ80lTsmpAIgC0x1D6Gtm4OU5bdqdz6zENbayTlT2rgVTu0XQfl5tXg="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/psychoscript@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1141377},"name":"psychoscript","type":"module","_from":"file:/home/runner/work/_temp/package/package.tgz","$schema":"https://json.schemastore.org/package.json","engines":{"bun":">=1.4","node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./effect":{"types":"./dist/effect/index.d.ts","default":"./dist/effect/index.js"},"./package.json":"./package.json"},"license":"MIT","scripts":{"pack":"bun run script/pack.ts","test":"bun test","bench":"bun run script/bench.ts","build":"bun run script/build.ts","check":"bun run typecheck && bun test && bun run test:roundtrip && bun run pack","typecheck":"tsc --noEmit","prepublishOnly":"bun run build","test:roundtrip":"PSYCHOSCRIPT_ROUNDTRIP=1 bun test"},"version":"0.3.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"5350db28-bcf0-4f92-a1bc-9be40dac5acb"}},"homepage":"https://github.com/anomalyco/psychoscript#readme","keywords":["javascript","interpreter","sandbox","bytecode","vm","resumable","snapshot","effect"],"_resolved":"/home/runner/work/_temp/package/package.tgz","_integrity":"sha512-S4VohBlR6aXJtitKUZaYJ0OYs7AHjdKqBGYEL+6YoMU0oBFiVTFw8vTPrFujKBRuhjtj5kNu69CCJ/MBk4eM2g==","repository":{"url":"git+https://github.com/anomalyco/psychoscript.git","type":"git"},"_npmVersion":"11.13.0","description":"A confined, resumable JavaScript interpreter: programs call only the functions the host gives them, and a run can be suspended to bytes and resumed later","directories":{},"maintainers":[{"name":"thdxr","email":"d@ironbay.co"}],"sideEffects":false,"_nodeVersion":"24.16.0","dependencies":{"acorn":"8.15.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"effect":"4.1.0","@types/bun":"1.4.3","@tsconfig/bun":"1.0.9","@typescript/native":"npm:typescript@7.1.0-beta"},"peerDependencies":{"effect":"^4.1.0"},"peerDependenciesMeta":{"effect":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/psychoscript_0.3.0_1795497645064_0.7704714311952058"}}},"time":{"created":"2026-11-17T21:25:53.549Z","modified":"2026-11-24T05:20:45.518Z","0.0.0-stage":"2026-11-17T21:25:53.549Z","0.0.0":"2026-11-17T21:29:01.932Z","0.1.0":"2026-11-19T22:08:25.717Z","0.1.1":"2026-11-20T00:15:24.795Z","0.1.2":"2026-11-20T00:23:13.293Z","0.2.0":"2026-11-20T15:35:00.627Z","0.2.1":"2026-11-20T15:46:28.952Z","0.3.0":"2026-11-24T05:20:45.186Z"},"bugs":{"url":"https://github.com/anomalyco/psychoscript/issues"},"license":"MIT","homepage":"https://github.com/anomalyco/psychoscript#readme","keywords":["javascript","interpreter","sandbox","bytecode","vm","resumable","snapshot","effect"],"repository":{"url":"git+https://github.com/anomalyco/psychoscript.git","type":"git"},"description":"A confined, resumable JavaScript interpreter: programs call only the functions the host gives them, and a run can be suspended to bytes and resumed later","maintainers":[{"name":"thdxr","email":"d@ironbay.co"}],"readme":"# psychoscript\n\nA confined, resumable JavaScript interpreter. Programs are compiled to bytecode and run on a VM with no ambient\naccess: no file system, network, process or timers. The only way a program reaches the outside world is through the\nhost functions you give it. A run can be suspended while it waits, saved to bytes, and resumed later, in the same\nprocess or another one, with the same result.\n\nUse it to run code you don't fully trust (from a model, a user, a plugin) against an API you control, and to keep\nlong-running programs alive across restarts.\n\n## Install\n\n```sh\nnpm install psychoscript\nbun add psychoscript\n```\n\nRequires Node ≥ 24 or Bun ≥ 1.4. The API is Promise-based and has no dependency on Effect;\n`psychoscript/effect` offers the same API over [Effect](https://effect.website) (see [Using Effect](#using-effect)).\n\n## Quick start\n\n```ts\nimport { Host, Runtime } from \"psychoscript\"\n\nconst runtime = Runtime.make({\n  globals: () => ({\n    double: Host.fn(([n]) => Number(n) * 2),\n  }),\n})\n\nconst result = await runtime.execute(\"return [await double(21), [1, 2, 3].map((x) => x + 1)]\")\nconsole.log(JSON.stringify(result))\n// {\"ok\":true,\"value\":[42,[2,3,4]],\"metadata\":null}\n```\n\nA result is `{ ok: true, value }` or `{ ok: false, error: { kind, message, suggestions? } }`, plus `logs` from\n`console`, `warnings`, and the run's `metadata`. The value crosses as `JSON.stringify` would serialize it (details in\n[`interpreter-support.md`](interpreter-support.md)).\n\n`execute(code, { signal })` and `program.run({ signal })` stop when the signal aborts: every host call's `call.signal`\naborts, and the run rejects with a `DOMException` named `\"AbortError\"` (its `cause` is the signal's reason). A host\ncall that ignores its signal is not waited for.\n\n```ts\nimport { Host, Runtime } from \"psychoscript\"\n\nconst runtime = Runtime.make({\n  globals: () => ({\n    slow: Host.fn(\n      (_, call) =>\n        new Promise((resolve) => {\n          const timer = setTimeout(resolve, 60_000)\n          call.signal.addEventListener(\"abort\", () => {\n            clearTimeout(timer)\n            console.log(\"host call aborted\")\n          })\n        }),\n      { type: \"async\" },\n    ),\n  }),\n})\n\nconst controller = new AbortController()\nsetTimeout(() => controller.abort(\"user cancelled\"), 10)\ntry {\n  await runtime.execute(\"return await slow()\", { signal: controller.signal })\n} catch (error) {\n  console.log(error.name, error.cause)\n}\n```\n\n```\nhost call aborted\nAbortError user cancelled\n```\n\n## Suspend and resume\n\n`runtime.program(code)` gives a run you control: `run()` runs it, and `suspend()` stops it and returns its state.\n`toBytes` and `fromBytes` turn that state into bytes and back; `runtime.resume` continues it.\n\n```ts\nimport { Host, Runtime, fromBytes, toBytes } from \"psychoscript\"\n\nconst code = `\n  let total = 0\n  for (const n of [1, 2, 3]) total += await fetchNumber(n)\n  return total\n`\n\n// First process: the host call never finishes, so the run waits; suspend it there.\nconst waiting = Runtime.make({\n  globals: () => ({\n    fetchNumber: Host.fn(([n]) => (n === 2 ? new Promise(() => {}) : n * 10), { type: \"async\", idempotent: true }),\n  }),\n})\nconst program = waiting.program(code)\nconst running = program.run()\nawait new Promise((resolve) => setTimeout(resolve, 10))\nconst outcome = await program.suspend()\nawait running\nconst bytes = toBytes(outcome.state)\nconsole.log(\"saved\", bytes.length, \"bytes\")\n\n// Later, anywhere with the same build and globals: resume from the bytes.\nconst runtime = Runtime.make({\n  globals: () => ({\n    fetchNumber: Host.fn(([n]) => n * 10, { type: \"async\", idempotent: true }),\n  }),\n})\nconst result = await runtime.resume(fromBytes(bytes)).run()\nconsole.log(JSON.stringify(result))\n// saved 5402 bytes\n// {\"ok\":true,\"value\":60,\"metadata\":null}\n```\n\nThe aborted call to `fetchNumber(2)` runs again on resume with the same `call.key`, which is why it is marked\n`idempotent`. Without that, `suspend()` rejects with a `SuspendError` while the call is in progress, and the run goes\non. A snapshot records the build that wrote it (package version plus a hash of the opcodes, prelude, codecs and\nbuilt-ins); resuming it in another build, or from malformed bytes, rejects with a `SnapshotError`.\n`suspend({ maxBytes })` caps the snapshot size.\n\n## Host functions\n\n`globals` is called for each run (and again on resume) with the `Run`: its `id`, and `metadata`, JSON the host keeps\nwith the run. It returns the program's globals; they shadow built-ins of the same name, and plain objects of host\nfunctions act as namespaces (`fs.read(...)`). Arguments reach the host as copies, and results are copied back.\n\n- **`Host.fn(f, options)`**: `f(args, call)` returns a value or a Promise, or throws. `call` has the call's `key`, a\n  `signal`, and `suspending()`. `options.type`:\n  - `\"sync\"` (default): the program waits for the result.\n  - `\"async\"`: the program gets a promise at once. Add `idempotent: true` if it is safe to run twice, so the run can\n    be suspended while the call is in progress.\n  - `\"sync-thenable\"`: like `sync`, but an object result can also be awaited.\n\n  `constructible: true` allows `new`; `takesFunctions: true` lets it receive functions it returned earlier;\n  `snapshot: { encode, decode }` keeps functions inside its results across a resume.\n- **`Host.durableFn({ start, wait, cancel })`**: work that keeps running across a suspend. `start` returns JSON kept in\n  the snapshot; `wait(data)` gets the result (again after a resume); `cancel(data)` runs if the run ends without it.\n- **`Host.namespace({ keys, resolve })`**: a lazy object for large catalogs. `resolve(path)` returns the function for\n  `ns.a.b(...)`, or `Host.missing(message, suggestions)`.\n- **`Host.fail(kind, message, suggestions)`**: throw it to give the program an error with your own `kind`.\n- **`StreamingResponse`**: return `new StreamingResponse(response)` to give the program a `Response`-like object whose\n  body streams (`text()`, `json()`, `bytes()`, `clone()`, `body` readers, `for await`).\n- **`translate`** (runtime option): what happens to a program function or promise inside an argument. By default both\n  fail the call; `{ functions: \"drop\", promises: \"await\" }` drops functions (as `JSON.stringify` does) and awaits\n  promises.\n\n```ts\nimport { Host, Runtime } from \"psychoscript\"\n\nconst files = { \"a.txt\": \"hello\", \"b.txt\": \"world\" }\n\nconst runtime = Runtime.make({\n  limits: { timeoutMs: 1_000, maxOutputBytes: 64_000 },\n  translate: { functions: \"drop\", promises: \"await\" },\n  globals: () => ({\n    now: Host.fn(() => 1_700_000_000_000),\n    log: Host.fn(([value]) => JSON.stringify(value), { type: \"async\" }),\n    fs: Host.namespace({\n      keys: (path) => (path.length === 0 ? [\"read\"] : []),\n      resolve: (path) =>\n        path.join(\".\") === \"read\"\n          ? Host.fn(([name]) => {\n              if (!(name in files)) throw Host.fail(\"NotFound\", `No file ${name}`, Object.keys(files))\n              return files[name]\n            })\n          : Host.missing(`fs.${path.join(\".\")} is not a function`, [\"fs.read\"]),\n    }),\n  }),\n})\n\nconst run = (code) => runtime.execute(code).then((r) => console.log(JSON.stringify(r)))\nawait run(\"return [fs.read('a.txt'), Object.keys(fs), now()]\")\nawait run(\"return await log({ f() {}, p: Promise.resolve(1) })\")\nawait run(\"fs.read('c.txt')\")\nawait run(\"fs.write('c.txt', 'x')\")\nawait run(\"while (true) {}\")\n```\n\n```\n{\"ok\":true,\"value\":[\"hello\",[\"read\"],1700000000000],\"metadata\":null}\n{\"ok\":true,\"value\":\"{\\\"p\\\":1}\",\"metadata\":null}\n{\"ok\":false,\"error\":{\"kind\":\"NotFound\",\"message\":\"No file c.txt\",\"suggestions\":[\"a.txt\",\"b.txt\"]},\"metadata\":null}\n{\"ok\":false,\"error\":{\"kind\":\"ExecutionFailure\",\"message\":\"fs.write is not a function\",\"suggestions\":[\"fs.read\"]},\"metadata\":null}\n{\"ok\":false,\"error\":{\"kind\":\"TimeoutExceeded\",\"message\":\"Execution timed out after 1000ms.\"},\"metadata\":null}\n```\n\n## Using Effect\n\n```sh\nnpm install psychoscript effect\n```\n\n`psychoscript/effect` exports the same names with an Effect API: `execute`, `program(...).run()`, `suspend()` and\n`resume(...).run()` are Effects, host functions may also return Effects (whose requirements become the runtime's\nservices), and `Host.durableFn` takes Effect `start`, `wait` and `cancel`. Interrupting a run interrupts its host\ncalls.\n\n```ts\nimport { Context, Effect, Fiber } from \"effect\"\nimport { Host, Runtime } from \"psychoscript/effect\"\n\nclass Users extends Context.Service<Users, { readonly name: (id: number) => string | undefined }>()(\"Users\") {}\n\nconst runtime = Runtime.make({\n  globals: () => ({\n    // Needs Users, so runtime.execute(...) needs it too.\n    user: Host.fn(([id]) =>\n      Effect.flatMap(Users, (users) => {\n        const name = users.name(Number(id))\n        return name === undefined ? Effect.fail(Host.fail(\"NotFound\", `No user ${id}`)) : Effect.succeed(name)\n      }),\n    ),\n    hang: Host.fn(() => Effect.never.pipe(Effect.onInterrupt(() => Effect.sync(() => console.log(\"host call interrupted\"))))),\n  }),\n})\n\nconst users = { name: (id: number) => [\"ada\", \"grace\"][id] }\nconst run = (code: string) => Effect.provideService(runtime.execute(code), Users, users)\n\nconsole.log(JSON.stringify(await Effect.runPromise(run(\"return [user(0), user(1)]\"))))\nconsole.log(JSON.stringify(await Effect.runPromise(run(\"return user(7)\"))))\nawait Effect.runPromise(\n  Effect.gen(function* () {\n    const fiber = yield* Effect.forkChild(run(\"hang()\"))\n    yield* Effect.sleep(10)\n    yield* Fiber.interrupt(fiber)\n  }),\n)\n```\n\n```\n{\"ok\":true,\"value\":[\"ada\",\"grace\"],\"metadata\":null}\n{\"ok\":false,\"error\":{\"kind\":\"NotFound\",\"message\":\"No user 7\"},\"metadata\":null}\nhost call interrupted\n```\n\nA host function's `Host.fail` reaches the program as a catchable error with your `kind`; other typed failures and\ndefects become an `ExecutionFailure`.\n\n## Limits\n\n`Runtime.make({ limits })` takes:\n\n| Option           | Default | Meaning                                                                                      |\n| ---------------- | ------- | -------------------------------------------------------------------------------------------- |\n| `timeoutMs`      | none    | Active time a run may take, summed across resumes; checked between VM steps.                 |\n| `maxOutputBytes` | none    | UTF-8 bytes kept from the result and logs (warnings get an equal budget); the rest is cut.    |\n\nFixed caps: a string at most 2^24 characters, an array at most 10,000,000 elements, at most 10,000 pending promises,\nand values nested at most 32 deep when they cross to or from the host. Exceeding one throws a `RangeError` in the\nprogram. There is no separate memory or step-count limit: bound runs with `timeoutMs`.\n\n## Security model\n\n- **No ambient I/O.** No `fetch`, `fs`, `process`, timers or host-engine globals; everything outside the program is a\n  host function you passed.\n- **No dynamic code.** No `eval`, `Function` constructor or `with`; programs are strict mode only.\n- **No prototype mutation.** No `Object.setPrototypeOf`, `__proto__` assignment, legacy accessors, `Proxy` or\n  `Reflect`, so a program can't change how built-ins behave.\n- **Bounded.** Time via `timeoutMs`, output via `maxOutputBytes`, and the caps above. A single regular-expression\n  match runs on the host engine and can't be interrupted, so a pathological pattern can run long.\n- **Checked snapshots.** A snapshot is validated on resume against the build that wrote it. Store snapshots as you\n  would code: whoever can edit one controls the resumed run.\n\n## Language\n\nModern strict-mode JavaScript: `let`/`const`, destructuring, spread, arrow, async and generator functions (including\nasync generators and `for await`), classes (fields, static members, getters and setters, `extends`, `super`), object\nliteral getters and setters, labels, `try`/`finally`, top-level `await` and `return`, and `import`/`require` of host\nglobals by module name. Built-ins: `Object`, `Array`, `String`, `Number`, `BigInt`, `Math`, `JSON`, `Date`, `RegExp`, `Map`,\n`Set`, `Promise`, `Iterator` helpers, errors, `URL`, `URLSearchParams`, `Headers`, `TextEncoder`/`TextDecoder`,\n`atob`/`btoa`, `structuredClone`, `crypto.randomUUID`/`getRandomValues`, `Uint8Array`, Node's `Buffer`, and `console`.\n\nNot supported: private members (`#x`), static blocks, `new` on plain functions, `Proxy`/`Reflect`, `Symbol()` (only\n`Symbol.iterator`, `Symbol.asyncIterator`, `Symbol.toPrimitive` and `Symbol.toStringTag` exist), typed arrays other than `Uint8Array` (and\n`ArrayBuffer`/`DataView`), `WeakRef`/`FinalizationRegistry`, sloppy mode, `eval`, `export`, and TypeScript syntax.\nUnsupported syntax fails before the program runs, with a hint.\n\n[`interpreter-support.md`](interpreter-support.md) is the detailed support matrix.\n\n## Determinism\n\nRuns are deterministic except for built-ins that read the host engine: `Math.random()`, `Date.now()` and `new Date()`\nwith no arguments, and `crypto.randomUUID()`/`crypto.getRandomValues()`. There is no option to seed them. A host\nthat needs reproducible runs can shadow them, since globals replace built-ins of the same name (for example a `Math`\nglobal whose `random` is a seeded `Host.fn`); the replacement is the whole object, so it must provide every member\nthe program uses.\n\n## test262\n\nThe interpreter is tested against [test262](https://github.com/tc39/test262) at a pinned revision (`250f204f`, in\n`test/test262/manifest.json`). The files aren't committed and CI doesn't run them yet: sync a local checkout (see\n[`test/test262/README.md`](test/test262/README.md)) and run `bun test test/test262.test.ts`. The sync leaves out\nfeatures that are out of scope by design (prototype mutation, `Proxy`, `eval`, sloppy mode and others). Of the\n22,253 files it keeps, 19,408 pass and 2,845 are skipped as known gaps (`test/test262/skipped.txt`), with no failures.\n\n## Development\n\n```sh\nbun install\nbun run check            # typecheck, tests, and a packed-tarball check; run before pushing\nbun run test:roundtrip   # tests that also save and restore state mid-run\nbun run bench\nbun run build            # dist/\nbun run script/sync-test262.ts ~/development/test262 && bun test test/test262.test.ts\n```\n\n## License\n\nMIT. Files under `test/test262` come from test262 under its own license (`test/test262/LICENSE.test262`), and\n`test/LICENSE.wpt` covers adapted web-platform-tests.\n","readmeFilename":"README.md"}