@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,289 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.validateProcessExport = validateProcessExport;
|
|
37
|
+
exports._setDiscoverExternalAgentsForValidationTesting = _setDiscoverExternalAgentsForValidationTesting;
|
|
38
|
+
const path = __importStar(require("node:path"));
|
|
39
|
+
const node_fs_1 = require("node:fs");
|
|
40
|
+
const node_url_1 = require("node:url");
|
|
41
|
+
// SDK-owned: task registry reset needed before re-importing process definitions
|
|
42
|
+
const babysitter_sdk_1 = require("@a5c-ai/babysitter-sdk");
|
|
43
|
+
const global_1 = require("../../../../orchestration/global");
|
|
44
|
+
const utils_1 = require("../utils");
|
|
45
|
+
const delegation_1 = require("./delegation");
|
|
46
|
+
const validationText_1 = require("./validationText");
|
|
47
|
+
const validationSource_1 = require("./validationSource");
|
|
48
|
+
let processValidationImportNonce = 0;
|
|
49
|
+
async function discoverExternalAgentsViaProvider(opts) {
|
|
50
|
+
try {
|
|
51
|
+
const agents = await (0, global_1.getGlobalRegistry)().getAgentDiscovery().discoverAgents(opts.cwd ?? process.cwd());
|
|
52
|
+
return { available: agents.length > 0 };
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return { available: false };
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
let discoverExternalAgentsForValidation = discoverExternalAgentsViaProvider;
|
|
59
|
+
const dynamicImportModule = (() => {
|
|
60
|
+
if (process.env.VITEST) {
|
|
61
|
+
return (specifier) => Promise.resolve(`${specifier}`).then(s => __importStar(require(s)));
|
|
62
|
+
}
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/no-implied-eval
|
|
64
|
+
return new Function("specifier", "return import(specifier);");
|
|
65
|
+
})();
|
|
66
|
+
async function ensureSdkResolvable(workspaceDir) {
|
|
67
|
+
// SDK-owned: resolve SDK package location to symlink into workspace for process validation
|
|
68
|
+
const sdkPkg = path.dirname(require.resolve("@a5c-ai/babysitter-sdk/package.json"));
|
|
69
|
+
const targetNodeModules = path.join(workspaceDir, "node_modules");
|
|
70
|
+
const targetSdkDir = path.join(targetNodeModules, "@a5c-ai", "babysitter-sdk");
|
|
71
|
+
try {
|
|
72
|
+
await node_fs_1.promises.access(targetSdkDir);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
// create below
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
await node_fs_1.promises.mkdir(path.join(targetNodeModules, "@a5c-ai"), { recursive: true });
|
|
80
|
+
const linkType = process.platform === "win32" ? "junction" : "dir";
|
|
81
|
+
await node_fs_1.promises.symlink(sdkPkg, targetSdkDir, linkType);
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// best effort
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
async function validateProcessExport(filePath) {
|
|
88
|
+
const source = await node_fs_1.promises.readFile(path.resolve(filePath), "utf8");
|
|
89
|
+
const shellPatterns = [
|
|
90
|
+
{ pattern: /<<['"]?EOF/m, name: "heredoc (<<EOF)" },
|
|
91
|
+
{ pattern: /^cat\s+>/m, name: "shell cat redirect" },
|
|
92
|
+
{ pattern: /^\s*#!\s*\/bin\/(ba)?sh/m, name: "shell shebang" },
|
|
93
|
+
];
|
|
94
|
+
for (const { pattern, name } of shellPatterns) {
|
|
95
|
+
if (pattern.test(source)) {
|
|
96
|
+
throw new utils_1.BabysitterRuntimeError("InvalidProcessSyntaxError", `Process file at ${filePath} contains shell syntax (${name}). The file must be valid ESM JavaScript, not a shell script.`, {
|
|
97
|
+
category: utils_1.ErrorCategory.Validation,
|
|
98
|
+
nextSteps: [
|
|
99
|
+
"Rewrite shell commands as JavaScript — use fs.writeFileSync for file creation, child_process.execSync for commands",
|
|
100
|
+
"Express file contents as JavaScript strings or arrays joined with '\\n'",
|
|
101
|
+
"The .mjs file must pass node --check as valid ESM",
|
|
102
|
+
],
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
const syntaxCheck = await (0, delegation_1.execShellEffect)(process.execPath, ["--check", path.resolve(filePath)]);
|
|
107
|
+
if (syntaxCheck.exitCode !== 0) {
|
|
108
|
+
const diagnostic = [syntaxCheck.stdout, syntaxCheck.stderr]
|
|
109
|
+
.map((value) => value.trim())
|
|
110
|
+
.filter(Boolean)
|
|
111
|
+
.join("\n");
|
|
112
|
+
throw new utils_1.BabysitterRuntimeError("InvalidProcessSyntaxError", diagnostic
|
|
113
|
+
? `Process file at ${filePath} failed \`node --check\`.\n${diagnostic}`
|
|
114
|
+
: `Process file at ${filePath} failed \`node --check\`.`, {
|
|
115
|
+
category: utils_1.ErrorCategory.Validation,
|
|
116
|
+
nextSteps: [
|
|
117
|
+
"Rewrite the file so it is syntactically valid ESM before runtime import",
|
|
118
|
+
"If the process writes HTML/CSS/JS assets, do not embed raw nested template literals inside outer template literals",
|
|
119
|
+
"Prefer String.raw, arrays joined with \"\\n\", or escaped inner backticks and \\${...} sequences when embedding source files",
|
|
120
|
+
],
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
if ((0, validationText_1.hasNamedProcessGlobalReferenceConflict)(source)) {
|
|
124
|
+
throw new utils_1.BabysitterRuntimeError("InvalidProcessSourceError", `Process file at ${filePath} references \`process.\` inside the named 'process' export, which shadows Node's global process object`, {
|
|
125
|
+
category: utils_1.ErrorCategory.Validation,
|
|
126
|
+
nextSteps: [
|
|
127
|
+
"If the process needs the workspace root, resolve it from the module location with import.meta.url",
|
|
128
|
+
"If you need Node's global process object, use globalThis.process or import it under another name such as nodeProcess",
|
|
129
|
+
],
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
if ((0, validationText_1.assumesRuntimeWorkspacePathWithoutModuleFallback)(source)) {
|
|
133
|
+
throw new utils_1.BabysitterRuntimeError("InvalidProcessSourceError", `Process file at ${filePath} assumes ctx.workspaceDir or ctx.cwd exists, but the runtime process context does not provide workspace paths`, {
|
|
134
|
+
category: utils_1.ErrorCategory.Validation,
|
|
135
|
+
nextSteps: [
|
|
136
|
+
"When the process needs the workspace root, derive it from the module location with import.meta.url",
|
|
137
|
+
"For a generated process in the workspace root, use path.dirname(fileURLToPath(import.meta.url)) or an equivalent import.meta.url-based approach",
|
|
138
|
+
],
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
const unresolvedPlaceholders = (0, validationSource_1.getUnresolvedTemplatePlaceholders)(source);
|
|
142
|
+
if (unresolvedPlaceholders.length > 0) {
|
|
143
|
+
throw new utils_1.BabysitterRuntimeError("InvalidProcessSourceError", `Process file at ${filePath} contains unresolved template placeholders: ${unresolvedPlaceholders.join(", ")}`, {
|
|
144
|
+
category: utils_1.ErrorCategory.Validation,
|
|
145
|
+
nextSteps: [
|
|
146
|
+
"Do not leave {{workspaceDir}}, {{gameRequest}}, or similar template placeholders in task prompts, shell commands, or node args",
|
|
147
|
+
"Build concrete prompt text and shell commands from defineTask(args, taskCtx) inputs when returning each TaskDef",
|
|
148
|
+
"If a task needs workspaceDir or request text, interpolate the actual args value into the returned TaskDef before runtime",
|
|
149
|
+
],
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
await ensureSdkResolvable(path.dirname(path.resolve(filePath)));
|
|
153
|
+
const resolvedPath = path.resolve(filePath);
|
|
154
|
+
const moduleUrl = `${(0, node_url_1.pathToFileURL)(resolvedPath).href}?t=${Date.now()}-${++processValidationImportNonce}`;
|
|
155
|
+
(0, babysitter_sdk_1.resetGlobalTaskRegistry)();
|
|
156
|
+
let mod;
|
|
157
|
+
try {
|
|
158
|
+
mod = await dynamicImportModule(moduleUrl);
|
|
159
|
+
}
|
|
160
|
+
catch {
|
|
161
|
+
// ESM import with cache-bust query string may fail on some Node configs
|
|
162
|
+
// (CJS fallback doesn't support file:// URLs with query strings).
|
|
163
|
+
// Retry with plain require() after clearing the module cache.
|
|
164
|
+
try {
|
|
165
|
+
delete require.cache[require.resolve(resolvedPath)];
|
|
166
|
+
}
|
|
167
|
+
catch { /* not cached */ }
|
|
168
|
+
try {
|
|
169
|
+
mod = await dynamicImportModule((0, node_url_1.pathToFileURL)(resolvedPath).href);
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
// Last resort: CJS require
|
|
173
|
+
mod = require(resolvedPath);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
finally {
|
|
177
|
+
(0, babysitter_sdk_1.resetGlobalTaskRegistry)();
|
|
178
|
+
}
|
|
179
|
+
const fn = mod.process ?? (typeof mod.default === "function" ? mod.default : undefined);
|
|
180
|
+
if (typeof fn !== "function") {
|
|
181
|
+
throw new utils_1.BabysitterRuntimeError("InvalidProcessExportError", `Process file at ${filePath} does not export a function named 'process'. Available exports: ${Object.keys(mod).join(", ") || "(none)"}`, {
|
|
182
|
+
category: utils_1.ErrorCategory.Validation,
|
|
183
|
+
nextSteps: [
|
|
184
|
+
"Ensure the file exports: export async function process(inputs, ctx) { ... }",
|
|
185
|
+
"A default export is also accepted: export default async function(inputs, ctx) { ... }",
|
|
186
|
+
],
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
if (!(0, validationSource_1.hasDefineTaskBlocks)(source)) {
|
|
190
|
+
throw new utils_1.BabysitterRuntimeError("InvalidProcessSourceError", `Process file at ${filePath} does not define any babysitter tasks via defineTask(...)`, {
|
|
191
|
+
category: utils_1.ErrorCategory.Validation,
|
|
192
|
+
nextSteps: [
|
|
193
|
+
"Create at least one task with const taskName = defineTask(\"task-id\", (args, taskCtx) => ({ ... }))",
|
|
194
|
+
"Move the main implementation and verification work into those tasks instead of doing it directly in process(inputs, ctx)",
|
|
195
|
+
"Have process(inputs, ctx) orchestrate the work by awaiting ctx.task(taskName, args)",
|
|
196
|
+
],
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
const taskIdsMissingKind = (0, validationSource_1.getDefineTaskIdsMissingKind)(source);
|
|
200
|
+
if (taskIdsMissingKind.length > 0) {
|
|
201
|
+
throw new utils_1.BabysitterRuntimeError("InvalidProcessSourceError", `Process file at ${filePath} defines task(s) without a top-level kind: ${taskIdsMissingKind.join(", ")}`, {
|
|
202
|
+
category: utils_1.ErrorCategory.Validation,
|
|
203
|
+
nextSteps: [
|
|
204
|
+
"Every TaskDef returned from defineTask(...) must include a top-level kind string",
|
|
205
|
+
"Use kind: \"agent\" with agent: { ... }, kind: \"shell\" with shell: { command: ... }, or another supported effect kind that the agent will execute and post manually",
|
|
206
|
+
],
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
if (!(0, validationSource_1.hasCtxTaskInvocation)(source)) {
|
|
210
|
+
throw new utils_1.BabysitterRuntimeError("InvalidProcessSourceError", `Process file at ${filePath} does not invoke any babysitter tasks through ctx.task(...)`, {
|
|
211
|
+
category: utils_1.ErrorCategory.Validation,
|
|
212
|
+
nextSteps: [
|
|
213
|
+
"After defining tasks with defineTask(...), run them from process(inputs, ctx) via await ctx.task(taskName, args)",
|
|
214
|
+
"Do not perform the main implementation directly in process(inputs, ctx)",
|
|
215
|
+
],
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
const taskKindShapeMismatches = (0, validationSource_1.getDefineTaskKindShapeMismatches)(source);
|
|
219
|
+
if (taskKindShapeMismatches.length > 0) {
|
|
220
|
+
throw new utils_1.BabysitterRuntimeError("InvalidProcessSourceError", `Process file at ${filePath} has task definition kind mismatches: ${taskKindShapeMismatches
|
|
221
|
+
.map((mismatch) => `${mismatch.id} should use kind "${mismatch.expectedKind}"`)
|
|
222
|
+
.join(", ")}`, {
|
|
223
|
+
category: utils_1.ErrorCategory.Validation,
|
|
224
|
+
nextSteps: [
|
|
225
|
+
"Match each task's kind to its body shape",
|
|
226
|
+
"Agent tasks must use kind: \"agent\" and shell tasks must use kind: \"shell\". Do not generate node task definitions in authored processes",
|
|
227
|
+
],
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
const agentResponderTasksMissingAdapter = (0, validationSource_1.getAgentResponderTasksMissingAdapter)(source);
|
|
231
|
+
if (agentResponderTasksMissingAdapter.length > 0) {
|
|
232
|
+
throw new utils_1.BabysitterRuntimeError("InvalidProcessSourceError", `Process file at ${filePath} defines agent responder task(s) without a non-empty adapter: ${agentResponderTasksMissingAdapter.join(", ")}`, {
|
|
233
|
+
category: utils_1.ErrorCategory.Validation,
|
|
234
|
+
nextSteps: [
|
|
235
|
+
"Agent responder tasks must use kind: \"agent\" with agent.responderType: \"agent\"",
|
|
236
|
+
"Set agent.adapter to a non-empty adapters adapter name such as \"codex\" or \"claude-code\"",
|
|
237
|
+
"If adapter routing is optional, set fallbackType: \"internal\" but keep adapter present for the preferred agent responder",
|
|
238
|
+
],
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
if ((0, validationSource_1.hasAgentResponderTasks)(source)) {
|
|
242
|
+
try {
|
|
243
|
+
const externalAgents = await discoverExternalAgentsForValidation({
|
|
244
|
+
cwd: path.dirname(path.resolve(filePath)),
|
|
245
|
+
timeout: 1000,
|
|
246
|
+
});
|
|
247
|
+
if (!externalAgents.available) {
|
|
248
|
+
console.warn("[babysitter] process uses agent responder tasks but adapters is not detected; validation will continue");
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
catch {
|
|
252
|
+
console.warn("[babysitter] process uses agent responder tasks but adapters discovery failed; validation will continue");
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
const agentTaskIds = (0, validationSource_1.getDefineTaskIdsByKind)(source, "agent");
|
|
256
|
+
if (agentTaskIds.length === 0) {
|
|
257
|
+
throw new utils_1.BabysitterRuntimeError("InvalidProcessSourceError", `Process file at ${filePath} does not define any agent tasks`, {
|
|
258
|
+
category: utils_1.ErrorCategory.Validation,
|
|
259
|
+
nextSteps: [
|
|
260
|
+
"Define at least one agent task with kind: \"agent\" for the main planning, implementation, or refinement work",
|
|
261
|
+
"Use shell tasks only for concrete runnable commands such as tests, builds, package installs, or linters",
|
|
262
|
+
],
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
const nodeTaskIds = (0, validationSource_1.getDefineTaskIdsByKind)(source, "node");
|
|
266
|
+
if (nodeTaskIds.length > 0) {
|
|
267
|
+
throw new utils_1.BabysitterRuntimeError("InvalidProcessSourceError", `Process file at ${filePath} defines forbidden node tasks: ${nodeTaskIds.join(", ")}`, {
|
|
268
|
+
category: utils_1.ErrorCategory.Validation,
|
|
269
|
+
nextSteps: [
|
|
270
|
+
"Replace each node task with an agent or skill task",
|
|
271
|
+
"If the work is a concrete existing CLI command, use a shell task and have the orchestrating agent execute it and post the result",
|
|
272
|
+
],
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
const invalidCtxTaskTargets = (0, validationSource_1.getInvalidCtxTaskTargets)(source);
|
|
276
|
+
if (invalidCtxTaskTargets.length > 0) {
|
|
277
|
+
throw new utils_1.BabysitterRuntimeError("InvalidProcessSourceError", `Process file at ${filePath} calls ctx.task(...) with values that are not DefinedTask bindings created via defineTask(...): ${invalidCtxTaskTargets.join(", ")}`, {
|
|
278
|
+
category: utils_1.ErrorCategory.Validation,
|
|
279
|
+
nextSteps: [
|
|
280
|
+
"Define each task with const taskName = defineTask(\"task-id\", (args, taskCtx) => ({ ... }))",
|
|
281
|
+
"Pass only those DefinedTask bindings to await ctx.task(taskName, args)",
|
|
282
|
+
"Do not pass plain object task definitions, inline literals, or ad-hoc task objects to ctx.task(...)",
|
|
283
|
+
],
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
function _setDiscoverExternalAgentsForValidationTesting(fn) {
|
|
288
|
+
discoverExternalAgentsForValidation = fn ?? discoverExternalAgentsViaProvider;
|
|
289
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function hasDefineTaskBlocks(source: string): boolean;
|
|
2
|
+
export declare function getDefineTaskIdsMissingKind(source: string): string[];
|
|
3
|
+
export declare function getDefineTaskKindShapeMismatches(source: string): Array<{
|
|
4
|
+
id: string;
|
|
5
|
+
expectedKind: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function getAgentResponderTasksMissingAdapter(source: string): string[];
|
|
8
|
+
export declare function hasAgentResponderTasks(source: string): boolean;
|
|
9
|
+
export declare function getInvalidCtxTaskTargets(source: string): string[];
|
|
10
|
+
export declare function hasCtxTaskInvocation(source: string): boolean;
|
|
11
|
+
export declare function getUnresolvedTemplatePlaceholders(source: string): string[];
|
|
12
|
+
export declare function getDefineTaskIdsByKind(source: string, kind: "agent" | "shell" | "node"): string[];
|
|
13
|
+
//# sourceMappingURL=validationSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validationSource.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/planProcess/validationSource.ts"],"names":[],"mappings":"AAeA,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE3D;AAyQD,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAIpE;AAED,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC,CAgB5G;AAWD,wBAAgB,oCAAoC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAI7E;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAwBjE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ1E;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,EAAE,CAOjG"}
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hasDefineTaskBlocks = hasDefineTaskBlocks;
|
|
4
|
+
exports.getDefineTaskIdsMissingKind = getDefineTaskIdsMissingKind;
|
|
5
|
+
exports.getDefineTaskKindShapeMismatches = getDefineTaskKindShapeMismatches;
|
|
6
|
+
exports.getAgentResponderTasksMissingAdapter = getAgentResponderTasksMissingAdapter;
|
|
7
|
+
exports.hasAgentResponderTasks = hasAgentResponderTasks;
|
|
8
|
+
exports.getInvalidCtxTaskTargets = getInvalidCtxTaskTargets;
|
|
9
|
+
exports.hasCtxTaskInvocation = hasCtxTaskInvocation;
|
|
10
|
+
exports.getUnresolvedTemplatePlaceholders = getUnresolvedTemplatePlaceholders;
|
|
11
|
+
exports.getDefineTaskIdsByKind = getDefineTaskIdsByKind;
|
|
12
|
+
function getDefineTaskBlocks(source) {
|
|
13
|
+
const normalized = source.replace(/\r\n/g, "\n");
|
|
14
|
+
const pattern = /defineTask\(\s*(['"`])([^'"`]+)\1\s*,\s*(?:async\s*)?\([^)]*\)\s*=>\s*\(\{([\s\S]*?)\}\)\s*(?:,\s*\{[\s\S]*?\}\s*)?\)/g;
|
|
15
|
+
const blocks = [];
|
|
16
|
+
let match;
|
|
17
|
+
while ((match = pattern.exec(normalized)) !== null) {
|
|
18
|
+
blocks.push({
|
|
19
|
+
id: match[2],
|
|
20
|
+
body: match[3] ?? "",
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return blocks;
|
|
24
|
+
}
|
|
25
|
+
function hasDefineTaskBlocks(source) {
|
|
26
|
+
return getDefineTaskBlocks(source).length > 0;
|
|
27
|
+
}
|
|
28
|
+
function getTopLevelTaskProperties(body) {
|
|
29
|
+
const normalized = body.replace(/\r\n/g, "\n");
|
|
30
|
+
const properties = new Map();
|
|
31
|
+
let index = 0;
|
|
32
|
+
while (index < normalized.length) {
|
|
33
|
+
index = skipWhitespaceAndComments(normalized, index);
|
|
34
|
+
if (index >= normalized.length) {
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
if (normalized[index] === ",") {
|
|
38
|
+
index += 1;
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
if (normalized.startsWith("...", index)) {
|
|
42
|
+
index = scanTopLevelValueEnd(normalized, index + 3);
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const key = readTopLevelPropertyKey(normalized, index);
|
|
46
|
+
if (!key) {
|
|
47
|
+
index = scanTopLevelValueEnd(normalized, index);
|
|
48
|
+
if (normalized[index] === ",") {
|
|
49
|
+
index += 1;
|
|
50
|
+
}
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
index = key.nextIndex;
|
|
54
|
+
index = skipWhitespaceAndComments(normalized, index);
|
|
55
|
+
if (normalized[index] !== ":") {
|
|
56
|
+
index = scanTopLevelValueEnd(normalized, index);
|
|
57
|
+
if (normalized[index] === ",") {
|
|
58
|
+
index += 1;
|
|
59
|
+
}
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
const valueStart = index + 1;
|
|
63
|
+
const valueEnd = scanTopLevelValueEnd(normalized, valueStart);
|
|
64
|
+
properties.set(key.name, normalized.slice(valueStart, valueEnd).trim());
|
|
65
|
+
index = valueEnd;
|
|
66
|
+
if (normalized[index] === ",") {
|
|
67
|
+
index += 1;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return properties;
|
|
71
|
+
}
|
|
72
|
+
function readTopLevelPropertyKey(source, index) {
|
|
73
|
+
const ch = source[index] ?? "";
|
|
74
|
+
if (/[A-Za-z_$]/.test(ch)) {
|
|
75
|
+
let nextIndex = index + 1;
|
|
76
|
+
while (/[\w$]/.test(source[nextIndex] ?? "")) {
|
|
77
|
+
nextIndex += 1;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
name: source.slice(index, nextIndex),
|
|
81
|
+
nextIndex,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
if (ch === "\"" || ch === "'" || ch === "`") {
|
|
85
|
+
let nextIndex = index + 1;
|
|
86
|
+
let name = "";
|
|
87
|
+
while (nextIndex < source.length) {
|
|
88
|
+
const current = source[nextIndex] ?? "";
|
|
89
|
+
if (current === "\\") {
|
|
90
|
+
name += current;
|
|
91
|
+
nextIndex += 1;
|
|
92
|
+
if (nextIndex < source.length) {
|
|
93
|
+
name += source[nextIndex] ?? "";
|
|
94
|
+
nextIndex += 1;
|
|
95
|
+
}
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
if (current === ch) {
|
|
99
|
+
return { name, nextIndex: nextIndex + 1 };
|
|
100
|
+
}
|
|
101
|
+
name += current;
|
|
102
|
+
nextIndex += 1;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
function skipWhitespaceAndComments(source, start) {
|
|
108
|
+
let index = start;
|
|
109
|
+
while (index < source.length) {
|
|
110
|
+
const ch = source[index] ?? "";
|
|
111
|
+
const next = source[index + 1] ?? "";
|
|
112
|
+
if (/\s/.test(ch)) {
|
|
113
|
+
index += 1;
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
if (ch === "/" && next === "/") {
|
|
117
|
+
index += 2;
|
|
118
|
+
while (index < source.length && source[index] !== "\n") {
|
|
119
|
+
index += 1;
|
|
120
|
+
}
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
if (ch === "/" && next === "*") {
|
|
124
|
+
index += 2;
|
|
125
|
+
while (index < source.length && !(source[index] === "*" && source[index + 1] === "/")) {
|
|
126
|
+
index += 1;
|
|
127
|
+
}
|
|
128
|
+
index = Math.min(index + 2, source.length);
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
return index;
|
|
134
|
+
}
|
|
135
|
+
function scanTopLevelValueEnd(source, start) {
|
|
136
|
+
let index = start;
|
|
137
|
+
let depthParen = 0;
|
|
138
|
+
let depthBracket = 0;
|
|
139
|
+
let depthBrace = 0;
|
|
140
|
+
let state = "normal";
|
|
141
|
+
const templateExpressionBraceStack = [];
|
|
142
|
+
while (index < source.length) {
|
|
143
|
+
const ch = source[index] ?? "";
|
|
144
|
+
const next = source[index + 1] ?? "";
|
|
145
|
+
if (state === "line-comment") {
|
|
146
|
+
if (ch === "\n") {
|
|
147
|
+
state = "normal";
|
|
148
|
+
}
|
|
149
|
+
index += 1;
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
if (state === "block-comment") {
|
|
153
|
+
if (ch === "*" && next === "/") {
|
|
154
|
+
index += 2;
|
|
155
|
+
state = "normal";
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
index += 1;
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
if (state === "single") {
|
|
162
|
+
if (ch === "\\") {
|
|
163
|
+
index += 2;
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
if (ch === "'") {
|
|
167
|
+
state = "normal";
|
|
168
|
+
}
|
|
169
|
+
index += 1;
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
if (state === "double") {
|
|
173
|
+
if (ch === "\\") {
|
|
174
|
+
index += 2;
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
if (ch === "\"") {
|
|
178
|
+
state = "normal";
|
|
179
|
+
}
|
|
180
|
+
index += 1;
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
if (state === "template") {
|
|
184
|
+
if (ch === "\\") {
|
|
185
|
+
index += 2;
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
if (ch === "$" && next === "{") {
|
|
189
|
+
templateExpressionBraceStack.push(0);
|
|
190
|
+
index += 2;
|
|
191
|
+
state = "normal";
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
if (ch === "`") {
|
|
195
|
+
state = "normal";
|
|
196
|
+
}
|
|
197
|
+
index += 1;
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
if (ch === "/" && next === "/") {
|
|
201
|
+
index += 2;
|
|
202
|
+
state = "line-comment";
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
if (ch === "/" && next === "*") {
|
|
206
|
+
index += 2;
|
|
207
|
+
state = "block-comment";
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
if (ch === "'") {
|
|
211
|
+
index += 1;
|
|
212
|
+
state = "single";
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
if (ch === "\"") {
|
|
216
|
+
index += 1;
|
|
217
|
+
state = "double";
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
if (ch === "`") {
|
|
221
|
+
index += 1;
|
|
222
|
+
state = "template";
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
if (ch === "," && depthParen === 0 && depthBracket === 0 && depthBrace === 0 && templateExpressionBraceStack.length === 0) {
|
|
226
|
+
return index;
|
|
227
|
+
}
|
|
228
|
+
if (ch === "(") {
|
|
229
|
+
depthParen += 1;
|
|
230
|
+
}
|
|
231
|
+
else if (ch === ")") {
|
|
232
|
+
depthParen = Math.max(0, depthParen - 1);
|
|
233
|
+
}
|
|
234
|
+
else if (ch === "[") {
|
|
235
|
+
depthBracket += 1;
|
|
236
|
+
}
|
|
237
|
+
else if (ch === "]") {
|
|
238
|
+
depthBracket = Math.max(0, depthBracket - 1);
|
|
239
|
+
}
|
|
240
|
+
else if (ch === "{") {
|
|
241
|
+
depthBrace += 1;
|
|
242
|
+
if (templateExpressionBraceStack.length > 0) {
|
|
243
|
+
templateExpressionBraceStack[templateExpressionBraceStack.length - 1] += 1;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
else if (ch === "}") {
|
|
247
|
+
if (templateExpressionBraceStack.length > 0) {
|
|
248
|
+
const templateDepthIndex = templateExpressionBraceStack.length - 1;
|
|
249
|
+
if (templateExpressionBraceStack[templateDepthIndex] === 0) {
|
|
250
|
+
templateExpressionBraceStack.pop();
|
|
251
|
+
state = "template";
|
|
252
|
+
index += 1;
|
|
253
|
+
continue;
|
|
254
|
+
}
|
|
255
|
+
templateExpressionBraceStack[templateDepthIndex] -= 1;
|
|
256
|
+
depthBrace = Math.max(0, depthBrace - 1);
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
depthBrace = Math.max(0, depthBrace - 1);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
index += 1;
|
|
263
|
+
}
|
|
264
|
+
return index;
|
|
265
|
+
}
|
|
266
|
+
function getDefineTaskIdsMissingKind(source) {
|
|
267
|
+
return getDefineTaskBlocks(source)
|
|
268
|
+
.filter((block) => !getTopLevelTaskProperties(block.body).has("kind"))
|
|
269
|
+
.map((block) => block.id);
|
|
270
|
+
}
|
|
271
|
+
function getDefineTaskKindShapeMismatches(source) {
|
|
272
|
+
const mismatches = [];
|
|
273
|
+
for (const block of getDefineTaskBlocks(source)) {
|
|
274
|
+
const properties = getTopLevelTaskProperties(block.body);
|
|
275
|
+
const kindValue = properties.get("kind")?.trim();
|
|
276
|
+
if (properties.has("agent") && kindValue !== "\"agent\"" && kindValue !== "'agent'" && kindValue !== "`agent`") {
|
|
277
|
+
mismatches.push({ id: block.id, expectedKind: "agent" });
|
|
278
|
+
}
|
|
279
|
+
if (properties.has("shell") && kindValue !== "\"shell\"" && kindValue !== "'shell'" && kindValue !== "`shell`") {
|
|
280
|
+
mismatches.push({ id: block.id, expectedKind: "shell" });
|
|
281
|
+
}
|
|
282
|
+
if (properties.has("node") && kindValue !== "\"node\"" && kindValue !== "'node'" && kindValue !== "`node`") {
|
|
283
|
+
mismatches.push({ id: block.id, expectedKind: "node" });
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return mismatches;
|
|
287
|
+
}
|
|
288
|
+
function isAgentResponderTaskBody(body) {
|
|
289
|
+
return /\bresponderType\s*:\s*["'`]agent["'`]/.test(body)
|
|
290
|
+
|| /\bexternal\s*:\s*true\b/.test(body);
|
|
291
|
+
}
|
|
292
|
+
function hasNonEmptyAdapterLiteral(body) {
|
|
293
|
+
return /\badapter\s*:\s*["'`][^"'`\s][^"'`]*["'`]/.test(body);
|
|
294
|
+
}
|
|
295
|
+
function getAgentResponderTasksMissingAdapter(source) {
|
|
296
|
+
return getDefineTaskBlocks(source)
|
|
297
|
+
.filter((block) => isAgentResponderTaskBody(block.body) && !hasNonEmptyAdapterLiteral(block.body))
|
|
298
|
+
.map((block) => block.id);
|
|
299
|
+
}
|
|
300
|
+
function hasAgentResponderTasks(source) {
|
|
301
|
+
return getDefineTaskBlocks(source).some((block) => isAgentResponderTaskBody(block.body));
|
|
302
|
+
}
|
|
303
|
+
function getInvalidCtxTaskTargets(source) {
|
|
304
|
+
const normalized = source.replace(/\r\n/g, "\n");
|
|
305
|
+
const definedTaskBindings = new Set();
|
|
306
|
+
const defineTaskBindingPattern = /\b(?:export\s+)?(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*defineTask\s*\(/g;
|
|
307
|
+
let defineTaskBindingMatch;
|
|
308
|
+
while ((defineTaskBindingMatch = defineTaskBindingPattern.exec(normalized)) !== null) {
|
|
309
|
+
definedTaskBindings.add(defineTaskBindingMatch[1]);
|
|
310
|
+
}
|
|
311
|
+
const invalidTargets = new Set();
|
|
312
|
+
const ctxTaskPattern = /\bctx\.task\s*\(\s*([^,\n]+?)\s*,/g;
|
|
313
|
+
let ctxTaskMatch;
|
|
314
|
+
while ((ctxTaskMatch = ctxTaskPattern.exec(normalized)) !== null) {
|
|
315
|
+
const target = (ctxTaskMatch[1] ?? "").trim();
|
|
316
|
+
if (!target) {
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
319
|
+
if (/^[A-Za-z_$][\w$]*$/.test(target) && definedTaskBindings.has(target)) {
|
|
320
|
+
continue;
|
|
321
|
+
}
|
|
322
|
+
invalidTargets.add(target.replace(/\s+/g, " ").slice(0, 80));
|
|
323
|
+
}
|
|
324
|
+
return Array.from(invalidTargets);
|
|
325
|
+
}
|
|
326
|
+
function hasCtxTaskInvocation(source) {
|
|
327
|
+
return /\bctx\.task\s*\(/.test(source.replace(/\r\n/g, "\n"));
|
|
328
|
+
}
|
|
329
|
+
function getUnresolvedTemplatePlaceholders(source) {
|
|
330
|
+
const normalized = source.replace(/\r\n/g, "\n");
|
|
331
|
+
const matches = normalized.match(/\{\{\s*[A-Za-z_$][\w$.]*\s*\}\}/g) ?? [];
|
|
332
|
+
const unique = new Set();
|
|
333
|
+
for (const match of matches) {
|
|
334
|
+
unique.add(match.replace(/\s+/g, ""));
|
|
335
|
+
}
|
|
336
|
+
return Array.from(unique).slice(0, 8);
|
|
337
|
+
}
|
|
338
|
+
function getDefineTaskIdsByKind(source, kind) {
|
|
339
|
+
return getDefineTaskBlocks(source)
|
|
340
|
+
.filter((block) => {
|
|
341
|
+
const kindValue = getTopLevelTaskProperties(block.body).get("kind")?.trim();
|
|
342
|
+
return kindValue === `"${kind}"` || kindValue === `'${kind}'` || kindValue === `\`${kind}\``;
|
|
343
|
+
})
|
|
344
|
+
.map((block) => block.id);
|
|
345
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validationText.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/planProcess/validationText.ts"],"names":[],"mappings":"AAkJA,wBAAgB,sCAAsC,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAM9E;AAED,wBAAgB,gDAAgD,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CASxF"}
|