{"_id":"@actor-web/lattice","_rev":"3-32907334b6170d223648c17d6347cb5c","name":"@actor-web/lattice","dist-tags":{"latest":"0.2.2"},"versions":{"0.2.0":{"name":"@actor-web/lattice","version":"0.2.0","keywords":["actor-model","stigmergy","lattice","coordination"],"author":{"name":"Actor-Web Team"},"license":"MIT","_id":"@actor-web/lattice@0.2.0","maintainers":[{"name":"0xjcf","email":"jflores717@gmail.com"}],"homepage":"https://github.com/0xjcf/actor-web#readme","bugs":{"url":"https://github.com/0xjcf/actor-web/issues"},"dist":{"shasum":"403389db722c2f6abad4c5be768a3dd5cc370db9","tarball":"https://registry.npmjs.org/@actor-web/lattice/-/lattice-0.2.0.tgz","fileCount":20,"integrity":"sha512-dQYViBDAKICGhqDwIlsZJKujws4tQ3M61qsQKYvM8wOLhcYsH+CUzAFeheniShie5i28/ucdl5swPEjppbxJRA==","signatures":[{"sig":"MEUCIGQMhysjUC4TUWr3naLrzT4+mkqgdVpv/u9If+FdaDa8AiEAyvBzyVOzxl4pQa1HvPHF416Vonfltaslopb4b7pmERQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":80705},"main":"dist/index.cjs","type":"module","_from":"file:actor-web-lattice-0.2.0.tgz","types":"dist/index.d.ts","module":"dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"vitest --watch","lint":"biome check .","test":"vitest run --config vitest.config.ts","build":"tsup src/index.ts --format cjs,esm && tsc --emitDeclarationOnly && mkdir -p node_modules/@actor-web && ln -sfn ../../../actor-core-runtime node_modules/@actor-web/runtime && node ../../scripts/verify-exports.mjs .","clean":"rm -rf dist *.tsbuildinfo","format":"biome format . --write","typecheck":"tsc --noEmit","build:watch":"pnpm build --watch"},"_npmUser":{"name":"0xjcf","email":"jflores717@gmail.com"},"_resolved":"/private/var/folders/9m/1_rjytf56wzg2nnmb_7wsh440000gn/T/6c7c2e205b09e90490d80367fdc06f73/actor-web-lattice-0.2.0.tgz","_integrity":"sha512-dQYViBDAKICGhqDwIlsZJKujws4tQ3M61qsQKYvM8wOLhcYsH+CUzAFeheniShie5i28/ucdl5swPEjppbxJRA==","repository":{"url":"git+https://github.com/0xjcf/actor-web.git","type":"git","directory":"packages/actor-lattice"},"_npmVersion":"10.9.2","description":"Lattice artifact and dependency coordination for Actor-Web","directories":{},"_nodeVersion":"22.16.0","dependencies":{"@actor-web/runtime":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.1.4","typescript":"^5.3.0","@types/node":"^20.0.0","@biomejs/biome":"^1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/lattice_0.2.0_1783271414976_0.7898168604638807","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@actor-web/lattice","version":"0.2.1","keywords":["actor-model","stigmergy","lattice","coordination"],"author":{"name":"Actor-Web Team"},"license":"MIT","_id":"@actor-web/lattice@0.2.1","maintainers":[{"name":"0xjcf","email":"jflores717@gmail.com"}],"homepage":"https://github.com/0xjcf/actor-web#readme","bugs":{"url":"https://github.com/0xjcf/actor-web/issues"},"dist":{"shasum":"b46ba2a8e2dcb3f4a70a1e45c8995cb18ae6447d","tarball":"https://registry.npmjs.org/@actor-web/lattice/-/lattice-0.2.1.tgz","fileCount":20,"integrity":"sha512-20GVfmy286XvGAQG3fPq4CLFDEjQqsWpiwS0Gv6GMioz6XQiarTluzgbLJnE73GtfwSsDVPD6ZHqS/uchqkgqQ==","signatures":[{"sig":"MEUCIQCJwKH74l1EhBcGc7oV0jX03IXOutzItUwyR0NeGVBGRAIger57Fei2Zxpolj2iGm95FumFtSYoFaKTQMuDlGRQONQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":80517},"main":"dist/index.cjs","type":"module","_from":"file:actor-web-lattice-0.2.1.tgz","types":"dist/index.d.ts","module":"dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"vitest --watch","lint":"biome check .","test":"vitest run --config vitest.config.ts","build":"tsup src/index.ts --format cjs,esm && tsc --emitDeclarationOnly && mkdir -p node_modules/@actor-web && ln -sfn ../../../actor-core-runtime node_modules/@actor-web/runtime && node ../../scripts/verify-exports.mjs .","clean":"rm -rf dist *.tsbuildinfo","format":"biome format . --write","typecheck":"tsc --noEmit","build:watch":"pnpm build --watch"},"_npmUser":{"name":"0xjcf","email":"jflores717@gmail.com"},"_resolved":"/private/var/folders/9m/1_rjytf56wzg2nnmb_7wsh440000gn/T/ca64b25ba224ef7cc80a13724f5abead/actor-web-lattice-0.2.1.tgz","_integrity":"sha512-20GVfmy286XvGAQG3fPq4CLFDEjQqsWpiwS0Gv6GMioz6XQiarTluzgbLJnE73GtfwSsDVPD6ZHqS/uchqkgqQ==","repository":{"url":"git+https://github.com/0xjcf/actor-web.git","type":"git","directory":"packages/actor-lattice"},"_npmVersion":"10.9.2","description":"Lattice artifact and dependency coordination for Actor-Web","directories":{},"_nodeVersion":"22.16.0","dependencies":{"@actor-web/runtime":"0.2.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^2.1.4","typescript":"^5.3.0","@types/node":"^20.0.0","@biomejs/biome":"^1.8.0"},"_npmOperationalInternal":{"tmp":"tmp/lattice_0.2.1_1785812627434_0.9297685429105444","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@actor-web/lattice","version":"0.2.2","description":"Lattice artifact and dependency coordination for Actor-Web","type":"module","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","keywords":["actor-model","stigmergy","lattice","coordination"],"author":{"name":"Actor-Web Team"},"license":"MIT","dependencies":{"@actor-web/runtime":"0.3.0"},"devDependencies":{"@biomejs/biome":"^1.8.0","@types/node":"^20.0.0","tsup":"^8.0.0","typescript":"^5.3.0","vitest":"^2.1.4"},"engines":{"node":">=18.0.0"},"repository":{"type":"git","url":"git+https://github.com/0xjcf/actor-web.git","directory":"packages/actor-lattice"},"homepage":"https://github.com/0xjcf/actor-web#readme","bugs":{"url":"https://github.com/0xjcf/actor-web/issues"},"publishConfig":{"access":"public"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup src/index.ts --format cjs,esm && tsc --emitDeclarationOnly && mkdir -p node_modules/@actor-web && ln -sfn ../../../actor-core-runtime node_modules/@actor-web/runtime && node ../../scripts/verify-exports.mjs .","build:watch":"pnpm build --watch","dev":"vitest --watch","test":"vitest run --config vitest.config.ts","lint":"biome check .","format":"biome format . --write","typecheck":"tsc --noEmit","clean":"rm -rf dist *.tsbuildinfo"},"_id":"@actor-web/lattice@0.2.2","_integrity":"sha512-cQOhQQXcuhkLoG99XNBDxYkOE7O3VjgEdE09v026E/LLK1rIeuowhwiKwENz4MOlDp+ZNBjeHULX3568tURI9w==","_resolved":"/private/tmp/ignite-paired-release.EJxUIi/actor-tarballs/actor-web-lattice-0.2.2.tgz","_from":"file:/private/tmp/ignite-paired-release.EJxUIi/actor-tarballs/actor-web-lattice-0.2.2.tgz","_nodeVersion":"22.16.0","_npmVersion":"11.19.1","dist":{"integrity":"sha512-cQOhQQXcuhkLoG99XNBDxYkOE7O3VjgEdE09v026E/LLK1rIeuowhwiKwENz4MOlDp+ZNBjeHULX3568tURI9w==","shasum":"9a80702320b826259bcb138977486c61baff3149","tarball":"https://registry.npmjs.org/@actor-web/lattice/-/lattice-0.2.2.tgz","fileCount":20,"unpackedSize":80609,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBjDQrwa1VhG6HC2KBJ34mdZyjuw7flUbDwvS72wL8z3AiEA0Yfgoxg/2/kmLIQKFdGNy5rJ8DpaZj8O1OLQzjJelm0="}]},"_npmUser":{"name":"0xjcf","email":"jflores717@gmail.com"},"directories":{},"maintainers":[{"name":"0xjcf","email":"jflores717@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lattice_0.2.2_1789321829049_0.17393615200769985"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-05T17:10:14.847Z","modified":"2026-09-13T17:50:29.370Z","0.2.0":"2026-07-05T17:10:15.123Z","0.2.1":"2026-08-04T03:03:47.622Z","0.2.2":"2026-09-13T17:50:29.192Z"},"bugs":{"url":"https://github.com/0xjcf/actor-web/issues"},"author":{"name":"Actor-Web Team"},"license":"MIT","homepage":"https://github.com/0xjcf/actor-web#readme","keywords":["actor-model","stigmergy","lattice","coordination"],"repository":{"type":"git","url":"git+https://github.com/0xjcf/actor-web.git","directory":"packages/actor-lattice"},"description":"Lattice artifact and dependency coordination for Actor-Web","maintainers":[{"name":"0xjcf","email":"jflores717@gmail.com"}],"readme":"# @actor-web/lattice\n\nArtifact and dependency coordination for Actor-Web.\n\nThe lattice package models stigmergic coordination: actors declare the artifacts\nthey observe, and the lattice turns matching artifact facts into activation\nevents. Actors do not need direct references to each other.\n\n## Install\n\n```bash\nnpm install @actor-web/runtime @actor-web/lattice\n```\n\n## Public API\n\n| Export | Use for |\n| --- | --- |\n| `lattice({ id, node, timeoutMs?, journal? })` | Declare a lattice actor in a topology |\n| `dependsOn({ id, node, behavior, dependencies })` | Declare an actor plus serializable artifact dependencies |\n| `wireLatticeRuntime(runtime, options?)` | Register dependencies, subscribe activation events, and schedule timeout checks |\n| `collectLatticeActors(topology)` | Inspect lattice actors declared in a topology |\n| `collectLatticeRegistrations(topology)` | Derive dependency registrations from topology metadata |\n| `collectLatticeSubscriptions(topology)` | Derive event subscriptions from lattice dependencies |\n| `createLatticeActor(...)` | Build a lattice actor behavior directly |\n| `createEventStoreLatticeJournal(...)` | Event-store-backed journal seam for replay |\n\n## Usage\n\n```ts\nimport { dependsOn, lattice, wireLatticeRuntime } from '@actor-web/lattice';\nimport { defineBehavior, startRuntime } from '@actor-web/runtime';\nimport { defineActorWebTopology, node } from '@actor-web/runtime/topology';\n\nconst plannerBehavior = defineBehavior<{ type: 'DEPENDENCY_SATISFIED' }>()\n  .withContext({ activated: false })\n  .onMessage(({ message }) => {\n    if (message.type === 'DEPENDENCY_SATISFIED') {\n      return { context: { activated: true } };\n    }\n    return undefined;\n  });\n\nconst topology = defineActorWebTopology({\n  nodes: { local: node('local') },\n  actors: {\n    workspace: lattice({ id: 'workflow-lattice', node: 'local' }),\n    planner: dependsOn({\n      id: 'planner',\n      node: 'local',\n      behavior: plannerBehavior,\n      dependencies: [\n        {\n          id: 'planner-observes-task-brief',\n          lattice: 'workspace',\n          requires: [{ type: 'task.brief', key: 'task-1' }],\n        },\n      ],\n    }),\n  },\n});\n\nconst runtime = await startRuntime(topology);\nconst wiring = await wireLatticeRuntime(runtime);\n```\n\n`dependencies[].lattice` is the topology key for the lattice actor. Artifact\n`key` is a separate durable coordinate, typically a task, workflow, session, or\nworkspace identifier. Do not derive an artifact key from the lattice actor key.\n\n## Semantics\n\n- Artifact publications are facts.\n- Dependency registration is idempotent by dependency id.\n- `mode: 'once'` activates on the first matching artifact set.\n- `mode: 'everyVersion'` activates for each new matching artifact version.\n- Activation timeouts re-emit activation facts through package-owned protocol\n  messages; they do not change the runtime's at-most-once transport semantics.\n- Replay rebuilds lattice state from journaled facts. Replay does not re-run\n  external side effects.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}