patchwork-os 0.2.0-beta.10.canary.101 → 0.2.0-beta.10.canary.104

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 (40) 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/cloudflare.d.ts +13 -0
  5. package/dist/recipes/tools/cloudflare.js +210 -0
  6. package/dist/recipes/tools/cloudflare.js.map +1 -0
  7. package/dist/recipes/tools/elasticsearch.d.ts +11 -0
  8. package/dist/recipes/tools/elasticsearch.js +156 -0
  9. package/dist/recipes/tools/elasticsearch.js.map +1 -0
  10. package/dist/recipes/tools/figma.d.ts +12 -0
  11. package/dist/recipes/tools/figma.js +194 -0
  12. package/dist/recipes/tools/figma.js.map +1 -0
  13. package/dist/recipes/tools/index.d.ts +12 -0
  14. package/dist/recipes/tools/index.js +12 -0
  15. package/dist/recipes/tools/index.js.map +1 -1
  16. package/dist/recipes/tools/obsidian.d.ts +15 -0
  17. package/dist/recipes/tools/obsidian.js +172 -0
  18. package/dist/recipes/tools/obsidian.js.map +1 -0
  19. package/dist/recipes/tools/paystack.d.ts +11 -0
  20. package/dist/recipes/tools/paystack.js +211 -0
  21. package/dist/recipes/tools/paystack.js.map +1 -0
  22. package/dist/recipes/tools/postgres.d.ts +15 -0
  23. package/dist/recipes/tools/postgres.js +185 -0
  24. package/dist/recipes/tools/postgres.js.map +1 -0
  25. package/dist/recipes/tools/redis.d.ts +9 -0
  26. package/dist/recipes/tools/redis.js +140 -0
  27. package/dist/recipes/tools/redis.js.map +1 -0
  28. package/dist/recipes/tools/snowflake.d.ts +16 -0
  29. package/dist/recipes/tools/snowflake.js +172 -0
  30. package/dist/recipes/tools/snowflake.js.map +1 -0
  31. package/dist/recipes/tools/supabase.d.ts +9 -0
  32. package/dist/recipes/tools/supabase.js +132 -0
  33. package/dist/recipes/tools/supabase.js.map +1 -0
  34. package/dist/recipes/tools/webflow.d.ts +11 -0
  35. package/dist/recipes/tools/webflow.js +243 -0
  36. package/dist/recipes/tools/webflow.js.map +1 -0
  37. package/dist/recipes/tools/woocommerce.d.ts +18 -0
  38. package/dist/recipes/tools/woocommerce.js +259 -0
  39. package/dist/recipes/tools/woocommerce.js.map +1 -0
  40. 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":"caldiy.js","sourceRoot":"","sources":["../../../src/recipes/tools/caldiy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;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,QAAQ;IACnB,WAAW,EACT,iFAAiF;IACnF,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE,aAAa,CAAC,IAAI;SACzB;QACD,QAAQ,EAAE,EAAE;KACb;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,IAAI,EAAE,EAAE,IAAI,EAA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ACD,IAAI,EAAE,aAAa,CAAC,IAAI;SACzB;QACD,QAAQ,EAAE,CAAC,KAAK,CAAC;KAClB;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SACxB;KACF;IACD,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QAC5B,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,MAAM,CAAC,4BAA4B,CAAC,CAAC;QAC1E,MAAM,SAAS,GAAG,kBAAkB,EAAE,CAAC;QACvC,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,aAAa,CAC1C,MAAM,CAAC,GAAa,EACpB,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAC9D,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 {};
@@ -0,0 +1,210 @@
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
+ import { CommonSchemas, registerTool } from "../toolRegistry.js";
14
+ // ============================================================================
15
+ // cloudflare.list_zones
16
+ // ============================================================================
17
+ registerTool({
18
+ id: "cloudflare.list_zones",
19
+ namespace: "cloudflare",
20
+ description: "List Cloudflare zones, optionally filtered by exact zone name (domain).",
21
+ paramsSchema: {
22
+ type: "object",
23
+ properties: {
24
+ name: {
25
+ type: "string",
26
+ description: "Filter by exact zone name (e.g. example.com)",
27
+ },
28
+ into: CommonSchemas.into,
29
+ },
30
+ required: [],
31
+ },
32
+ outputSchema: {
33
+ type: "array",
34
+ items: {
35
+ type: "object",
36
+ properties: {
37
+ id: { type: "string" },
38
+ name: { type: "string" },
39
+ status: { type: "string" },
40
+ nameservers: { type: "array", items: { type: "string" } },
41
+ plan: { type: "object", properties: { name: { type: "string" } } },
42
+ },
43
+ },
44
+ },
45
+ riskDefault: "low",
46
+ isWrite: false,
47
+ isConnector: true,
48
+ execute: async ({ params }) => {
49
+ const { getCloudflareConnector } = await import("../../connectors/cloudflare.js");
50
+ const connector = getCloudflareConnector();
51
+ const result = await connector.listZones(typeof params.name === "string" ? params.name : undefined);
52
+ return JSON.stringify(result);
53
+ },
54
+ });
55
+ // ============================================================================
56
+ // cloudflare.list_dns_records
57
+ // ============================================================================
58
+ registerTool({
59
+ id: "cloudflare.list_dns_records",
60
+ namespace: "cloudflare",
61
+ description: "List DNS records in a Cloudflare zone, optionally filtered by record type and name.",
62
+ paramsSchema: {
63
+ type: "object",
64
+ properties: {
65
+ zoneId: {
66
+ type: "string",
67
+ description: "Cloudflare zone ID",
68
+ },
69
+ type: {
70
+ type: "string",
71
+ description: "Filter by DNS record type (e.g. A, AAAA, CNAME, TXT, MX)",
72
+ },
73
+ name: {
74
+ type: "string",
75
+ description: "Filter by record name (e.g. www.example.com)",
76
+ },
77
+ into: CommonSchemas.into,
78
+ },
79
+ required: ["zoneId"],
80
+ },
81
+ outputSchema: {
82
+ type: "array",
83
+ items: {
84
+ type: "object",
85
+ properties: {
86
+ id: { type: "string" },
87
+ type: { type: "string" },
88
+ name: { type: "string" },
89
+ content: { type: "string" },
90
+ ttl: { type: "number" },
91
+ proxied: { type: "boolean" },
92
+ proxiable: { type: "boolean" },
93
+ created_on: { type: "string" },
94
+ modified_on: { type: "string" },
95
+ },
96
+ },
97
+ },
98
+ riskDefault: "low",
99
+ isWrite: false,
100
+ isConnector: true,
101
+ execute: async ({ params }) => {
102
+ const { getCloudflareConnector } = await import("../../connectors/cloudflare.js");
103
+ const connector = getCloudflareConnector();
104
+ const result = await connector.listDnsRecords(params.zoneId, typeof params.type === "string" ? params.type : undefined, typeof params.name === "string" ? params.name : undefined);
105
+ return JSON.stringify(result);
106
+ },
107
+ });
108
+ // ============================================================================
109
+ // cloudflare.create_dns_record (write-gated)
110
+ // ============================================================================
111
+ registerTool({
112
+ id: "cloudflare.create_dns_record",
113
+ namespace: "cloudflare",
114
+ description: "Create a DNS record in a Cloudflare zone. Requires zoneId, type, name, and content.",
115
+ paramsSchema: {
116
+ type: "object",
117
+ properties: {
118
+ zoneId: {
119
+ type: "string",
120
+ description: "Cloudflare zone ID",
121
+ },
122
+ type: {
123
+ type: "string",
124
+ description: "DNS record type (e.g. A, AAAA, CNAME, TXT, MX)",
125
+ },
126
+ name: {
127
+ type: "string",
128
+ description: "Record name (e.g. www.example.com)",
129
+ },
130
+ content: {
131
+ type: "string",
132
+ description: "Record content (e.g. 192.0.2.1 for an A record)",
133
+ },
134
+ ttl: {
135
+ type: "number",
136
+ description: "Time-to-live in seconds (1 = automatic)",
137
+ },
138
+ proxied: {
139
+ type: "boolean",
140
+ description: "Whether the record is proxied through Cloudflare",
141
+ },
142
+ into: CommonSchemas.into,
143
+ },
144
+ required: ["zoneId", "type", "name", "content"],
145
+ },
146
+ outputSchema: {
147
+ type: "object",
148
+ properties: {
149
+ id: { type: "string" },
150
+ type: { type: "string" },
151
+ name: { type: "string" },
152
+ content: { type: "string" },
153
+ ttl: { type: "number" },
154
+ proxied: { type: "boolean" },
155
+ proxiable: { type: "boolean" },
156
+ created_on: { type: "string" },
157
+ modified_on: { type: "string" },
158
+ },
159
+ },
160
+ riskDefault: "medium",
161
+ isWrite: true,
162
+ isConnector: true,
163
+ execute: async ({ params }) => {
164
+ const { getCloudflareConnector } = await import("../../connectors/cloudflare.js");
165
+ const connector = getCloudflareConnector();
166
+ const result = await connector.createDnsRecord(params.zoneId, params.type, params.name, params.content, typeof params.ttl === "number" ? params.ttl : undefined, typeof params.proxied === "boolean" ? params.proxied : undefined);
167
+ return JSON.stringify(result);
168
+ },
169
+ });
170
+ // ============================================================================
171
+ // cloudflare.get_zone_analytics
172
+ // ============================================================================
173
+ registerTool({
174
+ id: "cloudflare.get_zone_analytics",
175
+ namespace: "cloudflare",
176
+ description: "Fetch dashboard analytics for a Cloudflare zone over an optional time window.",
177
+ paramsSchema: {
178
+ type: "object",
179
+ properties: {
180
+ zoneId: {
181
+ type: "string",
182
+ description: "Cloudflare zone ID",
183
+ },
184
+ since: {
185
+ type: "string",
186
+ description: "Start of the window (RFC3339 timestamp or relative, e.g. -10080 minutes)",
187
+ },
188
+ until: {
189
+ type: "string",
190
+ description: "End of the window (RFC3339 timestamp or relative)",
191
+ },
192
+ into: CommonSchemas.into,
193
+ },
194
+ required: ["zoneId"],
195
+ },
196
+ outputSchema: {
197
+ type: "object",
198
+ description: "Cloudflare zone analytics dashboard payload (free-form).",
199
+ },
200
+ riskDefault: "low",
201
+ isWrite: false,
202
+ isConnector: true,
203
+ execute: async ({ params }) => {
204
+ const { getCloudflareConnector } = await import("../../connectors/cloudflare.js");
205
+ const connector = getCloudflareConnector();
206
+ const result = await connector.getZoneAnalytics(params.zoneId, typeof params.since === "string" ? params.since : undefined, typeof params.until === "string" ? params.until : undefined);
207
+ return JSON.stringify(result);
208
+ },
209
+ });
210
+ //# sourceMappingURL=cloudflare.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudflare.js","sourceRoot":"","sources":["../../../src/recipes/tools/cloudflare.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEjE,+EAA+E;AAC/E,wBAAwB;AACxB,+EAA+E;AAE/E,YAAY,CAAC;IACX,EAAE,EAAE,uBAAuB;IAC3B,SAAS,EAAE,YAAY;IACvB,WAAW,EACT,yEAAyE;IAC3E,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8CAA8C;aAC5D;YACD,IAAI,EAAE,aAAa,CAAC,IAAI;SACzB;QACD,QAAQ,EAAE,EAAE;KACb;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,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACxB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC1B,WAAW,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;gBACzD,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;aACnE;SACF;KACF;IACD,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK,EAAE,EAAE,MA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C3C,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,gBAAgB,CAC7C,MAAM,CAAC,MAAgB,EACvB,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAC3D,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAC5D,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Elasticsearch tools — read-only access to ES clusters via the elasticsearch
3
+ * connector (search, count, list indices, cluster health).
4
+ *
5
+ * Self-registering tool module for the recipe tool registry. Every tool is a
6
+ * faithful pass-through to the connector method: positional params mapped from
7
+ * the rendered step params, and the raw connector return type JSON-stringified
8
+ * back out. All four tools are read-only (`isWrite: false`) — the connector
9
+ * itself rejects scripted queries at any depth (see `isReadOnlyEsQuery`).
10
+ */
11
+ export {};
@@ -0,0 +1,156 @@
1
+ /**
2
+ * Elasticsearch tools — read-only access to ES clusters via the elasticsearch
3
+ * connector (search, count, list indices, cluster health).
4
+ *
5
+ * Self-registering tool module for the recipe tool registry. Every tool is a
6
+ * faithful pass-through to the connector method: positional params mapped from
7
+ * the rendered step params, and the raw connector return type JSON-stringified
8
+ * back out. All four tools are read-only (`isWrite: false`) — the connector
9
+ * itself rejects scripted queries at any depth (see `isReadOnlyEsQuery`).
10
+ */
11
+ import { CommonSchemas, registerTool } from "../toolRegistry.js";
12
+ // ============================================================================
13
+ // elasticsearch.search
14
+ // ============================================================================
15
+ registerTool({
16
+ id: "elasticsearch.search",
17
+ namespace: "elasticsearch",
18
+ description: "Run a read-only Elasticsearch search against an index. The query body is a standard ES query DSL object; scripted queries are rejected by the connector.",
19
+ paramsSchema: {
20
+ type: "object",
21
+ properties: {
22
+ index: {
23
+ type: "string",
24
+ description: "Index name (or comma-separated indices / pattern)",
25
+ },
26
+ query: {
27
+ type: "object",
28
+ description: "Elasticsearch query DSL body (e.g. { match_all: {} })",
29
+ },
30
+ size: {
31
+ type: "number",
32
+ description: "Max hits to return (default 10, capped at 100)",
33
+ default: 10,
34
+ },
35
+ from: {
36
+ type: "number",
37
+ description: "Offset of the first hit to return (default 0)",
38
+ default: 0,
39
+ },
40
+ sort: {
41
+ description: "Optional sort clause (ES sort syntax)",
42
+ },
43
+ _source: {
44
+ description: "Optional _source filtering (field list or boolean)",
45
+ },
46
+ into: CommonSchemas.into,
47
+ },
48
+ required: ["index", "query"],
49
+ },
50
+ outputSchema: {
51
+ type: "object",
52
+ description: "Raw Elasticsearch search response",
53
+ },
54
+ riskDefault: "low",
55
+ isWrite: false,
56
+ isConnector: true,
57
+ execute: async ({ params }) => {
58
+ const { getElasticsearchConnector } = await import("../../connectors/elasticsearch.js");
59
+ const connector = getElasticsearchConnector();
60
+ const result = await connector.search(params.index, params.query, typeof params.size === "number" ? params.size : undefined, typeof params.from === "number" ? params.from : undefined, params.sort, params._source);
61
+ return JSON.stringify(result);
62
+ },
63
+ });
64
+ // ============================================================================
65
+ // elasticsearch.count
66
+ // ============================================================================
67
+ registerTool({
68
+ id: "elasticsearch.count",
69
+ namespace: "elasticsearch",
70
+ description: "Count documents in an Elasticsearch index, optionally filtered by a query DSL body. Scripted queries are rejected by the connector.",
71
+ paramsSchema: {
72
+ type: "object",
73
+ properties: {
74
+ index: {
75
+ type: "string",
76
+ description: "Index name (or comma-separated indices / pattern)",
77
+ },
78
+ query: {
79
+ type: "object",
80
+ description: "Optional Elasticsearch query DSL body to filter the count",
81
+ },
82
+ into: CommonSchemas.into,
83
+ },
84
+ required: ["index"],
85
+ },
86
+ outputSchema: {
87
+ type: "object",
88
+ description: "Raw Elasticsearch count response (includes `count`)",
89
+ },
90
+ riskDefault: "low",
91
+ isWrite: false,
92
+ isConnector: true,
93
+ execute: async ({ params }) => {
94
+ const { getElasticsearchConnector } = await import("../../connectors/elasticsearch.js");
95
+ const connector = getElasticsearchConnector();
96
+ const result = await connector.count(params.index, params.query);
97
+ return JSON.stringify(result);
98
+ },
99
+ });
100
+ // ============================================================================
101
+ // elasticsearch.list_indices
102
+ // ============================================================================
103
+ registerTool({
104
+ id: "elasticsearch.list_indices",
105
+ namespace: "elasticsearch",
106
+ description: "List Elasticsearch indices with doc count, store size, and health (cat indices, JSON format).",
107
+ paramsSchema: {
108
+ type: "object",
109
+ properties: {
110
+ into: CommonSchemas.into,
111
+ },
112
+ required: [],
113
+ },
114
+ outputSchema: {
115
+ type: "object",
116
+ description: "Raw cat-indices response (array of index summaries)",
117
+ },
118
+ riskDefault: "low",
119
+ isWrite: false,
120
+ isConnector: true,
121
+ execute: async () => {
122
+ const { getElasticsearchConnector } = await import("../../connectors/elasticsearch.js");
123
+ const connector = getElasticsearchConnector();
124
+ const result = await connector.listIndices();
125
+ return JSON.stringify(result);
126
+ },
127
+ });
128
+ // ============================================================================
129
+ // elasticsearch.cluster_health
130
+ // ============================================================================
131
+ registerTool({
132
+ id: "elasticsearch.cluster_health",
133
+ namespace: "elasticsearch",
134
+ description: "Fetch Elasticsearch cluster health (status, node counts, shard stats).",
135
+ paramsSchema: {
136
+ type: "object",
137
+ properties: {
138
+ into: CommonSchemas.into,
139
+ },
140
+ required: [],
141
+ },
142
+ outputSchema: {
143
+ type: "object",
144
+ description: "Raw cluster-health response",
145
+ },
146
+ riskDefault: "low",
147
+ isWrite: false,
148
+ isConnector: true,
149
+ execute: async () => {
150
+ const { getElasticsearchConnector } = await import("../../connectors/elasticsearch.js");
151
+ const connector = getElasticsearchConnector();
152
+ const result = await connector.clusterHealth();
153
+ return JSON.stringify(result);
154
+ },
155
+ });
156
+ //# sourceMappingURL=elasticsearch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elasticsearch.js","sourceRoot":"","sources":["../../../src/recipes/tools/elasticsearch.ts"],"names":[],"mappings":"AAAA;;;;;;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K,IAAI,EAAE;QAClB,MAAM,EAAE,yBAAyB,EAAE,GAAG,MAAM,MAAM,CAChD,mCAAmC,CACpC,CAAC;QACF,MAAM,SAAS,GAAG,yBAAyB,EAAE,CAAC;QAC9C,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,aAAa,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Figma tools — read-only access to files, file comments, project files, and
3
+ * rendered image URLs via the Figma REST API.
4
+ *
5
+ * Self-registering tool module for the recipe tool registry. Wraps the Figma
6
+ * connector methods (`getFile`, `getFileComments`, `listProjectFiles`,
7
+ * `getImageUrls`) and returns the connector result verbatim as JSON.
8
+ *
9
+ * All v1 Figma tools are read-only (the connector only requests the `read`
10
+ * scope and exposes no mutation methods).
11
+ */
12
+ export {};