@a5c-ai/babysitter-sdk 5.0.1-staging.f6432257 → 5.0.1-staging.ff2c19f9
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.map +1 -1
- package/dist/breakpoints/evaluator.js +31 -3
- package/dist/breakpoints/index.d.ts +2 -5
- package/dist/breakpoints/index.d.ts.map +1 -1
- package/dist/breakpoints/index.js +4 -20
- 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/cli/commands/compressOutput.d.ts.map +1 -1
- package/dist/cli/commands/compressOutput.js +9 -345
- 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 +351 -0
- package/dist/cli/commands/harness/install.d.ts +11 -1
- package/dist/cli/commands/harness/install.d.ts.map +1 -1
- package/dist/cli/commands/harness/install.js +18 -30
- 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 +267 -0
- package/dist/cli/commands/health.d.ts +0 -15
- package/dist/cli/commands/health.d.ts.map +1 -1
- package/dist/cli/commands/health.js +5 -300
- package/dist/cli/commands/instructions.js +1 -1
- package/dist/cli/commands/mcpServe.d.ts +2 -9
- package/dist/cli/commands/mcpServe.d.ts.map +1 -1
- package/dist/cli/commands/mcpServe.js +5 -29
- package/dist/cli/commands/runIterate.d.ts.map +1 -1
- package/dist/cli/commands/runIterate.js +5 -179
- 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/skill/discoveryLocal.d.ts +1 -1
- package/dist/cli/commands/skill/discoveryLocal.d.ts.map +1 -1
- package/dist/cli/commands/skill.d.ts +1 -1
- package/dist/cli/commands/skill.d.ts.map +1 -1
- package/dist/cli/commands/skill.js +12 -12
- package/dist/cli/commands/tokensStats.d.ts.map +1 -1
- package/dist/cli/commands/tokensStats.js +4 -129
- 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/main/argFlagParsers.d.ts +9 -0
- package/dist/cli/main/argFlagParsers.d.ts.map +1 -0
- package/dist/cli/main/argFlagParsers.js +345 -0
- package/dist/cli/main/argFlags.d.ts +1 -3
- package/dist/cli/main/argFlags.d.ts.map +1 -1
- package/dist/cli/main/argFlags.js +3 -343
- package/dist/cli/main/dispatchHarness.js +1 -1
- package/dist/cli/main/program.js +1 -1
- package/dist/cli/main/usage.d.ts.map +1 -1
- package/dist/cli/main/usage.js +5 -8
- package/dist/config/configValidation.d.ts +22 -0
- package/dist/config/configValidation.d.ts.map +1 -0
- package/dist/config/configValidation.js +139 -0
- package/dist/config/defaults.d.ts +1 -126
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +7 -257
- package/dist/cost/index.d.ts +0 -1
- package/dist/cost/index.d.ts.map +1 -1
- package/dist/cost/index.js +2 -3
- 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 +2 -79
- package/dist/cost/types.d.ts.map +1 -1
- package/dist/cost/types.js +8 -220
- 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 +63 -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 +12 -0
- package/dist/harness/adapters/cursor.d.ts.map +1 -0
- package/dist/harness/adapters/cursor.js +51 -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 +168 -0
- package/dist/harness/amuxMetadata.d.ts +51 -0
- package/dist/harness/amuxMetadata.d.ts.map +1 -0
- package/dist/harness/amuxMetadata.js +175 -0
- package/dist/harness/customAdapter.js +1 -1
- 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.map +1 -1
- package/dist/harness/discovery.js +15 -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 +19 -0
- package/dist/harness/hooks/promptContexts.d.ts.map +1 -0
- package/dist/harness/hooks/promptContexts.js +183 -0
- package/dist/harness/hooks/runState.d.ts.map +1 -1
- package/dist/harness/hooks/runState.js +1 -5
- 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 +148 -0
- package/dist/harness/{claudeCode/stopHookState.d.ts → hooks/stopHookContinuation.d.ts} +8 -2
- package/dist/harness/hooks/stopHookContinuation.d.ts.map +1 -0
- package/dist/harness/{claudeCode/stopHookState.js → hooks/stopHookContinuation.js} +14 -5
- 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 +370 -0
- package/dist/harness/hooks/utils.d.ts +29 -0
- package/dist/harness/hooks/utils.d.ts.map +1 -1
- package/dist/harness/hooks/utils.js +90 -0
- package/dist/harness/index.d.ts +12 -9
- package/dist/harness/index.d.ts.map +1 -1
- package/dist/harness/index.js +19 -14
- package/dist/harness/install.d.ts +74 -0
- package/dist/harness/install.d.ts.map +1 -0
- package/dist/harness/install.js +136 -0
- package/dist/harness/internal/promptContext.js +1 -1
- package/dist/harness/registry.d.ts +11 -2
- package/dist/harness/registry.d.ts.map +1 -1
- package/dist/harness/registry.js +110 -53
- package/dist/harness/types.d.ts +12 -2
- package/dist/harness/types.d.ts.map +1 -1
- package/dist/harness/unified/adapter.d.ts +5 -5
- package/dist/harness/unified/adapter.d.ts.map +1 -1
- package/dist/harness/unified/adapter.js +57 -26
- package/dist/harness/unified/capabilities.d.ts +5 -5
- package/dist/harness/unified/capabilities.js +7 -7
- package/dist/harness/unified/discovery.d.ts +1 -1
- package/dist/harness/unified/discovery.js +2 -2
- package/dist/harness/unified/promptContext.d.ts +1 -1
- package/dist/harness/unified/promptContext.js +2 -2
- package/dist/harness/unified/subprocess.d.ts +5 -5
- package/dist/harness/unified/subprocess.js +7 -7
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/mcp/index.d.ts +0 -4
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +4 -9
- package/dist/mcp/tools/discovery.d.ts.map +1 -1
- package/dist/mcp/tools/discovery.js +3 -2
- package/dist/mcp/transport/index.d.ts +0 -4
- package/dist/mcp/transport/index.d.ts.map +1 -1
- package/dist/mcp/transport/index.js +1 -8
- package/dist/plugins/marketplace.d.ts +1 -47
- package/dist/plugins/marketplace.d.ts.map +1 -1
- package/dist/plugins/marketplace.js +6 -186
- 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/processLibrary/active.d.ts +2 -83
- package/dist/processLibrary/active.d.ts.map +1 -1
- package/dist/processLibrary/active.js +65 -167
- 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/prompts/context.d.ts +1 -9
- package/dist/prompts/context.d.ts.map +1 -1
- package/dist/prompts/context.js +12 -20
- package/dist/prompts/parts/criticalRules.js +1 -1
- package/dist/prompts/parts/runCreation.d.ts.map +1 -1
- package/dist/prompts/parts/runCreation.js +2 -12
- package/dist/prompts/templates/commands/doctor.md +5 -5
- package/dist/prompts/templates/critical-rules.md +2 -2
- package/dist/prompts/templates/process-guidelines.md +1 -1
- package/dist/prompts/templates/quick-reference.md +1 -1
- package/dist/prompts/types.d.ts +1 -1
- 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/exceptions.d.ts +3 -152
- package/dist/runtime/exceptions.d.ts.map +1 -1
- package/dist/runtime/exceptions.js +22 -220
- package/dist/runtime/intrinsics/task.d.ts +3 -3
- package/dist/runtime/intrinsics/task.d.ts.map +1 -1
- package/dist/runtime/intrinsics/task.js +31 -260
- 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/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 +2 -7
- package/dist/runtime/orchestrateIteration.d.ts.map +1 -1
- package/dist/runtime/orchestrateIteration.js +38 -265
- package/dist/session/discovery.d.ts +4 -1
- package/dist/session/discovery.d.ts.map +1 -1
- package/dist/session/discovery.js +13 -18
- package/dist/session/whoami.js +2 -2
- package/dist/tasks/kinds/index.d.ts +1 -1
- package/dist/tasks/kinds/index.d.ts.map +1 -1
- package/dist/tasks/kinds/index.js +58 -237
- 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/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/sessionMarker.d.ts +3 -7
- package/dist/utils/sessionMarker.d.ts.map +1 -1
- package/dist/utils/sessionMarker.js +32 -216
- package/package.json +10 -1
- package/dist/breakpoints/approvalChains.d.ts +0 -66
- package/dist/breakpoints/approvalChains.d.ts.map +0 -1
- package/dist/breakpoints/approvalChains.js +0 -109
- package/dist/breakpoints/delegation.d.ts +0 -40
- package/dist/breakpoints/delegation.d.ts.map +0 -1
- package/dist/breakpoints/delegation.js +0 -197
- package/dist/breakpoints/delegationTypes.d.ts +0 -44
- package/dist/breakpoints/delegationTypes.d.ts.map +0 -1
- package/dist/breakpoints/delegationTypes.js +0 -8
- package/dist/breakpoints/postures.d.ts +0 -26
- package/dist/breakpoints/postures.d.ts.map +0 -1
- package/dist/breakpoints/postures.js +0 -98
- package/dist/cli/commandRegistry.d.ts +0 -27
- package/dist/cli/commandRegistry.d.ts.map +0 -1
- package/dist/cli/commandRegistry.js +0 -121
- package/dist/compression/compaction.d.ts +0 -80
- package/dist/compression/compaction.d.ts.map +0 -1
- package/dist/compression/compaction.js +0 -308
- package/dist/cost/effectCost.d.ts +0 -21
- package/dist/cost/effectCost.d.ts.map +0 -1
- package/dist/cost/effectCost.js +0 -26
- package/dist/harness/claudeCode/adapter.d.ts +0 -5
- package/dist/harness/claudeCode/adapter.d.ts.map +0 -1
- package/dist/harness/claudeCode/adapter.js +0 -101
- package/dist/harness/claudeCode/discovery.d.ts +0 -3
- package/dist/harness/claudeCode/discovery.d.ts.map +0 -1
- package/dist/harness/claudeCode/discovery.js +0 -11
- package/dist/harness/claudeCode/index.d.ts +0 -3
- package/dist/harness/claudeCode/index.d.ts.map +0 -1
- package/dist/harness/claudeCode/index.js +0 -9
- package/dist/harness/claudeCode/lifecycle.d.ts +0 -5
- package/dist/harness/claudeCode/lifecycle.d.ts.map +0 -1
- package/dist/harness/claudeCode/lifecycle.js +0 -204
- package/dist/harness/claudeCode/promptContext.d.ts +0 -3
- package/dist/harness/claudeCode/promptContext.d.ts.map +0 -1
- package/dist/harness/claudeCode/promptContext.js +0 -23
- package/dist/harness/claudeCode/sessionStart.d.ts +0 -3
- package/dist/harness/claudeCode/sessionStart.d.ts.map +0 -1
- package/dist/harness/claudeCode/sessionStart.js +0 -179
- package/dist/harness/claudeCode/shared.d.ts +0 -43
- package/dist/harness/claudeCode/shared.d.ts.map +0 -1
- package/dist/harness/claudeCode/shared.js +0 -268
- package/dist/harness/claudeCode/stopHook.d.ts +0 -3
- package/dist/harness/claudeCode/stopHook.d.ts.map +0 -1
- package/dist/harness/claudeCode/stopHook.js +0 -303
- package/dist/harness/claudeCode/stopHookState.d.ts.map +0 -1
- package/dist/harness/codex/adapter.d.ts +0 -3
- package/dist/harness/codex/adapter.d.ts.map +0 -1
- package/dist/harness/codex/adapter.js +0 -73
- package/dist/harness/codex/discovery.d.ts +0 -3
- package/dist/harness/codex/discovery.d.ts.map +0 -1
- package/dist/harness/codex/discovery.js +0 -11
- package/dist/harness/codex/hooks.d.ts +0 -4
- package/dist/harness/codex/hooks.d.ts.map +0 -1
- package/dist/harness/codex/hooks.js +0 -85
- package/dist/harness/codex/index.d.ts +0 -2
- package/dist/harness/codex/index.d.ts.map +0 -1
- package/dist/harness/codex/index.js +0 -5
- package/dist/harness/codex/install.d.ts +0 -4
- package/dist/harness/codex/install.d.ts.map +0 -1
- package/dist/harness/codex/install.js +0 -103
- package/dist/harness/codex/promptContext.d.ts +0 -3
- package/dist/harness/codex/promptContext.d.ts.map +0 -1
- package/dist/harness/codex/promptContext.js +0 -22
- package/dist/harness/codex/shared.d.ts +0 -15
- package/dist/harness/codex/shared.d.ts.map +0 -1
- package/dist/harness/codex/shared.js +0 -149
- package/dist/harness/cursor/adapter.d.ts +0 -3
- package/dist/harness/cursor/adapter.d.ts.map +0 -1
- package/dist/harness/cursor/adapter.js +0 -233
- package/dist/harness/cursor/discovery.d.ts +0 -3
- package/dist/harness/cursor/discovery.d.ts.map +0 -1
- package/dist/harness/cursor/discovery.js +0 -11
- package/dist/harness/cursor/hooks.d.ts +0 -8
- package/dist/harness/cursor/hooks.d.ts.map +0 -1
- package/dist/harness/cursor/hooks.js +0 -362
- package/dist/harness/cursor/index.d.ts +0 -2
- package/dist/harness/cursor/index.d.ts.map +0 -1
- package/dist/harness/cursor/index.js +0 -5
- package/dist/harness/cursor/promptContext.d.ts +0 -3
- package/dist/harness/cursor/promptContext.d.ts.map +0 -1
- package/dist/harness/cursor/promptContext.js +0 -22
- package/dist/harness/geminiCli/adapter.d.ts +0 -3
- package/dist/harness/geminiCli/adapter.d.ts.map +0 -1
- package/dist/harness/geminiCli/adapter.js +0 -190
- package/dist/harness/geminiCli/discovery.d.ts +0 -3
- package/dist/harness/geminiCli/discovery.d.ts.map +0 -1
- package/dist/harness/geminiCli/discovery.js +0 -11
- package/dist/harness/geminiCli/hooks.d.ts +0 -9
- package/dist/harness/geminiCli/hooks.d.ts.map +0 -1
- package/dist/harness/geminiCli/hooks.js +0 -401
- package/dist/harness/geminiCli/index.d.ts +0 -2
- package/dist/harness/geminiCli/index.d.ts.map +0 -1
- package/dist/harness/geminiCli/index.js +0 -5
- package/dist/harness/geminiCli/promptContext.d.ts +0 -3
- package/dist/harness/geminiCli/promptContext.d.ts.map +0 -1
- package/dist/harness/geminiCli/promptContext.js +0 -22
- package/dist/harness/githubCopilot/adapter.d.ts +0 -4
- package/dist/harness/githubCopilot/adapter.d.ts.map +0 -1
- package/dist/harness/githubCopilot/adapter.js +0 -215
- package/dist/harness/githubCopilot/discovery.d.ts +0 -3
- package/dist/harness/githubCopilot/discovery.d.ts.map +0 -1
- package/dist/harness/githubCopilot/discovery.js +0 -11
- package/dist/harness/githubCopilot/hooks.d.ts +0 -12
- package/dist/harness/githubCopilot/hooks.d.ts.map +0 -1
- package/dist/harness/githubCopilot/hooks.js +0 -305
- package/dist/harness/githubCopilot/index.d.ts +0 -3
- package/dist/harness/githubCopilot/index.d.ts.map +0 -1
- package/dist/harness/githubCopilot/index.js +0 -7
- package/dist/harness/githubCopilot/promptContext.d.ts +0 -3
- package/dist/harness/githubCopilot/promptContext.d.ts.map +0 -1
- package/dist/harness/githubCopilot/promptContext.js +0 -22
- package/dist/harness/ohMyPi/adapter.d.ts +0 -3
- package/dist/harness/ohMyPi/adapter.d.ts.map +0 -1
- package/dist/harness/ohMyPi/adapter.js +0 -190
- package/dist/harness/ohMyPi/discovery.d.ts +0 -3
- package/dist/harness/ohMyPi/discovery.d.ts.map +0 -1
- package/dist/harness/ohMyPi/discovery.js +0 -11
- package/dist/harness/ohMyPi/index.d.ts +0 -2
- package/dist/harness/ohMyPi/index.d.ts.map +0 -1
- package/dist/harness/ohMyPi/index.js +0 -5
- package/dist/harness/ohMyPi/promptContext.d.ts +0 -3
- package/dist/harness/ohMyPi/promptContext.d.ts.map +0 -1
- package/dist/harness/ohMyPi/promptContext.js +0 -22
- package/dist/harness/openclaw/adapter.d.ts +0 -3
- package/dist/harness/openclaw/adapter.d.ts.map +0 -1
- package/dist/harness/openclaw/adapter.js +0 -288
- package/dist/harness/openclaw/discovery.d.ts +0 -3
- package/dist/harness/openclaw/discovery.d.ts.map +0 -1
- package/dist/harness/openclaw/discovery.js +0 -11
- package/dist/harness/openclaw/index.d.ts +0 -2
- package/dist/harness/openclaw/index.d.ts.map +0 -1
- package/dist/harness/openclaw/index.js +0 -5
- package/dist/harness/openclaw/promptContext.d.ts +0 -3
- package/dist/harness/openclaw/promptContext.d.ts.map +0 -1
- package/dist/harness/openclaw/promptContext.js +0 -22
- package/dist/harness/opencode/adapter.d.ts +0 -3
- package/dist/harness/opencode/adapter.d.ts.map +0 -1
- package/dist/harness/opencode/adapter.js +0 -235
- package/dist/harness/opencode/discovery.d.ts +0 -3
- package/dist/harness/opencode/discovery.d.ts.map +0 -1
- package/dist/harness/opencode/discovery.js +0 -11
- package/dist/harness/opencode/hooks.d.ts +0 -11
- package/dist/harness/opencode/hooks.d.ts.map +0 -1
- package/dist/harness/opencode/hooks.js +0 -264
- package/dist/harness/opencode/index.d.ts +0 -2
- package/dist/harness/opencode/index.d.ts.map +0 -1
- package/dist/harness/opencode/index.js +0 -5
- package/dist/harness/opencode/promptContext.d.ts +0 -3
- package/dist/harness/opencode/promptContext.d.ts.map +0 -1
- package/dist/harness/opencode/promptContext.js +0 -22
- package/dist/harness/pi/adapter.d.ts +0 -4
- package/dist/harness/pi/adapter.d.ts.map +0 -1
- package/dist/harness/pi/adapter.js +0 -198
- package/dist/harness/pi/discovery.d.ts +0 -3
- package/dist/harness/pi/discovery.d.ts.map +0 -1
- package/dist/harness/pi/discovery.js +0 -11
- package/dist/harness/pi/index.d.ts +0 -2
- package/dist/harness/pi/index.d.ts.map +0 -1
- package/dist/harness/pi/index.js +0 -6
- package/dist/harness/pi/promptContext.d.ts +0 -3
- package/dist/harness/pi/promptContext.d.ts.map +0 -1
- package/dist/harness/pi/promptContext.js +0 -22
- package/dist/mcp/channels/allowlist.d.ts +0 -19
- package/dist/mcp/channels/allowlist.d.ts.map +0 -1
- package/dist/mcp/channels/allowlist.js +0 -140
- package/dist/mcp/channels/channelManager.d.ts +0 -64
- package/dist/mcp/channels/channelManager.d.ts.map +0 -1
- package/dist/mcp/channels/channelManager.js +0 -137
- package/dist/mcp/channels/inboundQueue.d.ts +0 -47
- package/dist/mcp/channels/inboundQueue.d.ts.map +0 -1
- package/dist/mcp/channels/inboundQueue.js +0 -96
- package/dist/mcp/channels/index.d.ts +0 -11
- package/dist/mcp/channels/index.d.ts.map +0 -1
- package/dist/mcp/channels/index.js +0 -33
- package/dist/mcp/channels/outbound.d.ts +0 -33
- package/dist/mcp/channels/outbound.d.ts.map +0 -1
- package/dist/mcp/channels/outbound.js +0 -94
- package/dist/mcp/channels/permissionRelay.d.ts +0 -62
- package/dist/mcp/channels/permissionRelay.d.ts.map +0 -1
- package/dist/mcp/channels/permissionRelay.js +0 -159
- package/dist/mcp/channels/types.d.ts +0 -135
- package/dist/mcp/channels/types.d.ts.map +0 -1
- package/dist/mcp/channels/types.js +0 -16
- package/dist/mcp/client/config.d.ts +0 -26
- package/dist/mcp/client/config.d.ts.map +0 -1
- package/dist/mcp/client/config.js +0 -140
- package/dist/mcp/client/executor.d.ts +0 -28
- package/dist/mcp/client/executor.d.ts.map +0 -1
- package/dist/mcp/client/executor.js +0 -58
- package/dist/mcp/client/index.d.ts +0 -10
- package/dist/mcp/client/index.d.ts.map +0 -1
- package/dist/mcp/client/index.js +0 -25
- package/dist/mcp/client/manager.d.ts +0 -72
- package/dist/mcp/client/manager.d.ts.map +0 -1
- package/dist/mcp/client/manager.js +0 -212
- package/dist/mcp/client/toolRegistry.d.ts +0 -48
- package/dist/mcp/client/toolRegistry.d.ts.map +0 -1
- package/dist/mcp/client/toolRegistry.js +0 -116
- package/dist/mcp/client/types.d.ts +0 -94
- package/dist/mcp/client/types.d.ts.map +0 -1
- package/dist/mcp/client/types.js +0 -13
- package/dist/mcp/transport/session.d.ts +0 -16
- package/dist/mcp/transport/session.d.ts.map +0 -1
- package/dist/mcp/transport/session.js +0 -76
- package/dist/mcp/transport/types.d.ts +0 -17
- package/dist/mcp/transport/types.d.ts.map +0 -1
- package/dist/mcp/transport/types.js +0 -5
- package/dist/mcp/transport/websocket.d.ts +0 -39
- package/dist/mcp/transport/websocket.d.ts.map +0 -1
- package/dist/mcp/transport/websocket.js +0 -269
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluator.d.ts","sourceRoot":"","sources":["../../src/breakpoints/evaluator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACnG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"evaluator.d.ts","sourceRoot":"","sources":["../../src/breakpoints/evaluator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACnG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAmC1D,MAAM,WAAW,2BAA2B;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC,kEAAkE;IAClE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gFAAgF;IAChF,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,yFAAyF;IACzF,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,uEAAuE;IACvE,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,kBAAkB,CA8H7F"}
|
|
@@ -14,17 +14,45 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.evaluateAutoApproval = evaluateAutoApproval;
|
|
16
16
|
const patterns_1 = require("./patterns");
|
|
17
|
-
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
// Inlined posture helpers (canonical implementation moved to babysitter-harness)
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
const DEFAULT_POSTURES = {
|
|
21
|
+
read: { name: 'permissive', allowAutoApprove: true, minConsecutiveApprovalsForAutoN: 0, requireExplicitRule: false, requiredApproverLevel: 'any' },
|
|
22
|
+
write: { name: 'cautious', allowAutoApprove: true, minConsecutiveApprovalsForAutoN: 3, requireExplicitRule: false, requiredApproverLevel: 'any' },
|
|
23
|
+
execute: { name: 'guarded', allowAutoApprove: true, minConsecutiveApprovalsForAutoN: 5, requireExplicitRule: true, requiredApproverLevel: 'any' },
|
|
24
|
+
destroy: { name: 'locked', allowAutoApprove: false, minConsecutiveApprovalsForAutoN: -1, requireExplicitRule: true, requiredApproverLevel: 'owner' },
|
|
25
|
+
network: { name: 'cautious', allowAutoApprove: true, minConsecutiveApprovalsForAutoN: 3, requireExplicitRule: false, requiredApproverLevel: 'any' },
|
|
26
|
+
auth: { name: 'locked', allowAutoApprove: false, minConsecutiveApprovalsForAutoN: -1, requireExplicitRule: true, requiredApproverLevel: 'owner' },
|
|
27
|
+
};
|
|
28
|
+
const PREFIX_TO_CATEGORY = {
|
|
29
|
+
'read': 'read', 'write': 'write', 'exec': 'execute', 'execute': 'execute',
|
|
30
|
+
'destroy': 'destroy', 'delete': 'destroy', 'net': 'network', 'network': 'network',
|
|
31
|
+
'auth': 'auth', 'cred': 'auth',
|
|
32
|
+
};
|
|
33
|
+
function getPostureForCategory(category, overrides) {
|
|
34
|
+
const base = DEFAULT_POSTURES[category];
|
|
35
|
+
if (!overrides)
|
|
36
|
+
return base;
|
|
37
|
+
return { ...base, ...overrides };
|
|
38
|
+
}
|
|
39
|
+
function resolvePostureFromBreakpointId(breakpointId) {
|
|
40
|
+
const dotIndex = breakpointId.indexOf('.');
|
|
41
|
+
if (dotIndex === -1)
|
|
42
|
+
return undefined;
|
|
43
|
+
const prefix = breakpointId.substring(0, dotIndex);
|
|
44
|
+
return PREFIX_TO_CATEGORY[prefix];
|
|
45
|
+
}
|
|
18
46
|
function evaluateAutoApproval(options) {
|
|
19
47
|
const { breakpointId, tags, expert, rules, profileConfig, consecutiveApprovals = 0, skipPostureEnforcement = false, } = options;
|
|
20
48
|
let { autoApproveAfterN = -1 } = options;
|
|
21
49
|
const attributes = { tags, expert };
|
|
22
50
|
// Resolve posture
|
|
23
|
-
const effectiveCategory = options.actionCategory ??
|
|
51
|
+
const effectiveCategory = options.actionCategory ?? resolvePostureFromBreakpointId(breakpointId);
|
|
24
52
|
let posture;
|
|
25
53
|
if (!skipPostureEnforcement && effectiveCategory) {
|
|
26
54
|
const profileOverrides = profileConfig?.postureOverrides?.[effectiveCategory];
|
|
27
|
-
posture = options.postureOverride ??
|
|
55
|
+
posture = options.postureOverride ?? getPostureForCategory(effectiveCategory, profileOverrides);
|
|
28
56
|
}
|
|
29
57
|
// Check if profile disables posture enforcement globally
|
|
30
58
|
if (profileConfig?.disablePostureEnforcement) {
|
|
@@ -4,9 +4,6 @@ export { parsePattern, matchPattern } from "./patterns";
|
|
|
4
4
|
export { readRules, writeRules, addRule, removeRule, listRules } from "./rules";
|
|
5
5
|
export { evaluateAutoApproval } from "./evaluator";
|
|
6
6
|
export type { EvaluateAutoApprovalOptions } from "./evaluator";
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export type { DelegationRule, DelegationRulesFile, DelegationPayload, DelegationSendOptions, DelegationResponse, } from "./delegationTypes";
|
|
10
|
-
export { DELEGATION_RULES_SCHEMA_VERSION, DEFAULT_DELEGATION_TIMEOUT_MS } from "./delegationTypes";
|
|
11
|
-
export { evaluateApprovalChain, advanceChainStep, initChainState, resolveEscalationPath, type ApprovalChainStep, type ApprovalChainDefinition, type QuorumConfig, type ApprovalChainState, type CompletedChainStep, type ChainEvaluationResult, } from "./approvalChains";
|
|
7
|
+
export { verifyBreakpointResult, hasSignatureFields } from "./proven-verification";
|
|
8
|
+
export type { BreakpointVerificationConfig, BreakpointVerificationResult, } from "./proven-verification";
|
|
12
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/breakpoints/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,cAAc,EACd,eAAe,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/breakpoints/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,cAAc,EACd,eAAe,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACnF,YAAY,EACV,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.hasSignatureFields = exports.verifyBreakpointResult = exports.evaluateAutoApproval = exports.listRules = exports.removeRule = exports.addRule = exports.writeRules = exports.readRules = exports.matchPattern = exports.parsePattern = exports.BREAKPOINT_RULES_SCHEMA_VERSION = void 0;
|
|
4
4
|
var types_1 = require("./types");
|
|
5
5
|
Object.defineProperty(exports, "BREAKPOINT_RULES_SCHEMA_VERSION", { enumerable: true, get: function () { return types_1.BREAKPOINT_RULES_SCHEMA_VERSION; } });
|
|
6
6
|
var patterns_1 = require("./patterns");
|
|
@@ -14,22 +14,6 @@ Object.defineProperty(exports, "removeRule", { enumerable: true, get: function (
|
|
|
14
14
|
Object.defineProperty(exports, "listRules", { enumerable: true, get: function () { return rules_1.listRules; } });
|
|
15
15
|
var evaluator_1 = require("./evaluator");
|
|
16
16
|
Object.defineProperty(exports, "evaluateAutoApproval", { enumerable: true, get: function () { return evaluator_1.evaluateAutoApproval; } });
|
|
17
|
-
var
|
|
18
|
-
Object.defineProperty(exports, "
|
|
19
|
-
Object.defineProperty(exports, "
|
|
20
|
-
Object.defineProperty(exports, "resolvePostureFromBreakpointId", { enumerable: true, get: function () { return postures_1.resolvePostureFromBreakpointId; } });
|
|
21
|
-
var delegation_1 = require("./delegation");
|
|
22
|
-
Object.defineProperty(exports, "evaluateDelegation", { enumerable: true, get: function () { return delegation_1.evaluateDelegation; } });
|
|
23
|
-
Object.defineProperty(exports, "sendDelegationWebhook", { enumerable: true, get: function () { return delegation_1.sendDelegationWebhook; } });
|
|
24
|
-
Object.defineProperty(exports, "addDelegationRule", { enumerable: true, get: function () { return delegation_1.addDelegationRule; } });
|
|
25
|
-
Object.defineProperty(exports, "removeDelegationRule", { enumerable: true, get: function () { return delegation_1.removeDelegationRule; } });
|
|
26
|
-
Object.defineProperty(exports, "listDelegationRules", { enumerable: true, get: function () { return delegation_1.listDelegationRules; } });
|
|
27
|
-
Object.defineProperty(exports, "delegateBreakpoint", { enumerable: true, get: function () { return delegation_1.delegateBreakpoint; } });
|
|
28
|
-
var delegationTypes_1 = require("./delegationTypes");
|
|
29
|
-
Object.defineProperty(exports, "DELEGATION_RULES_SCHEMA_VERSION", { enumerable: true, get: function () { return delegationTypes_1.DELEGATION_RULES_SCHEMA_VERSION; } });
|
|
30
|
-
Object.defineProperty(exports, "DEFAULT_DELEGATION_TIMEOUT_MS", { enumerable: true, get: function () { return delegationTypes_1.DEFAULT_DELEGATION_TIMEOUT_MS; } });
|
|
31
|
-
var approvalChains_1 = require("./approvalChains");
|
|
32
|
-
Object.defineProperty(exports, "evaluateApprovalChain", { enumerable: true, get: function () { return approvalChains_1.evaluateApprovalChain; } });
|
|
33
|
-
Object.defineProperty(exports, "advanceChainStep", { enumerable: true, get: function () { return approvalChains_1.advanceChainStep; } });
|
|
34
|
-
Object.defineProperty(exports, "initChainState", { enumerable: true, get: function () { return approvalChains_1.initChainState; } });
|
|
35
|
-
Object.defineProperty(exports, "resolveEscalationPath", { enumerable: true, get: function () { return approvalChains_1.resolveEscalationPath; } });
|
|
17
|
+
var proven_verification_1 = require("./proven-verification");
|
|
18
|
+
Object.defineProperty(exports, "verifyBreakpointResult", { enumerable: true, get: function () { return proven_verification_1.verifyBreakpointResult; } });
|
|
19
|
+
Object.defineProperty(exports, "hasSignatureFields", { enumerable: true, get: function () { return proven_verification_1.hasSignatureFields; } });
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional integration with @a5c-ai/breakpoints-mux proven subsystem.
|
|
3
|
+
*
|
|
4
|
+
* Provides cryptographic verification of breakpoint answers when the
|
|
5
|
+
* breakpoints-mux package is available as an optional peer dependency.
|
|
6
|
+
* Never throws -- always returns a graceful result.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Configuration for breakpoint answer verification.
|
|
10
|
+
*/
|
|
11
|
+
export interface BreakpointVerificationConfig {
|
|
12
|
+
/** Whether verification is enabled. When false, verification is skipped. */
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
/** Directory containing trusted public keys. Passed to breakpoints-mux verifyAnswer. */
|
|
15
|
+
trustedKeysDir?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Result of a breakpoint answer verification attempt.
|
|
19
|
+
*/
|
|
20
|
+
export interface BreakpointVerificationResult {
|
|
21
|
+
/** Whether the answer was successfully verified as authentic. */
|
|
22
|
+
verified: boolean;
|
|
23
|
+
/** Detailed verification result from breakpoints-mux (when available). */
|
|
24
|
+
verificationResult?: {
|
|
25
|
+
valid: boolean;
|
|
26
|
+
publicKeyFingerprint?: string;
|
|
27
|
+
responderName?: string;
|
|
28
|
+
reason?: string;
|
|
29
|
+
verifiedAt: string;
|
|
30
|
+
};
|
|
31
|
+
/** Reason verification was skipped or failed (when verified is false). */
|
|
32
|
+
reason?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Check whether a breakpoint result carries signature fields,
|
|
36
|
+
* indicating it was cryptographically signed via the proven subsystem.
|
|
37
|
+
*/
|
|
38
|
+
export declare function hasSignatureFields(result: Record<string, unknown>): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Verify a breakpoint result's cryptographic signature using the
|
|
41
|
+
* breakpoints-mux proven subsystem.
|
|
42
|
+
*
|
|
43
|
+
* This function never throws. If breakpoints-mux is not installed,
|
|
44
|
+
* verification is disabled, or the result is unsigned, it returns
|
|
45
|
+
* a graceful { verified: false } result with an explanatory reason.
|
|
46
|
+
*
|
|
47
|
+
* @param result - The breakpoint result (may or may not contain signature fields).
|
|
48
|
+
* @param config - Verification configuration. If omitted, defaults to { enabled: true }.
|
|
49
|
+
*/
|
|
50
|
+
export declare function verifyBreakpointResult(result: Record<string, unknown>, config?: BreakpointVerificationConfig): Promise<BreakpointVerificationResult>;
|
|
51
|
+
//# sourceMappingURL=proven-verification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proven-verification.d.ts","sourceRoot":"","sources":["../../src/breakpoints/proven-verification.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,4EAA4E;IAC5E,OAAO,EAAE,OAAO,CAAC;IACjB,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,iEAAiE;IACjE,QAAQ,EAAE,OAAO,CAAC;IAClB,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE;QACnB,KAAK,EAAE,OAAO,CAAC;QACf,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAaD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAI3E;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,MAAM,CAAC,EAAE,4BAA4B,GACpC,OAAO,CAAC,4BAA4B,CAAC,CAuEvC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Optional integration with @a5c-ai/breakpoints-mux proven subsystem.
|
|
4
|
+
*
|
|
5
|
+
* Provides cryptographic verification of breakpoint answers when the
|
|
6
|
+
* breakpoints-mux package is available as an optional peer dependency.
|
|
7
|
+
* Never throws -- always returns a graceful result.
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
+
var ownKeys = function(o) {
|
|
27
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
+
var ar = [];
|
|
29
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
+
return ar;
|
|
31
|
+
};
|
|
32
|
+
return ownKeys(o);
|
|
33
|
+
};
|
|
34
|
+
return function (mod) {
|
|
35
|
+
if (mod && mod.__esModule) return mod;
|
|
36
|
+
var result = {};
|
|
37
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
+
__setModuleDefault(result, mod);
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
41
|
+
})();
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.hasSignatureFields = hasSignatureFields;
|
|
44
|
+
exports.verifyBreakpointResult = verifyBreakpointResult;
|
|
45
|
+
/**
|
|
46
|
+
* Signature fields expected on a proven breakpoint result.
|
|
47
|
+
* If all four are present, the result is considered signed.
|
|
48
|
+
*/
|
|
49
|
+
const SIGNATURE_FIELDS = [
|
|
50
|
+
"signature",
|
|
51
|
+
"publicKeyFingerprint",
|
|
52
|
+
"signedAt",
|
|
53
|
+
"signedFields",
|
|
54
|
+
];
|
|
55
|
+
/**
|
|
56
|
+
* Check whether a breakpoint result carries signature fields,
|
|
57
|
+
* indicating it was cryptographically signed via the proven subsystem.
|
|
58
|
+
*/
|
|
59
|
+
function hasSignatureFields(result) {
|
|
60
|
+
return SIGNATURE_FIELDS.every((field) => result[field] !== undefined && result[field] !== null);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Verify a breakpoint result's cryptographic signature using the
|
|
64
|
+
* breakpoints-mux proven subsystem.
|
|
65
|
+
*
|
|
66
|
+
* This function never throws. If breakpoints-mux is not installed,
|
|
67
|
+
* verification is disabled, or the result is unsigned, it returns
|
|
68
|
+
* a graceful { verified: false } result with an explanatory reason.
|
|
69
|
+
*
|
|
70
|
+
* @param result - The breakpoint result (may or may not contain signature fields).
|
|
71
|
+
* @param config - Verification configuration. If omitted, defaults to { enabled: true }.
|
|
72
|
+
*/
|
|
73
|
+
async function verifyBreakpointResult(result, config) {
|
|
74
|
+
const effectiveConfig = config ?? { enabled: true };
|
|
75
|
+
// Short-circuit if verification is disabled
|
|
76
|
+
if (!effectiveConfig.enabled) {
|
|
77
|
+
return { verified: false, reason: "verification disabled" };
|
|
78
|
+
}
|
|
79
|
+
// Short-circuit if result does not carry signature fields
|
|
80
|
+
if (!hasSignatureFields(result)) {
|
|
81
|
+
return { verified: false, reason: "result is not signed" };
|
|
82
|
+
}
|
|
83
|
+
// Attempt to dynamically import breakpoints-mux proven subsystem.
|
|
84
|
+
// The module is an optional peer dependency -- the import may fail at runtime.
|
|
85
|
+
// We use a string variable to prevent TypeScript from statically resolving the import.
|
|
86
|
+
try {
|
|
87
|
+
const modulePath = "@a5c-ai/breakpoints-mux/proven";
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
89
|
+
const proven = await Promise.resolve(`${modulePath}`).then(s => __importStar(require(s)));
|
|
90
|
+
const { verifyAnswer } = proven;
|
|
91
|
+
if (typeof verifyAnswer !== "function") {
|
|
92
|
+
return {
|
|
93
|
+
verified: false,
|
|
94
|
+
reason: "breakpoints-mux/proven does not export verifyAnswer",
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
const verificationResult = await verifyAnswer(result, effectiveConfig.trustedKeysDir);
|
|
98
|
+
return {
|
|
99
|
+
verified: verificationResult.valid === true,
|
|
100
|
+
verificationResult,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
catch (err) {
|
|
104
|
+
// Dynamic import failed -- breakpoints-mux is not installed or broken
|
|
105
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
106
|
+
if (message.includes("Cannot find module") ||
|
|
107
|
+
message.includes("MODULE_NOT_FOUND") ||
|
|
108
|
+
message.includes("ERR_MODULE_NOT_FOUND") ||
|
|
109
|
+
message.includes("Could not resolve")) {
|
|
110
|
+
return {
|
|
111
|
+
verified: false,
|
|
112
|
+
reason: "breakpoints-mux not installed",
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
verified: false,
|
|
117
|
+
reason: `verification failed: ${message}`,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compressOutput.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/compressOutput.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"compressOutput.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/compressOutput.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAkBH,MAAM,WAAW,qBAAqB;IACpC,mDAAmD;IACnD,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAsCD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,qBAAqB,GAAG,MAAM,CAoCxE"}
|