patchwork-os 0.2.0-beta.10.canary.100 → 0.2.0-beta.10.canary.103

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.
Files changed (58) hide show
  1. package/dist/recipes/tools/caldiy.d.ts +13 -0
  2. package/dist/recipes/tools/caldiy.js +214 -0
  3. package/dist/recipes/tools/caldiy.js.map +1 -0
  4. package/dist/recipes/tools/circleci.d.ts +10 -0
  5. package/dist/recipes/tools/circleci.js +203 -0
  6. package/dist/recipes/tools/circleci.js.map +1 -0
  7. package/dist/recipes/tools/cloudflare.d.ts +13 -0
  8. package/dist/recipes/tools/cloudflare.js +210 -0
  9. package/dist/recipes/tools/cloudflare.js.map +1 -0
  10. package/dist/recipes/tools/elasticsearch.d.ts +11 -0
  11. package/dist/recipes/tools/elasticsearch.js +156 -0
  12. package/dist/recipes/tools/elasticsearch.js.map +1 -0
  13. package/dist/recipes/tools/figma.d.ts +12 -0
  14. package/dist/recipes/tools/figma.js +194 -0
  15. package/dist/recipes/tools/figma.js.map +1 -0
  16. package/dist/recipes/tools/grafana.d.ts +11 -0
  17. package/dist/recipes/tools/grafana.js +215 -0
  18. package/dist/recipes/tools/grafana.js.map +1 -0
  19. package/dist/recipes/tools/index.d.ts +18 -0
  20. package/dist/recipes/tools/index.js +18 -0
  21. package/dist/recipes/tools/index.js.map +1 -1
  22. package/dist/recipes/tools/obsidian.d.ts +15 -0
  23. package/dist/recipes/tools/obsidian.js +172 -0
  24. package/dist/recipes/tools/obsidian.js.map +1 -0
  25. package/dist/recipes/tools/paystack.d.ts +11 -0
  26. package/dist/recipes/tools/paystack.js +211 -0
  27. package/dist/recipes/tools/paystack.js.map +1 -0
  28. package/dist/recipes/tools/pipedrive.d.ts +16 -0
  29. package/dist/recipes/tools/pipedrive.js +233 -0
  30. package/dist/recipes/tools/pipedrive.js.map +1 -0
  31. package/dist/recipes/tools/postgres.d.ts +15 -0
  32. package/dist/recipes/tools/postgres.js +185 -0
  33. package/dist/recipes/tools/postgres.js.map +1 -0
  34. package/dist/recipes/tools/posthog.d.ts +16 -0
  35. package/dist/recipes/tools/posthog.js +218 -0
  36. package/dist/recipes/tools/posthog.js.map +1 -0
  37. package/dist/recipes/tools/redis.d.ts +9 -0
  38. package/dist/recipes/tools/redis.js +140 -0
  39. package/dist/recipes/tools/redis.js.map +1 -0
  40. package/dist/recipes/tools/shopify.d.ts +16 -0
  41. package/dist/recipes/tools/shopify.js +265 -0
  42. package/dist/recipes/tools/shopify.js.map +1 -0
  43. package/dist/recipes/tools/snowflake.d.ts +16 -0
  44. package/dist/recipes/tools/snowflake.js +172 -0
  45. package/dist/recipes/tools/snowflake.js.map +1 -0
  46. package/dist/recipes/tools/supabase.d.ts +9 -0
  47. package/dist/recipes/tools/supabase.js +132 -0
  48. package/dist/recipes/tools/supabase.js.map +1 -0
  49. package/dist/recipes/tools/todoist.d.ts +15 -0
  50. package/dist/recipes/tools/todoist.js +227 -0
  51. package/dist/recipes/tools/todoist.js.map +1 -0
  52. package/dist/recipes/tools/webflow.d.ts +11 -0
  53. package/dist/recipes/tools/webflow.js +243 -0
  54. package/dist/recipes/tools/webflow.js.map +1 -0
  55. package/dist/recipes/tools/woocommerce.d.ts +18 -0
  56. package/dist/recipes/tools/woocommerce.js +259 -0
  57. package/dist/recipes/tools/woocommerce.js.map +1 -0
  58. package/package.json +1 -1
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Cal.diy tools — scheduling via the Cal.com-compatible API.
3
+ *
4
+ * Self-registering tool module for the recipe tool registry. Read tools wrap
5
+ * event types and bookings; the single write tool cancels a booking.
6
+ *
7
+ * Wraps the Cal.diy connector (src/connectors/caldiy.ts):
8
+ * - getEventTypes() → list_event_types (read)
9
+ * - getBookings({status, attendeeEmail,…}) → list_bookings (read)
10
+ * - getBooking(uid) → get_booking (read)
11
+ * - cancelBooking(uid, reason?) → cancel_booking (write)
12
+ */
13
+ export {};
@@ -0,0 +1,214 @@
1
+ /**
2
+ * Cal.diy tools — scheduling via the Cal.com-compatible API.
3
+ *
4
+ * Self-registering tool module for the recipe tool registry. Read tools wrap
5
+ * event types and bookings; the single write tool cancels a booking.
6
+ *
7
+ * Wraps the Cal.diy connector (src/connectors/caldiy.ts):
8
+ * - getEventTypes() → list_event_types (read)
9
+ * - getBookings({status, attendeeEmail,…}) → list_bookings (read)
10
+ * - getBooking(uid) → get_booking (read)
11
+ * - cancelBooking(uid, reason?) → cancel_booking (write)
12
+ */
13
+ import { CommonSchemas, registerTool } from "../toolRegistry.js";
14
+ // ============================================================================
15
+ // caldiy.list_event_types
16
+ // ============================================================================
17
+ registerTool({
18
+ id: "caldiy.list_event_types",
19
+ namespace: "caldiy",
20
+ description: "List the authenticated Cal.diy user's event types (bookable meeting templates).",
21
+ paramsSchema: {
22
+ type: "object",
23
+ properties: {
24
+ into: CommonSchemas.into,
25
+ },
26
+ required: [],
27
+ },
28
+ outputSchema: {
29
+ type: "array",
30
+ items: {
31
+ type: "object",
32
+ properties: {
33
+ id: { type: "number" },
34
+ slug: { type: "string" },
35
+ title: { type: "string" },
36
+ description: { type: "string" },
37
+ length: { type: "number" },
38
+ hidden: { type: "boolean" },
39
+ locations: { type: "array" },
40
+ bookingFields: { type: "array" },
41
+ },
42
+ },
43
+ },
44
+ riskDefault: "low",
45
+ isWrite: false,
46
+ isConnector: true,
47
+ execute: async () => {
48
+ const { getCalDiyConnector } = await import("../../connectors/caldiy.js");
49
+ const connector = getCalDiyConnector();
50
+ const result = await connector.getEventTypes();
51
+ return JSON.stringify(result);
52
+ },
53
+ });
54
+ // ============================================================================
55
+ // caldiy.list_bookings
56
+ // ============================================================================
57
+ registerTool({
58
+ id: "caldiy.list_bookings",
59
+ namespace: "caldiy",
60
+ description: "List Cal.diy bookings, optionally filtered by status, attendee email, or date range.",
61
+ paramsSchema: {
62
+ type: "object",
63
+ properties: {
64
+ status: {
65
+ type: "string",
66
+ description: "Filter by booking status (e.g. upcoming, past, cancelled, accepted)",
67
+ },
68
+ attendeeEmail: {
69
+ type: "string",
70
+ description: "Filter by attendee email address",
71
+ },
72
+ dateFrom: {
73
+ type: "string",
74
+ description: "Start of date range (ISO 8601)",
75
+ },
76
+ dateTo: {
77
+ type: "string",
78
+ description: "End of date range (ISO 8601)",
79
+ },
80
+ into: CommonSchemas.into,
81
+ },
82
+ required: [],
83
+ },
84
+ outputSchema: {
85
+ type: "array",
86
+ items: {
87
+ type: "object",
88
+ properties: {
89
+ uid: { type: "string" },
90
+ title: { type: "string" },
91
+ description: { type: "string" },
92
+ start: { type: "string" },
93
+ end: { type: "string" },
94
+ status: { type: "string" },
95
+ attendees: {
96
+ type: "array",
97
+ items: {
98
+ type: "object",
99
+ properties: {
100
+ name: { type: "string" },
101
+ email: { type: "string" },
102
+ timeZone: { type: "string" },
103
+ },
104
+ },
105
+ },
106
+ eventType: { type: "object" },
107
+ cancelledBy: { type: "string" },
108
+ rescheduledBy: { type: "string" },
109
+ },
110
+ },
111
+ },
112
+ riskDefault: "low",
113
+ isWrite: false,
114
+ isConnector: true,
115
+ execute: async ({ params }) => {
116
+ const { getCalDiyConnector } = await import("../../connectors/caldiy.js");
117
+ const connector = getCalDiyConnector();
118
+ const result = await connector.getBookings({
119
+ status: typeof params.status === "string" ? params.status : undefined,
120
+ attendeeEmail: typeof params.attendeeEmail === "string"
121
+ ? params.attendeeEmail
122
+ : undefined,
123
+ dateFrom: typeof params.dateFrom === "string" ? params.dateFrom : undefined,
124
+ dateTo: typeof params.dateTo === "string" ? params.dateTo : undefined,
125
+ });
126
+ return JSON.stringify(result);
127
+ },
128
+ });
129
+ // ============================================================================
130
+ // caldiy.get_booking
131
+ // ============================================================================
132
+ registerTool({
133
+ id: "caldiy.get_booking",
134
+ namespace: "caldiy",
135
+ description: "Fetch a single Cal.diy booking by its UID.",
136
+ paramsSchema: {
137
+ type: "object",
138
+ properties: {
139
+ uid: { type: "string", description: "Cal.diy booking UID" },
140
+ into: CommonSchemas.into,
141
+ },
142
+ required: ["uid"],
143
+ },
144
+ outputSchema: {
145
+ type: "object",
146
+ properties: {
147
+ uid: { type: "string" },
148
+ title: { type: "string" },
149
+ description: { type: "string" },
150
+ start: { type: "string" },
151
+ end: { type: "string" },
152
+ status: { type: "string" },
153
+ attendees: {
154
+ type: "array",
155
+ items: {
156
+ type: "object",
157
+ properties: {
158
+ name: { type: "string" },
159
+ email: { type: "string" },
160
+ timeZone: { type: "string" },
161
+ },
162
+ },
163
+ },
164
+ eventType: { type: "object" },
165
+ cancelledBy: { type: "string" },
166
+ rescheduledBy: { type: "string" },
167
+ },
168
+ },
169
+ riskDefault: "low",
170
+ isWrite: false,
171
+ isConnector: true,
172
+ execute: async ({ params }) => {
173
+ const { getCalDiyConnector } = await import("../../connectors/caldiy.js");
174
+ const connector = getCalDiyConnector();
175
+ const result = await connector.getBooking(params.uid);
176
+ return JSON.stringify(result);
177
+ },
178
+ });
179
+ // ============================================================================
180
+ // caldiy.cancel_booking (write-gated)
181
+ // ============================================================================
182
+ registerTool({
183
+ id: "caldiy.cancel_booking",
184
+ namespace: "caldiy",
185
+ description: "Cancel a Cal.diy booking by UID, with an optional reason.",
186
+ paramsSchema: {
187
+ type: "object",
188
+ properties: {
189
+ uid: { type: "string", description: "Cal.diy booking UID (required)" },
190
+ reason: {
191
+ type: "string",
192
+ description: "Optional cancellation reason shown to attendees",
193
+ },
194
+ into: CommonSchemas.into,
195
+ },
196
+ required: ["uid"],
197
+ },
198
+ outputSchema: {
199
+ type: "object",
200
+ properties: {
201
+ uid: { type: "string" },
202
+ },
203
+ },
204
+ riskDefault: "medium",
205
+ isWrite: true,
206
+ isConnector: true,
207
+ execute: async ({ params }) => {
208
+ const { getCalDiyConnector } = await import("../../connectors/caldiy.js");
209
+ const connector = getCalDiyConnector();
210
+ const result = await connector.cancelBooking(params.uid, typeof params.reason === "string" ? params.reason : undefined);
211
+ return JSON.stringify(result);
212
+ },
213
+ });
214
+ //# sourceMappingURL=caldiy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":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SAAS,CAC9D,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,10 @@
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
+ export {};
@@ -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;AAC1B,+EAA+E;AAE/E,YAAY,CAAC;IACX,EAAE,EAAE,yBAAyB;IAC7B,SAAS,EAAE,UAAU;IACrB,WAAW,EACT,8EAA8E;IAChF,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,sFAAsF;aACzF;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qCAAqC;aACnD;YACD,IAAI,EAAE,aAAa,CAAC,IAAI;SACzB;QACD,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,OAAO;QACb,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACtB,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,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AAE;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,13 @@
1
+ /**
2
+ * Cloudflare tools — read wrappers (list_zones, list_dns_records,
3
+ * get_zone_analytics) plus a single write (create_dns_record).
4
+ *
5
+ * Self-registering tool module for the recipe tool registry. Each tool mirrors
6
+ * the real connector signature in `src/connectors/cloudflare.ts` and returns
7
+ * `JSON.stringify(result)` of the connector's native return type.
8
+ *
9
+ * Deliberately excludes destructive operations: no delete_dns_record,
10
+ * update_dns_record, or purge_cache. Only create_dns_record is write-gated
11
+ * (`isWrite: true`); the rest declare `isWrite: false`.
12
+ */
13
+ export {};