@advertising-chat/mcp 0.11.0 → 0.17.4

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.
Files changed (54) hide show
  1. package/README.md +21 -5
  2. package/bin/cli.js +1 -1
  3. package/bin/client.d.ts +1 -0
  4. package/bin/client.js +3 -0
  5. package/bin/client.js.map +1 -1
  6. package/bin/index.d.ts +1 -1
  7. package/bin/index.js +3 -1
  8. package/bin/index.js.map +1 -1
  9. package/bin/routeInventory.d.ts +8 -1
  10. package/bin/routeInventory.js +50 -4
  11. package/bin/routeInventory.js.map +1 -1
  12. package/bin/server.d.ts +1 -1
  13. package/bin/server.js +5 -5
  14. package/bin/tool.d.ts +22 -0
  15. package/bin/tool.js +24 -1
  16. package/bin/tool.js.map +1 -1
  17. package/bin/tools/account.js +1 -1
  18. package/bin/tools/account.js.map +1 -1
  19. package/bin/tools/attributes.js +49 -2
  20. package/bin/tools/attributes.js.map +1 -1
  21. package/bin/tools/campaigns.d.ts +12 -0
  22. package/bin/tools/campaigns.js +230 -0
  23. package/bin/tools/campaigns.js.map +1 -0
  24. package/bin/tools/decisions.js +52 -34
  25. package/bin/tools/decisions.js.map +1 -1
  26. package/bin/tools/docs.js +2 -2
  27. package/bin/tools/docs.js.map +1 -1
  28. package/bin/tools/index.d.ts +4 -0
  29. package/bin/tools/index.js +12 -0
  30. package/bin/tools/index.js.map +1 -1
  31. package/bin/tools/moments.js +27 -5
  32. package/bin/tools/moments.js.map +1 -1
  33. package/bin/tools/network.d.ts +5 -0
  34. package/bin/tools/network.js +99 -0
  35. package/bin/tools/network.js.map +1 -0
  36. package/bin/tools/offers.d.ts +1 -1
  37. package/bin/tools/offers.js +73 -26
  38. package/bin/tools/offers.js.map +1 -1
  39. package/bin/tools/results.d.ts +18 -0
  40. package/bin/tools/results.js +116 -0
  41. package/bin/tools/results.js.map +1 -0
  42. package/bin/tools/rules.js +137 -0
  43. package/bin/tools/rules.js.map +1 -1
  44. package/bin/tools/settings.d.ts +3 -0
  45. package/bin/tools/settings.js +54 -0
  46. package/bin/tools/settings.js.map +1 -0
  47. package/bin/tools/shared.d.ts +12 -1
  48. package/bin/tools/shared.js +67 -2
  49. package/bin/tools/shared.js.map +1 -1
  50. package/bin/tools/translation.js +4 -1
  51. package/bin/tools/translation.js.map +1 -1
  52. package/bin/version.d.ts +1 -1
  53. package/bin/version.js +1 -1
  54. package/package.json +33 -5
@@ -0,0 +1,230 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.campaignTools = exports.resubmitCampaign = exports.resumeCampaign = exports.pauseCampaign = exports.requestCampaign = exports.getCampaign = exports.listCampaigns = exports.CAMPAIGN_STATES = void 0;
4
+ exports.campaignRow = campaignRow;
5
+ /**
6
+ * Campaigns (Conversation Ads): paid traffic that starts conversations with
7
+ * one of the workspace's agents. A campaign is a request our team reviews.
8
+ * These tools do what the brand does in the console: read campaigns,
9
+ * request one, pause and resume it, and change and resubmit one our team
10
+ * rejected. A campaign's ads, other changes, and deleting it stay in the
11
+ * console. `/system/campaigns/campaign` needs the `advertise` capability.
12
+ */
13
+ const zod_1 = require("zod");
14
+ const tool_1 = require("../tool");
15
+ const shared_1 = require("./shared");
16
+ const CAMPAIGN = '/campaigns/campaign';
17
+ /** What each campaign state means, for the model to relay. */
18
+ exports.CAMPAIGN_STATES = {
19
+ pending: 'Submitted and waiting for our team’s review.',
20
+ active: 'Approved; serves within its dates.',
21
+ paused: 'Paused by the brand; resume_campaign makes it active again.',
22
+ rejected: 'Our team declined it; rejectionReason says why. resubmit_campaign changes what the review asks for and sends it back to review.',
23
+ ended: 'Its end date has passed.',
24
+ removed: 'Taken down; it does not return.',
25
+ };
26
+ /** A campaign as the list shows it. */
27
+ function campaignRow(c) {
28
+ return {
29
+ id: (0, shared_1.str)(c._id) ?? (0, shared_1.str)(c.id),
30
+ name: c.name,
31
+ agent: (0, shared_1.refId)(c.application),
32
+ goal: c.goal,
33
+ state: c.state,
34
+ rejectionReason: (0, shared_1.str)(c.rejectionReason),
35
+ startDate: c.startDate,
36
+ endDate: c.endDate,
37
+ dailyBudget: c.dailyBudget,
38
+ };
39
+ }
40
+ exports.listCampaigns = (0, tool_1.defineTool)({
41
+ name: 'list_campaigns',
42
+ title: 'List campaigns',
43
+ description: `The workspace’s campaigns: id, name, the agent conversations start with, goal (conversations, leads, or sales), state, the reason when our team rejected it, dates, and daily budget. startDate and endDate are whole days in the workspace’s time zone: read only the date part (2026-11-30T00:00:00.000Z is November 30), and a campaign runs from the start of its start date through the end of its end date there; no end date means it runs until the brand pauses it. States: ${Object.entries(exports.CAMPAIGN_STATES)
44
+ .map(([s, m]) => `${s} (${m})`)
45
+ .join('; ')} Filter by \`application\` (agent) or \`state\`. Results: get_results with section campaigns. Maps to GET /system/campaigns/campaign.`,
46
+ kind: 'read',
47
+ roleFloor: 'viewer',
48
+ capability: 'advertise',
49
+ input: {
50
+ application: shared_1.application.optional(),
51
+ state: zod_1.z
52
+ .enum(['pending', 'active', 'paused', 'rejected', 'ended', 'removed'])
53
+ .optional()
54
+ .describe('Only campaigns in this state.'),
55
+ ...shared_1.listShape,
56
+ },
57
+ async run({ client }, args) {
58
+ const body = await client.get(CAMPAIGN, (0, shared_1.defined)(args));
59
+ return (0, shared_1.rows)(body).map(campaignRow);
60
+ },
61
+ });
62
+ exports.getCampaign = (0, tool_1.defineTool)({
63
+ name: 'get_campaign',
64
+ title: 'Get a campaign',
65
+ description: 'One campaign with every field: the agent, goal, notes for our team, state and rejectionReason, dates (startDate and endDate are whole days in the workspace’s time zone: read only the date part, and the campaign runs through the whole end date there), daily budget, countries and languages (empty means anywhere and any language), and its ads. Maps to GET /system/campaigns/campaign/{id}.',
66
+ kind: 'read',
67
+ roleFloor: 'viewer',
68
+ capability: 'advertise',
69
+ input: { id: (0, shared_1.id)('campaign') },
70
+ async run({ client }, { id: campaignId }) {
71
+ return client.get(`${CAMPAIGN}/${(0, shared_1.enc)(campaignId)}`);
72
+ },
73
+ });
74
+ // ---------------------------------------------------------------------------
75
+ // Changes: what the brand does in the console, and nothing more.
76
+ const GOALS = ['conversations', 'leads', 'sales'];
77
+ const GOAL = 'What the brand wants from the conversations: conversations (as many people as possible start one), leads (people leave their details), or sales (people buy in the conversation).';
78
+ const goal = zod_1.z.enum(GOALS).describe(GOAL);
79
+ const day = (what) => zod_1.z
80
+ .string()
81
+ .regex(/^\d{4}-\d{2}-\d{2}$/, 'A date like 2026-11-01.')
82
+ .describe(`${what}, as YYYY-MM-DD: a whole day in the workspace’s time zone.`);
83
+ const AGENT = 'The agent (application) people talk to when they tap an ad, from list_applications.';
84
+ const dailyBudget = zod_1.z
85
+ .number()
86
+ .positive()
87
+ .describe('What the brand wants to spend a day, in US dollars.');
88
+ const codes = (what, example, empty) => zod_1.z
89
+ .array(zod_1.z.string().regex(/^[A-Za-z]{2}$/, `Two-letter ${what} codes.`))
90
+ .describe(`Two-letter ${what} codes, like ${example}. Empty: ${empty}.`);
91
+ const countries = codes('country', 'US or CA', 'anywhere');
92
+ const languages = codes('language', 'en or es', 'any language');
93
+ const notes = zod_1.z
94
+ .string()
95
+ .max(2000)
96
+ .describe('Notes for our team: who to reach, offers to mention, sites to avoid.');
97
+ /** The words for a campaign request's fields, for approval sentences. */
98
+ const REQUEST_WORDS = {
99
+ name: 'name',
100
+ application: 'agent',
101
+ goal: 'goal',
102
+ dailyBudget: 'daily budget',
103
+ startDate: 'dates',
104
+ endDate: 'dates',
105
+ countries: 'countries',
106
+ languages: 'languages',
107
+ notes: 'notes for our team',
108
+ };
109
+ /** `$50 a day`, or '' without a budget. */
110
+ function budgetWords(budget) {
111
+ if (typeof budget !== 'number' || !Number.isFinite(budget))
112
+ return '';
113
+ const amount = budget.toLocaleString('en-US', {
114
+ minimumFractionDigits: Number.isInteger(budget) ? 0 : 2,
115
+ maximumFractionDigits: 2,
116
+ });
117
+ return `$${amount} a day`;
118
+ }
119
+ exports.requestCampaign = (0, tool_1.defineTool)({
120
+ name: 'request_campaign',
121
+ title: 'Request a campaign',
122
+ description: 'Send our team a campaign request: the agent people talk to when they tap an ad, the goal, the daily budget, the dates, where and in which languages, and notes for our team. It starts pending; our team reviews it, sets up where the ads run, and approves or rejects it with a reason. Nothing runs until it is approved. The brand adds the campaign’s ads in the console. Maps to POST /system/campaigns/campaign.',
123
+ kind: 'write',
124
+ roleFloor: 'editor',
125
+ capability: 'advertise',
126
+ input: {
127
+ name: zod_1.z
128
+ .string()
129
+ .min(1)
130
+ .max(200)
131
+ .describe('For the brand and our team; customers never see it.'),
132
+ application: shared_1.application.describe(AGENT),
133
+ goal: zod_1.z.enum(GOALS).optional().describe(`${GOAL} Default conversations.`),
134
+ dailyBudget: dailyBudget.optional(),
135
+ startDate: day('When it starts; default today').optional(),
136
+ endDate: day('When it ends; omit to run until the brand pauses it').optional(),
137
+ countries: countries.optional(),
138
+ languages: languages.optional(),
139
+ notes: notes.optional(),
140
+ },
141
+ approval: args => {
142
+ const budget = budgetWords(args.dailyBudget);
143
+ const dates = args.startDate
144
+ ? args.endDate
145
+ ? `from ${args.startDate} to ${args.endDate}`
146
+ : `from ${args.startDate}`
147
+ : args.endDate
148
+ ? `until ${args.endDate}`
149
+ : '';
150
+ const terms = [budget, dates].filter(Boolean).join(', ');
151
+ return `Send our team a request for the campaign ${(0, shared_1.quoted)(args.name, '')}${terms ? `, ${terms}` : ''}. Nothing runs until our team approves it.`;
152
+ },
153
+ async run({ client }, args) {
154
+ return client.post(CAMPAIGN, (0, shared_1.defined)(args));
155
+ },
156
+ });
157
+ exports.pauseCampaign = (0, tool_1.defineTool)({
158
+ name: 'pause_campaign',
159
+ title: 'Pause a campaign',
160
+ description: 'Pause an active campaign: its ads stop showing at once. Undo with resume_campaign. Only an active campaign can be paused (422 otherwise). Returns the campaign with its new state. Maps to POST /system/campaigns/campaign/{id}/pause.',
161
+ kind: 'write',
162
+ roleFloor: 'editor',
163
+ reader: 'get_campaign',
164
+ capability: 'advertise',
165
+ input: { id: (0, shared_1.id)('campaign') },
166
+ approval: (_args, before) => `Pause ${(0, shared_1.named)('campaign', before?.name)}: its ads stop showing at once. You can resume it any time.`,
167
+ async run({ client }, { id: campaignId }) {
168
+ return client.post(`${CAMPAIGN}/${(0, shared_1.enc)(campaignId)}/pause`);
169
+ },
170
+ });
171
+ exports.resumeCampaign = (0, tool_1.defineTool)({
172
+ name: 'resume_campaign',
173
+ title: 'Resume a campaign',
174
+ description: 'Resume a paused campaign: it is active again and its ads show from the next request, within its dates. Only a paused campaign can be resumed (422 otherwise). Returns the campaign with its new state. Maps to POST /system/campaigns/campaign/{id}/resume.',
175
+ kind: 'write',
176
+ roleFloor: 'editor',
177
+ reader: 'get_campaign',
178
+ capability: 'advertise',
179
+ input: { id: (0, shared_1.id)('campaign') },
180
+ approval: (_args, before) => `Resume ${(0, shared_1.named)('campaign', before?.name)}: its ads start showing again from the next request.`,
181
+ async run({ client }, { id: campaignId }) {
182
+ return client.post(`${CAMPAIGN}/${(0, shared_1.enc)(campaignId)}/resume`);
183
+ },
184
+ });
185
+ exports.resubmitCampaign = (0, tool_1.defineTool)({
186
+ name: 'resubmit_campaign',
187
+ title: 'Send a campaign for review again',
188
+ description: 'Send a campaign our team rejected back for review, after changing what the review asks for (read its rejectionReason with get_campaign). Only the fields given change; null clears the daily budget or the end date, and an empty list means anywhere or any language. It returns to pending; nothing runs until our team approves it. Only a rejected campaign can be sent again: anything else is refused before a change is made. Returns the campaign. Maps to PATCH /system/campaigns/campaign/{id} (when fields change) and POST /system/campaigns/campaign/{id}/resubmit.',
189
+ kind: 'write',
190
+ roleFloor: 'editor',
191
+ reader: 'get_campaign',
192
+ capability: 'advertise',
193
+ input: {
194
+ id: (0, shared_1.id)('campaign'),
195
+ name: zod_1.z.string().min(1).max(200).optional(),
196
+ application: shared_1.application.describe(AGENT).optional(),
197
+ goal: goal.optional(),
198
+ dailyBudget: dailyBudget.nullable().optional(),
199
+ startDate: day('When it starts').optional(),
200
+ endDate: day('When it ends').nullable().optional(),
201
+ countries: countries.optional(),
202
+ languages: languages.optional(),
203
+ notes: notes.optional(),
204
+ },
205
+ approval: (args, before) => {
206
+ const what = (0, shared_1.changedWords)(args, REQUEST_WORDS);
207
+ const changes = what.length ? `, with a new ${(0, shared_1.listWords)(what)}` : '';
208
+ return `Send ${(0, shared_1.named)('campaign', before?.name)} to our team again${changes}. Nothing runs until our team approves it.`;
209
+ },
210
+ async run({ client }, args) {
211
+ const path = `${CAMPAIGN}/${(0, shared_1.enc)(args.id)}`;
212
+ const current = await client.get(path);
213
+ if (current?.state !== 'rejected') {
214
+ throw new shared_1.ToolInputError(`Only a campaign our team rejected can be sent for review again; this one is ${(0, shared_1.str)(current?.state) ?? 'not rejected'}. Nothing was changed.`);
215
+ }
216
+ const changes = Object.keys(args).some(k => k !== 'id' && args[k] !== undefined);
217
+ if (changes)
218
+ await client.patch(path, (0, shared_1.patchBody)(args));
219
+ return client.post(`${path}/resubmit`);
220
+ },
221
+ });
222
+ exports.campaignTools = [
223
+ exports.listCampaigns,
224
+ exports.getCampaign,
225
+ exports.requestCampaign,
226
+ exports.pauseCampaign,
227
+ exports.resumeCampaign,
228
+ exports.resubmitCampaign,
229
+ ];
230
+ //# sourceMappingURL=campaigns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaigns.js","sourceRoot":"","sources":["../../src/tools/campaigns.ts"],"names":[],"mappings":";;;AA0CA,kCAYC;AAtDD;;;;;;;GAOG;AACH,6BAAwB;AACxB,kCAAqC;AACrC,qCAgBkB;AAElB,MAAM,QAAQ,GAAG,qBAAqB,CAAC;AAEvC,8DAA8D;AACjD,QAAA,eAAe,GAA2B;IACrD,OAAO,EAAE,8CAA8C;IACvD,MAAM,EAAE,oCAAoC;IAC5C,MAAM,EAAE,6DAA6D;IACrE,QAAQ,EACN,iIAAiI;IACnI,KAAK,EAAE,0BAA0B;IACjC,OAAO,EAAE,iCAAiC;CAC3C,CAAC;AAEF,uCAAuC;AACvC,SAAgB,WAAW,CAAC,CAAM;IAChC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CAAC,CAAC,CAAC;QACvD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,WAAW,CAAC,CAAC;IACzC,CAAC;CACF,CAAC,CAAC;AAEU,QAAA,aAAa,GAAG;IAC3B,qBAAa;IACb,mBAAW;IACX,uBAAe;IACf,qBAAa;IACb,sBAAc;IACd,wBAAgB;CACjB,CAAC"}
@@ -10,7 +10,7 @@ exports.journalRow = journalRow;
10
10
  * `explain_decision` calls the gateway's decision-trace route (ads reads the
11
11
  * trace from BigQuery, filtered by the caller's org, so another org's message
12
12
  * is a 404). The trace speaks the API's names (ad unit, line item, creative);
13
- * the tool reshapes it into Offer Manager's (moment, rule, offer, attributes)
13
+ * the tool reshapes it into the console's (moment, audience, offer, customer details)
14
14
  * and drops the scoring internals a model does not need to explain an
15
15
  * outcome. `find_requests` reads the fetch journal (`/offer-manager/journal`:
16
16
  * seven days, org scoped, newest first, at most 500 rows); every journaled
@@ -22,30 +22,29 @@ const tool_1 = require("../tool");
22
22
  const shared_1 = require("./shared");
23
23
  /** Plain meanings of the pipeline stages, in pipeline order. */
24
24
  exports.STAGE_MEANINGS = {
25
- sourcing: "Collected the moment's enabled rules",
26
- eligibility: "Moment frequency cap, then each rule's limit (maximum impressions or target fill rate)",
27
- channel: "Each rule's channels against the request's channel (the channel parameter, or the format)",
28
- schedule: "Each rule's schedule (dates, days, hours) in the org time zone",
29
- ruleTargeting: "Each rule's audience and exclusions, per offer, against the attributes the agent sent and the customer's offer history",
30
- formatEligibility: 'Whether the rule has an offer that can render in the requested format',
31
- fallbackReflow: 'Fallback rules considered because no other rule qualified',
32
- frequencyCaps: 'Per-customer frequency caps on rules (at most times serves per interval)',
25
+ sourcing: "Collected the moment's offers that are on (their audiences) and its ads from the network",
26
+ eligibility: "Each audience's limit (maximum impressions or target fill rate)",
27
+ channel: "Each audience's channels against the request's channel (the channel parameter, or the format)",
28
+ schedule: "Each audience's schedule (dates, days, hours) in the org time zone",
29
+ ruleTargeting: "Each audience's Who sees it and Who doesn’t, per offer, against the attributes the agent sent and the customer's offer history",
30
+ formatEligibility: 'Whether the audience has an offer that can render in the requested format',
31
+ fallbackReflow: 'Fallback audiences considered because no other qualified',
32
+ frequencyCaps: "The workspace's offer limit (how many of the brand's offers one customer may see in a period; ads from the network are not limited), then each audience's How often (at most times serves per interval)",
33
33
  semanticRelevance: 'Relevance of each offer to the conversation the agent sent',
34
34
  appropriatenessGate: 'Whether any offer is appropriate in this moment of the conversation',
35
- scoring: 'Priority, then a weighted draw within the top priority; offer frequency caps',
35
+ scoring: 'Priority, then a weighted draw within the top priority',
36
36
  render: 'Rendering the chosen offer for the channel',
37
37
  };
38
38
  /** Plain meanings of the request outcomes (ads `ErrorResponse` reasons). */
39
39
  exports.OUTCOME_MEANINGS = {
40
40
  filled: 'An offer was returned.',
41
- prefetch: 'An offer was returned for prefetch.',
42
41
  UnknownAdUnit: 'The moment code the agent sent does not exist.',
43
42
  AdUnitDisabled: 'The moment is disabled.',
44
- NoLineItemsConfigured: 'No enabled rule includes this moment.',
45
- AdUnitLimitExceeded: "The customer had reached the moment's frequency cap.",
46
- NoEligibleLineItems: 'No rule qualified: each was removed by a limit, its channels, its schedule, its audience or exclusions, or format.',
47
- LineItemLimitExceeded: 'The customer had reached the frequency cap of every qualifying rule.',
48
- CreativeLimitExceeded: 'The customer had reached the frequency cap of every offer in the winning rule.',
43
+ NoLineItemsConfigured: 'No offer that is on (published) is set to show at this moment, and ads from the network are off there.',
44
+ OfferLimitReached: "The customer had reached the workspace's offer limit, and no ad from the network qualified.",
45
+ NoEligibleLineItems: 'Nothing qualified: each audience was removed by a limit, its channels, its schedule, its audience or exclusions, or format.',
46
+ LineItemLimitExceeded: 'The customer had reached the How often cap of every qualifying audience.',
47
+ NoAdAvailable: 'The chosen audiences produced nothing to show: the network returned no ad, or no offer could render.',
49
48
  'appropriateness-gate': 'The conversation was judged a poor moment for any offer, so none was shown.',
50
49
  UnsupportedFormat: 'The agent asked for a render format that is not supported.',
51
50
  MissingRequiredParameter: 'The request was missing a required parameter.',
@@ -62,18 +61,19 @@ const STATUS = {
62
61
  won: 'shown',
63
62
  eliminated: 'removed',
64
63
  'lost-auction': 'chosen but could not serve an offer',
65
- unused: 'qualified, another rule was chosen',
64
+ unused: 'qualified, another was chosen',
66
65
  'not-considered': 'fallback, not needed',
67
66
  };
68
67
  /** Plain meanings of the ads elimination reason codes. */
69
68
  exports.REASON_MEANINGS = {
70
- limit: "The rule's impressions or fill-rate limit",
71
- channel: "The request's channel is not one of the rule's channels, or the request named none",
72
- schedule: "Outside the rule's schedule",
73
- audience: 'The customer is not in the rule audience',
74
- exclusions: 'The customer is excluded by the rule',
75
- format: 'No offer of the rule can render in the requested format',
76
- frequency: "The customer reached the rule's frequency cap",
69
+ limit: "The audience's delivery limit",
70
+ channel: "The request's channel is not one of the audience's channels, or the request named none",
71
+ schedule: "Outside the audience's schedule",
72
+ audience: 'The customer does not match Who sees it',
73
+ exclusions: 'The customer matches Who doesn’t see it',
74
+ format: 'No offer of the audience can render in the requested format',
75
+ offer_limit: "The customer reached the workspace's offer limit (these are the brand's own offers)",
76
+ frequency: "The customer reached the audience's How often",
77
77
  };
78
78
  /** The trace record (ads `DecisionTraceRecord`) in Offer Manager terms. */
79
79
  function explainTrace(record) {
@@ -115,9 +115,9 @@ function explainTrace(record) {
115
115
  : undefined,
116
116
  },
117
117
  shown: winner
118
- ? { rule: winner.lineItem, offer: winner.creatives?.[0] ?? null }
118
+ ? { audience: winner.lineItem, offer: winner.creatives?.[0] ?? null }
119
119
  : null,
120
- rules: (Array.isArray(t.candidates) ? t.candidates : []).map((c) => ({
120
+ audiences: (Array.isArray(t.candidates) ? t.candidates : []).map((c) => ({
121
121
  id: c.id,
122
122
  name: c.name,
123
123
  priority: PRIORITY[c.priority] ?? c.priority,
@@ -143,8 +143,8 @@ function explainTrace(record) {
143
143
  stage: s.name,
144
144
  checks: exports.STAGE_MEANINGS[s.name],
145
145
  status: s.status,
146
- rulesIn: s.candidatesIn,
147
- rulesOut: s.candidatesOut,
146
+ audiencesIn: s.candidatesIn,
147
+ audiencesOut: s.candidatesOut,
148
148
  ...(s.name === 'appropriatenessGate' && s.detail
149
149
  ? { detail: s.detail }
150
150
  : {}),
@@ -155,22 +155,40 @@ const NOT_FOUND_NOTE = 'No decision trace for this message in this org. Possible
155
155
  exports.explainDecision = (0, tool_1.defineTool)({
156
156
  name: 'explain_decision',
157
157
  title: 'Explain a decision',
158
- description: 'Why one offer request returned the offer it did, or none: the moment and attributes the agent sent, every rule considered with whether it was shown or why it was removed, and the pipeline stages. Takes the message id of the request (`messageId` in the fetch response, or the X-Adchat-Message-Id header of an empty one; starts with "direqt-"), which the agent logs, find_requests returns, and the Fetch Journal (Reports, Journal tab) shows. Live requests only, kept 90 days. Maps to GET /system/offer-manager/decision-trace/{messageId}.',
158
+ description: 'Why an offer request returned the offer it did, or none: the moment and attributes the agent sent, every audience considered (a rule; the console calls it the offer’s audience, or for an agent’s ads from the network its network setting) with whether it was shown or why it was removed, and the pipeline stages. Takes either the message id of one request (`messageId` in the fetch response, or the X-Adchat-Message-Id header of an empty one; starts with "direqt-"), which the agent logs, find_requests returns, and the request log on the agent’s Connect tab in the console shows; or a customer id (`subscriber`, the id the agent sends) for that customer’s latest requests, at most 10, newest first. Live requests only, kept 90 days. Maps to GET /system/offer-manager/decision-trace/{messageId} and GET /system/offer-manager/decision-trace?subscriber={subscriber}.',
159
159
  kind: 'read',
160
160
  roleFloor: 'viewer',
161
161
  input: {
162
162
  messageId: zod_1.z
163
163
  .string()
164
164
  .min(1)
165
+ .optional()
165
166
  .describe('The fetch response messageId, for example "direqt-5f0c…"'),
167
+ subscriber: zod_1.z
168
+ .string()
169
+ .min(1)
170
+ .optional()
171
+ .describe('A customer id the agent sends, for that customer’s latest requests. Pass this or messageId.'),
166
172
  },
167
- async run({ client }, { messageId }) {
168
- const id = messageId.trim();
173
+ async run({ client }, { messageId, subscriber }) {
174
+ const customer = subscriber?.trim();
175
+ if (!messageId?.trim() && customer) {
176
+ const { traces } = await client.get(`${shared_1.OM}/decision-trace?subscriber=${(0, shared_1.enc)(customer)}`);
177
+ const list = Array.isArray(traces) ? traces : [];
178
+ return list.length
179
+ ? { subscriber: customer, requests: list.map(explainTrace) }
180
+ : {
181
+ found: false,
182
+ subscriber: customer,
183
+ note: 'No decision traces for this customer in this org in the last 90 days. The id may be mistyped, the agent may send a different id for them, or their requests were tests (not traced).',
184
+ };
185
+ }
186
+ const id = messageId?.trim() ?? '';
169
187
  if (!id.startsWith('direqt-'))
170
188
  return {
171
189
  found: false,
172
190
  messageId: id,
173
- note: 'A message id starts with "direqt-". Ask the user for the messageId from the fetch response or the Fetch Journal.',
191
+ note: 'A message id starts with "direqt-". Ask the user for the messageId from the fetch response or the request log, or for the customer id the agent sends.',
174
192
  };
175
193
  try {
176
194
  const record = await client.get(`${shared_1.OM}/decision-trace/${(0, shared_1.enc)(id)}`);
@@ -203,7 +221,7 @@ function journalRow(j) {
203
221
  result: reason
204
222
  ? { offer: null, reason, meaning: exports.OUTCOME_MEANINGS[reason] }
205
223
  : {
206
- rule: j.lineItem?.name,
224
+ audience: j.lineItem?.name,
207
225
  offer: offer?.name ?? null,
208
226
  },
209
227
  messageId: j.messageId || undefined,
@@ -212,7 +230,7 @@ function journalRow(j) {
212
230
  exports.findRequests = (0, tool_1.defineTool)({
213
231
  name: 'find_requests',
214
232
  title: 'Find offer requests',
215
- description: 'Recent live offer requests from the fetch journal (kept 7 days), newest first: when, the agent, the moment code, the subscriber id, the attributes the agent sent, the result (the rule and offer shown, or the reason none was), and the messageId to pass to explain_decision. Filter by `application` (agent), `subscriber` (the customer id the agent sends), and `moment` (a moment code from list_moments). Maps to GET /system/offer-manager/journal.',
233
+ description: 'Recent live offer requests from the fetch journal (kept 7 days), newest first: when, the agent, the moment code, the subscriber id, the attributes the agent sent, the result (the audience and offer shown, or the reason none was), and the messageId to pass to explain_decision. Filter by `application` (agent), `subscriber` (the customer id the agent sends), and `moment` (a moment code from list_moments). Maps to GET /system/offer-manager/journal.',
216
234
  kind: 'read',
217
235
  roleFloor: 'viewer',
218
236
  input: {
@@ -1 +1 @@
1
- {"version":3,"file":"decisions.js","sourceRoot":"","sources":["../../src/tools/decisions.ts"],"names":[],"mappings":";;;AA6FA,oCA0EC;AAuCD,gCAuBC;AArOD;;;;;;;;;;;;GAYG;AACH,6BAAwB;AACxB,sCAAqC;AACrC,kCAAqC;AACrC,qCAAyD;AAEzD,gEAAgE;AACnD,QAAA,cAAc,GAA2B;IACpD,QAAQ,EAAE,sCAAsC;IAChD,WAAW,EACT,wFAAwF;IAC1F,OAAO,EACL,2FAA2F;IAC7F,QAAQ,EAAE,gEAAgE;IAC1E,aAAa,EACX,wHAAwH;IAC1H,iBAAiB,EACf,uEAAuE;IACzE,cAAc,EAAE,2DAA2D;IAC3E,aAAa,EACX,0EAA0E;IAC5E,iBAAiB,EACf,4DAA4D;IAC9D,mBAAmB,EACjB,qEAAqE;IACvE,OAAO,EACL,8EAA8E;IAChF,MAAM,EAAE,4CAA4C;CACrD,CAAC;AAEF,4EAA4E;AAC/D,QAAA,gBAAgB,GAA2B;IACtD,MAAM,EAAE,wBAAwB;IAChC,QAAQ,EAAE,qCAAqC;IAC/C,aAAa,EAAE,gDAAgD;IAC/D,cAAc,EAAE,yBAAyB;IACzC,qBAAqB,EAAE,uCAAuC;IAC9D,mBAAmB,EAAE,sDAAsD;IAC3E,mBAAmB,EACjB,oHAAoH;IACtH,qBAAqB,EACnB,sEAAsE;IACxE,qBAAqB,EACnB,gFAAgF;IAClF,sBAAsB,EACpB,6EAA6E;IAC/E,iBAAiB,EACf,4DAA4D;IAC9D,wBAAwB,EAAE,+CAA+C;IACzE,qBAAqB,EAAE,6CAA6C;IACpE,gBAAgB,EAAE,4CAA4C;CAC/D,CAAC;AAEF,MAAM,QAAQ,GAA2B;IACvC,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,SAAS;IACZ,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,SAAS;CACd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,CAAC;AAEE,QAAA,QAAQ,GAAG,IAAA,iBAAU,EAAC;IACjC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,2CAA2C;IAClD,WAAW,EACT,uZAAuZ;IACzZ,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE;QACL,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC3C,EAAE,EAAE,IAAA,WAAE,EAAC,wBAAwB,CAAC;QAChC,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC9B,KAAK,EAAE,OAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,IAAI,CAAC;aACT,QAAQ,EAAE;aACV,QAAQ,CAAC,6DAA6D,CAAC;KAC3E;IACD,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI;QACxB,OAAO,MAAM,CAAC,GAAG,CACf,GAAG,WAAE,gBAAgB,IAAI,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAA,YAAG,EAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EACvE;YACE,MAAM,EACJ,IAAI,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK;gBAC/B,CAAC,CAAC,OAAO,IAAI,CAAC,KAAK,OAAO;gBAC1B,CAAC,CAAC,SAAS;SAChB,CACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEU,QAAA,aAAa,GAAG,CAAC,oBAAY,EAAE,uBAAe,EAAE,gBAAQ,CAAC,CAAC"}
package/bin/tools/docs.js CHANGED
@@ -11,14 +11,14 @@ const tool_1 = require("../tool");
11
11
  exports.searchDocs = (0, tool_1.defineTool)({
12
12
  name: 'search_docs',
13
13
  title: 'Search the docs',
14
- description: 'Keyword search over the Advertising.chat docs (docs.advertising.chat): how moments, offers, rules, conditions, frequency caps, and fallback rules behave, console procedures, how agents request offers, and the API and rule reference. Returns matching pages with url, summary, and a snippet; follow up with read_doc. Use it for product questions instead of answering from memory.',
14
+ description: 'Keyword search over the Advertising.chat docs (docs.advertising.chat): how moments, offers, rules, conditions, How often and the offer limit, and fallback rules behave, console procedures, how agents request offers, and the API and rule reference. Returns matching pages with url, summary, and a snippet; follow up with read_doc. Use it for product questions instead of answering from memory.',
15
15
  kind: 'read',
16
16
  roleFloor: 'viewer',
17
17
  input: {
18
18
  query: zod_1.z
19
19
  .string()
20
20
  .min(2)
21
- .describe('Keywords, for example "fallback rule frequency cap"'),
21
+ .describe('Keywords, for example "fallback rule offer limit"'),
22
22
  limit: zod_1.z.number().int().min(1).max(20).optional().describe('Default 5'),
23
23
  },
24
24
  async run({ docs }, { query, limit }) {
@@ -1 +1 @@
1
- {"version":3,"file":"docs.js","sourceRoot":"","sources":["../../src/tools/docs.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,6BAAwB;AACxB,kCAAqC;AAExB,QAAA,UAAU,GAAG,IAAA,iBAAU,EAAC;IACnC,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,iBAAiB;IACxB,WAAW,EACT,2XAA2X;IAC7X,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE;QACL,KAAK,EAAE,OAAC;aACL,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,qDAAqD,CAAC;QAClE,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC;KACxE;IACD,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE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CAAC,GAAG;YACN,OAAO;gBACL,KAAK,EAAE,yBAAyB,IAAI,qCAAqC;aAC1E,CAAC;QACJ,iEAAiE;QACjE,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;QACnD,OAAO,KAAK,GAAG,CAAC,KAAK,aAAa,GAAG,CAAC,GAAG,OAAO,IAAI,IAAI,yBAAyB,EAAE,CAAC;IACtF,CAAC;CACF,CAAC,CAAC;AAEU,QAAA,SAAS,GAAG,CAAC,kBAAU,EAAE,eAAO,CAAC,CAAC"}
@@ -8,10 +8,14 @@ export declare const allTools: AnyTool[];
8
8
  export declare const toolsByName: ReadonlyMap<string, AnyTool>;
9
9
  export * from './account';
10
10
  export * from './attributes';
11
+ export * from './campaigns';
11
12
  export * from './decisions';
12
13
  export * from './docs';
13
14
  export * from './moments';
15
+ export * from './network';
14
16
  export * from './offers';
17
+ export * from './results';
15
18
  export * from './rules';
19
+ export * from './settings';
16
20
  export * from './translation';
17
21
  export { ToolInputError } from './shared';
@@ -17,11 +17,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.ToolInputError = exports.toolsByName = exports.allTools = void 0;
18
18
  const account_1 = require("./account");
19
19
  const attributes_1 = require("./attributes");
20
+ const campaigns_1 = require("./campaigns");
20
21
  const decisions_1 = require("./decisions");
21
22
  const docs_1 = require("./docs");
22
23
  const moments_1 = require("./moments");
24
+ const network_1 = require("./network");
23
25
  const offers_1 = require("./offers");
26
+ const results_1 = require("./results");
24
27
  const rules_1 = require("./rules");
28
+ const settings_1 = require("./settings");
25
29
  const translation_1 = require("./translation");
26
30
  exports.allTools = [
27
31
  account_1.whoami,
@@ -31,17 +35,25 @@ exports.allTools = [
31
35
  ...translation_1.translationTools,
32
36
  ...rules_1.ruleTools,
33
37
  ...offers_1.offerTools,
38
+ ...results_1.resultsTools,
39
+ ...network_1.networkTools,
40
+ ...campaigns_1.campaignTools,
41
+ ...settings_1.settingsTools,
34
42
  ...decisions_1.decisionTools,
35
43
  ...docs_1.docsTools,
36
44
  ];
37
45
  exports.toolsByName = new Map(exports.allTools.map(t => [t.name, t]));
38
46
  __exportStar(require("./account"), exports);
39
47
  __exportStar(require("./attributes"), exports);
48
+ __exportStar(require("./campaigns"), exports);
40
49
  __exportStar(require("./decisions"), exports);
41
50
  __exportStar(require("./docs"), exports);
42
51
  __exportStar(require("./moments"), exports);
52
+ __exportStar(require("./network"), exports);
43
53
  __exportStar(require("./offers"), exports);
54
+ __exportStar(require("./results"), exports);
44
55
  __exportStar(require("./rules"), exports);
56
+ __exportStar(require("./settings"), exports);
45
57
  __exportStar(require("./translation"), exports);
46
58
  var shared_1 = require("./shared");
47
59
  Object.defineProperty(exports, "ToolInputError", { enumerable: true, get: function () { return shared_1.ToolInputError; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAMA,uCAAqD;AACrD,6CAA8C;AAC9C,2CAA4C;AAC5C,iCAAmC;AACnC,uCAAwC;AACxC,qCAAsC;AACtC,mCAAoC;AACpC,+CAAiD;AAEpC,QAAA,QAAQ,GAAc;IACjC,gBAAM;IACN,0BAAgB;IAChB,GAAG,qBAAW;IACd,GAAG,2BAAc;IACjB,GAAG,8BAAgB;IACnB,GAAG,iBAAS;IACZ,GAAG,mBAAU;IACb,GAAG,yBAAa;IAChB,GAAG,gBAAS;CACb,CAAC;AAEW,QAAA,WAAW,GAAiC,IAAI,GAAG,CAC9D,gBAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAC/B,CAAC;AAEF,4CAA0B;AAC1B,+CAA6B;AAC7B,8CAA4B;AAC5B,yCAAuB;AACvB,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,gDAA8B;AAC9B,mCAA0C;AAAjC,wGAAA,c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