@roarkanalytics/sdk 7.8.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.
- package/CHANGELOG.md +28 -0
- package/client.d.mts +20 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +20 -5
- package/client.d.ts.map +1 -1
- package/client.js +18 -3
- package/client.js.map +1 -1
- package/client.mjs +18 -3
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-connection.d.mts +1952 -0
- package/resources/agent-connection.d.mts.map +1 -0
- package/resources/agent-connection.d.ts +1952 -0
- package/resources/agent-connection.d.ts.map +1 -0
- package/resources/agent-connection.js +173 -0
- package/resources/agent-connection.js.map +1 -0
- package/resources/agent-connection.mjs +169 -0
- package/resources/agent-connection.mjs.map +1 -0
- package/resources/agent-conversation.d.mts +110 -0
- package/resources/agent-conversation.d.mts.map +1 -0
- package/resources/agent-conversation.d.ts +110 -0
- package/resources/agent-conversation.d.ts.map +1 -0
- package/resources/agent-conversation.js +41 -0
- package/resources/agent-conversation.js.map +1 -0
- package/resources/agent-conversation.mjs +37 -0
- package/resources/agent-conversation.mjs.map +1 -0
- package/resources/agent-draft.d.mts +101 -35
- package/resources/agent-draft.d.mts.map +1 -1
- package/resources/agent-draft.d.ts +101 -35
- package/resources/agent-draft.d.ts.map +1 -1
- package/resources/agent-endpoint.d.mts +4 -4
- package/resources/agent-endpoint.d.mts.map +1 -1
- package/resources/agent-endpoint.d.ts +4 -4
- package/resources/agent-endpoint.d.ts.map +1 -1
- package/resources/agent-setup.d.mts +1057 -0
- package/resources/agent-setup.d.mts.map +1 -0
- package/resources/agent-setup.d.ts +1057 -0
- package/resources/agent-setup.d.ts.map +1 -0
- package/resources/agent-setup.js +113 -0
- package/resources/agent-setup.js.map +1 -0
- package/resources/agent-setup.mjs +109 -0
- package/resources/agent-setup.mjs.map +1 -0
- package/resources/agent-version.d.mts +57 -18
- package/resources/agent-version.d.mts.map +1 -1
- package/resources/agent-version.d.ts +57 -18
- package/resources/agent-version.d.ts.map +1 -1
- package/resources/agent.d.mts +263 -4
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +263 -4
- package/resources/agent.d.ts.map +1 -1
- package/resources/calendar-connection.d.mts +834 -56
- package/resources/calendar-connection.d.mts.map +1 -1
- package/resources/calendar-connection.d.ts +834 -56
- package/resources/calendar-connection.d.ts.map +1 -1
- package/resources/calendar-connection.js +127 -8
- package/resources/calendar-connection.js.map +1 -1
- package/resources/calendar-connection.mjs +127 -8
- package/resources/calendar-connection.mjs.map +1 -1
- package/resources/call.d.mts +2 -2
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +2 -2
- package/resources/call.d.ts.map +1 -1
- package/resources/config.d.mts +78 -36
- package/resources/config.d.mts.map +1 -1
- package/resources/config.d.ts +78 -36
- package/resources/config.d.ts.map +1 -1
- package/resources/conversation.d.mts +156 -0
- package/resources/conversation.d.mts.map +1 -0
- package/resources/conversation.d.ts +156 -0
- package/resources/conversation.d.ts.map +1 -0
- package/resources/conversation.js +40 -0
- package/resources/conversation.js.map +1 -0
- package/resources/conversation.mjs +36 -0
- package/resources/conversation.mjs.map +1 -0
- package/resources/customer-flow-edge-case.d.mts +637 -40
- package/resources/customer-flow-edge-case.d.mts.map +1 -1
- package/resources/customer-flow-edge-case.d.ts +637 -40
- package/resources/customer-flow-edge-case.d.ts.map +1 -1
- package/resources/customer-flow.d.mts +2583 -156
- package/resources/customer-flow.d.mts.map +1 -1
- package/resources/customer-flow.d.ts +2583 -156
- package/resources/customer-flow.d.ts.map +1 -1
- package/resources/{customer-profile.d.mts → customer.d.mts} +287 -98
- package/resources/customer.d.mts.map +1 -0
- package/resources/{customer-profile.d.ts → customer.d.ts} +287 -98
- package/resources/customer.d.ts.map +1 -0
- package/resources/customer.js +180 -0
- package/resources/customer.js.map +1 -0
- package/resources/customer.mjs +176 -0
- package/resources/customer.mjs.map +1 -0
- package/resources/index.d.mts +7 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +13 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +6 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mcp-server.d.mts +588 -0
- package/resources/mcp-server.d.mts.map +1 -0
- package/resources/mcp-server.d.ts +588 -0
- package/resources/mcp-server.d.ts.map +1 -0
- package/resources/mcp-server.js +109 -0
- package/resources/mcp-server.js.map +1 -0
- package/resources/mcp-server.mjs +105 -0
- package/resources/mcp-server.mjs.map +1 -0
- package/resources/metric-policy.d.mts +5 -4
- package/resources/metric-policy.d.mts.map +1 -1
- package/resources/metric-policy.d.ts +5 -4
- package/resources/metric-policy.d.ts.map +1 -1
- package/resources/metric-policy.js +1 -1
- package/resources/metric-policy.mjs +1 -1
- package/resources/metric-variant.d.mts +4 -1
- package/resources/metric-variant.d.mts.map +1 -1
- package/resources/metric-variant.d.ts +4 -1
- package/resources/metric-variant.d.ts.map +1 -1
- package/resources/metric.d.mts +7 -2
- package/resources/metric.d.mts.map +1 -1
- package/resources/metric.d.ts +7 -2
- package/resources/metric.d.ts.map +1 -1
- package/resources/simulation-environment.d.mts +366 -0
- package/resources/simulation-environment.d.mts.map +1 -1
- package/resources/simulation-environment.d.ts +366 -0
- package/resources/simulation-environment.d.ts.map +1 -1
- package/resources/simulation-job.d.mts +12 -8
- package/resources/simulation-job.d.mts.map +1 -1
- package/resources/simulation-job.d.ts +12 -8
- package/resources/simulation-job.d.ts.map +1 -1
- package/resources/simulation-persona.d.mts +25 -15
- package/resources/simulation-persona.d.mts.map +1 -1
- package/resources/simulation-persona.d.ts +25 -15
- package/resources/simulation-persona.d.ts.map +1 -1
- package/resources/simulation-run-plan-job.d.mts +32 -6
- package/resources/simulation-run-plan-job.d.mts.map +1 -1
- package/resources/simulation-run-plan-job.d.ts +32 -6
- package/resources/simulation-run-plan-job.d.ts.map +1 -1
- package/resources/simulation-run-plan.d.mts +126 -13
- package/resources/simulation-run-plan.d.mts.map +1 -1
- package/resources/simulation-run-plan.d.ts +126 -13
- package/resources/simulation-run-plan.d.ts.map +1 -1
- package/resources/simulation-template.d.mts +1 -1
- package/resources/simulation-template.d.mts.map +1 -1
- package/resources/simulation-template.d.ts +1 -1
- package/resources/simulation-template.d.ts.map +1 -1
- package/resources/simulation.d.mts +35 -3
- package/resources/simulation.d.mts.map +1 -1
- package/resources/simulation.d.ts +35 -3
- package/resources/simulation.d.ts.map +1 -1
- package/resources/tool.d.mts +565 -6
- package/resources/tool.d.mts.map +1 -1
- package/resources/tool.d.ts +565 -6
- package/resources/tool.d.ts.map +1 -1
- package/resources/tool.js +9 -6
- package/resources/tool.js.map +1 -1
- package/resources/tool.mjs +9 -6
- package/resources/tool.mjs.map +1 -1
- package/resources/usage.d.mts +1 -1
- package/resources/usage.d.mts.map +1 -1
- package/resources/usage.d.ts +1 -1
- package/resources/usage.d.ts.map +1 -1
- package/resources/webhook.d.mts +4 -4
- package/resources/webhook.d.mts.map +1 -1
- package/resources/webhook.d.ts +4 -4
- package/resources/webhook.d.ts.map +1 -1
- package/src/client.ts +197 -34
- package/src/resources/agent-connection.ts +2523 -0
- package/src/resources/agent-conversation.ts +139 -0
- package/src/resources/agent-draft.ts +239 -35
- package/src/resources/agent-endpoint.ts +8 -4
- package/src/resources/agent-setup.ts +1685 -0
- package/src/resources/agent-version.ts +126 -18
- package/src/resources/agent.ts +506 -4
- package/src/resources/calendar-connection.ts +1035 -63
- package/src/resources/call.ts +12 -2
- package/src/resources/config.ts +198 -36
- package/src/resources/conversation.ts +205 -0
- package/src/resources/customer-flow-edge-case.ts +709 -40
- package/src/resources/customer-flow.ts +3141 -156
- package/src/resources/{customer-profile.ts → customer.ts} +406 -306
- package/src/resources/index.ts +91 -17
- package/src/resources/mcp-server.ts +786 -0
- package/src/resources/metric-policy.ts +5 -4
- package/src/resources/metric-variant.ts +4 -1
- package/src/resources/metric.ts +7 -2
- package/src/resources/simulation-environment.ts +414 -0
- package/src/resources/simulation-job.ts +14 -8
- package/src/resources/simulation-persona.ts +25 -15
- package/src/resources/simulation-run-plan-job.ts +47 -6
- package/src/resources/simulation-run-plan.ts +140 -0
- package/src/resources/simulation-template.ts +1 -0
- package/src/resources/simulation.ts +39 -0
- package/src/resources/tool.ts +697 -6
- package/src/resources/usage.ts +6 -1
- package/src/resources/webhook.ts +8 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/customer-profile.d.mts.map +0 -1
- package/resources/customer-profile.d.ts.map +0 -1
- package/resources/customer-profile.js +0 -141
- package/resources/customer-profile.js.map +0 -1
- package/resources/customer-profile.mjs +0 -137
- package/resources/customer-profile.mjs.map +0 -1
package/resources/tool.d.ts
CHANGED
|
@@ -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
|
|
9
|
-
* on
|
|
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
|
|
22
|
-
*
|
|
23
|
-
* project-wide
|
|
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
|
*/
|