@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,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Marketplace manifest normalization helpers.
|
|
4
|
+
* Extracted from marketplace.ts for max-lines compliance.
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.resolveManifestPath = resolveManifestPath;
|
|
11
|
+
exports.normalizeManifest = normalizeManifest;
|
|
12
|
+
const node_fs_1 = require("node:fs");
|
|
13
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
14
|
+
const types_1 = require("./types");
|
|
15
|
+
/**
|
|
16
|
+
* Resolves the marketplace manifest path within a cloned marketplace directory.
|
|
17
|
+
*/
|
|
18
|
+
async function resolveManifestPath(dir) {
|
|
19
|
+
// 1. Check for stored custom path
|
|
20
|
+
try {
|
|
21
|
+
const customPath = (await node_fs_1.promises.readFile(node_path_1.default.join(dir, types_1.MANIFEST_PATH_FILENAME), "utf8")).trim();
|
|
22
|
+
const resolved = node_path_1.default.join(dir, customPath);
|
|
23
|
+
await node_fs_1.promises.access(resolved);
|
|
24
|
+
return resolved;
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
// No custom path or file not found at custom path
|
|
28
|
+
}
|
|
29
|
+
// 2. Check root marketplace.json
|
|
30
|
+
const rootManifest = node_path_1.default.join(dir, types_1.MARKETPLACE_MANIFEST_FILENAME);
|
|
31
|
+
try {
|
|
32
|
+
await node_fs_1.promises.access(rootManifest);
|
|
33
|
+
return rootManifest;
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
// Not at root
|
|
37
|
+
}
|
|
38
|
+
// 3. Check .claude-plugin/marketplace.json
|
|
39
|
+
const claudePluginManifest = node_path_1.default.join(dir, ".claude-plugin", types_1.MARKETPLACE_MANIFEST_FILENAME);
|
|
40
|
+
try {
|
|
41
|
+
await node_fs_1.promises.access(claudePluginManifest);
|
|
42
|
+
return claudePluginManifest;
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
// Not found anywhere
|
|
46
|
+
}
|
|
47
|
+
throw new Error(`Marketplace manifest not found in ${dir}. Searched: ${types_1.MARKETPLACE_MANIFEST_FILENAME}, .claude-plugin/${types_1.MARKETPLACE_MANIFEST_FILENAME}, and ${types_1.MANIFEST_PATH_FILENAME}. Is this a valid marketplace?`);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Normalizes a marketplace manifest that may use the legacy array format
|
|
51
|
+
* (with `source` field) into the standard Record format (with `packagePath`).
|
|
52
|
+
*/
|
|
53
|
+
function normalizeManifest(raw) {
|
|
54
|
+
const name = typeof raw.name === "string" ? raw.name : "unknown";
|
|
55
|
+
const description = typeof raw.description === "string" ? raw.description : "";
|
|
56
|
+
const url = typeof raw.url === "string" ? raw.url : "";
|
|
57
|
+
// Normalize owner
|
|
58
|
+
let owner;
|
|
59
|
+
if (typeof raw.owner === "string") {
|
|
60
|
+
owner = raw.owner;
|
|
61
|
+
}
|
|
62
|
+
else if (raw.owner && typeof raw.owner === "object" && "name" in raw.owner &&
|
|
63
|
+
typeof raw.owner.name === "string") {
|
|
64
|
+
owner = raw.owner.name;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
owner = "";
|
|
68
|
+
}
|
|
69
|
+
// Check if plugins is already in Record format
|
|
70
|
+
if (raw.plugins && !Array.isArray(raw.plugins)) {
|
|
71
|
+
return {
|
|
72
|
+
name, description, url, owner,
|
|
73
|
+
plugins: raw.plugins,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
// Legacy array format: convert to Record
|
|
77
|
+
const plugins = {};
|
|
78
|
+
if (Array.isArray(raw.plugins)) {
|
|
79
|
+
for (const entry of raw.plugins) {
|
|
80
|
+
if (!entry || typeof entry !== "object")
|
|
81
|
+
continue;
|
|
82
|
+
const e = entry;
|
|
83
|
+
const pluginName = typeof e.name === "string" ? e.name : "";
|
|
84
|
+
if (!pluginName)
|
|
85
|
+
continue;
|
|
86
|
+
let packagePath = "";
|
|
87
|
+
if (typeof e.packagePath === "string") {
|
|
88
|
+
packagePath = e.packagePath;
|
|
89
|
+
}
|
|
90
|
+
else if (typeof e.source === "string") {
|
|
91
|
+
packagePath = e.source.replace(/^\.\//, "");
|
|
92
|
+
}
|
|
93
|
+
const version = typeof e.version === "string" ? e.version : "0.0.0";
|
|
94
|
+
const pluginDesc = typeof e.description === "string" ? e.description : "";
|
|
95
|
+
let author = "";
|
|
96
|
+
if (typeof e.author === "string") {
|
|
97
|
+
author = e.author;
|
|
98
|
+
}
|
|
99
|
+
else if (e.author && typeof e.author === "object" && "name" in e.author &&
|
|
100
|
+
typeof e.author.name === "string") {
|
|
101
|
+
author = e.author.name;
|
|
102
|
+
}
|
|
103
|
+
const tags = Array.isArray(e.tags) ? e.tags : [];
|
|
104
|
+
const versions = Array.isArray(e.versions)
|
|
105
|
+
? e.versions
|
|
106
|
+
: [version];
|
|
107
|
+
plugins[pluginName] = {
|
|
108
|
+
name: pluginName, description: pluginDesc, latestVersion: version,
|
|
109
|
+
versions, packagePath, tags, author,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return { name, description, url, owner, plugins };
|
|
114
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Migration Chain Resolution
|
|
3
|
+
*
|
|
4
|
+
* Parses migration filenames, builds a version graph, and finds
|
|
5
|
+
* the shortest migration path between two versions using BFS.
|
|
6
|
+
*/
|
|
7
|
+
import { MigrationDescriptor } from "./types";
|
|
8
|
+
/**
|
|
9
|
+
* Parses a migration filename into its constituent version parts.
|
|
10
|
+
* Returns undefined if the filename does not match the expected pattern.
|
|
11
|
+
*
|
|
12
|
+
* @param filename - The migration filename to parse
|
|
13
|
+
*/
|
|
14
|
+
export declare function parseMigrationFilename(filename: string): MigrationDescriptor | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Lists all migration descriptors found in a migrations directory.
|
|
17
|
+
* Ignores files that do not match the expected naming pattern.
|
|
18
|
+
*
|
|
19
|
+
* @param migrationsDir - Absolute path to the migrations directory
|
|
20
|
+
*/
|
|
21
|
+
export declare function listMigrations(migrationsDir: string): Promise<MigrationDescriptor[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Builds a directed adjacency list from version to version,
|
|
24
|
+
* keyed by "from" version, with edges pointing to "to" versions.
|
|
25
|
+
*
|
|
26
|
+
* @param migrations - Array of migration descriptors
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildMigrationGraph(migrations: MigrationDescriptor[]): Map<string, MigrationDescriptor[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Finds the shortest migration path from one version to another using BFS.
|
|
31
|
+
* Returns the ordered list of migration descriptors, or undefined if no path exists.
|
|
32
|
+
*
|
|
33
|
+
* @param migrations - All available migration descriptors
|
|
34
|
+
* @param fromVersion - Starting version
|
|
35
|
+
* @param toVersion - Target version
|
|
36
|
+
*/
|
|
37
|
+
export declare function findMigrationPath(migrations: MigrationDescriptor[], fromVersion: string, toVersion: string): MigrationDescriptor[] | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Full migration resolution flow: lists migrations from a package directory,
|
|
40
|
+
* finds the shortest path, and returns the migration descriptors with their
|
|
41
|
+
* file contents loaded.
|
|
42
|
+
*
|
|
43
|
+
* @param packageDir - Absolute path to the plugin package directory (containing migrations/ subdir)
|
|
44
|
+
* @param fromVersion - Current installed version
|
|
45
|
+
* @param toVersion - Target version to migrate to
|
|
46
|
+
* @returns Array of objects with descriptor and content, or undefined if no path exists
|
|
47
|
+
*/
|
|
48
|
+
export declare function resolveMigrationChain(packageDir: string, fromVersion: string, toVersion: string): Promise<Array<{
|
|
49
|
+
descriptor: MigrationDescriptor;
|
|
50
|
+
content: string;
|
|
51
|
+
}> | undefined>;
|
|
52
|
+
//# sourceMappingURL=migrations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/plugins/migrations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,mBAAmB,EAAe,MAAM,SAAS,CAAC;AAW3D;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,GACf,mBAAmB,GAAG,SAAS,CAYjC;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAoBhC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,mBAAmB,EAAE,GAChC,GAAG,CAAC,MAAM,EAAE,mBAAmB,EAAE,CAAC,CAWpC;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,mBAAmB,EAAE,EACjC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,mBAAmB,EAAE,GAAG,SAAS,CAgCnC;AAED;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,KAAK,CAAC;IAAE,UAAU,EAAE,mBAAmB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAAC,CAqBlF"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Plugin Migration Chain Resolution
|
|
4
|
+
*
|
|
5
|
+
* Parses migration filenames, builds a version graph, and finds
|
|
6
|
+
* the shortest migration path between two versions using BFS.
|
|
7
|
+
*/
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.parseMigrationFilename = parseMigrationFilename;
|
|
13
|
+
exports.listMigrations = listMigrations;
|
|
14
|
+
exports.buildMigrationGraph = buildMigrationGraph;
|
|
15
|
+
exports.findMigrationPath = findMigrationPath;
|
|
16
|
+
exports.resolveMigrationChain = resolveMigrationChain;
|
|
17
|
+
const node_fs_1 = require("node:fs");
|
|
18
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
19
|
+
const types_1 = require("./types");
|
|
20
|
+
/**
|
|
21
|
+
* Regex for migration filenames: `<from>_to_<to>.<ext>`
|
|
22
|
+
* Versions may contain digits, dots, dashes, and pre-release identifiers.
|
|
23
|
+
*
|
|
24
|
+
* Examples: "1.0.0_to_1.1.0.md", "2.0.0-beta_to_2.0.0.js"
|
|
25
|
+
*/
|
|
26
|
+
const MIGRATION_FILENAME_REGEX = /^([a-zA-Z0-9._-]+)_to_([a-zA-Z0-9._-]+)\.(md|js)$/;
|
|
27
|
+
/**
|
|
28
|
+
* Parses a migration filename into its constituent version parts.
|
|
29
|
+
* Returns undefined if the filename does not match the expected pattern.
|
|
30
|
+
*
|
|
31
|
+
* @param filename - The migration filename to parse
|
|
32
|
+
*/
|
|
33
|
+
function parseMigrationFilename(filename) {
|
|
34
|
+
const match = MIGRATION_FILENAME_REGEX.exec(filename);
|
|
35
|
+
if (!match) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
const [, from, to, ext] = match;
|
|
39
|
+
return {
|
|
40
|
+
from,
|
|
41
|
+
to,
|
|
42
|
+
file: filename,
|
|
43
|
+
type: ext,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Lists all migration descriptors found in a migrations directory.
|
|
48
|
+
* Ignores files that do not match the expected naming pattern.
|
|
49
|
+
*
|
|
50
|
+
* @param migrationsDir - Absolute path to the migrations directory
|
|
51
|
+
*/
|
|
52
|
+
async function listMigrations(migrationsDir) {
|
|
53
|
+
let entries;
|
|
54
|
+
try {
|
|
55
|
+
entries = await node_fs_1.promises.readdir(migrationsDir);
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
if ((0, types_1.isNodeError)(error) && error.code === "ENOENT") {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
throw error;
|
|
62
|
+
}
|
|
63
|
+
const descriptors = [];
|
|
64
|
+
for (const entry of entries) {
|
|
65
|
+
const descriptor = parseMigrationFilename(entry);
|
|
66
|
+
if (descriptor) {
|
|
67
|
+
descriptors.push(descriptor);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return descriptors.sort((a, b) => a.from.localeCompare(b.from));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Builds a directed adjacency list from version to version,
|
|
74
|
+
* keyed by "from" version, with edges pointing to "to" versions.
|
|
75
|
+
*
|
|
76
|
+
* @param migrations - Array of migration descriptors
|
|
77
|
+
*/
|
|
78
|
+
function buildMigrationGraph(migrations) {
|
|
79
|
+
const graph = new Map();
|
|
80
|
+
for (const migration of migrations) {
|
|
81
|
+
const existing = graph.get(migration.from);
|
|
82
|
+
if (existing) {
|
|
83
|
+
existing.push(migration);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
graph.set(migration.from, [migration]);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return graph;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Finds the shortest migration path from one version to another using BFS.
|
|
93
|
+
* Returns the ordered list of migration descriptors, or undefined if no path exists.
|
|
94
|
+
*
|
|
95
|
+
* @param migrations - All available migration descriptors
|
|
96
|
+
* @param fromVersion - Starting version
|
|
97
|
+
* @param toVersion - Target version
|
|
98
|
+
*/
|
|
99
|
+
function findMigrationPath(migrations, fromVersion, toVersion) {
|
|
100
|
+
if (fromVersion === toVersion) {
|
|
101
|
+
return [];
|
|
102
|
+
}
|
|
103
|
+
const graph = buildMigrationGraph(migrations);
|
|
104
|
+
// BFS
|
|
105
|
+
const queue = [
|
|
106
|
+
{ version: fromVersion, path: [] },
|
|
107
|
+
];
|
|
108
|
+
const visited = new Set([fromVersion]);
|
|
109
|
+
while (queue.length > 0) {
|
|
110
|
+
const current = queue.shift();
|
|
111
|
+
const neighbors = graph.get(current.version) ?? [];
|
|
112
|
+
for (const edge of neighbors) {
|
|
113
|
+
if (edge.to === toVersion) {
|
|
114
|
+
return [...current.path, edge];
|
|
115
|
+
}
|
|
116
|
+
if (!visited.has(edge.to)) {
|
|
117
|
+
visited.add(edge.to);
|
|
118
|
+
queue.push({
|
|
119
|
+
version: edge.to,
|
|
120
|
+
path: [...current.path, edge],
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return undefined;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Full migration resolution flow: lists migrations from a package directory,
|
|
129
|
+
* finds the shortest path, and returns the migration descriptors with their
|
|
130
|
+
* file contents loaded.
|
|
131
|
+
*
|
|
132
|
+
* @param packageDir - Absolute path to the plugin package directory (containing migrations/ subdir)
|
|
133
|
+
* @param fromVersion - Current installed version
|
|
134
|
+
* @param toVersion - Target version to migrate to
|
|
135
|
+
* @returns Array of objects with descriptor and content, or undefined if no path exists
|
|
136
|
+
*/
|
|
137
|
+
async function resolveMigrationChain(packageDir, fromVersion, toVersion) {
|
|
138
|
+
const migrationsDir = node_path_1.default.join(packageDir, "migrations");
|
|
139
|
+
const allMigrations = await listMigrations(migrationsDir);
|
|
140
|
+
const migrationPath = findMigrationPath(allMigrations, fromVersion, toVersion);
|
|
141
|
+
if (!migrationPath) {
|
|
142
|
+
return undefined;
|
|
143
|
+
}
|
|
144
|
+
const results = [];
|
|
145
|
+
for (const descriptor of migrationPath) {
|
|
146
|
+
const filePath = node_path_1.default.join(migrationsDir, descriptor.file);
|
|
147
|
+
const content = await node_fs_1.promises.readFile(filePath, "utf8");
|
|
148
|
+
results.push({ descriptor, content });
|
|
149
|
+
}
|
|
150
|
+
return results;
|
|
151
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Package Reader
|
|
3
|
+
*
|
|
4
|
+
* Reads plugin package contents including instruction files,
|
|
5
|
+
* migration descriptors, and process definition files.
|
|
6
|
+
*/
|
|
7
|
+
import { MigrationDescriptor, PluginPackageInfo } from "./types";
|
|
8
|
+
/**
|
|
9
|
+
* Reads all metadata and instruction files from a plugin package directory.
|
|
10
|
+
*
|
|
11
|
+
* @param packageDir - Absolute path to the plugin package directory
|
|
12
|
+
*/
|
|
13
|
+
export declare function readPluginPackage(packageDir: string): Promise<PluginPackageInfo>;
|
|
14
|
+
/**
|
|
15
|
+
* Reads the install instructions markdown file from a plugin package.
|
|
16
|
+
*
|
|
17
|
+
* @param packageDir - Absolute path to the plugin package directory
|
|
18
|
+
*/
|
|
19
|
+
export declare function readInstallInstructions(packageDir: string): Promise<string | undefined>;
|
|
20
|
+
/**
|
|
21
|
+
* Reads the uninstall instructions markdown file from a plugin package.
|
|
22
|
+
*
|
|
23
|
+
* @param packageDir - Absolute path to the plugin package directory
|
|
24
|
+
*/
|
|
25
|
+
export declare function readUninstallInstructions(packageDir: string): Promise<string | undefined>;
|
|
26
|
+
/**
|
|
27
|
+
* Reads the configure instructions markdown file from a plugin package.
|
|
28
|
+
*
|
|
29
|
+
* @param packageDir - Absolute path to the plugin package directory
|
|
30
|
+
*/
|
|
31
|
+
export declare function readConfigureInstructions(packageDir: string): Promise<string | undefined>;
|
|
32
|
+
/**
|
|
33
|
+
* Lists all migration descriptors found in the migrations/ subdirectory.
|
|
34
|
+
* Filenames must follow the pattern: `<from>_to_<to>.<ext>`
|
|
35
|
+
*
|
|
36
|
+
* @param packageDir - Absolute path to the plugin package directory
|
|
37
|
+
*/
|
|
38
|
+
export declare function listMigrations(packageDir: string): Promise<MigrationDescriptor[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Reads the content of a specific migration file.
|
|
41
|
+
*
|
|
42
|
+
* @param packageDir - Absolute path to the plugin package directory
|
|
43
|
+
* @param from - Source version
|
|
44
|
+
* @param to - Target version
|
|
45
|
+
*/
|
|
46
|
+
export declare function readMigration(packageDir: string, from: string, to: string): Promise<string>;
|
|
47
|
+
//# sourceMappingURL=packageReader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageReader.d.ts","sourceRoot":"","sources":["../../src/plugins/packageReader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EAElB,MAAM,SAAS,CAAC;AAoDjB;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,iBAAiB,CAAC,CAiC5B;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE7B;AAED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE7B;AAED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE7B;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAEhC;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,MAAM,CAAC,CAUjB"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Plugin Package Reader
|
|
4
|
+
*
|
|
5
|
+
* Reads plugin package contents including instruction files,
|
|
6
|
+
* migration descriptors, and process definition files.
|
|
7
|
+
*/
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.readPluginPackage = readPluginPackage;
|
|
13
|
+
exports.readInstallInstructions = readInstallInstructions;
|
|
14
|
+
exports.readUninstallInstructions = readUninstallInstructions;
|
|
15
|
+
exports.readConfigureInstructions = readConfigureInstructions;
|
|
16
|
+
exports.listMigrations = listMigrations;
|
|
17
|
+
exports.readMigration = readMigration;
|
|
18
|
+
const node_fs_1 = require("node:fs");
|
|
19
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
20
|
+
const types_1 = require("./types");
|
|
21
|
+
const migrations_1 = require("./migrations");
|
|
22
|
+
/**
|
|
23
|
+
* Standard instruction file names within a plugin package.
|
|
24
|
+
*/
|
|
25
|
+
const INSTALL_FILE = "install.md";
|
|
26
|
+
const UNINSTALL_FILE = "uninstall.md";
|
|
27
|
+
const CONFIGURE_FILE = "configure.md";
|
|
28
|
+
const MIGRATIONS_DIR = "migrations";
|
|
29
|
+
const PROCESS_DIR = "process";
|
|
30
|
+
/**
|
|
31
|
+
* Reads a text file, returning undefined if the file does not exist.
|
|
32
|
+
*/
|
|
33
|
+
async function readOptionalFile(filePath) {
|
|
34
|
+
try {
|
|
35
|
+
return await node_fs_1.promises.readFile(filePath, "utf8");
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
if ((0, types_1.isNodeError)(error) && error.code === "ENOENT") {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
throw error;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Recursively collects all files under a directory, returning paths
|
|
46
|
+
* relative to the given base directory.
|
|
47
|
+
*/
|
|
48
|
+
async function collectFiles(dir, base) {
|
|
49
|
+
const results = [];
|
|
50
|
+
try {
|
|
51
|
+
const entries = await node_fs_1.promises.readdir(dir, { withFileTypes: true });
|
|
52
|
+
for (const entry of entries) {
|
|
53
|
+
const fullPath = node_path_1.default.join(dir, entry.name);
|
|
54
|
+
if (entry.isDirectory()) {
|
|
55
|
+
const nested = await collectFiles(fullPath, base);
|
|
56
|
+
results.push(...nested);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
results.push(node_path_1.default.relative(base, fullPath).replace(/\\/g, "/"));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
if ((0, types_1.isNodeError)(error) && error.code === "ENOENT") {
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
return results.sort();
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Reads all metadata and instruction files from a plugin package directory.
|
|
73
|
+
*
|
|
74
|
+
* @param packageDir - Absolute path to the plugin package directory
|
|
75
|
+
*/
|
|
76
|
+
async function readPluginPackage(packageDir) {
|
|
77
|
+
// Read package.json or plugin.json for the name
|
|
78
|
+
let name = node_path_1.default.basename(packageDir);
|
|
79
|
+
try {
|
|
80
|
+
const pkgRaw = await node_fs_1.promises.readFile(node_path_1.default.join(packageDir, "package.json"), "utf8");
|
|
81
|
+
const pkg = JSON.parse(pkgRaw);
|
|
82
|
+
if (typeof pkg.name === "string") {
|
|
83
|
+
name = pkg.name;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
// No package.json is acceptable; use directory name
|
|
88
|
+
}
|
|
89
|
+
const [installInstructions, uninstallInstructions, configureInstructions, migrations, processFiles] = await Promise.all([
|
|
90
|
+
readInstallInstructions(packageDir),
|
|
91
|
+
readUninstallInstructions(packageDir),
|
|
92
|
+
readConfigureInstructions(packageDir),
|
|
93
|
+
listMigrations(packageDir),
|
|
94
|
+
collectFiles(node_path_1.default.join(packageDir, PROCESS_DIR), packageDir),
|
|
95
|
+
]);
|
|
96
|
+
return {
|
|
97
|
+
name,
|
|
98
|
+
installInstructions,
|
|
99
|
+
uninstallInstructions,
|
|
100
|
+
configureInstructions,
|
|
101
|
+
migrations,
|
|
102
|
+
processFiles,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Reads the install instructions markdown file from a plugin package.
|
|
107
|
+
*
|
|
108
|
+
* @param packageDir - Absolute path to the plugin package directory
|
|
109
|
+
*/
|
|
110
|
+
async function readInstallInstructions(packageDir) {
|
|
111
|
+
return readOptionalFile(node_path_1.default.join(packageDir, INSTALL_FILE));
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Reads the uninstall instructions markdown file from a plugin package.
|
|
115
|
+
*
|
|
116
|
+
* @param packageDir - Absolute path to the plugin package directory
|
|
117
|
+
*/
|
|
118
|
+
async function readUninstallInstructions(packageDir) {
|
|
119
|
+
return readOptionalFile(node_path_1.default.join(packageDir, UNINSTALL_FILE));
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Reads the configure instructions markdown file from a plugin package.
|
|
123
|
+
*
|
|
124
|
+
* @param packageDir - Absolute path to the plugin package directory
|
|
125
|
+
*/
|
|
126
|
+
async function readConfigureInstructions(packageDir) {
|
|
127
|
+
return readOptionalFile(node_path_1.default.join(packageDir, CONFIGURE_FILE));
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Lists all migration descriptors found in the migrations/ subdirectory.
|
|
131
|
+
* Filenames must follow the pattern: `<from>_to_<to>.<ext>`
|
|
132
|
+
*
|
|
133
|
+
* @param packageDir - Absolute path to the plugin package directory
|
|
134
|
+
*/
|
|
135
|
+
async function listMigrations(packageDir) {
|
|
136
|
+
return (0, migrations_1.listMigrations)(node_path_1.default.join(packageDir, MIGRATIONS_DIR));
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Reads the content of a specific migration file.
|
|
140
|
+
*
|
|
141
|
+
* @param packageDir - Absolute path to the plugin package directory
|
|
142
|
+
* @param from - Source version
|
|
143
|
+
* @param to - Target version
|
|
144
|
+
*/
|
|
145
|
+
async function readMigration(packageDir, from, to) {
|
|
146
|
+
const migrationsDir = node_path_1.default.join(packageDir, MIGRATIONS_DIR);
|
|
147
|
+
const descriptors = await (0, migrations_1.listMigrations)(migrationsDir);
|
|
148
|
+
const match = descriptors.find((d) => d.from === from && d.to === to);
|
|
149
|
+
if (!match) {
|
|
150
|
+
throw new Error(`Migration from "${from}" to "${to}" not found in ${migrationsDir}`);
|
|
151
|
+
}
|
|
152
|
+
return node_fs_1.promises.readFile(node_path_1.default.join(migrationsDir, match.file), "utf8");
|
|
153
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Path Resolution
|
|
3
|
+
*
|
|
4
|
+
* Helpers for resolving filesystem paths to plugin registries,
|
|
5
|
+
* marketplace directories, and related resources based on scope.
|
|
6
|
+
*/
|
|
7
|
+
import { PluginScope } from "./types";
|
|
8
|
+
/**
|
|
9
|
+
* Returns the full path to the plugin registry JSON file for the given scope.
|
|
10
|
+
*
|
|
11
|
+
* @param scope - Whether to use the global or project registry
|
|
12
|
+
* @param projectDir - Required when scope is 'project'
|
|
13
|
+
*/
|
|
14
|
+
export declare function getRegistryPath(scope: PluginScope, projectDir?: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Returns the directory where marketplace repositories are cloned for the given scope.
|
|
17
|
+
*
|
|
18
|
+
* @param scope - Whether to use the global or project marketplaces dir
|
|
19
|
+
* @param projectDir - Required when scope is 'project'
|
|
20
|
+
*/
|
|
21
|
+
export declare function getMarketplacesDir(scope: PluginScope, projectDir?: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Returns the directory for a specific marketplace clone.
|
|
24
|
+
*
|
|
25
|
+
* @param marketplaceName - Name (or derived name) of the marketplace
|
|
26
|
+
* @param scope - Whether to use the global or project marketplaces dir
|
|
27
|
+
* @param projectDir - Required when scope is 'project'
|
|
28
|
+
*/
|
|
29
|
+
export declare function getMarketplaceDir(marketplaceName: string, scope: PluginScope, projectDir?: string): string;
|
|
30
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/plugins/paths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,WAAW,EAA4B,MAAM,SAAS,CAAC;AA8BhE;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,WAAW,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAER;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,WAAW,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAER;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,eAAe,EAAE,MAAM,EACvB,KAAK,EAAE,WAAW,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAGR"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Plugin Path Resolution
|
|
4
|
+
*
|
|
5
|
+
* Helpers for resolving filesystem paths to plugin registries,
|
|
6
|
+
* marketplace directories, and related resources based on scope.
|
|
7
|
+
*/
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getRegistryPath = getRegistryPath;
|
|
13
|
+
exports.getMarketplacesDir = getMarketplacesDir;
|
|
14
|
+
exports.getMarketplaceDir = getMarketplaceDir;
|
|
15
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
16
|
+
const node_os_1 = require("node:os");
|
|
17
|
+
const types_1 = require("./types");
|
|
18
|
+
/**
|
|
19
|
+
* Base directory name for babysitter configuration.
|
|
20
|
+
*/
|
|
21
|
+
const BABYSITTER_DIR = ".a5c";
|
|
22
|
+
/**
|
|
23
|
+
* Subdirectory within the babysitter config dir for marketplace clones.
|
|
24
|
+
*/
|
|
25
|
+
const MARKETPLACES_SUBDIR = "marketplaces";
|
|
26
|
+
/**
|
|
27
|
+
* Returns the root babysitter configuration directory for the given scope.
|
|
28
|
+
*
|
|
29
|
+
* - `global` — `~/.a5c/`
|
|
30
|
+
* - `project` — `<projectDir>/.a5c/`
|
|
31
|
+
*/
|
|
32
|
+
function getBaseDir(scope, projectDir) {
|
|
33
|
+
if (scope === "global") {
|
|
34
|
+
return node_path_1.default.join((0, node_os_1.homedir)(), BABYSITTER_DIR);
|
|
35
|
+
}
|
|
36
|
+
if (!projectDir) {
|
|
37
|
+
throw new Error("projectDir is required when scope is 'project'");
|
|
38
|
+
}
|
|
39
|
+
return node_path_1.default.join(projectDir, BABYSITTER_DIR);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Returns the full path to the plugin registry JSON file for the given scope.
|
|
43
|
+
*
|
|
44
|
+
* @param scope - Whether to use the global or project registry
|
|
45
|
+
* @param projectDir - Required when scope is 'project'
|
|
46
|
+
*/
|
|
47
|
+
function getRegistryPath(scope, projectDir) {
|
|
48
|
+
return node_path_1.default.join(getBaseDir(scope, projectDir), types_1.PLUGIN_REGISTRY_FILENAME);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Returns the directory where marketplace repositories are cloned for the given scope.
|
|
52
|
+
*
|
|
53
|
+
* @param scope - Whether to use the global or project marketplaces dir
|
|
54
|
+
* @param projectDir - Required when scope is 'project'
|
|
55
|
+
*/
|
|
56
|
+
function getMarketplacesDir(scope, projectDir) {
|
|
57
|
+
return node_path_1.default.join(getBaseDir(scope, projectDir), MARKETPLACES_SUBDIR);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Returns the directory for a specific marketplace clone.
|
|
61
|
+
*
|
|
62
|
+
* @param marketplaceName - Name (or derived name) of the marketplace
|
|
63
|
+
* @param scope - Whether to use the global or project marketplaces dir
|
|
64
|
+
* @param projectDir - Required when scope is 'project'
|
|
65
|
+
*/
|
|
66
|
+
function getMarketplaceDir(marketplaceName, scope, projectDir) {
|
|
67
|
+
const dir = getMarketplacesDir(scope, projectDir);
|
|
68
|
+
return node_path_1.default.join(dir, marketplaceName);
|
|
69
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Registry CRUD
|
|
3
|
+
*
|
|
4
|
+
* Manages the plugin registry file using atomic writes for crash safety.
|
|
5
|
+
* The registry tracks all installed plugins, their versions, and metadata.
|
|
6
|
+
*/
|
|
7
|
+
import { PluginRegistry, PluginRegistryEntry, PluginScope } from "./types";
|
|
8
|
+
/**
|
|
9
|
+
* Reads the plugin registry from disk.
|
|
10
|
+
* Returns an empty registry if the file does not exist.
|
|
11
|
+
*
|
|
12
|
+
* @param scope - Whether to read the global or project registry
|
|
13
|
+
* @param projectDir - Required when scope is 'project'
|
|
14
|
+
*/
|
|
15
|
+
export declare function readPluginRegistry(scope: PluginScope, projectDir?: string): Promise<PluginRegistry>;
|
|
16
|
+
/**
|
|
17
|
+
* Writes the plugin registry to disk using an atomic write.
|
|
18
|
+
*
|
|
19
|
+
* @param registry - The full registry object to persist
|
|
20
|
+
* @param scope - Whether to write the global or project registry
|
|
21
|
+
* @param projectDir - Required when scope is 'project'
|
|
22
|
+
*/
|
|
23
|
+
export declare function writePluginRegistry(registry: PluginRegistry, scope: PluginScope, projectDir?: string): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Looks up a plugin entry by name in the registry.
|
|
26
|
+
* Returns undefined if the plugin is not registered.
|
|
27
|
+
*
|
|
28
|
+
* @param registry - The registry to search
|
|
29
|
+
* @param pluginName - The plugin identifier to look up
|
|
30
|
+
*/
|
|
31
|
+
export declare function getPluginEntry(registry: PluginRegistry, pluginName: string): PluginRegistryEntry | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Returns a new registry with the given entry inserted or updated.
|
|
34
|
+
* Sets the registry's updatedAt timestamp. Does not mutate the input.
|
|
35
|
+
*
|
|
36
|
+
* @param registry - The current registry
|
|
37
|
+
* @param entry - The plugin entry to insert or update
|
|
38
|
+
*/
|
|
39
|
+
export declare function upsertPluginEntry(registry: PluginRegistry, entry: PluginRegistryEntry): PluginRegistry;
|
|
40
|
+
/**
|
|
41
|
+
* Returns a new registry with the named plugin removed.
|
|
42
|
+
* Does not mutate the input. Throws if the plugin is not found.
|
|
43
|
+
*
|
|
44
|
+
* @param registry - The current registry
|
|
45
|
+
* @param pluginName - The plugin identifier to remove
|
|
46
|
+
*/
|
|
47
|
+
export declare function removePluginEntry(registry: PluginRegistry, pluginName: string): PluginRegistry;
|
|
48
|
+
/**
|
|
49
|
+
* Returns all plugin entries as a sorted array (sorted by name).
|
|
50
|
+
*
|
|
51
|
+
* @param registry - The registry to list
|
|
52
|
+
*/
|
|
53
|
+
export declare function listPluginEntries(registry: PluginRegistry): PluginRegistryEntry[];
|
|
54
|
+
//# sourceMappingURL=registry.d.ts.map
|