@adoptai/genui-components 0.1.56 → 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.
- package/dist/builders/BuilderForm.d.ts.map +1 -1
- package/dist/composites/decision-card/resolver.cjs +634 -0
- package/dist/composites/decision-card/resolver.cjs.map +1 -0
- package/dist/composites/decision-card/resolver.d.ts +13 -0
- package/dist/composites/decision-card/resolver.d.ts.map +1 -0
- package/dist/composites/decision-card/resolver.js +627 -0
- package/dist/composites/decision-card/resolver.js.map +1 -0
- package/dist/composites/workflow-stepper/resolver.cjs +4 -1
- package/dist/composites/workflow-stepper/resolver.cjs.map +1 -1
- package/dist/composites/workflow-stepper/resolver.js +4 -1
- package/dist/composites/workflow-stepper/resolver.js.map +1 -1
- package/dist/index.cjs +513 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +512 -12
- package/dist/index.js.map +1 -1
- package/dist/renderer.cjs +504 -8
- package/dist/renderer.cjs.map +1 -1
- package/dist/renderer.js +504 -8
- package/dist/renderer.js.map +1 -1
- package/dist/resolver.cjs +504 -8
- package/dist/resolver.cjs.map +1 -1
- package/dist/resolver.d.ts.map +1 -1
- package/dist/resolver.js +504 -8
- package/dist/resolver.js.map +1 -1
- package/dist/schemas/decision-card.d.ts +149 -0
- package/dist/schemas/decision-card.d.ts.map +1 -0
- package/dist/schemas/index.cjs +105 -1
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.ts +149 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +105 -1
- 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 +135 -3
- package/package.json +1 -1
package/dist/schemas/index.d.ts
CHANGED
|
@@ -5146,6 +5146,155 @@ export declare const schemaRegistry: {
|
|
|
5146
5146
|
};
|
|
5147
5147
|
};
|
|
5148
5148
|
};
|
|
5149
|
+
"decision-card": {
|
|
5150
|
+
schema: z.ZodObject<{
|
|
5151
|
+
type: z.ZodLiteral<"decision-card">;
|
|
5152
|
+
id: z.ZodOptional<z.ZodString>;
|
|
5153
|
+
decision_type: z.ZodOptional<z.ZodString>;
|
|
5154
|
+
title: z.ZodString;
|
|
5155
|
+
question: z.ZodString;
|
|
5156
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
5157
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
5158
|
+
amount_label: z.ZodOptional<z.ZodString>;
|
|
5159
|
+
severity: z.ZodOptional<z.ZodEnum<{
|
|
5160
|
+
high: "high";
|
|
5161
|
+
medium: "medium";
|
|
5162
|
+
low: "low";
|
|
5163
|
+
}>>;
|
|
5164
|
+
flags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5165
|
+
field: z.ZodOptional<z.ZodString>;
|
|
5166
|
+
issue: z.ZodString;
|
|
5167
|
+
severity: z.ZodOptional<z.ZodEnum<{
|
|
5168
|
+
high: "high";
|
|
5169
|
+
medium: "medium";
|
|
5170
|
+
low: "low";
|
|
5171
|
+
}>>;
|
|
5172
|
+
}, z.core.$strip>>>;
|
|
5173
|
+
options: z.ZodArray<z.ZodObject<{
|
|
5174
|
+
id: z.ZodOptional<z.ZodString>;
|
|
5175
|
+
label: z.ZodString;
|
|
5176
|
+
recommended: z.ZodOptional<z.ZodBoolean>;
|
|
5177
|
+
}, z.core.$strip>>;
|
|
5178
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
5179
|
+
label: z.ZodOptional<z.ZodString>;
|
|
5180
|
+
url: z.ZodOptional<z.ZodString>;
|
|
5181
|
+
}, z.core.$strip>>;
|
|
5182
|
+
resolved: z.ZodOptional<z.ZodObject<{
|
|
5183
|
+
option: z.ZodString;
|
|
5184
|
+
}, z.core.$strip>>;
|
|
5185
|
+
}, z.core.$strip>;
|
|
5186
|
+
tool: {
|
|
5187
|
+
name: string;
|
|
5188
|
+
description: string;
|
|
5189
|
+
input_schema: {
|
|
5190
|
+
type: "object";
|
|
5191
|
+
properties: {
|
|
5192
|
+
type: {
|
|
5193
|
+
type: string;
|
|
5194
|
+
enum: string[];
|
|
5195
|
+
};
|
|
5196
|
+
id: {
|
|
5197
|
+
type: string;
|
|
5198
|
+
description: string;
|
|
5199
|
+
};
|
|
5200
|
+
decision_type: {
|
|
5201
|
+
type: string;
|
|
5202
|
+
description: string;
|
|
5203
|
+
};
|
|
5204
|
+
title: {
|
|
5205
|
+
type: string;
|
|
5206
|
+
description: string;
|
|
5207
|
+
};
|
|
5208
|
+
question: {
|
|
5209
|
+
type: string;
|
|
5210
|
+
description: string;
|
|
5211
|
+
};
|
|
5212
|
+
amount: {
|
|
5213
|
+
type: string;
|
|
5214
|
+
description: string;
|
|
5215
|
+
};
|
|
5216
|
+
currency: {
|
|
5217
|
+
type: string;
|
|
5218
|
+
description: string;
|
|
5219
|
+
};
|
|
5220
|
+
amount_label: {
|
|
5221
|
+
type: string;
|
|
5222
|
+
description: string;
|
|
5223
|
+
};
|
|
5224
|
+
severity: {
|
|
5225
|
+
type: string;
|
|
5226
|
+
enum: string[];
|
|
5227
|
+
description: string;
|
|
5228
|
+
};
|
|
5229
|
+
flags: {
|
|
5230
|
+
type: string;
|
|
5231
|
+
maxItems: number;
|
|
5232
|
+
description: string;
|
|
5233
|
+
items: {
|
|
5234
|
+
type: string;
|
|
5235
|
+
properties: {
|
|
5236
|
+
field: {
|
|
5237
|
+
type: string;
|
|
5238
|
+
};
|
|
5239
|
+
issue: {
|
|
5240
|
+
type: string;
|
|
5241
|
+
};
|
|
5242
|
+
severity: {
|
|
5243
|
+
type: string;
|
|
5244
|
+
enum: string[];
|
|
5245
|
+
};
|
|
5246
|
+
};
|
|
5247
|
+
required: string[];
|
|
5248
|
+
};
|
|
5249
|
+
};
|
|
5250
|
+
options: {
|
|
5251
|
+
type: string;
|
|
5252
|
+
minItems: number;
|
|
5253
|
+
maxItems: number;
|
|
5254
|
+
description: string;
|
|
5255
|
+
items: {
|
|
5256
|
+
type: string;
|
|
5257
|
+
properties: {
|
|
5258
|
+
id: {
|
|
5259
|
+
type: string;
|
|
5260
|
+
};
|
|
5261
|
+
label: {
|
|
5262
|
+
type: string;
|
|
5263
|
+
};
|
|
5264
|
+
recommended: {
|
|
5265
|
+
type: string;
|
|
5266
|
+
};
|
|
5267
|
+
};
|
|
5268
|
+
required: string[];
|
|
5269
|
+
};
|
|
5270
|
+
};
|
|
5271
|
+
source: {
|
|
5272
|
+
type: string;
|
|
5273
|
+
description: string;
|
|
5274
|
+
properties: {
|
|
5275
|
+
label: {
|
|
5276
|
+
type: string;
|
|
5277
|
+
};
|
|
5278
|
+
url: {
|
|
5279
|
+
type: string;
|
|
5280
|
+
};
|
|
5281
|
+
};
|
|
5282
|
+
};
|
|
5283
|
+
resolved: {
|
|
5284
|
+
type: string;
|
|
5285
|
+
description: string;
|
|
5286
|
+
properties: {
|
|
5287
|
+
option: {
|
|
5288
|
+
type: string;
|
|
5289
|
+
};
|
|
5290
|
+
};
|
|
5291
|
+
required: string[];
|
|
5292
|
+
};
|
|
5293
|
+
};
|
|
5294
|
+
required: string[];
|
|
5295
|
+
};
|
|
5296
|
+
};
|
|
5297
|
+
};
|
|
5149
5298
|
};
|
|
5150
5299
|
export type SchemaPayload<T extends keyof typeof schemaRegistry> = z.infer<(typeof schemaRegistry)[T]["schema"]>;
|
|
5151
5300
|
export { buildRenderUITool } from "./buildRenderUITool";
|
|
@@ -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;
|
|
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,MAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgH4C,CAAC;AAEnE,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,MAAM,OAAO,cAAc,IAC7D,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -3453,6 +3453,109 @@ var workflowStepperTool = {
|
|
|
3453
3453
|
required: ["type", "title", "steps"]
|
|
3454
3454
|
}
|
|
3455
3455
|
};
|
|
3456
|
+
var decisionCardSchema = z.object({
|
|
3457
|
+
type: z.literal("decision-card"),
|
|
3458
|
+
id: z.string().optional(),
|
|
3459
|
+
decision_type: z.string().optional(),
|
|
3460
|
+
title: z.string(),
|
|
3461
|
+
question: z.string(),
|
|
3462
|
+
amount: z.number().optional(),
|
|
3463
|
+
currency: z.string().optional(),
|
|
3464
|
+
amount_label: z.string().optional(),
|
|
3465
|
+
severity: z.enum(["low", "medium", "high"]).optional(),
|
|
3466
|
+
flags: z.array(
|
|
3467
|
+
z.object({
|
|
3468
|
+
field: z.string().optional(),
|
|
3469
|
+
issue: z.string(),
|
|
3470
|
+
severity: z.enum(["low", "medium", "high"]).optional()
|
|
3471
|
+
})
|
|
3472
|
+
).max(6).optional(),
|
|
3473
|
+
options: z.array(
|
|
3474
|
+
z.object({
|
|
3475
|
+
id: z.string().optional(),
|
|
3476
|
+
label: z.string(),
|
|
3477
|
+
recommended: z.boolean().optional()
|
|
3478
|
+
})
|
|
3479
|
+
).min(1).max(5),
|
|
3480
|
+
source: z.object({
|
|
3481
|
+
label: z.string().optional(),
|
|
3482
|
+
url: z.string().optional()
|
|
3483
|
+
}).optional(),
|
|
3484
|
+
resolved: z.object({
|
|
3485
|
+
option: z.string()
|
|
3486
|
+
}).optional()
|
|
3487
|
+
});
|
|
3488
|
+
var decisionCardTool = {
|
|
3489
|
+
name: "render_decision_card",
|
|
3490
|
+
description: "Render an inline human-in-the-loop (HITL) decision card \u2014 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).",
|
|
3491
|
+
input_schema: {
|
|
3492
|
+
type: "object",
|
|
3493
|
+
properties: {
|
|
3494
|
+
type: { type: "string", enum: ["decision-card"] },
|
|
3495
|
+
id: { type: "string", description: "Stable id for update-in-place rendering" },
|
|
3496
|
+
decision_type: {
|
|
3497
|
+
type: "string",
|
|
3498
|
+
description: "Short category shown in the eyebrow, e.g. 'Cross-check', 'Allocation', 'Reserve'"
|
|
3499
|
+
},
|
|
3500
|
+
title: { type: "string", description: "The decision headline, e.g. 'AR reserve adequacy'" },
|
|
3501
|
+
question: { type: "string", description: "The full question / context the user must judge" },
|
|
3502
|
+
amount: { type: "number", description: "Dollar value at stake, e.g. 27100" },
|
|
3503
|
+
currency: { type: "string", description: "ISO currency code; defaults to USD" },
|
|
3504
|
+
amount_label: { type: "string", description: "Caption above the amount, e.g. 'At stake'" },
|
|
3505
|
+
severity: {
|
|
3506
|
+
type: "string",
|
|
3507
|
+
enum: ["low", "medium", "high"],
|
|
3508
|
+
description: "Severity of the decision; tints the accent rail"
|
|
3509
|
+
},
|
|
3510
|
+
flags: {
|
|
3511
|
+
type: "array",
|
|
3512
|
+
maxItems: 6,
|
|
3513
|
+
description: "Optional data-quality flags surfaced on the card",
|
|
3514
|
+
items: {
|
|
3515
|
+
type: "object",
|
|
3516
|
+
properties: {
|
|
3517
|
+
field: { type: "string" },
|
|
3518
|
+
issue: { type: "string" },
|
|
3519
|
+
severity: { type: "string", enum: ["low", "medium", "high"] }
|
|
3520
|
+
},
|
|
3521
|
+
required: ["issue"]
|
|
3522
|
+
}
|
|
3523
|
+
},
|
|
3524
|
+
options: {
|
|
3525
|
+
type: "array",
|
|
3526
|
+
minItems: 1,
|
|
3527
|
+
maxItems: 5,
|
|
3528
|
+
description: "Mutually-exclusive resolution choices; mark one `recommended` to make it primary",
|
|
3529
|
+
items: {
|
|
3530
|
+
type: "object",
|
|
3531
|
+
properties: {
|
|
3532
|
+
id: { type: "string" },
|
|
3533
|
+
label: { type: "string" },
|
|
3534
|
+
recommended: { type: "boolean" }
|
|
3535
|
+
},
|
|
3536
|
+
required: ["label"]
|
|
3537
|
+
}
|
|
3538
|
+
},
|
|
3539
|
+
source: {
|
|
3540
|
+
type: "object",
|
|
3541
|
+
description: "Optional provenance link for the figure",
|
|
3542
|
+
properties: {
|
|
3543
|
+
label: { type: "string" },
|
|
3544
|
+
url: { type: "string" }
|
|
3545
|
+
}
|
|
3546
|
+
},
|
|
3547
|
+
resolved: {
|
|
3548
|
+
type: "object",
|
|
3549
|
+
description: "Pre-resolved state for transcript replay",
|
|
3550
|
+
properties: {
|
|
3551
|
+
option: { type: "string" }
|
|
3552
|
+
},
|
|
3553
|
+
required: ["option"]
|
|
3554
|
+
}
|
|
3555
|
+
},
|
|
3556
|
+
required: ["type", "title", "question", "options"]
|
|
3557
|
+
}
|
|
3558
|
+
};
|
|
3456
3559
|
|
|
3457
3560
|
// src/schemas/buildRenderUITool.ts
|
|
3458
3561
|
function buildRenderUITool(selectedSchemas) {
|
|
@@ -3571,7 +3674,8 @@ var schemaRegistry = {
|
|
|
3571
3674
|
"connect-integration": { schema: connectIntegrationSchema, tool: connectIntegrationTool },
|
|
3572
3675
|
"integrations-list": { schema: integrationsListSchema, tool: integrationsListTool },
|
|
3573
3676
|
"pipeline-preview": { schema: pipelinePreviewSchema, tool: pipelinePreviewTool },
|
|
3574
|
-
"workflow-stepper": { schema: workflowStepperSchema, tool: workflowStepperTool }
|
|
3677
|
+
"workflow-stepper": { schema: workflowStepperSchema, tool: workflowStepperTool },
|
|
3678
|
+
"decision-card": { schema: decisionCardSchema, tool: decisionCardTool }
|
|
3575
3679
|
};
|
|
3576
3680
|
|
|
3577
3681
|
export { buildRenderUITool, schemaRegistry, validatePayload };
|