plainstamp 0.0.1

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 (58) hide show
  1. package/AI-DISCLOSURE.md +39 -0
  2. package/CHANGELOG.md +57 -0
  3. package/LICENSE +21 -0
  4. package/README.md +179 -0
  5. package/dist/cli.d.ts +3 -0
  6. package/dist/cli.d.ts.map +1 -0
  7. package/dist/cli.js +147 -0
  8. package/dist/cli.js.map +1 -0
  9. package/dist/coverage.d.ts +48 -0
  10. package/dist/coverage.d.ts.map +1 -0
  11. package/dist/coverage.js +96 -0
  12. package/dist/coverage.js.map +1 -0
  13. package/dist/index.d.ts +27 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +37 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/lookup.d.ts +42 -0
  18. package/dist/lookup.d.ts.map +1 -0
  19. package/dist/lookup.js +170 -0
  20. package/dist/lookup.js.map +1 -0
  21. package/dist/mcp-server.d.ts +3 -0
  22. package/dist/mcp-server.d.ts.map +1 -0
  23. package/dist/mcp-server.js +199 -0
  24. package/dist/mcp-server.js.map +1 -0
  25. package/dist/rules-loader.d.ts +10 -0
  26. package/dist/rules-loader.d.ts.map +1 -0
  27. package/dist/rules-loader.js +23 -0
  28. package/dist/rules-loader.js.map +1 -0
  29. package/dist/schema.d.ts +526 -0
  30. package/dist/schema.d.ts.map +1 -0
  31. package/dist/schema.js +96 -0
  32. package/dist/schema.js.map +1 -0
  33. package/dist/watcher/cli.d.ts +3 -0
  34. package/dist/watcher/cli.d.ts.map +1 -0
  35. package/dist/watcher/cli.js +47 -0
  36. package/dist/watcher/cli.js.map +1 -0
  37. package/dist/watcher/index.d.ts +23 -0
  38. package/dist/watcher/index.d.ts.map +1 -0
  39. package/dist/watcher/index.js +71 -0
  40. package/dist/watcher/index.js.map +1 -0
  41. package/dist/watcher/sources/federal-register.d.ts +13 -0
  42. package/dist/watcher/sources/federal-register.d.ts.map +1 -0
  43. package/dist/watcher/sources/federal-register.js +44 -0
  44. package/dist/watcher/sources/federal-register.js.map +1 -0
  45. package/dist/watcher/sources/url-monitor.d.ts +33 -0
  46. package/dist/watcher/sources/url-monitor.d.ts.map +1 -0
  47. package/dist/watcher/sources/url-monitor.js +67 -0
  48. package/dist/watcher/sources/url-monitor.js.map +1 -0
  49. package/dist/watcher/state-store.d.ts +9 -0
  50. package/dist/watcher/state-store.d.ts.map +1 -0
  51. package/dist/watcher/state-store.js +23 -0
  52. package/dist/watcher/state-store.js.map +1 -0
  53. package/dist/watcher/types.d.ts +59 -0
  54. package/dist/watcher/types.d.ts.map +1 -0
  55. package/dist/watcher/types.js +14 -0
  56. package/dist/watcher/types.js.map +1 -0
  57. package/package.json +60 -0
  58. package/rules/seed.json +620 -0
@@ -0,0 +1,526 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Disclosure rule schema. Each rule is a structured representation of a real,
4
+ * cited regulatory obligation about AI disclosure. Rules are sourced from
5
+ * primary regulator-published material; never from third-party paraphrase.
6
+ *
7
+ * Citation discipline: every rule must carry the regulator's own published
8
+ * URL plus the date the rule's text was last verified. The whole product
9
+ * trades on these citations being correct.
10
+ */
11
+ export declare const JurisdictionId: z.ZodString;
12
+ export declare const Channel: z.ZodEnum<["live-chat", "voice", "video-avatar", "email-transactional", "email-marketing", "social-post", "ai-generated-content", "ai-generated-image", "ai-generated-video", "ai-generated-audio", "review-or-testimonial", "about-page", "terms-of-service", "privacy-policy"]>;
13
+ export declare const UseCase: z.ZodEnum<["b2c-customer-support", "b2b-customer-support", "b2c-marketing", "b2b-marketing", "b2c-sales", "b2b-sales", "civic-or-electoral", "healthcare", "legal-services", "financial-services", "employment-decisions", "general"]>;
14
+ export declare const Severity: z.ZodEnum<["mandatory", "recommended", "best-practice"]>;
15
+ export declare const DisclosureElement: z.ZodObject<{
16
+ id: z.ZodString;
17
+ description: z.ZodString;
18
+ required: z.ZodBoolean;
19
+ example: z.ZodOptional<z.ZodString>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ id: string;
22
+ description: string;
23
+ required: boolean;
24
+ example?: string | undefined;
25
+ }, {
26
+ id: string;
27
+ description: string;
28
+ required: boolean;
29
+ example?: string | undefined;
30
+ }>;
31
+ export declare const DisclosureRule: z.ZodObject<{
32
+ id: z.ZodString;
33
+ jurisdiction: z.ZodString;
34
+ channels: z.ZodArray<z.ZodEnum<["live-chat", "voice", "video-avatar", "email-transactional", "email-marketing", "social-post", "ai-generated-content", "ai-generated-image", "ai-generated-video", "ai-generated-audio", "review-or-testimonial", "about-page", "terms-of-service", "privacy-policy"]>, "many">;
35
+ use_cases: z.ZodArray<z.ZodEnum<["b2c-customer-support", "b2b-customer-support", "b2c-marketing", "b2b-marketing", "b2c-sales", "b2b-sales", "civic-or-electoral", "healthcare", "legal-services", "financial-services", "employment-decisions", "general"]>, "many">;
36
+ severity: z.ZodEnum<["mandatory", "recommended", "best-practice"]>;
37
+ short_title: z.ZodString;
38
+ summary: z.ZodString;
39
+ required_elements: z.ZodArray<z.ZodObject<{
40
+ id: z.ZodString;
41
+ description: z.ZodString;
42
+ required: z.ZodBoolean;
43
+ example: z.ZodOptional<z.ZodString>;
44
+ }, "strip", z.ZodTypeAny, {
45
+ id: string;
46
+ description: string;
47
+ required: boolean;
48
+ example?: string | undefined;
49
+ }, {
50
+ id: string;
51
+ description: string;
52
+ required: boolean;
53
+ example?: string | undefined;
54
+ }>, "many">;
55
+ citation: z.ZodObject<{
56
+ statute: z.ZodString;
57
+ section: z.ZodOptional<z.ZodString>;
58
+ source_url: z.ZodString;
59
+ publisher: z.ZodString;
60
+ }, "strip", z.ZodTypeAny, {
61
+ statute: string;
62
+ source_url: string;
63
+ publisher: string;
64
+ section?: string | undefined;
65
+ }, {
66
+ statute: string;
67
+ source_url: string;
68
+ publisher: string;
69
+ section?: string | undefined;
70
+ }>;
71
+ effective_date: z.ZodString;
72
+ last_verified: z.ZodString;
73
+ template: z.ZodObject<{
74
+ plain: z.ZodString;
75
+ formal: z.ZodOptional<z.ZodString>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ plain: string;
78
+ formal?: string | undefined;
79
+ }, {
80
+ plain: string;
81
+ formal?: string | undefined;
82
+ }>;
83
+ notes: z.ZodOptional<z.ZodString>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ id: string;
86
+ jurisdiction: string;
87
+ channels: ("live-chat" | "voice" | "video-avatar" | "email-transactional" | "email-marketing" | "social-post" | "ai-generated-content" | "ai-generated-image" | "ai-generated-video" | "ai-generated-audio" | "review-or-testimonial" | "about-page" | "terms-of-service" | "privacy-policy")[];
88
+ use_cases: ("b2c-customer-support" | "b2b-customer-support" | "b2c-marketing" | "b2b-marketing" | "b2c-sales" | "b2b-sales" | "civic-or-electoral" | "healthcare" | "legal-services" | "financial-services" | "employment-decisions" | "general")[];
89
+ severity: "mandatory" | "recommended" | "best-practice";
90
+ short_title: string;
91
+ summary: string;
92
+ required_elements: {
93
+ id: string;
94
+ description: string;
95
+ required: boolean;
96
+ example?: string | undefined;
97
+ }[];
98
+ citation: {
99
+ statute: string;
100
+ source_url: string;
101
+ publisher: string;
102
+ section?: string | undefined;
103
+ };
104
+ effective_date: string;
105
+ last_verified: string;
106
+ template: {
107
+ plain: string;
108
+ formal?: string | undefined;
109
+ };
110
+ notes?: string | undefined;
111
+ }, {
112
+ id: string;
113
+ jurisdiction: string;
114
+ channels: ("live-chat" | "voice" | "video-avatar" | "email-transactional" | "email-marketing" | "social-post" | "ai-generated-content" | "ai-generated-image" | "ai-generated-video" | "ai-generated-audio" | "review-or-testimonial" | "about-page" | "terms-of-service" | "privacy-policy")[];
115
+ use_cases: ("b2c-customer-support" | "b2b-customer-support" | "b2c-marketing" | "b2b-marketing" | "b2c-sales" | "b2b-sales" | "civic-or-electoral" | "healthcare" | "legal-services" | "financial-services" | "employment-decisions" | "general")[];
116
+ severity: "mandatory" | "recommended" | "best-practice";
117
+ short_title: string;
118
+ summary: string;
119
+ required_elements: {
120
+ id: string;
121
+ description: string;
122
+ required: boolean;
123
+ example?: string | undefined;
124
+ }[];
125
+ citation: {
126
+ statute: string;
127
+ source_url: string;
128
+ publisher: string;
129
+ section?: string | undefined;
130
+ };
131
+ effective_date: string;
132
+ last_verified: string;
133
+ template: {
134
+ plain: string;
135
+ formal?: string | undefined;
136
+ };
137
+ notes?: string | undefined;
138
+ }>;
139
+ export declare const RuleSet: z.ZodObject<{
140
+ schema_version: z.ZodLiteral<1>;
141
+ generated_at: z.ZodString;
142
+ rules: z.ZodArray<z.ZodObject<{
143
+ id: z.ZodString;
144
+ jurisdiction: z.ZodString;
145
+ channels: z.ZodArray<z.ZodEnum<["live-chat", "voice", "video-avatar", "email-transactional", "email-marketing", "social-post", "ai-generated-content", "ai-generated-image", "ai-generated-video", "ai-generated-audio", "review-or-testimonial", "about-page", "terms-of-service", "privacy-policy"]>, "many">;
146
+ use_cases: z.ZodArray<z.ZodEnum<["b2c-customer-support", "b2b-customer-support", "b2c-marketing", "b2b-marketing", "b2c-sales", "b2b-sales", "civic-or-electoral", "healthcare", "legal-services", "financial-services", "employment-decisions", "general"]>, "many">;
147
+ severity: z.ZodEnum<["mandatory", "recommended", "best-practice"]>;
148
+ short_title: z.ZodString;
149
+ summary: z.ZodString;
150
+ required_elements: z.ZodArray<z.ZodObject<{
151
+ id: z.ZodString;
152
+ description: z.ZodString;
153
+ required: z.ZodBoolean;
154
+ example: z.ZodOptional<z.ZodString>;
155
+ }, "strip", z.ZodTypeAny, {
156
+ id: string;
157
+ description: string;
158
+ required: boolean;
159
+ example?: string | undefined;
160
+ }, {
161
+ id: string;
162
+ description: string;
163
+ required: boolean;
164
+ example?: string | undefined;
165
+ }>, "many">;
166
+ citation: z.ZodObject<{
167
+ statute: z.ZodString;
168
+ section: z.ZodOptional<z.ZodString>;
169
+ source_url: z.ZodString;
170
+ publisher: z.ZodString;
171
+ }, "strip", z.ZodTypeAny, {
172
+ statute: string;
173
+ source_url: string;
174
+ publisher: string;
175
+ section?: string | undefined;
176
+ }, {
177
+ statute: string;
178
+ source_url: string;
179
+ publisher: string;
180
+ section?: string | undefined;
181
+ }>;
182
+ effective_date: z.ZodString;
183
+ last_verified: z.ZodString;
184
+ template: z.ZodObject<{
185
+ plain: z.ZodString;
186
+ formal: z.ZodOptional<z.ZodString>;
187
+ }, "strip", z.ZodTypeAny, {
188
+ plain: string;
189
+ formal?: string | undefined;
190
+ }, {
191
+ plain: string;
192
+ formal?: string | undefined;
193
+ }>;
194
+ notes: z.ZodOptional<z.ZodString>;
195
+ }, "strip", z.ZodTypeAny, {
196
+ id: string;
197
+ jurisdiction: string;
198
+ channels: ("live-chat" | "voice" | "video-avatar" | "email-transactional" | "email-marketing" | "social-post" | "ai-generated-content" | "ai-generated-image" | "ai-generated-video" | "ai-generated-audio" | "review-or-testimonial" | "about-page" | "terms-of-service" | "privacy-policy")[];
199
+ use_cases: ("b2c-customer-support" | "b2b-customer-support" | "b2c-marketing" | "b2b-marketing" | "b2c-sales" | "b2b-sales" | "civic-or-electoral" | "healthcare" | "legal-services" | "financial-services" | "employment-decisions" | "general")[];
200
+ severity: "mandatory" | "recommended" | "best-practice";
201
+ short_title: string;
202
+ summary: string;
203
+ required_elements: {
204
+ id: string;
205
+ description: string;
206
+ required: boolean;
207
+ example?: string | undefined;
208
+ }[];
209
+ citation: {
210
+ statute: string;
211
+ source_url: string;
212
+ publisher: string;
213
+ section?: string | undefined;
214
+ };
215
+ effective_date: string;
216
+ last_verified: string;
217
+ template: {
218
+ plain: string;
219
+ formal?: string | undefined;
220
+ };
221
+ notes?: string | undefined;
222
+ }, {
223
+ id: string;
224
+ jurisdiction: string;
225
+ channels: ("live-chat" | "voice" | "video-avatar" | "email-transactional" | "email-marketing" | "social-post" | "ai-generated-content" | "ai-generated-image" | "ai-generated-video" | "ai-generated-audio" | "review-or-testimonial" | "about-page" | "terms-of-service" | "privacy-policy")[];
226
+ use_cases: ("b2c-customer-support" | "b2b-customer-support" | "b2c-marketing" | "b2b-marketing" | "b2c-sales" | "b2b-sales" | "civic-or-electoral" | "healthcare" | "legal-services" | "financial-services" | "employment-decisions" | "general")[];
227
+ severity: "mandatory" | "recommended" | "best-practice";
228
+ short_title: string;
229
+ summary: string;
230
+ required_elements: {
231
+ id: string;
232
+ description: string;
233
+ required: boolean;
234
+ example?: string | undefined;
235
+ }[];
236
+ citation: {
237
+ statute: string;
238
+ source_url: string;
239
+ publisher: string;
240
+ section?: string | undefined;
241
+ };
242
+ effective_date: string;
243
+ last_verified: string;
244
+ template: {
245
+ plain: string;
246
+ formal?: string | undefined;
247
+ };
248
+ notes?: string | undefined;
249
+ }>, "many">;
250
+ }, "strip", z.ZodTypeAny, {
251
+ schema_version: 1;
252
+ generated_at: string;
253
+ rules: {
254
+ id: string;
255
+ jurisdiction: string;
256
+ channels: ("live-chat" | "voice" | "video-avatar" | "email-transactional" | "email-marketing" | "social-post" | "ai-generated-content" | "ai-generated-image" | "ai-generated-video" | "ai-generated-audio" | "review-or-testimonial" | "about-page" | "terms-of-service" | "privacy-policy")[];
257
+ use_cases: ("b2c-customer-support" | "b2b-customer-support" | "b2c-marketing" | "b2b-marketing" | "b2c-sales" | "b2b-sales" | "civic-or-electoral" | "healthcare" | "legal-services" | "financial-services" | "employment-decisions" | "general")[];
258
+ severity: "mandatory" | "recommended" | "best-practice";
259
+ short_title: string;
260
+ summary: string;
261
+ required_elements: {
262
+ id: string;
263
+ description: string;
264
+ required: boolean;
265
+ example?: string | undefined;
266
+ }[];
267
+ citation: {
268
+ statute: string;
269
+ source_url: string;
270
+ publisher: string;
271
+ section?: string | undefined;
272
+ };
273
+ effective_date: string;
274
+ last_verified: string;
275
+ template: {
276
+ plain: string;
277
+ formal?: string | undefined;
278
+ };
279
+ notes?: string | undefined;
280
+ }[];
281
+ }, {
282
+ schema_version: 1;
283
+ generated_at: string;
284
+ rules: {
285
+ id: string;
286
+ jurisdiction: string;
287
+ channels: ("live-chat" | "voice" | "video-avatar" | "email-transactional" | "email-marketing" | "social-post" | "ai-generated-content" | "ai-generated-image" | "ai-generated-video" | "ai-generated-audio" | "review-or-testimonial" | "about-page" | "terms-of-service" | "privacy-policy")[];
288
+ use_cases: ("b2c-customer-support" | "b2b-customer-support" | "b2c-marketing" | "b2b-marketing" | "b2c-sales" | "b2b-sales" | "civic-or-electoral" | "healthcare" | "legal-services" | "financial-services" | "employment-decisions" | "general")[];
289
+ severity: "mandatory" | "recommended" | "best-practice";
290
+ short_title: string;
291
+ summary: string;
292
+ required_elements: {
293
+ id: string;
294
+ description: string;
295
+ required: boolean;
296
+ example?: string | undefined;
297
+ }[];
298
+ citation: {
299
+ statute: string;
300
+ source_url: string;
301
+ publisher: string;
302
+ section?: string | undefined;
303
+ };
304
+ effective_date: string;
305
+ last_verified: string;
306
+ template: {
307
+ plain: string;
308
+ formal?: string | undefined;
309
+ };
310
+ notes?: string | undefined;
311
+ }[];
312
+ }>;
313
+ export type JurisdictionIdT = z.infer<typeof JurisdictionId>;
314
+ export type ChannelT = z.infer<typeof Channel>;
315
+ export type UseCaseT = z.infer<typeof UseCase>;
316
+ export type SeverityT = z.infer<typeof Severity>;
317
+ export type DisclosureRuleT = z.infer<typeof DisclosureRule>;
318
+ export type DisclosureElementT = z.infer<typeof DisclosureElement>;
319
+ export type RuleSetT = z.infer<typeof RuleSet>;
320
+ /** A lookup query: which jurisdiction, channel, and use-case is the agent operating in? */
321
+ export declare const LookupQuery: z.ZodObject<{
322
+ jurisdiction: z.ZodString;
323
+ channel: z.ZodEnum<["live-chat", "voice", "video-avatar", "email-transactional", "email-marketing", "social-post", "ai-generated-content", "ai-generated-image", "ai-generated-video", "ai-generated-audio", "review-or-testimonial", "about-page", "terms-of-service", "privacy-policy"]>;
324
+ use_case: z.ZodEnum<["b2c-customer-support", "b2b-customer-support", "b2c-marketing", "b2b-marketing", "b2c-sales", "b2b-sales", "civic-or-electoral", "healthcare", "legal-services", "financial-services", "employment-decisions", "general"]>;
325
+ }, "strip", z.ZodTypeAny, {
326
+ jurisdiction: string;
327
+ channel: "live-chat" | "voice" | "video-avatar" | "email-transactional" | "email-marketing" | "social-post" | "ai-generated-content" | "ai-generated-image" | "ai-generated-video" | "ai-generated-audio" | "review-or-testimonial" | "about-page" | "terms-of-service" | "privacy-policy";
328
+ use_case: "b2c-customer-support" | "b2b-customer-support" | "b2c-marketing" | "b2b-marketing" | "b2c-sales" | "b2b-sales" | "civic-or-electoral" | "healthcare" | "legal-services" | "financial-services" | "employment-decisions" | "general";
329
+ }, {
330
+ jurisdiction: string;
331
+ channel: "live-chat" | "voice" | "video-avatar" | "email-transactional" | "email-marketing" | "social-post" | "ai-generated-content" | "ai-generated-image" | "ai-generated-video" | "ai-generated-audio" | "review-or-testimonial" | "about-page" | "terms-of-service" | "privacy-policy";
332
+ use_case: "b2c-customer-support" | "b2b-customer-support" | "b2c-marketing" | "b2b-marketing" | "b2c-sales" | "b2b-sales" | "civic-or-electoral" | "healthcare" | "legal-services" | "financial-services" | "employment-decisions" | "general";
333
+ }>;
334
+ export type LookupQueryT = z.infer<typeof LookupQuery>;
335
+ /** A single result row from a lookup. */
336
+ export declare const LookupResult: z.ZodObject<{
337
+ rule: z.ZodObject<{
338
+ id: z.ZodString;
339
+ jurisdiction: z.ZodString;
340
+ channels: z.ZodArray<z.ZodEnum<["live-chat", "voice", "video-avatar", "email-transactional", "email-marketing", "social-post", "ai-generated-content", "ai-generated-image", "ai-generated-video", "ai-generated-audio", "review-or-testimonial", "about-page", "terms-of-service", "privacy-policy"]>, "many">;
341
+ use_cases: z.ZodArray<z.ZodEnum<["b2c-customer-support", "b2b-customer-support", "b2c-marketing", "b2b-marketing", "b2c-sales", "b2b-sales", "civic-or-electoral", "healthcare", "legal-services", "financial-services", "employment-decisions", "general"]>, "many">;
342
+ severity: z.ZodEnum<["mandatory", "recommended", "best-practice"]>;
343
+ short_title: z.ZodString;
344
+ summary: z.ZodString;
345
+ required_elements: z.ZodArray<z.ZodObject<{
346
+ id: z.ZodString;
347
+ description: z.ZodString;
348
+ required: z.ZodBoolean;
349
+ example: z.ZodOptional<z.ZodString>;
350
+ }, "strip", z.ZodTypeAny, {
351
+ id: string;
352
+ description: string;
353
+ required: boolean;
354
+ example?: string | undefined;
355
+ }, {
356
+ id: string;
357
+ description: string;
358
+ required: boolean;
359
+ example?: string | undefined;
360
+ }>, "many">;
361
+ citation: z.ZodObject<{
362
+ statute: z.ZodString;
363
+ section: z.ZodOptional<z.ZodString>;
364
+ source_url: z.ZodString;
365
+ publisher: z.ZodString;
366
+ }, "strip", z.ZodTypeAny, {
367
+ statute: string;
368
+ source_url: string;
369
+ publisher: string;
370
+ section?: string | undefined;
371
+ }, {
372
+ statute: string;
373
+ source_url: string;
374
+ publisher: string;
375
+ section?: string | undefined;
376
+ }>;
377
+ effective_date: z.ZodString;
378
+ last_verified: z.ZodString;
379
+ template: z.ZodObject<{
380
+ plain: z.ZodString;
381
+ formal: z.ZodOptional<z.ZodString>;
382
+ }, "strip", z.ZodTypeAny, {
383
+ plain: string;
384
+ formal?: string | undefined;
385
+ }, {
386
+ plain: string;
387
+ formal?: string | undefined;
388
+ }>;
389
+ notes: z.ZodOptional<z.ZodString>;
390
+ }, "strip", z.ZodTypeAny, {
391
+ id: string;
392
+ jurisdiction: string;
393
+ channels: ("live-chat" | "voice" | "video-avatar" | "email-transactional" | "email-marketing" | "social-post" | "ai-generated-content" | "ai-generated-image" | "ai-generated-video" | "ai-generated-audio" | "review-or-testimonial" | "about-page" | "terms-of-service" | "privacy-policy")[];
394
+ use_cases: ("b2c-customer-support" | "b2b-customer-support" | "b2c-marketing" | "b2b-marketing" | "b2c-sales" | "b2b-sales" | "civic-or-electoral" | "healthcare" | "legal-services" | "financial-services" | "employment-decisions" | "general")[];
395
+ severity: "mandatory" | "recommended" | "best-practice";
396
+ short_title: string;
397
+ summary: string;
398
+ required_elements: {
399
+ id: string;
400
+ description: string;
401
+ required: boolean;
402
+ example?: string | undefined;
403
+ }[];
404
+ citation: {
405
+ statute: string;
406
+ source_url: string;
407
+ publisher: string;
408
+ section?: string | undefined;
409
+ };
410
+ effective_date: string;
411
+ last_verified: string;
412
+ template: {
413
+ plain: string;
414
+ formal?: string | undefined;
415
+ };
416
+ notes?: string | undefined;
417
+ }, {
418
+ id: string;
419
+ jurisdiction: string;
420
+ channels: ("live-chat" | "voice" | "video-avatar" | "email-transactional" | "email-marketing" | "social-post" | "ai-generated-content" | "ai-generated-image" | "ai-generated-video" | "ai-generated-audio" | "review-or-testimonial" | "about-page" | "terms-of-service" | "privacy-policy")[];
421
+ use_cases: ("b2c-customer-support" | "b2b-customer-support" | "b2c-marketing" | "b2b-marketing" | "b2c-sales" | "b2b-sales" | "civic-or-electoral" | "healthcare" | "legal-services" | "financial-services" | "employment-decisions" | "general")[];
422
+ severity: "mandatory" | "recommended" | "best-practice";
423
+ short_title: string;
424
+ summary: string;
425
+ required_elements: {
426
+ id: string;
427
+ description: string;
428
+ required: boolean;
429
+ example?: string | undefined;
430
+ }[];
431
+ citation: {
432
+ statute: string;
433
+ source_url: string;
434
+ publisher: string;
435
+ section?: string | undefined;
436
+ };
437
+ effective_date: string;
438
+ last_verified: string;
439
+ template: {
440
+ plain: string;
441
+ formal?: string | undefined;
442
+ };
443
+ notes?: string | undefined;
444
+ }>;
445
+ applies_because: z.ZodArray<z.ZodString, "many">;
446
+ generated_text: z.ZodObject<{
447
+ plain: z.ZodString;
448
+ formal: z.ZodOptional<z.ZodString>;
449
+ }, "strip", z.ZodTypeAny, {
450
+ plain: string;
451
+ formal?: string | undefined;
452
+ }, {
453
+ plain: string;
454
+ formal?: string | undefined;
455
+ }>;
456
+ }, "strip", z.ZodTypeAny, {
457
+ rule: {
458
+ id: string;
459
+ jurisdiction: string;
460
+ channels: ("live-chat" | "voice" | "video-avatar" | "email-transactional" | "email-marketing" | "social-post" | "ai-generated-content" | "ai-generated-image" | "ai-generated-video" | "ai-generated-audio" | "review-or-testimonial" | "about-page" | "terms-of-service" | "privacy-policy")[];
461
+ use_cases: ("b2c-customer-support" | "b2b-customer-support" | "b2c-marketing" | "b2b-marketing" | "b2c-sales" | "b2b-sales" | "civic-or-electoral" | "healthcare" | "legal-services" | "financial-services" | "employment-decisions" | "general")[];
462
+ severity: "mandatory" | "recommended" | "best-practice";
463
+ short_title: string;
464
+ summary: string;
465
+ required_elements: {
466
+ id: string;
467
+ description: string;
468
+ required: boolean;
469
+ example?: string | undefined;
470
+ }[];
471
+ citation: {
472
+ statute: string;
473
+ source_url: string;
474
+ publisher: string;
475
+ section?: string | undefined;
476
+ };
477
+ effective_date: string;
478
+ last_verified: string;
479
+ template: {
480
+ plain: string;
481
+ formal?: string | undefined;
482
+ };
483
+ notes?: string | undefined;
484
+ };
485
+ applies_because: string[];
486
+ generated_text: {
487
+ plain: string;
488
+ formal?: string | undefined;
489
+ };
490
+ }, {
491
+ rule: {
492
+ id: string;
493
+ jurisdiction: string;
494
+ channels: ("live-chat" | "voice" | "video-avatar" | "email-transactional" | "email-marketing" | "social-post" | "ai-generated-content" | "ai-generated-image" | "ai-generated-video" | "ai-generated-audio" | "review-or-testimonial" | "about-page" | "terms-of-service" | "privacy-policy")[];
495
+ use_cases: ("b2c-customer-support" | "b2b-customer-support" | "b2c-marketing" | "b2b-marketing" | "b2c-sales" | "b2b-sales" | "civic-or-electoral" | "healthcare" | "legal-services" | "financial-services" | "employment-decisions" | "general")[];
496
+ severity: "mandatory" | "recommended" | "best-practice";
497
+ short_title: string;
498
+ summary: string;
499
+ required_elements: {
500
+ id: string;
501
+ description: string;
502
+ required: boolean;
503
+ example?: string | undefined;
504
+ }[];
505
+ citation: {
506
+ statute: string;
507
+ source_url: string;
508
+ publisher: string;
509
+ section?: string | undefined;
510
+ };
511
+ effective_date: string;
512
+ last_verified: string;
513
+ template: {
514
+ plain: string;
515
+ formal?: string | undefined;
516
+ };
517
+ notes?: string | undefined;
518
+ };
519
+ applies_because: string[];
520
+ generated_text: {
521
+ plain: string;
522
+ formal?: string | undefined;
523
+ };
524
+ }>;
525
+ export type LookupResultT = z.infer<typeof LookupResult>;
526
+ //# sourceM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C,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACnE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;AAE/C,2FAA2F;AAC3F,eAAO,MAAM,WAAW;;;;;;;;;;;;EAItB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEvD,yCAAyC;AACzC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOvB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
package/dist/schema.js ADDED
@@ -0,0 +1,96 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Disclosure rule schema. Each rule is a structured representation of a real,
4
+ * cited regulatory obligation about AI disclosure. Rules are sourced from
5
+ * primary regulator-published material; never from third-party paraphrase.
6
+ *
7
+ * Citation discipline: every rule must carry the regulator's own published
8
+ * URL plus the date the rule's text was last verified. The whole product
9
+ * trades on these citations being correct.
10
+ */
11
+ export const JurisdictionId = z
12
+ .string()
13
+ .regex(/^[a-z]{2,5}(-[a-z0-9]{1,5}){0,2}$/, {
14
+ message: "jurisdiction id must be lowercase ISO-style with up to 2 nested hyphens (e.g. 'us', 'us-ca', 'eu', 'us-ny-nyc')",
15
+ });
16
+ export const Channel = z.enum([
17
+ "live-chat",
18
+ "voice",
19
+ "video-avatar",
20
+ "email-transactional",
21
+ "email-marketing",
22
+ "social-post",
23
+ "ai-generated-content",
24
+ "ai-generated-image",
25
+ "ai-generated-video",
26
+ "ai-generated-audio",
27
+ "review-or-testimonial",
28
+ "about-page",
29
+ "terms-of-service",
30
+ "privacy-policy",
31
+ ]);
32
+ export const UseCase = z.enum([
33
+ "b2c-customer-support",
34
+ "b2b-customer-support",
35
+ "b2c-marketing",
36
+ "b2b-marketing",
37
+ "b2c-sales",
38
+ "b2b-sales",
39
+ "civic-or-electoral",
40
+ "healthcare",
41
+ "legal-services",
42
+ "financial-services",
43
+ "employment-decisions",
44
+ "general",
45
+ ]);
46
+ export const Severity = z.enum(["mandatory", "recommended", "best-practice"]);
47
+ export const DisclosureElement = z.object({
48
+ id: z.string(),
49
+ description: z.string(),
50
+ required: z.boolean(),
51
+ example: z.string().optional(),
52
+ });
53
+ export const DisclosureRule = z.object({
54
+ id: z.string().regex(/^[a-z0-9-]+$/),
55
+ jurisdiction: JurisdictionId,
56
+ channels: z.array(Channel).min(1),
57
+ use_cases: z.array(UseCase).min(1),
58
+ severity: Severity,
59
+ short_title: z.string(),
60
+ summary: z.string(),
61
+ required_elements: z.array(DisclosureElement),
62
+ citation: z.object({
63
+ statute: z.string(),
64
+ section: z.string().optional(),
65
+ source_url: z.string().url(),
66
+ publisher: z.string(),
67
+ }),
68
+ effective_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
69
+ last_verified: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
70
+ template: z.object({
71
+ plain: z.string(),
72
+ formal: z.string().optional(),
73
+ }),
74
+ notes: z.string().optional(),
75
+ });
76
+ export const RuleSet = z.object({
77
+ schema_version: z.literal(1),
78
+ generated_at: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
79
+ rules: z.array(DisclosureRule),
80
+ });
81
+ /** A lookup query: which jurisdiction, channel, and use-case is the agent operating in? */
82
+ export const LookupQuery = z.object({
83
+ jurisdiction: JurisdictionId,
84
+ channel: Channel,
85
+ use_case: UseCase,
86
+ });
87
+ /** A single result row from a lookup. */
88
+ export const LookupResult = z.object({
89
+ rule: DisclosureRule,
90
+ applies_because: z.array(z.string()),
91
+ generated_text: z.object({
92
+ plain: z.string(),
93
+ formal: z.string().optional(),
94
+ }),
95
+ });
96
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,EAAE;KACR,KAAK,CAAC,mCAAmC,EAAE;IAC1C,OAAO,EACL,iHAAiH;CACpH,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC;IAC5B,WAAW;IACX,OAAO;IACP,cAAc;IACd,qBAAqB;IACrB,iBAAiB;IACjB,aAAa;IACb,sBAAsB;IACtB,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;IACpB,uBAAuB;IACvB,YAAY;IACZ,kBAAkB;IAClB,gBAAgB;CACjB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC;IAC5B,sBAAsB;IACtB,sBAAsB;IACtB,eAAe;IACf,eAAe;IACf,WAAW;IACX,WAAW;IACX,oBAAoB;IACpB,YAAY;IACZ,gBAAgB;IAChB,oBAAoB;IACpB,sBAAsB;IACtB,SAAS;CACV,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC;AAE9E,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EA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