patchwork-os 0.2.0-alpha.9 → 0.2.0-beta.1
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/README.bridge.md +6 -0
- package/README.md +318 -35
- package/deploy/bootstrap-new-vps.sh +12 -12
- package/deploy/bootstrap-vps.sh +187 -0
- package/deploy/deploy-dashboard.sh +174 -0
- package/deploy/deploy-landing.sh +136 -0
- package/dist/activationMetrics.d.ts +67 -0
- package/dist/activationMetrics.js +255 -0
- package/dist/activationMetrics.js.map +1 -0
- package/dist/activityLog.d.ts +49 -0
- package/dist/activityLog.js +78 -0
- package/dist/activityLog.js.map +1 -1
- package/dist/analyticsAggregator.d.ts +5 -1
- package/dist/analyticsAggregator.js +15 -4
- package/dist/analyticsAggregator.js.map +1 -1
- package/dist/analyticsPrefs.d.ts +11 -0
- package/dist/analyticsPrefs.js +33 -0
- package/dist/analyticsPrefs.js.map +1 -1
- package/dist/approvalHttp.d.ts +49 -2
- package/dist/approvalHttp.js +217 -21
- package/dist/approvalHttp.js.map +1 -1
- package/dist/approvalInsights.d.ts +49 -0
- package/dist/approvalInsights.js +97 -0
- package/dist/approvalInsights.js.map +1 -0
- package/dist/approvalQueue.d.ts +27 -1
- package/dist/approvalQueue.js +123 -3
- package/dist/approvalQueue.js.map +1 -1
- package/dist/approvalSignals.d.ts +124 -0
- package/dist/approvalSignals.js +512 -0
- package/dist/approvalSignals.js.map +1 -0
- package/dist/automation.d.ts +57 -0
- package/dist/automation.js +156 -59
- package/dist/automation.js.map +1 -1
- package/dist/automationSuggestions.d.ts +79 -0
- package/dist/automationSuggestions.js +150 -0
- package/dist/automationSuggestions.js.map +1 -0
- package/dist/bridge.d.ts +3 -0
- package/dist/bridge.js +194 -153
- package/dist/bridge.js.map +1 -1
- package/dist/bridgeToken.js +57 -19
- package/dist/bridgeToken.js.map +1 -1
- package/dist/ccPermissions.d.ts +15 -0
- package/dist/ccPermissions.js +21 -4
- package/dist/ccPermissions.js.map +1 -1
- package/dist/claudeDriver.d.ts +0 -16
- package/dist/claudeDriver.js +93 -36
- package/dist/claudeDriver.js.map +1 -1
- package/dist/claudeMdPatch.d.ts +9 -3
- package/dist/claudeMdPatch.js +79 -13
- package/dist/claudeMdPatch.js.map +1 -1
- package/dist/claudeOrchestrator.d.ts +13 -1
- package/dist/claudeOrchestrator.js +16 -8
- package/dist/claudeOrchestrator.js.map +1 -1
- package/dist/commands/dashboard.js +1 -1
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/launchd.d.ts +2 -0
- package/dist/commands/launchd.js +94 -0
- package/dist/commands/launchd.js.map +1 -0
- package/dist/commands/marketplace.d.ts +15 -10
- package/dist/commands/marketplace.js +27 -115
- package/dist/commands/marketplace.js.map +1 -1
- package/dist/commands/patchworkInit.d.ts +8 -0
- package/dist/commands/patchworkInit.js +77 -11
- package/dist/commands/patchworkInit.js.map +1 -1
- package/dist/commands/recipe.d.ts +289 -0
- package/dist/commands/recipe.js +1359 -0
- package/dist/commands/recipe.js.map +1 -0
- package/dist/commands/recipeInstall.d.ts +150 -0
- package/dist/commands/recipeInstall.js +647 -0
- package/dist/commands/recipeInstall.js.map +1 -0
- package/dist/commands/tracesExport.d.ts +83 -0
- package/dist/commands/tracesExport.js +269 -0
- package/dist/commands/tracesExport.js.map +1 -0
- package/dist/commands/tracesImport.d.ts +56 -0
- package/dist/commands/tracesImport.js +161 -0
- package/dist/commands/tracesImport.js.map +1 -0
- package/dist/commitIssueLinkLog.d.ts +8 -0
- package/dist/commitIssueLinkLog.js +53 -1
- package/dist/commitIssueLinkLog.js.map +1 -1
- package/dist/config.d.ts +23 -2
- package/dist/config.js +119 -9
- package/dist/config.js.map +1 -1
- package/dist/connectorRoutes.d.ts +43 -0
- package/dist/connectorRoutes.js +1300 -0
- package/dist/connectorRoutes.js.map +1 -0
- package/dist/connectors/asana.d.ts +198 -0
- package/dist/connectors/asana.js +679 -0
- package/dist/connectors/asana.js.map +1 -0
- package/dist/connectors/baseConnector.d.ts +153 -0
- package/dist/connectors/baseConnector.js +336 -0
- package/dist/connectors/baseConnector.js.map +1 -0
- package/dist/connectors/confluence.d.ts +111 -0
- package/dist/connectors/confluence.js +406 -0
- package/dist/connectors/confluence.js.map +1 -0
- package/dist/connectors/datadog.d.ts +116 -0
- package/dist/connectors/datadog.js +385 -0
- package/dist/connectors/datadog.js.map +1 -0
- package/dist/connectors/discord.d.ts +150 -0
- package/dist/connectors/discord.js +543 -0
- package/dist/connectors/discord.js.map +1 -0
- package/dist/connectors/fixtureLibrary.d.ts +21 -0
- package/dist/connectors/fixtureLibrary.js +70 -0
- package/dist/connectors/fixtureLibrary.js.map +1 -0
- package/dist/connectors/fixtureRecorder.d.ts +1 -0
- package/dist/connectors/fixtureRecorder.js +35 -0
- package/dist/connectors/fixtureRecorder.js.map +1 -0
- package/dist/connectors/github.js +17 -18
- package/dist/connectors/github.js.map +1 -1
- package/dist/connectors/gitlab.d.ts +180 -0
- package/dist/connectors/gitlab.js +582 -0
- package/dist/connectors/gitlab.js.map +1 -0
- package/dist/connectors/gmail.d.ts +4 -1
- package/dist/connectors/gmail.js +149 -27
- package/dist/connectors/gmail.js.map +1 -1
- package/dist/connectors/googleCalendar.d.ts +4 -1
- package/dist/connectors/googleCalendar.js +88 -25
- package/dist/connectors/googleCalendar.js.map +1 -1
- package/dist/connectors/googleDrive.d.ts +34 -0
- package/dist/connectors/googleDrive.js +321 -0
- package/dist/connectors/googleDrive.js.map +1 -0
- package/dist/connectors/htmlEscape.d.ts +5 -0
- package/dist/connectors/htmlEscape.js +13 -0
- package/dist/connectors/htmlEscape.js.map +1 -0
- package/dist/connectors/hubspot.d.ts +112 -0
- package/dist/connectors/hubspot.js +408 -0
- package/dist/connectors/hubspot.js.map +1 -0
- package/dist/connectors/intercom.d.ts +102 -0
- package/dist/connectors/intercom.js +402 -0
- package/dist/connectors/intercom.js.map +1 -0
- package/dist/connectors/jira.d.ts +98 -0
- package/dist/connectors/jira.js +396 -0
- package/dist/connectors/jira.js.map +1 -0
- package/dist/connectors/linear.js +30 -19
- package/dist/connectors/linear.js.map +1 -1
- package/dist/connectors/mcpOAuth.d.ts +3 -0
- package/dist/connectors/mcpOAuth.js +64 -10
- package/dist/connectors/mcpOAuth.js.map +1 -1
- package/dist/connectors/mockConnector.d.ts +28 -0
- package/dist/connectors/mockConnector.js +81 -0
- package/dist/connectors/mockConnector.js.map +1 -0
- package/dist/connectors/notion.d.ts +143 -0
- package/dist/connectors/notion.js +424 -0
- package/dist/connectors/notion.js.map +1 -0
- package/dist/connectors/oauthStateStore.d.ts +31 -0
- package/dist/connectors/oauthStateStore.js +52 -0
- package/dist/connectors/oauthStateStore.js.map +1 -0
- package/dist/connectors/pagerduty.d.ts +160 -0
- package/dist/connectors/pagerduty.js +464 -0
- package/dist/connectors/pagerduty.js.map +1 -0
- package/dist/connectors/sentry.js +5 -13
- package/dist/connectors/sentry.js.map +1 -1
- package/dist/connectors/slack.d.ts +16 -1
- package/dist/connectors/slack.js +155 -32
- package/dist/connectors/slack.js.map +1 -1
- package/dist/connectors/stripe.d.ts +116 -0
- package/dist/connectors/stripe.js +379 -0
- package/dist/connectors/stripe.js.map +1 -0
- package/dist/connectors/tokenStorage.d.ts +35 -0
- package/dist/connectors/tokenStorage.js +484 -0
- package/dist/connectors/tokenStorage.js.map +1 -0
- package/dist/connectors/zendesk.d.ts +104 -0
- package/dist/connectors/zendesk.js +442 -0
- package/dist/connectors/zendesk.js.map +1 -0
- package/dist/cors.d.ts +10 -0
- package/dist/cors.js +29 -0
- package/dist/cors.js.map +1 -0
- package/dist/decisionReplay.d.ts +72 -0
- package/dist/decisionReplay.js +92 -0
- package/dist/decisionReplay.js.map +1 -0
- package/dist/decisionTraceLog.d.ts +6 -0
- package/dist/decisionTraceLog.js +54 -2
- package/dist/decisionTraceLog.js.map +1 -1
- package/dist/drivers/claude/subprocess.d.ts +12 -2
- package/dist/drivers/claude/subprocess.js +79 -6
- package/dist/drivers/claude/subprocess.js.map +1 -1
- package/dist/drivers/gemini/api.d.ts +18 -0
- package/dist/drivers/gemini/api.js +29 -0
- package/dist/drivers/gemini/api.js.map +1 -0
- package/dist/drivers/gemini/index.d.ts +5 -1
- package/dist/drivers/gemini/index.js +39 -5
- package/dist/drivers/gemini/index.js.map +1 -1
- package/dist/drivers/index.d.ts +8 -1
- package/dist/drivers/index.js +10 -2
- package/dist/drivers/index.js.map +1 -1
- package/dist/drivers/local/index.d.ts +26 -0
- package/dist/drivers/local/index.js +41 -0
- package/dist/drivers/local/index.js.map +1 -0
- package/dist/featureFlags.d.ts +79 -0
- package/dist/featureFlags.js +208 -0
- package/dist/featureFlags.js.map +1 -0
- package/dist/fp/automationInterpreter.js +26 -21
- package/dist/fp/automationInterpreter.js.map +1 -1
- package/dist/fp/automationProgram.d.ts +1 -1
- package/dist/fp/automationProgram.js.map +1 -1
- package/dist/fp/automationState.js +4 -1
- package/dist/fp/automationState.js.map +1 -1
- package/dist/fp/policyParser.js +21 -1
- package/dist/fp/policyParser.js.map +1 -1
- package/dist/httpErrorResponse.d.ts +36 -0
- package/dist/httpErrorResponse.js +46 -0
- package/dist/httpErrorResponse.js.map +1 -0
- package/dist/inboxRoutes.d.ts +22 -0
- package/dist/inboxRoutes.js +193 -0
- package/dist/inboxRoutes.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1403 -203
- package/dist/index.js.map +1 -1
- package/dist/installGuard.d.ts +25 -0
- package/dist/installGuard.js +48 -0
- package/dist/installGuard.js.map +1 -0
- package/dist/mcpRoutes.d.ts +37 -0
- package/dist/mcpRoutes.js +76 -0
- package/dist/mcpRoutes.js.map +1 -0
- package/dist/oauth.d.ts +20 -1
- package/dist/oauth.js +214 -39
- package/dist/oauth.js.map +1 -1
- package/dist/oauthRoutes.d.ts +32 -0
- package/dist/oauthRoutes.js +119 -0
- package/dist/oauthRoutes.js.map +1 -0
- package/dist/orchestrator/orchestratorBridge.js +2 -2
- package/dist/orchestrator/orchestratorBridge.js.map +1 -1
- package/dist/patchworkConfig.d.ts +29 -0
- package/dist/patchworkConfig.js +100 -5
- package/dist/patchworkConfig.js.map +1 -1
- package/dist/pluginLoader.d.ts +28 -0
- package/dist/pluginLoader.js +77 -11
- package/dist/pluginLoader.js.map +1 -1
- package/dist/pluginWatcher.js +8 -3
- package/dist/pluginWatcher.js.map +1 -1
- package/dist/preToolUseHook.d.ts +12 -0
- package/dist/preToolUseHook.js +30 -1
- package/dist/preToolUseHook.js.map +1 -1
- package/dist/prompts.js +4 -0
- package/dist/prompts.js.map +1 -1
- package/dist/recipeOrchestration.d.ts +121 -0
- package/dist/recipeOrchestration.js +965 -0
- package/dist/recipeOrchestration.js.map +1 -0
- package/dist/recipeRoutes.d.ts +185 -0
- package/dist/recipeRoutes.js +1369 -0
- package/dist/recipeRoutes.js.map +1 -0
- package/dist/recipes/RecipeOrchestrator.d.ts +40 -0
- package/dist/recipes/RecipeOrchestrator.js +51 -0
- package/dist/recipes/RecipeOrchestrator.js.map +1 -0
- package/dist/recipes/agentExecutor.d.ts +38 -0
- package/dist/recipes/agentExecutor.js +50 -0
- package/dist/recipes/agentExecutor.js.map +1 -0
- package/dist/recipes/chainedRunner.d.ts +191 -0
- package/dist/recipes/chainedRunner.js +759 -0
- package/dist/recipes/chainedRunner.js.map +1 -0
- package/dist/recipes/compiler.js +3 -3
- package/dist/recipes/compiler.js.map +1 -1
- package/dist/recipes/dependencyGraph.d.ts +39 -0
- package/dist/recipes/dependencyGraph.js +199 -0
- package/dist/recipes/dependencyGraph.js.map +1 -0
- package/dist/recipes/disabledMarkers.d.ts +48 -0
- package/dist/recipes/disabledMarkers.js +52 -0
- package/dist/recipes/disabledMarkers.js.map +1 -0
- package/dist/recipes/installer.js +3 -3
- package/dist/recipes/installer.js.map +1 -1
- package/dist/recipes/legacyRecipeCompat.d.ts +10 -0
- package/dist/recipes/legacyRecipeCompat.js +131 -0
- package/dist/recipes/legacyRecipeCompat.js.map +1 -0
- package/dist/recipes/manifest.d.ts +47 -0
- package/dist/recipes/manifest.js +156 -0
- package/dist/recipes/manifest.js.map +1 -0
- package/dist/recipes/migrationWarnings.d.ts +12 -0
- package/dist/recipes/migrationWarnings.js +44 -0
- package/dist/recipes/migrationWarnings.js.map +1 -0
- package/dist/recipes/migrations/index.d.ts +24 -0
- package/dist/recipes/migrations/index.js +55 -0
- package/dist/recipes/migrations/index.js.map +1 -0
- package/dist/recipes/migrations/types.d.ts +28 -0
- package/dist/recipes/migrations/types.js +2 -0
- package/dist/recipes/migrations/types.js.map +1 -0
- package/dist/recipes/migrations/v1.d.ts +11 -0
- package/dist/recipes/migrations/v1.js +18 -0
- package/dist/recipes/migrations/v1.js.map +1 -0
- package/dist/recipes/names.d.ts +40 -0
- package/dist/recipes/names.js +66 -0
- package/dist/recipes/names.js.map +1 -0
- package/dist/recipes/nestedRecipeStep.d.ts +58 -0
- package/dist/recipes/nestedRecipeStep.js +95 -0
- package/dist/recipes/nestedRecipeStep.js.map +1 -0
- package/dist/recipes/outputRegistry.d.ts +28 -0
- package/dist/recipes/outputRegistry.js +52 -0
- package/dist/recipes/outputRegistry.js.map +1 -0
- package/dist/recipes/parser.js +4 -1
- package/dist/recipes/parser.js.map +1 -1
- package/dist/recipes/replayRun.d.ts +62 -0
- package/dist/recipes/replayRun.js +97 -0
- package/dist/recipes/replayRun.js.map +1 -0
- package/dist/recipes/resolveRecipePath.d.ts +69 -0
- package/dist/recipes/resolveRecipePath.js +202 -0
- package/dist/recipes/resolveRecipePath.js.map +1 -0
- package/dist/recipes/scheduler.d.ts +23 -7
- package/dist/recipes/scheduler.js +225 -45
- package/dist/recipes/scheduler.js.map +1 -1
- package/dist/recipes/schema.d.ts +17 -2
- package/dist/recipes/schemaGenerator.d.ts +28 -0
- package/dist/recipes/schemaGenerator.js +565 -0
- package/dist/recipes/schemaGenerator.js.map +1 -0
- package/dist/recipes/stepObservation.d.ts +44 -0
- package/dist/recipes/stepObservation.js +232 -0
- package/dist/recipes/stepObservation.js.map +1 -0
- package/dist/recipes/templateEngine.d.ts +62 -0
- package/dist/recipes/templateEngine.js +201 -0
- package/dist/recipes/templateEngine.js.map +1 -0
- package/dist/recipes/toolRegistry.d.ts +186 -0
- package/dist/recipes/toolRegistry.js +309 -0
- package/dist/recipes/toolRegistry.js.map +1 -0
- package/dist/recipes/tools/asana.d.ts +16 -0
- package/dist/recipes/tools/asana.js +524 -0
- package/dist/recipes/tools/asana.js.map +1 -0
- package/dist/recipes/tools/calendar.d.ts +6 -0
- package/dist/recipes/tools/calendar.js +61 -0
- package/dist/recipes/tools/calendar.js.map +1 -0
- package/dist/recipes/tools/confluence.d.ts +6 -0
- package/dist/recipes/tools/confluence.js +254 -0
- package/dist/recipes/tools/confluence.js.map +1 -0
- package/dist/recipes/tools/datadog.d.ts +6 -0
- package/dist/recipes/tools/datadog.js +239 -0
- package/dist/recipes/tools/datadog.js.map +1 -0
- package/dist/recipes/tools/diagnostics.d.ts +6 -0
- package/dist/recipes/tools/diagnostics.js +36 -0
- package/dist/recipes/tools/diagnostics.js.map +1 -0
- package/dist/recipes/tools/discord.d.ts +18 -0
- package/dist/recipes/tools/discord.js +254 -0
- package/dist/recipes/tools/discord.js.map +1 -0
- package/dist/recipes/tools/file.d.ts +12 -0
- package/dist/recipes/tools/file.js +174 -0
- package/dist/recipes/tools/file.js.map +1 -0
- package/dist/recipes/tools/git.d.ts +6 -0
- package/dist/recipes/tools/git.js +63 -0
- package/dist/recipes/tools/git.js.map +1 -0
- package/dist/recipes/tools/github.d.ts +6 -0
- package/dist/recipes/tools/github.js +116 -0
- package/dist/recipes/tools/github.js.map +1 -0
- package/dist/recipes/tools/gitlab.d.ts +11 -0
- package/dist/recipes/tools/gitlab.js +285 -0
- package/dist/recipes/tools/gitlab.js.map +1 -0
- package/dist/recipes/tools/gmail.d.ts +6 -0
- package/dist/recipes/tools/gmail.js +451 -0
- package/dist/recipes/tools/gmail.js.map +1 -0
- package/dist/recipes/tools/googleDrive.d.ts +1 -0
- package/dist/recipes/tools/googleDrive.js +55 -0
- package/dist/recipes/tools/googleDrive.js.map +1 -0
- package/dist/recipes/tools/hubspot.d.ts +6 -0
- package/dist/recipes/tools/hubspot.js +232 -0
- package/dist/recipes/tools/hubspot.js.map +1 -0
- package/dist/recipes/tools/index.d.ts +30 -0
- package/dist/recipes/tools/index.js +33 -0
- package/dist/recipes/tools/index.js.map +1 -0
- package/dist/recipes/tools/intercom.d.ts +6 -0
- package/dist/recipes/tools/intercom.js +226 -0
- package/dist/recipes/tools/intercom.js.map +1 -0
- package/dist/recipes/tools/jira.d.ts +14 -0
- package/dist/recipes/tools/jira.js +369 -0
- package/dist/recipes/tools/jira.js.map +1 -0
- package/dist/recipes/tools/linear.d.ts +7 -0
- package/dist/recipes/tools/linear.js +307 -0
- package/dist/recipes/tools/linear.js.map +1 -0
- package/dist/recipes/tools/meetingNotes.d.ts +21 -0
- package/dist/recipes/tools/meetingNotes.js +701 -0
- package/dist/recipes/tools/meetingNotes.js.map +1 -0
- package/dist/recipes/tools/notion.d.ts +6 -0
- package/dist/recipes/tools/notion.js +278 -0
- package/dist/recipes/tools/notion.js.map +1 -0
- package/dist/recipes/tools/pagerduty.d.ts +15 -0
- package/dist/recipes/tools/pagerduty.js +451 -0
- package/dist/recipes/tools/pagerduty.js.map +1 -0
- package/dist/recipes/tools/sentry.d.ts +12 -0
- package/dist/recipes/tools/sentry.js +73 -0
- package/dist/recipes/tools/sentry.js.map +1 -0
- package/dist/recipes/tools/slack.d.ts +6 -0
- package/dist/recipes/tools/slack.js +82 -0
- package/dist/recipes/tools/slack.js.map +1 -0
- package/dist/recipes/tools/stripe.d.ts +6 -0
- package/dist/recipes/tools/stripe.js +265 -0
- package/dist/recipes/tools/stripe.js.map +1 -0
- package/dist/recipes/tools/zendesk.d.ts +6 -0
- package/dist/recipes/tools/zendesk.js +245 -0
- package/dist/recipes/tools/zendesk.js.map +1 -0
- package/dist/recipes/validation.d.ts +13 -0
- package/dist/recipes/validation.js +617 -0
- package/dist/recipes/validation.js.map +1 -0
- package/dist/recipes/yamlRunner.d.ts +130 -2
- package/dist/recipes/yamlRunner.js +1009 -402
- package/dist/recipes/yamlRunner.js.map +1 -1
- package/dist/recipesHttp.d.ts +151 -6
- package/dist/recipesHttp.js +999 -29
- package/dist/recipesHttp.js.map +1 -1
- package/dist/riskTier.js +7 -1
- package/dist/riskTier.js.map +1 -1
- package/dist/runLog.d.ts +100 -1
- package/dist/runLog.js +258 -5
- package/dist/runLog.js.map +1 -1
- package/dist/schemas/dry-run-plan.v1.json +139 -0
- package/dist/schemas/recipe.v1.json +684 -0
- package/dist/server.d.ts +127 -8
- package/dist/server.js +740 -933
- package/dist/server.js.map +1 -1
- package/dist/ssrfGuard.d.ts +54 -0
- package/dist/ssrfGuard.js +122 -0
- package/dist/ssrfGuard.js.map +1 -0
- package/dist/streamableHttp.d.ts +39 -1
- package/dist/streamableHttp.js +128 -17
- package/dist/streamableHttp.js.map +1 -1
- package/dist/tokenUsageTracker.d.ts +33 -0
- package/dist/tokenUsageTracker.js +146 -0
- package/dist/tokenUsageTracker.js.map +1 -0
- package/dist/tools/activityLog.d.ts +2 -0
- package/dist/tools/addLinearComment.d.ts +1 -0
- package/dist/tools/addLinearComment.js +4 -2
- package/dist/tools/addLinearComment.js.map +1 -1
- package/dist/tools/batchLsp.d.ts +3 -0
- package/dist/tools/bridgeDoctor.d.ts +1 -0
- package/dist/tools/bridgeDoctor.js +2 -2
- package/dist/tools/bridgeDoctor.js.map +1 -1
- package/dist/tools/bridgeStatus.d.ts +1 -0
- package/dist/tools/cancelClaudeTask.d.ts +2 -0
- package/dist/tools/cancelClaudeTask.js +1 -0
- package/dist/tools/cancelClaudeTask.js.map +1 -1
- package/dist/tools/checkDocumentDirty.d.ts +1 -0
- package/dist/tools/clipboard.d.ts +2 -0
- package/dist/tools/closeTabs.d.ts +2 -0
- package/dist/tools/codeLens.d.ts +1 -0
- package/dist/tools/contextBundle.d.ts +1 -0
- package/dist/tools/createIssueFromAIComment.d.ts +1 -0
- package/dist/tools/createLinearIssue.d.ts +1 -0
- package/dist/tools/ctxGetTaskContext.d.ts +1 -0
- package/dist/tools/ctxQueryTraces.d.ts +1 -0
- package/dist/tools/ctxSaveTrace.d.ts +1 -0
- package/dist/tools/debug.d.ts +4 -0
- package/dist/tools/decorations.d.ts +2 -0
- package/dist/tools/documentLinks.d.ts +1 -0
- package/dist/tools/editText.d.ts +1 -0
- package/dist/tools/enrichCommit.d.ts +1 -0
- package/dist/tools/enrichStackTrace.d.ts +1 -0
- package/dist/tools/explainDiagnostic.d.ts +1 -0
- package/dist/tools/explainSymbol.d.ts +1 -0
- package/dist/tools/fetchCalendarEvents.d.ts +1 -0
- package/dist/tools/fetchGithubIssue.d.ts +1 -0
- package/dist/tools/fetchGithubPR.d.ts +1 -0
- package/dist/tools/fetchLinearIssue.d.ts +1 -0
- package/dist/tools/fetchSentryIssue.d.ts +1 -0
- package/dist/tools/fetchSlackProfile.d.ts +1 -0
- package/dist/tools/fetchSlackProfile.js +4 -1
- package/dist/tools/fetchSlackProfile.js.map +1 -1
- package/dist/tools/fileOperations.d.ts +3 -0
- package/dist/tools/fileWatcher.d.ts +2 -0
- package/dist/tools/findFiles.d.ts +1 -0
- package/dist/tools/findRelatedTests.d.ts +1 -0
- package/dist/tools/fixAllLintErrors.d.ts +1 -0
- package/dist/tools/foldingRanges.d.ts +1 -0
- package/dist/tools/formatDocument.d.ts +1 -0
- package/dist/tools/generateTests.d.ts +1 -0
- package/dist/tools/getAIComments.d.ts +1 -0
- package/dist/tools/getAnalyticsReport.d.ts +1 -0
- package/dist/tools/getArchitectureContext.d.ts +1 -0
- package/dist/tools/getBufferContent.d.ts +1 -0
- package/dist/tools/getChangeImpact.d.ts +1 -0
- package/dist/tools/getClaudeTaskStatus.d.ts +2 -0
- package/dist/tools/getClaudeTaskStatus.js +1 -0
- package/dist/tools/getClaudeTaskStatus.js.map +1 -1
- package/dist/tools/getCodeCoverage.d.ts +1 -0
- package/dist/tools/getCommitsForIssue.d.ts +1 -0
- package/dist/tools/getConnectorStatus.d.ts +1 -0
- package/dist/tools/getCurrentSelection.d.ts +2 -0
- package/dist/tools/getDebugState.d.ts +1 -0
- package/dist/tools/getDependencyTree.d.ts +1 -0
- package/dist/tools/getDiagnostics.d.ts +1 -0
- package/dist/tools/getDiffFromHandoff.d.ts +1 -0
- package/dist/tools/getDocumentSymbols.d.ts +25 -0
- package/dist/tools/getDocumentSymbols.js +74 -8
- package/dist/tools/getDocumentSymbols.js.map +1 -1
- package/dist/tools/getFileTree.d.ts +1 -0
- package/dist/tools/getGitDiff.d.ts +1 -0
- package/dist/tools/getGitHotspots.d.ts +1 -0
- package/dist/tools/getGitLog.d.ts +1 -0
- package/dist/tools/getGitStatus.d.ts +1 -0
- package/dist/tools/getImportTree.d.ts +1 -0
- package/dist/tools/getImportedSignatures.d.ts +1 -0
- package/dist/tools/getOpenEditors.d.ts +1 -0
- package/dist/tools/getPRTemplate.d.ts +1 -0
- package/dist/tools/getProjectContext.d.ts +1 -0
- package/dist/tools/getProjectInfo.d.ts +1 -0
- package/dist/tools/getSecurityAdvisories.d.ts +1 -0
- package/dist/tools/getSecurityAdvisories.js +10 -1
- package/dist/tools/getSecurityAdvisories.js.map +1 -1
- package/dist/tools/getSessionUsage.d.ts +4 -0
- package/dist/tools/getSessionUsage.js +3 -0
- package/dist/tools/getSessionUsage.js.map +1 -1
- package/dist/tools/getSymbolHistory.d.ts +1 -0
- package/dist/tools/getToolCapabilities.d.ts +1 -0
- package/dist/tools/getTypeSignature.d.ts +1 -0
- package/dist/tools/getWorkspaceFolders.d.ts +1 -0
- package/dist/tools/getWorkspaceSettings.d.ts +1 -0
- package/dist/tools/gitHistory.d.ts +2 -0
- package/dist/tools/gitWrite.d.ts +11 -0
- package/dist/tools/github/actions.d.ts +2 -0
- package/dist/tools/github/actions.js +4 -2
- package/dist/tools/github/actions.js.map +1 -1
- package/dist/tools/github/composite.d.ts +342 -0
- package/dist/tools/github/composite.js +343 -0
- package/dist/tools/github/composite.js.map +1 -0
- package/dist/tools/github/index.d.ts +1 -0
- package/dist/tools/github/index.js +1 -0
- package/dist/tools/github/index.js.map +1 -1
- package/dist/tools/github/issues.d.ts +4 -0
- package/dist/tools/github/issues.js +8 -4
- package/dist/tools/github/issues.js.map +1 -1
- package/dist/tools/github/pr.d.ts +7 -0
- package/dist/tools/github/pr.js +50 -12
- package/dist/tools/github/pr.js.map +1 -1
- package/dist/tools/handoffNote.d.ts +4 -0
- package/dist/tools/handoffNote.js +2 -0
- package/dist/tools/handoffNote.js.map +1 -1
- package/dist/tools/hoverAtCursor.d.ts +1 -0
- package/dist/tools/httpClient.d.ts +2 -0
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.js +47 -8
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/inlayHints.d.ts +1 -0
- package/dist/tools/launchQuickTask.d.ts +2 -0
- package/dist/tools/launchQuickTask.js +1 -0
- package/dist/tools/launchQuickTask.js.map +1 -1
- package/dist/tools/listClaudeTasks.d.ts +2 -0
- package/dist/tools/listClaudeTasks.js +1 -0
- package/dist/tools/listClaudeTasks.js.map +1 -1
- package/dist/tools/listTerminals.d.ts +1 -0
- package/dist/tools/lsp.d.ts +14 -0
- package/dist/tools/navigateToSymbolByName.d.ts +1 -0
- package/dist/tools/openDiff.d.ts +1 -0
- package/dist/tools/openFile.d.ts +1 -0
- package/dist/tools/openInBrowser.d.ts +1 -0
- package/dist/tools/organizeImports.d.ts +1 -0
- package/dist/tools/performanceReport.d.ts +1 -0
- package/dist/tools/planPersistence.d.ts +5 -0
- package/dist/tools/previewEdit.d.ts +1 -0
- package/dist/tools/refactorAnalyze.d.ts +1 -0
- package/dist/tools/refactorPreview.d.ts +2 -0
- package/dist/tools/refactorPreview.js +1 -0
- package/dist/tools/refactorPreview.js.map +1 -1
- package/dist/tools/replaceBlock.d.ts +1 -0
- package/dist/tools/resumeClaudeTask.d.ts +2 -0
- package/dist/tools/resumeClaudeTask.js +1 -0
- package/dist/tools/resumeClaudeTask.js.map +1 -1
- package/dist/tools/runClaudeTask.d.ts +2 -0
- package/dist/tools/runClaudeTask.js +1 -0
- package/dist/tools/runClaudeTask.js.map +1 -1
- package/dist/tools/runCommand.d.ts +1 -0
- package/dist/tools/runCommand.js +5 -0
- package/dist/tools/runCommand.js.map +1 -1
- package/dist/tools/runTests.d.ts +1 -0
- package/dist/tools/saveDocument.d.ts +1 -0
- package/dist/tools/screenshotAndAnnotate.d.ts +1 -0
- package/dist/tools/searchAndReplace.d.ts +1 -0
- package/dist/tools/searchTools.d.ts +1 -0
- package/dist/tools/searchTools.js +1 -1
- package/dist/tools/searchTools.js.map +1 -1
- package/dist/tools/searchWorkspace.d.ts +1 -0
- package/dist/tools/selectionRanges.d.ts +1 -0
- package/dist/tools/semanticTokens.d.ts +1 -0
- package/dist/tools/setActiveWorkspaceFolder.d.ts +1 -0
- package/dist/tools/signatureHelp.d.ts +1 -0
- package/dist/tools/slackListChannels.d.ts +1 -0
- package/dist/tools/slackListChannels.js.map +1 -1
- package/dist/tools/slackPostMessage.d.ts +1 -0
- package/dist/tools/slackPostMessage.js +11 -6
- package/dist/tools/slackPostMessage.js.map +1 -1
- package/dist/tools/terminal.d.ts +6 -0
- package/dist/tools/terminal.js +4 -0
- package/dist/tools/terminal.js.map +1 -1
- package/dist/tools/testTraceToSource.d.ts +1 -0
- package/dist/tools/testTraceToSource.js +2 -2
- package/dist/tools/testTraceToSource.js.map +1 -1
- package/dist/tools/transaction.d.ts +23 -0
- package/dist/tools/transaction.js +29 -0
- package/dist/tools/transaction.js.map +1 -1
- package/dist/tools/typeHierarchy.d.ts +1 -0
- package/dist/tools/updateLinearIssue.d.ts +1 -0
- package/dist/tools/updateLinearIssue.js +20 -6
- package/dist/tools/updateLinearIssue.js.map +1 -1
- package/dist/tools/utils.d.ts +6 -0
- package/dist/tools/utils.js +59 -0
- package/dist/tools/utils.js.map +1 -1
- package/dist/tools/vscodeCommands.d.ts +2 -0
- package/dist/tools/vscodeTasks.d.ts +2 -0
- package/dist/tools/workspaceSettings.d.ts +1 -0
- package/dist/traceEncryption.d.ts +46 -0
- package/dist/traceEncryption.js +124 -0
- package/dist/traceEncryption.js.map +1 -0
- package/dist/transport.d.ts +46 -1
- package/dist/transport.js +173 -19
- package/dist/transport.js.map +1 -1
- package/package.json +30 -8
- package/scripts/mcp-stdio-shim.cjs +19 -3
- package/scripts/start-all.sh +34 -3
- package/templates/automation-policies/recipe-authoring.json +25 -0
- package/templates/automation-policy.example.json +6 -0
- package/templates/co.patchwork-os.bridge.plist +34 -0
- package/templates/policies/README.md +72 -0
- package/templates/policies/conservative.json +14 -0
- package/templates/policies/developer.json +14 -0
- package/templates/policies/headless-ci.json +24 -0
- package/templates/policies/personal-assistant.json +15 -0
- package/templates/policies/regulated-industry.json +18 -0
- package/templates/recipes/approval-queue-ui-test.yaml +205 -0
- package/templates/recipes/lint-on-save.yaml +1 -2
- package/templates/recipes/morning-brief-slack.yaml +57 -0
- package/templates/recipes/morning-brief.yaml +2 -2
- package/templates/recipes/project-health-check.yaml +50 -0
- package/templates/recipes/webhook/README.md +70 -0
- package/templates/recipes/webhook/capture-thought.yaml +26 -0
- package/templates/recipes/webhook/customer-escalation.yaml +49 -0
- package/templates/recipes/webhook/incident-intake.yaml +46 -0
- package/templates/recipes/webhook/meeting-prep.yaml +48 -0
- package/templates/recipes/webhook/morning-brief.yaml +57 -0
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PagerDuty tools — read incidents, services, on-call rotations, plus writes
|
|
3
|
+
* (acknowledge, resolve, add note, create incident).
|
|
4
|
+
*
|
|
5
|
+
* Self-registering tool module for the recipe tool registry. Read tools wrap
|
|
6
|
+
* connector throws into the `{count, items, error}` shape that the runner's
|
|
7
|
+
* silent-fail detector (PR #75) catches as a step error rather than a silent
|
|
8
|
+
* empty list. Write tools use a single-object response shape (no count/items)
|
|
9
|
+
* but still surface failures via an `error` field.
|
|
10
|
+
*
|
|
11
|
+
* Identity for writes (PagerDuty `From` header) is sourced exclusively from
|
|
12
|
+
* the PAGERDUTY_FROM_EMAIL env var, NOT from recipe tool params — recipes
|
|
13
|
+
* can't spoof who acknowledged / resolved / created an incident.
|
|
14
|
+
*/
|
|
15
|
+
import { CommonSchemas, registerTool } from "../toolRegistry.js";
|
|
16
|
+
// ============================================================================
|
|
17
|
+
// pagerduty.list_incidents
|
|
18
|
+
// ============================================================================
|
|
19
|
+
registerTool({
|
|
20
|
+
id: "pagerduty.list_incidents",
|
|
21
|
+
namespace: "pagerduty",
|
|
22
|
+
description: "List PagerDuty incidents, optionally filtered by status, urgency, and time range.",
|
|
23
|
+
paramsSchema: {
|
|
24
|
+
type: "object",
|
|
25
|
+
properties: {
|
|
26
|
+
statuses: {
|
|
27
|
+
type: "array",
|
|
28
|
+
items: { type: "string" },
|
|
29
|
+
description: 'Filter by incident status (e.g. ["triggered", "acknowledged", "resolved"])',
|
|
30
|
+
},
|
|
31
|
+
urgencies: {
|
|
32
|
+
type: "array",
|
|
33
|
+
items: { type: "string" },
|
|
34
|
+
description: 'Filter by urgency (e.g. ["high", "low"])',
|
|
35
|
+
},
|
|
36
|
+
since: {
|
|
37
|
+
type: "string",
|
|
38
|
+
description: "ISO 8601 lower bound on created_at",
|
|
39
|
+
},
|
|
40
|
+
until: {
|
|
41
|
+
type: "string",
|
|
42
|
+
description: "ISO 8601 upper bound on created_at",
|
|
43
|
+
},
|
|
44
|
+
max: CommonSchemas.max,
|
|
45
|
+
into: CommonSchemas.into,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
outputSchema: {
|
|
49
|
+
type: "object",
|
|
50
|
+
properties: {
|
|
51
|
+
count: { type: "number" },
|
|
52
|
+
items: { type: "array", items: { type: "object" } },
|
|
53
|
+
error: { type: "string" },
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
riskDefault: "low",
|
|
57
|
+
isWrite: false,
|
|
58
|
+
isConnector: true,
|
|
59
|
+
execute: async ({ params }) => {
|
|
60
|
+
const { getPagerDutyConnector } = await import("../../connectors/pagerduty.js");
|
|
61
|
+
const limit = typeof params.max === "number" ? params.max : 25;
|
|
62
|
+
try {
|
|
63
|
+
const connector = getPagerDutyConnector();
|
|
64
|
+
const { incidents } = await connector.listIncidents({
|
|
65
|
+
statuses: Array.isArray(params.statuses)
|
|
66
|
+
? params.statuses
|
|
67
|
+
: undefined,
|
|
68
|
+
urgencies: Array.isArray(params.urgencies)
|
|
69
|
+
? params.urgencies
|
|
70
|
+
: undefined,
|
|
71
|
+
since: typeof params.since === "string" ? params.since : undefined,
|
|
72
|
+
until: typeof params.until === "string" ? params.until : undefined,
|
|
73
|
+
limit,
|
|
74
|
+
});
|
|
75
|
+
return JSON.stringify({ count: incidents.length, items: incidents });
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
return JSON.stringify({
|
|
79
|
+
count: 0,
|
|
80
|
+
items: [],
|
|
81
|
+
error: err instanceof Error ? err.message : String(err),
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
// ============================================================================
|
|
87
|
+
// pagerduty.get_incident
|
|
88
|
+
// ============================================================================
|
|
89
|
+
registerTool({
|
|
90
|
+
id: "pagerduty.get_incident",
|
|
91
|
+
namespace: "pagerduty",
|
|
92
|
+
description: "Fetch a single PagerDuty incident by id (e.g. 'PXXXX').",
|
|
93
|
+
paramsSchema: {
|
|
94
|
+
type: "object",
|
|
95
|
+
properties: {
|
|
96
|
+
id: { type: "string", description: "PagerDuty incident id" },
|
|
97
|
+
into: CommonSchemas.into,
|
|
98
|
+
},
|
|
99
|
+
required: ["id"],
|
|
100
|
+
},
|
|
101
|
+
outputSchema: {
|
|
102
|
+
type: "object",
|
|
103
|
+
properties: {
|
|
104
|
+
count: { type: "number" },
|
|
105
|
+
items: { type: "array", items: { type: "object" } },
|
|
106
|
+
error: { type: "string" },
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
riskDefault: "low",
|
|
110
|
+
isWrite: false,
|
|
111
|
+
isConnector: true,
|
|
112
|
+
execute: async ({ params }) => {
|
|
113
|
+
const { getPagerDutyConnector } = await import("../../connectors/pagerduty.js");
|
|
114
|
+
try {
|
|
115
|
+
const connector = getPagerDutyConnector();
|
|
116
|
+
const incident = await connector.getIncident(params.id);
|
|
117
|
+
return JSON.stringify({ count: 1, items: [incident] });
|
|
118
|
+
}
|
|
119
|
+
catch (err) {
|
|
120
|
+
return JSON.stringify({
|
|
121
|
+
count: 0,
|
|
122
|
+
items: [],
|
|
123
|
+
error: err instanceof Error ? err.message : String(err),
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
// ============================================================================
|
|
129
|
+
// pagerduty.list_services
|
|
130
|
+
// ============================================================================
|
|
131
|
+
registerTool({
|
|
132
|
+
id: "pagerduty.list_services",
|
|
133
|
+
namespace: "pagerduty",
|
|
134
|
+
description: "List PagerDuty services (technical components paged by PD).",
|
|
135
|
+
paramsSchema: {
|
|
136
|
+
type: "object",
|
|
137
|
+
properties: {
|
|
138
|
+
max: CommonSchemas.max,
|
|
139
|
+
into: CommonSchemas.into,
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
outputSchema: {
|
|
143
|
+
type: "object",
|
|
144
|
+
properties: {
|
|
145
|
+
count: { type: "number" },
|
|
146
|
+
items: { type: "array", items: { type: "object" } },
|
|
147
|
+
error: { type: "string" },
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
riskDefault: "low",
|
|
151
|
+
isWrite: false,
|
|
152
|
+
isConnector: true,
|
|
153
|
+
execute: async ({ params }) => {
|
|
154
|
+
const { getPagerDutyConnector } = await import("../../connectors/pagerduty.js");
|
|
155
|
+
const limit = typeof params.max === "number" ? params.max : 25;
|
|
156
|
+
try {
|
|
157
|
+
const connector = getPagerDutyConnector();
|
|
158
|
+
const { services } = await connector.listServices({ limit });
|
|
159
|
+
return JSON.stringify({ count: services.length, items: services });
|
|
160
|
+
}
|
|
161
|
+
catch (err) {
|
|
162
|
+
return JSON.stringify({
|
|
163
|
+
count: 0,
|
|
164
|
+
items: [],
|
|
165
|
+
error: err instanceof Error ? err.message : String(err),
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
});
|
|
170
|
+
// ============================================================================
|
|
171
|
+
// pagerduty.list_on_calls
|
|
172
|
+
// ============================================================================
|
|
173
|
+
registerTool({
|
|
174
|
+
id: "pagerduty.list_on_calls",
|
|
175
|
+
namespace: "pagerduty",
|
|
176
|
+
description: "List current PagerDuty on-call assignments, optionally filtered by schedule ids.",
|
|
177
|
+
paramsSchema: {
|
|
178
|
+
type: "object",
|
|
179
|
+
properties: {
|
|
180
|
+
scheduleIds: {
|
|
181
|
+
type: "array",
|
|
182
|
+
items: { type: "string" },
|
|
183
|
+
description: "Restrict results to these schedule ids",
|
|
184
|
+
},
|
|
185
|
+
max: CommonSchemas.max,
|
|
186
|
+
into: CommonSchemas.into,
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
outputSchema: {
|
|
190
|
+
type: "object",
|
|
191
|
+
properties: {
|
|
192
|
+
count: { type: "number" },
|
|
193
|
+
items: { type: "array", items: { type: "object" } },
|
|
194
|
+
error: { type: "string" },
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
riskDefault: "low",
|
|
198
|
+
isWrite: false,
|
|
199
|
+
isConnector: true,
|
|
200
|
+
execute: async ({ params }) => {
|
|
201
|
+
const { getPagerDutyConnector } = await import("../../connectors/pagerduty.js");
|
|
202
|
+
const limit = typeof params.max === "number" ? params.max : 25;
|
|
203
|
+
try {
|
|
204
|
+
const connector = getPagerDutyConnector();
|
|
205
|
+
const { oncalls } = await connector.listOnCalls({
|
|
206
|
+
scheduleIds: Array.isArray(params.scheduleIds)
|
|
207
|
+
? params.scheduleIds
|
|
208
|
+
: undefined,
|
|
209
|
+
limit,
|
|
210
|
+
});
|
|
211
|
+
return JSON.stringify({ count: oncalls.length, items: oncalls });
|
|
212
|
+
}
|
|
213
|
+
catch (err) {
|
|
214
|
+
return JSON.stringify({
|
|
215
|
+
count: 0,
|
|
216
|
+
items: [],
|
|
217
|
+
error: err instanceof Error ? err.message : String(err),
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
});
|
|
222
|
+
// ============================================================================
|
|
223
|
+
// pagerduty.acknowledge_incident (write-gated)
|
|
224
|
+
// ============================================================================
|
|
225
|
+
registerTool({
|
|
226
|
+
id: "pagerduty.acknowledge_incident",
|
|
227
|
+
namespace: "pagerduty",
|
|
228
|
+
description: "Acknowledge a PagerDuty incident (status -> acknowledged). Identity sourced from PAGERDUTY_FROM_EMAIL env var.",
|
|
229
|
+
paramsSchema: {
|
|
230
|
+
type: "object",
|
|
231
|
+
properties: {
|
|
232
|
+
incident_id: {
|
|
233
|
+
type: "string",
|
|
234
|
+
description: "PagerDuty incident id (e.g. 'PXXXX')",
|
|
235
|
+
},
|
|
236
|
+
into: CommonSchemas.into,
|
|
237
|
+
},
|
|
238
|
+
required: ["incident_id"],
|
|
239
|
+
},
|
|
240
|
+
outputSchema: {
|
|
241
|
+
type: "object",
|
|
242
|
+
properties: {
|
|
243
|
+
ok: { type: "boolean" },
|
|
244
|
+
id: { type: "string" },
|
|
245
|
+
status: { type: "string" },
|
|
246
|
+
error: { type: "string" },
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
riskDefault: "medium",
|
|
250
|
+
isWrite: true,
|
|
251
|
+
isConnector: true,
|
|
252
|
+
execute: async ({ params }) => {
|
|
253
|
+
const { getPagerDutyConnector } = await import("../../connectors/pagerduty.js");
|
|
254
|
+
try {
|
|
255
|
+
const connector = getPagerDutyConnector();
|
|
256
|
+
const incident = await connector.acknowledgeIncident(params.incident_id);
|
|
257
|
+
return JSON.stringify({
|
|
258
|
+
ok: true,
|
|
259
|
+
id: incident.id,
|
|
260
|
+
status: incident.status,
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
catch (err) {
|
|
264
|
+
return JSON.stringify({
|
|
265
|
+
ok: false,
|
|
266
|
+
error: err instanceof Error ? err.message : String(err),
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
});
|
|
271
|
+
// ============================================================================
|
|
272
|
+
// pagerduty.resolve_incident (write-gated)
|
|
273
|
+
// ============================================================================
|
|
274
|
+
registerTool({
|
|
275
|
+
id: "pagerduty.resolve_incident",
|
|
276
|
+
namespace: "pagerduty",
|
|
277
|
+
description: "Resolve a PagerDuty incident (status -> resolved), optionally with a resolution note. Identity sourced from PAGERDUTY_FROM_EMAIL env var.",
|
|
278
|
+
paramsSchema: {
|
|
279
|
+
type: "object",
|
|
280
|
+
properties: {
|
|
281
|
+
incident_id: {
|
|
282
|
+
type: "string",
|
|
283
|
+
description: "PagerDuty incident id (e.g. 'PXXXX')",
|
|
284
|
+
},
|
|
285
|
+
resolution: {
|
|
286
|
+
type: "string",
|
|
287
|
+
description: "Optional resolution note attached to the close",
|
|
288
|
+
},
|
|
289
|
+
into: CommonSchemas.into,
|
|
290
|
+
},
|
|
291
|
+
required: ["incident_id"],
|
|
292
|
+
},
|
|
293
|
+
outputSchema: {
|
|
294
|
+
type: "object",
|
|
295
|
+
properties: {
|
|
296
|
+
ok: { type: "boolean" },
|
|
297
|
+
id: { type: "string" },
|
|
298
|
+
status: { type: "string" },
|
|
299
|
+
error: { type: "string" },
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
riskDefault: "medium",
|
|
303
|
+
isWrite: true,
|
|
304
|
+
isConnector: true,
|
|
305
|
+
execute: async ({ params }) => {
|
|
306
|
+
const { getPagerDutyConnector } = await import("../../connectors/pagerduty.js");
|
|
307
|
+
try {
|
|
308
|
+
const connector = getPagerDutyConnector();
|
|
309
|
+
const incident = await connector.resolveIncident(params.incident_id, {
|
|
310
|
+
resolution: typeof params.resolution === "string"
|
|
311
|
+
? params.resolution
|
|
312
|
+
: undefined,
|
|
313
|
+
});
|
|
314
|
+
return JSON.stringify({
|
|
315
|
+
ok: true,
|
|
316
|
+
id: incident.id,
|
|
317
|
+
status: incident.status,
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
catch (err) {
|
|
321
|
+
return JSON.stringify({
|
|
322
|
+
ok: false,
|
|
323
|
+
error: err instanceof Error ? err.message : String(err),
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
});
|
|
328
|
+
// ============================================================================
|
|
329
|
+
// pagerduty.add_incident_note (write-gated)
|
|
330
|
+
// ============================================================================
|
|
331
|
+
registerTool({
|
|
332
|
+
id: "pagerduty.add_incident_note",
|
|
333
|
+
namespace: "pagerduty",
|
|
334
|
+
description: "Append a note to a PagerDuty incident timeline. Identity sourced from PAGERDUTY_FROM_EMAIL env var.",
|
|
335
|
+
paramsSchema: {
|
|
336
|
+
type: "object",
|
|
337
|
+
properties: {
|
|
338
|
+
incident_id: {
|
|
339
|
+
type: "string",
|
|
340
|
+
description: "PagerDuty incident id (e.g. 'PXXXX')",
|
|
341
|
+
},
|
|
342
|
+
content: { type: "string", description: "Note content (plain text)" },
|
|
343
|
+
into: CommonSchemas.into,
|
|
344
|
+
},
|
|
345
|
+
required: ["incident_id", "content"],
|
|
346
|
+
},
|
|
347
|
+
outputSchema: {
|
|
348
|
+
type: "object",
|
|
349
|
+
properties: {
|
|
350
|
+
ok: { type: "boolean" },
|
|
351
|
+
id: { type: "string" },
|
|
352
|
+
content: { type: "string" },
|
|
353
|
+
created_at: { type: "string" },
|
|
354
|
+
error: { type: "string" },
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
riskDefault: "low",
|
|
358
|
+
isWrite: true,
|
|
359
|
+
isConnector: true,
|
|
360
|
+
execute: async ({ params }) => {
|
|
361
|
+
const { getPagerDutyConnector } = await import("../../connectors/pagerduty.js");
|
|
362
|
+
try {
|
|
363
|
+
const connector = getPagerDutyConnector();
|
|
364
|
+
const note = await connector.addIncidentNote(params.incident_id, { content: params.content });
|
|
365
|
+
return JSON.stringify({
|
|
366
|
+
ok: true,
|
|
367
|
+
id: note.id,
|
|
368
|
+
content: note.content,
|
|
369
|
+
created_at: note.created_at,
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
catch (err) {
|
|
373
|
+
return JSON.stringify({
|
|
374
|
+
ok: false,
|
|
375
|
+
error: err instanceof Error ? err.message : String(err),
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
});
|
|
380
|
+
// ============================================================================
|
|
381
|
+
// pagerduty.create_incident (write-gated)
|
|
382
|
+
// ============================================================================
|
|
383
|
+
registerTool({
|
|
384
|
+
id: "pagerduty.create_incident",
|
|
385
|
+
namespace: "pagerduty",
|
|
386
|
+
description: "Create a new PagerDuty incident on a service. Default urgency: high. Identity sourced from PAGERDUTY_FROM_EMAIL env var.",
|
|
387
|
+
paramsSchema: {
|
|
388
|
+
type: "object",
|
|
389
|
+
properties: {
|
|
390
|
+
title: { type: "string", description: "Incident title" },
|
|
391
|
+
service_id: {
|
|
392
|
+
type: "string",
|
|
393
|
+
description: "PagerDuty service id (PD service the incident attaches to)",
|
|
394
|
+
},
|
|
395
|
+
urgency: {
|
|
396
|
+
type: "string",
|
|
397
|
+
enum: ["high", "low"],
|
|
398
|
+
description: "Incident urgency. Defaults to 'high'.",
|
|
399
|
+
default: "high",
|
|
400
|
+
},
|
|
401
|
+
body: {
|
|
402
|
+
type: "string",
|
|
403
|
+
description: "Optional incident body (free-form details)",
|
|
404
|
+
},
|
|
405
|
+
into: CommonSchemas.into,
|
|
406
|
+
},
|
|
407
|
+
required: ["title", "service_id"],
|
|
408
|
+
},
|
|
409
|
+
outputSchema: {
|
|
410
|
+
type: "object",
|
|
411
|
+
properties: {
|
|
412
|
+
ok: { type: "boolean" },
|
|
413
|
+
id: { type: "string" },
|
|
414
|
+
incident_number: { type: "number" },
|
|
415
|
+
status: { type: "string" },
|
|
416
|
+
html_url: { type: "string" },
|
|
417
|
+
error: { type: "string" },
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
riskDefault: "medium",
|
|
421
|
+
isWrite: true,
|
|
422
|
+
isConnector: true,
|
|
423
|
+
execute: async ({ params }) => {
|
|
424
|
+
const { getPagerDutyConnector } = await import("../../connectors/pagerduty.js");
|
|
425
|
+
try {
|
|
426
|
+
const connector = getPagerDutyConnector();
|
|
427
|
+
const incident = await connector.createIncident({
|
|
428
|
+
title: params.title,
|
|
429
|
+
serviceId: params.service_id,
|
|
430
|
+
urgency: params.urgency === "low" || params.urgency === "high"
|
|
431
|
+
? params.urgency
|
|
432
|
+
: "high",
|
|
433
|
+
body: typeof params.body === "string" ? params.body : undefined,
|
|
434
|
+
});
|
|
435
|
+
return JSON.stringify({
|
|
436
|
+
ok: true,
|
|
437
|
+
id: incident.id,
|
|
438
|
+
incident_number: incident.incident_number,
|
|
439
|
+
status: incident.status,
|
|
440
|
+
html_url: incident.html_url,
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
catch (err) {
|
|
444
|
+
return JSON.stringify({
|
|
445
|
+
ok: false,
|
|
446
|
+
error: err instanceof Error ? err.message : String(err),
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
});
|
|
451
|
+
//# sourceMappingURL=pagerduty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagerduty.js","sourceRoot":"","sources":["../../../src/recipes/tools/pagerduty.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEjE,+EAA+E;AAC/E,2BAA2B;AAC3B,+EAA+E;AAE/E,YAAY,CAAC;IACX,EAAE,EAAE,0BAA0B;IAC9B,SAAS,EAAE,WAAW;IACtB,WAAW,EACT,mFAAmF;IACrF,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,E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C,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sentry tools — read wrapper for the Sentry MCP-backed connector.
|
|
3
|
+
*
|
|
4
|
+
* Self-registering tool module for the recipe tool registry. The Sentry
|
|
5
|
+
* connector currently exposes one capability (`fetchIssueStackTrace`) routed
|
|
6
|
+
* through Sentry's official MCP server. This module wraps it so recipes can
|
|
7
|
+
* pull a stack trace by issue ID or URL and pipe it into downstream steps
|
|
8
|
+
* (e.g., enrichStackTrace, runClaudeTask).
|
|
9
|
+
*
|
|
10
|
+
* Read-only: Sentry connector is read-only per the connector inventory.
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sentry tools — read wrapper for the Sentry MCP-backed connector.
|
|
3
|
+
*
|
|
4
|
+
* Self-registering tool module for the recipe tool registry. The Sentry
|
|
5
|
+
* connector currently exposes one capability (`fetchIssueStackTrace`) routed
|
|
6
|
+
* through Sentry's official MCP server. This module wraps it so recipes can
|
|
7
|
+
* pull a stack trace by issue ID or URL and pipe it into downstream steps
|
|
8
|
+
* (e.g., enrichStackTrace, runClaudeTask).
|
|
9
|
+
*
|
|
10
|
+
* Read-only: Sentry connector is read-only per the connector inventory.
|
|
11
|
+
*/
|
|
12
|
+
import { CommonSchemas, registerTool } from "../toolRegistry.js";
|
|
13
|
+
// ============================================================================
|
|
14
|
+
// sentry.get_issue
|
|
15
|
+
// ============================================================================
|
|
16
|
+
registerTool({
|
|
17
|
+
id: "sentry.get_issue",
|
|
18
|
+
namespace: "sentry",
|
|
19
|
+
description: "Fetch a Sentry issue by ID or full sentry.io URL. Returns the stack trace string, issue title, and resolved issue ID — ready to pipe into enrichStackTrace.",
|
|
20
|
+
paramsSchema: {
|
|
21
|
+
type: "object",
|
|
22
|
+
properties: {
|
|
23
|
+
issue: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "Sentry issue ID (e.g., '4567890123') or full URL (e.g., 'https://my-org.sentry.io/issues/4567890123/'). Org slug is inferred from the URL when present.",
|
|
26
|
+
},
|
|
27
|
+
into: CommonSchemas.into,
|
|
28
|
+
},
|
|
29
|
+
required: ["issue"],
|
|
30
|
+
},
|
|
31
|
+
outputSchema: {
|
|
32
|
+
type: "object",
|
|
33
|
+
properties: {
|
|
34
|
+
ok: { type: "boolean" },
|
|
35
|
+
issueId: { type: "string" },
|
|
36
|
+
title: { type: "string" },
|
|
37
|
+
stackTrace: { type: "string" },
|
|
38
|
+
error: { type: "string" },
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
riskDefault: "low",
|
|
42
|
+
isWrite: false,
|
|
43
|
+
isConnector: true,
|
|
44
|
+
execute: async ({ params }) => {
|
|
45
|
+
const { fetchIssueStackTrace, loadTokens } = await import("../../connectors/sentry.js");
|
|
46
|
+
if (!loadTokens()) {
|
|
47
|
+
return JSON.stringify({ ok: false, error: "Sentry not connected" });
|
|
48
|
+
}
|
|
49
|
+
const issue = typeof params.issue === "string" ? params.issue : "";
|
|
50
|
+
if (!issue) {
|
|
51
|
+
return JSON.stringify({
|
|
52
|
+
ok: false,
|
|
53
|
+
error: "get_issue requires `issue` (ID or URL)",
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
const result = await fetchIssueStackTrace(issue);
|
|
58
|
+
return JSON.stringify({
|
|
59
|
+
ok: true,
|
|
60
|
+
issueId: result.issueId,
|
|
61
|
+
title: result.title,
|
|
62
|
+
stackTrace: result.stackTrace,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
return JSON.stringify({
|
|
67
|
+
ok: false,
|
|
68
|
+
error: err instanceof Error ? err.message : String(err),
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=sentry.js.map
|
|
@@ -0,0 +1 @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QACD,MAAM,KAAK,GAAG,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QACnE,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,IAAI,CAAC,SAAS,CAAC;gBACpB,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE,wCAAwC;aAChD,CAAC,CAAC;QACL,CAAC;QACD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,oBAAoB,CAAC,KAAK,CAAC,CAAC;YACjD,OAAO,IAAI,CAAC,SAAS,CAAC;gBACpB,EAAE,EAAE,IAAI;gBACR,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,UAAU,EAAE,MAAM,CAAC,UAAU;aAC9B,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,IAAI,CAAC,SAAS,CAAC;gBACpB,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aACxD,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slack tools — slack.post_message
|
|
3
|
+
*
|
|
4
|
+
* Self-registering tool module for the recipe tool registry.
|
|
5
|
+
*/
|
|
6
|
+
import { assertWriteAllowed } from "../../featureFlags.js";
|
|
7
|
+
import { CommonSchemas, registerTool, } from "../toolRegistry.js";
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// slack.post_message
|
|
10
|
+
// ============================================================================
|
|
11
|
+
const slackPostMessage = {
|
|
12
|
+
id: "slack.post_message",
|
|
13
|
+
namespace: "slack",
|
|
14
|
+
description: "Post a message to a Slack channel (requires Slack connector auth).",
|
|
15
|
+
paramsSchema: {
|
|
16
|
+
type: "object",
|
|
17
|
+
properties: {
|
|
18
|
+
channel: {
|
|
19
|
+
type: "string",
|
|
20
|
+
description: "Channel name or ID (e.g., 'general', 'C123456')",
|
|
21
|
+
default: "general",
|
|
22
|
+
},
|
|
23
|
+
text: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "Message text (supports {{template}} substitution)",
|
|
26
|
+
},
|
|
27
|
+
blocks: {
|
|
28
|
+
type: "array",
|
|
29
|
+
description: "Slack Block Kit blocks array (optional, used instead of text)",
|
|
30
|
+
items: { type: "object" },
|
|
31
|
+
},
|
|
32
|
+
thread_ts: {
|
|
33
|
+
type: "string",
|
|
34
|
+
description: "Thread timestamp to reply in a thread (optional)",
|
|
35
|
+
},
|
|
36
|
+
into: CommonSchemas.into,
|
|
37
|
+
},
|
|
38
|
+
required: [],
|
|
39
|
+
},
|
|
40
|
+
outputSchema: {
|
|
41
|
+
type: "object",
|
|
42
|
+
properties: {
|
|
43
|
+
ok: { type: "boolean" },
|
|
44
|
+
ts: { type: "string" },
|
|
45
|
+
channel: { type: "string" },
|
|
46
|
+
error: { type: "string" },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
riskDefault: "medium",
|
|
50
|
+
isWrite: true,
|
|
51
|
+
isConnector: true,
|
|
52
|
+
execute: async ({ params }) => {
|
|
53
|
+
assertWriteAllowed("slack.post_message");
|
|
54
|
+
const { postMessage, loadTokens: loadSlackTokens } = await import("../../connectors/slack.js");
|
|
55
|
+
if (!loadSlackTokens()) {
|
|
56
|
+
return JSON.stringify({ ok: false, error: "Slack not connected" });
|
|
57
|
+
}
|
|
58
|
+
const channel = params.channel ? String(params.channel) : "general";
|
|
59
|
+
const text = params.text ? String(params.text) : "";
|
|
60
|
+
const blocks = Array.isArray(params.blocks) ? params.blocks : undefined;
|
|
61
|
+
const threadTs = params.thread_ts ? String(params.thread_ts) : undefined;
|
|
62
|
+
try {
|
|
63
|
+
const result = await postMessage(channel, text, threadTs, blocks, undefined);
|
|
64
|
+
return JSON.stringify({
|
|
65
|
+
ok: true,
|
|
66
|
+
ts: result.ts,
|
|
67
|
+
channel: result.channel,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
catch (err) {
|
|
71
|
+
return JSON.stringify({
|
|
72
|
+
ok: false,
|
|
73
|
+
error: err instanceof Error ? err.message : String(err),
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
registerTool(slackPostMessage);
|
|
79
|
+
// camelCase alias — older recipes (registry/, examples/) reference
|
|
80
|
+
// `slack.postMessage`. Aliased to the snake_case canonical impl.
|
|
81
|
+
registerTool({ ...slackPostMessage, id: "slack.postMessage" });
|
|
82
|
+
//# sourceMappingURL=slack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slack.js","sourceRoot":"","sources":["../../../src/recipes/tools/slack.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,aAAa,EAEb,YAAY,GACb,MAAM,oBAAoB,CAAC;AAE5B,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E,MAAM,gBAAgB,GAAmB;IACvC,EAAE,EAAE,oBAAoB;IACxB,SAAS,EAAE,OAAO;IAClB,WAAW,EACT,oEAAoE;IACtE,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iDAAiD;gBAC9D,OAAO,EAAE,SAAS;aACnB;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mDAAmD;aACjE;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO;gBACb,WAAW,EACT,+DAA+D;gBACjE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;a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