@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,300 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* configure command - Display and validate SDK configuration
|
|
4
|
+
*
|
|
5
|
+
* This command provides utilities to:
|
|
6
|
+
* - Display current effective configuration (merged defaults + env)
|
|
7
|
+
* - Validate current configuration
|
|
8
|
+
* - Show important paths (runs dir, etc.)
|
|
9
|
+
*
|
|
10
|
+
* Subcommands:
|
|
11
|
+
* - configure show - Display current effective configuration
|
|
12
|
+
* - configure validate - Validate current configuration
|
|
13
|
+
* - configure paths - Show important paths
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.configureShow = configureShow;
|
|
50
|
+
exports.configureValidate = configureValidate;
|
|
51
|
+
exports.configurePaths = configurePaths;
|
|
52
|
+
exports.handleConfigureCommand = handleConfigureCommand;
|
|
53
|
+
const path = __importStar(require("node:path"));
|
|
54
|
+
const defaults_1 = require("../../config/defaults");
|
|
55
|
+
const output_1 = require("./configure/output");
|
|
56
|
+
// ============================================================================
|
|
57
|
+
// Documentation Links
|
|
58
|
+
// ============================================================================
|
|
59
|
+
const DOC_BASE_URL = "https://docs.a5c.ai/sdk/config";
|
|
60
|
+
/**
|
|
61
|
+
* Documentation links for each configuration option
|
|
62
|
+
*/
|
|
63
|
+
const DOC_LINKS = {
|
|
64
|
+
runsDir: `${DOC_BASE_URL}#runs-dir`,
|
|
65
|
+
maxIterations: `${DOC_BASE_URL}#max-iterations`,
|
|
66
|
+
qualityThreshold: `${DOC_BASE_URL}#quality-threshold`,
|
|
67
|
+
timeout: `${DOC_BASE_URL}#timeout`,
|
|
68
|
+
logLevel: `${DOC_BASE_URL}#log-level`,
|
|
69
|
+
allowSecretLogs: `${DOC_BASE_URL}#allow-secret-logs`,
|
|
70
|
+
hookTimeout: `${DOC_BASE_URL}#hook-timeout`,
|
|
71
|
+
nodeTaskTimeout: `${DOC_BASE_URL}#node-task-timeout`,
|
|
72
|
+
clockStepMs: `${DOC_BASE_URL}#clock-step-ms`,
|
|
73
|
+
clockStartMs: `${DOC_BASE_URL}#clock-start-ms`,
|
|
74
|
+
layoutVersion: `${DOC_BASE_URL}#layout-version`,
|
|
75
|
+
largeResultPreviewLimit: `${DOC_BASE_URL}#large-result-preview-limit`,
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Descriptions for each configuration option
|
|
79
|
+
*/
|
|
80
|
+
const DESCRIPTIONS = {
|
|
81
|
+
runsDir: "Directory where run state is stored",
|
|
82
|
+
maxIterations: "Maximum iterations before run terminates",
|
|
83
|
+
qualityThreshold: "Quality threshold percentage (0-100)",
|
|
84
|
+
timeout: "Default task timeout in milliseconds",
|
|
85
|
+
logLevel: "Minimum log level for output",
|
|
86
|
+
allowSecretLogs: "Allow logging of sensitive values",
|
|
87
|
+
hookTimeout: "Hook execution timeout in milliseconds",
|
|
88
|
+
nodeTaskTimeout: "Node task execution timeout in milliseconds",
|
|
89
|
+
clockStepMs: "Clock step interval for testing (ms)",
|
|
90
|
+
clockStartMs: "Clock start epoch for testing (ms)",
|
|
91
|
+
layoutVersion: "Storage layout version identifier",
|
|
92
|
+
largeResultPreviewLimit: "Max size for inline result preview (bytes)",
|
|
93
|
+
};
|
|
94
|
+
// ============================================================================
|
|
95
|
+
// Helper Functions
|
|
96
|
+
// ============================================================================
|
|
97
|
+
/**
|
|
98
|
+
* Get the environment variable name for a config key, if any
|
|
99
|
+
*/
|
|
100
|
+
function getEnvVarForKey(key) {
|
|
101
|
+
const envVarMap = {
|
|
102
|
+
runsDir: "RUNS_DIR",
|
|
103
|
+
maxIterations: "MAX_ITERATIONS",
|
|
104
|
+
qualityThreshold: "QUALITY_THRESHOLD",
|
|
105
|
+
timeout: "TIMEOUT",
|
|
106
|
+
logLevel: "LOG_LEVEL",
|
|
107
|
+
allowSecretLogs: "ALLOW_SECRET_LOGS",
|
|
108
|
+
hookTimeout: "HOOK_TIMEOUT",
|
|
109
|
+
nodeTaskTimeout: "NODE_TASK_TIMEOUT",
|
|
110
|
+
};
|
|
111
|
+
const envVarKey = envVarMap[key];
|
|
112
|
+
if (envVarKey) {
|
|
113
|
+
return defaults_1.CONFIG_ENV_VARS[envVarKey];
|
|
114
|
+
}
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Determine if a config value came from an environment variable
|
|
119
|
+
*/
|
|
120
|
+
function getValueSource(key) {
|
|
121
|
+
const envVar = getEnvVarForKey(key);
|
|
122
|
+
if (envVar && process.env[envVar] !== undefined) {
|
|
123
|
+
return "env";
|
|
124
|
+
}
|
|
125
|
+
return "default";
|
|
126
|
+
}
|
|
127
|
+
// ============================================================================
|
|
128
|
+
// Subcommand Implementations
|
|
129
|
+
// ============================================================================
|
|
130
|
+
/**
|
|
131
|
+
* Execute the "configure show" subcommand
|
|
132
|
+
*/
|
|
133
|
+
function configureShow(options) {
|
|
134
|
+
const config = options.defaultsOnly ? defaults_1.DEFAULTS : (0, defaults_1.getConfig)();
|
|
135
|
+
const timestamp = new Date().toISOString();
|
|
136
|
+
const values = Object.keys(config).map((key) => ({
|
|
137
|
+
key,
|
|
138
|
+
value: config[key],
|
|
139
|
+
source: options.defaultsOnly ? "default" : getValueSource(key),
|
|
140
|
+
envVar: getEnvVarForKey(key),
|
|
141
|
+
docLink: DOC_LINKS[key],
|
|
142
|
+
description: DESCRIPTIONS[key],
|
|
143
|
+
}));
|
|
144
|
+
return { values, timestamp };
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Execute the "configure validate" subcommand
|
|
148
|
+
*/
|
|
149
|
+
function configureValidate(options) {
|
|
150
|
+
const config = options.defaultsOnly ? defaults_1.DEFAULTS : (0, defaults_1.getConfig)();
|
|
151
|
+
const result = (0, defaults_1.validateConfig)(config);
|
|
152
|
+
const timestamp = new Date().toISOString();
|
|
153
|
+
return {
|
|
154
|
+
valid: result.valid,
|
|
155
|
+
errors: result.errors,
|
|
156
|
+
warnings: result.warnings,
|
|
157
|
+
timestamp,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Execute the "configure paths" subcommand
|
|
162
|
+
*/
|
|
163
|
+
async function configurePaths(options) {
|
|
164
|
+
const cwd = options.cwd ?? process.cwd();
|
|
165
|
+
const config = options.defaultsOnly ? defaults_1.DEFAULTS : (0, defaults_1.getConfig)();
|
|
166
|
+
const timestamp = new Date().toISOString();
|
|
167
|
+
const { promises: fs } = await Promise.resolve().then(() => __importStar(require("node:fs")));
|
|
168
|
+
const pathInfos = [
|
|
169
|
+
{
|
|
170
|
+
name: "runsDir",
|
|
171
|
+
relativePath: config.runsDir,
|
|
172
|
+
description: "Directory where run state and journals are stored",
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: "a5cDir",
|
|
176
|
+
relativePath: ".a5c",
|
|
177
|
+
description: "Root directory for babysitter data",
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: "hooksDir",
|
|
181
|
+
relativePath: ".a5c/hooks",
|
|
182
|
+
description: "Directory for runtime hook scripts",
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: "processesDir",
|
|
186
|
+
relativePath: ".a5c/processes",
|
|
187
|
+
description: "Directory for process definitions",
|
|
188
|
+
},
|
|
189
|
+
];
|
|
190
|
+
const paths = await Promise.all(pathInfos.map(async (info) => {
|
|
191
|
+
const absolutePath = path.resolve(cwd, info.relativePath);
|
|
192
|
+
let exists = false;
|
|
193
|
+
try {
|
|
194
|
+
await fs.access(absolutePath);
|
|
195
|
+
exists = true;
|
|
196
|
+
}
|
|
197
|
+
catch {
|
|
198
|
+
exists = false;
|
|
199
|
+
}
|
|
200
|
+
return {
|
|
201
|
+
name: info.name,
|
|
202
|
+
path: absolutePath,
|
|
203
|
+
exists,
|
|
204
|
+
description: info.description,
|
|
205
|
+
};
|
|
206
|
+
}));
|
|
207
|
+
return { paths, timestamp };
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* CLI entry point for the configure command
|
|
211
|
+
*
|
|
212
|
+
* @param args - Subcommand arguments (e.g., ["show"], ["validate"], ["paths"])
|
|
213
|
+
* @param options - Parsed CLI options
|
|
214
|
+
* @returns Exit code (0 for success, 1 for failure)
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* ```ts
|
|
218
|
+
* // Show current configuration
|
|
219
|
+
* await handleConfigureCommand(["show"], {});
|
|
220
|
+
*
|
|
221
|
+
* // Show configuration in JSON format
|
|
222
|
+
* await handleConfigureCommand(["show"], { json: true });
|
|
223
|
+
*
|
|
224
|
+
* // Show only default values
|
|
225
|
+
* await handleConfigureCommand(["show"], { defaultsOnly: true });
|
|
226
|
+
*
|
|
227
|
+
* // Validate configuration
|
|
228
|
+
* await handleConfigureCommand(["validate"], {});
|
|
229
|
+
*
|
|
230
|
+
* // Show paths
|
|
231
|
+
* await handleConfigureCommand(["paths"], {});
|
|
232
|
+
* ```
|
|
233
|
+
*/
|
|
234
|
+
async function handleConfigureCommand(args, options) {
|
|
235
|
+
const subcommand = args[0] ?? "show";
|
|
236
|
+
const useColors = !options.json && (0, output_1.supportsColors)();
|
|
237
|
+
try {
|
|
238
|
+
switch (subcommand) {
|
|
239
|
+
case "show": {
|
|
240
|
+
const result = configureShow(options);
|
|
241
|
+
if (options.json) {
|
|
242
|
+
console.log(JSON.stringify(result, null, 2));
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
(0, output_1.outputShowTable)(result, useColors, DOC_BASE_URL);
|
|
246
|
+
}
|
|
247
|
+
return 0;
|
|
248
|
+
}
|
|
249
|
+
case "validate": {
|
|
250
|
+
const result = configureValidate(options);
|
|
251
|
+
if (options.json) {
|
|
252
|
+
console.log(JSON.stringify(result, null, 2));
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
(0, output_1.outputValidateResult)(result, useColors);
|
|
256
|
+
}
|
|
257
|
+
return result.valid ? 0 : 1;
|
|
258
|
+
}
|
|
259
|
+
case "paths": {
|
|
260
|
+
const result = await configurePaths(options);
|
|
261
|
+
if (options.json) {
|
|
262
|
+
console.log(JSON.stringify(result, null, 2));
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
(0, output_1.outputPathsResult)(result, useColors);
|
|
266
|
+
}
|
|
267
|
+
return 0;
|
|
268
|
+
}
|
|
269
|
+
default: {
|
|
270
|
+
const errorMsg = `Unknown subcommand: ${subcommand}`;
|
|
271
|
+
if (options.json) {
|
|
272
|
+
console.log(JSON.stringify({ error: errorMsg }, null, 2));
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
console.error(`Error: ${errorMsg}`);
|
|
276
|
+
console.error("");
|
|
277
|
+
console.error("Available subcommands:");
|
|
278
|
+
console.error(" show Display current effective configuration");
|
|
279
|
+
console.error(" validate Validate current configuration");
|
|
280
|
+
console.error(" paths Show important paths");
|
|
281
|
+
console.error("");
|
|
282
|
+
console.error("Options:");
|
|
283
|
+
console.error(" --json Output in JSON format");
|
|
284
|
+
console.error(" --defaults-only Show only default values (ignore env overrides)");
|
|
285
|
+
}
|
|
286
|
+
return 1;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
catch (error) {
|
|
291
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
292
|
+
if (options.json) {
|
|
293
|
+
console.log(JSON.stringify({ error: errorMsg }, null, 2));
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
console.error(`Error: ${errorMsg}`);
|
|
297
|
+
}
|
|
298
|
+
return 1;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cost:stats command - Show cost tracking statistics from run journals
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* babysitter cost:stats [runId] [--json] [--all] [--runs-dir <dir>]
|
|
6
|
+
*
|
|
7
|
+
* With runId: reads journal for that run, finds COST_TRACKED events, prints table
|
|
8
|
+
* With --all: aggregates across all runs in the runs directory
|
|
9
|
+
* With --json: outputs JSON instead of table
|
|
10
|
+
*/
|
|
11
|
+
import type { CostStatsOptions } from "../../cost/types";
|
|
12
|
+
export declare function handleCostStats(options: CostStatsOptions): Promise<number>;
|
|
13
|
+
//# sourceMappingURL=costStats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"costStats.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/costStats.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,KAAK,EACV,gBAAgB,EAKjB,MAAM,kBAAkB,CAAC;AAmQ1B,wBAAsB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAuChF"}
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* cost:stats command - Show cost tracking statistics from run journals
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* babysitter cost:stats [runId] [--json] [--all] [--runs-dir <dir>]
|
|
7
|
+
*
|
|
8
|
+
* With runId: reads journal for that run, finds COST_TRACKED events, prints table
|
|
9
|
+
* With --all: aggregates across all runs in the runs directory
|
|
10
|
+
* With --json: outputs JSON instead of table
|
|
11
|
+
*/
|
|
12
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
15
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
16
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
17
|
+
}
|
|
18
|
+
Object.defineProperty(o, k2, desc);
|
|
19
|
+
}) : (function(o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k;
|
|
21
|
+
o[k2] = m[k];
|
|
22
|
+
}));
|
|
23
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
24
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
25
|
+
}) : function(o, v) {
|
|
26
|
+
o["default"] = v;
|
|
27
|
+
});
|
|
28
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
29
|
+
var ownKeys = function(o) {
|
|
30
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
31
|
+
var ar = [];
|
|
32
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
33
|
+
return ar;
|
|
34
|
+
};
|
|
35
|
+
return ownKeys(o);
|
|
36
|
+
};
|
|
37
|
+
return function (mod) {
|
|
38
|
+
if (mod && mod.__esModule) return mod;
|
|
39
|
+
var result = {};
|
|
40
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
41
|
+
__setModuleDefault(result, mod);
|
|
42
|
+
return result;
|
|
43
|
+
};
|
|
44
|
+
})();
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.handleCostStats = handleCostStats;
|
|
47
|
+
const node_fs_1 = require("node:fs");
|
|
48
|
+
const path = __importStar(require("node:path"));
|
|
49
|
+
const config_1 = require("../../config");
|
|
50
|
+
const storage_1 = require("../../storage");
|
|
51
|
+
const journal_1 = require("../../cost/journal");
|
|
52
|
+
// ============================================================================
|
|
53
|
+
// ANSI Colors
|
|
54
|
+
// ============================================================================
|
|
55
|
+
const COLORS = {
|
|
56
|
+
reset: "\x1b[0m",
|
|
57
|
+
bold: "\x1b[1m",
|
|
58
|
+
dim: "\x1b[2m",
|
|
59
|
+
cyan: "\x1b[36m",
|
|
60
|
+
green: "\x1b[32m",
|
|
61
|
+
yellow: "\x1b[33m",
|
|
62
|
+
red: "\x1b[31m",
|
|
63
|
+
};
|
|
64
|
+
function supportsColors() {
|
|
65
|
+
if (process.env.NO_COLOR !== undefined)
|
|
66
|
+
return false;
|
|
67
|
+
if (process.env.FORCE_COLOR !== undefined)
|
|
68
|
+
return true;
|
|
69
|
+
return Boolean(process.stdout?.isTTY);
|
|
70
|
+
}
|
|
71
|
+
function col(text, color, useColors) {
|
|
72
|
+
return useColors ? `${COLORS[color]}${text}${COLORS.reset}` : text;
|
|
73
|
+
}
|
|
74
|
+
// ============================================================================
|
|
75
|
+
// Single Run
|
|
76
|
+
// ============================================================================
|
|
77
|
+
async function costStatsForRun(runId, runsDirOverride) {
|
|
78
|
+
const runDir = (0, config_1.resolveExistingRunDir)(runId, { override: runsDirOverride });
|
|
79
|
+
let stat;
|
|
80
|
+
try {
|
|
81
|
+
stat = await node_fs_1.promises.stat(runDir);
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
if (!stat.isDirectory())
|
|
87
|
+
return null;
|
|
88
|
+
const events = await (0, storage_1.loadJournal)(runDir);
|
|
89
|
+
return (0, journal_1.computeRunCostStats)(runId, events);
|
|
90
|
+
}
|
|
91
|
+
// ============================================================================
|
|
92
|
+
// All Runs
|
|
93
|
+
// ============================================================================
|
|
94
|
+
async function costStatsForAllRuns(readableRunsDirs) {
|
|
95
|
+
const runs = [];
|
|
96
|
+
const seenRunDirs = new Set();
|
|
97
|
+
for (const runsDir of readableRunsDirs) {
|
|
98
|
+
let entries;
|
|
99
|
+
try {
|
|
100
|
+
entries = await node_fs_1.promises.readdir(runsDir);
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
entries = [];
|
|
104
|
+
}
|
|
105
|
+
for (const entry of entries) {
|
|
106
|
+
const runDir = path.join(runsDir, entry);
|
|
107
|
+
let normalizedRunDir;
|
|
108
|
+
try {
|
|
109
|
+
const s = await node_fs_1.promises.stat(runDir);
|
|
110
|
+
if (!s.isDirectory())
|
|
111
|
+
continue;
|
|
112
|
+
normalizedRunDir = path.resolve(runDir);
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
if (seenRunDirs.has(normalizedRunDir)) {
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
seenRunDirs.add(normalizedRunDir);
|
|
121
|
+
const events = await (0, storage_1.loadJournal)(runDir);
|
|
122
|
+
const stats = (0, journal_1.computeRunCostStats)(entry, events);
|
|
123
|
+
if (stats.eventCount === 0)
|
|
124
|
+
continue;
|
|
125
|
+
runs.push(stats);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
let totalInputTokens = 0;
|
|
129
|
+
let totalOutputTokens = 0;
|
|
130
|
+
let totalCacheCreation = 0;
|
|
131
|
+
let totalCacheRead = 0;
|
|
132
|
+
let totalCostUsd = 0;
|
|
133
|
+
let totalEvents = 0;
|
|
134
|
+
for (const r of runs) {
|
|
135
|
+
totalInputTokens += r.totalInputTokens;
|
|
136
|
+
totalOutputTokens += r.totalOutputTokens;
|
|
137
|
+
totalCacheCreation += r.totalCacheCreation;
|
|
138
|
+
totalCacheRead += r.totalCacheRead;
|
|
139
|
+
totalCostUsd += r.totalCostUsd;
|
|
140
|
+
totalEvents += r.eventCount;
|
|
141
|
+
}
|
|
142
|
+
totalCostUsd = Math.round(totalCostUsd * 1_000_000) / 1_000_000;
|
|
143
|
+
return {
|
|
144
|
+
totalRuns: runs.length,
|
|
145
|
+
totalEvents,
|
|
146
|
+
totalInputTokens,
|
|
147
|
+
totalOutputTokens,
|
|
148
|
+
totalCacheCreation,
|
|
149
|
+
totalCacheRead,
|
|
150
|
+
totalCostUsd,
|
|
151
|
+
overallCostUsd: totalCostUsd,
|
|
152
|
+
runs,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
// ============================================================================
|
|
156
|
+
// Formatting
|
|
157
|
+
// ============================================================================
|
|
158
|
+
function fmtNum(n) {
|
|
159
|
+
return n.toLocaleString("en-US");
|
|
160
|
+
}
|
|
161
|
+
function fmtUsd(n) {
|
|
162
|
+
return `$${n.toFixed(4)}`;
|
|
163
|
+
}
|
|
164
|
+
function pad(s, width, right = false) {
|
|
165
|
+
if (right)
|
|
166
|
+
return s.padStart(width);
|
|
167
|
+
return s.padEnd(width);
|
|
168
|
+
}
|
|
169
|
+
function printSingleRunTable(stats, useColors) {
|
|
170
|
+
console.log("");
|
|
171
|
+
console.log(col(`Run: ${stats.runId}`, "bold", useColors));
|
|
172
|
+
console.log(col(`Date: ${stats.date}`, "dim", useColors));
|
|
173
|
+
console.log("");
|
|
174
|
+
if (stats.eventCount === 0) {
|
|
175
|
+
console.log(col(" No COST_TRACKED events found in this run.", "yellow", useColors));
|
|
176
|
+
console.log("");
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
// Summary row
|
|
180
|
+
console.log(col(" Summary", "cyan", useColors));
|
|
181
|
+
console.log(` Events: ${col(fmtNum(stats.eventCount), "bold", useColors)}`);
|
|
182
|
+
console.log(` Input tokens: ${col(fmtNum(stats.totalInputTokens), "bold", useColors)}`);
|
|
183
|
+
console.log(` Output tokens: ${col(fmtNum(stats.totalOutputTokens), "bold", useColors)}`);
|
|
184
|
+
console.log(` Cache write: ${col(fmtNum(stats.totalCacheCreation), "bold", useColors)}`);
|
|
185
|
+
console.log(` Cache read: ${col(fmtNum(stats.totalCacheRead), "bold", useColors)}`);
|
|
186
|
+
console.log(` Total cost: ${col(fmtUsd(stats.totalCostUsd), "green", useColors)}`);
|
|
187
|
+
console.log("");
|
|
188
|
+
// Per-model breakdown
|
|
189
|
+
const models = Object.keys(stats.byModel).sort();
|
|
190
|
+
if (models.length > 0) {
|
|
191
|
+
console.log(col(" By Model", "cyan", useColors));
|
|
192
|
+
const hdr = [
|
|
193
|
+
pad("Model", 24),
|
|
194
|
+
pad("Events", 8, true),
|
|
195
|
+
pad("Input Tokens", 14, true),
|
|
196
|
+
pad("Output Tokens", 15, true),
|
|
197
|
+
pad("Cache Write", 13, true),
|
|
198
|
+
pad("Cache Read", 12, true),
|
|
199
|
+
pad("Cost ($)", 12, true),
|
|
200
|
+
].join(" ");
|
|
201
|
+
console.log(col(` ${hdr}`, "dim", useColors));
|
|
202
|
+
console.log(col(` ${"-".repeat(hdr.length)}`, "dim", useColors));
|
|
203
|
+
for (const model of models) {
|
|
204
|
+
const m = stats.byModel[model];
|
|
205
|
+
const row = [
|
|
206
|
+
pad(m.model, 24),
|
|
207
|
+
pad(fmtNum(m.eventCount), 8, true),
|
|
208
|
+
pad(fmtNum(m.inputTokens), 14, true),
|
|
209
|
+
pad(fmtNum(m.outputTokens), 15, true),
|
|
210
|
+
pad(fmtNum(m.cacheCreationTokens), 13, true),
|
|
211
|
+
pad(fmtNum(m.cacheReadTokens), 12, true),
|
|
212
|
+
pad(fmtUsd(m.costUsd), 12, true),
|
|
213
|
+
].join(" ");
|
|
214
|
+
console.log(` ${row}`);
|
|
215
|
+
}
|
|
216
|
+
console.log("");
|
|
217
|
+
}
|
|
218
|
+
// Per-kind breakdown
|
|
219
|
+
const kinds = Object.keys(stats.byKind).sort();
|
|
220
|
+
if (kinds.length > 0) {
|
|
221
|
+
console.log(col(" By Task Kind", "cyan", useColors));
|
|
222
|
+
const hdr = [
|
|
223
|
+
pad("Kind", 24),
|
|
224
|
+
pad("Events", 8, true),
|
|
225
|
+
pad("Cost ($)", 12, true),
|
|
226
|
+
].join(" ");
|
|
227
|
+
console.log(col(` ${hdr}`, "dim", useColors));
|
|
228
|
+
console.log(col(` ${"-".repeat(hdr.length)}`, "dim", useColors));
|
|
229
|
+
for (const kind of kinds) {
|
|
230
|
+
const k = stats.byKind[kind];
|
|
231
|
+
const row = [
|
|
232
|
+
pad(k.kind, 24),
|
|
233
|
+
pad(fmtNum(k.eventCount), 8, true),
|
|
234
|
+
pad(fmtUsd(k.costUsd), 12, true),
|
|
235
|
+
].join(" ");
|
|
236
|
+
console.log(` ${row}`);
|
|
237
|
+
}
|
|
238
|
+
console.log("");
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
function printAggregateTable(agg, useColors) {
|
|
242
|
+
console.log("");
|
|
243
|
+
console.log(col("Cost Stats \u2014 All Runs", "bold", useColors));
|
|
244
|
+
console.log("");
|
|
245
|
+
if (agg.totalRuns === 0) {
|
|
246
|
+
console.log(col(" No runs with COST_TRACKED events found.", "yellow", useColors));
|
|
247
|
+
console.log("");
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
console.log(` Total runs with cost data: ${col(fmtNum(agg.totalRuns), "bold", useColors)}`);
|
|
251
|
+
console.log(` Total events: ${col(fmtNum(agg.totalEvents), "bold", useColors)}`);
|
|
252
|
+
console.log(` Total input tokens: ${col(fmtNum(agg.totalInputTokens), "bold", useColors)}`);
|
|
253
|
+
console.log(` Total output tokens: ${col(fmtNum(agg.totalOutputTokens), "bold", useColors)}`);
|
|
254
|
+
console.log(` Total cache write: ${col(fmtNum(agg.totalCacheCreation), "bold", useColors)}`);
|
|
255
|
+
console.log(` Total cache read: ${col(fmtNum(agg.totalCacheRead), "bold", useColors)}`);
|
|
256
|
+
console.log(` Total cost: ${col(fmtUsd(agg.totalCostUsd), "green", useColors)}`);
|
|
257
|
+
console.log("");
|
|
258
|
+
if (agg.runs.length > 0) {
|
|
259
|
+
console.log(col(" Per-Run Breakdown", "cyan", useColors));
|
|
260
|
+
const hdr = [
|
|
261
|
+
pad("Run ID", 28),
|
|
262
|
+
pad("Date", 24),
|
|
263
|
+
pad("Events", 8, true),
|
|
264
|
+
pad("Input", 12, true),
|
|
265
|
+
pad("Output", 12, true),
|
|
266
|
+
pad("Cost ($)", 12, true),
|
|
267
|
+
].join(" ");
|
|
268
|
+
console.log(col(` ${hdr}`, "dim", useColors));
|
|
269
|
+
console.log(col(` ${"-".repeat(hdr.length)}`, "dim", useColors));
|
|
270
|
+
const sorted = [...agg.runs].sort((a, b) => b.totalCostUsd - a.totalCostUsd);
|
|
271
|
+
for (const r of sorted) {
|
|
272
|
+
const row = [
|
|
273
|
+
pad(r.runId, 28),
|
|
274
|
+
pad(r.date.slice(0, 24), 24),
|
|
275
|
+
pad(fmtNum(r.eventCount), 8, true),
|
|
276
|
+
pad(fmtNum(r.totalInputTokens), 12, true),
|
|
277
|
+
pad(fmtNum(r.totalOutputTokens), 12, true),
|
|
278
|
+
pad(fmtUsd(r.totalCostUsd), 12, true),
|
|
279
|
+
].join(" ");
|
|
280
|
+
console.log(` ${row}`);
|
|
281
|
+
}
|
|
282
|
+
console.log("");
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
// ============================================================================
|
|
286
|
+
// Main Handler
|
|
287
|
+
// ============================================================================
|
|
288
|
+
async function handleCostStats(options) {
|
|
289
|
+
const readableRunsDirs = (0, config_1.getReadableRunsDirs)({ override: options.runsDir });
|
|
290
|
+
const useColors = supportsColors();
|
|
291
|
+
if (options.all) {
|
|
292
|
+
const agg = await costStatsForAllRuns(readableRunsDirs);
|
|
293
|
+
if (options.json) {
|
|
294
|
+
console.log(JSON.stringify(agg, null, 2));
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
printAggregateTable(agg, useColors);
|
|
298
|
+
}
|
|
299
|
+
return 0;
|
|
300
|
+
}
|
|
301
|
+
if (options.runId) {
|
|
302
|
+
const stats = await costStatsForRun(options.runId, options.runsDir);
|
|
303
|
+
if (!stats) {
|
|
304
|
+
const msg = `Run not found: ${options.runId} (looked in ${readableRunsDirs.join(", ")})`;
|
|
305
|
+
if (options.json) {
|
|
306
|
+
console.error(JSON.stringify({ error: msg }));
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
console.error(msg);
|
|
310
|
+
}
|
|
311
|
+
return 1;
|
|
312
|
+
}
|
|
313
|
+
if (options.json) {
|
|
314
|
+
console.log(JSON.stringify(stats, null, 2));
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
printSingleRunTable(stats, useColors);
|
|
318
|
+
}
|
|
319
|
+
return 0;
|
|
320
|
+
}
|
|
321
|
+
// No runId and no --all: print help
|
|
322
|
+
console.error("Usage: babysitter cost:stats [runId] [--all] [--json] [--runs-dir <dir>]");
|
|
323
|
+
console.error(" runId Show cost stats for a specific run");
|
|
324
|
+
console.error(" --all Aggregate cost stats across all runs");
|
|
325
|
+
console.error(" --json Output JSON instead of table");
|
|
326
|
+
return 1;
|
|
327
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ExistingRunInfo {
|
|
2
|
+
runId: string;
|
|
3
|
+
runDir: string;
|
|
4
|
+
processId: string;
|
|
5
|
+
isBareRun: boolean;
|
|
6
|
+
entrypoint: {
|
|
7
|
+
importPath: string;
|
|
8
|
+
exportName?: string;
|
|
9
|
+
};
|
|
10
|
+
completionProof?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function detectExistingRun(): Promise<ExistingRunInfo | undefined>;
|
|
13
|
+
export declare function formatExistingRunBlock(existingRun: ExistingRunInfo): string;
|
|
14
|
+
//# sourceMappingURL=detectExistingRun.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detectExistingRun.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/detectExistingRun.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CA0B9E;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,eAAe,GAAG,MAAM,CAiB3E"}
|