@simple-ai-lab/sdk 0.12.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/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, canonicalKey, options, }) {
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
- if (definition.beforeCallAction !== null) {
592
- visit(definition.beforeCallAction.action);
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
- canonicalKey: `${canonicalNodeKey}:every-turn`,
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
- canonicalKey: 'before-call-start',
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;
@@ -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/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.clientCredentialsTokenInputSchema = exports.batchUpsertRowsSchema = exports.normalizeAgentV2CommitContent = exports.defineAgentSnapshot = exports.compileAgentProject = exports.collectActionVersionUuids = exports.DataClient = exports.ActionCapability = exports.SIMPLE_ACTION_BRAND = exports.defineCustomDataTransform = exports.defineAction = exports.SimpleAI = exports.WEB_SEARCH_OUTPUT_SCHEMA = exports.WEB_SEARCH_OUTPUT_MAPPINGS = exports.WEB_SEARCH_INPUT_SCHEMA = exports.VALIDATE_ADDRESS_OUTPUT_SCHEMA = exports.VALIDATE_ADDRESS_OUTPUT_MAPPINGS = exports.VALIDATE_ADDRESS_INPUT_SCHEMA = exports.SEND_TEXT_MESSAGE_OUTPUT_SCHEMA = exports.SEND_TEXT_MESSAGE_OUTPUT_MAPPINGS = exports.SEND_TEXT_MESSAGE_INPUT_SCHEMA = exports.SEND_EMAIL_OUTPUT_SCHEMA = exports.SEND_EMAIL_OUTPUT_MAPPINGS = exports.SEND_EMAIL_INPUT_SCHEMA = exports.BUILT_IN_ACTION_CONTRACTS = exports.TRANSITION_FILTER_MAX_DEPTH = exports.TRANSITION_FILTER_MAX_CONDITIONS = exports.resolveExtractionFields = exports.reference = exports.prompt = exports.PII_REDACTION_CATEGORIES = exports.node = exports.MAX_CONTAINMENT_RULE_DEPTH = exports.FIVE9_SIP_BYE_HEADER_NAMES = exports.defineAgent = exports.defaultBackgroundNoise = exports.DEFAULT_TRANSITION_MESSAGE = exports.DEFAULT_PER_TURN_RETRIEVAL_TOP_K = exports.DEFAULT_PER_TURN_RETRIEVAL_RECENT_TURNS = exports.DEFAULT_CHECK_IN_AFTER_SILENCE_DELAY_SECONDS = exports.compileAgent = exports.canonicalAuthoringKeys = exports.canonicalAuthoringKey = exports.sourceFile = exports.resolveActionIoSchema = exports.resolveActionHttpHeaders = exports.compileAction = exports.canonicalActionSource = exports.actionsIoSchemaFromZod = exports.action = void 0;
4
- exports.SimpleAIError = exports.MissingCapabilityError = exports.tableNameSchema = exports.recordPayloadSchema = exports.queryInputSchema = exports.MAX_QUERY_SIZE = exports.MAX_BATCH_ROWS = exports.listOptionsSchema = exports.dataFilterSchema = exports.dataColumnPathSchema = void 0;
3
+ exports.ActionCapability = exports.SIMPLE_ACTION_BRAND = exports.defineCustomDataTransform = exports.defineAction = exports.SimpleAI = exports.WEB_SEARCH_OUTPUT_SCHEMA = exports.WEB_SEARCH_OUTPUT_MAPPINGS = exports.WEB_SEARCH_INPUT_SCHEMA = exports.VALIDATE_ADDRESS_OUTPUT_SCHEMA = exports.VALIDATE_ADDRESS_OUTPUT_MAPPINGS = exports.VALIDATE_ADDRESS_INPUT_SCHEMA = exports.SEND_TEXT_MESSAGE_OUTPUT_SCHEMA = exports.SEND_TEXT_MESSAGE_OUTPUT_MAPPINGS = exports.SEND_TEXT_MESSAGE_INPUT_SCHEMA = exports.SEND_EMAIL_OUTPUT_SCHEMA = exports.SEND_EMAIL_OUTPUT_MAPPINGS = exports.SEND_EMAIL_INPUT_SCHEMA = exports.BUILT_IN_ACTION_CONTRACTS = exports.BROWSER_ACTION_TIMEOUT_MS_DEFAULT = exports.BROWSER_ACTION_KINDS = exports.BROWSER_ACTION_ENVIRONMENTS = exports.TRANSITION_FILTER_MAX_DEPTH = exports.TRANSITION_FILTER_MAX_CONDITIONS = exports.resolveExtractionFields = exports.reference = exports.prompt = exports.PII_REDACTION_CATEGORIES = exports.node = exports.MAX_CONTAINMENT_RULE_DEPTH = exports.GUARDRAIL_MODES = exports.FIVE9_SIP_BYE_HEADER_NAMES = exports.defineAgent = exports.defaultBackgroundNoise = exports.DEFAULT_TRANSITION_MESSAGE = exports.DEFAULT_PER_TURN_RETRIEVAL_TOP_K = exports.DEFAULT_PER_TURN_RETRIEVAL_RECENT_TURNS = exports.DEFAULT_CHECK_IN_AFTER_SILENCE_DELAY_SECONDS = exports.compileAgent = exports.canonicalAuthoringKeys = exports.canonicalAuthoringKey = exports.CALL_END_ACTION_KEY = exports.BEFORE_CALL_ACTION_KEY = exports.assistActionRunKey = exports.sourceFile = exports.resolveActionIoSchema = exports.resolveActionHttpHeaders = exports.compileAction = exports.canonicalActionSource = exports.actionsIoSchemaFromZod = exports.action = void 0;
4
+ exports.SimpleAIError = exports.MissingCapabilityError = exports.tableNameSchema = exports.recordPayloadSchema = exports.queryInputSchema = exports.MAX_QUERY_SIZE = exports.MAX_BATCH_ROWS = exports.listOptionsSchema = exports.dataFilterSchema = exports.dataColumnPathSchema = exports.clientCredentialsTokenInputSchema = exports.batchUpsertRowsSchema = exports.normalizeAgentV2CommitContent = exports.collectActionVersionUuids = exports.assistActionUseSites = exports.DataClient = void 0;
5
5
  var actions_1 = require("./actions.cjs");
6
6
  Object.defineProperty(exports, "action", { enumerable: true, get: function () { return actions_1.action; } });
7
7
  Object.defineProperty(exports, "actionsIoSchemaFromZod", { enumerable: true, get: function () { return actions_1.actionsIoSchemaFromZod; } });
@@ -11,6 +11,9 @@ Object.defineProperty(exports, "resolveActionHttpHeaders", { enumerable: true, g
11
11
  Object.defineProperty(exports, "resolveActionIoSchema", { enumerable: true, get: function () { return actions_1.resolveActionIoSchema; } });
12
12
  Object.defineProperty(exports, "sourceFile", { enumerable: true, get: function () { return actions_1.sourceFile; } });
13
13
  var agents_1 = require("./agents.cjs");
14
+ Object.defineProperty(exports, "assistActionRunKey", { enumerable: true, get: function () { return agents_1.assistActionRunKey; } });
15
+ Object.defineProperty(exports, "BEFORE_CALL_ACTION_KEY", { enumerable: true, get: function () { return agents_1.BEFORE_CALL_ACTION_KEY; } });
16
+ Object.defineProperty(exports, "CALL_END_ACTION_KEY", { enumerable: true, get: function () { return agents_1.CALL_END_ACTION_KEY; } });
14
17
  Object.defineProperty(exports, "canonicalAuthoringKey", { enumerable: true, get: function () { return agents_1.canonicalAuthoringKey; } });
15
18
  Object.defineProperty(exports, "canonicalAuthoringKeys", { enumerable: true, get: function () { return agents_1.canonicalAuthoringKeys; } });
16
19
  Object.defineProperty(exports, "compileAgent", { enumerable: true, get: function () { return agents_1.compileAgent; } });
@@ -21,6 +24,7 @@ Object.defineProperty(exports, "DEFAULT_TRANSITION_MESSAGE", { enumerable: true,
21
24
  Object.defineProperty(exports, "defaultBackgroundNoise", { enumerable: true, get: function () { return agents_1.defaultBackgroundNoise; } });
22
25
  Object.defineProperty(exports, "defineAgent", { enumerable: true, get: function () { return agents_1.defineAgent; } });
23
26
  Object.defineProperty(exports, "FIVE9_SIP_BYE_HEADER_NAMES", { enumerable: true, get: function () { return agents_1.FIVE9_SIP_BYE_HEADER_NAMES; } });
27
+ Object.defineProperty(exports, "GUARDRAIL_MODES", { enumerable: true, get: function () { return agents_1.GUARDRAIL_MODES; } });
24
28
  Object.defineProperty(exports, "MAX_CONTAINMENT_RULE_DEPTH", { enumerable: true, get: function () { return agents_1.MAX_CONTAINMENT_RULE_DEPTH; } });
25
29
  Object.defineProperty(exports, "node", { enumerable: true, get: function () { return agents_1.node; } });
26
30
  Object.defineProperty(exports, "PII_REDACTION_CATEGORIES", { enumerable: true, get: function () { return agents_1.PII_REDACTION_CATEGORIES; } });
@@ -30,6 +34,9 @@ Object.defineProperty(exports, "resolveExtractionFields", { enumerable: true, ge
30
34
  Object.defineProperty(exports, "TRANSITION_FILTER_MAX_CONDITIONS", { enumerable: true, get: function () { return agents_1.TRANSITION_FILTER_MAX_CONDITIONS; } });
31
35
  Object.defineProperty(exports, "TRANSITION_FILTER_MAX_DEPTH", { enumerable: true, get: function () { return agents_1.TRANSITION_FILTER_MAX_DEPTH; } });
32
36
  var built_in_actions_1 = require("./built-in-actions.cjs");
37
+ Object.defineProperty(exports, "BROWSER_ACTION_ENVIRONMENTS", { enumerable: true, get: function () { return built_in_actions_1.BROWSER_ACTION_ENVIRONMENTS; } });
38
+ Object.defineProperty(exports, "BROWSER_ACTION_KINDS", { enumerable: true, get: function () { return built_in_actions_1.BROWSER_ACTION_KINDS; } });
39
+ Object.defineProperty(exports, "BROWSER_ACTION_TIMEOUT_MS_DEFAULT", { enumerable: true, get: function () { return built_in_actions_1.BROWSER_ACTION_TIMEOUT_MS_DEFAULT; } });
33
40
  Object.defineProperty(exports, "BUILT_IN_ACTION_CONTRACTS", { enumerable: true, get: function () { return built_in_actions_1.BUILT_IN_ACTION_CONTRACTS; } });
34
41
  Object.defineProperty(exports, "SEND_EMAIL_INPUT_SCHEMA", { enumerable: true, get: function () { return built_in_actions_1.SEND_EMAIL_INPUT_SCHEMA; } });
35
42
  Object.defineProperty(exports, "SEND_EMAIL_OUTPUT_MAPPINGS", { enumerable: true, get: function () { return built_in_actions_1.SEND_EMAIL_OUTPUT_MAPPINGS; } });
@@ -54,9 +61,8 @@ Object.defineProperty(exports, "ActionCapability", { enumerable: true, get: func
54
61
  var data_1 = require("./data.cjs");
55
62
  Object.defineProperty(exports, "DataClient", { enumerable: true, get: function () { return data_1.DataClient; } });
56
63
  var projects_1 = require("./projects.cjs");
64
+ Object.defineProperty(exports, "assistActionUseSites", { enumerable: true, get: function () { return projects_1.assistActionUseSites; } });
57
65
  Object.defineProperty(exports, "collectActionVersionUuids", { enumerable: true, get: function () { return projects_1.collectActionVersionUuids; } });
58
- Object.defineProperty(exports, "compileAgentProject", { enumerable: true, get: function () { return projects_1.compileAgentProject; } });
59
- Object.defineProperty(exports, "defineAgentSnapshot", { enumerable: true, get: function () { return projects_1.defineAgentSnapshot; } });
60
66
  Object.defineProperty(exports, "normalizeAgentV2CommitContent", { enumerable: true, get: function () { return projects_1.normalizeAgentV2CommitContent; } });
61
67
  var schemas_1 = require("./schemas.cjs");
62
68
  Object.defineProperty(exports, "batchUpsertRowsSchema", { enumerable: true, get: function () { return schemas_1.batchUpsertRowsSchema; } });
package/dist/index.d.cts CHANGED
@@ -1,12 +1,12 @@
1
- export { type ActionCompileOptions, type ActionDefinition, type ActionHttpHeaders, type ActionIoInput, type ActionOutputParameterMappings, type ActionOutputParameters, type ActionRunDefinition, type ActionsIoSchema, type ActionsIoSchemaNode, type ActionVersionValues, type AgentActionInput, action, actionsIoSchemaFromZod, type BackgroundMessage, type BuiltInActionValues, type BuiltInOperation, type CallableActionDefinition, canonicalActionSource, compileAction, type InlineActionDefinition, type ReferencedActionDefinition, resolveActionHttpHeaders, resolveActionIoSchema, type SourceFileReference, sourceFile, } from "./actions.cjs";
2
- export { type AbTestNodeDefinition, type ActionNodeDefinition, type AgentCompileOptions, type AgentDefinition, type AgentDefinitionInput, type AgentIdentityKind, type AgentV2CommitContentWire, type AgentV2ConfigWire, type AgentV2EdgeWire, type AgentV2NodeWire, type AlwaysAvailableCapability, type AlwaysAvailableTransitionFilterWire, type BackgroundNoise, type BackgroundNoiseConfig, type CallParameterFilter, type CartActionRef, type CartCheckoutDefinition, type CartCheckoutWhenWire, type CartConfigWire, type CartDefinition, type CartPointer, type CartSummaryLineWire, type CartViewWire, type CheckInAfterSilence, type CheckInAfterSilenceInput, type CollectCreditCardNodeDefinition, type CompiledAgentProject, type ContainableCondition, type ContainableRuleGroup, type ContainableRuleSet, type ContainedCondition, type ContainedRuleGroup, type ContainedRuleSet, type ContainmentConfig, type ContainmentEndedByCondition, type ContainmentParameterCondition, type ContainmentTagCondition, type ContainmentVisitedNodeCondition, canonicalAuthoringKey, canonicalAuthoringKeys, compileAgent, DEFAULT_CHECK_IN_AFTER_SILENCE_DELAY_SECONDS, DEFAULT_PER_TURN_RETRIEVAL_RECENT_TURNS, DEFAULT_PER_TURN_RETRIEVAL_TOP_K, DEFAULT_TRANSITION_MESSAGE, defaultBackgroundNoise, defineAgent, type EdgeDefinition, type EnabledWithDescription, type EndCallNodeDefinition, type EotEagerness, type ExtractionField, type ExtractionInput, type ExtractNodeDefinition, FIVE9_SIP_BYE_HEADER_NAMES, type Five9SipByeHeaderName, type GeneratedExamples, type GeneratedExamplesPolicy, type GlobalNodeDefinition, type HttpNodeDefinition, type InterruptionEagerness, type LlmOverrideDefinition, type LlmOverrideWire, MAX_CONTAINMENT_RULE_DEPTH, type NodeDefinition, node, type ParameterUpdate, type PerTurnRetrievalDefinition, type PerTurnRetrievalWire, PII_REDACTION_CATEGORIES, type PiiRedactionCategory, type PiiRedactionConfig, type PromptExample, type PromptNodeDefinition, type PromptReference, type Pronunciation, prompt, type RemoteReference, reference, resolveExtractionFields, type SayNodeDefinition, type SopGlobalContext, type SopSection, type SopSectionEdge, type SopSpec, type SopToolRef, type StaticRouterNodeDefinition, type ToolUseSiteWire, TRANSITION_FILTER_MAX_CONDITIONS, TRANSITION_FILTER_MAX_DEPTH, type TransferCapability, type TransferChatNodeDefinition, type TransferNodeDefinition, type TransitionFilter, type TransitionFilterCondition, type TransitionFilterJs, type TransitionFilterValue, type TransitionFilterWire, type TransitionMessageWire, type UpdateParametersNodeDefinition, } from "./agents.cjs";
3
- export { BUILT_IN_ACTION_CONTRACTS, SEND_EMAIL_INPUT_SCHEMA, SEND_EMAIL_OUTPUT_MAPPINGS, SEND_EMAIL_OUTPUT_SCHEMA, SEND_TEXT_MESSAGE_INPUT_SCHEMA, SEND_TEXT_MESSAGE_OUTPUT_MAPPINGS, SEND_TEXT_MESSAGE_OUTPUT_SCHEMA, VALIDATE_ADDRESS_INPUT_SCHEMA, VALIDATE_ADDRESS_OUTPUT_MAPPINGS, VALIDATE_ADDRESS_OUTPUT_SCHEMA, WEB_SEARCH_INPUT_SCHEMA, WEB_SEARCH_OUTPUT_MAPPINGS, WEB_SEARCH_OUTPUT_SCHEMA, } from "./built-in-actions.cjs";
1
+ export { type ActionCompileOptions, type ActionDefinition, type ActionHttpHeaders, type ActionInputLabel, type ActionIoInput, type ActionOutputParameterMappings, type ActionOutputParameters, type ActionRunDefinition, type ActionsIoSchema, type ActionsIoSchemaNode, type ActionVersionValues, type AgentActionInput, action, actionsIoSchemaFromZod, type BackgroundMessage, type BuiltInActionValues, type BuiltInOperation, type CallableActionDefinition, canonicalActionSource, compileAction, type InlineActionDefinition, type ReferencedActionDefinition, resolveActionHttpHeaders, resolveActionIoSchema, type SensitiveInputScope, type SourceFileReference, sourceFile, } from "./actions.cjs";
2
+ export { type AbTestNodeDefinition, type ActionNodeDefinition, type AgentCompileOptions, type AgentDefinition, type AgentDefinitionInput, type AgentIdentityKind, type AgentModality, type AgentV2CommitContentWire, type AgentV2ConfigWire, type AgentV2EdgeWire, type AgentV2NodeWire, type AlwaysAvailableCapability, type AlwaysAvailableTransitionFilterWire, type AssistActionUseSiteWire, type AssistCardButtonDefinition, type AssistCardButtonWire, type AssistCardDefinition, type AssistCardWire, type AssistChecklistDefinition, type AssistChecklistWire, type AssistMomentTriggerWire, type AssistPlaybookConfigWire, type AssistPlaybookDefinition, type AssistProcedureDefinition, type AssistProcedureHookWire, type AssistProcedureStepDefinition, type AssistProcedureStepWire, type AssistProcedureWire, assistActionRunKey, type BackgroundNoise, type BackgroundNoiseConfig, BEFORE_CALL_ACTION_KEY, CALL_END_ACTION_KEY, type CallParameterFilter, type CartActionRef, type CartCheckoutDefinition, type CartCheckoutWhenWire, type CartConfigWire, type CartDefinition, type CartPointer, type CartSummaryLineWire, type CartViewWire, type CheckInAfterSilence, type CheckInAfterSilenceInput, type CollectCreditCardNodeDefinition, type CompiledAgentProject, type ConditionOperator, type ContainableCondition, type ContainableRuleGroup, type ContainableRuleSet, type ContainedCondition, type ContainedRuleGroup, type ContainedRuleSet, type ContainmentConfig, type ContainmentEndedByCondition, type ContainmentParameterCondition, type ContainmentTagCondition, type ContainmentVisitedNodeCondition, canonicalAuthoringKey, canonicalAuthoringKeys, compileAgent, DEFAULT_CHECK_IN_AFTER_SILENCE_DELAY_SECONDS, DEFAULT_PER_TURN_RETRIEVAL_RECENT_TURNS, DEFAULT_PER_TURN_RETRIEVAL_TOP_K, DEFAULT_TRANSITION_MESSAGE, defaultBackgroundNoise, defineAgent, type EdgeDefinition, type EnabledWithDescription, type EndCallNodeDefinition, type EotEagerness, type ExtractionField, type ExtractionInput, type ExtractNodeDefinition, FIVE9_SIP_BYE_HEADER_NAMES, type Five9SipByeHeaderName, type GeneratedExamples, type GeneratedExamplesPolicy, type GlobalNodeDefinition, GUARDRAIL_MODES, type GuardrailAssignmentDefinition, type GuardrailAssignmentWire, type GuardrailMode, type HttpNodeDefinition, type InterruptionEagerness, type LlmOverrideDefinition, type LlmOverrideWire, MAX_CONTAINMENT_RULE_DEPTH, type NodeDefinition, node, type ParameterUpdate, type PerTurnRetrievalDefinition, type PerTurnRetrievalWire, PII_REDACTION_CATEGORIES, type PiiRedactionCategory, type PiiRedactionConfig, type PromptExample, type PromptNodeDefinition, type PromptReference, type Pronunciation, prompt, type RemoteReference, reference, resolveExtractionFields, type SayNodeDefinition, type SopGlobalContext, type SopSection, type SopSectionEdge, type SopSpec, type SopToolRef, type StaticRouterNodeDefinition, type ToolUseSiteWire, TRANSITION_FILTER_MAX_CONDITIONS, TRANSITION_FILTER_MAX_DEPTH, type TransferCapability, type TransferChatNodeDefinition, type TransferNodeDefinition, type TransitionFilter, type TransitionFilterCondition, type TransitionFilterJs, type TransitionFilterValue, type TransitionFilterWire, type TransitionMessageWire, type UpdateParametersNodeDefinition, } from "./agents.cjs";
3
+ export { BROWSER_ACTION_ENVIRONMENTS, BROWSER_ACTION_KINDS, BROWSER_ACTION_TIMEOUT_MS_DEFAULT, BUILT_IN_ACTION_CONTRACTS, SEND_EMAIL_INPUT_SCHEMA, SEND_EMAIL_OUTPUT_MAPPINGS, SEND_EMAIL_OUTPUT_SCHEMA, SEND_TEXT_MESSAGE_INPUT_SCHEMA, SEND_TEXT_MESSAGE_OUTPUT_MAPPINGS, SEND_TEXT_MESSAGE_OUTPUT_SCHEMA, VALIDATE_ADDRESS_INPUT_SCHEMA, VALIDATE_ADDRESS_OUTPUT_MAPPINGS, VALIDATE_ADDRESS_OUTPUT_SCHEMA, WEB_SEARCH_INPUT_SCHEMA, WEB_SEARCH_OUTPUT_MAPPINGS, WEB_SEARCH_OUTPUT_SCHEMA, } from "./built-in-actions.cjs";
4
4
  export { SimpleAI, type SimpleAIOptions } from "./client.cjs";
5
5
  export { type ActionContext, type ActionHandler, type CustomDataResult, type CustomDataTransformContext, type CustomDataTransformHandler, type CustomDataTransformOperation, defineAction, defineCustomDataTransform, SIMPLE_ACTION_BRAND, } from "./code-action/define-action.cjs";
6
6
  export { ActionCapability, type ActionInvocationMetadata, type ActionSimulation } from "./code-action/types.cjs";
7
7
  export type { ActionWorkflow, TransitionToOptions } from "./code-action/workflow.cjs";
8
8
  export { DataClient } from "./data.cjs";
9
- export { type AgentProjectSource, type AgentSnapshotDefinition, collectActionVersionUuids, compileAgentProject, defineAgentSnapshot, normalizeAgentV2CommitContent, type SnapshotAction, } from "./projects.cjs";
9
+ export { assistActionUseSites, collectActionVersionUuids, normalizeAgentV2CommitContent } from "./projects.cjs";
10
10
  export type { BatchUpsertResult, ClientCredentialsToken, ClientCredentialsTokenInput, DataFilter, DataRecord, DeleteResult, FacetsResult, IngestBatchStatus, ListOptions, ListResult, QueryInput, QueryResult, RecordPayload, RecordResult, } from "./schemas.cjs";
11
11
  export { batchUpsertRowsSchema, clientCredentialsTokenInputSchema, dataColumnPathSchema, dataFilterSchema, listOptionsSchema, MAX_BATCH_ROWS, MAX_QUERY_SIZE, queryInputSchema, recordPayloadSchema, tableNameSchema, } from "./schemas.cjs";
12
12
  export { MissingCapabilityError, SimpleAIError } from "./shared/errors.cjs";