patchwork-os 0.2.0-beta.10 → 0.2.0-beta.10.canary.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bridge.js +17 -10
- package/dist/bridge.js.map +1 -1
- package/dist/commands/connect.d.ts +47 -0
- package/dist/commands/connect.js +419 -0
- package/dist/commands/connect.js.map +1 -0
- package/dist/commands/recipe.d.ts +45 -4
- package/dist/commands/recipe.js +141 -4
- package/dist/commands/recipe.js.map +1 -1
- package/dist/commands/task.d.ts +25 -0
- package/dist/commands/task.js +61 -41
- package/dist/commands/task.js.map +1 -1
- package/dist/commands/tracesExport.d.ts +15 -1
- package/dist/commands/tracesExport.js +39 -5
- package/dist/commands/tracesExport.js.map +1 -1
- package/dist/connectorRoutes.js +556 -0
- package/dist/connectorRoutes.js.map +1 -1
- package/dist/connectors/connectorRegistry.d.ts +0 -3
- package/dist/connectors/connectorRegistry.js +8 -8
- package/dist/connectors/connectorRegistry.js.map +1 -1
- package/dist/connectors/datadog.js +8 -1
- package/dist/connectors/datadog.js.map +1 -1
- package/dist/connectors/jira.js +7 -2
- package/dist/connectors/jira.js.map +1 -1
- package/dist/connectors/mcpClient.js +37 -23
- package/dist/connectors/mcpClient.js.map +1 -1
- package/dist/connectors/notion.d.ts +1 -1
- package/dist/connectors/notion.js +13 -4
- package/dist/connectors/notion.js.map +1 -1
- package/dist/connectors/redis.js +10 -2
- package/dist/connectors/redis.js.map +1 -1
- package/dist/connectors/snowflake.js +18 -0
- package/dist/connectors/snowflake.js.map +1 -1
- package/dist/decisionReplay.d.ts +8 -6
- package/dist/decisionReplay.js +35 -11
- package/dist/decisionReplay.js.map +1 -1
- package/dist/drivers/claude/api.js +28 -5
- package/dist/drivers/claude/api.js.map +1 -1
- package/dist/drivers/claude/subprocess.js +47 -13
- package/dist/drivers/claude/subprocess.js.map +1 -1
- package/dist/drivers/local/index.d.ts +2 -17
- package/dist/drivers/local/index.js +5 -92
- package/dist/drivers/local/index.js.map +1 -1
- package/dist/fp/automationInterpreter.js +57 -12
- package/dist/fp/automationInterpreter.js.map +1 -1
- package/dist/fp/policyParser.js +5 -1
- package/dist/fp/policyParser.js.map +1 -1
- package/dist/index.js +154 -83
- package/dist/index.js.map +1 -1
- package/dist/localEndpointGuard.d.ts +25 -0
- package/dist/localEndpointGuard.js +101 -0
- package/dist/localEndpointGuard.js.map +1 -0
- package/dist/orchestrator/childBridgeClient.d.ts +5 -0
- package/dist/orchestrator/childBridgeClient.js +28 -1
- package/dist/orchestrator/childBridgeClient.js.map +1 -1
- package/dist/orchestrator/orchestratorBridge.d.ts +33 -0
- package/dist/orchestrator/orchestratorBridge.js +70 -9
- package/dist/orchestrator/orchestratorBridge.js.map +1 -1
- package/dist/recipes/chainedRunner.js +14 -4
- package/dist/recipes/chainedRunner.js.map +1 -1
- package/dist/recipes/compiler.js +9 -5
- package/dist/recipes/compiler.js.map +1 -1
- package/dist/recipes/dependencyGraph.d.ts +9 -0
- package/dist/recipes/dependencyGraph.js +19 -2
- package/dist/recipes/dependencyGraph.js.map +1 -1
- package/dist/recipes/githubInstallSource.d.ts +9 -2
- package/dist/recipes/githubInstallSource.js +36 -6
- package/dist/recipes/githubInstallSource.js.map +1 -1
- package/dist/recipes/idempotencyKey.d.ts +23 -3
- package/dist/recipes/idempotencyKey.js +57 -4
- package/dist/recipes/idempotencyKey.js.map +1 -1
- package/dist/recipes/installer.js +10 -1
- package/dist/recipes/installer.js.map +1 -1
- package/dist/recipes/parser.js +28 -1
- package/dist/recipes/parser.js.map +1 -1
- package/dist/recipes/schema.d.ts +29 -2
- package/dist/recipes/schemaGenerator.js +16 -2
- package/dist/recipes/schemaGenerator.js.map +1 -1
- package/dist/recipes/toolRegistry.js +13 -4
- package/dist/recipes/toolRegistry.js.map +1 -1
- package/dist/recipes/tools/airtable.d.ts +15 -0
- package/dist/recipes/tools/airtable.js +239 -0
- package/dist/recipes/tools/airtable.js.map +1 -0
- package/dist/recipes/tools/circleci.d.ts +10 -0
- package/dist/recipes/tools/circleci.js +203 -0
- package/dist/recipes/tools/circleci.js.map +1 -0
- package/dist/recipes/tools/grafana.d.ts +11 -0
- package/dist/recipes/tools/grafana.js +215 -0
- package/dist/recipes/tools/grafana.js.map +1 -0
- package/dist/recipes/tools/index.d.ts +11 -0
- package/dist/recipes/tools/index.js +11 -0
- package/dist/recipes/tools/index.js.map +1 -1
- package/dist/recipes/tools/pipedrive.d.ts +16 -0
- package/dist/recipes/tools/pipedrive.js +233 -0
- package/dist/recipes/tools/pipedrive.js.map +1 -0
- package/dist/recipes/tools/posthog.d.ts +16 -0
- package/dist/recipes/tools/posthog.js +218 -0
- package/dist/recipes/tools/posthog.js.map +1 -0
- package/dist/recipes/tools/resend.d.ts +8 -0
- package/dist/recipes/tools/resend.js +152 -0
- package/dist/recipes/tools/resend.js.map +1 -0
- package/dist/recipes/tools/sendgrid.d.ts +9 -0
- package/dist/recipes/tools/sendgrid.js +174 -0
- package/dist/recipes/tools/sendgrid.js.map +1 -0
- package/dist/recipes/tools/shopify.d.ts +16 -0
- package/dist/recipes/tools/shopify.js +265 -0
- package/dist/recipes/tools/shopify.js.map +1 -0
- package/dist/recipes/tools/todoist.d.ts +15 -0
- package/dist/recipes/tools/todoist.js +227 -0
- package/dist/recipes/tools/todoist.js.map +1 -0
- package/dist/recipes/tools/twilio.d.ts +11 -0
- package/dist/recipes/tools/twilio.js +179 -0
- package/dist/recipes/tools/twilio.js.map +1 -0
- package/dist/recipes/tools/vercel.d.ts +9 -0
- package/dist/recipes/tools/vercel.js +145 -0
- package/dist/recipes/tools/vercel.js.map +1 -0
- package/dist/recipes/validation.js +112 -0
- package/dist/recipes/validation.js.map +1 -1
- package/dist/recipes/yamlRunner.d.ts +3 -0
- package/dist/recipes/yamlRunner.js +112 -29
- package/dist/recipes/yamlRunner.js.map +1 -1
- package/dist/schemas/recipe.v1.json +2 -2
- package/dist/telemetry.js +20 -9
- package/dist/telemetry.js.map +1 -1
- package/dist/tools/getGitStatus.js +6 -1
- package/dist/tools/getGitStatus.js.map +1 -1
- package/dist/tools/getToolCapabilities.js +39 -4
- package/dist/tools/getToolCapabilities.js.map +1 -1
- package/dist/tools/github/composite.d.ts +1 -1
- package/dist/tools/github/composite.js +7 -7
- package/dist/tools/github/composite.js.map +1 -1
- package/dist/tools/github/pr.d.ts +6 -6
- package/dist/tools/github/pr.js +18 -11
- package/dist/tools/github/pr.js.map +1 -1
- package/dist/tools/index.js +14 -10
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/previewEdit.js +16 -1
- package/dist/tools/previewEdit.js.map +1 -1
- package/dist/tools/searchAndReplace.js +4 -5
- package/dist/tools/searchAndReplace.js.map +1 -1
- package/dist/tools/searchTools.d.ts +26 -0
- package/dist/tools/searchTools.js +42 -2
- package/dist/tools/searchTools.js.map +1 -1
- package/dist/tools/transaction.d.ts +9 -1
- package/dist/tools/transaction.js +59 -4
- package/dist/tools/transaction.js.map +1 -1
- package/dist/tools/utils.d.ts +15 -0
- package/dist/tools/utils.js +19 -0
- package/dist/tools/utils.js.map +1 -1
- package/dist/transport.js +23 -0
- package/dist/transport.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CircleCI recipe-step tools — read wrappers (list_pipelines, get_workflow,
|
|
3
|
+
* get_job) plus a write (trigger_pipeline).
|
|
4
|
+
*
|
|
5
|
+
* Self-registering tool module for the recipe tool registry. Wraps the
|
|
6
|
+
* CircleCI v2 connector methods 1:1 and JSON-stringifies the raw connector
|
|
7
|
+
* return type back out. Read tools declare `isWrite: false`; trigger_pipeline
|
|
8
|
+
* declares `isWrite: true` so the approval queue gates it appropriately.
|
|
9
|
+
*/
|
|
10
|
+
import { CommonSchemas, registerTool } from "../toolRegistry.js";
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// circleci.list_pipelines
|
|
13
|
+
// ============================================================================
|
|
14
|
+
registerTool({
|
|
15
|
+
id: "circleci.list_pipelines",
|
|
16
|
+
namespace: "circleci",
|
|
17
|
+
description: "List recent CircleCI pipelines for a project, optionally filtered by branch.",
|
|
18
|
+
paramsSchema: {
|
|
19
|
+
type: "object",
|
|
20
|
+
properties: {
|
|
21
|
+
projectSlug: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "CircleCI project slug, e.g. gh/owner/repo (github/ and bitbucket/ prefixes accepted)",
|
|
24
|
+
},
|
|
25
|
+
branch: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "Filter pipelines by VCS branch name",
|
|
28
|
+
},
|
|
29
|
+
into: CommonSchemas.into,
|
|
30
|
+
},
|
|
31
|
+
required: ["projectSlug"],
|
|
32
|
+
},
|
|
33
|
+
outputSchema: {
|
|
34
|
+
type: "array",
|
|
35
|
+
items: {
|
|
36
|
+
type: "object",
|
|
37
|
+
properties: {
|
|
38
|
+
id: { type: "string" },
|
|
39
|
+
project_slug: { type: "string" },
|
|
40
|
+
state: { type: "string" },
|
|
41
|
+
number: { type: "number" },
|
|
42
|
+
trigger: { type: "object" },
|
|
43
|
+
vcs: { type: "object" },
|
|
44
|
+
created_at: { type: "string" },
|
|
45
|
+
updated_at: { type: "string" },
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
riskDefault: "low",
|
|
50
|
+
isWrite: false,
|
|
51
|
+
isConnector: true,
|
|
52
|
+
execute: async ({ params }) => {
|
|
53
|
+
const { getCircleCIConnector } = await import("../../connectors/circleci.js");
|
|
54
|
+
const connector = getCircleCIConnector();
|
|
55
|
+
const result = await connector.getPipelines(params.projectSlug, typeof params.branch === "string" ? params.branch : undefined);
|
|
56
|
+
return JSON.stringify(result);
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
// ============================================================================
|
|
60
|
+
// circleci.trigger_pipeline (write-gated)
|
|
61
|
+
// ============================================================================
|
|
62
|
+
registerTool({
|
|
63
|
+
id: "circleci.trigger_pipeline",
|
|
64
|
+
namespace: "circleci",
|
|
65
|
+
description: "Trigger a new CircleCI pipeline for a project, optionally on a branch or tag with custom pipeline parameters.",
|
|
66
|
+
paramsSchema: {
|
|
67
|
+
type: "object",
|
|
68
|
+
properties: {
|
|
69
|
+
projectSlug: {
|
|
70
|
+
type: "string",
|
|
71
|
+
description: "CircleCI project slug, e.g. gh/owner/repo (github/ and bitbucket/ prefixes accepted)",
|
|
72
|
+
},
|
|
73
|
+
branch: {
|
|
74
|
+
type: "string",
|
|
75
|
+
description: "VCS branch to run the pipeline against",
|
|
76
|
+
},
|
|
77
|
+
tag: {
|
|
78
|
+
type: "string",
|
|
79
|
+
description: "VCS tag to run the pipeline against (mutually exclusive with branch)",
|
|
80
|
+
},
|
|
81
|
+
parameters: {
|
|
82
|
+
type: "object",
|
|
83
|
+
description: "Pipeline parameters map (string/boolean/number values) passed to the pipeline",
|
|
84
|
+
},
|
|
85
|
+
into: CommonSchemas.into,
|
|
86
|
+
},
|
|
87
|
+
required: ["projectSlug"],
|
|
88
|
+
},
|
|
89
|
+
outputSchema: {
|
|
90
|
+
type: "object",
|
|
91
|
+
properties: {
|
|
92
|
+
id: { type: "string" },
|
|
93
|
+
state: { type: "string" },
|
|
94
|
+
number: { type: "number" },
|
|
95
|
+
created_at: { type: "string" },
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
riskDefault: "medium",
|
|
99
|
+
isWrite: true,
|
|
100
|
+
isConnector: true,
|
|
101
|
+
execute: async ({ params }) => {
|
|
102
|
+
const { getCircleCIConnector } = await import("../../connectors/circleci.js");
|
|
103
|
+
const connector = getCircleCIConnector();
|
|
104
|
+
const result = await connector.triggerPipeline(params.projectSlug, {
|
|
105
|
+
branch: typeof params.branch === "string" ? params.branch : undefined,
|
|
106
|
+
tag: typeof params.tag === "string" ? params.tag : undefined,
|
|
107
|
+
parameters: params.parameters && typeof params.parameters === "object"
|
|
108
|
+
? params.parameters
|
|
109
|
+
: undefined,
|
|
110
|
+
});
|
|
111
|
+
return JSON.stringify(result);
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
// ============================================================================
|
|
115
|
+
// circleci.get_workflow
|
|
116
|
+
// ============================================================================
|
|
117
|
+
registerTool({
|
|
118
|
+
id: "circleci.get_workflow",
|
|
119
|
+
namespace: "circleci",
|
|
120
|
+
description: "Fetch a single CircleCI workflow by its workflow ID.",
|
|
121
|
+
paramsSchema: {
|
|
122
|
+
type: "object",
|
|
123
|
+
properties: {
|
|
124
|
+
id: {
|
|
125
|
+
type: "string",
|
|
126
|
+
description: "CircleCI workflow ID (UUID)",
|
|
127
|
+
},
|
|
128
|
+
into: CommonSchemas.into,
|
|
129
|
+
},
|
|
130
|
+
required: ["id"],
|
|
131
|
+
},
|
|
132
|
+
outputSchema: {
|
|
133
|
+
type: "object",
|
|
134
|
+
properties: {
|
|
135
|
+
id: { type: "string" },
|
|
136
|
+
name: { type: "string" },
|
|
137
|
+
status: { type: "string" },
|
|
138
|
+
pipeline_id: { type: "string" },
|
|
139
|
+
pipeline_number: { type: "number" },
|
|
140
|
+
project_slug: { type: "string" },
|
|
141
|
+
started_by: { type: "string" },
|
|
142
|
+
created_at: { type: "string" },
|
|
143
|
+
stopped_at: { type: ["string", "null"] },
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
riskDefault: "low",
|
|
147
|
+
isWrite: false,
|
|
148
|
+
isConnector: true,
|
|
149
|
+
execute: async ({ params }) => {
|
|
150
|
+
const { getCircleCIConnector } = await import("../../connectors/circleci.js");
|
|
151
|
+
const connector = getCircleCIConnector();
|
|
152
|
+
const result = await connector.getWorkflow(params.id);
|
|
153
|
+
return JSON.stringify(result);
|
|
154
|
+
},
|
|
155
|
+
});
|
|
156
|
+
// ============================================================================
|
|
157
|
+
// circleci.get_job
|
|
158
|
+
// ============================================================================
|
|
159
|
+
registerTool({
|
|
160
|
+
id: "circleci.get_job",
|
|
161
|
+
namespace: "circleci",
|
|
162
|
+
description: "Fetch a single CircleCI job by project slug and job number.",
|
|
163
|
+
paramsSchema: {
|
|
164
|
+
type: "object",
|
|
165
|
+
properties: {
|
|
166
|
+
projectSlug: {
|
|
167
|
+
type: "string",
|
|
168
|
+
description: "CircleCI project slug, e.g. gh/owner/repo (github/ and bitbucket/ prefixes accepted)",
|
|
169
|
+
},
|
|
170
|
+
jobNumber: {
|
|
171
|
+
type: "number",
|
|
172
|
+
description: "The job number within the project",
|
|
173
|
+
},
|
|
174
|
+
into: CommonSchemas.into,
|
|
175
|
+
},
|
|
176
|
+
required: ["projectSlug", "jobNumber"],
|
|
177
|
+
},
|
|
178
|
+
outputSchema: {
|
|
179
|
+
type: "object",
|
|
180
|
+
properties: {
|
|
181
|
+
id: { type: "string" },
|
|
182
|
+
name: { type: "string" },
|
|
183
|
+
status: { type: "string" },
|
|
184
|
+
job_number: { type: "number" },
|
|
185
|
+
type: { type: "string" },
|
|
186
|
+
created_at: { type: "string" },
|
|
187
|
+
started_at: { type: ["string", "null"] },
|
|
188
|
+
stopped_at: { type: ["string", "null"] },
|
|
189
|
+
approval_request_id: { type: "string" },
|
|
190
|
+
dependencies: { type: "array", items: { type: "string" } },
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
riskDefault: "low",
|
|
194
|
+
isWrite: false,
|
|
195
|
+
isConnector: true,
|
|
196
|
+
execute: async ({ params }) => {
|
|
197
|
+
const { getCircleCIConnector } = await import("../../connectors/circleci.js");
|
|
198
|
+
const connector = getCircleCIConnector();
|
|
199
|
+
const result = await connector.getJob(params.projectSlug, params.jobNumber);
|
|
200
|
+
return JSON.stringify(result);
|
|
201
|
+
},
|
|
202
|
+
});
|
|
203
|
+
//# sourceMappingURL=circleci.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circleci.js","sourceRoot":"","sources":["../../../src/recipes/tools/circleci.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEjE,+EAA+E;AAC/E,0BAA0B;AAC1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;YACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACtB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC1B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC9B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC9B,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE;YACxC,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE;YACxC,mBAAmB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACvC,YAAY,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;SAC3D;KACF;IACD,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QAC5B,MAAM,EAAE,oBAAoB,EAAE,GAAG,MAAM,MAAM,CAC3C,8BAA8B,CAC/B,CAAC;QACF,MAAM,SAAS,GAAG,oBAAoB,EAAE,CAAC;QACzC,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,MAAM,CACnC,MAAM,CAAC,WAAqB,EAC5B,MAAM,CAAC,SAAmB,CAC3B,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grafana tools — read access to dashboards, alert rules, and datasource
|
|
3
|
+
* queries, plus a single write (create_annotation).
|
|
4
|
+
*
|
|
5
|
+
* Self-registering tool module for the recipe tool registry. Each tool mirrors
|
|
6
|
+
* the real connector signature in `src/connectors/grafana.ts` and returns
|
|
7
|
+
* `JSON.stringify(result)` of the connector's native return type. Reads declare
|
|
8
|
+
* `isWrite: false`; `create_annotation` declares `isWrite: true` so the approval
|
|
9
|
+
* queue gates it appropriately.
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grafana tools — read access to dashboards, alert rules, and datasource
|
|
3
|
+
* queries, plus a single write (create_annotation).
|
|
4
|
+
*
|
|
5
|
+
* Self-registering tool module for the recipe tool registry. Each tool mirrors
|
|
6
|
+
* the real connector signature in `src/connectors/grafana.ts` and returns
|
|
7
|
+
* `JSON.stringify(result)` of the connector's native return type. Reads declare
|
|
8
|
+
* `isWrite: false`; `create_annotation` declares `isWrite: true` so the approval
|
|
9
|
+
* queue gates it appropriately.
|
|
10
|
+
*/
|
|
11
|
+
import { CommonSchemas, registerTool } from "../toolRegistry.js";
|
|
12
|
+
// ============================================================================
|
|
13
|
+
// grafana.list_dashboards
|
|
14
|
+
// ============================================================================
|
|
15
|
+
registerTool({
|
|
16
|
+
id: "grafana.list_dashboards",
|
|
17
|
+
namespace: "grafana",
|
|
18
|
+
description: "List Grafana dashboards, optionally filtered by a search query string.",
|
|
19
|
+
paramsSchema: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {
|
|
22
|
+
query: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "Search query to filter dashboards by title/tag",
|
|
25
|
+
},
|
|
26
|
+
limit: {
|
|
27
|
+
type: "number",
|
|
28
|
+
description: "Max number of dashboards to return (default 50)",
|
|
29
|
+
default: 50,
|
|
30
|
+
},
|
|
31
|
+
into: CommonSchemas.into,
|
|
32
|
+
},
|
|
33
|
+
required: [],
|
|
34
|
+
},
|
|
35
|
+
outputSchema: {
|
|
36
|
+
type: "array",
|
|
37
|
+
items: {
|
|
38
|
+
type: "object",
|
|
39
|
+
properties: {
|
|
40
|
+
id: { type: "number" },
|
|
41
|
+
uid: { type: "string" },
|
|
42
|
+
title: { type: "string" },
|
|
43
|
+
url: { type: "string" },
|
|
44
|
+
tags: { type: "array", items: { type: "string" } },
|
|
45
|
+
folderTitle: { type: "string" },
|
|
46
|
+
folderId: { type: "number" },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
riskDefault: "low",
|
|
51
|
+
isWrite: false,
|
|
52
|
+
isConnector: true,
|
|
53
|
+
execute: async ({ params }) => {
|
|
54
|
+
const { getGrafanaConnector } = await import("../../connectors/grafana.js");
|
|
55
|
+
const connector = getGrafanaConnector();
|
|
56
|
+
const result = await connector.getDashboards(typeof params.query === "string" ? params.query : undefined, typeof params.limit === "number" ? params.limit : undefined);
|
|
57
|
+
return JSON.stringify(result);
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
// ============================================================================
|
|
61
|
+
// grafana.list_alert_rules
|
|
62
|
+
// ============================================================================
|
|
63
|
+
registerTool({
|
|
64
|
+
id: "grafana.list_alert_rules",
|
|
65
|
+
namespace: "grafana",
|
|
66
|
+
description: "List Grafana provisioned alert rules.",
|
|
67
|
+
paramsSchema: {
|
|
68
|
+
type: "object",
|
|
69
|
+
properties: {
|
|
70
|
+
limit: {
|
|
71
|
+
type: "number",
|
|
72
|
+
description: "Max number of alert rules to return (default 100)",
|
|
73
|
+
default: 100,
|
|
74
|
+
},
|
|
75
|
+
into: CommonSchemas.into,
|
|
76
|
+
},
|
|
77
|
+
required: [],
|
|
78
|
+
},
|
|
79
|
+
outputSchema: {
|
|
80
|
+
type: "array",
|
|
81
|
+
items: {
|
|
82
|
+
type: "object",
|
|
83
|
+
properties: {
|
|
84
|
+
uid: { type: "string" },
|
|
85
|
+
title: { type: "string" },
|
|
86
|
+
condition: { type: "string" },
|
|
87
|
+
data: { type: "array", items: {} },
|
|
88
|
+
intervalSeconds: { type: "number" },
|
|
89
|
+
orgId: { type: "number" },
|
|
90
|
+
namespaceUID: { type: "string" },
|
|
91
|
+
ruleGroup: { type: "string" },
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
riskDefault: "low",
|
|
96
|
+
isWrite: false,
|
|
97
|
+
isConnector: true,
|
|
98
|
+
execute: async ({ params }) => {
|
|
99
|
+
const { getGrafanaConnector } = await import("../../connectors/grafana.js");
|
|
100
|
+
const connector = getGrafanaConnector();
|
|
101
|
+
const result = await connector.getAlertRules(typeof params.limit === "number" ? params.limit : undefined);
|
|
102
|
+
return JSON.stringify(result);
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
// ============================================================================
|
|
106
|
+
// grafana.create_annotation
|
|
107
|
+
// ============================================================================
|
|
108
|
+
registerTool({
|
|
109
|
+
id: "grafana.create_annotation",
|
|
110
|
+
namespace: "grafana",
|
|
111
|
+
description: "Create a Grafana annotation on a dashboard panel (marks an event in time).",
|
|
112
|
+
paramsSchema: {
|
|
113
|
+
type: "object",
|
|
114
|
+
properties: {
|
|
115
|
+
dashboardUid: {
|
|
116
|
+
type: "string",
|
|
117
|
+
description: "UID of the dashboard to annotate",
|
|
118
|
+
},
|
|
119
|
+
panelId: {
|
|
120
|
+
type: "number",
|
|
121
|
+
description: "ID of the panel within the dashboard",
|
|
122
|
+
},
|
|
123
|
+
text: {
|
|
124
|
+
type: "string",
|
|
125
|
+
description: "Annotation text body",
|
|
126
|
+
},
|
|
127
|
+
tags: {
|
|
128
|
+
type: "array",
|
|
129
|
+
items: { type: "string" },
|
|
130
|
+
description: "Optional tags to attach to the annotation",
|
|
131
|
+
},
|
|
132
|
+
time: {
|
|
133
|
+
type: "number",
|
|
134
|
+
description: "Optional start time (epoch milliseconds)",
|
|
135
|
+
},
|
|
136
|
+
timeEnd: {
|
|
137
|
+
type: "number",
|
|
138
|
+
description: "Optional end time (epoch milliseconds) for a region",
|
|
139
|
+
},
|
|
140
|
+
into: CommonSchemas.into,
|
|
141
|
+
},
|
|
142
|
+
required: ["dashboardUid", "panelId", "text"],
|
|
143
|
+
},
|
|
144
|
+
outputSchema: {
|
|
145
|
+
type: "object",
|
|
146
|
+
properties: {
|
|
147
|
+
id: { type: "number" },
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
riskDefault: "medium",
|
|
151
|
+
isWrite: true,
|
|
152
|
+
isConnector: true,
|
|
153
|
+
execute: async ({ params }) => {
|
|
154
|
+
const { getGrafanaConnector } = await import("../../connectors/grafana.js");
|
|
155
|
+
const connector = getGrafanaConnector();
|
|
156
|
+
const result = await connector.createAnnotation(params.dashboardUid, params.panelId, params.text, {
|
|
157
|
+
tags: Array.isArray(params.tags)
|
|
158
|
+
? params.tags
|
|
159
|
+
: undefined,
|
|
160
|
+
time: typeof params.time === "number" ? params.time : undefined,
|
|
161
|
+
timeEnd: typeof params.timeEnd === "number" ? params.timeEnd : undefined,
|
|
162
|
+
});
|
|
163
|
+
return JSON.stringify(result);
|
|
164
|
+
},
|
|
165
|
+
});
|
|
166
|
+
// ============================================================================
|
|
167
|
+
// grafana.query_datasource
|
|
168
|
+
// ============================================================================
|
|
169
|
+
registerTool({
|
|
170
|
+
id: "grafana.query_datasource",
|
|
171
|
+
namespace: "grafana",
|
|
172
|
+
description: "Run one or more queries against a Grafana datasource over a time range.",
|
|
173
|
+
paramsSchema: {
|
|
174
|
+
type: "object",
|
|
175
|
+
properties: {
|
|
176
|
+
datasourceUid: {
|
|
177
|
+
type: "string",
|
|
178
|
+
description: "UID of the datasource to query",
|
|
179
|
+
},
|
|
180
|
+
queries: {
|
|
181
|
+
type: "array",
|
|
182
|
+
items: { type: "object" },
|
|
183
|
+
description: "Array of query objects (datasource-specific; datasource uid is injected)",
|
|
184
|
+
},
|
|
185
|
+
from: {
|
|
186
|
+
type: "string",
|
|
187
|
+
description: "Range start (e.g. 'now-1h' or epoch ms string)",
|
|
188
|
+
default: "now-1h",
|
|
189
|
+
},
|
|
190
|
+
to: {
|
|
191
|
+
type: "string",
|
|
192
|
+
description: "Range end (e.g. 'now' or epoch ms string)",
|
|
193
|
+
default: "now",
|
|
194
|
+
},
|
|
195
|
+
into: CommonSchemas.into,
|
|
196
|
+
},
|
|
197
|
+
required: ["datasourceUid", "queries"],
|
|
198
|
+
},
|
|
199
|
+
outputSchema: {
|
|
200
|
+
type: "object",
|
|
201
|
+
properties: {
|
|
202
|
+
results: { type: "object" },
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
riskDefault: "low",
|
|
206
|
+
isWrite: false,
|
|
207
|
+
isConnector: true,
|
|
208
|
+
execute: async ({ params }) => {
|
|
209
|
+
const { getGrafanaConnector } = await import("../../connectors/grafana.js");
|
|
210
|
+
const connector = getGrafanaConnector();
|
|
211
|
+
const result = await connector.queryDataSource(params.datasourceUid, Array.isArray(params.queries) ? params.queries : [], typeof params.from === "string" ? params.from : undefined, typeof params.to === "string" ? params.to : undefined);
|
|
212
|
+
return JSON.stringify(result);
|
|
213
|
+
},
|
|
214
|
+
});
|
|
215
|
+
//# sourceMappingURL=grafana.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grafana.js","sourceRoot":"","sources":["../../../src/recipes/tools/grafana.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEjE,+EAA+E;AAC/E,0BAA0B;AAC1B,+EAA+E;AAE/E,YAAY,CAAC;IACX,EAAE,EAAE,yBAAyB;IAC7B,SAAS,EAAE,SAAS;IACpB,WAAW,EACT,wEAAwE;IAC1E,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gDAAgD;aAC9D;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iDAAiD;gBAC9D,OAAO,EAAE,EAAE;aACZ;YACD,IAAI,EAAE,aAAa,CAAC,IAAI;SACzB;QACD,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,EAAE,KAAK;aACf;YACD,IAAI,EAAE,aAAa,CAAC,IAAI;SACzB;QACD,QAAQ,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC;KACvC;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC5B;KACF;IACD,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QAC5B,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,MAAM,CAAC,6BAA6B,CAAC,CAAC;QAC5E,MAAM,SAAS,GAAG,mBAAmB,EAAE,CAAC;QACxC,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,eAAe,CAC5C,MAAM,CAAC,aAAuB,EAC9B,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAE,MAAM,CAAC,OAAqB,CAAC,CAAC,CAAC,EAAE,EAClE,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EACzD,OAAO,MAAM,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CACtD,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -27,6 +27,17 @@ import "./jira.js";
|
|
|
27
27
|
import "./pagerduty.js";
|
|
28
28
|
import "./sentry.js";
|
|
29
29
|
import "./stripe.js";
|
|
30
|
+
import "./circleci.js";
|
|
31
|
+
import "./grafana.js";
|
|
32
|
+
import "./pipedrive.js";
|
|
33
|
+
import "./posthog.js";
|
|
34
|
+
import "./shopify.js";
|
|
35
|
+
import "./todoist.js";
|
|
36
|
+
import "./airtable.js";
|
|
37
|
+
import "./resend.js";
|
|
38
|
+
import "./sendgrid.js";
|
|
39
|
+
import "./twilio.js";
|
|
40
|
+
import "./vercel.js";
|
|
30
41
|
import "./meetingNotes.js";
|
|
31
42
|
export type { RegisteredTool, ToolContext, ToolExecute, ToolMetadata, } from "../toolRegistry.js";
|
|
32
43
|
export { CommonOutputSchemas, CommonSchemas, clearRegistry, executeTool, getNamespaces, getTool, hasTool, listTools, registerTool, } from "../toolRegistry.js";
|
|
@@ -29,6 +29,17 @@ import "./jira.js";
|
|
|
29
29
|
import "./pagerduty.js";
|
|
30
30
|
import "./sentry.js";
|
|
31
31
|
import "./stripe.js";
|
|
32
|
+
import "./circleci.js";
|
|
33
|
+
import "./grafana.js";
|
|
34
|
+
import "./pipedrive.js";
|
|
35
|
+
import "./posthog.js";
|
|
36
|
+
import "./shopify.js";
|
|
37
|
+
import "./todoist.js";
|
|
38
|
+
import "./airtable.js";
|
|
39
|
+
import "./resend.js";
|
|
40
|
+
import "./sendgrid.js";
|
|
41
|
+
import "./twilio.js";
|
|
42
|
+
import "./vercel.js";
|
|
32
43
|
import "./meetingNotes.js";
|
|
33
44
|
// Re-export registry for convenience
|
|
34
45
|
export { CommonOutputSchemas, CommonSchemas, clearRegistry, executeTool, getNamespaces, getTool, hasTool, listTools, registerTool, } from "../toolRegistry.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/recipes/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,aAAa;AACb,OAAO,WAAW,CAAC;AACnB,OAAO,UAAU,CAAC;AAClB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,WAAW,CAAC;AACnB,OAAO,aAAa,CAAC;AAErB,wBAAwB;AACxB,OAAO,YAAY,CAAC;AACpB,OAAO,YAAY,CAAC;AACpB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,eAAe,CAAC;AACvB,OAAO,YAAY,CAAC;AACpB,OAAO,aAAa,CAAC;AACrB,OAAO,iBAAiB,CAAC;AACzB,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,WAAW,CAAC;AACnB,OAAO,gBAAgB,CAAC;AACxB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,mBAAmB,CAAC;AAQ3B,qCAAqC;AACrC,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,WAAW,EACX,aAAa,EACb,OAAO,EACP,OAAO,EACP,SAAS,EACT,YAAY,GACb,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/recipes/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,aAAa;AACb,OAAO,WAAW,CAAC;AACnB,OAAO,UAAU,CAAC;AAClB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,WAAW,CAAC;AACnB,OAAO,aAAa,CAAC;AAErB,wBAAwB;AACxB,OAAO,YAAY,CAAC;AACpB,OAAO,YAAY,CAAC;AACpB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,eAAe,CAAC;AACvB,OAAO,YAAY,CAAC;AACpB,OAAO,aAAa,CAAC;AACrB,OAAO,iBAAiB,CAAC;AACzB,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,WAAW,CAAC;AACnB,OAAO,gBAAgB,CAAC;AACxB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,eAAe,CAAC;AACvB,OAAO,cAAc,CAAC;AACtB,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,aAAa,CAAC;AACrB,OAAO,eAAe,CAAC;AACvB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,mBAAmB,CAAC;AAQ3B,qCAAqC;AACrC,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,WAAW,EACX,aAAa,EACb,OAAO,EACP,OAAO,EACP,SAAS,EACT,YAAY,GACb,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pipedrive tools — read wrappers (deals, persons, pipelines) plus a write
|
|
3
|
+
* (create_deal) over the Pipedrive CRM REST API v1.
|
|
4
|
+
*
|
|
5
|
+
* Self-registering tool module for the recipe tool registry. Mirrors the
|
|
6
|
+
* connector method signatures faithfully (see src/connectors/pipedrive.ts):
|
|
7
|
+
* - getDeals({ status?, start?, limit? }) → PipedriveDeal[]
|
|
8
|
+
* - createDeal({ title, value?, currency?, stageId?, personId?, orgId?,
|
|
9
|
+
* status?, expectedCloseDate? }) → PipedriveDeal
|
|
10
|
+
* - getPersons({ start?, limit? }) → PipedrivePerson[]
|
|
11
|
+
* - getPipelines() → PipedrivePipeline[]
|
|
12
|
+
*
|
|
13
|
+
* Read tools declare `isWrite: false`; the write tool declares `isWrite: true`
|
|
14
|
+
* so the approval queue gates it appropriately.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|