@advertising-chat/mcp 0.2.1 → 0.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +123 -18
- package/bin/auth.d.ts +46 -0
- package/bin/auth.js +186 -0
- package/bin/auth.js.map +1 -0
- package/bin/cli.js +79 -11
- package/bin/cli.js.map +1 -1
- package/bin/client.d.ts +70 -0
- package/bin/client.js +121 -0
- package/bin/client.js.map +1 -0
- package/bin/docs.d.ts +66 -0
- package/bin/docs.js +247 -0
- package/bin/docs.js.map +1 -0
- package/bin/flow/flowSchema.d.ts +298 -0
- package/bin/flow/flowSchema.js +234 -0
- package/bin/flow/flowSchema.js.map +1 -0
- package/bin/flow/flowValidator.d.ts +15 -0
- package/bin/flow/flowValidator.js +179 -0
- package/bin/flow/flowValidator.js.map +1 -0
- package/bin/flow/flowZod.d.ts +117 -0
- package/bin/flow/flowZod.js +130 -0
- package/bin/flow/flowZod.js.map +1 -0
- package/bin/format.d.ts +14 -0
- package/bin/format.js +50 -0
- package/bin/format.js.map +1 -0
- package/bin/index.d.ts +23 -1
- package/bin/index.js +65 -4
- package/bin/index.js.map +1 -1
- package/bin/routeInventory.d.ts +69 -0
- package/bin/routeInventory.js +201 -0
- package/bin/routeInventory.js.map +1 -0
- package/bin/serve.d.ts +24 -0
- package/bin/serve.js +196 -0
- package/bin/serve.js.map +1 -0
- package/bin/server.d.ts +24 -36
- package/bin/server.js +54 -182
- package/bin/server.js.map +1 -1
- package/bin/tool.d.ts +84 -0
- package/bin/tool.js +39 -0
- package/bin/tool.js.map +1 -0
- package/bin/tools/account.d.ts +2 -0
- package/bin/tools/account.js +47 -0
- package/bin/tools/account.js.map +1 -0
- package/bin/tools/attributes.d.ts +10 -0
- package/bin/tools/attributes.js +200 -0
- package/bin/tools/attributes.js.map +1 -0
- package/bin/tools/campaigns.d.ts +12 -0
- package/bin/tools/campaigns.js +230 -0
- package/bin/tools/campaigns.js.map +1 -0
- package/bin/tools/decisions.d.ts +14 -0
- package/bin/tools/decisions.js +309 -0
- package/bin/tools/decisions.js.map +1 -0
- package/bin/tools/docs.d.ts +3 -0
- package/bin/tools/docs.js +55 -0
- package/bin/tools/docs.js.map +1 -0
- package/bin/tools/index.d.ts +21 -0
- package/bin/tools/index.js +60 -0
- package/bin/tools/index.js.map +1 -0
- package/bin/tools/moments.d.ts +9 -0
- package/bin/tools/moments.js +143 -0
- package/bin/tools/moments.js.map +1 -0
- package/bin/tools/network.d.ts +5 -0
- package/bin/tools/network.js +99 -0
- package/bin/tools/network.js.map +1 -0
- package/bin/tools/offers.d.ts +11 -0
- package/bin/tools/offers.js +239 -0
- package/bin/tools/offers.js.map +1 -0
- package/bin/tools/results.d.ts +18 -0
- package/bin/tools/results.js +116 -0
- package/bin/tools/results.js.map +1 -0
- package/bin/tools/rules.d.ts +9 -0
- package/bin/tools/rules.js +318 -0
- package/bin/tools/rules.js.map +1 -0
- package/bin/tools/settings.d.ts +3 -0
- package/bin/tools/settings.js +54 -0
- package/bin/tools/settings.js.map +1 -0
- package/bin/tools/shared.d.ts +50 -0
- package/bin/tools/shared.js +171 -0
- package/bin/tools/shared.js.map +1 -0
- package/bin/tools/translation.d.ts +6 -0
- package/bin/tools/translation.js +139 -0
- package/bin/tools/translation.js.map +1 -0
- package/bin/version.d.ts +2 -0
- package/bin/version.js +6 -0
- package/bin/version.js.map +1 -0
- package/package.json +10 -7
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.validateFlowPayload = validateFlowPayload;
|
|
7
|
+
exports.propertyPath = propertyPath;
|
|
8
|
+
/**
|
|
9
|
+
* Client-side flow-creative validation: JSON Schema (ajv) + the graph
|
|
10
|
+
* invariants G1–G10 from flow-creative-spec.md §2.2.
|
|
11
|
+
*
|
|
12
|
+
* Running this *before* POSTing a creative gives the authoring model
|
|
13
|
+
* immediate, per-property errors it can self-correct from, instead of a
|
|
14
|
+
* server round trip.
|
|
15
|
+
*/
|
|
16
|
+
const _2020_1 = __importDefault(require("ajv/dist/2020"));
|
|
17
|
+
const ajv_formats_1 = __importDefault(require("ajv-formats"));
|
|
18
|
+
const flowSchema_1 = require("./flowSchema");
|
|
19
|
+
const MAX_DEPTH = 6; // G5: user-visible turns
|
|
20
|
+
const MAX_SPEC_BYTES = 16 * 1024; // G9
|
|
21
|
+
const ajv = new _2020_1.default({ allErrors: true, strict: false });
|
|
22
|
+
(0, ajv_formats_1.default)(ajv);
|
|
23
|
+
const validateSchema = ajv.compile(flowSchema_1.flowSchema);
|
|
24
|
+
/**
|
|
25
|
+
* Validate a flow payload against the v1 spec: JSON Schema shape first,
|
|
26
|
+
* then the graph invariants. Returns human/LLM-readable error strings.
|
|
27
|
+
*/
|
|
28
|
+
function validateFlowPayload(flow) {
|
|
29
|
+
const errors = [];
|
|
30
|
+
if (!validateSchema(flow)) {
|
|
31
|
+
for (const err of validateSchema.errors || []) {
|
|
32
|
+
errors.push(`flow${propertyPath(err.instancePath)}: ${err.message}`);
|
|
33
|
+
}
|
|
34
|
+
// Shape is wrong — graph checks would be noise on a malformed spec.
|
|
35
|
+
return { valid: false, errors: dedupe(errors) };
|
|
36
|
+
}
|
|
37
|
+
const spec = flow;
|
|
38
|
+
// G9: total serialized spec <= 16 KB.
|
|
39
|
+
const bytes = Buffer.byteLength(JSON.stringify(spec), 'utf8');
|
|
40
|
+
if (bytes > MAX_SPEC_BYTES) {
|
|
41
|
+
errors.push(`flow: serialized spec is ${bytes} bytes; must be <= ${MAX_SPEC_BYTES} (16 KB)`);
|
|
42
|
+
}
|
|
43
|
+
// G1: node ids unique; choice ids unique within their node.
|
|
44
|
+
const ids = new Map();
|
|
45
|
+
spec.nodes.forEach((node, i) => {
|
|
46
|
+
if (ids.has(node.id)) {
|
|
47
|
+
errors.push(`flow.nodes[${i}].id: duplicate node id '${node.id}'`);
|
|
48
|
+
}
|
|
49
|
+
ids.set(node.id, node);
|
|
50
|
+
if (node.choices) {
|
|
51
|
+
const seen = new Set();
|
|
52
|
+
node.choices.forEach((choice, j) => {
|
|
53
|
+
if (seen.has(choice.id)) {
|
|
54
|
+
errors.push(`flow.nodes[${i}].choices[${j}].id: duplicate choice id '${choice.id}'`);
|
|
55
|
+
}
|
|
56
|
+
seen.add(choice.id);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
// G2: entryNodeId exists and is a message node.
|
|
61
|
+
const entry = ids.get(spec.entryNodeId);
|
|
62
|
+
if (!entry) {
|
|
63
|
+
errors.push(`flow.entryNodeId: unknown node '${spec.entryNodeId}' (must reference an existing node)`);
|
|
64
|
+
}
|
|
65
|
+
else if (entry.type !== 'message') {
|
|
66
|
+
errors.push(`flow.entryNodeId: node '${spec.entryNodeId}' is a '${entry.type}' node; the entry node must be a 'message' node`);
|
|
67
|
+
}
|
|
68
|
+
// G3: every edge references an existing node id.
|
|
69
|
+
const edgesOf = (node) => {
|
|
70
|
+
const edges = [];
|
|
71
|
+
if (node.next !== undefined)
|
|
72
|
+
edges.push({ label: 'next', target: node.next });
|
|
73
|
+
node.choices?.forEach((c, j) => edges.push({ label: `choices[${j}].target`, target: c.target }));
|
|
74
|
+
node.intents?.forEach((x, j) => edges.push({ label: `intents[${j}].target`, target: x.target }));
|
|
75
|
+
if (node.noMatchTarget !== undefined) {
|
|
76
|
+
edges.push({ label: 'noMatchTarget', target: node.noMatchTarget });
|
|
77
|
+
}
|
|
78
|
+
return edges;
|
|
79
|
+
};
|
|
80
|
+
spec.nodes.forEach((node, i) => {
|
|
81
|
+
for (const edge of edgesOf(node)) {
|
|
82
|
+
if (!ids.has(edge.target)) {
|
|
83
|
+
errors.push(`flow.nodes[${i}].${edge.label}: unknown node '${edge.target}'`);
|
|
84
|
+
}
|
|
85
|
+
else if (edge.target === node.id) {
|
|
86
|
+
errors.push(`flow.nodes[${i}].${edge.label}: self-edge on '${node.id}' creates a zero-progress loop`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
// G7: link_out / handoff / end actions are terminal (no `next`).
|
|
91
|
+
spec.nodes.forEach((node, i) => {
|
|
92
|
+
if (node.type === 'action' &&
|
|
93
|
+
node.next !== undefined &&
|
|
94
|
+
node.action &&
|
|
95
|
+
node.action.kind !== 'conversion') {
|
|
96
|
+
errors.push(`flow.nodes[${i}].next: '${node.action.kind}' actions are terminal; 'next' is only valid after 'conversion'`);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
// G8: disclosureText present and non-empty (schema-enforced, re-checked —
|
|
100
|
+
// policy invariant, not just shape).
|
|
101
|
+
if (!spec.metadata?.disclosureText?.trim()) {
|
|
102
|
+
errors.push('flow.metadata.disclosureText: required and must be non-empty');
|
|
103
|
+
}
|
|
104
|
+
// G10: all URLs are https:.
|
|
105
|
+
const checkHttps = (i, label, url) => {
|
|
106
|
+
if (url !== undefined && !/^https:\/\//i.test(url)) {
|
|
107
|
+
errors.push(`flow.nodes[${i}].${label}: url must use https ('${url}')`);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
spec.nodes.forEach((node, i) => {
|
|
111
|
+
checkHttps(i, 'imageUrl', node.imageUrl);
|
|
112
|
+
checkHttps(i, 'action.url', node.action?.url);
|
|
113
|
+
});
|
|
114
|
+
if (spec.metadata?.brandLogoUrl !== undefined &&
|
|
115
|
+
!/^https:\/\//i.test(spec.metadata.brandLogoUrl)) {
|
|
116
|
+
errors.push(`flow.metadata.brandLogoUrl: url must use https ('${spec.metadata.brandLogoUrl}')`);
|
|
117
|
+
}
|
|
118
|
+
// Stop before reachability analysis if the graph edges are broken.
|
|
119
|
+
if (errors.length)
|
|
120
|
+
return { valid: false, errors: dedupe(errors) };
|
|
121
|
+
// G5 (v1): the graph must be acyclic, and every path terminates at an
|
|
122
|
+
// action node within MAX_DEPTH user-visible turns (message/choice-set
|
|
123
|
+
// presentations count; action nodes don't).
|
|
124
|
+
// G4: every node reachable from the entry node.
|
|
125
|
+
const reachable = new Set();
|
|
126
|
+
const onPath = new Set();
|
|
127
|
+
let cycle = false;
|
|
128
|
+
const walk = (id, depth) => {
|
|
129
|
+
const node = ids.get(id);
|
|
130
|
+
if (onPath.has(id)) {
|
|
131
|
+
if (!cycle) {
|
|
132
|
+
errors.push(`flow: cycle detected through node '${id}' — v1 flow graphs must be acyclic`);
|
|
133
|
+
cycle = true;
|
|
134
|
+
}
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
reachable.add(id);
|
|
138
|
+
const turns = node.type === 'action' ? depth : depth + 1;
|
|
139
|
+
if (turns > MAX_DEPTH) {
|
|
140
|
+
errors.push(`flow: path through node '${id}' exceeds maxDepth = ${MAX_DEPTH} user-visible turns`);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const edges = edgesOf(node);
|
|
144
|
+
if (edges.length === 0 && node.type !== 'action') {
|
|
145
|
+
errors.push(`flow: '${node.type}' node '${id}' has no outgoing edge — every path must terminate at an action node`);
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
onPath.add(id);
|
|
149
|
+
for (const edge of edges) {
|
|
150
|
+
walk(edge.target, turns);
|
|
151
|
+
}
|
|
152
|
+
onPath.delete(id);
|
|
153
|
+
};
|
|
154
|
+
if (entry)
|
|
155
|
+
walk(spec.entryNodeId, 0);
|
|
156
|
+
for (const node of spec.nodes) {
|
|
157
|
+
if (!reachable.has(node.id)) {
|
|
158
|
+
errors.push(`flow: node '${node.id}' is not reachable from the entry node`);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return { valid: errors.length === 0, errors: dedupe(errors) };
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* An ajv instance path (JSON Pointer, `/nodes/0/text`) in the dotted style
|
|
165
|
+
* the graph checks use (`.nodes[0].text`), so every error names its property
|
|
166
|
+
* one way, as the ads service's validator does.
|
|
167
|
+
*/
|
|
168
|
+
function propertyPath(pointer) {
|
|
169
|
+
return pointer
|
|
170
|
+
.split('/')
|
|
171
|
+
.slice(1)
|
|
172
|
+
.map(segment => segment.replace(/~1/g, '/').replace(/~0/g, '~'))
|
|
173
|
+
.map(segment => (/^\d+$/.test(segment) ? `[${segment}]` : `.${segment}`))
|
|
174
|
+
.join('');
|
|
175
|
+
}
|
|
176
|
+
function dedupe(errors) {
|
|
177
|
+
return [...new Set(errors)];
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=flowValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flowValidator.js","sourceRoot":"","sources":["../../src/flow/flowValidator.ts"],"names":[],"mappings":";;;;;AA4DA,kDAqLC;AAOD,oCAOC;AA/PD;;;;;;;GAOG;AACH,0DAAoC;AACpC,8DAAqC;AACrC,6CAA0C;AAuC1C,MAAM,SAAS,GAAG,CAAC,CAAC,CAAC,yBAAyB;AAC9C,MAAM,cAAc,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,KAAK;AAEvC,MAAM,GAAG,GAAG,IAAI,eAAO,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AAC5D,IAAA,qBAAU,EAAC,GAAG,CAAC,CAAC;AAChB,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,CAAC,uBAAU,CAAC,CAAC;AAE/C;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,IAAa;IAC/C,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,KAAK,MAAM,GAAG,IAAI,cAAc,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC;YAC9C,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,GAAG,C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E,CAAC,EAAE,CAAC;YAC5B,MAAM,CAAC,IAAI,CACT,eAAe,IAAI,CAAC,EAAE,wCAAwC,CAC/D,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;AAChE,CAAC;AAED;;;;GAIG;AACH,SAAgB,YAAY,CAAC,OAAe;IAC1C,OAAO,OAAO;SACX,KAAK,CAAC,GAAG,CAAC;SACV,KAAK,CAAC,CAAC,CAAC;SACR,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;SAC/D,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC,CAAC;SACxE,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC;AAED,SAAS,MAAM,CAAC,MAAgB;IAC9B,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod mirror of the flow-creative JSON Schema (flowSchema.ts), used in the
|
|
3
|
+
* `create_creative` / `update_creative` tool input schemas so the authoring
|
|
4
|
+
* model gets the flow structure as guidance for free. The authoritative
|
|
5
|
+
* validation (including graph invariants) is `validateFlowPayload`.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
export declare const flowNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
type: z.ZodLiteral<"message">;
|
|
11
|
+
text: z.ZodString;
|
|
12
|
+
smsText: z.ZodOptional<z.ZodString>;
|
|
13
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
14
|
+
imageAltText: z.ZodOptional<z.ZodString>;
|
|
15
|
+
next: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
type: z.ZodLiteral<"choice-set">;
|
|
19
|
+
prompt: z.ZodString;
|
|
20
|
+
smsPrompt: z.ZodOptional<z.ZodString>;
|
|
21
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
label: z.ZodString;
|
|
24
|
+
target: z.ZodString;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
intents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
27
|
+
intent: z.ZodString;
|
|
28
|
+
description: z.ZodString;
|
|
29
|
+
examples: z.ZodArray<z.ZodString>;
|
|
30
|
+
target: z.ZodString;
|
|
31
|
+
}, z.core.$strip>>>;
|
|
32
|
+
noMatchTarget: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
34
|
+
id: z.ZodString;
|
|
35
|
+
type: z.ZodLiteral<"action">;
|
|
36
|
+
text: z.ZodOptional<z.ZodString>;
|
|
37
|
+
action: z.ZodUnion<readonly [z.ZodObject<{
|
|
38
|
+
kind: z.ZodLiteral<"link_out">;
|
|
39
|
+
url: z.ZodString;
|
|
40
|
+
label: z.ZodString;
|
|
41
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
42
|
+
kind: z.ZodLiteral<"conversion">;
|
|
43
|
+
conversionName: z.ZodString;
|
|
44
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
cur: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
47
|
+
kind: z.ZodLiteral<"handoff">;
|
|
48
|
+
url: z.ZodString;
|
|
49
|
+
label: z.ZodString;
|
|
50
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
51
|
+
kind: z.ZodLiteral<"end">;
|
|
52
|
+
}, z.core.$strip>]>;
|
|
53
|
+
next: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, z.core.$strip>], "type">;
|
|
55
|
+
/**
|
|
56
|
+
* The flow spec: a bounded advertiser-authored conversation graph
|
|
57
|
+
* (<=12 nodes, <=6 turns deep, acyclic; see flow-creative-spec v1).
|
|
58
|
+
*/
|
|
59
|
+
export declare const flowPayload: z.ZodObject<{
|
|
60
|
+
specVersion: z.ZodString;
|
|
61
|
+
entryNodeId: z.ZodString;
|
|
62
|
+
metadata: z.ZodObject<{
|
|
63
|
+
advertiserName: z.ZodString;
|
|
64
|
+
disclosureText: z.ZodString;
|
|
65
|
+
brandLogoUrl: z.ZodOptional<z.ZodString>;
|
|
66
|
+
teaser: z.ZodOptional<z.ZodString>;
|
|
67
|
+
language: z.ZodOptional<z.ZodString>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
70
|
+
id: z.ZodString;
|
|
71
|
+
type: z.ZodLiteral<"message">;
|
|
72
|
+
text: z.ZodString;
|
|
73
|
+
smsText: z.ZodOptional<z.ZodString>;
|
|
74
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
75
|
+
imageAltText: z.ZodOptional<z.ZodString>;
|
|
76
|
+
next: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
78
|
+
id: z.ZodString;
|
|
79
|
+
type: z.ZodLiteral<"choice-set">;
|
|
80
|
+
prompt: z.ZodString;
|
|
81
|
+
smsPrompt: z.ZodOptional<z.ZodString>;
|
|
82
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
83
|
+
id: z.ZodString;
|
|
84
|
+
label: z.ZodString;
|
|
85
|
+
target: z.ZodString;
|
|
86
|
+
}, z.core.$strip>>;
|
|
87
|
+
intents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
88
|
+
intent: z.ZodString;
|
|
89
|
+
description: z.ZodString;
|
|
90
|
+
examples: z.ZodArray<z.ZodString>;
|
|
91
|
+
target: z.ZodString;
|
|
92
|
+
}, z.core.$strip>>>;
|
|
93
|
+
noMatchTarget: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
95
|
+
id: z.ZodString;
|
|
96
|
+
type: z.ZodLiteral<"action">;
|
|
97
|
+
text: z.ZodOptional<z.ZodString>;
|
|
98
|
+
action: z.ZodUnion<readonly [z.ZodObject<{
|
|
99
|
+
kind: z.ZodLiteral<"link_out">;
|
|
100
|
+
url: z.ZodString;
|
|
101
|
+
label: z.ZodString;
|
|
102
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
+
kind: z.ZodLiteral<"conversion">;
|
|
104
|
+
conversionName: z.ZodString;
|
|
105
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
cur: z.ZodOptional<z.ZodString>;
|
|
107
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
108
|
+
kind: z.ZodLiteral<"handoff">;
|
|
109
|
+
url: z.ZodString;
|
|
110
|
+
label: z.ZodString;
|
|
111
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
112
|
+
kind: z.ZodLiteral<"end">;
|
|
113
|
+
}, z.core.$strip>]>;
|
|
114
|
+
next: z.ZodOptional<z.ZodString>;
|
|
115
|
+
}, z.core.$strip>], "type">>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
export type FlowPayloadInput = z.infer<typeof flowPayload>;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.flowPayload = exports.flowNode = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Zod mirror of the flow-creative JSON Schema (flowSchema.ts), used in the
|
|
6
|
+
* `create_creative` / `update_creative` tool input schemas so the authoring
|
|
7
|
+
* model gets the flow structure as guidance for free. The authoritative
|
|
8
|
+
* validation (including graph invariants) is `validateFlowPayload`.
|
|
9
|
+
*/
|
|
10
|
+
const zod_1 = require("zod");
|
|
11
|
+
const nodeId = zod_1.z
|
|
12
|
+
.string()
|
|
13
|
+
.regex(/^[a-z0-9][a-z0-9_-]{0,31}$/)
|
|
14
|
+
.describe('Node id: lowercase alphanumeric with - or _, max 32 chars.');
|
|
15
|
+
const messageNode = zod_1.z.object({
|
|
16
|
+
id: nodeId,
|
|
17
|
+
type: zod_1.z.literal('message'),
|
|
18
|
+
text: zod_1.z
|
|
19
|
+
.string()
|
|
20
|
+
.min(1)
|
|
21
|
+
.max(640)
|
|
22
|
+
.describe('Advertiser-authored copy, rendered verbatim.'),
|
|
23
|
+
smsText: zod_1.z.string().max(320).optional(),
|
|
24
|
+
imageUrl: zod_1.z.string().optional().describe('https image URL.'),
|
|
25
|
+
imageAltText: zod_1.z.string().max(200).optional(),
|
|
26
|
+
next: nodeId
|
|
27
|
+
.optional()
|
|
28
|
+
.describe('Unconditional edge to the next node. Message nodes must lead ' +
|
|
29
|
+
'somewhere; terminals are action nodes.'),
|
|
30
|
+
});
|
|
31
|
+
const choiceSetNode = zod_1.z.object({
|
|
32
|
+
id: nodeId,
|
|
33
|
+
type: zod_1.z.literal('choice-set'),
|
|
34
|
+
prompt: zod_1.z.string().min(1).max(640),
|
|
35
|
+
smsPrompt: zod_1.z.string().max(320).optional(),
|
|
36
|
+
choices: zod_1.z
|
|
37
|
+
.array(zod_1.z.object({
|
|
38
|
+
id: nodeId,
|
|
39
|
+
label: zod_1.z.string().min(1).max(25),
|
|
40
|
+
target: nodeId,
|
|
41
|
+
}))
|
|
42
|
+
.min(1)
|
|
43
|
+
.max(4),
|
|
44
|
+
intents: zod_1.z
|
|
45
|
+
.array(zod_1.z.object({
|
|
46
|
+
intent: zod_1.z.string().regex(/^[a-z0-9_]{1,32}$/),
|
|
47
|
+
description: zod_1.z
|
|
48
|
+
.string()
|
|
49
|
+
.min(1)
|
|
50
|
+
.max(200)
|
|
51
|
+
.describe('Natural-language definition of when this NLU edge fires, ' +
|
|
52
|
+
"written for an LLM, e.g. 'The user asks about price or cost.'"),
|
|
53
|
+
examples: zod_1.z.array(zod_1.z.string().max(100)).min(1).max(5),
|
|
54
|
+
target: nodeId,
|
|
55
|
+
}))
|
|
56
|
+
.max(4)
|
|
57
|
+
.optional(),
|
|
58
|
+
noMatchTarget: nodeId
|
|
59
|
+
.optional()
|
|
60
|
+
.describe('Edge taken when free text matches no intent.'),
|
|
61
|
+
});
|
|
62
|
+
const flowAction = zod_1.z.union([
|
|
63
|
+
zod_1.z.object({
|
|
64
|
+
kind: zod_1.z.literal('link_out'),
|
|
65
|
+
url: zod_1.z.string().describe('https URL. Terminal action.'),
|
|
66
|
+
label: zod_1.z.string().min(1).max(25),
|
|
67
|
+
}),
|
|
68
|
+
zod_1.z.object({
|
|
69
|
+
kind: zod_1.z.literal('conversion'),
|
|
70
|
+
conversionName: zod_1.z.string().max(64),
|
|
71
|
+
value: zod_1.z.number().optional(),
|
|
72
|
+
cur: zod_1.z.string().max(3).optional(),
|
|
73
|
+
}),
|
|
74
|
+
zod_1.z.object({
|
|
75
|
+
kind: zod_1.z.literal('handoff'),
|
|
76
|
+
url: zod_1.z
|
|
77
|
+
.string()
|
|
78
|
+
.describe("https deep link to the advertiser's own conversation surface. " +
|
|
79
|
+
'Terminal action.'),
|
|
80
|
+
label: zod_1.z.string().min(1).max(25),
|
|
81
|
+
}),
|
|
82
|
+
zod_1.z.object({ kind: zod_1.z.literal('end') }),
|
|
83
|
+
]);
|
|
84
|
+
const actionNode = zod_1.z.object({
|
|
85
|
+
id: nodeId,
|
|
86
|
+
type: zod_1.z.literal('action'),
|
|
87
|
+
text: zod_1.z
|
|
88
|
+
.string()
|
|
89
|
+
.max(640)
|
|
90
|
+
.optional()
|
|
91
|
+
.describe('Optional closing copy rendered with the action.'),
|
|
92
|
+
action: flowAction,
|
|
93
|
+
next: nodeId
|
|
94
|
+
.optional()
|
|
95
|
+
.describe("Only valid after a 'conversion' action; link_out/handoff/end are " +
|
|
96
|
+
'terminal.'),
|
|
97
|
+
});
|
|
98
|
+
exports.flowNode = zod_1.z.discriminatedUnion('type', [
|
|
99
|
+
messageNode,
|
|
100
|
+
choiceSetNode,
|
|
101
|
+
actionNode,
|
|
102
|
+
]);
|
|
103
|
+
/**
|
|
104
|
+
* The flow spec: a bounded advertiser-authored conversation graph
|
|
105
|
+
* (<=12 nodes, <=6 turns deep, acyclic; see flow-creative-spec v1).
|
|
106
|
+
*/
|
|
107
|
+
exports.flowPayload = zod_1.z
|
|
108
|
+
.object({
|
|
109
|
+
specVersion: zod_1.z
|
|
110
|
+
.string()
|
|
111
|
+
.regex(/^1(\.[0-9]+)?$/)
|
|
112
|
+
.describe("Flow spec version; use '1'."),
|
|
113
|
+
entryNodeId: nodeId.describe('id of the node where execution starts; must be a message node.'),
|
|
114
|
+
metadata: zod_1.z.object({
|
|
115
|
+
advertiserName: zod_1.z.string().min(1).max(80),
|
|
116
|
+
disclosureText: zod_1.z
|
|
117
|
+
.string()
|
|
118
|
+
.min(1)
|
|
119
|
+
.max(100)
|
|
120
|
+
.describe("REQUIRED sponsorship disclosure, e.g. 'Sponsored · Acme Coffee'."),
|
|
121
|
+
brandLogoUrl: zod_1.z.string().optional(),
|
|
122
|
+
teaser: zod_1.z.string().max(120).optional(),
|
|
123
|
+
language: zod_1.z.string().optional(),
|
|
124
|
+
}),
|
|
125
|
+
nodes: zod_1.z.array(exports.flowNode).min(1).max(12),
|
|
126
|
+
})
|
|
127
|
+
.describe('Advertiser-authored conversation graph (flow creative spec v1). ' +
|
|
128
|
+
'Bounded: <=12 nodes, <=4 choices/intents per choice-set, <=6 turns ' +
|
|
129
|
+
'deep, acyclic, every path ends at an action node, all URLs https.');
|
|
130
|
+
//# sourceMappingURL=flowZod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|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AAC;IACN,WAAW,EAAE,OAAC;SACX,MAAM,EAAE;SACR,KAAK,CAAC,gBAAgB,CAAC;SACvB,QAAQ,CAAC,6BAA6B,CAAC;IAC1C,WAAW,EAAE,MAAM,CAAC,QAAQ,CAC1B,gEAAgE,CACjE;IACD,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;QACjB,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;QACzC,cAAc,EAAE,OAAC;aACd,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;aACR,QAAQ,CACP,kEAAkE,CACnE;QACH,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACnC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;QACtC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAChC,CAAC;IACF,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,gBAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;CACxC,CAAC;KACD,QAAQ,CACP,kEAAkE;IAChE,qEAAqE;IACrE,mEAAmE,CACtE,CAAC"}
|
package/bin/format.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Default upper bound on one tool result, in characters. */
|
|
2
|
+
export declare const MAX_RESULT_CHARS = 100000;
|
|
3
|
+
export interface ToolResult {
|
|
4
|
+
[k: string]: unknown;
|
|
5
|
+
content: Array<{
|
|
6
|
+
type: 'text';
|
|
7
|
+
text: string;
|
|
8
|
+
}>;
|
|
9
|
+
isError?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** A successful value. Strings pass through; anything else is JSON. */
|
|
12
|
+
export declare function toToolResult(value: unknown, maxChars?: number): ToolResult;
|
|
13
|
+
/** A failure. API errors keep the status, route, and body, with a hint. */
|
|
14
|
+
export declare function toErrorResult(err: unknown, maxChars?: number): ToolResult;
|
package/bin/format.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAX_RESULT_CHARS = void 0;
|
|
4
|
+
exports.toToolResult = toToolResult;
|
|
5
|
+
exports.toErrorResult = toErrorResult;
|
|
6
|
+
/**
|
|
7
|
+
* Tool results as MCP content: JSON text, capped so one large list cannot
|
|
8
|
+
* crowd out the conversation.
|
|
9
|
+
*/
|
|
10
|
+
const client_1 = require("./client");
|
|
11
|
+
/** Default upper bound on one tool result, in characters. */
|
|
12
|
+
exports.MAX_RESULT_CHARS = 100_000;
|
|
13
|
+
function cap(text, max) {
|
|
14
|
+
if (text.length <= max)
|
|
15
|
+
return text;
|
|
16
|
+
return `${text.slice(0, max)}\n[truncated: ${text.length - max} more characters; narrow the request]`;
|
|
17
|
+
}
|
|
18
|
+
/** A successful value. Strings pass through; anything else is JSON. */
|
|
19
|
+
function toToolResult(value, maxChars = exports.MAX_RESULT_CHARS) {
|
|
20
|
+
const text = typeof value === 'string' ? value : JSON.stringify(value ?? null, null, 1);
|
|
21
|
+
return { content: [{ type: 'text', text: cap(text, maxChars) }] };
|
|
22
|
+
}
|
|
23
|
+
/** A failure. API errors keep the status, route, and body, with a hint. */
|
|
24
|
+
function toErrorResult(err, maxChars = exports.MAX_RESULT_CHARS) {
|
|
25
|
+
let text;
|
|
26
|
+
if (err instanceof client_1.ApiError) {
|
|
27
|
+
text = cap(`Error ${err.status} from ${err.method} /system${err.path}.${hint(err.status)}\n${JSON.stringify(err.body ?? null)}`, maxChars);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
text = `Error: ${err?.message ?? String(err)}`;
|
|
31
|
+
}
|
|
32
|
+
return { content: [{ type: 'text', text }], isError: true };
|
|
33
|
+
}
|
|
34
|
+
function hint(status) {
|
|
35
|
+
switch (status) {
|
|
36
|
+
case 401:
|
|
37
|
+
return ' The session has expired; the user needs to sign in again.';
|
|
38
|
+
case 403:
|
|
39
|
+
return ' The user’s role does not permit this; explain that instead of retrying.';
|
|
40
|
+
case 404:
|
|
41
|
+
return ' Not found: the id may be wrong or belong to another org.';
|
|
42
|
+
case 409:
|
|
43
|
+
return ' Conflict: something still references it, or it already exists. The body says which.';
|
|
44
|
+
case 422:
|
|
45
|
+
return ' Invalid input: fix the fields the body names and retry.';
|
|
46
|
+
default:
|
|
47
|
+
return '';
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":";;;AAqBA,oCAOC;AAGD,sCAcC;AA7CD;;;GAGG;AACH,qCAAoC;AAEpC,6DAA6D;AAChD,QAAA,gBAAgB,GAAG,OAAO,CAAC;AAQxC,SAAS,GAAG,CAAC,IAAY,EAAE,GAAW;IACpC,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG;QAAE,OAAO,IAAI,CAAC;IACpC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,iBAAiB,IAAI,CAAC,MAAM,GAAG,GAAG,uCAAuC,CAAC;AACxG,CAAC;AAED,uEAAuE;AACvE,SAAgB,YAAY,CAC1B,KAAc,EACd,QAAQ,GAAG,wBAAgB;IAE3B,MAAM,IAAI,GACR,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7E,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;AACpE,CAAC;AAED,2EAA2E;AAC3E,SAAgB,aAAa,CAC3B,GAAY,EACZ,QAAQ,GAAG,wBAAgB;IAE3B,IAAI,IAAY,CAAC;IACjB,IAAI,GAAG,YAAY,iBAAQ,EAAE,CAAC;QAC5B,IAAI,GAAG,GAAG,CACR,SAAS,GAAG,CAAC,MAAM,SAAS,GAAG,CAAC,MAAM,WAAW,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,EACpH,QAAQ,CACT,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,IAAI,GAAG,UAAW,GAAa,EAAE,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;IAC5D,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC9D,CAAC;AAED,SAAS,IAAI,CAAC,MAAc;IAC1B,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,GAAG;YACN,OAAO,4DAA4D,CAAC;QACtE,KAAK,GAAG;YACN,OAAO,0EAA0E,CAAC;QACpF,KAAK,GAAG;YACN,OAAO,2DAA2D,CAAC;QACrE,KAAK,GAAG;YACN,OAAO,sFAAsF,CAAC;QAChG,KAAK,GAAG;YACN,OAAO,0DAA0D,CAAC;QACpE;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/bin/index.d.ts
CHANGED
|
@@ -1 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* `@advertising-chat/mcp`: the Advertising.chat tool package.
|
|
3
|
+
*
|
|
4
|
+
* - The management tool table (`allTools`, `toolsByName`, `defineTool`) for
|
|
5
|
+
* Offer Manager over `/system/offer-manager/*`, run with the user's own
|
|
6
|
+
* login. The console copilot imports the same table and runs it in
|
|
7
|
+
* process; `createManageServer` registers it on an `McpServer`.
|
|
8
|
+
* - `createAdKitServer`: the in-chat ads tools (`fetch_ad`, `record_event`),
|
|
9
|
+
* run with an org API key.
|
|
10
|
+
* - `adchat-mcp` (cli.ts) wraps either in stdio.
|
|
11
|
+
*/
|
|
12
|
+
export { ApiError, DEFAULT_API_URL, ManageClient, ManageClientOptions, QueryParams, Surface, } from './client';
|
|
13
|
+
export { DocsIndex, DEFAULT_DOCS_URL, DocPage, DocSearchHit } from './docs';
|
|
14
|
+
export { MAX_RESULT_CHARS, ToolResult, toErrorResult, toToolResult, } from './format';
|
|
15
|
+
export { AnyTool, CAPABILITY_REFUSALS, ROLE_ORDER, RoleFloor, ToolCapability, ToolContext, ToolDef, ToolKind, approvalSentence, defineTool, roleSatisfies, } from './tool';
|
|
16
|
+
export * from './tools';
|
|
17
|
+
export { ManageServerOptions, SERVER_INSTRUCTIONS, annotationsFor, createManageServer, describe, } from './server';
|
|
18
|
+
export { AdKitServerOptions, createAdKitServer } from './serve';
|
|
19
|
+
export { SPONSORED_DISCLOSURE, describeAd } from '@advertising-chat/sdk';
|
|
20
|
+
export { CachedToken, TOKEN_CACHE_PATH, TokenProviderOptions, createTokenProvider, deviceLogin, loadCachedToken, } from './auth';
|
|
21
|
+
export { FLOW_SCHEMA_ID, flowSchema } from './flow/flowSchema';
|
|
22
|
+
export { FlowValidationResult, validateFlowPayload, } from './flow/flowValidator';
|
|
23
|
+
export { VERSION } from './version';
|
package/bin/index.js
CHANGED
|
@@ -1,8 +1,69 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
17
|
+
exports.VERSION = exports.validateFlowPayload = exports.flowSchema = exports.FLOW_SCHEMA_ID = exports.loadCachedToken = exports.deviceLogin = exports.createTokenProvider = exports.TOKEN_CACHE_PATH = exports.describeAd = exports.SPONSORED_DISCLOSURE = exports.createAdKitServer = exports.describe = exports.createManageServer = exports.annotationsFor = exports.SERVER_INSTRUCTIONS = exports.roleSatisfies = exports.defineTool = exports.approvalSentence = exports.ROLE_ORDER = exports.CAPABILITY_REFUSALS = exports.toToolResult = exports.toErrorResult = exports.MAX_RESULT_CHARS = exports.DEFAULT_DOCS_URL = exports.DocsIndex = exports.ManageClient = exports.DEFAULT_API_URL = exports.ApiError = void 0;
|
|
18
|
+
/**
|
|
19
|
+
* `@advertising-chat/mcp`: the Advertising.chat tool package.
|
|
20
|
+
*
|
|
21
|
+
* - The management tool table (`allTools`, `toolsByName`, `defineTool`) for
|
|
22
|
+
* Offer Manager over `/system/offer-manager/*`, run with the user's own
|
|
23
|
+
* login. The console copilot imports the same table and runs it in
|
|
24
|
+
* process; `createManageServer` registers it on an `McpServer`.
|
|
25
|
+
* - `createAdKitServer`: the in-chat ads tools (`fetch_ad`, `record_event`),
|
|
26
|
+
* run with an org API key.
|
|
27
|
+
* - `adchat-mcp` (cli.ts) wraps either in stdio.
|
|
28
|
+
*/
|
|
29
|
+
var client_1 = require("./client");
|
|
30
|
+
Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return client_1.ApiError; } });
|
|
31
|
+
Object.defineProperty(exports, "DEFAULT_API_URL", { enumerable: true, get: function () { return client_1.DEFAULT_API_URL; } });
|
|
32
|
+
Object.defineProperty(exports, "ManageClient", { enumerable: true, get: function () { return client_1.ManageClient; } });
|
|
33
|
+
var docs_1 = require("./docs");
|
|
34
|
+
Object.defineProperty(exports, "DocsIndex", { enumerable: true, get: function () { return docs_1.DocsIndex; } });
|
|
35
|
+
Object.defineProperty(exports, "DEFAULT_DOCS_URL", { enumerable: true, get: function () { return docs_1.DEFAULT_DOCS_URL; } });
|
|
36
|
+
var format_1 = require("./format");
|
|
37
|
+
Object.defineProperty(exports, "MAX_RESULT_CHARS", { enumerable: true, get: function () { return format_1.MAX_RESULT_CHARS; } });
|
|
38
|
+
Object.defineProperty(exports, "toErrorResult", { enumerable: true, get: function () { return format_1.toErrorResult; } });
|
|
39
|
+
Object.defineProperty(exports, "toToolResult", { enumerable: true, get: function () { return format_1.toToolResult; } });
|
|
40
|
+
var tool_1 = require("./tool");
|
|
41
|
+
Object.defineProperty(exports, "CAPABILITY_REFUSALS", { enumerable: true, get: function () { return tool_1.CAPABILITY_REFUSALS; } });
|
|
42
|
+
Object.defineProperty(exports, "ROLE_ORDER", { enumerable: true, get: function () { return tool_1.ROLE_ORDER; } });
|
|
43
|
+
Object.defineProperty(exports, "approvalSentence", { enumerable: true, get: function () { return tool_1.approvalSentence; } });
|
|
44
|
+
Object.defineProperty(exports, "defineTool", { enumerable: true, get: function () { return tool_1.defineTool; } });
|
|
45
|
+
Object.defineProperty(exports, "roleSatisfies", { enumerable: true, get: function () { return tool_1.roleSatisfies; } });
|
|
46
|
+
__exportStar(require("./tools"), exports);
|
|
4
47
|
var server_1 = require("./server");
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
Object.defineProperty(exports, "
|
|
7
|
-
Object.defineProperty(exports, "
|
|
48
|
+
Object.defineProperty(exports, "SERVER_INSTRUCTIONS", { enumerable: true, get: function () { return server_1.SERVER_INSTRUCTIONS; } });
|
|
49
|
+
Object.defineProperty(exports, "annotationsFor", { enumerable: true, get: function () { return server_1.annotationsFor; } });
|
|
50
|
+
Object.defineProperty(exports, "createManageServer", { enumerable: true, get: function () { return server_1.createManageServer; } });
|
|
51
|
+
Object.defineProperty(exports, "describe", { enumerable: true, get: function () { return server_1.describe; } });
|
|
52
|
+
var serve_1 = require("./serve");
|
|
53
|
+
Object.defineProperty(exports, "createAdKitServer", { enumerable: true, get: function () { return serve_1.createAdKitServer; } });
|
|
54
|
+
var sdk_1 = require("@advertising-chat/sdk");
|
|
55
|
+
Object.defineProperty(exports, "SPONSORED_DISCLOSURE", { enumerable: true, get: function () { return sdk_1.SPONSORED_DISCLOSURE; } });
|
|
56
|
+
Object.defineProperty(exports, "describeAd", { enumerable: true, get: function () { return sdk_1.describeAd; } });
|
|
57
|
+
var auth_1 = require("./auth");
|
|
58
|
+
Object.defineProperty(exports, "TOKEN_CACHE_PATH", { enumerable: true, get: function () { return auth_1.TOKEN_CACHE_PATH; } });
|
|
59
|
+
Object.defineProperty(exports, "createTokenProvider", { enumerable: true, get: function () { return auth_1.createTokenProvider; } });
|
|
60
|
+
Object.defineProperty(exports, "deviceLogin", { enumerable: true, get: function () { return auth_1.deviceLogin; } });
|
|
61
|
+
Object.defineProperty(exports, "loadCachedToken", { enumerable: true, get: function () { return auth_1.loadCachedToken; } });
|
|
62
|
+
var flowSchema_1 = require("./flow/flowSchema");
|
|
63
|
+
Object.defineProperty(exports, "FLOW_SCHEMA_ID", { enumerable: true, get: function () { return flowSchema_1.FLOW_SCHEMA_ID; } });
|
|
64
|
+
Object.defineProperty(exports, "flowSchema", { enumerable: true, get: function () { return flowSchema_1.flowSchema; } });
|
|
65
|
+
var flowValidator_1 = require("./flow/flowValidator");
|
|
66
|
+
Object.defineProperty(exports, "validateFlowPayload", { enumerable: true, get: function () { return flowValidator_1.validateFlowPayload; } });
|
|
67
|
+
var version_1 = require("./version");
|
|
68
|
+
Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () { return version_1.VERSION; } });
|
|
8
69
|
//# sourceMappingURL=index.js.map
|
package/bin/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,mCAOkB;AANhB,kGAAA,QAAQ,OAAA;AACR,yGAAA,eAAe,OAAA;AACf,sGAAA,YAAY,OAAA;AAKd,+BAA4E;AAAnE,iGAAA,SAAS,OAAA;AAAE,wGAAA,gBAAgB,OAAA;AACpC,mCAKkB;AAJhB,0GAAA,gBAAgB,OAAA;AAEhB,uGAAA,aAAa,OAAA;AACb,sGAAA,YAAY,OAAA;AAEd,+BAYgB;AAVd,2GAAA,mBAAmB,OAAA;AACnB,kGAAA,UAAU,OAAA;AAMV,wGAAA,gBAAgB,OAAA;AAChB,kGAAA,UAAU,OAAA;AACV,qGAAA,aAAa,OAAA;AAEf,0CAAwB;AACxB,mCAMkB;AAJhB,6GAAA,mBAAmB,OAAA;AACnB,wGAAA,cAAc,OAAA;AACd,4GAAA,kBAAkB,OAAA;AAClB,kGAAA,QAAQ,OAAA;AAEV,iCAAgE;AAAnC,0GAAA,iBAAiB,OAAA;AAC9C,6CAAyE;AAAhE,2GAAA,oBAAoB,OAAA;AAAE,iGAAA,UAAU,OAAA;AACzC,+BAOgB;AALd,wGAAA,gBAAgB,OAAA;AAEhB,2GAAA,mBAAmB,OAAA;AACnB,mGAAA,WAAW,OAAA;AACX,uGAAA,eAAe,OAAA;AAEjB,gDAA+D;AAAtD,4GAAA,cAAc,OAAA;AAAE,wGAAA,UAAU,OAAA;AACnC,sDAG8B;AAD5B,oHAAA,mBAAmB,OAAA;AAErB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA"}
|