@adoptai/genui-components 0.1.60 → 0.1.62
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/dist/composites/decision-card/resolver.cjs +7 -4
- package/dist/composites/decision-card/resolver.cjs.map +1 -1
- package/dist/composites/decision-card/resolver.d.ts +7 -1
- package/dist/composites/decision-card/resolver.d.ts.map +1 -1
- package/dist/composites/decision-card/resolver.js +7 -5
- package/dist/composites/decision-card/resolver.js.map +1 -1
- package/dist/composites/decision-queue/resolver.d.ts +33 -0
- package/dist/composites/decision-queue/resolver.d.ts.map +1 -0
- package/dist/composites/workflow-stepper/resolver.cjs +2 -1
- package/dist/composites/workflow-stepper/resolver.cjs.map +1 -1
- package/dist/composites/workflow-stepper/resolver.js +2 -1
- package/dist/composites/workflow-stepper/resolver.js.map +1 -1
- package/dist/index.cjs +495 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +495 -10
- package/dist/index.js.map +1 -1
- package/dist/renderer.cjs +495 -10
- package/dist/renderer.cjs.map +1 -1
- package/dist/renderer.js +495 -10
- package/dist/renderer.js.map +1 -1
- package/dist/resolver.cjs +495 -10
- package/dist/resolver.cjs.map +1 -1
- package/dist/resolver.d.ts.map +1 -1
- package/dist/resolver.js +495 -10
- package/dist/resolver.js.map +1 -1
- package/dist/schemas/decision-queue.d.ts +227 -0
- package/dist/schemas/decision-queue.d.ts.map +1 -0
- package/dist/schemas/index.cjs +162 -0
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.ts +227 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +162 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/shared/InteractionContext.d.ts +10 -0
- package/dist/shared/InteractionContext.d.ts.map +1 -1
- package/dist/tool-definitions.json +203 -3
- package/package.json +1 -1
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const decisionQueueSchema: z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"decision-queue">;
|
|
4
|
+
id: z.ZodOptional<z.ZodString>;
|
|
5
|
+
title: z.ZodOptional<z.ZodString>;
|
|
6
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7
|
+
submit_label: z.ZodOptional<z.ZodString>;
|
|
8
|
+
items: z.ZodArray<z.ZodObject<{
|
|
9
|
+
id: z.ZodOptional<z.ZodString>;
|
|
10
|
+
decision_type: z.ZodOptional<z.ZodString>;
|
|
11
|
+
title: z.ZodString;
|
|
12
|
+
question: z.ZodString;
|
|
13
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
15
|
+
amount_label: z.ZodOptional<z.ZodString>;
|
|
16
|
+
severity: z.ZodOptional<z.ZodEnum<{
|
|
17
|
+
high: "high";
|
|
18
|
+
medium: "medium";
|
|
19
|
+
low: "low";
|
|
20
|
+
}>>;
|
|
21
|
+
flags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
22
|
+
field: z.ZodOptional<z.ZodString>;
|
|
23
|
+
issue: z.ZodString;
|
|
24
|
+
severity: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
high: "high";
|
|
26
|
+
medium: "medium";
|
|
27
|
+
low: "low";
|
|
28
|
+
}>>;
|
|
29
|
+
}, z.core.$strip>>>;
|
|
30
|
+
options: z.ZodArray<z.ZodObject<{
|
|
31
|
+
id: z.ZodOptional<z.ZodString>;
|
|
32
|
+
label: z.ZodString;
|
|
33
|
+
recommended: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
adjust: z.ZodOptional<z.ZodObject<{
|
|
36
|
+
min: z.ZodNumber;
|
|
37
|
+
max: z.ZodNumber;
|
|
38
|
+
step: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
43
|
+
label: z.ZodOptional<z.ZodString>;
|
|
44
|
+
url: z.ZodOptional<z.ZodString>;
|
|
45
|
+
}, z.core.$strip>>;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
resolved: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
decisions: z.ZodArray<z.ZodObject<{
|
|
49
|
+
id: z.ZodOptional<z.ZodString>;
|
|
50
|
+
title: z.ZodString;
|
|
51
|
+
option: z.ZodString;
|
|
52
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
}, z.core.$strip>>;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
export declare const decisionQueueTool: {
|
|
57
|
+
name: string;
|
|
58
|
+
description: string;
|
|
59
|
+
input_schema: {
|
|
60
|
+
type: "object";
|
|
61
|
+
properties: {
|
|
62
|
+
type: {
|
|
63
|
+
type: string;
|
|
64
|
+
enum: string[];
|
|
65
|
+
};
|
|
66
|
+
id: {
|
|
67
|
+
type: string;
|
|
68
|
+
description: string;
|
|
69
|
+
};
|
|
70
|
+
title: {
|
|
71
|
+
type: string;
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
74
|
+
description: {
|
|
75
|
+
type: string;
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
submit_label: {
|
|
79
|
+
type: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
items: {
|
|
83
|
+
type: string;
|
|
84
|
+
minItems: number;
|
|
85
|
+
maxItems: number;
|
|
86
|
+
description: string;
|
|
87
|
+
items: {
|
|
88
|
+
type: string;
|
|
89
|
+
properties: {
|
|
90
|
+
id: {
|
|
91
|
+
type: string;
|
|
92
|
+
};
|
|
93
|
+
decision_type: {
|
|
94
|
+
type: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
title: {
|
|
98
|
+
type: string;
|
|
99
|
+
};
|
|
100
|
+
question: {
|
|
101
|
+
type: string;
|
|
102
|
+
};
|
|
103
|
+
amount: {
|
|
104
|
+
type: string;
|
|
105
|
+
};
|
|
106
|
+
currency: {
|
|
107
|
+
type: string;
|
|
108
|
+
};
|
|
109
|
+
amount_label: {
|
|
110
|
+
type: string;
|
|
111
|
+
};
|
|
112
|
+
severity: {
|
|
113
|
+
type: string;
|
|
114
|
+
enum: string[];
|
|
115
|
+
};
|
|
116
|
+
flags: {
|
|
117
|
+
type: string;
|
|
118
|
+
maxItems: number;
|
|
119
|
+
items: {
|
|
120
|
+
type: string;
|
|
121
|
+
properties: {
|
|
122
|
+
field: {
|
|
123
|
+
type: string;
|
|
124
|
+
};
|
|
125
|
+
issue: {
|
|
126
|
+
type: string;
|
|
127
|
+
};
|
|
128
|
+
severity: {
|
|
129
|
+
type: string;
|
|
130
|
+
enum: string[];
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
required: string[];
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
options: {
|
|
137
|
+
type: string;
|
|
138
|
+
minItems: number;
|
|
139
|
+
maxItems: number;
|
|
140
|
+
items: {
|
|
141
|
+
type: string;
|
|
142
|
+
properties: {
|
|
143
|
+
id: {
|
|
144
|
+
type: string;
|
|
145
|
+
};
|
|
146
|
+
label: {
|
|
147
|
+
type: string;
|
|
148
|
+
};
|
|
149
|
+
recommended: {
|
|
150
|
+
type: string;
|
|
151
|
+
};
|
|
152
|
+
value: {
|
|
153
|
+
type: string;
|
|
154
|
+
description: string;
|
|
155
|
+
};
|
|
156
|
+
adjust: {
|
|
157
|
+
type: string;
|
|
158
|
+
description: string;
|
|
159
|
+
properties: {
|
|
160
|
+
min: {
|
|
161
|
+
type: string;
|
|
162
|
+
};
|
|
163
|
+
max: {
|
|
164
|
+
type: string;
|
|
165
|
+
};
|
|
166
|
+
step: {
|
|
167
|
+
type: string;
|
|
168
|
+
};
|
|
169
|
+
unit: {
|
|
170
|
+
type: string;
|
|
171
|
+
description: string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
required: string[];
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
required: string[];
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
source: {
|
|
181
|
+
type: string;
|
|
182
|
+
properties: {
|
|
183
|
+
label: {
|
|
184
|
+
type: string;
|
|
185
|
+
};
|
|
186
|
+
url: {
|
|
187
|
+
type: string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
required: string[];
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
resolved: {
|
|
196
|
+
type: string;
|
|
197
|
+
description: string;
|
|
198
|
+
properties: {
|
|
199
|
+
decisions: {
|
|
200
|
+
type: string;
|
|
201
|
+
items: {
|
|
202
|
+
type: string;
|
|
203
|
+
properties: {
|
|
204
|
+
id: {
|
|
205
|
+
type: string;
|
|
206
|
+
};
|
|
207
|
+
title: {
|
|
208
|
+
type: string;
|
|
209
|
+
};
|
|
210
|
+
option: {
|
|
211
|
+
type: string;
|
|
212
|
+
};
|
|
213
|
+
value: {
|
|
214
|
+
type: string;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
required: string[];
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
required: string[];
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
required: string[];
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
//# sourceMappingURL=decision-queue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decision-queue.d.ts","sourceRoot":"","sources":["../../src/schemas/decision-queue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmDxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmB9B,CAAC;AA2BH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqF7B,CAAC"}
|
package/dist/schemas/index.cjs
CHANGED
|
@@ -3809,6 +3809,167 @@ var decisionCardTool = {
|
|
|
3809
3809
|
required: ["type", "title", "question", "options"]
|
|
3810
3810
|
}
|
|
3811
3811
|
};
|
|
3812
|
+
var decisionQueueItemSchema = zod.z.object({
|
|
3813
|
+
id: zod.z.string().optional(),
|
|
3814
|
+
decision_type: zod.z.string().optional(),
|
|
3815
|
+
title: zod.z.string(),
|
|
3816
|
+
question: zod.z.string(),
|
|
3817
|
+
amount: zod.z.number().optional(),
|
|
3818
|
+
currency: zod.z.string().optional(),
|
|
3819
|
+
amount_label: zod.z.string().optional(),
|
|
3820
|
+
severity: zod.z.enum(["low", "medium", "high"]).optional(),
|
|
3821
|
+
flags: zod.z.array(
|
|
3822
|
+
zod.z.object({
|
|
3823
|
+
field: zod.z.string().optional(),
|
|
3824
|
+
issue: zod.z.string(),
|
|
3825
|
+
severity: zod.z.enum(["low", "medium", "high"]).optional()
|
|
3826
|
+
})
|
|
3827
|
+
).max(6).optional(),
|
|
3828
|
+
options: zod.z.array(
|
|
3829
|
+
zod.z.object({
|
|
3830
|
+
id: zod.z.string().optional(),
|
|
3831
|
+
label: zod.z.string(),
|
|
3832
|
+
recommended: zod.z.boolean().optional(),
|
|
3833
|
+
value: zod.z.number().optional(),
|
|
3834
|
+
adjust: zod.z.object({
|
|
3835
|
+
min: zod.z.number(),
|
|
3836
|
+
max: zod.z.number(),
|
|
3837
|
+
step: zod.z.number().optional(),
|
|
3838
|
+
unit: zod.z.string().optional()
|
|
3839
|
+
}).optional()
|
|
3840
|
+
})
|
|
3841
|
+
).min(1).max(5),
|
|
3842
|
+
source: zod.z.object({
|
|
3843
|
+
label: zod.z.string().optional(),
|
|
3844
|
+
url: zod.z.string().optional()
|
|
3845
|
+
}).optional()
|
|
3846
|
+
});
|
|
3847
|
+
var decisionQueueSchema = zod.z.object({
|
|
3848
|
+
type: zod.z.literal("decision-queue"),
|
|
3849
|
+
id: zod.z.string().optional(),
|
|
3850
|
+
title: zod.z.string().optional(),
|
|
3851
|
+
description: zod.z.string().optional(),
|
|
3852
|
+
submit_label: zod.z.string().optional(),
|
|
3853
|
+
items: zod.z.array(decisionQueueItemSchema).min(2).max(12),
|
|
3854
|
+
resolved: zod.z.object({
|
|
3855
|
+
decisions: zod.z.array(
|
|
3856
|
+
zod.z.object({
|
|
3857
|
+
id: zod.z.string().optional(),
|
|
3858
|
+
title: zod.z.string(),
|
|
3859
|
+
option: zod.z.string(),
|
|
3860
|
+
value: zod.z.number().optional()
|
|
3861
|
+
})
|
|
3862
|
+
)
|
|
3863
|
+
}).optional()
|
|
3864
|
+
});
|
|
3865
|
+
var OPTION_ITEM_JSON = {
|
|
3866
|
+
type: "object",
|
|
3867
|
+
properties: {
|
|
3868
|
+
id: { type: "string" },
|
|
3869
|
+
label: { type: "string" },
|
|
3870
|
+
recommended: { type: "boolean" },
|
|
3871
|
+
value: {
|
|
3872
|
+
type: "number",
|
|
3873
|
+
description: "Suggested numeric figure for this option (starting point of the adjuster)"
|
|
3874
|
+
},
|
|
3875
|
+
adjust: {
|
|
3876
|
+
type: "object",
|
|
3877
|
+
description: "Allow the user to tune `value` within this inclusive range before deciding",
|
|
3878
|
+
properties: {
|
|
3879
|
+
min: { type: "number" },
|
|
3880
|
+
max: { type: "number" },
|
|
3881
|
+
step: { type: "number" },
|
|
3882
|
+
unit: { type: "string", description: "Short unit suffix, e.g. 'units', '%', 'hrs'" }
|
|
3883
|
+
},
|
|
3884
|
+
required: ["min", "max"]
|
|
3885
|
+
}
|
|
3886
|
+
},
|
|
3887
|
+
required: ["label"]
|
|
3888
|
+
};
|
|
3889
|
+
var decisionQueueTool = {
|
|
3890
|
+
name: "render_decision_queue",
|
|
3891
|
+
description: "Render a SEQUENTIAL QUEUE of 2-12 related human-in-the-loop judgments, decided one at a time at full decision-card richness (amount at stake, data-quality flags, adjustable figures, source links) and submitted TOGETHER as one reply. Use whenever MORE THAN ONE decision is pending in the same turn \u2014 never emit multiple loose decision-cards. Give deferrable items an explicit 'leave open'-style option so the user can always complete the queue. For a single judgment use decision-card; for typed field input (names, dates, uploads) use render_builder.",
|
|
3892
|
+
input_schema: {
|
|
3893
|
+
type: "object",
|
|
3894
|
+
properties: {
|
|
3895
|
+
type: { type: "string", enum: ["decision-queue"] },
|
|
3896
|
+
id: { type: "string", description: "Stable id for update-in-place rendering" },
|
|
3897
|
+
title: {
|
|
3898
|
+
type: "string",
|
|
3899
|
+
description: "Batch headline shown in the header, e.g. 'Reconciliation exceptions'"
|
|
3900
|
+
},
|
|
3901
|
+
description: { type: "string", description: "One-line context above the queue" },
|
|
3902
|
+
submit_label: { type: "string", description: "CTA label; defaults to 'Submit N decisions'" },
|
|
3903
|
+
items: {
|
|
3904
|
+
type: "array",
|
|
3905
|
+
minItems: 2,
|
|
3906
|
+
maxItems: 12,
|
|
3907
|
+
description: "The pending judgments, in the order the user should take them. Each is a full decision-card body (no `type`).",
|
|
3908
|
+
items: {
|
|
3909
|
+
type: "object",
|
|
3910
|
+
properties: {
|
|
3911
|
+
id: { type: "string" },
|
|
3912
|
+
decision_type: {
|
|
3913
|
+
type: "string",
|
|
3914
|
+
description: "Short category eyebrow, e.g. 'Duplicate', 'Capitalization'"
|
|
3915
|
+
},
|
|
3916
|
+
title: { type: "string" },
|
|
3917
|
+
question: { type: "string" },
|
|
3918
|
+
amount: { type: "number" },
|
|
3919
|
+
currency: { type: "string" },
|
|
3920
|
+
amount_label: { type: "string" },
|
|
3921
|
+
severity: { type: "string", enum: ["low", "medium", "high"] },
|
|
3922
|
+
flags: {
|
|
3923
|
+
type: "array",
|
|
3924
|
+
maxItems: 6,
|
|
3925
|
+
items: {
|
|
3926
|
+
type: "object",
|
|
3927
|
+
properties: {
|
|
3928
|
+
field: { type: "string" },
|
|
3929
|
+
issue: { type: "string" },
|
|
3930
|
+
severity: { type: "string", enum: ["low", "medium", "high"] }
|
|
3931
|
+
},
|
|
3932
|
+
required: ["issue"]
|
|
3933
|
+
}
|
|
3934
|
+
},
|
|
3935
|
+
options: {
|
|
3936
|
+
type: "array",
|
|
3937
|
+
minItems: 1,
|
|
3938
|
+
maxItems: 5,
|
|
3939
|
+
items: OPTION_ITEM_JSON
|
|
3940
|
+
},
|
|
3941
|
+
source: {
|
|
3942
|
+
type: "object",
|
|
3943
|
+
properties: { label: { type: "string" }, url: { type: "string" } }
|
|
3944
|
+
}
|
|
3945
|
+
},
|
|
3946
|
+
required: ["title", "question", "options"]
|
|
3947
|
+
}
|
|
3948
|
+
},
|
|
3949
|
+
resolved: {
|
|
3950
|
+
type: "object",
|
|
3951
|
+
description: "Pre-resolved state for transcript replay",
|
|
3952
|
+
properties: {
|
|
3953
|
+
decisions: {
|
|
3954
|
+
type: "array",
|
|
3955
|
+
items: {
|
|
3956
|
+
type: "object",
|
|
3957
|
+
properties: {
|
|
3958
|
+
id: { type: "string" },
|
|
3959
|
+
title: { type: "string" },
|
|
3960
|
+
option: { type: "string" },
|
|
3961
|
+
value: { type: "number" }
|
|
3962
|
+
},
|
|
3963
|
+
required: ["title", "option"]
|
|
3964
|
+
}
|
|
3965
|
+
}
|
|
3966
|
+
},
|
|
3967
|
+
required: ["decisions"]
|
|
3968
|
+
}
|
|
3969
|
+
},
|
|
3970
|
+
required: ["type", "items"]
|
|
3971
|
+
}
|
|
3972
|
+
};
|
|
3812
3973
|
var tabbyAuthSchema = zod.z.object({
|
|
3813
3974
|
type: zod.z.literal("tabby-auth"),
|
|
3814
3975
|
app: zod.z.string(),
|
|
@@ -3960,6 +4121,7 @@ var schemaRegistry = {
|
|
|
3960
4121
|
"workflow-stepper": { schema: workflowStepperSchema, tool: workflowStepperTool },
|
|
3961
4122
|
"document-field-extraction": { schema: documentFieldExtractionSchema, tool: documentFieldExtractionTool },
|
|
3962
4123
|
"decision-card": { schema: decisionCardSchema, tool: decisionCardTool },
|
|
4124
|
+
"decision-queue": { schema: decisionQueueSchema, tool: decisionQueueTool },
|
|
3963
4125
|
"tabby-auth": { schema: tabbyAuthSchema, tool: tabbyAuthTool }
|
|
3964
4126
|
};
|
|
3965
4127
|
|