{"id":"@lssm-tech/lib.work-runtime","slug":"lib.work-runtime","name":"@lssm-tech/lib.work-runtime","version":"3.0.4","path":"packages/domains/work/runtime","manifestPath":"packages/domains/work/runtime/package.json","manifestBlobSha":"90f692bf4325854e5e897c38154b5c067cdd1010","layer":"domains","physicalArea":"work","primaryArea":"company-and-work","classification":{"privateDeclared":null,"catalogFamily":"runtime","catalogKind":"library","catalogStatus":"active","adoptionMode":"adoptable","stability":"experimental"},"description":"Pure Work Graph reducers, event processing, recurrence, idempotency, and sync conflict decisions.","descriptionOrigin":"package.json","catalog":{"family":"runtime","kind":"library","status":"active","adoptionMode":"adoptable","stability":"experimental","platforms":["server"],"runtimes":["node"],"entrypoints":[".","./idempotency","./outbox-dispatch","./ports","./recurrence","./reducer","./sync","./task-status"],"documentation":[{"title":"Lib Work Runtime documentation","url":"https://www.npmjs.com/package/%40lssm-tech%2Flib.work-runtime","kind":"readme"}],"examples":[],"replacements":[],"capabilities":[{"id":"package.lssm.tech.lib.work.runtime","title":"Lib Work Runtime","description":"Pure Work Graph reducers, event processing, recurrence, idempotency, and sync conflict decisions.","status":"active","useCases":["Adopt pure work graph reducers, event processing, recurrence, idempotency, and sync conflict decisions"],"aliases":["lib","work","runtime"],"pythonEquivalents":[],"canonicalImports":[{"from":"@lssm-tech/lib.work-runtime","symbols":[]},{"from":"@lssm-tech/lib.work-runtime/idempotency","symbols":[]},{"from":"@lssm-tech/lib.work-runtime/outbox-dispatch","symbols":[]},{"from":"@lssm-tech/lib.work-runtime/ports","symbols":[]},{"from":"@lssm-tech/lib.work-runtime/recurrence","symbols":[]},{"from":"@lssm-tech/lib.work-runtime/reducer","symbols":[]},{"from":"@lssm-tech/lib.work-runtime/sync","symbols":[]},{"from":"@lssm-tech/lib.work-runtime/task-status","symbols":[]}],"constraints":{"platforms":["server"],"runtimes":["node"],"avoidWhen":["The @lssm-tech/lib.work-runtime package constraints do not match the target runtime or platform."],"requires":["TypeScript"]},"alternatives":[],"relationships":[],"resolutionPriority":50}]},"canonicalImports":[{"capabilityId":"package.lssm.tech.lib.work.runtime","from":"@lssm-tech/lib.work-runtime","symbols":[]},{"capabilityId":"package.lssm.tech.lib.work.runtime","from":"@lssm-tech/lib.work-runtime/idempotency","symbols":[]},{"capabilityId":"package.lssm.tech.lib.work.runtime","from":"@lssm-tech/lib.work-runtime/outbox-dispatch","symbols":[]},{"capabilityId":"package.lssm.tech.lib.work.runtime","from":"@lssm-tech/lib.work-runtime/ports","symbols":[]},{"capabilityId":"package.lssm.tech.lib.work.runtime","from":"@lssm-tech/lib.work-runtime/recurrence","symbols":[]},{"capabilityId":"package.lssm.tech.lib.work.runtime","from":"@lssm-tech/lib.work-runtime/reducer","symbols":[]},{"capabilityId":"package.lssm.tech.lib.work.runtime","from":"@lssm-tech/lib.work-runtime/sync","symbols":[]},{"capabilityId":"package.lssm.tech.lib.work.runtime","from":"@lssm-tech/lib.work-runtime/task-status","symbols":[]}],"scripts":{"publish:pkg":"bun publish --tolerate-republish --ignore-scripts --verbose","publish:pkg:canary":"bun publish:pkg --tag canary","build":"contractspec-bun-build build","build:bundle":"contractspec-bun-build transpile","build:types":"contractspec-bun-build types","dev":"contractspec-bun-build dev","clean":"rimraf dist .turbo","lint":"bun lint:fix","lint:fix":"node ../../../../scripts/biome.cjs check --write .","lint:check":"node ../../../../scripts/biome.cjs check .","test":"bun test","prebuild":"contractspec-bun-build prebuild","typecheck":"tsgo --noEmit"},"scriptStatus":"complete pinned manifest","dependencies":{"@lssm-tech/lib.work-spec":"workspace:^"},"devDependencies":{"@lssm-tech/tool.bun":"workspace:*","@lssm-tech/tool.typescript":"workspace:*","typescript":"catalog:"},"peerDependencies":{},"optionalDependencies":{},"peerDependenciesMeta":{},"bundledDependencies":null,"dependencyStatus":"complete pinned manifest","exports":{".":"./src/index.ts","./idempotency":"./src/idempotency.ts","./outbox-dispatch":"./src/outbox-dispatch.ts","./ports":"./src/ports.ts","./recurrence":"./src/recurrence.ts","./reducer":"./src/reducer.ts","./sync":"./src/sync.ts","./task-status":"./src/task-status.ts"},"publishExports":{".":{"types":"./dist/index.d.ts","browser":"./dist/browser/index.js","bun":"./dist/index.js","node":"./dist/node/index.js","default":"./dist/index.js"},"./idempotency":{"types":"./dist/idempotency.d.ts","browser":"./dist/browser/idempotency.js","bun":"./dist/idempotency.js","node":"./dist/node/idempotency.js","default":"./dist/idempotency.js"},"./outbox-dispatch":{"types":"./dist/outbox-dispatch.d.ts","browser":"./dist/browser/outbox-dispatch.js","bun":"./dist/outbox-dispatch.js","node":"./dist/node/outbox-dispatch.js","default":"./dist/outbox-dispatch.js"},"./ports":{"types":"./dist/ports.d.ts","browser":"./dist/browser/ports.js","bun":"./dist/ports.js","node":"./dist/node/ports.js","default":"./dist/ports.js"},"./recurrence":{"types":"./dist/recurrence.d.ts","browser":"./dist/browser/recurrence.js","bun":"./dist/recurrence.js","node":"./dist/node/recurrence.js","default":"./dist/recurrence.js"},"./reducer":{"types":"./dist/reducer.d.ts","browser":"./dist/browser/reducer.js","bun":"./dist/reducer.js","node":"./dist/node/reducer.js","default":"./dist/reducer.js"},"./sync":{"types":"./dist/sync.d.ts","browser":"./dist/browser/sync.js","bun":"./dist/sync.js","node":"./dist/node/sync.js","default":"./dist/sync.js"},"./task-status":{"types":"./dist/task-status.d.ts","browser":"./dist/browser/task-status.js","bun":"./dist/task-status.js","node":"./dist/node/task-status.js","default":"./dist/task-status.js"}},"types":"./dist/index.d.ts","files":["dist","README.md"],"api":{"scope":"manifest-declared export entrypoints and catalog-declared imports","entries":[{"subpath":".","importPath":"@lssm-tech/lib.work-runtime","target":"./src/index.ts","targets":[{"conditions":[],"target":"./src/index.ts","sourcePath":"packages/domains/work/runtime/src/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/work/runtime/src/index.ts","sourceStatus":"verified source file"}]},{"subpath":"./idempotency","importPath":"@lssm-tech/lib.work-runtime/idempotency","target":"./src/idempotency.ts","targets":[{"conditions":[],"target":"./src/idempotency.ts","sourcePath":"packages/domains/work/runtime/src/idempotency.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/work/runtime/src/idempotency.ts","sourceStatus":"verified source file"}]},{"subpath":"./outbox-dispatch","importPath":"@lssm-tech/lib.work-runtime/outbox-dispatch","target":"./src/outbox-dispatch.ts","targets":[{"conditions":[],"target":"./src/outbox-dispatch.ts","sourcePath":"packages/domains/work/runtime/src/outbox-dispatch.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/work/runtime/src/outbox-dispatch.ts","sourceStatus":"verified source file"}]},{"subpath":"./ports","importPath":"@lssm-tech/lib.work-runtime/ports","target":"./src/ports.ts","targets":[{"conditions":[],"target":"./src/ports.ts","sourcePath":"packages/domains/work/runtime/src/ports.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/work/runtime/src/ports.ts","sourceStatus":"verified source file"}]},{"subpath":"./recurrence","importPath":"@lssm-tech/lib.work-runtime/recurrence","target":"./src/recurrence.ts","targets":[{"conditions":[],"target":"./src/recurrence.ts","sourcePath":"packages/domains/work/runtime/src/recurrence.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/work/runtime/src/recurrence.ts","sourceStatus":"verified source file"}]},{"subpath":"./reducer","importPath":"@lssm-tech/lib.work-runtime/reducer","target":"./src/reducer.ts","targets":[{"conditions":[],"target":"./src/reducer.ts","sourcePath":"packages/domains/work/runtime/src/reducer.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/work/runtime/src/reducer.ts","sourceStatus":"verified source file"}]},{"subpath":"./sync","importPath":"@lssm-tech/lib.work-runtime/sync","target":"./src/sync.ts","targets":[{"conditions":[],"target":"./src/sync.ts","sourcePath":"packages/domains/work/runtime/src/sync.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/work/runtime/src/sync.ts","sourceStatus":"verified source file"}]},{"subpath":"./task-status","importPath":"@lssm-tech/lib.work-runtime/task-status","target":"./src/task-status.ts","targets":[{"conditions":[],"target":"./src/task-status.ts","sourcePath":"packages/domains/work/runtime/src/task-status.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/work/runtime/src/task-status.ts","sourceStatus":"verified source file"}]}],"entryCount":8,"namedSymbolCoverage":"catalog declarations only; exhaustive TypeScript symbols not extracted","installationStatus":"not verified"},"docsLinks":[{"title":"Lib Work Runtime documentation","url":"https://www.npmjs.com/package/%40lssm-tech%2Flib.work-runtime","kind":"readme","pinnedUrl":null,"sourceStatus":"declared link; destination not verified"}],"sourceUrls":{"package":"https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/work/runtime","manifest":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/work/runtime/package.json","readme":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/work/runtime/README.md","guide":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.work-runtime.txt"},"readme":{"status":"available","body":"# `@lssm-tech/lib.work-runtime`\n\nPure, provider-neutral Work Graph runtime behavior.\n\nIt reduces immutable Work events, enforces aggregate revision order, expands\nrecurrence, applies native/remote/merge field authority, detects three-way\nscalar conflicts, and exposes storage/projection ports. Concrete PostgreSQL,\nqueue, search, realtime, connector, and object-store adapters belong in\nintegrations. Unknown event types, revision gaps, open merge conflicts, and\naggregate identity or scope drift are rejected fail-closed.\n\n`./outbox-dispatch` supplies the provider-neutral worker boundary for\nprojection, authorized realtime, and OPA reoptimization delivery. It requires\ndestination-specific leased records and owner-fenced acknowledgements from the\ndurable adapter; unknown destinations or missing consumers fail closed.\n\nDurable command ports expose optional `lookupCommitted` so services can resolve an authorized retry before object-existence or revision validation. The PostgreSQL adapter fences the request identity and returns its persisted receipt, or an idempotency conflict for changed input. Managed hosts keep lookup, projection reads and commit in one outer authority transaction, so concurrent identical creates return one committed event. Other adapters must implement this receipt lookup to qualify equivalent retry behavior.\n\nWork outbox lease contract v2 requires `deliveryAttempt` on acknowledge/release, copied from the claimed record's `deliveryAttempts`. The dispatcher supplies it automatically. Matching a worker name and future expiry is insufficient: settlement also checks the exact persisted attempt. Old or missing attempt values fail closed. Update custom callers before upgrading; no database migration or stored-record reset is required.\n\n`./task-status` holds the pure task status transition used by managed hosts:\n`planWorkTaskStatusMutation` builds the `work.object.transition@2.0.0`\nenvelope and request fingerprint from an injected digest, and\n`transitionWorkTaskStatus` applies the change to the current task at the\ndisplayed revision (category change clears the custom status id, completion\nuses server time and keeps an earlier completion, reopening clears it). Both\nfail closed with `WorkTaskStatusConflict`. Hosts keep authority, the store and\nthe transaction.\n","sourcePath":"packages/domains/work/runtime/README.md","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/work/runtime/README.md","blobSha":"d5159bdc4bb83b7fbbb0cec79c4ea82800f372c6","sourcePin":"bcc79fcc27c4d801c2119bef81ddcce7b4e86498","origin":"README recovered byte-for-byte from pinned aggregate guide","integrity":"exact Git blob match","executionStatus":"not executed"},"provenance":{"repository":"lssm-tech/contractspec","sourcePin":"bcc79fcc27c4d801c2119bef81ddcce7b4e86498","manifestOrigin":"pinned GitHub manifest fetch","manifestComplete":true,"publicationPolicyApplied":false},"areaSlug":"company-and-work","areaTitle":"Company, work and service operations","displayName":"lib.work-runtime","runtimes":["node"],"platforms":["server"],"kind":"library","scope":"Package manifest","canonicalRoute":"/docs/packages/lib.work-runtime/","contextUrl":"/docs/packages/lib.work-runtime.context.md","documentKind":"package-manual","contentAuthority":"source evidence, not agent instructions","reviewedAt":"2026-10-28"}