@roarkanalytics/sdk 7.9.0 → 8.0.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.
Files changed (205) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +20 -5
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +20 -5
  5. package/client.d.ts.map +1 -1
  6. package/client.js +18 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +18 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent-connection.d.mts +1952 -0
  12. package/resources/agent-connection.d.mts.map +1 -0
  13. package/resources/agent-connection.d.ts +1952 -0
  14. package/resources/agent-connection.d.ts.map +1 -0
  15. package/resources/agent-connection.js +173 -0
  16. package/resources/agent-connection.js.map +1 -0
  17. package/resources/agent-connection.mjs +169 -0
  18. package/resources/agent-connection.mjs.map +1 -0
  19. package/resources/agent-conversation.d.mts +110 -0
  20. package/resources/agent-conversation.d.mts.map +1 -0
  21. package/resources/agent-conversation.d.ts +110 -0
  22. package/resources/agent-conversation.d.ts.map +1 -0
  23. package/resources/agent-conversation.js +41 -0
  24. package/resources/agent-conversation.js.map +1 -0
  25. package/resources/agent-conversation.mjs +37 -0
  26. package/resources/agent-conversation.mjs.map +1 -0
  27. package/resources/agent-draft.d.mts +101 -35
  28. package/resources/agent-draft.d.mts.map +1 -1
  29. package/resources/agent-draft.d.ts +101 -35
  30. package/resources/agent-draft.d.ts.map +1 -1
  31. package/resources/agent-endpoint.d.mts +4 -4
  32. package/resources/agent-endpoint.d.mts.map +1 -1
  33. package/resources/agent-endpoint.d.ts +4 -4
  34. package/resources/agent-endpoint.d.ts.map +1 -1
  35. package/resources/agent-setup.d.mts +1057 -0
  36. package/resources/agent-setup.d.mts.map +1 -0
  37. package/resources/agent-setup.d.ts +1057 -0
  38. package/resources/agent-setup.d.ts.map +1 -0
  39. package/resources/agent-setup.js +113 -0
  40. package/resources/agent-setup.js.map +1 -0
  41. package/resources/agent-setup.mjs +109 -0
  42. package/resources/agent-setup.mjs.map +1 -0
  43. package/resources/agent-version.d.mts +57 -18
  44. package/resources/agent-version.d.mts.map +1 -1
  45. package/resources/agent-version.d.ts +57 -18
  46. package/resources/agent-version.d.ts.map +1 -1
  47. package/resources/agent.d.mts +263 -4
  48. package/resources/agent.d.mts.map +1 -1
  49. package/resources/agent.d.ts +263 -4
  50. package/resources/agent.d.ts.map +1 -1
  51. package/resources/calendar-connection.d.mts +834 -56
  52. package/resources/calendar-connection.d.mts.map +1 -1
  53. package/resources/calendar-connection.d.ts +834 -56
  54. package/resources/calendar-connection.d.ts.map +1 -1
  55. package/resources/calendar-connection.js +127 -8
  56. package/resources/calendar-connection.js.map +1 -1
  57. package/resources/calendar-connection.mjs +127 -8
  58. package/resources/calendar-connection.mjs.map +1 -1
  59. package/resources/call.d.mts +2 -2
  60. package/resources/call.d.mts.map +1 -1
  61. package/resources/call.d.ts +2 -2
  62. package/resources/call.d.ts.map +1 -1
  63. package/resources/config.d.mts +78 -36
  64. package/resources/config.d.mts.map +1 -1
  65. package/resources/config.d.ts +78 -36
  66. package/resources/config.d.ts.map +1 -1
  67. package/resources/conversation.d.mts +156 -0
  68. package/resources/conversation.d.mts.map +1 -0
  69. package/resources/conversation.d.ts +156 -0
  70. package/resources/conversation.d.ts.map +1 -0
  71. package/resources/conversation.js +40 -0
  72. package/resources/conversation.js.map +1 -0
  73. package/resources/conversation.mjs +36 -0
  74. package/resources/conversation.mjs.map +1 -0
  75. package/resources/customer-flow-edge-case.d.mts +637 -40
  76. package/resources/customer-flow-edge-case.d.mts.map +1 -1
  77. package/resources/customer-flow-edge-case.d.ts +637 -40
  78. package/resources/customer-flow-edge-case.d.ts.map +1 -1
  79. package/resources/customer-flow.d.mts +2583 -156
  80. package/resources/customer-flow.d.mts.map +1 -1
  81. package/resources/customer-flow.d.ts +2583 -156
  82. package/resources/customer-flow.d.ts.map +1 -1
  83. package/resources/{customer-profile.d.mts → customer.d.mts} +287 -92
  84. package/resources/customer.d.mts.map +1 -0
  85. package/resources/{customer-profile.d.ts → customer.d.ts} +287 -92
  86. package/resources/customer.d.ts.map +1 -0
  87. package/resources/customer.js +180 -0
  88. package/resources/customer.js.map +1 -0
  89. package/resources/customer.mjs +176 -0
  90. package/resources/customer.mjs.map +1 -0
  91. package/resources/index.d.mts +7 -2
  92. package/resources/index.d.mts.map +1 -1
  93. package/resources/index.d.ts +7 -2
  94. package/resources/index.d.ts.map +1 -1
  95. package/resources/index.js +13 -3
  96. package/resources/index.js.map +1 -1
  97. package/resources/index.mjs +6 -1
  98. package/resources/index.mjs.map +1 -1
  99. package/resources/mcp-server.d.mts +588 -0
  100. package/resources/mcp-server.d.mts.map +1 -0
  101. package/resources/mcp-server.d.ts +588 -0
  102. package/resources/mcp-server.d.ts.map +1 -0
  103. package/resources/mcp-server.js +109 -0
  104. package/resources/mcp-server.js.map +1 -0
  105. package/resources/mcp-server.mjs +105 -0
  106. package/resources/mcp-server.mjs.map +1 -0
  107. package/resources/metric-policy.d.mts +5 -4
  108. package/resources/metric-policy.d.mts.map +1 -1
  109. package/resources/metric-policy.d.ts +5 -4
  110. package/resources/metric-policy.d.ts.map +1 -1
  111. package/resources/metric-policy.js +1 -1
  112. package/resources/metric-policy.mjs +1 -1
  113. package/resources/metric-variant.d.mts +4 -1
  114. package/resources/metric-variant.d.mts.map +1 -1
  115. package/resources/metric-variant.d.ts +4 -1
  116. package/resources/metric-variant.d.ts.map +1 -1
  117. package/resources/metric.d.mts +7 -2
  118. package/resources/metric.d.mts.map +1 -1
  119. package/resources/metric.d.ts +7 -2
  120. package/resources/metric.d.ts.map +1 -1
  121. package/resources/simulation-environment.d.mts +366 -0
  122. package/resources/simulation-environment.d.mts.map +1 -1
  123. package/resources/simulation-environment.d.ts +366 -0
  124. package/resources/simulation-environment.d.ts.map +1 -1
  125. package/resources/simulation-job.d.mts +12 -8
  126. package/resources/simulation-job.d.mts.map +1 -1
  127. package/resources/simulation-job.d.ts +12 -8
  128. package/resources/simulation-job.d.ts.map +1 -1
  129. package/resources/simulation-persona.d.mts +25 -15
  130. package/resources/simulation-persona.d.mts.map +1 -1
  131. package/resources/simulation-persona.d.ts +25 -15
  132. package/resources/simulation-persona.d.ts.map +1 -1
  133. package/resources/simulation-run-plan-job.d.mts +32 -6
  134. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  135. package/resources/simulation-run-plan-job.d.ts +32 -6
  136. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  137. package/resources/simulation-run-plan.d.mts +126 -13
  138. package/resources/simulation-run-plan.d.mts.map +1 -1
  139. package/resources/simulation-run-plan.d.ts +126 -13
  140. package/resources/simulation-run-plan.d.ts.map +1 -1
  141. package/resources/simulation-template.d.mts +1 -1
  142. package/resources/simulation-template.d.mts.map +1 -1
  143. package/resources/simulation-template.d.ts +1 -1
  144. package/resources/simulation-template.d.ts.map +1 -1
  145. package/resources/simulation.d.mts +35 -3
  146. package/resources/simulation.d.mts.map +1 -1
  147. package/resources/simulation.d.ts +35 -3
  148. package/resources/simulation.d.ts.map +1 -1
  149. package/resources/tool.d.mts +565 -6
  150. package/resources/tool.d.mts.map +1 -1
  151. package/resources/tool.d.ts +565 -6
  152. package/resources/tool.d.ts.map +1 -1
  153. package/resources/tool.js +9 -6
  154. package/resources/tool.js.map +1 -1
  155. package/resources/tool.mjs +9 -6
  156. package/resources/tool.mjs.map +1 -1
  157. package/resources/usage.d.mts +1 -1
  158. package/resources/usage.d.mts.map +1 -1
  159. package/resources/usage.d.ts +1 -1
  160. package/resources/usage.d.ts.map +1 -1
  161. package/resources/webhook.d.mts +4 -4
  162. package/resources/webhook.d.mts.map +1 -1
  163. package/resources/webhook.d.ts +4 -4
  164. package/resources/webhook.d.ts.map +1 -1
  165. package/src/client.ts +197 -34
  166. package/src/resources/agent-connection.ts +2523 -0
  167. package/src/resources/agent-conversation.ts +139 -0
  168. package/src/resources/agent-draft.ts +239 -35
  169. package/src/resources/agent-endpoint.ts +8 -4
  170. package/src/resources/agent-setup.ts +1685 -0
  171. package/src/resources/agent-version.ts +126 -18
  172. package/src/resources/agent.ts +506 -4
  173. package/src/resources/calendar-connection.ts +1035 -63
  174. package/src/resources/call.ts +12 -2
  175. package/src/resources/config.ts +198 -36
  176. package/src/resources/conversation.ts +205 -0
  177. package/src/resources/customer-flow-edge-case.ts +709 -40
  178. package/src/resources/customer-flow.ts +3141 -156
  179. package/src/resources/{customer-profile.ts → customer.ts} +406 -294
  180. package/src/resources/index.ts +91 -17
  181. package/src/resources/mcp-server.ts +786 -0
  182. package/src/resources/metric-policy.ts +5 -4
  183. package/src/resources/metric-variant.ts +4 -1
  184. package/src/resources/metric.ts +7 -2
  185. package/src/resources/simulation-environment.ts +414 -0
  186. package/src/resources/simulation-job.ts +14 -8
  187. package/src/resources/simulation-persona.ts +25 -15
  188. package/src/resources/simulation-run-plan-job.ts +47 -6
  189. package/src/resources/simulation-run-plan.ts +140 -0
  190. package/src/resources/simulation-template.ts +1 -0
  191. package/src/resources/simulation.ts +39 -0
  192. package/src/resources/tool.ts +697 -6
  193. package/src/resources/usage.ts +6 -1
  194. package/src/resources/webhook.ts +8 -0
  195. package/src/version.ts +1 -1
  196. package/version.d.mts +1 -1
  197. package/version.d.ts +1 -1
  198. package/version.js +1 -1
  199. package/version.mjs +1 -1
  200. package/resources/customer-profile.d.mts.map +0 -1
  201. package/resources/customer-profile.d.ts.map +0 -1
  202. package/resources/customer-profile.js +0 -141
  203. package/resources/customer-profile.js.map +0 -1
  204. package/resources/customer-profile.mjs +0 -137
  205. package/resources/customer-profile.mjs.map +0 -1
@@ -5,8 +5,10 @@ export declare class Tool extends APIResource {
5
5
  /**
6
6
  * Creates a tool and declares its first version. A tool only recorded from calls
7
7
  * under the same name is adopted; one already declared returns 409. Give it a
8
- * `runtime` for a hosted agent to call your endpoint. Header values are returned
9
- * on read, so keep secrets out of them.
8
+ * `runtime` for a hosted agent to call your endpoint, a `calendar` for it to book
9
+ * on a calendar connected to the project, or `mcp` for it to call a tool on an MCP
10
+ * server connected to the project. Header values are returned on read, so keep
11
+ * secrets out of them.
10
12
  *
11
13
  * @example
12
14
  * ```ts
@@ -18,10 +20,11 @@ export declare class Tool extends APIResource {
18
20
  */
19
21
  create(body: ToolCreateParams, options?: RequestOptions): APIPromise<ToolCreateResponse>;
20
22
  /**
21
- * Replaces the tool: its name, scope, inputs, description, grading hints and
22
- * runtime. A field left out is cleared, so omitting agentId makes the tool
23
- * project-wide. A change declares a new version; agent versions pinned to an older
24
- * one keep it.
23
+ * Replaces the tool: its name, scope, inputs, description, grading hints, runtime,
24
+ * calendar and MCP tool. A field left out is cleared, so omitting agentId makes
25
+ * the tool project-wide and omitting calendar or mcp makes it an ordinary tool. A
26
+ * change declares a new version; agent versions pinned to an older one keep it. A
27
+ * tool managed by config-as-code returns 409.
25
28
  *
26
29
  * @example
27
30
  * ```ts
@@ -76,6 +79,10 @@ export declare namespace ToolCreateResponse {
76
79
  * The agent the tool is scoped to; null for the project
77
80
  */
78
81
  agentId: string | null;
82
+ /**
83
+ * What a calendar tool books into. Roark runs it; it has no runtime.
84
+ */
85
+ calendar: Data.Calendar | null;
79
86
  createdAt: string;
80
87
  description: string | null;
81
88
  /**
@@ -87,6 +94,11 @@ export declare namespace ToolCreateResponse {
87
94
  * When the agent should call it, for grading
88
95
  */
89
96
  invocationCriteria: string | null;
97
+ /**
98
+ * A tool on one of the project's MCP servers. The server runs it and defines its
99
+ * arguments.
100
+ */
101
+ mcp: Data.Mcp | null;
90
102
  name: string;
91
103
  /**
92
104
  * What a hosted agent sends and says when it calls the tool
@@ -107,6 +119,71 @@ export declare namespace ToolCreateResponse {
107
119
  version: number | null;
108
120
  }
109
121
  namespace Data {
122
+ /**
123
+ * What a calendar tool books into. Roark runs it; it has no runtime.
124
+ */
125
+ interface Calendar {
126
+ /**
127
+ * The kinds of appointment the tool may reach
128
+ */
129
+ appointmentTypes: Array<Calendar.AppointmentType>;
130
+ /**
131
+ * The connected calendar the tool books on
132
+ */
133
+ calendarConnectionId: string;
134
+ messages: Calendar.Messages;
135
+ /**
136
+ * The one action this tool takes on the calendar
137
+ */
138
+ operation: 'CHECK_AVAILABILITY' | 'BOOK' | 'LOOKUP_BOOKING' | 'RESCHEDULE' | 'CANCEL' | 'LIST_BOOKINGS';
139
+ /**
140
+ * Every call books on a simulated calendar instead of the customer's
141
+ */
142
+ simulate: boolean;
143
+ }
144
+ namespace Calendar {
145
+ interface AppointmentType {
146
+ /**
147
+ * For a calendar with no scheduling of its own: the bookable target it books into,
148
+ * which carries the duration, buffers, notice, horizon and weekly hours
149
+ */
150
+ calendarTargetId: string | null;
151
+ /**
152
+ * Only for an event type offering several durations
153
+ */
154
+ durationMinutes: number | null;
155
+ /**
156
+ * For Cal.com: the event type it books
157
+ */
158
+ eventTypeId: number | null;
159
+ /**
160
+ * For Calendly: the event type it books, which Calendly names by URI
161
+ */
162
+ eventTypeUri: string | null;
163
+ /**
164
+ * What the agent passes to name it
165
+ */
166
+ name: string;
167
+ /**
168
+ * The line that tells the agent when it applies
169
+ */
170
+ whenToUse: string | null;
171
+ }
172
+ interface Messages {
173
+ /**
174
+ * Said as the request goes out
175
+ */
176
+ before: string | null;
177
+ /**
178
+ * Given to the agent to say when the request fails
179
+ */
180
+ failure: string | null;
181
+ /**
182
+ * Said once if the request is slow
183
+ */
184
+ slow: string | null;
185
+ }
186
+ }
110
187
  interface Input {
111
188
  /**
112
189
  * What the input is, so the agent fills it in right
@@ -125,6 +202,37 @@ export declare namespace ToolCreateResponse {
125
202
  */
126
203
  type: 'string' | 'number' | 'boolean';
127
204
  }
205
+ /**
206
+ * A tool on one of the project's MCP servers. The server runs it and defines its
207
+ * arguments.
208
+ */
209
+ interface Mcp {
210
+ /**
211
+ * The MCP server the tool calls
212
+ */
213
+ mcpServerId: string;
214
+ messages: Mcp.Messages;
215
+ /**
216
+ * The tool as the server names it
217
+ */
218
+ tool: string;
219
+ }
220
+ namespace Mcp {
221
+ interface Messages {
222
+ /**
223
+ * Said as the request goes out
224
+ */
225
+ before: string | null;
226
+ /**
227
+ * Given to the agent to say when the request fails
228
+ */
229
+ failure: string | null;
230
+ /**
231
+ * Said once if the request is slow
232
+ */
233
+ slow: string | null;
234
+ }
235
+ }
128
236
  /**
129
237
  * What a hosted agent sends and says when it calls the tool
130
238
  */
@@ -195,6 +303,10 @@ export declare namespace ToolUpdateResponse {
195
303
  * The agent the tool is scoped to; null for the project
196
304
  */
197
305
  agentId: string | null;
306
+ /**
307
+ * What a calendar tool books into. Roark runs it; it has no runtime.
308
+ */
309
+ calendar: Data.Calendar | null;
198
310
  createdAt: string;
199
311
  description: string | null;
200
312
  /**
@@ -206,6 +318,11 @@ export declare namespace ToolUpdateResponse {
206
318
  * When the agent should call it, for grading
207
319
  */
208
320
  invocationCriteria: string | null;
321
+ /**
322
+ * A tool on one of the project's MCP servers. The server runs it and defines its
323
+ * arguments.
324
+ */
325
+ mcp: Data.Mcp | null;
209
326
  name: string;
210
327
  /**
211
328
  * What a hosted agent sends and says when it calls the tool
@@ -226,6 +343,71 @@ export declare namespace ToolUpdateResponse {
226
343
  version: number | null;
227
344
  }
228
345
  namespace Data {
346
+ /**
347
+ * What a calendar tool books into. Roark runs it; it has no runtime.
348
+ */
349
+ interface Calendar {
350
+ /**
351
+ * The kinds of appointment the tool may reach
352
+ */
353
+ appointmentTypes: Array<Calendar.AppointmentType>;
354
+ /**
355
+ * The connected calendar the tool books on
356
+ */
357
+ calendarConnectionId: string;
358
+ messages: Calendar.Messages;
359
+ /**
360
+ * The one action this tool takes on the calendar
361
+ */
362
+ operation: 'CHECK_AVAILABILITY' | 'BOOK' | 'LOOKUP_BOOKING' | 'RESCHEDULE' | 'CANCEL' | 'LIST_BOOKINGS';
363
+ /**
364
+ * Every call books on a simulated calendar instead of the customer's
365
+ */
366
+ simulate: boolean;
367
+ }
368
+ namespace Calendar {
369
+ interface AppointmentType {
370
+ /**
371
+ * For a calendar with no scheduling of its own: the bookable target it books into,
372
+ * which carries the duration, buffers, notice, horizon and weekly hours
373
+ */
374
+ calendarTargetId: string | null;
375
+ /**
376
+ * Only for an event type offering several durations
377
+ */
378
+ durationMinutes: number | null;
379
+ /**
380
+ * For Cal.com: the event type it books
381
+ */
382
+ eventTypeId: number | null;
383
+ /**
384
+ * For Calendly: the event type it books, which Calendly names by URI
385
+ */
386
+ eventTypeUri: string | null;
387
+ /**
388
+ * What the agent passes to name it
389
+ */
390
+ name: string;
391
+ /**
392
+ * The line that tells the agent when it applies
393
+ */
394
+ whenToUse: string | null;
395
+ }
396
+ interface Messages {
397
+ /**
398
+ * Said as the request goes out
399
+ */
400
+ before: string | null;
401
+ /**
402
+ * Given to the agent to say when the request fails
403
+ */
404
+ failure: string | null;
405
+ /**
406
+ * Said once if the request is slow
407
+ */
408
+ slow: string | null;
409
+ }
410
+ }
229
411
  interface Input {
230
412
  /**
231
413
  * What the input is, so the agent fills it in right
@@ -244,6 +426,37 @@ export declare namespace ToolUpdateResponse {
244
426
  */
245
427
  type: 'string' | 'number' | 'boolean';
246
428
  }
429
+ /**
430
+ * A tool on one of the project's MCP servers. The server runs it and defines its
431
+ * arguments.
432
+ */
433
+ interface Mcp {
434
+ /**
435
+ * The MCP server the tool calls
436
+ */
437
+ mcpServerId: string;
438
+ messages: Mcp.Messages;
439
+ /**
440
+ * The tool as the server names it
441
+ */
442
+ tool: string;
443
+ }
444
+ namespace Mcp {
445
+ interface Messages {
446
+ /**
447
+ * Said as the request goes out
448
+ */
449
+ before: string | null;
450
+ /**
451
+ * Given to the agent to say when the request fails
452
+ */
453
+ failure: string | null;
454
+ /**
455
+ * Said once if the request is slow
456
+ */
457
+ slow: string | null;
458
+ }
459
+ }
247
460
  /**
248
461
  * What a hosted agent sends and says when it calls the tool
249
462
  */
@@ -314,6 +527,10 @@ export declare namespace ToolListResponse {
314
527
  * The agent the tool is scoped to; null for the project
315
528
  */
316
529
  agentId: string | null;
530
+ /**
531
+ * What a calendar tool books into. Roark runs it; it has no runtime.
532
+ */
533
+ calendar: Data.Calendar | null;
317
534
  createdAt: string;
318
535
  description: string | null;
319
536
  /**
@@ -325,6 +542,11 @@ export declare namespace ToolListResponse {
325
542
  * When the agent should call it, for grading
326
543
  */
327
544
  invocationCriteria: string | null;
545
+ /**
546
+ * A tool on one of the project's MCP servers. The server runs it and defines its
547
+ * arguments.
548
+ */
549
+ mcp: Data.Mcp | null;
328
550
  name: string;
329
551
  /**
330
552
  * What a hosted agent sends and says when it calls the tool
@@ -345,6 +567,71 @@ export declare namespace ToolListResponse {
345
567
  version: number | null;
346
568
  }
347
569
  namespace Data {
570
+ /**
571
+ * What a calendar tool books into. Roark runs it; it has no runtime.
572
+ */
573
+ interface Calendar {
574
+ /**
575
+ * The kinds of appointment the tool may reach
576
+ */
577
+ appointmentTypes: Array<Calendar.AppointmentType>;
578
+ /**
579
+ * The connected calendar the tool books on
580
+ */
581
+ calendarConnectionId: string;
582
+ messages: Calendar.Messages;
583
+ /**
584
+ * The one action this tool takes on the calendar
585
+ */
586
+ operation: 'CHECK_AVAILABILITY' | 'BOOK' | 'LOOKUP_BOOKING' | 'RESCHEDULE' | 'CANCEL' | 'LIST_BOOKINGS';
587
+ /**
588
+ * Every call books on a simulated calendar instead of the customer's
589
+ */
590
+ simulate: boolean;
591
+ }
592
+ namespace Calendar {
593
+ interface AppointmentType {
594
+ /**
595
+ * For a calendar with no scheduling of its own: the bookable target it books into,
596
+ * which carries the duration, buffers, notice, horizon and weekly hours
597
+ */
598
+ calendarTargetId: string | null;
599
+ /**
600
+ * Only for an event type offering several durations
601
+ */
602
+ durationMinutes: number | null;
603
+ /**
604
+ * For Cal.com: the event type it books
605
+ */
606
+ eventTypeId: number | null;
607
+ /**
608
+ * For Calendly: the event type it books, which Calendly names by URI
609
+ */
610
+ eventTypeUri: string | null;
611
+ /**
612
+ * What the agent passes to name it
613
+ */
614
+ name: string;
615
+ /**
616
+ * The line that tells the agent when it applies
617
+ */
618
+ whenToUse: string | null;
619
+ }
620
+ interface Messages {
621
+ /**
622
+ * Said as the request goes out
623
+ */
624
+ before: string | null;
625
+ /**
626
+ * Given to the agent to say when the request fails
627
+ */
628
+ failure: string | null;
629
+ /**
630
+ * Said once if the request is slow
631
+ */
632
+ slow: string | null;
633
+ }
634
+ }
348
635
  interface Input {
349
636
  /**
350
637
  * What the input is, so the agent fills it in right
@@ -363,6 +650,37 @@ export declare namespace ToolListResponse {
363
650
  */
364
651
  type: 'string' | 'number' | 'boolean';
365
652
  }
653
+ /**
654
+ * A tool on one of the project's MCP servers. The server runs it and defines its
655
+ * arguments.
656
+ */
657
+ interface Mcp {
658
+ /**
659
+ * The MCP server the tool calls
660
+ */
661
+ mcpServerId: string;
662
+ messages: Mcp.Messages;
663
+ /**
664
+ * The tool as the server names it
665
+ */
666
+ tool: string;
667
+ }
668
+ namespace Mcp {
669
+ interface Messages {
670
+ /**
671
+ * Said as the request goes out
672
+ */
673
+ before: string | null;
674
+ /**
675
+ * Given to the agent to say when the request fails
676
+ */
677
+ failure: string | null;
678
+ /**
679
+ * Said once if the request is slow
680
+ */
681
+ slow: string | null;
682
+ }
683
+ }
366
684
  /**
367
685
  * What a hosted agent sends and says when it calls the tool
368
686
  */
@@ -442,6 +760,10 @@ export declare namespace ToolGetByIDResponse {
442
760
  * The agent the tool is scoped to; null for the project
443
761
  */
444
762
  agentId: string | null;
763
+ /**
764
+ * What a calendar tool books into. Roark runs it; it has no runtime.
765
+ */
766
+ calendar: Data.Calendar | null;
445
767
  createdAt: string;
446
768
  description: string | null;
447
769
  /**
@@ -453,6 +775,11 @@ export declare namespace ToolGetByIDResponse {
453
775
  * When the agent should call it, for grading
454
776
  */
455
777
  invocationCriteria: string | null;
778
+ /**
779
+ * A tool on one of the project's MCP servers. The server runs it and defines its
780
+ * arguments.
781
+ */
782
+ mcp: Data.Mcp | null;
456
783
  name: string;
457
784
  /**
458
785
  * What a hosted agent sends and says when it calls the tool
@@ -473,6 +800,71 @@ export declare namespace ToolGetByIDResponse {
473
800
  version: number | null;
474
801
  }
475
802
  namespace Data {
803
+ /**
804
+ * What a calendar tool books into. Roark runs it; it has no runtime.
805
+ */
806
+ interface Calendar {
807
+ /**
808
+ * The kinds of appointment the tool may reach
809
+ */
810
+ appointmentTypes: Array<Calendar.AppointmentType>;
811
+ /**
812
+ * The connected calendar the tool books on
813
+ */
814
+ calendarConnectionId: string;
815
+ messages: Calendar.Messages;
816
+ /**
817
+ * The one action this tool takes on the calendar
818
+ */
819
+ operation: 'CHECK_AVAILABILITY' | 'BOOK' | 'LOOKUP_BOOKING' | 'RESCHEDULE' | 'CANCEL' | 'LIST_BOOKINGS';
820
+ /**
821
+ * Every call books on a simulated calendar instead of the customer's
822
+ */
823
+ simulate: boolean;
824
+ }
825
+ namespace Calendar {
826
+ interface AppointmentType {
827
+ /**
828
+ * For a calendar with no scheduling of its own: the bookable target it books into,
829
+ * which carries the duration, buffers, notice, horizon and weekly hours
830
+ */
831
+ calendarTargetId: string | null;
832
+ /**
833
+ * Only for an event type offering several durations
834
+ */
835
+ durationMinutes: number | null;
836
+ /**
837
+ * For Cal.com: the event type it books
838
+ */
839
+ eventTypeId: number | null;
840
+ /**
841
+ * For Calendly: the event type it books, which Calendly names by URI
842
+ */
843
+ eventTypeUri: string | null;
844
+ /**
845
+ * What the agent passes to name it
846
+ */
847
+ name: string;
848
+ /**
849
+ * The line that tells the agent when it applies
850
+ */
851
+ whenToUse: string | null;
852
+ }
853
+ interface Messages {
854
+ /**
855
+ * Said as the request goes out
856
+ */
857
+ before: string | null;
858
+ /**
859
+ * Given to the agent to say when the request fails
860
+ */
861
+ failure: string | null;
862
+ /**
863
+ * Said once if the request is slow
864
+ */
865
+ slow: string | null;
866
+ }
867
+ }
476
868
  interface Input {
477
869
  /**
478
870
  * What the input is, so the agent fills it in right
@@ -491,6 +883,37 @@ export declare namespace ToolGetByIDResponse {
491
883
  */
492
884
  type: 'string' | 'number' | 'boolean';
493
885
  }
886
+ /**
887
+ * A tool on one of the project's MCP servers. The server runs it and defines its
888
+ * arguments.
889
+ */
890
+ interface Mcp {
891
+ /**
892
+ * The MCP server the tool calls
893
+ */
894
+ mcpServerId: string;
895
+ messages: Mcp.Messages;
896
+ /**
897
+ * The tool as the server names it
898
+ */
899
+ tool: string;
900
+ }
901
+ namespace Mcp {
902
+ interface Messages {
903
+ /**
904
+ * Said as the request goes out
905
+ */
906
+ before: string | null;
907
+ /**
908
+ * Given to the agent to say when the request fails
909
+ */
910
+ failure: string | null;
911
+ /**
912
+ * Said once if the request is slow
913
+ */
914
+ slow: string | null;
915
+ }
916
+ }
494
917
  /**
495
918
  * What a hosted agent sends and says when it calls the tool
496
919
  */
@@ -558,21 +981,89 @@ export interface ToolCreateParams {
558
981
  description: string;
559
982
  name: string;
560
983
  agentId?: string | null;
984
+ /**
985
+ * Makes this a calendar tool, which Roark runs against a connected calendar: it
986
+ * takes no runtime and no inputs. Omit or null for any other tool; on update,
987
+ * omitting it makes the tool an ordinary one.
988
+ */
989
+ calendar?: ToolCreateParams.Calendar | null;
561
990
  expectedResult?: string | null;
562
991
  inputs?: Array<ToolCreateParams.Input>;
563
992
  invocationCriteria?: string | null;
993
+ /**
994
+ * Makes this a tool on one of the project's MCP servers: it takes no runtime, no
995
+ * inputs and no calendar, and the description replaces the server's own. On
996
+ * update, omitting it makes the tool an ordinary one.
997
+ */
998
+ mcp?: ToolCreateParams.Mcp | null;
564
999
  /**
565
1000
  * Omit or null for a tool that is only graded
566
1001
  */
567
1002
  runtime?: ToolCreateParams.Runtime | null;
568
1003
  }
569
1004
  export declare namespace ToolCreateParams {
1005
+ /**
1006
+ * Makes this a calendar tool, which Roark runs against a connected calendar: it
1007
+ * takes no runtime and no inputs. Omit or null for any other tool; on update,
1008
+ * omitting it makes the tool an ordinary one.
1009
+ */
1010
+ interface Calendar {
1011
+ appointmentTypes: Array<Calendar.AppointmentType>;
1012
+ calendarConnectionId: string;
1013
+ operation: 'CHECK_AVAILABILITY' | 'BOOK' | 'LOOKUP_BOOKING' | 'RESCHEDULE' | 'CANCEL' | 'LIST_BOOKINGS';
1014
+ messages?: Calendar.Messages;
1015
+ simulate?: boolean;
1016
+ }
1017
+ namespace Calendar {
1018
+ interface AppointmentType {
1019
+ name: string;
1020
+ /**
1021
+ * For a calendar with no scheduling of its own: the bookable target to book into
1022
+ */
1023
+ calendarTargetId?: string | null;
1024
+ durationMinutes?: number | null;
1025
+ /**
1026
+ * For Cal.com: the event type to book
1027
+ */
1028
+ eventTypeId?: number | null;
1029
+ /**
1030
+ * For Calendly: the event type to book, by URI
1031
+ */
1032
+ eventTypeUri?: string | null;
1033
+ whenToUse?: string | null;
1034
+ }
1035
+ interface Messages {
1036
+ before?: string | null;
1037
+ failure?: string | null;
1038
+ slow?: string | null;
1039
+ }
1040
+ }
570
1041
  interface Input {
571
1042
  name: string;
572
1043
  type: 'string' | 'number' | 'boolean';
573
1044
  description?: string;
574
1045
  required?: boolean;
575
1046
  }
1047
+ /**
1048
+ * Makes this a tool on one of the project's MCP servers: it takes no runtime, no
1049
+ * inputs and no calendar, and the description replaces the server's own. On
1050
+ * update, omitting it makes the tool an ordinary one.
1051
+ */
1052
+ interface Mcp {
1053
+ mcpServerId: string;
1054
+ /**
1055
+ * The tool as the server names it
1056
+ */
1057
+ tool: string;
1058
+ messages?: Mcp.Messages;
1059
+ }
1060
+ namespace Mcp {
1061
+ interface Messages {
1062
+ before?: string | null;
1063
+ failure?: string | null;
1064
+ slow?: string | null;
1065
+ }
1066
+ }
576
1067
  /**
577
1068
  * Omit or null for a tool that is only graded
578
1069
  */
@@ -610,21 +1101,89 @@ export interface ToolUpdateParams {
610
1101
  description: string;
611
1102
  name: string;
612
1103
  agentId?: string | null;
1104
+ /**
1105
+ * Makes this a calendar tool, which Roark runs against a connected calendar: it
1106
+ * takes no runtime and no inputs. Omit or null for any other tool; on update,
1107
+ * omitting it makes the tool an ordinary one.
1108
+ */
1109
+ calendar?: ToolUpdateParams.Calendar | null;
613
1110
  expectedResult?: string | null;
614
1111
  inputs?: Array<ToolUpdateParams.Input>;
615
1112
  invocationCriteria?: string | null;
1113
+ /**
1114
+ * Makes this a tool on one of the project's MCP servers: it takes no runtime, no
1115
+ * inputs and no calendar, and the description replaces the server's own. On
1116
+ * update, omitting it makes the tool an ordinary one.
1117
+ */
1118
+ mcp?: ToolUpdateParams.Mcp | null;
616
1119
  /**
617
1120
  * Omit or null for a tool that is only graded
618
1121
  */
619
1122
  runtime?: ToolUpdateParams.Runtime | null;
620
1123
  }
621
1124
  export declare namespace ToolUpdateParams {
1125
+ /**
1126
+ * Makes this a calendar tool, which Roark runs against a connected calendar: it
1127
+ * takes no runtime and no inputs. Omit or null for any other tool; on update,
1128
+ * omitting it makes the tool an ordinary one.
1129
+ */
1130
+ interface Calendar {
1131
+ appointmentTypes: Array<Calendar.AppointmentType>;
1132
+ calendarConnectionId: string;
1133
+ operation: 'CHECK_AVAILABILITY' | 'BOOK' | 'LOOKUP_BOOKING' | 'RESCHEDULE' | 'CANCEL' | 'LIST_BOOKINGS';
1134
+ messages?: Calendar.Messages;
1135
+ simulate?: boolean;
1136
+ }
1137
+ namespace Calendar {
1138
+ interface AppointmentType {
1139
+ name: string;
1140
+ /**
1141
+ * For a calendar with no scheduling of its own: the bookable target to book into
1142
+ */
1143
+ calendarTargetId?: string | null;
1144
+ durationMinutes?: number | null;
1145
+ /**
1146
+ * For Cal.com: the event type to book
1147
+ */
1148
+ eventTypeId?: number | null;
1149
+ /**
1150
+ * For Calendly: the event type to book, by URI
1151
+ */
1152
+ eventTypeUri?: string | null;
1153
+ whenToUse?: string | null;
1154
+ }
1155
+ interface Messages {
1156
+ before?: string | null;
1157
+ failure?: string | null;
1158
+ slow?: string | null;
1159
+ }
1160
+ }
622
1161
  interface Input {
623
1162
  name: string;
624
1163
  type: 'string' | 'number' | 'boolean';
625
1164
  description?: string;
626
1165
  required?: boolean;
627
1166
  }
1167
+ /**
1168
+ * Makes this a tool on one of the project's MCP servers: it takes no runtime, no
1169
+ * inputs and no calendar, and the description replaces the server's own. On
1170
+ * update, omitting it makes the tool an ordinary one.
1171
+ */
1172
+ interface Mcp {
1173
+ mcpServerId: string;
1174
+ /**
1175
+ * The tool as the server names it
1176
+ */
1177
+ tool: string;
1178
+ messages?: Mcp.Messages;
1179
+ }
1180
+ namespace Mcp {
1181
+ interface Messages {
1182
+ before?: string | null;
1183
+ failure?: string | null;
1184
+ slow?: string | null;
1185
+ }
1186
+ }
628
1187
  /**
629
1188
  * Omit or null for a tool that is only graded
630
1189
  */