patchwork-os 0.2.0-beta.10.canary.99 → 0.2.0-beta.11
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.md +20 -1
- package/dist/adapters/grok.js +6 -1
- package/dist/adapters/grok.js.map +1 -1
- package/dist/approvalHttp.js +61 -66
- package/dist/approvalHttp.js.map +1 -1
- package/dist/bridge.js +3 -2
- package/dist/bridge.js.map +1 -1
- package/dist/claudeOrchestrator.js +15 -0
- package/dist/claudeOrchestrator.js.map +1 -1
- package/dist/commands/patchworkInit.d.ts +7 -0
- package/dist/commands/patchworkInit.js +26 -0
- package/dist/commands/patchworkInit.js.map +1 -1
- package/dist/commands/recipe.d.ts +14 -0
- package/dist/commands/recipe.js +51 -0
- package/dist/commands/recipe.js.map +1 -1
- package/dist/commands/recipeInstall.js +15 -0
- package/dist/commands/recipeInstall.js.map +1 -1
- package/dist/connectors/postgres.d.ts +7 -0
- package/dist/connectors/postgres.js +16 -2
- package/dist/connectors/postgres.js.map +1 -1
- package/dist/connectors/snowflake.js +6 -0
- package/dist/connectors/snowflake.js.map +1 -1
- package/dist/connectors/tokenStorage.d.ts +8 -0
- package/dist/connectors/tokenStorage.js +42 -3
- package/dist/connectors/tokenStorage.js.map +1 -1
- package/dist/drivers/claude/api.js +15 -2
- package/dist/drivers/claude/api.js.map +1 -1
- package/dist/drivers/claude/subprocess.js +1 -29
- package/dist/drivers/claude/subprocess.js.map +1 -1
- package/dist/drivers/gemini/index.js +9 -5
- package/dist/drivers/gemini/index.js.map +1 -1
- package/dist/drivers/openai/index.js +29 -4
- package/dist/drivers/openai/index.js.map +1 -1
- package/dist/drivers/outputCap.d.ts +27 -0
- package/dist/drivers/outputCap.js +50 -0
- package/dist/drivers/outputCap.js.map +1 -0
- package/dist/featureFlags.d.ts +9 -0
- package/dist/featureFlags.js +16 -0
- package/dist/featureFlags.js.map +1 -1
- package/dist/fp/commandDescription.d.ts +6 -0
- package/dist/fp/commandDescription.js +4 -4
- package/dist/fp/commandDescription.js.map +1 -1
- package/dist/fp/policyParser.js +13 -7
- package/dist/fp/policyParser.js.map +1 -1
- package/dist/haltPushDispatch.js +7 -22
- package/dist/haltPushDispatch.js.map +1 -1
- package/dist/index.js +128 -0
- package/dist/index.js.map +1 -1
- package/dist/mcpRoutes.js +1 -1
- package/dist/mcpRoutes.js.map +1 -1
- package/dist/oauth.d.ts +13 -0
- package/dist/oauth.js +34 -1
- package/dist/oauth.js.map +1 -1
- package/dist/recipeOrchestration.js +10 -0
- package/dist/recipeOrchestration.js.map +1 -1
- package/dist/recipeRoutes.d.ts +39 -0
- package/dist/recipeRoutes.js +214 -12
- package/dist/recipeRoutes.js.map +1 -1
- package/dist/recipes/agentExecutor.d.ts +20 -0
- package/dist/recipes/agentExecutor.js +32 -10
- package/dist/recipes/agentExecutor.js.map +1 -1
- package/dist/recipes/chainedRunner.d.ts +41 -2
- package/dist/recipes/chainedRunner.js +134 -6
- package/dist/recipes/chainedRunner.js.map +1 -1
- package/dist/recipes/connectorPreflight.js +30 -0
- package/dist/recipes/connectorPreflight.js.map +1 -1
- package/dist/recipes/haltCategory.d.ts +5 -0
- package/dist/recipes/haltCategory.js +7 -1
- package/dist/recipes/haltCategory.js.map +1 -1
- package/dist/recipes/judgeVerdict.d.ts +10 -0
- package/dist/recipes/judgeVerdict.js +10 -0
- package/dist/recipes/judgeVerdict.js.map +1 -1
- package/dist/recipes/names.d.ts +5 -0
- package/dist/recipes/names.js +10 -5
- package/dist/recipes/names.js.map +1 -1
- package/dist/recipes/parser.js +32 -9
- package/dist/recipes/parser.js.map +1 -1
- package/dist/recipes/pricing/costRouter.d.ts +43 -0
- package/dist/recipes/pricing/costRouter.js +44 -0
- package/dist/recipes/pricing/costRouter.js.map +1 -0
- package/dist/recipes/pricing/priceTable.d.ts +76 -0
- package/dist/recipes/pricing/priceTable.js +144 -0
- package/dist/recipes/pricing/priceTable.js.map +1 -0
- package/dist/recipes/runBudget.d.ts +82 -32
- package/dist/recipes/runBudget.js +182 -49
- package/dist/recipes/runBudget.js.map +1 -1
- package/dist/recipes/schema.d.ts +25 -4
- package/dist/recipes/schemaGenerator.d.ts +9 -0
- package/dist/recipes/schemaGenerator.js +386 -75
- package/dist/recipes/schemaGenerator.js.map +1 -1
- package/dist/recipes/simulation/aggregateRunRisk.d.ts +43 -0
- package/dist/recipes/simulation/aggregateRunRisk.js +117 -0
- package/dist/recipes/simulation/aggregateRunRisk.js.map +1 -0
- package/dist/recipes/simulation/costProjector.d.ts +32 -0
- package/dist/recipes/simulation/costProjector.js +194 -0
- package/dist/recipes/simulation/costProjector.js.map +1 -0
- package/dist/recipes/simulation/sideEffects.d.ts +32 -0
- package/dist/recipes/simulation/sideEffects.js +62 -0
- package/dist/recipes/simulation/sideEffects.js.map +1 -0
- package/dist/recipes/simulation/simulate.d.ts +36 -0
- package/dist/recipes/simulation/simulate.js +264 -0
- package/dist/recipes/simulation/simulate.js.map +1 -0
- package/dist/recipes/simulation/simulateMockedRun.d.ts +52 -0
- package/dist/recipes/simulation/simulateMockedRun.js +72 -0
- package/dist/recipes/simulation/simulateMockedRun.js.map +1 -0
- package/dist/recipes/simulation/synthesizeMockedOutputs.d.ts +31 -0
- package/dist/recipes/simulation/synthesizeMockedOutputs.js +50 -0
- package/dist/recipes/simulation/synthesizeMockedOutputs.js.map +1 -0
- package/dist/recipes/simulation/types.d.ts +198 -0
- package/dist/recipes/simulation/types.js +30 -0
- package/dist/recipes/simulation/types.js.map +1 -0
- package/dist/recipes/stepObservation.d.ts +12 -0
- package/dist/recipes/stepObservation.js +21 -1
- package/dist/recipes/stepObservation.js.map +1 -1
- package/dist/recipes/tools/airtable.d.ts +15 -0
- package/dist/recipes/tools/airtable.js +240 -0
- package/dist/recipes/tools/airtable.js.map +1 -0
- package/dist/recipes/tools/caldiy.d.ts +13 -0
- package/dist/recipes/tools/caldiy.js +214 -0
- package/dist/recipes/tools/caldiy.js.map +1 -0
- package/dist/recipes/tools/circleci.d.ts +10 -0
- package/dist/recipes/tools/circleci.js +204 -0
- package/dist/recipes/tools/circleci.js.map +1 -0
- package/dist/recipes/tools/cloudflare.d.ts +13 -0
- package/dist/recipes/tools/cloudflare.js +211 -0
- package/dist/recipes/tools/cloudflare.js.map +1 -0
- package/dist/recipes/tools/docs.d.ts +18 -0
- package/dist/recipes/tools/docs.js +94 -0
- package/dist/recipes/tools/docs.js.map +1 -0
- package/dist/recipes/tools/elasticsearch.d.ts +11 -0
- package/dist/recipes/tools/elasticsearch.js +156 -0
- package/dist/recipes/tools/elasticsearch.js.map +1 -0
- package/dist/recipes/tools/figma.d.ts +12 -0
- package/dist/recipes/tools/figma.js +194 -0
- package/dist/recipes/tools/figma.js.map +1 -0
- package/dist/recipes/tools/grafana.d.ts +11 -0
- package/dist/recipes/tools/grafana.js +216 -0
- package/dist/recipes/tools/grafana.js.map +1 -0
- package/dist/recipes/tools/http.d.ts +1 -1
- package/dist/recipes/tools/http.js +10 -28
- package/dist/recipes/tools/http.js.map +1 -1
- package/dist/recipes/tools/index.d.ts +26 -0
- package/dist/recipes/tools/index.js +26 -0
- package/dist/recipes/tools/index.js.map +1 -1
- package/dist/recipes/tools/monday.d.ts +22 -0
- package/dist/recipes/tools/monday.js +242 -0
- package/dist/recipes/tools/monday.js.map +1 -0
- package/dist/recipes/tools/obsidian.d.ts +15 -0
- package/dist/recipes/tools/obsidian.js +172 -0
- package/dist/recipes/tools/obsidian.js.map +1 -0
- package/dist/recipes/tools/paystack.d.ts +11 -0
- package/dist/recipes/tools/paystack.js +211 -0
- package/dist/recipes/tools/paystack.js.map +1 -0
- 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/postgres.d.ts +15 -0
- package/dist/recipes/tools/postgres.js +185 -0
- package/dist/recipes/tools/postgres.js.map +1 -0
- package/dist/recipes/tools/posthog.d.ts +16 -0
- package/dist/recipes/tools/posthog.js +219 -0
- package/dist/recipes/tools/posthog.js.map +1 -0
- package/dist/recipes/tools/redis.d.ts +9 -0
- package/dist/recipes/tools/redis.js +140 -0
- package/dist/recipes/tools/redis.js.map +1 -0
- package/dist/recipes/tools/resend.d.ts +8 -0
- package/dist/recipes/tools/resend.js +153 -0
- package/dist/recipes/tools/resend.js.map +1 -0
- package/dist/recipes/tools/salesforce.d.ts +16 -0
- package/dist/recipes/tools/salesforce.js +184 -0
- package/dist/recipes/tools/salesforce.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/snowflake.d.ts +16 -0
- package/dist/recipes/tools/snowflake.js +173 -0
- package/dist/recipes/tools/snowflake.js.map +1 -0
- package/dist/recipes/tools/stripe.js +13 -12
- package/dist/recipes/tools/stripe.js.map +1 -1
- package/dist/recipes/tools/supabase.d.ts +9 -0
- package/dist/recipes/tools/supabase.js +132 -0
- package/dist/recipes/tools/supabase.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 +180 -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/tools/webflow.d.ts +11 -0
- package/dist/recipes/tools/webflow.js +243 -0
- package/dist/recipes/tools/webflow.js.map +1 -0
- package/dist/recipes/tools/woocommerce.d.ts +18 -0
- package/dist/recipes/tools/woocommerce.js +259 -0
- package/dist/recipes/tools/woocommerce.js.map +1 -0
- package/dist/recipes/tools/wrapConnectorExecute.d.ts +25 -0
- package/dist/recipes/tools/wrapConnectorExecute.js +37 -0
- package/dist/recipes/tools/wrapConnectorExecute.js.map +1 -0
- package/dist/recipes/validation.js +264 -0
- package/dist/recipes/validation.js.map +1 -1
- package/dist/recipes/yamlRunner.d.ts +112 -3
- package/dist/recipes/yamlRunner.js +482 -19
- package/dist/recipes/yamlRunner.js.map +1 -1
- package/dist/runLog.d.ts +46 -0
- package/dist/runLog.js +4 -0
- package/dist/runLog.js.map +1 -1
- package/dist/schemas/recipe.v1.json +217 -11
- package/dist/server.d.ts +3 -0
- package/dist/server.js +4 -0
- package/dist/server.js.map +1 -1
- package/dist/streamableHttp.js +3 -2
- package/dist/streamableHttp.js.map +1 -1
- package/dist/tools/gitWrite.js +5 -1
- package/dist/tools/gitWrite.js.map +1 -1
- package/dist/tools/terminal.js +15 -49
- package/dist/tools/terminal.js.map +1 -1
- package/dist/transport.d.ts +1 -0
- package/dist/transport.js +7 -0
- package/dist/transport.js.map +1 -1
- package/package.json +3 -3
- package/scripts/mcp-stdio-shim.cjs +218 -84
- package/templates/recipes/incident-to-pr.yaml +187 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Webflow tools — read-only access to sites, collections, collection items,
|
|
3
|
+
* and form submissions via the Webflow v2 API.
|
|
4
|
+
*
|
|
5
|
+
* Self-registering tool module for the recipe tool registry. Read-only set
|
|
6
|
+
* only: no item create/update/delete or publish mutations. Each tool mirrors
|
|
7
|
+
* the real connector signature in `src/connectors/webflow.ts` and returns
|
|
8
|
+
* `JSON.stringify(result)` of the connector's native `WebflowListResult<T>`
|
|
9
|
+
* return type (`{ items, pagination? }`).
|
|
10
|
+
*/
|
|
11
|
+
import { CommonSchemas, registerTool } from "../toolRegistry.js";
|
|
12
|
+
// ============================================================================
|
|
13
|
+
// webflow.list_sites
|
|
14
|
+
// ============================================================================
|
|
15
|
+
registerTool({
|
|
16
|
+
id: "webflow.list_sites",
|
|
17
|
+
namespace: "webflow",
|
|
18
|
+
description: "List Webflow sites accessible to the authenticated token.",
|
|
19
|
+
paramsSchema: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {
|
|
22
|
+
into: CommonSchemas.into,
|
|
23
|
+
},
|
|
24
|
+
required: [],
|
|
25
|
+
},
|
|
26
|
+
outputSchema: {
|
|
27
|
+
type: "object",
|
|
28
|
+
properties: {
|
|
29
|
+
items: {
|
|
30
|
+
type: "array",
|
|
31
|
+
items: {
|
|
32
|
+
type: "object",
|
|
33
|
+
properties: {
|
|
34
|
+
id: { type: "string" },
|
|
35
|
+
displayName: { type: "string" },
|
|
36
|
+
shortName: { type: "string" },
|
|
37
|
+
workspaceId: { type: "string" },
|
|
38
|
+
createdOn: { type: "string" },
|
|
39
|
+
lastPublished: { type: "string" },
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
pagination: {
|
|
44
|
+
type: "object",
|
|
45
|
+
properties: {
|
|
46
|
+
limit: { type: "number" },
|
|
47
|
+
offset: { type: "number" },
|
|
48
|
+
total: { type: "number" },
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
riskDefault: "low",
|
|
54
|
+
isWrite: false,
|
|
55
|
+
isConnector: true,
|
|
56
|
+
execute: async () => {
|
|
57
|
+
const { getWebflowConnector } = await import("../../connectors/webflow.js");
|
|
58
|
+
const connector = getWebflowConnector();
|
|
59
|
+
const result = await connector.listSites();
|
|
60
|
+
return JSON.stringify(result);
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
// ============================================================================
|
|
64
|
+
// webflow.list_collections
|
|
65
|
+
// ============================================================================
|
|
66
|
+
registerTool({
|
|
67
|
+
id: "webflow.list_collections",
|
|
68
|
+
namespace: "webflow",
|
|
69
|
+
description: "List CMS collections for a Webflow site.",
|
|
70
|
+
paramsSchema: {
|
|
71
|
+
type: "object",
|
|
72
|
+
properties: {
|
|
73
|
+
siteId: { type: "string", description: "Webflow site ID" },
|
|
74
|
+
into: CommonSchemas.into,
|
|
75
|
+
},
|
|
76
|
+
required: ["siteId"],
|
|
77
|
+
},
|
|
78
|
+
outputSchema: {
|
|
79
|
+
type: "object",
|
|
80
|
+
properties: {
|
|
81
|
+
items: {
|
|
82
|
+
type: "array",
|
|
83
|
+
items: {
|
|
84
|
+
type: "object",
|
|
85
|
+
properties: {
|
|
86
|
+
id: { type: "string" },
|
|
87
|
+
displayName: { type: "string" },
|
|
88
|
+
singularName: { type: "string" },
|
|
89
|
+
slug: { type: "string" },
|
|
90
|
+
createdOn: { type: "string" },
|
|
91
|
+
lastUpdated: { type: "string" },
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
pagination: {
|
|
96
|
+
type: "object",
|
|
97
|
+
properties: {
|
|
98
|
+
limit: { type: "number" },
|
|
99
|
+
offset: { type: "number" },
|
|
100
|
+
total: { type: "number" },
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
riskDefault: "low",
|
|
106
|
+
isWrite: false,
|
|
107
|
+
isConnector: true,
|
|
108
|
+
execute: async ({ params }) => {
|
|
109
|
+
const { getWebflowConnector } = await import("../../connectors/webflow.js");
|
|
110
|
+
const connector = getWebflowConnector();
|
|
111
|
+
const result = await connector.listCollections(params.siteId);
|
|
112
|
+
return JSON.stringify(result);
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
// ============================================================================
|
|
116
|
+
// webflow.list_collection_items
|
|
117
|
+
// ============================================================================
|
|
118
|
+
registerTool({
|
|
119
|
+
id: "webflow.list_collection_items",
|
|
120
|
+
namespace: "webflow",
|
|
121
|
+
description: "List items within a Webflow CMS collection, with optional limit/offset paging.",
|
|
122
|
+
paramsSchema: {
|
|
123
|
+
type: "object",
|
|
124
|
+
properties: {
|
|
125
|
+
collectionId: { type: "string", description: "Webflow collection ID" },
|
|
126
|
+
limit: {
|
|
127
|
+
type: "number",
|
|
128
|
+
description: "Max number of items to return (default 100, max 100)",
|
|
129
|
+
},
|
|
130
|
+
offset: {
|
|
131
|
+
type: "number",
|
|
132
|
+
description: "Number of items to skip for pagination (default 0)",
|
|
133
|
+
},
|
|
134
|
+
into: CommonSchemas.into,
|
|
135
|
+
},
|
|
136
|
+
required: ["collectionId"],
|
|
137
|
+
},
|
|
138
|
+
outputSchema: {
|
|
139
|
+
type: "object",
|
|
140
|
+
properties: {
|
|
141
|
+
items: {
|
|
142
|
+
type: "array",
|
|
143
|
+
items: {
|
|
144
|
+
type: "object",
|
|
145
|
+
properties: {
|
|
146
|
+
id: { type: "string" },
|
|
147
|
+
cmsLocaleId: { type: "string" },
|
|
148
|
+
lastPublished: { type: ["string", "null"] },
|
|
149
|
+
lastUpdated: { type: "string" },
|
|
150
|
+
createdOn: { type: "string" },
|
|
151
|
+
isArchived: { type: "boolean" },
|
|
152
|
+
isDraft: { type: "boolean" },
|
|
153
|
+
fieldData: { type: "object" },
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
pagination: {
|
|
158
|
+
type: "object",
|
|
159
|
+
properties: {
|
|
160
|
+
limit: { type: "number" },
|
|
161
|
+
offset: { type: "number" },
|
|
162
|
+
total: { type: "number" },
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
riskDefault: "low",
|
|
168
|
+
isWrite: false,
|
|
169
|
+
isConnector: true,
|
|
170
|
+
execute: async ({ params }) => {
|
|
171
|
+
const { getWebflowConnector } = await import("../../connectors/webflow.js");
|
|
172
|
+
const connector = getWebflowConnector();
|
|
173
|
+
const result = await connector.listCollectionItems(params.collectionId, {
|
|
174
|
+
limit: typeof params.limit === "number" ? params.limit : undefined,
|
|
175
|
+
offset: typeof params.offset === "number" ? params.offset : undefined,
|
|
176
|
+
});
|
|
177
|
+
return JSON.stringify(result);
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
// ============================================================================
|
|
181
|
+
// webflow.list_form_submissions
|
|
182
|
+
// ============================================================================
|
|
183
|
+
registerTool({
|
|
184
|
+
id: "webflow.list_form_submissions",
|
|
185
|
+
namespace: "webflow",
|
|
186
|
+
description: "List submissions for a Webflow form, with optional limit/offset paging.",
|
|
187
|
+
paramsSchema: {
|
|
188
|
+
type: "object",
|
|
189
|
+
properties: {
|
|
190
|
+
formId: { type: "string", description: "Webflow form ID" },
|
|
191
|
+
limit: {
|
|
192
|
+
type: "number",
|
|
193
|
+
description: "Max number of submissions to return (default 100, max 100)",
|
|
194
|
+
},
|
|
195
|
+
offset: {
|
|
196
|
+
type: "number",
|
|
197
|
+
description: "Number of submissions to skip for pagination (default 0)",
|
|
198
|
+
},
|
|
199
|
+
into: CommonSchemas.into,
|
|
200
|
+
},
|
|
201
|
+
required: ["formId"],
|
|
202
|
+
},
|
|
203
|
+
outputSchema: {
|
|
204
|
+
type: "object",
|
|
205
|
+
properties: {
|
|
206
|
+
items: {
|
|
207
|
+
type: "array",
|
|
208
|
+
items: {
|
|
209
|
+
type: "object",
|
|
210
|
+
properties: {
|
|
211
|
+
id: { type: "string" },
|
|
212
|
+
displayName: { type: "string" },
|
|
213
|
+
siteId: { type: "string" },
|
|
214
|
+
formId: { type: "string" },
|
|
215
|
+
dateSubmitted: { type: "string" },
|
|
216
|
+
formResponse: { type: "object" },
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
pagination: {
|
|
221
|
+
type: "object",
|
|
222
|
+
properties: {
|
|
223
|
+
limit: { type: "number" },
|
|
224
|
+
offset: { type: "number" },
|
|
225
|
+
total: { type: "number" },
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
riskDefault: "low",
|
|
231
|
+
isWrite: false,
|
|
232
|
+
isConnector: true,
|
|
233
|
+
execute: async ({ params }) => {
|
|
234
|
+
const { getWebflowConnector } = await import("../../connectors/webflow.js");
|
|
235
|
+
const connector = getWebflowConnector();
|
|
236
|
+
const result = await connector.listFormSubmissions(params.formId, {
|
|
237
|
+
limit: typeof params.limit === "number" ? params.limit : undefined,
|
|
238
|
+
offset: typeof params.offset === "number" ? params.offset : undefined,
|
|
239
|
+
});
|
|
240
|
+
return JSON.stringify(result);
|
|
241
|
+
},
|
|
242
|
+
});
|
|
243
|
+
//# sourceMappingURL=webflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webflow.js","sourceRoot":"","sources":["../../../src/recipes/tools/webflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEjE,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E,YAAY,CAAC;IACX,EAAE,EAAE,oBAAoB;IACxB,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,2DAA2D;IACxE,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,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACtB,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC/B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC7B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC/B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC7B,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;qBAClC;iBACF;aACF;YACD,UAAU,EAAE;gBACV,IAAI,EAA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B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC1B,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACjC,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;qBACjC;iBACF;aACF;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC1B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iBAC1B;aACF;SACF;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,mBAAmB,CAChD,MAAM,CAAC,MAAgB,EACvB;YACE,KAAK,EAAE,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;YAClE,MAAM,EAAE,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;SACtE,CACF,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WooCommerce tools — read-only access to orders, products, and customers.
|
|
3
|
+
*
|
|
4
|
+
* Self-registering tool module for the recipe tool registry. Each tool lazily
|
|
5
|
+
* imports the WooCommerce connector and wraps a single read method, returning
|
|
6
|
+
* the connector result verbatim via JSON.stringify.
|
|
7
|
+
*
|
|
8
|
+
* Connector methods mirrored (see src/connectors/woocommerce.ts):
|
|
9
|
+
* - getOrders({ status?, perPage?, page?, after?, before? }) -> WooOrder[]
|
|
10
|
+
* - getOrder(id: number) -> WooOrder
|
|
11
|
+
* - getProducts({ status?, perPage?, page?, category? }) -> WooProduct[]
|
|
12
|
+
* - getCustomers({ search?, perPage?, page? }) -> WooCustomer[]
|
|
13
|
+
*
|
|
14
|
+
* All v1 tools are read-only (`isWrite: false`, `riskDefault: "low"`). Write
|
|
15
|
+
* operations (updateOrder/updateProduct/createWebhook/deleteWebhook) are
|
|
16
|
+
* deliberately excluded from this first wave.
|
|
17
|
+
*/
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WooCommerce tools — read-only access to orders, products, and customers.
|
|
3
|
+
*
|
|
4
|
+
* Self-registering tool module for the recipe tool registry. Each tool lazily
|
|
5
|
+
* imports the WooCommerce connector and wraps a single read method, returning
|
|
6
|
+
* the connector result verbatim via JSON.stringify.
|
|
7
|
+
*
|
|
8
|
+
* Connector methods mirrored (see src/connectors/woocommerce.ts):
|
|
9
|
+
* - getOrders({ status?, perPage?, page?, after?, before? }) -> WooOrder[]
|
|
10
|
+
* - getOrder(id: number) -> WooOrder
|
|
11
|
+
* - getProducts({ status?, perPage?, page?, category? }) -> WooProduct[]
|
|
12
|
+
* - getCustomers({ search?, perPage?, page? }) -> WooCustomer[]
|
|
13
|
+
*
|
|
14
|
+
* All v1 tools are read-only (`isWrite: false`, `riskDefault: "low"`). Write
|
|
15
|
+
* operations (updateOrder/updateProduct/createWebhook/deleteWebhook) are
|
|
16
|
+
* deliberately excluded from this first wave.
|
|
17
|
+
*/
|
|
18
|
+
import { CommonSchemas, registerTool } from "../toolRegistry.js";
|
|
19
|
+
// ============================================================================
|
|
20
|
+
// woocommerce.list_orders
|
|
21
|
+
// ============================================================================
|
|
22
|
+
registerTool({
|
|
23
|
+
id: "woocommerce.list_orders",
|
|
24
|
+
namespace: "woocommerce",
|
|
25
|
+
description: "List WooCommerce orders, optionally filtered by status or date range.",
|
|
26
|
+
paramsSchema: {
|
|
27
|
+
type: "object",
|
|
28
|
+
properties: {
|
|
29
|
+
status: {
|
|
30
|
+
type: "string",
|
|
31
|
+
description: "Filter by order status (e.g. pending, processing, completed, cancelled, refunded, any)",
|
|
32
|
+
},
|
|
33
|
+
perPage: {
|
|
34
|
+
type: "number",
|
|
35
|
+
description: "Max number of orders to return per page (WooCommerce default 10, max 100)",
|
|
36
|
+
},
|
|
37
|
+
page: {
|
|
38
|
+
type: "number",
|
|
39
|
+
description: "Page number for pagination (1-based)",
|
|
40
|
+
},
|
|
41
|
+
after: {
|
|
42
|
+
type: "string",
|
|
43
|
+
description: "Only orders created after this ISO 8601 date",
|
|
44
|
+
},
|
|
45
|
+
before: {
|
|
46
|
+
type: "string",
|
|
47
|
+
description: "Only orders created before this ISO 8601 date",
|
|
48
|
+
},
|
|
49
|
+
into: CommonSchemas.into,
|
|
50
|
+
},
|
|
51
|
+
required: [],
|
|
52
|
+
},
|
|
53
|
+
outputSchema: {
|
|
54
|
+
type: "array",
|
|
55
|
+
items: {
|
|
56
|
+
type: "object",
|
|
57
|
+
properties: {
|
|
58
|
+
id: { type: "number" },
|
|
59
|
+
status: { type: "string" },
|
|
60
|
+
currency: { type: "string" },
|
|
61
|
+
date_created: { type: "string" },
|
|
62
|
+
total: { type: "string" },
|
|
63
|
+
customer_id: { type: "number" },
|
|
64
|
+
billing: { type: "object" },
|
|
65
|
+
shipping: { type: "object" },
|
|
66
|
+
line_items: { type: "array", items: { type: "object" } },
|
|
67
|
+
payment_method: { type: "string" },
|
|
68
|
+
payment_method_title: { type: "string" },
|
|
69
|
+
transaction_id: { type: "string" },
|
|
70
|
+
customer_note: { type: "string" },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
riskDefault: "low",
|
|
75
|
+
isWrite: false,
|
|
76
|
+
isConnector: true,
|
|
77
|
+
execute: async ({ params }) => {
|
|
78
|
+
const { getWooCommerceConnector } = await import("../../connectors/woocommerce.js");
|
|
79
|
+
const connector = getWooCommerceConnector();
|
|
80
|
+
const result = await connector.getOrders({
|
|
81
|
+
status: typeof params.status === "string" ? params.status : undefined,
|
|
82
|
+
perPage: typeof params.perPage === "number" ? params.perPage : undefined,
|
|
83
|
+
page: typeof params.page === "number" ? params.page : undefined,
|
|
84
|
+
after: typeof params.after === "string" ? params.after : undefined,
|
|
85
|
+
before: typeof params.before === "string" ? params.before : undefined,
|
|
86
|
+
});
|
|
87
|
+
return JSON.stringify(result);
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
// ============================================================================
|
|
91
|
+
// woocommerce.get_order
|
|
92
|
+
// ============================================================================
|
|
93
|
+
registerTool({
|
|
94
|
+
id: "woocommerce.get_order",
|
|
95
|
+
namespace: "woocommerce",
|
|
96
|
+
description: "Fetch a single WooCommerce order by numeric ID.",
|
|
97
|
+
paramsSchema: {
|
|
98
|
+
type: "object",
|
|
99
|
+
properties: {
|
|
100
|
+
id: {
|
|
101
|
+
type: "number",
|
|
102
|
+
description: "WooCommerce order ID",
|
|
103
|
+
},
|
|
104
|
+
into: CommonSchemas.into,
|
|
105
|
+
},
|
|
106
|
+
required: ["id"],
|
|
107
|
+
},
|
|
108
|
+
outputSchema: {
|
|
109
|
+
type: "object",
|
|
110
|
+
properties: {
|
|
111
|
+
id: { type: "number" },
|
|
112
|
+
status: { type: "string" },
|
|
113
|
+
currency: { type: "string" },
|
|
114
|
+
date_created: { type: "string" },
|
|
115
|
+
total: { type: "string" },
|
|
116
|
+
customer_id: { type: "number" },
|
|
117
|
+
billing: { type: "object" },
|
|
118
|
+
shipping: { type: "object" },
|
|
119
|
+
line_items: { type: "array", items: { type: "object" } },
|
|
120
|
+
payment_method: { type: "string" },
|
|
121
|
+
payment_method_title: { type: "string" },
|
|
122
|
+
transaction_id: { type: "string" },
|
|
123
|
+
customer_note: { type: "string" },
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
riskDefault: "low",
|
|
127
|
+
isWrite: false,
|
|
128
|
+
isConnector: true,
|
|
129
|
+
execute: async ({ params }) => {
|
|
130
|
+
const { getWooCommerceConnector } = await import("../../connectors/woocommerce.js");
|
|
131
|
+
const connector = getWooCommerceConnector();
|
|
132
|
+
const result = await connector.getOrder(params.id);
|
|
133
|
+
return JSON.stringify(result);
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
// ============================================================================
|
|
137
|
+
// woocommerce.list_products
|
|
138
|
+
// ============================================================================
|
|
139
|
+
registerTool({
|
|
140
|
+
id: "woocommerce.list_products",
|
|
141
|
+
namespace: "woocommerce",
|
|
142
|
+
description: "List WooCommerce products, optionally filtered by status or category.",
|
|
143
|
+
paramsSchema: {
|
|
144
|
+
type: "object",
|
|
145
|
+
properties: {
|
|
146
|
+
status: {
|
|
147
|
+
type: "string",
|
|
148
|
+
description: "Filter by product status (e.g. publish, draft, pending, private, any)",
|
|
149
|
+
},
|
|
150
|
+
perPage: {
|
|
151
|
+
type: "number",
|
|
152
|
+
description: "Max number of products to return per page (WooCommerce default 10, max 100)",
|
|
153
|
+
},
|
|
154
|
+
page: {
|
|
155
|
+
type: "number",
|
|
156
|
+
description: "Page number for pagination (1-based)",
|
|
157
|
+
},
|
|
158
|
+
category: {
|
|
159
|
+
type: "string",
|
|
160
|
+
description: "Filter by product category ID",
|
|
161
|
+
},
|
|
162
|
+
into: CommonSchemas.into,
|
|
163
|
+
},
|
|
164
|
+
required: [],
|
|
165
|
+
},
|
|
166
|
+
outputSchema: {
|
|
167
|
+
type: "array",
|
|
168
|
+
items: {
|
|
169
|
+
type: "object",
|
|
170
|
+
properties: {
|
|
171
|
+
id: { type: "number" },
|
|
172
|
+
name: { type: "string" },
|
|
173
|
+
status: { type: "string" },
|
|
174
|
+
price: { type: "string" },
|
|
175
|
+
regular_price: { type: "string" },
|
|
176
|
+
sale_price: { type: "string" },
|
|
177
|
+
stock_quantity: { type: ["number", "null"] },
|
|
178
|
+
stock_status: { type: "string" },
|
|
179
|
+
categories: { type: "array", items: { type: "object" } },
|
|
180
|
+
images: { type: "array", items: { type: "object" } },
|
|
181
|
+
sku: { type: "string" },
|
|
182
|
+
description: { type: "string" },
|
|
183
|
+
short_description: { type: "string" },
|
|
184
|
+
type: { type: "string" },
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
riskDefault: "low",
|
|
189
|
+
isWrite: false,
|
|
190
|
+
isConnector: true,
|
|
191
|
+
execute: async ({ params }) => {
|
|
192
|
+
const { getWooCommerceConnector } = await import("../../connectors/woocommerce.js");
|
|
193
|
+
const connector = getWooCommerceConnector();
|
|
194
|
+
const result = await connector.getProducts({
|
|
195
|
+
status: typeof params.status === "string" ? params.status : undefined,
|
|
196
|
+
perPage: typeof params.perPage === "number" ? params.perPage : undefined,
|
|
197
|
+
page: typeof params.page === "number" ? params.page : undefined,
|
|
198
|
+
category: typeof params.category === "string" ? params.category : undefined,
|
|
199
|
+
});
|
|
200
|
+
return JSON.stringify(result);
|
|
201
|
+
},
|
|
202
|
+
});
|
|
203
|
+
// ============================================================================
|
|
204
|
+
// woocommerce.list_customers
|
|
205
|
+
// ============================================================================
|
|
206
|
+
registerTool({
|
|
207
|
+
id: "woocommerce.list_customers",
|
|
208
|
+
namespace: "woocommerce",
|
|
209
|
+
description: "List WooCommerce customers, optionally filtered by a search string.",
|
|
210
|
+
paramsSchema: {
|
|
211
|
+
type: "object",
|
|
212
|
+
properties: {
|
|
213
|
+
search: {
|
|
214
|
+
type: "string",
|
|
215
|
+
description: "Search customers by name or email",
|
|
216
|
+
},
|
|
217
|
+
perPage: {
|
|
218
|
+
type: "number",
|
|
219
|
+
description: "Max number of customers to return per page (WooCommerce default 10, max 100)",
|
|
220
|
+
},
|
|
221
|
+
page: {
|
|
222
|
+
type: "number",
|
|
223
|
+
description: "Page number for pagination (1-based)",
|
|
224
|
+
},
|
|
225
|
+
into: CommonSchemas.into,
|
|
226
|
+
},
|
|
227
|
+
required: [],
|
|
228
|
+
},
|
|
229
|
+
outputSchema: {
|
|
230
|
+
type: "array",
|
|
231
|
+
items: {
|
|
232
|
+
type: "object",
|
|
233
|
+
properties: {
|
|
234
|
+
id: { type: "number" },
|
|
235
|
+
email: { type: "string" },
|
|
236
|
+
first_name: { type: "string" },
|
|
237
|
+
last_name: { type: "string" },
|
|
238
|
+
billing: { type: "object" },
|
|
239
|
+
orders_count: { type: "number" },
|
|
240
|
+
total_spent: { type: "string" },
|
|
241
|
+
date_created: { type: "string" },
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
riskDefault: "low",
|
|
246
|
+
isWrite: false,
|
|
247
|
+
isConnector: true,
|
|
248
|
+
execute: async ({ params }) => {
|
|
249
|
+
const { getWooCommerceConnector } = await import("../../connectors/woocommerce.js");
|
|
250
|
+
const connector = getWooCommerceConnector();
|
|
251
|
+
const result = await connector.getCustomers({
|
|
252
|
+
search: typeof params.search === "string" ? params.search : undefined,
|
|
253
|
+
perPage: typeof params.perPage === "number" ? params.perPage : undefined,
|
|
254
|
+
page: typeof params.page === "number" ? params.page : undefined,
|
|
255
|
+
});
|
|
256
|
+
return JSON.stringify(result);
|
|
257
|
+
},
|
|
258
|
+
});
|
|
259
|
+
//# sourceMappingURL=woocommerce.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"woocommerce.js","sourceRoot":"","sources":["../../../src/recipes/tools/woocommerce.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;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,aAAa;IACxB,WA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,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QAC5B,MAAM,EAAE,uBAAuB,EAAE,GAAG,MAAM,MAAM,CAC9C,iCAAiC,CAClC,CAAC;QACF,MAAM,SAAS,GAAG,uBAAuB,EAAE,CAAC;QAC5C,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,YAAY,CAAC;YAC1C,MAAM,EAAE,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YACrE,OAAO,EAAE,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;YACxE,IAAI,EAAE,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;SAChE,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* wrapConnectorExecute — soft error-envelope normalization for connector tools.
|
|
3
|
+
*
|
|
4
|
+
* Many newer connector tools (monday, stripe, twilio, …) have no try/catch in
|
|
5
|
+
* their `execute()` body. A connector throw — a network failure, a missing-token
|
|
6
|
+
* `authenticate()`/`loadTokens()` error inside a class-accessor connector, etc. —
|
|
7
|
+
* then propagates uncaught. The recipe runner treats an uncaught throw as a
|
|
8
|
+
* null result: `ctx[step.into]` is never written, downstream
|
|
9
|
+
* `{{steps.X.field}}` references resolve empty, and the run halts.
|
|
10
|
+
*
|
|
11
|
+
* The early connector tools (slack.ts, linear.ts, jira.ts) instead return a
|
|
12
|
+
* SOFT error envelope — `JSON.stringify({ ok: false, error })` — so a
|
|
13
|
+
* downstream step can read `.error` and the run can continue.
|
|
14
|
+
*
|
|
15
|
+
* This helper brings throwing tools up to that same standard: it runs the tool
|
|
16
|
+
* body and, on throw, returns the identical envelope. The success path is
|
|
17
|
+
* passed through verbatim (string or null).
|
|
18
|
+
*/
|
|
19
|
+
import type { ToolExecute } from "../toolRegistry.js";
|
|
20
|
+
/**
|
|
21
|
+
* Wrap a connector tool's execute fn so any thrown error becomes the soft
|
|
22
|
+
* error envelope `{ ok: false, error }` (matching slack/linear/jira), instead
|
|
23
|
+
* of propagating and halting the run. Success path is unchanged.
|
|
24
|
+
*/
|
|
25
|
+
export declare function wrapConnectorExecute(inner: ToolExecute): ToolExecute;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* wrapConnectorExecute — soft error-envelope normalization for connector tools.
|
|
3
|
+
*
|
|
4
|
+
* Many newer connector tools (monday, stripe, twilio, …) have no try/catch in
|
|
5
|
+
* their `execute()` body. A connector throw — a network failure, a missing-token
|
|
6
|
+
* `authenticate()`/`loadTokens()` error inside a class-accessor connector, etc. —
|
|
7
|
+
* then propagates uncaught. The recipe runner treats an uncaught throw as a
|
|
8
|
+
* null result: `ctx[step.into]` is never written, downstream
|
|
9
|
+
* `{{steps.X.field}}` references resolve empty, and the run halts.
|
|
10
|
+
*
|
|
11
|
+
* The early connector tools (slack.ts, linear.ts, jira.ts) instead return a
|
|
12
|
+
* SOFT error envelope — `JSON.stringify({ ok: false, error })` — so a
|
|
13
|
+
* downstream step can read `.error` and the run can continue.
|
|
14
|
+
*
|
|
15
|
+
* This helper brings throwing tools up to that same standard: it runs the tool
|
|
16
|
+
* body and, on throw, returns the identical envelope. The success path is
|
|
17
|
+
* passed through verbatim (string or null).
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Wrap a connector tool's execute fn so any thrown error becomes the soft
|
|
21
|
+
* error envelope `{ ok: false, error }` (matching slack/linear/jira), instead
|
|
22
|
+
* of propagating and halting the run. Success path is unchanged.
|
|
23
|
+
*/
|
|
24
|
+
export function wrapConnectorExecute(inner) {
|
|
25
|
+
return async (context) => {
|
|
26
|
+
try {
|
|
27
|
+
return await inner(context);
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
return JSON.stringify({
|
|
31
|
+
ok: false,
|
|
32
|
+
error: err instanceof Error ? err.message : String(err),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=wrapConnectorExecute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapConnectorExecute.js","sourceRoot":"","sources":["../../../src/recipes/tools/wrapConnectorExecute.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAkB;IACrD,OAAO,KAAK,EAAE,OAAoB,EAA0B,EAAE;QAC5D,IAAI,CAAC;YACH,OAAO,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,IAAI,CAAC,SAAS,CAAC;gBACpB,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aACxD,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|