@amsterdamdatalabs/enact-operator 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/lanes/autopilot/index.d.ts +95 -0
- package/dist/lanes/autopilot/index.d.ts.map +1 -0
- package/dist/lanes/autopilot/index.js +499 -0
- package/dist/lanes/autopilot/index.js.map +1 -0
- package/dist/lanes/ralph/index.d.ts +118 -0
- package/dist/lanes/ralph/index.d.ts.map +1 -0
- package/dist/lanes/ralph/index.js +680 -0
- package/dist/lanes/ralph/index.js.map +1 -0
- package/dist/lanes/team/index.d.ts +110 -0
- package/dist/lanes/team/index.d.ts.map +1 -0
- package/dist/lanes/team/index.js +748 -0
- package/dist/lanes/team/index.js.map +1 -0
- package/dist/lanes/team/roles.d.ts +15 -0
- package/dist/lanes/team/roles.d.ts.map +1 -0
- package/dist/lanes/team/roles.js +89 -0
- package/dist/lanes/team/roles.js.map +1 -0
- package/dist/lanes/ultrawork/burst.d.ts +69 -0
- package/dist/lanes/ultrawork/burst.d.ts.map +1 -0
- package/dist/lanes/ultrawork/burst.js +254 -0
- package/dist/lanes/ultrawork/burst.js.map +1 -0
- package/dist/lanes/ultrawork/index.d.ts +159 -0
- package/dist/lanes/ultrawork/index.d.ts.map +1 -0
- package/dist/lanes/ultrawork/index.js +919 -0
- package/dist/lanes/ultrawork/index.js.map +1 -0
- package/dist/lanes/ultrawork/phases.d.ts +57 -0
- package/dist/lanes/ultrawork/phases.d.ts.map +1 -0
- package/dist/lanes/ultrawork/phases.js +116 -0
- package/dist/lanes/ultrawork/phases.js.map +1 -0
- package/dist/mcp/activation.d.ts +5 -0
- package/dist/mcp/activation.d.ts.map +1 -0
- package/dist/mcp/activation.js +234 -0
- package/dist/mcp/activation.js.map +1 -0
- package/dist/mcp/cli.d.ts +11 -0
- package/dist/mcp/cli.d.ts.map +1 -0
- package/dist/mcp/cli.js +140 -0
- package/dist/mcp/cli.js.map +1 -0
- package/dist/mcp/continuation.d.ts +5 -0
- package/dist/mcp/continuation.d.ts.map +1 -0
- package/dist/mcp/continuation.js +360 -0
- package/dist/mcp/continuation.js.map +1 -0
- package/dist/mcp/jobs.d.ts +5 -0
- package/dist/mcp/jobs.d.ts.map +1 -0
- package/dist/mcp/jobs.js +212 -0
- package/dist/mcp/jobs.js.map +1 -0
- package/dist/mcp/laneSupport.d.ts +19 -0
- package/dist/mcp/laneSupport.d.ts.map +1 -0
- package/dist/mcp/laneSupport.js +21 -0
- package/dist/mcp/laneSupport.js.map +1 -0
- package/dist/mcp/lanes/autopilot.d.ts +5 -0
- package/dist/mcp/lanes/autopilot.d.ts.map +1 -0
- package/dist/mcp/lanes/autopilot.js +227 -0
- package/dist/mcp/lanes/autopilot.js.map +1 -0
- package/dist/mcp/lanes/ralph.d.ts +5 -0
- package/dist/mcp/lanes/ralph.d.ts.map +1 -0
- package/dist/mcp/lanes/ralph.js +392 -0
- package/dist/mcp/lanes/ralph.js.map +1 -0
- package/dist/mcp/lanes/team.d.ts +5 -0
- package/dist/mcp/lanes/team.d.ts.map +1 -0
- package/dist/mcp/lanes/team.js +413 -0
- package/dist/mcp/lanes/team.js.map +1 -0
- package/dist/mcp/lanes/ultrawork.d.ts +5 -0
- package/dist/mcp/lanes/ultrawork.d.ts.map +1 -0
- package/dist/mcp/lanes/ultrawork.js +497 -0
- package/dist/mcp/lanes/ultrawork.js.map +1 -0
- package/dist/mcp/linkage.d.ts +5 -0
- package/dist/mcp/linkage.d.ts.map +1 -0
- package/dist/mcp/linkage.js +126 -0
- package/dist/mcp/linkage.js.map +1 -0
- package/dist/mcp/planning.d.ts +5 -0
- package/dist/mcp/planning.d.ts.map +1 -0
- package/dist/mcp/planning.js +584 -0
- package/dist/mcp/planning.js.map +1 -0
- package/dist/mcp/rpcTransport.d.ts +17 -0
- package/dist/mcp/rpcTransport.d.ts.map +1 -0
- package/dist/mcp/rpcTransport.js +90 -0
- package/dist/mcp/rpcTransport.js.map +1 -0
- package/dist/mcp/schemas/ralphVerify.d.ts +32 -0
- package/dist/mcp/schemas/ralphVerify.d.ts.map +1 -0
- package/dist/mcp/schemas/ralphVerify.js +20 -0
- package/dist/mcp/schemas/ralphVerify.js.map +1 -0
- package/dist/mcp/server.d.ts +5 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +176 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/system.d.ts +5 -0
- package/dist/mcp/system.d.ts.map +1 -0
- package/dist/mcp/system.js +445 -0
- package/dist/mcp/system.js.map +1 -0
- package/dist/mcp/toolFilter.d.ts +2 -0
- package/dist/mcp/toolFilter.d.ts.map +1 -0
- package/dist/mcp/toolFilter.js +2 -0
- package/dist/mcp/toolFilter.js.map +1 -0
- package/dist/mcp/toolPartitions.d.ts +20 -0
- package/dist/mcp/toolPartitions.d.ts.map +1 -0
- package/dist/mcp/toolPartitions.js +280 -0
- package/dist/mcp/toolPartitions.js.map +1 -0
- package/dist/mcp/toolRuntime.d.ts +9 -0
- package/dist/mcp/toolRuntime.d.ts.map +1 -0
- package/dist/mcp/toolRuntime.js +179 -0
- package/dist/mcp/toolRuntime.js.map +1 -0
- package/dist/mcp/workflow.d.ts +12 -0
- package/dist/mcp/workflow.d.ts.map +1 -0
- package/dist/mcp/workflow.js +723 -0
- package/dist/mcp/workflow.js.map +1 -0
- package/dist/operator/hooks/hookDispatcher.d.ts +39 -0
- package/dist/operator/hooks/hookDispatcher.d.ts.map +1 -0
- package/dist/operator/hooks/hookDispatcher.js +58 -0
- package/dist/operator/hooks/hookDispatcher.js.map +1 -0
- package/dist/operator/hooks/hookGating.d.ts +28 -0
- package/dist/operator/hooks/hookGating.d.ts.map +1 -0
- package/dist/operator/hooks/hookGating.js +61 -0
- package/dist/operator/hooks/hookGating.js.map +1 -0
- package/dist/operator/hooks/hooks.d.ts +20 -0
- package/dist/operator/hooks/hooks.d.ts.map +1 -0
- package/dist/operator/hooks/hooks.js +124 -0
- package/dist/operator/hooks/hooks.js.map +1 -0
- package/dist/operator/hooks/toolGuardHooks.d.ts +86 -0
- package/dist/operator/hooks/toolGuardHooks.d.ts.map +1 -0
- package/dist/operator/hooks/toolGuardHooks.js +163 -0
- package/dist/operator/hooks/toolGuardHooks.js.map +1 -0
- package/dist/operator/hud.d.ts +115 -0
- package/dist/operator/hud.d.ts.map +1 -0
- package/dist/operator/hud.js +229 -0
- package/dist/operator/hud.js.map +1 -0
- package/dist/operator/missions.d.ts +125 -0
- package/dist/operator/missions.d.ts.map +1 -0
- package/dist/operator/missions.js +304 -0
- package/dist/operator/missions.js.map +1 -0
- package/dist/operator/operatorCore.d.ts +11 -0
- package/dist/operator/operatorCore.d.ts.map +1 -0
- package/dist/operator/operatorCore.js +9 -0
- package/dist/operator/operatorCore.js.map +1 -0
- package/dist/operator/operatorRuntimeCore.d.ts +17 -0
- package/dist/operator/operatorRuntimeCore.d.ts.map +1 -0
- package/dist/operator/operatorRuntimeCore.js +17 -0
- package/dist/operator/operatorRuntimeCore.js.map +1 -0
- package/dist/operator/runtime.d.ts +74 -0
- package/dist/operator/runtime.d.ts.map +1 -0
- package/dist/operator/runtime.js +357 -0
- package/dist/operator/runtime.js.map +1 -0
- package/dist/shared/core/bootstrap.d.ts +16 -0
- package/dist/shared/core/bootstrap.d.ts.map +1 -0
- package/dist/shared/core/bootstrap.js +77 -0
- package/dist/shared/core/bootstrap.js.map +1 -0
- package/dist/shared/core/contract.d.ts +71 -0
- package/dist/shared/core/contract.d.ts.map +1 -0
- package/dist/shared/core/contract.js +452 -0
- package/dist/shared/core/contract.js.map +1 -0
- package/dist/shared/core/events.d.ts +57 -0
- package/dist/shared/core/events.d.ts.map +1 -0
- package/dist/shared/core/events.js +36 -0
- package/dist/shared/core/events.js.map +1 -0
- package/dist/shared/core/jobs.d.ts +46 -0
- package/dist/shared/core/jobs.d.ts.map +1 -0
- package/dist/shared/core/jobs.js +137 -0
- package/dist/shared/core/jobs.js.map +1 -0
- package/dist/shared/core/json.d.ts +12 -0
- package/dist/shared/core/json.d.ts.map +1 -0
- package/dist/shared/core/json.js +52 -0
- package/dist/shared/core/json.js.map +1 -0
- package/dist/shared/core/layoutMigration.d.ts +11 -0
- package/dist/shared/core/layoutMigration.d.ts.map +1 -0
- package/dist/shared/core/layoutMigration.js +56 -0
- package/dist/shared/core/layoutMigration.js.map +1 -0
- package/dist/shared/core/lifecycle.d.ts +61 -0
- package/dist/shared/core/lifecycle.d.ts.map +1 -0
- package/dist/shared/core/lifecycle.js +123 -0
- package/dist/shared/core/lifecycle.js.map +1 -0
- package/dist/shared/core/packagePaths.d.ts +2 -0
- package/dist/shared/core/packagePaths.d.ts.map +1 -0
- package/dist/shared/core/packagePaths.js +9 -0
- package/dist/shared/core/packagePaths.js.map +1 -0
- package/dist/shared/core/terminology.d.ts +38 -0
- package/dist/shared/core/terminology.d.ts.map +1 -0
- package/dist/shared/core/terminology.js +54 -0
- package/dist/shared/core/terminology.js.map +1 -0
- package/dist/shared/core/types.d.ts +30 -0
- package/dist/shared/core/types.d.ts.map +1 -0
- package/dist/shared/core/types.js +2 -0
- package/dist/shared/core/types.js.map +1 -0
- package/dist/shared/diagnostics/doctor.d.ts +19 -0
- package/dist/shared/diagnostics/doctor.d.ts.map +1 -0
- package/dist/shared/diagnostics/doctor.js +82 -0
- package/dist/shared/diagnostics/doctor.js.map +1 -0
- package/dist/shared/diagnostics/hostRollout.d.ts +16 -0
- package/dist/shared/diagnostics/hostRollout.d.ts.map +1 -0
- package/dist/shared/diagnostics/hostRollout.js +78 -0
- package/dist/shared/diagnostics/hostRollout.js.map +1 -0
- package/dist/shared/observability/emit.d.ts +3 -0
- package/dist/shared/observability/emit.d.ts.map +1 -0
- package/dist/shared/observability/emit.js +17 -0
- package/dist/shared/observability/emit.js.map +1 -0
- package/dist/shared/observability/testWorkspace.d.ts +4 -0
- package/dist/shared/observability/testWorkspace.d.ts.map +1 -0
- package/dist/shared/observability/testWorkspace.js +35 -0
- package/dist/shared/observability/testWorkspace.js.map +1 -0
- package/dist/shared/state/installRegistry.d.ts +22 -0
- package/dist/shared/state/installRegistry.d.ts.map +1 -0
- package/dist/shared/state/installRegistry.js +51 -0
- package/dist/shared/state/installRegistry.js.map +1 -0
- package/dist/shared/state/session.d.ts +18 -0
- package/dist/shared/state/session.d.ts.map +1 -0
- package/dist/shared/state/session.js +127 -0
- package/dist/shared/state/session.js.map +1 -0
- package/dist/shared/state/state.d.ts +16 -0
- package/dist/shared/state/state.d.ts.map +1 -0
- package/dist/shared/state/state.js +91 -0
- package/dist/shared/state/state.js.map +1 -0
- package/dist/shared/state/tasks.d.ts +113 -0
- package/dist/shared/state/tasks.d.ts.map +1 -0
- package/dist/shared/state/tasks.js +274 -0
- package/dist/shared/state/tasks.js.map +1 -0
- package/dist/shared/workflow/activation/activeSkill.d.ts +46 -0
- package/dist/shared/workflow/activation/activeSkill.d.ts.map +1 -0
- package/dist/shared/workflow/activation/activeSkill.js +158 -0
- package/dist/shared/workflow/activation/activeSkill.js.map +1 -0
- package/dist/shared/workflow/activation/gateProfiles.d.ts +26 -0
- package/dist/shared/workflow/activation/gateProfiles.d.ts.map +1 -0
- package/dist/shared/workflow/activation/gateProfiles.js +102 -0
- package/dist/shared/workflow/activation/gateProfiles.js.map +1 -0
- package/dist/shared/workflow/activation/modeMatrix.d.ts +28 -0
- package/dist/shared/workflow/activation/modeMatrix.d.ts.map +1 -0
- package/dist/shared/workflow/activation/modeMatrix.js +91 -0
- package/dist/shared/workflow/activation/modeMatrix.js.map +1 -0
- package/dist/shared/workflow/activation/skillActivation.d.ts +74 -0
- package/dist/shared/workflow/activation/skillActivation.d.ts.map +1 -0
- package/dist/shared/workflow/activation/skillActivation.js +485 -0
- package/dist/shared/workflow/activation/skillActivation.js.map +1 -0
- package/dist/shared/workflow/activation/skillVariant.d.ts +18 -0
- package/dist/shared/workflow/activation/skillVariant.d.ts.map +1 -0
- package/dist/shared/workflow/activation/skillVariant.js +44 -0
- package/dist/shared/workflow/activation/skillVariant.js.map +1 -0
- package/dist/shared/workflow/authority/authority.d.ts +34 -0
- package/dist/shared/workflow/authority/authority.d.ts.map +1 -0
- package/dist/shared/workflow/authority/authority.js +64 -0
- package/dist/shared/workflow/authority/authority.js.map +1 -0
- package/dist/shared/workflow/closure/closureManifest.d.ts +39 -0
- package/dist/shared/workflow/closure/closureManifest.d.ts.map +1 -0
- package/dist/shared/workflow/closure/closureManifest.js +62 -0
- package/dist/shared/workflow/closure/closureManifest.js.map +1 -0
- package/dist/shared/workflow/closure/closureRequirements.d.ts +12 -0
- package/dist/shared/workflow/closure/closureRequirements.d.ts.map +1 -0
- package/dist/shared/workflow/closure/closureRequirements.js +30 -0
- package/dist/shared/workflow/closure/closureRequirements.js.map +1 -0
- package/dist/shared/workflow/closure/contractParity.d.ts +24 -0
- package/dist/shared/workflow/closure/contractParity.d.ts.map +1 -0
- package/dist/shared/workflow/closure/contractParity.js +238 -0
- package/dist/shared/workflow/closure/contractParity.js.map +1 -0
- package/dist/shared/workflow/closure/contractParityContext.d.ts +8 -0
- package/dist/shared/workflow/closure/contractParityContext.d.ts.map +1 -0
- package/dist/shared/workflow/closure/contractParityContext.js +50 -0
- package/dist/shared/workflow/closure/contractParityContext.js.map +1 -0
- package/dist/shared/workflow/closure/scopeGuard.d.ts +11 -0
- package/dist/shared/workflow/closure/scopeGuard.d.ts.map +1 -0
- package/dist/shared/workflow/closure/scopeGuard.js +69 -0
- package/dist/shared/workflow/closure/scopeGuard.js.map +1 -0
- package/dist/shared/workflow/closure/ultragoalArtifact.d.ts +13 -0
- package/dist/shared/workflow/closure/ultragoalArtifact.d.ts.map +1 -0
- package/dist/shared/workflow/closure/ultragoalArtifact.js +31 -0
- package/dist/shared/workflow/closure/ultragoalArtifact.js.map +1 -0
- package/dist/shared/workflow/closure/workflowReconcile.d.ts +70 -0
- package/dist/shared/workflow/closure/workflowReconcile.d.ts.map +1 -0
- package/dist/shared/workflow/closure/workflowReconcile.js +267 -0
- package/dist/shared/workflow/closure/workflowReconcile.js.map +1 -0
- package/dist/shared/workflow/continuation/continuation.d.ts +109 -0
- package/dist/shared/workflow/continuation/continuation.d.ts.map +1 -0
- package/dist/shared/workflow/continuation/continuation.js +550 -0
- package/dist/shared/workflow/continuation/continuation.js.map +1 -0
- package/dist/shared/workflow/continuation/continuationEventReservations.d.ts +17 -0
- package/dist/shared/workflow/continuation/continuationEventReservations.d.ts.map +1 -0
- package/dist/shared/workflow/continuation/continuationEventReservations.js +88 -0
- package/dist/shared/workflow/continuation/continuationEventReservations.js.map +1 -0
- package/dist/shared/workflow/continuation/continuationFollowUp.d.ts +114 -0
- package/dist/shared/workflow/continuation/continuationFollowUp.d.ts.map +1 -0
- package/dist/shared/workflow/continuation/continuationFollowUp.js +330 -0
- package/dist/shared/workflow/continuation/continuationFollowUp.js.map +1 -0
- package/dist/shared/workflow/continuation/continuationOrchestrator.d.ts +66 -0
- package/dist/shared/workflow/continuation/continuationOrchestrator.d.ts.map +1 -0
- package/dist/shared/workflow/continuation/continuationOrchestrator.js +144 -0
- package/dist/shared/workflow/continuation/continuationOrchestrator.js.map +1 -0
- package/dist/shared/workflow/continuation/hookContinuation.d.ts +44 -0
- package/dist/shared/workflow/continuation/hookContinuation.d.ts.map +1 -0
- package/dist/shared/workflow/continuation/hookContinuation.js +85 -0
- package/dist/shared/workflow/continuation/hookContinuation.js.map +1 -0
- package/dist/shared/workflow/continuation/stopPolicy.d.ts +38 -0
- package/dist/shared/workflow/continuation/stopPolicy.d.ts.map +1 -0
- package/dist/shared/workflow/continuation/stopPolicy.js +435 -0
- package/dist/shared/workflow/continuation/stopPolicy.js.map +1 -0
- package/dist/shared/workflow/continuation/stopVerdict.d.ts +31 -0
- package/dist/shared/workflow/continuation/stopVerdict.d.ts.map +1 -0
- package/dist/shared/workflow/continuation/stopVerdict.js +98 -0
- package/dist/shared/workflow/continuation/stopVerdict.js.map +1 -0
- package/dist/shared/workflow/delegation/delegatedSession.d.ts +118 -0
- package/dist/shared/workflow/delegation/delegatedSession.d.ts.map +1 -0
- package/dist/shared/workflow/delegation/delegatedSession.js +496 -0
- package/dist/shared/workflow/delegation/delegatedSession.js.map +1 -0
- package/dist/shared/workflow/delegation/delegationPrompt.d.ts +3 -0
- package/dist/shared/workflow/delegation/delegationPrompt.d.ts.map +1 -0
- package/dist/shared/workflow/delegation/delegationPrompt.js +15 -0
- package/dist/shared/workflow/delegation/delegationPrompt.js.map +1 -0
- package/dist/shared/workflow/delegation/sessionTasks.d.ts +40 -0
- package/dist/shared/workflow/delegation/sessionTasks.d.ts.map +1 -0
- package/dist/shared/workflow/delegation/sessionTasks.js +73 -0
- package/dist/shared/workflow/delegation/sessionTasks.js.map +1 -0
- package/dist/shared/workflow/delegation/subagentRuntime.d.ts +26 -0
- package/dist/shared/workflow/delegation/subagentRuntime.d.ts.map +1 -0
- package/dist/shared/workflow/delegation/subagentRuntime.js +231 -0
- package/dist/shared/workflow/delegation/subagentRuntime.js.map +1 -0
- package/dist/shared/workflow/delivery/adoAuxiliaryRuntime.d.ts +79 -0
- package/dist/shared/workflow/delivery/adoAuxiliaryRuntime.d.ts.map +1 -0
- package/dist/shared/workflow/delivery/adoAuxiliaryRuntime.js +166 -0
- package/dist/shared/workflow/delivery/adoAuxiliaryRuntime.js.map +1 -0
- package/dist/shared/workflow/delivery/finalWave.d.ts +57 -0
- package/dist/shared/workflow/delivery/finalWave.d.ts.map +1 -0
- package/dist/shared/workflow/delivery/finalWave.js +123 -0
- package/dist/shared/workflow/delivery/finalWave.js.map +1 -0
- package/dist/shared/workflow/delivery/lifecyclePushMap.d.ts +68 -0
- package/dist/shared/workflow/delivery/lifecyclePushMap.d.ts.map +1 -0
- package/dist/shared/workflow/delivery/lifecyclePushMap.js +82 -0
- package/dist/shared/workflow/delivery/lifecyclePushMap.js.map +1 -0
- package/dist/shared/workflow/delivery/prSidecar.d.ts +7 -0
- package/dist/shared/workflow/delivery/prSidecar.d.ts.map +1 -0
- package/dist/shared/workflow/delivery/prSidecar.js +4 -0
- package/dist/shared/workflow/delivery/prSidecar.js.map +1 -0
- package/dist/shared/workflow/delivery/reviewStaleness.d.ts +37 -0
- package/dist/shared/workflow/delivery/reviewStaleness.d.ts.map +1 -0
- package/dist/shared/workflow/delivery/reviewStaleness.js +94 -0
- package/dist/shared/workflow/delivery/reviewStaleness.js.map +1 -0
- package/dist/shared/workflow/planning/hyperplan.d.ts +40 -0
- package/dist/shared/workflow/planning/hyperplan.d.ts.map +1 -0
- package/dist/shared/workflow/planning/hyperplan.js +133 -0
- package/dist/shared/workflow/planning/hyperplan.js.map +1 -0
- package/dist/shared/workflow/planning/notepad.d.ts +17 -0
- package/dist/shared/workflow/planning/notepad.d.ts.map +1 -0
- package/dist/shared/workflow/planning/notepad.js +84 -0
- package/dist/shared/workflow/planning/notepad.js.map +1 -0
- package/dist/shared/workflow/planning/planFormat.d.ts +3 -0
- package/dist/shared/workflow/planning/planFormat.d.ts.map +1 -0
- package/dist/shared/workflow/planning/planFormat.js +14 -0
- package/dist/shared/workflow/planning/planFormat.js.map +1 -0
- package/package.json +155 -0
- package/runtime/hooks/_continuation.mjs +2 -0
- package/runtime/hooks/_lib.mjs +2 -0
- package/runtime/hooks/_toolGuards.mjs +2 -0
- package/runtime/hooks/lanes/resolveSkillActivation.mjs +241 -0
- package/runtime/hooks/lanes/user-prompt-submit.mjs +326 -0
- package/runtime/hooks/layout-dir.mjs +2 -0
- package/runtime/hooks/lifecycle/pre-compact.mjs +121 -0
- package/runtime/hooks/lifecycle/session-start.mjs +356 -0
- package/runtime/hooks/lifecycle/stop.mjs +223 -0
- package/runtime/hooks/observability.mjs +2 -0
- package/runtime/hooks/post-tool-use-failure.mjs +5 -0
- package/runtime/hooks/post-tool-use.mjs +4 -0
- package/runtime/hooks/pre-compact.mjs +4 -0
- package/runtime/hooks/pre-tool-use.mjs +4 -0
- package/runtime/hooks/resolveSkillActivation.mjs +4 -0
- package/runtime/hooks/root-dir.mjs +2 -0
- package/runtime/hooks/session-start.mjs +4 -0
- package/runtime/hooks/shared/_continuation.mjs +341 -0
- package/runtime/hooks/shared/_lib.mjs +60 -0
- package/runtime/hooks/shared/_toolGuards.mjs +237 -0
- package/runtime/hooks/shared/config.mjs +143 -0
- package/runtime/hooks/shared/layout-dir.mjs +12 -0
- package/runtime/hooks/shared/observability.mjs +257 -0
- package/runtime/hooks/shared/root-dir.mjs +9 -0
- package/runtime/hooks/stop.mjs +4 -0
- package/runtime/hooks/subagent-tracker.mjs +4 -0
- package/runtime/hooks/subagents/subagent-tracker.mjs +106 -0
- package/runtime/hooks/tools/post-tool-use-failure.mjs +251 -0
- package/runtime/hooks/tools/post-tool-use.mjs +205 -0
- package/runtime/hooks/tools/pre-tool-use.mjs +268 -0
- package/runtime/hooks/user-prompt-submit.mjs +4 -0
package/dist/mcp/cli.js
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { applySetup } from '../shared/core/bootstrap.js';
|
|
2
|
+
import { resolveOperatorRoot } from '../shared/core/contract.js';
|
|
3
|
+
import { runDoctor } from '../shared/diagnostics/doctor.js';
|
|
4
|
+
function cliIoDefault() {
|
|
5
|
+
return {
|
|
6
|
+
stdout: (text) => process.stdout.write(text),
|
|
7
|
+
stderr: (text) => process.stderr.write(text),
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function operatorCliUsage() {
|
|
11
|
+
return [
|
|
12
|
+
'usage: enact-operator <command> [options]',
|
|
13
|
+
'',
|
|
14
|
+
'Commands:',
|
|
15
|
+
' setup Initialize the Operator layout in the current repo',
|
|
16
|
+
' doctor Run Operator health checks',
|
|
17
|
+
' hook Internal runtime hook dispatch',
|
|
18
|
+
'',
|
|
19
|
+
'Setup options:',
|
|
20
|
+
' --root <path> Override operator root',
|
|
21
|
+
' --codex-home <path> Override codex home for setup bookkeeping',
|
|
22
|
+
' --force Force setup behavior where supported',
|
|
23
|
+
' --dry-run Preview setup actions without mutating state',
|
|
24
|
+
' --json Emit JSON',
|
|
25
|
+
'',
|
|
26
|
+
'Doctor options:',
|
|
27
|
+
' --root <path> Override operator root',
|
|
28
|
+
' --json Emit JSON',
|
|
29
|
+
'',
|
|
30
|
+
'General:',
|
|
31
|
+
' -v, --version Print version and exit',
|
|
32
|
+
' -h, --help Show this help',
|
|
33
|
+
'',
|
|
34
|
+
].join('\n');
|
|
35
|
+
}
|
|
36
|
+
function parseCliFlags(args) {
|
|
37
|
+
const parsed = {};
|
|
38
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
39
|
+
const arg = args[index];
|
|
40
|
+
switch (arg) {
|
|
41
|
+
case '--root':
|
|
42
|
+
if (typeof args[index + 1] !== 'string' || args[index + 1].trim() === '') {
|
|
43
|
+
throw new Error('Missing value for --root');
|
|
44
|
+
}
|
|
45
|
+
parsed.root = args[index + 1];
|
|
46
|
+
index += 1;
|
|
47
|
+
break;
|
|
48
|
+
case '--codex-home':
|
|
49
|
+
if (typeof args[index + 1] !== 'string' || args[index + 1].trim() === '') {
|
|
50
|
+
throw new Error('Missing value for --codex-home');
|
|
51
|
+
}
|
|
52
|
+
parsed.codexHome = args[index + 1];
|
|
53
|
+
index += 1;
|
|
54
|
+
break;
|
|
55
|
+
case '--force':
|
|
56
|
+
parsed.force = true;
|
|
57
|
+
break;
|
|
58
|
+
case '--dry-run':
|
|
59
|
+
parsed.dryRun = true;
|
|
60
|
+
break;
|
|
61
|
+
case '--json':
|
|
62
|
+
parsed.json = true;
|
|
63
|
+
break;
|
|
64
|
+
case '-h':
|
|
65
|
+
case '--help':
|
|
66
|
+
parsed.help = true;
|
|
67
|
+
break;
|
|
68
|
+
default:
|
|
69
|
+
throw new Error(`Unknown option: ${arg}`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return parsed;
|
|
73
|
+
}
|
|
74
|
+
function formatSetupResultCli(result) {
|
|
75
|
+
const lines = [
|
|
76
|
+
`root: ${result.root}`,
|
|
77
|
+
`codexHome: ${result.codexHome}`,
|
|
78
|
+
`layoutPath: ${result.layoutPath}`,
|
|
79
|
+
`dryRun: ${result.dryRun ? 'true' : 'false'}`,
|
|
80
|
+
`syncedTasks: ${result.syncedTasks}`,
|
|
81
|
+
];
|
|
82
|
+
if (result.plannedActions?.length) {
|
|
83
|
+
lines.push('plannedActions:');
|
|
84
|
+
for (const action of result.plannedActions) {
|
|
85
|
+
lines.push(` - ${action}`);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return `${lines.join('\n')}\n`;
|
|
89
|
+
}
|
|
90
|
+
function formatDoctorReportCli(report) {
|
|
91
|
+
const lines = [
|
|
92
|
+
`summary: passed=${report.summary.passed} warnings=${report.summary.warnings} failed=${report.summary.failed}`,
|
|
93
|
+
'checks:',
|
|
94
|
+
];
|
|
95
|
+
for (const check of report.checks) {
|
|
96
|
+
const badge = check.level === 'pass' ? 'PASS' : check.level === 'warn' ? 'WARN' : 'FAIL';
|
|
97
|
+
lines.push(` - [${badge}] ${check.name}: ${check.detail}`);
|
|
98
|
+
}
|
|
99
|
+
return `${lines.join('\n')}\n`;
|
|
100
|
+
}
|
|
101
|
+
export function handleCliSubcommand(argv, io = cliIoDefault()) {
|
|
102
|
+
const [command, ...rest] = argv;
|
|
103
|
+
if (!command) {
|
|
104
|
+
return { handled: false, exitCode: 0 };
|
|
105
|
+
}
|
|
106
|
+
if (command === '-h' || command === '--help' || command === 'help') {
|
|
107
|
+
io.stdout(operatorCliUsage());
|
|
108
|
+
return { handled: true, exitCode: 0 };
|
|
109
|
+
}
|
|
110
|
+
if (command !== 'setup' && command !== 'doctor') {
|
|
111
|
+
return { handled: false, exitCode: 0 };
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
const flags = parseCliFlags(rest);
|
|
115
|
+
if (flags.help) {
|
|
116
|
+
io.stdout(operatorCliUsage());
|
|
117
|
+
return { handled: true, exitCode: 0 };
|
|
118
|
+
}
|
|
119
|
+
if (command === 'setup') {
|
|
120
|
+
const result = applySetup({
|
|
121
|
+
root: flags.root,
|
|
122
|
+
codexHome: flags.codexHome,
|
|
123
|
+
force: flags.force,
|
|
124
|
+
dryRun: flags.dryRun,
|
|
125
|
+
});
|
|
126
|
+
io.stdout(flags.json ? `${JSON.stringify(result, null, 2)}\n` : formatSetupResultCli(result));
|
|
127
|
+
return { handled: true, exitCode: 0 };
|
|
128
|
+
}
|
|
129
|
+
const root = resolveOperatorRoot(flags.root);
|
|
130
|
+
const report = runDoctor(root);
|
|
131
|
+
io.stdout(flags.json ? `${JSON.stringify(report, null, 2)}\n` : formatDoctorReportCli(report));
|
|
132
|
+
return { handled: true, exitCode: report.summary.failed > 0 ? 1 : 0 };
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
136
|
+
io.stderr(`${message}\n\n${operatorCliUsage()}`);
|
|
137
|
+
return { handled: true, exitCode: 2 };
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/mcp/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAqB3D,SAAS,YAAY;IACnB,OAAO;QACL,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;QACpD,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;KACrD,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB;IACvB,OAAO;QACL,2CAA2C;QAC3C,EAAE;QACF,WAAW;QACX,iEAAi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AG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,EAAE,CAAC,MAAM,CAAC,GAAG,OAAO,OAAO,gBAAgB,EAAE,EAAE,CAAC,CAAC;QACjD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IACxC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type LaneToolContext, type LaneToolResult } from '../mcp/laneSupport.js';
|
|
2
|
+
import type { ToolDefinition } from '../mcp/toolPartitions.js';
|
|
3
|
+
export declare const continuationToolDefinitions: ToolDefinition[];
|
|
4
|
+
export declare function handleContinuationTool(name: string, context: LaneToolContext): Promise<LaneToolResult>;
|
|
5
|
+
//# sourceMappingURL=continuation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuation.d.ts","sourceRoot":"","sources":["../../src/mcp/continuation.ts"],"names":[],"mappings":"AAUA,OAAO,EAAW,KAAK,eAAe,EAAE,KAAK,cAAc,EAAa,MAAM,sBAAsB,CAAC;AACrG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAK9D,eAAO,MAAM,2BAA2B,EAAE,cAAc,EA4KvD,CAAC;AAEF,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CAyK5G"}
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import { appendLedger } from '../operator/runtime.js';
|
|
2
|
+
import { createEvidenceHorizon } from '../shared/core/events.js';
|
|
3
|
+
import { layoutPath } from '../shared/core/contract.js';
|
|
4
|
+
import { detectStaleDelegatedSessions, listDelegatedSessions, buildDelegatedSessionResumePlan, orphanDelegatedSession, refreshDelegatedSessionFollowUp, delegatedSessionStatusSummary } from '../shared/workflow/delegation/delegatedSession.js';
|
|
5
|
+
import { readLogicalIdleStatus, readContinuationState, clearContinuationState } from '../shared/workflow/continuation/continuation.js';
|
|
6
|
+
import { readContinuationFollowUpQueue, acknowledgeContinuationFollowUp } from '../shared/workflow/continuation/continuationFollowUp.js';
|
|
7
|
+
import { writeStopVerdict, readStopVerdict, markStopVerdictAcknowledged } from '../shared/workflow/continuation/stopVerdict.js';
|
|
8
|
+
import { evaluateStopPolicy } from '../shared/workflow/continuation/stopPolicy.js';
|
|
9
|
+
import { readSubagentRuntimeState } from '../shared/workflow/delegation/subagentRuntime.js';
|
|
10
|
+
import { readOperatorAuthority } from '../shared/workflow/authority/authority.js';
|
|
11
|
+
import { handled, UNHANDLED } from '../mcp/laneSupport.js';
|
|
12
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
13
|
+
import { dirname } from 'node:path';
|
|
14
|
+
import { randomUUID } from 'node:crypto';
|
|
15
|
+
export const continuationToolDefinitions = [
|
|
16
|
+
{
|
|
17
|
+
name: 'operator_stop_evaluate',
|
|
18
|
+
description: 'Phase 7: Pure dry-run stop-policy evaluation. Returns current StopVerdict without writing to disk. Use before stopping to check if stop would be allowed.',
|
|
19
|
+
inputSchema: {
|
|
20
|
+
type: 'object',
|
|
21
|
+
properties: {
|
|
22
|
+
root: { type: 'string' },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'operator_stop_acknowledge',
|
|
28
|
+
description: 'Phase 7: Operator override — write an allow verdict with blockerCategory=closure-evidence-missing and record reason in ledger. Use as explicit escape hatch when policy would deny.',
|
|
29
|
+
inputSchema: {
|
|
30
|
+
type: 'object',
|
|
31
|
+
properties: {
|
|
32
|
+
root: { type: 'string' },
|
|
33
|
+
reason: { type: 'string', description: 'Explicit reason for overriding the stop policy.' },
|
|
34
|
+
},
|
|
35
|
+
required: ['reason'],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'operator_stop_verdict_status',
|
|
40
|
+
description: 'Phase 7: Returns the latest stop verdict and whether it has been acknowledged by a later session-start.',
|
|
41
|
+
inputSchema: {
|
|
42
|
+
type: 'object',
|
|
43
|
+
properties: {
|
|
44
|
+
root: { type: 'string' },
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'operator_continuation_status',
|
|
50
|
+
description: 'Returns the current owned continuation controller state (blocked/cleared lifecycle, resume hints, recommended tools). See also operator_continuation_followup_status for the Phase 1 reinjection queue.',
|
|
51
|
+
inputSchema: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
properties: {
|
|
54
|
+
root: { type: 'string' },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'operator_continuation_clear',
|
|
60
|
+
description: 'Explicitly clear the current continuation controller state with an audit reason. Also acknowledges continuation follow-up queue entries for the active lane/session when progress is recorded. Use when the operator intentionally restarts or overrides the blocked continuation flow.',
|
|
61
|
+
inputSchema: {
|
|
62
|
+
type: 'object',
|
|
63
|
+
properties: {
|
|
64
|
+
root: { type: 'string' },
|
|
65
|
+
reason: { type: 'string' },
|
|
66
|
+
},
|
|
67
|
+
required: ['reason'],
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'operator_continuation_followup_status',
|
|
72
|
+
description: 'Returns the Phase 1 continuation follow-up reinjection queue: items, per-status counts, and durable replay state under .enact/operator/state/continuation-follow-up-queue.json.',
|
|
73
|
+
inputSchema: {
|
|
74
|
+
type: 'object',
|
|
75
|
+
properties: {
|
|
76
|
+
root: { type: 'string' },
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'operator_continuation_followup_ack',
|
|
82
|
+
description: 'Acknowledge one or more continuation follow-up queue entries (operator or progress path). Pass followUpId to ack a single item; dedupeKey for a specific queue row; continuationId to ack all queued/replayed items tagged with that delegated continuation id; or omit all three to ack all active follow-ups for the lane + session inferred from continuation-state.json.',
|
|
83
|
+
inputSchema: {
|
|
84
|
+
type: 'object',
|
|
85
|
+
properties: {
|
|
86
|
+
root: { type: 'string' },
|
|
87
|
+
followUpId: { type: 'string', description: 'Optional. When omitted, acks all active follow-ups for the lane + session inferred from continuation-state.json.' },
|
|
88
|
+
dedupeKey: { type: 'string', description: 'Optional. Ack a single queued/replayed item by its dedupeKey (e.g. team-message or subagent-stop keys).' },
|
|
89
|
+
continuationId: { type: 'string', description: 'Optional (Phase 3). Ack all queued/replayed follow-ups whose metadata.continuationId matches this delegated-session id.' },
|
|
90
|
+
reason: { type: 'string', description: 'Required audit reason.' },
|
|
91
|
+
},
|
|
92
|
+
required: ['reason'],
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'operator_idle_status',
|
|
97
|
+
description: 'Phase 2: Returns Operator-owned logical idle status derived from last real activity timestamps rather than host SessionIdle emission alone.',
|
|
98
|
+
inputSchema: {
|
|
99
|
+
type: 'object',
|
|
100
|
+
properties: {
|
|
101
|
+
root: { type: 'string' },
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'operator_subagent_runtime_status',
|
|
107
|
+
description: 'Phase 2: Returns durable subagent lifecycle registry from .enact/operator/state/subagent-runtime.json (child ids, parent session, status, follow-up linkage).',
|
|
108
|
+
inputSchema: {
|
|
109
|
+
type: 'object',
|
|
110
|
+
properties: {
|
|
111
|
+
root: { type: 'string' },
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'operator_delegated_session_status',
|
|
117
|
+
description: 'Phase 3: Lists delegated-session registry under state/delegated-sessions.json (stable continuation ids for subagents, team executors, and autopilot lane delegations). Runs stale detection before returning.',
|
|
118
|
+
inputSchema: {
|
|
119
|
+
type: 'object',
|
|
120
|
+
properties: {
|
|
121
|
+
root: { type: 'string' },
|
|
122
|
+
continuationId: { type: 'string' },
|
|
123
|
+
kind: { type: 'string', enum: ['subagent', 'team_executor', 'lane_delegation'] },
|
|
124
|
+
status: { type: 'string', enum: ['active', 'completed', 'failed', 'stale', 'orphaned'] },
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: 'operator_delegated_session_resume',
|
|
130
|
+
description: 'Phase 3: Read-only resume plan for a delegated continuation id (recommended MCP tools; does not spawn host processes). Optional refreshFollowUp re-queues a recovery-class follow-up tied to the session.',
|
|
131
|
+
inputSchema: {
|
|
132
|
+
type: 'object',
|
|
133
|
+
properties: {
|
|
134
|
+
root: { type: 'string' },
|
|
135
|
+
continuationId: { type: 'string', description: 'deleg_* id from delegated-session registry.' },
|
|
136
|
+
refreshFollowUp: { type: 'boolean', description: 'When true, enqueue or refresh the deleg-scoped recovery follow-up.' },
|
|
137
|
+
},
|
|
138
|
+
required: ['continuationId'],
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: 'operator_delegated_session_orphan',
|
|
143
|
+
description: 'Phase 3: Mark a delegated session orphaned with operator-visible inbox remediation (does not terminate OS processes).',
|
|
144
|
+
inputSchema: {
|
|
145
|
+
type: 'object',
|
|
146
|
+
properties: {
|
|
147
|
+
root: { type: 'string' },
|
|
148
|
+
continuationId: { type: 'string' },
|
|
149
|
+
reason: { type: 'string' },
|
|
150
|
+
by: { type: 'string' },
|
|
151
|
+
},
|
|
152
|
+
required: ['continuationId', 'reason'],
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: 'operator_review_handoff_create',
|
|
157
|
+
description: 'Phase 7: Additive write — record an executor->reviewer handoff artifact. Does NOT auto-advance any state. First executor->reviewer artifact for future Phase 7C work.',
|
|
158
|
+
inputSchema: {
|
|
159
|
+
type: 'object',
|
|
160
|
+
properties: {
|
|
161
|
+
root: { type: 'string' },
|
|
162
|
+
fromExecutor: { type: 'string', description: 'Executor agent/lane ID handing off.' },
|
|
163
|
+
toReviewer: { type: 'string', description: 'Reviewer agent/lane ID to receive.' },
|
|
164
|
+
taskId: { type: 'string', description: 'Internal task being handed off.' },
|
|
165
|
+
},
|
|
166
|
+
required: ['fromExecutor', 'toReviewer', 'taskId'],
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'operator_review_handoff_status',
|
|
171
|
+
description: 'Phase 7: Read the current executor->reviewer handoff state.',
|
|
172
|
+
inputSchema: {
|
|
173
|
+
type: 'object',
|
|
174
|
+
properties: {
|
|
175
|
+
root: { type: 'string' },
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
];
|
|
180
|
+
export async function handleContinuationTool(name, context) {
|
|
181
|
+
const { root, args } = context;
|
|
182
|
+
switch (name) {
|
|
183
|
+
case 'operator_stop_evaluate': {
|
|
184
|
+
const authority = readOperatorAuthority(root);
|
|
185
|
+
return handled(evaluateStopPolicy({ authority, root }));
|
|
186
|
+
}
|
|
187
|
+
case 'operator_stop_acknowledge': {
|
|
188
|
+
const reason = typeof args.reason === 'string' ? args.reason : 'operator-override';
|
|
189
|
+
const evidenceHorizon = createEvidenceHorizon(root);
|
|
190
|
+
const overrideVerdict = {
|
|
191
|
+
outcome: 'allow',
|
|
192
|
+
reasons: [{ lane: 'session', blocker: 'operator-override', blockerCategory: 'closure-evidence-missing' }],
|
|
193
|
+
capturedAt: new Date().toISOString(),
|
|
194
|
+
evidenceHorizon,
|
|
195
|
+
transportCanBlock: false,
|
|
196
|
+
};
|
|
197
|
+
const written = writeStopVerdict(root, overrideVerdict);
|
|
198
|
+
markStopVerdictAcknowledged(root, reason);
|
|
199
|
+
appendLedger(root, {
|
|
200
|
+
kind: 'stop_verdict',
|
|
201
|
+
action: 'stop_operator_override',
|
|
202
|
+
detail: `Operator acknowledged stop policy with reason: ${reason}`,
|
|
203
|
+
metadata: { reason, capturedAt: overrideVerdict.capturedAt },
|
|
204
|
+
});
|
|
205
|
+
return handled({ acknowledged: true, reason, verdict: written });
|
|
206
|
+
}
|
|
207
|
+
case 'operator_stop_verdict_status': {
|
|
208
|
+
const verdict = readStopVerdict(root);
|
|
209
|
+
if (verdict === null)
|
|
210
|
+
return handled({ verdict: null, acknowledged: null, exists: false });
|
|
211
|
+
return handled({
|
|
212
|
+
exists: true,
|
|
213
|
+
verdict,
|
|
214
|
+
acknowledged: Boolean(verdict.acknowledgedAt),
|
|
215
|
+
acknowledgedAt: verdict.acknowledgedAt ?? null,
|
|
216
|
+
acknowledgedReason: verdict.acknowledgedReason ?? null,
|
|
217
|
+
continuation: readContinuationState(root),
|
|
218
|
+
logicalIdle: readLogicalIdleStatus(root),
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
case 'operator_continuation_status':
|
|
222
|
+
return handled(readContinuationState(root));
|
|
223
|
+
case 'operator_continuation_clear': {
|
|
224
|
+
const reason = typeof args.reason === 'string' ? args.reason : 'operator-clear';
|
|
225
|
+
return handled(clearContinuationState(root, reason, 'operator_continuation_clear'));
|
|
226
|
+
}
|
|
227
|
+
case 'operator_continuation_followup_status':
|
|
228
|
+
return handled(readContinuationFollowUpQueue(root));
|
|
229
|
+
case 'operator_continuation_followup_ack': {
|
|
230
|
+
const reason = typeof args.reason === 'string' ? args.reason : '';
|
|
231
|
+
if (!reason.trim()) {
|
|
232
|
+
throw new Error('operator_continuation_followup_ack: reason is required');
|
|
233
|
+
}
|
|
234
|
+
const followUpId = typeof args.followUpId === 'string' ? args.followUpId : undefined;
|
|
235
|
+
const dedupeKey = typeof args.dedupeKey === 'string' ? args.dedupeKey : undefined;
|
|
236
|
+
const continuationId = typeof args.continuationId === 'string' ? args.continuationId : undefined;
|
|
237
|
+
if (followUpId) {
|
|
238
|
+
return handled(acknowledgeContinuationFollowUp(root, {
|
|
239
|
+
followUpId,
|
|
240
|
+
reason,
|
|
241
|
+
source: 'operator_continuation_followup_ack',
|
|
242
|
+
}));
|
|
243
|
+
}
|
|
244
|
+
if (dedupeKey) {
|
|
245
|
+
return handled(acknowledgeContinuationFollowUp(root, {
|
|
246
|
+
dedupeKey,
|
|
247
|
+
reason,
|
|
248
|
+
source: 'operator_continuation_followup_ack',
|
|
249
|
+
}));
|
|
250
|
+
}
|
|
251
|
+
if (continuationId) {
|
|
252
|
+
return handled(acknowledgeContinuationFollowUp(root, {
|
|
253
|
+
continuationId,
|
|
254
|
+
reason,
|
|
255
|
+
source: 'operator_continuation_followup_ack',
|
|
256
|
+
}));
|
|
257
|
+
}
|
|
258
|
+
const continuation = readContinuationState(root);
|
|
259
|
+
return handled(acknowledgeContinuationFollowUp(root, {
|
|
260
|
+
lane: continuation.lane,
|
|
261
|
+
sessionId: continuation.lastSessionId,
|
|
262
|
+
reason,
|
|
263
|
+
source: 'operator_continuation_followup_ack',
|
|
264
|
+
}));
|
|
265
|
+
}
|
|
266
|
+
case 'operator_delegated_session_status': {
|
|
267
|
+
detectStaleDelegatedSessions(root, {});
|
|
268
|
+
const validKinds = new Set(['subagent', 'team_executor', 'lane_delegation']);
|
|
269
|
+
const validStatuses = new Set(['active', 'completed', 'failed', 'stale', 'orphaned']);
|
|
270
|
+
const kind = typeof args.kind === 'string' && validKinds.has(args.kind)
|
|
271
|
+
? args.kind
|
|
272
|
+
: undefined;
|
|
273
|
+
const status = typeof args.status === 'string' && validStatuses.has(args.status)
|
|
274
|
+
? args.status
|
|
275
|
+
: undefined;
|
|
276
|
+
const continuationId = typeof args.continuationId === 'string' ? args.continuationId : undefined;
|
|
277
|
+
return handled({
|
|
278
|
+
summary: delegatedSessionStatusSummary(root),
|
|
279
|
+
sessions: listDelegatedSessions(root, { continuationId, kind, status }),
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
case 'operator_delegated_session_resume': {
|
|
283
|
+
const continuationId = String(args.continuationId ?? '').trim();
|
|
284
|
+
if (!continuationId) {
|
|
285
|
+
throw new Error('operator_delegated_session_resume: continuationId is required');
|
|
286
|
+
}
|
|
287
|
+
const plan = buildDelegatedSessionResumePlan(root, continuationId);
|
|
288
|
+
const refreshFollowUp = args.refreshFollowUp === true;
|
|
289
|
+
const refresh = refreshFollowUp ? refreshDelegatedSessionFollowUp(root, continuationId) : null;
|
|
290
|
+
return handled({ plan, refreshFollowUp: refresh });
|
|
291
|
+
}
|
|
292
|
+
case 'operator_delegated_session_orphan': {
|
|
293
|
+
const continuationId = String(args.continuationId ?? '').trim();
|
|
294
|
+
const reason = typeof args.reason === 'string' ? args.reason : '';
|
|
295
|
+
if (!continuationId)
|
|
296
|
+
throw new Error('operator_delegated_session_orphan: continuationId is required');
|
|
297
|
+
if (!reason.trim())
|
|
298
|
+
throw new Error('operator_delegated_session_orphan: reason is required');
|
|
299
|
+
return handled({ session: orphanDelegatedSession(root, {
|
|
300
|
+
continuationId,
|
|
301
|
+
reason,
|
|
302
|
+
by: typeof args.by === 'string' ? args.by : undefined,
|
|
303
|
+
}) });
|
|
304
|
+
}
|
|
305
|
+
case 'operator_subagent_runtime_status':
|
|
306
|
+
return handled(readSubagentRuntimeState(root));
|
|
307
|
+
case 'operator_idle_status':
|
|
308
|
+
return handled(readLogicalIdleStatus(root));
|
|
309
|
+
case 'operator_review_handoff_create': {
|
|
310
|
+
const fromExecutor = String(args.fromExecutor);
|
|
311
|
+
const toReviewer = String(args.toReviewer);
|
|
312
|
+
const taskId = String(args.taskId);
|
|
313
|
+
const handoffPath = layoutPath(root, 'state', 'review-handoff.json');
|
|
314
|
+
let existing = [];
|
|
315
|
+
if (existsSync(handoffPath)) {
|
|
316
|
+
try {
|
|
317
|
+
existing = JSON.parse(readFileSync(handoffPath, 'utf8'));
|
|
318
|
+
}
|
|
319
|
+
catch {
|
|
320
|
+
existing = [];
|
|
321
|
+
}
|
|
322
|
+
if (!Array.isArray(existing))
|
|
323
|
+
existing = [];
|
|
324
|
+
}
|
|
325
|
+
const entry = {
|
|
326
|
+
id: `handoff_${randomUUID().slice(0, 12)}`,
|
|
327
|
+
fromExecutor,
|
|
328
|
+
toReviewer,
|
|
329
|
+
taskId,
|
|
330
|
+
createdAt: new Date().toISOString(),
|
|
331
|
+
};
|
|
332
|
+
existing.push(entry);
|
|
333
|
+
mkdirSync(dirname(handoffPath), { recursive: true });
|
|
334
|
+
writeFileSync(handoffPath, JSON.stringify(existing, null, 2), 'utf8');
|
|
335
|
+
appendLedger(root, {
|
|
336
|
+
kind: 'executor',
|
|
337
|
+
action: 'review_handoff_created',
|
|
338
|
+
detail: `Executor "${fromExecutor}" handed off task "${taskId}" to reviewer "${toReviewer}"`,
|
|
339
|
+
taskId,
|
|
340
|
+
metadata: { fromExecutor, toReviewer, taskId, handoffId: entry.id },
|
|
341
|
+
});
|
|
342
|
+
return handled({ handoff: entry });
|
|
343
|
+
}
|
|
344
|
+
case 'operator_review_handoff_status': {
|
|
345
|
+
const handoffPath = layoutPath(root, 'state', 'review-handoff.json');
|
|
346
|
+
if (!existsSync(handoffPath))
|
|
347
|
+
return handled({ handoffs: [], count: 0 });
|
|
348
|
+
try {
|
|
349
|
+
const handoffs = JSON.parse(readFileSync(handoffPath, 'utf8'));
|
|
350
|
+
return handled({ handoffs: Array.isArray(handoffs) ? handoffs : [], count: Array.isArray(handoffs) ? handoffs.length : 0 });
|
|
351
|
+
}
|
|
352
|
+
catch {
|
|
353
|
+
return handled({ handoffs: [], count: 0, error: 'Failed to parse review-handoff.json' });
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
default:
|
|
357
|
+
return UNHANDLED;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
//# sourceMappingURL=continuation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuation.js","sourceRoot":"","sources":["../../src/mcp/continuation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;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Context, type LaneToolResult } from '../mcp/laneSupport.js';
|
|
2
|
+
import type { ToolDefinition } from '../mcp/toolPartitions.js';
|
|
3
|
+
export declare const jobsToolDefinitions: ToolDefinition[];
|
|
4
|
+
export declare function handleJobsTool(name: string, context: LaneToolContext): Promise<LaneToolResult>;
|
|
5
|
+
//# sourceMappingURL=jobs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/mcp/jobs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,eAAe,EAAE,KAAK,cAAc,EAAa,MAAM,sBAAsB,CAAC;AACrG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,eAAO,MAAM,mBAAmB,EAAE,cAAc,EAiH/C,CAAC;AAEF,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CA+FpG"}
|