@a5c-ai/genty-platform 5.1.1-staging.0007199a1cb2
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 +48 -0
- package/dist/anycli/cache.d.ts +45 -0
- package/dist/anycli/cache.d.ts.map +1 -0
- package/dist/anycli/cache.js +118 -0
- package/dist/anycli/index.d.ts +10 -0
- package/dist/anycli/index.d.ts.map +1 -0
- package/dist/anycli/index.js +25 -0
- package/dist/anycli/types.d.ts +32 -0
- package/dist/anycli/types.d.ts.map +1 -0
- package/dist/anycli/types.js +9 -0
- package/dist/api/breakpoints.d.ts +93 -0
- package/dist/api/breakpoints.d.ts.map +1 -0
- package/dist/api/breakpoints.js +334 -0
- package/dist/api/effects.d.ts +14 -0
- package/dist/api/effects.d.ts.map +1 -0
- package/dist/api/effects.js +301 -0
- package/dist/api/effectsTypes.d.ts +79 -0
- package/dist/api/effectsTypes.d.ts.map +1 -0
- package/dist/api/effectsTypes.js +6 -0
- package/dist/api/eventStream.d.ts +34 -0
- package/dist/api/eventStream.d.ts.map +1 -0
- package/dist/api/eventStream.js +127 -0
- package/dist/api/index.d.ts +10 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +27 -0
- package/dist/api/runs.d.ts +85 -0
- package/dist/api/runs.d.ts.map +1 -0
- package/dist/api/runs.js +279 -0
- package/dist/api/sessions.d.ts +17 -0
- package/dist/api/sessions.d.ts.map +1 -0
- package/dist/api/sessions.js +58 -0
- package/dist/api/utils.d.ts +28 -0
- package/dist/api/utils.d.ts.map +1 -0
- package/dist/api/utils.js +74 -0
- package/dist/breakpoints/analytics.d.ts +46 -0
- package/dist/breakpoints/analytics.d.ts.map +1 -0
- package/dist/breakpoints/analytics.js +64 -0
- package/dist/breakpoints/approvalChains.d.ts +68 -0
- package/dist/breakpoints/approvalChains.d.ts.map +1 -0
- package/dist/breakpoints/approvalChains.js +111 -0
- package/dist/breakpoints/delegation.d.ts +42 -0
- package/dist/breakpoints/delegation.d.ts.map +1 -0
- package/dist/breakpoints/delegation.js +199 -0
- package/dist/breakpoints/delegationTypes.d.ts +46 -0
- package/dist/breakpoints/delegationTypes.d.ts.map +1 -0
- package/dist/breakpoints/delegationTypes.js +10 -0
- package/dist/breakpoints/postures.d.ts +28 -0
- package/dist/breakpoints/postures.d.ts.map +1 -0
- package/dist/breakpoints/postures.js +100 -0
- package/dist/compression/compaction.d.ts +82 -0
- package/dist/compression/compaction.d.ts.map +1 -0
- package/dist/compression/compaction.js +310 -0
- package/dist/compression/compactionStrategy.d.ts +37 -0
- package/dist/compression/compactionStrategy.d.ts.map +1 -0
- package/dist/compression/compactionStrategy.js +52 -0
- package/dist/compression/compressionFamilies.d.ts +39 -0
- package/dist/compression/compressionFamilies.d.ts.map +1 -0
- package/dist/compression/compressionFamilies.js +123 -0
- package/dist/context/dynamic.d.ts +16 -0
- package/dist/context/dynamic.d.ts.map +1 -0
- package/dist/context/dynamic.js +55 -0
- package/dist/context/instructions.d.ts +15 -0
- package/dist/context/instructions.d.ts.map +1 -0
- package/dist/context/instructions.js +97 -0
- package/dist/cost/claudeCodeParser.d.ts +81 -0
- package/dist/cost/claudeCodeParser.d.ts.map +1 -0
- package/dist/cost/claudeCodeParser.js +232 -0
- package/dist/cost/collector.d.ts +42 -0
- package/dist/cost/collector.d.ts.map +1 -0
- package/dist/cost/collector.js +105 -0
- package/dist/cost/effectCost.d.ts +23 -0
- package/dist/cost/effectCost.d.ts.map +1 -0
- package/dist/cost/effectCost.js +26 -0
- package/dist/cost/index.d.ts +7 -0
- package/dist/cost/index.d.ts.map +1 -0
- package/dist/cost/index.js +28 -0
- package/dist/cost/journal.d.ts +40 -0
- package/dist/cost/journal.d.ts.map +1 -0
- package/dist/cost/journal.js +163 -0
- package/dist/cost/types.d.ts +172 -0
- package/dist/cost/types.d.ts.map +1 -0
- package/dist/cost/types.js +229 -0
- package/dist/daemon/automationExecutor.d.ts +16 -0
- package/dist/daemon/automationExecutor.d.ts.map +1 -0
- package/dist/daemon/automationExecutor.js +222 -0
- package/dist/daemon/config.d.ts +8 -0
- package/dist/daemon/config.d.ts.map +1 -0
- package/dist/daemon/config.js +245 -0
- package/dist/daemon/daemonLog.d.ts +13 -0
- package/dist/daemon/daemonLog.d.ts.map +1 -0
- package/dist/daemon/daemonLog.js +64 -0
- package/dist/daemon/durableQueue.d.ts +41 -0
- package/dist/daemon/durableQueue.d.ts.map +1 -0
- package/dist/daemon/durableQueue.js +183 -0
- package/dist/daemon/fileWatcher.d.ts +9 -0
- package/dist/daemon/fileWatcher.d.ts.map +1 -0
- package/dist/daemon/fileWatcher.js +144 -0
- package/dist/daemon/index.d.ts +9 -0
- package/dist/daemon/index.d.ts.map +1 -0
- package/dist/daemon/index.js +26 -0
- package/dist/daemon/lifecycle.d.ts +12 -0
- package/dist/daemon/lifecycle.d.ts.map +1 -0
- package/dist/daemon/lifecycle.js +257 -0
- package/dist/daemon/loop.d.ts +27 -0
- package/dist/daemon/loop.d.ts.map +1 -0
- package/dist/daemon/loop.js +387 -0
- package/dist/daemon/timerScheduler.d.ts +13 -0
- package/dist/daemon/timerScheduler.d.ts.map +1 -0
- package/dist/daemon/timerScheduler.js +212 -0
- package/dist/daemon/types.d.ts +122 -0
- package/dist/daemon/types.d.ts.map +1 -0
- package/dist/daemon/types.js +25 -0
- package/dist/daemon/webhookListener.d.ts +6 -0
- package/dist/daemon/webhookListener.d.ts.map +1 -0
- package/dist/daemon/webhookListener.js +132 -0
- package/dist/extensions/discovery.d.ts +15 -0
- package/dist/extensions/discovery.d.ts.map +1 -0
- package/dist/extensions/discovery.js +119 -0
- package/dist/extensions/installer.d.ts +14 -0
- package/dist/extensions/installer.d.ts.map +1 -0
- package/dist/extensions/installer.js +100 -0
- package/dist/governance/authority.d.ts +68 -0
- package/dist/governance/authority.d.ts.map +1 -0
- package/dist/governance/authority.js +136 -0
- package/dist/governance/bridge.d.ts +17 -0
- package/dist/governance/bridge.d.ts.map +1 -0
- package/dist/governance/bridge.js +46 -0
- package/dist/governance/builtins.d.ts +25 -0
- package/dist/governance/builtins.d.ts.map +1 -0
- package/dist/governance/builtins.js +67 -0
- package/dist/governance/categories.d.ts +58 -0
- package/dist/governance/categories.d.ts.map +1 -0
- package/dist/governance/categories.js +120 -0
- package/dist/governance/decisionTrail.d.ts +60 -0
- package/dist/governance/decisionTrail.d.ts.map +1 -0
- package/dist/governance/decisionTrail.js +68 -0
- package/dist/governance/engine.d.ts +20 -0
- package/dist/governance/engine.d.ts.map +1 -0
- package/dist/governance/engine.js +124 -0
- package/dist/governance/index.d.ts +20 -0
- package/dist/governance/index.d.ts.map +1 -0
- package/dist/governance/index.js +75 -0
- package/dist/governance/logging.d.ts +18 -0
- package/dist/governance/logging.d.ts.map +1 -0
- package/dist/governance/logging.js +83 -0
- package/dist/governance/mandate.d.ts +83 -0
- package/dist/governance/mandate.d.ts.map +1 -0
- package/dist/governance/mandate.js +180 -0
- package/dist/governance/permissionEvents.d.ts +51 -0
- package/dist/governance/permissionEvents.d.ts.map +1 -0
- package/dist/governance/permissionEvents.js +52 -0
- package/dist/governance/permissionPropagation.d.ts +18 -0
- package/dist/governance/permissionPropagation.d.ts.map +1 -0
- package/dist/governance/permissionPropagation.js +58 -0
- package/dist/governance/postureBridge.d.ts +17 -0
- package/dist/governance/postureBridge.d.ts.map +1 -0
- package/dist/governance/postureBridge.js +117 -0
- package/dist/governance/privacySettings.d.ts +31 -0
- package/dist/governance/privacySettings.d.ts.map +1 -0
- package/dist/governance/privacySettings.js +104 -0
- package/dist/governance/sandboxBridge.d.ts +49 -0
- package/dist/governance/sandboxBridge.d.ts.map +1 -0
- package/dist/governance/sandboxBridge.js +77 -0
- package/dist/governance/sandboxPolicy.d.ts +51 -0
- package/dist/governance/sandboxPolicy.d.ts.map +1 -0
- package/dist/governance/sandboxPolicy.js +177 -0
- package/dist/governance/types.d.ts +7 -0
- package/dist/governance/types.d.ts.map +1 -0
- package/dist/governance/types.js +10 -0
- package/dist/harness/adapters/adapterBridge.d.ts +71 -0
- package/dist/harness/adapters/adapterBridge.d.ts.map +1 -0
- package/dist/harness/adapters/adapterBridge.js +117 -0
- package/dist/harness/adapters/adapterClientFactory.d.ts +29 -0
- package/dist/harness/adapters/adapterClientFactory.d.ts.map +1 -0
- package/dist/harness/adapters/adapterClientFactory.js +90 -0
- package/dist/harness/adapters/adapterEventEmitter.d.ts +51 -0
- package/dist/harness/adapters/adapterEventEmitter.d.ts.map +1 -0
- package/dist/harness/adapters/adapterEventEmitter.js +143 -0
- package/dist/harness/adapters/adapterEventMapper.d.ts +63 -0
- package/dist/harness/adapters/adapterEventMapper.d.ts.map +1 -0
- package/dist/harness/adapters/adapterEventMapper.js +100 -0
- package/dist/harness/adapters/adapterHarnessMap.d.ts +25 -0
- package/dist/harness/adapters/adapterHarnessMap.d.ts.map +1 -0
- package/dist/harness/adapters/adapterHarnessMap.js +55 -0
- package/dist/harness/adapters/adapterStdinReader.d.ts +45 -0
- package/dist/harness/adapters/adapterStdinReader.d.ts.map +1 -0
- package/dist/harness/adapters/adapterStdinReader.js +106 -0
- package/dist/harness/adapters/adapterTypes.d.ts +122 -0
- package/dist/harness/adapters/adapterTypes.d.ts.map +1 -0
- package/dist/harness/adapters/adapterTypes.js +11 -0
- package/dist/harness/adapters/index.d.ts +17 -0
- package/dist/harness/adapters/index.d.ts.map +1 -0
- package/dist/harness/adapters/index.js +34 -0
- package/dist/harness/backgroundTracker.d.ts +64 -0
- package/dist/harness/backgroundTracker.d.ts.map +1 -0
- package/dist/harness/backgroundTracker.js +107 -0
- package/dist/harness/budgetDowngrade.d.ts +12 -0
- package/dist/harness/budgetDowngrade.d.ts.map +1 -0
- package/dist/harness/budgetDowngrade.js +71 -0
- package/dist/harness/builtInHarness.d.ts +3 -0
- package/dist/harness/builtInHarness.d.ts.map +1 -0
- package/dist/harness/builtInHarness.js +18 -0
- package/dist/harness/capabilityRouter.d.ts +76 -0
- package/dist/harness/capabilityRouter.d.ts.map +1 -0
- package/dist/harness/capabilityRouter.js +177 -0
- package/dist/harness/circuitBreaker.d.ts +51 -0
- package/dist/harness/circuitBreaker.d.ts.map +1 -0
- package/dist/harness/circuitBreaker.js +110 -0
- package/dist/harness/concurrentEffects.d.ts +39 -0
- package/dist/harness/concurrentEffects.d.ts.map +1 -0
- package/dist/harness/concurrentEffects.js +90 -0
- package/dist/harness/effectRouting.d.ts +57 -0
- package/dist/harness/effectRouting.d.ts.map +1 -0
- package/dist/harness/effectRouting.js +130 -0
- package/dist/harness/extensionToolBridge.d.ts +11 -0
- package/dist/harness/extensionToolBridge.d.ts.map +1 -0
- package/dist/harness/extensionToolBridge.js +48 -0
- package/dist/harness/fallbackChains.d.ts +42 -0
- package/dist/harness/fallbackChains.d.ts.map +1 -0
- package/dist/harness/fallbackChains.js +69 -0
- package/dist/harness/gentySessionContext.d.ts +31 -0
- package/dist/harness/gentySessionContext.d.ts.map +1 -0
- package/dist/harness/gentySessionContext.js +49 -0
- package/dist/harness/gentySessionIntegration.d.ts +16 -0
- package/dist/harness/gentySessionIntegration.d.ts.map +1 -0
- package/dist/harness/gentySessionIntegration.js +66 -0
- package/dist/harness/hostContract.d.ts +69 -0
- package/dist/harness/hostContract.d.ts.map +1 -0
- package/dist/harness/hostContract.js +169 -0
- package/dist/harness/index.d.ts +25 -0
- package/dist/harness/index.d.ts.map +1 -0
- package/dist/harness/index.js +124 -0
- package/dist/harness/internal/createRun/agent-core-loop.d.ts +44 -0
- package/dist/harness/internal/createRun/agent-core-loop.d.ts.map +1 -0
- package/dist/harness/internal/createRun/agent-core-loop.js +247 -0
- package/dist/harness/internal/createRun/askUserQuestion.d.ts +11 -0
- package/dist/harness/internal/createRun/askUserQuestion.d.ts.map +1 -0
- package/dist/harness/internal/createRun/askUserQuestion.js +162 -0
- package/dist/harness/internal/createRun/index.d.ts +25 -0
- package/dist/harness/internal/createRun/index.d.ts.map +1 -0
- package/dist/harness/internal/createRun/index.js +196 -0
- package/dist/harness/internal/createRun/orchestration/constants.d.ts +8 -0
- package/dist/harness/internal/createRun/orchestration/constants.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/constants.js +22 -0
- package/dist/harness/internal/createRun/orchestration/dispatch.d.ts +23 -0
- package/dist/harness/internal/createRun/orchestration/dispatch.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/dispatch.js +142 -0
- package/dist/harness/internal/createRun/orchestration/effects.d.ts +135 -0
- package/dist/harness/internal/createRun/orchestration/effects.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/effects.js +948 -0
- package/dist/harness/internal/createRun/orchestration/effectsHelpers.d.ts +21 -0
- package/dist/harness/internal/createRun/orchestration/effectsHelpers.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/effectsHelpers.js +80 -0
- package/dist/harness/internal/createRun/orchestration/externalPhase.d.ts +3 -0
- package/dist/harness/internal/createRun/orchestration/externalPhase.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/externalPhase.js +404 -0
- package/dist/harness/internal/createRun/orchestration/externalPhaseHelpers.d.ts +16 -0
- package/dist/harness/internal/createRun/orchestration/externalPhaseHelpers.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/externalPhaseHelpers.js +107 -0
- package/dist/harness/internal/createRun/orchestration/hookDecisionEffects.d.ts +32 -0
- package/dist/harness/internal/createRun/orchestration/hookDecisionEffects.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/hookDecisionEffects.js +76 -0
- package/dist/harness/internal/createRun/orchestration/index.d.ts +49 -0
- package/dist/harness/internal/createRun/orchestration/index.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/index.js +505 -0
- package/dist/harness/internal/createRun/orchestration/internalPhase.d.ts +22 -0
- package/dist/harness/internal/createRun/orchestration/internalPhase.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/internalPhase.js +787 -0
- package/dist/harness/internal/createRun/orchestration/internalTools.d.ts +28 -0
- package/dist/harness/internal/createRun/orchestration/internalTools.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/internalTools.js +265 -0
- package/dist/harness/internal/createRun/orchestration/internalToolsHelpers.d.ts +17 -0
- package/dist/harness/internal/createRun/orchestration/internalToolsHelpers.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/internalToolsHelpers.js +23 -0
- package/dist/harness/internal/createRun/orchestration/taskResult.d.ts +10 -0
- package/dist/harness/internal/createRun/orchestration/taskResult.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/taskResult.js +67 -0
- package/dist/harness/internal/createRun/orchestration/types.d.ts +48 -0
- package/dist/harness/internal/createRun/orchestration/types.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/types.js +2 -0
- package/dist/harness/internal/createRun/orchestration/verbose.d.ts +7 -0
- package/dist/harness/internal/createRun/orchestration/verbose.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/verbose.js +240 -0
- package/dist/harness/internal/createRun/orchestration/workerSessionEnhancer.d.ts +4 -0
- package/dist/harness/internal/createRun/orchestration/workerSessionEnhancer.d.ts.map +1 -0
- package/dist/harness/internal/createRun/orchestration/workerSessionEnhancer.js +36 -0
- package/dist/harness/internal/createRun/output.d.ts +40 -0
- package/dist/harness/internal/createRun/output.d.ts.map +1 -0
- package/dist/harness/internal/createRun/output.js +469 -0
- package/dist/harness/internal/createRun/pi.d.ts +10 -0
- package/dist/harness/internal/createRun/pi.d.ts.map +1 -0
- package/dist/harness/internal/createRun/pi.js +35 -0
- package/dist/harness/internal/createRun/planProcess/agentOutput.d.ts +5 -0
- package/dist/harness/internal/createRun/planProcess/agentOutput.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/agentOutput.js +161 -0
- package/dist/harness/internal/createRun/planProcess/delegation.d.ts +33 -0
- package/dist/harness/internal/createRun/planProcess/delegation.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/delegation.js +202 -0
- package/dist/harness/internal/createRun/planProcess/external.d.ts +14 -0
- package/dist/harness/internal/createRun/planProcess/external.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/external.js +140 -0
- package/dist/harness/internal/createRun/planProcess/index.d.ts +12 -0
- package/dist/harness/internal/createRun/planProcess/index.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/index.js +24 -0
- package/dist/harness/internal/createRun/planProcess/paths.d.ts +7 -0
- package/dist/harness/internal/createRun/planProcess/paths.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/paths.js +98 -0
- package/dist/harness/internal/createRun/planProcess/phase.d.ts +6 -0
- package/dist/harness/internal/createRun/planProcess/phase.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/phase.js +396 -0
- package/dist/harness/internal/createRun/planProcess/phaseHelpers.d.ts +44 -0
- package/dist/harness/internal/createRun/planProcess/phaseHelpers.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/phaseHelpers.js +161 -0
- package/dist/harness/internal/createRun/planProcess/phaseTypes.d.ts +25 -0
- package/dist/harness/internal/createRun/planProcess/phaseTypes.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/phaseTypes.js +6 -0
- package/dist/harness/internal/createRun/planProcess/prompts.d.ts +22 -0
- package/dist/harness/internal/createRun/planProcess/prompts.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/prompts.js +241 -0
- package/dist/harness/internal/createRun/planProcess/recovery.d.ts +18 -0
- package/dist/harness/internal/createRun/planProcess/recovery.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/recovery.js +205 -0
- package/dist/harness/internal/createRun/planProcess/runState.d.ts +40 -0
- package/dist/harness/internal/createRun/planProcess/runState.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/runState.js +179 -0
- package/dist/harness/internal/createRun/planProcess/understandIntent.d.ts +22 -0
- package/dist/harness/internal/createRun/planProcess/understandIntent.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/understandIntent.js +65 -0
- package/dist/harness/internal/createRun/planProcess/validation.d.ts +10 -0
- package/dist/harness/internal/createRun/planProcess/validation.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/validation.js +289 -0
- package/dist/harness/internal/createRun/planProcess/validationSource.d.ts +13 -0
- package/dist/harness/internal/createRun/planProcess/validationSource.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/validationSource.js +345 -0
- package/dist/harness/internal/createRun/planProcess/validationText.d.ts +3 -0
- package/dist/harness/internal/createRun/planProcess/validationText.d.ts.map +1 -0
- package/dist/harness/internal/createRun/planProcess/validationText.js +145 -0
- package/dist/harness/internal/createRun/prompts.d.ts +76 -0
- package/dist/harness/internal/createRun/prompts.d.ts.map +1 -0
- package/dist/harness/internal/createRun/prompts.js +466 -0
- package/dist/harness/internal/createRun/resumeState.d.ts +28 -0
- package/dist/harness/internal/createRun/resumeState.d.ts.map +1 -0
- package/dist/harness/internal/createRun/resumeState.js +134 -0
- package/dist/harness/internal/createRun/utils.d.ts +195 -0
- package/dist/harness/internal/createRun/utils.d.ts.map +1 -0
- package/dist/harness/internal/createRun/utils.js +237 -0
- package/dist/harness/internal.d.ts +13 -0
- package/dist/harness/internal.d.ts.map +1 -0
- package/dist/harness/internal.js +151 -0
- package/dist/harness/invoker/launch.d.ts +20 -0
- package/dist/harness/invoker/launch.d.ts.map +1 -0
- package/dist/harness/invoker/launch.js +23 -0
- package/dist/harness/invoker/processControl.d.ts +11 -0
- package/dist/harness/invoker/processControl.d.ts.map +1 -0
- package/dist/harness/invoker/processControl.js +50 -0
- package/dist/harness/invoker.d.ts +44 -0
- package/dist/harness/invoker.d.ts.map +1 -0
- package/dist/harness/invoker.js +343 -0
- package/dist/harness/lspIntegration.d.ts +48 -0
- package/dist/harness/lspIntegration.d.ts.map +1 -0
- package/dist/harness/lspIntegration.js +45 -0
- package/dist/harness/modeSelector.d.ts +50 -0
- package/dist/harness/modeSelector.d.ts.map +1 -0
- package/dist/harness/modeSelector.js +124 -0
- package/dist/harness/modelSelection.d.ts +37 -0
- package/dist/harness/modelSelection.d.ts.map +1 -0
- package/dist/harness/modelSelection.js +81 -0
- package/dist/harness/multiHarnessDispatch.d.ts +49 -0
- package/dist/harness/multiHarnessDispatch.d.ts.map +1 -0
- package/dist/harness/multiHarnessDispatch.js +73 -0
- package/dist/harness/oauthIntegration.d.ts +55 -0
- package/dist/harness/oauthIntegration.d.ts.map +1 -0
- package/dist/harness/oauthIntegration.js +84 -0
- package/dist/harness/operatorCommands.d.ts +38 -0
- package/dist/harness/operatorCommands.d.ts.map +1 -0
- package/dist/harness/operatorCommands.js +118 -0
- package/dist/harness/parallelFileOps.d.ts +56 -0
- package/dist/harness/parallelFileOps.d.ts.map +1 -0
- package/dist/harness/parallelFileOps.js +166 -0
- package/dist/harness/planMode.d.ts +68 -0
- package/dist/harness/planMode.d.ts.map +1 -0
- package/dist/harness/planMode.js +145 -0
- package/dist/harness/profileOrchestration.d.ts +55 -0
- package/dist/harness/profileOrchestration.d.ts.map +1 -0
- package/dist/harness/profileOrchestration.js +61 -0
- package/dist/harness/selectionPolicies.d.ts +29 -0
- package/dist/harness/selectionPolicies.d.ts.map +1 -0
- package/dist/harness/selectionPolicies.js +165 -0
- package/dist/harness/streamingParallelism.d.ts +43 -0
- package/dist/harness/streamingParallelism.d.ts.map +1 -0
- package/dist/harness/streamingParallelism.js +113 -0
- package/dist/harness/streamingRenderer.d.ts +64 -0
- package/dist/harness/streamingRenderer.d.ts.map +1 -0
- package/dist/harness/streamingRenderer.js +85 -0
- package/dist/harness/types.d.ts +289 -0
- package/dist/harness/types.d.ts.map +1 -0
- package/dist/harness/types.js +34 -0
- package/dist/harness/websocketSession.d.ts +63 -0
- package/dist/harness/websocketSession.d.ts.map +1 -0
- package/dist/harness/websocketSession.js +113 -0
- package/dist/harness/worktreeIsolation.d.ts +39 -0
- package/dist/harness/worktreeIsolation.d.ts.map +1 -0
- package/dist/harness/worktreeIsolation.js +85 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +54 -0
- package/dist/interaction/askUserQuestion/core.d.ts +8 -0
- package/dist/interaction/askUserQuestion/core.d.ts.map +1 -0
- package/dist/interaction/askUserQuestion/core.js +112 -0
- package/dist/interaction/askUserQuestion/terminal.d.ts +15 -0
- package/dist/interaction/askUserQuestion/terminal.d.ts.map +1 -0
- package/dist/interaction/askUserQuestion/terminal.js +128 -0
- package/dist/interaction/askUserQuestion.d.ts +10 -0
- package/dist/interaction/askUserQuestion.d.ts.map +1 -0
- package/dist/interaction/askUserQuestion.js +295 -0
- package/dist/interaction/askUserQuestionTypes.d.ts +31 -0
- package/dist/interaction/askUserQuestionTypes.d.ts.map +1 -0
- package/dist/interaction/askUserQuestionTypes.js +6 -0
- package/dist/interaction/commandDiscovery.d.ts +38 -0
- package/dist/interaction/commandDiscovery.d.ts.map +1 -0
- package/dist/interaction/commandDiscovery.js +106 -0
- package/dist/interaction/index.d.ts +11 -0
- package/dist/interaction/index.d.ts.map +1 -0
- package/dist/interaction/index.js +42 -0
- package/dist/interaction/interactionRouter.d.ts +25 -0
- package/dist/interaction/interactionRouter.d.ts.map +1 -0
- package/dist/interaction/interactionRouter.js +55 -0
- package/dist/interaction/model-switch.d.ts +16 -0
- package/dist/interaction/model-switch.d.ts.map +1 -0
- package/dist/interaction/model-switch.js +41 -0
- package/dist/interaction/permissionApprovalUi.d.ts +32 -0
- package/dist/interaction/permissionApprovalUi.d.ts.map +1 -0
- package/dist/interaction/permissionApprovalUi.js +96 -0
- package/dist/interaction/steering.d.ts +17 -0
- package/dist/interaction/steering.d.ts.map +1 -0
- package/dist/interaction/steering.js +41 -0
- package/dist/interaction/typedEffectPatterns.d.ts +55 -0
- package/dist/interaction/typedEffectPatterns.d.ts.map +1 -0
- package/dist/interaction/typedEffectPatterns.js +190 -0
- package/dist/mcp/channels/allowlist.d.ts +19 -0
- package/dist/mcp/channels/allowlist.d.ts.map +1 -0
- package/dist/mcp/channels/allowlist.js +140 -0
- package/dist/mcp/channels/channelManager.d.ts +64 -0
- package/dist/mcp/channels/channelManager.d.ts.map +1 -0
- package/dist/mcp/channels/channelManager.js +137 -0
- package/dist/mcp/channels/inboundQueue.d.ts +47 -0
- package/dist/mcp/channels/inboundQueue.d.ts.map +1 -0
- package/dist/mcp/channels/inboundQueue.js +96 -0
- package/dist/mcp/channels/index.d.ts +16 -0
- package/dist/mcp/channels/index.d.ts.map +1 -0
- package/dist/mcp/channels/index.js +38 -0
- package/dist/mcp/channels/outbound.d.ts +33 -0
- package/dist/mcp/channels/outbound.d.ts.map +1 -0
- package/dist/mcp/channels/outbound.js +94 -0
- package/dist/mcp/channels/permissionRelay.d.ts +62 -0
- package/dist/mcp/channels/permissionRelay.d.ts.map +1 -0
- package/dist/mcp/channels/permissionRelay.js +159 -0
- package/dist/mcp/channels/types.d.ts +135 -0
- package/dist/mcp/channels/types.d.ts.map +1 -0
- package/dist/mcp/channels/types.js +16 -0
- package/dist/mcp/client/auth.d.ts +57 -0
- package/dist/mcp/client/auth.d.ts.map +1 -0
- package/dist/mcp/client/auth.js +99 -0
- package/dist/mcp/client/config.d.ts +28 -0
- package/dist/mcp/client/config.d.ts.map +1 -0
- package/dist/mcp/client/config.js +144 -0
- package/dist/mcp/client/executor.d.ts +30 -0
- package/dist/mcp/client/executor.d.ts.map +1 -0
- package/dist/mcp/client/executor.js +61 -0
- package/dist/mcp/client/index.d.ts +13 -0
- package/dist/mcp/client/index.d.ts.map +1 -0
- package/dist/mcp/client/index.js +30 -0
- package/dist/mcp/client/manager.d.ts +74 -0
- package/dist/mcp/client/manager.d.ts.map +1 -0
- package/dist/mcp/client/manager.js +215 -0
- package/dist/mcp/client/resourceBrowser.d.ts +52 -0
- package/dist/mcp/client/resourceBrowser.d.ts.map +1 -0
- package/dist/mcp/client/resourceBrowser.js +80 -0
- package/dist/mcp/client/toolRegistry.d.ts +113 -0
- package/dist/mcp/client/toolRegistry.d.ts.map +1 -0
- package/dist/mcp/client/toolRegistry.js +190 -0
- package/dist/mcp/client/types.d.ts +96 -0
- package/dist/mcp/client/types.d.ts.map +1 -0
- package/dist/mcp/client/types.js +15 -0
- package/dist/mcp/transport/index.d.ts +9 -0
- package/dist/mcp/transport/index.d.ts.map +1 -0
- package/dist/mcp/transport/index.js +13 -0
- package/dist/mcp/transport/session.d.ts +18 -0
- package/dist/mcp/transport/session.d.ts.map +1 -0
- package/dist/mcp/transport/session.js +78 -0
- package/dist/mcp/transport/types.d.ts +19 -0
- package/dist/mcp/transport/types.d.ts.map +1 -0
- package/dist/mcp/transport/types.js +7 -0
- package/dist/mcp/transport/websocket.d.ts +41 -0
- package/dist/mcp/transport/websocket.d.ts.map +1 -0
- package/dist/mcp/transport/websocket.js +271 -0
- package/dist/microagents/discovery.d.ts +34 -0
- package/dist/microagents/discovery.d.ts.map +1 -0
- package/dist/microagents/discovery.js +72 -0
- package/dist/microagents/dispatch.d.ts +36 -0
- package/dist/microagents/dispatch.d.ts.map +1 -0
- package/dist/microagents/dispatch.js +59 -0
- package/dist/microagents/index.d.ts +35 -0
- package/dist/microagents/index.d.ts.map +1 -0
- package/dist/microagents/index.js +44 -0
- package/dist/microagents/subprocess.d.ts +41 -0
- package/dist/microagents/subprocess.d.ts.map +1 -0
- package/dist/microagents/subprocess.js +75 -0
- package/dist/observability/alertWebhooks.d.ts +35 -0
- package/dist/observability/alertWebhooks.d.ts.map +1 -0
- package/dist/observability/alertWebhooks.js +68 -0
- package/dist/observability/analytics.d.ts +66 -0
- package/dist/observability/analytics.d.ts.map +1 -0
- package/dist/observability/analytics.js +104 -0
- package/dist/observability/auditExport.d.ts +25 -0
- package/dist/observability/auditExport.d.ts.map +1 -0
- package/dist/observability/auditExport.js +108 -0
- package/dist/observability/contextIntrospection.d.ts +40 -0
- package/dist/observability/contextIntrospection.d.ts.map +1 -0
- package/dist/observability/contextIntrospection.js +93 -0
- package/dist/observability/failureTriage.d.ts +28 -0
- package/dist/observability/failureTriage.d.ts.map +1 -0
- package/dist/observability/failureTriage.js +168 -0
- package/dist/observability/health.d.ts +19 -0
- package/dist/observability/health.d.ts.map +1 -0
- package/dist/observability/health.js +129 -0
- package/dist/observability/index.d.ts +14 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +53 -0
- package/dist/observability/progressSummarizer.d.ts +27 -0
- package/dist/observability/progressSummarizer.d.ts.map +1 -0
- package/dist/observability/progressSummarizer.js +143 -0
- package/dist/observability/promptPlan.d.ts +52 -0
- package/dist/observability/promptPlan.d.ts.map +1 -0
- package/dist/observability/promptPlan.js +101 -0
- package/dist/observability/resumeDashboard.d.ts +32 -0
- package/dist/observability/resumeDashboard.d.ts.map +1 -0
- package/dist/observability/resumeDashboard.js +204 -0
- package/dist/observability/runStatus.d.ts +44 -0
- package/dist/observability/runStatus.d.ts.map +1 -0
- package/dist/observability/runStatus.js +170 -0
- package/dist/observability/subagentHealth.d.ts +66 -0
- package/dist/observability/subagentHealth.d.ts.map +1 -0
- package/dist/observability/subagentHealth.js +107 -0
- package/dist/observability/subagentProgress.d.ts +64 -0
- package/dist/observability/subagentProgress.d.ts.map +1 -0
- package/dist/observability/subagentProgress.js +91 -0
- package/dist/observability/timeline.d.ts +11 -0
- package/dist/observability/timeline.d.ts.map +1 -0
- package/dist/observability/timeline.js +176 -0
- package/dist/observability/types.d.ts +62 -0
- package/dist/observability/types.d.ts.map +1 -0
- package/dist/observability/types.js +8 -0
- package/dist/observability/webhooks.d.ts +68 -0
- package/dist/observability/webhooks.d.ts.map +1 -0
- package/dist/observability/webhooks.js +132 -0
- package/dist/orchestration/defaultOrchestrationProvider.d.ts +30 -0
- package/dist/orchestration/defaultOrchestrationProvider.d.ts.map +1 -0
- package/dist/orchestration/defaultOrchestrationProvider.js +304 -0
- package/dist/orchestration/global.d.ts +27 -0
- package/dist/orchestration/global.d.ts.map +1 -0
- package/dist/orchestration/global.js +51 -0
- package/dist/orchestration/index.d.ts +12 -0
- package/dist/orchestration/index.d.ts.map +1 -0
- package/dist/orchestration/index.js +17 -0
- package/dist/orchestration/interfaces.d.ts +136 -0
- package/dist/orchestration/interfaces.d.ts.map +1 -0
- package/dist/orchestration/interfaces.js +11 -0
- package/dist/orchestration/registry.d.ts +30 -0
- package/dist/orchestration/registry.d.ts.map +1 -0
- package/dist/orchestration/registry.js +148 -0
- package/dist/plugins/ccCompatibility.d.ts +79 -0
- package/dist/plugins/ccCompatibility.d.ts.map +1 -0
- package/dist/plugins/ccCompatibility.js +139 -0
- package/dist/plugins/index.d.ts +16 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +38 -0
- package/dist/plugins/loader.d.ts +37 -0
- package/dist/plugins/loader.d.ts.map +1 -0
- package/dist/plugins/loader.js +112 -0
- package/dist/plugins/management.d.ts +33 -0
- package/dist/plugins/management.d.ts.map +1 -0
- package/dist/plugins/management.js +99 -0
- package/dist/plugins/marketplace.d.ts +64 -0
- package/dist/plugins/marketplace.d.ts.map +1 -0
- package/dist/plugins/marketplace.js +101 -0
- package/dist/plugins/sandbox.d.ts +38 -0
- package/dist/plugins/sandbox.d.ts.map +1 -0
- package/dist/plugins/sandbox.js +109 -0
- package/dist/plugins/trust.d.ts +31 -0
- package/dist/plugins/trust.d.ts.map +1 -0
- package/dist/plugins/trust.js +66 -0
- package/dist/plugins/types.d.ts +27 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +7 -0
- package/dist/plugins/validation.d.ts +32 -0
- package/dist/plugins/validation.d.ts.map +1 -0
- package/dist/plugins/validation.js +117 -0
- package/dist/plugins/version-check.d.ts +23 -0
- package/dist/plugins/version-check.d.ts.map +1 -0
- package/dist/plugins/version-check.js +70 -0
- package/dist/plugins/versioning.d.ts +40 -0
- package/dist/plugins/versioning.d.ts.map +1 -0
- package/dist/plugins/versioning.js +101 -0
- package/dist/processes/index.d.ts +12 -0
- package/dist/processes/index.d.ts.map +1 -0
- package/dist/processes/index.js +15 -0
- package/dist/processes/recommender.d.ts +36 -0
- package/dist/processes/recommender.d.ts.map +1 -0
- package/dist/processes/recommender.js +73 -0
- package/dist/processes/scorer.d.ts +26 -0
- package/dist/processes/scorer.d.ts.map +1 -0
- package/dist/processes/scorer.js +104 -0
- package/dist/processes/types.d.ts +48 -0
- package/dist/processes/types.d.ts.map +1 -0
- package/dist/processes/types.js +9 -0
- package/dist/runtime/index.d.ts +9 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +9 -0
- package/dist/seams/contract.d.ts +63 -0
- package/dist/seams/contract.d.ts.map +1 -0
- package/dist/seams/contract.js +146 -0
- package/dist/seams/index.d.ts +3 -0
- package/dist/seams/index.d.ts.map +1 -0
- package/dist/seams/index.js +8 -0
- package/dist/session/context.d.ts +22 -0
- package/dist/session/context.d.ts.map +1 -0
- package/dist/session/context.js +113 -0
- package/dist/session/continuityState.d.ts +39 -0
- package/dist/session/continuityState.d.ts.map +1 -0
- package/dist/session/continuityState.js +164 -0
- package/dist/session/cost.d.ts +72 -0
- package/dist/session/cost.d.ts.map +1 -0
- package/dist/session/cost.js +221 -0
- package/dist/session/crossRunComm.d.ts +40 -0
- package/dist/session/crossRunComm.d.ts.map +1 -0
- package/dist/session/crossRunComm.js +86 -0
- package/dist/session/crossRunState.d.ts +8 -0
- package/dist/session/crossRunState.d.ts.map +1 -0
- package/dist/session/crossRunState.js +45 -0
- package/dist/session/discovery.d.ts +22 -0
- package/dist/session/discovery.d.ts.map +1 -0
- package/dist/session/discovery.js +51 -0
- package/dist/session/history.d.ts +30 -0
- package/dist/session/history.d.ts.map +1 -0
- package/dist/session/history.js +144 -0
- package/dist/session/index.d.ts +8 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +73 -0
- package/dist/session/memoryConsolidation.d.ts +31 -0
- package/dist/session/memoryConsolidation.d.ts.map +1 -0
- package/dist/session/memoryConsolidation.js +135 -0
- package/dist/session/memoryExtraction.d.ts +65 -0
- package/dist/session/memoryExtraction.d.ts.map +1 -0
- package/dist/session/memoryExtraction.js +201 -0
- package/dist/session/parse.d.ts +45 -0
- package/dist/session/parse.d.ts.map +1 -0
- package/dist/session/parse.js +170 -0
- package/dist/session/persistence.d.ts +46 -0
- package/dist/session/persistence.d.ts.map +1 -0
- package/dist/session/persistence.js +180 -0
- package/dist/session/sessionSharing.d.ts +55 -0
- package/dist/session/sessionSharing.d.ts.map +1 -0
- package/dist/session/sessionSharing.js +113 -0
- package/dist/session/sessionTemplates.d.ts +57 -0
- package/dist/session/sessionTemplates.d.ts.map +1 -0
- package/dist/session/sessionTemplates.js +93 -0
- package/dist/session/types.d.ts +267 -0
- package/dist/session/types.d.ts.map +1 -0
- package/dist/session/types.js +45 -0
- package/dist/session/write.d.ts +61 -0
- package/dist/session/write.d.ts.map +1 -0
- package/dist/session/write.js +213 -0
- package/dist/skills/chain.d.ts +31 -0
- package/dist/skills/chain.d.ts.map +1 -0
- package/dist/skills/chain.js +113 -0
- package/dist/skills/discovery.d.ts +34 -0
- package/dist/skills/discovery.d.ts.map +1 -0
- package/dist/skills/discovery.js +185 -0
- package/dist/skills/index.d.ts +12 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +18 -0
- package/dist/skills/router.d.ts +35 -0
- package/dist/skills/router.d.ts.map +1 -0
- package/dist/skills/router.js +143 -0
- package/dist/skills/types.d.ts +33 -0
- package/dist/skills/types.d.ts.map +1 -0
- package/dist/skills/types.js +5 -0
- package/dist/storage/atomic.d.ts +2 -0
- package/dist/storage/atomic.d.ts.map +1 -0
- package/dist/storage/atomic.js +54 -0
- package/dist/storage/clock.d.ts +2 -0
- package/dist/storage/clock.d.ts.map +1 -0
- package/dist/storage/clock.js +6 -0
- package/dist/storage/index.d.ts +9 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +11 -0
- package/dist/storage/journalWatcher.d.ts +24 -0
- package/dist/storage/journalWatcher.d.ts.map +1 -0
- package/dist/storage/journalWatcher.js +173 -0
- package/dist/storage/paths.d.ts +5 -0
- package/dist/storage/paths.d.ts.map +1 -0
- package/dist/storage/paths.js +26 -0
- package/dist/storage/runFiles.d.ts +29 -0
- package/dist/storage/runFiles.d.ts.map +1 -0
- package/dist/storage/runFiles.js +85 -0
- package/dist/storage/snapshotState.d.ts +10 -0
- package/dist/storage/snapshotState.d.ts.map +1 -0
- package/dist/storage/snapshotState.js +15 -0
- package/dist/storage/storeTaskArtifacts.d.ts +6 -0
- package/dist/storage/storeTaskArtifacts.d.ts.map +1 -0
- package/dist/storage/storeTaskArtifacts.js +55 -0
- package/dist/storage/types.d.ts +21 -0
- package/dist/storage/types.d.ts.map +1 -0
- package/dist/storage/types.js +2 -0
- package/dist/tasks/crud.d.ts +33 -0
- package/dist/tasks/crud.d.ts.map +1 -0
- package/dist/tasks/crud.js +150 -0
- package/dist/tasks/index.d.ts +2 -0
- package/dist/tasks/index.d.ts.map +1 -0
- package/dist/tasks/index.js +9 -0
- package/dist/trust/harness-signing.d.ts +15 -0
- package/dist/trust/harness-signing.d.ts.map +1 -0
- package/dist/trust/harness-signing.js +46 -0
- package/dist/trust/key-store.d.ts +15 -0
- package/dist/trust/key-store.d.ts.map +1 -0
- package/dist/trust/key-store.js +66 -0
- package/dist/types.d.ts +81 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +21 -0
- package/dist/utils/atomic.d.ts +16 -0
- package/dist/utils/atomic.d.ts.map +1 -0
- package/dist/utils/atomic.js +75 -0
- package/dist/utils/concurrency.d.ts +27 -0
- package/dist/utils/concurrency.d.ts.map +1 -0
- package/dist/utils/concurrency.js +42 -0
- package/dist/utils/defaults.d.ts +11 -0
- package/dist/utils/defaults.d.ts.map +1 -0
- package/dist/utils/defaults.js +13 -0
- package/dist/utils/errors.d.ts +50 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +76 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +18 -0
- package/dist/utils/patterns.d.ts +35 -0
- package/dist/utils/patterns.d.ts.map +1 -0
- package/dist/utils/patterns.js +84 -0
- package/package.json +170 -0
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Compatibility surface for PhaseOrchestration helpers.
|
|
4
|
+
*
|
|
5
|
+
* The implementation lives under ./orchestration/ so the command stays
|
|
6
|
+
* split by responsibility instead of accreting more top-level helper files.
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.subscribeVerbosePiEvents = exports.resolveWorkspaceRunsDir = exports.runInternalOrchestrationPhase = exports.runExternalOrchestrationPhase = exports.resolveHarnessSessionIdForBinding = exports.resolveEffectWithRetry = exports.resolveEffect = exports.readProcessFileFingerprint = exports.orchestrateIterationWithProcessLoadRetry = exports.MAX_PROCESS_ERROR_RECOVERIES = exports.MAX_CONSECUTIVE_TIMEOUTS = exports.MAX_CONSECUTIVE_STALLS = exports.MAX_CONSECUTIVE_PROCESS_ERROR_STALLS = void 0;
|
|
43
|
+
exports.parseBabysitterCliJson = parseBabysitterCliJson;
|
|
44
|
+
exports.runOrchestrationPhase = runOrchestrationPhase;
|
|
45
|
+
exports.runCliOrchestration = runCliOrchestration;
|
|
46
|
+
exports.resolveAndPostEffect = resolveAndPostEffect;
|
|
47
|
+
var constants_1 = require("./constants");
|
|
48
|
+
Object.defineProperty(exports, "MAX_CONSECUTIVE_PROCESS_ERROR_STALLS", { enumerable: true, get: function () { return constants_1.MAX_CONSECUTIVE_PROCESS_ERROR_STALLS; } });
|
|
49
|
+
Object.defineProperty(exports, "MAX_CONSECUTIVE_STALLS", { enumerable: true, get: function () { return constants_1.MAX_CONSECUTIVE_STALLS; } });
|
|
50
|
+
Object.defineProperty(exports, "MAX_CONSECUTIVE_TIMEOUTS", { enumerable: true, get: function () { return constants_1.MAX_CONSECUTIVE_TIMEOUTS; } });
|
|
51
|
+
Object.defineProperty(exports, "MAX_PROCESS_ERROR_RECOVERIES", { enumerable: true, get: function () { return constants_1.MAX_PROCESS_ERROR_RECOVERIES; } });
|
|
52
|
+
var effects_1 = require("./effects");
|
|
53
|
+
Object.defineProperty(exports, "orchestrateIterationWithProcessLoadRetry", { enumerable: true, get: function () { return effects_1.orchestrateIterationWithProcessLoadRetry; } });
|
|
54
|
+
Object.defineProperty(exports, "readProcessFileFingerprint", { enumerable: true, get: function () { return effects_1.readProcessFileFingerprint; } });
|
|
55
|
+
Object.defineProperty(exports, "resolveEffect", { enumerable: true, get: function () { return effects_1.resolveEffect; } });
|
|
56
|
+
Object.defineProperty(exports, "resolveEffectWithRetry", { enumerable: true, get: function () { return effects_1.resolveEffectWithRetry; } });
|
|
57
|
+
Object.defineProperty(exports, "resolveHarnessSessionIdForBinding", { enumerable: true, get: function () { return effects_1.resolveHarnessSessionIdForBinding; } });
|
|
58
|
+
var externalPhase_1 = require("./externalPhase");
|
|
59
|
+
Object.defineProperty(exports, "runExternalOrchestrationPhase", { enumerable: true, get: function () { return externalPhase_1.runExternalOrchestrationPhase; } });
|
|
60
|
+
var internalPhase_1 = require("./internalPhase");
|
|
61
|
+
Object.defineProperty(exports, "runInternalOrchestrationPhase", { enumerable: true, get: function () { return internalPhase_1.runInternalOrchestrationPhase; } });
|
|
62
|
+
Object.defineProperty(exports, "resolveWorkspaceRunsDir", { enumerable: true, get: function () { return internalPhase_1.resolveWorkspaceRunsDir; } });
|
|
63
|
+
var verbose_1 = require("./verbose");
|
|
64
|
+
Object.defineProperty(exports, "subscribeVerbosePiEvents", { enumerable: true, get: function () { return verbose_1.subscribeVerbosePiEvents; } });
|
|
65
|
+
const externalPhase_2 = require("./externalPhase");
|
|
66
|
+
const internalPhase_2 = require("./internalPhase");
|
|
67
|
+
const utils_1 = require("../utils");
|
|
68
|
+
// #949: cross-harness dispatch (agent/skill) and task auto-execution (shell/node)
|
|
69
|
+
// are gated behind BABYSITTER_CROSS_SUBAGENTS / BABYSITTER_EXECUTE_TASKS (default
|
|
70
|
+
// OFF). Defense-in-depth: the gate must live at this execution seam, not only at
|
|
71
|
+
// the entrypoint env mutation in handleHarnessCreateRun.
|
|
72
|
+
const babysitter_sdk_1 = require("@a5c-ai/babysitter-sdk");
|
|
73
|
+
async function importOptionalModule(specifier) {
|
|
74
|
+
return Promise.resolve(`${specifier}`).then(s => __importStar(require(s)));
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Parse a babysitter CLI `--json` stdout payload, failing loudly (and fast)
|
|
78
|
+
* when the CLI emitted a non-JSON line instead of a structured result.
|
|
79
|
+
*
|
|
80
|
+
* Bug #936 phase-2: when a delegated effect failed, `babysitter run:iterate`
|
|
81
|
+
* (or its child) could emit a bare `Error: Effect failed` line on stdout. The
|
|
82
|
+
* old code did an UNGUARDED `JSON.parse(...)`, which surfaced the cryptic
|
|
83
|
+
* `Unexpected token 'E', "Error: Effect failed" is not valid JSON` and then
|
|
84
|
+
* spun the iterate loop until the 80-minute orchestration timeout.
|
|
85
|
+
*
|
|
86
|
+
* This helper trims, attempts the parse, and on failure throws a clear
|
|
87
|
+
* {@link BabysitterRuntimeError} that includes the command, the first ~500
|
|
88
|
+
* chars of the raw non-JSON stdout AND stderr, so the failure is diagnosable
|
|
89
|
+
* immediately instead of as a SyntaxError 80 minutes later.
|
|
90
|
+
*/
|
|
91
|
+
function parseBabysitterCliJson(raw, context) {
|
|
92
|
+
const trimmed = (raw ?? "").trim();
|
|
93
|
+
try {
|
|
94
|
+
return JSON.parse(trimmed);
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
const parseMessage = error instanceof Error ? error.message : String(error);
|
|
98
|
+
const stdoutSnippet = trimmed.slice(0, 500);
|
|
99
|
+
const stderrSnippet = (context.stderr ?? "").trim().slice(0, 500);
|
|
100
|
+
throw new utils_1.BabysitterRuntimeError("BabysitterCliNonJsonOutput", `babysitter ${context.command} did not emit valid JSON on stdout under --json `
|
|
101
|
+
+ `(${parseMessage}).\n--- stdout (first 500 chars) ---\n${stdoutSnippet || "<empty>"}`
|
|
102
|
+
+ `\n--- stderr (first 500 chars) ---\n${stderrSnippet || "<empty>"}`, { category: utils_1.ErrorCategory.Runtime });
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* execFileSync throws on non-zero exit; the error carries `stdout`/`stderr`
|
|
107
|
+
* buffers. Surface BOTH so a failed iterate/create is diagnosable. The literal
|
|
108
|
+
* `Error: Effect failed` line that triggered #936 lands on one of these.
|
|
109
|
+
*/
|
|
110
|
+
function describeExecFileError(err) {
|
|
111
|
+
const e = err;
|
|
112
|
+
const decode = (v) => typeof v === "string" ? v : Buffer.isBuffer(v) ? v.toString("utf8") : "";
|
|
113
|
+
return {
|
|
114
|
+
message: err instanceof Error ? err.message : String(err),
|
|
115
|
+
stdout: decode(e?.stdout),
|
|
116
|
+
stderr: decode(e?.stderr),
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
async function runOrchestrationPhase(args) {
|
|
120
|
+
const externalExitCode = await (0, externalPhase_2.runExternalOrchestrationPhase)(args);
|
|
121
|
+
if (externalExitCode !== undefined) {
|
|
122
|
+
return externalExitCode;
|
|
123
|
+
}
|
|
124
|
+
return (0, internalPhase_2.runInternalOrchestrationPhase)(args);
|
|
125
|
+
}
|
|
126
|
+
async function runCliOrchestration(args) {
|
|
127
|
+
const { execFileSync } = await Promise.resolve().then(() => __importStar(require("node:child_process")));
|
|
128
|
+
const path = await Promise.resolve().then(() => __importStar(require("node:path")));
|
|
129
|
+
const processPath = args.processPath;
|
|
130
|
+
const workspace = args.workspace ?? process.cwd();
|
|
131
|
+
// Bug #936: when no explicit --runs-dir is provided, babysitter run:create
|
|
132
|
+
// defaults to the GLOBAL ~/.a5c/runs, so the nested run (and its completion
|
|
133
|
+
// proof) land outside <workspace>/.a5c/runs where the live-stack validator —
|
|
134
|
+
// and users — look. Default to the WORKSPACE runs dir instead. An explicit
|
|
135
|
+
// args.runsDir or a BABYSITTER_RUNS_DIR / repo-scope override still wins (see
|
|
136
|
+
// resolveWorkspaceRunsDir's precedence). The resolver walks to the workspace's
|
|
137
|
+
// repo root when present and otherwise uses the workspace itself, so a
|
|
138
|
+
// non-git-repo live-stack workspace still resolves to <workspace>/.a5c/runs.
|
|
139
|
+
const runsDir = (0, internalPhase_2.resolveWorkspaceRunsDir)(args.runsDir, workspace);
|
|
140
|
+
const prompt = args.prompt ?? "";
|
|
141
|
+
const model = args.model;
|
|
142
|
+
// Resolve babysitter CLI: prefer the SDK's dist/cli/main.js over global binary
|
|
143
|
+
let babysitterBin = "babysitter";
|
|
144
|
+
try {
|
|
145
|
+
const sdkCliPath = require.resolve("@a5c-ai/babysitter-sdk/dist/cli/main.js");
|
|
146
|
+
babysitterBin = `${process.execPath} ${sdkCliPath}`;
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
// Fall back to global babysitter binary
|
|
150
|
+
}
|
|
151
|
+
// Create run via CLI — pass prompt both as metadata and as process inputs
|
|
152
|
+
const fsPromises = await Promise.resolve().then(() => __importStar(require("node:fs/promises")));
|
|
153
|
+
const inputsFile = path.join(workspace, `.a5c-genty-inputs-${Date.now()}.json`);
|
|
154
|
+
await fsPromises.writeFile(inputsFile, JSON.stringify({ prompt, request: prompt }));
|
|
155
|
+
const createArgs = [
|
|
156
|
+
"run:create",
|
|
157
|
+
"--entry", `${path.resolve(processPath)}#process`,
|
|
158
|
+
"--process-id", path.basename(processPath, path.extname(processPath)),
|
|
159
|
+
"--prompt", prompt,
|
|
160
|
+
"--inputs", inputsFile,
|
|
161
|
+
"--harness", "agent-core",
|
|
162
|
+
"--json",
|
|
163
|
+
];
|
|
164
|
+
if (runsDir)
|
|
165
|
+
createArgs.push("--runs-dir", runsDir);
|
|
166
|
+
let runDir;
|
|
167
|
+
const babysitterBinParts = babysitterBin.split(" ");
|
|
168
|
+
const babysitterCmd = babysitterBinParts[0];
|
|
169
|
+
const babysitterPrefix = babysitterBinParts.slice(1);
|
|
170
|
+
try {
|
|
171
|
+
const createResult = execFileSync(babysitterCmd, [...babysitterPrefix, ...createArgs], {
|
|
172
|
+
cwd: workspace,
|
|
173
|
+
encoding: "utf8",
|
|
174
|
+
timeout: 30_000,
|
|
175
|
+
env: { ...process.env },
|
|
176
|
+
});
|
|
177
|
+
// #936: guarded parse — a non-JSON line (e.g. "Error: Effect failed") on
|
|
178
|
+
// stdout must surface a clear error, not a cryptic SyntaxError.
|
|
179
|
+
const parsed = parseBabysitterCliJson(createResult, { command: "run:create" });
|
|
180
|
+
runDir = parsed.runDir;
|
|
181
|
+
await fsPromises.unlink(inputsFile).catch(() => { });
|
|
182
|
+
if (!args.json) {
|
|
183
|
+
process.stderr.write(`\x1b[32mRun created:\x1b[0m ${runDir}\n`);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
catch (err) {
|
|
187
|
+
await fsPromises.unlink(inputsFile).catch(() => { });
|
|
188
|
+
// execFileSync throws on non-zero exit — capture stdout/stderr buffers so
|
|
189
|
+
// the failure reason (not just "Command failed") is visible.
|
|
190
|
+
const { message, stdout, stderr } = describeExecFileError(err);
|
|
191
|
+
const detail = err instanceof utils_1.BabysitterRuntimeError
|
|
192
|
+
? message
|
|
193
|
+
: `${message}${stdout ? `\n--- stdout ---\n${stdout.slice(0, 500)}` : ""}${stderr ? `\n--- stderr ---\n${stderr.slice(0, 500)}` : ""}`;
|
|
194
|
+
if (!args.json) {
|
|
195
|
+
process.stderr.write(`\x1b[31mFailed to create run:\x1b[0m ${detail}\n`);
|
|
196
|
+
}
|
|
197
|
+
return 1;
|
|
198
|
+
}
|
|
199
|
+
// Iterate loop — cap at 20 for CLI orchestration regardless of caller
|
|
200
|
+
const maxIterations = Math.min(args.maxIterations ?? 20, 20);
|
|
201
|
+
let consecutiveNoEffects = 0;
|
|
202
|
+
for (let i = 1; i <= maxIterations; i++) {
|
|
203
|
+
process.stderr.write(`[genty-orchestration] iteration ${i}/${maxIterations} starting\n`);
|
|
204
|
+
try {
|
|
205
|
+
const iterArgs = [...babysitterPrefix, "run:iterate", runDir, "--json", "--iteration", String(i)];
|
|
206
|
+
// #936: keep the iterate calls anchored to the same runs dir as create so
|
|
207
|
+
// the run lifecycle stays in <workspace>/.a5c/runs throughout.
|
|
208
|
+
if (runsDir)
|
|
209
|
+
iterArgs.push("--runs-dir", runsDir);
|
|
210
|
+
process.stderr.write(`[genty-orchestration] exec: ${babysitterCmd} ${iterArgs.join(" ")}\n`);
|
|
211
|
+
let iterResult;
|
|
212
|
+
try {
|
|
213
|
+
iterResult = execFileSync(babysitterCmd, iterArgs, {
|
|
214
|
+
cwd: workspace,
|
|
215
|
+
encoding: "utf8",
|
|
216
|
+
timeout: 120_000,
|
|
217
|
+
env: { ...process.env },
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
catch (execErr) {
|
|
221
|
+
// #936: run:iterate exited non-zero. FAIL FAST with the captured
|
|
222
|
+
// stdout/stderr (which carries the real failure, e.g. the
|
|
223
|
+
// "Error: Effect failed" line) instead of letting the loop spin to
|
|
224
|
+
// the 80-minute orchestration timeout. Prefer stdout for the guarded
|
|
225
|
+
// JSON parse when present so a structured failure result is honored.
|
|
226
|
+
const { message, stdout, stderr } = describeExecFileError(execErr);
|
|
227
|
+
if (stdout.trim().length > 0) {
|
|
228
|
+
iterResult = stdout;
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
throw new utils_1.BabysitterRuntimeError("BabysitterIterateFailed", `babysitter run:iterate (iteration ${i}) exited non-zero: ${message}`
|
|
232
|
+
+ `\n--- stderr (first 500 chars) ---\n${stderr.trim().slice(0, 500) || "<empty>"}`, { category: utils_1.ErrorCategory.Runtime });
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
// #936: guarded parse — throws a clear BabysitterRuntimeError including
|
|
236
|
+
// the raw stdout/stderr when run:iterate emits a non-JSON line.
|
|
237
|
+
const parsed = parseBabysitterCliJson(iterResult, { command: `run:iterate (iteration ${i})` });
|
|
238
|
+
process.stderr.write(`[genty-orchestration] iterate result: status=${parsed.status} actions=${parsed.nextActions?.length ?? 0} reason=${parsed.reason ?? 'n/a'}\n`);
|
|
239
|
+
if (parsed.status === "completed") {
|
|
240
|
+
if (!args.json) {
|
|
241
|
+
process.stderr.write(`\x1b[32mRun completed.\x1b[0m\n`);
|
|
242
|
+
}
|
|
243
|
+
return 0;
|
|
244
|
+
}
|
|
245
|
+
if (parsed.status === "failed") {
|
|
246
|
+
if (!args.json) {
|
|
247
|
+
process.stderr.write(`\x1b[31mRun failed:\x1b[0m ${parsed.reason ?? "unknown"}\n`);
|
|
248
|
+
}
|
|
249
|
+
return 1;
|
|
250
|
+
}
|
|
251
|
+
// Handle pending effects
|
|
252
|
+
if (parsed.nextActions?.length) {
|
|
253
|
+
consecutiveNoEffects = 0;
|
|
254
|
+
process.stderr.write(`[genty-orchestration] iteration ${i}: ${parsed.nextActions.length} pending effects to resolve\n`);
|
|
255
|
+
for (const action of parsed.nextActions) {
|
|
256
|
+
process.stderr.write(`[genty-orchestration] resolving effect ${action.effectId} (${action.kind})\n`);
|
|
257
|
+
await resolveAndPostEffect(action, runDir, workspace, model, babysitterBin);
|
|
258
|
+
process.stderr.write(`[genty-orchestration] effect ${action.effectId} resolved\n`);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
else if (parsed.status === "none") {
|
|
262
|
+
consecutiveNoEffects++;
|
|
263
|
+
if (consecutiveNoEffects >= 3) {
|
|
264
|
+
if (!args.json) {
|
|
265
|
+
process.stderr.write(`\x1b[31mNo pending effects for ${consecutiveNoEffects} consecutive iterations — process may not be dispatching tasks.\x1b[0m\n`);
|
|
266
|
+
}
|
|
267
|
+
return 1;
|
|
268
|
+
}
|
|
269
|
+
if (!args.json) {
|
|
270
|
+
process.stderr.write(`\x1b[33mNo pending effects at iteration ${i}\x1b[0m\n`);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
catch (err) {
|
|
275
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
276
|
+
if (!args.json) {
|
|
277
|
+
process.stderr.write(`\x1b[31mIteration ${i} error:\x1b[0m ${msg}\n`);
|
|
278
|
+
}
|
|
279
|
+
return 1;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
if (!args.json) {
|
|
283
|
+
process.stderr.write(`\x1b[31mMax iterations (${maxIterations}) reached.\x1b[0m\n`);
|
|
284
|
+
}
|
|
285
|
+
return 1;
|
|
286
|
+
}
|
|
287
|
+
async function resolveAndPostEffect(action, runDir, workspace, model, babysitterBin = "babysitter") {
|
|
288
|
+
// #949: gate at the execution seam. Cross-harness dispatch (agent/skill) and
|
|
289
|
+
// task auto-execution (shell/node) only run when their flags are ON. When OFF,
|
|
290
|
+
// do NOT execute and do NOT post — leave the effect pending so the next
|
|
291
|
+
// iteration re-emits it (mirrors resolveEffect's pending contract). genty's
|
|
292
|
+
// autonomous entrypoint (handleHarnessCreateRun) opts these flags ON.
|
|
293
|
+
if ((action.kind === "agent" || action.kind === "skill") && !(0, babysitter_sdk_1.crossSubagentsEnabled)()) {
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
if ((action.kind === "shell" || action.kind === "node" || action.kind === "orchestrator_task") && !(0, babysitter_sdk_1.executeTasksEnabled)()) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
const { execFileSync, execSync } = await Promise.resolve().then(() => __importStar(require("node:child_process")));
|
|
300
|
+
const { createAgentCoreSession } = await Promise.resolve().then(() => __importStar(require("../utils")));
|
|
301
|
+
const babysitterParts = babysitterBin.split(" ");
|
|
302
|
+
const bCmd = babysitterParts[0];
|
|
303
|
+
const bPrefix = babysitterParts.slice(1);
|
|
304
|
+
// #936: track the effect outcome explicitly. A delegated agent/skill prompt
|
|
305
|
+
// that fails (result.success === false) or a shell command that exits
|
|
306
|
+
// non-zero MUST be posted as `--status error` with the real error — NOT
|
|
307
|
+
// silently posted as ok with an error string as the value. Posting a poisoned
|
|
308
|
+
// "ok" value is what produced the downstream "Error: Effect failed" line and
|
|
309
|
+
// the 80-minute spin.
|
|
310
|
+
let value;
|
|
311
|
+
let postStatus = "ok";
|
|
312
|
+
let postError;
|
|
313
|
+
const tasksMuxValue = await resolveViaTasksMuxForCli(action, workspace, model);
|
|
314
|
+
if (tasksMuxValue !== undefined) {
|
|
315
|
+
value = tasksMuxValue;
|
|
316
|
+
}
|
|
317
|
+
else if (action.kind === "agent" || action.kind === "skill") {
|
|
318
|
+
const agentPrompt = action.taskDef?.agent?.prompt;
|
|
319
|
+
const prompt = typeof agentPrompt === "string"
|
|
320
|
+
? agentPrompt
|
|
321
|
+
: agentPrompt?.instructions?.join("\n")
|
|
322
|
+
?? action.taskDef?.title
|
|
323
|
+
?? "Execute this task";
|
|
324
|
+
const session = createAgentCoreSession({
|
|
325
|
+
workspace,
|
|
326
|
+
model,
|
|
327
|
+
ephemeral: true,
|
|
328
|
+
});
|
|
329
|
+
try {
|
|
330
|
+
const result = await session.prompt(prompt);
|
|
331
|
+
if (result.success === false) {
|
|
332
|
+
// Delegated session failed — propagate the failure so the process can
|
|
333
|
+
// handle it, instead of posting the failure text as a successful value.
|
|
334
|
+
postStatus = "error";
|
|
335
|
+
postError = (typeof result.output === "string" && result.output.trim().length > 0)
|
|
336
|
+
? result.output
|
|
337
|
+
: `Delegated ${action.kind} effect failed (exitCode=${result.exitCode ?? "unknown"})`;
|
|
338
|
+
value = JSON.stringify(result.output ?? "");
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
value = JSON.stringify(result.output ?? "");
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
finally {
|
|
345
|
+
session.dispose();
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
else if (action.kind === "shell") {
|
|
349
|
+
const command = action.taskDef?.shell?.command ?? "echo ok";
|
|
350
|
+
try {
|
|
351
|
+
const output = execSync(command, { cwd: workspace, encoding: "utf8", timeout: 120_000 });
|
|
352
|
+
value = JSON.stringify(output);
|
|
353
|
+
}
|
|
354
|
+
catch (err) {
|
|
355
|
+
// A failed shell command is a real effect failure — post it as error.
|
|
356
|
+
const stderr = err.stderr ?? "";
|
|
357
|
+
postStatus = "error";
|
|
358
|
+
postError = stderr || (err instanceof Error ? err.message : "shell command failed");
|
|
359
|
+
value = JSON.stringify(stderr || "shell command failed");
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
else if (action.kind === "breakpoint") {
|
|
363
|
+
value = JSON.stringify("approved");
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
value = JSON.stringify("ok");
|
|
367
|
+
}
|
|
368
|
+
// Post result
|
|
369
|
+
try {
|
|
370
|
+
const fs = await Promise.resolve().then(() => __importStar(require("node:fs/promises")));
|
|
371
|
+
const path = await Promise.resolve().then(() => __importStar(require("node:path")));
|
|
372
|
+
if (postStatus === "error") {
|
|
373
|
+
// task:post --status error reads the error payload as JSON from --error
|
|
374
|
+
// <file> (see handleTaskPost -> readJsonFile). Write a structured error
|
|
375
|
+
// object, not a bare string, so the CLI commits a proper failure result.
|
|
376
|
+
const errorFile = path.join(runDir, "tasks", action.effectId, "error.json");
|
|
377
|
+
await fs.mkdir(path.dirname(errorFile), { recursive: true });
|
|
378
|
+
await fs.writeFile(errorFile, JSON.stringify({ name: "Error", message: postError ?? "Effect failed" }));
|
|
379
|
+
execFileSync(bCmd, [...bPrefix, "task:post", runDir, action.effectId, "--status", "error", "--error", errorFile, "--json"], {
|
|
380
|
+
cwd: workspace, encoding: "utf8", timeout: 30_000, env: { ...process.env },
|
|
381
|
+
});
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
const taskDir = path.join(runDir, "tasks", action.effectId);
|
|
385
|
+
await fs.mkdir(taskDir, { recursive: true });
|
|
386
|
+
await fs.writeFile(path.join(taskDir, "output.json"), value);
|
|
387
|
+
execFileSync(bCmd, [...bPrefix, "task:post", runDir, action.effectId, "--status", "ok", "--value", `tasks/${action.effectId}/output.json`, "--json"], {
|
|
388
|
+
cwd: workspace, encoding: "utf8", timeout: 30_000, env: { ...process.env },
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
catch {
|
|
392
|
+
// Best effort
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
async function resolveViaTasksMuxForCli(action, workspace, model) {
|
|
396
|
+
if (action.kind !== "agent" && action.kind !== "breakpoint") {
|
|
397
|
+
return undefined;
|
|
398
|
+
}
|
|
399
|
+
let adapter;
|
|
400
|
+
try {
|
|
401
|
+
adapter = await importOptionalModule("@a5c-ai/tasks-adapter");
|
|
402
|
+
}
|
|
403
|
+
catch {
|
|
404
|
+
return undefined;
|
|
405
|
+
}
|
|
406
|
+
if (typeof adapter.routeTask !== "function") {
|
|
407
|
+
return undefined;
|
|
408
|
+
}
|
|
409
|
+
const decision = adapter.routeTask(action.taskDef);
|
|
410
|
+
if (decision.responderType === "internal" || decision.responderType === "human") {
|
|
411
|
+
if (decision.responderType === "human") {
|
|
412
|
+
return JSON.stringify(buildCliBreakpointValue(action));
|
|
413
|
+
}
|
|
414
|
+
return undefined;
|
|
415
|
+
}
|
|
416
|
+
if (decision.responderType === "tracker") {
|
|
417
|
+
if (!decision.unavailable)
|
|
418
|
+
return undefined;
|
|
419
|
+
return JSON.stringify({
|
|
420
|
+
success: false,
|
|
421
|
+
routedThrough: "tasks-adapter",
|
|
422
|
+
responderType: "tracker",
|
|
423
|
+
error: decision.reason ?? "ExternalTrackerBackend unavailable",
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
if (decision.responderType !== "agent") {
|
|
427
|
+
return undefined;
|
|
428
|
+
}
|
|
429
|
+
const fallbackToInternal = shouldFallbackExternalAgentToInternal(action.taskDef);
|
|
430
|
+
if (typeof adapter.AgentMuxResponderBackend !== "function") {
|
|
431
|
+
if (fallbackToInternal)
|
|
432
|
+
return undefined;
|
|
433
|
+
throw new Error("tasks-adapter AgentMuxResponderBackend is unavailable");
|
|
434
|
+
}
|
|
435
|
+
const prompt = buildCliAgentPrompt(action.taskDef);
|
|
436
|
+
let breakpoint;
|
|
437
|
+
try {
|
|
438
|
+
const backend = new adapter.AgentMuxResponderBackend({
|
|
439
|
+
adapter: decision.responder?.adapter ?? decision.responder?.id,
|
|
440
|
+
model: decision.responder?.model ?? model,
|
|
441
|
+
cwd: workspace,
|
|
442
|
+
});
|
|
443
|
+
breakpoint = await backend.submitBreakpoint({
|
|
444
|
+
text: prompt,
|
|
445
|
+
context: {
|
|
446
|
+
description: action.taskDef?.title ?? action.taskId ?? action.effectId,
|
|
447
|
+
codeSnippets: [],
|
|
448
|
+
fileReferences: [],
|
|
449
|
+
tags: action.labels ?? [],
|
|
450
|
+
},
|
|
451
|
+
routing: {
|
|
452
|
+
strategy: "single",
|
|
453
|
+
targetResponders: decision.responder?.id ? [decision.responder.id] : [],
|
|
454
|
+
timeoutMs: readExternalAgentTimeoutMs(action.taskDef) ?? 300_000,
|
|
455
|
+
presentToUser: false,
|
|
456
|
+
responderType: "agent",
|
|
457
|
+
adapter: decision.responder?.adapter ?? decision.responder?.id,
|
|
458
|
+
model: decision.responder?.model ?? model,
|
|
459
|
+
},
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
catch (err) {
|
|
463
|
+
if (fallbackToInternal)
|
|
464
|
+
return undefined;
|
|
465
|
+
throw err;
|
|
466
|
+
}
|
|
467
|
+
return JSON.stringify(breakpoint.answers[0]?.text ?? "");
|
|
468
|
+
}
|
|
469
|
+
function buildCliBreakpointValue(action) {
|
|
470
|
+
const question = action.taskDef?.question
|
|
471
|
+
?? action.taskDef?.title
|
|
472
|
+
?? action.taskId
|
|
473
|
+
?? action.effectId;
|
|
474
|
+
const approvalPrompt = (0, utils_1.createApprovalAskUserQuestion)(question);
|
|
475
|
+
const approvalKey = approvalPrompt.questions[0]?.header ?? "Decision";
|
|
476
|
+
const response = (0, utils_1.createAskUserQuestionResponse)(approvalPrompt, { [approvalKey]: "Approve" });
|
|
477
|
+
return {
|
|
478
|
+
approved: true,
|
|
479
|
+
option: "Approve",
|
|
480
|
+
askUserQuestion: response,
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
function buildCliAgentPrompt(taskDef) {
|
|
484
|
+
const agentPrompt = taskDef?.agent?.prompt;
|
|
485
|
+
return typeof agentPrompt === "string"
|
|
486
|
+
? agentPrompt
|
|
487
|
+
: agentPrompt?.instructions?.join("\n")
|
|
488
|
+
?? taskDef?.title
|
|
489
|
+
?? "Execute this task";
|
|
490
|
+
}
|
|
491
|
+
function shouldFallbackExternalAgentToInternal(taskDef) {
|
|
492
|
+
const agent = isPlainRecord(taskDef?.agent) ? taskDef.agent : {};
|
|
493
|
+
const metadata = isPlainRecord(taskDef?.metadata) ? taskDef.metadata : {};
|
|
494
|
+
return agent.fallbackToInternal === true
|
|
495
|
+
|| metadata.fallbackToInternal === true
|
|
496
|
+
|| agent.fallbackType === "internal"
|
|
497
|
+
|| metadata.fallbackType === "internal";
|
|
498
|
+
}
|
|
499
|
+
function readExternalAgentTimeoutMs(taskDef) {
|
|
500
|
+
const agent = isPlainRecord(taskDef?.agent) ? taskDef.agent : {};
|
|
501
|
+
return typeof agent.timeoutMs === "number" ? agent.timeoutMs : undefined;
|
|
502
|
+
}
|
|
503
|
+
function isPlainRecord(value) {
|
|
504
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
505
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RunOrchestrationPhaseArgs } from "./types";
|
|
2
|
+
export declare function runInternalOrchestrationPhase(args: RunOrchestrationPhaseArgs): Promise<number>;
|
|
3
|
+
/**
|
|
4
|
+
* Resolve the runs directory for genty's internal (in-process) execution.
|
|
5
|
+
*
|
|
6
|
+
* Precedence (highest first):
|
|
7
|
+
* 1. An explicit runsDir passed by the caller (CLI --runs-dir).
|
|
8
|
+
* 2. The BABYSITTER_RUNS_DIR / BABYSITTER_RUNS_SCOPE env overrides, honored
|
|
9
|
+
* via the SDK's resolveRunsDir({ cwd }).
|
|
10
|
+
* 3. The WORKSPACE repo runs dir (<repoRoot>/.a5c/runs) — NOT the global
|
|
11
|
+
* ~/.a5c/runs. The SDK defaults to global scope when nothing is set, which
|
|
12
|
+
* means a plain `genty call` never materializes the workspace .a5c/runs/.
|
|
13
|
+
* Forcing the workspace dir here makes the internal path establish the run
|
|
14
|
+
* lifecycle where downstream tooling (and the live-stack verification)
|
|
15
|
+
* expects it. See #936 bug 2.
|
|
16
|
+
*
|
|
17
|
+
* The SDK is loaded lazily (sync require, only when this is actually called) to
|
|
18
|
+
* avoid eagerly pulling the heavy SDK + atlas index into the module graph, per
|
|
19
|
+
* the #936 default-provider lazy-load decision.
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveWorkspaceRunsDir(explicitRunsDir: string | undefined, workspace: string | undefined): string;
|
|
22
|
+
//# sourceMappingURL=internalPhase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internalPhase.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/orchestration/internalPhase.ts"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAiC,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAQxF,wBAAsB,6BAA6B,CACjD,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,MAAM,CAAC,CAyvBjB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,CAgCR"}
|