@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 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/plugins/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,WAAW,EAGZ,MAAM,SAAS,CAAC;AAajB;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,WAAW,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,cAAc,CAAC,CAWzB;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,cAAc,EACxB,KAAK,EAAE,WAAW,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAMf;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,cAAc,EACxB,UAAU,EAAE,MAAM,GACjB,mBAAmB,GAAG,SAAS,CAEjC;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,cAAc,EACxB,KAAK,EAAE,mBAAmB,GACzB,cAAc,CAahB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,cAAc,EACxB,UAAU,EAAE,MAAM,GACjB,cAAc,CAYhB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,cAAc,GACvB,mBAAmB,EAAE,CAIvB"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Plugin Registry CRUD
|
|
4
|
+
*
|
|
5
|
+
* Manages the plugin registry file using atomic writes for crash safety.
|
|
6
|
+
* The registry tracks all installed plugins, their versions, and metadata.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.readPluginRegistry = readPluginRegistry;
|
|
10
|
+
exports.writePluginRegistry = writePluginRegistry;
|
|
11
|
+
exports.getPluginEntry = getPluginEntry;
|
|
12
|
+
exports.upsertPluginEntry = upsertPluginEntry;
|
|
13
|
+
exports.removePluginEntry = removePluginEntry;
|
|
14
|
+
exports.listPluginEntries = listPluginEntries;
|
|
15
|
+
const node_fs_1 = require("node:fs");
|
|
16
|
+
const atomic_1 = require("../storage/atomic");
|
|
17
|
+
const paths_1 = require("./paths");
|
|
18
|
+
const types_1 = require("./types");
|
|
19
|
+
/**
|
|
20
|
+
* Creates an empty plugin registry with the current schema version.
|
|
21
|
+
*/
|
|
22
|
+
function createEmptyRegistry() {
|
|
23
|
+
return {
|
|
24
|
+
schemaVersion: types_1.PLUGIN_REGISTRY_SCHEMA_VERSION,
|
|
25
|
+
updatedAt: new Date().toISOString(),
|
|
26
|
+
plugins: {},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Reads the plugin registry from disk.
|
|
31
|
+
* Returns an empty registry if the file does not exist.
|
|
32
|
+
*
|
|
33
|
+
* @param scope - Whether to read the global or project registry
|
|
34
|
+
* @param projectDir - Required when scope is 'project'
|
|
35
|
+
*/
|
|
36
|
+
async function readPluginRegistry(scope, projectDir) {
|
|
37
|
+
const registryPath = (0, paths_1.getRegistryPath)(scope, projectDir);
|
|
38
|
+
try {
|
|
39
|
+
const raw = await node_fs_1.promises.readFile(registryPath, "utf8");
|
|
40
|
+
return JSON.parse(raw);
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
if ((0, types_1.isNodeError)(error) && error.code === "ENOENT") {
|
|
44
|
+
return createEmptyRegistry();
|
|
45
|
+
}
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Writes the plugin registry to disk using an atomic write.
|
|
51
|
+
*
|
|
52
|
+
* @param registry - The full registry object to persist
|
|
53
|
+
* @param scope - Whether to write the global or project registry
|
|
54
|
+
* @param projectDir - Required when scope is 'project'
|
|
55
|
+
*/
|
|
56
|
+
async function writePluginRegistry(registry, scope, projectDir) {
|
|
57
|
+
const registryPath = (0, paths_1.getRegistryPath)(scope, projectDir);
|
|
58
|
+
await (0, atomic_1.writeFileAtomic)(registryPath, JSON.stringify(registry, null, 2) + "\n");
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Looks up a plugin entry by name in the registry.
|
|
62
|
+
* Returns undefined if the plugin is not registered.
|
|
63
|
+
*
|
|
64
|
+
* @param registry - The registry to search
|
|
65
|
+
* @param pluginName - The plugin identifier to look up
|
|
66
|
+
*/
|
|
67
|
+
function getPluginEntry(registry, pluginName) {
|
|
68
|
+
return registry.plugins[pluginName];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Returns a new registry with the given entry inserted or updated.
|
|
72
|
+
* Sets the registry's updatedAt timestamp. Does not mutate the input.
|
|
73
|
+
*
|
|
74
|
+
* @param registry - The current registry
|
|
75
|
+
* @param entry - The plugin entry to insert or update
|
|
76
|
+
*/
|
|
77
|
+
function upsertPluginEntry(registry, entry) {
|
|
78
|
+
const now = new Date().toISOString();
|
|
79
|
+
return {
|
|
80
|
+
...registry,
|
|
81
|
+
updatedAt: now,
|
|
82
|
+
plugins: {
|
|
83
|
+
...registry.plugins,
|
|
84
|
+
[entry.name]: {
|
|
85
|
+
...entry,
|
|
86
|
+
updatedAt: now,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Returns a new registry with the named plugin removed.
|
|
93
|
+
* Does not mutate the input. Throws if the plugin is not found.
|
|
94
|
+
*
|
|
95
|
+
* @param registry - The current registry
|
|
96
|
+
* @param pluginName - The plugin identifier to remove
|
|
97
|
+
*/
|
|
98
|
+
function removePluginEntry(registry, pluginName) {
|
|
99
|
+
if (!(pluginName in registry.plugins)) {
|
|
100
|
+
throw new Error(`Plugin "${pluginName}" is not present in the registry`);
|
|
101
|
+
}
|
|
102
|
+
const { [pluginName]: _removed, ...remaining } = registry.plugins;
|
|
103
|
+
return {
|
|
104
|
+
...registry,
|
|
105
|
+
updatedAt: new Date().toISOString(),
|
|
106
|
+
plugins: remaining,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Returns all plugin entries as a sorted array (sorted by name).
|
|
111
|
+
*
|
|
112
|
+
* @param registry - The registry to list
|
|
113
|
+
*/
|
|
114
|
+
function listPluginEntries(registry) {
|
|
115
|
+
return Object.values(registry.plugins).sort((a, b) => a.name.localeCompare(b.name));
|
|
116
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Types for Babysitter SDK
|
|
3
|
+
*
|
|
4
|
+
* This module defines the TypeScript interfaces for plugin management,
|
|
5
|
+
* including registry entries, marketplace manifests, migrations, and
|
|
6
|
+
* package metadata.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Schema version for plugin registry serialization.
|
|
10
|
+
* Used to detect and migrate older registry formats.
|
|
11
|
+
*/
|
|
12
|
+
export declare const PLUGIN_REGISTRY_SCHEMA_VERSION = "2026.01.plugin-registry-v1";
|
|
13
|
+
/**
|
|
14
|
+
* Filename for the JSON-serialized plugin registry.
|
|
15
|
+
*/
|
|
16
|
+
export declare const PLUGIN_REGISTRY_FILENAME = "plugin-registry.json";
|
|
17
|
+
/**
|
|
18
|
+
* Filename for the marketplace manifest within a cloned marketplace directory.
|
|
19
|
+
*/
|
|
20
|
+
export declare const MARKETPLACE_MANIFEST_FILENAME = "marketplace.json";
|
|
21
|
+
/**
|
|
22
|
+
* Filename that stores the relative path to the marketplace manifest
|
|
23
|
+
* within a cloned marketplace directory (when a custom path is specified).
|
|
24
|
+
*/
|
|
25
|
+
export declare const MANIFEST_PATH_FILENAME = ".babysitter-manifest-path";
|
|
26
|
+
/**
|
|
27
|
+
* Scope determines where plugin configuration is stored.
|
|
28
|
+
*
|
|
29
|
+
* - `global` — User-wide configuration in the home directory
|
|
30
|
+
* - `project` — Project-specific configuration in the project root
|
|
31
|
+
*/
|
|
32
|
+
export type PluginScope = "global" | "project";
|
|
33
|
+
/**
|
|
34
|
+
* Type guard for Node.js system errors with an error code property.
|
|
35
|
+
*/
|
|
36
|
+
export declare function isNodeError(error: unknown): error is NodeJS.ErrnoException;
|
|
37
|
+
/**
|
|
38
|
+
* A single plugin entry within the registry.
|
|
39
|
+
*/
|
|
40
|
+
export interface PluginRegistryEntry {
|
|
41
|
+
/** Plugin identifier (e.g. "babysitter@a5c.ai") */
|
|
42
|
+
name: string;
|
|
43
|
+
/** Currently installed semantic version */
|
|
44
|
+
version: string;
|
|
45
|
+
/** Name of the marketplace this plugin was sourced from */
|
|
46
|
+
marketplace: string;
|
|
47
|
+
/** Whether this plugin is installed globally or per-project */
|
|
48
|
+
scope: PluginScope;
|
|
49
|
+
/** ISO 8601 timestamp of initial installation */
|
|
50
|
+
installedAt: string;
|
|
51
|
+
/** ISO 8601 timestamp of most recent update */
|
|
52
|
+
updatedAt: string;
|
|
53
|
+
/** Absolute or scope-relative path to the plugin package directory */
|
|
54
|
+
packagePath: string;
|
|
55
|
+
/** Arbitrary plugin-specific metadata */
|
|
56
|
+
metadata: Record<string, unknown>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The full plugin registry, persisted as JSON.
|
|
60
|
+
*/
|
|
61
|
+
export interface PluginRegistry {
|
|
62
|
+
/** Schema version for forward compatibility */
|
|
63
|
+
schemaVersion: typeof PLUGIN_REGISTRY_SCHEMA_VERSION;
|
|
64
|
+
/** ISO 8601 timestamp of last registry modification */
|
|
65
|
+
updatedAt: string;
|
|
66
|
+
/** Map of plugin name to registry entry */
|
|
67
|
+
plugins: Record<string, PluginRegistryEntry>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* A single plugin entry within a marketplace manifest.
|
|
71
|
+
*/
|
|
72
|
+
export interface MarketplacePluginEntry {
|
|
73
|
+
/** Human-readable plugin name */
|
|
74
|
+
name: string;
|
|
75
|
+
/** Short description of the plugin */
|
|
76
|
+
description: string;
|
|
77
|
+
/** Latest available semantic version */
|
|
78
|
+
latestVersion: string;
|
|
79
|
+
/** List of all available versions, newest first */
|
|
80
|
+
versions: string[];
|
|
81
|
+
/** Relative path to the plugin package directory within the marketplace */
|
|
82
|
+
packagePath: string;
|
|
83
|
+
/** Searchable tags for categorization */
|
|
84
|
+
tags: string[];
|
|
85
|
+
/** Plugin author name or identifier */
|
|
86
|
+
author: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The marketplace manifest, read from a cloned marketplace repository.
|
|
90
|
+
*/
|
|
91
|
+
export interface MarketplaceManifest {
|
|
92
|
+
/** Human-readable marketplace name */
|
|
93
|
+
name: string;
|
|
94
|
+
/** Short description of the marketplace */
|
|
95
|
+
description: string;
|
|
96
|
+
/** Git remote URL of the marketplace */
|
|
97
|
+
url: string;
|
|
98
|
+
/** Marketplace owner name or organization */
|
|
99
|
+
owner: string;
|
|
100
|
+
/** Map of plugin name to marketplace plugin entry */
|
|
101
|
+
plugins: Record<string, MarketplacePluginEntry>;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Describes a single migration step between two plugin versions.
|
|
105
|
+
*/
|
|
106
|
+
export interface MigrationDescriptor {
|
|
107
|
+
/** Source version (semver) */
|
|
108
|
+
from: string;
|
|
109
|
+
/** Target version (semver) */
|
|
110
|
+
to: string;
|
|
111
|
+
/** Filename of the migration file */
|
|
112
|
+
file: string;
|
|
113
|
+
/** Type of migration instructions */
|
|
114
|
+
type: "md" | "js";
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Aggregated information read from a plugin package directory.
|
|
118
|
+
*/
|
|
119
|
+
export interface PluginPackageInfo {
|
|
120
|
+
/** Plugin identifier */
|
|
121
|
+
name: string;
|
|
122
|
+
/** Markdown install instructions, or undefined if not present */
|
|
123
|
+
installInstructions: string | undefined;
|
|
124
|
+
/** Markdown uninstall instructions, or undefined if not present */
|
|
125
|
+
uninstallInstructions: string | undefined;
|
|
126
|
+
/** Markdown configure instructions, or undefined if not present */
|
|
127
|
+
configureInstructions: string | undefined;
|
|
128
|
+
/** Available migration descriptors sorted by source version */
|
|
129
|
+
migrations: MigrationDescriptor[];
|
|
130
|
+
/** List of process definition file paths relative to the package */
|
|
131
|
+
processFiles: string[];
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,eAAO,MAAM,8BAA8B,+BAA+B,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,wBAAwB,yBAAyB,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,6BAA6B,qBAAqB,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,sBAAsB,8BAA8B,CAAC;AAElE;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE/C;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,cAAc,CAE1E;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,KAAK,EAAE,WAAW,CAAC;IACnB,iDAAiD;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,aAAa,EAAE,OAAO,8BAA8B,CAAC;IACrD,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,2EAA2E;IAC3E,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,mEAAmE;IACnE,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,mEAAmE;IACnE,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,+DAA+D;IAC/D,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAClC,oEAAoE;IACpE,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Plugin Types for Babysitter SDK
|
|
4
|
+
*
|
|
5
|
+
* This module defines the TypeScript interfaces for plugin management,
|
|
6
|
+
* including registry entries, marketplace manifests, migrations, and
|
|
7
|
+
* package metadata.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.MANIFEST_PATH_FILENAME = exports.MARKETPLACE_MANIFEST_FILENAME = exports.PLUGIN_REGISTRY_FILENAME = exports.PLUGIN_REGISTRY_SCHEMA_VERSION = void 0;
|
|
11
|
+
exports.isNodeError = isNodeError;
|
|
12
|
+
/**
|
|
13
|
+
* Schema version for plugin registry serialization.
|
|
14
|
+
* Used to detect and migrate older registry formats.
|
|
15
|
+
*/
|
|
16
|
+
exports.PLUGIN_REGISTRY_SCHEMA_VERSION = "2026.01.plugin-registry-v1";
|
|
17
|
+
/**
|
|
18
|
+
* Filename for the JSON-serialized plugin registry.
|
|
19
|
+
*/
|
|
20
|
+
exports.PLUGIN_REGISTRY_FILENAME = "plugin-registry.json";
|
|
21
|
+
/**
|
|
22
|
+
* Filename for the marketplace manifest within a cloned marketplace directory.
|
|
23
|
+
*/
|
|
24
|
+
exports.MARKETPLACE_MANIFEST_FILENAME = "marketplace.json";
|
|
25
|
+
/**
|
|
26
|
+
* Filename that stores the relative path to the marketplace manifest
|
|
27
|
+
* within a cloned marketplace directory (when a custom path is specified).
|
|
28
|
+
*/
|
|
29
|
+
exports.MANIFEST_PATH_FILENAME = ".babysitter-manifest-path";
|
|
30
|
+
/**
|
|
31
|
+
* Type guard for Node.js system errors with an error code property.
|
|
32
|
+
*/
|
|
33
|
+
function isNodeError(error) {
|
|
34
|
+
return error instanceof Error && "code" in error;
|
|
35
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ProcessLibraryBinding, ProcessLibraryState, CloneProcessLibraryOptions, CloneProcessLibraryResult, UpdateProcessLibraryOptions, UpdateProcessLibraryResult, BindProcessLibraryOptions, BindProcessLibraryResult, ResolveActiveProcessLibraryOptions, ResolveActiveProcessLibraryResult, DefaultProcessLibrarySpec, EnsureActiveProcessLibraryOptions, EnsureActiveProcessLibraryResult } from "./activeTypes";
|
|
2
|
+
export type { ProcessLibraryBinding, ProcessLibraryState, CloneProcessLibraryOptions, CloneProcessLibraryResult, UpdateProcessLibraryOptions, UpdateProcessLibraryResult, BindProcessLibraryOptions, BindProcessLibraryResult, ResolveActiveProcessLibraryOptions, ResolveActiveProcessLibraryResult, DefaultProcessLibrarySpec, EnsureActiveProcessLibraryOptions, EnsureActiveProcessLibraryResult, };
|
|
3
|
+
export declare function getDefaultProcessLibrarySpec(options?: {
|
|
4
|
+
stateDir?: string;
|
|
5
|
+
repo?: string;
|
|
6
|
+
cloneDir?: string;
|
|
7
|
+
processDir?: string;
|
|
8
|
+
ref?: string;
|
|
9
|
+
}): DefaultProcessLibrarySpec;
|
|
10
|
+
export declare function getActiveProcessLibraryStatePath(stateDir?: string): string;
|
|
11
|
+
export declare function cloneProcessLibrary(options: CloneProcessLibraryOptions): Promise<CloneProcessLibraryResult>;
|
|
12
|
+
export declare function updateProcessLibrary(options: UpdateProcessLibraryOptions): Promise<UpdateProcessLibraryResult>;
|
|
13
|
+
export declare function bindActiveProcessLibrary(options: BindProcessLibraryOptions): Promise<BindProcessLibraryResult>;
|
|
14
|
+
export declare function resolveActiveProcessLibrary(options?: ResolveActiveProcessLibraryOptions): Promise<ResolveActiveProcessLibraryResult>;
|
|
15
|
+
export declare function getActiveProcessLibraryPath(options?: ResolveActiveProcessLibraryOptions): Promise<string | null>;
|
|
16
|
+
export declare function ensureActiveProcessLibrary(options?: EnsureActiveProcessLibraryOptions): Promise<EnsureActiveProcessLibraryResult>;
|
|
17
|
+
//# sourceMappingURL=active.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"active.d.ts","sourceRoot":"","sources":["../../src/processLibrary/active.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,2BAA2B,EAC3B,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,kCAAkC,EAClC,iCAAiC,EACjC,yBAAyB,EACzB,iCAAiC,EACjC,gCAAgC,EACjC,MAAM,eAAe,CAAC;AAGvB,YAAY,EACV,qBAAqB,EACrB,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,2BAA2B,EAC3B,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,kCAAkC,EAClC,iCAAiC,EACjC,yBAAyB,EACzB,iCAAiC,EACjC,gCAAgC,GACjC,CAAC;AAyDF,wBAAgB,4BAA4B,CAAC,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CAAO,GAAG,yBAAyB,CAYjL;AAED,wBAAgB,gCAAgC,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAE1E;AAsBD,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAWjH;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,0BAA0B,CAAC,CASpH;AAED,wBAAsB,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAapH;AAED,wBAAsB,2BAA2B,CAAC,OAAO,GAAE,kCAAuC,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAM9I;AAED,wBAAsB,2BAA2B,CAAC,OAAO,GAAE,kCAAuC,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQ1H;AAED,wBAAsB,0BAA0B,CAAC,OAAO,GAAE,iCAAsC,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAS3I"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getDefaultProcessLibrarySpec = getDefaultProcessLibrarySpec;
|
|
7
|
+
exports.getActiveProcessLibraryStatePath = getActiveProcessLibraryStatePath;
|
|
8
|
+
exports.cloneProcessLibrary = cloneProcessLibrary;
|
|
9
|
+
exports.updateProcessLibrary = updateProcessLibrary;
|
|
10
|
+
exports.bindActiveProcessLibrary = bindActiveProcessLibrary;
|
|
11
|
+
exports.resolveActiveProcessLibrary = resolveActiveProcessLibrary;
|
|
12
|
+
exports.getActiveProcessLibraryPath = getActiveProcessLibraryPath;
|
|
13
|
+
exports.ensureActiveProcessLibrary = ensureActiveProcessLibrary;
|
|
14
|
+
const node_fs_1 = require("node:fs");
|
|
15
|
+
const node_os_1 = __importDefault(require("node:os"));
|
|
16
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
17
|
+
const node_child_process_1 = require("node:child_process");
|
|
18
|
+
const node_util_1 = require("node:util");
|
|
19
|
+
const execFile = (0, node_util_1.promisify)(node_child_process_1.execFile);
|
|
20
|
+
const ACTIVE_PROCESS_LIBRARY_FILENAME = "process-library.json";
|
|
21
|
+
const DEFAULT_PROCESS_LIBRARY_REPO = "https://github.com/a5c-ai/babysitter.git";
|
|
22
|
+
const DEFAULT_PROCESS_LIBRARY_SUBPATH = "library";
|
|
23
|
+
const DEFAULT_PROCESS_LIBRARY_REFERENCE_SUBPATH = "plugins/babysitter/reference";
|
|
24
|
+
function resolveStateDir(stateDir) {
|
|
25
|
+
if (stateDir && stateDir.trim())
|
|
26
|
+
return node_path_1.default.resolve(stateDir);
|
|
27
|
+
if (process.env.BABYSITTER_GLOBAL_STATE_DIR?.trim())
|
|
28
|
+
return node_path_1.default.resolve(process.env.BABYSITTER_GLOBAL_STATE_DIR);
|
|
29
|
+
return node_path_1.default.join(node_os_1.default.homedir(), ".a5c");
|
|
30
|
+
}
|
|
31
|
+
function splitProcessLibrarySubpath(value) {
|
|
32
|
+
return value.split(/[\\/]+/).map((part) => part.trim()).filter(Boolean);
|
|
33
|
+
}
|
|
34
|
+
async function pathExists(targetPath) {
|
|
35
|
+
try {
|
|
36
|
+
await node_fs_1.promises.access(targetPath);
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function normalizeBinding(dir, repoUrl, ref, revision) {
|
|
44
|
+
return {
|
|
45
|
+
dir: node_path_1.default.resolve(dir),
|
|
46
|
+
...(repoUrl ? { repoUrl } : {}), ...(ref ? { ref } : {}), ...(revision ? { revision } : {}),
|
|
47
|
+
boundAt: new Date().toISOString(),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
async function ensureDirectoryExists(dir) {
|
|
51
|
+
const resolved = node_path_1.default.resolve(dir);
|
|
52
|
+
try {
|
|
53
|
+
const stat = await node_fs_1.promises.stat(resolved);
|
|
54
|
+
if (!stat.isDirectory())
|
|
55
|
+
throw new Error(`Process-library path is not a directory: ${resolved}`);
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
if (error?.code === "ENOENT")
|
|
59
|
+
throw new Error(`Process-library directory not found: ${resolved}`);
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
return resolved;
|
|
63
|
+
}
|
|
64
|
+
async function runGit(args, cwd) {
|
|
65
|
+
const gitArgs = process.platform === "win32" ? ["-c", "core.longpaths=true", ...args] : args;
|
|
66
|
+
return execFile("git", gitArgs, { ...(cwd ? { cwd } : {}), encoding: "utf8" });
|
|
67
|
+
}
|
|
68
|
+
async function getGitOutput(args, cwd) {
|
|
69
|
+
try {
|
|
70
|
+
const { stdout } = await runGit(args, cwd);
|
|
71
|
+
const value = stdout.trim();
|
|
72
|
+
return value || undefined;
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
async function readGitMetadata(dir) {
|
|
79
|
+
const repoUrl = await getGitOutput(["config", "--get", "remote.origin.url"], dir);
|
|
80
|
+
const revision = await getGitOutput(["rev-parse", "HEAD"], dir);
|
|
81
|
+
return { repoUrl, revision };
|
|
82
|
+
}
|
|
83
|
+
function getDefaultProcessLibrarySpec(options = {}) {
|
|
84
|
+
const stateDir = resolveStateDir(options.stateDir);
|
|
85
|
+
const repo = options.repo?.trim() || process.env.BABYSITTER_PROCESS_LIBRARY_REPO?.trim() || DEFAULT_PROCESS_LIBRARY_REPO;
|
|
86
|
+
const ref = options.ref?.trim() || process.env.BABYSITTER_PROCESS_LIBRARY_REF?.trim() || undefined;
|
|
87
|
+
const cloneDir = node_path_1.default.resolve(options.cloneDir?.trim() || node_path_1.default.join(stateDir, "process-library", "babysitter-repo"));
|
|
88
|
+
const processSubpath = process.env.BABYSITTER_PROCESS_LIBRARY_SUBPATH?.trim() || DEFAULT_PROCESS_LIBRARY_SUBPATH;
|
|
89
|
+
const referenceSubpath = process.env.BABYSITTER_PROCESS_LIBRARY_REFERENCE_SUBPATH?.trim() || DEFAULT_PROCESS_LIBRARY_REFERENCE_SUBPATH;
|
|
90
|
+
const processRoot = node_path_1.default.resolve(options.processDir?.trim() || node_path_1.default.join(cloneDir, ...splitProcessLibrarySubpath(processSubpath)));
|
|
91
|
+
const referenceRoot = options.processDir?.trim()
|
|
92
|
+
? node_path_1.default.resolve(options.processDir, "reference")
|
|
93
|
+
: node_path_1.default.resolve(cloneDir, ...splitProcessLibrarySubpath(referenceSubpath));
|
|
94
|
+
return { stateDir, repo, ...(ref ? { ref } : {}), cloneDir, processRoot, referenceRoot };
|
|
95
|
+
}
|
|
96
|
+
function getActiveProcessLibraryStatePath(stateDir) {
|
|
97
|
+
return node_path_1.default.join(resolveStateDir(stateDir), "active", ACTIVE_PROCESS_LIBRARY_FILENAME);
|
|
98
|
+
}
|
|
99
|
+
async function readState(stateDir) {
|
|
100
|
+
const stateFile = getActiveProcessLibraryStatePath(stateDir);
|
|
101
|
+
try {
|
|
102
|
+
const raw = await node_fs_1.promises.readFile(stateFile, "utf8");
|
|
103
|
+
return JSON.parse(raw);
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
if (error?.code === "ENOENT") {
|
|
107
|
+
return { version: 1, updatedAt: new Date().toISOString(), runBindings: {}, sessionBindings: {} };
|
|
108
|
+
}
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
async function writeState(stateDir, state) {
|
|
113
|
+
const stateFile = getActiveProcessLibraryStatePath(stateDir);
|
|
114
|
+
await node_fs_1.promises.mkdir(node_path_1.default.dirname(stateFile), { recursive: true });
|
|
115
|
+
await node_fs_1.promises.writeFile(stateFile, JSON.stringify(state, null, 2), "utf8");
|
|
116
|
+
return stateFile;
|
|
117
|
+
}
|
|
118
|
+
async function cloneProcessLibrary(options) {
|
|
119
|
+
const dir = node_path_1.default.resolve(options.dir);
|
|
120
|
+
await node_fs_1.promises.mkdir(node_path_1.default.dirname(dir), { recursive: true });
|
|
121
|
+
if (await pathExists(dir))
|
|
122
|
+
throw new Error(`Process-library directory already exists at ${dir}. Choose a new --dir or update it instead.`);
|
|
123
|
+
const cloneArgs = ["clone", "--depth", "1"];
|
|
124
|
+
if (options.ref)
|
|
125
|
+
cloneArgs.push("--branch", options.ref);
|
|
126
|
+
cloneArgs.push(options.repo, dir);
|
|
127
|
+
try {
|
|
128
|
+
await runGit(cloneArgs);
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
await node_fs_1.promises.rm(dir, { recursive: true, force: true });
|
|
132
|
+
throw error;
|
|
133
|
+
}
|
|
134
|
+
const { revision } = await readGitMetadata(dir);
|
|
135
|
+
if (!revision)
|
|
136
|
+
throw new Error(`Unable to determine cloned revision for ${dir}`);
|
|
137
|
+
return { dir, repo: options.repo, ...(options.ref ? { ref: options.ref } : {}), revision };
|
|
138
|
+
}
|
|
139
|
+
async function updateProcessLibrary(options) {
|
|
140
|
+
const dir = await ensureDirectoryExists(options.dir);
|
|
141
|
+
if (options.ref) {
|
|
142
|
+
await runGit(["fetch", "--depth", "1", "origin", options.ref], dir);
|
|
143
|
+
await runGit(["checkout", "--force", "FETCH_HEAD"], dir);
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
await runGit(["pull", "--ff-only"], dir);
|
|
147
|
+
}
|
|
148
|
+
const { repoUrl, revision } = await readGitMetadata(dir);
|
|
149
|
+
if (!revision)
|
|
150
|
+
throw new Error(`Unable to determine updated revision for ${dir}`);
|
|
151
|
+
return { dir, ...(repoUrl ? { repo: repoUrl } : {}), ...(options.ref ? { ref: options.ref } : {}), revision };
|
|
152
|
+
}
|
|
153
|
+
async function bindActiveProcessLibrary(options) {
|
|
154
|
+
const dir = await ensureDirectoryExists(options.dir);
|
|
155
|
+
const state = await readState(options.stateDir);
|
|
156
|
+
const { repoUrl, revision } = await readGitMetadata(dir);
|
|
157
|
+
const binding = normalizeBinding(dir, repoUrl, options.ref, revision);
|
|
158
|
+
let bindingScope = "default";
|
|
159
|
+
let bindingKey;
|
|
160
|
+
if (options.runId) {
|
|
161
|
+
state.runBindings = state.runBindings ?? {};
|
|
162
|
+
state.runBindings[options.runId] = binding;
|
|
163
|
+
bindingScope = "run";
|
|
164
|
+
bindingKey = options.runId;
|
|
165
|
+
}
|
|
166
|
+
if (options.sessionId) {
|
|
167
|
+
state.sessionBindings = state.sessionBindings ?? {};
|
|
168
|
+
state.sessionBindings[options.sessionId] = binding;
|
|
169
|
+
bindingScope = options.runId ? "run+session" : "session";
|
|
170
|
+
bindingKey = options.runId ? `${options.runId}:${options.sessionId}` : options.sessionId;
|
|
171
|
+
}
|
|
172
|
+
if (!options.runId && !options.sessionId)
|
|
173
|
+
state.defaultBinding = binding;
|
|
174
|
+
state.updatedAt = new Date().toISOString();
|
|
175
|
+
const stateFile = await writeState(options.stateDir, state);
|
|
176
|
+
return { stateFile, bindingScope, ...(bindingKey ? { bindingKey } : {}), binding };
|
|
177
|
+
}
|
|
178
|
+
async function resolveActiveProcessLibrary(options = {}) {
|
|
179
|
+
const stateFile = getActiveProcessLibraryStatePath(options.stateDir);
|
|
180
|
+
const state = await readState(options.stateDir);
|
|
181
|
+
if (options.runId && state.runBindings?.[options.runId])
|
|
182
|
+
return { stateFile, bindingScope: "run", bindingKey: options.runId, binding: state.runBindings[options.runId] };
|
|
183
|
+
if (options.sessionId && state.sessionBindings?.[options.sessionId])
|
|
184
|
+
return { stateFile, bindingScope: "session", bindingKey: options.sessionId, binding: state.sessionBindings[options.sessionId] };
|
|
185
|
+
return { stateFile, bindingScope: state.defaultBinding ? "default" : null, binding: state.defaultBinding ?? null };
|
|
186
|
+
}
|
|
187
|
+
async function getActiveProcessLibraryPath(options = {}) {
|
|
188
|
+
try {
|
|
189
|
+
const resolved = await resolveActiveProcessLibrary(options);
|
|
190
|
+
if (resolved.binding?.dir) {
|
|
191
|
+
const dir = node_path_1.default.resolve(resolved.binding.dir);
|
|
192
|
+
if (await pathExists(dir))
|
|
193
|
+
return dir;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
catch { /* Fall through */ }
|
|
197
|
+
const spec = getDefaultProcessLibrarySpec({ stateDir: options.stateDir });
|
|
198
|
+
if (await pathExists(spec.processRoot))
|
|
199
|
+
return spec.processRoot;
|
|
200
|
+
return null;
|
|
201
|
+
}
|
|
202
|
+
async function ensureActiveProcessLibrary(options = {}) {
|
|
203
|
+
const defaultSpec = getDefaultProcessLibrarySpec(options);
|
|
204
|
+
const resolved = await resolveActiveProcessLibrary(options);
|
|
205
|
+
if (resolved.binding && (await pathExists(resolved.binding.dir)))
|
|
206
|
+
return { ...resolved, bootstrapped: false, defaultSpec };
|
|
207
|
+
const cloneExists = await pathExists(node_path_1.default.join(defaultSpec.cloneDir, ".git"));
|
|
208
|
+
if (cloneExists) {
|
|
209
|
+
await updateProcessLibrary({ dir: defaultSpec.cloneDir, ...(defaultSpec.ref ? { ref: defaultSpec.ref } : {}) });
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
await cloneProcessLibrary({ repo: defaultSpec.repo, dir: defaultSpec.cloneDir, ...(defaultSpec.ref ? { ref: defaultSpec.ref } : {}) });
|
|
213
|
+
}
|
|
214
|
+
const bound = await bindActiveProcessLibrary({ stateDir: defaultSpec.stateDir, dir: defaultSpec.processRoot, runId: options.runId, sessionId: options.sessionId, ref: defaultSpec.ref });
|
|
215
|
+
return { stateFile: bound.stateFile, bindingScope: bound.bindingScope === "run+session" ? "run" : bound.bindingScope, ...(bound.bindingKey ? { bindingKey: bound.bindingKey } : {}), binding: bound.binding, bootstrapped: true, defaultSpec };
|
|
216
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for process library management.
|
|
3
|
+
* Extracted from active.ts for max-lines compliance.
|
|
4
|
+
*/
|
|
5
|
+
export interface ProcessLibraryBinding {
|
|
6
|
+
dir: string;
|
|
7
|
+
repoUrl?: string;
|
|
8
|
+
ref?: string;
|
|
9
|
+
revision?: string;
|
|
10
|
+
boundAt: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ProcessLibraryState {
|
|
13
|
+
version: 1;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
defaultBinding?: ProcessLibraryBinding;
|
|
16
|
+
runBindings?: Record<string, ProcessLibraryBinding>;
|
|
17
|
+
sessionBindings?: Record<string, ProcessLibraryBinding>;
|
|
18
|
+
}
|
|
19
|
+
export interface CloneProcessLibraryOptions {
|
|
20
|
+
repo: string;
|
|
21
|
+
dir: string;
|
|
22
|
+
ref?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface CloneProcessLibraryResult {
|
|
25
|
+
dir: string;
|
|
26
|
+
repo: string;
|
|
27
|
+
ref?: string;
|
|
28
|
+
revision: string;
|
|
29
|
+
}
|
|
30
|
+
export interface UpdateProcessLibraryOptions {
|
|
31
|
+
dir: string;
|
|
32
|
+
ref?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface UpdateProcessLibraryResult {
|
|
35
|
+
dir: string;
|
|
36
|
+
repo?: string;
|
|
37
|
+
ref?: string;
|
|
38
|
+
revision: string;
|
|
39
|
+
}
|
|
40
|
+
export interface BindProcessLibraryOptions {
|
|
41
|
+
stateDir?: string;
|
|
42
|
+
dir: string;
|
|
43
|
+
runId?: string;
|
|
44
|
+
sessionId?: string;
|
|
45
|
+
ref?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface BindProcessLibraryResult {
|
|
48
|
+
stateFile: string;
|
|
49
|
+
bindingScope: "default" | "run" | "session" | "run+session";
|
|
50
|
+
bindingKey?: string;
|
|
51
|
+
binding: ProcessLibraryBinding;
|
|
52
|
+
}
|
|
53
|
+
export interface ResolveActiveProcessLibraryOptions {
|
|
54
|
+
stateDir?: string;
|
|
55
|
+
runId?: string;
|
|
56
|
+
sessionId?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface ResolveActiveProcessLibraryResult {
|
|
59
|
+
stateFile: string;
|
|
60
|
+
bindingScope: "default" | "run" | "session" | null;
|
|
61
|
+
bindingKey?: string;
|
|
62
|
+
binding: ProcessLibraryBinding | null;
|
|
63
|
+
}
|
|
64
|
+
export interface DefaultProcessLibrarySpec {
|
|
65
|
+
stateDir: string;
|
|
66
|
+
repo: string;
|
|
67
|
+
ref?: string;
|
|
68
|
+
cloneDir: string;
|
|
69
|
+
processRoot: string;
|
|
70
|
+
referenceRoot: string;
|
|
71
|
+
}
|
|
72
|
+
export interface EnsureActiveProcessLibraryOptions extends ResolveActiveProcessLibraryOptions {
|
|
73
|
+
repo?: string;
|
|
74
|
+
cloneDir?: string;
|
|
75
|
+
processDir?: string;
|
|
76
|
+
ref?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface EnsureActiveProcessLibraryResult extends ResolveActiveProcessLibraryResult {
|
|
79
|
+
bootstrapped: boolean;
|
|
80
|
+
defaultSpec: DefaultProcessLibrarySpec;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=activeTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activeTypes.d.ts","sourceRoot":"","sources":["../../src/processLibrary/activeTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,CAAC,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IACpD,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,yBAAyB;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,0BAA0B;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,aAAa,CAAC;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,qBAAqB,CAAC;CAChC;AAED,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iCAAiC;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,IAAI,CAAC;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iCACf,SAAQ,kCAAkC;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gCACf,SAAQ,iCAAiC;IACzC,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,yBAAyB,CAAC;CACxC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profiles Module for Babysitter SDK
|
|
3
|
+
*
|
|
4
|
+
* Provides types and utilities for managing user profiles (personal preferences,
|
|
5
|
+
* expertise, and configuration) and project profiles (technical context,
|
|
6
|
+
* architecture, tooling, and workflow information).
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* import {
|
|
11
|
+
* readUserProfile,
|
|
12
|
+
* writeUserProfile,
|
|
13
|
+
* createDefaultUserProfile,
|
|
14
|
+
* mergeUserProfile,
|
|
15
|
+
* readProjectProfile,
|
|
16
|
+
* writeProjectProfile,
|
|
17
|
+
* createDefaultProjectProfile,
|
|
18
|
+
* mergeProjectProfile,
|
|
19
|
+
* } from "@a5c-ai/babysitter-sdk";
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export * from "./types";
|
|
23
|
+
export * from "./userProfile";
|
|
24
|
+
export * from "./projectProfile";
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/profiles/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
|