@walkeros/mcp-source-browser 4.7.2-next-1791147139360 → 4.7.2
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/dist/index.js +16 -21
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -63,7 +63,7 @@ function registerGenerateTool(server2) {
|
|
|
63
63
|
"Path-scoped generic properties for data-elb_ (only triggers nested below this element receive them)"
|
|
64
64
|
),
|
|
65
65
|
link: z2.record(z2.string(), z2.string()).optional().describe(
|
|
66
|
-
'
|
|
66
|
+
'The one link for data-elblink as {"id":"type"}, e.g. {"details":"parent"}. An element carries one link; more than one entry is refused.'
|
|
67
67
|
),
|
|
68
68
|
prefix: z2.string().optional().describe("Custom prefix (default: data-elb)")
|
|
69
69
|
},
|
|
@@ -225,16 +225,8 @@ function registerParseTool(server2) {
|
|
|
225
225
|
// src/tools/validate.ts
|
|
226
226
|
import { z as z4 } from "zod";
|
|
227
227
|
import { mcpResult as mcpResult3, mcpError as mcpError3 } from "@walkeros/core";
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
"click",
|
|
231
|
-
"impression",
|
|
232
|
-
"visible",
|
|
233
|
-
"hover",
|
|
234
|
-
"submit",
|
|
235
|
-
"wait",
|
|
236
|
-
"pulse"
|
|
237
|
-
];
|
|
228
|
+
import { getTriggerActions, Triggers } from "@walkeros/web-source-browser";
|
|
229
|
+
var KNOWN_TRIGGERS = Object.values(Triggers);
|
|
238
230
|
function registerValidateTool(server2) {
|
|
239
231
|
server2.registerTool(
|
|
240
232
|
"validate_tagging",
|
|
@@ -327,16 +319,18 @@ function registerValidateTool(server2) {
|
|
|
327
319
|
});
|
|
328
320
|
});
|
|
329
321
|
body.querySelectorAll(`[${actionAttr}], [${actionsAttr}]`).forEach((el) => {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
322
|
+
[actionAttr, actionsAttr].forEach((attr) => {
|
|
323
|
+
const triggers = Object.keys(
|
|
324
|
+
getTriggerActions(el.getAttribute(attr) || "")
|
|
325
|
+
);
|
|
326
|
+
triggers.forEach((trigger) => {
|
|
327
|
+
if (KNOWN_TRIGGERS.includes(trigger)) return;
|
|
334
328
|
warnings.push({
|
|
335
329
|
check: "unknown_trigger",
|
|
336
330
|
message: `Unknown trigger "${trigger}" (known: ${KNOWN_TRIGGERS.join(", ")})`,
|
|
337
331
|
element: snip(el)
|
|
338
332
|
});
|
|
339
|
-
}
|
|
333
|
+
});
|
|
340
334
|
});
|
|
341
335
|
});
|
|
342
336
|
const valid = errors.length === 0;
|
|
@@ -407,6 +401,7 @@ To define the entities' **properties**, set the **composited attribute** \`data-
|
|
|
407
401
|
| visible | each time an element re-enters the viewport after being out of view |
|
|
408
402
|
| hover | each time the mouse enters the corresponding element |
|
|
409
403
|
| submit | on valid form submission |
|
|
404
|
+
| scroll(depth) | once, on scroll, when \`depth\` percent of the element (50 by default) is above the bottom of the viewport |
|
|
410
405
|
| wait(ms) | waits ms seconds (15 seconds by default) until triggering |
|
|
411
406
|
| pulse(ms) | recurring trigger every ms seconds (15 seconds by default) if the page is not hidden |
|
|
412
407
|
|
|
@@ -446,7 +441,7 @@ To prevent an action from triggering unwanted entities, restrict the action to a
|
|
|
446
441
|
|
|
447
442
|
## Linking elements
|
|
448
443
|
|
|
449
|
-
Use \`data-elblink\` to extend the scope of an entity by elements placed somewhere else (like modals). Specific IDs connect linked elements hierarchically as parent or child.
|
|
444
|
+
Use \`data-elblink\` to extend the scope of an entity by elements placed somewhere else (like modals). Specific IDs connect linked elements hierarchically as parent or child. An element carries one link.
|
|
450
445
|
|
|
451
446
|
\`\`\`html
|
|
452
447
|
<div data-elb="info" data-elblink="details:parent">...</div>
|
|
@@ -760,11 +755,11 @@ tagger().globals({ lang: 'en', plan: 'paid', version: '1.0' });
|
|
|
760
755
|
|
|
761
756
|
##### \`.link(id: string, type: string)\` | \`.link(object: Record<string, string>)\`
|
|
762
757
|
|
|
763
|
-
|
|
758
|
+
Sets the element's link to another element. An element carries one link: a second, different link or an object with more than one entry throws an error.
|
|
764
759
|
|
|
765
760
|
\`\`\`typescript
|
|
766
|
-
tagger().link('details', 'parent');
|
|
767
|
-
tagger().link({ details: 'parent'
|
|
761
|
+
tagger().link('details', 'parent'); // data-elblink="details:parent"
|
|
762
|
+
tagger().link({ details: 'parent' }); // the same link as an object
|
|
768
763
|
\`\`\`
|
|
769
764
|
|
|
770
765
|
##### \`.get()\`
|
|
@@ -871,7 +866,7 @@ function registerDocResources(server2) {
|
|
|
871
866
|
// src/index.ts
|
|
872
867
|
var server = new McpServer({
|
|
873
868
|
name: "walkeros-source-browser",
|
|
874
|
-
version: "4.7.2
|
|
869
|
+
version: "4.7.2"
|
|
875
870
|
});
|
|
876
871
|
registerGenerateTool(server);
|
|
877
872
|
registerParseTool(server);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/tools/generate.ts","../src/schemas/output.ts","../src/tools/parse.ts","../src/lib/dom.ts","../src/tools/validate.ts","../src/resources/docs.ts"],"sourcesContent":["import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { registerGenerateTool } from './tools/generate.js';\nimport { registerParseTool } from './tools/parse.js';\nimport { registerValidateTool } from './tools/validate.js';\nimport { registerDocResources } from './resources/docs.js';\n\ndeclare const __VERSION__: string;\n\nconst server = new McpServer({\n name: 'walkeros-source-browser',\n version: __VERSION__,\n});\n\nregisterGenerateTool(server);\nregisterParseTool(server);\nregisterValidateTool(server);\nregisterDocResources(server);\n\nasync function main() {\n const transport = new StdioServerTransport();\n await server.connect(transport);\n console.error('walkerOS source-browser MCP server running on stdio');\n}\n\nmain().catch((error) => {\n console.error('Failed to start MCP server:', error);\n process.exit(1);\n});\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { createTagger } from '@walkeros/web-source-browser';\nimport { GenerateTaggingOutputShape } from '../schemas/output.js';\n\nexport function registerGenerateTool(server: McpServer) {\n server.registerTool(\n 'generate_tagging',\n {\n title: 'Generate Tagging',\n description:\n 'Generate walkerOS data-elb HTML attributes from structured input. ' +\n 'Returns attribute key-value pairs and an example HTML snippet.',\n inputSchema: {\n entity: z\n .string()\n .optional()\n .describe(\n 'Entity name (creates data-elb=\"entity\" and scopes data-elb-entity properties)',\n ),\n data: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional()\n .describe('Entity properties as key:value pairs'),\n action: z\n .record(z.string(), z.string())\n .optional()\n .describe(\n 'Trigger:action pairs for data-elbaction (nearest entity only)',\n ),\n actions: z\n .record(z.string(), z.string())\n .optional()\n .describe('Trigger:action pairs for data-elbactions (all entities)'),\n context: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional()\n .describe('Context properties for data-elbcontext'),\n globals: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional()\n .describe('Global properties for data-elbglobals'),\n scoped: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional()\n .describe(\n 'Path-scoped generic properties for data-elb_ (only triggers nested below this element receive them)',\n ),\n link: z\n .record(z.string(), z.string())\n .optional()\n .describe(\n 'Link relationships for data-elblink (id:type, e.g. {\"details\":\"parent\"})',\n ),\n prefix: z\n .string()\n .optional()\n .describe('Custom prefix (default: data-elb)'),\n },\n outputSchema: GenerateTaggingOutputShape,\n annotations: {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n },\n async ({\n entity,\n data,\n action,\n actions,\n context,\n globals,\n scoped,\n link,\n prefix,\n }) => {\n try {\n const hasInput =\n entity ||\n data ||\n action ||\n actions ||\n context ||\n globals ||\n scoped ||\n link;\n if (!hasInput) {\n return mcpError(\n new Error(\n 'Provide at least one parameter (entity, data, action, etc.)',\n ),\n );\n }\n\n const tagger = createTagger(prefix ? { prefix } : undefined);\n // Pass entity to factory (sets naming scope) and call .entity() (creates data-elb attr)\n const t = tagger(entity);\n if (entity) t.entity(entity);\n if (data) t.data(data);\n if (action) t.action(action);\n if (actions) t.actions(actions);\n if (context) t.context(context);\n if (globals) t.globals(globals);\n if (scoped) t.scoped(scoped);\n if (link) t.link(link);\n\n const attributes = t.get();\n\n const attrString = Object.entries(attributes)\n .map(([k, v]) => (v ? `${k}=\"${v}\"` : k))\n .join('\\n ');\n const html = `<div\\n ${attrString}\\n>\\n <!-- content -->\\n</div>`;\n\n return mcpResult({ attributes, html });\n } catch (error) {\n return mcpError(error);\n }\n },\n );\n}\n","import { z } from 'zod';\n\nexport const GenerateTaggingOutputShape = {\n attributes: z\n .record(z.string(), z.string())\n .describe('Generated HTML data attributes'),\n html: z.string().describe('Example HTML element with the attributes applied'),\n};\n\nconst eventShape = z.object({\n entity: z.string(),\n action: z.string(),\n data: z.record(z.string(), z.unknown()).optional(),\n trigger: z.string().optional(),\n context: z.record(z.string(), z.unknown()).optional(),\n nested: z.array(z.unknown()).optional(),\n});\n\nexport const ParseTaggingOutputShape = {\n events: z.array(eventShape).describe('Extracted walkerOS events'),\n globals: z.record(z.string(), z.unknown()).describe('Global properties'),\n summary: z.string().describe('Human-readable summary'),\n};\n\nconst validationIssueShape = z.object({\n check: z.string().describe('Name of the validation check'),\n message: z.string().describe('Human-readable description'),\n element: z.string().describe('HTML snippet of the problematic element'),\n});\n\nexport const ValidateTaggingOutputShape = {\n valid: z.boolean().describe('True if no errors found'),\n errors: z.array(validationIssueShape).describe('Critical issues'),\n warnings: z.array(validationIssueShape).describe('Potential issues'),\n info: z.array(validationIssueShape).describe('Informational notes'),\n summary: z.string().describe('Human-readable validation summary'),\n};\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { getAllEvents, getGlobals } from '@walkeros/web-source-browser';\nimport { withDom } from '../lib/dom.js';\nimport { ParseTaggingOutputShape } from '../schemas/output.js';\n\nexport function registerParseTool(server: McpServer) {\n server.registerTool(\n 'parse_tagging',\n {\n title: 'Parse Tagging',\n description:\n 'Parse HTML with data-elb attributes using real DOM parsing (JSDOM). ' +\n 'Extracts all walkerOS events and globals. Use validate_tagging for issue detection.',\n inputSchema: {\n html: z.string().describe('HTML snippet with data-elb attributes'),\n prefix: z\n .string()\n .optional()\n .describe('Custom prefix (default: data-elb)'),\n },\n outputSchema: ParseTaggingOutputShape,\n annotations: {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n },\n async ({ html, prefix: customPrefix }) => {\n try {\n if (!html || !html.trim()) {\n return mcpError(new Error('html is required'));\n }\n\n const prefix = customPrefix || 'data-elb';\n\n return withDom(html, (dom) => {\n const doc = dom.window.document;\n const body = doc.body;\n\n // Extract events using walker parser\n const events = getAllEvents(body, prefix);\n\n // Extract globals\n const globals = getGlobals(prefix, doc);\n\n const summary = `Found ${events.length} event(s), ${Object.keys(globals).length} global(s)`;\n\n return mcpResult({ events, globals, summary });\n });\n } catch (error) {\n return mcpError(error);\n }\n },\n );\n}\n","import { JSDOM } from 'jsdom';\n\n/**\n * Typed view of globalThis for assigning JSDOM globals in Node.js.\n * Walker parser functions read from globalThis.document internally.\n */\ninterface DomGlobals {\n document?: Document;\n window?: Window & typeof globalThis;\n Element?: typeof Element;\n HTMLElement?: typeof HTMLElement;\n HTMLSelectElement?: typeof HTMLSelectElement;\n Node?: typeof Node;\n // Intentionally loose: JSDOM may not provide ShadowRoot, so we polyfill with a stub class\n ShadowRoot?: { new (): unknown; prototype: unknown };\n}\n\nconst globals = globalThis as unknown as DomGlobals;\n\n/**\n * Execute a function with JSDOM globals (document, window) temporarily set.\n * Walker parser functions read from globalThis.document internally.\n */\nexport function withDom<T>(html: string, fn: (dom: JSDOM) => T): T {\n const dom = new JSDOM(html);\n const prevDoc = globals.document;\n const prevWin = globals.window;\n\n const prevElement = globals.Element;\n const prevHTMLElement = globals.HTMLElement;\n const prevHTMLSelectElement = globals.HTMLSelectElement;\n const prevNode = globals.Node;\n\n try {\n globals.document = dom.window.document;\n globals.window = dom.window as unknown as Window & typeof globalThis;\n globals.Element = dom.window.Element as unknown as typeof Element;\n globals.HTMLElement = dom.window\n .HTMLElement as unknown as typeof HTMLElement;\n globals.HTMLSelectElement = dom.window\n .HTMLSelectElement as unknown as typeof HTMLSelectElement;\n globals.Node = dom.window.Node as unknown as typeof Node;\n // Polyfill ShadowRoot if missing (JSDOM may not provide it)\n if (!globals.ShadowRoot) {\n globals.ShadowRoot =\n (dom.window as unknown as DomGlobals).ShadowRoot || class ShadowRoot {};\n }\n return fn(dom);\n } finally {\n if (prevDoc !== undefined) {\n globals.document = prevDoc;\n } else {\n delete globals.document;\n }\n if (prevWin !== undefined) {\n globals.window = prevWin;\n } else {\n delete globals.window;\n }\n if (prevElement !== undefined) {\n globals.Element = prevElement;\n } else {\n delete globals.Element;\n }\n if (prevHTMLElement !== undefined) {\n globals.HTMLElement = prevHTMLElement;\n } else {\n delete globals.HTMLElement;\n }\n if (prevHTMLSelectElement !== undefined) {\n globals.HTMLSelectElement = prevHTMLSelectElement;\n } else {\n delete globals.HTMLSelectElement;\n }\n if (prevNode !== undefined) {\n globals.Node = prevNode;\n } else {\n delete globals.Node;\n }\n }\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { withDom } from '../lib/dom.js';\nimport { ValidateTaggingOutputShape } from '../schemas/output.js';\n\nconst KNOWN_TRIGGERS = [\n 'load',\n 'click',\n 'impression',\n 'visible',\n 'hover',\n 'submit',\n 'wait',\n 'pulse',\n];\n\ntype Issue = { check: string; message: string; element: string };\n\nexport function registerValidateTool(server: McpServer) {\n server.registerTool(\n 'validate_tagging',\n {\n title: 'Validate Tagging',\n description:\n 'Validate HTML data-elb tagging for common mistakes. ' +\n 'Checks for orphan actions, missing entities, unknown triggers, and more.',\n inputSchema: {\n html: z.string().describe('HTML snippet to validate'),\n prefix: z\n .string()\n .optional()\n .describe('Custom prefix (default: data-elb)'),\n },\n outputSchema: ValidateTaggingOutputShape,\n annotations: {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n },\n async ({ html, prefix: customPrefix }) => {\n try {\n if (!html || !html.trim()) {\n return mcpError(new Error('html is required'));\n }\n\n const prefix = customPrefix || 'data-elb';\n\n return withDom(html, (dom) => {\n const body = dom.window.document.body;\n const errors: Issue[] = [];\n const warnings: Issue[] = [];\n const info: Issue[] = [];\n const snip = (el: Element) => el.outerHTML.slice(0, 120);\n const actionAttr = `${prefix}action`;\n const actionsAttr = `${prefix}actions`;\n\n // 1. Empty entity names\n body.querySelectorAll(`[${prefix}]`).forEach((el) => {\n if (!el.getAttribute(prefix)?.trim()) {\n errors.push({\n check: 'empty_entity',\n message: 'Empty entity name',\n element: snip(el),\n });\n }\n });\n\n // 2. Orphan actions\n body\n .querySelectorAll(`[${actionAttr}], [${actionsAttr}]`)\n .forEach((el) => {\n let parent = el.parentElement;\n let hasEntity = el.hasAttribute(prefix);\n while (parent && parent !== body && !hasEntity) {\n if (parent.hasAttribute(prefix)) hasEntity = true;\n parent = parent.parentElement;\n }\n if (!hasEntity) {\n warnings.push({\n check: 'orphan_action',\n message:\n 'Action without entity ancestor (will fire as \"page\" entity)',\n element: snip(el),\n });\n }\n });\n\n // 3. Entities without actions\n body.querySelectorAll(`[${prefix}]`).forEach((el) => {\n const hasAction =\n el.querySelector(`[${actionAttr}], [${actionsAttr}]`) ||\n el.hasAttribute(actionAttr) ||\n el.hasAttribute(actionsAttr);\n if (!hasAction) {\n const name = el.getAttribute(prefix);\n info.push({\n check: 'entity_without_action',\n message: `Entity \"${name}\" has no action — won't produce events without a trigger`,\n element: snip(el),\n });\n }\n });\n\n // 4. Orphan properties\n body.querySelectorAll('*').forEach((el) => {\n Array.from(el.attributes).forEach((attr) => {\n const match = attr.name.match(new RegExp(`^${prefix}-(.+)$`));\n if (!match) return;\n const entityName = match[1];\n if (!entityName) return;\n\n // Walk up to find matching data-elb=\"entityName\"\n let parent: Element | null = el;\n let found = false;\n while (parent && parent !== body) {\n if (parent.getAttribute(prefix) === entityName) {\n found = true;\n break;\n }\n parent = parent.parentElement;\n }\n if (!found) {\n warnings.push({\n check: 'orphan_property',\n message: `Property \"${attr.name}\" without matching entity data-elb=\"${entityName}\" ancestor (may be intentional if using tagger scope)`,\n element: snip(el),\n });\n }\n });\n });\n\n // 5. Unknown triggers\n body\n .querySelectorAll(`[${actionAttr}], [${actionsAttr}]`)\n .forEach((el) => {\n const val =\n el.getAttribute(actionAttr) ||\n el.getAttribute(actionsAttr) ||\n '';\n val.split(';').forEach((pair) => {\n const trigger = pair\n .split(':')[0]\n ?.trim()\n .replace(/\\(.*\\)$/, '');\n if (trigger && !KNOWN_TRIGGERS.includes(trigger)) {\n warnings.push({\n check: 'unknown_trigger',\n message: `Unknown trigger \"${trigger}\" (known: ${KNOWN_TRIGGERS.join(', ')})`,\n element: snip(el),\n });\n }\n });\n });\n\n const valid = errors.length === 0;\n const total = errors.length + warnings.length + info.length;\n const summary = valid\n ? total === 0\n ? 'Valid — no issues found'\n : `Valid — ${warnings.length} warning(s), ${info.length} info(s)`\n : `Invalid — ${errors.length} error(s), ${warnings.length} warning(s), ${info.length} info(s)`;\n\n return mcpResult({ valid, errors, warnings, info, summary });\n });\n } catch (error) {\n return mcpError(error);\n }\n },\n );\n}\n","import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nconst HTML_ATTRIBUTES_DOCS = `# HTML Attributes\n\nTag your web components using \\`data-elb\\` attributes to enable structured event tracking without custom JavaScript.\n\nBy adding a few simple attributes to your markup, you can track user behavior such as clicks, views, form submissions, and more.\n\n## Concept\n\n\\`\\`\\`html\n<!-- Generic usage -->\n<div\n data-elb=\"ENTITY\"\n data-elb-ENTITY=\"KEY:VALUE\"\n data-elbaction=\"TRIGGER:ACTION\" <!-- nearest entity only -->\n data-elbactions=\"TRIGGER:ACTION\" <!-- all entities -->\n data-elbcontext=\"KEY:VALUE\"\n data-elbglobals=\"KEY:VALUE\"\n/>\n\n<!-- Example usage -->\n<div data-elbglobals=\"language:en\">\n <div data-elbcontext=\"test:engagement\">\n <div data-elb=\"promotion\" data-elbaction=\"visible:view\">\n <h1 data-elb-promotion=\"name:Setting up tracking easily\">\n Setting up tracking easily\n </h1>\n <p data-elb-promotion=\"category:analytics\">Analytics</p>\n </div>\n </div>\n</div>\n\\`\\`\\`\n\n## Entity and action\n\nYou define the entity **scope** by setting the \\`data-elb\\` attribute with the name of an entity to an element, e.g. \\`data-elb=\"promotion\"\\`. The default entity is \\`page\\` when no \\`data-elb\\` is set.\n\nAn **action** can be added by setting one of the following attributes on the **same level** or **child elements** in combination with a **matching trigger**:\n\n- **\\`data-elbaction\\`** - applies action to the **nearest entity only**\n- **\\`data-elbactions\\`** - applies action to **all entities** in the DOM hierarchy\n\nBoth attributes use the same syntax, e.g., \\`data-elbaction=\"visible:view\"\\` or \\`data-elbactions=\"click:select\"\\` to fire events when triggered.\n\nTo define the entities' **properties**, set the **composited attribute** \\`data-elb-ENTITY\\` with the key and value, e.g. \\`data-elb-promotion=\"name:tagging is fun;position:overlay\"\\`.\n\n## Triggers\n\n| **Trigger** | **Definition** |\n|-------------|----------------|\n| load | after loading a page when DOM is ready |\n| click | when an element or a child is clicked |\n| impression | after an element has been in the viewport for at least 50% for one second |\n| visible | each time an element re-enters the viewport after being out of view |\n| hover | each time the mouse enters the corresponding element |\n| submit | on valid form submission |\n| wait(ms) | waits ms seconds (15 seconds by default) until triggering |\n| pulse(ms) | recurring trigger every ms seconds (15 seconds by default) if the page is not hidden |\n\n> **Note:** Trigger names are predefined and to be selected from the list, while the action can be an arbitrarily defined name.\n\n### Abbreviation\n\nIf the trigger and action values are equal, e.g. for click events, you can shorten the implementation:\n\n\\`\\`\\`html\n<b data-elbaction=\"click\">\n Use the short version, instead of\n <s data-elbaction=\"click:click\">long</s>\n</b>\n\\`\\`\\`\n\n### Parameters\n\nSome triggers accept optional parameters. Use brackets behind the trigger to pass that information.\n\n\\`\\`\\`html\n<p data-elbaction=\"wait(10):interested\"></p>\n<p data-elbaction=\"pulse(10):interested\"></p>\n\\`\\`\\`\n\n### Action filter\n\nTo prevent an action from triggering unwanted entities, restrict the action to a specific entity by adding the name:\n\n\\`\\`\\`html\n<div data-elb=\"foo\">\n <div data-elb=\"bar\" data-elbaction=\"load:hello(bar)\">\n only the bar hello event fires.\n </div>\n</div>\n\\`\\`\\`\n\n## Linking elements\n\nUse \\`data-elblink\\` to extend the scope of an entity by elements placed somewhere else (like modals). Specific IDs connect linked elements hierarchically as parent or child.\n\n\\`\\`\\`html\n<div data-elb=\"info\" data-elblink=\"details:parent\">...</div>\n...\n<div data-elblink=\"details:child\" data-elbaction=\"visible\">...</div>\n<p data-elblink=\"another:child\">...</p>\n\\`\\`\\`\n\n## Data\n\n### Basic attributes\n\nTo specify data, use the name of the entity. Data attributes must be inside the entity scope or a parent.\n\n\\`\\`\\`html\n<div data-elb-entity=\"source:parent\">\n <div data-elb=\"entity\">\n <p data-elb-entity=\"key:value\">...</p>\n <p data-elb-entity=\"foo:bar\">...</p>\n </div>\n</div>\n\\`\\`\\`\n\n### Type casting\n\nProperty values will be cast to their type, supporting string, number & boolean.\n\n\\`\\`\\`html\n<div data-elb=\"types\">\n <p data-elb-types=\"string:text\">{ string: \"text\" }</p>\n <p data-elb-types=\"int:42;float:3.14\">{ int: 42, float: 3.14 }</p>\n <p data-elb-types=\"bool:true\">{ bool: true }</p>\n</div>\n\\`\\`\\`\n\n### Multiple attributes\n\nUse semicolons to separate key-value pairs. Use single quotes to escape values that contain semicolons.\n\n\\`\\`\\`html\n<p data-elb=\"foo\" data-elb-foo=\"b:a;r\">{ \"b\": \"a\", \"r\": true }</p>\n<p data-elb=\"foo\" data-elb-foo=\"b:'a;r'\">{ \"b\": \"a;r\" }</p>\n\\`\\`\\`\n\n### Dynamic field values\n\nUse \\`#\\` at the beginning followed by the attribute name to access the value of the element attribute.\n\n\\`\\`\\`html\n<input type=\"text\" value=\"blue\" data-elb-product=\"color:#value\" />\n<div data-elb-product=\"name:#innerHTML\">Everyday Ruck Snack</div>\n\\`\\`\\`\n\n### Arrays\n\nAdd the \\`[]\\` suffix to a property's name, such as \\`size[]:m\\`. It will generate de-duplicated data properties.\n\n\\`\\`\\`html\n<div data-elb=\"product\">\n <p data-elb-product=\"size[]:s;size[]:l\"></p>\n <p data-elb-product=\"size[]:l\"></p>\n</div>\n\\`\\`\\`\n\n### Generic properties\n\nLeave the entity name empty (only \\`data-elb-\\`) to add the property to any related entity. Explicitly named properties are preferred over generic ones.\n\n### Scoped generic properties\n\nUse \\`data-elb_\\` (trailing underscore, no dash) to add a generic property that reaches only the triggers nested below it. It uses the same \\`key:value\\` payload as \\`data-elb-\\` (including \\`[]\\` arrays and \\`#dynamic\\` values), but it is collected only while bubbling up from the triggered element, so sibling triggers outside its branch never receive it. A scoped value closer to the trigger wins over a value set farther up the tree.\n\n\\`\\`\\`html\n<div data-elb=\"product\" data-elb-product=\"name:A\">\n <div data-elb_=\"size:L\">\n <button data-elbaction=\"click\">L</button>\n </div>\n <div data-elb-=\"color:red\"></div>\n <button data-elbaction=\"click\">Plain</button>\n</div>\n\\`\\`\\`\n\nThe first button gets \\`{ name: 'A', color: 'red', size: 'L' }\\`; the second button gets \\`{ name: 'A', color: 'red' }\\` (no \\`size\\`).\n\n## Globals\n\nProperties that apply to **all events on a page**. Define them anywhere using the \\`data-elbglobals\\` attribute. Globals are collected once, right before the first event.\n\n\\`\\`\\`html\n<div data-elbglobals=\"outof:scope\"></div>\n<div data-elb=\"entity\" data-elb-entity=\"foo:bar\" data-elbaction=\"load:action\" />\n\\`\\`\\`\n\n## Context\n\nContext provides framing information for events (position, test, component). Use \\`data-elbcontext\\` on ancestor elements.\n\n\\`\\`\\`html\n<div data-elbcontext=\"test:engagement\" data-elbglobals=\"plan:paid\">\n <div data-elbcontext=\"recommendation:smart_ai\">\n <div data-elb=\"promotion\" data-elbaction=\"click\" data-elb-promotion=\"title:click me\">\n click me\n </div>\n </div>\n</div>\n\\`\\`\\`\n\nContext properties are tuples with the value and an index, starting at the closest parent (\\`[value, index]\\`).\n\n## Nested entities\n\nA \\`data-elb\\` entity within another \\`data-elb\\` entity is called a nested entity. Nested entities are accessible in the \\`nested\\` array of each event.\n\n\\`\\`\\`html\n<div data-elb=\"mother\" data-elb-mother=\"label:caring\" data-elbaction=\"load:view\">\n <div data-elb=\"son\" data-elb-son=\"age:23\"></div>\n <div data-elb=\"daughter\" data-elb-daughter=\"age:32\">\n <div data-elb=\"baby\" data-elb-baby=\"status:infant\"></div>\n </div>\n</div>\n\\`\\`\\`\n\n## Reserved attributes\n\n\\`data-elb\\`, \\`data-elbaction\\`, \\`data-elbactions\\`, \\`data-elbcontext\\`, \\`data-elbglobals\\`, and \\`data-elblink\\` are reserved attributes. \\`data-elb-*\\` attributes may be arbitrary combinations based on the related entity name. \\`data-elb_\\` is a reserved path-scoped generic that uses the same value syntax as \\`data-elb-\\` but only reaches triggers nested below it.\n`;\n\nconst TAGGER_DOCS = `# Tagger\n\nThe tagger is a utility for generating HTML data attributes that the walkerOS browser source uses for event tracking. It provides a fluent interface to create properly formatted and escaped data attributes for your HTML elements.\n\nPackage: \\`@walkeros/web-source-browser\\`\n\n## Why use the tagger?\n\n- **Consistent formatting** - Ensures data attributes follow walkerOS conventions\n- **Automatic escaping** - Handles special characters in values (semicolons, colons, quotes, backslashes)\n- **Type safety** - Provides TypeScript support for better development experience\n- **Fluent API** - Chainable methods for building complex attribute sets\n- **Maintainability** - Centralized logic for attribute generation\n\n## Installation\n\n\\`\\`\\`bash\nnpm install @walkeros/web-source-browser\n\\`\\`\\`\n\n## Initialization\n\n\\`\\`\\`typescript\nimport { createTagger } from '@walkeros/web-source-browser';\n\n// Create with default configuration\nconst tagger = createTagger();\n\n// Create with custom configuration\nconst customTagger = createTagger({\n prefix: 'data-elb',\n});\n\\`\\`\\`\n\n## Usage examples\n\n### Basic data tagging (without entity)\n\n\\`\\`\\`typescript\nconst tagger = createTagger();\n\n// Using tagger with a scope parameter sets naming for data attributes only\nconst attributes = tagger('product')\n .data('id', '123')\n .data('name', 'Widget')\n .get();\n\n// Result:\n// {\n// 'data-elb-product': 'id:123;name:Widget'\n// }\n// Note: No 'data-elb' entity attribute is created\n\\`\\`\\`\n\n### Entity tagging\n\n\\`\\`\\`typescript\n// To create an entity attribute, use the .entity() method\nconst attributes = tagger()\n .entity('product')\n .data('id', '123')\n .data('name', 'Widget')\n .get();\n\n// Result:\n// {\n// 'data-elb': 'product',\n// 'data-elb-product': 'id:123;name:Widget'\n// }\n\\`\\`\\`\n\n### Action mapping\n\n\\`\\`\\`typescript\nconst attributes = tagger()\n .action('load', 'view')\n .action('click', 'select')\n .get();\n\n// Result:\n// {\n// 'data-elbaction': 'load:view;click:select'\n// }\n\\`\\`\\`\n\n### Context and global properties\n\n\\`\\`\\`typescript\nconst attributes = tagger('product')\n .data('id', 123)\n .context('test', 'engagement')\n .globals('lang', 'en')\n .get();\n\n// Result:\n// {\n// 'data-elb': 'product',\n// 'data-elb-product': 'id:123',\n// 'data-elbcontext': 'test:engagement',\n// 'data-elbglobals': 'lang:en'\n// }\n\\`\\`\\`\n\n## Available methods (API reference)\n\n##### \\`tagger(scope?: string)\\`\n\nCreates a new tagger instance. The optional scope parameter sets the naming scope for data attributes without creating an entity attribute.\n\n\\`\\`\\`typescript\n// Without scope - generic data attributes\ntagger().data('key', 'value');\n// Creates: data-elb-=\"key:value\"\n\n// With scope - scoped data attributes (no entity attribute)\ntagger('product').data('id', '123');\n// Creates: data-elb-product=\"id:123\"\n\\`\\`\\`\n\n##### \\`.entity(name: string)\\`\n\nSets the entity attribute and updates the naming scope for subsequent data calls.\n\n\\`\\`\\`typescript\ntagger().entity('product').data('id', '123');\n// Creates: data-elb=\"product\" data-elb-product=\"id:123\"\n\n// Entity changes the naming scope\ntagger('foo').entity('bar').data('a', 1);\n// Creates: data-elb=\"bar\" data-elb-bar=\"a:1\"\n\\`\\`\\`\n\n##### \\`.data(key: string, value: Property)\\` | \\`.data(object: Properties)\\`\n\nAdds data properties using the current naming scope.\n\n\\`\\`\\`typescript\n// Single property\ntagger('product').data('id', 123);\n// Creates: data-elb-product=\"id:123\"\n\n// Multiple properties\ntagger('product').data({ id: 123, name: 'Widget', price: 99.99 });\n// Creates: data-elb-product=\"id:123;name:Widget;price:99.99\"\n\\`\\`\\`\n\n##### \\`.action(trigger: string, action?: string)\\` | \\`.action(object: Record<string, string>)\\`\n\nAdds action mappings for event triggers. Creates a \\`data-elbaction\\` attribute.\n\n\\`\\`\\`typescript\ntagger().action('load', 'view');\ntagger().action({ load: 'view', click: 'select', impression: 'view' });\n\\`\\`\\`\n\n##### \\`.actions(trigger: string, action?: string)\\` | \\`.actions(object: Record<string, string>)\\`\n\nAdds action mappings for event triggers. Creates a \\`data-elbactions\\` attribute.\n\n\\`\\`\\`typescript\ntagger().actions('load', 'view');\ntagger().actions({ load: 'view', click: 'select', visible: 'visible' });\n\n// Can be combined with action() method\ntagger().action('click', 'select').actions('load', 'view');\n\\`\\`\\`\n\n##### \\`.context(key: string, value: Property)\\` | \\`.context(object: Properties)\\`\n\nAdds context properties.\n\n\\`\\`\\`typescript\ntagger().context('test', 'engagement');\ntagger().context({ test: 'engagement', position: 'header', type: 'promo' });\n\\`\\`\\`\n\n##### \\`.globals(key: string, value: Property)\\` | \\`.globals(object: Properties)\\`\n\nAdds global properties.\n\n\\`\\`\\`typescript\ntagger().globals('lang', 'en');\ntagger().globals({ lang: 'en', plan: 'paid', version: '1.0' });\n\\`\\`\\`\n\n##### \\`.link(id: string, type: string)\\` | \\`.link(object: Record<string, string>)\\`\n\nAdds link relationships between elements.\n\n\\`\\`\\`typescript\ntagger().link('details', 'parent');\ntagger().link({ details: 'parent', modal: 'child', sidebar: 'child' });\n\\`\\`\\`\n\n##### \\`.get()\\`\n\nGenerates the final HTML attributes object.\n\n\\`\\`\\`typescript\n// With naming scope only\nconst attributes = tagger('product').data('id', '123').get();\n// Returns: { 'data-elb-product': 'id:123' }\n\n// With entity attribute\nconst attributes = tagger().entity('product').data('id', '123').get();\n// Returns: { 'data-elb': 'product', 'data-elb-product': 'id:123' }\n\\`\\`\\`\n\nAll methods return the tagger instance for method chaining, except \\`get()\\` which returns the final attributes object.\n\n## Common use cases\n\n### Product listing page\n\n\\`\\`\\`typescript\nfunction ProductCard({ product }) {\n return (\n <div\n {...tagger('product')\n .data({\n id: product.id,\n name: product.name,\n price: product.price,\n category: product.category\n })\n .action('click', 'select')\n .get()}\n >\n {product.name}\n </div>\n );\n}\n\\`\\`\\`\n\n### Shopping cart\n\n\\`\\`\\`typescript\nfunction CartItem({ item }) {\n return (\n <div\n {...tagger()\n .entity('cart')\n .data({\n productId: item.id,\n quantity: item.quantity,\n price: item.price\n })\n .action('click', 'remove')\n .get()}\n >\n {item.name}\n </div>\n );\n}\n\\`\\`\\`\n`;\n\nexport function registerDocResources(server: McpServer) {\n server.resource(\n 'tagging-html-attributes',\n 'walkeros://docs/tagging/html-attributes',\n {\n title: 'walkerOS HTML Attributes Tagging Reference',\n description: 'Complete guide to data-elb HTML attribute tagging',\n mimeType: 'text/markdown',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://docs/tagging/html-attributes',\n mimeType: 'text/markdown' as const,\n text: HTML_ATTRIBUTES_DOCS,\n },\n ],\n }),\n );\n\n server.resource(\n 'tagging-tagger-api',\n 'walkeros://docs/tagging/tagger',\n {\n title: 'walkerOS Tagger API Reference',\n description:\n 'createTagger() fluent API for generating data-elb attributes',\n mimeType: 'text/markdown',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://docs/tagging/tagger',\n mimeType: 'text/markdown' as const,\n text: TAGGER_DOCS,\n },\n ],\n }),\n );\n}\n"],"mappings":";;;AAAA,SAA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AAQ,KAAK,CAAC;AAChB,CAAC;","names":["z","server","z","globals","z","mcpResult","mcpError","server","z","mcpError","globals","mcpResult","z","mcpResult","mcpError","server","z","mcpError","mcpResult","server"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/tools/generate.ts","../src/schemas/output.ts","../src/tools/parse.ts","../src/lib/dom.ts","../src/tools/validate.ts","../src/resources/docs.ts"],"sourcesContent":["import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { registerGenerateTool } from './tools/generate.js';\nimport { registerParseTool } from './tools/parse.js';\nimport { registerValidateTool } from './tools/validate.js';\nimport { registerDocResources } from './resources/docs.js';\n\ndeclare const __VERSION__: string;\n\nconst server = new McpServer({\n name: 'walkeros-source-browser',\n version: __VERSION__,\n});\n\nregisterGenerateTool(server);\nregisterParseTool(server);\nregisterValidateTool(server);\nregisterDocResources(server);\n\nasync function main() {\n const transport = new StdioServerTransport();\n await server.connect(transport);\n console.error('walkerOS source-browser MCP server running on stdio');\n}\n\nmain().catch((error) => {\n console.error('Failed to start MCP server:', error);\n process.exit(1);\n});\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { createTagger } from '@walkeros/web-source-browser';\nimport { GenerateTaggingOutputShape } from '../schemas/output.js';\n\nexport function registerGenerateTool(server: McpServer) {\n server.registerTool(\n 'generate_tagging',\n {\n title: 'Generate Tagging',\n description:\n 'Generate walkerOS data-elb HTML attributes from structured input. ' +\n 'Returns attribute key-value pairs and an example HTML snippet.',\n inputSchema: {\n entity: z\n .string()\n .optional()\n .describe(\n 'Entity name (creates data-elb=\"entity\" and scopes data-elb-entity properties)',\n ),\n data: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional()\n .describe('Entity properties as key:value pairs'),\n action: z\n .record(z.string(), z.string())\n .optional()\n .describe(\n 'Trigger:action pairs for data-elbaction (nearest entity only)',\n ),\n actions: z\n .record(z.string(), z.string())\n .optional()\n .describe('Trigger:action pairs for data-elbactions (all entities)'),\n context: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional()\n .describe('Context properties for data-elbcontext'),\n globals: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional()\n .describe('Global properties for data-elbglobals'),\n scoped: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional()\n .describe(\n 'Path-scoped generic properties for data-elb_ (only triggers nested below this element receive them)',\n ),\n link: z\n .record(z.string(), z.string())\n .optional()\n .describe(\n 'The one link for data-elblink as {\"id\":\"type\"}, e.g. {\"details\":\"parent\"}. An element carries one link; more than one entry is refused.',\n ),\n prefix: z\n .string()\n .optional()\n .describe('Custom prefix (default: data-elb)'),\n },\n outputSchema: GenerateTaggingOutputShape,\n annotations: {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n },\n async ({\n entity,\n data,\n action,\n actions,\n context,\n globals,\n scoped,\n link,\n prefix,\n }) => {\n try {\n const hasInput =\n entity ||\n data ||\n action ||\n actions ||\n context ||\n globals ||\n scoped ||\n link;\n if (!hasInput) {\n return mcpError(\n new Error(\n 'Provide at least one parameter (entity, data, action, etc.)',\n ),\n );\n }\n\n const tagger = createTagger(prefix ? { prefix } : undefined);\n // Pass entity to factory (sets naming scope) and call .entity() (creates data-elb attr)\n const t = tagger(entity);\n if (entity) t.entity(entity);\n if (data) t.data(data);\n if (action) t.action(action);\n if (actions) t.actions(actions);\n if (context) t.context(context);\n if (globals) t.globals(globals);\n if (scoped) t.scoped(scoped);\n if (link) t.link(link);\n\n const attributes = t.get();\n\n const attrString = Object.entries(attributes)\n .map(([k, v]) => (v ? `${k}=\"${v}\"` : k))\n .join('\\n ');\n const html = `<div\\n ${attrString}\\n>\\n <!-- content -->\\n</div>`;\n\n return mcpResult({ attributes, html });\n } catch (error) {\n return mcpError(error);\n }\n },\n );\n}\n","import { z } from 'zod';\n\nexport const GenerateTaggingOutputShape = {\n attributes: z\n .record(z.string(), z.string())\n .describe('Generated HTML data attributes'),\n html: z.string().describe('Example HTML element with the attributes applied'),\n};\n\nconst eventShape = z.object({\n entity: z.string(),\n action: z.string(),\n data: z.record(z.string(), z.unknown()).optional(),\n trigger: z.string().optional(),\n context: z.record(z.string(), z.unknown()).optional(),\n nested: z.array(z.unknown()).optional(),\n});\n\nexport const ParseTaggingOutputShape = {\n events: z.array(eventShape).describe('Extracted walkerOS events'),\n globals: z.record(z.string(), z.unknown()).describe('Global properties'),\n summary: z.string().describe('Human-readable summary'),\n};\n\nconst validationIssueShape = z.object({\n check: z.string().describe('Name of the validation check'),\n message: z.string().describe('Human-readable description'),\n element: z.string().describe('HTML snippet of the problematic element'),\n});\n\nexport const ValidateTaggingOutputShape = {\n valid: z.boolean().describe('True if no errors found'),\n errors: z.array(validationIssueShape).describe('Critical issues'),\n warnings: z.array(validationIssueShape).describe('Potential issues'),\n info: z.array(validationIssueShape).describe('Informational notes'),\n summary: z.string().describe('Human-readable validation summary'),\n};\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { getAllEvents, getGlobals } from '@walkeros/web-source-browser';\nimport { withDom } from '../lib/dom.js';\nimport { ParseTaggingOutputShape } from '../schemas/output.js';\n\nexport function registerParseTool(server: McpServer) {\n server.registerTool(\n 'parse_tagging',\n {\n title: 'Parse Tagging',\n description:\n 'Parse HTML with data-elb attributes using real DOM parsing (JSDOM). ' +\n 'Extracts all walkerOS events and globals. Use validate_tagging for issue detection.',\n inputSchema: {\n html: z.string().describe('HTML snippet with data-elb attributes'),\n prefix: z\n .string()\n .optional()\n .describe('Custom prefix (default: data-elb)'),\n },\n outputSchema: ParseTaggingOutputShape,\n annotations: {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n },\n async ({ html, prefix: customPrefix }) => {\n try {\n if (!html || !html.trim()) {\n return mcpError(new Error('html is required'));\n }\n\n const prefix = customPrefix || 'data-elb';\n\n return withDom(html, (dom) => {\n const doc = dom.window.document;\n const body = doc.body;\n\n // Extract events using walker parser\n const events = getAllEvents(body, prefix);\n\n // Extract globals\n const globals = getGlobals(prefix, doc);\n\n const summary = `Found ${events.length} event(s), ${Object.keys(globals).length} global(s)`;\n\n return mcpResult({ events, globals, summary });\n });\n } catch (error) {\n return mcpError(error);\n }\n },\n );\n}\n","import { JSDOM } from 'jsdom';\n\n/**\n * Typed view of globalThis for assigning JSDOM globals in Node.js.\n * Walker parser functions read from globalThis.document internally.\n */\ninterface DomGlobals {\n document?: Document;\n window?: Window & typeof globalThis;\n Element?: typeof Element;\n HTMLElement?: typeof HTMLElement;\n HTMLSelectElement?: typeof HTMLSelectElement;\n Node?: typeof Node;\n // Intentionally loose: JSDOM may not provide ShadowRoot, so we polyfill with a stub class\n ShadowRoot?: { new (): unknown; prototype: unknown };\n}\n\nconst globals = globalThis as unknown as DomGlobals;\n\n/**\n * Execute a function with JSDOM globals (document, window) temporarily set.\n * Walker parser functions read from globalThis.document internally.\n */\nexport function withDom<T>(html: string, fn: (dom: JSDOM) => T): T {\n const dom = new JSDOM(html);\n const prevDoc = globals.document;\n const prevWin = globals.window;\n\n const prevElement = globals.Element;\n const prevHTMLElement = globals.HTMLElement;\n const prevHTMLSelectElement = globals.HTMLSelectElement;\n const prevNode = globals.Node;\n\n try {\n globals.document = dom.window.document;\n globals.window = dom.window as unknown as Window & typeof globalThis;\n globals.Element = dom.window.Element as unknown as typeof Element;\n globals.HTMLElement = dom.window\n .HTMLElement as unknown as typeof HTMLElement;\n globals.HTMLSelectElement = dom.window\n .HTMLSelectElement as unknown as typeof HTMLSelectElement;\n globals.Node = dom.window.Node as unknown as typeof Node;\n // Polyfill ShadowRoot if missing (JSDOM may not provide it)\n if (!globals.ShadowRoot) {\n globals.ShadowRoot =\n (dom.window as unknown as DomGlobals).ShadowRoot || class ShadowRoot {};\n }\n return fn(dom);\n } finally {\n if (prevDoc !== undefined) {\n globals.document = prevDoc;\n } else {\n delete globals.document;\n }\n if (prevWin !== undefined) {\n globals.window = prevWin;\n } else {\n delete globals.window;\n }\n if (prevElement !== undefined) {\n globals.Element = prevElement;\n } else {\n delete globals.Element;\n }\n if (prevHTMLElement !== undefined) {\n globals.HTMLElement = prevHTMLElement;\n } else {\n delete globals.HTMLElement;\n }\n if (prevHTMLSelectElement !== undefined) {\n globals.HTMLSelectElement = prevHTMLSelectElement;\n } else {\n delete globals.HTMLSelectElement;\n }\n if (prevNode !== undefined) {\n globals.Node = prevNode;\n } else {\n delete globals.Node;\n }\n }\n}\n","import { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { mcpResult, mcpError } from '@walkeros/core';\nimport { getTriggerActions, Triggers } from '@walkeros/web-source-browser';\nimport { withDom } from '../lib/dom.js';\nimport { ValidateTaggingOutputShape } from '../schemas/output.js';\n\nconst KNOWN_TRIGGERS: string[] = Object.values(Triggers);\n\ntype Issue = { check: string; message: string; element: string };\n\nexport function registerValidateTool(server: McpServer) {\n server.registerTool(\n 'validate_tagging',\n {\n title: 'Validate Tagging',\n description:\n 'Validate HTML data-elb tagging for common mistakes. ' +\n 'Checks for orphan actions, missing entities, unknown triggers, and more.',\n inputSchema: {\n html: z.string().describe('HTML snippet to validate'),\n prefix: z\n .string()\n .optional()\n .describe('Custom prefix (default: data-elb)'),\n },\n outputSchema: ValidateTaggingOutputShape,\n annotations: {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n },\n async ({ html, prefix: customPrefix }) => {\n try {\n if (!html || !html.trim()) {\n return mcpError(new Error('html is required'));\n }\n\n const prefix = customPrefix || 'data-elb';\n\n return withDom(html, (dom) => {\n const body = dom.window.document.body;\n const errors: Issue[] = [];\n const warnings: Issue[] = [];\n const info: Issue[] = [];\n const snip = (el: Element) => el.outerHTML.slice(0, 120);\n const actionAttr = `${prefix}action`;\n const actionsAttr = `${prefix}actions`;\n\n // 1. Empty entity names\n body.querySelectorAll(`[${prefix}]`).forEach((el) => {\n if (!el.getAttribute(prefix)?.trim()) {\n errors.push({\n check: 'empty_entity',\n message: 'Empty entity name',\n element: snip(el),\n });\n }\n });\n\n // 2. Orphan actions\n body\n .querySelectorAll(`[${actionAttr}], [${actionsAttr}]`)\n .forEach((el) => {\n let parent = el.parentElement;\n let hasEntity = el.hasAttribute(prefix);\n while (parent && parent !== body && !hasEntity) {\n if (parent.hasAttribute(prefix)) hasEntity = true;\n parent = parent.parentElement;\n }\n if (!hasEntity) {\n warnings.push({\n check: 'orphan_action',\n message:\n 'Action without entity ancestor (will fire as \"page\" entity)',\n element: snip(el),\n });\n }\n });\n\n // 3. Entities without actions\n body.querySelectorAll(`[${prefix}]`).forEach((el) => {\n const hasAction =\n el.querySelector(`[${actionAttr}], [${actionsAttr}]`) ||\n el.hasAttribute(actionAttr) ||\n el.hasAttribute(actionsAttr);\n if (!hasAction) {\n const name = el.getAttribute(prefix);\n info.push({\n check: 'entity_without_action',\n message: `Entity \"${name}\" has no action — won't produce events without a trigger`,\n element: snip(el),\n });\n }\n });\n\n // 4. Orphan properties\n body.querySelectorAll('*').forEach((el) => {\n Array.from(el.attributes).forEach((attr) => {\n const match = attr.name.match(new RegExp(`^${prefix}-(.+)$`));\n if (!match) return;\n const entityName = match[1];\n if (!entityName) return;\n\n // Walk up to find matching data-elb=\"entityName\"\n let parent: Element | null = el;\n let found = false;\n while (parent && parent !== body) {\n if (parent.getAttribute(prefix) === entityName) {\n found = true;\n break;\n }\n parent = parent.parentElement;\n }\n if (!found) {\n warnings.push({\n check: 'orphan_property',\n message: `Property \"${attr.name}\" without matching entity data-elb=\"${entityName}\" ancestor (may be intentional if using tagger scope)`,\n element: snip(el),\n });\n }\n });\n });\n\n // 5. Unknown triggers, read with the browser source's own parser\n body\n .querySelectorAll(`[${actionAttr}], [${actionsAttr}]`)\n .forEach((el) => {\n [actionAttr, actionsAttr].forEach((attr) => {\n const triggers = Object.keys(\n getTriggerActions(el.getAttribute(attr) || ''),\n );\n triggers.forEach((trigger) => {\n if (KNOWN_TRIGGERS.includes(trigger)) return;\n warnings.push({\n check: 'unknown_trigger',\n message: `Unknown trigger \"${trigger}\" (known: ${KNOWN_TRIGGERS.join(', ')})`,\n element: snip(el),\n });\n });\n });\n });\n\n const valid = errors.length === 0;\n const total = errors.length + warnings.length + info.length;\n const summary = valid\n ? total === 0\n ? 'Valid — no issues found'\n : `Valid — ${warnings.length} warning(s), ${info.length} info(s)`\n : `Invalid — ${errors.length} error(s), ${warnings.length} warning(s), ${info.length} info(s)`;\n\n return mcpResult({ valid, errors, warnings, info, summary });\n });\n } catch (error) {\n return mcpError(error);\n }\n },\n );\n}\n","import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\n\nconst HTML_ATTRIBUTES_DOCS = `# HTML Attributes\n\nTag your web components using \\`data-elb\\` attributes to enable structured event tracking without custom JavaScript.\n\nBy adding a few simple attributes to your markup, you can track user behavior such as clicks, views, form submissions, and more.\n\n## Concept\n\n\\`\\`\\`html\n<!-- Generic usage -->\n<div\n data-elb=\"ENTITY\"\n data-elb-ENTITY=\"KEY:VALUE\"\n data-elbaction=\"TRIGGER:ACTION\" <!-- nearest entity only -->\n data-elbactions=\"TRIGGER:ACTION\" <!-- all entities -->\n data-elbcontext=\"KEY:VALUE\"\n data-elbglobals=\"KEY:VALUE\"\n/>\n\n<!-- Example usage -->\n<div data-elbglobals=\"language:en\">\n <div data-elbcontext=\"test:engagement\">\n <div data-elb=\"promotion\" data-elbaction=\"visible:view\">\n <h1 data-elb-promotion=\"name:Setting up tracking easily\">\n Setting up tracking easily\n </h1>\n <p data-elb-promotion=\"category:analytics\">Analytics</p>\n </div>\n </div>\n</div>\n\\`\\`\\`\n\n## Entity and action\n\nYou define the entity **scope** by setting the \\`data-elb\\` attribute with the name of an entity to an element, e.g. \\`data-elb=\"promotion\"\\`. The default entity is \\`page\\` when no \\`data-elb\\` is set.\n\nAn **action** can be added by setting one of the following attributes on the **same level** or **child elements** in combination with a **matching trigger**:\n\n- **\\`data-elbaction\\`** - applies action to the **nearest entity only**\n- **\\`data-elbactions\\`** - applies action to **all entities** in the DOM hierarchy\n\nBoth attributes use the same syntax, e.g., \\`data-elbaction=\"visible:view\"\\` or \\`data-elbactions=\"click:select\"\\` to fire events when triggered.\n\nTo define the entities' **properties**, set the **composited attribute** \\`data-elb-ENTITY\\` with the key and value, e.g. \\`data-elb-promotion=\"name:tagging is fun;position:overlay\"\\`.\n\n## Triggers\n\n| **Trigger** | **Definition** |\n|-------------|----------------|\n| load | after loading a page when DOM is ready |\n| click | when an element or a child is clicked |\n| impression | after an element has been in the viewport for at least 50% for one second |\n| visible | each time an element re-enters the viewport after being out of view |\n| hover | each time the mouse enters the corresponding element |\n| submit | on valid form submission |\n| scroll(depth) | once, on scroll, when \\`depth\\` percent of the element (50 by default) is above the bottom of the viewport |\n| wait(ms) | waits ms seconds (15 seconds by default) until triggering |\n| pulse(ms) | recurring trigger every ms seconds (15 seconds by default) if the page is not hidden |\n\n> **Note:** Trigger names are predefined and to be selected from the list, while the action can be an arbitrarily defined name.\n\n### Abbreviation\n\nIf the trigger and action values are equal, e.g. for click events, you can shorten the implementation:\n\n\\`\\`\\`html\n<b data-elbaction=\"click\">\n Use the short version, instead of\n <s data-elbaction=\"click:click\">long</s>\n</b>\n\\`\\`\\`\n\n### Parameters\n\nSome triggers accept optional parameters. Use brackets behind the trigger to pass that information.\n\n\\`\\`\\`html\n<p data-elbaction=\"wait(10):interested\"></p>\n<p data-elbaction=\"pulse(10):interested\"></p>\n\\`\\`\\`\n\n### Action filter\n\nTo prevent an action from triggering unwanted entities, restrict the action to a specific entity by adding the name:\n\n\\`\\`\\`html\n<div data-elb=\"foo\">\n <div data-elb=\"bar\" data-elbaction=\"load:hello(bar)\">\n only the bar hello event fires.\n </div>\n</div>\n\\`\\`\\`\n\n## Linking elements\n\nUse \\`data-elblink\\` to extend the scope of an entity by elements placed somewhere else (like modals). Specific IDs connect linked elements hierarchically as parent or child. An element carries one link.\n\n\\`\\`\\`html\n<div data-elb=\"info\" data-elblink=\"details:parent\">...</div>\n...\n<div data-elblink=\"details:child\" data-elbaction=\"visible\">...</div>\n<p data-elblink=\"another:child\">...</p>\n\\`\\`\\`\n\n## Data\n\n### Basic attributes\n\nTo specify data, use the name of the entity. Data attributes must be inside the entity scope or a parent.\n\n\\`\\`\\`html\n<div data-elb-entity=\"source:parent\">\n <div data-elb=\"entity\">\n <p data-elb-entity=\"key:value\">...</p>\n <p data-elb-entity=\"foo:bar\">...</p>\n </div>\n</div>\n\\`\\`\\`\n\n### Type casting\n\nProperty values will be cast to their type, supporting string, number & boolean.\n\n\\`\\`\\`html\n<div data-elb=\"types\">\n <p data-elb-types=\"string:text\">{ string: \"text\" }</p>\n <p data-elb-types=\"int:42;float:3.14\">{ int: 42, float: 3.14 }</p>\n <p data-elb-types=\"bool:true\">{ bool: true }</p>\n</div>\n\\`\\`\\`\n\n### Multiple attributes\n\nUse semicolons to separate key-value pairs. Use single quotes to escape values that contain semicolons.\n\n\\`\\`\\`html\n<p data-elb=\"foo\" data-elb-foo=\"b:a;r\">{ \"b\": \"a\", \"r\": true }</p>\n<p data-elb=\"foo\" data-elb-foo=\"b:'a;r'\">{ \"b\": \"a;r\" }</p>\n\\`\\`\\`\n\n### Dynamic field values\n\nUse \\`#\\` at the beginning followed by the attribute name to access the value of the element attribute.\n\n\\`\\`\\`html\n<input type=\"text\" value=\"blue\" data-elb-product=\"color:#value\" />\n<div data-elb-product=\"name:#innerHTML\">Everyday Ruck Snack</div>\n\\`\\`\\`\n\n### Arrays\n\nAdd the \\`[]\\` suffix to a property's name, such as \\`size[]:m\\`. It will generate de-duplicated data properties.\n\n\\`\\`\\`html\n<div data-elb=\"product\">\n <p data-elb-product=\"size[]:s;size[]:l\"></p>\n <p data-elb-product=\"size[]:l\"></p>\n</div>\n\\`\\`\\`\n\n### Generic properties\n\nLeave the entity name empty (only \\`data-elb-\\`) to add the property to any related entity. Explicitly named properties are preferred over generic ones.\n\n### Scoped generic properties\n\nUse \\`data-elb_\\` (trailing underscore, no dash) to add a generic property that reaches only the triggers nested below it. It uses the same \\`key:value\\` payload as \\`data-elb-\\` (including \\`[]\\` arrays and \\`#dynamic\\` values), but it is collected only while bubbling up from the triggered element, so sibling triggers outside its branch never receive it. A scoped value closer to the trigger wins over a value set farther up the tree.\n\n\\`\\`\\`html\n<div data-elb=\"product\" data-elb-product=\"name:A\">\n <div data-elb_=\"size:L\">\n <button data-elbaction=\"click\">L</button>\n </div>\n <div data-elb-=\"color:red\"></div>\n <button data-elbaction=\"click\">Plain</button>\n</div>\n\\`\\`\\`\n\nThe first button gets \\`{ name: 'A', color: 'red', size: 'L' }\\`; the second button gets \\`{ name: 'A', color: 'red' }\\` (no \\`size\\`).\n\n## Globals\n\nProperties that apply to **all events on a page**. Define them anywhere using the \\`data-elbglobals\\` attribute. Globals are collected once, right before the first event.\n\n\\`\\`\\`html\n<div data-elbglobals=\"outof:scope\"></div>\n<div data-elb=\"entity\" data-elb-entity=\"foo:bar\" data-elbaction=\"load:action\" />\n\\`\\`\\`\n\n## Context\n\nContext provides framing information for events (position, test, component). Use \\`data-elbcontext\\` on ancestor elements.\n\n\\`\\`\\`html\n<div data-elbcontext=\"test:engagement\" data-elbglobals=\"plan:paid\">\n <div data-elbcontext=\"recommendation:smart_ai\">\n <div data-elb=\"promotion\" data-elbaction=\"click\" data-elb-promotion=\"title:click me\">\n click me\n </div>\n </div>\n</div>\n\\`\\`\\`\n\nContext properties are tuples with the value and an index, starting at the closest parent (\\`[value, index]\\`).\n\n## Nested entities\n\nA \\`data-elb\\` entity within another \\`data-elb\\` entity is called a nested entity. Nested entities are accessible in the \\`nested\\` array of each event.\n\n\\`\\`\\`html\n<div data-elb=\"mother\" data-elb-mother=\"label:caring\" data-elbaction=\"load:view\">\n <div data-elb=\"son\" data-elb-son=\"age:23\"></div>\n <div data-elb=\"daughter\" data-elb-daughter=\"age:32\">\n <div data-elb=\"baby\" data-elb-baby=\"status:infant\"></div>\n </div>\n</div>\n\\`\\`\\`\n\n## Reserved attributes\n\n\\`data-elb\\`, \\`data-elbaction\\`, \\`data-elbactions\\`, \\`data-elbcontext\\`, \\`data-elbglobals\\`, and \\`data-elblink\\` are reserved attributes. \\`data-elb-*\\` attributes may be arbitrary combinations based on the related entity name. \\`data-elb_\\` is a reserved path-scoped generic that uses the same value syntax as \\`data-elb-\\` but only reaches triggers nested below it.\n`;\n\nconst TAGGER_DOCS = `# Tagger\n\nThe tagger is a utility for generating HTML data attributes that the walkerOS browser source uses for event tracking. It provides a fluent interface to create properly formatted and escaped data attributes for your HTML elements.\n\nPackage: \\`@walkeros/web-source-browser\\`\n\n## Why use the tagger?\n\n- **Consistent formatting** - Ensures data attributes follow walkerOS conventions\n- **Automatic escaping** - Handles special characters in values (semicolons, colons, quotes, backslashes)\n- **Type safety** - Provides TypeScript support for better development experience\n- **Fluent API** - Chainable methods for building complex attribute sets\n- **Maintainability** - Centralized logic for attribute generation\n\n## Installation\n\n\\`\\`\\`bash\nnpm install @walkeros/web-source-browser\n\\`\\`\\`\n\n## Initialization\n\n\\`\\`\\`typescript\nimport { createTagger } from '@walkeros/web-source-browser';\n\n// Create with default configuration\nconst tagger = createTagger();\n\n// Create with custom configuration\nconst customTagger = createTagger({\n prefix: 'data-elb',\n});\n\\`\\`\\`\n\n## Usage examples\n\n### Basic data tagging (without entity)\n\n\\`\\`\\`typescript\nconst tagger = createTagger();\n\n// Using tagger with a scope parameter sets naming for data attributes only\nconst attributes = tagger('product')\n .data('id', '123')\n .data('name', 'Widget')\n .get();\n\n// Result:\n// {\n// 'data-elb-product': 'id:123;name:Widget'\n// }\n// Note: No 'data-elb' entity attribute is created\n\\`\\`\\`\n\n### Entity tagging\n\n\\`\\`\\`typescript\n// To create an entity attribute, use the .entity() method\nconst attributes = tagger()\n .entity('product')\n .data('id', '123')\n .data('name', 'Widget')\n .get();\n\n// Result:\n// {\n// 'data-elb': 'product',\n// 'data-elb-product': 'id:123;name:Widget'\n// }\n\\`\\`\\`\n\n### Action mapping\n\n\\`\\`\\`typescript\nconst attributes = tagger()\n .action('load', 'view')\n .action('click', 'select')\n .get();\n\n// Result:\n// {\n// 'data-elbaction': 'load:view;click:select'\n// }\n\\`\\`\\`\n\n### Context and global properties\n\n\\`\\`\\`typescript\nconst attributes = tagger('product')\n .data('id', 123)\n .context('test', 'engagement')\n .globals('lang', 'en')\n .get();\n\n// Result:\n// {\n// 'data-elb': 'product',\n// 'data-elb-product': 'id:123',\n// 'data-elbcontext': 'test:engagement',\n// 'data-elbglobals': 'lang:en'\n// }\n\\`\\`\\`\n\n## Available methods (API reference)\n\n##### \\`tagger(scope?: string)\\`\n\nCreates a new tagger instance. The optional scope parameter sets the naming scope for data attributes without creating an entity attribute.\n\n\\`\\`\\`typescript\n// Without scope - generic data attributes\ntagger().data('key', 'value');\n// Creates: data-elb-=\"key:value\"\n\n// With scope - scoped data attributes (no entity attribute)\ntagger('product').data('id', '123');\n// Creates: data-elb-product=\"id:123\"\n\\`\\`\\`\n\n##### \\`.entity(name: string)\\`\n\nSets the entity attribute and updates the naming scope for subsequent data calls.\n\n\\`\\`\\`typescript\ntagger().entity('product').data('id', '123');\n// Creates: data-elb=\"product\" data-elb-product=\"id:123\"\n\n// Entity changes the naming scope\ntagger('foo').entity('bar').data('a', 1);\n// Creates: data-elb=\"bar\" data-elb-bar=\"a:1\"\n\\`\\`\\`\n\n##### \\`.data(key: string, value: Property)\\` | \\`.data(object: Properties)\\`\n\nAdds data properties using the current naming scope.\n\n\\`\\`\\`typescript\n// Single property\ntagger('product').data('id', 123);\n// Creates: data-elb-product=\"id:123\"\n\n// Multiple properties\ntagger('product').data({ id: 123, name: 'Widget', price: 99.99 });\n// Creates: data-elb-product=\"id:123;name:Widget;price:99.99\"\n\\`\\`\\`\n\n##### \\`.action(trigger: string, action?: string)\\` | \\`.action(object: Record<string, string>)\\`\n\nAdds action mappings for event triggers. Creates a \\`data-elbaction\\` attribute.\n\n\\`\\`\\`typescript\ntagger().action('load', 'view');\ntagger().action({ load: 'view', click: 'select', impression: 'view' });\n\\`\\`\\`\n\n##### \\`.actions(trigger: string, action?: string)\\` | \\`.actions(object: Record<string, string>)\\`\n\nAdds action mappings for event triggers. Creates a \\`data-elbactions\\` attribute.\n\n\\`\\`\\`typescript\ntagger().actions('load', 'view');\ntagger().actions({ load: 'view', click: 'select', visible: 'visible' });\n\n// Can be combined with action() method\ntagger().action('click', 'select').actions('load', 'view');\n\\`\\`\\`\n\n##### \\`.context(key: string, value: Property)\\` | \\`.context(object: Properties)\\`\n\nAdds context properties.\n\n\\`\\`\\`typescript\ntagger().context('test', 'engagement');\ntagger().context({ test: 'engagement', position: 'header', type: 'promo' });\n\\`\\`\\`\n\n##### \\`.globals(key: string, value: Property)\\` | \\`.globals(object: Properties)\\`\n\nAdds global properties.\n\n\\`\\`\\`typescript\ntagger().globals('lang', 'en');\ntagger().globals({ lang: 'en', plan: 'paid', version: '1.0' });\n\\`\\`\\`\n\n##### \\`.link(id: string, type: string)\\` | \\`.link(object: Record<string, string>)\\`\n\nSets the element's link to another element. An element carries one link: a second, different link or an object with more than one entry throws an error.\n\n\\`\\`\\`typescript\ntagger().link('details', 'parent'); // data-elblink=\"details:parent\"\ntagger().link({ details: 'parent' }); // the same link as an object\n\\`\\`\\`\n\n##### \\`.get()\\`\n\nGenerates the final HTML attributes object.\n\n\\`\\`\\`typescript\n// With naming scope only\nconst attributes = tagger('product').data('id', '123').get();\n// Returns: { 'data-elb-product': 'id:123' }\n\n// With entity attribute\nconst attributes = tagger().entity('product').data('id', '123').get();\n// Returns: { 'data-elb': 'product', 'data-elb-product': 'id:123' }\n\\`\\`\\`\n\nAll methods return the tagger instance for method chaining, except \\`get()\\` which returns the final attributes object.\n\n## Common use cases\n\n### Product listing page\n\n\\`\\`\\`typescript\nfunction ProductCard({ product }) {\n return (\n <div\n {...tagger('product')\n .data({\n id: product.id,\n name: product.name,\n price: product.price,\n category: product.category\n })\n .action('click', 'select')\n .get()}\n >\n {product.name}\n </div>\n );\n}\n\\`\\`\\`\n\n### Shopping cart\n\n\\`\\`\\`typescript\nfunction CartItem({ item }) {\n return (\n <div\n {...tagger()\n .entity('cart')\n .data({\n productId: item.id,\n quantity: item.quantity,\n price: item.price\n })\n .action('click', 'remove')\n .get()}\n >\n {item.name}\n </div>\n );\n}\n\\`\\`\\`\n`;\n\nexport function registerDocResources(server: McpServer) {\n server.resource(\n 'tagging-html-attributes',\n 'walkeros://docs/tagging/html-attributes',\n {\n title: 'walkerOS HTML Attributes Tagging Reference',\n description: 'Complete guide to data-elb HTML attribute tagging',\n mimeType: 'text/markdown',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://docs/tagging/html-attributes',\n mimeType: 'text/markdown' as const,\n text: HTML_ATTRIBUTES_DOCS,\n },\n ],\n }),\n );\n\n server.resource(\n 'tagging-tagger-api',\n 'walkeros://docs/tagging/tagger',\n {\n title: 'walkerOS Tagger API Reference',\n description:\n 'createTagger() fluent API for generating data-elb attributes',\n mimeType: 'text/markdown',\n },\n async () => ({\n contents: [\n {\n uri: 'walkeros://docs/tagging/tagger',\n mimeType: 'text/markdown' as const,\n text: TAGGER_DOCS,\n },\n ],\n }),\n );\n}\n"],"mappings":";;;AAAA,SAAS,iBAAiB;AAC1B,SAAS,4BAA4B;;;ACDrC,SAAS,KAAAA,UAAS;AAElB,SAAS,WAAW,gBAAgB;AACpC,SAAS,oBAAoB;;;ACH7B,SAAS,SAAS;AAEX,IAAM,6BAA6B;AAAA,EACxC,YAAY,EACT,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,EAC7B,SAAS,gCAAgC;AAAA,EAC5C,MAAM,EAAE,OAAO,EAAE,SAAS,kDAAkD;AAC9E;AAEA,IAAM,aAAa,EAAE,OAAO;AAAA,EAC1B,QAAQ,EAAE,OAAO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;AAAA,MACP,aAAa;AAAA,MACb,UAAU;AAAA,IACZ;AAAA,IACA,aAAa;AAAA,MACX,UAAU;AAAA,QACR;AAAA,UACE,KAAK;AAAA,UACL,UAAU;AAAA,UACV,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,EAAAA,QAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,aACE;AAAA,MACF,UAAU;AAAA,IACZ;AAAA,IACA,aAAa;AAAA,MACX,UAAU;AAAA,QACR;AAAA,UACE,KAAK;AAAA,UACL,UAAU;AAAA,UACV,MAAM;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;ANhgBA,IAAM,SAAS,IAAI,UAAU;AAAA,EAC3B,MAAM;AAAA,EACN,SAAS;AACX,CAAC;AAED,qBAAqB,MAAM;AAC3B,kBAAkB,MAAM;AACxB,qBAAqB,MAAM;AAC3B,qBAAqB,MAAM;AAE3B,eAAe,OAAO;AACpB,QAAM,YAAY,IAAI,qBAAqB;AAC3C,QAAM,OAAO,QAAQ,SAAS;AAC9B,UAAQ,MAAM,qDAAqD;AACrE;AAEA,KAAK,EAAE,MAAM,CAAC,UAAU;AACtB,UAAQ,MAAM,+BAA+B,KAAK;AAClD,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":["z","server","z","globals","z","mcpResult","mcpError","server","z","mcpError","globals","mcpResult","z","mcpResult","mcpError","server","z","mcpError","mcpResult","server"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walkeros/mcp-source-browser",
|
|
3
|
-
"version": "4.7.2
|
|
3
|
+
"version": "4.7.2",
|
|
4
4
|
"description": "MCP server for walkerOS data-elb HTML tagging — generate, parse, and validate tracking attributes with real DOM parsing",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
34
|
-
"@walkeros/core": "4.7.2
|
|
35
|
-
"@walkeros/web-source-browser": "4.7.2
|
|
34
|
+
"@walkeros/core": "4.7.2",
|
|
35
|
+
"@walkeros/web-source-browser": "4.7.2",
|
|
36
36
|
"jsdom": "^29.1.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/jsdom": "^28.0.3",
|
|
40
40
|
"@types/node": "^25.9.1",
|
|
41
|
-
"@walkeros/config": "4.7.2
|
|
42
|
-
"@walkeros/collector": "4.7.2
|
|
43
|
-
"@walkeros/web-core": "4.7.2
|
|
41
|
+
"@walkeros/config": "4.7.2",
|
|
42
|
+
"@walkeros/collector": "4.7.2",
|
|
43
|
+
"@walkeros/web-core": "4.7.2"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"zod": "^4.0"
|