@wootsup/yt-builder-mcp 1.2.0 → 1.4.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 +16 -12
- package/dist/catalog/build-catalog.d.ts +63 -0
- package/dist/catalog/build-catalog.d.ts.map +1 -0
- package/dist/catalog/build-catalog.js +166 -0
- package/dist/catalog/build-catalog.js.map +1 -0
- package/dist/cli/doctor-command.d.ts +21 -0
- package/dist/cli/doctor-command.d.ts.map +1 -0
- package/dist/cli/doctor-command.js +111 -0
- package/dist/cli/doctor-command.js.map +1 -0
- package/dist/cli/invocation-decision.d.ts.map +1 -1
- package/dist/cli/invocation-decision.js +2 -0
- package/dist/cli/invocation-decision.js.map +1 -1
- package/dist/client.d.ts +14 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +9 -0
- package/dist/client.js.map +1 -1
- package/dist/diagnostics/ca-trust.d.ts +16 -0
- package/dist/diagnostics/ca-trust.d.ts.map +1 -0
- package/dist/diagnostics/ca-trust.js +54 -0
- package/dist/diagnostics/ca-trust.js.map +1 -0
- package/dist/diagnostics/diagnose-network-error.d.ts +37 -0
- package/dist/diagnostics/diagnose-network-error.d.ts.map +1 -0
- package/dist/diagnostics/diagnose-network-error.js +158 -0
- package/dist/diagnostics/diagnose-network-error.js.map +1 -0
- package/dist/diagnostics/doctor.d.ts +62 -0
- package/dist/diagnostics/doctor.d.ts.map +1 -0
- package/dist/diagnostics/doctor.js +165 -0
- package/dist/diagnostics/doctor.js.map +1 -0
- package/dist/gateway/advanced-read-tool.d.ts +37 -0
- package/dist/gateway/advanced-read-tool.d.ts.map +1 -0
- package/dist/gateway/advanced-read-tool.js +156 -0
- package/dist/gateway/advanced-read-tool.js.map +1 -0
- package/dist/gateway/advanced-tool/domains.d.ts +18 -3
- package/dist/gateway/advanced-tool/domains.d.ts.map +1 -1
- package/dist/gateway/advanced-tool/domains.js +28 -9
- package/dist/gateway/advanced-tool/domains.js.map +1 -1
- package/dist/gateway/advanced-tool/register.d.ts.map +1 -1
- package/dist/gateway/advanced-tool/register.js +43 -11
- package/dist/gateway/advanced-tool/register.js.map +1 -1
- package/dist/gateway/essentials.d.ts +14 -4
- package/dist/gateway/essentials.d.ts.map +1 -1
- package/dist/gateway/essentials.js +46 -5
- package/dist/gateway/essentials.js.map +1 -1
- package/dist/gateway/test-support.d.ts +2 -2
- package/dist/gateway/test-support.js +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -1
- package/dist/install-skill.d.ts +1 -1
- package/dist/install-skill.js +2 -2
- package/dist/net/extra-headers.d.ts +66 -0
- package/dist/net/extra-headers.d.ts.map +1 -0
- package/dist/net/extra-headers.js +164 -0
- package/dist/net/extra-headers.js.map +1 -0
- package/dist/net/internal-host.d.ts +45 -0
- package/dist/net/internal-host.d.ts.map +1 -0
- package/dist/net/internal-host.js +164 -0
- package/dist/net/internal-host.js.map +1 -0
- package/dist/net/proxy-dispatcher.d.ts +40 -0
- package/dist/net/proxy-dispatcher.d.ts.map +1 -0
- package/dist/net/proxy-dispatcher.js +65 -0
- package/dist/net/proxy-dispatcher.js.map +1 -0
- package/dist/proxy/bridge.d.ts +43 -0
- package/dist/proxy/bridge.d.ts.map +1 -0
- package/dist/proxy/bridge.js +155 -0
- package/dist/proxy/bridge.js.map +1 -0
- package/dist/proxy/mode.d.ts +10 -0
- package/dist/proxy/mode.d.ts.map +1 -0
- package/dist/proxy/mode.js +20 -0
- package/dist/proxy/mode.js.map +1 -0
- package/dist/server.d.ts +5 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +13 -3
- package/dist/server.js.map +1 -1
- package/dist/setup-ca-env.d.ts +40 -0
- package/dist/setup-ca-env.d.ts.map +1 -0
- package/dist/setup-ca-env.js +58 -0
- package/dist/setup-ca-env.js.map +1 -0
- package/dist/setup-ca-reprobe.d.ts +38 -0
- package/dist/setup-ca-reprobe.d.ts.map +1 -0
- package/dist/setup-ca-reprobe.js +68 -0
- package/dist/setup-ca-reprobe.js.map +1 -0
- package/dist/setup-cli.d.ts +37 -2
- package/dist/setup-cli.d.ts.map +1 -1
- package/dist/setup-cli.js +178 -4
- package/dist/setup-cli.js.map +1 -1
- package/dist/setup-npx-spec.d.ts +44 -0
- package/dist/setup-npx-spec.d.ts.map +1 -0
- package/dist/setup-npx-spec.js +66 -0
- package/dist/setup-npx-spec.js.map +1 -0
- package/dist/setup-prompts.d.ts +14 -1
- package/dist/setup-prompts.d.ts.map +1 -1
- package/dist/setup-prompts.js +53 -1
- package/dist/setup-prompts.js.map +1 -1
- package/dist/setup-wizard-defaults.d.ts.map +1 -1
- package/dist/setup-wizard-defaults.js +29 -5
- package/dist/setup-wizard-defaults.js.map +1 -1
- package/dist/setup-wizard-handshake.d.ts +4 -4
- package/dist/setup-wizard-handshake.d.ts.map +1 -1
- package/dist/setup-wizard-handshake.js +46 -12
- package/dist/setup-wizard-handshake.js.map +1 -1
- package/dist/setup-wizard-types.d.ts +81 -0
- package/dist/setup-wizard-types.d.ts.map +1 -1
- package/dist/setup-wizard.d.ts +2 -2
- package/dist/setup-wizard.d.ts.map +1 -1
- package/dist/setup-wizard.js +140 -18
- package/dist/setup-wizard.js.map +1 -1
- package/dist/sites/client-pool.d.ts +8 -1
- package/dist/sites/client-pool.d.ts.map +1 -1
- package/dist/sites/client-pool.js +34 -4
- package/dist/sites/client-pool.js.map +1 -1
- package/dist/sites/registry.d.ts +30 -0
- package/dist/sites/registry.d.ts.map +1 -1
- package/dist/sites/registry.js.map +1 -1
- package/dist/sites/store.d.ts +8 -1
- package/dist/sites/store.d.ts.map +1 -1
- package/dist/sites/store.js +17 -2
- package/dist/sites/store.js.map +1 -1
- package/dist/sites/tools/use-site.d.ts.map +1 -1
- package/dist/sites/tools/use-site.js +26 -6
- package/dist/sites/tools/use-site.js.map +1 -1
- package/dist/tools/bind-guidance.d.ts +80 -0
- package/dist/tools/bind-guidance.d.ts.map +1 -0
- package/dist/tools/bind-guidance.js +95 -0
- package/dist/tools/bind-guidance.js.map +1 -0
- package/dist/tools/elements/builders.d.ts.map +1 -1
- package/dist/tools/elements/builders.js +63 -13
- package/dist/tools/elements/builders.js.map +1 -1
- package/dist/tools/elements/handlers-write.d.ts +19 -2
- package/dist/tools/elements/handlers-write.d.ts.map +1 -1
- package/dist/tools/elements/handlers-write.js +179 -10
- package/dist/tools/elements/handlers-write.js.map +1 -1
- package/dist/tools/elements/handlers.d.ts +8 -2
- package/dist/tools/elements/handlers.d.ts.map +1 -1
- package/dist/tools/elements/handlers.js +76 -28
- package/dist/tools/elements/handlers.js.map +1 -1
- package/dist/tools/elements/layout-hierarchy-rules.d.ts +62 -0
- package/dist/tools/elements/layout-hierarchy-rules.d.ts.map +1 -0
- package/dist/tools/elements/layout-hierarchy-rules.js +154 -0
- package/dist/tools/elements/layout-hierarchy-rules.js.map +1 -0
- package/dist/tools/format/elements-format.d.ts +35 -0
- package/dist/tools/format/elements-format.d.ts.map +1 -1
- package/dist/tools/format/elements-format.js +124 -1
- package/dist/tools/format/elements-format.js.map +1 -1
- package/dist/tools/format/health-format.d.ts +3 -0
- package/dist/tools/format/health-format.d.ts.map +1 -1
- package/dist/tools/format/health-format.js +21 -4
- package/dist/tools/format/health-format.js.map +1 -1
- package/dist/tools/format/inspection-format.d.ts +18 -0
- package/dist/tools/format/inspection-format.d.ts.map +1 -1
- package/dist/tools/format/inspection-format.js +22 -1
- package/dist/tools/format/inspection-format.js.map +1 -1
- package/dist/tools/format/pages-format.d.ts.map +1 -1
- package/dist/tools/format/pages-format.js +7 -0
- package/dist/tools/format/pages-format.js.map +1 -1
- package/dist/tools/format/sources-format.d.ts +8 -0
- package/dist/tools/format/sources-format.d.ts.map +1 -1
- package/dist/tools/format/sources-format.js +10 -0
- package/dist/tools/format/sources-format.js.map +1 -1
- package/dist/tools/health.d.ts.map +1 -1
- package/dist/tools/health.js +56 -0
- package/dist/tools/health.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/inspection.d.ts +24 -0
- package/dist/tools/inspection.d.ts.map +1 -1
- package/dist/tools/inspection.js +140 -41
- package/dist/tools/inspection.js.map +1 -1
- package/dist/tools/layout-flatten.d.ts +11 -8
- package/dist/tools/layout-flatten.d.ts.map +1 -1
- package/dist/tools/layout-flatten.js +17 -6
- package/dist/tools/layout-flatten.js.map +1 -1
- package/dist/tools/multi-items/builders.d.ts.map +1 -1
- package/dist/tools/multi-items/builders.js +11 -2
- package/dist/tools/multi-items/builders.js.map +1 -1
- package/dist/tools/multi-items/inspect-handler.d.ts +13 -0
- package/dist/tools/multi-items/inspect-handler.d.ts.map +1 -1
- package/dist/tools/multi-items/inspect-handler.js +147 -3
- package/dist/tools/multi-items/inspect-handler.js.map +1 -1
- package/dist/tools/pages/builders.d.ts.map +1 -1
- package/dist/tools/pages/builders.js +153 -39
- package/dist/tools/pages/builders.js.map +1 -1
- package/dist/tools/pages/handlers-read.d.ts +40 -5
- package/dist/tools/pages/handlers-read.d.ts.map +1 -1
- package/dist/tools/pages/handlers-read.js +404 -76
- package/dist/tools/pages/handlers-read.js.map +1 -1
- package/dist/tools/pages/handlers-write.d.ts +95 -1
- package/dist/tools/pages/handlers-write.d.ts.map +1 -1
- package/dist/tools/pages/handlers-write.js +137 -8
- package/dist/tools/pages/handlers-write.js.map +1 -1
- package/dist/tools/pages/index.d.ts +1 -1
- package/dist/tools/pages/index.d.ts.map +1 -1
- package/dist/tools/pages/index.js +1 -1
- package/dist/tools/pages/index.js.map +1 -1
- package/dist/tools/pages/schemas.d.ts +74 -5
- package/dist/tools/pages/schemas.d.ts.map +1 -1
- package/dist/tools/pages/schemas.js +243 -8
- package/dist/tools/pages/schemas.js.map +1 -1
- package/dist/tools/shared-schemas.d.ts +3 -0
- package/dist/tools/shared-schemas.d.ts.map +1 -1
- package/dist/tools/shared-schemas.js +43 -13
- 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 +93 -10
- package/dist/tools/sources/builders.js.map +1 -1
- package/dist/tools/sources/handlers-bind.d.ts +13 -1
- package/dist/tools/sources/handlers-bind.d.ts.map +1 -1
- package/dist/tools/sources/handlers-bind.js +163 -1
- package/dist/tools/sources/handlers-bind.js.map +1 -1
- package/dist/tools/sources/handlers.d.ts +12 -1
- package/dist/tools/sources/handlers.d.ts.map +1 -1
- package/dist/tools/sources/handlers.js +103 -16
- package/dist/tools/sources/handlers.js.map +1 -1
- package/dist/tools/sparse-fields.d.ts +73 -0
- package/dist/tools/sparse-fields.d.ts.map +1 -1
- package/dist/tools/sparse-fields.js +136 -0
- package/dist/tools/sparse-fields.js.map +1 -1
- package/dist/tools/sublayout/builders.d.ts +23 -0
- package/dist/tools/sublayout/builders.d.ts.map +1 -0
- package/dist/tools/sublayout/builders.js +54 -0
- package/dist/tools/sublayout/builders.js.map +1 -0
- package/dist/tools/sublayout/index.d.ts +13 -0
- package/dist/tools/sublayout/index.d.ts.map +1 -0
- package/dist/tools/sublayout/index.js +13 -0
- package/dist/tools/sublayout/index.js.map +1 -0
- package/dist/tools/sublayout/inspect-sublayout-handler.d.ts +95 -0
- package/dist/tools/sublayout/inspect-sublayout-handler.d.ts.map +1 -0
- package/dist/tools/sublayout/inspect-sublayout-handler.js +181 -0
- package/dist/tools/sublayout/inspect-sublayout-handler.js.map +1 -0
- package/dist/tools/tool-builder/results.d.ts +31 -0
- package/dist/tools/tool-builder/results.d.ts.map +1 -1
- package/dist/tools/tool-builder/results.js +95 -4
- package/dist/tools/tool-builder/results.js.map +1 -1
- package/dist/update/update-check.d.ts +56 -0
- package/dist/update/update-check.d.ts.map +1 -0
- package/dist/update/update-check.js +155 -0
- package/dist/update/update-check.js.map +1 -0
- package/manifest.json +1 -1
- package/package.json +5 -2
- package/skills/yt-builder-mcp/SKILL.md +148 -82
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `yootheme_builder_advanced_read` — a READ-ONLY sibling of the
|
|
3
|
+
* `yootheme_builder_advanced` gateway (F200a, 2026-06-12).
|
|
4
|
+
*
|
|
5
|
+
* The Desktop-E2E #2 forensic showed approval-gates firing on EVERY advanced
|
|
6
|
+
* call. Root cause: the single `yootheme_builder_advanced` gateway is annotated
|
|
7
|
+
* `readOnlyHint:false` + `destructiveHint:true` (correctly — it can route into
|
|
8
|
+
* delete / unbind handlers), so spec-compliant MCP hosts gate it
|
|
9
|
+
* conservatively. The read-only L2 subtools (page_get_schema,
|
|
10
|
+
* element_get_binding, inspect_sublayout) inherited that gate even though they
|
|
11
|
+
* mutate nothing — a per-call approval tax on pure inspection.
|
|
12
|
+
*
|
|
13
|
+
* This second gateway WHITELISTS only read-only advanced entries (annotation
|
|
14
|
+
* `readOnlyHint:true`) and is itself annotated `readOnly()`, so hosts can
|
|
15
|
+
* auto-allow it. Writing subtools (unbind, clean-implode) stay reachable ONLY
|
|
16
|
+
* through the existing (gated) `yootheme_builder_advanced` — defense-in-depth:
|
|
17
|
+
* the read gateway physically cannot route to them (they are not in its
|
|
18
|
+
* registry view).
|
|
19
|
+
*
|
|
20
|
+
* Two modes mirror the write gateway:
|
|
21
|
+
* { tool } → discovery (target schema + annotations; no invoke).
|
|
22
|
+
* { tool, arguments } → execution (strict-validated, then handler called).
|
|
23
|
+
*
|
|
24
|
+
* @license MIT
|
|
25
|
+
*/
|
|
26
|
+
import { z } from 'zod';
|
|
27
|
+
import { readOnly } from '../tools/tool-builder.js';
|
|
28
|
+
import { isEssential, isDirectTopLevel } from './essentials.js';
|
|
29
|
+
import { discoveryResult } from './advanced-tool/discovery.js';
|
|
30
|
+
import { renderGroupedList } from './advanced-tool/domains.js';
|
|
31
|
+
import { errorResult, executeAdvancedTool } from './advanced-tool/execute.js';
|
|
32
|
+
/** The pinned name — never rename (host configs + skill docs reference it). */
|
|
33
|
+
export const ADVANCED_READ_TOOL_NAME = 'yootheme_builder_advanced_read';
|
|
34
|
+
/**
|
|
35
|
+
* True iff a captured advanced entry advertises `readOnlyHint:true`. The
|
|
36
|
+
* single source of truth for "is this subtool safe to auto-allow" — the same
|
|
37
|
+
* annotation the host reads. No name allowlist to drift: adding a new
|
|
38
|
+
* read-only advanced tool surfaces here automatically.
|
|
39
|
+
*/
|
|
40
|
+
function isReadOnlyEntry(entry) {
|
|
41
|
+
const annotations = entry.config.annotations;
|
|
42
|
+
return annotations?.readOnlyHint === true;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Builds the read-gateway's input schema.
|
|
46
|
+
*
|
|
47
|
+
* F205 (P2): `tool` is a free z.string(), NOT a z.enum — same trap as the write
|
|
48
|
+
* gateway. The MCP SDK validates the inputSchema before the handler runs; an
|
|
49
|
+
* enum rejected first-class names with a raw McpError -32602 so the handler's
|
|
50
|
+
* not_read_only / first_class_tool / unknown steering never ran. A plain string
|
|
51
|
+
* lets every name reach the handler.
|
|
52
|
+
*/
|
|
53
|
+
function readGatewayInputSchema() {
|
|
54
|
+
return {
|
|
55
|
+
tool: z.string().describe('Read-only advanced tool to route to (e.g. "yootheme_builder_page_get_schema"). ' +
|
|
56
|
+
'Must be one of the read-only advanced tools listed in this description. ' +
|
|
57
|
+
'First-class tools (yootheme_builder_health, ...) are called DIRECTLY; ' +
|
|
58
|
+
'writing tools use yootheme_builder_advanced. ' +
|
|
59
|
+
'Omit `arguments` to discover its schema first.'),
|
|
60
|
+
arguments: z.record(z.string(), z.unknown()).optional().describe('Arguments for the target tool. Omit for discovery mode ' +
|
|
61
|
+
"(returns the tool's schema + annotations)."),
|
|
62
|
+
// `input` is a tolerated alias for `arguments` (same back-compat carve
|
|
63
|
+
// the write gateway makes — see register.ts F107).
|
|
64
|
+
input: z.record(z.string(), z.unknown()).optional().describe('Alias for `arguments` (tolerated for back-compat). Prefer `arguments`.'),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/** Builds the read-gateway's description, listing only the whitelisted read-only tools. */
|
|
68
|
+
function buildReadDescription(readOnlyNames) {
|
|
69
|
+
const count = readOnlyNames.length;
|
|
70
|
+
return (`Routes to ${String(count)} READ-ONLY advanced YOOtheme Builder tool` +
|
|
71
|
+
`${count === 1 ? '' : 's'}. ` +
|
|
72
|
+
// F214: stop the model habitually routing first-class tools through the
|
|
73
|
+
// gateway (a wasted invalid_arguments cycle each time). State the scope
|
|
74
|
+
// boundary up front, before the grouped-tool list.
|
|
75
|
+
'ONLY for the read-only advanced tools listed below — every tool that ' +
|
|
76
|
+
'appears directly in tools/list is FIRST-CLASS: call it directly, never via this gateway. ' +
|
|
77
|
+
'Itself read-only (no write-approval gate) — prefer it over ' +
|
|
78
|
+
'yootheme_builder_advanced for inspection. Call { tool } for its ' +
|
|
79
|
+
'schema, or { tool, arguments } to run it.' +
|
|
80
|
+
'\n\nAvailable read-only advanced tools by domain:\n' +
|
|
81
|
+
`${renderGroupedList(readOnlyNames)}\n\n` +
|
|
82
|
+
'Writing tools (unbind, clean-implode): use yootheme_builder_advanced. ' +
|
|
83
|
+
'Connectivity: yootheme_builder_health / yootheme_builder_diagnose.');
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Registers `yootheme_builder_advanced_read` on the real McpServer.
|
|
87
|
+
*
|
|
88
|
+
* @param realServer the McpServer that exposes the read gateway tool
|
|
89
|
+
* @param advancedRegistry the captured non-essential tools (from CapturingServer)
|
|
90
|
+
*/
|
|
91
|
+
export function registerAdvancedReadTool(realServer, advancedRegistry) {
|
|
92
|
+
// Build the read-only view of the registry — the gateway literally cannot
|
|
93
|
+
// see (let alone route to) writing tools.
|
|
94
|
+
const readOnlyRegistry = new Map();
|
|
95
|
+
for (const [name, entry] of advancedRegistry) {
|
|
96
|
+
if (isReadOnlyEntry(entry)) {
|
|
97
|
+
readOnlyRegistry.set(name, entry);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const readOnlyNames = [...readOnlyRegistry.keys()].sort();
|
|
101
|
+
realServer.registerTool(ADVANCED_READ_TOOL_NAME, {
|
|
102
|
+
title: 'Advanced Read-Only Gateway',
|
|
103
|
+
description: buildReadDescription(readOnlyNames),
|
|
104
|
+
inputSchema: readGatewayInputSchema(),
|
|
105
|
+
// F200a: read-only annotation so hosts auto-allow. Unlike the write
|
|
106
|
+
// gateway, this one can never reach a mutating handler.
|
|
107
|
+
annotations: readOnly('Advanced Read-Only Gateway'),
|
|
108
|
+
}, async (args, extra) => {
|
|
109
|
+
const entry = readOnlyRegistry.get(args.tool);
|
|
110
|
+
if (!entry) {
|
|
111
|
+
// F205: a WRITE subtool name that exists in the FULL advanced
|
|
112
|
+
// registry but not the read whitelist gets a targeted steer to
|
|
113
|
+
// the write gateway. This branch MUST stay ahead of the
|
|
114
|
+
// first_class_tool check (an advanced write subtool is not a
|
|
115
|
+
// first-class tool).
|
|
116
|
+
if (advancedRegistry.has(args.tool)) {
|
|
117
|
+
return errorResult({
|
|
118
|
+
message: `"${args.tool}" is not a read-only tool — it mutates state and is not ` +
|
|
119
|
+
'reachable through yootheme_builder_advanced_read.',
|
|
120
|
+
code: 'not_read_only',
|
|
121
|
+
suggestion: `Call it through the full gateway instead: ` +
|
|
122
|
+
`yootheme_builder_advanced({ tool: "${args.tool}", arguments: {...} }).`,
|
|
123
|
+
details: { tool: args.tool },
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
// F205: a first-class tool (L1 essential or L3 direct
|
|
127
|
+
// top-level) is steered to a direct call rather than treated
|
|
128
|
+
// as a typo.
|
|
129
|
+
if (isEssential(args.tool) || isDirectTopLevel(args.tool)) {
|
|
130
|
+
return errorResult({
|
|
131
|
+
message: `"${args.tool}" is a FIRST-CLASS tool — it appears directly in tools/list.`,
|
|
132
|
+
code: 'first_class_tool',
|
|
133
|
+
suggestion: `Call "${args.tool}" directly instead of routing it through ` +
|
|
134
|
+
'yootheme_builder_advanced_read. This gateway only routes the read-only ' +
|
|
135
|
+
'advanced tools listed in its description.',
|
|
136
|
+
details: { tool: args.tool },
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
return errorResult({
|
|
140
|
+
message: `Unknown read-only advanced tool: "${args.tool}".`,
|
|
141
|
+
code: 'unknown_read_tool',
|
|
142
|
+
suggestion: 'This gateway routes ONLY read-only advanced tools. If you meant a ' +
|
|
143
|
+
'WRITING tool (unbind, clean-implode), use yootheme_builder_advanced ' +
|
|
144
|
+
'instead. Otherwise pick one of the valid read-only tools below.\n\n' +
|
|
145
|
+
`Valid read-only advanced tools by domain:\n${renderGroupedList(readOnlyNames)}`,
|
|
146
|
+
details: { valid_read_tools_by_domain: renderGroupedList(readOnlyNames) },
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
// `arguments` is canonical; `input` is a tolerated alias (F107).
|
|
150
|
+
const callArgs = args.arguments ?? args.input;
|
|
151
|
+
if (callArgs === undefined)
|
|
152
|
+
return discoveryResult(args.tool, entry);
|
|
153
|
+
return executeAdvancedTool(args.tool, entry, callArgs, extra);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=advanced-read-tool.js.map
|
|
@@ -0,0 +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;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,CAAC;YACP,CAAC;YACD,sDAAsD;YACtD,6DAA6D;YAC7D,aAAa;YACb,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBACxD,OAAO,WAAW,CAAC;oBACf,OAAO,EAAE,IAAI,IAAI,CAAC,IAAI,8DAA8D;oBACpF,IAAI,EAAE,kBAAkB;oBACxB,UAAU,EACN,SAAS,IAAI,CAAC,IAAI,2CAA2C;wBAC7D,yEAAyE;wBACzE,2CAA2C;oBAC/C,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE;iBAC/B,CAAC,CAAC;YACP,CAAC;YACD,OAAO,WAAW,CAAC;gBACf,OAAO,EAAE,qCAAqC,IAAI,CAAC,IAAI,IAAI;gBAC3D,IAAI,EAAE,mBAAmB;gBACzB,UAAU,EACN,oEAAoE;oBACpE,sEAAsE;oBACtE,qEAAqE;oBACrE,8CAA8C,iBAAiB,CAAC,aAAa,CAAC,EAAE;gBACpF,OAAO,EAAE,EAAE,0BAA0B,EAAE,iBAAiB,CAAC,aAAa,CAAC,EAAE;aAC5E,CAAC,CAAC;QACP,CAAC;QACD,iEAAiE;QACjE,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC;QAC9C,IAAI,QAAQ,KAAK,SAAS;YAAE,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACrE,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IAClE,CAAC,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -23,14 +23,19 @@ import type { AdvancedToolEntry } from '../capturing-server.js';
|
|
|
23
23
|
export declare const DOMAIN_ORDER: readonly ["pages", "elements", "sources", "multi-items", "inspection"];
|
|
24
24
|
/**
|
|
25
25
|
* Prefix→domain routing table. Each domain accepts plural
|
|
26
|
-
* (`pages_list`) + singular (`
|
|
27
|
-
* stems via `stem.startsWith(prefix + '_')` or full-equality.
|
|
28
|
-
* outside the taxonomy falls through to 'misc'.
|
|
26
|
+
* (`pages_list`) + singular (`page_get_schema`, `element_unbind_source`,
|
|
27
|
+
* `source_…`) stems via `stem.startsWith(prefix + '_')` or full-equality.
|
|
28
|
+
* Anything outside the taxonomy falls through to 'misc'.
|
|
29
29
|
*
|
|
30
30
|
* The `multi-items` domain captures the YT-Pro Multi-Items binding
|
|
31
31
|
* pattern tools (inspect / clean-implode). Stems used:
|
|
32
32
|
* - `inspect_multi_items_binding` → starts with `inspect_multi_items`
|
|
33
33
|
* - `clean_implode_directives` → starts with `clean_implode`
|
|
34
|
+
*
|
|
35
|
+
* The `inspection` domain captures layout inspectors that surface a
|
|
36
|
+
* YT-Pro footgun the raw layout tree hides. Stems used:
|
|
37
|
+
* - `inspect_sublayout` (F154) → full-equality `inspect_sublayout`
|
|
38
|
+
* (the YT5 `< SUBLAYOUT` fragment-subtree + inner-grid-gate inspector).
|
|
34
39
|
*/
|
|
35
40
|
export declare const DOMAIN_PREFIX_MAP: Record<(typeof DOMAIN_ORDER)[number], readonly string[]>;
|
|
36
41
|
export declare const TOOL_PREFIX = "yootheme_builder_";
|
|
@@ -40,6 +45,16 @@ export declare function domainOf(toolName: string): string;
|
|
|
40
45
|
export declare function groupByDomain(toolNames: string[]): Map<string, string[]>;
|
|
41
46
|
/** Renders the grouped tool list as readable text (used in description + errors). */
|
|
42
47
|
export declare function renderGroupedList(toolNames: string[]): string;
|
|
48
|
+
/**
|
|
49
|
+
* F176 (2026-06-12): the former "★ Bind a source" callout was removed. The
|
|
50
|
+
* bind tool (`yootheme_builder_element_bind_source`) plus `page_save` /
|
|
51
|
+
* `page_publish` were promoted to L1 by F116 and live in `tools/list` as
|
|
52
|
+
* first-class entries; the DISJOINT-LANE invariant guarantees they are NEVER
|
|
53
|
+
* in the advanced registry, so the gateway description must not advertise a
|
|
54
|
+
* gateway wrap for them (it would steer agents into an `unknown_tool` dead
|
|
55
|
+
* end on a current build). The binding workflow is now discoverable directly
|
|
56
|
+
* in `tools/list`.
|
|
57
|
+
*/
|
|
43
58
|
/** Builds the gateway tool's description, grouping every advanced tool by domain. */
|
|
44
59
|
export declare function buildDescription(toolNames: string[]): string;
|
|
45
60
|
/** Re-export the AdvancedToolEntry type so consumers don't need a second import path. */
|
|
@@ -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
|
|
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,uEAAuE;AACvE,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAYxE;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,CAmB5D;AAED,yFAAyF;AACzF,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -22,21 +22,26 @@
|
|
|
22
22
|
export const DOMAIN_ORDER = ['pages', 'elements', 'sources', 'multi-items', 'inspection'];
|
|
23
23
|
/**
|
|
24
24
|
* Prefix→domain routing table. Each domain accepts plural
|
|
25
|
-
* (`pages_list`) + singular (`
|
|
26
|
-
* stems via `stem.startsWith(prefix + '_')` or full-equality.
|
|
27
|
-
* outside the taxonomy falls through to 'misc'.
|
|
25
|
+
* (`pages_list`) + singular (`page_get_schema`, `element_unbind_source`,
|
|
26
|
+
* `source_…`) stems via `stem.startsWith(prefix + '_')` or full-equality.
|
|
27
|
+
* Anything outside the taxonomy falls through to 'misc'.
|
|
28
28
|
*
|
|
29
29
|
* The `multi-items` domain captures the YT-Pro Multi-Items binding
|
|
30
30
|
* pattern tools (inspect / clean-implode). Stems used:
|
|
31
31
|
* - `inspect_multi_items_binding` → starts with `inspect_multi_items`
|
|
32
32
|
* - `clean_implode_directives` → starts with `clean_implode`
|
|
33
|
+
*
|
|
34
|
+
* The `inspection` domain captures layout inspectors that surface a
|
|
35
|
+
* YT-Pro footgun the raw layout tree hides. Stems used:
|
|
36
|
+
* - `inspect_sublayout` (F154) → full-equality `inspect_sublayout`
|
|
37
|
+
* (the YT5 `< SUBLAYOUT` fragment-subtree + inner-grid-gate inspector).
|
|
33
38
|
*/
|
|
34
39
|
export const DOMAIN_PREFIX_MAP = {
|
|
35
40
|
pages: ['pages', 'page'],
|
|
36
41
|
elements: ['elements', 'element'],
|
|
37
42
|
sources: ['sources', 'source'],
|
|
38
43
|
'multi-items': ['inspect_multi_items', 'clean_implode'],
|
|
39
|
-
inspection: ['inspection'],
|
|
44
|
+
inspection: ['inspection', 'inspect_sublayout'],
|
|
40
45
|
};
|
|
41
46
|
export const TOOL_PREFIX = 'yootheme_builder_';
|
|
42
47
|
/** Maps a tool name to its display domain (the first underscore-segment after the prefix). */
|
|
@@ -76,6 +81,16 @@ export function renderGroupedList(toolNames) {
|
|
|
76
81
|
}
|
|
77
82
|
return lines.join('\n');
|
|
78
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* F176 (2026-06-12): the former "★ Bind a source" callout was removed. The
|
|
86
|
+
* bind tool (`yootheme_builder_element_bind_source`) plus `page_save` /
|
|
87
|
+
* `page_publish` were promoted to L1 by F116 and live in `tools/list` as
|
|
88
|
+
* first-class entries; the DISJOINT-LANE invariant guarantees they are NEVER
|
|
89
|
+
* in the advanced registry, so the gateway description must not advertise a
|
|
90
|
+
* gateway wrap for them (it would steer agents into an `unknown_tool` dead
|
|
91
|
+
* end on a current build). The binding workflow is now discoverable directly
|
|
92
|
+
* in `tools/list`.
|
|
93
|
+
*/
|
|
79
94
|
/** Builds the gateway tool's description, grouping every advanced tool by domain. */
|
|
80
95
|
export function buildDescription(toolNames) {
|
|
81
96
|
const toolCount = toolNames.length;
|
|
@@ -84,11 +99,15 @@ export function buildDescription(toolNames) {
|
|
|
84
99
|
const domainList = domains.join(', ');
|
|
85
100
|
return (`Routes to ${String(toolCount)} advanced YOOtheme Builder tools across ${String(domainCount)} ` +
|
|
86
101
|
`domain${domainCount === 1 ? '' : 's'}${domainCount > 0 ? ` (${domainList})` : ''}. ` +
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
'
|
|
102
|
+
// F214: stop the model habitually routing first-class tools through the
|
|
103
|
+
// gateway (a wasted invalid_arguments cycle each time). State the scope
|
|
104
|
+
// boundary up front, before the grouped-tool list.
|
|
105
|
+
'ONLY for the advanced tools listed below — every tool that appears ' +
|
|
106
|
+
'directly in tools/list is FIRST-CLASS: call it directly, never via this gateway. ' +
|
|
107
|
+
'Call { tool } for its schema, or { tool, arguments } to run it ' +
|
|
108
|
+
'(the target\'s own confirm guards stay in effect).' +
|
|
109
|
+
'\n\nAvailable advanced tools by domain:\n' +
|
|
91
110
|
`${renderGroupedList(toolNames)}\n\n` +
|
|
92
|
-
'
|
|
111
|
+
'Connectivity: yootheme_builder_health / yootheme_builder_diagnose.');
|
|
93
112
|
}
|
|
94
113
|
//# sourceMappingURL=domains.js.map
|
|
@@ -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
|
|
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,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;
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/gateway/advanced-tool/register.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AA0ChE;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAChC,UAAU,EAAE,SAAS,EACrB,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,GACjD,IAAI,CAyDN"}
|
|
@@ -7,16 +7,37 @@
|
|
|
7
7
|
* @license MIT
|
|
8
8
|
*/
|
|
9
9
|
import { z } from 'zod';
|
|
10
|
+
import { isEssential, isDirectTopLevel } from '../essentials.js';
|
|
10
11
|
import { buildDescription, renderGroupedList } from './domains.js';
|
|
11
12
|
import { discoveryResult } from './discovery.js';
|
|
12
13
|
import { errorResult, executeAdvancedTool } from './execute.js';
|
|
13
|
-
/**
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Builds the gateway tool's Zod inputSchema.
|
|
16
|
+
*
|
|
17
|
+
* F205 (P2): `tool` is a free z.string(), NOT a z.enum of the advanced names.
|
|
18
|
+
* The MCP SDK validates the gateway inputSchema BEFORE our handler runs; an
|
|
19
|
+
* enum rejected every first-class tool name (yootheme_builder_health,
|
|
20
|
+
* yootheme_builder_template_summary, ...) with a raw McpError -32602, so the
|
|
21
|
+
* handler's unknown_tool / first_class_tool steering never ran. A plain string
|
|
22
|
+
* lets every name reach the handler. renderGroupedList in the description stays
|
|
23
|
+
* the load-bearing discovery surface.
|
|
24
|
+
*/
|
|
25
|
+
function gatewayInputSchema() {
|
|
15
26
|
return {
|
|
16
|
-
tool: z.
|
|
27
|
+
tool: z.string().describe('Advanced tool to route to (e.g. "yootheme_builder_page_get_schema"). ' +
|
|
28
|
+
'Must be one of the advanced tools listed in this description — ' +
|
|
29
|
+
'first-class tools (yootheme_builder_health, ...) are called ' +
|
|
30
|
+
'DIRECTLY, not through this gateway. ' +
|
|
17
31
|
'Omit `arguments` to discover its schema first.'),
|
|
18
32
|
arguments: z.record(z.string(), z.unknown()).optional().describe('Arguments for the target tool. Omit for discovery mode ' +
|
|
19
33
|
"(returns the tool's schema + annotations)."),
|
|
34
|
+
// `input` is a tolerated ALIAS for `arguments`. Some agents (and older
|
|
35
|
+
// skill docs) pass the target arguments under `input:`. Without this the
|
|
36
|
+
// key would be dropped by the SDK's zod validation, leaving `arguments`
|
|
37
|
+
// undefined → the gateway silently fell into discovery mode and never
|
|
38
|
+
// executed the write (F107). Accepting it keeps verbatim callers working;
|
|
39
|
+
// `arguments` still wins when both are present.
|
|
40
|
+
input: z.record(z.string(), z.unknown()).optional().describe('Alias for `arguments` (tolerated for back-compat). Prefer `arguments`.'),
|
|
20
41
|
};
|
|
21
42
|
}
|
|
22
43
|
/**
|
|
@@ -27,15 +48,10 @@ function gatewayInputSchema(enumValues) {
|
|
|
27
48
|
*/
|
|
28
49
|
export function registerAdvancedTool(realServer, advancedRegistry) {
|
|
29
50
|
const advancedNames = [...advancedRegistry.keys()].sort();
|
|
30
|
-
// z.enum needs a non-empty tuple. The empty-registry arm is exercised
|
|
31
|
-
// only by defensive test wiring; production always populates the
|
|
32
|
-
// registry. Keeping the guard means a zero-tool wiring still yields a
|
|
33
|
-
// valid (if inert) gateway schema rather than a z.enum crash.
|
|
34
|
-
const enumValues = advancedNames.length > 0 ? advancedNames : ['__none__'];
|
|
35
51
|
realServer.registerTool('yootheme_builder_advanced', {
|
|
36
52
|
title: 'Advanced Tool Gateway',
|
|
37
53
|
description: buildDescription(advancedNames),
|
|
38
|
-
inputSchema: gatewayInputSchema(
|
|
54
|
+
inputSchema: gatewayInputSchema(),
|
|
39
55
|
// Stream D3 T3: gateway is the only L1 tool that retains
|
|
40
56
|
// `openWorldHint:true` — its effective behaviour is
|
|
41
57
|
// dynamic (target tool decided at call-time). Conservative
|
|
@@ -52,6 +68,20 @@ export function registerAdvancedTool(realServer, advancedRegistry) {
|
|
|
52
68
|
}, async (args, extra) => {
|
|
53
69
|
const entry = advancedRegistry.get(args.tool);
|
|
54
70
|
if (!entry) {
|
|
71
|
+
// F205: a name that is a first-class tool (L1 essential or L3
|
|
72
|
+
// direct top-level) is a different error than a typo — steer the
|
|
73
|
+
// caller to call it DIRECTLY instead of routing it through the
|
|
74
|
+
// gateway.
|
|
75
|
+
if (isEssential(args.tool) || isDirectTopLevel(args.tool)) {
|
|
76
|
+
return errorResult({
|
|
77
|
+
message: `"${args.tool}" is a FIRST-CLASS tool — it appears directly in tools/list.`,
|
|
78
|
+
code: 'first_class_tool',
|
|
79
|
+
suggestion: `Call "${args.tool}" directly instead of routing it through ` +
|
|
80
|
+
'yootheme_builder_advanced. This gateway only routes the advanced ' +
|
|
81
|
+
'tools listed in its description.',
|
|
82
|
+
details: { tool: args.tool },
|
|
83
|
+
});
|
|
84
|
+
}
|
|
55
85
|
return errorResult({
|
|
56
86
|
message: `Unknown advanced tool: "${args.tool}".`,
|
|
57
87
|
code: 'unknown_tool',
|
|
@@ -61,9 +91,11 @@ export function registerAdvancedTool(realServer, advancedRegistry) {
|
|
|
61
91
|
details: { valid_tools_by_domain: renderGroupedList(advancedNames) },
|
|
62
92
|
});
|
|
63
93
|
}
|
|
64
|
-
|
|
94
|
+
// `arguments` is canonical; `input` is a tolerated alias (F107).
|
|
95
|
+
const callArgs = args.arguments ?? args.input;
|
|
96
|
+
if (callArgs === undefined)
|
|
65
97
|
return discoveryResult(args.tool, entry);
|
|
66
|
-
return executeAdvancedTool(args.tool, entry,
|
|
98
|
+
return executeAdvancedTool(args.tool, entry, callArgs, extra);
|
|
67
99
|
});
|
|
68
100
|
}
|
|
69
101
|
//# sourceMappingURL=register.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/gateway/advanced-tool/register.ts"],"names":[],"mappings":"AAAA;;;;;;;GA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AA2B,IAAI,CAAC,IAAI,IAAI;gBACjD,IAAI,EAAE,cAAc;gBACpB,UAAU,EACN,2DAA2D;oBAC3D,qDAAqD;oBACrD,oCAAoC,iBAAiB,CAAC,aAAa,CAAC,EAAE;gBAC1E,OAAO,EAAE,EAAE,qBAAqB,EAAE,iBAAiB,CAAC,aAAa,CAAC,EAAE;aACvE,CAAC,CAAC;QACP,CAAC;QACD,iEAAiE;QACjE,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC;QAC9C,IAAI,QAAQ,KAAK,SAAS;YAAE,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACrE,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IAClE,CAAC,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -16,11 +16,21 @@
|
|
|
16
16
|
* SDK never sees a duplicate registration.
|
|
17
17
|
*
|
|
18
18
|
* Why this split: Cursor caps MCP servers at ~40 tools. This adapter
|
|
19
|
-
* declares
|
|
20
|
-
* The 3-lane shape keeps `tools/list` at
|
|
21
|
-
*
|
|
19
|
+
* declares 31 callable tools (26 domain L1/L3 + 4 advanced L2 + 1 gateway).
|
|
20
|
+
* The 3-lane shape keeps `tools/list` at 24 (L1) + 2 (L3) + 1 (gateway) =
|
|
21
|
+
* 27 entries, well under the cap, while every tool stays fully reachable
|
|
22
22
|
* (advanced tools through `yootheme_builder_advanced`).
|
|
23
23
|
*
|
|
24
|
+
* F116 (2026-06-11): the bind→save→publish chain (element_bind_source,
|
|
25
|
+
* page_save, page_publish) was promoted from the advanced lane to L1. It is
|
|
26
|
+
* the #1 dynamic-content workflow; hiding it behind the gateway made an agent
|
|
27
|
+
* listing tools see element_add but neither bind nor publish — a likely
|
|
28
|
+
* "can't publish" deadend. L1 20→23, advanced 7→4.
|
|
29
|
+
*
|
|
30
|
+
* P-G (Goldstandard wave 3): page_dynamize was added as a new registered tool
|
|
31
|
+
* and promoted to L1 (the one-call dynamize-existing-section path). With the
|
|
32
|
+
* F116 trio it brings L1 to 24, advanced stays 4, surface to 27.
|
|
33
|
+
*
|
|
24
34
|
* Health + diagnose live in L3 because they MUST be the first thing an
|
|
25
35
|
* LLM-host calls when something is broken; routing them through a gateway
|
|
26
36
|
* would create a chicken-and-egg loop (the LLM would have to discover
|
|
@@ -32,7 +42,7 @@
|
|
|
32
42
|
* L1 — Tools kept as first-class entries in `tools/list`.
|
|
33
43
|
* Forwarded by the CapturingServer to the real McpServer.
|
|
34
44
|
*/
|
|
35
|
-
export declare const ESSENTIAL_TOOLS: readonly ["yootheme_builder_pages_list", "yootheme_builder_get_etag", "yootheme_builder_element_list", "yootheme_builder_element_add", "yootheme_builder_element_update_settings", "yootheme_builder_sources_list", "yootheme_builder_element_types_list", "yootheme_builder_inspect_multi_items_binding", "yootheme_builder_element_get", "yootheme_builder_element_delete", "yootheme_builder_element_clone", "yootheme_builder_element_move", "yootheme_builder_page_get_layout", "yootheme_builder_template_summary", "yootheme_builder_element_type_get_schema", "yootheme_builder_sites_list", "yootheme_builder_sites_test", "yootheme_builder_use_site", "yootheme_builder_pages_create", "yootheme_builder_pages_delete"];
|
|
45
|
+
export declare const ESSENTIAL_TOOLS: readonly ["yootheme_builder_pages_list", "yootheme_builder_pages_resolve", "yootheme_builder_get_etag", "yootheme_builder_element_list", "yootheme_builder_element_add", "yootheme_builder_element_update_settings", "yootheme_builder_sources_list", "yootheme_builder_element_types_list", "yootheme_builder_inspect_multi_items_binding", "yootheme_builder_element_get", "yootheme_builder_element_delete", "yootheme_builder_element_clone", "yootheme_builder_element_move", "yootheme_builder_page_get_layout", "yootheme_builder_template_summary", "yootheme_builder_element_type_get_schema", "yootheme_builder_sites_list", "yootheme_builder_sites_test", "yootheme_builder_use_site", "yootheme_builder_pages_create", "yootheme_builder_pages_delete", "yootheme_builder_element_bind_source", "yootheme_builder_page_save", "yootheme_builder_page_publish", "yootheme_builder_page_dynamize", "yootheme_builder_scaffold_section"];
|
|
36
46
|
/**
|
|
37
47
|
* L3 — Tools registered DIRECTLY on the real McpServer, BEFORE the
|
|
38
48
|
* CapturingServer wraps it. The CapturingServer treats these names as a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"essentials.d.ts","sourceRoot":"","sources":["../../src/gateway/essentials.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"essentials.d.ts","sourceRoot":"","sources":["../../src/gateway/essentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH;;;GAGG;AACH,eAAO,MAAM,eAAe,o5BAoFlB,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,mEAGzB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAC7D,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,gEAAgE;AAChE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,4DAA4D;AAC5D,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD"}
|
|
@@ -16,11 +16,21 @@
|
|
|
16
16
|
* SDK never sees a duplicate registration.
|
|
17
17
|
*
|
|
18
18
|
* Why this split: Cursor caps MCP servers at ~40 tools. This adapter
|
|
19
|
-
* declares
|
|
20
|
-
* The 3-lane shape keeps `tools/list` at
|
|
21
|
-
*
|
|
19
|
+
* declares 31 callable tools (26 domain L1/L3 + 4 advanced L2 + 1 gateway).
|
|
20
|
+
* The 3-lane shape keeps `tools/list` at 24 (L1) + 2 (L3) + 1 (gateway) =
|
|
21
|
+
* 27 entries, well under the cap, while every tool stays fully reachable
|
|
22
22
|
* (advanced tools through `yootheme_builder_advanced`).
|
|
23
23
|
*
|
|
24
|
+
* F116 (2026-06-11): the bind→save→publish chain (element_bind_source,
|
|
25
|
+
* page_save, page_publish) was promoted from the advanced lane to L1. It is
|
|
26
|
+
* the #1 dynamic-content workflow; hiding it behind the gateway made an agent
|
|
27
|
+
* listing tools see element_add but neither bind nor publish — a likely
|
|
28
|
+
* "can't publish" deadend. L1 20→23, advanced 7→4.
|
|
29
|
+
*
|
|
30
|
+
* P-G (Goldstandard wave 3): page_dynamize was added as a new registered tool
|
|
31
|
+
* and promoted to L1 (the one-call dynamize-existing-section path). With the
|
|
32
|
+
* F116 trio it brings L1 to 24, advanced stays 4, surface to 27.
|
|
33
|
+
*
|
|
24
34
|
* Health + diagnose live in L3 because they MUST be the first thing an
|
|
25
35
|
* LLM-host calls when something is broken; routing them through a gateway
|
|
26
36
|
* would create a chicken-and-egg loop (the LLM would have to discover
|
|
@@ -34,6 +44,11 @@
|
|
|
34
44
|
*/
|
|
35
45
|
export const ESSENTIAL_TOOLS = [
|
|
36
46
|
'yootheme_builder_pages_list',
|
|
47
|
+
// G-A (Track-C URL→layout): pages_resolve is THE core "paste a URL →
|
|
48
|
+
// reach a layout in ≤1 MCP call" tool. It MUST be L1 so a cold agent
|
|
49
|
+
// handed only a frontend URL reaches it directly (the gap fix would be
|
|
50
|
+
// moot if it were hidden behind the advanced gateway). L1 25 → 26.
|
|
51
|
+
'yootheme_builder_pages_resolve',
|
|
37
52
|
'yootheme_builder_get_etag',
|
|
38
53
|
'yootheme_builder_element_list',
|
|
39
54
|
'yootheme_builder_element_add',
|
|
@@ -48,8 +63,9 @@ export const ESSENTIAL_TOOLS = [
|
|
|
48
63
|
// F-16 hot-path promotions (Maria-Audit v2 re-confirmed) — the 5
|
|
49
64
|
// most-used read/mutate operations skip the advanced-router
|
|
50
65
|
// discovery roundtrip. Cursor cap is ~40; with the W7 sites_list +
|
|
51
|
-
// sites_test additions (plus later C4
|
|
52
|
-
//
|
|
66
|
+
// sites_test additions (plus later C4, config-harmonization, the
|
|
67
|
+
// F116 bind→save→publish promotion and the P-G page_dynamize tool) we
|
|
68
|
+
// sit at 24 L1 + 2 L3 + 1 gateway = 27, comfortable below the limit.
|
|
53
69
|
'yootheme_builder_element_get',
|
|
54
70
|
'yootheme_builder_element_delete',
|
|
55
71
|
'yootheme_builder_element_clone',
|
|
@@ -85,6 +101,31 @@ export const ESSENTIAL_TOOLS = [
|
|
|
85
101
|
// this page". L1 surface 17 → 19.
|
|
86
102
|
'yootheme_builder_pages_create',
|
|
87
103
|
'yootheme_builder_pages_delete',
|
|
104
|
+
// F116 (2026-06-11) — the bind→save→publish chain. element_bind_source is the
|
|
105
|
+
// #1 dynamic-content operation (wire a published source field onto an
|
|
106
|
+
// element); page_save + page_publish persist + go live. All three were
|
|
107
|
+
// advanced-lane only, so an agent listing tools saw element_add but
|
|
108
|
+
// neither bind nor publish — a likely "can't publish" deadend and a
|
|
109
|
+
// 2-call discovery tax (find the gateway, then route). Promoting them to
|
|
110
|
+
// L1 makes the canonical dynamic-content workflow first-class and
|
|
111
|
+
// directly callable. L1 surface 20 → 23.
|
|
112
|
+
'yootheme_builder_element_bind_source',
|
|
113
|
+
'yootheme_builder_page_save',
|
|
114
|
+
'yootheme_builder_page_publish',
|
|
115
|
+
// P-G (Goldstandard wave 3) — page_dynamize is THE canonical one-call
|
|
116
|
+
// path to dynamize an existing designed section (copy byte-identically,
|
|
117
|
+
// swap only mapped queries + leaf names). It MUST be L1 so an agent
|
|
118
|
+
// reaches it directly INSTEAD of discovering it through the advanced
|
|
119
|
+
// gateway and then hand-editing layout JSON (the failure mode the
|
|
120
|
+
// recipe-as-code exists to prevent). With the F116 trio L1 23 → 24.
|
|
121
|
+
'yootheme_builder_page_dynamize',
|
|
122
|
+
// WF2 Option C (2026-06-13) — scaffold_section is the positive-steering
|
|
123
|
+
// counterpart to the structural-hierarchy guard: it creates a VALID
|
|
124
|
+
// section → row → column hull in ONE atomic call and returns the column
|
|
125
|
+
// pointer(s) to drop content into. It MUST be L1 so an agent reaches it
|
|
126
|
+
// directly INSTEAD of hand-building (and tripping the guard on) an
|
|
127
|
+
// invalid root/section/row placement. With the prior set L1 24 → 25.
|
|
128
|
+
'yootheme_builder_scaffold_section',
|
|
88
129
|
];
|
|
89
130
|
/**
|
|
90
131
|
* L3 — Tools registered DIRECTLY on the real McpServer, BEFORE the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"essentials.js","sourceRoot":"","sources":["../../src/gateway/essentials.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"essentials.js","sourceRoot":"","sources":["../../src/gateway/essentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,6BAA6B;IAC7B,qEAAqE;IACrE,qEAAqE;IACrE,uEAAuE;IACvE,mEAAmE;IACnE,gCAAgC;IAChC,2BAA2B;IAC3B,+BAA+B;IAC/B,8BAA8B;IAC9B,0CAA0C;IAC1C,+BAA+B;IAC/B,qCAAqC;IACrC,6DAA6D;IAC7D,kEAAkE;IAClE,6DAA6D;IAC7D,yCAAyC;IACzC,8CAA8C;IAC9C,iEAAiE;IACjE,4DAA4D;IAC5D,mEAAmE;IACnE,iEAAiE;IACjE,sEAAsE;IACtE,qEAAqE;IACrE,8BAA8B;IAC9B,iCAAiC;IACjC,gCAAgC;IAChC,+BAA+B;IAC/B,kCAAkC;IAClC,oEAAoE;IACpE,sEAAsE;IACtE,mCAAmC;IACnC,iEAAiE;IACjE,iEAAiE;IACjE,iEAAiE;IACjE,4DAA4D;IAC5D,4DAA4D;IAC5D,0CAA0C;IAC1C,mEAAmE;IACnE,oEAAoE;IACpE,mEAAmE;IACnE,kEAAkE;IAClE,uEAAuE;IACvE,6BAA6B;IAC7B,6BAA6B;IAC7B,mEAAmE;IACnE,oEAAoE;IACpE,oEAAoE;IACpE,8DAA8D;IAC9D,+BAA+B;IAC/B,2BAA2B;IAC3B,oEAAoE;IACpE,iEAAiE;IACjE,mEAAmE;IACnE,oEAAoE;IACpE,kEAAkE;IAClE,kCAAkC;IAClC,+BAA+B;IAC/B,+BAA+B;IAC/B,8EAA8E;IAC9E,sEAAsE;IACtE,uEAAuE;IACvE,oEAAoE;IACpE,oEAAoE;IACpE,yEAAyE;IACzE,kEAAkE;IAClE,yCAAyC;IACzC,sCAAsC;IACtC,4BAA4B;IAC5B,+BAA+B;IAC/B,sEAAsE;IACtE,wEAAwE;IACxE,oEAAoE;IACpE,qEAAqE;IACrE,kEAAkE;IAClE,oEAAoE;IACpE,gCAAgC;IAChC,wEAAwE;IACxE,oEAAoE;IACpE,wEAAwE;IACxE,wEAAwE;IACxE,mEAAmE;IACnE,qEAAqE;IACrE,mCAAmC;CAC7B,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,yBAAyB;IACzB,2BAA2B;CACrB,CAAC;AAKX,gEAAgE;AAChE,MAAM,UAAU,WAAW,CAAC,IAAY;IACpC,OAAQ,eAAqC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACjE,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,gBAAgB,CAAC,IAAY;IACzC,OAAQ,sBAA4C,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxE,CAAC"}
|
|
@@ -31,8 +31,8 @@ export interface CollectedTool {
|
|
|
31
31
|
* name. The CapturingServer must have been used to register the L1/L2
|
|
32
32
|
* tools, and `registerAdvancedTool` must have run, before this is called.
|
|
33
33
|
*
|
|
34
|
-
* Production size = 30:
|
|
35
|
-
*
|
|
34
|
+
* Production size = 30 (post-F116):
|
|
35
|
+
* 23 L1 essentials (real server) + 4 L2 advanced (registry)
|
|
36
36
|
* + 2 L3 direct (real server) + 1 gateway (real server) = 30.
|
|
37
37
|
*/
|
|
38
38
|
export declare function collectAllRegisteredTools(server: McpServer, capturing: CapturingServer): Record<string, CollectedTool>;
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
* name. The CapturingServer must have been used to register the L1/L2
|
|
21
21
|
* tools, and `registerAdvancedTool` must have run, before this is called.
|
|
22
22
|
*
|
|
23
|
-
* Production size = 30:
|
|
24
|
-
*
|
|
23
|
+
* Production size = 30 (post-F116):
|
|
24
|
+
* 23 L1 essentials (real server) + 4 L2 advanced (registry)
|
|
25
25
|
* + 2 L3 direct (real server) + 1 gateway (real server) = 30.
|
|
26
26
|
*/
|
|
27
27
|
export function collectAllRegisteredTools(server, capturing) {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAkBH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EACH,UAAU,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,UAAU,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACZ,WAAW,EACX,aAAa,GAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD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