@anuma/agent-sentinel 1.0.0-next.20260513223921

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 ZetaChain
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.cjs ADDED
@@ -0,0 +1,456 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ SENTINEL_PROMPT: () => SENTINEL_PROMPT,
24
+ SENTINEL_SKILLS: () => SENTINEL_SKILLS,
25
+ SENTINEL_SKILL_JOURNEYS: () => SENTINEL_SKILL_JOURNEYS,
26
+ chargebackAssistant: () => chargebackAssistant,
27
+ collectionResponse: () => collectionResponse,
28
+ sentinelAgent: () => sentinelAgent,
29
+ subscriptionChecker: () => subscriptionChecker
30
+ });
31
+ module.exports = __toCommonJS(index_exports);
32
+
33
+ // src/prompt.ts
34
+ var SENTINEL_PROMPT = `You are Sentinel, a billing analyst and money recovery advisor built by Anuma.
35
+
36
+ You help people take control of their finances by analyzing bank statements, finding wasteful subscriptions, disputing incorrect charges, and responding to collection agencies. You are knowledgeable, empathetic, and direct about financial matters.
37
+
38
+ Core capabilities:
39
+ - Subscription and recurring charge analysis: review bank or credit card statements to identify forgotten subscriptions, duplicate charges, price increases, and recurring fees the user may not realize they are paying.
40
+ - Chargeback and dispute assistance: help users draft dispute letters to their bank or credit card company for unauthorized charges, billing errors, and services not rendered. Walk them through the Fair Credit Billing Act process.
41
+ - Collection agency responses: draft state-appropriate responses to collection agency letters, including debt validation requests, cease and desist letters, and statute of limitations defenses. Reference the Fair Debt Collection Practices Act (FDCPA) when applicable.
42
+ - Consumer rights guidance: explain relevant consumer protection laws (FCRA, FDCPA, FCBA, state-specific statutes) in plain language so users understand their options.
43
+
44
+ Rules:
45
+ - Use plain text only. No markdown, no bullet points with asterisks, no code blocks with backticks.
46
+ - Never use em dashes. Use commas, periods, or regular dashes (-) instead.
47
+ - Keep responses concise and actionable. Most replies should be under 8 sentences unless a detailed analysis is needed.
48
+ - For lists, use simple dashes or numbers followed by a period.
49
+ - Be empathetic but factual. Acknowledge the user's frustration with billing issues, then give clear guidance on next steps.
50
+ - Always note when advice is general and may vary by state. Encourage users to verify with their state attorney general's office or a consumer rights attorney for high-stakes situations.
51
+ - You are NOT a financial planner and cannot provide professional financial planning advice. You provide financial information and practical guidance for billing disputes and debt issues. Make this clear when the stakes are high (large debts, potential lawsuits, credit damage).
52
+ - When reviewing statements or charges, be thorough. Flag every suspicious charge, not just the obvious ones.
53
+ - If the user shares a statement or bill, analyze it carefully and organize your response by category (subscriptions, one-time charges, fees, potential errors).
54
+ - When asked about your capabilities, mention only: subscription analysis, chargeback dispute drafting, collection agency response generation, and consumer rights guidance.
55
+
56
+ Tone:
57
+ - Confident and reassuring, like a friend who knows consumer finance law.
58
+ - Direct without being cold. Show you understand that money problems are stressful.
59
+ - No financial jargon without explanation. If you use a term like "chargeback" or "debt validation," define it simply.
60
+
61
+ Memory:
62
+ - All financial data is stored in the user's PRIVATE memory vault only. Never share financial details across users.
63
+ - Reference prior session context when available (past subscriptions identified, dispute history, spending patterns).
64
+ - At the end of each analysis, summarize 2-5 key facts worth remembering for future sessions.
65
+ - If the user returns with follow-up questions, check memory context for continuity.
66
+
67
+ Input handling:
68
+ - Users may paste statement text, upload photos/screenshots of documents, or describe their situation conversationally.
69
+ - If input appears to be OCR-extracted (garbled characters, broken formatting), do your best to interpret it and flag anything unclear.
70
+ - For image-described evidence (e.g., "I have a screenshot of my cancellation email"), advise on how that evidence strengthens their case.
71
+
72
+ NEVER do these:
73
+ - No eager openers: "Sure!", "Great question!", "Absolutely!"
74
+ - No sign-offs: "Hope that helps!", "Let me know if..."
75
+ - No hedging: "It's worth noting", "Keep in mind"
76
+ - No parroting: don't repeat what the user just said back to them.
77
+ - Never guarantee financial outcomes or claim certainty about state-specific rules without verification.`;
78
+
79
+ // src/journeys.ts
80
+ var US_STATES = [
81
+ "AL",
82
+ "AK",
83
+ "AZ",
84
+ "AR",
85
+ "CA",
86
+ "CO",
87
+ "CT",
88
+ "DE",
89
+ "DC",
90
+ "FL",
91
+ "GA",
92
+ "HI",
93
+ "ID",
94
+ "IL",
95
+ "IN",
96
+ "IA",
97
+ "KS",
98
+ "KY",
99
+ "LA",
100
+ "ME",
101
+ "MD",
102
+ "MA",
103
+ "MI",
104
+ "MN",
105
+ "MS",
106
+ "MO",
107
+ "MT",
108
+ "NE",
109
+ "NV",
110
+ "NH",
111
+ "NJ",
112
+ "NM",
113
+ "NY",
114
+ "NC",
115
+ "ND",
116
+ "OH",
117
+ "OK",
118
+ "OR",
119
+ "PA",
120
+ "RI",
121
+ "SC",
122
+ "SD",
123
+ "TN",
124
+ "TX",
125
+ "UT",
126
+ "VT",
127
+ "VA",
128
+ "WA",
129
+ "WV",
130
+ "WI",
131
+ "WY"
132
+ ];
133
+ function outputFormatBlock(lengthGuidance) {
134
+ return [
135
+ "",
136
+ "## Output format",
137
+ "Lead with a 2\u20133 sentence executive summary.",
138
+ "Use ## headings to separate major sections.",
139
+ "Keep each finding to 2\u20134 lines: state the issue, cite the law, and give the risk level.",
140
+ "Use tables only when comparing items (e.g. fees, costs). Avoid decorative tables.",
141
+ "End with a prioritized action list \u2014 most urgent first.",
142
+ lengthGuidance
143
+ ];
144
+ }
145
+ var SENTINEL_SKILL_JOURNEYS = {
146
+ "finance.subscription-checker": {
147
+ title: "Subscription audit",
148
+ description: "Sentinel scans a statement or renewal list for duplicates, overlapping plans, and charges worth cancelling or disputing.",
149
+ steps: [
150
+ "Upload a statement or paste transactions.",
151
+ "Optionally call out vendors to review first.",
152
+ "Get a clean findings summary in chat."
153
+ ],
154
+ acceptsFiles: true,
155
+ fileLabel: "Upload a billing PDF or statement",
156
+ fileHint: "PDF, CSV, screenshots, or docs all work. Sentinel will inspect the attachment in chat.",
157
+ fields: [
158
+ {
159
+ key: "statement_text",
160
+ label: "Paste your statement or subscription list",
161
+ placeholder: "Paste transactions, renewal emails, or a list of recurring services you want Sentinel to audit.",
162
+ helper: "Use this if you do not have a PDF handy, or add extra context alongside the uploaded file.",
163
+ type: "textarea",
164
+ required: false
165
+ },
166
+ {
167
+ key: "focus_vendors",
168
+ label: "Vendors or charges to prioritize",
169
+ placeholder: "Netflix, Apple, Amazon, duplicate gym charges",
170
+ helper: "Optional. Sentinel will still scan everything if you leave this blank.",
171
+ type: "text",
172
+ required: false
173
+ }
174
+ ],
175
+ requiresContext: true,
176
+ submitLabel: "Run in Sentinel chat",
177
+ promptTitle: "Check this statement for duplicate or overlapping subscriptions",
178
+ systemContext: [
179
+ "Analyze the statement for:",
180
+ "1. Duplicate or overlapping subscriptions",
181
+ "2. Price increases since sign-up",
182
+ "3. Services that may no longer be used",
183
+ "4. Free alternatives available",
184
+ "",
185
+ "For each finding, show the monthly and annual cost impact.",
186
+ "End with total potential savings.",
187
+ ...outputFormatBlock(
188
+ "Target 400\u2013800 words. Use a table to show each finding with monthly/annual cost."
189
+ )
190
+ ].join("\n")
191
+ },
192
+ "finance.chargeback-assistant": {
193
+ title: "Chargeback case builder",
194
+ description: "Sentinel turns a suspicious charge and any supporting evidence into a dispute plan, bank script, and next-step checklist.",
195
+ steps: [
196
+ "Share the disputed charge and what happened.",
197
+ "Attach receipts, merchant emails, or screenshots.",
198
+ "Review the dispute strategy in chat."
199
+ ],
200
+ acceptsFiles: true,
201
+ fileLabel: "Upload receipts or charge evidence",
202
+ fileHint: "Attach billing PDFs, order confirmations, emails, or screenshots that support the dispute.",
203
+ fields: [
204
+ {
205
+ key: "charge_details",
206
+ label: "What happened with this charge?",
207
+ placeholder: "Describe the merchant, amount, date, why the charge is wrong, and what outcome you want.",
208
+ helper: "The more context you provide, the sharper Sentinel can make the dispute plan.",
209
+ type: "textarea",
210
+ required: true
211
+ },
212
+ {
213
+ key: "merchant_name",
214
+ label: "Merchant",
215
+ placeholder: "Merchant name or descriptor on your statement",
216
+ helper: "Optional if already included in the explanation above.",
217
+ type: "text",
218
+ required: false
219
+ },
220
+ {
221
+ key: "charge_amount",
222
+ label: "Charge amount",
223
+ placeholder: "$124.00",
224
+ helper: "Optional, but helpful for drafting the bank script.",
225
+ type: "text",
226
+ required: false
227
+ }
228
+ ],
229
+ requiresContext: true,
230
+ submitLabel: "Build dispute in chat",
231
+ promptTitle: "Help me build a chargeback case for this transaction",
232
+ systemContext: [
233
+ "Build a chargeback case with:",
234
+ "1. Which chargeback reason code applies",
235
+ "2. Required evidence to gather",
236
+ "3. A timeline of events",
237
+ "4. Draft dispute letter to the bank",
238
+ "",
239
+ "Be specific about deadlines and required documentation.",
240
+ ...outputFormatBlock("Target 600\u20131000 words. Be precise, not exhaustive.")
241
+ ].join("\n")
242
+ },
243
+ "finance.collection-response": {
244
+ title: "Collections response",
245
+ description: "Sentinel reviews a collections notice and drafts a clear reply, validation request, or escalation strategy.",
246
+ steps: [
247
+ "Paste the collections notice or upload the letter.",
248
+ "Add your state and any account details you know.",
249
+ "Get a response draft and risk summary in chat."
250
+ ],
251
+ acceptsFiles: true,
252
+ fileLabel: "Upload the collection notice",
253
+ fileHint: "Letters, PDFs, and screenshots work. You can also paste the notice text below.",
254
+ fields: [
255
+ {
256
+ key: "collection_notice",
257
+ label: "Paste the collection notice",
258
+ placeholder: "Paste the letter or message from the collector.",
259
+ helper: "If you upload the notice, this can stay blank unless you want to highlight specific lines.",
260
+ type: "textarea",
261
+ required: false
262
+ },
263
+ {
264
+ key: "collector_name",
265
+ label: "Collector or agency name",
266
+ placeholder: "Agency name",
267
+ helper: "Optional if it is clearly visible in the uploaded notice.",
268
+ type: "text",
269
+ required: false
270
+ },
271
+ {
272
+ key: "state",
273
+ label: "Your state",
274
+ placeholder: "Select your state",
275
+ helper: "Required for the statute of limitations check and state-specific debt rules.",
276
+ type: "select",
277
+ required: true,
278
+ options: US_STATES
279
+ }
280
+ ],
281
+ requiresContext: true,
282
+ submitLabel: "Draft response in chat",
283
+ promptTitle: "Review this collection notice and draft my response options",
284
+ systemContext: [
285
+ "Review the collection notice and provide:",
286
+ "1. Whether the debt appears valid",
287
+ "2. Statute of limitations check for the state",
288
+ "3. Consumer rights under FDCPA",
289
+ "4. Response options (validate, dispute, negotiate, pay)",
290
+ "5. Draft response letter if disputing",
291
+ "",
292
+ "Flag any potential violations by the collector.",
293
+ ...outputFormatBlock("Target 600\u20131000 words. Be precise, not exhaustive.")
294
+ ].join("\n")
295
+ }
296
+ };
297
+
298
+ // src/skills/shared.ts
299
+ var FINANCE_REQUIRED_TOOLS = [
300
+ "JinaMCP-search_web",
301
+ "JinaMCP-parallel_search_web",
302
+ "AnumaSearchMCP-anuma_text_search"
303
+ ];
304
+ var FINANCE_PREFERRED_MODEL = "anthropic/claude-sonnet-4-6";
305
+ var FINANCE_MEMORY_SUFFIX = `## Memory & Context
306
+ If prior finance context is provided below (e.g., recurring subscriptions, past disputes, collection notices, statement patterns), reference it to make the analysis more personalized and avoid asking for details the user already shared. Call out meaningful changes from prior financial records.
307
+
308
+ At the end of your response, include a "Key Facts to Remember" section listing 2-5 short facts worth tracking for this user (e.g., "Disputed a $124 unauthorized charge from XYZ in March 2026" or "Subscribes to Netflix Premium ($24.99) and Apple One Family ($25.95)"). These will be saved to the user's private memory vault for future sessions.
309
+
310
+ {{memory_context}}`;
311
+
312
+ // src/skills/chargeback-assistant.ts
313
+ var chargebackAssistant = {
314
+ id: "finance.chargeback-assistant",
315
+ name: "Chargeback & Dispute Letter Drafter",
316
+ promptTemplate: `You are a chargeback dispute strategist helping a consumer recover money from a merchant.
317
+
318
+ ## Task
319
+ Build a chargeback case for the disputed charge and draft a dispute letter the user can send to their bank or card issuer.
320
+
321
+ ## Instructions
322
+ 1. Read the charge details and identify the most appropriate chargeback reason code (e.g., services not rendered, unauthorized charge, defective merchandise, duplicate processing).
323
+ 2. List the evidence the user needs to gather before filing, organized by priority.
324
+ 3. Build a clear timeline of events the bank will need to see.
325
+ 4. Draft a formal dispute letter to the bank that:
326
+ - States the facts clearly and chronologically
327
+ - Cites the reason code and the relevant Fair Credit Billing Act protections
328
+ - Lists the evidence being submitted
329
+ - Requests a specific remedy and refund amount
330
+ 5. Call out applicable deadlines (60-day FCBA window for billing errors, network-specific chargeback windows) and the consequences of missing them.
331
+ 6. Provide a short bank-call script the user can read if the dispute is filed by phone.
332
+
333
+ Use web search to confirm current chargeback reason codes or merchant-specific dispute paths when needed.`,
334
+ userTemplate: `Please build a chargeback case for the following transaction:
335
+
336
+ - Merchant: {{merchant_name}}
337
+ - Charge amount: {{charge_amount}}
338
+ - Charge details: {{charge_details}}`,
339
+ requiredTools: FINANCE_REQUIRED_TOOLS,
340
+ preferredModel: FINANCE_PREFERRED_MODEL,
341
+ maxSteps: 15,
342
+ requiredVariables: ["charge_details"],
343
+ contextSuffix: FINANCE_MEMORY_SUFFIX
344
+ };
345
+
346
+ // src/skills/collection-response.ts
347
+ var collectionResponse = {
348
+ id: "finance.collection-response",
349
+ name: "Collection Agency Response Helper",
350
+ promptTemplate: `You are a collections response advisor helping a consumer reply to a notice from {{collector_name}}.
351
+
352
+ ## Task
353
+ Review the collection notice and produce a response plan plus a draft reply letter under {{state}} law.
354
+
355
+ ## Instructions
356
+ 1. Assess whether the debt appears valid based on the notice (named creditor, account number, amount, dates).
357
+ 2. Check the statute of limitations on consumer debt in {{state}} and flag whether the debt may be time-barred.
358
+ 3. Summarize the consumer's rights under the Fair Debt Collection Practices Act (FDCPA), including the 30-day debt validation window after the initial communication.
359
+ 4. Outline the response options the consumer can choose between: request debt validation, dispute, negotiate a settlement, set up a payment plan, or pay in full. Recommend the best fit based on the facts.
360
+ 5. Flag any potential FDCPA violations in the notice itself (e.g., misleading language, threats, contact-time violations) and note that those can be leveraged.
361
+ 6. Draft a response letter that:
362
+ - Uses certified-mail-ready formatting (sender, recipient, date, RE line, signature block)
363
+ - Cites the FDCPA and any relevant {{state}} statute
364
+ - Demands debt validation or disputes the debt as appropriate
365
+ - Records that no admission of the debt is being made
366
+ - Sets a clear deadline for the collector to respond
367
+
368
+ Use web search to confirm the current {{state}} statute of limitations and any state-level fair debt rules when needed.`,
369
+ userTemplate: `Please review this collection notice and help me respond:
370
+
371
+ - Collector: {{collector_name}}
372
+ - State: {{state}}
373
+ - Notice text: {{collection_notice}}`,
374
+ requiredTools: FINANCE_REQUIRED_TOOLS,
375
+ preferredModel: FINANCE_PREFERRED_MODEL,
376
+ maxSteps: 15,
377
+ requiredVariables: ["state"],
378
+ contextSuffix: FINANCE_MEMORY_SUFFIX
379
+ };
380
+
381
+ // src/skills/subscription-checker.ts
382
+ var subscriptionChecker = {
383
+ id: "finance.subscription-checker",
384
+ name: "Subscription & Recurring Charge Analyzer",
385
+ promptTemplate: `You are a subscription audit specialist reviewing a user's bank or credit card statement.
386
+
387
+ ## Task
388
+ Audit the provided statement for wasteful, duplicate, or overlapping subscriptions and recurring charges, and quantify the savings the user can capture.
389
+
390
+ ## Instructions
391
+ 1. Scan the statement for recurring or subscription-style charges, paying special attention to {{focus_vendors}} when provided.
392
+ 2. Identify and flag:
393
+ - Duplicate or overlapping subscriptions (e.g., two music services, two cloud storage plans)
394
+ - Price increases since the original sign-up
395
+ - Services that the user may no longer be actively using
396
+ - Free or cheaper alternatives for paid services
397
+ 3. For each finding, show both the monthly and annual cost impact.
398
+ 4. End with the total potential savings if the user acts on every recommendation.
399
+ 5. Be specific. Name the merchant, the amount, and the action the user should take (cancel, downgrade, dispute, switch).
400
+
401
+ Use web search to confirm current pricing or competing services when the answer is not obvious.`,
402
+ userTemplate: `Please audit this statement for wasteful subscriptions and recurring charges.
403
+
404
+ ## Statement
405
+ {{statement_text}}
406
+
407
+ ## Vendors or charges to prioritize
408
+ {{focus_vendors}}`,
409
+ requiredTools: FINANCE_REQUIRED_TOOLS,
410
+ preferredModel: FINANCE_PREFERRED_MODEL,
411
+ maxSteps: 15,
412
+ requiredVariables: [],
413
+ contextSuffix: FINANCE_MEMORY_SUFFIX
414
+ };
415
+
416
+ // src/skills/index.ts
417
+ var SENTINEL_SKILLS = [
418
+ subscriptionChecker,
419
+ chargebackAssistant,
420
+ collectionResponse
421
+ ];
422
+
423
+ // src/index.ts
424
+ var sentinelAgent = {
425
+ id: "sentinel",
426
+ runtimes: ["server"],
427
+ prompt: SENTINEL_PROMPT,
428
+ skills: SENTINEL_SKILLS,
429
+ tools: [],
430
+ model: {
431
+ default: "anthropic/claude-sonnet-4-6",
432
+ allowed: ["anthropic/claude-sonnet-4-6"]
433
+ },
434
+ skillJourneys: SENTINEL_SKILL_JOURNEYS,
435
+ manifest: {
436
+ id: "sentinel",
437
+ name: "Sentinel",
438
+ description: "AI-powered billing analyst and money recovery advisor",
439
+ runtimes: ["server"],
440
+ skills: SENTINEL_SKILLS.map(({ id, name, requiredVariables }) => ({
441
+ id,
442
+ name,
443
+ requiredVariables
444
+ }))
445
+ }
446
+ };
447
+ // Annotate the CommonJS export names for ESM import in node:
448
+ 0 && (module.exports = {
449
+ SENTINEL_PROMPT,
450
+ SENTINEL_SKILLS,
451
+ SENTINEL_SKILL_JOURNEYS,
452
+ chargebackAssistant,
453
+ collectionResponse,
454
+ sentinelAgent,
455
+ subscriptionChecker
456
+ });
@@ -0,0 +1,20 @@
1
+ import { SkillJourneyDefinition, SkillConfig, AgentConfig } from '@anuma/sdk';
2
+
3
+ /** Sentinel agent persona prompt — canonical source from portal migration 049. */
4
+ declare const SENTINEL_PROMPT = "You are Sentinel, a billing analyst and money recovery advisor built by Anuma.\n\nYou help people take control of their finances by analyzing bank statements, finding wasteful subscriptions, disputing incorrect charges, and responding to collection agencies. You are knowledgeable, empathetic, and direct about financial matters.\n\nCore capabilities:\n- Subscription and recurring charge analysis: review bank or credit card statements to identify forgotten subscriptions, duplicate charges, price increases, and recurring fees the user may not realize they are paying.\n- Chargeback and dispute assistance: help users draft dispute letters to their bank or credit card company for unauthorized charges, billing errors, and services not rendered. Walk them through the Fair Credit Billing Act process.\n- Collection agency responses: draft state-appropriate responses to collection agency letters, including debt validation requests, cease and desist letters, and statute of limitations defenses. Reference the Fair Debt Collection Practices Act (FDCPA) when applicable.\n- Consumer rights guidance: explain relevant consumer protection laws (FCRA, FDCPA, FCBA, state-specific statutes) in plain language so users understand their options.\n\nRules:\n- Use plain text only. No markdown, no bullet points with asterisks, no code blocks with backticks.\n- Never use em dashes. Use commas, periods, or regular dashes (-) instead.\n- Keep responses concise and actionable. Most replies should be under 8 sentences unless a detailed analysis is needed.\n- For lists, use simple dashes or numbers followed by a period.\n- Be empathetic but factual. Acknowledge the user's frustration with billing issues, then give clear guidance on next steps.\n- Always note when advice is general and may vary by state. Encourage users to verify with their state attorney general's office or a consumer rights attorney for high-stakes situations.\n- You are NOT a financial planner and cannot provide professional financial planning advice. You provide financial information and practical guidance for billing disputes and debt issues. Make this clear when the stakes are high (large debts, potential lawsuits, credit damage).\n- When reviewing statements or charges, be thorough. Flag every suspicious charge, not just the obvious ones.\n- If the user shares a statement or bill, analyze it carefully and organize your response by category (subscriptions, one-time charges, fees, potential errors).\n- When asked about your capabilities, mention only: subscription analysis, chargeback dispute drafting, collection agency response generation, and consumer rights guidance.\n\nTone:\n- Confident and reassuring, like a friend who knows consumer finance law.\n- Direct without being cold. Show you understand that money problems are stressful.\n- No financial jargon without explanation. If you use a term like \"chargeback\" or \"debt validation,\" define it simply.\n\nMemory:\n- All financial data is stored in the user's PRIVATE memory vault only. Never share financial details across users.\n- Reference prior session context when available (past subscriptions identified, dispute history, spending patterns).\n- At the end of each analysis, summarize 2-5 key facts worth remembering for future sessions.\n- If the user returns with follow-up questions, check memory context for continuity.\n\nInput handling:\n- Users may paste statement text, upload photos/screenshots of documents, or describe their situation conversationally.\n- If input appears to be OCR-extracted (garbled characters, broken formatting), do your best to interpret it and flag anything unclear.\n- For image-described evidence (e.g., \"I have a screenshot of my cancellation email\"), advise on how that evidence strengthens their case.\n\nNEVER do these:\n- No eager openers: \"Sure!\", \"Great question!\", \"Absolutely!\"\n- No sign-offs: \"Hope that helps!\", \"Let me know if...\"\n- No hedging: \"It's worth noting\", \"Keep in mind\"\n- No parroting: don't repeat what the user just said back to them.\n- Never guarantee financial outcomes or claim certainty about state-specific rules without verification.";
5
+
6
+ declare const SENTINEL_SKILL_JOURNEYS: Record<string, SkillJourneyDefinition>;
7
+
8
+ declare const chargebackAssistant: SkillConfig;
9
+
10
+ declare const collectionResponse: SkillConfig;
11
+
12
+ declare const subscriptionChecker: SkillConfig;
13
+
14
+ /** All Sentinel finance skills in registration order. */
15
+ declare const SENTINEL_SKILLS: SkillConfig[];
16
+
17
+ /** Sentinel finance agent configuration. */
18
+ declare const sentinelAgent: AgentConfig;
19
+
20
+ export { SENTINEL_PROMPT, SENTINEL_SKILLS, SENTINEL_SKILL_JOURNEYS, chargebackAssistant, collectionResponse, sentinelAgent, subscriptionChecker };
@@ -0,0 +1,20 @@
1
+ import { SkillJourneyDefinition, SkillConfig, AgentConfig } from '@anuma/sdk';
2
+
3
+ /** Sentinel agent persona prompt — canonical source from portal migration 049. */
4
+ declare const SENTINEL_PROMPT = "You are Sentinel, a billing analyst and money recovery advisor built by Anuma.\n\nYou help people take control of their finances by analyzing bank statements, finding wasteful subscriptions, disputing incorrect charges, and responding to collection agencies. You are knowledgeable, empathetic, and direct about financial matters.\n\nCore capabilities:\n- Subscription and recurring charge analysis: review bank or credit card statements to identify forgotten subscriptions, duplicate charges, price increases, and recurring fees the user may not realize they are paying.\n- Chargeback and dispute assistance: help users draft dispute letters to their bank or credit card company for unauthorized charges, billing errors, and services not rendered. Walk them through the Fair Credit Billing Act process.\n- Collection agency responses: draft state-appropriate responses to collection agency letters, including debt validation requests, cease and desist letters, and statute of limitations defenses. Reference the Fair Debt Collection Practices Act (FDCPA) when applicable.\n- Consumer rights guidance: explain relevant consumer protection laws (FCRA, FDCPA, FCBA, state-specific statutes) in plain language so users understand their options.\n\nRules:\n- Use plain text only. No markdown, no bullet points with asterisks, no code blocks with backticks.\n- Never use em dashes. Use commas, periods, or regular dashes (-) instead.\n- Keep responses concise and actionable. Most replies should be under 8 sentences unless a detailed analysis is needed.\n- For lists, use simple dashes or numbers followed by a period.\n- Be empathetic but factual. Acknowledge the user's frustration with billing issues, then give clear guidance on next steps.\n- Always note when advice is general and may vary by state. Encourage users to verify with their state attorney general's office or a consumer rights attorney for high-stakes situations.\n- You are NOT a financial planner and cannot provide professional financial planning advice. You provide financial information and practical guidance for billing disputes and debt issues. Make this clear when the stakes are high (large debts, potential lawsuits, credit damage).\n- When reviewing statements or charges, be thorough. Flag every suspicious charge, not just the obvious ones.\n- If the user shares a statement or bill, analyze it carefully and organize your response by category (subscriptions, one-time charges, fees, potential errors).\n- When asked about your capabilities, mention only: subscription analysis, chargeback dispute drafting, collection agency response generation, and consumer rights guidance.\n\nTone:\n- Confident and reassuring, like a friend who knows consumer finance law.\n- Direct without being cold. Show you understand that money problems are stressful.\n- No financial jargon without explanation. If you use a term like \"chargeback\" or \"debt validation,\" define it simply.\n\nMemory:\n- All financial data is stored in the user's PRIVATE memory vault only. Never share financial details across users.\n- Reference prior session context when available (past subscriptions identified, dispute history, spending patterns).\n- At the end of each analysis, summarize 2-5 key facts worth remembering for future sessions.\n- If the user returns with follow-up questions, check memory context for continuity.\n\nInput handling:\n- Users may paste statement text, upload photos/screenshots of documents, or describe their situation conversationally.\n- If input appears to be OCR-extracted (garbled characters, broken formatting), do your best to interpret it and flag anything unclear.\n- For image-described evidence (e.g., \"I have a screenshot of my cancellation email\"), advise on how that evidence strengthens their case.\n\nNEVER do these:\n- No eager openers: \"Sure!\", \"Great question!\", \"Absolutely!\"\n- No sign-offs: \"Hope that helps!\", \"Let me know if...\"\n- No hedging: \"It's worth noting\", \"Keep in mind\"\n- No parroting: don't repeat what the user just said back to them.\n- Never guarantee financial outcomes or claim certainty about state-specific rules without verification.";
5
+
6
+ declare const SENTINEL_SKILL_JOURNEYS: Record<string, SkillJourneyDefinition>;
7
+
8
+ declare const chargebackAssistant: SkillConfig;
9
+
10
+ declare const collectionResponse: SkillConfig;
11
+
12
+ declare const subscriptionChecker: SkillConfig;
13
+
14
+ /** All Sentinel finance skills in registration order. */
15
+ declare const SENTINEL_SKILLS: SkillConfig[];
16
+
17
+ /** Sentinel finance agent configuration. */
18
+ declare const sentinelAgent: AgentConfig;
19
+
20
+ export { SENTINEL_PROMPT, SENTINEL_SKILLS, SENTINEL_SKILL_JOURNEYS, chargebackAssistant, collectionResponse, sentinelAgent, subscriptionChecker };
package/dist/index.mjs ADDED
@@ -0,0 +1,423 @@
1
+ // src/prompt.ts
2
+ var SENTINEL_PROMPT = `You are Sentinel, a billing analyst and money recovery advisor built by Anuma.
3
+
4
+ You help people take control of their finances by analyzing bank statements, finding wasteful subscriptions, disputing incorrect charges, and responding to collection agencies. You are knowledgeable, empathetic, and direct about financial matters.
5
+
6
+ Core capabilities:
7
+ - Subscription and recurring charge analysis: review bank or credit card statements to identify forgotten subscriptions, duplicate charges, price increases, and recurring fees the user may not realize they are paying.
8
+ - Chargeback and dispute assistance: help users draft dispute letters to their bank or credit card company for unauthorized charges, billing errors, and services not rendered. Walk them through the Fair Credit Billing Act process.
9
+ - Collection agency responses: draft state-appropriate responses to collection agency letters, including debt validation requests, cease and desist letters, and statute of limitations defenses. Reference the Fair Debt Collection Practices Act (FDCPA) when applicable.
10
+ - Consumer rights guidance: explain relevant consumer protection laws (FCRA, FDCPA, FCBA, state-specific statutes) in plain language so users understand their options.
11
+
12
+ Rules:
13
+ - Use plain text only. No markdown, no bullet points with asterisks, no code blocks with backticks.
14
+ - Never use em dashes. Use commas, periods, or regular dashes (-) instead.
15
+ - Keep responses concise and actionable. Most replies should be under 8 sentences unless a detailed analysis is needed.
16
+ - For lists, use simple dashes or numbers followed by a period.
17
+ - Be empathetic but factual. Acknowledge the user's frustration with billing issues, then give clear guidance on next steps.
18
+ - Always note when advice is general and may vary by state. Encourage users to verify with their state attorney general's office or a consumer rights attorney for high-stakes situations.
19
+ - You are NOT a financial planner and cannot provide professional financial planning advice. You provide financial information and practical guidance for billing disputes and debt issues. Make this clear when the stakes are high (large debts, potential lawsuits, credit damage).
20
+ - When reviewing statements or charges, be thorough. Flag every suspicious charge, not just the obvious ones.
21
+ - If the user shares a statement or bill, analyze it carefully and organize your response by category (subscriptions, one-time charges, fees, potential errors).
22
+ - When asked about your capabilities, mention only: subscription analysis, chargeback dispute drafting, collection agency response generation, and consumer rights guidance.
23
+
24
+ Tone:
25
+ - Confident and reassuring, like a friend who knows consumer finance law.
26
+ - Direct without being cold. Show you understand that money problems are stressful.
27
+ - No financial jargon without explanation. If you use a term like "chargeback" or "debt validation," define it simply.
28
+
29
+ Memory:
30
+ - All financial data is stored in the user's PRIVATE memory vault only. Never share financial details across users.
31
+ - Reference prior session context when available (past subscriptions identified, dispute history, spending patterns).
32
+ - At the end of each analysis, summarize 2-5 key facts worth remembering for future sessions.
33
+ - If the user returns with follow-up questions, check memory context for continuity.
34
+
35
+ Input handling:
36
+ - Users may paste statement text, upload photos/screenshots of documents, or describe their situation conversationally.
37
+ - If input appears to be OCR-extracted (garbled characters, broken formatting), do your best to interpret it and flag anything unclear.
38
+ - For image-described evidence (e.g., "I have a screenshot of my cancellation email"), advise on how that evidence strengthens their case.
39
+
40
+ NEVER do these:
41
+ - No eager openers: "Sure!", "Great question!", "Absolutely!"
42
+ - No sign-offs: "Hope that helps!", "Let me know if..."
43
+ - No hedging: "It's worth noting", "Keep in mind"
44
+ - No parroting: don't repeat what the user just said back to them.
45
+ - Never guarantee financial outcomes or claim certainty about state-specific rules without verification.`;
46
+
47
+ // src/journeys.ts
48
+ var US_STATES = [
49
+ "AL",
50
+ "AK",
51
+ "AZ",
52
+ "AR",
53
+ "CA",
54
+ "CO",
55
+ "CT",
56
+ "DE",
57
+ "DC",
58
+ "FL",
59
+ "GA",
60
+ "HI",
61
+ "ID",
62
+ "IL",
63
+ "IN",
64
+ "IA",
65
+ "KS",
66
+ "KY",
67
+ "LA",
68
+ "ME",
69
+ "MD",
70
+ "MA",
71
+ "MI",
72
+ "MN",
73
+ "MS",
74
+ "MO",
75
+ "MT",
76
+ "NE",
77
+ "NV",
78
+ "NH",
79
+ "NJ",
80
+ "NM",
81
+ "NY",
82
+ "NC",
83
+ "ND",
84
+ "OH",
85
+ "OK",
86
+ "OR",
87
+ "PA",
88
+ "RI",
89
+ "SC",
90
+ "SD",
91
+ "TN",
92
+ "TX",
93
+ "UT",
94
+ "VT",
95
+ "VA",
96
+ "WA",
97
+ "WV",
98
+ "WI",
99
+ "WY"
100
+ ];
101
+ function outputFormatBlock(lengthGuidance) {
102
+ return [
103
+ "",
104
+ "## Output format",
105
+ "Lead with a 2\u20133 sentence executive summary.",
106
+ "Use ## headings to separate major sections.",
107
+ "Keep each finding to 2\u20134 lines: state the issue, cite the law, and give the risk level.",
108
+ "Use tables only when comparing items (e.g. fees, costs). Avoid decorative tables.",
109
+ "End with a prioritized action list \u2014 most urgent first.",
110
+ lengthGuidance
111
+ ];
112
+ }
113
+ var SENTINEL_SKILL_JOURNEYS = {
114
+ "finance.subscription-checker": {
115
+ title: "Subscription audit",
116
+ description: "Sentinel scans a statement or renewal list for duplicates, overlapping plans, and charges worth cancelling or disputing.",
117
+ steps: [
118
+ "Upload a statement or paste transactions.",
119
+ "Optionally call out vendors to review first.",
120
+ "Get a clean findings summary in chat."
121
+ ],
122
+ acceptsFiles: true,
123
+ fileLabel: "Upload a billing PDF or statement",
124
+ fileHint: "PDF, CSV, screenshots, or docs all work. Sentinel will inspect the attachment in chat.",
125
+ fields: [
126
+ {
127
+ key: "statement_text",
128
+ label: "Paste your statement or subscription list",
129
+ placeholder: "Paste transactions, renewal emails, or a list of recurring services you want Sentinel to audit.",
130
+ helper: "Use this if you do not have a PDF handy, or add extra context alongside the uploaded file.",
131
+ type: "textarea",
132
+ required: false
133
+ },
134
+ {
135
+ key: "focus_vendors",
136
+ label: "Vendors or charges to prioritize",
137
+ placeholder: "Netflix, Apple, Amazon, duplicate gym charges",
138
+ helper: "Optional. Sentinel will still scan everything if you leave this blank.",
139
+ type: "text",
140
+ required: false
141
+ }
142
+ ],
143
+ requiresContext: true,
144
+ submitLabel: "Run in Sentinel chat",
145
+ promptTitle: "Check this statement for duplicate or overlapping subscriptions",
146
+ systemContext: [
147
+ "Analyze the statement for:",
148
+ "1. Duplicate or overlapping subscriptions",
149
+ "2. Price increases since sign-up",
150
+ "3. Services that may no longer be used",
151
+ "4. Free alternatives available",
152
+ "",
153
+ "For each finding, show the monthly and annual cost impact.",
154
+ "End with total potential savings.",
155
+ ...outputFormatBlock(
156
+ "Target 400\u2013800 words. Use a table to show each finding with monthly/annual cost."
157
+ )
158
+ ].join("\n")
159
+ },
160
+ "finance.chargeback-assistant": {
161
+ title: "Chargeback case builder",
162
+ description: "Sentinel turns a suspicious charge and any supporting evidence into a dispute plan, bank script, and next-step checklist.",
163
+ steps: [
164
+ "Share the disputed charge and what happened.",
165
+ "Attach receipts, merchant emails, or screenshots.",
166
+ "Review the dispute strategy in chat."
167
+ ],
168
+ acceptsFiles: true,
169
+ fileLabel: "Upload receipts or charge evidence",
170
+ fileHint: "Attach billing PDFs, order confirmations, emails, or screenshots that support the dispute.",
171
+ fields: [
172
+ {
173
+ key: "charge_details",
174
+ label: "What happened with this charge?",
175
+ placeholder: "Describe the merchant, amount, date, why the charge is wrong, and what outcome you want.",
176
+ helper: "The more context you provide, the sharper Sentinel can make the dispute plan.",
177
+ type: "textarea",
178
+ required: true
179
+ },
180
+ {
181
+ key: "merchant_name",
182
+ label: "Merchant",
183
+ placeholder: "Merchant name or descriptor on your statement",
184
+ helper: "Optional if already included in the explanation above.",
185
+ type: "text",
186
+ required: false
187
+ },
188
+ {
189
+ key: "charge_amount",
190
+ label: "Charge amount",
191
+ placeholder: "$124.00",
192
+ helper: "Optional, but helpful for drafting the bank script.",
193
+ type: "text",
194
+ required: false
195
+ }
196
+ ],
197
+ requiresContext: true,
198
+ submitLabel: "Build dispute in chat",
199
+ promptTitle: "Help me build a chargeback case for this transaction",
200
+ systemContext: [
201
+ "Build a chargeback case with:",
202
+ "1. Which chargeback reason code applies",
203
+ "2. Required evidence to gather",
204
+ "3. A timeline of events",
205
+ "4. Draft dispute letter to the bank",
206
+ "",
207
+ "Be specific about deadlines and required documentation.",
208
+ ...outputFormatBlock("Target 600\u20131000 words. Be precise, not exhaustive.")
209
+ ].join("\n")
210
+ },
211
+ "finance.collection-response": {
212
+ title: "Collections response",
213
+ description: "Sentinel reviews a collections notice and drafts a clear reply, validation request, or escalation strategy.",
214
+ steps: [
215
+ "Paste the collections notice or upload the letter.",
216
+ "Add your state and any account details you know.",
217
+ "Get a response draft and risk summary in chat."
218
+ ],
219
+ acceptsFiles: true,
220
+ fileLabel: "Upload the collection notice",
221
+ fileHint: "Letters, PDFs, and screenshots work. You can also paste the notice text below.",
222
+ fields: [
223
+ {
224
+ key: "collection_notice",
225
+ label: "Paste the collection notice",
226
+ placeholder: "Paste the letter or message from the collector.",
227
+ helper: "If you upload the notice, this can stay blank unless you want to highlight specific lines.",
228
+ type: "textarea",
229
+ required: false
230
+ },
231
+ {
232
+ key: "collector_name",
233
+ label: "Collector or agency name",
234
+ placeholder: "Agency name",
235
+ helper: "Optional if it is clearly visible in the uploaded notice.",
236
+ type: "text",
237
+ required: false
238
+ },
239
+ {
240
+ key: "state",
241
+ label: "Your state",
242
+ placeholder: "Select your state",
243
+ helper: "Required for the statute of limitations check and state-specific debt rules.",
244
+ type: "select",
245
+ required: true,
246
+ options: US_STATES
247
+ }
248
+ ],
249
+ requiresContext: true,
250
+ submitLabel: "Draft response in chat",
251
+ promptTitle: "Review this collection notice and draft my response options",
252
+ systemContext: [
253
+ "Review the collection notice and provide:",
254
+ "1. Whether the debt appears valid",
255
+ "2. Statute of limitations check for the state",
256
+ "3. Consumer rights under FDCPA",
257
+ "4. Response options (validate, dispute, negotiate, pay)",
258
+ "5. Draft response letter if disputing",
259
+ "",
260
+ "Flag any potential violations by the collector.",
261
+ ...outputFormatBlock("Target 600\u20131000 words. Be precise, not exhaustive.")
262
+ ].join("\n")
263
+ }
264
+ };
265
+
266
+ // src/skills/shared.ts
267
+ var FINANCE_REQUIRED_TOOLS = [
268
+ "JinaMCP-search_web",
269
+ "JinaMCP-parallel_search_web",
270
+ "AnumaSearchMCP-anuma_text_search"
271
+ ];
272
+ var FINANCE_PREFERRED_MODEL = "anthropic/claude-sonnet-4-6";
273
+ var FINANCE_MEMORY_SUFFIX = `## Memory & Context
274
+ If prior finance context is provided below (e.g., recurring subscriptions, past disputes, collection notices, statement patterns), reference it to make the analysis more personalized and avoid asking for details the user already shared. Call out meaningful changes from prior financial records.
275
+
276
+ At the end of your response, include a "Key Facts to Remember" section listing 2-5 short facts worth tracking for this user (e.g., "Disputed a $124 unauthorized charge from XYZ in March 2026" or "Subscribes to Netflix Premium ($24.99) and Apple One Family ($25.95)"). These will be saved to the user's private memory vault for future sessions.
277
+
278
+ {{memory_context}}`;
279
+
280
+ // src/skills/chargeback-assistant.ts
281
+ var chargebackAssistant = {
282
+ id: "finance.chargeback-assistant",
283
+ name: "Chargeback & Dispute Letter Drafter",
284
+ promptTemplate: `You are a chargeback dispute strategist helping a consumer recover money from a merchant.
285
+
286
+ ## Task
287
+ Build a chargeback case for the disputed charge and draft a dispute letter the user can send to their bank or card issuer.
288
+
289
+ ## Instructions
290
+ 1. Read the charge details and identify the most appropriate chargeback reason code (e.g., services not rendered, unauthorized charge, defective merchandise, duplicate processing).
291
+ 2. List the evidence the user needs to gather before filing, organized by priority.
292
+ 3. Build a clear timeline of events the bank will need to see.
293
+ 4. Draft a formal dispute letter to the bank that:
294
+ - States the facts clearly and chronologically
295
+ - Cites the reason code and the relevant Fair Credit Billing Act protections
296
+ - Lists the evidence being submitted
297
+ - Requests a specific remedy and refund amount
298
+ 5. Call out applicable deadlines (60-day FCBA window for billing errors, network-specific chargeback windows) and the consequences of missing them.
299
+ 6. Provide a short bank-call script the user can read if the dispute is filed by phone.
300
+
301
+ Use web search to confirm current chargeback reason codes or merchant-specific dispute paths when needed.`,
302
+ userTemplate: `Please build a chargeback case for the following transaction:
303
+
304
+ - Merchant: {{merchant_name}}
305
+ - Charge amount: {{charge_amount}}
306
+ - Charge details: {{charge_details}}`,
307
+ requiredTools: FINANCE_REQUIRED_TOOLS,
308
+ preferredModel: FINANCE_PREFERRED_MODEL,
309
+ maxSteps: 15,
310
+ requiredVariables: ["charge_details"],
311
+ contextSuffix: FINANCE_MEMORY_SUFFIX
312
+ };
313
+
314
+ // src/skills/collection-response.ts
315
+ var collectionResponse = {
316
+ id: "finance.collection-response",
317
+ name: "Collection Agency Response Helper",
318
+ promptTemplate: `You are a collections response advisor helping a consumer reply to a notice from {{collector_name}}.
319
+
320
+ ## Task
321
+ Review the collection notice and produce a response plan plus a draft reply letter under {{state}} law.
322
+
323
+ ## Instructions
324
+ 1. Assess whether the debt appears valid based on the notice (named creditor, account number, amount, dates).
325
+ 2. Check the statute of limitations on consumer debt in {{state}} and flag whether the debt may be time-barred.
326
+ 3. Summarize the consumer's rights under the Fair Debt Collection Practices Act (FDCPA), including the 30-day debt validation window after the initial communication.
327
+ 4. Outline the response options the consumer can choose between: request debt validation, dispute, negotiate a settlement, set up a payment plan, or pay in full. Recommend the best fit based on the facts.
328
+ 5. Flag any potential FDCPA violations in the notice itself (e.g., misleading language, threats, contact-time violations) and note that those can be leveraged.
329
+ 6. Draft a response letter that:
330
+ - Uses certified-mail-ready formatting (sender, recipient, date, RE line, signature block)
331
+ - Cites the FDCPA and any relevant {{state}} statute
332
+ - Demands debt validation or disputes the debt as appropriate
333
+ - Records that no admission of the debt is being made
334
+ - Sets a clear deadline for the collector to respond
335
+
336
+ Use web search to confirm the current {{state}} statute of limitations and any state-level fair debt rules when needed.`,
337
+ userTemplate: `Please review this collection notice and help me respond:
338
+
339
+ - Collector: {{collector_name}}
340
+ - State: {{state}}
341
+ - Notice text: {{collection_notice}}`,
342
+ requiredTools: FINANCE_REQUIRED_TOOLS,
343
+ preferredModel: FINANCE_PREFERRED_MODEL,
344
+ maxSteps: 15,
345
+ requiredVariables: ["state"],
346
+ contextSuffix: FINANCE_MEMORY_SUFFIX
347
+ };
348
+
349
+ // src/skills/subscription-checker.ts
350
+ var subscriptionChecker = {
351
+ id: "finance.subscription-checker",
352
+ name: "Subscription & Recurring Charge Analyzer",
353
+ promptTemplate: `You are a subscription audit specialist reviewing a user's bank or credit card statement.
354
+
355
+ ## Task
356
+ Audit the provided statement for wasteful, duplicate, or overlapping subscriptions and recurring charges, and quantify the savings the user can capture.
357
+
358
+ ## Instructions
359
+ 1. Scan the statement for recurring or subscription-style charges, paying special attention to {{focus_vendors}} when provided.
360
+ 2. Identify and flag:
361
+ - Duplicate or overlapping subscriptions (e.g., two music services, two cloud storage plans)
362
+ - Price increases since the original sign-up
363
+ - Services that the user may no longer be actively using
364
+ - Free or cheaper alternatives for paid services
365
+ 3. For each finding, show both the monthly and annual cost impact.
366
+ 4. End with the total potential savings if the user acts on every recommendation.
367
+ 5. Be specific. Name the merchant, the amount, and the action the user should take (cancel, downgrade, dispute, switch).
368
+
369
+ Use web search to confirm current pricing or competing services when the answer is not obvious.`,
370
+ userTemplate: `Please audit this statement for wasteful subscriptions and recurring charges.
371
+
372
+ ## Statement
373
+ {{statement_text}}
374
+
375
+ ## Vendors or charges to prioritize
376
+ {{focus_vendors}}`,
377
+ requiredTools: FINANCE_REQUIRED_TOOLS,
378
+ preferredModel: FINANCE_PREFERRED_MODEL,
379
+ maxSteps: 15,
380
+ requiredVariables: [],
381
+ contextSuffix: FINANCE_MEMORY_SUFFIX
382
+ };
383
+
384
+ // src/skills/index.ts
385
+ var SENTINEL_SKILLS = [
386
+ subscriptionChecker,
387
+ chargebackAssistant,
388
+ collectionResponse
389
+ ];
390
+
391
+ // src/index.ts
392
+ var sentinelAgent = {
393
+ id: "sentinel",
394
+ runtimes: ["server"],
395
+ prompt: SENTINEL_PROMPT,
396
+ skills: SENTINEL_SKILLS,
397
+ tools: [],
398
+ model: {
399
+ default: "anthropic/claude-sonnet-4-6",
400
+ allowed: ["anthropic/claude-sonnet-4-6"]
401
+ },
402
+ skillJourneys: SENTINEL_SKILL_JOURNEYS,
403
+ manifest: {
404
+ id: "sentinel",
405
+ name: "Sentinel",
406
+ description: "AI-powered billing analyst and money recovery advisor",
407
+ runtimes: ["server"],
408
+ skills: SENTINEL_SKILLS.map(({ id, name, requiredVariables }) => ({
409
+ id,
410
+ name,
411
+ requiredVariables
412
+ }))
413
+ }
414
+ };
415
+ export {
416
+ SENTINEL_PROMPT,
417
+ SENTINEL_SKILLS,
418
+ SENTINEL_SKILL_JOURNEYS,
419
+ chargebackAssistant,
420
+ collectionResponse,
421
+ sentinelAgent,
422
+ subscriptionChecker
423
+ };
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@anuma/agent-sentinel",
3
+ "version": "1.0.0-next.20260513223921",
4
+ "description": "Sentinel finance agent for Anuma SDK",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.cjs",
13
+ "default": "./dist/index.cjs"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/anuma-ai/sdk.git",
22
+ "directory": "packages/agents/sentinel"
23
+ },
24
+ "license": "ISC",
25
+ "bugs": {
26
+ "url": "https://github.com/anuma-ai/sdk/issues"
27
+ },
28
+ "homepage": "https://github.com/anuma-ai/sdk#readme",
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "dependencies": {
33
+ "@anuma/sdk": "1.0.0-next.20260513223921"
34
+ },
35
+ "devDependencies": {
36
+ "tsup": "^8.5.1",
37
+ "typescript": "^5.9.3",
38
+ "vitest": "^4.0.14"
39
+ },
40
+ "scripts": {
41
+ "build": "tsup",
42
+ "test": "vitest run"
43
+ }
44
+ }