@adoptai/genui-components 0.1.57 → 0.1.58

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 (37) hide show
  1. package/dist/composites/document-field-extraction/FieldAuditLog.d.ts +27 -0
  2. package/dist/composites/document-field-extraction/FieldAuditLog.d.ts.map +1 -0
  3. package/dist/composites/document-field-extraction/FieldDetail.d.ts +22 -0
  4. package/dist/composites/document-field-extraction/FieldDetail.d.ts.map +1 -0
  5. package/dist/composites/document-field-extraction/FieldDetails.d.ts +18 -0
  6. package/dist/composites/document-field-extraction/FieldDetails.d.ts.map +1 -0
  7. package/dist/composites/document-field-extraction/bboxTransform.d.ts +25 -0
  8. package/dist/composites/document-field-extraction/bboxTransform.d.ts.map +1 -0
  9. package/dist/composites/document-field-extraction/fieldLabels.d.ts +2 -0
  10. package/dist/composites/document-field-extraction/fieldLabels.d.ts.map +1 -0
  11. package/dist/composites/document-field-extraction/resolver.d.ts +16 -0
  12. package/dist/composites/document-field-extraction/resolver.d.ts.map +1 -0
  13. package/dist/index.cjs +2097 -246
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.ts +5 -0
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +1892 -45
  18. package/dist/index.js.map +1 -1
  19. package/dist/renderer.cjs +1917 -181
  20. package/dist/renderer.cjs.map +1 -1
  21. package/dist/renderer.js +1774 -38
  22. package/dist/renderer.js.map +1 -1
  23. package/dist/resolver.cjs +1916 -180
  24. package/dist/resolver.cjs.map +1 -1
  25. package/dist/resolver.d.ts.map +1 -1
  26. package/dist/resolver.js +1774 -38
  27. package/dist/resolver.js.map +1 -1
  28. package/dist/schemas/document-field-extraction.d.ts +258 -0
  29. package/dist/schemas/document-field-extraction.d.ts.map +1 -0
  30. package/dist/schemas/index.cjs +178 -0
  31. package/dist/schemas/index.cjs.map +1 -1
  32. package/dist/schemas/index.d.ts +258 -0
  33. package/dist/schemas/index.d.ts.map +1 -1
  34. package/dist/schemas/index.js +178 -0
  35. package/dist/schemas/index.js.map +1 -1
  36. package/dist/tool-definitions.json +227 -3
  37. package/package.json +1 -1
@@ -5146,6 +5146,264 @@ export declare const schemaRegistry: {
5146
5146
  };
5147
5147
  };
5148
5148
  };
5149
+ "document-field-extraction": {
5150
+ schema: z.ZodObject<{
5151
+ type: z.ZodLiteral<"document-field-extraction">;
5152
+ doc_type: z.ZodOptional<z.ZodString>;
5153
+ file_name: z.ZodOptional<z.ZodString>;
5154
+ payload_ref: z.ZodOptional<z.ZodString>;
5155
+ store_id: z.ZodOptional<z.ZodString>;
5156
+ doc_id: z.ZodOptional<z.ZodString>;
5157
+ pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
5158
+ page: z.ZodNumber;
5159
+ imageUrl: z.ZodOptional<z.ZodString>;
5160
+ width_pt: z.ZodNumber;
5161
+ height_pt: z.ZodNumber;
5162
+ }, z.core.$strip>>>;
5163
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
5164
+ field_key: z.ZodString;
5165
+ label: z.ZodString;
5166
+ value: z.ZodString;
5167
+ page: z.ZodNumber;
5168
+ bbox: z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>>;
5169
+ confidence: z.ZodOptional<z.ZodNumber>;
5170
+ confidence_tier: z.ZodOptional<z.ZodEnum<{
5171
+ red: "red";
5172
+ green: "green";
5173
+ amber: "amber";
5174
+ }>>;
5175
+ badge: z.ZodOptional<z.ZodEnum<{
5176
+ SC: "SC";
5177
+ CN: "CN";
5178
+ AB: "AB";
5179
+ SW: "SW";
5180
+ }>>;
5181
+ state: z.ZodOptional<z.ZodEnum<{
5182
+ ok: "ok";
5183
+ corrected: "corrected";
5184
+ missing: "missing";
5185
+ warn: "warn";
5186
+ }>>;
5187
+ entity_type: z.ZodOptional<z.ZodString>;
5188
+ is_primary: z.ZodOptional<z.ZodBoolean>;
5189
+ previous_value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5190
+ corrected_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5191
+ }, z.core.$strip>>>;
5192
+ page_count: z.ZodOptional<z.ZodNumber>;
5193
+ pages_processed: z.ZodOptional<z.ZodNumber>;
5194
+ summary: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5195
+ display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5196
+ short_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5197
+ organization: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5198
+ domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5199
+ domain_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5200
+ tax_year: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
5201
+ crumbs: z.ZodOptional<z.ZodArray<z.ZodString>>;
5202
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
5203
+ stats: z.ZodOptional<z.ZodArray<z.ZodObject<{
5204
+ field_key: z.ZodString;
5205
+ label: z.ZodString;
5206
+ value: z.ZodString;
5207
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5208
+ }, z.core.$strip>>>;
5209
+ facts: z.ZodOptional<z.ZodArray<z.ZodObject<{
5210
+ field_key: z.ZodString;
5211
+ label: z.ZodString;
5212
+ value: z.ZodString;
5213
+ badge: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5214
+ }, z.core.$strip>>>;
5215
+ }, z.core.$strip>>>;
5216
+ }, z.core.$strip>;
5217
+ tool: {
5218
+ name: string;
5219
+ description: string;
5220
+ input_schema: {
5221
+ type: "object";
5222
+ properties: {
5223
+ type: {
5224
+ type: string;
5225
+ enum: string[];
5226
+ };
5227
+ doc_type: {
5228
+ type: string;
5229
+ };
5230
+ file_name: {
5231
+ type: string;
5232
+ description: string;
5233
+ };
5234
+ payload_ref: {
5235
+ type: string;
5236
+ description: string;
5237
+ };
5238
+ store_id: {
5239
+ type: string;
5240
+ description: string;
5241
+ };
5242
+ doc_id: {
5243
+ type: string;
5244
+ description: string;
5245
+ };
5246
+ pages: {
5247
+ type: string;
5248
+ items: {
5249
+ type: string;
5250
+ properties: {
5251
+ page: {
5252
+ type: string;
5253
+ description: string;
5254
+ };
5255
+ imageUrl: {
5256
+ type: string;
5257
+ };
5258
+ width_pt: {
5259
+ type: string;
5260
+ };
5261
+ height_pt: {
5262
+ type: string;
5263
+ };
5264
+ };
5265
+ required: string[];
5266
+ };
5267
+ };
5268
+ fields: {
5269
+ type: string;
5270
+ items: {
5271
+ type: string;
5272
+ properties: {
5273
+ field_key: {
5274
+ type: string;
5275
+ };
5276
+ label: {
5277
+ type: string;
5278
+ };
5279
+ value: {
5280
+ type: string;
5281
+ };
5282
+ page: {
5283
+ type: string;
5284
+ description: string;
5285
+ };
5286
+ bbox: {
5287
+ type: string;
5288
+ items: {
5289
+ type: string;
5290
+ };
5291
+ description: string;
5292
+ };
5293
+ confidence: {
5294
+ type: string;
5295
+ };
5296
+ confidence_tier: {
5297
+ type: string;
5298
+ enum: string[];
5299
+ };
5300
+ badge: {
5301
+ type: string;
5302
+ enum: string[];
5303
+ };
5304
+ state: {
5305
+ type: string;
5306
+ enum: string[];
5307
+ };
5308
+ entity_type: {
5309
+ type: string;
5310
+ };
5311
+ is_primary: {
5312
+ type: string;
5313
+ };
5314
+ };
5315
+ required: string[];
5316
+ };
5317
+ };
5318
+ page_count: {
5319
+ type: string;
5320
+ };
5321
+ pages_processed: {
5322
+ type: string;
5323
+ };
5324
+ summary: {
5325
+ type: string;
5326
+ description: string;
5327
+ properties: {
5328
+ display_name: {
5329
+ type: string;
5330
+ };
5331
+ short_name: {
5332
+ type: string;
5333
+ };
5334
+ organization: {
5335
+ type: string;
5336
+ };
5337
+ domain: {
5338
+ type: string;
5339
+ };
5340
+ domain_group: {
5341
+ type: string;
5342
+ };
5343
+ tax_year: {
5344
+ type: string;
5345
+ };
5346
+ crumbs: {
5347
+ type: string;
5348
+ items: {
5349
+ type: string;
5350
+ };
5351
+ };
5352
+ tags: {
5353
+ type: string;
5354
+ items: {
5355
+ type: string;
5356
+ };
5357
+ };
5358
+ stats: {
5359
+ type: string;
5360
+ items: {
5361
+ type: string;
5362
+ properties: {
5363
+ field_key: {
5364
+ type: string;
5365
+ };
5366
+ label: {
5367
+ type: string;
5368
+ };
5369
+ value: {
5370
+ type: string;
5371
+ };
5372
+ caption: {
5373
+ type: string;
5374
+ };
5375
+ };
5376
+ required: string[];
5377
+ };
5378
+ };
5379
+ facts: {
5380
+ type: string;
5381
+ items: {
5382
+ type: string;
5383
+ properties: {
5384
+ field_key: {
5385
+ type: string;
5386
+ };
5387
+ label: {
5388
+ type: string;
5389
+ };
5390
+ value: {
5391
+ type: string;
5392
+ };
5393
+ badge: {
5394
+ type: string;
5395
+ };
5396
+ };
5397
+ required: string[];
5398
+ };
5399
+ };
5400
+ };
5401
+ };
5402
+ };
5403
+ required: string[];
5404
+ };
5405
+ };
5406
+ };
5149
5407
  "decision-card": {
5150
5408
  schema: z.ZodObject<{
5151
5409
  type: z.ZodLiteral<"decision-card">;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2DxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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), z.number(), z.number()]);
3457
+ var fieldSchema = z.object({
3458
+ field_key: z.string(),
3459
+ label: z.string(),
3460
+ value: z.string(),
3461
+ page: z.number(),
3462
+ // 0-indexed, matches PageDimension.page
3463
+ bbox: bbox.nullable().optional(),
3464
+ confidence: z.number().optional(),
3465
+ confidence_tier: z.enum(["green", "amber", "red"]).optional(),
3466
+ badge: z.enum(["SC", "CN", "AB", "SW"]).optional(),
3467
+ state: z.enum(["ok", "corrected", "missing", "warn"]).optional(),
3468
+ entity_type: z.string().optional(),
3469
+ is_primary: z.boolean().optional(),
3470
+ // Set after a human correction (extractor output, or an optimistic in-card
3471
+ // edit) so the editable field card can show old → new and who changed it.
3472
+ previous_value: z.string().nullable().optional(),
3473
+ corrected_by: z.string().nullable().optional()
3474
+ });
3475
+ var pageSchema = z.object({
3476
+ page: z.number(),
3477
+ // 0-indexed
3478
+ imageUrl: z.string().optional(),
3479
+ // host-resolved from the durable image_ref
3480
+ width_pt: z.number(),
3481
+ height_pt: z.number()
3482
+ });
3483
+ var summaryStatSchema = z.object({
3484
+ field_key: z.string(),
3485
+ label: z.string(),
3486
+ value: z.string(),
3487
+ caption: z.string().nullable().optional()
3488
+ });
3489
+ var summaryFactSchema = z.object({
3490
+ field_key: z.string(),
3491
+ label: z.string(),
3492
+ value: z.string(),
3493
+ badge: z.string().nullable().optional()
3494
+ });
3495
+ var summarySchema = z.object({
3496
+ display_name: z.string().nullable().optional(),
3497
+ short_name: z.string().nullable().optional(),
3498
+ organization: z.string().nullable().optional(),
3499
+ domain: z.string().nullable().optional(),
3500
+ domain_group: z.string().nullable().optional(),
3501
+ tax_year: z.union([z.string(), z.number()]).nullable().optional(),
3502
+ crumbs: z.array(z.string()).optional(),
3503
+ tags: z.array(z.string()).optional(),
3504
+ stats: z.array(summaryStatSchema).optional(),
3505
+ facts: z.array(summaryFactSchema).optional()
3506
+ });
3507
+ var documentFieldExtractionSchema = z.object({
3508
+ type: z.literal("document-field-extraction"),
3509
+ doc_type: z.string().optional(),
3510
+ // Original uploaded filename (e.g. "2024_gl.pdf"); preferred over doc_type for
3511
+ // the card title since doc_type is often the "generic_fallback" schema name.
3512
+ file_name: z.string().optional(),
3513
+ // Server-side token; resolved by the host into pages/fields before render.
3514
+ payload_ref: z.string().optional(),
3515
+ // Present for persisted workstream docs; absent for pre-existing cards.
3516
+ store_id: z.string().optional(),
3517
+ doc_id: z.string().optional(),
3518
+ pages: z.array(pageSchema).max(100).optional(),
3519
+ fields: z.array(fieldSchema).max(1e3).optional(),
3520
+ // Page-count metadata for the Details tab ("N of M pages extracted").
3521
+ page_count: z.number().optional(),
3522
+ pages_processed: z.number().optional(),
3523
+ // Deterministic document summary for the Details tab.
3524
+ summary: summarySchema.nullable().optional()
3525
+ });
3526
+ var documentFieldExtractionTool = {
3527
+ name: "render_document_field_extraction",
3528
+ description: "Render extracted document fields as an interactive overlay on the page image(s) \u2014 colored bounding boxes per field plus a synced field-card list. Use after the extract_document tool returns; pass the returned payload_ref (the host expands it). For invoices, statements, tax forms, receipts, KYC/loan docs, POs where the user wants to SEE where each value sits on the page.",
3529
+ input_schema: {
3530
+ type: "object",
3531
+ properties: {
3532
+ type: { type: "string", enum: ["document-field-extraction"] },
3533
+ doc_type: { type: "string" },
3534
+ file_name: {
3535
+ type: "string",
3536
+ description: "Original uploaded filename; shown as the card title."
3537
+ },
3538
+ payload_ref: {
3539
+ type: "string",
3540
+ description: "Durable store key returned by extract_document; the GenUI host expands it into pages/fields at render time. Pass this verbatim \u2014 do NOT hand-build pages/fields."
3541
+ },
3542
+ store_id: {
3543
+ type: "string",
3544
+ description: "Docstore store id; present for persisted workstream docs. The host uses this to open the editable viewer."
3545
+ },
3546
+ doc_id: {
3547
+ type: "string",
3548
+ description: "Docstore document id; present for persisted workstream docs. Required for the editable viewer."
3549
+ },
3550
+ pages: {
3551
+ type: "array",
3552
+ items: {
3553
+ type: "object",
3554
+ properties: {
3555
+ page: { type: "number", description: "0-indexed page number" },
3556
+ imageUrl: { type: "string" },
3557
+ width_pt: { type: "number" },
3558
+ height_pt: { type: "number" }
3559
+ },
3560
+ required: ["page", "width_pt", "height_pt"]
3561
+ }
3562
+ },
3563
+ fields: {
3564
+ type: "array",
3565
+ items: {
3566
+ type: "object",
3567
+ properties: {
3568
+ field_key: { type: "string" },
3569
+ label: { type: "string" },
3570
+ value: { type: "string" },
3571
+ page: { type: "number", description: "0-indexed page number" },
3572
+ bbox: {
3573
+ type: "array",
3574
+ items: { type: "number" },
3575
+ description: "[x0,y0,x1,y1] PDF points, origin bottom-left; null if unlocated"
3576
+ },
3577
+ confidence: { type: "number" },
3578
+ confidence_tier: { type: "string", enum: ["green", "amber", "red"] },
3579
+ badge: { type: "string", enum: ["SC", "CN", "AB", "SW"] },
3580
+ state: { type: "string", enum: ["ok", "corrected", "missing", "warn"] },
3581
+ entity_type: { type: "string" },
3582
+ is_primary: { type: "boolean" }
3583
+ },
3584
+ required: ["field_key", "label", "value", "page"]
3585
+ }
3586
+ },
3587
+ page_count: { type: "number" },
3588
+ pages_processed: { type: "number" },
3589
+ summary: {
3590
+ type: "object",
3591
+ description: "Deterministic document summary for the Details tab (display_name, organization, domain, stats, facts, tags). Produced by the extractor \u2014 pass through verbatim.",
3592
+ properties: {
3593
+ display_name: { type: "string" },
3594
+ short_name: { type: "string" },
3595
+ organization: { type: "string" },
3596
+ domain: { type: "string" },
3597
+ domain_group: { type: "string" },
3598
+ tax_year: { type: "string" },
3599
+ crumbs: { type: "array", items: { type: "string" } },
3600
+ tags: { type: "array", items: { type: "string" } },
3601
+ stats: {
3602
+ type: "array",
3603
+ items: {
3604
+ type: "object",
3605
+ properties: {
3606
+ field_key: { type: "string" },
3607
+ label: { type: "string" },
3608
+ value: { type: "string" },
3609
+ caption: { type: "string" }
3610
+ },
3611
+ required: ["field_key", "label", "value"]
3612
+ }
3613
+ },
3614
+ facts: {
3615
+ type: "array",
3616
+ items: {
3617
+ type: "object",
3618
+ properties: {
3619
+ field_key: { type: "string" },
3620
+ label: { type: "string" },
3621
+ value: { type: "string" },
3622
+ badge: { type: "string" }
3623
+ },
3624
+ required: ["field_key", "label", "value"]
3625
+ }
3626
+ }
3627
+ }
3628
+ }
3629
+ },
3630
+ required: ["type"]
3631
+ }
3632
+ };
3456
3633
  var decisionCardSchema = z.object({
3457
3634
  type: z.literal("decision-card"),
3458
3635
  id: z.string().optional(),
@@ -3675,6 +3852,7 @@ var schemaRegistry = {
3675
3852
  "integrations-list": { schema: integrationsListSchema, tool: integrationsListTool },
3676
3853
  "pipeline-preview": { schema: pipelinePreviewSchema, tool: pipelinePreviewTool },
3677
3854
  "workflow-stepper": { schema: workflowStepperSchema, tool: workflowStepperTool },
3855
+ "document-field-extraction": { schema: documentFieldExtractionSchema, tool: documentFieldExtractionTool },
3678
3856
  "decision-card": { schema: decisionCardSchema, tool: decisionCardTool }
3679
3857
  };
3680
3858