Skip to main content

Runtime extraction parity map

This map bridges the Target-state package graph and the current @tyrum/gateway layout. Use it as the contributor-facing source of truth for the #1755 extraction epic and update it whenever ownership moves.

Quick orientation

Status key

  • Already extracted: for runtime packages, the target package is already the behavioral owner; for intentional gateway-owned domains, the domain is already at its target boundary.
  • Partially extracted: a runtime package exists, but gateway still owns meaningful behavior or duplicate seams.
  • Still gateway-owned: the behavior still lives primarily in @tyrum/gateway even though the target state says it should be thinner.

Snapshot diagram

Runtime domain map

DomainTarget package/layerCurrent ownership snapshotStatusBlockers / drift to watchNext intended issue or step
Bootstrap, HTTP/WS transport, and bundled operator asset serving@tyrum/gateway composition rootpackages/gateway/src/bootstrap/*, packages/gateway/src/routes/*, and packages/gateway/src/ws/* remain the intended public runtime surface.Already extractedThe risk here is not missing extraction; it is transport and business logic drifting back into gateway internals.Keep this surface thin and enforce it through #1756.
Planner and other route-level application seams@tyrum/gateway transport adapters calling explicit servicespackages/gateway/src/routes/plan.ts still mixes transport, policy, wallet, and DAL orchestration directly inside the route layer.Still gateway-ownedThe internal gateway boundary rule in #1756 is the gating safeguard for keeping future route logic from spreading.Land #1758 so /plan becomes a transport adapter, then apply the same seam to other route and WebSocket entry points touched by #1756.
Policy evaluation, overrides, and review-policy primitives@tyrum/runtime-policypackages/runtime-policy/src/* owns evaluation, bundle merge/load, admin service, suggested overrides, and review-policy helpers. Gateway mostly retains stores, scoped snapshot helpers, and route/process wiring.Already extractedApproval processors and review delivery are still gateway-integrated, so avoid reintroducing new policy logic under packages/gateway/src/modules/policy or packages/gateway/src/modules/review.No extraction issue is needed in this epic; treat new work here as adapter-thinning only unless a focused follow-up issue is opened.
Node pairing, readiness, inventory, and dispatch coordination@tyrum/runtime-node-controlpackages/runtime-node-control/src/* owns pairing, capability-ready, inventory, and dispatch services. Gateway retains protocol and DAL adapters plus capability catalog and inspection surfaces.Already extractedCapability catalog and inspection behavior are still gateway-owned product surfaces; do not let them pull pairing or dispatch logic back out of the runtime package.Keep new pairing, readiness, inventory, and dispatch rules in @tyrum/runtime-node-control. Open a separate follow-up only if capability inspection needs its own extraction target.
Execution engine orchestration and worker loop@tyrum/runtime-executionpackages/runtime-execution/src/* currently exposes worker-loop, task-result, and type seams, but the execution engine core still lives under packages/gateway/src/modules/execution/engine/** plus gateway step executors.Partially extractedThe runtime package surface is still too thin to move core orchestration safely without first freezing the adapter ports back into gateway.Land #1759 first, then #1760.
Agent runtime lifecycle and turn orchestration@tyrum/runtime-agentpackages/runtime-agent/src/* owns the generic AgentRuntime shell and context-pruning helper. Gateway still owns lifecycle contracts, context assembly, tool-set building, turn preparation, and turn execution under packages/gateway/src/modules/agent/runtime/**.Partially extractedGateway remains the primary source of lifecycle and context types today, so package extraction would be unstable without a contract pass first.Land #1761 first, then #1762.
Workboard orchestration, CRUD behavior, and delegated execution@tyrum/runtime-workboardpackages/runtime-workboard/src/* owns orchestrator, dispatcher, reconciler, subagent-service, and package service entry points, but gateway still owns DALs, GatewayWorkboardService, runtime adapters, notifications, and scheduler helpers under packages/gateway/src/modules/workboard/**.Partially extractedOwnership is duplicated: the runtime package exists, but substantive CRUD and operator-facing behavior still lives in gateway.Land #1763 first, then #1764.
Operational control-plane plumbing outside this runtime split@tyrum/gatewayAuth, backplane, lifecycle hooks, observability, and operator asset composition remain gateway-owned and are not mapped to new runtime packages in the target graph.Already extractedThese areas can still accumulate business logic by accident if execution, agent, or workboard work reaches back into them.Keep them in gateway. Open new extraction work only if the target-state graph changes.

Sequencing guidance

  1. Use this map as the source-of-truth input for #1759, #1761, and #1763.
  2. Do not start #1760, #1762, or #1764 before their preceding contract and ownership issues land.
  3. Treat policy and node-control as the reference pattern for the end state: package-owned behavior with gateway-specific adapters at the edge.