@syntrologie/adapt-content 2.8.0-canary.183 → 2.8.0-canary.185
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/schema.d.ts +39 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +34 -2
- package/dist/schema.js.map +2 -2
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -114,6 +114,16 @@ export declare const configSchema: z.ZodObject<{
|
|
|
114
114
|
summary: z.ZodString;
|
|
115
115
|
html: z.ZodString;
|
|
116
116
|
position: z.ZodEnum<["before", "after", "prepend", "append", "replace"]>;
|
|
117
|
+
deepLink: z.ZodOptional<z.ZodObject<{
|
|
118
|
+
tileId: z.ZodString;
|
|
119
|
+
itemId: z.ZodOptional<z.ZodString>;
|
|
120
|
+
}, "strip", z.ZodTypeAny, {
|
|
121
|
+
tileId: string;
|
|
122
|
+
itemId?: string | undefined;
|
|
123
|
+
}, {
|
|
124
|
+
tileId: string;
|
|
125
|
+
itemId?: string | undefined;
|
|
126
|
+
}>>;
|
|
117
127
|
}, "strip", z.ZodTypeAny, {
|
|
118
128
|
html: string;
|
|
119
129
|
summary: string;
|
|
@@ -122,6 +132,10 @@ export declare const configSchema: z.ZodObject<{
|
|
|
122
132
|
route: string | string[];
|
|
123
133
|
};
|
|
124
134
|
position: "before" | "after" | "prepend" | "append" | "replace";
|
|
135
|
+
deepLink?: {
|
|
136
|
+
tileId: string;
|
|
137
|
+
itemId?: string | undefined;
|
|
138
|
+
} | undefined;
|
|
125
139
|
}, {
|
|
126
140
|
html: string;
|
|
127
141
|
summary: string;
|
|
@@ -130,6 +144,10 @@ export declare const configSchema: z.ZodObject<{
|
|
|
130
144
|
route: string | string[];
|
|
131
145
|
};
|
|
132
146
|
position: "before" | "after" | "prepend" | "append" | "replace";
|
|
147
|
+
deepLink?: {
|
|
148
|
+
tileId: string;
|
|
149
|
+
itemId?: string | undefined;
|
|
150
|
+
} | undefined;
|
|
133
151
|
}>, "many">>;
|
|
134
152
|
/** Class additions */
|
|
135
153
|
classAdditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -223,6 +241,10 @@ export declare const configSchema: z.ZodObject<{
|
|
|
223
241
|
route: string | string[];
|
|
224
242
|
};
|
|
225
243
|
position: "before" | "after" | "prepend" | "append" | "replace";
|
|
244
|
+
deepLink?: {
|
|
245
|
+
tileId: string;
|
|
246
|
+
itemId?: string | undefined;
|
|
247
|
+
} | undefined;
|
|
226
248
|
}[] | undefined;
|
|
227
249
|
classAdditions?: {
|
|
228
250
|
summary: string;
|
|
@@ -274,6 +296,10 @@ export declare const configSchema: z.ZodObject<{
|
|
|
274
296
|
route: string | string[];
|
|
275
297
|
};
|
|
276
298
|
position: "before" | "after" | "prepend" | "append" | "replace";
|
|
299
|
+
deepLink?: {
|
|
300
|
+
tileId: string;
|
|
301
|
+
itemId?: string | undefined;
|
|
302
|
+
} | undefined;
|
|
277
303
|
}[] | undefined;
|
|
278
304
|
classAdditions?: {
|
|
279
305
|
summary: string;
|
|
@@ -293,4 +319,17 @@ export declare const configSchema: z.ZodObject<{
|
|
|
293
319
|
}[] | undefined;
|
|
294
320
|
}>;
|
|
295
321
|
export type ContentConfig = z.infer<typeof configSchema>;
|
|
322
|
+
export declare const CAPABILITIES_DOCUMENTATION: {
|
|
323
|
+
packageId: string;
|
|
324
|
+
description: string;
|
|
325
|
+
whenToUse: {
|
|
326
|
+
goal: string;
|
|
327
|
+
action: string;
|
|
328
|
+
}[];
|
|
329
|
+
conventions: {
|
|
330
|
+
name: string;
|
|
331
|
+
description: string;
|
|
332
|
+
}[];
|
|
333
|
+
events: never[];
|
|
334
|
+
};
|
|
296
335
|
//# sourceMappingURL=schema.d.ts.map
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,YAAY;IAErB,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwBxB,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+B9B,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0B1B,sBAAsB
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,YAAY;IAErB,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwBxB,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+B9B,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0B1B,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqDtB,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8BtB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCtB,CAAC;AAEJ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAMzD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;CAyBtC,CAAC"}
|
package/dist/schema.js
CHANGED
|
@@ -227,13 +227,21 @@ var configSchema = z2.object({
|
|
|
227
227
|
1,
|
|
228
228
|
'HTML string must not be empty \u2014 an empty html with position "replace" silently swaps the anchor element for an empty div.'
|
|
229
229
|
).describe(
|
|
230
|
-
"HTML string to insert. The SDK sanitizes it before injection \u2014 no script tags."
|
|
230
|
+
"HTML string to insert. The SDK sanitizes it before injection \u2014 no script tags or event handlers (onclick, onerror, etc.). NEVER embed JavaScript \u2014 use deepLink for canvas navigation instead."
|
|
231
231
|
),
|
|
232
232
|
position: z2.enum(["before", "after", "prepend", "append", "replace"]).describe(
|
|
233
233
|
'"before"/"after" inserts adjacent to the element; "prepend"/"append" inserts inside at the start/end; "replace" swaps the entire element.'
|
|
234
|
+
),
|
|
235
|
+
deepLink: z2.object({
|
|
236
|
+
tileId: z2.string().describe("ID of the canvas tile to open when the inserted element is clicked."),
|
|
237
|
+
itemId: z2.string().optional().describe(
|
|
238
|
+
"Optional specific item within the tile (e.g. a FAQ question ID) to scroll to after opening."
|
|
239
|
+
)
|
|
240
|
+
}).optional().describe(
|
|
241
|
+
"Makes the entire inserted element clickable to open the canvas panel and navigate to a specific tile. The SDK wires up click handlers, sets cursor to pointer, and publishes a notification.deep_link event. This is the ONLY correct way to connect inserted HTML to canvas tiles \u2014 NEVER use onclick handlers or window.SynOS in HTML strings."
|
|
234
242
|
)
|
|
235
243
|
}).describe(
|
|
236
|
-
"A single HTML insertion: injects a sanitized HTML fragment relative to a matched element."
|
|
244
|
+
"A single HTML insertion: injects a sanitized HTML fragment relative to a matched element. Use deepLink to connect inserted buttons/links to canvas tiles."
|
|
237
245
|
)
|
|
238
246
|
).optional().describe(
|
|
239
247
|
"Inserts sanitized HTML fragments relative to DOM elements. Use for adding badges, banners, or supplementary content. Do NOT embed JavaScript \u2014 use deepLink for canvas navigation."
|
|
@@ -279,7 +287,31 @@ var configSchema = z2.object({
|
|
|
279
287
|
}).describe(
|
|
280
288
|
"Props for adaptive-content DOM mutation operations. Each field targets a list of elements by anchorId and applies a specific type of change (text, attribute, style, HTML, or class)."
|
|
281
289
|
);
|
|
290
|
+
var CAPABILITIES_DOCUMENTATION = {
|
|
291
|
+
packageId: "adaptive-content",
|
|
292
|
+
description: "DOM content modification capabilities for text, attributes, styles, HTML, and classes.",
|
|
293
|
+
whenToUse: [
|
|
294
|
+
{ goal: "Replace an element's text", action: "content:setText" },
|
|
295
|
+
{ goal: "Change an HTML attribute (href, src, data-*)", action: "content:setAttr" },
|
|
296
|
+
{ goal: "Modify inline styles (color, size, spacing)", action: "content:setStyle" },
|
|
297
|
+
{ goal: "Inject new HTML before/after/inside an element", action: "content:insertHtml" },
|
|
298
|
+
{ goal: "Add a CSS class (show/hide, animate)", action: "content:addClass" },
|
|
299
|
+
{ goal: "Remove a CSS class", action: "content:removeClass" }
|
|
300
|
+
],
|
|
301
|
+
conventions: [
|
|
302
|
+
{
|
|
303
|
+
name: "Deep-linking inserted content to canvas tiles",
|
|
304
|
+
description: "Use the deepLink property on content:insertHtml to make inserted elements open the canvas panel and navigate to a specific tile when clicked. NEVER use onclick handlers or window.SynOS in HTML strings \u2014 they are sanitized and stripped. deepLink is the only supported mechanism."
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
name: "Blocked attributes",
|
|
308
|
+
description: "Event handler attributes (onclick, onerror, onload, etc.) are blocked by content:setAttr. Use data-* attributes for experiment markers instead."
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
events: []
|
|
312
|
+
};
|
|
282
313
|
export {
|
|
314
|
+
CAPABILITIES_DOCUMENTATION,
|
|
283
315
|
configSchema
|
|
284
316
|
};
|
|
285
317
|
//# sourceMappingURL=schema.js.map
|
package/dist/schema.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../sdk-contracts/dist/schemas.js", "../src/schema.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Shared Zod schemas for decision strategies, conditions, and event scoping.\n *\n * These are the canonical definitions \u2014 runtime-sdk and all adaptive packages\n * should import from here instead of duplicating.\n */\nimport { z } from 'zod';\n// =============================================================================\n// ANCHOR ID SCHEMA\n// =============================================================================\nexport const AnchorIdZ = z\n .object({\n selector: z.string(),\n route: z.union([z.string(), z.array(z.string())]),\n})\n .strict();\n// =============================================================================\n// AUTHORING FIELDS \u2014 title / description / validation\n//\n// These live on every action *during authoring* (LLM produces them; dashboard\n// displays them; reviewers QA-verify with them) but are stripped before the\n// runtime SDK receives the config. Stripping happens server-side in\n// `to_runtime_config` (platform/backend/app/domains/experiments/helpers.py).\n// They appear in the JSON Schema (and therefore in the tactician's prompt)\n// because the LLM needs to know they are valid action properties \u2014 otherwise\n// schema validation would reject what the prompt commands.\n//\n// Each action variant should `.extend(AuthoringFieldsZ)` alongside any\n// triggerWhen/condition extensions. Validation is an ordered list of\n// human-readable step strings \u2014 reviewers scan it as a checklist.\n// =============================================================================\nexport const AuthoringFieldsZ = {\n title: z\n .string()\n .max(200)\n .optional()\n .describe('Authoring-only: short label shown on the action plan dashboard. Stripped before serving to the runtime SDK.'),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe('Authoring-only: one-sentence explanation of what this action does and why. Stripped before serving to the runtime SDK.'),\n validation: z\n .array(z.string().max(500))\n .max(10)\n .optional()\n .describe('Authoring-only: ordered steps a reviewer can follow to trigger this action and visually confirm it works. Each entry is one step. Stripped before serving to the runtime SDK.'),\n};\n// =============================================================================\n// TRIGGER VOCABULARY \u2014 canonical lists of valid event names, metric keys, etc.\n// These flow through to the JSON schema as enums and are used by the LLM prompt.\n// =============================================================================\n/** Events that can be counted in event_count conditions. */\nexport const COUNTABLE_EVENTS = [\n // User interactions (from PostHog autocapture normalization)\n 'ui.click',\n 'ui.scroll',\n 'ui.input',\n 'ui.change',\n 'ui.submit',\n // Behavioral detectors (from event-processor)\n 'ui.hover',\n 'ui.idle',\n 'ui.scroll_thrash',\n 'ui.focus_bounce',\n // Navigation\n 'nav.page_view',\n 'nav.page_leave',\n // Derived behavioral signals\n 'behavior.rage_click',\n 'behavior.hesitation',\n 'behavior.confusion',\n];\nexport const CountableEventZ = z\n .enum(COUNTABLE_EVENTS)\n .describe('Event name to count. ui.* = user interactions and behavioral detectors, nav.* = page navigation, behavior.* = derived behavioral signals.');\n/** Valid session metric keys. */\nexport const SESSION_METRIC_KEYS = ['time_on_page', 'page_views', 'scroll_depth'];\nexport const SessionMetricKeyZ = z\n .enum(SESSION_METRIC_KEYS)\n .describe('Session metric key. time_on_page = seconds on current page, page_views = pages visited this session, scroll_depth = 0-100 percentage.');\n/** Element chain match field prefixes for counter filters. */\nexport const ELEMENT_MATCH_FIELDS = ['tag_name', '$el_text'];\n// Note: attr__* is a dynamic prefix (attr__data-id, attr__class, attr__href, etc.)\n// and cannot be enumerated. The match key is either one of ELEMENT_MATCH_FIELDS\n// or starts with \"attr__\".\n// =============================================================================\n// CONDITION SCHEMAS\n// =============================================================================\nexport const PageUrlConditionZ = z\n .object({\n type: z.literal('page_url'),\n url: z.string().describe('URL path to match (e.g. \"/pricing\", \"/dashboard\")'),\n})\n .describe('Fires when the current page URL matches. Use for page-specific actions. ' +\n 'Example: {\"type\": \"page_url\", \"url\": \"/pricing\"}');\nexport const RouteConditionZ = z\n .object({\n type: z.literal('route'),\n routeId: z.string().describe('Named route ID from the route filter'),\n})\n .describe('Fires when the current route matches a named route ID.');\nexport const AnchorVisibleConditionZ = z\n .object({\n type: z.literal('anchor_visible'),\n anchorId: z.string().describe('CSS selector of the anchor element'),\n state: z\n .enum(['visible', 'present', 'absent'])\n .describe('\"visible\" = in viewport, \"present\" = in DOM, \"absent\" = not in DOM'),\n})\n .describe(\"Fires based on a DOM element's visibility state. \" +\n 'Example: {\"type\": \"anchor_visible\", \"anchorId\": \"#cta-button\", \"state\": \"visible\"}');\nexport const EventOccurredConditionZ = z\n .object({\n type: z.literal('event_occurred'),\n eventName: z.string().describe('Event name (e.g. \"ui.click\", \"$pageview\")'),\n withinMs: z.number().optional().describe('Time window in ms. Omit = any time this session.'),\n})\n .describe('Fires when a specific event has occurred during this session. ' +\n 'Example: {\"type\": \"event_occurred\", \"eventName\": \"ui.click\", \"withinMs\": 5000}');\nexport const StateEqualsConditionZ = z\n .object({\n type: z.literal('state_equals'),\n key: z\n .string()\n .describe('Key in the SDK persistent state store (localStorage). Only valid for keys the host app explicitly sets via syntro.state.set().'),\n value: z.unknown().describe('Expected value to match against'),\n})\n .describe('Checks the SDK persistent state store (localStorage). ONLY for host-app state set via syntro.state.set() \u2014 ' +\n 'NOT for user attributes like region, device, or UTM params (those are handled by segment targeting). ' +\n 'Do NOT use this for targeting. If you do not know the valid state keys, do not use this condition type.');\nexport const ViewportConditionZ = z\n .object({\n type: z.literal('viewport'),\n minWidth: z.number().optional().describe('Minimum viewport width in pixels'),\n maxWidth: z.number().optional().describe('Maximum viewport width in pixels'),\n minHeight: z.number().optional().describe('Minimum viewport height in pixels'),\n maxHeight: z.number().optional().describe('Maximum viewport height in pixels'),\n})\n .describe('Fires based on viewport (screen) size. Use for responsive behavior. ' +\n 'Example: {\"type\": \"viewport\", \"minWidth\": 768} \u2014 fires on tablet and larger.');\nexport const SessionMetricConditionZ = z\n .object({\n type: z.literal('session_metric'),\n key: SessionMetricKeyZ,\n operator: z.enum(['gte', 'lte', 'eq', 'gt', 'lt']),\n threshold: z.number().describe('Numeric threshold to compare against'),\n})\n .describe('Fires when a session metric crosses a threshold. Valid keys: \"time_on_page\" (seconds), ' +\n '\"page_views\" (count), \"scroll_depth\" (0-100). ' +\n 'Example: {\"type\": \"session_metric\", \"key\": \"time_on_page\", \"operator\": \"gte\", \"threshold\": 30}');\nexport const DismissedConditionZ = z\n .object({\n type: z.literal('dismissed'),\n key: z.string().describe('Dismissal key (usually a tile or action ID)'),\n inverted: z\n .boolean()\n .optional()\n .describe('When true, fires if NOT dismissed (default behavior)'),\n})\n .describe('Checks if an item has been dismissed by the user. Use with inverted: true to show only if not dismissed.');\nexport const CooldownActiveConditionZ = z\n .object({\n type: z.literal('cooldown_active'),\n key: z.string().describe('Cooldown key'),\n inverted: z.boolean().optional().describe('When true, fires if cooldown is NOT active'),\n})\n .describe('Checks if a cooldown timer is currently active. Use to prevent showing the same intervention too frequently.');\nexport const FrequencyLimitConditionZ = z\n .object({\n type: z.literal('frequency_limit'),\n key: z.string().describe('Frequency counter key'),\n limit: z.number().describe('Maximum allowed count'),\n inverted: z.boolean().optional().describe('When true, fires if limit NOT reached'),\n})\n .describe('Checks if a frequency limit has been reached. Use to cap how many times an action fires per session.');\nexport const MatchOpZ = z\n .object({\n equals: z.union([z.string(), z.number(), z.boolean()]).optional(),\n contains: z.string().optional(),\n})\n .describe('Match operator for counter filters. Exactly one of equals or contains must be specified.');\nexport const CounterDefZ = z\n .object({\n events: z\n .array(CountableEventZ)\n .min(1)\n .describe('Event names to count. Use values from the countable events enum.'),\n match: z\n .record(z.string(), MatchOpZ)\n .optional()\n .describe('Property filters. Keys are event prop names or element-chain fields ' +\n '(tag_name, $el_text, attr__*). All entries AND together.'),\n})\n .describe('Defines what events to count. Registered as an accumulator predicate at config-load time.');\nexport const EventCountConditionZ = z\n .object({\n type: z.literal('event_count'),\n key: z.string().describe('Unique key for this counter (used for accumulator registration)'),\n operator: z.enum(['gte', 'lte', 'eq', 'gt', 'lt']),\n count: z.number().int().min(0).describe('Target count threshold'),\n withinMs: z\n .number()\n .positive()\n .optional()\n .describe('Time window in ms. Omit = count across entire session.'),\n counter: CounterDefZ.optional().describe('Inline counter definition. Defines what events to count.'),\n})\n .describe('Fires when accumulated event count crosses a threshold. Most powerful trigger type. ' +\n 'Example: {\"type\": \"event_count\", \"key\": \"pricing-clicks\", \"operator\": \"gte\", \"count\": 3, ' +\n '\"counter\": {\"events\": [\"ui.click\"], \"match\": {\"attr__data-cta\": {\"contains\": \"pricing\"}}}}');\nexport const ConditionZ = z.discriminatedUnion('type', [\n PageUrlConditionZ,\n RouteConditionZ,\n AnchorVisibleConditionZ,\n EventOccurredConditionZ,\n StateEqualsConditionZ,\n ViewportConditionZ,\n SessionMetricConditionZ,\n DismissedConditionZ,\n CooldownActiveConditionZ,\n FrequencyLimitConditionZ,\n EventCountConditionZ,\n]);\n// =============================================================================\n// STRATEGY SCHEMAS\n// =============================================================================\nexport const RuleZ = z\n .object({\n conditions: z\n .array(ConditionZ)\n .describe('Array of conditions \u2014 ALL must match (AND logic) for this rule to fire.'),\n value: z\n .unknown()\n .describe('Value returned when all conditions match. For triggerWhen: true = fire the action.'),\n})\n .describe('A single rule. ALL conditions must match (AND logic). Rules in a strategy are evaluated ' +\n 'top-to-bottom \u2014 first rule where all conditions match wins and returns its value.');\nexport const RuleStrategyZ = z\n .object({\n type: z.literal('rules'),\n rules: z\n .array(RuleZ)\n .describe('Ordered list of rules. Evaluated top-to-bottom \u2014 first match wins.'),\n default: z\n .unknown()\n .describe('Fallback value when no rule matches. For triggerWhen: false = do not fire by default.'),\n})\n .describe('Rule-based strategy. Evaluates rules top-to-bottom. First rule where ALL conditions match ' +\n 'returns its value. If no rule matches, returns default. ' +\n 'For triggerWhen: set value=true on matching rules, default=false.');\nexport const ScoreStrategyZ = z\n .object({\n type: z.literal('score'),\n field: z.string(),\n threshold: z.number(),\n above: z.unknown(),\n below: z.unknown(),\n})\n .describe('Score-based strategy. Compares a field value against a threshold.');\nexport const ModelStrategyZ = z\n .object({\n type: z.literal('model'),\n modelId: z.string(),\n inputs: z.array(z.string()),\n outputMapping: z.record(z.string(), z.unknown()),\n default: z.unknown(),\n})\n .describe('ML model strategy. Sends inputs to a model and maps outputs.');\nexport const ExternalStrategyZ = z\n .object({\n type: z.literal('external'),\n endpoint: z.string(),\n method: z.enum(['GET', 'POST']).optional(),\n default: z.unknown(),\n timeoutMs: z.number().optional(),\n})\n .describe('External API strategy. Calls an endpoint to determine the value.');\nexport const DecisionStrategyZ = z.discriminatedUnion('type', [\n RuleStrategyZ,\n ScoreStrategyZ,\n ModelStrategyZ,\n ExternalStrategyZ,\n]);\n/** Canonical Zod schema for the optional triggerWhen field on actions and adaptive items. */\nexport const TriggerWhenZ = DecisionStrategyZ.nullable().optional();\n// =============================================================================\n// TRIGGER DOCUMENTATION \u2014 examples and match field docs\n// Exported as constants so the schema generator can inject them into the\n// JSON schema. The Python prompt builder reads them from the schema.\n// =============================================================================\n/** Complete triggerWhen examples showing the full rules wrapper structure. */\nexport const TRIGGER_EXAMPLES = [\n {\n name: 'Click count on a specific element',\n description: 'Fire when user clicks an element with data-id=\"hero-cta\" 2+ times',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'event_count',\n key: 'cta-clicks',\n operator: 'gte',\n count: 2,\n counter: {\n events: ['ui.click'],\n match: { 'attr__data-id': { equals: 'hero-cta' } },\n },\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'Time on page threshold',\n description: 'Fire after user spends 30+ seconds on the page',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'session_metric',\n key: 'time_on_page',\n operator: 'gte',\n threshold: 30,\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'Element visible in viewport',\n description: 'Fire when a DOM element becomes visible',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'anchor_visible',\n anchorId: '#pricing-section',\n state: 'visible',\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'No trigger (fire immediately)',\n description: 'Action fires as soon as the segment matches \u2014 no in-session condition needed',\n triggerWhen: null,\n },\n];\n/** Documentation for counter.match field keys. */\nexport const MATCH_FIELD_DOCS = {\n tag_name: 'HTML tag name (e.g. \"button\", \"a\", \"input\")',\n $el_text: 'Visible text content of the element',\n 'attr__*': 'HTML attribute prefixed with attr__. Example: attr__data-id matches the data-id attribute, ' +\n 'attr__class matches the class attribute, attr__href matches the href attribute.',\n};\n// =============================================================================\n// EVENT SCOPE SCHEMA\n// =============================================================================\n/** Scopes a widget to specific events/URLs. */\nexport const EventScopeZ = z.object({\n events: z.array(z.string()),\n urlContains: z.string().optional(),\n props: z.record(z.union([z.string(), z.number(), z.boolean()])).optional(),\n});\n// =============================================================================\n// NOTIFY SCHEMA\n// =============================================================================\n/** Toast notification config for triggerWhen transitions. */\nexport const NotifyZ = z\n .object({\n title: z.string().optional(),\n body: z.string().optional(),\n icon: z.string().optional(),\n})\n .nullable()\n .optional();\n", "/**\n * Adaptive Content - Config Schema\n *\n * Zod schema for validating content app configuration.\n */\n\nimport { AnchorIdZ } from '@syntrologie/sdk-contracts';\nimport { z } from 'zod';\n\n/**\n * Content app config schema.\n * Defines the structure for content modifications in a canvas config.\n */\nexport const configSchema = z\n .object({\n /** Text replacements */\n textReplacements: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector identifying the element whose text content to replace.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this change, used for logging and debugging.'\n ),\n text: z\n .string()\n .describe('New text content to set on the element (replaces existing text).'),\n })\n .describe('A single text replacement: replaces the text content of a matched element.')\n )\n .optional()\n .describe(\n 'Replaces the visible text of DOM elements. Use for copy changes, headline personalization, or CTA label swaps.'\n ),\n\n /** Attribute modifications */\n attributeChanges: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector identifying the element whose attribute to set.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this change, used for logging and debugging.'\n ),\n attr: z\n .string()\n .min(\n 1,\n 'Attribute name must not be empty \u2014 setAttribute(\"\", ...) throws InvalidCharacterError in all browsers.'\n )\n .describe(\n 'HTML attribute name to set (e.g. \"href\", \"src\", \"data-experiment\"). Event handler attributes are blocked.'\n ),\n value: z.string().describe('New attribute value to apply.'),\n })\n .describe('A single attribute change: sets one HTML attribute on a matched element.')\n )\n .optional()\n .describe(\n 'Sets HTML attributes on DOM elements. Use for href swaps, src changes, or adding data-* experiment markers. Event handlers (onclick, onerror, etc.) are blocked.'\n ),\n\n /** Style modifications */\n styleChanges: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector identifying the element to restyle.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this change, used for logging and debugging.'\n ),\n styles: z\n .record(z.string())\n .describe(\n 'Map of CSS property \u2192 value pairs applied as inline styles (e.g. {\"background-color\": \"#1e40af\", \"padding\": \"2rem\"}).'\n ),\n })\n .describe('A single style change: sets inline CSS properties on a matched element.')\n )\n .optional()\n .describe(\n 'Sets inline CSS styles on DOM elements. Use for color, spacing, or visibility changes without modifying the stylesheet.'\n ),\n\n /** HTML insertions */\n htmlInsertions: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector identifying the reference element for the insertion.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this change, used for logging and debugging.'\n ),\n html: z\n .string()\n .min(\n 1,\n 'HTML string must not be empty \u2014 an empty html with position \"replace\" silently swaps the anchor element for an empty div.'\n )\n .describe(\n 'HTML string to insert. The SDK sanitizes it before injection \u2014 no script tags.'\n ),\n position: z\n .enum(['before', 'after', 'prepend', 'append', 'replace'])\n .describe(\n '\"before\"/\"after\" inserts adjacent to the element; \"prepend\"/\"append\" inserts inside at the start/end; \"replace\" swaps the entire element.'\n ),\n })\n .describe(\n 'A single HTML insertion: injects a sanitized HTML fragment relative to a matched element.'\n )\n )\n .optional()\n .describe(\n 'Inserts sanitized HTML fragments relative to DOM elements. Use for adding badges, banners, or supplementary content. Do NOT embed JavaScript \u2014 use deepLink for canvas navigation.'\n ),\n\n /** Class additions */\n classAdditions: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector identifying the element to add the class to.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this change, used for logging and debugging.'\n ),\n className: z\n .string()\n .min(\n 1,\n 'Class name must not be empty \u2014 classList.add(\"\") throws DOMException in all browsers.'\n )\n .describe(\n 'CSS class name to add to the element\\'s class list (e.g. \"highlighted\", \"is-active\").'\n ),\n })\n .describe('A single class addition: appends one CSS class to a matched element.')\n )\n .optional()\n .describe(\n 'Adds CSS classes to DOM elements. Use to toggle visibility, apply highlight styles, or trigger CSS animations already defined in the host stylesheet.'\n ),\n\n /** Class removals */\n classRemovals: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector identifying the element to remove the class from.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this change, used for logging and debugging.'\n ),\n className: z\n .string()\n .min(\n 1,\n 'Class name must not be empty \u2014 classList.remove(\"\") throws DOMException in all browsers.'\n )\n .describe(\n 'CSS class name to remove from the element\\'s class list (e.g. \"hidden\", \"disabled\").'\n ),\n })\n .describe('A single class removal: removes one CSS class from a matched element.')\n )\n .optional()\n .describe(\n 'Removes CSS classes from DOM elements. Use to reveal hidden elements, remove disabled states, or undo class-based styling.'\n ),\n })\n .describe(\n 'Props for adaptive-content DOM mutation operations. Each field targets a list of elements by anchorId and applies a specific type of change (text, attribute, style, HTML, or class).'\n );\n\nexport type ContentConfig = z.infer<typeof configSchema>;\n"],
|
|
5
|
-
"mappings": ";AAMA,SAAS,SAAS;AAIX,IAAM,YAAY,EACpB,OAAO;AAAA,EACR,UAAU,EAAE,OAAO;AAAA,EACnB,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACpD,CAAC,EACI,OAAO;AAgBL,IAAM,mBAAmB;AAAA,EAC5B,OAAO,EACF,OAAO,EACP,IAAI,GAAG,EACP,SAAS,EACT,SAAS,6GAA6G;AAAA,EAC3H,aAAa,EACR,OAAO,EACP,IAAI,GAAI,EACR,SAAS,EACT,SAAS,wHAAwH;AAAA,EACtI,YAAY,EACP,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,CAAC,EACzB,IAAI,EAAE,EACN,SAAS,EACT,SAAS,+KAA+K;AACjM;AAMO,IAAM,mBAAmB;AAAA;AAAA,EAE5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AACJ;AACO,IAAM,kBAAkB,EAC1B,KAAK,gB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A,SAAS,yEAAyE;AAAA,EACvF,EACC,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA;AAAA,EAGF,gBAAgBA,GACb;AAAA,IACCA,GACG,OAAO;AAAA,MACN,UAAU,UAAU;AAAA,QAClB;AAAA,MACF;AAAA,MACA,SAASA,GACN,OAAO,EACP;AAAA,QACC;AAAA,MACF;AAAA,MACF,MAAMA,GACH,OAAO,EACP;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC;AAAA,QACC;AAAA,MACF;AAAA,MACF,UAAUA,GACP,KAAK,CAAC,UAAU,SAAS,WAAW,UAAU,SAAS,CAAC,EACxD;AAAA,QACC;AAAA,MACF;AAAA,IACJ,CAAC,EACA;AAAA,MACC;AAAA,IACF;AAAA,EACJ,EACC,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA;AAAA,EAGF,gBAAgBA,GACb;AAAA,IACCA,GACG,OAAO;AAAA,MACN,UAAU,UAAU;AAAA,QAClB;AAAA,MACF;AAAA,MACA,SAASA,GACN,OAAO,EACP;AAAA,QACC;AAAA,MACF;AAAA,MACF,WAAWA,GACR,OAAO,EACP;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC;AAAA,QACC;AAAA,MACF;AAAA,IACJ,CAAC,EACA,SAAS,sEAAsE;AAAA,EACpF,EACC,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA;AAAA,EAGF,eAAeA,GACZ;AAAA,IACCA,GACG,OAAO;AAAA,MACN,UAAU,UAAU;AAAA,QAClB;AAAA,MACF;AAAA,MACA,SAASA,GACN,OAAO,EACP;AAAA,QACC;AAAA,MACF;AAAA,MACF,WAAWA,GACR,OAAO,EACP;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC;AAAA,QACC;AAAA,MACF;AAAA,IACJ,CAAC,EACA,SAAS,uEAAuE;AAAA,EACrF,EACC,SAAS,EACT;AAAA,IACC;AAAA,EACF;AACJ,CAAC,EACA;AAAA,EACC;AACF;",
|
|
4
|
+
"sourcesContent": ["/**\n * Shared Zod schemas for decision strategies, conditions, and event scoping.\n *\n * These are the canonical definitions \u2014 runtime-sdk and all adaptive packages\n * should import from here instead of duplicating.\n */\nimport { z } from 'zod';\n// =============================================================================\n// ANCHOR ID SCHEMA\n// =============================================================================\nexport const AnchorIdZ = z\n .object({\n selector: z.string(),\n route: z.union([z.string(), z.array(z.string())]),\n})\n .strict();\n// =============================================================================\n// AUTHORING FIELDS \u2014 title / description / validation\n//\n// These live on every action *during authoring* (LLM produces them; dashboard\n// displays them; reviewers QA-verify with them) but are stripped before the\n// runtime SDK receives the config. Stripping happens server-side in\n// `to_runtime_config` (platform/backend/app/domains/experiments/helpers.py).\n// They appear in the JSON Schema (and therefore in the tactician's prompt)\n// because the LLM needs to know they are valid action properties \u2014 otherwise\n// schema validation would reject what the prompt commands.\n//\n// Each action variant should `.extend(AuthoringFieldsZ)` alongside any\n// triggerWhen/condition extensions. Validation is an ordered list of\n// human-readable step strings \u2014 reviewers scan it as a checklist.\n// =============================================================================\nexport const AuthoringFieldsZ = {\n title: z\n .string()\n .max(200)\n .optional()\n .describe('Authoring-only: short label shown on the action plan dashboard. Stripped before serving to the runtime SDK.'),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe('Authoring-only: one-sentence explanation of what this action does and why. Stripped before serving to the runtime SDK.'),\n validation: z\n .array(z.string().max(500))\n .max(10)\n .optional()\n .describe('Authoring-only: ordered steps a reviewer can follow to trigger this action and visually confirm it works. Each entry is one step. Stripped before serving to the runtime SDK.'),\n};\n// =============================================================================\n// TRIGGER VOCABULARY \u2014 canonical lists of valid event names, metric keys, etc.\n// These flow through to the JSON schema as enums and are used by the LLM prompt.\n// =============================================================================\n/** Events that can be counted in event_count conditions. */\nexport const COUNTABLE_EVENTS = [\n // User interactions (from PostHog autocapture normalization)\n 'ui.click',\n 'ui.scroll',\n 'ui.input',\n 'ui.change',\n 'ui.submit',\n // Behavioral detectors (from event-processor)\n 'ui.hover',\n 'ui.idle',\n 'ui.scroll_thrash',\n 'ui.focus_bounce',\n // Navigation\n 'nav.page_view',\n 'nav.page_leave',\n // Derived behavioral signals\n 'behavior.rage_click',\n 'behavior.hesitation',\n 'behavior.confusion',\n];\nexport const CountableEventZ = z\n .enum(COUNTABLE_EVENTS)\n .describe('Event name to count. ui.* = user interactions and behavioral detectors, nav.* = page navigation, behavior.* = derived behavioral signals.');\n/** Valid session metric keys. */\nexport const SESSION_METRIC_KEYS = ['time_on_page', 'page_views', 'scroll_depth'];\nexport const SessionMetricKeyZ = z\n .enum(SESSION_METRIC_KEYS)\n .describe('Session metric key. time_on_page = seconds on current page, page_views = pages visited this session, scroll_depth = 0-100 percentage.');\n/** Element chain match field prefixes for counter filters. */\nexport const ELEMENT_MATCH_FIELDS = ['tag_name', '$el_text'];\n// Note: attr__* is a dynamic prefix (attr__data-id, attr__class, attr__href, etc.)\n// and cannot be enumerated. The match key is either one of ELEMENT_MATCH_FIELDS\n// or starts with \"attr__\".\n// =============================================================================\n// CONDITION SCHEMAS\n// =============================================================================\nexport const PageUrlConditionZ = z\n .object({\n type: z.literal('page_url'),\n url: z.string().describe('URL path to match (e.g. \"/pricing\", \"/dashboard\")'),\n})\n .describe('Fires when the current page URL matches. Use for page-specific actions. ' +\n 'Example: {\"type\": \"page_url\", \"url\": \"/pricing\"}');\nexport const RouteConditionZ = z\n .object({\n type: z.literal('route'),\n routeId: z.string().describe('Named route ID from the route filter'),\n})\n .describe('Fires when the current route matches a named route ID.');\nexport const AnchorVisibleConditionZ = z\n .object({\n type: z.literal('anchor_visible'),\n anchorId: z.string().describe('CSS selector of the anchor element'),\n state: z\n .enum(['visible', 'present', 'absent'])\n .describe('\"visible\" = in viewport, \"present\" = in DOM, \"absent\" = not in DOM'),\n})\n .describe(\"Fires based on a DOM element's visibility state. \" +\n 'Example: {\"type\": \"anchor_visible\", \"anchorId\": \"#cta-button\", \"state\": \"visible\"}');\nexport const EventOccurredConditionZ = z\n .object({\n type: z.literal('event_occurred'),\n eventName: z.string().describe('Event name (e.g. \"ui.click\", \"$pageview\")'),\n withinMs: z.number().optional().describe('Time window in ms. Omit = any time this session.'),\n})\n .describe('Fires when a specific event has occurred during this session. ' +\n 'Example: {\"type\": \"event_occurred\", \"eventName\": \"ui.click\", \"withinMs\": 5000}');\nexport const StateEqualsConditionZ = z\n .object({\n type: z.literal('state_equals'),\n key: z\n .string()\n .describe('Key in the SDK persistent state store (localStorage). Only valid for keys the host app explicitly sets via syntro.state.set().'),\n value: z.unknown().describe('Expected value to match against'),\n})\n .describe('Checks the SDK persistent state store (localStorage). ONLY for host-app state set via syntro.state.set() \u2014 ' +\n 'NOT for user attributes like region, device, or UTM params (those are handled by segment targeting). ' +\n 'Do NOT use this for targeting. If you do not know the valid state keys, do not use this condition type.');\nexport const ViewportConditionZ = z\n .object({\n type: z.literal('viewport'),\n minWidth: z.number().optional().describe('Minimum viewport width in pixels'),\n maxWidth: z.number().optional().describe('Maximum viewport width in pixels'),\n minHeight: z.number().optional().describe('Minimum viewport height in pixels'),\n maxHeight: z.number().optional().describe('Maximum viewport height in pixels'),\n})\n .describe('Fires based on viewport (screen) size. Use for responsive behavior. ' +\n 'Example: {\"type\": \"viewport\", \"minWidth\": 768} \u2014 fires on tablet and larger.');\nexport const SessionMetricConditionZ = z\n .object({\n type: z.literal('session_metric'),\n key: SessionMetricKeyZ,\n operator: z.enum(['gte', 'lte', 'eq', 'gt', 'lt']),\n threshold: z.number().describe('Numeric threshold to compare against'),\n})\n .describe('Fires when a session metric crosses a threshold. Valid keys: \"time_on_page\" (seconds), ' +\n '\"page_views\" (count), \"scroll_depth\" (0-100). ' +\n 'Example: {\"type\": \"session_metric\", \"key\": \"time_on_page\", \"operator\": \"gte\", \"threshold\": 30}');\nexport const DismissedConditionZ = z\n .object({\n type: z.literal('dismissed'),\n key: z.string().describe('Dismissal key (usually a tile or action ID)'),\n inverted: z\n .boolean()\n .optional()\n .describe('When true, fires if NOT dismissed (default behavior)'),\n})\n .describe('Checks if an item has been dismissed by the user. Use with inverted: true to show only if not dismissed.');\nexport const CooldownActiveConditionZ = z\n .object({\n type: z.literal('cooldown_active'),\n key: z.string().describe('Cooldown key'),\n inverted: z.boolean().optional().describe('When true, fires if cooldown is NOT active'),\n})\n .describe('Checks if a cooldown timer is currently active. Use to prevent showing the same intervention too frequently.');\nexport const FrequencyLimitConditionZ = z\n .object({\n type: z.literal('frequency_limit'),\n key: z.string().describe('Frequency counter key'),\n limit: z.number().describe('Maximum allowed count'),\n inverted: z.boolean().optional().describe('When true, fires if limit NOT reached'),\n})\n .describe('Checks if a frequency limit has been reached. Use to cap how many times an action fires per session.');\nexport const MatchOpZ = z\n .object({\n equals: z.union([z.string(), z.number(), z.boolean()]).optional(),\n contains: z.string().optional(),\n})\n .describe('Match operator for counter filters. Exactly one of equals or contains must be specified.');\nexport const CounterDefZ = z\n .object({\n events: z\n .array(CountableEventZ)\n .min(1)\n .describe('Event names to count. Use values from the countable events enum.'),\n match: z\n .record(z.string(), MatchOpZ)\n .optional()\n .describe('Property filters. Keys are event prop names or element-chain fields ' +\n '(tag_name, $el_text, attr__*). All entries AND together.'),\n})\n .describe('Defines what events to count. Registered as an accumulator predicate at config-load time.');\nexport const EventCountConditionZ = z\n .object({\n type: z.literal('event_count'),\n key: z.string().describe('Unique key for this counter (used for accumulator registration)'),\n operator: z.enum(['gte', 'lte', 'eq', 'gt', 'lt']),\n count: z.number().int().min(0).describe('Target count threshold'),\n withinMs: z\n .number()\n .positive()\n .optional()\n .describe('Time window in ms. Omit = count across entire session.'),\n counter: CounterDefZ.optional().describe('Inline counter definition. Defines what events to count.'),\n})\n .describe('Fires when accumulated event count crosses a threshold. Most powerful trigger type. ' +\n 'Example: {\"type\": \"event_count\", \"key\": \"pricing-clicks\", \"operator\": \"gte\", \"count\": 3, ' +\n '\"counter\": {\"events\": [\"ui.click\"], \"match\": {\"attr__data-cta\": {\"contains\": \"pricing\"}}}}');\nexport const ConditionZ = z.discriminatedUnion('type', [\n PageUrlConditionZ,\n RouteConditionZ,\n AnchorVisibleConditionZ,\n EventOccurredConditionZ,\n StateEqualsConditionZ,\n ViewportConditionZ,\n SessionMetricConditionZ,\n DismissedConditionZ,\n CooldownActiveConditionZ,\n FrequencyLimitConditionZ,\n EventCountConditionZ,\n]);\n// =============================================================================\n// STRATEGY SCHEMAS\n// =============================================================================\nexport const RuleZ = z\n .object({\n conditions: z\n .array(ConditionZ)\n .describe('Array of conditions \u2014 ALL must match (AND logic) for this rule to fire.'),\n value: z\n .unknown()\n .describe('Value returned when all conditions match. For triggerWhen: true = fire the action.'),\n})\n .describe('A single rule. ALL conditions must match (AND logic). Rules in a strategy are evaluated ' +\n 'top-to-bottom \u2014 first rule where all conditions match wins and returns its value.');\nexport const RuleStrategyZ = z\n .object({\n type: z.literal('rules'),\n rules: z\n .array(RuleZ)\n .describe('Ordered list of rules. Evaluated top-to-bottom \u2014 first match wins.'),\n default: z\n .unknown()\n .describe('Fallback value when no rule matches. For triggerWhen: false = do not fire by default.'),\n})\n .describe('Rule-based strategy. Evaluates rules top-to-bottom. First rule where ALL conditions match ' +\n 'returns its value. If no rule matches, returns default. ' +\n 'For triggerWhen: set value=true on matching rules, default=false.');\nexport const ScoreStrategyZ = z\n .object({\n type: z.literal('score'),\n field: z.string(),\n threshold: z.number(),\n above: z.unknown(),\n below: z.unknown(),\n})\n .describe('Score-based strategy. Compares a field value against a threshold.');\nexport const ModelStrategyZ = z\n .object({\n type: z.literal('model'),\n modelId: z.string(),\n inputs: z.array(z.string()),\n outputMapping: z.record(z.string(), z.unknown()),\n default: z.unknown(),\n})\n .describe('ML model strategy. Sends inputs to a model and maps outputs.');\nexport const ExternalStrategyZ = z\n .object({\n type: z.literal('external'),\n endpoint: z.string(),\n method: z.enum(['GET', 'POST']).optional(),\n default: z.unknown(),\n timeoutMs: z.number().optional(),\n})\n .describe('External API strategy. Calls an endpoint to determine the value.');\nexport const DecisionStrategyZ = z.discriminatedUnion('type', [\n RuleStrategyZ,\n ScoreStrategyZ,\n ModelStrategyZ,\n ExternalStrategyZ,\n]);\n/** Canonical Zod schema for the optional triggerWhen field on actions and adaptive items. */\nexport const TriggerWhenZ = DecisionStrategyZ.nullable().optional();\n// =============================================================================\n// TRIGGER DOCUMENTATION \u2014 examples and match field docs\n// Exported as constants so the schema generator can inject them into the\n// JSON schema. The Python prompt builder reads them from the schema.\n// =============================================================================\n/** Complete triggerWhen examples showing the full rules wrapper structure. */\nexport const TRIGGER_EXAMPLES = [\n {\n name: 'Click count on a specific element',\n description: 'Fire when user clicks an element with data-id=\"hero-cta\" 2+ times',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'event_count',\n key: 'cta-clicks',\n operator: 'gte',\n count: 2,\n counter: {\n events: ['ui.click'],\n match: { 'attr__data-id': { equals: 'hero-cta' } },\n },\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'Time on page threshold',\n description: 'Fire after user spends 30+ seconds on the page',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'session_metric',\n key: 'time_on_page',\n operator: 'gte',\n threshold: 30,\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'Element visible in viewport',\n description: 'Fire when a DOM element becomes visible',\n triggerWhen: {\n type: 'rules',\n rules: [\n {\n conditions: [\n {\n type: 'anchor_visible',\n anchorId: '#pricing-section',\n state: 'visible',\n },\n ],\n value: true,\n },\n ],\n default: false,\n },\n },\n {\n name: 'No trigger (fire immediately)',\n description: 'Action fires as soon as the segment matches \u2014 no in-session condition needed',\n triggerWhen: null,\n },\n];\n/** Documentation for counter.match field keys. */\nexport const MATCH_FIELD_DOCS = {\n tag_name: 'HTML tag name (e.g. \"button\", \"a\", \"input\")',\n $el_text: 'Visible text content of the element',\n 'attr__*': 'HTML attribute prefixed with attr__. Example: attr__data-id matches the data-id attribute, ' +\n 'attr__class matches the class attribute, attr__href matches the href attribute.',\n};\n// =============================================================================\n// EVENT SCOPE SCHEMA\n// =============================================================================\n/** Scopes a widget to specific events/URLs. */\nexport const EventScopeZ = z.object({\n events: z.array(z.string()),\n urlContains: z.string().optional(),\n props: z.record(z.union([z.string(), z.number(), z.boolean()])).optional(),\n});\n// =============================================================================\n// NOTIFY SCHEMA\n// =============================================================================\n/** Toast notification config for triggerWhen transitions. */\nexport const NotifyZ = z\n .object({\n title: z.string().optional(),\n body: z.string().optional(),\n icon: z.string().optional(),\n})\n .nullable()\n .optional();\n", "/**\n * Adaptive Content - Config Schema\n *\n * Zod schema for validating content app configuration.\n */\n\nimport { AnchorIdZ } from '@syntrologie/sdk-contracts';\nimport { z } from 'zod';\n\n/**\n * Content app config schema.\n * Defines the structure for content modifications in a canvas config.\n */\nexport const configSchema = z\n .object({\n /** Text replacements */\n textReplacements: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector identifying the element whose text content to replace.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this change, used for logging and debugging.'\n ),\n text: z\n .string()\n .describe('New text content to set on the element (replaces existing text).'),\n })\n .describe('A single text replacement: replaces the text content of a matched element.')\n )\n .optional()\n .describe(\n 'Replaces the visible text of DOM elements. Use for copy changes, headline personalization, or CTA label swaps.'\n ),\n\n /** Attribute modifications */\n attributeChanges: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector identifying the element whose attribute to set.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this change, used for logging and debugging.'\n ),\n attr: z\n .string()\n .min(\n 1,\n 'Attribute name must not be empty \u2014 setAttribute(\"\", ...) throws InvalidCharacterError in all browsers.'\n )\n .describe(\n 'HTML attribute name to set (e.g. \"href\", \"src\", \"data-experiment\"). Event handler attributes are blocked.'\n ),\n value: z.string().describe('New attribute value to apply.'),\n })\n .describe('A single attribute change: sets one HTML attribute on a matched element.')\n )\n .optional()\n .describe(\n 'Sets HTML attributes on DOM elements. Use for href swaps, src changes, or adding data-* experiment markers. Event handlers (onclick, onerror, etc.) are blocked.'\n ),\n\n /** Style modifications */\n styleChanges: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector identifying the element to restyle.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this change, used for logging and debugging.'\n ),\n styles: z\n .record(z.string())\n .describe(\n 'Map of CSS property \u2192 value pairs applied as inline styles (e.g. {\"background-color\": \"#1e40af\", \"padding\": \"2rem\"}).'\n ),\n })\n .describe('A single style change: sets inline CSS properties on a matched element.')\n )\n .optional()\n .describe(\n 'Sets inline CSS styles on DOM elements. Use for color, spacing, or visibility changes without modifying the stylesheet.'\n ),\n\n /** HTML insertions */\n htmlInsertions: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector identifying the reference element for the insertion.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this change, used for logging and debugging.'\n ),\n html: z\n .string()\n .min(\n 1,\n 'HTML string must not be empty \u2014 an empty html with position \"replace\" silently swaps the anchor element for an empty div.'\n )\n .describe(\n 'HTML string to insert. The SDK sanitizes it before injection \u2014 no script tags or event handlers (onclick, onerror, etc.). NEVER embed JavaScript \u2014 use deepLink for canvas navigation instead.'\n ),\n position: z\n .enum(['before', 'after', 'prepend', 'append', 'replace'])\n .describe(\n '\"before\"/\"after\" inserts adjacent to the element; \"prepend\"/\"append\" inserts inside at the start/end; \"replace\" swaps the entire element.'\n ),\n deepLink: z\n .object({\n tileId: z\n .string()\n .describe('ID of the canvas tile to open when the inserted element is clicked.'),\n itemId: z\n .string()\n .optional()\n .describe(\n 'Optional specific item within the tile (e.g. a FAQ question ID) to scroll to after opening.'\n ),\n })\n .optional()\n .describe(\n 'Makes the entire inserted element clickable to open the canvas panel and navigate to a specific tile. The SDK wires up click handlers, sets cursor to pointer, and publishes a notification.deep_link event. This is the ONLY correct way to connect inserted HTML to canvas tiles \u2014 NEVER use onclick handlers or window.SynOS in HTML strings.'\n ),\n })\n .describe(\n 'A single HTML insertion: injects a sanitized HTML fragment relative to a matched element. Use deepLink to connect inserted buttons/links to canvas tiles.'\n )\n )\n .optional()\n .describe(\n 'Inserts sanitized HTML fragments relative to DOM elements. Use for adding badges, banners, or supplementary content. Do NOT embed JavaScript \u2014 use deepLink for canvas navigation.'\n ),\n\n /** Class additions */\n classAdditions: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector identifying the element to add the class to.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this change, used for logging and debugging.'\n ),\n className: z\n .string()\n .min(\n 1,\n 'Class name must not be empty \u2014 classList.add(\"\") throws DOMException in all browsers.'\n )\n .describe(\n 'CSS class name to add to the element\\'s class list (e.g. \"highlighted\", \"is-active\").'\n ),\n })\n .describe('A single class addition: appends one CSS class to a matched element.')\n )\n .optional()\n .describe(\n 'Adds CSS classes to DOM elements. Use to toggle visibility, apply highlight styles, or trigger CSS animations already defined in the host stylesheet.'\n ),\n\n /** Class removals */\n classRemovals: z\n .array(\n z\n .object({\n anchorId: AnchorIdZ.describe(\n 'Route and CSS selector identifying the element to remove the class from.'\n ),\n summary: z\n .string()\n .describe(\n 'Human-readable description of this change, used for logging and debugging.'\n ),\n className: z\n .string()\n .min(\n 1,\n 'Class name must not be empty \u2014 classList.remove(\"\") throws DOMException in all browsers.'\n )\n .describe(\n 'CSS class name to remove from the element\\'s class list (e.g. \"hidden\", \"disabled\").'\n ),\n })\n .describe('A single class removal: removes one CSS class from a matched element.')\n )\n .optional()\n .describe(\n 'Removes CSS classes from DOM elements. Use to reveal hidden elements, remove disabled states, or undo class-based styling.'\n ),\n })\n .describe(\n 'Props for adaptive-content DOM mutation operations. Each field targets a list of elements by anchorId and applies a specific type of change (text, attribute, style, HTML, or class).'\n );\n\nexport type ContentConfig = z.infer<typeof configSchema>;\n\n// ============================================================================\n// Capabilities Documentation (injected into JSON Schema for LLM prompts)\n// ============================================================================\n\nexport const CAPABILITIES_DOCUMENTATION = {\n packageId: 'adaptive-content',\n description:\n 'DOM content modification capabilities for text, attributes, styles, HTML, and classes.',\n whenToUse: [\n { goal: \"Replace an element's text\", action: 'content:setText' },\n { goal: 'Change an HTML attribute (href, src, data-*)', action: 'content:setAttr' },\n { goal: 'Modify inline styles (color, size, spacing)', action: 'content:setStyle' },\n { goal: 'Inject new HTML before/after/inside an element', action: 'content:insertHtml' },\n { goal: 'Add a CSS class (show/hide, animate)', action: 'content:addClass' },\n { goal: 'Remove a CSS class', action: 'content:removeClass' },\n ],\n conventions: [\n {\n name: 'Deep-linking inserted content to canvas tiles',\n description:\n 'Use the deepLink property on content:insertHtml to make inserted elements open the canvas panel and navigate to a specific tile when clicked. NEVER use onclick handlers or window.SynOS in HTML strings \u2014 they are sanitized and stripped. deepLink is the only supported mechanism.',\n },\n {\n name: 'Blocked attributes',\n description:\n 'Event handler attributes (onclick, onerror, onload, etc.) are blocked by content:setAttr. Use data-* attributes for experiment markers instead.',\n },\n ],\n events: [],\n};\n"],
|
|
5
|
+
"mappings": ";AAMA,SAAS,SAAS;AAIX,IAAM,YAAY,EACpB,OAAO;AAAA,EACR,UAAU,EAAE,OAAO;AAAA,EACnB,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACpD,CAAC,EACI,OAAO;AAgBL,IAAM,mBAAmB;AAAA,EAC5B,OAAO,EACF,OAAO,EACP,IAAI,GAAG,EACP,SAAS,EACT,SAAS,6GAA6G;AAAA,EAC3H,aAAa,EACR,OAAO,EACP,IAAI,GAAI,EACR,SAAS,EACT,SAAS,wHAAwH;AAAA,EACtI,YAAY,EACP,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,CAAC,EACzB,IAAI,EAAE,EACN,SAAS,EACT,SAAS,+KAA+K;AACjM;AAMO,IAAM,mBAAmB;AAAA;AAAA,EAE5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAA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