@simple-ai-lab/sdk 0.11.0 → 0.14.0
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/README.md +1 -0
- package/dist/actions.cjs +29 -0
- package/dist/actions.d.cts +35 -1
- package/dist/actions.d.ts +35 -1
- package/dist/actions.js +30 -1
- package/dist/agents.cjs +187 -15
- package/dist/agents.d.cts +231 -9
- package/dist/agents.d.ts +231 -9
- package/dist/agents.js +185 -14
- package/dist/built-in-actions.cjs +31 -2
- package/dist/built-in-actions.d.cts +27 -1
- package/dist/built-in-actions.d.ts +27 -1
- package/dist/built-in-actions.js +29 -1
- package/dist/client.cjs +4 -0
- package/dist/client.d.cts +3 -0
- package/dist/client.d.ts +3 -0
- package/dist/client.js +4 -0
- package/dist/code-action/define-action.cjs +2 -0
- package/dist/code-action/define-action.d.cts +17 -1
- package/dist/code-action/define-action.d.ts +17 -1
- package/dist/code-action/define-action.js +2 -0
- package/dist/code-action/index.d.cts +1 -1
- package/dist/code-action/index.d.ts +1 -1
- package/dist/code-action/types.d.cts +11 -0
- package/dist/code-action/types.d.ts +11 -0
- package/dist/index.cjs +11 -4
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +4 -4
- package/dist/oauth.cjs +18 -0
- package/dist/oauth.d.cts +9 -0
- package/dist/oauth.d.ts +9 -0
- package/dist/oauth.js +14 -0
- package/dist/projects.cjs +47 -121
- package/dist/projects.d.cts +5 -19
- package/dist/projects.d.ts +5 -19
- package/dist/projects.js +46 -119
- package/dist/schemas.cjs +27 -1
- package/dist/schemas.d.cts +20 -0
- package/dist/schemas.d.ts +20 -0
- package/dist/schemas.js +26 -0
- package/package.json +9 -9
package/dist/agents.js
CHANGED
|
@@ -34,6 +34,18 @@ export function defaultBackgroundNoise({ voiceBackgroundNoise, }) {
|
|
|
34
34
|
}
|
|
35
35
|
/** How long the agent waits before checking in on a silent caller. Matches the product default. */
|
|
36
36
|
export const DEFAULT_CHECK_IN_AFTER_SILENCE_DELAY_SECONDS = 30;
|
|
37
|
+
/**
|
|
38
|
+
* The `:` keeps these apart from callable keys, which `canonicalAuthoringKey` limits to letters, digits and `-`;
|
|
39
|
+
* otherwise a callable named "Call end" would take the call-end run's use site. Projects pulled before the prefix
|
|
40
|
+
* name the old key in their source, which is looked up first.
|
|
41
|
+
*/
|
|
42
|
+
export const BEFORE_CALL_ACTION_KEY = 'automatic:before-call-start';
|
|
43
|
+
export const CALL_END_ACTION_KEY = 'automatic:call-end';
|
|
44
|
+
/** The identity key of an Agent Assist step or card button's run, by the id the playbook stores for it. */
|
|
45
|
+
export function assistActionRunKey({ kind, id }) {
|
|
46
|
+
return `assist-${kind}:${id}`;
|
|
47
|
+
}
|
|
48
|
+
export const GUARDRAIL_MODES = ['enforce', 'monitor'];
|
|
37
49
|
function llmOverrideWire(override) {
|
|
38
50
|
return { llmModelUuid: override.modelUuid, temperature: override.temperature };
|
|
39
51
|
}
|
|
@@ -79,8 +91,17 @@ function transferCapabilityFrom(authored) {
|
|
|
79
91
|
mode: authored?.mode ?? defaults.mode,
|
|
80
92
|
description: authored?.description ?? defaults.description,
|
|
81
93
|
voicemailMessage: authored?.voicemailMessage ?? defaults.voicemailMessage,
|
|
94
|
+
...(authored?.briefing === undefined ? {} : { briefing: authored.briefing }),
|
|
82
95
|
};
|
|
83
96
|
}
|
|
97
|
+
/** Checked at runtime too: the CLI compiles source without typechecking it. */
|
|
98
|
+
function requiredNodeCheck({ nodeCheck }) {
|
|
99
|
+
if (typeof nodeCheck !== 'boolean') {
|
|
100
|
+
throw new Error('`nodeCheck` is required: `true` runs the background node check, which the product starts new Agents with; ' +
|
|
101
|
+
'`false` is how Agents pulled before it existed run');
|
|
102
|
+
}
|
|
103
|
+
return nodeCheck;
|
|
104
|
+
}
|
|
84
105
|
export function defineAgent(input) {
|
|
85
106
|
const voiceBackgroundNoise = input.voice?.backgroundNoise ?? 'off';
|
|
86
107
|
return {
|
|
@@ -155,6 +176,10 @@ export function defineAgent(input) {
|
|
|
155
176
|
tools: input.tools ?? [],
|
|
156
177
|
knowledgeBases: input.knowledgeBases ?? [],
|
|
157
178
|
beforeCallAction: input.beforeCallAction ?? null,
|
|
179
|
+
callEndAction: input.callEndAction ?? null,
|
|
180
|
+
guardrails: input.guardrails ?? [],
|
|
181
|
+
nodeCheck: requiredNodeCheck({ nodeCheck: input.nodeCheck }),
|
|
182
|
+
assist: input.assist ?? null,
|
|
158
183
|
summaryPrompt: input.summaryPrompt ?? null,
|
|
159
184
|
abTestGroupIds: input.abTestGroupIds ?? null,
|
|
160
185
|
actions: input.actions ?? null,
|
|
@@ -461,6 +486,22 @@ function compileCallableUseSite({ callable, canonicalKey, options, }) {
|
|
|
461
486
|
inputMappings[pointerForInputName(MODEL_BACKGROUND_MESSAGE_PARAMETER)] === undefined) {
|
|
462
487
|
throw new Error(`Callable Action "${callable.key}" cannot ask the model for a background message because the Action already declares an input named "${MODEL_BACKGROUND_MESSAGE_PARAMETER}"; prefill it with action.from(...) or use an authored message`);
|
|
463
488
|
}
|
|
489
|
+
// Same rules as the server's, checked here so an author hears about them from `compileAgent`.
|
|
490
|
+
// An unknown input is only detectable when the Action's contract is known.
|
|
491
|
+
const labelEntries = Object.entries(callable.inputLabels ?? {});
|
|
492
|
+
for (const [name, label] of labelEntries) {
|
|
493
|
+
if (label.sensitive === undefined && label.hidden === undefined) {
|
|
494
|
+
throw new Error(`Callable Action "${callable.key}" labels input "${name}" with neither sensitive nor hidden`);
|
|
495
|
+
}
|
|
496
|
+
if (callable.action.contract !== null && !Object.hasOwn(contractProperties, name)) {
|
|
497
|
+
throw new Error(`Callable Action "${callable.key}" labels unknown Action input "${name}"`);
|
|
498
|
+
}
|
|
499
|
+
// Scrubbing a two-valued input still gives its value away; the server's commit validation says why.
|
|
500
|
+
if (label.sensitive !== undefined && contractProperties[name]?.type === 'boolean') {
|
|
501
|
+
throw new Error(`Callable Action "${callable.key}" marks boolean input "${name}" sensitive; boolean inputs can't be sensitive`);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
const inputLabels = Object.fromEntries(labelEntries.map(([name, label]) => [pointerForInputName(name), label]));
|
|
464
505
|
return {
|
|
465
506
|
actionUseSiteUuid: resolveIdentity({
|
|
466
507
|
options,
|
|
@@ -472,6 +513,7 @@ function compileCallableUseSite({ callable, canonicalKey, options, }) {
|
|
|
472
513
|
name: callable.name,
|
|
473
514
|
description: callable.description,
|
|
474
515
|
inputDescriptions,
|
|
516
|
+
...(labelEntries.length === 0 ? {} : { inputLabels }),
|
|
475
517
|
inputMappings,
|
|
476
518
|
outputParameterMappings: compileOutputParameterMappings({
|
|
477
519
|
key: callable.key,
|
|
@@ -481,14 +523,13 @@ function compileCallableUseSite({ callable, canonicalKey, options, }) {
|
|
|
481
523
|
backgroundMessage,
|
|
482
524
|
};
|
|
483
525
|
}
|
|
484
|
-
function compileActionRun({ run, trigger,
|
|
526
|
+
function compileActionRun({ run, trigger, identityKeys, options, }) {
|
|
527
|
+
return { ...compileActionUseSite({ run, identityKeys, options }), trigger };
|
|
528
|
+
}
|
|
529
|
+
/** An Action run as a bare use site, which is what Agent Assist steps and card buttons store. */
|
|
530
|
+
function compileActionUseSite({ run, identityKeys: [key, ...fallbackKeys], options, }) {
|
|
485
531
|
return {
|
|
486
|
-
actionUseSiteUuid: resolveIdentity({
|
|
487
|
-
options,
|
|
488
|
-
kind: 'action-use-site',
|
|
489
|
-
key: run.key,
|
|
490
|
-
fallbackKeys: [canonicalKey],
|
|
491
|
-
}),
|
|
532
|
+
actionUseSiteUuid: resolveIdentity({ options, kind: 'action-use-site', key, fallbackKeys }),
|
|
492
533
|
actionVersionUuid: resolveActionVersion({ definition: run.action, options }),
|
|
493
534
|
inputMappings: Object.fromEntries(Object.entries(run.inputs).map(([name, value]) => [
|
|
494
535
|
name.startsWith('/') ? name : pointerForInputName(name),
|
|
@@ -499,7 +540,6 @@ function compileActionRun({ run, trigger, canonicalKey, options, }) {
|
|
|
499
540
|
outputParameters: run.outputParameters,
|
|
500
541
|
outputParameterMappings: run.outputParameterMappings,
|
|
501
542
|
}),
|
|
502
|
-
trigger,
|
|
503
543
|
};
|
|
504
544
|
}
|
|
505
545
|
/** Product defaults for retrieval settings the author leaves out. */
|
|
@@ -573,6 +613,79 @@ function validateDeclaredActions({ declared, nodes, }) {
|
|
|
573
613
|
}
|
|
574
614
|
}
|
|
575
615
|
}
|
|
616
|
+
/** Every Action an Agent Assist playbook runs: its procedures' steps first, then its card buttons. */
|
|
617
|
+
function assistActionRuns(assist) {
|
|
618
|
+
if (assist === null) {
|
|
619
|
+
return [];
|
|
620
|
+
}
|
|
621
|
+
return [
|
|
622
|
+
...assist.procedures.flatMap((procedure) => procedure.steps.flatMap((step) => (step.kind === 'run_action' ? [step.action] : []))),
|
|
623
|
+
...assist.cards.flatMap((card) => card.buttons.map((button) => button.action)),
|
|
624
|
+
];
|
|
625
|
+
}
|
|
626
|
+
function compileAssist({ assist, options, }) {
|
|
627
|
+
// Keyed by the stored id, which the playbook keeps unique, so a run shared by several steps or keyed like a
|
|
628
|
+
// callable still gets a use site of its own.
|
|
629
|
+
const useSite = ({ run, kind, id }) => compileActionUseSite({ run, identityKeys: [assistActionRunKey({ kind, id })], options });
|
|
630
|
+
return {
|
|
631
|
+
procedures: assist.procedures.map((procedure) => ({
|
|
632
|
+
id: procedure.id,
|
|
633
|
+
name: procedure.name,
|
|
634
|
+
hook: procedure.hook,
|
|
635
|
+
steps: procedure.steps.map((step) => {
|
|
636
|
+
switch (step.kind) {
|
|
637
|
+
case 'run_action':
|
|
638
|
+
return {
|
|
639
|
+
id: step.id,
|
|
640
|
+
kind: 'run_action',
|
|
641
|
+
action: useSite({ run: step.action, kind: 'step', id: step.id }),
|
|
642
|
+
};
|
|
643
|
+
case 'show_card':
|
|
644
|
+
case 'show_checklist':
|
|
645
|
+
return step;
|
|
646
|
+
default: {
|
|
647
|
+
step;
|
|
648
|
+
throw new Error(`Unhandled Agent Assist step: ${JSON.stringify(step)}`);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
}),
|
|
652
|
+
})),
|
|
653
|
+
cards: assist.cards.map((card) => ({
|
|
654
|
+
id: card.id,
|
|
655
|
+
name: card.name,
|
|
656
|
+
title: card.title,
|
|
657
|
+
body: card.body,
|
|
658
|
+
buttons: card.buttons.map((button) => ({
|
|
659
|
+
id: button.id,
|
|
660
|
+
label: button.label,
|
|
661
|
+
action: useSite({ run: button.action, kind: 'button', id: button.id }),
|
|
662
|
+
})),
|
|
663
|
+
})),
|
|
664
|
+
checklists: assist.checklists.map((checklist) => ({
|
|
665
|
+
id: checklist.id,
|
|
666
|
+
name: checklist.name,
|
|
667
|
+
items: resolveExtractionFields(checklist.items),
|
|
668
|
+
})),
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
function compileGuardrails({ guardrails, nodeUuids, }) {
|
|
672
|
+
return guardrails.map((assignment) => {
|
|
673
|
+
let nodeUuid = null;
|
|
674
|
+
if (assignment.node !== null) {
|
|
675
|
+
const resolved = nodeUuids.get(assignment.node);
|
|
676
|
+
if (resolved === undefined) {
|
|
677
|
+
throw new Error(`Guardrail ${assignment.guardrail.uuid} moves the call to node "${assignment.node}", which this Agent does not have`);
|
|
678
|
+
}
|
|
679
|
+
nodeUuid = resolved;
|
|
680
|
+
}
|
|
681
|
+
return {
|
|
682
|
+
guardrailUuid: assignment.guardrail.uuid,
|
|
683
|
+
version: assignment.version,
|
|
684
|
+
mode: assignment.mode,
|
|
685
|
+
nodeUuid,
|
|
686
|
+
};
|
|
687
|
+
});
|
|
688
|
+
}
|
|
576
689
|
function collectInlineActions(definition) {
|
|
577
690
|
const byKey = new Map();
|
|
578
691
|
const visit = (actionDefinition) => {
|
|
@@ -588,8 +701,10 @@ function collectInlineActions(definition) {
|
|
|
588
701
|
for (const callable of definition.actions ?? collectCallableActions(definition.nodes)) {
|
|
589
702
|
visit(callable.action);
|
|
590
703
|
}
|
|
591
|
-
|
|
592
|
-
|
|
704
|
+
for (const run of [definition.beforeCallAction, definition.callEndAction, ...assistActionRuns(definition.assist)]) {
|
|
705
|
+
if (run !== null) {
|
|
706
|
+
visit(run.action);
|
|
707
|
+
}
|
|
593
708
|
}
|
|
594
709
|
for (const definitionNode of definition.nodes) {
|
|
595
710
|
if (definitionNode.type === 'action') {
|
|
@@ -661,6 +776,13 @@ function nodeCapabilities(alwaysAvailable) {
|
|
|
661
776
|
},
|
|
662
777
|
};
|
|
663
778
|
}
|
|
779
|
+
/** A node option must include at least one part; null is the only way to include none. */
|
|
780
|
+
function compileContactHistory({ nodeKey, option, }) {
|
|
781
|
+
if (option !== null && !option.summary && !option.facts && !option.entities) {
|
|
782
|
+
throw new Error(`Prompt node "${nodeKey}" includes no part of the contact history; set contactHistory to null to include none`);
|
|
783
|
+
}
|
|
784
|
+
return option;
|
|
785
|
+
}
|
|
664
786
|
function promptNodeCapabilities(definition) {
|
|
665
787
|
const base = nodeCapabilities(definition.alwaysAvailable);
|
|
666
788
|
if (definition.transfer === undefined) {
|
|
@@ -706,7 +828,7 @@ function compileNode({ definition, canonicalNodeKey, canonicalCallableKeys, inde
|
|
|
706
828
|
: compileActionRun({
|
|
707
829
|
run: definition.perTurnAction,
|
|
708
830
|
trigger: 'every_turn',
|
|
709
|
-
|
|
831
|
+
identityKeys: [definition.perTurnAction.key, `${canonicalNodeKey}:every-turn`],
|
|
710
832
|
options,
|
|
711
833
|
});
|
|
712
834
|
return {
|
|
@@ -756,6 +878,9 @@ function compileNode({ definition, canonicalNodeKey, canonicalCallableKeys, inde
|
|
|
756
878
|
perTurnRetrieval: definition.perTurnRetrieval === null ? null : compilePerTurnRetrieval(definition.perTurnRetrieval),
|
|
757
879
|
}),
|
|
758
880
|
...(definition.perTurnAction === undefined ? {} : { perTurnAction }),
|
|
881
|
+
...(definition.contactHistory === undefined
|
|
882
|
+
? {}
|
|
883
|
+
: { contactHistory: compileContactHistory({ nodeKey: definition.key, option: definition.contactHistory }) }),
|
|
759
884
|
};
|
|
760
885
|
}
|
|
761
886
|
case 'action':
|
|
@@ -803,6 +928,7 @@ function compileNode({ definition, canonicalNodeKey, canonicalCallableKeys, inde
|
|
|
803
928
|
return {
|
|
804
929
|
...base,
|
|
805
930
|
type: 'extract',
|
|
931
|
+
overrides: definition.llmOverride === undefined ? {} : { llm: llmOverrideWire(definition.llmOverride) },
|
|
806
932
|
...extraction,
|
|
807
933
|
executionMessage: definition.message ?? null,
|
|
808
934
|
builtInTools,
|
|
@@ -907,13 +1033,19 @@ function describeCartActionRef(ref) {
|
|
|
907
1033
|
return `Action node "${ref.actionNode}"`;
|
|
908
1034
|
if ('perTurnAction' in ref)
|
|
909
1035
|
return `the per-turn Action on node "${ref.perTurnAction}"`;
|
|
1036
|
+
if ('callEndAction' in ref)
|
|
1037
|
+
return 'the call-end Action';
|
|
1038
|
+
if ('assistStep' in ref)
|
|
1039
|
+
return `Agent Assist step ${ref.assistStep}`;
|
|
1040
|
+
if ('assistButton' in ref)
|
|
1041
|
+
return `Agent Assist button ${ref.assistButton}`;
|
|
910
1042
|
return 'the before-call Action';
|
|
911
1043
|
}
|
|
912
1044
|
/**
|
|
913
1045
|
* Resolves the cart's authoring keys to the uuids the compiled commit uses. A reference to
|
|
914
1046
|
* something the Agent doesn't have fails here, rather than at publish.
|
|
915
1047
|
*/
|
|
916
|
-
function compileCart({ cart, callables, toolUseSites, definitionNodes, nodes, beforeCallStart, }) {
|
|
1048
|
+
function compileCart({ cart, callables, toolUseSites, definitionNodes, nodes, beforeCallStart, callEnd, assist, }) {
|
|
917
1049
|
const nodeAt = (key) => {
|
|
918
1050
|
const index = definitionNodes.findIndex((definitionNode) => definitionNode.key === key);
|
|
919
1051
|
return index === -1 ? null : { definition: definitionNodes[index], wire: nodes[index] };
|
|
@@ -935,6 +1067,19 @@ function compileCart({ cart, callables, toolUseSites, definitionNodes, nodes, be
|
|
|
935
1067
|
? (wire.perTurnAction?.actionUseSiteUuid ?? undefined)
|
|
936
1068
|
: undefined;
|
|
937
1069
|
}
|
|
1070
|
+
else if ('callEndAction' in ref) {
|
|
1071
|
+
uuid = callEnd?.actionUseSiteUuid;
|
|
1072
|
+
}
|
|
1073
|
+
else if ('assistStep' in ref) {
|
|
1074
|
+
const step = assist?.procedures
|
|
1075
|
+
.flatMap((procedure) => procedure.steps)
|
|
1076
|
+
.find((candidate) => candidate.id === ref.assistStep);
|
|
1077
|
+
uuid = step?.kind === 'run_action' ? step.action.actionUseSiteUuid : undefined;
|
|
1078
|
+
}
|
|
1079
|
+
else if ('assistButton' in ref) {
|
|
1080
|
+
uuid = assist?.cards.flatMap((card) => card.buttons).find((button) => button.id === ref.assistButton)
|
|
1081
|
+
?.action.actionUseSiteUuid;
|
|
1082
|
+
}
|
|
938
1083
|
else {
|
|
939
1084
|
uuid = beforeCallStart?.actionUseSiteUuid;
|
|
940
1085
|
}
|
|
@@ -1044,8 +1189,17 @@ function validateDefinition(definition) {
|
|
|
1044
1189
|
throw new Error('The global node cannot be the root node');
|
|
1045
1190
|
}
|
|
1046
1191
|
}
|
|
1192
|
+
function validateAssist(definition) {
|
|
1193
|
+
if (definition.modality === 'assist' && definition.assist === null) {
|
|
1194
|
+
throw new Error('An assist Agent must define its playbook in `assist`');
|
|
1195
|
+
}
|
|
1196
|
+
if (definition.modality !== 'assist' && definition.assist !== null) {
|
|
1197
|
+
throw new Error(`Only an assist Agent has a playbook; this Agent's modality is "${definition.modality}"`);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1047
1200
|
export function compileAgent(definition, options = {}) {
|
|
1048
1201
|
validateDefinition(definition);
|
|
1202
|
+
validateAssist(definition);
|
|
1049
1203
|
const canonicalNodeKeys = canonicalAuthoringKeys(definition.nodes.map((definitionNode, index) => ({
|
|
1050
1204
|
value: definitionNode.name,
|
|
1051
1205
|
fallback: `node-${index + 1}`,
|
|
@@ -1094,9 +1248,21 @@ export function compileAgent(definition, options = {}) {
|
|
|
1094
1248
|
: compileActionRun({
|
|
1095
1249
|
run: definition.beforeCallAction,
|
|
1096
1250
|
trigger: 'before_call_start',
|
|
1097
|
-
|
|
1251
|
+
// The run's own key comes first because hand-written projects already published derived their use site
|
|
1252
|
+
// from it.
|
|
1253
|
+
identityKeys: [definition.beforeCallAction.key, BEFORE_CALL_ACTION_KEY],
|
|
1254
|
+
options,
|
|
1255
|
+
});
|
|
1256
|
+
const callEnd = definition.callEndAction === null
|
|
1257
|
+
? null
|
|
1258
|
+
: compileActionRun({
|
|
1259
|
+
run: definition.callEndAction,
|
|
1260
|
+
trigger: 'call_end',
|
|
1261
|
+
// No source could author a call-end run before this key existed, so it is the only identity.
|
|
1262
|
+
identityKeys: [CALL_END_ACTION_KEY],
|
|
1098
1263
|
options,
|
|
1099
1264
|
});
|
|
1265
|
+
const assist = definition.assist === null ? null : compileAssist({ assist: definition.assist, options });
|
|
1100
1266
|
const cart = definition.cart === undefined || definition.cart === null
|
|
1101
1267
|
? definition.cart
|
|
1102
1268
|
: compileCart({
|
|
@@ -1106,6 +1272,8 @@ export function compileAgent(definition, options = {}) {
|
|
|
1106
1272
|
definitionNodes: definition.nodes,
|
|
1107
1273
|
nodes: compiledNodes,
|
|
1108
1274
|
beforeCallStart,
|
|
1275
|
+
callEnd,
|
|
1276
|
+
assist,
|
|
1109
1277
|
});
|
|
1110
1278
|
return {
|
|
1111
1279
|
agent: {
|
|
@@ -1177,10 +1345,13 @@ export function compileAgent(definition, options = {}) {
|
|
|
1177
1345
|
definition.nodes.some((definitionNode) => nodeCarriesCallableActions(definitionNode) && definitionNode.actions !== undefined)
|
|
1178
1346
|
? { toolUseSites }
|
|
1179
1347
|
: {}),
|
|
1180
|
-
automaticActions: { beforeCallStart },
|
|
1348
|
+
automaticActions: { beforeCallStart, callEnd },
|
|
1181
1349
|
knowledgeBaseIds: definition.knowledgeBases.map((item) => item.uuid),
|
|
1182
1350
|
abTestGroupIds: definition.abTestGroupIds ?? abTestGroupIds,
|
|
1183
1351
|
...(cart === undefined ? {} : { cart }),
|
|
1352
|
+
guardrails: compileGuardrails({ guardrails: definition.guardrails, nodeUuids }),
|
|
1353
|
+
nodeCheck: { enabled: definition.nodeCheck },
|
|
1354
|
+
...(assist === null ? {} : { assist }),
|
|
1184
1355
|
},
|
|
1185
1356
|
nodes: compiledNodes,
|
|
1186
1357
|
summaryPrompt: definition.summaryPrompt,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BUILT_IN_ACTION_CONTRACTS = exports.WEB_SEARCH_OUTPUT_MAPPINGS = exports.WEB_SEARCH_OUTPUT_SCHEMA = exports.WEB_SEARCH_INPUT_SCHEMA = exports.VALIDATE_ADDRESS_OUTPUT_MAPPINGS = exports.VALIDATE_ADDRESS_OUTPUT_SCHEMA = exports.VALIDATE_ADDRESS_INPUT_SCHEMA = exports.SEND_TEXT_MESSAGE_OUTPUT_MAPPINGS = exports.SEND_TEXT_MESSAGE_OUTPUT_SCHEMA = exports.SEND_TEXT_MESSAGE_INPUT_SCHEMA = exports.SEND_EMAIL_OUTPUT_MAPPINGS = exports.SEND_EMAIL_OUTPUT_SCHEMA = exports.SEND_EMAIL_INPUT_SCHEMA = exports.builtInOperationSchema = void 0;
|
|
3
|
+
exports.BUILT_IN_ACTION_CONTRACTS = exports.WEB_SEARCH_OUTPUT_MAPPINGS = exports.WEB_SEARCH_OUTPUT_SCHEMA = exports.WEB_SEARCH_INPUT_SCHEMA = exports.VALIDATE_ADDRESS_OUTPUT_MAPPINGS = exports.VALIDATE_ADDRESS_OUTPUT_SCHEMA = exports.VALIDATE_ADDRESS_INPUT_SCHEMA = exports.SEND_TEXT_MESSAGE_OUTPUT_MAPPINGS = exports.SEND_TEXT_MESSAGE_OUTPUT_SCHEMA = exports.SEND_TEXT_MESSAGE_INPUT_SCHEMA = exports.SEND_EMAIL_OUTPUT_MAPPINGS = exports.SEND_EMAIL_OUTPUT_SCHEMA = exports.SEND_EMAIL_INPUT_SCHEMA = exports.builtInOperationSchema = exports.BROWSER_ACTION_KINDS = exports.BROWSER_ACTION_ENVIRONMENTS = exports.BROWSER_ACTION_TIMEOUT_MS_MAX = exports.BROWSER_ACTION_TIMEOUT_MS_DEFAULT = exports.BROWSER_ACTION_TIMEOUT_MS_MIN = void 0;
|
|
4
|
+
exports.browserActionOutputMappings = browserActionOutputMappings;
|
|
4
5
|
const zod_1 = require("zod");
|
|
5
6
|
/*
|
|
6
7
|
* Agent v2 built-in Action schemas and output mappings, mirrored from
|
|
@@ -49,13 +50,41 @@ const webSearchOperationSchema = zod_1.z
|
|
|
49
50
|
message: 'Web search can use allowed sites or blocked sites, not both',
|
|
50
51
|
path: ['blockedDomains'],
|
|
51
52
|
});
|
|
53
|
+
exports.BROWSER_ACTION_TIMEOUT_MS_MIN = 10_000;
|
|
54
|
+
exports.BROWSER_ACTION_TIMEOUT_MS_DEFAULT = 120_000;
|
|
55
|
+
exports.BROWSER_ACTION_TIMEOUT_MS_MAX = 300_000;
|
|
56
|
+
exports.BROWSER_ACTION_ENVIRONMENTS = ['training', 'production'];
|
|
57
|
+
/** What running the action does to the site: nothing, an unsaved change, or a save. */
|
|
58
|
+
exports.BROWSER_ACTION_KINDS = ['read', 'draft', 'commit'];
|
|
59
|
+
/**
|
|
60
|
+
* Runs one version of a browser action (an RPA flow) in the conversation's
|
|
61
|
+
* own browser. Unlike the other built-ins its inputs and outputs are not fixed:
|
|
62
|
+
* they are those of the script version it runs.
|
|
63
|
+
*/
|
|
64
|
+
const browserActionOperationSchema = zod_1.z.strictObject({
|
|
65
|
+
type: zod_1.z.literal('browser_action'),
|
|
66
|
+
rpaFlowUuid: zod_1.z.uuid(),
|
|
67
|
+
rpaFlowVersionUuid: zod_1.z.uuid(),
|
|
68
|
+
environment: zod_1.z.enum(exports.BROWSER_ACTION_ENVIRONMENTS),
|
|
69
|
+
kind: zod_1.z.enum(exports.BROWSER_ACTION_KINDS),
|
|
70
|
+
timeoutMs: zod_1.z.number().int().min(exports.BROWSER_ACTION_TIMEOUT_MS_MIN).max(exports.BROWSER_ACTION_TIMEOUT_MS_MAX),
|
|
71
|
+
});
|
|
52
72
|
/** Mirrors Agent v2 operation boundary; no private runtime dependency. */
|
|
53
73
|
exports.builtInOperationSchema = zod_1.z.discriminatedUnion('type', [
|
|
54
74
|
sendTextMessageOperationSchema,
|
|
55
75
|
sendEmailOperationSchema,
|
|
56
76
|
validateAddressOperationSchema,
|
|
57
77
|
webSearchOperationSchema,
|
|
78
|
+
browserActionOperationSchema,
|
|
58
79
|
]);
|
|
80
|
+
/**
|
|
81
|
+
* A browser action's output mappings: each field the script returns, passed
|
|
82
|
+
* through under its own name. Derived from the output schema, never authored,
|
|
83
|
+
* which is what Agent v2 requires when it saves one.
|
|
84
|
+
*/
|
|
85
|
+
function browserActionOutputMappings(outputSchema) {
|
|
86
|
+
return Object.fromEntries(Object.keys(outputSchema.properties).map((name) => [`/${name}`, `{{ result.${name} }}`]));
|
|
87
|
+
}
|
|
59
88
|
exports.SEND_EMAIL_INPUT_SCHEMA = {
|
|
60
89
|
type: 'object',
|
|
61
90
|
description: 'The recipient and content supplied each time the action runs. The sender is configured on the action.',
|
|
@@ -431,7 +460,7 @@ exports.WEB_SEARCH_OUTPUT_MAPPINGS = {
|
|
|
431
460
|
'/notice': '{{ result.notice }}',
|
|
432
461
|
'/results': '{{ result.results }}',
|
|
433
462
|
};
|
|
434
|
-
/** The fixed contract of each built-in operation, keyed by its wire `type`. */
|
|
463
|
+
/** The fixed contract of each built-in operation that has one, keyed by its wire `type`. */
|
|
435
464
|
exports.BUILT_IN_ACTION_CONTRACTS = {
|
|
436
465
|
send_email: {
|
|
437
466
|
inputSchema: exports.SEND_EMAIL_INPUT_SCHEMA,
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { ActionsIoSchema } from "./actions.cjs";
|
|
3
|
+
export declare const BROWSER_ACTION_TIMEOUT_MS_MIN = 10000;
|
|
4
|
+
export declare const BROWSER_ACTION_TIMEOUT_MS_DEFAULT = 120000;
|
|
5
|
+
export declare const BROWSER_ACTION_TIMEOUT_MS_MAX = 300000;
|
|
6
|
+
export declare const BROWSER_ACTION_ENVIRONMENTS: readonly ["training", "production"];
|
|
7
|
+
/** What running the action does to the site: nothing, an unsaved change, or a save. */
|
|
8
|
+
export declare const BROWSER_ACTION_KINDS: readonly ["read", "draft", "commit"];
|
|
3
9
|
/** Mirrors Agent v2 operation boundary; no private runtime dependency. */
|
|
4
10
|
export declare const builtInOperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5
11
|
type: z.ZodLiteral<"send_text_message">;
|
|
@@ -15,7 +21,27 @@ export declare const builtInOperationSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
15
21
|
type: z.ZodLiteral<"web_search">;
|
|
16
22
|
allowedDomains: z.ZodArray<z.ZodString>;
|
|
17
23
|
blockedDomains: z.ZodArray<z.ZodString>;
|
|
24
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
25
|
+
type: z.ZodLiteral<"browser_action">;
|
|
26
|
+
rpaFlowUuid: z.ZodUUID;
|
|
27
|
+
rpaFlowVersionUuid: z.ZodUUID;
|
|
28
|
+
environment: z.ZodEnum<{
|
|
29
|
+
training: "training";
|
|
30
|
+
production: "production";
|
|
31
|
+
}>;
|
|
32
|
+
kind: z.ZodEnum<{
|
|
33
|
+
read: "read";
|
|
34
|
+
draft: "draft";
|
|
35
|
+
commit: "commit";
|
|
36
|
+
}>;
|
|
37
|
+
timeoutMs: z.ZodNumber;
|
|
18
38
|
}, z.core.$strict>], "type">;
|
|
39
|
+
/**
|
|
40
|
+
* A browser action's output mappings: each field the script returns, passed
|
|
41
|
+
* through under its own name. Derived from the output schema, never authored,
|
|
42
|
+
* which is what Agent v2 requires when it saves one.
|
|
43
|
+
*/
|
|
44
|
+
export declare function browserActionOutputMappings(outputSchema: ActionsIoSchema): Record<string, string>;
|
|
19
45
|
export declare const SEND_EMAIL_INPUT_SCHEMA: ActionsIoSchema;
|
|
20
46
|
export declare const SEND_EMAIL_OUTPUT_SCHEMA: ActionsIoSchema;
|
|
21
47
|
export declare const SEND_EMAIL_OUTPUT_MAPPINGS: Record<string, string>;
|
|
@@ -28,7 +54,7 @@ export declare const VALIDATE_ADDRESS_OUTPUT_MAPPINGS: Record<string, string>;
|
|
|
28
54
|
export declare const WEB_SEARCH_INPUT_SCHEMA: ActionsIoSchema;
|
|
29
55
|
export declare const WEB_SEARCH_OUTPUT_SCHEMA: ActionsIoSchema;
|
|
30
56
|
export declare const WEB_SEARCH_OUTPUT_MAPPINGS: Record<string, string>;
|
|
31
|
-
/** The fixed contract of each built-in operation, keyed by its wire `type`. */
|
|
57
|
+
/** The fixed contract of each built-in operation that has one, keyed by its wire `type`. */
|
|
32
58
|
export declare const BUILT_IN_ACTION_CONTRACTS: {
|
|
33
59
|
readonly send_email: {
|
|
34
60
|
readonly inputSchema: ActionsIoSchema;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { ActionsIoSchema } from "./actions.js";
|
|
3
|
+
export declare const BROWSER_ACTION_TIMEOUT_MS_MIN = 10000;
|
|
4
|
+
export declare const BROWSER_ACTION_TIMEOUT_MS_DEFAULT = 120000;
|
|
5
|
+
export declare const BROWSER_ACTION_TIMEOUT_MS_MAX = 300000;
|
|
6
|
+
export declare const BROWSER_ACTION_ENVIRONMENTS: readonly ["training", "production"];
|
|
7
|
+
/** What running the action does to the site: nothing, an unsaved change, or a save. */
|
|
8
|
+
export declare const BROWSER_ACTION_KINDS: readonly ["read", "draft", "commit"];
|
|
3
9
|
/** Mirrors Agent v2 operation boundary; no private runtime dependency. */
|
|
4
10
|
export declare const builtInOperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5
11
|
type: z.ZodLiteral<"send_text_message">;
|
|
@@ -15,7 +21,27 @@ export declare const builtInOperationSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
15
21
|
type: z.ZodLiteral<"web_search">;
|
|
16
22
|
allowedDomains: z.ZodArray<z.ZodString>;
|
|
17
23
|
blockedDomains: z.ZodArray<z.ZodString>;
|
|
24
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
25
|
+
type: z.ZodLiteral<"browser_action">;
|
|
26
|
+
rpaFlowUuid: z.ZodUUID;
|
|
27
|
+
rpaFlowVersionUuid: z.ZodUUID;
|
|
28
|
+
environment: z.ZodEnum<{
|
|
29
|
+
training: "training";
|
|
30
|
+
production: "production";
|
|
31
|
+
}>;
|
|
32
|
+
kind: z.ZodEnum<{
|
|
33
|
+
read: "read";
|
|
34
|
+
draft: "draft";
|
|
35
|
+
commit: "commit";
|
|
36
|
+
}>;
|
|
37
|
+
timeoutMs: z.ZodNumber;
|
|
18
38
|
}, z.core.$strict>], "type">;
|
|
39
|
+
/**
|
|
40
|
+
* A browser action's output mappings: each field the script returns, passed
|
|
41
|
+
* through under its own name. Derived from the output schema, never authored,
|
|
42
|
+
* which is what Agent v2 requires when it saves one.
|
|
43
|
+
*/
|
|
44
|
+
export declare function browserActionOutputMappings(outputSchema: ActionsIoSchema): Record<string, string>;
|
|
19
45
|
export declare const SEND_EMAIL_INPUT_SCHEMA: ActionsIoSchema;
|
|
20
46
|
export declare const SEND_EMAIL_OUTPUT_SCHEMA: ActionsIoSchema;
|
|
21
47
|
export declare const SEND_EMAIL_OUTPUT_MAPPINGS: Record<string, string>;
|
|
@@ -28,7 +54,7 @@ export declare const VALIDATE_ADDRESS_OUTPUT_MAPPINGS: Record<string, string>;
|
|
|
28
54
|
export declare const WEB_SEARCH_INPUT_SCHEMA: ActionsIoSchema;
|
|
29
55
|
export declare const WEB_SEARCH_OUTPUT_SCHEMA: ActionsIoSchema;
|
|
30
56
|
export declare const WEB_SEARCH_OUTPUT_MAPPINGS: Record<string, string>;
|
|
31
|
-
/** The fixed contract of each built-in operation, keyed by its wire `type`. */
|
|
57
|
+
/** The fixed contract of each built-in operation that has one, keyed by its wire `type`. */
|
|
32
58
|
export declare const BUILT_IN_ACTION_CONTRACTS: {
|
|
33
59
|
readonly send_email: {
|
|
34
60
|
readonly inputSchema: ActionsIoSchema;
|
package/dist/built-in-actions.js
CHANGED
|
@@ -46,13 +46,41 @@ const webSearchOperationSchema = z
|
|
|
46
46
|
message: 'Web search can use allowed sites or blocked sites, not both',
|
|
47
47
|
path: ['blockedDomains'],
|
|
48
48
|
});
|
|
49
|
+
export const BROWSER_ACTION_TIMEOUT_MS_MIN = 10_000;
|
|
50
|
+
export const BROWSER_ACTION_TIMEOUT_MS_DEFAULT = 120_000;
|
|
51
|
+
export const BROWSER_ACTION_TIMEOUT_MS_MAX = 300_000;
|
|
52
|
+
export const BROWSER_ACTION_ENVIRONMENTS = ['training', 'production'];
|
|
53
|
+
/** What running the action does to the site: nothing, an unsaved change, or a save. */
|
|
54
|
+
export const BROWSER_ACTION_KINDS = ['read', 'draft', 'commit'];
|
|
55
|
+
/**
|
|
56
|
+
* Runs one version of a browser action (an RPA flow) in the conversation's
|
|
57
|
+
* own browser. Unlike the other built-ins its inputs and outputs are not fixed:
|
|
58
|
+
* they are those of the script version it runs.
|
|
59
|
+
*/
|
|
60
|
+
const browserActionOperationSchema = z.strictObject({
|
|
61
|
+
type: z.literal('browser_action'),
|
|
62
|
+
rpaFlowUuid: z.uuid(),
|
|
63
|
+
rpaFlowVersionUuid: z.uuid(),
|
|
64
|
+
environment: z.enum(BROWSER_ACTION_ENVIRONMENTS),
|
|
65
|
+
kind: z.enum(BROWSER_ACTION_KINDS),
|
|
66
|
+
timeoutMs: z.number().int().min(BROWSER_ACTION_TIMEOUT_MS_MIN).max(BROWSER_ACTION_TIMEOUT_MS_MAX),
|
|
67
|
+
});
|
|
49
68
|
/** Mirrors Agent v2 operation boundary; no private runtime dependency. */
|
|
50
69
|
export const builtInOperationSchema = z.discriminatedUnion('type', [
|
|
51
70
|
sendTextMessageOperationSchema,
|
|
52
71
|
sendEmailOperationSchema,
|
|
53
72
|
validateAddressOperationSchema,
|
|
54
73
|
webSearchOperationSchema,
|
|
74
|
+
browserActionOperationSchema,
|
|
55
75
|
]);
|
|
76
|
+
/**
|
|
77
|
+
* A browser action's output mappings: each field the script returns, passed
|
|
78
|
+
* through under its own name. Derived from the output schema, never authored,
|
|
79
|
+
* which is what Agent v2 requires when it saves one.
|
|
80
|
+
*/
|
|
81
|
+
export function browserActionOutputMappings(outputSchema) {
|
|
82
|
+
return Object.fromEntries(Object.keys(outputSchema.properties).map((name) => [`/${name}`, `{{ result.${name} }}`]));
|
|
83
|
+
}
|
|
56
84
|
export const SEND_EMAIL_INPUT_SCHEMA = {
|
|
57
85
|
type: 'object',
|
|
58
86
|
description: 'The recipient and content supplied each time the action runs. The sender is configured on the action.',
|
|
@@ -428,7 +456,7 @@ export const WEB_SEARCH_OUTPUT_MAPPINGS = {
|
|
|
428
456
|
'/notice': '{{ result.notice }}',
|
|
429
457
|
'/results': '{{ result.results }}',
|
|
430
458
|
};
|
|
431
|
-
/** The fixed contract of each built-in operation, keyed by its wire `type`. */
|
|
459
|
+
/** The fixed contract of each built-in operation that has one, keyed by its wire `type`. */
|
|
432
460
|
export const BUILT_IN_ACTION_CONTRACTS = {
|
|
433
461
|
send_email: {
|
|
434
462
|
inputSchema: SEND_EMAIL_INPUT_SCHEMA,
|
package/dist/client.cjs
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SimpleAI = void 0;
|
|
4
4
|
const data_1 = require("./data.cjs");
|
|
5
5
|
const http_1 = require("./http.cjs");
|
|
6
|
+
const oauth_1 = require("./oauth.cjs");
|
|
6
7
|
const DEFAULT_BASE_URL = 'https://api.prod.usesimple.ai/api/v1';
|
|
7
8
|
function envVar(name) {
|
|
8
9
|
if (typeof process === 'undefined' || process.env === undefined) {
|
|
@@ -14,6 +15,8 @@ function envVar(name) {
|
|
|
14
15
|
class SimpleAI {
|
|
15
16
|
/** Custom data tables — query, read, and write records. */
|
|
16
17
|
data;
|
|
18
|
+
/** OAuth 2.0 access tokens for calling your own systems. */
|
|
19
|
+
oauth;
|
|
17
20
|
constructor(options = {}) {
|
|
18
21
|
const apiKey = options.apiKey ?? envVar('SIMPLE_API_KEY');
|
|
19
22
|
if (apiKey === undefined) {
|
|
@@ -24,6 +27,7 @@ class SimpleAI {
|
|
|
24
27
|
const fetchImplementation = options.fetch ?? ((url, init) => fetch(url, init));
|
|
25
28
|
const http = (0, http_1.createHttpClient)({ baseUrl, apiKey, fetchImplementation });
|
|
26
29
|
this.data = new data_1.DataClient(http);
|
|
30
|
+
this.oauth = new oauth_1.OAuthClient(http);
|
|
27
31
|
}
|
|
28
32
|
}
|
|
29
33
|
exports.SimpleAI = SimpleAI;
|
package/dist/client.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DataClient } from "./data.cjs";
|
|
2
2
|
import type { FetchLike } from "./http.cjs";
|
|
3
|
+
import { OAuthClient } from "./oauth.cjs";
|
|
3
4
|
export type SimpleAIOptions = {
|
|
4
5
|
/** API key (dashboard: Settings → API Keys). Defaults to SIMPLE_API_KEY — inside code actions this is injected automatically. */
|
|
5
6
|
apiKey?: string;
|
|
@@ -11,5 +12,7 @@ export type SimpleAIOptions = {
|
|
|
11
12
|
export declare class SimpleAI {
|
|
12
13
|
/** Custom data tables — query, read, and write records. */
|
|
13
14
|
readonly data: DataClient;
|
|
15
|
+
/** OAuth 2.0 access tokens for calling your own systems. */
|
|
16
|
+
readonly oauth: OAuthClient;
|
|
14
17
|
constructor(options?: SimpleAIOptions);
|
|
15
18
|
}
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DataClient } from "./data.js";
|
|
2
2
|
import type { FetchLike } from "./http.js";
|
|
3
|
+
import { OAuthClient } from "./oauth.js";
|
|
3
4
|
export type SimpleAIOptions = {
|
|
4
5
|
/** API key (dashboard: Settings → API Keys). Defaults to SIMPLE_API_KEY — inside code actions this is injected automatically. */
|
|
5
6
|
apiKey?: string;
|
|
@@ -11,5 +12,7 @@ export type SimpleAIOptions = {
|
|
|
11
12
|
export declare class SimpleAI {
|
|
12
13
|
/** Custom data tables — query, read, and write records. */
|
|
13
14
|
readonly data: DataClient;
|
|
15
|
+
/** OAuth 2.0 access tokens for calling your own systems. */
|
|
16
|
+
readonly oauth: OAuthClient;
|
|
14
17
|
constructor(options?: SimpleAIOptions);
|
|
15
18
|
}
|
package/dist/client.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DataClient } from "./data.js";
|
|
2
2
|
import { createHttpClient } from "./http.js";
|
|
3
|
+
import { OAuthClient } from "./oauth.js";
|
|
3
4
|
const DEFAULT_BASE_URL = 'https://api.prod.usesimple.ai/api/v1';
|
|
4
5
|
function envVar(name) {
|
|
5
6
|
if (typeof process === 'undefined' || process.env === undefined) {
|
|
@@ -11,6 +12,8 @@ function envVar(name) {
|
|
|
11
12
|
export class SimpleAI {
|
|
12
13
|
/** Custom data tables — query, read, and write records. */
|
|
13
14
|
data;
|
|
15
|
+
/** OAuth 2.0 access tokens for calling your own systems. */
|
|
16
|
+
oauth;
|
|
14
17
|
constructor(options = {}) {
|
|
15
18
|
const apiKey = options.apiKey ?? envVar('SIMPLE_API_KEY');
|
|
16
19
|
if (apiKey === undefined) {
|
|
@@ -21,5 +24,6 @@ export class SimpleAI {
|
|
|
21
24
|
const fetchImplementation = options.fetch ?? ((url, init) => fetch(url, init));
|
|
22
25
|
const http = createHttpClient({ baseUrl, apiKey, fetchImplementation });
|
|
23
26
|
this.data = new DataClient(http);
|
|
27
|
+
this.oauth = new OAuthClient(http);
|
|
24
28
|
}
|
|
25
29
|
}
|
|
@@ -46,6 +46,7 @@ function defineAction(handler) {
|
|
|
46
46
|
inputs,
|
|
47
47
|
config,
|
|
48
48
|
metadata,
|
|
49
|
+
simulation: invocation.simulation ?? null,
|
|
49
50
|
client,
|
|
50
51
|
workflow: (0, workflow_1.createActionWorkflow)({ metadata, carrier: invocation }),
|
|
51
52
|
llm: (0, llm_1.createActionLlm)({ metadata }),
|
|
@@ -69,6 +70,7 @@ function defineCustomDataTransform(handler) {
|
|
|
69
70
|
operation,
|
|
70
71
|
config,
|
|
71
72
|
metadata,
|
|
73
|
+
simulation: invocation.simulation ?? null,
|
|
72
74
|
client,
|
|
73
75
|
llm: (0, llm_1.createActionLlm)({ metadata }),
|
|
74
76
|
});
|