@wootsup/yt-builder-mcp 1.1.7 → 1.3.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 +14 -10
- package/bin/yt-builder-mcp.js +55 -40
- package/dist/auth.d.ts +18 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +18 -0
- package/dist/auth.js.map +1 -1
- 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/invocation-decision.d.ts +57 -0
- package/dist/cli/invocation-decision.d.ts.map +1 -0
- package/dist/cli/invocation-decision.js +86 -0
- package/dist/cli/invocation-decision.js.map +1 -0
- package/dist/client.d.ts +28 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +40 -1
- package/dist/client.js.map +1 -1
- package/dist/clients/claude-code.d.ts.map +1 -1
- package/dist/clients/claude-code.js +3 -1
- package/dist/clients/claude-code.js.map +1 -1
- package/dist/clients/claude-desktop.d.ts.map +1 -1
- package/dist/clients/claude-desktop.js +3 -1
- package/dist/clients/claude-desktop.js.map +1 -1
- package/dist/clients/cline.d.ts.map +1 -1
- package/dist/clients/cline.js +3 -1
- package/dist/clients/cline.js.map +1 -1
- package/dist/clients/codex-cli.d.ts +1 -1
- package/dist/clients/codex-cli.d.ts.map +1 -1
- package/dist/clients/codex-cli.js +98 -0
- package/dist/clients/codex-cli.js.map +1 -1
- package/dist/clients/continue.d.ts.map +1 -1
- package/dist/clients/continue.js +70 -1
- package/dist/clients/continue.js.map +1 -1
- package/dist/clients/cursor.d.ts.map +1 -1
- package/dist/clients/cursor.js +3 -1
- package/dist/clients/cursor.js.map +1 -1
- package/dist/clients/gemini-cli.d.ts.map +1 -1
- package/dist/clients/gemini-cli.js +3 -1
- package/dist/clients/gemini-cli.js.map +1 -1
- package/dist/clients/index.d.ts +104 -0
- package/dist/clients/index.d.ts.map +1 -1
- package/dist/clients/index.js +141 -0
- package/dist/clients/index.js.map +1 -1
- package/dist/clients/roo-code.d.ts.map +1 -1
- package/dist/clients/roo-code.js +3 -1
- package/dist/clients/roo-code.js.map +1 -1
- package/dist/clients/zed.d.ts.map +1 -1
- package/dist/clients/zed.js +3 -1
- package/dist/clients/zed.js.map +1 -1
- 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 +55 -5
- package/dist/gateway/essentials.js.map +1 -1
- package/dist/gateway/test-support.d.ts +3 -3
- package/dist/gateway/test-support.js +3 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/install-skill.js +1 -1
- package/dist/proxy/bridge.d.ts +36 -0
- package/dist/proxy/bridge.d.ts.map +1 -0
- package/dist/proxy/bridge.js +129 -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 +6 -4
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +14 -4
- package/dist/server.js.map +1 -1
- package/dist/setup-cli.d.ts +41 -0
- package/dist/setup-cli.d.ts.map +1 -1
- package/dist/setup-cli.js +163 -1
- package/dist/setup-cli.js.map +1 -1
- package/dist/setup-prompts.d.ts +23 -0
- package/dist/setup-prompts.d.ts.map +1 -1
- package/dist/setup-prompts.js +76 -1
- package/dist/setup-prompts.js.map +1 -1
- package/dist/setup-wizard.d.ts.map +1 -1
- package/dist/setup-wizard.js +7 -0
- package/dist/setup-wizard.js.map +1 -1
- package/dist/sites/bootstrap.d.ts +41 -0
- package/dist/sites/bootstrap.d.ts.map +1 -0
- package/dist/sites/bootstrap.js +58 -0
- package/dist/sites/bootstrap.js.map +1 -0
- package/dist/sites/client-pool.d.ts +33 -0
- package/dist/sites/client-pool.d.ts.map +1 -1
- package/dist/sites/client-pool.js +69 -1
- 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/index.d.ts.map +1 -1
- package/dist/sites/tools/index.js +9 -1
- package/dist/sites/tools/index.js.map +1 -1
- package/dist/sites/tools/use-site.d.ts +47 -0
- package/dist/sites/tools/use-site.d.ts.map +1 -0
- package/dist/sites/tools/use-site.js +203 -0
- package/dist/sites/tools/use-site.js.map +1 -0
- 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 +75 -18
- package/dist/tools/elements/builders.js.map +1 -1
- package/dist/tools/elements/handlers-write.d.ts +20 -3
- package/dist/tools/elements/handlers-write.d.ts.map +1 -1
- package/dist/tools/elements/handlers-write.js +372 -10
- package/dist/tools/elements/handlers-write.js.map +1 -1
- package/dist/tools/elements/handlers.d.ts +6 -1
- package/dist/tools/elements/handlers.d.ts.map +1 -1
- package/dist/tools/elements/handlers.js +77 -10
- 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 +134 -12
- package/dist/tools/format/elements-format.js.map +1 -1
- package/dist/tools/format/inspection-format.d.ts +29 -0
- package/dist/tools/format/inspection-format.d.ts.map +1 -1
- package/dist/tools/format/inspection-format.js +99 -22
- 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 +24 -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 +297 -5
- 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 +18 -3
- package/dist/tools/multi-items/builders.js.map +1 -1
- package/dist/tools/multi-items/clean-implode-handler.d.ts.map +1 -1
- package/dist/tools/multi-items/clean-implode-handler.js +2 -2
- package/dist/tools/multi-items/clean-implode-handler.js.map +1 -1
- package/dist/tools/multi-items/format/inspection-format.d.ts +41 -0
- package/dist/tools/multi-items/format/inspection-format.d.ts.map +1 -0
- package/dist/tools/multi-items/format/inspection-format.js +64 -0
- package/dist/tools/multi-items/format/inspection-format.js.map +1 -0
- package/dist/tools/multi-items/inspect-handler.d.ts +50 -2
- package/dist/tools/multi-items/inspect-handler.d.ts.map +1 -1
- package/dist/tools/multi-items/inspect-handler.js +237 -10
- package/dist/tools/multi-items/inspect-handler.js.map +1 -1
- package/dist/tools/multi-items/inspection-cache.d.ts +85 -0
- package/dist/tools/multi-items/inspection-cache.d.ts.map +1 -0
- package/dist/tools/multi-items/inspection-cache.js +126 -0
- package/dist/tools/multi-items/inspection-cache.js.map +1 -0
- package/dist/tools/pages/builders.d.ts +31 -2
- package/dist/tools/pages/builders.d.ts.map +1 -1
- package/dist/tools/pages/builders.js +173 -17
- package/dist/tools/pages/builders.js.map +1 -1
- package/dist/tools/pages/handlers-read.d.ts +6 -2
- package/dist/tools/pages/handlers-read.d.ts.map +1 -1
- package/dist/tools/pages/handlers-read.js +228 -26
- package/dist/tools/pages/handlers-read.js.map +1 -1
- package/dist/tools/pages/handlers-write.d.ts +143 -7
- package/dist/tools/pages/handlers-write.d.ts.map +1 -1
- package/dist/tools/pages/handlers-write.js +215 -11
- 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 +166 -0
- package/dist/tools/pages/schemas.d.ts.map +1 -1
- package/dist/tools/pages/schemas.js +347 -0
- package/dist/tools/pages/schemas.js.map +1 -1
- package/dist/tools/shared-schemas.d.ts.map +1 -1
- package/dist/tools/shared-schemas.js +26 -11
- 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 +64 -6
- 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 +219 -5
- package/dist/tools/sources/handlers-bind.js.map +1 -1
- package/dist/tools/sources/handlers.d.ts +3 -0
- package/dist/tools/sources/handlers.d.ts.map +1 -1
- package/dist/tools/sources/handlers.js +45 -8
- package/dist/tools/sources/handlers.js.map +1 -1
- package/dist/tools/sparse-fields.d.ts +23 -0
- package/dist/tools/sparse-fields.d.ts.map +1 -1
- package/dist/tools/sparse-fields.js +29 -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/uninstall-skill.d.ts +52 -0
- package/dist/uninstall-skill.d.ts.map +1 -0
- package/dist/uninstall-skill.js +146 -0
- package/dist/uninstall-skill.js.map +1 -0
- package/dist/uninstall.d.ts +73 -0
- package/dist/uninstall.d.ts.map +1 -0
- package/dist/uninstall.js +82 -0
- package/dist/uninstall.js.map +1 -0
- package/icon.png +0 -0
- package/manifest.json +10 -10
- package/package.json +7 -3
- package/skills/yt-builder-mcp/SKILL.md +157 -88
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
* @license MIT
|
|
9
9
|
*/
|
|
10
10
|
import { detailResult, tableResult } from '@getimo/mcp-toolkit';
|
|
11
|
+
import { encodeTemplateId } from '../../client.js';
|
|
11
12
|
import { flattenLayout } from '../layout-flatten.js';
|
|
12
13
|
import { PAGES_COMPACT_COLUMNS, PAGES_TABLE_COLUMNS, SCHEMA_COMPACT_COLUMNS, SCHEMA_TABLE_COLUMNS, buildEtagDetail, buildSchemaRows, mapPageRow, } from '../format/pages-format.js';
|
|
13
|
-
import { DEFAULT_FIELDS_PAGES_LIST, projectFields, projectedFieldsEcho, projectionFeedback, } from '../sparse-fields.js';
|
|
14
|
+
import { DEFAULT_FIELDS_PAGES_LIST, projectFields, projectedFieldsEcho, projectionFeedback, projectionWarning, } from '../sparse-fields.js';
|
|
14
15
|
import { errorResult, jsonResult, structuredResult, } from '../tool-builder.js';
|
|
15
16
|
// ─── pages_list ─────────────────────────────────────────────────────
|
|
16
17
|
export async function handlePagesList(client, { fields }) {
|
|
@@ -27,9 +28,8 @@ export async function handlePagesList(client, { fields }) {
|
|
|
27
28
|
const items = projectFields(mapped, fields, DEFAULT_FIELDS_PAGES_LIST);
|
|
28
29
|
const echo = projectedFieldsEcho(fields, DEFAULT_FIELDS_PAGES_LIST);
|
|
29
30
|
const feedback = projectionFeedback(mapped, fields);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
: '';
|
|
31
|
+
// F23 (2026-06-09): shared loud-warning helper.
|
|
32
|
+
const unknownNote = projectionWarning(feedback);
|
|
33
33
|
const toolkitResult = tableResult(mapped, {
|
|
34
34
|
columns: [...PAGES_TABLE_COLUMNS],
|
|
35
35
|
compactColumns: [...PAGES_COMPACT_COLUMNS],
|
|
@@ -44,6 +44,7 @@ export async function handlePagesList(client, { fields }) {
|
|
|
44
44
|
...(feedback !== undefined ? {
|
|
45
45
|
available_fields: [...feedback.available_fields],
|
|
46
46
|
unknown_fields: [...feedback.unknown_fields],
|
|
47
|
+
...(unknownNote.trim() !== '' ? { projection_warning: unknownNote.trim() } : {}),
|
|
47
48
|
} : {}),
|
|
48
49
|
});
|
|
49
50
|
}
|
|
@@ -56,9 +57,129 @@ export async function handlePagesList(client, { fields }) {
|
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
// ─── page_get_layout ────────────────────────────────────────────────
|
|
59
|
-
|
|
60
|
+
/**
|
|
61
|
+
* F195 (P0, 2026-06-12) — per-process layout-read dedup cache.
|
|
62
|
+
*
|
|
63
|
+
* The Desktop-E2E #2 forensic showed two identical 84 KB full-layout dumps in
|
|
64
|
+
* a single session (58 % of the 330 KB output budget). The same agent re-read
|
|
65
|
+
* the SAME template at the SAME state — the second dump was pure waste. This
|
|
66
|
+
* module-internal cache records, keyed by `site|template_id`, the LAST etag
|
|
67
|
+
* served as a FULL read. On a subsequent full read whose server-returned etag
|
|
68
|
+
* matches, the handler short-circuits with a one-line `[unchanged]` notice
|
|
69
|
+
* instead of re-emitting the body. `force:true` bypasses; bindings_only reads
|
|
70
|
+
* are never deduped (they are already cheap and are the recommended path).
|
|
71
|
+
*
|
|
72
|
+
* Cache key includes the site so multi-site sessions never cross-contaminate.
|
|
73
|
+
* It is a plain module Map (process-scoped) — exactly the granularity the
|
|
74
|
+
* forensic targets (duplicate reads within one MCP session).
|
|
75
|
+
*/
|
|
76
|
+
const layoutDedupCache = new Map();
|
|
77
|
+
/** Test-only: clear the dedup cache between cases (mirrors the bus reset idiom). */
|
|
78
|
+
export function __resetLayoutDedupCacheForTests() {
|
|
79
|
+
layoutDedupCache.clear();
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Single SSoT unwrap rule for `page_get_layout(flat:true)`.
|
|
83
|
+
*
|
|
84
|
+
* flattenLayout iterates the TOP-LEVEL ENTRIES of whatever it is given.
|
|
85
|
+
* That is correct for a *container* (an array, or an index-keyed object
|
|
86
|
+
* `{0:{...},1:{...}}`) where every entry is itself an element node. It
|
|
87
|
+
* is WRONG for a single root NODE (`{type:'layout', children:[...]}`),
|
|
88
|
+
* whose top-level entries are `type` / `children` / `version` — not
|
|
89
|
+
* element nodes. Handing a root node straight to flattenLayout emits
|
|
90
|
+
* nothing (the C4 / Wave-9 F7 silent-`elements:[]` bug class).
|
|
91
|
+
*
|
|
92
|
+
* Rule: a value that looks like a single root node (`type === 'layout'`
|
|
93
|
+
* with an array `children`) is unwrapped to its `.children` array; any
|
|
94
|
+
* other value passes through untouched so containers and the legacy
|
|
95
|
+
* index-keyed object shape keep working unchanged.
|
|
96
|
+
*/
|
|
97
|
+
function unwrapToWalkableContainer(value) {
|
|
98
|
+
if (value !== null &&
|
|
99
|
+
typeof value === 'object' &&
|
|
100
|
+
!Array.isArray(value)) {
|
|
101
|
+
const obj = value;
|
|
102
|
+
if (obj.type === 'layout' && Array.isArray(obj.children)) {
|
|
103
|
+
return obj.children;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Decide whether a ZERO-element flatten should surface the C4
|
|
110
|
+
* "layout shape not recognized" warning.
|
|
111
|
+
*
|
|
112
|
+
* The decision runs on the RESOLVED walk container (`layoutRoot`, the value
|
|
113
|
+
* actually handed to `flattenLayout` after `unwrapToWalkableContainer`),
|
|
114
|
+
* NOT the raw `data.layout` envelope. That is the F29 calibration
|
|
115
|
+
* (2026-06-10):
|
|
116
|
+
*
|
|
117
|
+
* - An ARRAY (empty or otherwise) is a recognized container shape. A
|
|
118
|
+
* bare root node `{type:'layout', children:[]}` (a freshly-created
|
|
119
|
+
* empty article / per-page layout, or a fresh empty theme template)
|
|
120
|
+
* unwraps to its empty `.children` array, so it lands here and is
|
|
121
|
+
* treated as a GENUINELY empty page → NO warning. This kills the
|
|
122
|
+
* false-positive the raw-envelope check produced (the bare root node
|
|
123
|
+
* is a non-empty OBJECT — keys `type`/`children` — so the old check
|
|
124
|
+
* mistook "empty container" for "had content").
|
|
125
|
+
* - An OBJECT with ZERO keys (e.g. an empty index-keyed container `{}`)
|
|
126
|
+
* is also genuinely empty → NO warning.
|
|
127
|
+
* - An OBJECT with keys that nonetheless flattened to nothing is an
|
|
128
|
+
* unrecognized / future shape masquerading as empty → WARN (the
|
|
129
|
+
* original C4 contract; the `{some_future_key, another}` fixture).
|
|
130
|
+
*
|
|
131
|
+
* @param layoutRoot The resolved walk container passed to flattenLayout.
|
|
132
|
+
*/
|
|
133
|
+
function isUnrecognizedNonEmptyLayout(layoutRoot) {
|
|
134
|
+
if (Array.isArray(layoutRoot)) {
|
|
135
|
+
// Recognized container shape — empty or not, never "unrecognized".
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
if (layoutRoot !== null && typeof layoutRoot === 'object') {
|
|
139
|
+
// A non-empty object that produced zero elements is the
|
|
140
|
+
// unrecognized-shape case worth warning about; an empty object is
|
|
141
|
+
// a genuinely empty container.
|
|
142
|
+
return Object.keys(layoutRoot).length > 0;
|
|
143
|
+
}
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
export async function handlePageGetLayout(client, { template_id, flat, fields, mode, force }) {
|
|
60
147
|
try {
|
|
61
|
-
|
|
148
|
+
// F195 (P0): forward `mode=bindings_only` so the server returns the
|
|
149
|
+
// trimmed binding skeleton the dynamize/bind workflow needs. `full`
|
|
150
|
+
// (default) appends no query param — byte-identical to the pre-F195
|
|
151
|
+
// request shape.
|
|
152
|
+
const isBindingsOnly = mode === 'bindings_only';
|
|
153
|
+
const query = isBindingsOnly ? '?mode=bindings_only' : '';
|
|
154
|
+
const data = await client.get(`/pages/${encodeTemplateId(template_id)}/layout${query}`);
|
|
155
|
+
// F195 (P0): per-process dedup of REPEATED full reads. bindings_only
|
|
156
|
+
// is already cheap (and the recommended path), so it is never deduped.
|
|
157
|
+
// The skeleton passes straight through unchanged.
|
|
158
|
+
if (isBindingsOnly) {
|
|
159
|
+
return jsonResult(data);
|
|
160
|
+
}
|
|
161
|
+
const etag = typeof data.etag === 'string' ? data.etag : undefined;
|
|
162
|
+
const dedupKey = `${client.getPlatform().baseUrl}|${template_id}`;
|
|
163
|
+
if (force !== true && flat !== true && etag !== undefined) {
|
|
164
|
+
const lastServed = layoutDedupCache.get(dedupKey);
|
|
165
|
+
if (lastServed === etag) {
|
|
166
|
+
// Identical (template, etag) already emitted this process —
|
|
167
|
+
// skip the re-dump (the forensic's duplicate-84KB waste).
|
|
168
|
+
return jsonResult({
|
|
169
|
+
unchanged: true,
|
|
170
|
+
template_id,
|
|
171
|
+
etag,
|
|
172
|
+
note: `[unchanged] layout identical to your previous read (etag ${etag}) — ` +
|
|
173
|
+
're-read skipped; pass force:true to re-fetch.',
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
// Record the etag served for this (nested) full read so a later
|
|
178
|
+
// identical read can be short-circuited. Only nested full reads are
|
|
179
|
+
// tracked — flat/projected reads have a different downstream shape.
|
|
180
|
+
if (flat !== true && etag !== undefined) {
|
|
181
|
+
layoutDedupCache.set(dedupKey, etag);
|
|
182
|
+
}
|
|
62
183
|
if (flat !== true) {
|
|
63
184
|
// Default: nested passthrough — unchanged from pre-G.3.
|
|
64
185
|
return jsonResult(data);
|
|
@@ -67,34 +188,98 @@ export async function handlePageGetLayout(client, { template_id, flat, fields })
|
|
|
67
188
|
// pickFields per element when `fields[]` was passed; echo the
|
|
68
189
|
// projection so the AI knows the per-item shape it received.
|
|
69
190
|
//
|
|
70
|
-
//
|
|
71
|
-
//
|
|
72
|
-
//
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
//
|
|
76
|
-
//
|
|
77
|
-
//
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
191
|
+
// Several distinct envelope shapes reach this handler — all must
|
|
192
|
+
// flatten to the same element list. Resolution funnels through
|
|
193
|
+
// ONE rule (`unwrapToWalkableContainer`) so a single root NODE
|
|
194
|
+
// (`{type:'layout', children:[...]}`) is never handed to
|
|
195
|
+
// flattenLayout directly:
|
|
196
|
+
//
|
|
197
|
+
// (A) Theme templates: `data.layout = {query, type:'single-post',
|
|
198
|
+
// name:'Post', layout:{type:'layout', children:[...],
|
|
199
|
+
// version}}` — the actual node tree lives under the INNER
|
|
200
|
+
// `layout` field. That inner value is itself a single root
|
|
201
|
+
// NODE (not the index-keyed `{0:{...}}` container the older
|
|
202
|
+
// fixtures assumed). Handing the root node to flattenLayout
|
|
203
|
+
// made it iterate the node's OWN top-level entries
|
|
204
|
+
// (`['type',...]`, `['children',[...]]`, `['version',...]`)
|
|
205
|
+
// and emit nothing — `elements:[]` silently (C4 fix,
|
|
206
|
+
// 2026-06-09; verified on wp-dev5 template bFIb-syj). The
|
|
207
|
+
// inner-root-node case is now unwrapped to its `.children`,
|
|
208
|
+
// unifying it with the per-page path below.
|
|
209
|
+
//
|
|
210
|
+
// Legacy F-208 shape `{name, layout:{0:{...},1:{...}}}`
|
|
211
|
+
// (index-keyed inner container) still works: the inner
|
|
212
|
+
// value is NOT a root node, so it passes through to
|
|
213
|
+
// flattenLayout unchanged.
|
|
214
|
+
//
|
|
215
|
+
// (B) Per-page templates (Wave-9 F7 fix, 2026-05-29): cold-AI
|
|
216
|
+
// #8 reported `elements:[]` for a non-empty per-page
|
|
217
|
+
// template. Per-page layouts come from PerPageLayoutEncoder
|
|
218
|
+
// which decodes to the BARE root node
|
|
219
|
+
// `{type:'layout', children:[{...},{...}]}` — NO outer
|
|
220
|
+
// `{name, layout:{...}}` wrapper. Same root-node unwrap
|
|
221
|
+
// rule as (A), applied at the top level.
|
|
222
|
+
//
|
|
223
|
+
// The unwrap rule (single SSoT): if a value is a single root node
|
|
224
|
+
// (`type === 'layout'` with an array `children`), iterate its
|
|
225
|
+
// `.children` array so the walker sees real element nodes and
|
|
226
|
+
// paths anchor on `/layout/children/0`, `/layout/children/1`, …
|
|
227
|
+
const dataLayout = data.layout;
|
|
228
|
+
const isObjectNode = dataLayout !== null &&
|
|
229
|
+
typeof dataLayout === 'object' &&
|
|
230
|
+
!Array.isArray(dataLayout);
|
|
231
|
+
const layoutObj = isObjectNode ? dataLayout : null;
|
|
232
|
+
const hasInnerLayoutField = layoutObj !== null &&
|
|
233
|
+
'layout' in layoutObj &&
|
|
234
|
+
layoutObj.layout !== null &&
|
|
235
|
+
typeof layoutObj.layout === 'object';
|
|
236
|
+
// Resolve the candidate container ONE hop from the envelope:
|
|
237
|
+
// shape (A) descends into the inner `layout`; everything else
|
|
238
|
+
// starts from `data.layout` directly. Then funnel through the
|
|
239
|
+
// shared root-node unwrap so shapes (A) and (B) — and any future
|
|
240
|
+
// single-root-node envelope — collapse identically.
|
|
241
|
+
const candidate = hasInnerLayoutField ? layoutObj.layout : dataLayout;
|
|
242
|
+
const layoutRoot = unwrapToWalkableContainer(candidate);
|
|
86
243
|
const flatElements = flattenLayout(layoutRoot);
|
|
244
|
+
// Non-silent fallback (C4) + F29 calibration: if the walk yields
|
|
245
|
+
// ZERO elements AND the resolved walk container is an unrecognized
|
|
246
|
+
// NON-EMPTY shape, surface a warning so it can never pass silently.
|
|
247
|
+
// A genuinely empty container (an empty array — including a bare
|
|
248
|
+
// `{type:'layout', children:[]}` root that unwrapped to `[]` — or
|
|
249
|
+
// an empty object) is a real empty page and must NOT warn.
|
|
250
|
+
const warning = flatElements.length === 0 && isUnrecognizedNonEmptyLayout(layoutRoot)
|
|
251
|
+
? 'layout shape not recognized - flat view may be incomplete'
|
|
252
|
+
: undefined;
|
|
87
253
|
const projected = projectFields(flatElements, fields,
|
|
88
254
|
// No default-set on layout.flat: keep "all" semantics
|
|
89
255
|
// unless caller opts-in. The echo helper below mirrors that.
|
|
90
256
|
[]);
|
|
91
257
|
const echo = projectedFieldsEcho(fields, undefined);
|
|
258
|
+
// F31 (2026-06-10): align the flat-projection path with F23 — when a
|
|
259
|
+
// caller-requested field appears on NO element (e.g. `label` on a
|
|
260
|
+
// YT4 layout), don't echo it in `projected_fields` with no signal.
|
|
261
|
+
// Compute the projection feedback over the FLAT element rows and
|
|
262
|
+
// surface `unknown_fields` + `available_fields` + a loud
|
|
263
|
+
// `projection_warning` (the shared F23 SSoT helper) so the agent can
|
|
264
|
+
// self-correct on the next call. Default-all callers (no fields[])
|
|
265
|
+
// get no audit overhead — projectionFeedback returns undefined.
|
|
266
|
+
const feedback = projectionFeedback(flatElements, fields);
|
|
267
|
+
const projectionNote = projectionWarning(feedback);
|
|
92
268
|
// 1.0.1 Wave-1.7 F-COLD-3: forward the canonical pointer base
|
|
93
269
|
// through the flat-projection path too so cold agents iterating
|
|
94
270
|
// with `flat: true` see the same hint they get on the nested
|
|
95
271
|
// default payload.
|
|
96
272
|
return jsonResult({
|
|
97
273
|
elements: projected,
|
|
274
|
+
...(warning !== undefined ? { warning } : {}),
|
|
275
|
+
...(feedback !== undefined ? {
|
|
276
|
+
available_fields: [...feedback.available_fields],
|
|
277
|
+
unknown_fields: [...feedback.unknown_fields],
|
|
278
|
+
} : {}),
|
|
279
|
+
// F31: trim the leading space the table-header helper prepends —
|
|
280
|
+
// here it rides in a JSON field, not a header string. Emitted
|
|
281
|
+
// ONLY when there's actually an unknown field to flag.
|
|
282
|
+
...(projectionNote !== '' ? { projection_warning: projectionNote.trimStart() } : {}),
|
|
98
283
|
...(typeof data.etag === 'string' ? { etag: data.etag } : {}),
|
|
99
284
|
...(typeof data.layout_root_pointer === 'string'
|
|
100
285
|
? { layout_root_pointer: data.layout_root_pointer }
|
|
@@ -117,7 +302,7 @@ export async function handlePageGetLayout(client, { template_id, flat, fields })
|
|
|
117
302
|
// ─── page_get_schema ────────────────────────────────────────────────
|
|
118
303
|
export async function handlePageGetSchema(client, { template_id }) {
|
|
119
304
|
try {
|
|
120
|
-
const data = await client.get(`/pages/${
|
|
305
|
+
const data = await client.get(`/pages/${encodeTemplateId(template_id)}/schema`);
|
|
121
306
|
const rawNodes = Array.isArray(data.nodes) ? data.nodes : [];
|
|
122
307
|
const items = buildSchemaRows(rawNodes.filter((x) => x !== null && typeof x === 'object'));
|
|
123
308
|
// Templates routinely exceed 21 nodes (a typical home page has
|
|
@@ -182,15 +367,32 @@ export async function handleGetEtag(client) {
|
|
|
182
367
|
*/
|
|
183
368
|
export async function handleTemplateSummary(client, { template_id }) {
|
|
184
369
|
try {
|
|
185
|
-
const data = await client.get(`/pages/${
|
|
370
|
+
const data = await client.get(`/pages/${encodeTemplateId(template_id)}/summary`);
|
|
186
371
|
// F-AUDIT-2 (2026-05-26): template_summary now declares
|
|
187
372
|
// TEMPLATE_SUMMARY_OUTPUT_SCHEMA. The SDK requires
|
|
188
373
|
// `structuredContent` when an outputSchema is present, otherwise
|
|
189
374
|
// it raises `-32602 Output validation error`. Wrap the raw body
|
|
190
375
|
// with `structuredResult` so the text leg (LLM-readable JSON)
|
|
191
376
|
// stays unchanged AND the structuredContent leg validates.
|
|
192
|
-
|
|
193
|
-
|
|
377
|
+
//
|
|
378
|
+
// Task #46 Friction-3 (2026-05-29): PHP's `json_encode([])` emits
|
|
379
|
+
// `[]` (array) — not `{}` (object). The REST handler emits
|
|
380
|
+
// `counts_by_type: []` for empty templates, but the outputSchema
|
|
381
|
+
// declares `z.record(z.string(), z.number())` which requires an
|
|
382
|
+
// object. The mismatch surfaces as `-32602 counts_by_type
|
|
383
|
+
// expected record, received array`, swallowing the entire response
|
|
384
|
+
// for any empty / freshly-created template. Normalize array→object
|
|
385
|
+
// here so the schema validates and the agent sees the (valid,
|
|
386
|
+
// empty) summary. Same defensive shape applies to any future
|
|
387
|
+
// map-typed REST field that might come back empty.
|
|
388
|
+
const normalized = {
|
|
389
|
+
...data,
|
|
390
|
+
};
|
|
391
|
+
if (Array.isArray(normalized.counts_by_type)) {
|
|
392
|
+
normalized.counts_by_type = {};
|
|
393
|
+
}
|
|
394
|
+
const toolkitResult = jsonResult(normalized);
|
|
395
|
+
return structuredResult({ content: toolkitResult.content }, normalized);
|
|
194
396
|
}
|
|
195
397
|
catch (e) {
|
|
196
398
|
return errorResult({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers-read.js","sourceRoot":"","sources":["../../../src/tools/pages/handlers-read.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"handlers-read.js","sourceRoot":"","sources":["../../../src/tools/pages/handlers-read.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACH,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,UAAU,GACb,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,yBAAyB,EACzB,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,WAAW,EACX,UAAU,EACV,gBAAgB,GAEnB,MAAM,oBAAoB,CAAC;AAE5B,uEAAuE;AAEvE,MAAM,CAAC,KAAK,UAAU,eAAe,CACjC,MAAkB,EAClB,EAAE,MAAM,EAAkC;IAE1C,IAAI,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,GAAG,CAAmC,QAAQ,CAAC,CAAC;QAC1E,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7D,MAAM,MAAM,GAAG,QAAQ;aAClB,MAAM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QACF,kEAAkE;QAClE,2DAA2D;QAC3D,iEAAiE;QACjE,gEAAgE;QAChE,0DAA0D;QAC1D,mEAAmE;QACnE,mEAAmE;QACnE,8DAA8D;QAC9D,6DAA6D;QAC7D,mDAAmD;QACnD,MAAM,UAAU,GAA4B;YACxC,GAAI,IAA2C;SAClD,CAAC;QACF,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;YAC3C,UAAU,CAAC,cAAc,GAAG,EAAE,CAAC;QACnC,CAAC;QACD,MAAM,aAAa,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;QAC7C,OAAO,gBAAgB,CACnB,EAAE,OAAO,EAAE,aAAa,CAAC,OAAO,EAAE,EAClC,UAAU,CACb,CAAC;IACN,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACT,OAAO,WAAW,CAAC;YACf,KAAK,EAAE,CAAC;YACR,OAAO,EAAE,EAAE,WAAW,EAAE;YACxB,IAAI,EAAE,gEAAgE;SACzE,CAAC,CAAC;IACP,CAAC;AACL,CAAC"}
|
|
@@ -1,21 +1,157 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Page-tool WRITE handlers — `page_save`, `page_publish
|
|
3
|
-
* the 3-phase progress contract
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* boundary, not the
|
|
2
|
+
* Page-tool WRITE handlers — `page_save`, `page_publish`, `pages_create`,
|
|
3
|
+
* `pages_delete`. All implement the 3-phase progress contract
|
|
4
|
+
* (PHASE_SEND → PHASE_SERVER → PHASE_CONFIRM). PHASE_SERVER is emitted
|
|
5
|
+
* BEFORE the await so the synthetic intermediate fires even when the
|
|
6
|
+
* REST call ultimately errors — the dispatch IS the boundary, not the
|
|
7
|
+
* response.
|
|
7
8
|
*
|
|
8
9
|
* Split out of `src/tools/pages.ts` (Round-2 R2-A2-CRIT1).
|
|
10
|
+
* Extended with pages_create / pages_delete (v1.2 — C2 + C3).
|
|
9
11
|
*
|
|
10
12
|
* @license MIT
|
|
11
13
|
*/
|
|
12
|
-
import type
|
|
14
|
+
import { type RestClient } from '../../client.js';
|
|
13
15
|
import { type HandlerExtra, type ToolResult } from '../tool-builder.js';
|
|
14
16
|
interface SavePublishInput {
|
|
15
17
|
template_id: string;
|
|
16
18
|
etag?: string;
|
|
17
19
|
}
|
|
18
|
-
|
|
20
|
+
interface SaveInput extends SavePublishInput {
|
|
21
|
+
/**
|
|
22
|
+
* F85 (2026-06-10): optional whole-layout atomic write. When supplied,
|
|
23
|
+
* the REST layer replaces the template tree (Layer-1 structural +
|
|
24
|
+
* Layer-2 element-type whitelist validated, under the same ETag lock)
|
|
25
|
+
* instead of only re-running save-transforms. Lets a wholesale
|
|
26
|
+
* dynamization land in one call rather than element-by-element surgery.
|
|
27
|
+
*/
|
|
28
|
+
layout?: Record<string, unknown>;
|
|
29
|
+
}
|
|
30
|
+
export declare function handlePageSave(client: RestClient, { template_id, etag, layout }: SaveInput, extra?: HandlerExtra): Promise<ToolResult>;
|
|
19
31
|
export declare function handlePagePublish(client: RestClient, { template_id, etag }: SavePublishInput, extra?: HandlerExtra): Promise<ToolResult>;
|
|
32
|
+
/**
|
|
33
|
+
* Input shape for the `pages_create` handler. Mirrors the Zod schema
|
|
34
|
+
* `PAGES_CREATE_INPUT` in `./schemas.ts` — kept as a structural
|
|
35
|
+
* `interface` here so the handler has no runtime Zod dependency and
|
|
36
|
+
* accepts whatever the MCP harness has already validated.
|
|
37
|
+
*/
|
|
38
|
+
interface PagesCreateInput {
|
|
39
|
+
readonly title: string;
|
|
40
|
+
readonly slug?: string;
|
|
41
|
+
readonly status?: 'publish' | 'draft' | 'pending' | 'private' | 'future';
|
|
42
|
+
readonly layout?: Record<string, unknown>;
|
|
43
|
+
readonly dry_run?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* F12 (2026-06-09): one-boolean publish shortcut. Maps to `status`
|
|
46
|
+
* before the REST call (the host has no `published` field). See
|
|
47
|
+
* {@link resolveCreateStatus}.
|
|
48
|
+
*/
|
|
49
|
+
readonly published?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* F64 (2026-06-10): Joomla-only — create a SEF menu-item route for
|
|
52
|
+
* the new article (true = hidden default menutype, string = explicit
|
|
53
|
+
* menutype). Passed through to the REST body verbatim.
|
|
54
|
+
*/
|
|
55
|
+
readonly menu_item?: boolean | string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* F12 (2026-06-09): collapse the friendly `published` boolean into the
|
|
59
|
+
* canonical `status` the PHP host understands.
|
|
60
|
+
*
|
|
61
|
+
* Precedence: an EXPLICIT `status` always wins — `published` is the
|
|
62
|
+
* ergonomic shortcut, not an override. So:
|
|
63
|
+
* - status given → use it verbatim (published ignored).
|
|
64
|
+
* - status absent + true → 'publish' (WP post_status=publish, Joomla state=1).
|
|
65
|
+
* - status absent + false/∅ → undefined (server applies its draft default).
|
|
66
|
+
*
|
|
67
|
+
* Returning `undefined` (rather than an explicit `'draft'`) for the
|
|
68
|
+
* default case preserves the existing wire shape — the server's Q6
|
|
69
|
+
* default-to-draft logic stays authoritative and the body byte-shape is
|
|
70
|
+
* unchanged for legacy callers that never sent `published`.
|
|
71
|
+
*/
|
|
72
|
+
export declare function resolveCreateStatus(status: PagesCreateInput['status'], published: boolean | undefined): PagesCreateInput['status'] | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* `pages_create` — POST `/pages` with the provided body. On
|
|
75
|
+
* `dry_run:true`, the REST handler runs validation Layers 1+2+4
|
|
76
|
+
* without persisting and returns a dry-run report. On non-dry-run
|
|
77
|
+
* success, the REST handler returns 201 with the wire shape of
|
|
78
|
+
* `PAGES_CREATE_OUTPUT_SCHEMA`.
|
|
79
|
+
*/
|
|
80
|
+
export declare function handlePagesCreate(client: RestClient, input: PagesCreateInput, extra?: HandlerExtra): Promise<ToolResult>;
|
|
81
|
+
/**
|
|
82
|
+
* A single `leaf_map` value — string OR the F96 `{name, filters?}` shape.
|
|
83
|
+
* The handler forwards the whole `leaf_map` verbatim; the PHP
|
|
84
|
+
* LayoutDynamizer normalises + applies it.
|
|
85
|
+
*/
|
|
86
|
+
type DynamizeFieldMapping = string | {
|
|
87
|
+
name: string;
|
|
88
|
+
filters?: Record<string, unknown>;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Input shape for the `page_dynamize` handler. Mirrors the Zod
|
|
92
|
+
* `PAGE_DYNAMIZE_INPUT` in `./schemas.ts` — kept as a structural interface
|
|
93
|
+
* so the handler has no runtime Zod dependency and forwards whatever the
|
|
94
|
+
* MCP harness already validated.
|
|
95
|
+
*/
|
|
96
|
+
interface PageDynamizeInput {
|
|
97
|
+
readonly template_id: string;
|
|
98
|
+
readonly section_name?: string;
|
|
99
|
+
readonly element_path?: string;
|
|
100
|
+
readonly list_source_name?: string;
|
|
101
|
+
readonly source_map?: ReadonlyArray<{
|
|
102
|
+
readonly match: string;
|
|
103
|
+
readonly source_name: string;
|
|
104
|
+
readonly leaf_map?: Record<string, DynamizeFieldMapping>;
|
|
105
|
+
}>;
|
|
106
|
+
readonly leaf_map?: Record<string, DynamizeFieldMapping>;
|
|
107
|
+
readonly conditions?: Record<string, {
|
|
108
|
+
name: string;
|
|
109
|
+
filters: {
|
|
110
|
+
condition: '!' | '!!';
|
|
111
|
+
};
|
|
112
|
+
}>;
|
|
113
|
+
readonly remove_leaves?: readonly string[];
|
|
114
|
+
readonly page: {
|
|
115
|
+
readonly title: string;
|
|
116
|
+
readonly slug?: string;
|
|
117
|
+
readonly published?: boolean;
|
|
118
|
+
readonly status?: string;
|
|
119
|
+
readonly menu_item?: boolean | string;
|
|
120
|
+
};
|
|
121
|
+
readonly etag?: string;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* `page_dynamize` — POST `/pages/dynamize`. THE one-call canonical path to
|
|
125
|
+
* dynamize an existing designed section: the server copies the reference
|
|
126
|
+
* subtree byte-identically and swaps only the mapped queries + leaf
|
|
127
|
+
* field-names (the recipe of `dynamize-existing-layout.md` as CODE), then
|
|
128
|
+
* creates the page through the same hardened create path. The 201 carries
|
|
129
|
+
* a `summary` self-check ({queries_swapped, leaves_remapped, leaves_kept,
|
|
130
|
+
* leaves_removed, unmatched_map_keys, kept_unresolvable}). A non-empty
|
|
131
|
+
* `unmatched_map_keys` means the agent mapped a field the reference subtree
|
|
132
|
+
* never bound; a non-zero `kept_unresolvable.count` means a sub-query panel
|
|
133
|
+
* had no flow field (its leaves render empty) — extend leaf_map with the
|
|
134
|
+
* qualified "<subquery>.<leaf>" keys and retry.
|
|
135
|
+
*/
|
|
136
|
+
export declare function handlePageDynamize(client: RestClient, input: PageDynamizeInput, extra?: HandlerExtra): Promise<ToolResult>;
|
|
137
|
+
/**
|
|
138
|
+
* Input shape for the `pages_delete` handler. Mirrors the Zod schema
|
|
139
|
+
* `PAGES_DELETE_INPUT` in `./schemas.ts`. `confirm` is `true` literal —
|
|
140
|
+
* the MCP boundary rejects requests without `confirm:true` before they
|
|
141
|
+
* ever reach this handler.
|
|
142
|
+
*/
|
|
143
|
+
interface PagesDeleteInput {
|
|
144
|
+
readonly post_id: number;
|
|
145
|
+
readonly confirm: true;
|
|
146
|
+
readonly force?: boolean;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* `pages_delete` — DELETE `/pages/{post_id}` with confirm + force in the
|
|
150
|
+
* body. `force:false` (default) trashes via `wp_delete_post(false)`
|
|
151
|
+
* (recoverable via wp-admin). `force:true` hard-deletes the post
|
|
152
|
+
* (irrecoverable). The REST handler returns 200 with the wire shape of
|
|
153
|
+
* `PAGES_DELETE_OUTPUT_SCHEMA` on success.
|
|
154
|
+
*/
|
|
155
|
+
export declare function handlePagesDelete(client: RestClient, input: PagesDeleteInput, extra?: HandlerExtra): Promise<ToolResult>;
|
|
20
156
|
export {};
|
|
21
157
|
//# sourceMappingURL=handlers-write.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers-write.d.ts","sourceRoot":"","sources":["../../../src/tools/pages/handlers-write.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"handlers-write.d.ts","sourceRoot":"","sources":["../../../src/tools/pages/handlers-write.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EAKH,KAAK,YAAY,EACjB,KAAK,UAAU,EAClB,MAAM,oBAAoB,CAAC;AAE5B,UAAU,gBAAgB;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,SAAU,SAAQ,gBAAgB;IACxC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAID,wBAAsB,cAAc,CAChC,MAAM,EAAE,UAAU,EAClB,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,SAAS,EACxC,KAAK,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,UAAU,CAAC,CAwBrB;AA8BD,wBAAsB,iBAAiB,CACnC,MAAM,EAAE,UAAU,EAClB,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,gBAAgB,EACvC,KAAK,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,UAAU,CAAC,CAoBrB;AAID;;;;;GAKG;AACH,UAAU,gBAAgB;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACzE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CA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