@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
|
@@ -10,6 +10,18 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { type ToolResult } from '../tool-builder.js';
|
|
12
12
|
import type { SourcesHandlerDeps } from './handlers.js';
|
|
13
|
+
/**
|
|
14
|
+
* A single `field_mappings` value. F96/F82 (2026-06-10): EITHER a plain
|
|
15
|
+
* source-field name string, OR a structured `{name, filters?}` object that
|
|
16
|
+
* carries an explicit YT5 filters operator (e.g. `{condition: '!!'}` on a
|
|
17
|
+
* `_condition` prop, or `{date: 'D, d.m.y'}` for a date format). Mirrors the
|
|
18
|
+
* `field_mappings` union in `./builders.ts`. The handler forwards the value
|
|
19
|
+
* verbatim — the PHP SourcesController normalises + persists it.
|
|
20
|
+
*/
|
|
21
|
+
export type FieldMappingValue = string | {
|
|
22
|
+
name: string;
|
|
23
|
+
filters?: Record<string, unknown>;
|
|
24
|
+
};
|
|
13
25
|
export declare function handleElementBindSource({ client, elicitation }: SourcesHandlerDeps, input: {
|
|
14
26
|
template_id: string;
|
|
15
27
|
element_path: string;
|
|
@@ -17,7 +29,7 @@ export declare function handleElementBindSource({ client, elicitation }: Sources
|
|
|
17
29
|
source_id?: string;
|
|
18
30
|
etag: string;
|
|
19
31
|
bindingLevel?: 'auto' | 'container' | 'item';
|
|
20
|
-
field_mappings?: Record<string,
|
|
32
|
+
field_mappings?: Record<string, FieldMappingValue>;
|
|
21
33
|
}): Promise<ToolResult>;
|
|
22
34
|
export declare function handleElementUnbindSource({ client, elicitation }: SourcesHandlerDeps, input: {
|
|
23
35
|
template_id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers-bind.d.ts","sourceRoot":"","sources":["../../../src/tools/sources/handlers-bind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAeH,OAAO,EAIH,KAAK,UAAU,EAClB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"handlers-bind.d.ts","sourceRoot":"","sources":["../../../src/tools/sources/handlers-bind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAeH,OAAO,EAIH,KAAK,UAAU,EAClB,MAAM,oBAAoB,CAAC;AAK5B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAyMxD;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GACvB,MAAM,GACN;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC;AAE1D,wBAAsB,uBAAuB,CACzC,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,kBAAkB,EAC3C,KAAK,EAAE;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;CACtD,GACF,OAAO,CAAC,UAAU,CAAC,CAgIrB;AAID,wBAAsB,yBAAyB,CAC3C,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,kBAAkB,EAC3C,KAAK,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GACtF,OAAO,CAAC,UAAU,CAAC,CAoCrB"}
|
|
@@ -14,6 +14,7 @@ import { RestError } from '../../errors.js';
|
|
|
14
14
|
import { flattenSourcesPayload, mapSourceRow, } from '../format/sources-format.js';
|
|
15
15
|
import { ambiguityFallbackError, } from '../elicitation.js';
|
|
16
16
|
import { confirmGuard, errorResult, jsonResult, } from '../tool-builder.js';
|
|
17
|
+
import { GRID_ITEM_ITERATOR_REJECT, SLOT_COLLISION_STEERING, } from '../bind-guidance.js';
|
|
17
18
|
/**
|
|
18
19
|
* Wave-12 F9 — extract validation-hint fields surfaced by the WP REST
|
|
19
20
|
* plugin when `source_name` is rejected (`unknown_source` code). The PHP
|
|
@@ -38,6 +39,145 @@ function extractUnknownSourceHints(body) {
|
|
|
38
39
|
all_published_sources: d.all_published_sources,
|
|
39
40
|
};
|
|
40
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* F189 — true iff the REST error body is the slot-collision reject (409). The
|
|
44
|
+
* WP plugin writes `code` = `…source_binding.slot_collision`; both platforms
|
|
45
|
+
* also carry `data.error_code === 'slot_collision'` (WordPress nests hint data
|
|
46
|
+
* under `data`; the Joomla envelope surfaces the same `error_code`).
|
|
47
|
+
*/
|
|
48
|
+
function isSlotCollision(body) {
|
|
49
|
+
if (body === null || typeof body !== 'object')
|
|
50
|
+
return false;
|
|
51
|
+
const root = body;
|
|
52
|
+
if (typeof root.code === 'string' &&
|
|
53
|
+
root.code.endsWith('source_binding.slot_collision')) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
if (root.error_code === 'slot_collision')
|
|
57
|
+
return true;
|
|
58
|
+
const data = root.data;
|
|
59
|
+
if (data !== null && typeof data === 'object') {
|
|
60
|
+
return data.error_code === 'slot_collision';
|
|
61
|
+
}
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
/** Pull a `list<string>` from a passthrough body field, or `[]`. */
|
|
65
|
+
function stringList(value) {
|
|
66
|
+
if (!Array.isArray(value))
|
|
67
|
+
return [];
|
|
68
|
+
return value.filter((k) => typeof k === 'string');
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* F174 — the bind succeeded but with ZERO field mappings: each of the N
|
|
72
|
+
* cloned items will render only the template's static placeholder text
|
|
73
|
+
* ("Title" / "Lorem ipsum"), not real data. This is a silent footgun: a
|
|
74
|
+
* caged agent bound source_name + bindingLevel only, the call returned 200
|
|
75
|
+
* + binding_level:"item", and element_get_binding reported a healthy-looking
|
|
76
|
+
* binding — but the frontend showed N identical placeholder cards. The
|
|
77
|
+
* warning is NOT a hard reject (a first bind of just the source can be a
|
|
78
|
+
* legitimate intermediate step), but it must be unmissable.
|
|
79
|
+
*
|
|
80
|
+
* `hadMappings` is true when the bind REQUEST carried a non-empty
|
|
81
|
+
* field_mappings object. We fire only when the request had no mappings AND
|
|
82
|
+
* the response did not report any dropped mappings (a re-bind that shrinks an
|
|
83
|
+
* existing map keeps real data on the kept props — that is the F147 warning's
|
|
84
|
+
* territory, not this one).
|
|
85
|
+
*/
|
|
86
|
+
function zeroFieldMappingsWarning() {
|
|
87
|
+
return ('0 field mappings bound — the cloned items will render the template\'s ' +
|
|
88
|
+
'static placeholder texts (Title / Lorem ipsum), not real data. ' +
|
|
89
|
+
'Re-bind with field_mappings AT THIS ITEM (call element_bind_source ' +
|
|
90
|
+
'again on THIS same element_path with a non-empty ' +
|
|
91
|
+
'field_mappings:{<element_prop>:<source_field>}). Do NOT bind the ' +
|
|
92
|
+
'individual child leaves instead: on YT5 a "#parent" leaf bind written ' +
|
|
93
|
+
'directly under an iterating item renders placeholder text — the ' +
|
|
94
|
+
'field_mappings-at-the-item form is the shape that resolves. Discover ' +
|
|
95
|
+
'props via yootheme_builder_element_type_get_schema, source fields via ' +
|
|
96
|
+
'apimapper_yootheme_binding_for_flow.');
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* F129 + F147 + F174 — when the REST plugin's bind response carries
|
|
100
|
+
* `unknown_prop_keys` (field_mappings keys the target element-type does
|
|
101
|
+
* not render) and/or `dropped_field_mappings` (leaves the new, smaller
|
|
102
|
+
* field_mappings dropped from the prior binding — full replace, not
|
|
103
|
+
* merge), promote them to a TOP-LEVEL `warning` string so both silent-
|
|
104
|
+
* footgun signals are the first thing the agent sees. F174: when the bind
|
|
105
|
+
* persisted a source binding with ZERO field mappings (request had none and
|
|
106
|
+
* none were dropped), promote the placeholder-render footgun warning too.
|
|
107
|
+
* Returns the body unchanged when no signal is present (no warning on the
|
|
108
|
+
* happy path).
|
|
109
|
+
*/
|
|
110
|
+
function withBindWarnings(body, hadMappings) {
|
|
111
|
+
if (body === null || typeof body !== 'object' || Array.isArray(body))
|
|
112
|
+
return body;
|
|
113
|
+
const root = body;
|
|
114
|
+
const unknownKeys = stringList(root.unknown_prop_keys);
|
|
115
|
+
const droppedKeys = stringList(root.dropped_field_mappings);
|
|
116
|
+
const parts = [];
|
|
117
|
+
if (unknownKeys.length > 0) {
|
|
118
|
+
parts.push(`These field_mappings keys are not props the target element renders, ` +
|
|
119
|
+
`so their values will be silently dropped: ${unknownKeys.join(', ')}. ` +
|
|
120
|
+
`Run yootheme_builder_element_type_get_schema for valid prop names ` +
|
|
121
|
+
`(see unknown_prop_keys_did_you_mean for suggestions), or re-bind onto ` +
|
|
122
|
+
`an element that exposes these props.`);
|
|
123
|
+
}
|
|
124
|
+
// G2 (WF1 Phase-2) — the VALUE-side mirror of unknown_prop_keys. A
|
|
125
|
+
// field_mappings VALUE that names a source-field the bound flow does NOT
|
|
126
|
+
// emit binds to nothing → the bind returns 200 but the element renders
|
|
127
|
+
// blank. The PHP chokepoint is the only place that resolves BOTH the
|
|
128
|
+
// source's field set AND the target element, so it flags these as
|
|
129
|
+
// `unknown_source_field_values` (with the available set in
|
|
130
|
+
// `unknown_source_field_values_available`). Promote both into the
|
|
131
|
+
// top-level warning so the agent sees which field is wrong AND the
|
|
132
|
+
// valid choices, in one step.
|
|
133
|
+
const unknownFieldValues = stringList(root.unknown_source_field_values);
|
|
134
|
+
if (unknownFieldValues.length > 0) {
|
|
135
|
+
const available = stringList(root.unknown_source_field_values_available);
|
|
136
|
+
const availableHint = available.length > 0
|
|
137
|
+
? ` Available source fields: ${available.join(', ')}.`
|
|
138
|
+
: '';
|
|
139
|
+
parts.push(`These field_mappings values name source fields the bound source does ` +
|
|
140
|
+
`not emit, so they bind to nothing (the element renders blank): ` +
|
|
141
|
+
`${unknownFieldValues.join(', ')}.${availableHint} Re-bind with a ` +
|
|
142
|
+
`source-field name the flow actually emits — list them via ` +
|
|
143
|
+
`apimapper_yootheme_binding_for_flow.`);
|
|
144
|
+
}
|
|
145
|
+
if (droppedKeys.length > 0) {
|
|
146
|
+
parts.push(`field_mappings is a full REPLACE, not a merge — this re-bind dropped ` +
|
|
147
|
+
`the previously-bound prop(s): ${droppedKeys.join(', ')}. If that was ` +
|
|
148
|
+
`unintended, re-bind with the full set (include the dropped keys).`);
|
|
149
|
+
}
|
|
150
|
+
// F174 — only when the request bound a source with no mappings AND no
|
|
151
|
+
// prior mappings were dropped. A bind that dropped keys still kept real
|
|
152
|
+
// data on the survivors → not a zero-mappings placeholder situation.
|
|
153
|
+
if (!hadMappings && droppedKeys.length === 0 && bindPersistedSource(root)) {
|
|
154
|
+
parts.push(zeroFieldMappingsWarning());
|
|
155
|
+
}
|
|
156
|
+
// F189 — the bind landed a `…List` source on a LEAF renderer (grid_item /
|
|
157
|
+
// any non-container) that ALSO carries nested children. The item's own slot
|
|
158
|
+
// bind resolved, but its nested children are render-dead (the template never
|
|
159
|
+
// renders them). Promote the reject-recipe text so the agent fixes the shape
|
|
160
|
+
// instead of shipping a placeholder grid.
|
|
161
|
+
if (root.iterator_is_leaf_renderer === true) {
|
|
162
|
+
parts.push(GRID_ITEM_ITERATOR_REJECT);
|
|
163
|
+
}
|
|
164
|
+
if (parts.length === 0)
|
|
165
|
+
return body;
|
|
166
|
+
return { ...root, warning: parts.join(' ') };
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* F174 — did the bind response persist an actual source binding (vs an
|
|
170
|
+
* unbind / no-op)? True when the response `binding.source_name` (or the
|
|
171
|
+
* top-level `source_name`) is a non-empty string. Guards the zero-mappings
|
|
172
|
+
* warning so it never fires on an unbind echo.
|
|
173
|
+
*/
|
|
174
|
+
function bindPersistedSource(root) {
|
|
175
|
+
const fromBinding = root.binding !== null && typeof root.binding === 'object' && !Array.isArray(root.binding)
|
|
176
|
+
? root.binding.source_name
|
|
177
|
+
: undefined;
|
|
178
|
+
const name = typeof fromBinding === 'string' ? fromBinding : root.source_name;
|
|
179
|
+
return typeof name === 'string' && name.length > 0;
|
|
180
|
+
}
|
|
41
181
|
// ─── element_bind_source (G.4.3 — ambiguity resolution) ─────────────
|
|
42
182
|
/**
|
|
43
183
|
* Look up sources matching `source_name`. Returns at most one row per
|
|
@@ -108,7 +248,17 @@ export async function handleElementBindSource({ client, elicitation }, input) {
|
|
|
108
248
|
}
|
|
109
249
|
try {
|
|
110
250
|
const data = await client.put(`/pages/${encodeTemplateId(template_id)}/elements/${encoded}/binding`, { body: resolvedBody, etag });
|
|
111
|
-
|
|
251
|
+
// F129 + F147 + F174 — the bind persisted (200), but the REST plugin
|
|
252
|
+
// may have flagged field_mappings keys the target element-type does
|
|
253
|
+
// not render (`unknown_prop_keys`) and/or leaves the new, smaller
|
|
254
|
+
// map dropped from the prior binding (`dropped_field_mappings` —
|
|
255
|
+
// full replace, not merge); and the bind may have persisted a source
|
|
256
|
+
// with ZERO field mappings (renders only template placeholders).
|
|
257
|
+
// All are silent footguns at render time. Lift them into a TOP-LEVEL
|
|
258
|
+
// warning so the agent notices and corrects, rather than leaving the
|
|
259
|
+
// signal buried in the passthrough body.
|
|
260
|
+
const hadMappings = field_mappings !== undefined && Object.keys(field_mappings).length > 0;
|
|
261
|
+
return jsonResult(withBindWarnings(data, hadMappings));
|
|
112
262
|
}
|
|
113
263
|
catch (e) {
|
|
114
264
|
// Wave-12 F9 — surface unknown-source hints directly into the
|
|
@@ -121,6 +271,18 @@ export async function handleElementBindSource({ client, elicitation }, input) {
|
|
|
121
271
|
...(source_id ? { source_id } : {}),
|
|
122
272
|
};
|
|
123
273
|
if (e instanceof RestError) {
|
|
274
|
+
// F189 — slot collision (409): two fields would land on the same
|
|
275
|
+
// parent prop slot during F188 consolidation, OR the lifted key is
|
|
276
|
+
// not a slot of the parent type. The server's message already names
|
|
277
|
+
// the slot + recipe; surface the canonical steering as the hint so
|
|
278
|
+
// the agent gives each field its own leaf / a distinct slot.
|
|
279
|
+
if (isSlotCollision(e.body)) {
|
|
280
|
+
return errorResult({
|
|
281
|
+
error: e,
|
|
282
|
+
context: baseContext,
|
|
283
|
+
hint: SLOT_COLLISION_STEERING,
|
|
284
|
+
});
|
|
285
|
+
}
|
|
124
286
|
const hints = extractUnknownSourceHints(e.body);
|
|
125
287
|
if (hints !== null) {
|
|
126
288
|
if (hints.did_you_mean !== undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers-bind.js","sourceRoot":"","sources":["../../../src/tools/sources/handlers-bind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEvE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAmB,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACH,qBAAqB,EACrB,YAAY,GAEf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACH,sBAAsB,GAEzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACH,YAAY,EACZ,WAAW,EACX,UAAU,GAEb,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"handlers-bind.js","sourceRoot":"","sources":["../../../src/tools/sources/handlers-bind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEvE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAmB,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACH,qBAAqB,EACrB,YAAY,GAEf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACH,sBAAsB,GAEzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACH,YAAY,EACZ,WAAW,EACX,UAAU,GAEb,MAAM,oBAAoB,C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E,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC3D,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACnB,IAAI,OAAO,KAAK,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC;YACpC,OAAO,YAAY,CAAC;gBAChB,SAAS,EAAE,eAAe;gBAC1B,OAAO,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE;aACzC,CAAC,CAAC;QACP,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,kBAAkB,CACrC,WAAW,EACX,2CAA2C,YAAY,gBAAgB;YACnE,IAAI,WAAW,8CAA8C,CACpE,CAAC;QACF,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO,YAAY,CAAC;gBAChB,SAAS,EAAE,eAAe;gBAC1B,OAAO,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE;aACzC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAED,MAAM,OAAO,GAAG,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAChD,IAAI,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAC5B,UAAU,gBAAgB,CAAC,WAAW,CAAC,aAAa,OAAO,UAAU,EACrE,EAAE,IAAI,EAAE,CACX,CAAC;QACF,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACT,OAAO,WAAW,CAAC;YACf,KAAK,EAAE,CAAC;YACR,OAAO,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE;YACtC,IAAI,EAAE,yDAAyD;SAClE,CAAC,CAAC;IACP,CAAC;AACL,CAAC"}
|
|
@@ -15,15 +15,20 @@ import { type ToolResult } from '../tool-builder.js';
|
|
|
15
15
|
export declare const SOURCES_LIST_OUTPUT_SCHEMA: z.ZodObject<{
|
|
16
16
|
items: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
17
17
|
total: z.ZodNumber;
|
|
18
|
+
returned: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
next_cursor: z.ZodOptional<z.ZodString>;
|
|
18
20
|
projected_fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19
21
|
available_fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
20
22
|
unknown_fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
23
|
+
projection_warning: z.ZodOptional<z.ZodString>;
|
|
21
24
|
}, z.core.$strip>;
|
|
22
25
|
export declare const BINDING_OUTPUT_SCHEMA: z.ZodObject<{
|
|
23
26
|
template_id: z.ZodString;
|
|
24
27
|
element_path: z.ZodString;
|
|
25
28
|
binding: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
26
29
|
has_binding: z.ZodBoolean;
|
|
30
|
+
field_mapping_count: z.ZodNumber;
|
|
31
|
+
warning: z.ZodOptional<z.ZodString>;
|
|
27
32
|
}, z.core.$strip>;
|
|
28
33
|
export interface SourcesHandlerDeps {
|
|
29
34
|
readonly client: RestClient;
|
|
@@ -36,8 +41,14 @@ export interface SourcesHandlerDeps {
|
|
|
36
41
|
*/
|
|
37
42
|
readonly elicitation?: McpServerWithElicitation;
|
|
38
43
|
}
|
|
39
|
-
export declare function handleSourcesList({ client }: SourcesHandlerDeps, { fields }: {
|
|
44
|
+
export declare function handleSourcesList({ client }: SourcesHandlerDeps, { fields, limit, cursor, name_contains, group, kind, max_chars, }: {
|
|
40
45
|
fields?: readonly string[];
|
|
46
|
+
limit?: number;
|
|
47
|
+
cursor?: string;
|
|
48
|
+
name_contains?: string;
|
|
49
|
+
group?: string;
|
|
50
|
+
kind?: string;
|
|
51
|
+
max_chars?: number;
|
|
41
52
|
}): Promise<ToolResult>;
|
|
42
53
|
export declare function handleElementGetBinding({ client }: SourcesHandlerDeps, { template_id, element_path }: {
|
|
43
54
|
template_id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/tools/sources/handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAuC,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/tools/sources/handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAuC,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AASvF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAYlE,OAAO,EAGH,KAAK,UAAU,EAClB,MAAM,oBAAoB,CAAC;AAI5B,eAAO,MAAM,0BAA0B;;;;;;;;;iBAiBrC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;iBAahC,CAAC;AAEH,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B;;;;;;OAMG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,wBAAwB,CAAC;CACnD;AAaD,wBAAsB,iBAAiB,CACnC,EAAE,MAAM,EAAE,EAAE,kBAAkB,EAC9B,EACI,MAAM,EACN,KAAK,EACL,MAAM,EACN,aAAa,EACb,KAAK,EACL,IAAI,EACJ,SAAS,GACZ,EAAE;IACC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,GACF,OAAO,CAAC,UAAU,CAAC,CAoFrB;AAID,wBAAsB,uBAAuB,CACzC,EAAE,MAAM,EAAE,EAAE,kBAAkB,EAC9B,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GAC7E,OAAO,CAAC,UAAU,CAAC,CAwDrB;AAID,OAAO,EACH,uBAAuB,EACvB,yBAAyB,GAC5B,MAAM,oBAAoB,CAAC"}
|
|
@@ -11,28 +11,65 @@
|
|
|
11
11
|
import { detailResult, tableResult } from '@getimo/mcp-toolkit';
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
import { encodeElementPath, encodeTemplateId } from '../../client.js';
|
|
14
|
-
import { SOURCES_TABLE_COLUMNS, buildBindingDetail, flattenSourcesPayload, mapSourceRow, remapOriginForPlatform, } from '../format/sources-format.js';
|
|
15
|
-
import { DEFAULT_FIELDS_SOURCES_LIST, projectFields, projectedFieldsEcho, projectionFeedback, } from '../sparse-fields.js';
|
|
14
|
+
import { SOURCES_TABLE_COLUMNS, bindingFieldMappingCount, buildBindingDetail, flattenSourcesPayload, mapSourceRow, remapOriginForPlatform, } from '../format/sources-format.js';
|
|
15
|
+
import { DEFAULT_FIELDS_SOURCES_LIST, applyMaxChars, columnsFromFields, decodeOffsetCursor, encodeOffsetCursor, projectFields, projectedFieldsEcho, projectionFeedback, projectionWarning, } from '../sparse-fields.js';
|
|
16
16
|
import { errorResult, structuredResult, } from '../tool-builder.js';
|
|
17
17
|
// ─── outputSchemas (Wave G.2 §4) ─────────────────────────────────────
|
|
18
18
|
export const SOURCES_LIST_OUTPUT_SCHEMA = z.object({
|
|
19
19
|
items: z.array(z.record(z.string(), z.unknown())),
|
|
20
20
|
total: z.number(),
|
|
21
|
+
// G-B (Glöckle 2026-06-26): client-side pagination, mirroring pages_list.
|
|
22
|
+
// `total` is the (filtered) source count; `returned` is how many rows this
|
|
23
|
+
// page carries; `next_cursor` (present only when more remain) is passed
|
|
24
|
+
// back as `cursor` for the next page.
|
|
25
|
+
returned: z.number().optional(),
|
|
26
|
+
next_cursor: z.string().optional(),
|
|
21
27
|
projected_fields: z.array(z.string()).optional(),
|
|
22
28
|
// F-004 fix (2026-05-25 exhaustive audit): see sparse-fields::projectionFeedback.
|
|
23
29
|
available_fields: z.array(z.string()).optional(),
|
|
24
30
|
unknown_fields: z.array(z.string()).optional(),
|
|
31
|
+
// F23 (2026-06-10): the LOUD unknown-projection warning also rides in
|
|
32
|
+
// structuredContent — hosts that surface structuredContent (not the
|
|
33
|
+
// text leg) to the model would otherwise never see it.
|
|
34
|
+
projection_warning: z.string().optional(),
|
|
25
35
|
});
|
|
26
36
|
export const BINDING_OUTPUT_SCHEMA = z.object({
|
|
27
37
|
template_id: z.string(),
|
|
28
38
|
element_path: z.string(),
|
|
29
39
|
binding: z.record(z.string(), z.unknown()),
|
|
30
40
|
has_binding: z.boolean(),
|
|
41
|
+
// F174 — number of field mappings on the binding. Always present (0 when
|
|
42
|
+
// unbound or mapping-less) so a "verification" read of a bound-but-
|
|
43
|
+
// mapping-less element no longer looks healthy.
|
|
44
|
+
field_mapping_count: z.number().int().nonnegative(),
|
|
45
|
+
// F174 — top-level warning when the element IS bound but has 0 field
|
|
46
|
+
// mappings (the N clones render only the template's static placeholder
|
|
47
|
+
// text). Absent on the happy path.
|
|
48
|
+
warning: z.string().optional(),
|
|
31
49
|
});
|
|
32
50
|
// ─── sources_list ────────────────────────────────────────────────────
|
|
33
|
-
|
|
51
|
+
/** Default page size for sources_list when `limit` is omitted (G-B). */
|
|
52
|
+
const DEFAULT_SOURCES_LIMIT = 50;
|
|
53
|
+
/** Case-insensitive substring match across a source row's name / label. */
|
|
54
|
+
function matchesSourceFilter(row, needle) {
|
|
55
|
+
const hay = `${String(row.name ?? '')} ${String(row.label ?? '')}`.toLowerCase();
|
|
56
|
+
return hay.includes(needle);
|
|
57
|
+
}
|
|
58
|
+
export async function handleSourcesList({ client }, { fields, limit, cursor, name_contains, group, kind, max_chars, }) {
|
|
34
59
|
try {
|
|
35
|
-
|
|
60
|
+
// G-B (Glöckle 2026-06-26): forward the `group` (origin) + `kind`
|
|
61
|
+
// (GraphQL type) filters the REST plugin already honours server-side
|
|
62
|
+
// (SourcesController::list_sources, F-COLD-23) so a site with hundreds
|
|
63
|
+
// of sources can scope at the source. Without them the tool fetched the
|
|
64
|
+
// full grouped set every call. Omitted → no query string (byte-identical
|
|
65
|
+
// to the pre-G-B request shape, asserted by a back-compat test).
|
|
66
|
+
const qs = new URLSearchParams();
|
|
67
|
+
if (typeof group === 'string' && group !== '')
|
|
68
|
+
qs.set('group', group);
|
|
69
|
+
if (typeof kind === 'string' && kind !== '')
|
|
70
|
+
qs.set('kind', kind);
|
|
71
|
+
const query = qs.toString();
|
|
72
|
+
const data = await client.get(`/sources${query !== '' ? `?${query}` : ''}`);
|
|
36
73
|
const payload = data.sources ?? data;
|
|
37
74
|
const flat = flattenSourcesPayload(payload);
|
|
38
75
|
// F-A5-1 (v1.1.5): the Joomla REST plugin tags native sources
|
|
@@ -41,26 +78,53 @@ export async function handleSourcesList({ client }, { fields }) {
|
|
|
41
78
|
// so agents reasoning across WP+Joomla sites get truthful
|
|
42
79
|
// origins. See `remapOriginForPlatform` for the rationale.
|
|
43
80
|
const remapped = remapOriginForPlatform(flat, client.getPlatform().kind);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
81
|
+
let mapped = remapped.map(mapSourceRow);
|
|
82
|
+
// G-B: `name_contains` is a CLIENT-SIDE substring filter (the REST
|
|
83
|
+
// plugin has no name filter — only group/kind). Mirrors pages_list's
|
|
84
|
+
// `label_contains`. Filter BEFORE paging so `total` + the cursor
|
|
85
|
+
// reflect the filtered result.
|
|
86
|
+
if (typeof name_contains === 'string' && name_contains !== '') {
|
|
87
|
+
const needle = name_contains.toLowerCase();
|
|
88
|
+
mapped = mapped.filter((row) => matchesSourceFilter(row, needle));
|
|
89
|
+
}
|
|
90
|
+
// G-B: a real site can carry hundreds of sources. Page the (filtered)
|
|
91
|
+
// set so the LLM-visible output stays within budget. Mirrors pages_list.
|
|
92
|
+
const total = mapped.length;
|
|
93
|
+
const offset = decodeOffsetCursor(cursor);
|
|
94
|
+
const pageSize = limit ?? DEFAULT_SOURCES_LIMIT;
|
|
95
|
+
const slice = mapped.slice(offset, offset + pageSize);
|
|
96
|
+
const nextOffset = offset + slice.length;
|
|
97
|
+
const nextCursor = nextOffset < total ? encodeOffsetCursor(nextOffset) : undefined;
|
|
98
|
+
const items = projectFields(slice, fields, DEFAULT_FIELDS_SOURCES_LIST);
|
|
47
99
|
const echo = projectedFieldsEcho(fields, DEFAULT_FIELDS_SOURCES_LIST);
|
|
48
|
-
const feedback = projectionFeedback(
|
|
49
|
-
|
|
50
|
-
|
|
100
|
+
const feedback = projectionFeedback(slice, fields);
|
|
101
|
+
// F23 (2026-06-09): shared loud-warning helper.
|
|
102
|
+
const unknownNote = projectionWarning(feedback);
|
|
103
|
+
// B1 (Glöckle 2026-06-25): project the TEXT leg too when fields[] is
|
|
104
|
+
// given, so the LLM-visible table honors the whitelist instead of
|
|
105
|
+
// rendering every column. Default (no fields) table is unchanged.
|
|
106
|
+
const useProjection = echo !== undefined && echo.length > 0;
|
|
107
|
+
const projectedColumns = useProjection ? columnsFromFields([...echo]) : undefined;
|
|
108
|
+
const pagedNote = total > slice.length
|
|
109
|
+
? ` of ${String(total)}${nextCursor !== undefined ? ', pass cursor for more' : ''}`
|
|
51
110
|
: '';
|
|
52
|
-
const toolkitResult = tableResult(
|
|
53
|
-
columns: [...SOURCES_TABLE_COLUMNS],
|
|
54
|
-
header: (count) => `${String(count)} sources${unknownNote}`,
|
|
55
|
-
footer: '
|
|
111
|
+
const toolkitResult = tableResult(useProjection ? items : slice, {
|
|
112
|
+
columns: projectedColumns ?? [...SOURCES_TABLE_COLUMNS],
|
|
113
|
+
header: (count) => `${String(count)}${pagedNote} sources${unknownNote}`,
|
|
114
|
+
footer: 'Bind one directly: yootheme_builder_element_bind_source({ template_id, ' +
|
|
115
|
+
'element_path, source_name, field_mappings }) ' +
|
|
116
|
+
'(a first-class tool in tools/list since F116).',
|
|
56
117
|
});
|
|
57
|
-
return structuredResult(toolkitResult, {
|
|
118
|
+
return structuredResult(applyMaxChars(toolkitResult, max_chars), {
|
|
58
119
|
items,
|
|
59
|
-
total
|
|
120
|
+
total,
|
|
121
|
+
returned: slice.length,
|
|
122
|
+
...(nextCursor !== undefined ? { next_cursor: nextCursor } : {}),
|
|
60
123
|
...(echo !== undefined ? { projected_fields: [...echo] } : {}),
|
|
61
124
|
...(feedback !== undefined ? {
|
|
62
125
|
available_fields: [...feedback.available_fields],
|
|
63
126
|
unknown_fields: [...feedback.unknown_fields],
|
|
127
|
+
...(unknownNote.trim() !== '' ? { projection_warning: unknownNote.trim() } : {}),
|
|
64
128
|
} : {}),
|
|
65
129
|
});
|
|
66
130
|
}
|
|
@@ -86,12 +150,35 @@ export async function handleElementGetBinding({ client }, { template_id, element
|
|
|
86
150
|
? binding.has_binding
|
|
87
151
|
: typeof binding.source_name === 'string' &&
|
|
88
152
|
binding.source_name.length > 0;
|
|
153
|
+
// F174 — count the field mappings (same extraction the detail builder
|
|
154
|
+
// uses) so a "verification" read surfaces the zero-mappings footgun
|
|
155
|
+
// instead of silently looking healthy. The warning fires ONLY when the
|
|
156
|
+
// element is actually bound but carries no mappings — the N clones then
|
|
157
|
+
// render the template's static placeholder text, not real data.
|
|
158
|
+
const fieldMappingCount = bindingFieldMappingCount(binding);
|
|
159
|
+
const zeroFieldMappings = hasBinding && fieldMappingCount === 0;
|
|
89
160
|
const toolkitResult = detailResult(buildBindingDetail({ template_id, element_path, binding }));
|
|
90
161
|
return structuredResult(toolkitResult, {
|
|
91
162
|
template_id,
|
|
92
163
|
element_path,
|
|
93
164
|
binding,
|
|
94
165
|
has_binding: hasBinding,
|
|
166
|
+
field_mapping_count: fieldMappingCount,
|
|
167
|
+
...(zeroFieldMappings
|
|
168
|
+
? {
|
|
169
|
+
warning: 'This element is bound to a source but has 0 field mappings, ' +
|
|
170
|
+
'so its cloned items render the template\'s static placeholder ' +
|
|
171
|
+
'text (Title / Lorem ipsum), not real data. Re-bind with ' +
|
|
172
|
+
'field_mappings AT THIS ITEM via ' +
|
|
173
|
+
'yootheme_builder_element_bind_source on THIS element_path ' +
|
|
174
|
+
'with field_mappings:{<element_prop>:<source_field>}. Do NOT ' +
|
|
175
|
+
'bind the individual child leaves instead: on YT5 a "#parent" ' +
|
|
176
|
+
'leaf bind written directly under an iterating item renders ' +
|
|
177
|
+
'placeholder text. Discover props with ' +
|
|
178
|
+
'yootheme_builder_element_type_get_schema, source fields ' +
|
|
179
|
+
'with apimapper_yootheme_binding_for_flow.',
|
|
180
|
+
}
|
|
181
|
+
: {}),
|
|
95
182
|
});
|
|
96
183
|
}
|
|
97
184
|
catch (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.js","sourceRoot":"","sources":["../../../src/tools/sources/handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAmB,MAAM,iBAAiB,CAAC;AACvF,OAAO,EACH,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,YAAY,EACZ,sBAAsB,GACzB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACH,2BAA2B,EAC3B,aAAa,EACb,mBAAmB,EACnB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"handlers.js","sourceRoot":"","sources":["../../../src/tools/sources/handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAmB,MAAM,iBAAiB,CAAC;A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AA0D;wBAC1D,2CAA2C;iBAClD;gBACH,CAAC,CAAC,EAAE,CAAC;SACZ,CAAC,CAAC;IACP,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACT,OAAO,WAAW,CAAC;YACf,KAAK,EAAE,CAAC;YACR,OAAO,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE;YACtC,IAAI,EAAE,wDAAwD;SACjE,CAAC,CAAC;IACP,CAAC;AACL,CAAC;AAED,uEAAuE;AACvE,+DAA+D;AAC/D,OAAO,EACH,uBAAuB,EACvB,yBAAyB,GAC5B,MAAM,oBAAoB,CAAC"}
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
*
|
|
21
21
|
* @license MIT
|
|
22
22
|
*/
|
|
23
|
+
import { type TableColumn } from '@getimo/mcp-toolkit';
|
|
23
24
|
import { z } from 'zod';
|
|
25
|
+
import type { ToolContent } from './tool-builder/types.js';
|
|
24
26
|
/**
|
|
25
27
|
* Optional whitelist of fields. Per Design §3.5 the cap is 40 to stop
|
|
26
28
|
* runaway prompts from blowing up the request size; nested paths
|
|
@@ -33,6 +35,43 @@ export declare const FIELDS: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
|
33
35
|
* `{elements: [...], etag}` and `fields[]` projection becomes meaningful.
|
|
34
36
|
*/
|
|
35
37
|
export declare const FLAT: z.ZodDefault<z.ZodBoolean>;
|
|
38
|
+
/**
|
|
39
|
+
* G-B (Glöckle 2026-06-26): an OPTIONAL caller-supplied cap on the size of
|
|
40
|
+
* the LLM-visible text leg of a high-volume read tool, so an agent on a
|
|
41
|
+
* tight context budget can bound a single read instead of relying solely on
|
|
42
|
+
* the toolkit's count-driven default cap (2000 / 4000 / 8000 chars). Cuts
|
|
43
|
+
* the TEXT leg only — structuredContent (the UI / typed payload) is never
|
|
44
|
+
* truncated, so a host that surfaces structuredContent still sees the full
|
|
45
|
+
* result. Floor of 200 stops a pathological `max_chars: 1` from yielding an
|
|
46
|
+
* all-marker, no-content body.
|
|
47
|
+
*/
|
|
48
|
+
export declare const MAX_CHARS: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
/**
|
|
50
|
+
* G-B: shared opaque offset-cursor codec for client-side pagination.
|
|
51
|
+
*
|
|
52
|
+
* `pages_list` (B2) shipped a private copy of this; `sources_list` (G-B) needs
|
|
53
|
+
* the identical contract (a `base64url("o:<n>")` token, also tolerant of the
|
|
54
|
+
* raw `o:<n>` form for hand-crafted iteration). Extracted here so both list
|
|
55
|
+
* tools encode/decode byte-identically — a cursor handed back to either tool
|
|
56
|
+
* means the same offset.
|
|
57
|
+
*/
|
|
58
|
+
export declare function decodeOffsetCursor(cursor: string | undefined): number;
|
|
59
|
+
export declare function encodeOffsetCursor(offset: number): string;
|
|
60
|
+
/**
|
|
61
|
+
* G-B: cap the text leg of an already-built tool result at `maxChars`.
|
|
62
|
+
*
|
|
63
|
+
* Pure: returns a NEW result, never mutates. Truncates ONLY the first text
|
|
64
|
+
* content block (the LLM-visible leg) when it exceeds `maxChars`; every other
|
|
65
|
+
* block — and `structuredContent` / `_meta` — passes through untouched so the
|
|
66
|
+
* UI / typed payload remains complete. A no-op when `maxChars` is undefined,
|
|
67
|
+
* when the first block is not text, or when the text is already within budget.
|
|
68
|
+
*
|
|
69
|
+
* The slice reserves room for the truncation marker so the returned text never
|
|
70
|
+
* exceeds `maxChars`.
|
|
71
|
+
*/
|
|
72
|
+
export declare function applyMaxChars<R extends {
|
|
73
|
+
content: ToolContent[];
|
|
74
|
+
}>(result: R, maxChars: number | undefined): R;
|
|
36
75
|
/**
|
|
37
76
|
* Default fields echoed when the caller omits `fields`. Following the
|
|
38
77
|
* apimapper-mcp convention these are **echo-only** — projection itself
|
|
@@ -103,4 +142,38 @@ export interface ProjectionFeedback {
|
|
|
103
142
|
readonly unknown_fields: readonly string[];
|
|
104
143
|
}
|
|
105
144
|
export declare function projectionFeedback(items: readonly Record<string, unknown>[], requested: readonly string[] | undefined): ProjectionFeedback | undefined;
|
|
145
|
+
/**
|
|
146
|
+
* F23 (2026-06-09): single source of truth for the LOUD text-leg warning
|
|
147
|
+
* a tool appends to its table header when a `fields[]` projection
|
|
148
|
+
* contained keys that did not exist on any row.
|
|
149
|
+
*
|
|
150
|
+
* Before this helper every read tool assembled the note inline (subtly
|
|
151
|
+
* different wording per tool, and a new tool wiring `projectionFeedback`
|
|
152
|
+
* could silently forget the text-leg note entirely — only the
|
|
153
|
+
* structuredContent `unknown_fields` array surfaced it, which cold
|
|
154
|
+
* agents never read). Centralising the string here means ALL tools
|
|
155
|
+
* surface the identical, self-correcting signal:
|
|
156
|
+
*
|
|
157
|
+
* " (unknown projection fields ignored: type — available: rel_path, …)"
|
|
158
|
+
*
|
|
159
|
+
* Returns the EMPTY string when there is nothing to warn about (feedback
|
|
160
|
+
* undefined, or `unknown_fields` empty) so call-sites can unconditionally
|
|
161
|
+
* append the result to their header.
|
|
162
|
+
*
|
|
163
|
+
* The leading space lets a call-site write `header${warning}` without an
|
|
164
|
+
* extra separator; the parentheses keep it visually scoped inside the
|
|
165
|
+
* header line.
|
|
166
|
+
*/
|
|
167
|
+
export declare function projectionWarning(feedback: ProjectionFeedback | undefined): string;
|
|
168
|
+
/**
|
|
169
|
+
* Build slim text-table columns from a caller-supplied `fields[]` projection,
|
|
170
|
+
* so a list tool's TEXT leg (what the LLM reads) honors `fields` instead of
|
|
171
|
+
* always rendering the full row set. Without this the projection only narrows
|
|
172
|
+
* the structuredContent leg while the text table still emits — and gets
|
|
173
|
+
* truncated at — every column (the Glöckle "fields[] ignored" finding).
|
|
174
|
+
*
|
|
175
|
+
* Width heuristic: path / URL / id-like keys get a wide column, everything
|
|
176
|
+
* else a modest one; labels are uppercased to match the toolkit style.
|
|
177
|
+
*/
|
|
178
|
+
export declare function columnsFromFields(fields: readonly string[]): TableColumn[];
|
|
106
179
|
//# sourceMappingURL=sparse-fields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sparse-fields.d.ts","sourceRoot":"","sources":["../../src/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