@wootsup/yt-builder-mcp 1.10.0 → 1.11.0
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 +6 -5
- package/dist/gateway/advanced-read-tool.d.ts.map +1 -1
- package/dist/gateway/advanced-read-tool.js +14 -2
- package/dist/gateway/advanced-read-tool.js.map +1 -1
- package/dist/gateway/advanced-tool/domains.d.ts.map +1 -1
- package/dist/gateway/advanced-tool/domains.js +5 -0
- package/dist/gateway/advanced-tool/domains.js.map +1 -1
- package/dist/gateway/advanced-tool/execute.d.ts +7 -1
- package/dist/gateway/advanced-tool/execute.d.ts.map +1 -1
- package/dist/gateway/advanced-tool/execute.js +58 -4
- package/dist/gateway/advanced-tool/execute.js.map +1 -1
- package/dist/server.d.ts +3 -3
- package/dist/server.js +3 -3
- package/dist/sites/tools/sites-list.d.ts.map +1 -1
- package/dist/sites/tools/sites-list.js +22 -2
- package/dist/sites/tools/sites-list.js.map +1 -1
- package/dist/tools/elements/builders.d.ts.map +1 -1
- package/dist/tools/elements/builders.js +69 -31
- package/dist/tools/elements/builders.js.map +1 -1
- package/dist/tools/elements/handlers-write.d.ts +2 -0
- package/dist/tools/elements/handlers-write.d.ts.map +1 -1
- package/dist/tools/elements/handlers-write.js +132 -9
- package/dist/tools/elements/handlers-write.js.map +1 -1
- package/dist/tools/elements/handlers.d.ts +7 -4
- package/dist/tools/elements/handlers.d.ts.map +1 -1
- package/dist/tools/elements/handlers.js +49 -8
- package/dist/tools/elements/handlers.js.map +1 -1
- package/dist/tools/elements/schema-validation.d.ts +18 -0
- package/dist/tools/elements/schema-validation.d.ts.map +1 -1
- package/dist/tools/elements/schema-validation.js +49 -5
- package/dist/tools/elements/schema-validation.js.map +1 -1
- package/dist/tools/format/sources-format.d.ts +12 -5
- package/dist/tools/format/sources-format.d.ts.map +1 -1
- package/dist/tools/format/sources-format.js +31 -6
- package/dist/tools/format/sources-format.js.map +1 -1
- package/dist/tools/health.d.ts.map +1 -1
- package/dist/tools/health.js +18 -5
- package/dist/tools/health.js.map +1 -1
- package/dist/tools/inspection.d.ts.map +1 -1
- package/dist/tools/inspection.js +81 -12
- package/dist/tools/inspection.js.map +1 -1
- package/dist/tools/layout-flatten.d.ts +7 -1
- package/dist/tools/layout-flatten.d.ts.map +1 -1
- package/dist/tools/layout-flatten.js +24 -13
- package/dist/tools/layout-flatten.js.map +1 -1
- package/dist/tools/library.d.ts +23 -0
- package/dist/tools/library.d.ts.map +1 -1
- package/dist/tools/library.js +213 -15
- package/dist/tools/library.js.map +1 -1
- package/dist/tools/local-content/builders.js +11 -11
- package/dist/tools/local-content/builders.js.map +1 -1
- package/dist/tools/local-content/handlers.d.ts.map +1 -1
- package/dist/tools/local-content/handlers.js +34 -5
- package/dist/tools/local-content/handlers.js.map +1 -1
- package/dist/tools/local-content/schemas.d.ts +9 -4
- package/dist/tools/local-content/schemas.d.ts.map +1 -1
- package/dist/tools/local-content/schemas.js +14 -6
- package/dist/tools/local-content/schemas.js.map +1 -1
- package/dist/tools/multi-items/builders.d.ts.map +1 -1
- package/dist/tools/multi-items/builders.js +11 -8
- package/dist/tools/multi-items/builders.js.map +1 -1
- package/dist/tools/pages/builders.d.ts.map +1 -1
- package/dist/tools/pages/builders.js +84 -51
- package/dist/tools/pages/builders.js.map +1 -1
- package/dist/tools/pages/handlers-audit.d.ts +99 -1
- package/dist/tools/pages/handlers-audit.d.ts.map +1 -1
- package/dist/tools/pages/handlers-audit.js +613 -7
- package/dist/tools/pages/handlers-audit.js.map +1 -1
- package/dist/tools/pages/handlers-read.d.ts +8 -3
- package/dist/tools/pages/handlers-read.d.ts.map +1 -1
- package/dist/tools/pages/handlers-read.js +172 -25
- package/dist/tools/pages/handlers-read.js.map +1 -1
- package/dist/tools/pages/handlers-write.d.ts +5 -1
- package/dist/tools/pages/handlers-write.d.ts.map +1 -1
- package/dist/tools/pages/handlers-write.js +66 -23
- package/dist/tools/pages/handlers-write.js.map +1 -1
- package/dist/tools/pages/schemas.d.ts +189 -4
- package/dist/tools/pages/schemas.d.ts.map +1 -1
- package/dist/tools/pages/schemas.js +235 -9
- package/dist/tools/pages/schemas.js.map +1 -1
- package/dist/tools/pages/target.d.ts +162 -0
- package/dist/tools/pages/target.d.ts.map +1 -0
- package/dist/tools/pages/target.js +239 -0
- package/dist/tools/pages/target.js.map +1 -0
- package/dist/tools/shared-schemas.d.ts +22 -0
- package/dist/tools/shared-schemas.d.ts.map +1 -1
- package/dist/tools/shared-schemas.js +22 -0
- package/dist/tools/shared-schemas.js.map +1 -1
- package/dist/tools/sources/builders.d.ts.map +1 -1
- package/dist/tools/sources/builders.js +46 -28
- package/dist/tools/sources/builders.js.map +1 -1
- package/dist/tools/sources/handlers-bind.d.ts +7 -8
- package/dist/tools/sources/handlers-bind.d.ts.map +1 -1
- package/dist/tools/sources/handlers-bind.js +106 -7
- package/dist/tools/sources/handlers-bind.js.map +1 -1
- package/dist/tools/sparse-fields.d.ts +12 -0
- package/dist/tools/sparse-fields.d.ts.map +1 -1
- package/dist/tools/sparse-fields.js +34 -2
- package/dist/tools/sparse-fields.js.map +1 -1
- package/dist/tools/tool-builder/results.d.ts.map +1 -1
- package/dist/tools/tool-builder/results.js +114 -0
- package/dist/tools/tool-builder/results.js.map +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/skills/yt-builder-mcp/SKILL.md +564 -42
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ The wizard auto-detects and configures the following clients:
|
|
|
63
63
|
|
|
64
64
|
## Tool surface (gateway model)
|
|
65
65
|
|
|
66
|
-
The server catalogues **
|
|
66
|
+
The server catalogues **49 tools + 2 gateways = 51 reachable** end-to-end,
|
|
67
67
|
of which **41 are advertised in `tools/list`** (well under Cursor's ~40-tool
|
|
68
68
|
cap — the 3-lane split keeps the advertised surface small while every
|
|
69
69
|
catalogued tool stays callable):
|
|
@@ -78,10 +78,11 @@ catalogued tool stays callable):
|
|
|
78
78
|
`inspect_multi_items_binding`, the multi-site `sites_list` / `sites_test` /
|
|
79
79
|
`use_site`, and the bind→save→publish chain `element_bind_source` /
|
|
80
80
|
`page_save` / `page_publish`, among others).
|
|
81
|
-
- **2 gateway tools** exposing the remaining **
|
|
82
|
-
- `yootheme_builder_advanced` (write-capable) routes **all
|
|
83
|
-
(`page_get_schema`, `
|
|
81
|
+
- **2 gateway tools** exposing the remaining **10 advanced tools**:
|
|
82
|
+
- `yootheme_builder_advanced` (write-capable) routes **all 10**
|
|
83
|
+
(`page_get_schema`, `element_unbind_source`,
|
|
84
84
|
`clean_implode_directives`, `inspect_sublayout`, `layout_query`,
|
|
85
|
+
`library_save_as`, `library_delete`,
|
|
85
86
|
`local_content_types`, `local_content_read`, `pages_audit`).
|
|
86
87
|
- `yootheme_builder_advanced_read` (read-only-annotated) routes only the
|
|
87
88
|
**6 read-only** advanced tools (`page_get_schema`, `inspect_sublayout`,
|
|
@@ -105,7 +106,7 @@ workflows, and `docs/TOOL-CATALOG.md` for an auto-generated reference.
|
|
|
105
106
|
| Sources | 5 | `sources_list`, `element_get_binding`, `element_bind_source`, `element_unbind_source`, `inspect_multi_items_binding` |
|
|
106
107
|
| Inspection | 3 | `element_types_list`, `element_type_get_schema`, `clean_implode_directives` |
|
|
107
108
|
| Sublayout | 1 | `inspect_sublayout` (F154 — fragment subtree + render-time inner-grid gate; advanced/gateway-routed) |
|
|
108
|
-
| Gateway | 2 | `advanced` (write, routes all
|
|
109
|
+
| Gateway | 2 | `advanced` (write, routes all 10 advanced tools), `advanced_read` (read-only, routes the 6 read-only advanced tools) |
|
|
109
110
|
|
|
110
111
|
All tool names are prefixed with `yootheme_builder_` at the MCP server boundary.
|
|
111
112
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advanced-read-tool.d.ts","sourceRoot":"","sources":["../../src/gateway/advanced-read-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAM/D,+EAA+E;AAC/E,eAAO,MAAM,uBAAuB,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"advanced-read-tool.d.ts","sourceRoot":"","sources":["../../src/gateway/advanced-read-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAM/D,+EAA+E;AAC/E,eAAO,MAAM,uBAAuB,mCAAmC,CAAC;AA0ExE;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACpC,UAAU,EAAE,SAAS,EACrB,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,GACjD,IAAI,CA0EN"}
|
|
@@ -75,7 +75,17 @@ function buildReadDescription(readOnlyNames) {
|
|
|
75
75
|
'ONLY for the read-only advanced tools listed below — every tool that ' +
|
|
76
76
|
'appears directly in tools/list is FIRST-CLASS: call it directly, never via this gateway. ' +
|
|
77
77
|
'Itself read-only (no write-approval gate) — prefer it over ' +
|
|
78
|
-
'yootheme_builder_advanced for inspection.
|
|
78
|
+
'yootheme_builder_advanced for inspection. ' +
|
|
79
|
+
// B-1 (SEO-routing fix, 2026-07-21): intent keywords in the gateway
|
|
80
|
+
// lead so a COLD agent's generic "SEO audit" request matches this
|
|
81
|
+
// gateway semantically and finds pages_audit behind it (pages_audit is
|
|
82
|
+
// L2 — only reachable through this gateway, never first-class). Without
|
|
83
|
+
// this the agent loops page_get_layout page-by-page (glöckle 2026-07-21).
|
|
84
|
+
'Includes the one-call site-wide SEO / structure / content / links AUDIT ' +
|
|
85
|
+
'(yootheme_builder_pages_audit — missing/multiple h1, image alt, thin ' +
|
|
86
|
+
'content, duplicate layouts, dead links): route a whole-site SEO / audit ' +
|
|
87
|
+
'request here instead of looping page-by-page reads. ' +
|
|
88
|
+
'Call { tool } for its ' +
|
|
79
89
|
'schema, or { tool, arguments } to run it.' +
|
|
80
90
|
'\n\nAvailable read-only advanced tools by domain:\n' +
|
|
81
91
|
`${renderGroupedList(readOnlyNames)}\n\n` +
|
|
@@ -150,7 +160,9 @@ export function registerAdvancedReadTool(realServer, advancedRegistry) {
|
|
|
150
160
|
const callArgs = args.arguments ?? args.input;
|
|
151
161
|
if (callArgs === undefined)
|
|
152
162
|
return discoveryResult(args.tool, entry);
|
|
153
|
-
|
|
163
|
+
// DISCOVERY_AUDIT-13: pass THIS gateway's name so an invalid_arguments
|
|
164
|
+
// failure steers back to advanced_read, not the write gateway.
|
|
165
|
+
return executeAdvancedTool(args.tool, entry, callArgs, extra, ADVANCED_READ_TOOL_NAME);
|
|
154
166
|
});
|
|
155
167
|
}
|
|
156
168
|
//# sourceMappingURL=advanced-read-tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advanced-read-tool.js","sourceRoot":"","sources":["../../src/gateway/advanced-read-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGpD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAE9E,+EAA+E;AAC/E,MAAM,CAAC,MAAM,uBAAuB,GAAG,gCAAgC,CAAC;AAExE;;;;;GAKG;AACH,SAAS,eAAe,CAAC,KAAwB;IAC7C,MAAM,WAAW,GAAI,KA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AAI,CAAC,KAAK,CAAC;QAC9C,IAAI,QAAQ,KAAK,SAAS;YAAE,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACrE,uEAAuE;QACvE,+DAA+D;QAC/D,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,uBAAuB,CAAC,CAAC;IAC3F,CAAC,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domains.d.ts","sourceRoot":"","sources":["../../../src/gateway/advanced-tool/domains.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,wEAAyE,CAAC;AAEnG;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAMtF,CAAC;AAEF,eAAO,MAAM,WAAW,sBAAsB,CAAC;AAE/C,8FAA8F;AAC9F,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAQjD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAgBxE;AAED,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAO7D;AAED;;;;;;;;;GASG;AAEH,qFAAqF;AACrF,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"domains.d.ts","sourceRoot":"","sources":["../../../src/gateway/advanced-tool/domains.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,wEAAyE,CAAC;AAEnG;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAMtF,CAAC;AAEF,eAAO,MAAM,WAAW,sBAAsB,CAAC;AAE/C,8FAA8F;AAC9F,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAQjD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAgBxE;AAED,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAO7D;AAED;;;;;;;;;GASG;AAEH,qFAAqF;AACrF,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAwB5D;AAED,yFAAyF;AACzF,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -119,6 +119,11 @@ export function buildDescription(toolNames) {
|
|
|
119
119
|
// boundary up front, before the grouped-tool list.
|
|
120
120
|
'ONLY for the advanced tools listed below — every tool that appears ' +
|
|
121
121
|
'directly in tools/list is FIRST-CLASS: call it directly, never via this gateway. ' +
|
|
122
|
+
// CONTENT_RENDER_GATEWAYS-25: steer the read-only subset to the read
|
|
123
|
+
// gateway so pure inspection avoids a write-approval prompt.
|
|
124
|
+
'For the read-only ones (page_get_schema, pages_audit, inspect_sublayout, ' +
|
|
125
|
+
'layout_query, local_content_read, local_content_types) prefer ' +
|
|
126
|
+
'yootheme_builder_advanced_read (no write-approval gate). ' +
|
|
122
127
|
'Call { tool } for its schema, or { tool, arguments } to run it ' +
|
|
123
128
|
'(the target\'s own confirm guards stay in effect).' +
|
|
124
129
|
'\n\nAvailable advanced tools by domain:\n' +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domains.js","sourceRoot":"","sources":["../../../src/gateway/advanced-tool/domains.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,CAAU,CAAC;AAEnG;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAA6D;IACvF,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;IACjC,OAAO,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;IAC9B,aAAa,EAAE,CAAC,qBAAqB,EAAE,eAAe,CAAC;IACvD,UAAU,EAAE,CAAC,YAAY,EAAE,mBAAmB,CAAC;CAClD,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,CAAC;AAE/C,8FAA8F;AAC9F,MAAM,UAAU,QAAQ,CAAC,QAAgB;IACrC,MAAM,IAAI,GAAG,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC9F,KAAK,MAAM,MAAM,IAAI,YAAY,EAAE,CAAC;QAChC,KAAK,MAAM,MAAM,IAAI,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC;YAC7C,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,MAAM,GAAG,CAAC;gBAAE,OAAO,MAAM,CAAC;QACxE,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CA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F,wEAAwE;QACxE,wEAAwE;QACxE,mDAAmD;QACnD,qEAAqE;QACrE,mFAAmF;QACnF,qEAAqE;QACrE,6DAA6D;QAC7D,2EAA2E;QAC3E,gEAAgE;QAChE,2DAA2D;QAC3D,iEAAiE;QACjE,oDAAoD;QACpD,2CAA2C;QAC3C,GAAG,iBAAiB,CAAC,SAAS,CAAC,MAAM;QACrC,oEAAoE,CACvE,CAAC;AACN,CAAC"}
|
|
@@ -24,6 +24,12 @@ export declare function errorResult(payload: {
|
|
|
24
24
|
* Returns a structured `invalid_arguments` error on Zod-validation
|
|
25
25
|
* failure; otherwise invokes `entry.handler` with `(parsedArgs, extra)`
|
|
26
26
|
* and returns its CallToolResult verbatim.
|
|
27
|
+
*
|
|
28
|
+
* DISCOVERY_AUDIT-13: `gatewayName` names the gateway the call ARRIVED on
|
|
29
|
+
* (`yootheme_builder_advanced` for the write gateway, `…_advanced_read` for the
|
|
30
|
+
* read gateway) so the invalid_arguments suggestion points the caller back at
|
|
31
|
+
* the SAME gateway they used — not always the write one. Defaults to the write
|
|
32
|
+
* gateway for back-compat with any caller that predates the parameter.
|
|
27
33
|
*/
|
|
28
|
-
export declare function executeAdvancedTool(toolName: string, entry: AdvancedToolEntry, rawArgs: Record<string, unknown>, extra: unknown): Promise<CallToolResult>;
|
|
34
|
+
export declare function executeAdvancedTool(toolName: string, entry: AdvancedToolEntry, rawArgs: Record<string, unknown>, extra: unknown, gatewayName?: string): Promise<CallToolResult>;
|
|
29
35
|
//# sourceMappingURL=execute.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../src/gateway/advanced-tool/execute.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../src/gateway/advanced-tool/execute.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AA8ChE,qGAAqG;AACrG,wBAAgB,WAAW,CAAC,OAAO,EAAE;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC,GAAG,cAAc,CAYjB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,mBAAmB,CACrC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,KAAK,EAAE,OAAO,EACd,WAAW,GAAE,MAA6B,GAC3C,OAAO,CAAC,cAAc,CAAC,CA6BzB"}
|
|
@@ -11,6 +11,45 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
import { inputSchemaJson, shapeOf } from './discovery.js';
|
|
14
|
+
/** The write gateway's own name — the default `gatewayName` for back-compat. */
|
|
15
|
+
const DEFAULT_GATEWAY_NAME = 'yootheme_builder_advanced';
|
|
16
|
+
/**
|
|
17
|
+
* DISCOVERY_AUDIT-12 — reduce a full input JSON-schema to ONLY the top-level
|
|
18
|
+
* property subtrees the failing Zod issues actually touch.
|
|
19
|
+
*
|
|
20
|
+
* A single-token typo (e.g. `checks:['accessibility']`) used to attach the
|
|
21
|
+
* WHOLE nested `expected_schema` (measured 3737 bytes for one bad enum value).
|
|
22
|
+
* The full schema is one discovery call away ({tool} with no arguments), so the
|
|
23
|
+
* error only needs the offending subtree(s). We collect `issue.path[0]` (the
|
|
24
|
+
* top-level property each issue lives under) and pick just those properties off
|
|
25
|
+
* the full schema. Returns `null` when nothing can be narrowed (no property
|
|
26
|
+
* paths, or the schema is not the expected object shape) so the caller can fall
|
|
27
|
+
* back to the discovery pointer instead of a full dump.
|
|
28
|
+
*/
|
|
29
|
+
function offendingSchemaSubtree(fullSchema, issues) {
|
|
30
|
+
if (fullSchema === null || typeof fullSchema !== 'object' || Array.isArray(fullSchema)) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
const props = fullSchema.properties;
|
|
34
|
+
if (props === null || typeof props !== 'object' || Array.isArray(props)) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
const propMap = props;
|
|
38
|
+
const offendingKeys = new Set();
|
|
39
|
+
for (const issue of issues) {
|
|
40
|
+
const first = issue.path[0];
|
|
41
|
+
if (typeof first === 'string' && first in propMap) {
|
|
42
|
+
offendingKeys.add(first);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (offendingKeys.size === 0)
|
|
46
|
+
return null;
|
|
47
|
+
const picked = {};
|
|
48
|
+
for (const key of offendingKeys) {
|
|
49
|
+
picked[key] = propMap[key];
|
|
50
|
+
}
|
|
51
|
+
return { type: 'object', properties: picked };
|
|
52
|
+
}
|
|
14
53
|
/** Builds an error CallToolResult with structured payload (echoed into text + structuredContent). */
|
|
15
54
|
export function errorResult(payload) {
|
|
16
55
|
const body = {
|
|
@@ -31,21 +70,36 @@ export function errorResult(payload) {
|
|
|
31
70
|
* Returns a structured `invalid_arguments` error on Zod-validation
|
|
32
71
|
* failure; otherwise invokes `entry.handler` with `(parsedArgs, extra)`
|
|
33
72
|
* and returns its CallToolResult verbatim.
|
|
73
|
+
*
|
|
74
|
+
* DISCOVERY_AUDIT-13: `gatewayName` names the gateway the call ARRIVED on
|
|
75
|
+
* (`yootheme_builder_advanced` for the write gateway, `…_advanced_read` for the
|
|
76
|
+
* read gateway) so the invalid_arguments suggestion points the caller back at
|
|
77
|
+
* the SAME gateway they used — not always the write one. Defaults to the write
|
|
78
|
+
* gateway for back-compat with any caller that predates the parameter.
|
|
34
79
|
*/
|
|
35
|
-
export async function executeAdvancedTool(toolName, entry, rawArgs, extra) {
|
|
80
|
+
export async function executeAdvancedTool(toolName, entry, rawArgs, extra, gatewayName = DEFAULT_GATEWAY_NAME) {
|
|
36
81
|
// strict() surfaces unknown keys as Zod issues rather than silently
|
|
37
82
|
// dropping them, so callers can self-correct when they pass schema-
|
|
38
83
|
// extra keys.
|
|
39
84
|
const parsed = z.object(shapeOf(entry)).strict().safeParse(rawArgs);
|
|
40
85
|
if (!parsed.success) {
|
|
86
|
+
// DISCOVERY_AUDIT-12: attach ONLY the offending property subtree(s), not
|
|
87
|
+
// the whole nested schema (a single typo dumped ~3.7 KB). The full schema
|
|
88
|
+
// is one discovery call away — named in the suggestion below.
|
|
89
|
+
const offending = offendingSchemaSubtree(inputSchemaJson(entry), parsed.error.issues);
|
|
41
90
|
return errorResult({
|
|
42
91
|
message: `Invalid arguments for "${toolName}".`,
|
|
43
92
|
code: 'invalid_arguments',
|
|
44
|
-
suggestion: `Call
|
|
45
|
-
'the expected schema, then retry with corrected arguments.',
|
|
93
|
+
suggestion: `Call ${gatewayName} with { tool: "${toolName}" } to see ` +
|
|
94
|
+
'the full expected schema, then retry with corrected arguments.',
|
|
46
95
|
details: {
|
|
47
96
|
issues: parsed.error.issues,
|
|
48
|
-
|
|
97
|
+
// The narrowed subtree when we could isolate the offending
|
|
98
|
+
// properties; otherwise a pointer to the discovery call rather
|
|
99
|
+
// than the full dump.
|
|
100
|
+
...(offending !== null
|
|
101
|
+
? { offending_schema: offending }
|
|
102
|
+
: { schema_hint: `Omit \`arguments\` on ${gatewayName}({ tool: "${toolName}" }) for the full schema.` }),
|
|
49
103
|
},
|
|
50
104
|
});
|
|
51
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../src/gateway/advanced-tool/execute.ts"],"names":[],"mappings":"AAAA;;;;;;;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/dist/server.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* Routed through the CapturingServer to the real server. Appear in
|
|
15
15
|
* `tools/list` as first-class entries (Cursor-cap-safe).
|
|
16
16
|
*
|
|
17
|
-
* L2 — advanced captured (
|
|
17
|
+
* L2 — advanced captured (10 tools)
|
|
18
18
|
* Routed through the CapturingServer into its in-process advanced
|
|
19
19
|
* registry; reachable via the two `yootheme_builder_advanced*` gateway
|
|
20
20
|
* tools below. Hidden from `tools/list`.
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
* Gateways — `yootheme_builder_advanced` + `yootheme_builder_advanced_read`
|
|
23
23
|
* Registered LAST on the real server, after every L1/L2 tool is
|
|
24
24
|
* placed and the advanced registry is final. `advanced` (write-capable)
|
|
25
|
-
* routes all
|
|
25
|
+
* routes all 10 advanced tools; `advanced_read` (F200a — itself
|
|
26
26
|
* readOnly-annotated) routes only the 6 read-only advanced tools so MCP
|
|
27
27
|
* hosts can auto-allow pure inspection without a per-call write prompt.
|
|
28
28
|
* Both share the same advanced registry (read-filtered for the sibling).
|
|
29
29
|
*
|
|
30
30
|
* Result: `tools/list.length === 41` (37 L1 + 2 L3 + 2 gateways), and the full
|
|
31
|
-
* callable tool surface is
|
|
31
|
+
* callable tool surface is 51 (41 advertised + 10 advanced reachable through the
|
|
32
32
|
* gateways). The `tool-catalog-markdown` generator derives these same counts
|
|
33
33
|
* from the compiled `buildAllTools()` registry — see `scripts/extract-tools.mjs`.
|
|
34
34
|
*
|
package/dist/server.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* Routed through the CapturingServer to the real server. Appear in
|
|
15
15
|
* `tools/list` as first-class entries (Cursor-cap-safe).
|
|
16
16
|
*
|
|
17
|
-
* L2 — advanced captured (
|
|
17
|
+
* L2 — advanced captured (10 tools)
|
|
18
18
|
* Routed through the CapturingServer into its in-process advanced
|
|
19
19
|
* registry; reachable via the two `yootheme_builder_advanced*` gateway
|
|
20
20
|
* tools below. Hidden from `tools/list`.
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
* Gateways — `yootheme_builder_advanced` + `yootheme_builder_advanced_read`
|
|
23
23
|
* Registered LAST on the real server, after every L1/L2 tool is
|
|
24
24
|
* placed and the advanced registry is final. `advanced` (write-capable)
|
|
25
|
-
* routes all
|
|
25
|
+
* routes all 10 advanced tools; `advanced_read` (F200a — itself
|
|
26
26
|
* readOnly-annotated) routes only the 6 read-only advanced tools so MCP
|
|
27
27
|
* hosts can auto-allow pure inspection without a per-call write prompt.
|
|
28
28
|
* Both share the same advanced registry (read-filtered for the sibling).
|
|
29
29
|
*
|
|
30
30
|
* Result: `tools/list.length === 41` (37 L1 + 2 L3 + 2 gateways), and the full
|
|
31
|
-
* callable tool surface is
|
|
31
|
+
* callable tool surface is 51 (41 advertised + 10 advanced reachable through the
|
|
32
32
|
* gateways). The `tool-catalog-markdown` generator derives these same counts
|
|
33
33
|
* from the compiled `buildAllTools()` registry — see `scripts/extract-tools.mjs`.
|
|
34
34
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sites-list.d.ts","sourceRoot":"","sources":["../../../src/sites/tools/sites-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAIH,KAAK,iBAAiB,EACzB,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"sites-list.d.ts","sourceRoot":"","sources":["../../../src/sites/tools/sites-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAIH,KAAK,iBAAiB,EACzB,MAAM,6BAA6B,CAAC;AAsDrC;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,YAAY,GAAG,iBAAiB,CAsE5E"}
|
|
@@ -43,12 +43,31 @@ const SITES_LIST_OUTPUT_SCHEMA = z.object({
|
|
|
43
43
|
site_id: z.string(),
|
|
44
44
|
url: z.string(),
|
|
45
45
|
platform_hint: z.enum(['wordpress', 'joomla', 'auto']),
|
|
46
|
-
|
|
46
|
+
// ELEMENT_WRITE-24: platform_resolved is the platform CONFIRMED by a
|
|
47
|
+
// successful resolve — ABSENT until the site has resolved at least
|
|
48
|
+
// once (until then only platform_hint, the pre-resolve guess, exists).
|
|
49
|
+
platform_resolved: z
|
|
50
|
+
.enum(['wordpress', 'joomla'])
|
|
51
|
+
.optional()
|
|
52
|
+
.describe('Platform CONFIRMED by a successful resolve. Absent until the site ' +
|
|
53
|
+
'resolves at least once — "not yet probed", not "unknown". Before ' +
|
|
54
|
+
'that only `platform_hint` (the pre-resolve guess) is present.'),
|
|
47
55
|
is_default: z.boolean(),
|
|
48
56
|
label: z.string().optional(),
|
|
49
57
|
})),
|
|
50
58
|
total: z.number(),
|
|
51
|
-
|
|
59
|
+
// ELEMENT_WRITE-24 + SOURCES_BINDING-30: the CONFIGURED default site — the
|
|
60
|
+
// write target when a tool call OMITS site_id. Distinct from diagnose's
|
|
61
|
+
// `process_default_site_id` (the resolved active default for the running
|
|
62
|
+
// process): THIS is the statically-configured default; that is what a call
|
|
63
|
+
// actually resolved to. null when no default is configured.
|
|
64
|
+
default_site_id: z
|
|
65
|
+
.string()
|
|
66
|
+
.nullable()
|
|
67
|
+
.describe('The CONFIGURED default site — the write target used when a tool call ' +
|
|
68
|
+
'omits site_id. Distinct from diagnose\'s `process_default_site_id` ' +
|
|
69
|
+
'(the resolved active default): this is the configured default, that ' +
|
|
70
|
+
'is what a call resolved to. null when none is configured.'),
|
|
52
71
|
_meta: z
|
|
53
72
|
.object({
|
|
54
73
|
tool_kind: z.string(),
|
|
@@ -80,6 +99,7 @@ export function buildSitesListTool(registry) {
|
|
|
80
99
|
'site_ids before targeting one with any other tool. Read-only, no REST calls. ' +
|
|
81
100
|
'Keywords: list sites, list connections, list installations, discover site_id, ' +
|
|
82
101
|
'available sites, configured sites, what sites exist, multi-site index. ' +
|
|
102
|
+
'The `default_site_id` is the write target when a call omits site_id. ' +
|
|
83
103
|
'(site_id is accepted for schema-uniformity but ignored by this tool.)',
|
|
84
104
|
inputSchema: {
|
|
85
105
|
site_id: SITE_ID_SCHEMA,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sites-list.js","sourceRoot":"","sources":["../../../src/sites/tools/sites-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,WAAW,EAAoB,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EACH,UAAU,EACV,QAAQ,EACR,gBAAgB,GAEnB,MAAM,6BAA6B,CAAC;AAErC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,CAAC,CAAC,KAAK,CACV,CAAC,CAAC,MAAM,CAAC;QACL,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;QACf,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QACtD,iBAAiB,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"sites-list.js","sourceRoot":"","sources":["../../../src/sites/tools/sites-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,WAAW,EAAoB,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,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e,EAAE,aAAa;gBAC9B,KAAK,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;aACnC,CAAC,CAAC;QACP,CAAC;KACJ,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../../src/tools/elements/builders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAI7D,OAAO,EAOH,KAAK,iBAAiB,EACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAIH,KAAK,mBAAmB,EAU3B,MAAM,eAAe,CAAC;AAEvB;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAC9B,IAAI,EAAE,UAAU,EAChB,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GACpC,SAAS,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../../src/tools/elements/builders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAI7D,OAAO,EAOH,KAAK,iBAAiB,EACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAIH,KAAK,mBAAmB,EAU3B,MAAM,eAAe,CAAC;AAEvB;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAC9B,IAAI,EAAE,UAAU,EAChB,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GACpC,SAAS,iBAAiB,EAAE,CAga9B"}
|
|
@@ -34,10 +34,11 @@ export function buildElementsTools(pool, deps) {
|
|
|
34
34
|
return [
|
|
35
35
|
defineTool({
|
|
36
36
|
name: 'yootheme_builder_element_list',
|
|
37
|
-
description: 'List elements in a template as a flat array with JSON-Pointer paths + ' +
|
|
38
|
-
'
|
|
39
|
-
'`
|
|
40
|
-
'`max_chars` bounds the text output. ' +
|
|
37
|
+
description: 'List elements in a template as a flat array with JSON-Pointer paths + types + ' +
|
|
38
|
+
'`label` (the builder-assigned name; "" when unset — not that the type lacks one). ' +
|
|
39
|
+
'Scope with `root_path`/`depth` for a subtree, paginate with `limit`/`cursor` for ' +
|
|
40
|
+
'large templates. `fields[]` narrows each row; `max_chars` bounds the text output. ' +
|
|
41
|
+
'template_id only — resolve a URL/post first via pages_resolve. ' +
|
|
41
42
|
'Operates on the default site unless site_id is provided.',
|
|
42
43
|
inputSchema: {
|
|
43
44
|
site_id: SITE_ID_SCHEMA,
|
|
@@ -73,13 +74,18 @@ export function buildElementsTools(pool, deps) {
|
|
|
73
74
|
}),
|
|
74
75
|
defineTool({
|
|
75
76
|
name: 'yootheme_builder_element_get',
|
|
76
|
-
description: 'Get the full element object at a specific JSON-Pointer path, including props ' +
|
|
77
|
-
'
|
|
77
|
+
description: 'Get the full element object at a specific JSON-Pointer path, including props and a ' +
|
|
78
|
+
'`children_count` (NOT the children themselves — use yootheme_builder_element_list ' +
|
|
79
|
+
'with root_path to enumerate children). `fields[]` narrows the returned object; ' +
|
|
80
|
+
'`max_chars` bounds the text output. Address by template_id only — resolve a ' +
|
|
81
|
+
'URL/post first via pages_resolve. ' +
|
|
78
82
|
'Operates on the default site unless site_id is provided.',
|
|
79
83
|
inputSchema: {
|
|
80
84
|
site_id: SITE_ID_SCHEMA,
|
|
81
85
|
template_id: TEMPLATE_ID,
|
|
82
86
|
element_path: ELEMENT_PATH,
|
|
87
|
+
fields: FIELDS,
|
|
88
|
+
max_chars: MAX_CHARS,
|
|
83
89
|
},
|
|
84
90
|
outputSchema: ELEMENT_GET_OUTPUT_SCHEMA,
|
|
85
91
|
annotations: readOnly('Get Element'),
|
|
@@ -87,14 +93,14 @@ export function buildElementsTools(pool, deps) {
|
|
|
87
93
|
}),
|
|
88
94
|
defineTool({
|
|
89
95
|
name: 'yootheme_builder_layout_query',
|
|
90
|
-
description: 'Find elements in a template by a structured filter
|
|
91
|
-
'
|
|
92
|
-
'
|
|
93
|
-
'
|
|
94
|
-
'
|
|
95
|
-
'
|
|
96
|
-
'
|
|
97
|
-
'
|
|
96
|
+
description: 'Find elements in a template by a structured filter (no expression language). ' +
|
|
97
|
+
'AND-combine any of: `type` (one type or a list), `name_matches` (case-insensitive ' +
|
|
98
|
+
'substring of the element name), `has_binding` (bound vs unbound), `max_depth` ' +
|
|
99
|
+
'(cap descent — 0 = top-level), `under_section` (only nodes inside a named ' +
|
|
100
|
+
'section). template_id only — resolve a URL/post first via pages_resolve. Returns ' +
|
|
101
|
+
'matching rows {path, element_type, label, has_binding}; paginate with ' +
|
|
102
|
+
'`limit`/`cursor`, narrow rows with `fields[]`, bound text with `max_chars`. ' +
|
|
103
|
+
'Operates on the default site unless site_id is provided.',
|
|
98
104
|
inputSchema: {
|
|
99
105
|
site_id: SITE_ID_SCHEMA,
|
|
100
106
|
template_id: TEMPLATE_ID,
|
|
@@ -146,8 +152,11 @@ export function buildElementsTools(pool, deps) {
|
|
|
146
152
|
name: 'yootheme_builder_element_add',
|
|
147
153
|
description: 'Add a new element to a template. Provide `parent_path` (or "" for root), ' +
|
|
148
154
|
'`element_type` (e.g. "headline", "text", "grid"), and optional `props` / ' +
|
|
149
|
-
'`children`.
|
|
150
|
-
'
|
|
155
|
+
'`children`. Content/leaf elements may only be added inside a `column`; only ' +
|
|
156
|
+
'`section` is valid at the root — call yootheme_builder_scaffold_section first ' +
|
|
157
|
+
'for a valid column path. Appends by default; pass `index` (0 = first) to insert. ' +
|
|
158
|
+
'Inserting renumbers later siblings — re-read paths via element_list after any ' +
|
|
159
|
+
'structural write. Returns the new element\'s JSON-Pointer path. Requires ETag. ' +
|
|
151
160
|
'Operates on the default site unless site_id is provided.',
|
|
152
161
|
inputSchema: {
|
|
153
162
|
site_id: SITE_ID_SCHEMA,
|
|
@@ -174,11 +183,26 @@ export function buildElementsTools(pool, deps) {
|
|
|
174
183
|
.optional()
|
|
175
184
|
.describe('Alias of `element_type` — use `element_type`. Accepted so a ' +
|
|
176
185
|
'verbatim call with the wrong key still lands.'),
|
|
186
|
+
// ELEMENT_WRITE-4 (part 2): the human-visible builder name is a
|
|
187
|
+
// FIRST-CLASS arg — it is node-level metadata (OUTSIDE `props`,
|
|
188
|
+
// surfaced as element_list `label`), the primary handle a
|
|
189
|
+
// customer finds an element by. Threaded to the node's top-level
|
|
190
|
+
// `name`, never buried inside props.
|
|
191
|
+
name: z
|
|
192
|
+
.string()
|
|
193
|
+
.optional()
|
|
194
|
+
.describe('Optional human-visible builder name for the new element — the label ' +
|
|
195
|
+
'shown in the builder tree and element_list `label`. Stored as the ' +
|
|
196
|
+
'node-level `name` (OUTSIDE `props`), not a prop.'),
|
|
177
197
|
props: PROPS.optional(),
|
|
178
198
|
children: z
|
|
179
199
|
.array(z.record(z.string(), z.unknown()))
|
|
180
200
|
.optional()
|
|
181
|
-
.describe('Optional initial children — array of element objects.'
|
|
201
|
+
.describe('Optional initial children — array of element objects. Each child object ' +
|
|
202
|
+
'names its type with the `type` key (NOT `element_type`), plus optional ' +
|
|
203
|
+
'`props` and nested `children` that recurse. Inline children ARE ' +
|
|
204
|
+
'validated (reserved-key + prop-typo + live-schema guards), the same as ' +
|
|
205
|
+
'top-level props.'),
|
|
182
206
|
// F70 (2026-06-10): optional insertion index. Default (absent)
|
|
183
207
|
// appends. 0 = first child; an over-shot index is clamped to
|
|
184
208
|
// the end server-side. `position` is accepted as an alias.
|
|
@@ -212,6 +236,15 @@ export function buildElementsTools(pool, deps) {
|
|
|
212
236
|
template_id: TEMPLATE_ID,
|
|
213
237
|
element_path: ELEMENT_PATH,
|
|
214
238
|
props: PROPS,
|
|
239
|
+
// ELEMENT_WRITE-4 (part 2): rename the element via its
|
|
240
|
+
// first-class node-level `name` (OUTSIDE `props`) — the builder
|
|
241
|
+
// tree label / element_list `label`. Omit to leave it unchanged.
|
|
242
|
+
name: z
|
|
243
|
+
.string()
|
|
244
|
+
.optional()
|
|
245
|
+
.describe('Optional new human-visible builder name for the element — the ' +
|
|
246
|
+
'label in the builder tree / element_list `label`. Stored as the ' +
|
|
247
|
+
'node-level `name` (OUTSIDE `props`). Omit to leave it unchanged.'),
|
|
215
248
|
merge: z
|
|
216
249
|
.boolean()
|
|
217
250
|
.optional()
|
|
@@ -233,8 +266,9 @@ export function buildElementsTools(pool, deps) {
|
|
|
233
266
|
defineTool({
|
|
234
267
|
name: 'yootheme_builder_element_move',
|
|
235
268
|
description: 'Move an element to a new parent + index in the tree. Useful for reordering or ' +
|
|
236
|
-
'reparenting (e.g. moving a card from one grid column to another).
|
|
237
|
-
'
|
|
269
|
+
'reparenting (e.g. moving a card from one grid column to another). Moving renumbers ' +
|
|
270
|
+
'later siblings — re-read paths via element_list after any structural write. ' +
|
|
271
|
+
'Requires ETag. Operates on the default site unless site_id is provided.',
|
|
238
272
|
inputSchema: {
|
|
239
273
|
site_id: SITE_ID_SCHEMA,
|
|
240
274
|
template_id: TEMPLATE_ID,
|
|
@@ -246,7 +280,9 @@ export function buildElementsTools(pool, deps) {
|
|
|
246
280
|
.number()
|
|
247
281
|
.int()
|
|
248
282
|
.min(0)
|
|
249
|
-
.describe('Zero-based index within the destination parent
|
|
283
|
+
.describe('Zero-based index within the destination parent, applied AFTER the element ' +
|
|
284
|
+
'is removed from its current position — so a same-parent move uses ' +
|
|
285
|
+
'post-removal indexing (with 4 items, move-to-last is to_index:3, not 4).'),
|
|
250
286
|
etag: ETAG,
|
|
251
287
|
},
|
|
252
288
|
annotations: mutating('Move Element'),
|
|
@@ -255,7 +291,8 @@ export function buildElementsTools(pool, deps) {
|
|
|
255
291
|
defineTool({
|
|
256
292
|
name: 'yootheme_builder_element_clone',
|
|
257
293
|
description: 'Clone an element as a sibling (same parent, immediately after the source). ' +
|
|
258
|
-
'Returns the new element\'s path.
|
|
294
|
+
'Returns the new element\'s path. Cloning renumbers later siblings — re-read paths ' +
|
|
295
|
+
'via element_list after any structural write. Requires ETag. ' +
|
|
259
296
|
'Operates on the default site unless site_id is provided.',
|
|
260
297
|
inputSchema: {
|
|
261
298
|
site_id: SITE_ID_SCHEMA,
|
|
@@ -268,13 +305,13 @@ export function buildElementsTools(pool, deps) {
|
|
|
268
305
|
}),
|
|
269
306
|
defineTool({
|
|
270
307
|
name: 'yootheme_builder_scaffold_section',
|
|
271
|
-
description: 'Create a VALID section → row → column hull in ONE
|
|
272
|
-
'
|
|
273
|
-
'
|
|
274
|
-
'
|
|
275
|
-
'
|
|
276
|
-
'
|
|
277
|
-
'
|
|
308
|
+
description: 'Create a VALID section → row → column hull in ONE call; returns the column ' +
|
|
309
|
+
'JSON-Pointer path(s) for content. The correct way to start a layout block: only ' +
|
|
310
|
+
'`section` may sit at the layout root; a bare section accepts `row`, a bare row ' +
|
|
311
|
+
'accepts `column`; leaf/content elements are rejected anywhere except inside a ' +
|
|
312
|
+
'`column`. Pass `columns` (1-12, default 1); columns get width tokens so they ' +
|
|
313
|
+
'render side-by-side (hand-built columns default to full width), or `column_widths` ' +
|
|
314
|
+
'(one token per column) for an asymmetric row. Requires ETag. ' +
|
|
278
315
|
'Operates on the default site unless site_id is provided.',
|
|
279
316
|
inputSchema: {
|
|
280
317
|
site_id: SITE_ID_SCHEMA,
|
|
@@ -303,9 +340,10 @@ export function buildElementsTools(pool, deps) {
|
|
|
303
340
|
defineTool({
|
|
304
341
|
name: 'yootheme_builder_element_delete',
|
|
305
342
|
description: 'PERMANENTLY delete an element + children. Cannot be undone. Pass `confirm: ' +
|
|
306
|
-
'true` (boolean) AND a fresh ETag.
|
|
307
|
-
'
|
|
308
|
-
'
|
|
343
|
+
'true` (boolean) AND a fresh ETag. Deleting renumbers later siblings — re-read ' +
|
|
344
|
+
'paths via element_list after any structural write. If `preview:true` returns ' +
|
|
345
|
+
'despite confirm, check `details.received_confirm` — strings/numbers accepted, ' +
|
|
346
|
+
'but boolean is canonical. Operates on the default site unless site_id is provided.',
|
|
309
347
|
inputSchema: {
|
|
310
348
|
site_id: SITE_ID_SCHEMA,
|
|
311
349
|
template_id: TEMPLATE_ID,
|