{"_id":"@alife-sdk/core","_rev":"6-2384fc497d10146a73ee82b0c2885e51","name":"@alife-sdk/core","dist-tags":{"latest":"0.4.2"},"versions":{"0.1.0":{"name":"@alife-sdk/core","version":"0.1.0","keywords":["alife","game-ai","simulation","npc","behavior","state-machine","goap"],"author":{"name":"Eugene Rusakov"},"license":"MIT","_id":"@alife-sdk/core@0.1.0","maintainers":[{"name":"eurusik","email":"john.rusakov@gmail.com"}],"homepage":"https://github.com/eurusik/alife-sdk#readme","bugs":{"url":"https://github.com/eurusik/alife-sdk/issues"},"dist":{"shasum":"ad31aad270fc151e9c025c6007d321c41cdebfd4","tarball":"https://registry.npmjs.org/@alife-sdk/core/-/core-0.1.0.tgz","fileCount":367,"integrity":"sha512-3ntyKmbWCXTzW3rYCHgLjV1Jdo6pMRVWFqi8hOodOGGA6wSHXJ5MIet0w2MW5I4ySddT5/+MV3d+DVj+ptP4dQ==","signatures":[{"sig":"MEQCIExZXBhWJTlYe8KrRZtu+xCLSHdaDEAUD2LHv9zAm/UGAiAqN1fZnnM2BSkBnHo7TjubIBaVeU/HWAxp8InnrUqi5Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":593500},"main":"dist/index.js","type":"module","_from":"file:alife-sdk-core-0.1.0.tgz","types":"dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./ai":{"types":"./dist/ai/index.d.ts","import":"./dist/ai/index.js"},"./math":{"types":"./dist/core/math/index.d.ts","import":"./dist/core/math/index.js"},"./ports":{"types":"./dist/ports/index.d.ts","import":"./dist/ports/index.js"},"./spawn":{"types":"./dist/spawn/index.d.ts","import":"./dist/spawn/index.js"},"./combat":{"types":"./dist/combat/index.d.ts","import":"./dist/combat/index.js"},"./config":{"types":"./dist/config/index.d.ts","import":"./dist/config/index.js"},"./entity":{"types":"./dist/entity/index.d.ts","import":"./dist/entity/index.js"},"./events":{"types":"./dist/events/index.d.ts","import":"./dist/events/index.js"},"./logger":{"types":"./dist/logger/index.d.ts","import":"./dist/logger/index.js"},"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js"},"./faction":{"types":"./dist/faction/index.d.ts","import":"./dist/faction/index.js"},"./plugins":{"types":"./dist/plugins/index.d.ts","import":"./dist/plugins/index.js"},"./terrain":{"types":"./dist/terrain/index.d.ts","import":"./dist/terrain/index.js"},"./movement":{"types":"./dist/movement/index.d.ts","import":"./dist/movement/index.js"},"./registry":{"types":"./dist/registry/index.d.ts","import":"./dist/registry/index.js"},"./navigation":{"types":"./dist/navigation/index.d.ts","import":"./dist/navigation/index.js"}},"scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","test:watch":"vitest"},"_npmUser":{"name":"eurusik","email":"john.rusakov@gmail.com"},"_resolved":"/private/var/folders/jv/cpf6x8mj1g11mppj8rpdhlmr0000gn/T/e924e8ef9b5a6d89efaf478b754284fd/alife-sdk-core-0.1.0.tgz","_integrity":"sha512-3ntyKmbWCXTzW3rYCHgLjV1Jdo6pMRVWFqi8hOodOGGA6wSHXJ5MIet0w2MW5I4ySddT5/+MV3d+DVj+ptP4dQ==","repository":{"url":"git+https://github.com/eurusik/alife-sdk.git","type":"git","directory":"packages/alife-core"},"_npmVersion":"10.8.1","description":"Framework-agnostic A-Life simulation and AI decision-making system","directories":{},"sideEffects":false,"_nodeVersion":"20.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.0_1772739947326_0.017763288346907657","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@alife-sdk/core","version":"0.1.1","keywords":["alife","game-ai","simulation","npc","behavior","state-machine","goap"],"author":{"name":"Eugene Rusakov"},"license":"MIT","_id":"@alife-sdk/core@0.1.1","maintainers":[{"name":"eurusik","email":"john.rusakov@gmail.com"}],"homepage":"https://github.com/eurusik/alife-sdk#readme","bugs":{"url":"https://github.com/eurusik/alife-sdk/issues"},"dist":{"shasum":"5bab55ade2b59313981231003df648be777e6aff","tarball":"https://registry.npmjs.org/@alife-sdk/core/-/core-0.1.1.tgz","fileCount":367,"integrity":"sha512-Ylt4HVLcPT66G+YdH5/SMJTaK+XI6MSfpAiA3YWob7j0U94TeEC83/Y1Nrc8qg9WdJyVENXDKd1kuYmqG+53NQ==","signatures":[{"sig":"MEUCIQDU2TKPBLS54VO455swE7eR2dhrL+XACcF/uQt/E+xUiwIgDdaGaA2d5vVky/Il9cdGaxpKLmT1bKDfrIP8s++42qw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":594300},"main":"dist/index.js","type":"module","_from":"file:alife-sdk-core-0.1.1.tgz","types":"dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./ai":{"types":"./dist/ai/index.d.ts","import":"./dist/ai/index.js"},"./math":{"types":"./dist/core/math/index.d.ts","import":"./dist/core/math/index.js"},"./ports":{"types":"./dist/ports/index.d.ts","import":"./dist/ports/index.js"},"./spawn":{"types":"./dist/spawn/index.d.ts","import":"./dist/spawn/index.js"},"./combat":{"types":"./dist/combat/index.d.ts","import":"./dist/combat/index.js"},"./config":{"types":"./dist/config/index.d.ts","import":"./dist/config/index.js"},"./entity":{"types":"./dist/entity/index.d.ts","import":"./dist/entity/index.js"},"./events":{"types":"./dist/events/index.d.ts","import":"./dist/events/index.js"},"./logger":{"types":"./dist/logger/index.d.ts","import":"./dist/logger/index.js"},"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js"},"./faction":{"types":"./dist/faction/index.d.ts","import":"./dist/faction/index.js"},"./plugins":{"types":"./dist/plugins/index.d.ts","import":"./dist/plugins/index.js"},"./terrain":{"types":"./dist/terrain/index.d.ts","import":"./dist/terrain/index.js"},"./movement":{"types":"./dist/movement/index.d.ts","import":"./dist/movement/index.js"},"./registry":{"types":"./dist/registry/index.d.ts","import":"./dist/registry/index.js"},"./navigation":{"types":"./dist/navigation/index.d.ts","import":"./dist/navigation/index.js"}},"scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","test:watch":"vitest"},"_npmUser":{"name":"eurusik","email":"john.rusakov@gmail.com"},"_resolved":"/tmp/3af54115b31088dbe05d464ef38c672c/alife-sdk-core-0.1.1.tgz","_integrity":"sha512-Ylt4HVLcPT66G+YdH5/SMJTaK+XI6MSfpAiA3YWob7j0U94TeEC83/Y1Nrc8qg9WdJyVENXDKd1kuYmqG+53NQ==","repository":{"url":"git+https://github.com/eurusik/alife-sdk.git","type":"git","directory":"packages/alife-core"},"_npmVersion":"10.8.2","description":"Framework-agnostic A-Life simulation and AI decision-making system","directories":{},"sideEffects":false,"_nodeVersion":"20.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.1_1772742735425_0.030990360284036456","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@alife-sdk/core","version":"0.3.0","keywords":["alife","game-ai","simulation","npc","behavior","state-machine","goap"],"author":{"name":"Eugene Rusakov"},"license":"MIT","_id":"@alife-sdk/core@0.3.0","maintainers":[{"name":"eurusik","email":"john.rusakov@gmail.com"}],"homepage":"https://github.com/eurusik/alife-sdk#readme","bugs":{"url":"https://github.com/eurusik/alife-sdk/issues"},"dist":{"shasum":"b5d993d3901ec54e1d668241545fb4b0f2c113f6","tarball":"https://registry.npmjs.org/@alife-sdk/core/-/core-0.3.0.tgz","fileCount":379,"integrity":"sha512-rzXrZTCdrnMTUJzy/5qkoyNbZXUkS4RxyGDyIrdGByqus3XDaJxLW2tKkUyCOWt+m2v5nEWFI1Yla8r3WuPIyQ==","signatures":[{"sig":"MEUCIDjUEXwuTu/Rerdid/DuRajjHvRWHYP7/g8pTOBIwGHPAiEAkyKN/xqTQyUwXTGpoJnKI/pjQ3ZQnlLztJbICvLOEmQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":650877},"main":"dist/index.js","type":"module","_from":"file:alife-sdk-core-0.3.0.tgz","types":"dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./ai":{"types":"./dist/ai/index.d.ts","import":"./dist/ai/index.js"},"./math":{"types":"./dist/core/math/index.d.ts","import":"./dist/core/math/index.js"},"./ports":{"types":"./dist/ports/index.d.ts","import":"./dist/ports/index.js"},"./spawn":{"types":"./dist/spawn/index.d.ts","import":"./dist/spawn/index.js"},"./combat":{"types":"./dist/combat/index.d.ts","import":"./dist/combat/index.js"},"./config":{"types":"./dist/config/index.d.ts","import":"./dist/config/index.js"},"./entity":{"types":"./dist/entity/index.d.ts","import":"./dist/entity/index.js"},"./events":{"types":"./dist/events/index.d.ts","import":"./dist/events/index.js"},"./logger":{"types":"./dist/logger/index.d.ts","import":"./dist/logger/index.js"},"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js"},"./faction":{"types":"./dist/faction/index.d.ts","import":"./dist/faction/index.js"},"./plugins":{"types":"./dist/plugins/index.d.ts","import":"./dist/plugins/index.js"},"./terrain":{"types":"./dist/terrain/index.d.ts","import":"./dist/terrain/index.js"},"./movement":{"types":"./dist/movement/index.d.ts","import":"./dist/movement/index.js"},"./registry":{"types":"./dist/registry/index.d.ts","import":"./dist/registry/index.js"},"./navigation":{"types":"./dist/navigation/index.d.ts","import":"./dist/navigation/index.js"}},"scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","test:watch":"vitest"},"_npmUser":{"name":"eurusik","email":"john.rusakov@gmail.com"},"_resolved":"/tmp/b14693601af5ee3e7a470ed0a264b479/alife-sdk-core-0.3.0.tgz","_integrity":"sha512-rzXrZTCdrnMTUJzy/5qkoyNbZXUkS4RxyGDyIrdGByqus3XDaJxLW2tKkUyCOWt+m2v5nEWFI1Yla8r3WuPIyQ==","repository":{"url":"git+https://github.com/eurusik/alife-sdk.git","type":"git","directory":"packages/alife-core"},"_npmVersion":"10.8.2","description":"Framework-agnostic A-Life simulation and AI decision-making system","directories":{},"sideEffects":false,"_nodeVersion":"20.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.3.0_1772789683442_0.22425376133893904","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@alife-sdk/core","version":"0.4.0","keywords":["alife","game-ai","simulation","npc","behavior","state-machine","goap"],"author":{"name":"Eugene Rusakov"},"license":"MIT","_id":"@alife-sdk/core@0.4.0","maintainers":[{"name":"eurusik","email":"john.rusakov@gmail.com"}],"homepage":"https://github.com/eurusik/alife-sdk#readme","bugs":{"url":"https://github.com/eurusik/alife-sdk/issues"},"dist":{"shasum":"ba68a44d03837cdb96eacc984551d72a97e4270f","tarball":"https://registry.npmjs.org/@alife-sdk/core/-/core-0.4.0.tgz","fileCount":379,"integrity":"sha512-Hx1GKw9JScKRZ6lrL85ZkjUEkVphPOS2kH+fosaNkHbKXi/qHXTyrgz72uLYCj500IZzFSfvQh+0RD4r5EHKRg==","signatures":[{"sig":"MEYCIQDMmPWhqJkvqr4t3NoFKI4QmXvmZVCkYpXBTt3YUnaibwIhAIPppc1Wk6tILNbdg4f688LgF0k++bJETlsaEXYIigL4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":656849},"main":"dist/index.js","type":"module","_from":"file:alife-sdk-core-0.4.0.tgz","types":"dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./ai":{"types":"./dist/ai/index.d.ts","import":"./dist/ai/index.js"},"./math":{"types":"./dist/core/math/index.d.ts","import":"./dist/core/math/index.js"},"./ports":{"types":"./dist/ports/index.d.ts","import":"./dist/ports/index.js"},"./spawn":{"types":"./dist/spawn/index.d.ts","import":"./dist/spawn/index.js"},"./combat":{"types":"./dist/combat/index.d.ts","import":"./dist/combat/index.js"},"./config":{"types":"./dist/config/index.d.ts","import":"./dist/config/index.js"},"./entity":{"types":"./dist/entity/index.d.ts","import":"./dist/entity/index.js"},"./events":{"types":"./dist/events/index.d.ts","import":"./dist/events/index.js"},"./logger":{"types":"./dist/logger/index.d.ts","import":"./dist/logger/index.js"},"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js"},"./faction":{"types":"./dist/faction/index.d.ts","import":"./dist/faction/index.js"},"./plugins":{"types":"./dist/plugins/index.d.ts","import":"./dist/plugins/index.js"},"./terrain":{"types":"./dist/terrain/index.d.ts","import":"./dist/terrain/index.js"},"./movement":{"types":"./dist/movement/index.d.ts","import":"./dist/movement/index.js"},"./registry":{"types":"./dist/registry/index.d.ts","import":"./dist/registry/index.js"},"./navigation":{"types":"./dist/navigation/index.d.ts","import":"./dist/navigation/index.js"}},"scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","test:watch":"vitest"},"_npmUser":{"name":"eurusik","email":"john.rusakov@gmail.com"},"_resolved":"/tmp/2a3f824316bee7a29b52df688b152b2b/alife-sdk-core-0.4.0.tgz","_integrity":"sha512-Hx1GKw9JScKRZ6lrL85ZkjUEkVphPOS2kH+fosaNkHbKXi/qHXTyrgz72uLYCj500IZzFSfvQh+0RD4r5EHKRg==","repository":{"url":"git+https://github.com/eurusik/alife-sdk.git","type":"git","directory":"packages/alife-core"},"_npmVersion":"10.8.2","description":"Framework-agnostic A-Life simulation and AI decision-making system","directories":{},"sideEffects":false,"_nodeVersion":"20.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.4.0_1772823546392_0.8909430521557806","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@alife-sdk/core","version":"0.4.1","keywords":["alife","game-ai","simulation","npc","behavior","state-machine","goap"],"author":{"name":"Eugene Rusakov"},"license":"MIT","_id":"@alife-sdk/core@0.4.1","maintainers":[{"name":"eurusik","email":"john.rusakov@gmail.com"}],"homepage":"https://github.com/eurusik/alife-sdk#readme","bugs":{"url":"https://github.com/eurusik/alife-sdk/issues"},"dist":{"shasum":"a4a6a58a23d63f60073808404da0a2e5835b4e9e","tarball":"https://registry.npmjs.org/@alife-sdk/core/-/core-0.4.1.tgz","fileCount":379,"integrity":"sha512-pvPFOL3kG79avKoxOZxRpfwddNTDuYHYVAMag1zE8aNPdIrgsUgYYVij+TYVDAY6e+BJZDM3JrmA1s3L8hCDzg==","signatures":[{"sig":"MEYCIQCR7I8OFFuAwoE9BgqWElNDjDve1gJY7/JyeFeGNMKwWQIhAO5BzOSMFCIyIt3r5CbM0NZHFAVkP2JuQClwi2zNLpRM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":660450},"main":"dist/index.js","type":"module","_from":"file:alife-sdk-core-0.4.1.tgz","types":"dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./ai":{"types":"./dist/ai/index.d.ts","import":"./dist/ai/index.js"},"./math":{"types":"./dist/core/math/index.d.ts","import":"./dist/core/math/index.js"},"./ports":{"types":"./dist/ports/index.d.ts","import":"./dist/ports/index.js"},"./spawn":{"types":"./dist/spawn/index.d.ts","import":"./dist/spawn/index.js"},"./combat":{"types":"./dist/combat/index.d.ts","import":"./dist/combat/index.js"},"./config":{"types":"./dist/config/index.d.ts","import":"./dist/config/index.js"},"./entity":{"types":"./dist/entity/index.d.ts","import":"./dist/entity/index.js"},"./events":{"types":"./dist/events/index.d.ts","import":"./dist/events/index.js"},"./logger":{"types":"./dist/logger/index.d.ts","import":"./dist/logger/index.js"},"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js"},"./faction":{"types":"./dist/faction/index.d.ts","import":"./dist/faction/index.js"},"./plugins":{"types":"./dist/plugins/index.d.ts","import":"./dist/plugins/index.js"},"./terrain":{"types":"./dist/terrain/index.d.ts","import":"./dist/terrain/index.js"},"./movement":{"types":"./dist/movement/index.d.ts","import":"./dist/movement/index.js"},"./registry":{"types":"./dist/registry/index.d.ts","import":"./dist/registry/index.js"},"./navigation":{"types":"./dist/navigation/index.d.ts","import":"./dist/navigation/index.js"}},"scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","test:watch":"vitest"},"_npmUser":{"name":"eurusik","email":"john.rusakov@gmail.com"},"_resolved":"/tmp/e452e716a2e1d9e94391463a7e7c1064/alife-sdk-core-0.4.1.tgz","_integrity":"sha512-pvPFOL3kG79avKoxOZxRpfwddNTDuYHYVAMag1zE8aNPdIrgsUgYYVij+TYVDAY6e+BJZDM3JrmA1s3L8hCDzg==","repository":{"url":"git+https://github.com/eurusik/alife-sdk.git","type":"git","directory":"packages/alife-core"},"_npmVersion":"10.8.2","description":"Framework-agnostic A-Life simulation and AI decision-making system","directories":{},"sideEffects":false,"_nodeVersion":"20.20.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/core_0.4.1_1773837145436_0.2523940560849294","host":"s3://npm-registry-packages-npm-production"}},"0.4.2":{"name":"@alife-sdk/core","version":"0.4.2","description":"Framework-agnostic A-Life simulation and AI decision-making system","type":"module","sideEffects":false,"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./math":{"types":"./dist/core/math/index.d.ts","import":"./dist/core/math/index.js"},"./events":{"types":"./dist/events/index.d.ts","import":"./dist/events/index.js"},"./registry":{"types":"./dist/registry/index.d.ts","import":"./dist/registry/index.js"},"./entity":{"types":"./dist/entity/index.d.ts","import":"./dist/entity/index.js"},"./faction":{"types":"./dist/faction/index.d.ts","import":"./dist/faction/index.js"},"./combat":{"types":"./dist/combat/index.d.ts","import":"./dist/combat/index.js"},"./terrain":{"types":"./dist/terrain/index.d.ts","import":"./dist/terrain/index.js"},"./movement":{"types":"./dist/movement/index.d.ts","import":"./dist/movement/index.js"},"./spawn":{"types":"./dist/spawn/index.d.ts","import":"./dist/spawn/index.js"},"./ai":{"types":"./dist/ai/index.d.ts","import":"./dist/ai/index.js"},"./logger":{"types":"./dist/logger/index.d.ts","import":"./dist/logger/index.js"},"./ports":{"types":"./dist/ports/index.d.ts","import":"./dist/ports/index.js"},"./plugins":{"types":"./dist/plugins/index.d.ts","import":"./dist/plugins/index.js"},"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js"},"./config":{"types":"./dist/config/index.d.ts","import":"./dist/config/index.js"},"./navigation":{"types":"./dist/navigation/index.d.ts","import":"./dist/navigation/index.js"}},"keywords":["alife","game-ai","simulation","npc","behavior","state-machine","goap"],"license":"MIT","author":{"name":"Eugene Rusakov"},"repository":{"type":"git","url":"git+https://github.com/eurusik/alife-sdk.git","directory":"packages/alife-core"},"homepage":"https://github.com/eurusik/alife-sdk#readme","bugs":{"url":"https://github.com/eurusik/alife-sdk/issues"},"engines":{"node":">=20.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"typescript":"^5.9.3","vitest":"^4.0.18"},"scripts":{"build":"tsc","dev":"tsc --watch","test":"vitest run","test:watch":"vitest"},"_id":"@alife-sdk/core@0.4.2","_integrity":"sha512-oOC2fhR7JIRCXeG+1cg2wu3mpfXvon5NpZmx64JhE1oqLgV+OXpOdqeCabsu5qwkCL2A8qLrAUTJ/WGAIKQPFA==","_resolved":"/tmp/0ab41e46bb1199063e683fdbe6599e0d/alife-sdk-core-0.4.2.tgz","_from":"file:alife-sdk-core-0.4.2.tgz","_nodeVersion":"20.20.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-oOC2fhR7JIRCXeG+1cg2wu3mpfXvon5NpZmx64JhE1oqLgV+OXpOdqeCabsu5qwkCL2A8qLrAUTJ/WGAIKQPFA==","shasum":"a761b80ae2f2e6093388ba9d261f174a99ba73cc","tarball":"https://registry.npmjs.org/@alife-sdk/core/-/core-0.4.2.tgz","fileCount":379,"unpackedSize":660569,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDwXuHpyx45NmzC7KjletSl6TyfMhDCXVuKvMj6GL4L2AIhALs7wj0gGzOmTaDRm0ZrsVrWrtWi8wQihRjrNR0wFcdj"}]},"_npmUser":{"name":"eurusik","email":"john.rusakov@gmail.com"},"directories":{},"maintainers":[{"name":"eurusik","email":"john.rusakov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.4.2_1773955886126_0.6334253404619041"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-05T19:45:47.214Z","modified":"2026-03-19T21:31:26.454Z","0.1.0":"2026-03-05T19:45:47.568Z","0.1.1":"2026-03-05T20:32:15.633Z","0.3.0":"2026-03-06T09:34:43.639Z","0.4.0":"2026-03-06T18:59:06.706Z","0.4.1":"2026-03-18T12:32:25.642Z","0.4.2":"2026-03-19T21:31:26.307Z"},"bugs":{"url":"https://github.com/eurusik/alife-sdk/issues"},"author":{"name":"Eugene Rusakov"},"license":"MIT","homepage":"https://github.com/eurusik/alife-sdk#readme","keywords":["alife","game-ai","simulation","npc","behavior","state-machine","goap"],"repository":{"type":"git","url":"git+https://github.com/eurusik/alife-sdk.git","directory":"packages/alife-core"},"description":"Framework-agnostic A-Life simulation and AI decision-making system","maintainers":[{"name":"eurusik","email":"john.rusakov@gmail.com"}],"readme":"# @alife-sdk/core\n\nFramework-agnostic A-Life simulation and AI decision-making system.\n\nZero external dependencies. Works with Phaser, PixiJS, Node.js, or any JavaScript runtime.\n\n```\nnpm install @alife-sdk/core\n```\n\n---\n\n## What this package does\n\n`@alife-sdk/core` provides the complete foundation for a living game world:\n\n- **NPC AI** — finite state machines, GOAP planners, memory and perception systems\n- **A-Life simulation** — offline NPC brains, terrain selection, spawn cooldowns, faction diplomacy\n- **Game clock** — accelerated in-game time with configurable day/night cycle and time-change callbacks (HOUR_CHANGED, DAY_NIGHT_CHANGED events)\n- **World graph** — waypoint graph with A* pathfinding for offline NPC movement\n- **Plugin system** — extend the kernel with your own domain features\n\nThe package is intentionally engine-agnostic. It never imports Phaser,\nrenders sprites, or touches the DOM. All engine interaction goes through\n**ports** — narrow interfaces you implement once for your engine.\n\n---\n\n## Quick start\n\n> The SDK ships **interfaces only** for engine adapters — `IEntityAdapter`,\n> `IEntityFactory`, `IDataLoader`, etc. You implement them once for your engine.\n> The example below uses placeholder names; replace them with your own implementations.\n> See [`ports/README.md`](src/ports/README.md) for full interface specs and a Phaser example.\n\n```ts\nimport { ALifeKernel, Ports } from '@alife-sdk/core';\nimport { fullPreset, Plugins } from '@alife-sdk/core/plugins';\n\n// 1. Create the kernel\nconst kernel = new ALifeKernel();\n\n// 2. Register engine adapters (optional — kernel auto-provides no-ops if omitted)\n//    (MyEntityAdapter / MyEntityFactory — your implementations of\n//     IEntityAdapter / IEntityFactory from @alife-sdk/core/ports)\nkernel.provide(Ports.EntityAdapter,  new MyEntityAdapter(scene));\nkernel.provide(Ports.EntityFactory,  new MyEntityFactory(scene));\nkernel.provide(Ports.PlayerPosition, { getPlayerPosition: () => ({ x: player.x, y: player.y }) });\n// Ports.RuntimeClock and Ports.Random are also optional (SDK provides defaults)\n\n// 3. Install built-in plugins\nfullPreset(kernel);\n\n// 4. Register game data (before init)\n// Plugins is a set of typed plugin tokens — alternative to string IDs\n// e.g. kernel.getPlugin(Plugins.FACTIONS) is equivalent to kernel.getPlugin('factions')\nconst factions = kernel.getPlugin(Plugins.FACTIONS).factions;\nfactions.register('stalker', { name: 'Stalker', baseRelations: { bandit: -80 } });\nfactions.register('bandit',  { name: 'Bandit',  baseRelations: { stalker: -80 } });\n\n// 5. Init — validates ports, freezes registries, returns DiagnosticsCollector\nconst diag = kernel.init();\n\n// 6. Start — enables frame-based update()\nkernel.start();\n\n// 7. Game loop\nfunction update(deltaMs: number): void {\n  kernel.update(deltaMs);\n}\n\n// 8. Save / load\nconst save = kernel.serialize();\nkernel.restoreState(save);\n\n// 9. Cleanup\nkernel.destroy();\n```\n\n---\n\n## Sub-path imports\n\nEach module has its own import path for optimal tree-shaking:\n\n| Import path | What's inside | Module docs |\n|-------------|--------------|-------------|\n| `@alife-sdk/core` | `ALifeKernel`, `Clock`, `SpatialGrid`, `Ports`, `PortRegistry`, `Vec2`, `createPortToken` | [core/](src/core/) |\n| `@alife-sdk/core/ai` | `StateMachine`, `MemoryBank`, `DangerManager`, `GOAPPlanner` | [ai/](src/ai/README.md) |\n| `@alife-sdk/core/combat` | `DamageInstance`, `MoraleTracker`, `ImmunityProfile` | [combat/](src/combat/README.md) |\n| `@alife-sdk/core/config` | `createDefaultConfig`, `IALifeConfig` | [config/](src/config/README.md) |\n| `@alife-sdk/core/entity` | `IEntity`, `IComponent` | [entity/](src/entity/README.md) |\n| `@alife-sdk/core/events` | `EventBus`, `ALifeEvents`, `ALifeEventPayloads` | [events/](src/events/README.md) |\n| `@alife-sdk/core/faction` | `Faction`, `FactionBuilder` | [faction/](src/faction/README.md) |\n| `@alife-sdk/core/logger` | `Logger`, `LogLevel`, `LogChannel` | [logger/](src/logger/README.md) |\n| `@alife-sdk/core/movement` | `PatrolRouteTracker`, `MonsterHome` | [movement/](src/movement/README.md) |\n| `@alife-sdk/core/navigation` | `LevelGraph`, `NPCGraphMover` | [navigation/](src/navigation/README.md) |\n| `@alife-sdk/core/plugins` | `IALifePlugin`, built-in plugins, `Plugins` tokens | [plugins/](src/plugins/README.md) |\n| `@alife-sdk/core/ports` | `IEntityAdapter`, `IDataLoader`, `IRandom`, … | [ports/](src/ports/README.md) |\n| `@alife-sdk/core/registry` | `Registry`, `FactionRegistry`, `AIStateRegistry`, … | [registry/](src/registry/README.md) |\n| `@alife-sdk/core/schema` | `validateMonsterDefinition`, assertion helpers | [schema/](src/schema/README.md) |\n| `@alife-sdk/core/spawn` | `SpawnRegistry` | [spawn/](src/spawn/README.md) |\n| `@alife-sdk/core/terrain` | `Zone`, `SmartTerrain`, `TerrainBuilder` | [terrain/](src/terrain/README.md) |\n| `@alife-sdk/core/time` | `TimeManager` | [time/](src/time/README.md) |\n\n---\n\n## Architecture\n\n```\n                        ┌──────────────────────────────────┐\n                        │           ALifeKernel            │\n                        │  clock · events · logger · ports │\n                        └───────────────┬──────────────────┘\n                                       │ kernel.use(plugin)\n              ┌────────────────────────┼────────────────────────┐\n              │                        │                        │\n      FactionsPlugin           NPCTypesPlugin            SpawnPlugin\n      FactionRegistry          NPCTypeRegistry            SpawnRegistry\n              │                        │                        │\n              └────────────────────────┼────────────────────────┘\n                                       │\n              ┌────────────────────────┼────────────────────────┐\n              │                        │                        │\n         StateMachine            MemoryBank              GOAPPlanner\n        (18 AI states)        (4 channels, decay)       (A* on WorldState)\n              │                        │                        │\n              └────────────────────────┼────────────────────────┘\n                                       │\n              ┌────────────────────────┼────────────────────────┐\n              │                        │                        │\n          LevelGraph             SmartTerrain              Faction\n        (A* pathfinding)     (capacity + fitness)      (two-layer relations)\n```\n\n---\n\n## Key concepts\n\n### Ports — engine adapter pattern\n\nThe kernel never calls Phaser or any engine API directly. Instead, it calls\n**ports** — interfaces you implement to bridge the SDK to your engine.\n\nAll ports are optional — the kernel auto-provides silent no-op defaults for\nengine ports if you don't supply real implementations. This means\n`new ALifeKernel().init()` works with zero configuration for offline\nsimulation, persistence, and unit tests.\n\n| Port | Interface | Default | Purpose |\n|------|-----------|---------|---------|\n| Entity adapter | `IEntityAdapter` | no-op | Read/write entity position, visibility, components |\n| Entity factory | `IEntityFactory` | no-op | Create and destroy game objects |\n| Player position | `IPlayerPositionProvider` | `{x:0,y:0}` | Online/offline radius check each tick |\n| Runtime clock | `IRuntimeClock` | `Date.now()` | Real-time ms for cooldown timers |\n| Random | `IRandom` | `Math.random()` | PRNG for simulation randomness |\n\nSee [`ports/README.md`](src/ports/README.md) for implementation examples.\n\n### Plugin system\n\nThe kernel is minimal by design. All domain features live in plugins that\nyou install with `kernel.use(plugin)`. Built-in plugins cover factions,\nNPC types, combat schemas, spawning, monsters, and anomalies.\n\nWrite your own plugin by implementing `IALifePlugin`:\n\n```ts\nclass WeatherPlugin implements IALifePlugin {\n  readonly name = 'weather';\n  install(kernel: ALifeKernel): void { ... }\n  update(deltaMs: number): void { ... }\n  destroy(): void { ... }\n}\nkernel.use(new WeatherPlugin());\n```\n\nSee [`plugins/README.md`](src/plugins/README.md).\n\n### Event bus\n\nAll simulation events are delivered via a deferred `EventBus`.\n`emit()` queues an event; `flush()` delivers it — called automatically by\n`kernel.update()` at the end of each frame.\n\n```ts\nkernel.events.on(ALifeEvents.NPC_DIED, ({ npcId, killedBy }) => {\n  questSystem.onNpcKilled(npcId);\n});\n```\n\n41 typed events across 9 categories: A-Life, AI, Surge, Anomaly, Squad,\nFaction, Time, Social, Monster. See [`events/README.md`](src/events/README.md).\n\n### AI — StateMachine + GOAP\n\nEvery online NPC runs a `StateMachine` over states registered in `AIStateRegistry`.\nEach state has `enter / update / exit` handlers and optional auto-transition rules.\n\nElite NPCs (rank ≥ 5) additionally run a `GOAPPlanner` — an A* planner over\na `WorldState` that picks the optimal action sequence to achieve a goal.\n\nActions are registered as plain objects — no subclassing required:\n\n```ts\nimport { GOAPPlanner, WorldState } from '@alife-sdk/core/ai';\n\nconst planner = new GOAPPlanner();\n\nplanner.registerAction({\n  id: 'heal_self', cost: 2,\n  preconditions: { hasMedkit: true, isHealthy: false },\n  effects:       { hasMedkit: false, isHealthy: true },\n});\n\nconst current = WorldState.from({ isHealthy: false, hasMedkit: true });\nconst goal    = WorldState.from({ isHealthy: true });\nconst plan    = planner.plan(current, goal); // ['heal_self']\n```\n\nSee [`ai/README.md`](src/ai/README.md) for the full API including class-based `GOAPAction` for complex multi-frame logic.\n\n### Offline simulation — LevelGraph + SmartTerrain\n\nNPCs outside the player's view radius move through a `LevelGraph` (waypoint\ngraph with A*) without needing a full physics update. Each offline NPC gets\na `NPCGraphMover` cursor that interpolates world position along graph edges.\n\nNPCs choose destinations by scoring all `SmartTerrain` instances via\n`scoreFitness()` — a function of distance, capacity, shelter bonus, and\ndanger-vs-rank match.\n\n---\n\n## Lifecycle\n\n```\nkernel.provide(port)   ← register port adapters\n  ↓\nkernel.use(plugin)     ← register plugins\n  ↓\nkernel.init()          ← validate ports, freeze registries, call plugin.init()\n  ↓\nkernel.start()         ← enable frame-based update()\n  ↓\nkernel.update(delta)   ← each frame: tick plugins → flush events\n  ↓\nkernel.serialize()     ← capture state for save\nkernel.restoreState()  ← restore from save\n  ↓\nkernel.destroy()       ← cleanup, call plugin.destroy() in reverse order\n```\n\n### Save versioning and migrations\n\nThe kernel supports versioned saves. When a save file was created by an older\nversion of your game, you can register migration functions to transform the\nstate forward. Migrations are applied automatically during `restoreState()`.\n\n```ts\n// Register a migration that upgrades state from version 0 → 1\nkernel.registerMigration(0, (state) => {\n  // transform state as needed\n  return { ...state, version: 1, newField: 'default' };\n});\n\n// Later, restoreState() applies all needed migrations automatically\nkernel.restoreState(oldSave);\n```\n\n---\n\n## Testing\n\n```\npnpm test --filter @alife-sdk/core\n```\n\nThe SDK is designed to be test-friendly:\n- Engine ports (`EntityAdapter`, `PlayerPosition`, `EntityFactory`) auto-provide\n  no-ops — no boilerplate needed for offline/persistence tests\n- `IRandom` port → inject `SeededRandom` for deterministic results\n- `IRuntimeClock` port → inject a frozen clock\n\n```ts\n// Minimal test kernel — no provide() needed\nconst kernel = new ALifeKernel();\nkernel.init();\nkernel.step(10);\n\n// Override only what your test actually needs\nconst kernel = new ALifeKernel();\nkernel.provide(Ports.Random, new SeededRandom(42));\nkernel.init();\n```\n\n---\n\n## Module map\n\n```\nsrc/\n├── core/           ALifeKernel, Clock, SpatialGrid, Vec2, PortRegistry, Diagnostics\n├── ai/             StateMachine, MemorySystem, DangerManager, GOAPPlanner/Action/WorldState\n├── combat/         DamageInstance, ImmunityProfile, MoraleTracker\n├── config/         IALifeConfig, createDefaultConfig\n├── entity/         IEntity, IComponent (interfaces only)\n├── events/         EventBus, ALifeEvents, ALifeEventPayloads\n├── faction/        Faction, FactionBuilder, IFactionState\n├── logger/         Logger, LogLevel, LogChannel, ILogEntry\n├── movement/       PatrolRouteTracker, RouteType, MonsterHome\n├── navigation/     LevelGraph, NPCGraphMover\n├── plugins/        IALifePlugin, built-in plugins, PluginToken, presets\n├── ports/          IEntityAdapter, IEntityFactory, IRandom, IRuntimeClock, IDataLoader, ILogger\n├── registry/       Registry, FactionRegistry, NPCTypeRegistry, MonsterRegistry, AIStateRegistry, …\n├── schema/         validateMonsterDefinition, validateFactionDefinition, assertion helpers\n├── spawn/          SpawnRegistry\n├── terrain/        Zone, SmartTerrain, TerrainBuilder\n└── time/           TimeManager\n```\n","readmeFilename":"README.md"}