@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,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderStatusSymbol = exports.renderStatusBadge = exports.renderEventMessage = exports.renderEffectTree = exports.stripAnsi = exports.colors = exports.colorize = void 0;
|
|
4
|
+
var ansi_1 = require("./ansi");
|
|
5
|
+
Object.defineProperty(exports, "colorize", { enumerable: true, get: function () { return ansi_1.colorize; } });
|
|
6
|
+
Object.defineProperty(exports, "colors", { enumerable: true, get: function () { return ansi_1.colors; } });
|
|
7
|
+
Object.defineProperty(exports, "stripAnsi", { enumerable: true, get: function () { return ansi_1.stripAnsi; } });
|
|
8
|
+
var effectTree_1 = require("./effectTree");
|
|
9
|
+
Object.defineProperty(exports, "renderEffectTree", { enumerable: true, get: function () { return effectTree_1.renderEffectTree; } });
|
|
10
|
+
var events_1 = require("./events");
|
|
11
|
+
Object.defineProperty(exports, "renderEventMessage", { enumerable: true, get: function () { return events_1.renderEventMessage; } });
|
|
12
|
+
var statusBadge_1 = require("./statusBadge");
|
|
13
|
+
Object.defineProperty(exports, "renderStatusBadge", { enumerable: true, get: function () { return statusBadge_1.renderStatusBadge; } });
|
|
14
|
+
Object.defineProperty(exports, "renderStatusSymbol", { enumerable: true, get: function () { return statusBadge_1.renderStatusSymbol; } });
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type StatusType = "completed" | "failed" | "pending" | "running" | "waiting" | "created";
|
|
2
|
+
export declare function renderStatusBadge(status: StatusType): string;
|
|
3
|
+
export declare function renderStatusSymbol(status: StatusType): string;
|
|
4
|
+
//# sourceMappingURL=statusBadge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statusBadge.d.ts","sourceRoot":"","sources":["../../../src/cli/render/statusBadge.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAWhG,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAI5D;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAI7D"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderStatusBadge = renderStatusBadge;
|
|
4
|
+
exports.renderStatusSymbol = renderStatusSymbol;
|
|
5
|
+
const ansi_1 = require("./ansi");
|
|
6
|
+
const STATUS_CONFIG = {
|
|
7
|
+
completed: { symbol: "\u2714", color: ansi_1.colors.green, label: "completed" },
|
|
8
|
+
failed: { symbol: "\u2718", color: ansi_1.colors.red, label: "failed" },
|
|
9
|
+
pending: { symbol: "\u25CB", color: ansi_1.colors.yellow, label: "pending" },
|
|
10
|
+
running: { symbol: "\u25CF", color: ansi_1.colors.cyan, label: "running" },
|
|
11
|
+
waiting: { symbol: "\u25CB", color: ansi_1.colors.yellow, label: "waiting" },
|
|
12
|
+
created: { symbol: "\u2714", color: ansi_1.colors.green, label: "created" },
|
|
13
|
+
};
|
|
14
|
+
function renderStatusBadge(status) {
|
|
15
|
+
const config = STATUS_CONFIG[status];
|
|
16
|
+
if (!config)
|
|
17
|
+
return status;
|
|
18
|
+
return (0, ansi_1.colorize)(`${config.symbol} ${config.label}`, config.color);
|
|
19
|
+
}
|
|
20
|
+
function renderStatusSymbol(status) {
|
|
21
|
+
const config = STATUS_CONFIG[status];
|
|
22
|
+
if (!config)
|
|
23
|
+
return "?";
|
|
24
|
+
return (0, ansi_1.colorize)(config.symbol, config.color);
|
|
25
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collapse doubled ".a5c/runs" segments in a path.
|
|
3
|
+
*
|
|
4
|
+
* When a relative path containing `.a5c/runs/...` is resolved from a working
|
|
5
|
+
* directory that is itself inside `.a5c/runs/`, the result can contain the
|
|
6
|
+
* segment twice (or more). This function collapses all consecutive duplications
|
|
7
|
+
* into a single occurrence.
|
|
8
|
+
*
|
|
9
|
+
* Handles both forward-slash (Unix) and back-slash (Windows) separators as
|
|
10
|
+
* well as mixed-separator paths.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* collapseDoubledA5cRuns("/project/.a5c/runs/.a5c/runs/01RUN")
|
|
14
|
+
* // => "/project/.a5c/runs/01RUN"
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* collapseDoubledA5cRuns("C:\\project\\.a5c\\runs\\.a5c\\runs\\01RUN")
|
|
18
|
+
* // => "C:\\project\\.a5c\\runs\\01RUN"
|
|
19
|
+
*/
|
|
20
|
+
export declare function collapseDoubledA5cRuns(p: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Resolve an input file path robustly, accounting for the CLI being invoked
|
|
23
|
+
* from inside a task directory (or any subdirectory of `.a5c/runs/`).
|
|
24
|
+
*
|
|
25
|
+
* The standard `path.resolve(inputPath)` resolves relative to
|
|
26
|
+
* `process.cwd()`. When the working directory is a task directory such as
|
|
27
|
+
* `/project/.a5c/runs/RUN/tasks/TASK/`, resolving a relative path like
|
|
28
|
+
* `.a5c/runs/RUN/tasks/EFFECT/file.json` produces a doubled path:
|
|
29
|
+
* `/project/.a5c/runs/RUN/tasks/TASK/.a5c/runs/RUN/tasks/EFFECT/file.json`
|
|
30
|
+
*
|
|
31
|
+
* This function detects that situation and resolves relative to the project
|
|
32
|
+
* root instead.
|
|
33
|
+
*
|
|
34
|
+
* **Resolution rules (in order):**
|
|
35
|
+
* 1. `"-"` (stdin sentinel) — returned as-is.
|
|
36
|
+
* 2. Absolute paths (including Windows drive letters like `C:\`) — normalized
|
|
37
|
+
* and returned.
|
|
38
|
+
* 3. If `inputPath` contains a `.a5c/runs` segment **and** the current
|
|
39
|
+
* working directory is itself inside a `.a5c/runs` subtree — resolve
|
|
40
|
+
* relative to the detected project root.
|
|
41
|
+
* 4. Otherwise — standard `path.resolve(inputPath)`.
|
|
42
|
+
* 5. `collapseDoubledA5cRuns` is always applied as a final safety net.
|
|
43
|
+
*
|
|
44
|
+
* @param inputPath The raw path argument supplied by the user or script.
|
|
45
|
+
* @returns A fully resolved, absolute path (or `"-"` for stdin).
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* // CWD = /project/.a5c/runs/RUN/tasks/TASK
|
|
49
|
+
* resolveInputPath(".a5c/runs/RUN/tasks/EFFECT/input.json")
|
|
50
|
+
* // => "/project/.a5c/runs/RUN/tasks/EFFECT/input.json"
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* resolveInputPath("/absolute/path/to/file.json")
|
|
54
|
+
* // => "/absolute/path/to/file.json"
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* resolveInputPath("-")
|
|
58
|
+
* // => "-"
|
|
59
|
+
*/
|
|
60
|
+
export declare function resolveInputPath(inputPath: string): string;
|
|
61
|
+
//# sourceMappingURL=resolveInputPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveInputPath.d.ts","sourceRoot":"","sources":["../../src/cli/resolveInputPath.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAiBxD;AA4DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAgC1D"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.collapseDoubledA5cRuns = collapseDoubledA5cRuns;
|
|
37
|
+
exports.resolveInputPath = resolveInputPath;
|
|
38
|
+
const path = __importStar(require("node:path"));
|
|
39
|
+
const node_fs_1 = require("node:fs");
|
|
40
|
+
/**
|
|
41
|
+
* Collapse doubled ".a5c/runs" segments in a path.
|
|
42
|
+
*
|
|
43
|
+
* When a relative path containing `.a5c/runs/...` is resolved from a working
|
|
44
|
+
* directory that is itself inside `.a5c/runs/`, the result can contain the
|
|
45
|
+
* segment twice (or more). This function collapses all consecutive duplications
|
|
46
|
+
* into a single occurrence.
|
|
47
|
+
*
|
|
48
|
+
* Handles both forward-slash (Unix) and back-slash (Windows) separators as
|
|
49
|
+
* well as mixed-separator paths.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* collapseDoubledA5cRuns("/project/.a5c/runs/.a5c/runs/01RUN")
|
|
53
|
+
* // => "/project/.a5c/runs/01RUN"
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* collapseDoubledA5cRuns("C:\\project\\.a5c\\runs\\.a5c\\runs\\01RUN")
|
|
57
|
+
* // => "C:\\project\\.a5c\\runs\\01RUN"
|
|
58
|
+
*/
|
|
59
|
+
function collapseDoubledA5cRuns(p) {
|
|
60
|
+
let result = p;
|
|
61
|
+
// Collapse .a5c/runs/.a5c/runs/ → .a5c/runs/
|
|
62
|
+
const runsPattern = /([/\\]?\.a5c[/\\]runs)[/\\]\.a5c[/\\]runs([/\\]|$)/;
|
|
63
|
+
while (runsPattern.test(result)) {
|
|
64
|
+
result = result.replace(runsPattern, "$1$2");
|
|
65
|
+
}
|
|
66
|
+
// Collapse .a5c/.a5c/ → .a5c/ (e.g. when CLI runs from .a5c/ with relative
|
|
67
|
+
// --runs-dir .a5c/runs, producing /project/.a5c/.a5c/runs/)
|
|
68
|
+
const a5cPattern = /([/\\]\.a5c)[/\\]\.a5c([/\\])/;
|
|
69
|
+
while (a5cPattern.test(result)) {
|
|
70
|
+
result = result.replace(a5cPattern, "$1$2");
|
|
71
|
+
}
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Detect whether the given directory path sits inside a `.a5c/runs` subtree.
|
|
76
|
+
*
|
|
77
|
+
* Uses a platform-aware regex that matches both `/` and `\` separators so
|
|
78
|
+
* the check works on Windows as well as Unix.
|
|
79
|
+
*/
|
|
80
|
+
function isInsideA5cRuns(dir) {
|
|
81
|
+
const normalized = dir.replace(/\\/g, "/");
|
|
82
|
+
return /[/]\.a5c[/]runs[/]/.test(normalized + "/");
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Given a directory that is known to be inside `.a5c/runs/`, walk up the
|
|
86
|
+
* path to find the project root — i.e. the directory that **contains** the
|
|
87
|
+
* `.a5c` folder.
|
|
88
|
+
*
|
|
89
|
+
* The algorithm splits on the first `.a5c/runs` segment and returns the
|
|
90
|
+
* parent of `.a5c`. If no `.a5c` directory can be found on disk the
|
|
91
|
+
* function falls back to the split-based heuristic.
|
|
92
|
+
*
|
|
93
|
+
* @returns The project root directory, or `undefined` if it cannot be
|
|
94
|
+
* determined.
|
|
95
|
+
*/
|
|
96
|
+
function findProjectRoot(dir) {
|
|
97
|
+
// Normalize to forward slashes for splitting, but preserve original for
|
|
98
|
+
// path operations so we stay platform-correct.
|
|
99
|
+
const normalized = dir.replace(/\\/g, "/");
|
|
100
|
+
// Find the first occurrence of .a5c/runs (or .a5c\runs on Windows)
|
|
101
|
+
const marker = ".a5c/runs";
|
|
102
|
+
const idx = normalized.indexOf(marker);
|
|
103
|
+
if (idx === -1)
|
|
104
|
+
return undefined;
|
|
105
|
+
// The project root is the directory containing .a5c — everything before
|
|
106
|
+
// the `.a5c` segment.
|
|
107
|
+
const candidate = dir.substring(0, idx === 0 ? 0 : idx).replace(/[/\\]+$/, "");
|
|
108
|
+
if (candidate.length === 0) {
|
|
109
|
+
// Edge case: path starts with .a5c/runs (pure relative from project root)
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
// Sanity check: the candidate should contain a .a5c directory
|
|
113
|
+
const a5cDir = path.join(candidate, ".a5c");
|
|
114
|
+
try {
|
|
115
|
+
if ((0, node_fs_1.existsSync)(a5cDir)) {
|
|
116
|
+
return candidate;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
// Filesystem check failed — fall through to heuristic
|
|
121
|
+
}
|
|
122
|
+
// Return the candidate even if we can't verify via filesystem —
|
|
123
|
+
// the substring heuristic is reliable when the path truly contains
|
|
124
|
+
// .a5c/runs.
|
|
125
|
+
return candidate;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Resolve an input file path robustly, accounting for the CLI being invoked
|
|
129
|
+
* from inside a task directory (or any subdirectory of `.a5c/runs/`).
|
|
130
|
+
*
|
|
131
|
+
* The standard `path.resolve(inputPath)` resolves relative to
|
|
132
|
+
* `process.cwd()`. When the working directory is a task directory such as
|
|
133
|
+
* `/project/.a5c/runs/RUN/tasks/TASK/`, resolving a relative path like
|
|
134
|
+
* `.a5c/runs/RUN/tasks/EFFECT/file.json` produces a doubled path:
|
|
135
|
+
* `/project/.a5c/runs/RUN/tasks/TASK/.a5c/runs/RUN/tasks/EFFECT/file.json`
|
|
136
|
+
*
|
|
137
|
+
* This function detects that situation and resolves relative to the project
|
|
138
|
+
* root instead.
|
|
139
|
+
*
|
|
140
|
+
* **Resolution rules (in order):**
|
|
141
|
+
* 1. `"-"` (stdin sentinel) — returned as-is.
|
|
142
|
+
* 2. Absolute paths (including Windows drive letters like `C:\`) — normalized
|
|
143
|
+
* and returned.
|
|
144
|
+
* 3. If `inputPath` contains a `.a5c/runs` segment **and** the current
|
|
145
|
+
* working directory is itself inside a `.a5c/runs` subtree — resolve
|
|
146
|
+
* relative to the detected project root.
|
|
147
|
+
* 4. Otherwise — standard `path.resolve(inputPath)`.
|
|
148
|
+
* 5. `collapseDoubledA5cRuns` is always applied as a final safety net.
|
|
149
|
+
*
|
|
150
|
+
* @param inputPath The raw path argument supplied by the user or script.
|
|
151
|
+
* @returns A fully resolved, absolute path (or `"-"` for stdin).
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* // CWD = /project/.a5c/runs/RUN/tasks/TASK
|
|
155
|
+
* resolveInputPath(".a5c/runs/RUN/tasks/EFFECT/input.json")
|
|
156
|
+
* // => "/project/.a5c/runs/RUN/tasks/EFFECT/input.json"
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* resolveInputPath("/absolute/path/to/file.json")
|
|
160
|
+
* // => "/absolute/path/to/file.json"
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* resolveInputPath("-")
|
|
164
|
+
* // => "-"
|
|
165
|
+
*/
|
|
166
|
+
function resolveInputPath(inputPath) {
|
|
167
|
+
// 1. Stdin sentinel — pass through unchanged
|
|
168
|
+
if (inputPath === "-") {
|
|
169
|
+
return inputPath;
|
|
170
|
+
}
|
|
171
|
+
// 2. Absolute path (Unix or Windows drive letter) — normalize and return
|
|
172
|
+
if (path.isAbsolute(inputPath) || /^[A-Za-z]:[\\/]/.test(inputPath)) {
|
|
173
|
+
return collapseDoubledA5cRuns(path.normalize(inputPath));
|
|
174
|
+
}
|
|
175
|
+
// 3. Smart resolution when both inputPath and CWD are inside .a5c/runs
|
|
176
|
+
const inputNormalized = inputPath.replace(/\\/g, "/");
|
|
177
|
+
const hasA5cRuns = inputNormalized.includes(".a5c/runs") ||
|
|
178
|
+
inputPath.includes(".a5c\\runs");
|
|
179
|
+
if (hasA5cRuns) {
|
|
180
|
+
const cwd = process.cwd();
|
|
181
|
+
if (isInsideA5cRuns(cwd)) {
|
|
182
|
+
const projectRoot = findProjectRoot(cwd);
|
|
183
|
+
if (projectRoot) {
|
|
184
|
+
const resolved = path.resolve(projectRoot, inputPath);
|
|
185
|
+
return collapseDoubledA5cRuns(resolved);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
// 4. Standard resolution relative to CWD
|
|
190
|
+
const resolved = path.resolve(inputPath);
|
|
191
|
+
// 5. Safety net — collapse any accidental doubling
|
|
192
|
+
return collapseDoubledA5cRuns(resolved);
|
|
193
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* config-loader — loads and merges CompressionConfig from multiple sources.
|
|
3
|
+
*
|
|
4
|
+
* Priority (highest wins):
|
|
5
|
+
* env vars > project config (.a5c/compression.config.json)
|
|
6
|
+
* > user config (~/.a5c/compression.config.json)
|
|
7
|
+
* > built-in defaults
|
|
8
|
+
*/
|
|
9
|
+
import type { CompressionConfig } from './config';
|
|
10
|
+
export declare const COMPRESSION_ENV_VARS: {
|
|
11
|
+
readonly ENABLED: "BABYSITTER_COMPRESSION_ENABLED";
|
|
12
|
+
readonly USER_PROMPT: "BABYSITTER_COMPRESSION_USER_PROMPT";
|
|
13
|
+
readonly COMMANDS: "BABYSITTER_COMPRESSION_COMMANDS";
|
|
14
|
+
readonly SDK_CONTEXT: "BABYSITTER_COMPRESSION_SDK_CONTEXT";
|
|
15
|
+
readonly LIBRARY_CACHE: "BABYSITTER_COMPRESSION_LIBRARY_CACHE";
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Load the effective CompressionConfig by merging all sources.
|
|
19
|
+
*
|
|
20
|
+
* @param projectDir Root of the project (directory that contains .a5c/).
|
|
21
|
+
* Defaults to `process.cwd()`.
|
|
22
|
+
*/
|
|
23
|
+
export declare function loadCompressionConfig(projectDir?: string): CompressionConfig;
|
|
24
|
+
//# sourceMappingURL=config-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../src/compression/config-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGlD,eAAO,MAAM,oBAAoB;;;;;;CAMvB,CAAC;AAsHX;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAoB5E"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* config-loader — loads and merges CompressionConfig from multiple sources.
|
|
4
|
+
*
|
|
5
|
+
* Priority (highest wins):
|
|
6
|
+
* env vars > project config (.a5c/compression.config.json)
|
|
7
|
+
* > user config (~/.a5c/compression.config.json)
|
|
8
|
+
* > built-in defaults
|
|
9
|
+
*/
|
|
10
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
15
|
+
}
|
|
16
|
+
Object.defineProperty(o, k2, desc);
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
22
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23
|
+
}) : function(o, v) {
|
|
24
|
+
o["default"] = v;
|
|
25
|
+
});
|
|
26
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
27
|
+
var ownKeys = function(o) {
|
|
28
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
29
|
+
var ar = [];
|
|
30
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
31
|
+
return ar;
|
|
32
|
+
};
|
|
33
|
+
return ownKeys(o);
|
|
34
|
+
};
|
|
35
|
+
return function (mod) {
|
|
36
|
+
if (mod && mod.__esModule) return mod;
|
|
37
|
+
var result = {};
|
|
38
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
39
|
+
__setModuleDefault(result, mod);
|
|
40
|
+
return result;
|
|
41
|
+
};
|
|
42
|
+
})();
|
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
+
exports.COMPRESSION_ENV_VARS = void 0;
|
|
45
|
+
exports.loadCompressionConfig = loadCompressionConfig;
|
|
46
|
+
const node_fs_1 = require("node:fs");
|
|
47
|
+
const path = __importStar(require("node:path"));
|
|
48
|
+
const os = __importStar(require("node:os"));
|
|
49
|
+
const config_1 = require("./config");
|
|
50
|
+
exports.COMPRESSION_ENV_VARS = {
|
|
51
|
+
ENABLED: 'BABYSITTER_COMPRESSION_ENABLED',
|
|
52
|
+
USER_PROMPT: 'BABYSITTER_COMPRESSION_USER_PROMPT',
|
|
53
|
+
COMMANDS: 'BABYSITTER_COMPRESSION_COMMANDS',
|
|
54
|
+
SDK_CONTEXT: 'BABYSITTER_COMPRESSION_SDK_CONTEXT',
|
|
55
|
+
LIBRARY_CACHE: 'BABYSITTER_COMPRESSION_LIBRARY_CACHE',
|
|
56
|
+
};
|
|
57
|
+
function parseBool(value) {
|
|
58
|
+
if (value === undefined)
|
|
59
|
+
return undefined;
|
|
60
|
+
const v = value.trim().toLowerCase();
|
|
61
|
+
if (v === '1' || v === 'true' || v === 'yes')
|
|
62
|
+
return true;
|
|
63
|
+
if (v === '0' || v === 'false' || v === 'no')
|
|
64
|
+
return false;
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
function readJsonFile(filePath) {
|
|
68
|
+
try {
|
|
69
|
+
if (!(0, node_fs_1.existsSync)(filePath))
|
|
70
|
+
return undefined;
|
|
71
|
+
const raw = (0, node_fs_1.readFileSync)(filePath, 'utf8');
|
|
72
|
+
return JSON.parse(raw);
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function deepMerge(base, override) {
|
|
79
|
+
if (typeof base !== 'object' ||
|
|
80
|
+
base === null ||
|
|
81
|
+
typeof override !== 'object' ||
|
|
82
|
+
override === null) {
|
|
83
|
+
return override ?? base;
|
|
84
|
+
}
|
|
85
|
+
const result = { ...base };
|
|
86
|
+
for (const key of Object.keys(override)) {
|
|
87
|
+
const overrideVal = override[key];
|
|
88
|
+
const baseVal = base[key];
|
|
89
|
+
if (overrideVal !== null &&
|
|
90
|
+
typeof overrideVal === 'object' &&
|
|
91
|
+
!Array.isArray(overrideVal) &&
|
|
92
|
+
baseVal !== null &&
|
|
93
|
+
typeof baseVal === 'object' &&
|
|
94
|
+
!Array.isArray(baseVal)) {
|
|
95
|
+
result[key] = deepMerge(baseVal, overrideVal);
|
|
96
|
+
}
|
|
97
|
+
else if (overrideVal !== undefined) {
|
|
98
|
+
result[key] = overrideVal;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
function loadFileConfig(dir) {
|
|
104
|
+
const filePath = path.join(dir, '.a5c', 'compression.config.json');
|
|
105
|
+
const parsed = readJsonFile(filePath);
|
|
106
|
+
if (parsed === undefined || typeof parsed !== 'object' || parsed === null) {
|
|
107
|
+
return {};
|
|
108
|
+
}
|
|
109
|
+
return parsed;
|
|
110
|
+
}
|
|
111
|
+
function applyEnvVars(config) {
|
|
112
|
+
let result = { ...config };
|
|
113
|
+
const masterEnabled = parseBool(process.env[exports.COMPRESSION_ENV_VARS.ENABLED]);
|
|
114
|
+
if (masterEnabled !== undefined) {
|
|
115
|
+
result = { ...result, enabled: masterEnabled };
|
|
116
|
+
if (!masterEnabled) {
|
|
117
|
+
result = {
|
|
118
|
+
...result,
|
|
119
|
+
layers: {
|
|
120
|
+
userPromptHook: { ...result.layers.userPromptHook, enabled: false },
|
|
121
|
+
commandOutputHook: { ...result.layers.commandOutputHook, enabled: false },
|
|
122
|
+
sdkContextHook: { ...result.layers.sdkContextHook, enabled: false },
|
|
123
|
+
processLibraryCache: { ...result.layers.processLibraryCache, enabled: false },
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (result.enabled) {
|
|
129
|
+
const userPrompt = parseBool(process.env[exports.COMPRESSION_ENV_VARS.USER_PROMPT]);
|
|
130
|
+
if (userPrompt !== undefined) {
|
|
131
|
+
result = {
|
|
132
|
+
...result,
|
|
133
|
+
layers: { ...result.layers, userPromptHook: { ...result.layers.userPromptHook, enabled: userPrompt } },
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
const commands = parseBool(process.env[exports.COMPRESSION_ENV_VARS.COMMANDS]);
|
|
137
|
+
if (commands !== undefined) {
|
|
138
|
+
result = {
|
|
139
|
+
...result,
|
|
140
|
+
layers: { ...result.layers, commandOutputHook: { ...result.layers.commandOutputHook, enabled: commands } },
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
const sdkContext = parseBool(process.env[exports.COMPRESSION_ENV_VARS.SDK_CONTEXT]);
|
|
144
|
+
if (sdkContext !== undefined) {
|
|
145
|
+
result = {
|
|
146
|
+
...result,
|
|
147
|
+
layers: { ...result.layers, sdkContextHook: { ...result.layers.sdkContextHook, enabled: sdkContext } },
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
const libraryCache = parseBool(process.env[exports.COMPRESSION_ENV_VARS.LIBRARY_CACHE]);
|
|
151
|
+
if (libraryCache !== undefined) {
|
|
152
|
+
result = {
|
|
153
|
+
...result,
|
|
154
|
+
layers: { ...result.layers, processLibraryCache: { ...result.layers.processLibraryCache, enabled: libraryCache } },
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return result;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Load the effective CompressionConfig by merging all sources.
|
|
162
|
+
*
|
|
163
|
+
* @param projectDir Root of the project (directory that contains .a5c/).
|
|
164
|
+
* Defaults to `process.cwd()`.
|
|
165
|
+
*/
|
|
166
|
+
function loadCompressionConfig(projectDir) {
|
|
167
|
+
const cwd = projectDir ?? process.cwd();
|
|
168
|
+
let config = JSON.parse(JSON.stringify(config_1.DEFAULT_COMPRESSION_CONFIG));
|
|
169
|
+
const userConfig = loadFileConfig(os.homedir());
|
|
170
|
+
if (Object.keys(userConfig).length > 0) {
|
|
171
|
+
config = deepMerge(config, userConfig);
|
|
172
|
+
}
|
|
173
|
+
const projectConfig = loadFileConfig(cwd);
|
|
174
|
+
if (Object.keys(projectConfig).length > 0) {
|
|
175
|
+
config = deepMerge(config, projectConfig);
|
|
176
|
+
}
|
|
177
|
+
config = applyEnvVars(config);
|
|
178
|
+
return config;
|
|
179
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CompressionConfig — type definitions and defaults for the feature-toggle system.
|
|
3
|
+
*
|
|
4
|
+
* Priority (highest wins): env vars > project config > user config > defaults.
|
|
5
|
+
*/
|
|
6
|
+
export interface CompressionConfig {
|
|
7
|
+
/** Master switch — when false, all layers are bypassed regardless of their individual settings. */
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
layers: {
|
|
10
|
+
userPromptHook: {
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
engine: 'density-filter' | 'sentence-extractor';
|
|
13
|
+
/** Minimum token count before compression is attempted. */
|
|
14
|
+
threshold: number;
|
|
15
|
+
/** Fraction of content to keep (0–1). */
|
|
16
|
+
keepRatio: number;
|
|
17
|
+
};
|
|
18
|
+
commandOutputHook: {
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
engine: 'command-compressor';
|
|
21
|
+
/** Command names whose output should never be compressed. */
|
|
22
|
+
excludeCommands: string[];
|
|
23
|
+
};
|
|
24
|
+
sdkContextHook: {
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
engine: 'sentence-extractor';
|
|
27
|
+
/** Target fraction to remove (0–1). E.g. 0.15 removes ~15%. */
|
|
28
|
+
targetReduction: number;
|
|
29
|
+
/** Minimum token count before compression is attempted. */
|
|
30
|
+
minCompressionTokens: number;
|
|
31
|
+
/** Per-task-kind overrides for targetReduction. */
|
|
32
|
+
perTaskKind?: {
|
|
33
|
+
agent?: number;
|
|
34
|
+
skill?: number;
|
|
35
|
+
breakpoint?: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
processLibraryCache: {
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
engine: 'sentence-extractor';
|
|
41
|
+
/** Target fraction to remove (0–1). */
|
|
42
|
+
targetReduction: number;
|
|
43
|
+
/** How many hours a compressed cache entry remains valid. */
|
|
44
|
+
ttlHours: number;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export declare const DEFAULT_COMPRESSION_CONFIG: CompressionConfig;
|
|
49
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/compression/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,iBAAiB;IAChC,mGAAmG;IACnG,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE;QACN,cAAc,EAAE;YACd,OAAO,EAAE,OAAO,CAAC;YACjB,MAAM,EAAE,gBAAgB,GAAG,oBAAoB,CAAC;YAChD,2DAA2D;YAC3D,SAAS,EAAE,MAAM,CAAC;YAClB,yCAAyC;YACzC,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC;QACF,iBAAiB,EAAE;YACjB,OAAO,EAAE,OAAO,CAAC;YACjB,MAAM,EAAE,oBAAoB,CAAC;YAC7B,6DAA6D;YAC7D,eAAe,EAAE,MAAM,EAAE,CAAC;SAC3B,CAAC;QACF,cAAc,EAAE;YACd,OAAO,EAAE,OAAO,CAAC;YACjB,MAAM,EAAE,oBAAoB,CAAC;YAC7B,+DAA+D;YAC/D,eAAe,EAAE,MAAM,CAAC;YACxB,2DAA2D;YAC3D,oBAAoB,EAAE,MAAM,CAAC;YAC7B,mDAAmD;YACnD,WAAW,CAAC,EAAE;gBACZ,KAAK,CAAC,EAAE,MAAM,CAAC;gBACf,KAAK,CAAC,EAAE,MAAM,CAAC;gBACf,UAAU,CAAC,EAAE,MAAM,CAAC;aACrB,CAAC;SACH,CAAC;QACF,mBAAmB,EAAE;YACnB,OAAO,EAAE,OAAO,CAAC;YACjB,MAAM,EAAE,oBAAoB,CAAC;YAC7B,uCAAuC;YACvC,eAAe,EAAE,MAAM,CAAC;YACxB,6DAA6D;YAC7D,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,0BAA0B,EAAE,iBAgCxC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CompressionConfig — type definitions and defaults for the feature-toggle system.
|
|
4
|
+
*
|
|
5
|
+
* Priority (highest wins): env vars > project config > user config > defaults.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.DEFAULT_COMPRESSION_CONFIG = void 0;
|
|
9
|
+
exports.DEFAULT_COMPRESSION_CONFIG = {
|
|
10
|
+
enabled: true,
|
|
11
|
+
layers: {
|
|
12
|
+
userPromptHook: {
|
|
13
|
+
enabled: true,
|
|
14
|
+
engine: 'density-filter',
|
|
15
|
+
threshold: 500,
|
|
16
|
+
keepRatio: 0.78,
|
|
17
|
+
},
|
|
18
|
+
commandOutputHook: {
|
|
19
|
+
enabled: true,
|
|
20
|
+
engine: 'command-compressor',
|
|
21
|
+
excludeCommands: ['node', 'python', 'ruby'],
|
|
22
|
+
},
|
|
23
|
+
sdkContextHook: {
|
|
24
|
+
enabled: true,
|
|
25
|
+
engine: 'sentence-extractor',
|
|
26
|
+
targetReduction: 0.15,
|
|
27
|
+
minCompressionTokens: 150,
|
|
28
|
+
perTaskKind: {
|
|
29
|
+
agent: 0.15,
|
|
30
|
+
skill: 0.2,
|
|
31
|
+
breakpoint: 0.1,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
processLibraryCache: {
|
|
35
|
+
enabled: true,
|
|
36
|
+
engine: 'sentence-extractor',
|
|
37
|
+
targetReduction: 0.35,
|
|
38
|
+
ttlHours: 24,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* density-filter — sentence-level compression with FNV-1a deduplication.
|
|
3
|
+
*
|
|
4
|
+
* Used for user-prompt compression (userPromptHook) and sdk-context
|
|
5
|
+
* compression (sdkContextHook) where no query context is available.
|
|
6
|
+
* Selects sentences by length-based score within a token budget.
|
|
7
|
+
*/
|
|
8
|
+
export declare function estimateTokens(text: string): number;
|
|
9
|
+
/**
|
|
10
|
+
* Density-filter text to the target token budget.
|
|
11
|
+
*
|
|
12
|
+
* Scores sentences by length (longer = higher score, capped at 40 tokens).
|
|
13
|
+
* Deduplicates by FNV-1a hash. Reconstructs in original document order.
|
|
14
|
+
*
|
|
15
|
+
* @param text Input text to compress.
|
|
16
|
+
* @param targetReduction Fraction to remove (0–1). E.g. 0.22 removes ~22%.
|
|
17
|
+
* @returns Compressed text, or original if nothing could be filtered.
|
|
18
|
+
*/
|
|
19
|
+
export declare function densityFilterText(text: string, targetReduction: number): string;
|
|
20
|
+
//# sourceMappingURL=density-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"density-filter.d.ts","sourceRoot":"","sources":["../../src/compression/density-filter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AA4BD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAkC/E"}
|