{"id":"@lssm-tech/lib.execution-lanes","slug":"lib.execution-lanes","name":"@lssm-tech/lib.execution-lanes","version":"3.1.4","path":"packages/platform/agents/execution-lanes","manifestPath":"packages/platform/agents/execution-lanes/package.json","manifestBlobSha":"cc8a4fcc88cb7cba1260827d5c1fcd0252989909","layer":"platform","physicalArea":"agents","primaryArea":"agents-and-context","classification":{"privateDeclared":null,"catalogFamily":"sharedLibs","catalogKind":"library","catalogStatus":"active","adoptionMode":"adoptable","stability":"stable"},"description":"Execution lanes orchestration contracts and runtime for ContractSpec.","descriptionOrigin":"package.json","catalog":{"family":"sharedLibs","kind":"library","status":"active","adoptionMode":"adoptable","stability":"stable","platforms":["server"],"runtimes":["node"],"entrypoints":[".","./defaults","./interop","./launch","./quality","./types"],"documentation":[{"title":"Lib Execution Lanes documentation","url":"https://www.npmjs.com/package/%40lssm-tech%2Flib.execution-lanes","kind":"readme"}],"examples":[],"replacements":[],"capabilities":[{"id":"package.lssm.tech.lib.execution.lanes","title":"Lib Execution Lanes","description":"Execution lanes orchestration contracts and runtime for ContractSpec.","status":"active","useCases":["Adopt execution lanes orchestration contracts and runtime for contractspec"],"aliases":["contractspec","execution","lanes","orchestration","typescript","lib"],"pythonEquivalents":[],"canonicalImports":[{"from":"@lssm-tech/lib.execution-lanes","symbols":[]},{"from":"@lssm-tech/lib.execution-lanes/defaults","symbols":[]},{"from":"@lssm-tech/lib.execution-lanes/interop","symbols":[]},{"from":"@lssm-tech/lib.execution-lanes/launch","symbols":[]},{"from":"@lssm-tech/lib.execution-lanes/quality","symbols":["QualityExecutionRegistry","executeQualityPlan"]},{"from":"@lssm-tech/lib.execution-lanes/types","symbols":[]}],"constraints":{"platforms":["server"],"runtimes":["node"],"avoidWhen":["The @lssm-tech/lib.execution-lanes package constraints do not match the target runtime or platform."],"requires":["TypeScript"]},"alternatives":[],"relationships":[],"resolutionPriority":50}]},"canonicalImports":[{"capabilityId":"package.lssm.tech.lib.execution.lanes","from":"@lssm-tech/lib.execution-lanes","symbols":[]},{"capabilityId":"package.lssm.tech.lib.execution.lanes","from":"@lssm-tech/lib.execution-lanes/defaults","symbols":[]},{"capabilityId":"package.lssm.tech.lib.execution.lanes","from":"@lssm-tech/lib.execution-lanes/interop","symbols":[]},{"capabilityId":"package.lssm.tech.lib.execution.lanes","from":"@lssm-tech/lib.execution-lanes/launch","symbols":[]},{"capabilityId":"package.lssm.tech.lib.execution.lanes","from":"@lssm-tech/lib.execution-lanes/quality","symbols":["QualityExecutionRegistry","executeQualityPlan"]},{"capabilityId":"package.lssm.tech.lib.execution.lanes","from":"@lssm-tech/lib.execution-lanes/types","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 --unsafe --only=nursery/useSortedClasses . && 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.agent-protocol-spec":"workspace:^","@lssm-tech/lib.crypto-utils":"workspace:^","@lssm-tech/lib.harness":"workspace:^","@lssm-tech/lib.assurance-spec":"workspace:^","@lssm-tech/lib.contracts-spec-core":"workspace:^","@lssm-tech/lib.orchestration-spec":"workspace:^"},"devDependencies":{"@lssm-tech/lib.ai-agent":"workspace:*","@lssm-tech/tool.bun":"workspace:*","@lssm-tech/tool.typescript":"workspace:*","typescript":"catalog:"},"peerDependencies":{"@lssm-tech/lib.ai-agent":"workspace:^"},"optionalDependencies":{},"peerDependenciesMeta":{"@lssm-tech/lib.ai-agent":{"optional":true}},"bundledDependencies":null,"dependencyStatus":"complete pinned manifest","exports":{".":"./src/index.ts","./defaults":"./src/defaults/index.ts","./interop":"./src/interop/index.ts","./launch":"./src/launch/index.ts","./quality":"./src/quality/index.ts","./types":"./src/types/index.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"},"./defaults":{"types":"./dist/defaults/index.d.ts","browser":"./dist/browser/defaults/index.js","bun":"./dist/defaults/index.js","node":"./dist/node/defaults/index.js","default":"./dist/defaults/index.js"},"./interop":{"types":"./dist/interop/index.d.ts","browser":"./dist/browser/interop/index.js","bun":"./dist/interop/index.js","node":"./dist/node/interop/index.js","default":"./dist/interop/index.js"},"./launch":{"types":"./dist/launch/index.d.ts","bun":"./dist/launch/index.js","node":"./dist/node/launch/index.js","default":"./dist/launch/index.js"},"./quality":{"types":"./dist/quality/index.d.ts","browser":"./dist/browser/quality/index.js","bun":"./dist/quality/index.js","node":"./dist/node/quality/index.js","default":"./dist/quality/index.js"},"./types":{"types":"./dist/types/index.d.ts","browser":"./dist/browser/types/index.js","bun":"./dist/types/index.js","node":"./dist/node/types/index.js","default":"./dist/types/index.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.execution-lanes","target":"./src/index.ts","targets":[{"conditions":[],"target":"./src/index.ts","sourcePath":"packages/platform/agents/execution-lanes/src/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/execution-lanes/src/index.ts","sourceStatus":"verified source file"}]},{"subpath":"./defaults","importPath":"@lssm-tech/lib.execution-lanes/defaults","target":"./src/defaults/index.ts","targets":[{"conditions":[],"target":"./src/defaults/index.ts","sourcePath":"packages/platform/agents/execution-lanes/src/defaults/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/execution-lanes/src/defaults/index.ts","sourceStatus":"verified source file"}]},{"subpath":"./interop","importPath":"@lssm-tech/lib.execution-lanes/interop","target":"./src/interop/index.ts","targets":[{"conditions":[],"target":"./src/interop/index.ts","sourcePath":"packages/platform/agents/execution-lanes/src/interop/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/execution-lanes/src/interop/index.ts","sourceStatus":"verified source file"}]},{"subpath":"./launch","importPath":"@lssm-tech/lib.execution-lanes/launch","target":"./src/launch/index.ts","targets":[{"conditions":[],"target":"./src/launch/index.ts","sourcePath":"packages/platform/agents/execution-lanes/src/launch/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/execution-lanes/src/launch/index.ts","sourceStatus":"verified source file"}]},{"subpath":"./quality","importPath":"@lssm-tech/lib.execution-lanes/quality","target":"./src/quality/index.ts","targets":[{"conditions":[],"target":"./src/quality/index.ts","sourcePath":"packages/platform/agents/execution-lanes/src/quality/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/execution-lanes/src/quality/index.ts","sourceStatus":"verified source file"}]},{"subpath":"./types","importPath":"@lssm-tech/lib.execution-lanes/types","target":"./src/types/index.ts","targets":[{"conditions":[],"target":"./src/types/index.ts","sourcePath":"packages/platform/agents/execution-lanes/src/types/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/execution-lanes/src/types/index.ts","sourceStatus":"verified source file"}]}],"entryCount":6,"namedSymbolCoverage":"catalog declarations only; exhaustive TypeScript symbols not extracted","installationStatus":"not verified"},"docsLinks":[{"title":"Lib Execution Lanes documentation","url":"https://www.npmjs.com/package/%40lssm-tech%2Flib.execution-lanes","kind":"readme","pinnedUrl":null,"sourceStatus":"declared link; destination not verified"}],"sourceUrls":{"package":"https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/execution-lanes","manifest":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/execution-lanes/package.json","readme":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/execution-lanes/README.md","guide":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.execution-lanes.txt"},"readme":{"status":"available","body":"# @lssm-tech/lib.execution-lanes\n\nWebsite: https://contractspec.io\n\nTyped execution-lane contracts, registries, runtimes, evidence gating, and backend adapter ports for ContractSpec.\n\nLane, plan, evidence and identifier declarations now forward to the existing\npure `@lssm-tech/lib.orchestration-spec/execution-lanes` owner. Runtime behavior\nand supported execution-lanes exports remain here; consumers requiring only\nthose declaration models can use the canonical orchestration entries.\n\n## What It Provides\n\n- Lane contracts for `clarify`, `plan.consensus`, `complete.persistent`, and `team.coordinated`.\n- Typed handoff artifacts including clarification artifacts, plan packs, completion records, team snapshots, and lane runtime state.\n- Generic collaboration primitives for work claims, leases, mailbox traffic, handoffs, and evidence attachments that compose with legacy `TeamRunSpec`.\n- Additive coordinated-program V1 contracts for checkpointed multi-lane work,\n  dirty-worktree preservation, frozen contract dependencies, exclusive path\n  leases, integration handoffs, and exact-SHA integration receipts.\n- Runtime primitives for consensus planning, persistent completion loops, coordinated team runs, lane selection, evidence gating, and in-memory persistence.\n- `./quality` exposes `QualityExecutionRegistry` and `executeQualityPlan`.\n  Canonical quality models and supplied-receipt validation come from\n  `@lssm-tech/lib.assurance-spec/quality`; this runtime no longer imports the\n  ContractSpec compatibility facade.\n  Execution capabilities bind typed `executionRef` and command digests from an\n  immutable `QualityPlanV1`; dependency-ready checks run in parallel and emit\n  one exact `QualityRunReceiptV1`. The executor reports failures but never\n  decides which proof is required.\n- Quality profiles may bind an explicit `QualityEnvironmentV1`. The derived\n  plan retains prerequisite checks even when they belong to another gate.\n  Before executing an environment-bound check, the runner verifies the exact\n  environment digest, fixture/network boundary, and every readiness dependency.\n  A mismatch, missing dependency, exception or deadline produces an error\n  receipt without invoking the test. Hosts implement the actual boundary and\n  dependency probes; the generic executor does not provision infrastructure.\n- An optional `AgentRuntimeSessionPort` bridge that links a lane run to portable\n  agent sessions, turns, steps, checkpoints, pending approvals, evidence, and\n  cancellation without replacing the canonical agent runtime contract.\n- Backend-neutral adapter ports for in-process, subagent, tmux, queue, and workflow-engine execution.\n- Coordinated teams enforce the Protocol V1 defaults of eight participants and\n  32 acyclic task nodes. Claims require an eligible declared worker, and task\n  completion requires an active matching lease plus attached evidence.\n  Evidence is resolved against the lane store: attaching a task or run bundle\n  id that is not recorded for the run is refused, every attached id must\n  still resolve when the task completes, at least one attached bundle must be\n  fresh, and a task that declares `requiredEvidence` completes only when\n  fresh, same-run bundles cover every declared class. Finalization and\n  readiness refuse run or completed-task evidence ids missing from the store.\n  Every new run must enable the verification lane, with or without\n  `writePaths`; membership changes on an already persisted run skip that\n  creation-only rule. When the verification lane is required, finalization\n  needs a verifier approval whose `decidedBy` is not a task participant: no\n  current or reclaimed claimant (each claim is kept in `claimHistory`), and\n  no principal that claimed, attached work evidence to, or completed\n  (`completedBy`) a task. `evaluateLaneReadiness` applies the same\n  independence rule to every run with team state, so it never reports\n  `ready` for a run finalization would reject: a lane that names its policy\n  by key resolves it through `policyRegistry` (also a `LaneRuntimeOptions`\n  field) and otherwise uses the default `team.coordinated` policy, and\n  unresolved evidence ids are listed as `unresolved_evidence:<id>`.\n- Team workers receive bounded, least-privileged delegation\n  (`TeamWorkerDelegationV1`, `getWorkerDelegation`): a principal derived from\n  the lead, delegation depth lead + 1 (at most two) with no further\n  delegation, a context of the run objective and only the tasks the worker\n  may claim (tasks hinted for its role, then unhinted tasks), its role's tools\n  within the lead's tools, only the grants its role requires, a wall-clock\n  bound for every lease, inherited approval requirements, completion criteria,\n  evidence obligations and a typed-help channel. No mailbox, handoff or parent\n  history and no credentials are projected. A host passes\n  `createTeamRun(store, adapter, { delegation })` with a\n  `TeamDelegationAuthorityV1` (or a per-run resolver, called again for every\n  operation so revocations apply to active work); creation, start and\n  membership changes fail closed when a worker would need a tool, grant or\n  depth the lead lacks. A run created under an authority stays bound: a\n  resolver that later returns nothing fails closed, so revoke access by\n  returning an authority with fewer tools or grants. Under that authority,\n  claims, lease renewals, task-evidence attachments, completions, heartbeats\n  and help requests must be made by the worker's derived principal. Without\n  one, workers derive from a run-local lead, receive no grant, and actor ids\n  stay informational. Every lease is positive and bounded by the worker's\n  wall clock (`maxWorkerWallClockSeconds`, one hour by default). Run and\n  worker ids are percent-encoded (`%` and `/`) inside derived principals.\n- Workers ask for help with the canonical `AgentHelpRequestV1`\n  (`requestHelp`), routed to the lead mailbox and bound to the worker's\n  derived principal and task; a retried identical request returns the\n  existing record. `respondToHelp` records the canonical\n  `AgentHelpResponseV1` under the agent-protocol help rules: the selected\n  option must be one of the request's safe options, the response must be\n  created between the request's creation and expiry, and no worker of the\n  run (worker id or derived principal) may answer. Under a delegation\n  authority the responder is the lead the request was routed to, or a\n  responder the injected `helpResponseAuthority`\n  (`TeamHelpResponseAuthorityPortV1`, called outside the team lock with the\n  response digest and required evidence) authorizes. `listHelp` reads the\n  durable `team_help_request` records.\n- Worker lifecycle calls (start, membership changes, pause, resume, nudge and\n  shutdown) use a bounded two-phase work-order/outbox protocol:\n  `team_work_order` records are written inside the team transaction, the\n  backend runs with no team lock held (bounded by `workOrderTimeoutMs`, with\n  the order id and deadline passed to the backend), and the outcome is\n  settled in a second transaction. Every order of a call is checked before\n  any is written, so a refused call leaves no order behind. A worker has at\n  most one open order; orders that outlive their deadline settle as\n  `indeterminate` (`reconcileWorkOrders` settles expired orders; it does not\n  query the backend), and a failed start marks the worker `failed` and\n  throws `TeamWorkOrderFailureError`. Failures persist only the error class\n  name (and a short `code`), never the backend message. A retry gets a new\n  order id, so backends deduplicate by run and worker. A worker the backend\n  stopped or removed releases the tasks it still leased.\n- Terminal snapshots preserve failure truth: failed, blocked, or cancelled task\n  graphs become failed, blocked, or aborted runs instead of optimistic\n  completion. The optional store-owned team transaction boundary serializes\n  claims, evidence, mailbox, recovery, and finalization across replicas;\n  backends without it retain the per-store compatibility mutex. Terminal\n  replay returns the one persisted snapshot rather than manufacturing another.\n\n## Public Entry Points\n\n- `.` resolves through `./src/index.ts`\n- `./types` resolves through `./src/types/index.ts`\n- `./defaults` resolves through `./src/defaults/index.ts`\n- `./interop` resolves through `./src/interop/index.ts`\n- `./launch` resolves through `./src/launch/index.ts`\n- `./quality` resolves through `./src/quality/index.ts`\n\n## Notes\n\n- The package stays runtime- and backend-neutral; storage-backed operator persistence belongs in integration and app layers.\n- Evidence normalization and replay references align with `@lssm-tech/lib.harness`; this package does not introduce a second proof model.\n- Role semantics live in typed role profiles, not prompt prose.\n- `./launch` owns lane launch policy: `buildExecutionPlanPack` (deliberate\n  mode raises scope to high-risk and requires verifier, architect and human\n  approvals), `buildCompletionLoopSpecFromPlanPack` (approvals drive the\n  signoff flags and delegate roles), `buildTeamRunSpecFromPlanPack` (default\n  workers from plan step role hints), `createLaneRunState` and\n  `requiredSignoffRoles`. `createDefaultRoleRegistry` and\n  `createDefaultLaneRegistry` build the default registries.\n- Canonical artifact and evidence identifiers use spec-style snake_case names; readers normalize older hyphenated aliases for persisted compatibility.\n- Command semantics for `/clarify`, `/plan`, `/plan --consensus`, `/complete`, and `/team` live in the typed `./interop` surface rather than in prompt prose alone.\n- `CoordinatedProgramSpecV1` embeds the existing `TeamRunSpec` and references\n  existing evidence bundles. Its validators fail closed for overlapping\n  exclusive leases, unresolved dependency/freeze refs, stale checkpoints or\n  evidence, incomplete dirty-path preservation metadata, and integration proof\n  that is not bound to the exact integration SHA.\n- `serializeCoordinatedProgramSpecV1` and `coordinatedProgramDigestV1` provide a\n  deterministic review/replay representation without introducing another\n  orchestration or evidence runtime.\n","sourcePath":"packages/platform/agents/execution-lanes/README.md","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/agents/execution-lanes/README.md","blobSha":"dd6f2ea08a51d1ae1558df06f1556070fbc0498b","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":"agents-and-context","areaTitle":"Agents, execution and context","displayName":"lib.execution-lanes","runtimes":["node"],"platforms":["server"],"kind":"library","scope":"Package manifest","canonicalRoute":"/docs/packages/lib.execution-lanes/","contextUrl":"/docs/packages/lib.execution-lanes.context.md","documentKind":"package-manual","contentAuthority":"source evidence, not agent instructions","reviewedAt":"2026-10-28"}