patchwork-os 0.2.0-alpha.3 → 0.2.0-alpha.31
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 +40 -15
- package/deploy/bootstrap-vps.sh +184 -0
- package/deploy/deploy-dashboard.sh +174 -0
- package/deploy/deploy-landing.sh +79 -0
- package/dist/activationMetrics.d.ts +67 -0
- package/dist/activationMetrics.js +255 -0
- package/dist/activationMetrics.js.map +1 -0
- package/dist/approvalHttp.d.ts +24 -2
- package/dist/approvalHttp.js +150 -10
- package/dist/approvalHttp.js.map +1 -1
- package/dist/approvalQueue.d.ts +16 -1
- package/dist/approvalQueue.js +44 -3
- package/dist/approvalQueue.js.map +1 -1
- package/dist/automation.d.ts +20 -0
- package/dist/automation.js +54 -1
- package/dist/automation.js.map +1 -1
- package/dist/bridge.d.ts +2 -0
- package/dist/bridge.js +55 -130
- package/dist/bridge.js.map +1 -1
- package/dist/bridgeToken.js +57 -19
- package/dist/bridgeToken.js.map +1 -1
- package/dist/ccPermissions.js +6 -4
- package/dist/ccPermissions.js.map +1 -1
- package/dist/claudeOrchestrator.d.ts +1 -1
- package/dist/claudeOrchestrator.js +14 -8
- package/dist/claudeOrchestrator.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/recipe.d.ts +258 -0
- package/dist/commands/recipe.js +1130 -0
- package/dist/commands/recipe.js.map +1 -0
- package/dist/commands/recipeInstall.d.ts +72 -0
- package/dist/commands/recipeInstall.js +339 -0
- package/dist/commands/recipeInstall.js.map +1 -0
- package/dist/config.d.ts +14 -1
- package/dist/config.js +99 -8
- package/dist/config.js.map +1 -1
- package/dist/connectors/baseConnector.d.ts +117 -0
- package/dist/connectors/baseConnector.js +213 -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/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.d.ts +58 -8
- package/dist/connectors/github.js +312 -84
- package/dist/connectors/github.js.map +1 -1
- package/dist/connectors/gmail.d.ts +4 -1
- package/dist/connectors/gmail.js +79 -16
- package/dist/connectors/gmail.js.map +1 -1
- package/dist/connectors/googleCalendar.d.ts +60 -0
- package/dist/connectors/googleCalendar.js +345 -0
- package/dist/connectors/googleCalendar.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 +379 -0
- package/dist/connectors/jira.js.map +1 -0
- package/dist/connectors/linear.d.ts +69 -19
- package/dist/connectors/linear.js +170 -129
- package/dist/connectors/linear.js.map +1 -1
- package/dist/connectors/mcpClient.d.ts +56 -0
- package/dist/connectors/mcpClient.js +189 -0
- package/dist/connectors/mcpClient.js.map +1 -0
- package/dist/connectors/mcpOAuth.d.ts +84 -0
- package/dist/connectors/mcpOAuth.js +389 -0
- package/dist/connectors/mcpOAuth.js.map +1 -0
- 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/sentry.d.ts +17 -21
- package/dist/connectors/sentry.js +115 -131
- package/dist/connectors/sentry.js.map +1 -1
- package/dist/connectors/slack.d.ts +50 -0
- package/dist/connectors/slack.js +324 -0
- package/dist/connectors/slack.js.map +1 -0
- 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 +459 -0
- package/dist/connectors/tokenStorage.js.map +1 -0
- package/dist/connectors/zendesk.d.ts +104 -0
- package/dist/connectors/zendesk.js +424 -0
- package/dist/connectors/zendesk.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 +5 -0
- package/dist/drivers/index.js +1 -1
- package/dist/drivers/index.js.map +1 -1
- package/dist/featureFlags.d.ts +73 -0
- package/dist/featureFlags.js +203 -0
- package/dist/featureFlags.js.map +1 -0
- package/dist/fp/automationInterpreter.js +1 -0
- 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/policyParser.js +17 -0
- package/dist/fp/policyParser.js.map +1 -1
- package/dist/index.js +621 -61
- 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/oauth.d.ts +4 -1
- package/dist/oauth.js +50 -14
- package/dist/oauth.js.map +1 -1
- package/dist/patchworkConfig.d.ts +9 -0
- package/dist/patchworkConfig.js.map +1 -1
- package/dist/recipeOrchestration.d.ts +53 -0
- package/dist/recipeOrchestration.js +272 -0
- package/dist/recipeOrchestration.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 +28 -0
- package/dist/recipes/agentExecutor.js +42 -0
- package/dist/recipes/agentExecutor.js.map +1 -0
- package/dist/recipes/chainedRunner.d.ts +140 -0
- package/dist/recipes/chainedRunner.js +539 -0
- package/dist/recipes/chainedRunner.js.map +1 -0
- 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/legacyRecipeCompat.d.ts +2 -0
- package/dist/recipes/legacyRecipeCompat.js +112 -0
- package/dist/recipes/legacyRecipeCompat.js.map +1 -0
- package/dist/recipes/manifest.d.ts +47 -0
- package/dist/recipes/manifest.js +141 -0
- package/dist/recipes/manifest.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/scheduler.d.ts +23 -7
- package/dist/recipes/scheduler.js +131 -41
- 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/templateEngine.d.ts +62 -0
- package/dist/recipes/templateEngine.js +182 -0
- package/dist/recipes/templateEngine.js.map +1 -0
- package/dist/recipes/toolRegistry.d.ts +181 -0
- package/dist/recipes/toolRegistry.js +300 -0
- package/dist/recipes/toolRegistry.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/file.d.ts +6 -0
- package/dist/recipes/tools/file.js +170 -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 +91 -0
- package/dist/recipes/tools/github.js.map +1 -0
- package/dist/recipes/tools/gmail.d.ts +6 -0
- package/dist/recipes/tools/gmail.js +210 -0
- package/dist/recipes/tools/gmail.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 +22 -0
- package/dist/recipes/tools/index.js +25 -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/linear.d.ts +6 -0
- package/dist/recipes/tools/linear.js +83 -0
- package/dist/recipes/tools/linear.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/slack.d.ts +6 -0
- package/dist/recipes/tools/slack.js +72 -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 +433 -0
- package/dist/recipes/validation.js.map +1 -0
- package/dist/recipes/yamlRunner.d.ts +87 -0
- package/dist/recipes/yamlRunner.js +693 -409
- package/dist/recipes/yamlRunner.js.map +1 -1
- package/dist/recipesHttp.d.ts +34 -6
- package/dist/recipesHttp.js +285 -15
- package/dist/recipesHttp.js.map +1 -1
- package/dist/riskTier.js +1 -0
- package/dist/riskTier.js.map +1 -1
- package/dist/runLog.d.ts +23 -0
- package/dist/runLog.js +56 -1
- 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 +32 -1
- package/dist/server.js +980 -97
- package/dist/server.js.map +1 -1
- package/dist/streamableHttp.js +2 -0
- package/dist/streamableHttp.js.map +1 -1
- package/dist/tools/addLinearComment.d.ts +55 -0
- package/dist/tools/addLinearComment.js +72 -0
- package/dist/tools/addLinearComment.js.map +1 -0
- package/dist/tools/bridgeDoctor.js +2 -2
- package/dist/tools/bridgeDoctor.js.map +1 -1
- package/dist/tools/createLinearIssue.d.ts +84 -0
- package/dist/tools/createLinearIssue.js +146 -0
- package/dist/tools/createLinearIssue.js.map +1 -0
- package/dist/tools/fetchCalendarEvents.d.ts +94 -0
- package/dist/tools/fetchCalendarEvents.js +97 -0
- package/dist/tools/fetchCalendarEvents.js.map +1 -0
- package/dist/tools/fetchGithubIssue.d.ts +80 -0
- package/dist/tools/fetchGithubIssue.js +84 -0
- package/dist/tools/fetchGithubIssue.js.map +1 -0
- package/dist/tools/fetchGithubPR.d.ts +89 -0
- package/dist/tools/fetchGithubPR.js +96 -0
- package/dist/tools/fetchGithubPR.js.map +1 -0
- package/dist/tools/fetchSlackProfile.d.ts +43 -0
- package/dist/tools/fetchSlackProfile.js +46 -0
- package/dist/tools/fetchSlackProfile.js.map +1 -0
- package/dist/tools/getConnectorStatus.d.ts +58 -0
- package/dist/tools/getConnectorStatus.js +56 -0
- package/dist/tools/getConnectorStatus.js.map +1 -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 +339 -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 +2 -1
- package/dist/tools/github/index.js +2 -1
- package/dist/tools/github/index.js.map +1 -1
- package/dist/tools/github/issues.js +8 -4
- package/dist/tools/github/issues.js.map +1 -1
- package/dist/tools/github/pr.d.ts +122 -0
- package/dist/tools/github/pr.js +195 -5
- package/dist/tools/github/pr.js.map +1 -1
- package/dist/tools/index.js +32 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/searchTools.js +1 -1
- package/dist/tools/searchTools.js.map +1 -1
- package/dist/tools/slackListChannels.d.ts +65 -0
- package/dist/tools/slackListChannels.js +70 -0
- package/dist/tools/slackListChannels.js.map +1 -0
- package/dist/tools/slackPostMessage.d.ts +57 -0
- package/dist/tools/slackPostMessage.js +77 -0
- package/dist/tools/slackPostMessage.js.map +1 -0
- package/dist/tools/testTraceToSource.js +2 -2
- package/dist/tools/testTraceToSource.js.map +1 -1
- package/dist/tools/updateLinearIssue.d.ts +89 -0
- package/dist/tools/updateLinearIssue.js +117 -0
- package/dist/tools/updateLinearIssue.js.map +1 -0
- package/dist/transport.d.ts +7 -1
- package/dist/transport.js +85 -11
- package/dist/transport.js.map +1 -1
- package/package.json +5 -2
- package/scripts/start-all.sh +56 -19
- 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/recipes/ctx-loop-test.yaml +75 -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 +14 -6
- package/templates/recipes/project-health-check.yaml +50 -0
- package/templates/recipes/sentry-to-linear.yaml +77 -0
|
@@ -1,173 +1,156 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Sentry connector.
|
|
2
|
+
* Sentry connector — routes through Sentry's official MCP server.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Env vars: SENTRY_AUTH_TOKEN, SENTRY_ORG (optional default org slug).
|
|
4
|
+
* Endpoint: https://mcp.sentry.dev/mcp
|
|
5
|
+
* Auth: OAuth 2.1 w/ PKCE; dynamic client registration (RFC 7591).
|
|
7
6
|
*
|
|
8
|
-
* HTTP routes
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
7
|
+
* HTTP routes (wired in src/server.ts):
|
|
8
|
+
* GET /connections/sentry/authorize — returns { url } for popup
|
|
9
|
+
* GET /connections/sentry/callback — token exchange
|
|
10
|
+
* POST /connections/sentry/test — ping MCP server
|
|
11
|
+
* DELETE /connections/sentry — revoke + delete token
|
|
12
12
|
*
|
|
13
13
|
* MCP tool: fetchSentryIssue — fetches a Sentry issue/event and returns
|
|
14
14
|
* the stack trace string, ready to pass into enrichStackTrace.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return null;
|
|
25
|
-
try {
|
|
26
|
-
return JSON.parse(readFileSync(TOKEN_PATH, "utf-8"));
|
|
16
|
+
import { McpClient } from "./mcpClient.js";
|
|
17
|
+
import { completeAuthorize, getAccessToken, loadTokenFile, revoke, startAuthorize, updateTokenProfile, vendorConfig, } from "./mcpOAuth.js";
|
|
18
|
+
const SENTRY_MCP_ENDPOINT = "https://mcp.sentry.dev/mcp";
|
|
19
|
+
// ── MCP client ───────────────────────────────────────────────────────────────
|
|
20
|
+
let _client = null;
|
|
21
|
+
function client() {
|
|
22
|
+
if (!_client) {
|
|
23
|
+
_client = new McpClient(SENTRY_MCP_ENDPOINT, () => getAccessToken("sentry"));
|
|
27
24
|
}
|
|
28
|
-
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function saveTokens(tokens) {
|
|
33
|
-
mkdirSync(path.dirname(TOKEN_PATH), { recursive: true, mode: 0o700 });
|
|
34
|
-
writeFileSync(TOKEN_PATH, JSON.stringify(tokens, null, 2), { mode: 0o600 });
|
|
25
|
+
return _client;
|
|
35
26
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
27
|
+
// ── Back-compat ──────────────────────────────────────────────────────────────
|
|
28
|
+
export function loadTokens() {
|
|
29
|
+
const file = loadTokenFile("sentry");
|
|
30
|
+
if (!file)
|
|
31
|
+
return null;
|
|
32
|
+
return {
|
|
33
|
+
auth_token: file.access_token,
|
|
34
|
+
org: file.profile?.org,
|
|
35
|
+
connected_at: file.connected_at,
|
|
36
|
+
};
|
|
39
37
|
}
|
|
40
38
|
export function getStatus() {
|
|
41
|
-
const
|
|
39
|
+
const file = loadTokenFile("sentry");
|
|
42
40
|
return {
|
|
43
41
|
id: "sentry",
|
|
44
|
-
status:
|
|
45
|
-
lastSync:
|
|
46
|
-
org:
|
|
42
|
+
status: file ? "connected" : "disconnected",
|
|
43
|
+
lastSync: file?.connected_at,
|
|
44
|
+
org: file?.profile?.org,
|
|
47
45
|
};
|
|
48
46
|
}
|
|
49
|
-
// ──
|
|
50
|
-
async function sentryGet(path, token, signal) {
|
|
51
|
-
const res = await fetch(`${SENTRY_API}${path}`, {
|
|
52
|
-
headers: { Authorization: `Bearer ${token}` },
|
|
53
|
-
signal,
|
|
54
|
-
});
|
|
55
|
-
if (!res.ok) {
|
|
56
|
-
const body = await res.text();
|
|
57
|
-
throw new Error(`Sentry API error ${res.status}: ${body.slice(0, 200)}`);
|
|
58
|
-
}
|
|
59
|
-
return res.json();
|
|
60
|
-
}
|
|
61
|
-
/** Verify the token and return the authenticated user's identity. */
|
|
62
|
-
async function verifyToken(token, signal) {
|
|
63
|
-
const data = (await sentryGet("/", token, signal));
|
|
64
|
-
return { username: data.user?.username ?? "unknown" };
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Fetch the latest event for a Sentry issue and extract the stack trace text.
|
|
68
|
-
* issueIdOrUrl accepts:
|
|
69
|
-
* - A numeric issue ID: "12345"
|
|
70
|
-
* - A Sentry issue URL: "https://sentry.io/organizations/my-org/issues/12345/"
|
|
71
|
-
*/
|
|
72
|
-
export async function fetchIssueStackTrace(issueIdOrUrl, signal) {
|
|
73
|
-
const tokens = loadTokens();
|
|
74
|
-
if (!tokens)
|
|
75
|
-
throw new Error("Sentry not connected. POST /connections/sentry/connect first.");
|
|
76
|
-
const issueId = extractIssueId(issueIdOrUrl);
|
|
77
|
-
// Org-scoped endpoint required for self-hosted / team orgs.
|
|
78
|
-
// Fall back to legacy path if no org stored.
|
|
79
|
-
const issuePath = tokens.org
|
|
80
|
-
? `/organizations/${tokens.org}/issues/${issueId}/`
|
|
81
|
-
: `/issues/${issueId}/`;
|
|
82
|
-
const eventPath = tokens.org
|
|
83
|
-
? `/organizations/${tokens.org}/issues/${issueId}/events/latest/`
|
|
84
|
-
: `/issues/${issueId}/events/latest/`;
|
|
85
|
-
// Fetch issue metadata first to get the title
|
|
86
|
-
const issue = (await sentryGet(issuePath, tokens.auth_token, signal));
|
|
87
|
-
const event = (await sentryGet(eventPath, tokens.auth_token, signal));
|
|
88
|
-
event.title = event.title ?? issue.title;
|
|
89
|
-
const stackTrace = eventToStackTrace(event);
|
|
90
|
-
return { stackTrace, title: event.title ?? issueId, issueId };
|
|
91
|
-
}
|
|
47
|
+
// ── Issue fetch ──────────────────────────────────────────────────────────────
|
|
92
48
|
function extractIssueId(issueIdOrUrl) {
|
|
93
|
-
// URL form: https://sentry.io/organizations/.../issues/12345/
|
|
94
49
|
const urlMatch = issueIdOrUrl.match(/\/issues\/(\d+)/);
|
|
95
50
|
if (urlMatch)
|
|
96
51
|
return urlMatch[1];
|
|
97
|
-
// Plain numeric or alphanumeric ID
|
|
98
52
|
const trimmed = issueIdOrUrl.trim();
|
|
99
53
|
if (/^\d+$/.test(trimmed))
|
|
100
54
|
return trimmed;
|
|
101
55
|
throw new Error(`Cannot parse Sentry issue ID from: ${issueIdOrUrl}`);
|
|
102
56
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
function
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
57
|
+
function extractOrgSlug(issueIdOrUrl) {
|
|
58
|
+
const m = issueIdOrUrl.match(/https?:\/\/([^.]+)\.sentry\.io/);
|
|
59
|
+
return m ? m[1] : null;
|
|
60
|
+
}
|
|
61
|
+
function buildSentryIssueUrl(issueId, orgSlug) {
|
|
62
|
+
return `https://${orgSlug}.sentry.io/issues/${issueId}/`;
|
|
63
|
+
}
|
|
64
|
+
export async function fetchIssueStackTrace(issueIdOrUrl, signal) {
|
|
65
|
+
if (!loadTokens())
|
|
66
|
+
throw new Error("Sentry not connected. GET /connections/sentry/authorize first.");
|
|
67
|
+
const issueId = extractIssueId(issueIdOrUrl);
|
|
68
|
+
const orgSlug = extractOrgSlug(issueIdOrUrl) ?? loadTokenFile("sentry")?.profile?.org;
|
|
69
|
+
if (!orgSlug)
|
|
70
|
+
throw new Error("Cannot determine Sentry org slug. Pass full sentry.io issue URL.");
|
|
71
|
+
const issueUrl = buildSentryIssueUrl(issueId, orgSlug);
|
|
72
|
+
const res = await client().callTool("get_sentry_resource", { url: issueUrl }, { signal });
|
|
73
|
+
// get_sentry_resource returns markdown text — extract title and stacktrace
|
|
74
|
+
const text = res.content?.[0]?.text ?? "";
|
|
75
|
+
const titleMatch = text.match(/\*\*Description\*\*:\s*(.+)/);
|
|
76
|
+
const title = titleMatch
|
|
77
|
+
? titleMatch[1].trim()
|
|
78
|
+
: `Sentry issue ${issueId}`;
|
|
79
|
+
// Extract stacktrace block
|
|
80
|
+
const stMatch = text.match(/```(?:\w+)?\n([\s\S]*?)\n```/);
|
|
81
|
+
if (!stMatch) {
|
|
82
|
+
throw new Error(`Sentry returned no stack trace for issue ${issueId}`);
|
|
113
83
|
}
|
|
114
|
-
|
|
115
|
-
|
|
84
|
+
const stackTrace = stMatch[1].trim();
|
|
85
|
+
return { stackTrace, title, issueId };
|
|
86
|
+
}
|
|
87
|
+
// ── HTTP handlers ────────────────────────────────────────────────────────────
|
|
88
|
+
export async function handleSentryAuthorize() {
|
|
89
|
+
try {
|
|
90
|
+
const { url } = await startAuthorize(vendorConfig("sentry"));
|
|
91
|
+
return { status: 302, body: "", redirect: url };
|
|
116
92
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const fn = frame.function ? ` (${frame.function})` : "";
|
|
127
|
-
lines.push(` at ${fn.trim() || "<anonymous>"} (${file}:${line}${col})`);
|
|
128
|
-
}
|
|
93
|
+
catch (err) {
|
|
94
|
+
return {
|
|
95
|
+
status: 400,
|
|
96
|
+
contentType: "application/json",
|
|
97
|
+
body: JSON.stringify({
|
|
98
|
+
ok: false,
|
|
99
|
+
error: err instanceof Error ? err.message : String(err),
|
|
100
|
+
}),
|
|
101
|
+
};
|
|
129
102
|
}
|
|
130
|
-
return lines.join("\n");
|
|
131
103
|
}
|
|
132
|
-
export async function
|
|
133
|
-
|
|
134
|
-
const { auth_token, org } = (body ?? {});
|
|
135
|
-
if (!auth_token || typeof auth_token !== "string") {
|
|
104
|
+
export async function handleSentryCallback(code, state, error) {
|
|
105
|
+
if (error) {
|
|
136
106
|
return {
|
|
137
107
|
status: 400,
|
|
138
|
-
contentType: "
|
|
139
|
-
body:
|
|
108
|
+
contentType: "text/html",
|
|
109
|
+
body: `<html><body><h2>Sentry connect failed</h2><pre>${error}</pre></body></html>`,
|
|
140
110
|
};
|
|
141
111
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
connected_at: new Date().toISOString(),
|
|
112
|
+
if (!code || !state) {
|
|
113
|
+
return {
|
|
114
|
+
status: 400,
|
|
115
|
+
contentType: "text/html",
|
|
116
|
+
body: `<html><body><h2>Sentry connect failed</h2><pre>missing code/state</pre></body></html>`,
|
|
148
117
|
};
|
|
149
|
-
|
|
118
|
+
}
|
|
119
|
+
try {
|
|
120
|
+
await completeAuthorize(vendorConfig("sentry"), code, state);
|
|
121
|
+
// Best-effort org capture
|
|
122
|
+
try {
|
|
123
|
+
const res = await client().callTool("find_organizations", {}, {
|
|
124
|
+
timeoutMs: 10_000,
|
|
125
|
+
});
|
|
126
|
+
const orgs = McpClient.extractJson(res);
|
|
127
|
+
const first = Array.isArray(orgs)
|
|
128
|
+
? orgs[0]
|
|
129
|
+
: (orgs.organizations ?? [])[0];
|
|
130
|
+
const org = first?.slug;
|
|
131
|
+
if (org) {
|
|
132
|
+
updateTokenProfile("sentry", { org });
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
// Profile fetch is best-effort
|
|
137
|
+
}
|
|
150
138
|
return {
|
|
151
139
|
status: 200,
|
|
152
|
-
contentType: "
|
|
153
|
-
body:
|
|
140
|
+
contentType: "text/html",
|
|
141
|
+
body: `<html><body><h2>Sentry connected</h2><script>window.close();</script></body></html>`,
|
|
154
142
|
};
|
|
155
143
|
}
|
|
156
144
|
catch (err) {
|
|
157
145
|
return {
|
|
158
146
|
status: 400,
|
|
159
|
-
contentType: "
|
|
160
|
-
body:
|
|
161
|
-
ok: false,
|
|
162
|
-
error: err instanceof Error ? err.message : String(err),
|
|
163
|
-
}),
|
|
147
|
+
contentType: "text/html",
|
|
148
|
+
body: `<html><body><h2>Sentry connect failed</h2><pre>${err instanceof Error ? err.message : String(err)}</pre></body></html>`,
|
|
164
149
|
};
|
|
165
150
|
}
|
|
166
151
|
}
|
|
167
152
|
export async function handleSentryTest() {
|
|
168
|
-
|
|
169
|
-
const tokens = loadTokens();
|
|
170
|
-
if (!tokens) {
|
|
153
|
+
if (!loadTokens()) {
|
|
171
154
|
return {
|
|
172
155
|
status: 400,
|
|
173
156
|
contentType: "application/json",
|
|
@@ -175,11 +158,11 @@ export async function handleSentryTest() {
|
|
|
175
158
|
};
|
|
176
159
|
}
|
|
177
160
|
try {
|
|
178
|
-
const
|
|
161
|
+
const ok = await client().ping({ timeoutMs: 10_000 });
|
|
179
162
|
return {
|
|
180
|
-
status: 200,
|
|
163
|
+
status: ok ? 200 : 400,
|
|
181
164
|
contentType: "application/json",
|
|
182
|
-
body: JSON.stringify({ ok:
|
|
165
|
+
body: JSON.stringify({ ok, message: ok ? "connected" : "ping failed" }),
|
|
183
166
|
};
|
|
184
167
|
}
|
|
185
168
|
catch (err) {
|
|
@@ -193,8 +176,9 @@ export async function handleSentryTest() {
|
|
|
193
176
|
};
|
|
194
177
|
}
|
|
195
178
|
}
|
|
196
|
-
export function handleSentryDisconnect() {
|
|
197
|
-
|
|
179
|
+
export async function handleSentryDisconnect() {
|
|
180
|
+
await revoke("sentry");
|
|
181
|
+
_client = null;
|
|
198
182
|
return {
|
|
199
183
|
status: 200,
|
|
200
184
|
contentType: "application/json",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentry.js","sourceRoot":"","sources":["../../src/connectors/sentry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"sentry.js","sourceRoot":"","sources":["../../src/connectors/sentry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,MAAM,EACN,cAAc,EACd,kBAAkB,EAClB,YAAY,GACb,MAAM,eAAe,CAAC;AAEv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AC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slack connector — calls Slack Web API directly with bot token.
|
|
3
|
+
*
|
|
4
|
+
* OAuth 2.0 (not PKCE) — Slack uses its own flow with bot token in response.
|
|
5
|
+
* Tokens stored at ~/.patchwork/tokens/slack.json (mode 0600).
|
|
6
|
+
* Client credentials: PATCHWORK_SLACK_CLIENT_ID / PATCHWORK_SLACK_CLIENT_SECRET
|
|
7
|
+
*
|
|
8
|
+
* HTTP routes (wired in src/server.ts):
|
|
9
|
+
* GET /connections/slack/authorize — redirect to Slack consent
|
|
10
|
+
* GET /connections/slack/callback — exchange code for bot token
|
|
11
|
+
* POST /connections/slack/test — ping Slack API
|
|
12
|
+
* DELETE /connections/slack — delete stored token
|
|
13
|
+
*/
|
|
14
|
+
export interface SlackTokenFile {
|
|
15
|
+
access_token: string;
|
|
16
|
+
team_id: string;
|
|
17
|
+
team_name: string;
|
|
18
|
+
bot_user_id: string;
|
|
19
|
+
connected_at: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ConnectorHandlerResult {
|
|
22
|
+
status: number;
|
|
23
|
+
body: string;
|
|
24
|
+
contentType?: string;
|
|
25
|
+
redirect?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function loadTokens(): SlackTokenFile | null;
|
|
28
|
+
export declare function isConnected(): boolean;
|
|
29
|
+
export declare function postMessage(channel: string, text: string, threadTs?: string, signal?: AbortSignal): Promise<{
|
|
30
|
+
ts: string;
|
|
31
|
+
channel: string;
|
|
32
|
+
}>;
|
|
33
|
+
export interface SlackChannel {
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
isMember: boolean;
|
|
37
|
+
isPrivate: boolean;
|
|
38
|
+
numMembers?: number;
|
|
39
|
+
}
|
|
40
|
+
export declare function listChannels(limit?: number, signal?: AbortSignal): Promise<SlackChannel[]>;
|
|
41
|
+
export interface SlackProfile {
|
|
42
|
+
teamId: string;
|
|
43
|
+
teamName: string;
|
|
44
|
+
botUserId: string;
|
|
45
|
+
}
|
|
46
|
+
export declare function getProfile(): SlackProfile | null;
|
|
47
|
+
export declare function handleSlackAuthorize(): ConnectorHandlerResult;
|
|
48
|
+
export declare function handleSlackCallback(code: string | null, state: string | null, error: string | null): Promise<ConnectorHandlerResult>;
|
|
49
|
+
export declare function handleSlackTest(): Promise<ConnectorHandlerResult>;
|
|
50
|
+
export declare function handleSlackDisconnect(): ConnectorHandlerResult;
|