@amigo-ai/platform-sdk 0.4.5 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +14 -10
  3. package/api.md +50 -0
  4. package/dist/index.cjs +305 -1
  5. package/dist/index.cjs.map +3 -3
  6. package/dist/index.mjs +305 -1
  7. package/dist/index.mjs.map +3 -3
  8. package/dist/resources/actions.js +9 -0
  9. package/dist/resources/actions.js.map +1 -1
  10. package/dist/resources/agents.js +6 -0
  11. package/dist/resources/agents.js.map +1 -1
  12. package/dist/resources/analytics.js +18 -0
  13. package/dist/resources/analytics.js.map +1 -1
  14. package/dist/resources/api-keys.js +3 -0
  15. package/dist/resources/api-keys.js.map +1 -1
  16. package/dist/resources/audit.js +9 -0
  17. package/dist/resources/audit.js.map +1 -1
  18. package/dist/resources/base.js +26 -0
  19. package/dist/resources/base.js.map +1 -1
  20. package/dist/resources/billing.js +3 -0
  21. package/dist/resources/billing.js.map +1 -1
  22. package/dist/resources/calls.js +9 -0
  23. package/dist/resources/calls.js.map +1 -1
  24. package/dist/resources/context-graphs.js +7 -1
  25. package/dist/resources/context-graphs.js.map +1 -1
  26. package/dist/resources/data-sources.js +3 -0
  27. package/dist/resources/data-sources.js.map +1 -1
  28. package/dist/resources/integrations.js +3 -0
  29. package/dist/resources/integrations.js.map +1 -1
  30. package/dist/resources/operators.js +16 -0
  31. package/dist/resources/operators.js.map +1 -1
  32. package/dist/resources/personas.js +3 -0
  33. package/dist/resources/personas.js.map +1 -1
  34. package/dist/resources/phone-numbers.js +3 -0
  35. package/dist/resources/phone-numbers.js.map +1 -1
  36. package/dist/resources/review-queue.js +9 -0
  37. package/dist/resources/review-queue.js.map +1 -1
  38. package/dist/resources/services.js +3 -0
  39. package/dist/resources/services.js.map +1 -1
  40. package/dist/resources/settings.js +45 -0
  41. package/dist/resources/settings.js.map +1 -1
  42. package/dist/resources/skills.js +3 -0
  43. package/dist/resources/skills.js.map +1 -1
  44. package/dist/resources/triggers.js +6 -0
  45. package/dist/resources/triggers.js.map +1 -1
  46. package/dist/resources/webhook-destinations.js +6 -0
  47. package/dist/resources/webhook-destinations.js.map +1 -1
  48. package/dist/resources/workspaces.js +3 -0
  49. package/dist/resources/workspaces.js.map +1 -1
  50. package/dist/resources/world.js +34 -0
  51. package/dist/resources/world.js.map +1 -1
  52. package/dist/types/generated/api.d.ts +762 -53
  53. package/dist/types/generated/api.d.ts.map +1 -1
  54. package/dist/types/resources/actions.d.ts +166 -17
  55. package/dist/types/resources/actions.d.ts.map +1 -1
  56. package/dist/types/resources/agents.d.ts +123 -13
  57. package/dist/types/resources/agents.d.ts.map +1 -1
  58. package/dist/types/resources/analytics.d.ts +103 -15
  59. package/dist/types/resources/analytics.d.ts.map +1 -1
  60. package/dist/types/resources/api-keys.d.ts +32 -3
  61. package/dist/types/resources/api-keys.d.ts.map +1 -1
  62. package/dist/types/resources/audit.d.ts +114 -4
  63. package/dist/types/resources/audit.d.ts.map +1 -1
  64. package/dist/types/resources/base.d.ts +11 -0
  65. package/dist/types/resources/base.d.ts.map +1 -1
  66. package/dist/types/resources/billing.d.ts +58 -8
  67. package/dist/types/resources/billing.d.ts.map +1 -1
  68. package/dist/types/resources/calls.d.ts +183 -45
  69. package/dist/types/resources/calls.d.ts.map +1 -1
  70. package/dist/types/resources/compliance.d.ts +6 -6
  71. package/dist/types/resources/context-graphs.d.ts +840 -16
  72. package/dist/types/resources/context-graphs.d.ts.map +1 -1
  73. package/dist/types/resources/data-sources.d.ts +88 -25
  74. package/dist/types/resources/data-sources.d.ts.map +1 -1
  75. package/dist/types/resources/functions.d.ts +49 -22
  76. package/dist/types/resources/functions.d.ts.map +1 -1
  77. package/dist/types/resources/integrations.d.ts +390 -39
  78. package/dist/types/resources/integrations.d.ts.map +1 -1
  79. package/dist/types/resources/memory.d.ts +48 -4
  80. package/dist/types/resources/memory.d.ts.map +1 -1
  81. package/dist/types/resources/operators.d.ts +238 -40
  82. package/dist/types/resources/operators.d.ts.map +1 -1
  83. package/dist/types/resources/personas.d.ts +33 -6
  84. package/dist/types/resources/personas.d.ts.map +1 -1
  85. package/dist/types/resources/phone-numbers.d.ts +60 -7
  86. package/dist/types/resources/phone-numbers.d.ts.map +1 -1
  87. package/dist/types/resources/recordings.d.ts +4 -4
  88. package/dist/types/resources/review-queue.d.ts +398 -37
  89. package/dist/types/resources/review-queue.d.ts.map +1 -1
  90. package/dist/types/resources/safety.d.ts +32 -6
  91. package/dist/types/resources/safety.d.ts.map +1 -1
  92. package/dist/types/resources/services.d.ts +227 -36
  93. package/dist/types/resources/services.d.ts.map +1 -1
  94. package/dist/types/resources/settings.d.ts +450 -14
  95. package/dist/types/resources/settings.d.ts.map +1 -1
  96. package/dist/types/resources/simulations.d.ts +150 -22
  97. package/dist/types/resources/simulations.d.ts.map +1 -1
  98. package/dist/types/resources/skills.d.ts +151 -17
  99. package/dist/types/resources/skills.d.ts.map +1 -1
  100. package/dist/types/resources/triggers.d.ts +110 -52
  101. package/dist/types/resources/triggers.d.ts.map +1 -1
  102. package/dist/types/resources/webhook-destinations.d.ts +65 -15
  103. package/dist/types/resources/webhook-destinations.d.ts.map +1 -1
  104. package/dist/types/resources/workspaces.d.ts +26 -3
  105. package/dist/types/resources/workspaces.d.ts.map +1 -1
  106. package/dist/types/resources/world.d.ts +389 -56
  107. package/dist/types/resources/world.d.ts.map +1 -1
  108. package/package.json +9 -9
@@ -15,25 +15,44 @@ export declare class ContextGraphsResource extends WorkspaceScopedResource {
15
15
  created_at: string;
16
16
  description: string;
17
17
  id: string;
18
- latest_version?: number;
18
+ latest_version?: number | undefined;
19
19
  name: string;
20
- state_count?: number;
20
+ state_count?: number | undefined;
21
21
  updated_at: string;
22
22
  workspace_id: string;
23
23
  } & import("../index.js").ResponseMetadata>;
24
24
  list(params?: ListContextGraphsParams): Promise<{
25
- continuation_token?: number | null;
25
+ continuation_token?: number | null | undefined;
26
26
  has_more: boolean;
27
- items: components["schemas"]["ContextGraphResponse"][];
28
- total?: number | null;
27
+ items: {
28
+ created_at: string;
29
+ description: string;
30
+ id: string;
31
+ latest_version?: number | undefined;
32
+ name: string;
33
+ state_count?: number | undefined;
34
+ updated_at: string;
35
+ workspace_id: string;
36
+ }[];
37
+ total?: number | null | undefined;
29
38
  } & import("../index.js").ResponseMetadata>;
39
+ listAutoPaging(params?: ListContextGraphsParams): AsyncGenerator<{
40
+ created_at: string;
41
+ description: string;
42
+ id: string;
43
+ latest_version?: number | undefined;
44
+ name: string;
45
+ state_count?: number | undefined;
46
+ updated_at: string;
47
+ workspace_id: string;
48
+ }, any, any>;
30
49
  get(contextGraphId: ContextGraphId | string): Promise<{
31
50
  created_at: string;
32
51
  description: string;
33
52
  id: string;
34
- latest_version?: number;
53
+ latest_version?: number | undefined;
35
54
  name: string;
36
- state_count?: number;
55
+ state_count?: number | undefined;
37
56
  updated_at: string;
38
57
  workspace_id: string;
39
58
  } & import("../index.js").ResponseMetadata>;
@@ -41,9 +60,9 @@ export declare class ContextGraphsResource extends WorkspaceScopedResource {
41
60
  created_at: string;
42
61
  description: string;
43
62
  id: string;
44
- latest_version?: number;
63
+ latest_version?: number | undefined;
45
64
  name: string;
46
- state_count?: number;
65
+ state_count?: number | undefined;
47
66
  updated_at: string;
48
67
  workspace_id: string;
49
68
  } & import("../index.js").ResponseMetadata>;
@@ -59,7 +78,200 @@ export declare class ContextGraphsResource extends WorkspaceScopedResource {
59
78
  id: string;
60
79
  new_user_initial_state: string;
61
80
  returning_user_initial_state: string;
62
- states: components["schemas"]["ContextGraphState-Output"][];
81
+ states: ({
82
+ action_guidelines: string[];
83
+ action_tool_call_specs?: {
84
+ additional_instruction?: string | undefined;
85
+ navigate_on_completion?: boolean | undefined;
86
+ progress?: {
87
+ custom_phrase?: string | null | undefined;
88
+ expected_latency_ms?: number | null | undefined;
89
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
90
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
91
+ } | null | undefined;
92
+ tool_id: string;
93
+ }[] | undefined;
94
+ actions: {
95
+ description: string;
96
+ filler_hint?: string | null | undefined;
97
+ }[];
98
+ boundary_constraints: string[];
99
+ channel_overrides?: {
100
+ [x: string]: {
101
+ action_guidelines?: string[] | undefined;
102
+ objective?: string | null | undefined;
103
+ progress?: {
104
+ custom_phrase?: string | null | undefined;
105
+ expected_latency_ms?: number | null | undefined;
106
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
107
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
108
+ } | null | undefined;
109
+ };
110
+ } | undefined;
111
+ escalation_config?: {
112
+ auto_escalate_threshold?: number | null | undefined;
113
+ max_loop_count?: number | undefined;
114
+ operator_skill?: string | null | undefined;
115
+ topic_risk_score?: number | undefined;
116
+ } | null | undefined;
117
+ exit_condition_tool_call_specs?: {
118
+ additional_instruction?: string | undefined;
119
+ navigate_on_completion?: boolean | undefined;
120
+ progress?: {
121
+ custom_phrase?: string | null | undefined;
122
+ expected_latency_ms?: number | null | undefined;
123
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
124
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
125
+ } | null | undefined;
126
+ tool_id: string;
127
+ }[] | undefined;
128
+ exit_conditions: {
129
+ description: string;
130
+ filler_hint?: string | null | undefined;
131
+ next_state: string;
132
+ }[];
133
+ guardrails?: {
134
+ description: string;
135
+ enforcement?: "hard" | "soft" | undefined;
136
+ name: string;
137
+ }[] | undefined;
138
+ intra_state_navigation_guidelines: string[];
139
+ name: string;
140
+ objective: string;
141
+ surface_spec_template?: {
142
+ [x: string]: unknown;
143
+ } | null | undefined;
144
+ turn_policy?: {
145
+ barge_in_enabled?: boolean | undefined;
146
+ block_forward_call?: boolean | undefined;
147
+ block_forward_call_after_turns?: number | undefined;
148
+ context_strategy?: "full" | "summarize" | "compact" | undefined;
149
+ degradation_threshold?: number | undefined;
150
+ greeting_shield_s?: number | undefined;
151
+ safety_response?: "suspend_forward" | "stay_empathize" | "alert" | undefined;
152
+ stt_eager_eot_threshold?: number | null | undefined;
153
+ stt_eot_threshold?: number | null | undefined;
154
+ stt_eot_timeout_ms?: number | null | undefined;
155
+ } | null | undefined;
156
+ type: "action";
157
+ wait_for?: ("surface_submission" | "human_approval") | null | undefined;
158
+ } | {
159
+ inner_thought: string;
160
+ name: string;
161
+ next_state: string;
162
+ type: "annotation";
163
+ } | {
164
+ channel_overrides?: {
165
+ [x: string]: {
166
+ action_guidelines?: string[] | undefined;
167
+ objective?: string | null | undefined;
168
+ progress?: {
169
+ custom_phrase?: string | null | undefined;
170
+ expected_latency_ms?: number | null | undefined;
171
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
172
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
173
+ } | null | undefined;
174
+ };
175
+ } | undefined;
176
+ decision_guidelines?: string[] | undefined;
177
+ exit_conditions: {
178
+ description: string;
179
+ filler_hint?: string | null | undefined;
180
+ next_state: string;
181
+ }[];
182
+ guardrails?: {
183
+ description: string;
184
+ enforcement?: "hard" | "soft" | undefined;
185
+ name: string;
186
+ }[] | undefined;
187
+ name: string;
188
+ objective: string;
189
+ tool_call_specs?: {
190
+ additional_instruction?: string | undefined;
191
+ navigate_on_completion?: boolean | undefined;
192
+ progress?: {
193
+ custom_phrase?: string | null | undefined;
194
+ expected_latency_ms?: number | null | undefined;
195
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
196
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
197
+ } | null | undefined;
198
+ tool_id: string;
199
+ }[] | undefined;
200
+ turn_policy?: {
201
+ barge_in_enabled?: boolean | undefined;
202
+ block_forward_call?: boolean | undefined;
203
+ block_forward_call_after_turns?: number | undefined;
204
+ context_strategy?: "full" | "summarize" | "compact" | undefined;
205
+ degradation_threshold?: number | undefined;
206
+ greeting_shield_s?: number | undefined;
207
+ safety_response?: "suspend_forward" | "stay_empathize" | "alert" | undefined;
208
+ stt_eager_eot_threshold?: number | null | undefined;
209
+ stt_eot_threshold?: number | null | undefined;
210
+ stt_eot_timeout_ms?: number | null | undefined;
211
+ } | null | undefined;
212
+ type: "decision";
213
+ wait_for?: ("surface_submission" | "human_approval") | null | undefined;
214
+ } | {
215
+ action_guidelines?: string[] | undefined;
216
+ boundary_constraints?: string[] | undefined;
217
+ channel_overrides?: {
218
+ [x: string]: {
219
+ action_guidelines?: string[] | undefined;
220
+ objective?: string | null | undefined;
221
+ progress?: {
222
+ custom_phrase?: string | null | undefined;
223
+ expected_latency_ms?: number | null | undefined;
224
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
225
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
226
+ } | null | undefined;
227
+ };
228
+ } | undefined;
229
+ fields: {
230
+ ask_prompt?: string | null | undefined;
231
+ fhir_path?: string | null | undefined;
232
+ key: string;
233
+ label: string;
234
+ options?: string[] | null | undefined;
235
+ required?: boolean | undefined;
236
+ type: string;
237
+ validation?: string | null | undefined;
238
+ }[];
239
+ guardrails?: {
240
+ description: string;
241
+ enforcement?: "hard" | "soft" | undefined;
242
+ name: string;
243
+ }[] | undefined;
244
+ max_turns?: number | undefined;
245
+ name: string;
246
+ objective: string;
247
+ on_complete: string;
248
+ surface_fallback?: boolean | undefined;
249
+ surface_fallback_after_turns?: number | undefined;
250
+ tool_call_specs?: {
251
+ additional_instruction?: string | undefined;
252
+ navigate_on_completion?: boolean | undefined;
253
+ progress?: {
254
+ custom_phrase?: string | null | undefined;
255
+ expected_latency_ms?: number | null | undefined;
256
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
257
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
258
+ } | null | undefined;
259
+ tool_id: string;
260
+ }[] | undefined;
261
+ turn_policy?: {
262
+ barge_in_enabled?: boolean | undefined;
263
+ block_forward_call?: boolean | undefined;
264
+ block_forward_call_after_turns?: number | undefined;
265
+ context_strategy?: "full" | "summarize" | "compact" | undefined;
266
+ degradation_threshold?: number | undefined;
267
+ greeting_shield_s?: number | undefined;
268
+ safety_response?: "suspend_forward" | "stay_empathize" | "alert" | undefined;
269
+ stt_eager_eot_threshold?: number | null | undefined;
270
+ stt_eot_threshold?: number | null | undefined;
271
+ stt_eot_timeout_ms?: number | null | undefined;
272
+ } | null | undefined;
273
+ type: "data_collection";
274
+ })[];
63
275
  terminal_state: string;
64
276
  topology_description: string | null;
65
277
  updated_at: string;
@@ -68,13 +280,432 @@ export declare class ContextGraphsResource extends WorkspaceScopedResource {
68
280
  } & import("../index.js").ResponseMetadata>;
69
281
  /** List all versions of a context graph */
70
282
  listVersions(contextGraphId: ContextGraphId | string, params?: ListParams): Promise<{
71
- continuation_token?: number | null;
283
+ continuation_token?: number | null | undefined;
72
284
  has_more: boolean;
73
- items: components["schemas"]["ContextGraphVersionResponse"][];
74
- total?: number | null;
285
+ items: {
286
+ context_graph_id: string;
287
+ created_at: string;
288
+ description: string;
289
+ global_action_guidelines: string[];
290
+ global_boundary_constraints: string[];
291
+ global_intra_state_navigation_guidelines: string[];
292
+ id: string;
293
+ new_user_initial_state: string;
294
+ returning_user_initial_state: string;
295
+ states: ({
296
+ action_guidelines: string[];
297
+ action_tool_call_specs?: {
298
+ additional_instruction?: string | undefined;
299
+ navigate_on_completion?: boolean | undefined;
300
+ progress?: {
301
+ custom_phrase?: string | null | undefined;
302
+ expected_latency_ms?: number | null | undefined;
303
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
304
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
305
+ } | null | undefined;
306
+ tool_id: string;
307
+ }[] | undefined;
308
+ actions: {
309
+ description: string;
310
+ filler_hint?: string | null | undefined;
311
+ }[];
312
+ boundary_constraints: string[];
313
+ channel_overrides?: {
314
+ [x: string]: {
315
+ action_guidelines?: string[] | undefined;
316
+ objective?: string | null | undefined;
317
+ progress?: {
318
+ custom_phrase?: string | null | undefined;
319
+ expected_latency_ms?: number | null | undefined;
320
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
321
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
322
+ } | null | undefined;
323
+ };
324
+ } | undefined;
325
+ escalation_config?: {
326
+ auto_escalate_threshold?: number | null | undefined;
327
+ max_loop_count?: number | undefined;
328
+ operator_skill?: string | null | undefined;
329
+ topic_risk_score?: number | undefined;
330
+ } | null | undefined;
331
+ exit_condition_tool_call_specs?: {
332
+ additional_instruction?: string | undefined;
333
+ navigate_on_completion?: boolean | undefined;
334
+ progress?: {
335
+ custom_phrase?: string | null | undefined;
336
+ expected_latency_ms?: number | null | undefined;
337
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
338
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
339
+ } | null | undefined;
340
+ tool_id: string;
341
+ }[] | undefined;
342
+ exit_conditions: {
343
+ description: string;
344
+ filler_hint?: string | null | undefined;
345
+ next_state: string;
346
+ }[];
347
+ guardrails?: {
348
+ description: string;
349
+ enforcement?: "hard" | "soft" | undefined;
350
+ name: string;
351
+ }[] | undefined;
352
+ intra_state_navigation_guidelines: string[];
353
+ name: string;
354
+ objective: string;
355
+ surface_spec_template?: {
356
+ [x: string]: unknown;
357
+ } | null | undefined;
358
+ turn_policy?: {
359
+ barge_in_enabled?: boolean | undefined;
360
+ block_forward_call?: boolean | undefined;
361
+ block_forward_call_after_turns?: number | undefined;
362
+ context_strategy?: "full" | "summarize" | "compact" | undefined;
363
+ degradation_threshold?: number | undefined;
364
+ greeting_shield_s?: number | undefined;
365
+ safety_response?: "suspend_forward" | "stay_empathize" | "alert" | undefined;
366
+ stt_eager_eot_threshold?: number | null | undefined;
367
+ stt_eot_threshold?: number | null | undefined;
368
+ stt_eot_timeout_ms?: number | null | undefined;
369
+ } | null | undefined;
370
+ type: "action";
371
+ wait_for?: ("surface_submission" | "human_approval") | null | undefined;
372
+ } | {
373
+ inner_thought: string;
374
+ name: string;
375
+ next_state: string;
376
+ type: "annotation";
377
+ } | {
378
+ channel_overrides?: {
379
+ [x: string]: {
380
+ action_guidelines?: string[] | undefined;
381
+ objective?: string | null | undefined;
382
+ progress?: {
383
+ custom_phrase?: string | null | undefined;
384
+ expected_latency_ms?: number | null | undefined;
385
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
386
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
387
+ } | null | undefined;
388
+ };
389
+ } | undefined;
390
+ decision_guidelines?: string[] | undefined;
391
+ exit_conditions: {
392
+ description: string;
393
+ filler_hint?: string | null | undefined;
394
+ next_state: string;
395
+ }[];
396
+ guardrails?: {
397
+ description: string;
398
+ enforcement?: "hard" | "soft" | undefined;
399
+ name: string;
400
+ }[] | undefined;
401
+ name: string;
402
+ objective: string;
403
+ tool_call_specs?: {
404
+ additional_instruction?: string | undefined;
405
+ navigate_on_completion?: boolean | undefined;
406
+ progress?: {
407
+ custom_phrase?: string | null | undefined;
408
+ expected_latency_ms?: number | null | undefined;
409
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
410
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
411
+ } | null | undefined;
412
+ tool_id: string;
413
+ }[] | undefined;
414
+ turn_policy?: {
415
+ barge_in_enabled?: boolean | undefined;
416
+ block_forward_call?: boolean | undefined;
417
+ block_forward_call_after_turns?: number | undefined;
418
+ context_strategy?: "full" | "summarize" | "compact" | undefined;
419
+ degradation_threshold?: number | undefined;
420
+ greeting_shield_s?: number | undefined;
421
+ safety_response?: "suspend_forward" | "stay_empathize" | "alert" | undefined;
422
+ stt_eager_eot_threshold?: number | null | undefined;
423
+ stt_eot_threshold?: number | null | undefined;
424
+ stt_eot_timeout_ms?: number | null | undefined;
425
+ } | null | undefined;
426
+ type: "decision";
427
+ wait_for?: ("surface_submission" | "human_approval") | null | undefined;
428
+ } | {
429
+ action_guidelines?: string[] | undefined;
430
+ boundary_constraints?: string[] | undefined;
431
+ channel_overrides?: {
432
+ [x: string]: {
433
+ action_guidelines?: string[] | undefined;
434
+ objective?: string | null | undefined;
435
+ progress?: {
436
+ custom_phrase?: string | null | undefined;
437
+ expected_latency_ms?: number | null | undefined;
438
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
439
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
440
+ } | null | undefined;
441
+ };
442
+ } | undefined;
443
+ fields: {
444
+ ask_prompt?: string | null | undefined;
445
+ fhir_path?: string | null | undefined;
446
+ key: string;
447
+ label: string;
448
+ options?: string[] | null | undefined;
449
+ required?: boolean | undefined;
450
+ type: string;
451
+ validation?: string | null | undefined;
452
+ }[];
453
+ guardrails?: {
454
+ description: string;
455
+ enforcement?: "hard" | "soft" | undefined;
456
+ name: string;
457
+ }[] | undefined;
458
+ max_turns?: number | undefined;
459
+ name: string;
460
+ objective: string;
461
+ on_complete: string;
462
+ surface_fallback?: boolean | undefined;
463
+ surface_fallback_after_turns?: number | undefined;
464
+ tool_call_specs?: {
465
+ additional_instruction?: string | undefined;
466
+ navigate_on_completion?: boolean | undefined;
467
+ progress?: {
468
+ custom_phrase?: string | null | undefined;
469
+ expected_latency_ms?: number | null | undefined;
470
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
471
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
472
+ } | null | undefined;
473
+ tool_id: string;
474
+ }[] | undefined;
475
+ turn_policy?: {
476
+ barge_in_enabled?: boolean | undefined;
477
+ block_forward_call?: boolean | undefined;
478
+ block_forward_call_after_turns?: number | undefined;
479
+ context_strategy?: "full" | "summarize" | "compact" | undefined;
480
+ degradation_threshold?: number | undefined;
481
+ greeting_shield_s?: number | undefined;
482
+ safety_response?: "suspend_forward" | "stay_empathize" | "alert" | undefined;
483
+ stt_eager_eot_threshold?: number | null | undefined;
484
+ stt_eot_threshold?: number | null | undefined;
485
+ stt_eot_timeout_ms?: number | null | undefined;
486
+ } | null | undefined;
487
+ type: "data_collection";
488
+ })[];
489
+ terminal_state: string;
490
+ topology_description: string | null;
491
+ updated_at: string;
492
+ version: number;
493
+ workspace_id: string;
494
+ }[];
495
+ total?: number | null | undefined;
75
496
  } & import("../index.js").ResponseMetadata>;
76
- /** Get a specific version */
77
- getVersion(contextGraphId: ContextGraphId | string, version: number): Promise<{
497
+ listVersionsAutoPaging(contextGraphId: ContextGraphId | string, params?: ListParams): AsyncGenerator<{
498
+ context_graph_id: string;
499
+ created_at: string;
500
+ description: string;
501
+ global_action_guidelines: string[];
502
+ global_boundary_constraints: string[];
503
+ global_intra_state_navigation_guidelines: string[];
504
+ id: string;
505
+ new_user_initial_state: string;
506
+ returning_user_initial_state: string;
507
+ states: ({
508
+ action_guidelines: string[];
509
+ action_tool_call_specs?: {
510
+ additional_instruction?: string | undefined;
511
+ navigate_on_completion?: boolean | undefined;
512
+ progress?: {
513
+ custom_phrase?: string | null | undefined;
514
+ expected_latency_ms?: number | null | undefined;
515
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
516
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
517
+ } | null | undefined;
518
+ tool_id: string;
519
+ }[] | undefined;
520
+ actions: {
521
+ description: string;
522
+ filler_hint?: string | null | undefined;
523
+ }[];
524
+ boundary_constraints: string[];
525
+ channel_overrides?: {
526
+ [x: string]: {
527
+ action_guidelines?: string[] | undefined;
528
+ objective?: string | null | undefined;
529
+ progress?: {
530
+ custom_phrase?: string | null | undefined;
531
+ expected_latency_ms?: number | null | undefined;
532
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
533
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
534
+ } | null | undefined;
535
+ };
536
+ } | undefined;
537
+ escalation_config?: {
538
+ auto_escalate_threshold?: number | null | undefined;
539
+ max_loop_count?: number | undefined;
540
+ operator_skill?: string | null | undefined;
541
+ topic_risk_score?: number | undefined;
542
+ } | null | undefined;
543
+ exit_condition_tool_call_specs?: {
544
+ additional_instruction?: string | undefined;
545
+ navigate_on_completion?: boolean | undefined;
546
+ progress?: {
547
+ custom_phrase?: string | null | undefined;
548
+ expected_latency_ms?: number | null | undefined;
549
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
550
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
551
+ } | null | undefined;
552
+ tool_id: string;
553
+ }[] | undefined;
554
+ exit_conditions: {
555
+ description: string;
556
+ filler_hint?: string | null | undefined;
557
+ next_state: string;
558
+ }[];
559
+ guardrails?: {
560
+ description: string;
561
+ enforcement?: "hard" | "soft" | undefined;
562
+ name: string;
563
+ }[] | undefined;
564
+ intra_state_navigation_guidelines: string[];
565
+ name: string;
566
+ objective: string;
567
+ surface_spec_template?: {
568
+ [x: string]: unknown;
569
+ } | null | undefined;
570
+ turn_policy?: {
571
+ barge_in_enabled?: boolean | undefined;
572
+ block_forward_call?: boolean | undefined;
573
+ block_forward_call_after_turns?: number | undefined;
574
+ context_strategy?: "full" | "summarize" | "compact" | undefined;
575
+ degradation_threshold?: number | undefined;
576
+ greeting_shield_s?: number | undefined;
577
+ safety_response?: "suspend_forward" | "stay_empathize" | "alert" | undefined;
578
+ stt_eager_eot_threshold?: number | null | undefined;
579
+ stt_eot_threshold?: number | null | undefined;
580
+ stt_eot_timeout_ms?: number | null | undefined;
581
+ } | null | undefined;
582
+ type: "action";
583
+ wait_for?: ("surface_submission" | "human_approval") | null | undefined;
584
+ } | {
585
+ inner_thought: string;
586
+ name: string;
587
+ next_state: string;
588
+ type: "annotation";
589
+ } | {
590
+ channel_overrides?: {
591
+ [x: string]: {
592
+ action_guidelines?: string[] | undefined;
593
+ objective?: string | null | undefined;
594
+ progress?: {
595
+ custom_phrase?: string | null | undefined;
596
+ expected_latency_ms?: number | null | undefined;
597
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
598
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
599
+ } | null | undefined;
600
+ };
601
+ } | undefined;
602
+ decision_guidelines?: string[] | undefined;
603
+ exit_conditions: {
604
+ description: string;
605
+ filler_hint?: string | null | undefined;
606
+ next_state: string;
607
+ }[];
608
+ guardrails?: {
609
+ description: string;
610
+ enforcement?: "hard" | "soft" | undefined;
611
+ name: string;
612
+ }[] | undefined;
613
+ name: string;
614
+ objective: string;
615
+ tool_call_specs?: {
616
+ additional_instruction?: string | undefined;
617
+ navigate_on_completion?: boolean | undefined;
618
+ progress?: {
619
+ custom_phrase?: string | null | undefined;
620
+ expected_latency_ms?: number | null | undefined;
621
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
622
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
623
+ } | null | undefined;
624
+ tool_id: string;
625
+ }[] | undefined;
626
+ turn_policy?: {
627
+ barge_in_enabled?: boolean | undefined;
628
+ block_forward_call?: boolean | undefined;
629
+ block_forward_call_after_turns?: number | undefined;
630
+ context_strategy?: "full" | "summarize" | "compact" | undefined;
631
+ degradation_threshold?: number | undefined;
632
+ greeting_shield_s?: number | undefined;
633
+ safety_response?: "suspend_forward" | "stay_empathize" | "alert" | undefined;
634
+ stt_eager_eot_threshold?: number | null | undefined;
635
+ stt_eot_threshold?: number | null | undefined;
636
+ stt_eot_timeout_ms?: number | null | undefined;
637
+ } | null | undefined;
638
+ type: "decision";
639
+ wait_for?: ("surface_submission" | "human_approval") | null | undefined;
640
+ } | {
641
+ action_guidelines?: string[] | undefined;
642
+ boundary_constraints?: string[] | undefined;
643
+ channel_overrides?: {
644
+ [x: string]: {
645
+ action_guidelines?: string[] | undefined;
646
+ objective?: string | null | undefined;
647
+ progress?: {
648
+ custom_phrase?: string | null | undefined;
649
+ expected_latency_ms?: number | null | undefined;
650
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
651
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
652
+ } | null | undefined;
653
+ };
654
+ } | undefined;
655
+ fields: {
656
+ ask_prompt?: string | null | undefined;
657
+ fhir_path?: string | null | undefined;
658
+ key: string;
659
+ label: string;
660
+ options?: string[] | null | undefined;
661
+ required?: boolean | undefined;
662
+ type: string;
663
+ validation?: string | null | undefined;
664
+ }[];
665
+ guardrails?: {
666
+ description: string;
667
+ enforcement?: "hard" | "soft" | undefined;
668
+ name: string;
669
+ }[] | undefined;
670
+ max_turns?: number | undefined;
671
+ name: string;
672
+ objective: string;
673
+ on_complete: string;
674
+ surface_fallback?: boolean | undefined;
675
+ surface_fallback_after_turns?: number | undefined;
676
+ tool_call_specs?: {
677
+ additional_instruction?: string | undefined;
678
+ navigate_on_completion?: boolean | undefined;
679
+ progress?: {
680
+ custom_phrase?: string | null | undefined;
681
+ expected_latency_ms?: number | null | undefined;
682
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
683
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
684
+ } | null | undefined;
685
+ tool_id: string;
686
+ }[] | undefined;
687
+ turn_policy?: {
688
+ barge_in_enabled?: boolean | undefined;
689
+ block_forward_call?: boolean | undefined;
690
+ block_forward_call_after_turns?: number | undefined;
691
+ context_strategy?: "full" | "summarize" | "compact" | undefined;
692
+ degradation_threshold?: number | undefined;
693
+ greeting_shield_s?: number | undefined;
694
+ safety_response?: "suspend_forward" | "stay_empathize" | "alert" | undefined;
695
+ stt_eager_eot_threshold?: number | null | undefined;
696
+ stt_eot_threshold?: number | null | undefined;
697
+ stt_eot_timeout_ms?: number | null | undefined;
698
+ } | null | undefined;
699
+ type: "data_collection";
700
+ })[];
701
+ terminal_state: string;
702
+ topology_description: string | null;
703
+ updated_at: string;
704
+ version: number;
705
+ workspace_id: string;
706
+ }, any, any>;
707
+ /** Get a specific version by number, or pass "latest" for the most recent */
708
+ getVersion(contextGraphId: ContextGraphId | string, version: number | 'latest'): Promise<{
78
709
  context_graph_id: string;
79
710
  created_at: string;
80
711
  description: string;
@@ -84,7 +715,200 @@ export declare class ContextGraphsResource extends WorkspaceScopedResource {
84
715
  id: string;
85
716
  new_user_initial_state: string;
86
717
  returning_user_initial_state: string;
87
- states: components["schemas"]["ContextGraphState-Output"][];
718
+ states: ({
719
+ action_guidelines: string[];
720
+ action_tool_call_specs?: {
721
+ additional_instruction?: string | undefined;
722
+ navigate_on_completion?: boolean | undefined;
723
+ progress?: {
724
+ custom_phrase?: string | null | undefined;
725
+ expected_latency_ms?: number | null | undefined;
726
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
727
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
728
+ } | null | undefined;
729
+ tool_id: string;
730
+ }[] | undefined;
731
+ actions: {
732
+ description: string;
733
+ filler_hint?: string | null | undefined;
734
+ }[];
735
+ boundary_constraints: string[];
736
+ channel_overrides?: {
737
+ [x: string]: {
738
+ action_guidelines?: string[] | undefined;
739
+ objective?: string | null | undefined;
740
+ progress?: {
741
+ custom_phrase?: string | null | undefined;
742
+ expected_latency_ms?: number | null | undefined;
743
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
744
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
745
+ } | null | undefined;
746
+ };
747
+ } | undefined;
748
+ escalation_config?: {
749
+ auto_escalate_threshold?: number | null | undefined;
750
+ max_loop_count?: number | undefined;
751
+ operator_skill?: string | null | undefined;
752
+ topic_risk_score?: number | undefined;
753
+ } | null | undefined;
754
+ exit_condition_tool_call_specs?: {
755
+ additional_instruction?: string | undefined;
756
+ navigate_on_completion?: boolean | undefined;
757
+ progress?: {
758
+ custom_phrase?: string | null | undefined;
759
+ expected_latency_ms?: number | null | undefined;
760
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
761
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
762
+ } | null | undefined;
763
+ tool_id: string;
764
+ }[] | undefined;
765
+ exit_conditions: {
766
+ description: string;
767
+ filler_hint?: string | null | undefined;
768
+ next_state: string;
769
+ }[];
770
+ guardrails?: {
771
+ description: string;
772
+ enforcement?: "hard" | "soft" | undefined;
773
+ name: string;
774
+ }[] | undefined;
775
+ intra_state_navigation_guidelines: string[];
776
+ name: string;
777
+ objective: string;
778
+ surface_spec_template?: {
779
+ [x: string]: unknown;
780
+ } | null | undefined;
781
+ turn_policy?: {
782
+ barge_in_enabled?: boolean | undefined;
783
+ block_forward_call?: boolean | undefined;
784
+ block_forward_call_after_turns?: number | undefined;
785
+ context_strategy?: "full" | "summarize" | "compact" | undefined;
786
+ degradation_threshold?: number | undefined;
787
+ greeting_shield_s?: number | undefined;
788
+ safety_response?: "suspend_forward" | "stay_empathize" | "alert" | undefined;
789
+ stt_eager_eot_threshold?: number | null | undefined;
790
+ stt_eot_threshold?: number | null | undefined;
791
+ stt_eot_timeout_ms?: number | null | undefined;
792
+ } | null | undefined;
793
+ type: "action";
794
+ wait_for?: ("surface_submission" | "human_approval") | null | undefined;
795
+ } | {
796
+ inner_thought: string;
797
+ name: string;
798
+ next_state: string;
799
+ type: "annotation";
800
+ } | {
801
+ channel_overrides?: {
802
+ [x: string]: {
803
+ action_guidelines?: string[] | undefined;
804
+ objective?: string | null | undefined;
805
+ progress?: {
806
+ custom_phrase?: string | null | undefined;
807
+ expected_latency_ms?: number | null | undefined;
808
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
809
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
810
+ } | null | undefined;
811
+ };
812
+ } | undefined;
813
+ decision_guidelines?: string[] | undefined;
814
+ exit_conditions: {
815
+ description: string;
816
+ filler_hint?: string | null | undefined;
817
+ next_state: string;
818
+ }[];
819
+ guardrails?: {
820
+ description: string;
821
+ enforcement?: "hard" | "soft" | undefined;
822
+ name: string;
823
+ }[] | undefined;
824
+ name: string;
825
+ objective: string;
826
+ tool_call_specs?: {
827
+ additional_instruction?: string | undefined;
828
+ navigate_on_completion?: boolean | undefined;
829
+ progress?: {
830
+ custom_phrase?: string | null | undefined;
831
+ expected_latency_ms?: number | null | undefined;
832
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
833
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
834
+ } | null | undefined;
835
+ tool_id: string;
836
+ }[] | undefined;
837
+ turn_policy?: {
838
+ barge_in_enabled?: boolean | undefined;
839
+ block_forward_call?: boolean | undefined;
840
+ block_forward_call_after_turns?: number | undefined;
841
+ context_strategy?: "full" | "summarize" | "compact" | undefined;
842
+ degradation_threshold?: number | undefined;
843
+ greeting_shield_s?: number | undefined;
844
+ safety_response?: "suspend_forward" | "stay_empathize" | "alert" | undefined;
845
+ stt_eager_eot_threshold?: number | null | undefined;
846
+ stt_eot_threshold?: number | null | undefined;
847
+ stt_eot_timeout_ms?: number | null | undefined;
848
+ } | null | undefined;
849
+ type: "decision";
850
+ wait_for?: ("surface_submission" | "human_approval") | null | undefined;
851
+ } | {
852
+ action_guidelines?: string[] | undefined;
853
+ boundary_constraints?: string[] | undefined;
854
+ channel_overrides?: {
855
+ [x: string]: {
856
+ action_guidelines?: string[] | undefined;
857
+ objective?: string | null | undefined;
858
+ progress?: {
859
+ custom_phrase?: string | null | undefined;
860
+ expected_latency_ms?: number | null | undefined;
861
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
862
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
863
+ } | null | undefined;
864
+ };
865
+ } | undefined;
866
+ fields: {
867
+ ask_prompt?: string | null | undefined;
868
+ fhir_path?: string | null | undefined;
869
+ key: string;
870
+ label: string;
871
+ options?: string[] | null | undefined;
872
+ required?: boolean | undefined;
873
+ type: string;
874
+ validation?: string | null | undefined;
875
+ }[];
876
+ guardrails?: {
877
+ description: string;
878
+ enforcement?: "hard" | "soft" | undefined;
879
+ name: string;
880
+ }[] | undefined;
881
+ max_turns?: number | undefined;
882
+ name: string;
883
+ objective: string;
884
+ on_complete: string;
885
+ surface_fallback?: boolean | undefined;
886
+ surface_fallback_after_turns?: number | undefined;
887
+ tool_call_specs?: {
888
+ additional_instruction?: string | undefined;
889
+ navigate_on_completion?: boolean | undefined;
890
+ progress?: {
891
+ custom_phrase?: string | null | undefined;
892
+ expected_latency_ms?: number | null | undefined;
893
+ mode?: "auto" | "silent" | "backchannel" | "verbal" | undefined;
894
+ progress_class?: ("lookup" | "write" | "external_call" | "compute" | "multi_step") | null | undefined;
895
+ } | null | undefined;
896
+ tool_id: string;
897
+ }[] | undefined;
898
+ turn_policy?: {
899
+ barge_in_enabled?: boolean | undefined;
900
+ block_forward_call?: boolean | undefined;
901
+ block_forward_call_after_turns?: number | undefined;
902
+ context_strategy?: "full" | "summarize" | "compact" | undefined;
903
+ degradation_threshold?: number | undefined;
904
+ greeting_shield_s?: number | undefined;
905
+ safety_response?: "suspend_forward" | "stay_empathize" | "alert" | undefined;
906
+ stt_eager_eot_threshold?: number | null | undefined;
907
+ stt_eot_threshold?: number | null | undefined;
908
+ stt_eot_timeout_ms?: number | null | undefined;
909
+ } | null | undefined;
910
+ type: "data_collection";
911
+ })[];
88
912
  terminal_state: string;
89
913
  topology_description: string | null;
90
914
  updated_at: string;