@adoptai/genui-components 0.1.55 → 0.1.57

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 (38) hide show
  1. package/dist/builders/BuilderForm.d.ts.map +1 -1
  2. package/dist/composites/decision-card/resolver.cjs +634 -0
  3. package/dist/composites/decision-card/resolver.cjs.map +1 -0
  4. package/dist/composites/decision-card/resolver.d.ts +13 -0
  5. package/dist/composites/decision-card/resolver.d.ts.map +1 -0
  6. package/dist/composites/decision-card/resolver.js +627 -0
  7. package/dist/composites/decision-card/resolver.js.map +1 -0
  8. package/dist/composites/workflow-stepper/resolver.cjs +4 -1
  9. package/dist/composites/workflow-stepper/resolver.cjs.map +1 -1
  10. package/dist/composites/workflow-stepper/resolver.js +4 -1
  11. package/dist/composites/workflow-stepper/resolver.js.map +1 -1
  12. package/dist/index.cjs +522 -12
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +521 -13
  17. package/dist/index.js.map +1 -1
  18. package/dist/renderer.cjs +504 -8
  19. package/dist/renderer.cjs.map +1 -1
  20. package/dist/renderer.js +504 -8
  21. package/dist/renderer.js.map +1 -1
  22. package/dist/resolver.cjs +504 -8
  23. package/dist/resolver.cjs.map +1 -1
  24. package/dist/resolver.d.ts.map +1 -1
  25. package/dist/resolver.js +504 -8
  26. package/dist/resolver.js.map +1 -1
  27. package/dist/schemas/decision-card.d.ts +149 -0
  28. package/dist/schemas/decision-card.d.ts.map +1 -0
  29. package/dist/schemas/index.cjs +105 -1
  30. package/dist/schemas/index.cjs.map +1 -1
  31. package/dist/schemas/index.d.ts +149 -0
  32. package/dist/schemas/index.d.ts.map +1 -1
  33. package/dist/schemas/index.js +105 -1
  34. package/dist/schemas/index.js.map +1 -1
  35. package/dist/shared/InteractionContext.d.ts +10 -0
  36. package/dist/shared/InteractionContext.d.ts.map +1 -1
  37. package/dist/tool-definitions.json +135 -3
  38. package/package.json +1 -1
@@ -9,6 +9,16 @@ import React from "react";
9
9
  export interface GenUIInteraction {
10
10
  selectedStepId: string | null;
11
11
  onStepSelect?: (stepId: string | null) => void;
12
+ /** Decision-card resolutions, keyed by decision id, so a resolved card
13
+ * re-renders locked from host state (transcript replay). */
14
+ resolvedDecisions?: Record<string, string>;
15
+ /** Host callback when a decision-card option is chosen. */
16
+ onDecisionResolve?: (decisionId: string, option: string) => void;
17
+ /** Host callback when a decision-card "view source" link is activated. */
18
+ onDecisionSource?: (decisionId: string, source?: {
19
+ url?: string;
20
+ label?: string;
21
+ }) => void;
12
22
  }
13
23
  export declare const DEFAULT_INTERACTION: GenUIInteraction;
14
24
  export interface GenUIInteractionProviderProps {
@@ -1 +1 @@
1
- {"version":3,"file":"InteractionContext.d.ts","sourceRoot":"","sources":["../../src/shared/InteractionContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,mBAAmB,EAAE,gBAGjC,CAAC;AAIF,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,wBAAwB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,6BAA6B,2CAM1F;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,CAEtD"}
1
+ {"version":3,"file":"InteractionContext.d.ts","sourceRoot":"","sources":["../../src/shared/InteractionContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C;gEAC4D;IAC5D,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACjE,0EAA0E;IAC1E,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC5F;AAED,eAAO,MAAM,mBAAmB,EAAE,gBAMjC,CAAC;AAIF,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,wBAAwB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,6BAA6B,2CAM1F;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,CAEtD"}
@@ -1,7 +1,7 @@
1
1
  {
2
- "version": "0.1.55",
3
- "generated_at": "2026-06-17T15:30:23.304Z",
4
- "schema_count": 57,
2
+ "version": "0.1.57",
3
+ "generated_at": "2026-06-23T19:01:49.313Z",
4
+ "schema_count": 58,
5
5
  "schemas": {
6
6
  "data-table": {
7
7
  "name": "render_data_table",
@@ -4736,6 +4736,138 @@
4736
4736
  "steps"
4737
4737
  ]
4738
4738
  }
4739
+ },
4740
+ "decision-card": {
4741
+ "name": "render_decision_card",
4742
+ "description": "Render an inline human-in-the-loop (HITL) decision card — a single judgment the agent needs from the user, resolved in-thread. Shows a titled question with an optional dollar amount at stake, optional data-quality flags, and 2-5 mutually-exclusive resolution options (the first or `recommended` one renders as the primary action), plus an optional 'view source' link. Use for inline approve/choose decisions the user resolves directly in the conversation. NOT for handing off to an external review portal (use escalation-card) and NOT for collecting multiple typed fields (use render_builder).",
4743
+ "input_schema": {
4744
+ "type": "object",
4745
+ "properties": {
4746
+ "type": {
4747
+ "type": "string",
4748
+ "enum": [
4749
+ "decision-card"
4750
+ ]
4751
+ },
4752
+ "id": {
4753
+ "type": "string",
4754
+ "description": "Stable id for update-in-place rendering"
4755
+ },
4756
+ "decision_type": {
4757
+ "type": "string",
4758
+ "description": "Short category shown in the eyebrow, e.g. 'Cross-check', 'Allocation', 'Reserve'"
4759
+ },
4760
+ "title": {
4761
+ "type": "string",
4762
+ "description": "The decision headline, e.g. 'AR reserve adequacy'"
4763
+ },
4764
+ "question": {
4765
+ "type": "string",
4766
+ "description": "The full question / context the user must judge"
4767
+ },
4768
+ "amount": {
4769
+ "type": "number",
4770
+ "description": "Dollar value at stake, e.g. 27100"
4771
+ },
4772
+ "currency": {
4773
+ "type": "string",
4774
+ "description": "ISO currency code; defaults to USD"
4775
+ },
4776
+ "amount_label": {
4777
+ "type": "string",
4778
+ "description": "Caption above the amount, e.g. 'At stake'"
4779
+ },
4780
+ "severity": {
4781
+ "type": "string",
4782
+ "enum": [
4783
+ "low",
4784
+ "medium",
4785
+ "high"
4786
+ ],
4787
+ "description": "Severity of the decision; tints the accent rail"
4788
+ },
4789
+ "flags": {
4790
+ "type": "array",
4791
+ "maxItems": 6,
4792
+ "description": "Optional data-quality flags surfaced on the card",
4793
+ "items": {
4794
+ "type": "object",
4795
+ "properties": {
4796
+ "field": {
4797
+ "type": "string"
4798
+ },
4799
+ "issue": {
4800
+ "type": "string"
4801
+ },
4802
+ "severity": {
4803
+ "type": "string",
4804
+ "enum": [
4805
+ "low",
4806
+ "medium",
4807
+ "high"
4808
+ ]
4809
+ }
4810
+ },
4811
+ "required": [
4812
+ "issue"
4813
+ ]
4814
+ }
4815
+ },
4816
+ "options": {
4817
+ "type": "array",
4818
+ "minItems": 1,
4819
+ "maxItems": 5,
4820
+ "description": "Mutually-exclusive resolution choices; mark one `recommended` to make it primary",
4821
+ "items": {
4822
+ "type": "object",
4823
+ "properties": {
4824
+ "id": {
4825
+ "type": "string"
4826
+ },
4827
+ "label": {
4828
+ "type": "string"
4829
+ },
4830
+ "recommended": {
4831
+ "type": "boolean"
4832
+ }
4833
+ },
4834
+ "required": [
4835
+ "label"
4836
+ ]
4837
+ }
4838
+ },
4839
+ "source": {
4840
+ "type": "object",
4841
+ "description": "Optional provenance link for the figure",
4842
+ "properties": {
4843
+ "label": {
4844
+ "type": "string"
4845
+ },
4846
+ "url": {
4847
+ "type": "string"
4848
+ }
4849
+ }
4850
+ },
4851
+ "resolved": {
4852
+ "type": "object",
4853
+ "description": "Pre-resolved state for transcript replay",
4854
+ "properties": {
4855
+ "option": {
4856
+ "type": "string"
4857
+ }
4858
+ },
4859
+ "required": [
4860
+ "option"
4861
+ ]
4862
+ }
4863
+ },
4864
+ "required": [
4865
+ "type",
4866
+ "title",
4867
+ "question",
4868
+ "options"
4869
+ ]
4870
+ }
4739
4871
  }
4740
4872
  }
4741
4873
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adoptai/genui-components",
3
- "version": "0.1.55",
3
+ "version": "0.1.57",
4
4
  "description": "Schema-driven generative UI components for Adopt agents",
5
5
  "private": false,
6
6
  "license": "UNLICENSED",