@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":"tasks.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/tasks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAqFpE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA0KzD"}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.registerTaskTools = registerTaskTools;
|
|
37
|
+
const path = __importStar(require("path"));
|
|
38
|
+
const zod_1 = require("zod");
|
|
39
|
+
const commitEffectResult_1 = require("../../runtime/commitEffectResult");
|
|
40
|
+
const storage_1 = require("../../storage");
|
|
41
|
+
const tasks_1 = require("../../storage/tasks");
|
|
42
|
+
const errors_1 = require("../util/errors");
|
|
43
|
+
const resolve_run_dir_1 = require("../util/resolve-run-dir");
|
|
44
|
+
/**
|
|
45
|
+
* Build a task list from journal events by tracking EFFECT_REQUESTED and
|
|
46
|
+
* EFFECT_RESOLVED events.
|
|
47
|
+
*/
|
|
48
|
+
function buildTaskList(events) {
|
|
49
|
+
const requested = new Map();
|
|
50
|
+
const resolved = new Map();
|
|
51
|
+
for (const event of events) {
|
|
52
|
+
if (event.type === "EFFECT_REQUESTED") {
|
|
53
|
+
const data = event.data;
|
|
54
|
+
if (data.effectId) {
|
|
55
|
+
requested.set(data.effectId, {
|
|
56
|
+
effectId: data.effectId,
|
|
57
|
+
kind: data.kind ?? "unknown",
|
|
58
|
+
label: data.label,
|
|
59
|
+
taskId: data.taskId,
|
|
60
|
+
requestedAt: event.recordedAt,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else if (event.type === "EFFECT_RESOLVED") {
|
|
65
|
+
const data = event.data;
|
|
66
|
+
if (data.effectId) {
|
|
67
|
+
resolved.set(data.effectId, { resolvedAt: event.recordedAt });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const tasks = [];
|
|
72
|
+
for (const [effectId, info] of requested) {
|
|
73
|
+
const resolvedInfo = resolved.get(effectId);
|
|
74
|
+
tasks.push({
|
|
75
|
+
effectId,
|
|
76
|
+
kind: info.kind,
|
|
77
|
+
status: resolvedInfo ? "resolved" : "pending",
|
|
78
|
+
label: info.label,
|
|
79
|
+
taskId: info.taskId,
|
|
80
|
+
requestedAt: info.requestedAt,
|
|
81
|
+
resolvedAt: resolvedInfo?.resolvedAt,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
return tasks.sort((a, b) => a.effectId.localeCompare(b.effectId));
|
|
85
|
+
}
|
|
86
|
+
function registerTaskTools(server) {
|
|
87
|
+
// ── task_post ───────────────────────────────────────────────────────
|
|
88
|
+
server.tool("task_post", "Post a result for a pending task effect", {
|
|
89
|
+
runId: zod_1.z.string().describe("The run ID the task belongs to"),
|
|
90
|
+
effectId: zod_1.z.string().describe("The effect ID of the task to resolve"),
|
|
91
|
+
status: zod_1.z
|
|
92
|
+
.enum(["ok", "error"])
|
|
93
|
+
.describe("Result status: ok for success, error for failure"),
|
|
94
|
+
value: zod_1.z
|
|
95
|
+
.string()
|
|
96
|
+
.optional()
|
|
97
|
+
.describe("JSON-encoded result value (when status=ok)"),
|
|
98
|
+
error: zod_1.z
|
|
99
|
+
.string()
|
|
100
|
+
.optional()
|
|
101
|
+
.describe("JSON-encoded error payload (when status=error)"),
|
|
102
|
+
runsDir: zod_1.z.string().optional().describe("Override runs directory path"),
|
|
103
|
+
}, async (args) => {
|
|
104
|
+
try {
|
|
105
|
+
const runsDir = (0, resolve_run_dir_1.resolveRunDir)(args.runsDir);
|
|
106
|
+
const runDir = path.join(runsDir, args.runId);
|
|
107
|
+
let value;
|
|
108
|
+
let errorPayload;
|
|
109
|
+
if (args.status === "ok" && args.value) {
|
|
110
|
+
try {
|
|
111
|
+
value = JSON.parse(args.value);
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
return (0, errors_1.toolError)("Invalid JSON in value parameter");
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (args.status === "error") {
|
|
118
|
+
if (args.error) {
|
|
119
|
+
try {
|
|
120
|
+
errorPayload = JSON.parse(args.error);
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
return (0, errors_1.toolError)("Invalid JSON in error parameter");
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
errorPayload = { name: "Error", message: "Task reported failure" };
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
const nowIso = new Date().toISOString();
|
|
131
|
+
const committed = await (0, commitEffectResult_1.commitEffectResult)({
|
|
132
|
+
runDir,
|
|
133
|
+
effectId: args.effectId,
|
|
134
|
+
result: args.status === "ok"
|
|
135
|
+
? {
|
|
136
|
+
status: "ok",
|
|
137
|
+
value,
|
|
138
|
+
startedAt: nowIso,
|
|
139
|
+
finishedAt: nowIso,
|
|
140
|
+
}
|
|
141
|
+
: {
|
|
142
|
+
status: "error",
|
|
143
|
+
error: errorPayload,
|
|
144
|
+
startedAt: nowIso,
|
|
145
|
+
finishedAt: nowIso,
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
return (0, errors_1.toolResult)({
|
|
149
|
+
status: args.status,
|
|
150
|
+
effectId: args.effectId,
|
|
151
|
+
resultRef: committed.resultRef ?? null,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
catch (err) {
|
|
155
|
+
return (0, errors_1.toolError)(err instanceof Error ? err.message : String(err));
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
// ── task_list ───────────────────────────────────────────────────────
|
|
159
|
+
server.tool("task_list", "List all tasks for a run, optionally showing only pending tasks", {
|
|
160
|
+
runId: zod_1.z.string().describe("The run ID to list tasks for"),
|
|
161
|
+
pendingOnly: zod_1.z
|
|
162
|
+
.boolean()
|
|
163
|
+
.optional()
|
|
164
|
+
.describe("If true, only show pending (unresolved) tasks"),
|
|
165
|
+
runsDir: zod_1.z.string().optional().describe("Override runs directory path"),
|
|
166
|
+
}, async (args) => {
|
|
167
|
+
try {
|
|
168
|
+
const runsDir = (0, resolve_run_dir_1.resolveRunDir)(args.runsDir);
|
|
169
|
+
const runDir = path.join(runsDir, args.runId);
|
|
170
|
+
const journal = await (0, storage_1.loadJournal)(runDir);
|
|
171
|
+
const allTasks = buildTaskList(journal);
|
|
172
|
+
const tasks = args.pendingOnly
|
|
173
|
+
? allTasks.filter((t) => t.status === "pending")
|
|
174
|
+
: allTasks;
|
|
175
|
+
return (0, errors_1.toolResult)({
|
|
176
|
+
total: allTasks.length,
|
|
177
|
+
showing: tasks.length,
|
|
178
|
+
pendingCount: allTasks.filter((t) => t.status === "pending").length,
|
|
179
|
+
tasks,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
catch (err) {
|
|
183
|
+
return (0, errors_1.toolError)(err instanceof Error ? err.message : String(err));
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
// ── task_show ───────────────────────────────────────────────────────
|
|
187
|
+
server.tool("task_show", "Show details of a specific task including its definition and result", {
|
|
188
|
+
runId: zod_1.z.string().describe("The run ID the task belongs to"),
|
|
189
|
+
effectId: zod_1.z.string().describe("The effect ID of the task"),
|
|
190
|
+
runsDir: zod_1.z.string().optional().describe("Override runs directory path"),
|
|
191
|
+
}, async (args) => {
|
|
192
|
+
try {
|
|
193
|
+
const runsDir = (0, resolve_run_dir_1.resolveRunDir)(args.runsDir);
|
|
194
|
+
const runDir = path.join(runsDir, args.runId);
|
|
195
|
+
// Get task status from journal
|
|
196
|
+
const journal = await (0, storage_1.loadJournal)(runDir);
|
|
197
|
+
const allTasks = buildTaskList(journal);
|
|
198
|
+
const taskEntry = allTasks.find((t) => t.effectId === args.effectId);
|
|
199
|
+
if (!taskEntry) {
|
|
200
|
+
return (0, errors_1.toolError)(`Effect ${args.effectId} not found in run ${args.runId}`);
|
|
201
|
+
}
|
|
202
|
+
// Read task definition
|
|
203
|
+
let taskDef = null;
|
|
204
|
+
try {
|
|
205
|
+
taskDef = await (0, tasks_1.readTaskDefinition)(runDir, args.effectId);
|
|
206
|
+
}
|
|
207
|
+
catch {
|
|
208
|
+
// Task definition might not exist yet
|
|
209
|
+
}
|
|
210
|
+
// Read task result if resolved
|
|
211
|
+
let taskResultData = null;
|
|
212
|
+
if (taskEntry.status === "resolved") {
|
|
213
|
+
try {
|
|
214
|
+
taskResultData = await (0, tasks_1.readTaskResult)(runDir, args.effectId);
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
// Result file might not be readable
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return (0, errors_1.toolResult)({
|
|
221
|
+
effect: taskEntry,
|
|
222
|
+
task: taskDef,
|
|
223
|
+
result: taskResultData,
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
catch (err) {
|
|
227
|
+
return (0, errors_1.toolError)(err instanceof Error ? err.message : String(err));
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mcp/transport/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function toolError(message: string): {
|
|
2
|
+
content: Array<{
|
|
3
|
+
type: "text";
|
|
4
|
+
text: string;
|
|
5
|
+
}>;
|
|
6
|
+
isError: true;
|
|
7
|
+
};
|
|
8
|
+
export declare function toolResult(data: unknown): {
|
|
9
|
+
content: Array<{
|
|
10
|
+
type: "text";
|
|
11
|
+
text: string;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/mcp/util/errors.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,EAAE,IAAI,CAAA;CAAE,CAE5G;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAE5F"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toolError = toolError;
|
|
4
|
+
exports.toolResult = toolResult;
|
|
5
|
+
function toolError(message) {
|
|
6
|
+
return { content: [{ type: "text", text: JSON.stringify({ error: message }) }], isError: true };
|
|
7
|
+
}
|
|
8
|
+
function toolResult(data) {
|
|
9
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-run-dir.d.ts","sourceRoot":"","sources":["../../../src/mcp/util/resolve-run-dir.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,aAAa,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveRunDir = resolveRunDir;
|
|
4
|
+
const config_1 = require("../../config");
|
|
5
|
+
/**
|
|
6
|
+
* Resolves the runs directory using the shared SDK policy.
|
|
7
|
+
* Accepts an optional override (e.g. from tool args or env).
|
|
8
|
+
*/
|
|
9
|
+
function resolveRunDir(overridePath) {
|
|
10
|
+
return (0, config_1.resolveRunsDir)({ override: overridePath });
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Management Module
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all public APIs for plugin registry management,
|
|
5
|
+
* marketplace operations, package reading, and migration resolution.
|
|
6
|
+
*/
|
|
7
|
+
export { PLUGIN_REGISTRY_SCHEMA_VERSION, PLUGIN_REGISTRY_FILENAME, MARKETPLACE_MANIFEST_FILENAME, MANIFEST_PATH_FILENAME, } from "./types";
|
|
8
|
+
export type { PluginScope, PluginRegistryEntry, PluginRegistry, MarketplaceManifest, MarketplacePluginEntry, MigrationDescriptor, PluginPackageInfo, } from "./types";
|
|
9
|
+
export { getRegistryPath, getMarketplacesDir, getMarketplaceDir, } from "./paths";
|
|
10
|
+
export { readPluginRegistry, writePluginRegistry, getPluginEntry, upsertPluginEntry, removePluginEntry, listPluginEntries, } from "./registry";
|
|
11
|
+
export { cloneMarketplace, updateMarketplace, readMarketplaceManifest, listMarketplacePlugins, resolvePluginPackagePath, deriveMarketplaceName, listMarketplaces, } from "./marketplace";
|
|
12
|
+
export { readPluginPackage, readInstallInstructions, readUninstallInstructions, readConfigureInstructions, listMigrations, readMigration, } from "./packageReader";
|
|
13
|
+
export { parseMigrationFilename, buildMigrationGraph, findMigrationPath, resolveMigrationChain, } from "./migrations";
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,EACxB,6BAA6B,EAC7B,sBAAsB,GACvB,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,cAAc,EACd,aAAa,GACd,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Plugin Management Module
|
|
4
|
+
*
|
|
5
|
+
* Re-exports all public APIs for plugin registry management,
|
|
6
|
+
* marketplace operations, package reading, and migration resolution.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.resolveMigrationChain = exports.findMigrationPath = exports.buildMigrationGraph = exports.parseMigrationFilename = exports.readMigration = exports.listMigrations = exports.readConfigureInstructions = exports.readUninstallInstructions = exports.readInstallInstructions = exports.readPluginPackage = exports.listMarketplaces = exports.deriveMarketplaceName = exports.resolvePluginPackagePath = exports.listMarketplacePlugins = exports.readMarketplaceManifest = exports.updateMarketplace = exports.cloneMarketplace = exports.listPluginEntries = exports.removePluginEntry = exports.upsertPluginEntry = exports.getPluginEntry = exports.writePluginRegistry = exports.readPluginRegistry = exports.getMarketplaceDir = exports.getMarketplacesDir = exports.getRegistryPath = exports.MANIFEST_PATH_FILENAME = exports.MARKETPLACE_MANIFEST_FILENAME = exports.PLUGIN_REGISTRY_FILENAME = exports.PLUGIN_REGISTRY_SCHEMA_VERSION = void 0;
|
|
10
|
+
// Types
|
|
11
|
+
var types_1 = require("./types");
|
|
12
|
+
Object.defineProperty(exports, "PLUGIN_REGISTRY_SCHEMA_VERSION", { enumerable: true, get: function () { return types_1.PLUGIN_REGISTRY_SCHEMA_VERSION; } });
|
|
13
|
+
Object.defineProperty(exports, "PLUGIN_REGISTRY_FILENAME", { enumerable: true, get: function () { return types_1.PLUGIN_REGISTRY_FILENAME; } });
|
|
14
|
+
Object.defineProperty(exports, "MARKETPLACE_MANIFEST_FILENAME", { enumerable: true, get: function () { return types_1.MARKETPLACE_MANIFEST_FILENAME; } });
|
|
15
|
+
Object.defineProperty(exports, "MANIFEST_PATH_FILENAME", { enumerable: true, get: function () { return types_1.MANIFEST_PATH_FILENAME; } });
|
|
16
|
+
// Path resolution
|
|
17
|
+
var paths_1 = require("./paths");
|
|
18
|
+
Object.defineProperty(exports, "getRegistryPath", { enumerable: true, get: function () { return paths_1.getRegistryPath; } });
|
|
19
|
+
Object.defineProperty(exports, "getMarketplacesDir", { enumerable: true, get: function () { return paths_1.getMarketplacesDir; } });
|
|
20
|
+
Object.defineProperty(exports, "getMarketplaceDir", { enumerable: true, get: function () { return paths_1.getMarketplaceDir; } });
|
|
21
|
+
// Registry CRUD
|
|
22
|
+
var registry_1 = require("./registry");
|
|
23
|
+
Object.defineProperty(exports, "readPluginRegistry", { enumerable: true, get: function () { return registry_1.readPluginRegistry; } });
|
|
24
|
+
Object.defineProperty(exports, "writePluginRegistry", { enumerable: true, get: function () { return registry_1.writePluginRegistry; } });
|
|
25
|
+
Object.defineProperty(exports, "getPluginEntry", { enumerable: true, get: function () { return registry_1.getPluginEntry; } });
|
|
26
|
+
Object.defineProperty(exports, "upsertPluginEntry", { enumerable: true, get: function () { return registry_1.upsertPluginEntry; } });
|
|
27
|
+
Object.defineProperty(exports, "removePluginEntry", { enumerable: true, get: function () { return registry_1.removePluginEntry; } });
|
|
28
|
+
Object.defineProperty(exports, "listPluginEntries", { enumerable: true, get: function () { return registry_1.listPluginEntries; } });
|
|
29
|
+
// Marketplace management
|
|
30
|
+
var marketplace_1 = require("./marketplace");
|
|
31
|
+
Object.defineProperty(exports, "cloneMarketplace", { enumerable: true, get: function () { return marketplace_1.cloneMarketplace; } });
|
|
32
|
+
Object.defineProperty(exports, "updateMarketplace", { enumerable: true, get: function () { return marketplace_1.updateMarketplace; } });
|
|
33
|
+
Object.defineProperty(exports, "readMarketplaceManifest", { enumerable: true, get: function () { return marketplace_1.readMarketplaceManifest; } });
|
|
34
|
+
Object.defineProperty(exports, "listMarketplacePlugins", { enumerable: true, get: function () { return marketplace_1.listMarketplacePlugins; } });
|
|
35
|
+
Object.defineProperty(exports, "resolvePluginPackagePath", { enumerable: true, get: function () { return marketplace_1.resolvePluginPackagePath; } });
|
|
36
|
+
Object.defineProperty(exports, "deriveMarketplaceName", { enumerable: true, get: function () { return marketplace_1.deriveMarketplaceName; } });
|
|
37
|
+
Object.defineProperty(exports, "listMarketplaces", { enumerable: true, get: function () { return marketplace_1.listMarketplaces; } });
|
|
38
|
+
// Package reading
|
|
39
|
+
var packageReader_1 = require("./packageReader");
|
|
40
|
+
Object.defineProperty(exports, "readPluginPackage", { enumerable: true, get: function () { return packageReader_1.readPluginPackage; } });
|
|
41
|
+
Object.defineProperty(exports, "readInstallInstructions", { enumerable: true, get: function () { return packageReader_1.readInstallInstructions; } });
|
|
42
|
+
Object.defineProperty(exports, "readUninstallInstructions", { enumerable: true, get: function () { return packageReader_1.readUninstallInstructions; } });
|
|
43
|
+
Object.defineProperty(exports, "readConfigureInstructions", { enumerable: true, get: function () { return packageReader_1.readConfigureInstructions; } });
|
|
44
|
+
Object.defineProperty(exports, "listMigrations", { enumerable: true, get: function () { return packageReader_1.listMigrations; } });
|
|
45
|
+
Object.defineProperty(exports, "readMigration", { enumerable: true, get: function () { return packageReader_1.readMigration; } });
|
|
46
|
+
// Migration resolution
|
|
47
|
+
var migrations_1 = require("./migrations");
|
|
48
|
+
Object.defineProperty(exports, "parseMigrationFilename", { enumerable: true, get: function () { return migrations_1.parseMigrationFilename; } });
|
|
49
|
+
Object.defineProperty(exports, "buildMigrationGraph", { enumerable: true, get: function () { return migrations_1.buildMigrationGraph; } });
|
|
50
|
+
Object.defineProperty(exports, "findMigrationPath", { enumerable: true, get: function () { return migrations_1.findMigrationPath; } });
|
|
51
|
+
Object.defineProperty(exports, "resolveMigrationChain", { enumerable: true, get: function () { return migrations_1.resolveMigrationChain; } });
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marketplace Management
|
|
3
|
+
*
|
|
4
|
+
* Manages marketplace repositories (clone, update, read manifests)
|
|
5
|
+
* using git operations executed via child_process.execFile.
|
|
6
|
+
*/
|
|
7
|
+
import { MarketplaceManifest, MarketplacePluginEntry, PluginScope } from "./types";
|
|
8
|
+
/**
|
|
9
|
+
* Derives a short marketplace name from a git URL.
|
|
10
|
+
*/
|
|
11
|
+
export declare function deriveMarketplaceName(url: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Clones a marketplace repository with --depth 1 for minimal footprint.
|
|
14
|
+
*/
|
|
15
|
+
export declare function cloneMarketplace(url: string, scope: PluginScope, projectDir?: string, manifestPath?: string, branch?: string, force?: boolean): Promise<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Updates a previously cloned marketplace by pulling latest changes.
|
|
18
|
+
*/
|
|
19
|
+
export declare function updateMarketplace(marketplaceName: string, scope: PluginScope, projectDir?: string, branch?: string): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Reads and parses the marketplace manifest from a cloned marketplace.
|
|
22
|
+
*/
|
|
23
|
+
export declare function readMarketplaceManifest(marketplaceName: string, scope: PluginScope, projectDir?: string): Promise<MarketplaceManifest>;
|
|
24
|
+
/**
|
|
25
|
+
* Lists all plugins available in a marketplace manifest.
|
|
26
|
+
*/
|
|
27
|
+
export declare function listMarketplacePlugins(marketplaceName: string, scope: PluginScope, projectDir?: string): Promise<MarketplacePluginEntry[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Resolves the full filesystem path to a plugin's package directory.
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolvePluginPackagePath(marketplaceName: string, pluginName: string, scope: PluginScope, projectDir?: string): Promise<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Lists all cloned marketplace directories for the given scope.
|
|
34
|
+
*/
|
|
35
|
+
export declare function listMarketplaces(scope: PluginScope, projectDir?: string): Promise<string[]>;
|
|
36
|
+
//# sourceMappingURL=marketplace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../src/plugins/marketplace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,WAAW,EAGZ,MAAM,SAAS,CAAC;AAKjB;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQzD;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,WAAW,EAClB,UAAU,CAAC,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,MAAM,EACrB,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,OAAO,GACd,OAAO,CAAC,MAAM,CAAC,CAyCjB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,eAAe,EAAE,MAAM,EACvB,KAAK,EAAE,WAAW,EAClB,UAAU,CAAC,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAsBf;AAkBD;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,eAAe,EAAE,MAAM,EACvB,KAAK,EAAE,WAAW,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,mBAAmB,CAAC,CAG9B;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,eAAe,EAAE,MAAM,EACvB,KAAK,EAAE,WAAW,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAGnC;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,WAAW,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAQjB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,WAAW,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,EAAE,CAAC,CASnB"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Marketplace Management
|
|
4
|
+
*
|
|
5
|
+
* Manages marketplace repositories (clone, update, read manifests)
|
|
6
|
+
* using git operations executed via child_process.execFile.
|
|
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.deriveMarketplaceName = deriveMarketplaceName;
|
|
13
|
+
exports.cloneMarketplace = cloneMarketplace;
|
|
14
|
+
exports.updateMarketplace = updateMarketplace;
|
|
15
|
+
exports.readMarketplaceManifest = readMarketplaceManifest;
|
|
16
|
+
exports.listMarketplacePlugins = listMarketplacePlugins;
|
|
17
|
+
exports.resolvePluginPackagePath = resolvePluginPackagePath;
|
|
18
|
+
exports.listMarketplaces = listMarketplaces;
|
|
19
|
+
const node_fs_1 = require("node:fs");
|
|
20
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
21
|
+
const node_child_process_1 = require("node:child_process");
|
|
22
|
+
const node_util_1 = require("node:util");
|
|
23
|
+
const paths_1 = require("./paths");
|
|
24
|
+
const types_1 = require("./types");
|
|
25
|
+
const marketplaceHelpers_1 = require("./marketplaceHelpers");
|
|
26
|
+
const execFile = (0, node_util_1.promisify)(node_child_process_1.execFile);
|
|
27
|
+
/**
|
|
28
|
+
* Derives a short marketplace name from a git URL.
|
|
29
|
+
*/
|
|
30
|
+
function deriveMarketplaceName(url) {
|
|
31
|
+
const cleaned = url.replace(/\.git\s*$/, "").replace(/\/+$/, "");
|
|
32
|
+
const lastSegment = cleaned.split("/").pop() ?? "";
|
|
33
|
+
const afterColon = lastSegment.split(":").pop() ?? lastSegment;
|
|
34
|
+
if (!afterColon) {
|
|
35
|
+
throw new Error(`Unable to derive marketplace name from URL: ${url}`);
|
|
36
|
+
}
|
|
37
|
+
return afterColon;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Clones a marketplace repository with --depth 1 for minimal footprint.
|
|
41
|
+
*/
|
|
42
|
+
async function cloneMarketplace(url, scope, projectDir, manifestPath, branch, force) {
|
|
43
|
+
const name = deriveMarketplaceName(url);
|
|
44
|
+
const marketplacesDir = (0, paths_1.getMarketplacesDir)(scope, projectDir);
|
|
45
|
+
const targetDir = node_path_1.default.join(marketplacesDir, name);
|
|
46
|
+
await node_fs_1.promises.mkdir(marketplacesDir, { recursive: true });
|
|
47
|
+
try {
|
|
48
|
+
await node_fs_1.promises.access(targetDir);
|
|
49
|
+
if (force) {
|
|
50
|
+
await node_fs_1.promises.rm(targetDir, { recursive: true, force: true });
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
throw new Error(`Marketplace "${name}" already exists at ${targetDir}. Use --force to replace or plugin:update-marketplace to refresh.`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
if (!(0, types_1.isNodeError)(error) || error.code !== "ENOENT") {
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
try {
|
|
62
|
+
const cloneArgs = ["clone", "--depth", "1"];
|
|
63
|
+
if (branch) {
|
|
64
|
+
cloneArgs.push("--branch", branch);
|
|
65
|
+
}
|
|
66
|
+
cloneArgs.push(url, targetDir);
|
|
67
|
+
await execFile("git", cloneArgs);
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
71
|
+
throw new Error(`Failed to clone marketplace from ${url}: ${message}`);
|
|
72
|
+
}
|
|
73
|
+
if (manifestPath) {
|
|
74
|
+
await node_fs_1.promises.writeFile(node_path_1.default.join(targetDir, types_1.MANIFEST_PATH_FILENAME), manifestPath.replace(/\\/g, "/"), "utf8");
|
|
75
|
+
}
|
|
76
|
+
return targetDir;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Updates a previously cloned marketplace by pulling latest changes.
|
|
80
|
+
*/
|
|
81
|
+
async function updateMarketplace(marketplaceName, scope, projectDir, branch) {
|
|
82
|
+
const dir = (0, paths_1.getMarketplaceDir)(marketplaceName, scope, projectDir);
|
|
83
|
+
try {
|
|
84
|
+
await node_fs_1.promises.access(dir);
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
throw new Error(`Marketplace "${marketplaceName}" not found at ${dir}. Clone it first.`);
|
|
88
|
+
}
|
|
89
|
+
try {
|
|
90
|
+
if (branch) {
|
|
91
|
+
await execFile("git", ["-C", dir, "fetch", "--depth", "1", "origin", branch]);
|
|
92
|
+
try {
|
|
93
|
+
await execFile("git", ["-C", dir, "checkout", branch]);
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
try {
|
|
97
|
+
await execFile("git", ["-C", dir, "stash"]);
|
|
98
|
+
}
|
|
99
|
+
catch { /* Nothing to stash */ }
|
|
100
|
+
await execFile("git", ["-C", dir, "checkout", "-B", branch, "FETCH_HEAD"]);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
await execFile("git", ["-C", dir, "pull", "--ff-only"]);
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
107
|
+
throw new Error(`Failed to update marketplace "${marketplaceName}": ${message}`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Internal helper that reads the manifest and returns both the parsed
|
|
112
|
+
* manifest and the resolved manifest file path.
|
|
113
|
+
*/
|
|
114
|
+
async function readManifestWithPath(marketplaceName, scope, projectDir) {
|
|
115
|
+
const dir = (0, paths_1.getMarketplaceDir)(marketplaceName, scope, projectDir);
|
|
116
|
+
const manifestPath = await (0, marketplaceHelpers_1.resolveManifestPath)(dir);
|
|
117
|
+
const raw = await node_fs_1.promises.readFile(manifestPath, "utf8");
|
|
118
|
+
const manifest = (0, marketplaceHelpers_1.normalizeManifest)(JSON.parse(raw));
|
|
119
|
+
return { manifest, manifestPath };
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Reads and parses the marketplace manifest from a cloned marketplace.
|
|
123
|
+
*/
|
|
124
|
+
async function readMarketplaceManifest(marketplaceName, scope, projectDir) {
|
|
125
|
+
const { manifest } = await readManifestWithPath(marketplaceName, scope, projectDir);
|
|
126
|
+
return manifest;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Lists all plugins available in a marketplace manifest.
|
|
130
|
+
*/
|
|
131
|
+
async function listMarketplacePlugins(marketplaceName, scope, projectDir) {
|
|
132
|
+
const manifest = await readMarketplaceManifest(marketplaceName, scope, projectDir);
|
|
133
|
+
return Object.values(manifest.plugins).sort((a, b) => a.name.localeCompare(b.name));
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Resolves the full filesystem path to a plugin's package directory.
|
|
137
|
+
*/
|
|
138
|
+
async function resolvePluginPackagePath(marketplaceName, pluginName, scope, projectDir) {
|
|
139
|
+
const { manifest, manifestPath } = await readManifestWithPath(marketplaceName, scope, projectDir);
|
|
140
|
+
const entry = manifest.plugins[pluginName];
|
|
141
|
+
if (!entry) {
|
|
142
|
+
throw new Error(`Plugin "${pluginName}" not found in marketplace "${marketplaceName}"`);
|
|
143
|
+
}
|
|
144
|
+
const manifestDir = node_path_1.default.dirname(manifestPath);
|
|
145
|
+
return node_path_1.default.join(manifestDir, entry.packagePath);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Lists all cloned marketplace directories for the given scope.
|
|
149
|
+
*/
|
|
150
|
+
async function listMarketplaces(scope, projectDir) {
|
|
151
|
+
const dir = (0, paths_1.getMarketplacesDir)(scope, projectDir);
|
|
152
|
+
try {
|
|
153
|
+
const entries = await node_fs_1.promises.readdir(dir, { withFileTypes: true });
|
|
154
|
+
return entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort();
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
if ((0, types_1.isNodeError)(error) && error.code === "ENOENT") {
|
|
158
|
+
return [];
|
|
159
|
+
}
|
|
160
|
+
throw error;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Marketplace manifest normalization helpers.
|
|
3
|
+
* Extracted from marketplace.ts for max-lines compliance.
|
|
4
|
+
*/
|
|
5
|
+
import type { MarketplaceManifest } from "./types";
|
|
6
|
+
/**
|
|
7
|
+
* Resolves the marketplace manifest path within a cloned marketplace directory.
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveManifestPath(dir: string): Promise<string>;
|
|
10
|
+
/**
|
|
11
|
+
* Normalizes a marketplace manifest that may use the legacy array format
|
|
12
|
+
* (with `source` field) into the standard Record format (with `packagePath`).
|
|
13
|
+
*/
|
|
14
|
+
export declare function normalizeManifest(raw: Record<string, unknown>): MarketplaceManifest;
|
|
15
|
+
//# sourceMappingURL=marketplaceHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplaceHelpers.d.ts","sourceRoot":"","sources":["../../src/plugins/marketplaceHelpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,SAAS,CAAC;AAMjB;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsCtE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,mBAAmB,CAoEnF"}
|