patchwork-os 0.2.0-alpha.2 → 0.2.0-alpha.22
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/dist/approvalHttp.d.ts +11 -2
- package/dist/approvalHttp.js +98 -10
- package/dist/approvalHttp.js.map +1 -1
- package/dist/approvalQueue.d.ts +12 -1
- package/dist/approvalQueue.js +25 -3
- package/dist/approvalQueue.js.map +1 -1
- package/dist/automation.d.ts +20 -0
- package/dist/automation.js +35 -0
- package/dist/automation.js.map +1 -1
- package/dist/bridge.js +145 -23
- package/dist/bridge.js.map +1 -1
- package/dist/bridgeToken.js +57 -19
- package/dist/bridgeToken.js.map +1 -1
- package/dist/claudeDriver.d.ts +3 -1
- package/dist/claudeDriver.js +48 -0
- package/dist/claudeDriver.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 +256 -0
- package/dist/commands/recipe.js +1313 -0
- package/dist/commands/recipe.js.map +1 -0
- package/dist/config.d.ts +15 -2
- package/dist/config.js +94 -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/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 +93 -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/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 +117 -0
- package/dist/connectors/linear.js +239 -0
- package/dist/connectors/linear.js.map +1 -0
- 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 +43 -0
- package/dist/connectors/sentry.js +188 -0
- package/dist/connectors/sentry.js.map +1 -0
- 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/tokenStorage.d.ts +35 -0
- package/dist/connectors/tokenStorage.js +394 -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/claude/api.d.ts +11 -0
- package/dist/drivers/claude/api.js +54 -0
- package/dist/drivers/claude/api.js.map +1 -0
- package/dist/drivers/claude/envSanitizer.d.ts +7 -0
- package/dist/drivers/claude/envSanitizer.js +18 -0
- package/dist/drivers/claude/envSanitizer.js.map +1 -0
- package/dist/drivers/claude/streamParser.d.ts +38 -0
- package/dist/drivers/claude/streamParser.js +34 -0
- package/dist/drivers/claude/streamParser.js.map +1 -0
- package/dist/drivers/claude/subprocess.d.ts +19 -0
- package/dist/drivers/claude/subprocess.js +216 -0
- package/dist/drivers/claude/subprocess.js.map +1 -0
- package/dist/drivers/claude/subprocessSettings.d.ts +9 -0
- package/dist/drivers/claude/subprocessSettings.js +55 -0
- package/dist/drivers/claude/subprocessSettings.js.map +1 -0
- package/dist/drivers/gemini/index.d.ts +18 -0
- package/dist/drivers/gemini/index.js +210 -0
- package/dist/drivers/gemini/index.js.map +1 -0
- package/dist/drivers/grok/index.d.ts +11 -0
- package/dist/drivers/grok/index.js +22 -0
- package/dist/drivers/grok/index.js.map +1 -0
- package/dist/drivers/index.d.ts +23 -0
- package/dist/drivers/index.js +31 -0
- package/dist/drivers/index.js.map +1 -0
- package/dist/drivers/openai/index.d.ts +24 -0
- package/dist/drivers/openai/index.js +110 -0
- package/dist/drivers/openai/index.js.map +1 -0
- package/dist/drivers/types.d.ts +72 -0
- package/dist/drivers/types.js +30 -0
- package/dist/drivers/types.js.map +1 -0
- 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 +543 -37
- 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/recipes/chainedRunner.d.ts +104 -0
- package/dist/recipes/chainedRunner.js +359 -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 +1 -0
- package/dist/recipes/legacyRecipeCompat.js +97 -0
- package/dist/recipes/legacyRecipeCompat.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 +135 -41
- package/dist/recipes/scheduler.js.map +1 -1
- package/dist/recipes/schemaGenerator.d.ts +28 -0
- package/dist/recipes/schemaGenerator.js +484 -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/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/index.d.ts +18 -0
- package/dist/recipes/tools/index.js +21 -0
- package/dist/recipes/tools/index.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/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/yamlRunner.d.ts +79 -0
- package/dist/recipes/yamlRunner.js +612 -346
- package/dist/recipes/yamlRunner.js.map +1 -1
- package/dist/recipesHttp.d.ts +14 -1
- package/dist/recipesHttp.js +21 -4
- 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/server.d.ts +19 -1
- package/dist/server.js +682 -31
- 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/ctxGetTaskContext.d.ts +4 -1
- package/dist/tools/ctxGetTaskContext.js +45 -2
- package/dist/tools/ctxGetTaskContext.js.map +1 -1
- 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/fetchLinearIssue.d.ts +112 -0
- package/dist/tools/fetchLinearIssue.js +129 -0
- package/dist/tools/fetchLinearIssue.js.map +1 -0
- package/dist/tools/fetchSentryIssue.d.ts +143 -0
- package/dist/tools/fetchSentryIssue.js +150 -0
- package/dist/tools/fetchSentryIssue.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 +36 -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/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 +4 -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 +21 -5
- package/templates/recipes/sentry-to-linear.yaml +77 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { listEvents } from "../connectors/googleCalendar.js";
|
|
2
|
+
import { successStructured } from "./utils.js";
|
|
3
|
+
export function createFetchCalendarEventsTool() {
|
|
4
|
+
return {
|
|
5
|
+
schema: {
|
|
6
|
+
name: "fetchCalendarEvents",
|
|
7
|
+
description: "Fetch upcoming Google Calendar events. Returns events for the next N days. Requires Google Calendar connector connected.",
|
|
8
|
+
annotations: { readOnlyHint: true },
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: "object",
|
|
11
|
+
properties: {
|
|
12
|
+
daysAhead: {
|
|
13
|
+
type: "integer",
|
|
14
|
+
description: "Number of days ahead to fetch (default: 7, max: 30).",
|
|
15
|
+
minimum: 1,
|
|
16
|
+
maximum: 30,
|
|
17
|
+
},
|
|
18
|
+
maxResults: {
|
|
19
|
+
type: "integer",
|
|
20
|
+
description: "Maximum events to return (default: 20, max: 50).",
|
|
21
|
+
minimum: 1,
|
|
22
|
+
maximum: 50,
|
|
23
|
+
},
|
|
24
|
+
calendarId: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "Calendar ID to query (e.g. 'primary' or an email address). Defaults to the connected calendar.",
|
|
27
|
+
maxLength: 200,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
additionalProperties: false,
|
|
31
|
+
},
|
|
32
|
+
outputSchema: {
|
|
33
|
+
type: "object",
|
|
34
|
+
properties: {
|
|
35
|
+
events: {
|
|
36
|
+
type: "array",
|
|
37
|
+
items: {
|
|
38
|
+
type: "object",
|
|
39
|
+
properties: {
|
|
40
|
+
id: { type: "string" },
|
|
41
|
+
summary: { type: "string" },
|
|
42
|
+
description: { type: ["string", "null"] },
|
|
43
|
+
start: { type: "string" },
|
|
44
|
+
end: { type: "string" },
|
|
45
|
+
allDay: { type: "boolean" },
|
|
46
|
+
location: { type: ["string", "null"] },
|
|
47
|
+
htmlLink: { type: "string" },
|
|
48
|
+
attendees: { type: "array", items: { type: "string" } },
|
|
49
|
+
},
|
|
50
|
+
required: ["id", "summary", "start", "end", "allDay", "htmlLink"],
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
count: { type: "integer" },
|
|
54
|
+
daysAhead: { type: "integer" },
|
|
55
|
+
calendarConnected: { type: "boolean" },
|
|
56
|
+
},
|
|
57
|
+
required: ["events", "count", "daysAhead", "calendarConnected"],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
timeoutMs: 15_000,
|
|
61
|
+
async handler(args, signal) {
|
|
62
|
+
const daysAhead = typeof args.daysAhead === "number" ? args.daysAhead : 7;
|
|
63
|
+
const maxResults = typeof args.maxResults === "number" ? args.maxResults : 20;
|
|
64
|
+
const calendarId = typeof args.calendarId === "string" ? args.calendarId : undefined;
|
|
65
|
+
try {
|
|
66
|
+
const events = await listEvents({ daysAhead, maxResults, calendarId }, signal);
|
|
67
|
+
return successStructured({
|
|
68
|
+
events: events.map((e) => ({
|
|
69
|
+
id: e.id,
|
|
70
|
+
summary: e.summary,
|
|
71
|
+
description: e.description ?? null,
|
|
72
|
+
start: e.start,
|
|
73
|
+
end: e.end,
|
|
74
|
+
allDay: e.allDay,
|
|
75
|
+
location: e.location ?? null,
|
|
76
|
+
htmlLink: e.htmlLink,
|
|
77
|
+
attendees: e.attendees ?? [],
|
|
78
|
+
})),
|
|
79
|
+
count: events.length,
|
|
80
|
+
daysAhead,
|
|
81
|
+
calendarConnected: true,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
catch (err) {
|
|
85
|
+
const notConnected = err instanceof Error && err.message.includes("not connected");
|
|
86
|
+
return successStructured({
|
|
87
|
+
events: [],
|
|
88
|
+
count: 0,
|
|
89
|
+
daysAhead,
|
|
90
|
+
calendarConnected: !notConnected,
|
|
91
|
+
error: err instanceof Error ? err.message : String(err),
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=fetchCalendarEvents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchCalendarEvents.js","sourceRoot":"","sources":["../../src/tools/fetchCalendarEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,MAAM,EAAE;YACN,IAAI,EAAE,qBAAqB;YAC3B,WAAW,EACT,0HAA0H;YAC5H,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;YACnC,WAAW,EAAE;gBACX,IAAI,EAAE,QAAiB;gBACvB,UAAU,EAAE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Q,EAAE,CAAC,CAAC,QAAQ;wBACpB,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,EAAE;qBAC7B,CAAC,CAAC;oBACH,KAAK,EAAE,MAAM,CAAC,MAAM;oBACpB,SAAS;oBACT,iBAAiB,EAAE,IAAI;iBACxB,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,YAAY,GAChB,GAAG,YAAY,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;gBAChE,OAAO,iBAAiB,CAAC;oBACvB,MAAM,EAAE,EAAE;oBACV,KAAK,EAAE,CAAC;oBACR,SAAS;oBACT,iBAAiB,EAAE,CAAC,YAAY;oBAChC,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;iBACxD,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export declare function createFetchGithubIssueTool(): {
|
|
2
|
+
schema: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
annotations: {
|
|
6
|
+
readOnlyHint: boolean;
|
|
7
|
+
};
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: "object";
|
|
10
|
+
required: string[];
|
|
11
|
+
properties: {
|
|
12
|
+
issueRef: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
maxLength: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
additionalProperties: false;
|
|
19
|
+
};
|
|
20
|
+
outputSchema: {
|
|
21
|
+
type: "object";
|
|
22
|
+
properties: {
|
|
23
|
+
number: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
title: {
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
body: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
state: {
|
|
33
|
+
type: string;
|
|
34
|
+
};
|
|
35
|
+
url: {
|
|
36
|
+
type: string;
|
|
37
|
+
};
|
|
38
|
+
repo: {
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
41
|
+
author: {
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
labels: {
|
|
45
|
+
type: string;
|
|
46
|
+
items: {
|
|
47
|
+
type: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
assignees: {
|
|
51
|
+
type: string;
|
|
52
|
+
items: {
|
|
53
|
+
type: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
createdAt: {
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
59
|
+
updatedAt: {
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
comments: {
|
|
63
|
+
type: string;
|
|
64
|
+
};
|
|
65
|
+
githubConnected: {
|
|
66
|
+
type: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
required: string[];
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
timeoutMs: number;
|
|
73
|
+
handler(args: Record<string, unknown>, signal?: AbortSignal): Promise<{
|
|
74
|
+
content: Array<{
|
|
75
|
+
type: string;
|
|
76
|
+
text: string;
|
|
77
|
+
}>;
|
|
78
|
+
structuredContent: unknown;
|
|
79
|
+
}>;
|
|
80
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { fetchGitHubIssue } from "../connectors/github.js";
|
|
2
|
+
import { requireString, successStructured } from "./utils.js";
|
|
3
|
+
export function createFetchGithubIssueTool() {
|
|
4
|
+
return {
|
|
5
|
+
schema: {
|
|
6
|
+
name: "fetchGithubIssue",
|
|
7
|
+
description: "Fetch a GitHub issue by URL or owner/repo#number ref. Returns title, body, state, labels, assignees, and author. Requires GitHub connector connected.",
|
|
8
|
+
annotations: { readOnlyHint: true },
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: "object",
|
|
11
|
+
required: ["issueRef"],
|
|
12
|
+
properties: {
|
|
13
|
+
issueRef: {
|
|
14
|
+
type: "string",
|
|
15
|
+
description: "GitHub issue URL (https://github.com/owner/repo/issues/42) or short ref (owner/repo#42).",
|
|
16
|
+
maxLength: 500,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
additionalProperties: false,
|
|
20
|
+
},
|
|
21
|
+
outputSchema: {
|
|
22
|
+
type: "object",
|
|
23
|
+
properties: {
|
|
24
|
+
number: { type: "integer" },
|
|
25
|
+
title: { type: "string" },
|
|
26
|
+
body: { type: "string" },
|
|
27
|
+
state: { type: "string" },
|
|
28
|
+
url: { type: "string" },
|
|
29
|
+
repo: { type: "string" },
|
|
30
|
+
author: { type: "string" },
|
|
31
|
+
labels: { type: "array", items: { type: "string" } },
|
|
32
|
+
assignees: { type: "array", items: { type: "string" } },
|
|
33
|
+
createdAt: { type: "string" },
|
|
34
|
+
updatedAt: { type: "string" },
|
|
35
|
+
comments: { type: "integer" },
|
|
36
|
+
githubConnected: { type: "boolean" },
|
|
37
|
+
},
|
|
38
|
+
required: [
|
|
39
|
+
"number",
|
|
40
|
+
"title",
|
|
41
|
+
"body",
|
|
42
|
+
"state",
|
|
43
|
+
"url",
|
|
44
|
+
"repo",
|
|
45
|
+
"author",
|
|
46
|
+
"labels",
|
|
47
|
+
"assignees",
|
|
48
|
+
"createdAt",
|
|
49
|
+
"updatedAt",
|
|
50
|
+
"comments",
|
|
51
|
+
"githubConnected",
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
timeoutMs: 15_000,
|
|
56
|
+
async handler(args, signal) {
|
|
57
|
+
const issueRef = requireString(args, "issueRef", 500);
|
|
58
|
+
try {
|
|
59
|
+
const issue = await fetchGitHubIssue(issueRef, signal);
|
|
60
|
+
return successStructured({ ...issue, githubConnected: true });
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
const notConnected = err instanceof Error && err.message.includes("not connected");
|
|
64
|
+
return successStructured({
|
|
65
|
+
number: 0,
|
|
66
|
+
title: "",
|
|
67
|
+
body: "",
|
|
68
|
+
state: "",
|
|
69
|
+
url: "",
|
|
70
|
+
repo: "",
|
|
71
|
+
author: "",
|
|
72
|
+
labels: [],
|
|
73
|
+
assignees: [],
|
|
74
|
+
createdAt: "",
|
|
75
|
+
updatedAt: "",
|
|
76
|
+
comments: 0,
|
|
77
|
+
githubConnected: !notConnected,
|
|
78
|
+
error: err instanceof Error ? err.message : String(err),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=fetchGithubIssue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchGithubIssue.js","sourceRoot":"","sources":["../../src/tools/fetchGithubIssue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE9D,MAAM,UAAU,0BAA0B;IACxC,OAAO;QACL,MAAM,EAAE;YACN,IAAI,EAAE,kBAAkB;YACxB,WAAW,EACT,uJAAuJ;YACzJ,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;YACnC,WAAW,EAAE;gBACX,IAAI,EAAE,QAAiB;gBACvB,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,UAAU,EAAE;oBACV,QAAQ,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,0FAA0F;wBAC5F,SAAS,EAAE,GAAG;qBACf;iBACF;gBACD,oBAAoB,EAAE,KAAc;aACrC;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAiB;gBACvB,UAAU,EAAE;oBACV,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBAC3B,KAAK,EAAE,EAAE,IAAI,E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,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,YAAY,GAChB,GAAG,YAAY,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;gBAChE,OAAO,iBAAiB,CAAC;oBACvB,MAAM,EAAE,CAAC;oBACT,KAAK,EAAE,EAAE;oBACT,IAAI,EAAE,EAAE;oBACR,KAAK,EAAE,EAAE;oBACT,GAAG,EAAE,EAAE;oBACP,IAAI,EAAE,EAAE;oBACR,MAAM,EAAE,EAAE;oBACV,MAAM,EAAE,EAAE;oBACV,SAAS,EAAE,EAAE;oBACb,SAAS,EAAE,EAAE;oBACb,SAAS,EAAE,EAAE;oBACb,QAAQ,EAAE,CAAC;oBACX,eAAe,EAAE,CAAC,YAAY;oBAC9B,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;iBACxD,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export declare function createFetchGithubPRTool(): {
|
|
2
|
+
schema: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
annotations: {
|
|
6
|
+
readOnlyHint: boolean;
|
|
7
|
+
};
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: "object";
|
|
10
|
+
required: string[];
|
|
11
|
+
properties: {
|
|
12
|
+
prRef: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
maxLength: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
additionalProperties: false;
|
|
19
|
+
};
|
|
20
|
+
outputSchema: {
|
|
21
|
+
type: "object";
|
|
22
|
+
properties: {
|
|
23
|
+
number: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
title: {
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
body: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
state: {
|
|
33
|
+
type: string;
|
|
34
|
+
};
|
|
35
|
+
url: {
|
|
36
|
+
type: string;
|
|
37
|
+
};
|
|
38
|
+
repo: {
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
41
|
+
author: {
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
isDraft: {
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
reviewDecision: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
labels: {
|
|
51
|
+
type: string;
|
|
52
|
+
items: {
|
|
53
|
+
type: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
headBranch: {
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
59
|
+
baseBranch: {
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
createdAt: {
|
|
63
|
+
type: string;
|
|
64
|
+
};
|
|
65
|
+
updatedAt: {
|
|
66
|
+
type: string;
|
|
67
|
+
};
|
|
68
|
+
additions: {
|
|
69
|
+
type: string;
|
|
70
|
+
};
|
|
71
|
+
deletions: {
|
|
72
|
+
type: string;
|
|
73
|
+
};
|
|
74
|
+
githubConnected: {
|
|
75
|
+
type: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
required: string[];
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
timeoutMs: number;
|
|
82
|
+
handler(args: Record<string, unknown>, signal?: AbortSignal): Promise<{
|
|
83
|
+
content: Array<{
|
|
84
|
+
type: string;
|
|
85
|
+
text: string;
|
|
86
|
+
}>;
|
|
87
|
+
structuredContent: unknown;
|
|
88
|
+
}>;
|
|
89
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { fetchGitHubPR } from "../connectors/github.js";
|
|
2
|
+
import { requireString, successStructured } from "./utils.js";
|
|
3
|
+
export function createFetchGithubPRTool() {
|
|
4
|
+
return {
|
|
5
|
+
schema: {
|
|
6
|
+
name: "fetchGithubPR",
|
|
7
|
+
description: "Fetch a GitHub pull request by URL or owner/repo#number ref. Returns title, body, state, branches, labels, review decision, and diff stats. Requires GitHub connector connected.",
|
|
8
|
+
annotations: { readOnlyHint: true },
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: "object",
|
|
11
|
+
required: ["prRef"],
|
|
12
|
+
properties: {
|
|
13
|
+
prRef: {
|
|
14
|
+
type: "string",
|
|
15
|
+
description: "GitHub PR URL (https://github.com/owner/repo/pull/42) or short ref (owner/repo#42).",
|
|
16
|
+
maxLength: 500,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
additionalProperties: false,
|
|
20
|
+
},
|
|
21
|
+
outputSchema: {
|
|
22
|
+
type: "object",
|
|
23
|
+
properties: {
|
|
24
|
+
number: { type: "integer" },
|
|
25
|
+
title: { type: "string" },
|
|
26
|
+
body: { type: "string" },
|
|
27
|
+
state: { type: "string" },
|
|
28
|
+
url: { type: "string" },
|
|
29
|
+
repo: { type: "string" },
|
|
30
|
+
author: { type: "string" },
|
|
31
|
+
isDraft: { type: "boolean" },
|
|
32
|
+
reviewDecision: { type: "string" },
|
|
33
|
+
labels: { type: "array", items: { type: "string" } },
|
|
34
|
+
headBranch: { type: "string" },
|
|
35
|
+
baseBranch: { type: "string" },
|
|
36
|
+
createdAt: { type: "string" },
|
|
37
|
+
updatedAt: { type: "string" },
|
|
38
|
+
additions: { type: "integer" },
|
|
39
|
+
deletions: { type: "integer" },
|
|
40
|
+
githubConnected: { type: "boolean" },
|
|
41
|
+
},
|
|
42
|
+
required: [
|
|
43
|
+
"number",
|
|
44
|
+
"title",
|
|
45
|
+
"body",
|
|
46
|
+
"state",
|
|
47
|
+
"url",
|
|
48
|
+
"repo",
|
|
49
|
+
"author",
|
|
50
|
+
"isDraft",
|
|
51
|
+
"reviewDecision",
|
|
52
|
+
"labels",
|
|
53
|
+
"headBranch",
|
|
54
|
+
"baseBranch",
|
|
55
|
+
"createdAt",
|
|
56
|
+
"updatedAt",
|
|
57
|
+
"additions",
|
|
58
|
+
"deletions",
|
|
59
|
+
"githubConnected",
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
timeoutMs: 15_000,
|
|
64
|
+
async handler(args, signal) {
|
|
65
|
+
const prRef = requireString(args, "prRef", 500);
|
|
66
|
+
try {
|
|
67
|
+
const pr = await fetchGitHubPR(prRef, signal);
|
|
68
|
+
return successStructured({ ...pr, githubConnected: true });
|
|
69
|
+
}
|
|
70
|
+
catch (err) {
|
|
71
|
+
const notConnected = err instanceof Error && err.message.includes("not connected");
|
|
72
|
+
return successStructured({
|
|
73
|
+
number: 0,
|
|
74
|
+
title: "",
|
|
75
|
+
body: "",
|
|
76
|
+
state: "",
|
|
77
|
+
url: "",
|
|
78
|
+
repo: "",
|
|
79
|
+
author: "",
|
|
80
|
+
isDraft: false,
|
|
81
|
+
reviewDecision: "",
|
|
82
|
+
labels: [],
|
|
83
|
+
headBranch: "",
|
|
84
|
+
baseBranch: "",
|
|
85
|
+
createdAt: "",
|
|
86
|
+
updatedAt: "",
|
|
87
|
+
additions: 0,
|
|
88
|
+
deletions: 0,
|
|
89
|
+
githubConnected: !notConnected,
|
|
90
|
+
error: err instanceof Error ? err.message : String(err),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=fetchGithubPR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchGithubPR.js","sourceRoot":"","sources":["../../src/tools/fetchGithubPR.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE9D,MAAM,UAAU,uBAAuB;IACrC,OAAO;QACL,MAAM,EAAE;YACN,IAAI,EAAE,eAAe;YACrB,W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;oBAC9B,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;iBACxD,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* fetchLinearIssue — fetch a Linear issue by ID or URL.
|
|
3
|
+
*
|
|
4
|
+
* Returns title, description, state, assignee, labels, priority, and URL
|
|
5
|
+
* in a single call. Requires Linear connector to be connected.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createFetchLinearIssueTool(): {
|
|
8
|
+
schema: {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
annotations: {
|
|
12
|
+
readOnlyHint: boolean;
|
|
13
|
+
};
|
|
14
|
+
inputSchema: {
|
|
15
|
+
type: "object";
|
|
16
|
+
required: string[];
|
|
17
|
+
properties: {
|
|
18
|
+
issueId: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
maxLength: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
additionalProperties: false;
|
|
25
|
+
};
|
|
26
|
+
outputSchema: {
|
|
27
|
+
type: "object";
|
|
28
|
+
properties: {
|
|
29
|
+
id: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
identifier: {
|
|
33
|
+
type: string;
|
|
34
|
+
};
|
|
35
|
+
title: {
|
|
36
|
+
type: string;
|
|
37
|
+
};
|
|
38
|
+
description: {
|
|
39
|
+
type: string[];
|
|
40
|
+
};
|
|
41
|
+
state: {
|
|
42
|
+
type: string;
|
|
43
|
+
properties: {
|
|
44
|
+
name: {
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
type: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
required: string[];
|
|
52
|
+
};
|
|
53
|
+
assignee: {
|
|
54
|
+
type: string[];
|
|
55
|
+
properties: {
|
|
56
|
+
name: {
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
59
|
+
email: {
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
priority: {
|
|
65
|
+
type: string;
|
|
66
|
+
};
|
|
67
|
+
priorityLabel: {
|
|
68
|
+
type: string;
|
|
69
|
+
};
|
|
70
|
+
url: {
|
|
71
|
+
type: string;
|
|
72
|
+
};
|
|
73
|
+
team: {
|
|
74
|
+
type: string;
|
|
75
|
+
properties: {
|
|
76
|
+
name: {
|
|
77
|
+
type: string;
|
|
78
|
+
};
|
|
79
|
+
key: {
|
|
80
|
+
type: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
required: string[];
|
|
84
|
+
};
|
|
85
|
+
labels: {
|
|
86
|
+
type: string;
|
|
87
|
+
items: {
|
|
88
|
+
type: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
createdAt: {
|
|
92
|
+
type: string;
|
|
93
|
+
};
|
|
94
|
+
updatedAt: {
|
|
95
|
+
type: string;
|
|
96
|
+
};
|
|
97
|
+
linearConnected: {
|
|
98
|
+
type: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
required: string[];
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
timeoutMs: number;
|
|
105
|
+
handler(args: Record<string, unknown>, signal?: AbortSignal): Promise<{
|
|
106
|
+
content: Array<{
|
|
107
|
+
type: string;
|
|
108
|
+
text: string;
|
|
109
|
+
}>;
|
|
110
|
+
structuredContent: unknown;
|
|
111
|
+
}>;
|
|
112
|
+
};
|