patchwork-os 0.2.0-beta.10.canary.98 → 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/connect.d.ts +47 -0
- package/dist/commands/connect.js +419 -0
- package/dist/commands/connect.js.map +1 -0
- 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 +148 -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 @@
|
|
|
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;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,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,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18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Docs tools — docs.get_document, docs.get_document_text
|
|
3
|
+
*
|
|
4
|
+
* Self-registering tool modules for the recipe tool registry. The
|
|
5
|
+
* google-docs connector (src/connectors/googleDocs.ts) follows a
|
|
6
|
+
* module-function pattern (standalone exported async functions) rather
|
|
7
|
+
* than a class+accessor, so each tool lazily `await import`s the module
|
|
8
|
+
* and calls the exported function directly.
|
|
9
|
+
*
|
|
10
|
+
* Both exported functions accept a Doc ID *or* a Google Docs URL — they
|
|
11
|
+
* call `extractDocumentId(urlOrId)` internally — so the `documentId`
|
|
12
|
+
* param is passed through verbatim.
|
|
13
|
+
*
|
|
14
|
+
* Namespace is "docs" (the parent wires the docs → google-docs alias in
|
|
15
|
+
* the parity ratchet, matching how "calendar" → google-calendar and
|
|
16
|
+
* "drive" → google-drive are aliased).
|
|
17
|
+
*/
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Docs tools — docs.get_document, docs.get_document_text
|
|
3
|
+
*
|
|
4
|
+
* Self-registering tool modules for the recipe tool registry. The
|
|
5
|
+
* google-docs connector (src/connectors/googleDocs.ts) follows a
|
|
6
|
+
* module-function pattern (standalone exported async functions) rather
|
|
7
|
+
* than a class+accessor, so each tool lazily `await import`s the module
|
|
8
|
+
* and calls the exported function directly.
|
|
9
|
+
*
|
|
10
|
+
* Both exported functions accept a Doc ID *or* a Google Docs URL — they
|
|
11
|
+
* call `extractDocumentId(urlOrId)` internally — so the `documentId`
|
|
12
|
+
* param is passed through verbatim.
|
|
13
|
+
*
|
|
14
|
+
* Namespace is "docs" (the parent wires the docs → google-docs alias in
|
|
15
|
+
* the parity ratchet, matching how "calendar" → google-calendar and
|
|
16
|
+
* "drive" → google-drive are aliased).
|
|
17
|
+
*/
|
|
18
|
+
import { CommonSchemas, registerTool } from "../toolRegistry.js";
|
|
19
|
+
// ============================================================================
|
|
20
|
+
// docs.get_document
|
|
21
|
+
// ============================================================================
|
|
22
|
+
registerTool({
|
|
23
|
+
id: "docs.get_document",
|
|
24
|
+
namespace: "docs",
|
|
25
|
+
description: "Fetch the structured Google Docs document tree by document ID or URL. Returns the raw Docs API document (documentId, title, body, headers, footers, revisionId).",
|
|
26
|
+
paramsSchema: {
|
|
27
|
+
type: "object",
|
|
28
|
+
properties: {
|
|
29
|
+
documentId: {
|
|
30
|
+
type: "string",
|
|
31
|
+
description: "Google Docs document ID or a Google Docs URL",
|
|
32
|
+
},
|
|
33
|
+
into: CommonSchemas.into,
|
|
34
|
+
},
|
|
35
|
+
required: ["documentId"],
|
|
36
|
+
},
|
|
37
|
+
outputSchema: {
|
|
38
|
+
type: "object",
|
|
39
|
+
properties: {
|
|
40
|
+
documentId: { type: "string" },
|
|
41
|
+
title: { type: "string" },
|
|
42
|
+
body: { type: "object" },
|
|
43
|
+
headers: { type: "object" },
|
|
44
|
+
footers: { type: "object" },
|
|
45
|
+
revisionId: { type: "string" },
|
|
46
|
+
},
|
|
47
|
+
required: ["documentId"],
|
|
48
|
+
},
|
|
49
|
+
riskDefault: "low",
|
|
50
|
+
isWrite: false,
|
|
51
|
+
isConnector: true,
|
|
52
|
+
execute: async ({ params }) => {
|
|
53
|
+
const { getDocument } = await import("../../connectors/googleDocs.js");
|
|
54
|
+
return JSON.stringify(await getDocument(params.documentId));
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
// ============================================================================
|
|
58
|
+
// docs.get_document_text
|
|
59
|
+
// ============================================================================
|
|
60
|
+
registerTool({
|
|
61
|
+
id: "docs.get_document_text",
|
|
62
|
+
namespace: "docs",
|
|
63
|
+
description: "Fetch a Google Docs document by ID or URL and return its flat plain-text content (paragraphs, tables and table-of-contents text concatenated).",
|
|
64
|
+
paramsSchema: {
|
|
65
|
+
type: "object",
|
|
66
|
+
properties: {
|
|
67
|
+
documentId: {
|
|
68
|
+
type: "string",
|
|
69
|
+
description: "Google Docs document ID or a Google Docs URL",
|
|
70
|
+
},
|
|
71
|
+
into: CommonSchemas.into,
|
|
72
|
+
},
|
|
73
|
+
required: ["documentId"],
|
|
74
|
+
},
|
|
75
|
+
outputSchema: {
|
|
76
|
+
type: "object",
|
|
77
|
+
properties: {
|
|
78
|
+
text: {
|
|
79
|
+
type: "string",
|
|
80
|
+
description: "Flat plain-text content of the document",
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
required: ["text"],
|
|
84
|
+
},
|
|
85
|
+
riskDefault: "low",
|
|
86
|
+
isWrite: false,
|
|
87
|
+
isConnector: true,
|
|
88
|
+
execute: async ({ params }) => {
|
|
89
|
+
const { getDocumentText } = await import("../../connectors/googleDocs.js");
|
|
90
|
+
const text = await getDocumentText(params.documentId);
|
|
91
|
+
return JSON.stringify({ text });
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
//# sourceMappingURL=docs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../../../src/recipes/tools/docs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEjE,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E,YAAY,CAAC;IACX,EAAE,EAAE,mBAAmB;IACvB,SAAS,EAAE,MAAM;IACjB,WAAW,EACT,kKAAkK;IACpK,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8CAA8C;aAC5D;YACD,IAAI,EAAE,aAAa,CAAC,IAAI;SACzB;QACD,QAAQ,EAAE,CAAC,YAAY,CAAC;KACzB;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC9B,KAAK,EAAE,EAAE,IA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K,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QAC5B,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,gCAAgC,CAAC,CAAC;QAC3E,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,MAAM,CAAC,UAAoB,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAClC,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;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEjE,+EAA+E;AAC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;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 {};
|
|
@@ -0,0 +1,194 @@
|
|
|
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
|
+
import { CommonSchemas, registerTool } from "../toolRegistry.js";
|
|
13
|
+
// ============================================================================
|
|
14
|
+
// figma.get_file
|
|
15
|
+
// ============================================================================
|
|
16
|
+
registerTool({
|
|
17
|
+
id: "figma.get_file",
|
|
18
|
+
namespace: "figma",
|
|
19
|
+
description: "Fetch a Figma file's document tree and metadata by file key. Optional depth limits how many node levels are returned; geometry='paths' includes vector path data.",
|
|
20
|
+
paramsSchema: {
|
|
21
|
+
type: "object",
|
|
22
|
+
properties: {
|
|
23
|
+
fileKey: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "Figma file key (from the file URL, e.g. /file/<key>/...)",
|
|
26
|
+
},
|
|
27
|
+
depth: {
|
|
28
|
+
type: "number",
|
|
29
|
+
description: "How many node levels to return (default 2)",
|
|
30
|
+
},
|
|
31
|
+
geometry: {
|
|
32
|
+
type: "string",
|
|
33
|
+
enum: ["paths"],
|
|
34
|
+
description: "Set to 'paths' to include vector geometry data",
|
|
35
|
+
},
|
|
36
|
+
into: CommonSchemas.into,
|
|
37
|
+
},
|
|
38
|
+
required: ["fileKey"],
|
|
39
|
+
},
|
|
40
|
+
outputSchema: {
|
|
41
|
+
type: "object",
|
|
42
|
+
properties: {
|
|
43
|
+
name: { type: "string" },
|
|
44
|
+
lastModified: { type: "string" },
|
|
45
|
+
version: { type: "string" },
|
|
46
|
+
document: {},
|
|
47
|
+
components: { type: "object" },
|
|
48
|
+
styles: { type: "object" },
|
|
49
|
+
schemaVersion: { type: "number" },
|
|
50
|
+
thumbnailUrl: { type: "string" },
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
riskDefault: "low",
|
|
54
|
+
isWrite: false,
|
|
55
|
+
isConnector: true,
|
|
56
|
+
execute: async ({ params }) => {
|
|
57
|
+
const { getFigmaConnector } = await import("../../connectors/figma.js");
|
|
58
|
+
const connector = getFigmaConnector();
|
|
59
|
+
const result = await connector.getFile(params.fileKey, {
|
|
60
|
+
depth: typeof params.depth === "number" ? params.depth : undefined,
|
|
61
|
+
geometry: params.geometry === "paths" ? "paths" : undefined,
|
|
62
|
+
});
|
|
63
|
+
return JSON.stringify(result);
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
// ============================================================================
|
|
67
|
+
// figma.get_file_comments
|
|
68
|
+
// ============================================================================
|
|
69
|
+
registerTool({
|
|
70
|
+
id: "figma.get_file_comments",
|
|
71
|
+
namespace: "figma",
|
|
72
|
+
description: "List all comments on a Figma file by file key.",
|
|
73
|
+
paramsSchema: {
|
|
74
|
+
type: "object",
|
|
75
|
+
properties: {
|
|
76
|
+
fileKey: {
|
|
77
|
+
type: "string",
|
|
78
|
+
description: "Figma file key (from the file URL, e.g. /file/<key>/...)",
|
|
79
|
+
},
|
|
80
|
+
into: CommonSchemas.into,
|
|
81
|
+
},
|
|
82
|
+
required: ["fileKey"],
|
|
83
|
+
},
|
|
84
|
+
outputSchema: {
|
|
85
|
+
type: "object",
|
|
86
|
+
properties: {
|
|
87
|
+
comments: { type: "array", items: { type: "object" } },
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
riskDefault: "low",
|
|
91
|
+
isWrite: false,
|
|
92
|
+
isConnector: true,
|
|
93
|
+
execute: async ({ params }) => {
|
|
94
|
+
const { getFigmaConnector } = await import("../../connectors/figma.js");
|
|
95
|
+
const connector = getFigmaConnector();
|
|
96
|
+
const result = await connector.getFileComments(params.fileKey);
|
|
97
|
+
return JSON.stringify(result);
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
// ============================================================================
|
|
101
|
+
// figma.list_project_files
|
|
102
|
+
// ============================================================================
|
|
103
|
+
registerTool({
|
|
104
|
+
id: "figma.list_project_files",
|
|
105
|
+
namespace: "figma",
|
|
106
|
+
description: "List the files within a Figma project by project ID.",
|
|
107
|
+
paramsSchema: {
|
|
108
|
+
type: "object",
|
|
109
|
+
properties: {
|
|
110
|
+
projectId: {
|
|
111
|
+
type: "string",
|
|
112
|
+
description: "Figma project ID",
|
|
113
|
+
},
|
|
114
|
+
into: CommonSchemas.into,
|
|
115
|
+
},
|
|
116
|
+
required: ["projectId"],
|
|
117
|
+
},
|
|
118
|
+
outputSchema: {
|
|
119
|
+
type: "object",
|
|
120
|
+
properties: {
|
|
121
|
+
name: { type: "string" },
|
|
122
|
+
files: { type: "array", items: { type: "object" } },
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
riskDefault: "low",
|
|
126
|
+
isWrite: false,
|
|
127
|
+
isConnector: true,
|
|
128
|
+
execute: async ({ params }) => {
|
|
129
|
+
const { getFigmaConnector } = await import("../../connectors/figma.js");
|
|
130
|
+
const connector = getFigmaConnector();
|
|
131
|
+
const result = await connector.listProjectFiles(params.projectId);
|
|
132
|
+
return JSON.stringify(result);
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
// ============================================================================
|
|
136
|
+
// figma.get_image_urls
|
|
137
|
+
// ============================================================================
|
|
138
|
+
registerTool({
|
|
139
|
+
id: "figma.get_image_urls",
|
|
140
|
+
namespace: "figma",
|
|
141
|
+
description: "Render and fetch image URLs for one or more nodes in a Figma file. Returns a map of node id → rendered image URL.",
|
|
142
|
+
paramsSchema: {
|
|
143
|
+
type: "object",
|
|
144
|
+
properties: {
|
|
145
|
+
fileKey: {
|
|
146
|
+
type: "string",
|
|
147
|
+
description: "Figma file key (from the file URL, e.g. /file/<key>/...)",
|
|
148
|
+
},
|
|
149
|
+
ids: {
|
|
150
|
+
type: "array",
|
|
151
|
+
items: { type: "string" },
|
|
152
|
+
minItems: 1,
|
|
153
|
+
description: "Node IDs to render (non-empty array)",
|
|
154
|
+
},
|
|
155
|
+
format: {
|
|
156
|
+
type: "string",
|
|
157
|
+
enum: ["png", "jpg", "svg", "pdf"],
|
|
158
|
+
description: "Image output format (default png)",
|
|
159
|
+
},
|
|
160
|
+
scale: {
|
|
161
|
+
type: "number",
|
|
162
|
+
description: "Image scale factor (default 1)",
|
|
163
|
+
},
|
|
164
|
+
into: CommonSchemas.into,
|
|
165
|
+
},
|
|
166
|
+
required: ["fileKey", "ids"],
|
|
167
|
+
},
|
|
168
|
+
outputSchema: {
|
|
169
|
+
type: "object",
|
|
170
|
+
properties: {
|
|
171
|
+
err: { type: ["string", "null"] },
|
|
172
|
+
images: { type: "object" },
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
riskDefault: "low",
|
|
176
|
+
isWrite: false,
|
|
177
|
+
isConnector: true,
|
|
178
|
+
execute: async ({ params }) => {
|
|
179
|
+
const { getFigmaConnector } = await import("../../connectors/figma.js");
|
|
180
|
+
const connector = getFigmaConnector();
|
|
181
|
+
const result = await connector.getImageUrls(params.fileKey, {
|
|
182
|
+
ids: params.ids,
|
|
183
|
+
format: params.format === "png" ||
|
|
184
|
+
params.format === "jpg" ||
|
|
185
|
+
params.format === "svg" ||
|
|
186
|
+
params.format === "pdf"
|
|
187
|
+
? params.format
|
|
188
|
+
: undefined,
|
|
189
|
+
scale: typeof params.scale === "number" ? params.scale : undefined,
|
|
190
|
+
});
|
|
191
|
+
return JSON.stringify(result);
|
|
192
|
+
},
|
|
193
|
+
});
|
|
194
|
+
//# sourceMappingURL=figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"figma.js","sourceRoot":"","sources":["../../../src/recipes/tools/figma.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEjE,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E,YAAY,CAAC;IACX,EAAE,EAAE,gBAAgB;IACpB,SAAS,EAAE,OAAO;IAClB,WAAW,EACT,mKAAmK;IACrK,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0DAA0D;aACxE;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4CAA4C;aAC1D;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,OAAO,CAAC;gBACf,WAAW,EAAE,gDAAgD;aAC9D;YACD,IAAI,EAAE,aAAa,CAAC,IAAI;SACzB;QACD,QAAQ,EAAE,CAAC,SAAS,CAAC;KACtB;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YAC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,EAAE,KAAK,CAAC;KAC7B;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE;YACjC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC3B;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,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAC;QACxE,MAAM,SAAS,GAAG,iBAAiB,EAAE,CAAC;QACtC,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,YAAY,CAAC,MAAM,CAAC,OAAiB,EAAE;YACpE,GAAG,EAAE,MAAM,CAAC,GAAe;YAC3B,MAAM,EACJ,MAAM,CAAC,MAAM,KAAK,KAAK;gBACvB,MAAM,CAAC,MAAM,KAAK,KAAK;gBACvB,MAAM,CAAC,MAAM,KAAK,KAAK;gBACvB,MAAM,CAAC,MAAM,KAAK,KAAK;gBACrB,CAAC,CAAC,MAAM,CAAC,MAAM;gBACf,CAAC,CAAC,SAAS;YACf,KAAK,EAAE,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;SACnE,CAAC,CAAC;QACH,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 {};
|