@a5c-ai/babysitter-sdk 5.0.0 → 5.0.1-staging.04a3db697
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/dist/breakpoints/evaluator.d.ts +33 -0
- package/dist/breakpoints/evaluator.d.ts.map +1 -0
- package/dist/breakpoints/evaluator.js +156 -0
- package/dist/breakpoints/index.d.ts +9 -0
- package/dist/breakpoints/index.d.ts.map +1 -0
- package/dist/breakpoints/index.js +19 -0
- package/dist/breakpoints/patterns.d.ts +24 -0
- package/dist/breakpoints/patterns.d.ts.map +1 -0
- package/dist/breakpoints/patterns.js +88 -0
- package/dist/breakpoints/proven-verification.d.ts +51 -0
- package/dist/breakpoints/proven-verification.d.ts.map +1 -0
- package/dist/breakpoints/proven-verification.js +120 -0
- package/dist/breakpoints/rules.d.ts +26 -0
- package/dist/breakpoints/rules.d.ts.map +1 -0
- package/dist/breakpoints/rules.js +110 -0
- package/dist/breakpoints/types.d.ts +78 -0
- package/dist/breakpoints/types.d.ts.map +1 -0
- package/dist/breakpoints/types.js +7 -0
- package/dist/cli/commands/breakpointRules.d.ts +26 -0
- package/dist/cli/commands/breakpointRules.d.ts.map +1 -0
- package/dist/cli/commands/breakpointRules.js +222 -0
- package/dist/cli/commands/compressOutput.d.ts +24 -0
- package/dist/cli/commands/compressOutput.d.ts.map +1 -0
- package/dist/cli/commands/compressOutput.js +85 -0
- package/dist/cli/commands/compressOutputHelpers.d.ts +15 -0
- package/dist/cli/commands/compressOutputHelpers.d.ts.map +1 -0
- package/dist/cli/commands/compressOutputHelpers.js +367 -0
- package/dist/cli/commands/compression/reset.d.ts +15 -0
- package/dist/cli/commands/compression/reset.d.ts.map +1 -0
- package/dist/cli/commands/compression/reset.js +87 -0
- package/dist/cli/commands/compression/set.d.ts +26 -0
- package/dist/cli/commands/compression/set.d.ts.map +1 -0
- package/dist/cli/commands/compression/set.js +179 -0
- package/dist/cli/commands/compression/status.d.ts +12 -0
- package/dist/cli/commands/compression/status.d.ts.map +1 -0
- package/dist/cli/commands/compression/status.js +133 -0
- package/dist/cli/commands/compression/toggle.d.ts +17 -0
- package/dist/cli/commands/compression/toggle.d.ts.map +1 -0
- package/dist/cli/commands/compression/toggle.js +115 -0
- package/dist/cli/commands/configure/output.d.ts +6 -0
- package/dist/cli/commands/configure/output.d.ts.map +1 -0
- package/dist/cli/commands/configure/output.js +164 -0
- package/dist/cli/commands/configure.d.ts +124 -0
- package/dist/cli/commands/configure.d.ts.map +1 -0
- package/dist/cli/commands/configure.js +300 -0
- package/dist/cli/commands/costStats.d.ts +13 -0
- package/dist/cli/commands/costStats.d.ts.map +1 -0
- package/dist/cli/commands/costStats.js +327 -0
- package/dist/cli/commands/detectExistingRun.d.ts +14 -0
- package/dist/cli/commands/detectExistingRun.d.ts.map +1 -0
- package/dist/cli/commands/detectExistingRun.js +89 -0
- package/dist/cli/commands/harness/install.d.ts +17 -0
- package/dist/cli/commands/harness/install.d.ts.map +1 -0
- package/dist/cli/commands/harness/install.js +83 -0
- package/dist/cli/commands/health/checks.d.ts +10 -0
- package/dist/cli/commands/health/checks.d.ts.map +1 -0
- package/dist/cli/commands/health/checks.js +268 -0
- package/dist/cli/commands/health/environment.d.ts +3 -0
- package/dist/cli/commands/health/environment.d.ts.map +1 -0
- package/dist/cli/commands/health/environment.js +89 -0
- package/dist/cli/commands/health/output.d.ts +5 -0
- package/dist/cli/commands/health/output.d.ts.map +1 -0
- package/dist/cli/commands/health/output.js +92 -0
- package/dist/cli/commands/health.d.ts +74 -0
- package/dist/cli/commands/health.d.ts.map +1 -0
- package/dist/cli/commands/health.js +92 -0
- package/dist/cli/commands/hooks/log.d.ts +15 -0
- package/dist/cli/commands/hooks/log.d.ts.map +1 -0
- package/dist/cli/commands/hooks/log.js +298 -0
- package/dist/cli/commands/hooks/run.d.ts +25 -0
- package/dist/cli/commands/hooks/run.d.ts.map +1 -0
- package/dist/cli/commands/hooks/run.js +234 -0
- package/dist/cli/commands/instructions.d.ts +20 -0
- package/dist/cli/commands/instructions.d.ts.map +1 -0
- package/dist/cli/commands/instructions.js +292 -0
- package/dist/cli/commands/log.d.ts +22 -0
- package/dist/cli/commands/log.d.ts.map +1 -0
- package/dist/cli/commands/log.js +99 -0
- package/dist/cli/commands/mcpServe.d.ts +11 -0
- package/dist/cli/commands/mcpServe.d.ts.map +1 -0
- package/dist/cli/commands/mcpServe.js +35 -0
- package/dist/cli/commands/plugin/marketplaceCommands.d.ts +5 -0
- package/dist/cli/commands/plugin/marketplaceCommands.d.ts.map +1 -0
- package/dist/cli/commands/plugin/marketplaceCommands.js +114 -0
- package/dist/cli/commands/plugin/packageCommands.d.ts +6 -0
- package/dist/cli/commands/plugin/packageCommands.d.ts.map +1 -0
- package/dist/cli/commands/plugin/packageCommands.js +270 -0
- package/dist/cli/commands/plugin/registryCommands.d.ts +5 -0
- package/dist/cli/commands/plugin/registryCommands.d.ts.map +1 -0
- package/dist/cli/commands/plugin/registryCommands.js +128 -0
- package/dist/cli/commands/plugin/shared.d.ts +20 -0
- package/dist/cli/commands/plugin/shared.d.ts.map +1 -0
- package/dist/cli/commands/plugin/shared.js +44 -0
- package/dist/cli/commands/plugin.d.ts +9 -0
- package/dist/cli/commands/plugin.d.ts.map +1 -0
- package/dist/cli/commands/plugin.js +22 -0
- package/dist/cli/commands/processLibrary.d.ts +16 -0
- package/dist/cli/commands/processLibrary.d.ts.map +1 -0
- package/dist/cli/commands/processLibrary.js +156 -0
- package/dist/cli/commands/profile.d.ts +26 -0
- package/dist/cli/commands/profile.d.ts.map +1 -0
- package/dist/cli/commands/profile.js +213 -0
- package/dist/cli/commands/runIterate.d.ts +49 -0
- package/dist/cli/commands/runIterate.d.ts.map +1 -0
- package/dist/cli/commands/runIterate.js +156 -0
- package/dist/cli/commands/runIterateHelpers.d.ts +29 -0
- package/dist/cli/commands/runIterateHelpers.d.ts.map +1 -0
- package/dist/cli/commands/runIterateHelpers.js +134 -0
- package/dist/cli/commands/session/associate.d.ts +10 -0
- package/dist/cli/commands/session/associate.d.ts.map +1 -0
- package/dist/cli/commands/session/associate.js +77 -0
- package/dist/cli/commands/session/checkIteration.d.ts +7 -0
- package/dist/cli/commands/session/checkIteration.d.ts.map +1 -0
- package/dist/cli/commands/session/checkIteration.js +76 -0
- package/dist/cli/commands/session/cleanup.d.ts +5 -0
- package/dist/cli/commands/session/cleanup.d.ts.map +1 -0
- package/dist/cli/commands/session/cleanup.js +20 -0
- package/dist/cli/commands/session/common.d.ts +16 -0
- package/dist/cli/commands/session/common.d.ts.map +1 -0
- package/dist/cli/commands/session/common.js +33 -0
- package/dist/cli/commands/session/init.d.ts +10 -0
- package/dist/cli/commands/session/init.d.ts.map +1 -0
- package/dist/cli/commands/session/init.js +76 -0
- package/dist/cli/commands/session/iterationMessage.d.ts +17 -0
- package/dist/cli/commands/session/iterationMessage.d.ts.map +1 -0
- package/dist/cli/commands/session/iterationMessage.js +106 -0
- package/dist/cli/commands/session/lastMessage.d.ts +13 -0
- package/dist/cli/commands/session/lastMessage.d.ts.map +1 -0
- package/dist/cli/commands/session/lastMessage.js +45 -0
- package/dist/cli/commands/session/resume.d.ts +10 -0
- package/dist/cli/commands/session/resume.d.ts.map +1 -0
- package/dist/cli/commands/session/resume.js +129 -0
- package/dist/cli/commands/session/state.d.ts +7 -0
- package/dist/cli/commands/session/state.d.ts.map +1 -0
- package/dist/cli/commands/session/state.js +49 -0
- package/dist/cli/commands/session/update.d.ts +10 -0
- package/dist/cli/commands/session/update.d.ts.map +1 -0
- package/dist/cli/commands/session/update.js +54 -0
- package/dist/cli/commands/session/whoami.d.ts +5 -0
- package/dist/cli/commands/session/whoami.d.ts.map +1 -0
- package/dist/cli/commands/session/whoami.js +22 -0
- package/dist/cli/commands/skill/discoveryLocal.d.ts +32 -0
- package/dist/cli/commands/skill/discoveryLocal.d.ts.map +1 -0
- package/dist/cli/commands/skill/discoveryLocal.js +383 -0
- package/dist/cli/commands/skill/processMarkers.d.ts +9 -0
- package/dist/cli/commands/skill/processMarkers.d.ts.map +1 -0
- package/dist/cli/commands/skill/processMarkers.js +104 -0
- package/dist/cli/commands/skill/remoteDiscovery.d.ts +4 -0
- package/dist/cli/commands/skill/remoteDiscovery.d.ts.map +1 -0
- package/dist/cli/commands/skill/remoteDiscovery.js +164 -0
- package/dist/cli/commands/skill/types.d.ts +69 -0
- package/dist/cli/commands/skill/types.d.ts.map +1 -0
- package/dist/cli/commands/skill/types.js +2 -0
- package/dist/cli/commands/skill.d.ts +20 -0
- package/dist/cli/commands/skill.d.ts.map +1 -0
- package/dist/cli/commands/skill.js +292 -0
- package/dist/cli/commands/tokensStats.d.ts +70 -0
- package/dist/cli/commands/tokensStats.d.ts.map +1 -0
- package/dist/cli/commands/tokensStats.js +238 -0
- package/dist/cli/commands/tokensStatsFormatting.d.ts +9 -0
- package/dist/cli/commands/tokensStatsFormatting.d.ts.map +1 -0
- package/dist/cli/commands/tokensStatsFormatting.js +137 -0
- package/dist/cli/completionProof.d.ts +4 -0
- package/dist/cli/completionProof.d.ts.map +1 -0
- package/dist/cli/completionProof.js +45 -0
- package/dist/cli/main/argFlagParsers.d.ts +9 -0
- package/dist/cli/main/argFlagParsers.d.ts.map +1 -0
- package/dist/cli/main/argFlagParsers.js +346 -0
- package/dist/cli/main/argFlags.d.ts +4 -0
- package/dist/cli/main/argFlags.d.ts.map +1 -0
- package/dist/cli/main/argFlags.js +77 -0
- package/dist/cli/main/argPositionals.d.ts +3 -0
- package/dist/cli/main/argPositionals.d.ts.map +1 -0
- package/dist/cli/main/argPositionals.js +87 -0
- package/dist/cli/main/args.d.ts +7 -0
- package/dist/cli/main/args.d.ts.map +1 -0
- package/dist/cli/main/args.js +120 -0
- package/dist/cli/main/dispatch.d.ts +5 -0
- package/dist/cli/main/dispatch.d.ts.map +1 -0
- package/dist/cli/main/dispatch.js +44 -0
- package/dist/cli/main/dispatchHarness.d.ts +3 -0
- package/dist/cli/main/dispatchHarness.d.ts.map +1 -0
- package/dist/cli/main/dispatchHarness.js +73 -0
- package/dist/cli/main/dispatchRunSession.d.ts +3 -0
- package/dist/cli/main/dispatchRunSession.d.ts.map +1 -0
- package/dist/cli/main/dispatchRunSession.js +316 -0
- package/dist/cli/main/program.d.ts +17 -0
- package/dist/cli/main/program.d.ts.map +1 -0
- package/dist/cli/main/program.js +94 -0
- package/dist/cli/main/runAssignProcess.d.ts +3 -0
- package/dist/cli/main/runAssignProcess.d.ts.map +1 -0
- package/dist/cli/main/runAssignProcess.js +169 -0
- package/dist/cli/main/runCommands.d.ts +4 -0
- package/dist/cli/main/runCommands.d.ts.map +1 -0
- package/dist/cli/main/runCommands.js +13 -0
- package/dist/cli/main/runCreate.d.ts +5 -0
- package/dist/cli/main/runCreate.d.ts.map +1 -0
- package/dist/cli/main/runCreate.js +382 -0
- package/dist/cli/main/runInspection.d.ts +5 -0
- package/dist/cli/main/runInspection.d.ts.map +1 -0
- package/dist/cli/main/runInspection.js +139 -0
- package/dist/cli/main/runState.d.ts +55 -0
- package/dist/cli/main/runState.d.ts.map +1 -0
- package/dist/cli/main/runState.js +226 -0
- package/dist/cli/main/runSupport.d.ts +49 -0
- package/dist/cli/main/runSupport.d.ts.map +1 -0
- package/dist/cli/main/runSupport.js +364 -0
- package/dist/cli/main/taskCommands.d.ts +6 -0
- package/dist/cli/main/taskCommands.d.ts.map +1 -0
- package/dist/cli/main/taskCommands.js +356 -0
- package/dist/cli/main/types.d.ts +120 -0
- package/dist/cli/main/types.d.ts.map +1 -0
- package/dist/cli/main/types.js +2 -0
- package/dist/cli/main/ui.d.ts +12 -0
- package/dist/cli/main/ui.d.ts.map +1 -0
- package/dist/cli/main/ui.js +177 -0
- package/dist/cli/main/usage.d.ts +7 -0
- package/dist/cli/main/usage.d.ts.map +1 -0
- package/dist/cli/main/usage.js +154 -0
- package/dist/cli/main.d.ts +13 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +50 -0
- package/dist/cli/mcpServeEntry.d.ts +3 -0
- package/dist/cli/mcpServeEntry.d.ts.map +1 -0
- package/dist/cli/mcpServeEntry.js +8 -0
- package/dist/cli/render/ansi.d.ts +12 -0
- package/dist/cli/render/ansi.d.ts.map +1 -0
- package/dist/cli/render/ansi.js +24 -0
- package/dist/cli/render/effectTree.d.ts +17 -0
- package/dist/cli/render/effectTree.d.ts.map +1 -0
- package/dist/cli/render/effectTree.js +46 -0
- package/dist/cli/render/events/effectRequested.d.ts +3 -0
- package/dist/cli/render/events/effectRequested.d.ts.map +1 -0
- package/dist/cli/render/events/effectRequested.js +22 -0
- package/dist/cli/render/events/effectResolved.d.ts +3 -0
- package/dist/cli/render/events/effectResolved.d.ts.map +1 -0
- package/dist/cli/render/events/effectResolved.js +20 -0
- package/dist/cli/render/events/index.d.ts +4 -0
- package/dist/cli/render/events/index.d.ts.map +1 -0
- package/dist/cli/render/events/index.js +25 -0
- package/dist/cli/render/events/processAssigned.d.ts +3 -0
- package/dist/cli/render/events/processAssigned.d.ts.map +1 -0
- package/dist/cli/render/events/processAssigned.js +22 -0
- package/dist/cli/render/events/runCompleted.d.ts +3 -0
- package/dist/cli/render/events/runCompleted.d.ts.map +1 -0
- package/dist/cli/render/events/runCompleted.js +18 -0
- package/dist/cli/render/events/runCreated.d.ts +3 -0
- package/dist/cli/render/events/runCreated.d.ts.map +1 -0
- package/dist/cli/render/events/runCreated.js +19 -0
- package/dist/cli/render/events/runFailed.d.ts +3 -0
- package/dist/cli/render/events/runFailed.d.ts.map +1 -0
- package/dist/cli/render/events/runFailed.js +23 -0
- package/dist/cli/render/events/types.d.ts +6 -0
- package/dist/cli/render/events/types.d.ts.map +1 -0
- package/dist/cli/render/events/types.js +2 -0
- package/dist/cli/render/index.d.ts +5 -0
- package/dist/cli/render/index.d.ts.map +1 -0
- package/dist/cli/render/index.js +14 -0
- package/dist/cli/render/statusBadge.d.ts +4 -0
- package/dist/cli/render/statusBadge.d.ts.map +1 -0
- package/dist/cli/render/statusBadge.js +25 -0
- package/dist/cli/resolveInputPath.d.ts +61 -0
- package/dist/cli/resolveInputPath.d.ts.map +1 -0
- package/dist/cli/resolveInputPath.js +193 -0
- package/dist/compression/config-loader.d.ts +24 -0
- package/dist/compression/config-loader.d.ts.map +1 -0
- package/dist/compression/config-loader.js +179 -0
- package/dist/compression/config.d.ts +49 -0
- package/dist/compression/config.d.ts.map +1 -0
- package/dist/compression/config.js +41 -0
- package/dist/compression/density-filter.d.ts +20 -0
- package/dist/compression/density-filter.d.ts.map +1 -0
- package/dist/compression/density-filter.js +91 -0
- package/dist/compression/library-cache.d.ts +19 -0
- package/dist/compression/library-cache.d.ts.map +1 -0
- package/dist/compression/library-cache.js +149 -0
- package/dist/config/configValidation.d.ts +22 -0
- package/dist/config/configValidation.d.ts.map +1 -0
- package/dist/config/configValidation.js +140 -0
- package/dist/config/defaults.d.ts +67 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +132 -0
- package/dist/config/index.d.ts +26 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +51 -0
- package/dist/config/runs.d.ts +22 -0
- package/dist/config/runs.d.ts.map +1 -0
- package/dist/config/runs.js +192 -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/index.d.ts +18 -0
- package/dist/cost/index.d.ts.map +1 -0
- package/dist/cost/index.js +38 -0
- package/dist/cost/journal.d.ts +40 -0
- package/dist/cost/journal.d.ts.map +1 -0
- package/dist/cost/journal.js +137 -0
- package/dist/cost/pricing.d.ts +19 -0
- package/dist/cost/pricing.d.ts.map +1 -0
- package/dist/cost/pricing.js +135 -0
- package/dist/cost/types.d.ts +87 -0
- package/dist/cost/types.d.ts.map +1 -0
- package/dist/cost/types.js +19 -0
- package/dist/harness/BaseAdapter.d.ts +93 -0
- package/dist/harness/BaseAdapter.d.ts.map +1 -0
- package/dist/harness/BaseAdapter.js +236 -0
- package/dist/harness/adapters/claude-code.d.ts +24 -0
- package/dist/harness/adapters/claude-code.d.ts.map +1 -0
- package/dist/harness/adapters/claude-code.js +64 -0
- package/dist/harness/adapters/codex.d.ts +12 -0
- package/dist/harness/adapters/codex.d.ts.map +1 -0
- package/dist/harness/adapters/codex.js +37 -0
- package/dist/harness/adapters/cursor.d.ts +13 -0
- package/dist/harness/adapters/cursor.d.ts.map +1 -0
- package/dist/harness/adapters/cursor.js +85 -0
- package/dist/harness/adapters/gemini-cli.d.ts +12 -0
- package/dist/harness/adapters/gemini-cli.d.ts.map +1 -0
- package/dist/harness/adapters/gemini-cli.js +34 -0
- package/dist/harness/adapters/github-copilot.d.ts +13 -0
- package/dist/harness/adapters/github-copilot.d.ts.map +1 -0
- package/dist/harness/adapters/github-copilot.js +59 -0
- package/dist/harness/adapters/index.d.ts +12 -0
- package/dist/harness/adapters/index.d.ts.map +1 -0
- package/dist/harness/adapters/index.js +26 -0
- package/dist/harness/adapters/oh-my-pi.d.ts +12 -0
- package/dist/harness/adapters/oh-my-pi.d.ts.map +1 -0
- package/dist/harness/adapters/oh-my-pi.js +41 -0
- package/dist/harness/adapters/openclaw.d.ts +12 -0
- package/dist/harness/adapters/openclaw.d.ts.map +1 -0
- package/dist/harness/adapters/openclaw.js +49 -0
- package/dist/harness/adapters/opencode.d.ts +12 -0
- package/dist/harness/adapters/opencode.d.ts.map +1 -0
- package/dist/harness/adapters/opencode.js +51 -0
- package/dist/harness/adapters/pi.d.ts +12 -0
- package/dist/harness/adapters/pi.d.ts.map +1 -0
- package/dist/harness/adapters/pi.js +41 -0
- package/dist/harness/amuxFallbackMetadata.d.ts +3 -0
- package/dist/harness/amuxFallbackMetadata.d.ts.map +1 -0
- package/dist/harness/amuxFallbackMetadata.js +201 -0
- package/dist/harness/amuxMetadata.d.ts +51 -0
- package/dist/harness/amuxMetadata.d.ts.map +1 -0
- package/dist/harness/amuxMetadata.js +176 -0
- package/dist/harness/customAdapter.d.ts +14 -0
- package/dist/harness/customAdapter.d.ts.map +1 -0
- package/dist/harness/customAdapter.js +124 -0
- package/dist/harness/derivePromptContext.d.ts +75 -0
- package/dist/harness/derivePromptContext.d.ts.map +1 -0
- package/dist/harness/derivePromptContext.js +120 -0
- package/dist/harness/discovery.d.ts +80 -0
- package/dist/harness/discovery.d.ts.map +1 -0
- package/dist/harness/discovery.js +313 -0
- package/dist/harness/hooks/babysitterHooks.d.ts +23 -0
- package/dist/harness/hooks/babysitterHooks.d.ts.map +1 -0
- package/dist/harness/hooks/babysitterHooks.js +162 -0
- package/dist/harness/hooks/promptContexts.d.ts +24 -0
- package/dist/harness/hooks/promptContexts.d.ts.map +1 -0
- package/dist/harness/hooks/promptContexts.js +106 -0
- package/dist/harness/hooks/runState.d.ts +14 -0
- package/dist/harness/hooks/runState.d.ts.map +1 -0
- package/dist/harness/hooks/runState.js +103 -0
- package/dist/harness/hooks/sessionBinding.d.ts +28 -0
- package/dist/harness/hooks/sessionBinding.d.ts.map +1 -0
- package/dist/harness/hooks/sessionBinding.js +153 -0
- package/dist/harness/hooks/stopHookContinuation.d.ts +44 -0
- package/dist/harness/hooks/stopHookContinuation.d.ts.map +1 -0
- package/dist/harness/hooks/stopHookContinuation.js +280 -0
- package/dist/harness/hooks/stopHookHandler.d.ts +35 -0
- package/dist/harness/hooks/stopHookHandler.d.ts.map +1 -0
- package/dist/harness/hooks/stopHookHandler.js +354 -0
- package/dist/harness/hooks/utils.d.ts +43 -0
- package/dist/harness/hooks/utils.d.ts.map +1 -0
- package/dist/harness/hooks/utils.js +215 -0
- package/dist/harness/index.d.ts +20 -0
- package/dist/harness/index.d.ts.map +1 -0
- package/dist/harness/index.js +51 -0
- package/dist/harness/install.d.ts +71 -0
- package/dist/harness/install.d.ts.map +1 -0
- package/dist/harness/install.js +267 -0
- package/dist/harness/installSupport.d.ts +37 -0
- package/dist/harness/installSupport.d.ts.map +1 -0
- package/dist/harness/installSupport.js +203 -0
- package/dist/harness/internal/promptContext.d.ts +3 -0
- package/dist/harness/internal/promptContext.d.ts.map +1 -0
- package/dist/harness/internal/promptContext.js +29 -0
- package/dist/harness/nullAdapter.d.ts +9 -0
- package/dist/harness/nullAdapter.d.ts.map +1 -0
- package/dist/harness/nullAdapter.js +46 -0
- package/dist/harness/registry.d.ts +51 -0
- package/dist/harness/registry.d.ts.map +1 -0
- package/dist/harness/registry.js +235 -0
- package/dist/harness/types.d.ts +200 -0
- package/dist/harness/types.d.ts.map +1 -0
- package/dist/harness/types.js +34 -0
- package/dist/harness/unified/adapter.d.ts +21 -0
- package/dist/harness/unified/adapter.d.ts.map +1 -0
- package/dist/harness/unified/adapter.js +239 -0
- package/dist/harness/unified/capabilities.d.ts +37 -0
- package/dist/harness/unified/capabilities.d.ts.map +1 -0
- package/dist/harness/unified/capabilities.js +79 -0
- package/dist/harness/unified/discovery.d.ts +11 -0
- package/dist/harness/unified/discovery.d.ts.map +1 -0
- package/dist/harness/unified/discovery.js +23 -0
- package/dist/harness/unified/index.d.ts +6 -0
- package/dist/harness/unified/index.d.ts.map +1 -0
- package/dist/harness/unified/index.js +16 -0
- package/dist/harness/unified/promptContext.d.ts +16 -0
- package/dist/harness/unified/promptContext.d.ts.map +1 -0
- package/dist/harness/unified/promptContext.js +56 -0
- package/dist/harness/unified/subprocess.d.ts +57 -0
- package/dist/harness/unified/subprocess.d.ts.map +1 -0
- package/dist/harness/unified/subprocess.js +121 -0
- package/dist/hooks/dispatcher.d.ts +29 -0
- package/dist/hooks/dispatcher.d.ts.map +1 -0
- package/dist/hooks/dispatcher.js +337 -0
- package/dist/hooks/index.d.ts +16 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +20 -0
- package/dist/hooks/types.d.ts +170 -0
- package/dist/hooks/types.d.ts.map +1 -0
- package/dist/hooks/types.js +6 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +76 -0
- package/dist/logging/index.d.ts +3 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +11 -0
- package/dist/logging/runLogger.d.ts +85 -0
- package/dist/logging/runLogger.d.ts.map +1 -0
- package/dist/logging/runLogger.js +182 -0
- package/dist/mcp/index.d.ts +7 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +53 -0
- package/dist/mcp/server.d.ts +3 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +21 -0
- package/dist/mcp/tools/discovery.d.ts +3 -0
- package/dist/mcp/tools/discovery.d.ts.map +1 -0
- package/dist/mcp/tools/discovery.js +117 -0
- package/dist/mcp/tools/runs.d.ts +3 -0
- package/dist/mcp/tools/runs.d.ts.map +1 -0
- package/dist/mcp/tools/runs.js +289 -0
- package/dist/mcp/tools/sessions.d.ts +3 -0
- package/dist/mcp/tools/sessions.d.ts.map +1 -0
- package/dist/mcp/tools/sessions.js +216 -0
- package/dist/mcp/tools/tasks.d.ts +3 -0
- package/dist/mcp/tools/tasks.d.ts.map +1 -0
- package/dist/mcp/tools/tasks.js +230 -0
- package/dist/mcp/transport/index.d.ts +1 -0
- package/dist/mcp/transport/index.d.ts.map +1 -0
- package/dist/mcp/transport/index.js +2 -0
- package/dist/mcp/util/errors.d.ts +14 -0
- package/dist/mcp/util/errors.d.ts.map +1 -0
- package/dist/mcp/util/errors.js +10 -0
- package/dist/mcp/util/resolve-run-dir.d.ts +6 -0
- package/dist/mcp/util/resolve-run-dir.d.ts.map +1 -0
- package/dist/mcp/util/resolve-run-dir.js +11 -0
- package/dist/plugins/index.d.ts +14 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +51 -0
- package/dist/plugins/marketplace.d.ts +36 -0
- package/dist/plugins/marketplace.d.ts.map +1 -0
- package/dist/plugins/marketplace.js +162 -0
- package/dist/plugins/marketplaceHelpers.d.ts +15 -0
- package/dist/plugins/marketplaceHelpers.d.ts.map +1 -0
- package/dist/plugins/marketplaceHelpers.js +114 -0
- package/dist/plugins/migrations.d.ts +52 -0
- package/dist/plugins/migrations.d.ts.map +1 -0
- package/dist/plugins/migrations.js +151 -0
- package/dist/plugins/packageReader.d.ts +47 -0
- package/dist/plugins/packageReader.d.ts.map +1 -0
- package/dist/plugins/packageReader.js +153 -0
- package/dist/plugins/paths.d.ts +30 -0
- package/dist/plugins/paths.d.ts.map +1 -0
- package/dist/plugins/paths.js +69 -0
- package/dist/plugins/registry.d.ts +54 -0
- package/dist/plugins/registry.d.ts.map +1 -0
- package/dist/plugins/registry.js +116 -0
- package/dist/plugins/types.d.ts +133 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +35 -0
- package/dist/processLibrary/active.d.ts +17 -0
- package/dist/processLibrary/active.d.ts.map +1 -0
- package/dist/processLibrary/active.js +216 -0
- package/dist/processLibrary/activeTypes.d.ts +82 -0
- package/dist/processLibrary/activeTypes.d.ts.map +1 -0
- package/dist/processLibrary/activeTypes.js +6 -0
- package/dist/profiles/index.d.ts +25 -0
- package/dist/profiles/index.d.ts.map +1 -0
- package/dist/profiles/index.js +40 -0
- package/dist/profiles/projectProfile.d.ts +67 -0
- package/dist/profiles/projectProfile.d.ts.map +1 -0
- package/dist/profiles/projectProfile.js +169 -0
- package/dist/profiles/projectProfileMerge.d.ts +3 -0
- package/dist/profiles/projectProfileMerge.d.ts.map +1 -0
- package/dist/profiles/projectProfileMerge.js +175 -0
- package/dist/profiles/projectProfileRender.d.ts +3 -0
- package/dist/profiles/projectProfileRender.d.ts.map +1 -0
- package/dist/profiles/projectProfileRender.js +275 -0
- package/dist/profiles/projectTypes.d.ts +149 -0
- package/dist/profiles/projectTypes.d.ts.map +1 -0
- package/dist/profiles/projectTypes.js +6 -0
- package/dist/profiles/types.d.ts +5 -0
- package/dist/profiles/types.d.ts.map +1 -0
- package/dist/profiles/types.js +11 -0
- package/dist/profiles/userProfile.d.ts +67 -0
- package/dist/profiles/userProfile.d.ts.map +1 -0
- package/dist/profiles/userProfile.js +351 -0
- package/dist/profiles/userProfileRender.d.ts +3 -0
- package/dist/profiles/userProfileRender.d.ts.map +1 -0
- package/dist/profiles/userProfileRender.js +188 -0
- package/dist/profiles/userTypes.d.ts +119 -0
- package/dist/profiles/userTypes.d.ts.map +1 -0
- package/dist/profiles/userTypes.js +6 -0
- package/dist/prompts/babysitterMdDiscovery.d.ts +38 -0
- package/dist/prompts/babysitterMdDiscovery.d.ts.map +1 -0
- package/dist/prompts/babysitterMdDiscovery.js +150 -0
- package/dist/prompts/capabilityCollector.d.ts +48 -0
- package/dist/prompts/capabilityCollector.d.ts.map +1 -0
- package/dist/prompts/capabilityCollector.js +126 -0
- package/dist/prompts/capabilityProcessMap.d.ts +33 -0
- package/dist/prompts/capabilityProcessMap.d.ts.map +1 -0
- package/dist/prompts/capabilityProcessMap.js +105 -0
- package/dist/prompts/commandTemplates.d.ts +4 -0
- package/dist/prompts/commandTemplates.d.ts.map +1 -0
- package/dist/prompts/commandTemplates.js +32 -0
- package/dist/prompts/compose.d.ts +28 -0
- package/dist/prompts/compose.d.ts.map +1 -0
- package/dist/prompts/compose.js +197 -0
- package/dist/prompts/context.d.ts +8 -0
- package/dist/prompts/context.d.ts.map +1 -0
- package/dist/prompts/context.js +13 -0
- package/dist/prompts/contextDetect.d.ts +64 -0
- package/dist/prompts/contextDetect.d.ts.map +1 -0
- package/dist/prompts/contextDetect.js +122 -0
- package/dist/prompts/contextShared.d.ts +6 -0
- package/dist/prompts/contextShared.d.ts.map +1 -0
- package/dist/prompts/contextShared.js +63 -0
- package/dist/prompts/continuityOverlay.d.ts +35 -0
- package/dist/prompts/continuityOverlay.d.ts.map +1 -0
- package/dist/prompts/continuityOverlay.js +210 -0
- package/dist/prompts/index.d.ts +23 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +88 -0
- package/dist/prompts/parts/breakpointHandling.d.ts +8 -0
- package/dist/prompts/parts/breakpointHandling.d.ts.map +1 -0
- package/dist/prompts/parts/breakpointHandling.js +12 -0
- package/dist/prompts/parts/codingPhilosophy.d.ts +7 -0
- package/dist/prompts/parts/codingPhilosophy.d.ts.map +1 -0
- package/dist/prompts/parts/codingPhilosophy.js +11 -0
- package/dist/prompts/parts/completionProof.d.ts +6 -0
- package/dist/prompts/parts/completionProof.d.ts.map +1 -0
- package/dist/prompts/parts/completionProof.js +10 -0
- package/dist/prompts/parts/continuityOverlay.d.ts +2 -0
- package/dist/prompts/parts/continuityOverlay.d.ts.map +1 -0
- package/dist/prompts/parts/continuityOverlay.js +5 -0
- package/dist/prompts/parts/criticalRules.d.ts +7 -0
- package/dist/prompts/parts/criticalRules.d.ts.map +1 -0
- package/dist/prompts/parts/criticalRules.js +29 -0
- package/dist/prompts/parts/dependencies.d.ts +6 -0
- package/dist/prompts/parts/dependencies.d.ts.map +1 -0
- package/dist/prompts/parts/dependencies.js +10 -0
- package/dist/prompts/parts/effects.d.ts +6 -0
- package/dist/prompts/parts/effects.d.ts.map +1 -0
- package/dist/prompts/parts/effects.js +10 -0
- package/dist/prompts/parts/gitSafety.d.ts +7 -0
- package/dist/prompts/parts/gitSafety.d.ts.map +1 -0
- package/dist/prompts/parts/gitSafety.js +11 -0
- package/dist/prompts/parts/index.d.ts +37 -0
- package/dist/prompts/parts/index.d.ts.map +1 -0
- package/dist/prompts/parts/index.js +70 -0
- package/dist/prompts/parts/intentFidelityChecks.d.ts +7 -0
- package/dist/prompts/parts/intentFidelityChecks.d.ts.map +1 -0
- package/dist/prompts/parts/intentFidelityChecks.js +14 -0
- package/dist/prompts/parts/interview.d.ts +6 -0
- package/dist/prompts/parts/interview.d.ts.map +1 -0
- package/dist/prompts/parts/interview.js +18 -0
- package/dist/prompts/parts/iteration.d.ts +6 -0
- package/dist/prompts/parts/iteration.d.ts.map +1 -0
- package/dist/prompts/parts/iteration.js +15 -0
- package/dist/prompts/parts/loopControl.d.ts +11 -0
- package/dist/prompts/parts/loopControl.d.ts.map +1 -0
- package/dist/prompts/parts/loopControl.js +22 -0
- package/dist/prompts/parts/nonNegotiables.d.ts +7 -0
- package/dist/prompts/parts/nonNegotiables.d.ts.map +1 -0
- package/dist/prompts/parts/nonNegotiables.js +14 -0
- package/dist/prompts/parts/outputEfficiency.d.ts +7 -0
- package/dist/prompts/parts/outputEfficiency.d.ts.map +1 -0
- package/dist/prompts/parts/outputEfficiency.js +11 -0
- package/dist/prompts/parts/parallelDispatch.d.ts +15 -0
- package/dist/prompts/parts/parallelDispatch.d.ts.map +1 -0
- package/dist/prompts/parts/parallelDispatch.js +46 -0
- package/dist/prompts/parts/parallelPhaseDetection.d.ts +6 -0
- package/dist/prompts/parts/parallelPhaseDetection.d.ts.map +1 -0
- package/dist/prompts/parts/parallelPhaseDetection.js +10 -0
- package/dist/prompts/parts/priorityLadder.d.ts +7 -0
- package/dist/prompts/parts/priorityLadder.d.ts.map +1 -0
- package/dist/prompts/parts/priorityLadder.js +13 -0
- package/dist/prompts/parts/processCreation.d.ts +6 -0
- package/dist/prompts/parts/processCreation.d.ts.map +1 -0
- package/dist/prompts/parts/processCreation.js +10 -0
- package/dist/prompts/parts/processGuidelines.d.ts +7 -0
- package/dist/prompts/parts/processGuidelines.d.ts.map +1 -0
- package/dist/prompts/parts/processGuidelines.js +11 -0
- package/dist/prompts/parts/projectInstructions.d.ts +8 -0
- package/dist/prompts/parts/projectInstructions.d.ts.map +1 -0
- package/dist/prompts/parts/projectInstructions.js +28 -0
- package/dist/prompts/parts/quickReference.d.ts +6 -0
- package/dist/prompts/parts/quickReference.d.ts.map +1 -0
- package/dist/prompts/parts/quickReference.js +17 -0
- package/dist/prompts/parts/recovery.d.ts +7 -0
- package/dist/prompts/parts/recovery.d.ts.map +1 -0
- package/dist/prompts/parts/recovery.js +11 -0
- package/dist/prompts/parts/resultsPosting.d.ts +7 -0
- package/dist/prompts/parts/resultsPosting.d.ts.map +1 -0
- package/dist/prompts/parts/resultsPosting.js +11 -0
- package/dist/prompts/parts/rootCauseGuardrail.d.ts +7 -0
- package/dist/prompts/parts/rootCauseGuardrail.d.ts.map +1 -0
- package/dist/prompts/parts/rootCauseGuardrail.js +13 -0
- package/dist/prompts/parts/runCreation.d.ts +7 -0
- package/dist/prompts/parts/runCreation.d.ts.map +1 -0
- package/dist/prompts/parts/runCreation.js +61 -0
- package/dist/prompts/parts/runOverlapDetection.d.ts +6 -0
- package/dist/prompts/parts/runOverlapDetection.d.ts.map +1 -0
- package/dist/prompts/parts/runOverlapDetection.js +10 -0
- package/dist/prompts/parts/seeAlso.d.ts +7 -0
- package/dist/prompts/parts/seeAlso.d.ts.map +1 -0
- package/dist/prompts/parts/seeAlso.js +11 -0
- package/dist/prompts/parts/taskExamples.d.ts +7 -0
- package/dist/prompts/parts/taskExamples.d.ts.map +1 -0
- package/dist/prompts/parts/taskExamples.js +11 -0
- package/dist/prompts/parts/taskKinds.d.ts +6 -0
- package/dist/prompts/parts/taskKinds.d.ts.map +1 -0
- package/dist/prompts/parts/taskKinds.js +25 -0
- package/dist/prompts/parts/toolPreferences.d.ts +7 -0
- package/dist/prompts/parts/toolPreferences.d.ts.map +1 -0
- package/dist/prompts/parts/toolPreferences.js +11 -0
- package/dist/prompts/parts/userProfile.d.ts +7 -0
- package/dist/prompts/parts/userProfile.d.ts.map +1 -0
- package/dist/prompts/parts/userProfile.js +11 -0
- package/dist/prompts/runtimeContext.d.ts +30 -0
- package/dist/prompts/runtimeContext.d.ts.map +1 -0
- package/dist/prompts/runtimeContext.js +38 -0
- package/dist/prompts/strata.d.ts +60 -0
- package/dist/prompts/strata.d.ts.map +1 -0
- package/dist/prompts/strata.js +243 -0
- package/dist/prompts/templateRenderer.d.ts +18 -0
- package/dist/prompts/templateRenderer.d.ts.map +1 -0
- package/dist/prompts/templateRenderer.js +131 -0
- package/dist/prompts/templates/breakpoint-handling.md +137 -0
- package/dist/prompts/templates/coding-philosophy.md +12 -0
- package/dist/prompts/templates/commands/assimilate.md +47 -0
- package/dist/prompts/templates/commands/cleanup.md +54 -0
- package/dist/prompts/templates/commands/contrib.md +40 -0
- package/dist/prompts/templates/commands/doctor.md +511 -0
- package/dist/prompts/templates/commands/forever.md +11 -0
- package/dist/prompts/templates/commands/project-install.md +25 -0
- package/dist/prompts/templates/commands/retrospect.md +68 -0
- package/dist/prompts/templates/commands/user-install.md +24 -0
- package/dist/prompts/templates/completion-proof.md +21 -0
- package/dist/prompts/templates/critical-rules.md +73 -0
- package/dist/prompts/templates/dependencies.md +9 -0
- package/dist/prompts/templates/effects.md +46 -0
- package/dist/prompts/templates/git-safety.md +9 -0
- package/dist/prompts/templates/intent-fidelity-checks.md +31 -0
- package/dist/prompts/templates/interview.md +65 -0
- package/dist/prompts/templates/iteration.md +41 -0
- package/dist/prompts/templates/loop-control.md +64 -0
- package/dist/prompts/templates/non-negotiables.md +11 -0
- package/dist/prompts/templates/output-efficiency.md +12 -0
- package/dist/prompts/templates/parallel-phase-detection.md +59 -0
- package/dist/prompts/templates/priority-ladder.md +13 -0
- package/dist/prompts/templates/process-creation.md +130 -0
- package/dist/prompts/templates/process-guidelines.md +106 -0
- package/dist/prompts/templates/quick-reference.md +46 -0
- package/dist/prompts/templates/recovery.md +30 -0
- package/dist/prompts/templates/results-posting.md +69 -0
- package/dist/prompts/templates/root-cause-guardrail.md +14 -0
- package/dist/prompts/templates/run-creation.md +80 -0
- package/dist/prompts/templates/run-overlap-detection.md +65 -0
- package/dist/prompts/templates/see-also.md +4 -0
- package/dist/prompts/templates/task-examples.md +229 -0
- package/dist/prompts/templates/task-kinds.md +106 -0
- package/dist/prompts/templates/tool-preferences.md +8 -0
- package/dist/prompts/templates/user-profile.md +48 -0
- package/dist/prompts/types.d.ts +191 -0
- package/dist/prompts/types.d.ts.map +1 -0
- package/dist/prompts/types.js +7 -0
- package/dist/runtime/asyncEffects.d.ts +22 -0
- package/dist/runtime/asyncEffects.d.ts.map +1 -0
- package/dist/runtime/asyncEffects.js +86 -0
- package/dist/runtime/commitEffectResult.d.ts +12 -0
- package/dist/runtime/commitEffectResult.d.ts.map +1 -0
- package/dist/runtime/commitEffectResult.js +240 -0
- package/dist/runtime/constants.d.ts +2 -0
- package/dist/runtime/constants.d.ts.map +1 -0
- package/dist/runtime/constants.js +5 -0
- package/dist/runtime/createRun.d.ts +3 -0
- package/dist/runtime/createRun.d.ts.map +1 -0
- package/dist/runtime/createRun.js +142 -0
- package/dist/runtime/effectGroupRegistry.d.ts +57 -0
- package/dist/runtime/effectGroupRegistry.d.ts.map +1 -0
- package/dist/runtime/effectGroupRegistry.js +107 -0
- package/dist/runtime/errorSuggestions.d.ts +4 -0
- package/dist/runtime/errorSuggestions.d.ts.map +1 -0
- package/dist/runtime/errorSuggestions.js +98 -0
- package/dist/runtime/errorTemplates.d.ts +101 -0
- package/dist/runtime/errorTemplates.d.ts.map +1 -0
- package/dist/runtime/errorTemplates.js +173 -0
- package/dist/runtime/errorUtils.d.ts +10 -0
- package/dist/runtime/errorUtils.d.ts.map +1 -0
- package/dist/runtime/errorUtils.js +42 -0
- package/dist/runtime/exceptions.d.ts +73 -0
- package/dist/runtime/exceptions.d.ts.map +1 -0
- package/dist/runtime/exceptions.js +197 -0
- package/dist/runtime/hooks/runtime.d.ts +31 -0
- package/dist/runtime/hooks/runtime.d.ts.map +1 -0
- package/dist/runtime/hooks/runtime.js +67 -0
- package/dist/runtime/index.d.ts +18 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +61 -0
- package/dist/runtime/instrumentation.d.ts +6 -0
- package/dist/runtime/instrumentation.d.ts.map +1 -0
- package/dist/runtime/instrumentation.js +14 -0
- package/dist/runtime/intrinsics/breakpoint.d.ts +9 -0
- package/dist/runtime/intrinsics/breakpoint.d.ts.map +1 -0
- package/dist/runtime/intrinsics/breakpoint.js +108 -0
- package/dist/runtime/intrinsics/hook.d.ts +26 -0
- package/dist/runtime/intrinsics/hook.d.ts.map +1 -0
- package/dist/runtime/intrinsics/hook.js +45 -0
- package/dist/runtime/intrinsics/index.d.ts +7 -0
- package/dist/runtime/intrinsics/index.d.ts.map +1 -0
- package/dist/runtime/intrinsics/index.js +15 -0
- package/dist/runtime/intrinsics/orchestratorTask.d.ts +4 -0
- package/dist/runtime/intrinsics/orchestratorTask.d.ts.map +1 -0
- package/dist/runtime/intrinsics/orchestratorTask.js +28 -0
- package/dist/runtime/intrinsics/parallel.d.ts +9 -0
- package/dist/runtime/intrinsics/parallel.d.ts.map +1 -0
- package/dist/runtime/intrinsics/parallel.js +160 -0
- package/dist/runtime/intrinsics/parallelGroup.d.ts +16 -0
- package/dist/runtime/intrinsics/parallelGroup.d.ts.map +1 -0
- package/dist/runtime/intrinsics/parallelGroup.js +105 -0
- package/dist/runtime/intrinsics/sleep.d.ts +4 -0
- package/dist/runtime/intrinsics/sleep.d.ts.map +1 -0
- package/dist/runtime/intrinsics/sleep.js +70 -0
- package/dist/runtime/intrinsics/subprocess.d.ts +5 -0
- package/dist/runtime/intrinsics/subprocess.d.ts.map +1 -0
- package/dist/runtime/intrinsics/subprocess.js +56 -0
- package/dist/runtime/intrinsics/task.d.ts +26 -0
- package/dist/runtime/intrinsics/task.d.ts.map +1 -0
- package/dist/runtime/intrinsics/task.js +132 -0
- package/dist/runtime/intrinsics/taskHelpers.d.ts +20 -0
- package/dist/runtime/intrinsics/taskHelpers.d.ts.map +1 -0
- package/dist/runtime/intrinsics/taskHelpers.js +148 -0
- package/dist/runtime/invocation/hashInvocationKey.d.ts +12 -0
- package/dist/runtime/invocation/hashInvocationKey.d.ts.map +1 -0
- package/dist/runtime/invocation/hashInvocationKey.js +12 -0
- package/dist/runtime/invocation/index.d.ts +3 -0
- package/dist/runtime/invocation/index.d.ts.map +1 -0
- package/dist/runtime/invocation/index.js +5 -0
- package/dist/runtime/orchestrateHelpers.d.ts +16 -0
- package/dist/runtime/orchestrateHelpers.d.ts.map +1 -0
- package/dist/runtime/orchestrateHelpers.js +103 -0
- package/dist/runtime/orchestrateIteration.d.ts +4 -0
- package/dist/runtime/orchestrateIteration.d.ts.map +1 -0
- package/dist/runtime/orchestrateIteration.js +213 -0
- package/dist/runtime/parallelStrategies.d.ts +23 -0
- package/dist/runtime/parallelStrategies.d.ts.map +1 -0
- package/dist/runtime/parallelStrategies.js +79 -0
- package/dist/runtime/policy/engine.d.ts +4 -0
- package/dist/runtime/policy/engine.d.ts.map +1 -0
- package/dist/runtime/policy/engine.js +97 -0
- package/dist/runtime/policy/index.d.ts +5 -0
- package/dist/runtime/policy/index.d.ts.map +1 -0
- package/dist/runtime/policy/index.js +13 -0
- package/dist/runtime/policy/logging.d.ts +6 -0
- package/dist/runtime/policy/logging.d.ts.map +1 -0
- package/dist/runtime/policy/logging.js +43 -0
- package/dist/runtime/policy/types.d.ts +55 -0
- package/dist/runtime/policy/types.d.ts.map +1 -0
- package/dist/runtime/policy/types.js +10 -0
- package/dist/runtime/processContext.d.ts +36 -0
- package/dist/runtime/processContext.d.ts.map +1 -0
- package/dist/runtime/processContext.js +161 -0
- package/dist/runtime/replay/createReplayEngine.d.ts +32 -0
- package/dist/runtime/replay/createReplayEngine.d.ts.map +1 -0
- package/dist/runtime/replay/createReplayEngine.js +189 -0
- package/dist/runtime/replay/effectIndex.d.ts +39 -0
- package/dist/runtime/replay/effectIndex.d.ts.map +1 -0
- package/dist/runtime/replay/effectIndex.js +322 -0
- package/dist/runtime/replay/index.d.ts +7 -0
- package/dist/runtime/replay/index.d.ts.map +1 -0
- package/dist/runtime/replay/index.js +19 -0
- package/dist/runtime/replay/replayCursor.d.ts +7 -0
- package/dist/runtime/replay/replayCursor.d.ts.map +1 -0
- package/dist/runtime/replay/replayCursor.js +22 -0
- package/dist/runtime/replay/stateCache.d.ts +50 -0
- package/dist/runtime/replay/stateCache.d.ts.map +1 -0
- package/dist/runtime/replay/stateCache.js +222 -0
- package/dist/runtime/runLifecycleState.d.ts +7 -0
- package/dist/runtime/runLifecycleState.d.ts.map +1 -0
- package/dist/runtime/runLifecycleState.js +54 -0
- package/dist/runtime/schemaValidator.d.ts +16 -0
- package/dist/runtime/schemaValidator.d.ts.map +1 -0
- package/dist/runtime/schemaValidator.js +92 -0
- package/dist/runtime/types.d.ts +240 -0
- package/dist/runtime/types.d.ts.map +1 -0
- package/dist/runtime/types.js +2 -0
- package/dist/sdkVersion.d.ts +5 -0
- package/dist/sdkVersion.d.ts.map +1 -0
- package/dist/sdkVersion.js +49 -0
- package/dist/session/cleanup.d.ts +17 -0
- package/dist/session/cleanup.d.ts.map +1 -0
- package/dist/session/cleanup.js +212 -0
- package/dist/session/discovery.d.ts +25 -0
- package/dist/session/discovery.d.ts.map +1 -0
- package/dist/session/discovery.js +44 -0
- package/dist/session/index.d.ts +15 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +42 -0
- package/dist/session/parse.d.ts +45 -0
- package/dist/session/parse.d.ts.map +1 -0
- package/dist/session/parse.js +176 -0
- package/dist/session/transcript.d.ts +7 -0
- package/dist/session/transcript.d.ts.map +1 -0
- package/dist/session/transcript.js +51 -0
- package/dist/session/types.d.ts +196 -0
- package/dist/session/types.d.ts.map +1 -0
- package/dist/session/types.js +45 -0
- package/dist/session/whoami.d.ts +16 -0
- package/dist/session/whoami.d.ts.map +1 -0
- package/dist/session/whoami.js +108 -0
- package/dist/session/write.d.ts +61 -0
- package/dist/session/write.d.ts.map +1 -0
- package/dist/session/write.js +217 -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/cleanup.d.ts +4 -0
- package/dist/storage/cleanup.d.ts.map +1 -0
- package/dist/storage/cleanup.js +96 -0
- package/dist/storage/clock.d.ts +6 -0
- package/dist/storage/clock.d.ts.map +1 -0
- package/dist/storage/clock.js +29 -0
- package/dist/storage/createRunDir.d.ts +6 -0
- package/dist/storage/createRunDir.d.ts.map +1 -0
- package/dist/storage/createRunDir.js +87 -0
- package/dist/storage/icloudWarning.d.ts +6 -0
- package/dist/storage/icloudWarning.d.ts.map +1 -0
- package/dist/storage/icloudWarning.js +84 -0
- package/dist/storage/index.d.ts +9 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +36 -0
- package/dist/storage/journal.d.ts +4 -0
- package/dist/storage/journal.d.ts.map +1 -0
- package/dist/storage/journal.js +133 -0
- package/dist/storage/lock.d.ts +10 -0
- package/dist/storage/lock.d.ts.map +1 -0
- package/dist/storage/lock.js +82 -0
- package/dist/storage/paths.d.ts +23 -0
- package/dist/storage/paths.d.ts.map +1 -0
- package/dist/storage/paths.js +51 -0
- package/dist/storage/runFiles.d.ts +6 -0
- package/dist/storage/runFiles.d.ts.map +1 -0
- package/dist/storage/runFiles.js +44 -0
- package/dist/storage/tasks.d.ts +17 -0
- package/dist/storage/tasks.d.ts.map +1 -0
- package/dist/storage/tasks.js +83 -0
- package/dist/storage/types.d.ts +121 -0
- package/dist/storage/types.d.ts.map +1 -0
- package/dist/storage/types.js +2 -0
- package/dist/storage/ulids.d.ts +11 -0
- package/dist/storage/ulids.d.ts.map +1 -0
- package/dist/storage/ulids.js +25 -0
- package/dist/tasks/batching.d.ts +34 -0
- package/dist/tasks/batching.d.ts.map +1 -0
- package/dist/tasks/batching.js +91 -0
- package/dist/tasks/context.d.ts +11 -0
- package/dist/tasks/context.d.ts.map +1 -0
- package/dist/tasks/context.js +181 -0
- package/dist/tasks/defineTask.d.ts +37 -0
- package/dist/tasks/defineTask.d.ts.map +1 -0
- package/dist/tasks/defineTask.js +99 -0
- package/dist/tasks/effectGroup.d.ts +19 -0
- package/dist/tasks/effectGroup.d.ts.map +1 -0
- package/dist/tasks/effectGroup.js +58 -0
- package/dist/tasks/grouping.d.ts +19 -0
- package/dist/tasks/grouping.d.ts.map +1 -0
- package/dist/tasks/grouping.js +54 -0
- package/dist/tasks/index.d.ts +9 -0
- package/dist/tasks/index.d.ts.map +1 -0
- package/dist/tasks/index.js +24 -0
- package/dist/tasks/kinds/index.d.ts +7 -0
- package/dist/tasks/kinds/index.d.ts.map +1 -0
- package/dist/tasks/kinds/index.js +162 -0
- package/dist/tasks/kinds/resolvers.d.ts +21 -0
- package/dist/tasks/kinds/resolvers.d.ts.map +1 -0
- package/dist/tasks/kinds/resolvers.js +124 -0
- package/dist/tasks/partitioning.d.ts +11 -0
- package/dist/tasks/partitioning.d.ts.map +1 -0
- package/dist/tasks/partitioning.js +20 -0
- package/dist/tasks/registry.d.ts +53 -0
- package/dist/tasks/registry.d.ts.map +1 -0
- package/dist/tasks/registry.js +147 -0
- package/dist/tasks/serializer.d.ts +62 -0
- package/dist/tasks/serializer.d.ts.map +1 -0
- package/dist/tasks/serializer.js +197 -0
- package/dist/tasks/types.d.ts +180 -0
- package/dist/tasks/types.d.ts.map +1 -0
- package/dist/tasks/types.js +2 -0
- package/dist/test-fixtures/kinds/index.d.ts +56 -0
- package/dist/test-fixtures/kinds/index.d.ts.map +1 -0
- package/dist/test-fixtures/kinds/index.js +44 -0
- package/dist/testing/deterministic.d.ts +62 -0
- package/dist/testing/deterministic.d.ts.map +1 -0
- package/dist/testing/deterministic.js +193 -0
- package/dist/testing/deterministicProviders.d.ts +32 -0
- package/dist/testing/deterministicProviders.d.ts.map +1 -0
- package/dist/testing/deterministicProviders.js +263 -0
- package/dist/testing/index.d.ts +4 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +23 -0
- package/dist/testing/runHarness.d.ts +64 -0
- package/dist/testing/runHarness.d.ts.map +1 -0
- package/dist/testing/runHarness.js +165 -0
- package/dist/testing/snapshots.d.ts +17 -0
- package/dist/testing/snapshots.d.ts.map +1 -0
- package/dist/testing/snapshots.js +24 -0
- package/dist/utils/ancestorWalk.d.ts +14 -0
- package/dist/utils/ancestorWalk.d.ts.map +1 -0
- package/dist/utils/ancestorWalk.js +203 -0
- package/dist/utils/compressContext.d.ts +50 -0
- package/dist/utils/compressContext.d.ts.map +1 -0
- package/dist/utils/compressContext.js +180 -0
- package/dist/utils/processLiveness.d.ts +9 -0
- package/dist/utils/processLiveness.d.ts.map +1 -0
- package/dist/utils/processLiveness.js +36 -0
- package/dist/utils/sessionMarker.d.ts +17 -0
- package/dist/utils/sessionMarker.d.ts.map +1 -0
- package/dist/utils/sessionMarker.js +218 -0
- package/package.json +4 -4
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base harness adapter class.
|
|
3
|
+
*
|
|
4
|
+
* Provides default implementations for all HarnessAdapter methods.
|
|
5
|
+
* Each harness adapter extends this class and overrides only the
|
|
6
|
+
* methods that have truly harness-specific behavior.
|
|
7
|
+
*/
|
|
8
|
+
import type { PromptContext } from "../prompts/types";
|
|
9
|
+
import type { HarnessAdapter, HarnessCapability, HookHandlerArgs, SessionBindOptions, SessionBindResult } from "./types";
|
|
10
|
+
export interface AdapterConfig {
|
|
11
|
+
/** Harness identifier (e.g. "claude-code"). */
|
|
12
|
+
name: string;
|
|
13
|
+
/** Human-readable label (e.g. "Claude Code"). */
|
|
14
|
+
displayName: string;
|
|
15
|
+
/** Env vars that indicate this harness is active. */
|
|
16
|
+
activationEnvVars: string[];
|
|
17
|
+
/** Capabilities advertised by this harness. */
|
|
18
|
+
capabilities: HarnessCapability[];
|
|
19
|
+
/** Term used for the mechanism that continues the orchestration loop. */
|
|
20
|
+
loopControlTerm: string;
|
|
21
|
+
/** Whether this adapter auto-resolves session IDs from environment. */
|
|
22
|
+
autoResolvesSession: boolean;
|
|
23
|
+
/** Env vars to check for plugin root. */
|
|
24
|
+
pluginRootEnvVars: string[];
|
|
25
|
+
/** If true, resolvePluginRoot always returns undefined (no plugin root concept). */
|
|
26
|
+
noPluginRoot?: boolean;
|
|
27
|
+
/** Env vars to check for session ID (in priority order). These are "native" harness vars that beat AGENT_SESSION_ID. */
|
|
28
|
+
sessionIdEnvVars: string[];
|
|
29
|
+
/** Env vars checked AFTER AGENT_SESSION_ID and PID marker (lower priority fallbacks). */
|
|
30
|
+
fallbackSessionIdEnvVars?: string[];
|
|
31
|
+
/**
|
|
32
|
+
* If set, only these hook types are supported. `supportsHookType()` returns
|
|
33
|
+
* true only for types in this set. If undefined, all hook types are supported.
|
|
34
|
+
*/
|
|
35
|
+
supportedHookTypes?: string[];
|
|
36
|
+
/**
|
|
37
|
+
* If true, the adapter does not support any hooks (supportsHookType always
|
|
38
|
+
* returns false and handleStopHook/handleSessionStartHook are no-ops).
|
|
39
|
+
*/
|
|
40
|
+
noHookSupport?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Whether bindSession should auto-release sessions from terminal runs.
|
|
43
|
+
* Default: false.
|
|
44
|
+
*/
|
|
45
|
+
autoReleaseStale?: boolean;
|
|
46
|
+
/** Custom hint for missing session ID. If undefined, uses generic hint. */
|
|
47
|
+
missingSessionIdHint?: string;
|
|
48
|
+
/** Custom messages for specific unsupported hook types. */
|
|
49
|
+
unsupportedHookMessages?: Record<string, string>;
|
|
50
|
+
/** Capabilities list for prompt context. */
|
|
51
|
+
promptCapabilities: string[];
|
|
52
|
+
/** Plugin root variable expression for shell interpolation. */
|
|
53
|
+
pluginRootVar: string;
|
|
54
|
+
/** Whether orchestration uses stop-hook (true) or in-turn (false). */
|
|
55
|
+
hookDriven: boolean;
|
|
56
|
+
/** Name of the interactive question tool. */
|
|
57
|
+
interactiveToolName: string;
|
|
58
|
+
/** Description of session env var resolution. */
|
|
59
|
+
sessionEnvVars: string;
|
|
60
|
+
/** Whether this harness supports intent fidelity checks. */
|
|
61
|
+
hasIntentFidelityChecks: boolean;
|
|
62
|
+
/** Whether this harness has non-negotiables section. */
|
|
63
|
+
hasNonNegotiables: boolean;
|
|
64
|
+
}
|
|
65
|
+
export declare abstract class BaseHarnessAdapter implements HarnessAdapter {
|
|
66
|
+
protected readonly config: AdapterConfig;
|
|
67
|
+
constructor(config: AdapterConfig);
|
|
68
|
+
get name(): string;
|
|
69
|
+
isActive(): boolean;
|
|
70
|
+
autoResolvesSessionId(): boolean;
|
|
71
|
+
resolveSessionId(parsed: {
|
|
72
|
+
sessionId?: string;
|
|
73
|
+
}): string | undefined;
|
|
74
|
+
resolveStateDir(args: {
|
|
75
|
+
stateDir?: string;
|
|
76
|
+
pluginRoot?: string;
|
|
77
|
+
}): string | undefined;
|
|
78
|
+
resolvePluginRoot(args: {
|
|
79
|
+
pluginRoot?: string;
|
|
80
|
+
}): string | undefined;
|
|
81
|
+
getCapabilities(): HarnessCapability[];
|
|
82
|
+
getPromptContext(opts?: {
|
|
83
|
+
interactive?: boolean | undefined;
|
|
84
|
+
}): PromptContext;
|
|
85
|
+
bindSession(opts: SessionBindOptions): Promise<SessionBindResult>;
|
|
86
|
+
handleStopHook(args: HookHandlerArgs): Promise<number>;
|
|
87
|
+
handleSessionStartHook(args: HookHandlerArgs): Promise<number>;
|
|
88
|
+
findHookDispatcherPath(_startCwd: string): string | null;
|
|
89
|
+
getMissingSessionIdHint(): string;
|
|
90
|
+
supportsHookType(hookType: string): boolean;
|
|
91
|
+
getUnsupportedHookMessage(hookType: string): string;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=BaseAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseAdapter.d.ts","sourceRoot":"","sources":["../../src/harness/BaseAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKtD,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAWjB,MAAM,WAAW,aAAa;IAC5B,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,+CAA+C;IAC/C,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,yEAAyE;IACzE,eAAe,EAAE,MAAM,CAAC;IACxB,uEAAuE;IACvE,mBAAmB,EAAE,OAAO,CAAC;IAC7B,yCAAyC;IACzC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,oFAAoF;IACpF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wHAAwH;IACxH,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,yFAAyF;IACzF,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IAGpC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,2EAA2E;IAC3E,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,2DAA2D;IAC3D,uBAAuB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAGjD,4CAA4C;IAC5C,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,+DAA+D;IAC/D,aAAa,EAAE,MAAM,CAAC;IACtB,sEAAsE;IACtE,UAAU,EAAE,OAAO,CAAC;IACpB,6CAA6C;IAC7C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iDAAiD;IACjD,cAAc,EAAE,MAAM,CAAC;IACvB,4DAA4D;IAC5D,uBAAuB,EAAE,OAAO,CAAC;IACjC,wDAAwD;IACxD,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAMD,8BAAsB,kBAAmB,YAAW,cAAc;IACpD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,aAAa;gBAArB,MAAM,EAAE,aAAa;IAEpD,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,QAAQ,IAAI,OAAO;IAInB,qBAAqB,IAAI,OAAO;IAIhC,gBAAgB,CAAC,MAAM,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,GAAG,SAAS;IAmBpE,eAAe,CAAC,IAAI,EAAE;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,GAAG,MAAM,GAAG,SAAS;IAMtB,iBAAiB,CAAC,IAAI,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,GAAG,SAAS;IAUpE,eAAe,IAAI,iBAAiB,EAAE;IAItC,gBAAgB,CAAC,IAAI,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;KAAE,GAAG,aAAa;IAsBvE,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAajE,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;IAoCtD,sBAAsB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;IAwDpE,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIxD,uBAAuB,IAAI,MAAM;IAKjC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAQ3C,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;CAKpD"}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Base harness adapter class.
|
|
4
|
+
*
|
|
5
|
+
* Provides default implementations for all HarnessAdapter methods.
|
|
6
|
+
* Each harness adapter extends this class and overrides only the
|
|
7
|
+
* methods that have truly harness-specific behavior.
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
+
var ownKeys = function(o) {
|
|
27
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
+
var ar = [];
|
|
29
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
+
return ar;
|
|
31
|
+
};
|
|
32
|
+
return ownKeys(o);
|
|
33
|
+
};
|
|
34
|
+
return function (mod) {
|
|
35
|
+
if (mod && mod.__esModule) return mod;
|
|
36
|
+
var result = {};
|
|
37
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
+
__setModuleDefault(result, mod);
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
41
|
+
})();
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.BaseHarnessAdapter = void 0;
|
|
44
|
+
const path = __importStar(require("node:path"));
|
|
45
|
+
const config_1 = require("../config");
|
|
46
|
+
const contextShared_1 = require("../prompts/contextShared");
|
|
47
|
+
const sessionBinding_1 = require("./hooks/sessionBinding");
|
|
48
|
+
const stopHookHandler_1 = require("./hooks/stopHookHandler");
|
|
49
|
+
const stopHookContinuation_1 = require("./hooks/stopHookContinuation");
|
|
50
|
+
const utils_1 = require("./hooks/utils");
|
|
51
|
+
const sessionMarker_1 = require("../utils/sessionMarker");
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
// Base adapter class
|
|
54
|
+
// ---------------------------------------------------------------------------
|
|
55
|
+
class BaseHarnessAdapter {
|
|
56
|
+
config;
|
|
57
|
+
constructor(config) {
|
|
58
|
+
this.config = config;
|
|
59
|
+
}
|
|
60
|
+
get name() {
|
|
61
|
+
return this.config.name;
|
|
62
|
+
}
|
|
63
|
+
isActive() {
|
|
64
|
+
return this.config.activationEnvVars.some((v) => !!process.env[v]);
|
|
65
|
+
}
|
|
66
|
+
autoResolvesSessionId() {
|
|
67
|
+
return this.config.autoResolvesSession;
|
|
68
|
+
}
|
|
69
|
+
resolveSessionId(parsed) {
|
|
70
|
+
// Harness-native env vars are everything in sessionIdEnvVars except AGENT_SESSION_ID
|
|
71
|
+
// (resolveSessionIdWithMarker handles AGENT_SESSION_ID separately with correct precedence)
|
|
72
|
+
const harnessEnvVars = this.config.sessionIdEnvVars.filter((v) => v !== "AGENT_SESSION_ID");
|
|
73
|
+
const result = (0, sessionMarker_1.resolveSessionIdWithMarker)(this.config.name, parsed, harnessEnvVars);
|
|
74
|
+
if (result)
|
|
75
|
+
return result;
|
|
76
|
+
// Check lower-priority fallback env vars (these lose to AGENT_SESSION_ID and markers)
|
|
77
|
+
if (this.config.fallbackSessionIdEnvVars) {
|
|
78
|
+
for (const envVar of this.config.fallbackSessionIdEnvVars) {
|
|
79
|
+
const val = process.env[envVar];
|
|
80
|
+
if (val)
|
|
81
|
+
return val;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
resolveStateDir(args) {
|
|
87
|
+
return (0, config_1.normalizeSessionStateDir)(args.stateDir ?? process.env.BABYSITTER_STATE_DIR);
|
|
88
|
+
}
|
|
89
|
+
resolvePluginRoot(args) {
|
|
90
|
+
if (this.config.noPluginRoot)
|
|
91
|
+
return undefined;
|
|
92
|
+
if (args.pluginRoot)
|
|
93
|
+
return path.resolve(args.pluginRoot);
|
|
94
|
+
for (const envVar of this.config.pluginRootEnvVars) {
|
|
95
|
+
const val = process.env[envVar];
|
|
96
|
+
if (val)
|
|
97
|
+
return path.resolve(val);
|
|
98
|
+
}
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
getCapabilities() {
|
|
102
|
+
return this.config.capabilities;
|
|
103
|
+
}
|
|
104
|
+
getPromptContext(opts) {
|
|
105
|
+
return (0, contextShared_1.createPromptContext)({
|
|
106
|
+
harness: this.config.name,
|
|
107
|
+
harnessLabel: this.config.displayName,
|
|
108
|
+
capabilities: this.config.promptCapabilities,
|
|
109
|
+
pluginRootVar: this.config.pluginRootVar,
|
|
110
|
+
loopControlTerm: this.config.loopControlTerm,
|
|
111
|
+
sessionBindingFlags: "",
|
|
112
|
+
hookDriven: this.config.hookDriven,
|
|
113
|
+
interactiveToolName: this.config.interactiveToolName,
|
|
114
|
+
sessionEnvVars: this.config.sessionEnvVars,
|
|
115
|
+
resumeFlags: "",
|
|
116
|
+
cliSetupSnippet: (0, contextShared_1.createDefaultCliSetupSnippet)(),
|
|
117
|
+
iterateFlags: "",
|
|
118
|
+
hasIntentFidelityChecks: this.config.hasIntentFidelityChecks,
|
|
119
|
+
hasNonNegotiables: this.config.hasNonNegotiables,
|
|
120
|
+
}, opts ? { interactive: opts.interactive } : undefined);
|
|
121
|
+
}
|
|
122
|
+
async bindSession(opts) {
|
|
123
|
+
const stateDir = this.resolveStateDir({
|
|
124
|
+
stateDir: opts.stateDir,
|
|
125
|
+
pluginRoot: opts.pluginRoot,
|
|
126
|
+
});
|
|
127
|
+
return (0, sessionBinding_1.bindSession)({
|
|
128
|
+
harness: this.config.name,
|
|
129
|
+
stateDir: stateDir ?? "",
|
|
130
|
+
opts,
|
|
131
|
+
autoReleaseStale: this.config.autoReleaseStale ?? false,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
async handleStopHook(args) {
|
|
135
|
+
if (this.config.noHookSupport || !this.supportsHookType("stop")) {
|
|
136
|
+
process.stdout.write("{}\n");
|
|
137
|
+
return 0;
|
|
138
|
+
}
|
|
139
|
+
const common = await (0, stopHookHandler_1.handleStopHookCommon)(args, {
|
|
140
|
+
harness: this.config.name,
|
|
141
|
+
sessionIdFields: ["session_id", "conversation_id"],
|
|
142
|
+
useDetailedRunState: true,
|
|
143
|
+
pluginRootEnvVars: this.config.pluginRootEnvVars,
|
|
144
|
+
resolveStateDir: (a) => (0, config_1.normalizeSessionStateDir)(a.stateDir ?? process.env.BABYSITTER_STATE_DIR),
|
|
145
|
+
});
|
|
146
|
+
if (!common.shouldContinue) {
|
|
147
|
+
return common.exitCode;
|
|
148
|
+
}
|
|
149
|
+
const { reason, systemMessage } = await (0, stopHookContinuation_1.buildStopHookContinuation)({
|
|
150
|
+
nextIteration: common.nextIteration,
|
|
151
|
+
maxIterations: common.state.maxIterations,
|
|
152
|
+
runState: common.runStateDetails?.runState ?? "",
|
|
153
|
+
pendingKinds: common.runStateDetails?.pendingKinds ?? "",
|
|
154
|
+
completionProof: common.runStateDetails?.completionProof ?? "",
|
|
155
|
+
prompt: common.prompt,
|
|
156
|
+
resolvedPluginRoot: common.resolvedPluginRoot,
|
|
157
|
+
runId: common.state.runId ?? undefined,
|
|
158
|
+
runsDir: common.runsDir,
|
|
159
|
+
entrypointImportPath: common.runStateDetails?.entrypointImportPath,
|
|
160
|
+
});
|
|
161
|
+
process.stdout.write(JSON.stringify({ decision: "block", reason, systemMessage }) + "\n");
|
|
162
|
+
return 0;
|
|
163
|
+
}
|
|
164
|
+
async handleSessionStartHook(args) {
|
|
165
|
+
if (this.config.noHookSupport) {
|
|
166
|
+
process.stdout.write("{}\n");
|
|
167
|
+
return 0;
|
|
168
|
+
}
|
|
169
|
+
let rawInput = "";
|
|
170
|
+
if (args.stdinPayload !== undefined) {
|
|
171
|
+
rawInput = args.stdinPayload;
|
|
172
|
+
}
|
|
173
|
+
else if (this.config.hookDriven) {
|
|
174
|
+
// Only read stdin for hook-driven adapters (they pipe JSON via harness hooks)
|
|
175
|
+
try {
|
|
176
|
+
rawInput = await (0, utils_1.readStdin)();
|
|
177
|
+
}
|
|
178
|
+
catch {
|
|
179
|
+
// stdin unavailable — fall through to env-based resolution
|
|
180
|
+
}
|
|
181
|
+
finally {
|
|
182
|
+
if (typeof process.stdin.unref === "function") {
|
|
183
|
+
process.stdin.unref();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
const hookInput = (0, utils_1.parseHookInput)(rawInput);
|
|
188
|
+
let sessionId = (0, utils_1.safeStr)(hookInput, "session_id") ||
|
|
189
|
+
(0, utils_1.safeStr)(hookInput, "conversation_id") ||
|
|
190
|
+
process.env.AGENT_SESSION_ID ||
|
|
191
|
+
"";
|
|
192
|
+
if (!sessionId) {
|
|
193
|
+
// Check harness-native and fallback session env vars
|
|
194
|
+
for (const envVar of [...this.config.sessionIdEnvVars, ...(this.config.fallbackSessionIdEnvVars ?? [])]) {
|
|
195
|
+
if (envVar !== "AGENT_SESSION_ID" && process.env[envVar]) {
|
|
196
|
+
sessionId = process.env[envVar];
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (!sessionId) {
|
|
202
|
+
process.stdout.write("{}\n");
|
|
203
|
+
return 0;
|
|
204
|
+
}
|
|
205
|
+
const stateDir = (0, config_1.normalizeSessionStateDir)(args.stateDir ?? process.env.BABYSITTER_STATE_DIR);
|
|
206
|
+
if (stateDir) {
|
|
207
|
+
await (0, utils_1.initializeSessionState)(sessionId, stateDir, {
|
|
208
|
+
verbose: args.verbose,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
process.stdout.write("{}\n");
|
|
212
|
+
return 0;
|
|
213
|
+
}
|
|
214
|
+
findHookDispatcherPath(_startCwd) {
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
getMissingSessionIdHint() {
|
|
218
|
+
return this.config.missingSessionIdHint ??
|
|
219
|
+
`Pass --session-id explicitly or ensure the ${this.config.name} hook context provides one.`;
|
|
220
|
+
}
|
|
221
|
+
supportsHookType(hookType) {
|
|
222
|
+
if (this.config.noHookSupport)
|
|
223
|
+
return false;
|
|
224
|
+
if (this.config.supportedHookTypes) {
|
|
225
|
+
return this.config.supportedHookTypes.includes(hookType);
|
|
226
|
+
}
|
|
227
|
+
return true;
|
|
228
|
+
}
|
|
229
|
+
getUnsupportedHookMessage(hookType) {
|
|
230
|
+
const custom = this.config.unsupportedHookMessages?.[hookType];
|
|
231
|
+
if (custom)
|
|
232
|
+
return custom;
|
|
233
|
+
return `Hook type "${hookType}" is not supported by the ${this.config.name} adapter.`;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
exports.BaseHarnessAdapter = BaseHarnessAdapter;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code harness adapter.
|
|
3
|
+
*
|
|
4
|
+
* Derives all behavior from BaseHarnessAdapter + agent-mux metadata.
|
|
5
|
+
*/
|
|
6
|
+
import { BaseHarnessAdapter } from "../BaseAdapter";
|
|
7
|
+
export declare function resolveCurrentSessionIdFromEnv(): string | undefined;
|
|
8
|
+
export interface SessionResolutionDetails {
|
|
9
|
+
sessionId?: string;
|
|
10
|
+
resolvedFrom: "env-var" | "explicit" | "none";
|
|
11
|
+
/** @deprecated PID-marker logic removed. Always null. */
|
|
12
|
+
ancestorPid: number | null;
|
|
13
|
+
/** @deprecated PID-marker logic removed. Always null. */
|
|
14
|
+
ancestorAlive: boolean | null;
|
|
15
|
+
}
|
|
16
|
+
export declare function resolveSessionIdDetailed(explicit?: string): SessionResolutionDetails;
|
|
17
|
+
export declare const __resolveCurrentSessionIdFromEnvForTests: typeof resolveCurrentSessionIdFromEnv;
|
|
18
|
+
export declare function setBabysitterSessionIdInEnvFile(envFile: string, sessionId: string): void;
|
|
19
|
+
declare class ClaudeCodeAdapter extends BaseHarnessAdapter {
|
|
20
|
+
constructor();
|
|
21
|
+
}
|
|
22
|
+
export declare function createClaudeCodeAdapter(): ClaudeCodeAdapter;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=claude-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code.d.ts","sourceRoot":"","sources":["../../../src/harness/adapters/claude-code.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,kBAAkB,EAAsB,MAAM,gBAAgB,CAAC;AAQxE,wBAAgB,8BAA8B,IAAI,MAAM,GAAG,SAAS,CAEnE;AAED,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;IAC9C,yDAAyD;IACzD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,yDAAyD;IACzD,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;CAC/B;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,wBAAwB,CASpF;AAED,eAAO,MAAM,wCAAwC,uCAAiC,CAAC;AAEvF,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAExF;AAwBD,cAAM,iBAAkB,SAAQ,kBAAkB;;CAIjD;AAED,wBAAgB,uBAAuB,IAAI,iBAAiB,CAE3D"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Claude Code harness adapter.
|
|
4
|
+
*
|
|
5
|
+
* Derives all behavior from BaseHarnessAdapter + agent-mux metadata.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.__resolveCurrentSessionIdFromEnvForTests = void 0;
|
|
9
|
+
exports.resolveCurrentSessionIdFromEnv = resolveCurrentSessionIdFromEnv;
|
|
10
|
+
exports.resolveSessionIdDetailed = resolveSessionIdDetailed;
|
|
11
|
+
exports.setBabysitterSessionIdInEnvFile = setBabysitterSessionIdInEnvFile;
|
|
12
|
+
exports.createClaudeCodeAdapter = createClaudeCodeAdapter;
|
|
13
|
+
const node_fs_1 = require("node:fs");
|
|
14
|
+
const BaseAdapter_1 = require("../BaseAdapter");
|
|
15
|
+
const amuxMetadata_1 = require("../amuxMetadata");
|
|
16
|
+
const derivePromptContext_1 = require("../derivePromptContext");
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
// Backward-compatible exported utilities
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
function resolveCurrentSessionIdFromEnv() {
|
|
21
|
+
return process.env.AGENT_SESSION_ID;
|
|
22
|
+
}
|
|
23
|
+
function resolveSessionIdDetailed(explicit) {
|
|
24
|
+
if (explicit) {
|
|
25
|
+
return { sessionId: explicit, resolvedFrom: "explicit", ancestorPid: null, ancestorAlive: null };
|
|
26
|
+
}
|
|
27
|
+
const agentSessionId = process.env.AGENT_SESSION_ID;
|
|
28
|
+
if (agentSessionId) {
|
|
29
|
+
return { sessionId: agentSessionId, resolvedFrom: "env-var", ancestorPid: null, ancestorAlive: null };
|
|
30
|
+
}
|
|
31
|
+
return { sessionId: undefined, resolvedFrom: "none", ancestorPid: null, ancestorAlive: null };
|
|
32
|
+
}
|
|
33
|
+
exports.__resolveCurrentSessionIdFromEnvForTests = resolveCurrentSessionIdFromEnv;
|
|
34
|
+
function setBabysitterSessionIdInEnvFile(envFile, sessionId) {
|
|
35
|
+
(0, node_fs_1.appendFileSync)(envFile, `export AGENT_SESSION_ID="${sessionId}"\n`);
|
|
36
|
+
}
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
// Adapter
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
function buildConfig() {
|
|
41
|
+
const metadata = (0, amuxMetadata_1.getAmuxAdapterMetadata)("claude-code");
|
|
42
|
+
return (0, derivePromptContext_1.deriveAdapterConfig)(metadata, {
|
|
43
|
+
name: "claude-code",
|
|
44
|
+
displayName: "Claude Code",
|
|
45
|
+
extraActivationEnvVars: ["CLAUDE_ENV_FILE"],
|
|
46
|
+
pluginRootEnvVars: ["CLAUDE_PLUGIN_ROOT"],
|
|
47
|
+
sessionIdEnvVars: ["AGENT_SESSION_ID"],
|
|
48
|
+
pluginRootVar: "${CLAUDE_PLUGIN_ROOT}",
|
|
49
|
+
interactiveToolName: "AskUserQuestion tool",
|
|
50
|
+
sessionEnvVars: "AGENT_SESSION_ID",
|
|
51
|
+
hasIntentFidelityChecks: false,
|
|
52
|
+
hasNonNegotiables: false,
|
|
53
|
+
hookDriven: true,
|
|
54
|
+
autoReleaseStale: true,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
class ClaudeCodeAdapter extends BaseAdapter_1.BaseHarnessAdapter {
|
|
58
|
+
constructor() {
|
|
59
|
+
super(buildConfig());
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function createClaudeCodeAdapter() {
|
|
63
|
+
return new ClaudeCodeAdapter();
|
|
64
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codex harness adapter.
|
|
3
|
+
*
|
|
4
|
+
* Derives all behavior from BaseHarnessAdapter + agent-mux metadata.
|
|
5
|
+
*/
|
|
6
|
+
import { BaseHarnessAdapter } from "../BaseAdapter";
|
|
7
|
+
declare class CodexAdapter extends BaseHarnessAdapter {
|
|
8
|
+
constructor();
|
|
9
|
+
}
|
|
10
|
+
export declare function createCodexAdapter(): CodexAdapter;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=codex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../../src/harness/adapters/codex.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAsB,MAAM,gBAAgB,CAAC;AAwBxE,cAAM,YAAa,SAAQ,kBAAkB;;CAI5C;AAED,wBAAgB,kBAAkB,IAAI,YAAY,CAEjD"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Codex harness adapter.
|
|
4
|
+
*
|
|
5
|
+
* Derives all behavior from BaseHarnessAdapter + agent-mux metadata.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.createCodexAdapter = createCodexAdapter;
|
|
9
|
+
const BaseAdapter_1 = require("../BaseAdapter");
|
|
10
|
+
const amuxMetadata_1 = require("../amuxMetadata");
|
|
11
|
+
const derivePromptContext_1 = require("../derivePromptContext");
|
|
12
|
+
function buildConfig() {
|
|
13
|
+
const metadata = (0, amuxMetadata_1.getAmuxAdapterMetadata)("codex");
|
|
14
|
+
return (0, derivePromptContext_1.deriveAdapterConfig)(metadata, {
|
|
15
|
+
name: "codex",
|
|
16
|
+
displayName: "Codex",
|
|
17
|
+
extraActivationEnvVars: ["CODEX_THREAD_ID", "CODEX_PLUGIN_ROOT"],
|
|
18
|
+
pluginRootEnvVars: ["CODEX_PLUGIN_ROOT", "AGENT_PLUGIN_ROOT"],
|
|
19
|
+
sessionIdEnvVars: ["CODEX_THREAD_ID", "CODEX_SESSION_ID", "AGENT_SESSION_ID"],
|
|
20
|
+
pluginRootVar: "${CODEX_PLUGIN_ROOT}",
|
|
21
|
+
interactiveToolName: "AskUserQuestion tool",
|
|
22
|
+
sessionEnvVars: "CODEX_THREAD_ID/CODEX_SESSION_ID and AGENT_SESSION_ID",
|
|
23
|
+
hasIntentFidelityChecks: true,
|
|
24
|
+
hasNonNegotiables: true,
|
|
25
|
+
autoReleaseStale: true,
|
|
26
|
+
missingSessionIdHint: "Use --session-id explicitly, or launch through a Codex hook callback " +
|
|
27
|
+
"that provides a stable session/thread ID.",
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
class CodexAdapter extends BaseAdapter_1.BaseHarnessAdapter {
|
|
31
|
+
constructor() {
|
|
32
|
+
super(buildConfig());
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function createCodexAdapter() {
|
|
36
|
+
return new CodexAdapter();
|
|
37
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor harness adapter.
|
|
3
|
+
*
|
|
4
|
+
* Derives all behavior from BaseHarnessAdapter + agent-mux metadata.
|
|
5
|
+
*/
|
|
6
|
+
import { BaseHarnessAdapter } from "../BaseAdapter";
|
|
7
|
+
declare class CursorAdapter extends BaseHarnessAdapter {
|
|
8
|
+
constructor();
|
|
9
|
+
handleStopHook(args: import("../types").HookHandlerArgs): Promise<number>;
|
|
10
|
+
}
|
|
11
|
+
export declare function createCursorAdapter(): CursorAdapter;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=cursor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../src/harness/adapters/cursor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAE,kBAAkB,EAAsB,MAAM,gBAAgB,CAAC;AAqCxE,cAAM,aAAc,SAAQ,kBAAkB;;IAK7B,cAAc,CAC3B,IAAI,EAAE,OAAO,UAAU,EAAE,eAAe,GACvC,OAAO,CAAC,MAAM,CAAC;CAwCnB;AAED,wBAAgB,mBAAmB,IAAI,aAAa,CAEnD"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Cursor harness adapter.
|
|
4
|
+
*
|
|
5
|
+
* Derives all behavior from BaseHarnessAdapter + agent-mux metadata.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.createCursorAdapter = createCursorAdapter;
|
|
9
|
+
const config_1 = require("../../config");
|
|
10
|
+
const stopHookContinuation_1 = require("../hooks/stopHookContinuation");
|
|
11
|
+
const stopHookHandler_1 = require("../hooks/stopHookHandler");
|
|
12
|
+
const types_1 = require("../types");
|
|
13
|
+
const BaseAdapter_1 = require("../BaseAdapter");
|
|
14
|
+
const amuxMetadata_1 = require("../amuxMetadata");
|
|
15
|
+
const derivePromptContext_1 = require("../derivePromptContext");
|
|
16
|
+
function buildConfig() {
|
|
17
|
+
const metadata = (0, amuxMetadata_1.getAmuxAdapterMetadata)("cursor");
|
|
18
|
+
const config = (0, derivePromptContext_1.deriveAdapterConfig)(metadata, {
|
|
19
|
+
name: "cursor",
|
|
20
|
+
displayName: "Cursor",
|
|
21
|
+
extraActivationEnvVars: ["CURSOR_PROJECT_DIR", "CURSOR_VERSION"],
|
|
22
|
+
pluginRootEnvVars: ["CURSOR_PLUGIN_ROOT"],
|
|
23
|
+
sessionIdEnvVars: ["AGENT_SESSION_ID"],
|
|
24
|
+
pluginRootVar: "${CURSOR_PLUGIN_ROOT}",
|
|
25
|
+
interactiveToolName: "AskUserQuestion tool",
|
|
26
|
+
sessionEnvVars: "AGENT_SESSION_ID",
|
|
27
|
+
hasIntentFidelityChecks: false,
|
|
28
|
+
hasNonNegotiables: false,
|
|
29
|
+
capabilities: [types_1.HarnessCapability.HeadlessPrompt, types_1.HarnessCapability.StopHook, types_1.HarnessCapability.SessionBinding, types_1.HarnessCapability.Mcp],
|
|
30
|
+
promptCapabilities: ["hooks", "stop-hook", "mcp", "task-tool", "breakpoint-routing"],
|
|
31
|
+
supportedHookTypes: [
|
|
32
|
+
"stop", "session-start", "session-end", "post-tool-use",
|
|
33
|
+
"after-file-edit", "after-shell-execution", "before-shell-execution",
|
|
34
|
+
"before-mcp-execution", "after-mcp-execution", "before-read-file",
|
|
35
|
+
"pre-tool-use", "post-tool-use-failure", "subagent-start",
|
|
36
|
+
"subagent-stop", "pre-compact", "before-submit-prompt",
|
|
37
|
+
"before-tab-file-read", "after-tab-file-edit",
|
|
38
|
+
],
|
|
39
|
+
missingSessionIdHint: "Cursor provides conversation_id only via hook stdin JSON (not as an " +
|
|
40
|
+
"env var). Ensure the sessionStart hook is configured in .cursor/hooks.json " +
|
|
41
|
+
"and is persisting the conversation_id to the state file. Pass --session-id " +
|
|
42
|
+
"explicitly if running outside of the hook context.",
|
|
43
|
+
});
|
|
44
|
+
config.autoResolvesSession = false;
|
|
45
|
+
return config;
|
|
46
|
+
}
|
|
47
|
+
class CursorAdapter extends BaseAdapter_1.BaseHarnessAdapter {
|
|
48
|
+
constructor() {
|
|
49
|
+
super(buildConfig());
|
|
50
|
+
}
|
|
51
|
+
async handleStopHook(args) {
|
|
52
|
+
if (this.config.noHookSupport || !this.supportsHookType("stop")) {
|
|
53
|
+
process.stdout.write("{}\n");
|
|
54
|
+
return 0;
|
|
55
|
+
}
|
|
56
|
+
const common = await (0, stopHookHandler_1.handleStopHookCommon)(args, {
|
|
57
|
+
harness: this.config.name,
|
|
58
|
+
sessionIdFields: ["session_id", "conversation_id"],
|
|
59
|
+
useDetailedRunState: true,
|
|
60
|
+
pluginRootEnvVars: this.config.pluginRootEnvVars,
|
|
61
|
+
resolveStateDir: (a) => (0, config_1.normalizeSessionStateDir)(a.stateDir ?? process.env.BABYSITTER_STATE_DIR),
|
|
62
|
+
});
|
|
63
|
+
if (!common.shouldContinue) {
|
|
64
|
+
return common.exitCode;
|
|
65
|
+
}
|
|
66
|
+
const { systemMessage } = await (0, stopHookContinuation_1.buildStopHookContinuation)({
|
|
67
|
+
nextIteration: common.nextIteration,
|
|
68
|
+
maxIterations: common.state.maxIterations,
|
|
69
|
+
runState: common.runStateDetails?.runState ?? "",
|
|
70
|
+
pendingKinds: common.runStateDetails?.pendingKinds ?? "",
|
|
71
|
+
completionProof: common.runStateDetails?.completionProof ?? "",
|
|
72
|
+
prompt: common.prompt,
|
|
73
|
+
resolvedPluginRoot: common.resolvedPluginRoot,
|
|
74
|
+
runId: common.state.runId ?? undefined,
|
|
75
|
+
runsDir: common.runsDir,
|
|
76
|
+
entrypointImportPath: common.runStateDetails?.entrypointImportPath,
|
|
77
|
+
});
|
|
78
|
+
// Cursor continues a blocked stop-hook flow via followup_message.
|
|
79
|
+
process.stdout.write(JSON.stringify({ followup_message: systemMessage }) + "\n");
|
|
80
|
+
return 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function createCursorAdapter() {
|
|
84
|
+
return new CursorAdapter();
|
|
85
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gemini CLI harness adapter.
|
|
3
|
+
*
|
|
4
|
+
* Derives all behavior from BaseHarnessAdapter + agent-mux metadata.
|
|
5
|
+
*/
|
|
6
|
+
import { BaseHarnessAdapter } from "../BaseAdapter";
|
|
7
|
+
declare class GeminiCliAdapter extends BaseHarnessAdapter {
|
|
8
|
+
constructor();
|
|
9
|
+
}
|
|
10
|
+
export declare function createGeminiCliAdapter(): GeminiCliAdapter;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=gemini-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini-cli.d.ts","sourceRoot":"","sources":["../../../src/harness/adapters/gemini-cli.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAsB,MAAM,gBAAgB,CAAC;AAoBxE,cAAM,gBAAiB,SAAQ,kBAAkB;;CAIhD;AAED,wBAAgB,sBAAsB,IAAI,gBAAgB,CAEzD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Gemini CLI harness adapter.
|
|
4
|
+
*
|
|
5
|
+
* Derives all behavior from BaseHarnessAdapter + agent-mux metadata.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.createGeminiCliAdapter = createGeminiCliAdapter;
|
|
9
|
+
const BaseAdapter_1 = require("../BaseAdapter");
|
|
10
|
+
const amuxMetadata_1 = require("../amuxMetadata");
|
|
11
|
+
const derivePromptContext_1 = require("../derivePromptContext");
|
|
12
|
+
function buildConfig() {
|
|
13
|
+
const metadata = (0, amuxMetadata_1.getAmuxAdapterMetadata)("gemini-cli");
|
|
14
|
+
return (0, derivePromptContext_1.deriveAdapterConfig)(metadata, {
|
|
15
|
+
name: "gemini-cli",
|
|
16
|
+
displayName: "Gemini CLI",
|
|
17
|
+
extraActivationEnvVars: ["GEMINI_PROJECT_DIR", "GEMINI_CWD"],
|
|
18
|
+
pluginRootEnvVars: ["GEMINI_EXTENSION_PATH", "BABYSITTER_EXTENSION_PATH"],
|
|
19
|
+
sessionIdEnvVars: ["GEMINI_SESSION_ID", "AGENT_SESSION_ID"],
|
|
20
|
+
pluginRootVar: "${GEMINI_EXTENSION_PATH}",
|
|
21
|
+
interactiveToolName: "AskUserQuestion tool",
|
|
22
|
+
sessionEnvVars: "GEMINI_SESSION_ID and AGENT_SESSION_ID",
|
|
23
|
+
hasIntentFidelityChecks: false,
|
|
24
|
+
hasNonNegotiables: false,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
class GeminiCliAdapter extends BaseAdapter_1.BaseHarnessAdapter {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(buildConfig());
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function createGeminiCliAdapter() {
|
|
33
|
+
return new GeminiCliAdapter();
|
|
34
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Copilot harness adapter.
|
|
3
|
+
*
|
|
4
|
+
* Derives all behavior from BaseHarnessAdapter + agent-mux metadata.
|
|
5
|
+
*/
|
|
6
|
+
import { BaseHarnessAdapter } from "../BaseAdapter";
|
|
7
|
+
export declare function setBabysitterSessionIdInCopilotEnvFile(envFile: string, sessionId: string): void;
|
|
8
|
+
declare class GithubCopilotAdapter extends BaseHarnessAdapter {
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
11
|
+
export declare function createGithubCopilotAdapter(): GithubCopilotAdapter;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=github-copilot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-copilot.d.ts","sourceRoot":"","sources":["../../../src/harness/adapters/github-copilot.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,kBAAkB,EAAsB,MAAM,gBAAgB,CAAC;AAQxE,wBAAgB,sCAAsC,CACpD,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,GAChB,IAAI,CAEN;AAoCD,cAAM,oBAAqB,SAAQ,kBAAkB;;CAIpD;AAED,wBAAgB,0BAA0B,IAAI,oBAAoB,CAEjE"}
|