@arbol-ai/sdk 5.13.0 → 5.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/raiz/agents/client.d.ts +43 -44
- package/dist/raiz/agents/index.d.ts +1 -1
- package/dist/raiz/agents/models.d.ts +190 -12
- package/dist/raiz/agents/models.js +1 -1
- package/dist/raiz/evalRuns/client.d.ts +6 -6
- package/dist/raiz/evalRuns/models.d.ts +3 -3
- package/dist/raiz/index.d.ts +1 -1
- package/dist/raiz/models.d.ts +187 -23
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { RaizAgentIntegrationProcedureInput, RaizAgentProcedureInput, RaizResponseMetadata } from "../models.js";
|
|
3
3
|
import { type RaizAgent, type RaizAgentIntegrationToolInput, type RaizAgentPage, type RaizAgentSettingsInput } from "./models.js";
|
|
4
4
|
export interface ClientOptions extends BaseClientOptions {
|
|
5
5
|
/**
|
|
@@ -17,12 +17,15 @@ export interface Client {
|
|
|
17
17
|
* `firstMessage`, `language`, `timeZone`, `settings`, Knowledge
|
|
18
18
|
* (`knowledgeDocumentIds` of ready documents from `list_knowledge_documents`)
|
|
19
19
|
* and `integrationTools` (connection + tool pairs of the organization's
|
|
20
|
-
* connections in Account, checked live: INTEGRATION_TOOL_UNAVAILABLE),
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
20
|
+
* connections in Account, checked live: INTEGRATION_TOOL_UNAVAILABLE),
|
|
21
|
+
* `procedures` (each a trigger plus free-form Markdown or structured steps,
|
|
22
|
+
* with inline references to the Agent's tools, Knowledge and other
|
|
23
|
+
* procedures: AGENT_PROCEDURES_INVALID says where one is wrong), and for a
|
|
24
|
+
* text Agent `integrationProcedures` (connection + procedure pairs a
|
|
25
|
+
* connection publishes, checked live: INTEGRATION_PROCEDURE_UNAVAILABLE).
|
|
26
|
+
* Next: assign it to a channel with `update_channel`; a voice Agent is
|
|
27
|
+
* published in the background, so check `synced` with `get_agent`. Read the
|
|
28
|
+
* `create-agent` skill (`get_skill`) first.
|
|
26
29
|
*/
|
|
27
30
|
create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
|
|
28
31
|
/**
|
|
@@ -30,11 +33,12 @@ export interface Client {
|
|
|
30
33
|
*
|
|
31
34
|
* Read one Agent's complete setup: instructions, first message, language,
|
|
32
35
|
* time zone, settings, integration tools (each with its connection and
|
|
33
|
-
* effect), Knowledge document ids,
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* `version` as
|
|
36
|
+
* effect), Knowledge document ids, procedures (trigger plus free-form
|
|
37
|
+
* instructions or structured steps) and connection procedures, and channels.
|
|
38
|
+
* `ready` says whether it can hold conversations; for a voice Agent, `synced`
|
|
39
|
+
* says whether its phone line already runs this version, and `syncErrorCode`
|
|
40
|
+
* why not. Read it before `update_agent` and send its `version` as
|
|
41
|
+
* `expectedVersion`.
|
|
38
42
|
*/
|
|
39
43
|
get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
|
|
40
44
|
/**
|
|
@@ -53,15 +57,16 @@ export interface Client {
|
|
|
53
57
|
* Update an Agent
|
|
54
58
|
*
|
|
55
59
|
* Change an Agent: instructions, first message, name, language, time zone,
|
|
56
|
-
* settings, integration tools, Knowledge,
|
|
60
|
+
* settings, integration tools, Knowledge, procedures, connection procedures
|
|
57
61
|
* or status. Omitted fields stay and `null` clears one; `settings`,
|
|
58
|
-
* `integrationTools`, `
|
|
59
|
-
* `knowledgeDocumentIds` replace the whole value when given
|
|
60
|
-
*
|
|
61
|
-
* (VERSION_CONFLICT: read it again).
|
|
62
|
-
* and calling. `modality` changes
|
|
63
|
-
*
|
|
64
|
-
* the background: check
|
|
62
|
+
* `integrationTools`, `integrationProcedures`, `procedures` and
|
|
63
|
+
* `knowledgeDocumentIds` replace the whole value when given (keep each
|
|
64
|
+
* existing procedure's `id`), so read the Agent with `get_agent` first and
|
|
65
|
+
* send its `version` as `expectedVersion` (VERSION_CONFLICT: read it again).
|
|
66
|
+
* `status: paused` stops it from answering and calling. `modality` changes
|
|
67
|
+
* only while it has no channels and no published voice line
|
|
68
|
+
* (AGENT_MODALITY_LOCKED). A voice Agent republishes in the background: check
|
|
69
|
+
* `synced`.
|
|
65
70
|
*/
|
|
66
71
|
update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
|
|
67
72
|
}
|
|
@@ -72,12 +77,11 @@ export interface CreateRequest {
|
|
|
72
77
|
firstMessage?: string | null;
|
|
73
78
|
instructions?: string | null;
|
|
74
79
|
/**
|
|
75
|
-
* Text Agents.
|
|
76
|
-
* in Account), each saved with its current text and
|
|
77
|
-
*
|
|
78
|
-
* new set.
|
|
80
|
+
* Text Agents. Procedures a connection publishes (`listConnections`, checked
|
|
81
|
+
* live in Account), each saved with its current text and run as a free-form
|
|
82
|
+
* procedure beside `procedures`. In an update, the complete new set.
|
|
79
83
|
*/
|
|
80
|
-
|
|
84
|
+
integrationProcedures?: RaizAgentIntegrationProcedureInput[];
|
|
81
85
|
/**
|
|
82
86
|
* The integrations' tools the Agent may call, each on one of the
|
|
83
87
|
* organization's connections (`listConnections`, checked live in Account).
|
|
@@ -99,19 +103,17 @@ export interface CreateRequest {
|
|
|
99
103
|
*/
|
|
100
104
|
modality: "voice" | "text";
|
|
101
105
|
name: string;
|
|
106
|
+
/**
|
|
107
|
+
* The Agent's procedures, as a complete set: a procedure left out is removed.
|
|
108
|
+
* Keep each existing procedure's `id`; a new one may omit it.
|
|
109
|
+
*/
|
|
110
|
+
procedures?: RaizAgentProcedureInput[];
|
|
102
111
|
/**
|
|
103
112
|
* How the Agent behaves. In an update, the complete new settings: keys left
|
|
104
113
|
* out return to their default. Text and voice settings apply only to Agents
|
|
105
114
|
* of that modality.
|
|
106
115
|
*/
|
|
107
116
|
settings?: RaizAgentSettingsInput;
|
|
108
|
-
/**
|
|
109
|
-
* Text-only procedures and references loaded on demand. Names and resource
|
|
110
|
-
* paths must be unique; the complete set is limited to 256 KiB. In an update,
|
|
111
|
-
* this replaces the whole set. Skills never grant additional business tools
|
|
112
|
-
* or execute scripts.
|
|
113
|
-
*/
|
|
114
|
-
skills?: RaizAgentSkill[];
|
|
115
117
|
/**
|
|
116
118
|
* A paused Agent answers nothing and places no calls.
|
|
117
119
|
*/
|
|
@@ -189,12 +191,11 @@ export interface UpdateRequest {
|
|
|
189
191
|
firstMessage?: string | null;
|
|
190
192
|
instructions?: string | null;
|
|
191
193
|
/**
|
|
192
|
-
* Text Agents.
|
|
193
|
-
* in Account), each saved with its current text and
|
|
194
|
-
*
|
|
195
|
-
* new set.
|
|
194
|
+
* Text Agents. Procedures a connection publishes (`listConnections`, checked
|
|
195
|
+
* live in Account), each saved with its current text and run as a free-form
|
|
196
|
+
* procedure beside `procedures`. In an update, the complete new set.
|
|
196
197
|
*/
|
|
197
|
-
|
|
198
|
+
integrationProcedures?: RaizAgentIntegrationProcedureInput[];
|
|
198
199
|
/**
|
|
199
200
|
* The integrations' tools the Agent may call, each on one of the
|
|
200
201
|
* organization's connections (`listConnections`, checked live in Account).
|
|
@@ -216,19 +217,17 @@ export interface UpdateRequest {
|
|
|
216
217
|
*/
|
|
217
218
|
modality?: "voice" | "text";
|
|
218
219
|
name?: string;
|
|
220
|
+
/**
|
|
221
|
+
* The Agent's procedures, as a complete set: a procedure left out is removed.
|
|
222
|
+
* Keep each existing procedure's `id`; a new one may omit it.
|
|
223
|
+
*/
|
|
224
|
+
procedures?: RaizAgentProcedureInput[];
|
|
219
225
|
/**
|
|
220
226
|
* How the Agent behaves. In an update, the complete new settings: keys left
|
|
221
227
|
* out return to their default. Text and voice settings apply only to Agents
|
|
222
228
|
* of that modality.
|
|
223
229
|
*/
|
|
224
230
|
settings?: RaizAgentSettingsInput;
|
|
225
|
-
/**
|
|
226
|
-
* Text-only procedures and references loaded on demand. Names and resource
|
|
227
|
-
* paths must be unique; the complete set is limited to 256 KiB. In an update,
|
|
228
|
-
* this replaces the whole set. Skills never grant additional business tools
|
|
229
|
-
* or execute scripts.
|
|
230
|
-
*/
|
|
231
|
-
skills?: RaizAgentSkill[];
|
|
232
231
|
/**
|
|
233
232
|
* A paused Agent answers nothing and places no calls.
|
|
234
233
|
*/
|
|
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
|
|
|
2
2
|
export type { RequestOptions } from "../../_/index.js";
|
|
3
3
|
export { createClient } from "./client.js";
|
|
4
4
|
export type { Client, ClientOptions, CreateRequest, CreateResponse, GetRequest, GetResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
|
|
5
|
-
export type { RaizAgent, RaizAgentGreeting, RaizAgentIntegrationToolInput, RaizAgentModelTrial, RaizAgentPage, RaizAgentSettings, RaizAgentSettingsInput, RaizAgentTurnPolicy, RaizAgentVoiceSettings, } from "./models.js";
|
|
5
|
+
export type { RaizAgent, RaizAgentGreeting, RaizAgentIntegrationToolInput, RaizAgentModelTrial, RaizAgentPage, RaizAgentProcedure, RaizAgentSettings, RaizAgentSettingsInput, RaizAgentTurnPolicy, RaizAgentVoiceSettings, } from "./models.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PageInfo } from "../../models.js";
|
|
2
|
-
import { type
|
|
2
|
+
import { type RaizBusinessHours } from "../models.js";
|
|
3
3
|
export interface RaizAgent {
|
|
4
4
|
channelCount: number;
|
|
5
5
|
/**
|
|
@@ -24,13 +24,14 @@ export interface RaizAgent {
|
|
|
24
24
|
id: string;
|
|
25
25
|
instructions: string | null;
|
|
26
26
|
/**
|
|
27
|
-
* The
|
|
28
|
-
* its connection published then.
|
|
27
|
+
* The procedures the Agent takes from its connections, each saved with the
|
|
28
|
+
* text its connection published then. They run as free-form procedures beside
|
|
29
|
+
* `procedures`.
|
|
29
30
|
*/
|
|
30
|
-
|
|
31
|
+
integrationProcedures: {
|
|
31
32
|
connectionId: string;
|
|
32
33
|
digest: string;
|
|
33
|
-
|
|
34
|
+
procedure: string;
|
|
34
35
|
}[];
|
|
35
36
|
/**
|
|
36
37
|
* The integrations' tools the Agent may call, each on the connection it runs
|
|
@@ -56,19 +57,18 @@ export interface RaizAgent {
|
|
|
56
57
|
*/
|
|
57
58
|
modality: "voice" | "text";
|
|
58
59
|
name: string;
|
|
60
|
+
/**
|
|
61
|
+
* The Agent's procedures. The model reads only the triggers until a
|
|
62
|
+
* conversation matches one, then loads that procedure. In an update, the
|
|
63
|
+
* complete new set.
|
|
64
|
+
*/
|
|
65
|
+
procedures: RaizAgentProcedure[];
|
|
59
66
|
/**
|
|
60
67
|
* Whether the Agent can hold conversations: active, with instructions and,
|
|
61
68
|
* for voice, published for calls.
|
|
62
69
|
*/
|
|
63
70
|
ready: boolean;
|
|
64
71
|
settings: RaizAgentSettings;
|
|
65
|
-
/**
|
|
66
|
-
* Text-only procedures and references loaded on demand. Names and resource
|
|
67
|
-
* paths must be unique; the complete set is limited to 256 KiB. In an update,
|
|
68
|
-
* this replaces the whole set. Skills never grant additional business tools
|
|
69
|
-
* or execute scripts.
|
|
70
|
-
*/
|
|
71
|
-
skills: RaizAgentSkill[];
|
|
72
72
|
/**
|
|
73
73
|
* A paused Agent answers nothing and places no calls.
|
|
74
74
|
*/
|
|
@@ -136,6 +136,184 @@ export interface RaizAgentPage {
|
|
|
136
136
|
*/
|
|
137
137
|
pageInfo: PageInfo;
|
|
138
138
|
}
|
|
139
|
+
export interface RaizAgentProcedure {
|
|
140
|
+
/**
|
|
141
|
+
* Free-form procedures: what to do, in Markdown, with inline references such
|
|
142
|
+
* as `[tool id="buscar_citas"]`, `[kb id="kdc_…"]`, `[procedure id="prc_…"]`,
|
|
143
|
+
* `[system_tool id="end_conversation"]` and `{{contact_name}}`. Empty for
|
|
144
|
+
* structured procedures.
|
|
145
|
+
*/
|
|
146
|
+
content: string;
|
|
147
|
+
/**
|
|
148
|
+
* The procedure's id (`prc_…`), stable for the Agent's life.
|
|
149
|
+
*/
|
|
150
|
+
id: string;
|
|
151
|
+
/**
|
|
152
|
+
* A short label for people. The model never reads it.
|
|
153
|
+
*/
|
|
154
|
+
name: string;
|
|
155
|
+
/**
|
|
156
|
+
* A paused procedure runs on no channel.
|
|
157
|
+
*/
|
|
158
|
+
status: "active" | "paused";
|
|
159
|
+
/**
|
|
160
|
+
* Structured procedures: the steps, in order. Empty for free-form procedures.
|
|
161
|
+
*/
|
|
162
|
+
steps: ({
|
|
163
|
+
instruction: string;
|
|
164
|
+
type: "ask";
|
|
165
|
+
} | {
|
|
166
|
+
instruction: string;
|
|
167
|
+
type: "tell";
|
|
168
|
+
} | {
|
|
169
|
+
message: string;
|
|
170
|
+
translations?: {
|
|
171
|
+
[key: string]: unknown;
|
|
172
|
+
};
|
|
173
|
+
type: "say";
|
|
174
|
+
} | {
|
|
175
|
+
arguments?: {
|
|
176
|
+
[key: string]: unknown;
|
|
177
|
+
};
|
|
178
|
+
instruction?: string;
|
|
179
|
+
onFailure?: ({
|
|
180
|
+
instruction: string;
|
|
181
|
+
type: "ask";
|
|
182
|
+
} | {
|
|
183
|
+
instruction: string;
|
|
184
|
+
type: "tell";
|
|
185
|
+
} | {
|
|
186
|
+
message: string;
|
|
187
|
+
translations?: {
|
|
188
|
+
[key: string]: unknown;
|
|
189
|
+
};
|
|
190
|
+
type: "say";
|
|
191
|
+
} | {
|
|
192
|
+
procedureId: string;
|
|
193
|
+
type: "procedure";
|
|
194
|
+
} | {
|
|
195
|
+
type: "end";
|
|
196
|
+
} | {
|
|
197
|
+
maxRetries: number;
|
|
198
|
+
type: "retry";
|
|
199
|
+
})[];
|
|
200
|
+
tool: string;
|
|
201
|
+
type: "tool";
|
|
202
|
+
} | {
|
|
203
|
+
branches: {
|
|
204
|
+
steps: ({
|
|
205
|
+
instruction: string;
|
|
206
|
+
type: "ask";
|
|
207
|
+
} | {
|
|
208
|
+
instruction: string;
|
|
209
|
+
type: "tell";
|
|
210
|
+
} | {
|
|
211
|
+
message: string;
|
|
212
|
+
translations?: {
|
|
213
|
+
[key: string]: unknown;
|
|
214
|
+
};
|
|
215
|
+
type: "say";
|
|
216
|
+
} | {
|
|
217
|
+
arguments?: {
|
|
218
|
+
[key: string]: unknown;
|
|
219
|
+
};
|
|
220
|
+
instruction?: string;
|
|
221
|
+
onFailure?: ({
|
|
222
|
+
instruction: string;
|
|
223
|
+
type: "ask";
|
|
224
|
+
} | {
|
|
225
|
+
instruction: string;
|
|
226
|
+
type: "tell";
|
|
227
|
+
} | {
|
|
228
|
+
message: string;
|
|
229
|
+
translations?: {
|
|
230
|
+
[key: string]: unknown;
|
|
231
|
+
};
|
|
232
|
+
type: "say";
|
|
233
|
+
} | {
|
|
234
|
+
procedureId: string;
|
|
235
|
+
type: "procedure";
|
|
236
|
+
} | {
|
|
237
|
+
type: "end";
|
|
238
|
+
} | {
|
|
239
|
+
maxRetries: number;
|
|
240
|
+
type: "retry";
|
|
241
|
+
})[];
|
|
242
|
+
tool: string;
|
|
243
|
+
type: "tool";
|
|
244
|
+
} | {
|
|
245
|
+
procedureId: string;
|
|
246
|
+
type: "procedure";
|
|
247
|
+
} | {
|
|
248
|
+
type: "end";
|
|
249
|
+
})[];
|
|
250
|
+
when: string;
|
|
251
|
+
}[];
|
|
252
|
+
otherwise?: ({
|
|
253
|
+
instruction: string;
|
|
254
|
+
type: "ask";
|
|
255
|
+
} | {
|
|
256
|
+
instruction: string;
|
|
257
|
+
type: "tell";
|
|
258
|
+
} | {
|
|
259
|
+
message: string;
|
|
260
|
+
translations?: {
|
|
261
|
+
[key: string]: unknown;
|
|
262
|
+
};
|
|
263
|
+
type: "say";
|
|
264
|
+
} | {
|
|
265
|
+
arguments?: {
|
|
266
|
+
[key: string]: unknown;
|
|
267
|
+
};
|
|
268
|
+
instruction?: string;
|
|
269
|
+
onFailure?: ({
|
|
270
|
+
instruction: string;
|
|
271
|
+
type: "ask";
|
|
272
|
+
} | {
|
|
273
|
+
instruction: string;
|
|
274
|
+
type: "tell";
|
|
275
|
+
} | {
|
|
276
|
+
message: string;
|
|
277
|
+
translations?: {
|
|
278
|
+
[key: string]: unknown;
|
|
279
|
+
};
|
|
280
|
+
type: "say";
|
|
281
|
+
} | {
|
|
282
|
+
procedureId: string;
|
|
283
|
+
type: "procedure";
|
|
284
|
+
} | {
|
|
285
|
+
type: "end";
|
|
286
|
+
} | {
|
|
287
|
+
maxRetries: number;
|
|
288
|
+
type: "retry";
|
|
289
|
+
})[];
|
|
290
|
+
tool: string;
|
|
291
|
+
type: "tool";
|
|
292
|
+
} | {
|
|
293
|
+
procedureId: string;
|
|
294
|
+
type: "procedure";
|
|
295
|
+
} | {
|
|
296
|
+
type: "end";
|
|
297
|
+
})[];
|
|
298
|
+
type: "branch";
|
|
299
|
+
} | {
|
|
300
|
+
procedureId: string;
|
|
301
|
+
type: "procedure";
|
|
302
|
+
} | {
|
|
303
|
+
type: "end";
|
|
304
|
+
})[];
|
|
305
|
+
/**
|
|
306
|
+
* When it applies, from the contact's side: When the contact asks to book or
|
|
307
|
+
* move an appointment. Empty makes a sub-procedure, which only runs when
|
|
308
|
+
* another procedure references it.
|
|
309
|
+
*/
|
|
310
|
+
trigger: string;
|
|
311
|
+
/**
|
|
312
|
+
* `free_form`: instructions the Agent adapts. `structured`: steps that run
|
|
313
|
+
* the same way every time. Fixed once created.
|
|
314
|
+
*/
|
|
315
|
+
type: "free_form" | "structured";
|
|
316
|
+
}
|
|
139
317
|
export interface RaizAgentSettings {
|
|
140
318
|
attachmentReader: "vision" | "ocr" | null;
|
|
141
319
|
automaticKnowledge: boolean | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
import { array, instant, object } from "../../_/index.js";
|
|
4
|
-
import { RaizBusinessHoursCodec
|
|
4
|
+
import { RaizBusinessHoursCodec } from "../models.js";
|
|
5
5
|
export const RaizAgentCodec = object([
|
|
6
6
|
["createdAt", null, instant],
|
|
7
7
|
["updatedAt", null, instant],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { RaizAgentIntegrationProcedureInput, RaizAgentProcedureInput, RaizResponseMetadata } from "../models.js";
|
|
3
3
|
import { type RaizEvalRun } from "./models.js";
|
|
4
4
|
export interface ClientOptions extends BaseClientOptions {
|
|
5
5
|
/**
|
|
@@ -20,7 +20,7 @@ export interface Client {
|
|
|
20
20
|
* person must review its applicability to calls before approval. Otherwise
|
|
21
21
|
* measure a candidate version on its kept evaluation cases before publishing
|
|
22
22
|
* it: the WhatsApp Agent rewrites each case's reply with the candidate's
|
|
23
|
-
* `instructions`, `
|
|
23
|
+
* `instructions`, `procedures`, `integrationProcedures`, `model` and
|
|
24
24
|
* `reasoningEffort` (omitted ones stay as the live Agent has them), without
|
|
25
25
|
* running any integration tool (each answers with what it answered in the
|
|
26
26
|
* original conversation) and without sending anything; then a judge model
|
|
@@ -52,15 +52,15 @@ export interface CreateRequest {
|
|
|
52
52
|
agentId: string;
|
|
53
53
|
/**
|
|
54
54
|
* The candidate version: what changes in what the model reads. Omitted fields
|
|
55
|
-
* keep the live Agent's; `
|
|
56
|
-
* as in `updateAgent`.
|
|
55
|
+
* keep the live Agent's; `integrationProcedures` and `procedures` are
|
|
56
|
+
* complete sets, as in `updateAgent`.
|
|
57
57
|
*/
|
|
58
58
|
candidate?: {
|
|
59
59
|
instructions?: string | null;
|
|
60
|
-
|
|
60
|
+
integrationProcedures?: RaizAgentIntegrationProcedureInput[];
|
|
61
61
|
model?: "arbolito/agile" | "arbolito/balanced" | "arbolito/advanced" | "arbolito/top" | null;
|
|
62
|
+
procedures?: RaizAgentProcedureInput[];
|
|
62
63
|
reasoningEffort?: "none" | "low" | "medium" | "high" | "xhigh" | null;
|
|
63
|
-
skills?: RaizAgentSkill[];
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
66
|
* The Agent's kept cases to replay. Omitted: its 50 newest kept cases.
|
|
@@ -7,9 +7,9 @@ export interface RaizEvalRun {
|
|
|
7
7
|
baseVersionId: string | null;
|
|
8
8
|
caseIds: string[];
|
|
9
9
|
/**
|
|
10
|
-
* SHA-256 of the candidate's content (instructions,
|
|
11
|
-
*
|
|
12
|
-
* update's.
|
|
10
|
+
* SHA-256 of the candidate's content (instructions, procedures, connection
|
|
11
|
+
* procedures, model, reasoning effort): what `settings.evalGate` compares
|
|
12
|
+
* with an update's.
|
|
13
13
|
*/
|
|
14
14
|
contentSha256: string;
|
|
15
15
|
/**
|
package/dist/raiz/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export { ApiError } from "../_/index.js";
|
|
|
2
2
|
export type { RequestOptions } from "../_/index.js";
|
|
3
3
|
export { createClient } from "./client.js";
|
|
4
4
|
export type { Client, ClientOptions, } from "./client.js";
|
|
5
|
-
export type {
|
|
5
|
+
export type { RaizAgentIntegrationProcedureInput, RaizAgentProcedureInput, RaizBusinessHours, RaizBusinessHoursWindow, RaizContactHoursWindow, RaizCount, RaizEmailAddress, RaizFact, RaizFailureResponse, RaizHttpsUrl, RaizOutsideHoursTemplate, RaizPhoneNumber, RaizResponseMetadata, RaizTask, } from "./models.js";
|
package/dist/raiz/models.d.ts
CHANGED
|
@@ -1,30 +1,191 @@
|
|
|
1
1
|
import type { Failure, ValidationIssue } from "../models.js";
|
|
2
|
-
export interface
|
|
2
|
+
export interface RaizAgentIntegrationProcedureInput {
|
|
3
3
|
/**
|
|
4
4
|
* A connection's id in Account (`con_…`).
|
|
5
5
|
*/
|
|
6
6
|
connectionId: string;
|
|
7
7
|
/**
|
|
8
|
-
* The
|
|
8
|
+
* The procedure's name, as its connection lists it.
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
procedure: string;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
export interface RaizAgentProcedureInput {
|
|
13
|
+
/**
|
|
14
|
+
* Free-form procedures: what to do, in Markdown, with inline references such
|
|
15
|
+
* as `[tool id="buscar_citas"]`, `[kb id="kdc_…"]`, `[procedure id="prc_…"]`,
|
|
16
|
+
* `[system_tool id="end_conversation"]` and `{{contact_name}}`. Empty for
|
|
17
|
+
* structured procedures.
|
|
18
|
+
*/
|
|
19
|
+
content?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The procedure's id (`prc_…`), stable for the Agent's life.
|
|
22
|
+
*/
|
|
23
|
+
id?: string;
|
|
24
|
+
/**
|
|
25
|
+
* A short label for people. The model never reads it.
|
|
26
|
+
*/
|
|
15
27
|
name: string;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
/**
|
|
29
|
+
* A paused procedure runs on no channel.
|
|
30
|
+
*/
|
|
31
|
+
status?: "active" | "paused";
|
|
32
|
+
/**
|
|
33
|
+
* Structured procedures: the steps, in order. Empty for free-form procedures.
|
|
34
|
+
*/
|
|
35
|
+
steps?: ({
|
|
36
|
+
instruction: string;
|
|
37
|
+
type: "ask";
|
|
38
|
+
} | {
|
|
39
|
+
instruction: string;
|
|
40
|
+
type: "tell";
|
|
41
|
+
} | {
|
|
42
|
+
message: string;
|
|
43
|
+
translations?: {
|
|
44
|
+
[key: string]: unknown;
|
|
45
|
+
};
|
|
46
|
+
type: "say";
|
|
47
|
+
} | {
|
|
48
|
+
arguments?: {
|
|
49
|
+
[key: string]: unknown;
|
|
50
|
+
};
|
|
51
|
+
instruction?: string;
|
|
52
|
+
onFailure?: ({
|
|
53
|
+
instruction: string;
|
|
54
|
+
type: "ask";
|
|
55
|
+
} | {
|
|
56
|
+
instruction: string;
|
|
57
|
+
type: "tell";
|
|
58
|
+
} | {
|
|
59
|
+
message: string;
|
|
60
|
+
translations?: {
|
|
61
|
+
[key: string]: unknown;
|
|
62
|
+
};
|
|
63
|
+
type: "say";
|
|
64
|
+
} | {
|
|
65
|
+
procedureId: string;
|
|
66
|
+
type: "procedure";
|
|
67
|
+
} | {
|
|
68
|
+
type: "end";
|
|
69
|
+
} | {
|
|
70
|
+
maxRetries: number;
|
|
71
|
+
type: "retry";
|
|
72
|
+
})[];
|
|
73
|
+
tool: string;
|
|
74
|
+
type: "tool";
|
|
75
|
+
} | {
|
|
76
|
+
branches: {
|
|
77
|
+
steps: ({
|
|
78
|
+
instruction: string;
|
|
79
|
+
type: "ask";
|
|
80
|
+
} | {
|
|
81
|
+
instruction: string;
|
|
82
|
+
type: "tell";
|
|
83
|
+
} | {
|
|
84
|
+
message: string;
|
|
85
|
+
translations?: {
|
|
86
|
+
[key: string]: unknown;
|
|
87
|
+
};
|
|
88
|
+
type: "say";
|
|
89
|
+
} | {
|
|
90
|
+
arguments?: {
|
|
91
|
+
[key: string]: unknown;
|
|
92
|
+
};
|
|
93
|
+
instruction?: string;
|
|
94
|
+
onFailure?: ({
|
|
95
|
+
instruction: string;
|
|
96
|
+
type: "ask";
|
|
97
|
+
} | {
|
|
98
|
+
instruction: string;
|
|
99
|
+
type: "tell";
|
|
100
|
+
} | {
|
|
101
|
+
message: string;
|
|
102
|
+
translations?: {
|
|
103
|
+
[key: string]: unknown;
|
|
104
|
+
};
|
|
105
|
+
type: "say";
|
|
106
|
+
} | {
|
|
107
|
+
procedureId: string;
|
|
108
|
+
type: "procedure";
|
|
109
|
+
} | {
|
|
110
|
+
type: "end";
|
|
111
|
+
} | {
|
|
112
|
+
maxRetries: number;
|
|
113
|
+
type: "retry";
|
|
114
|
+
})[];
|
|
115
|
+
tool: string;
|
|
116
|
+
type: "tool";
|
|
117
|
+
} | {
|
|
118
|
+
procedureId: string;
|
|
119
|
+
type: "procedure";
|
|
120
|
+
} | {
|
|
121
|
+
type: "end";
|
|
122
|
+
})[];
|
|
123
|
+
when: string;
|
|
124
|
+
}[];
|
|
125
|
+
otherwise?: ({
|
|
126
|
+
instruction: string;
|
|
127
|
+
type: "ask";
|
|
128
|
+
} | {
|
|
129
|
+
instruction: string;
|
|
130
|
+
type: "tell";
|
|
131
|
+
} | {
|
|
132
|
+
message: string;
|
|
133
|
+
translations?: {
|
|
134
|
+
[key: string]: unknown;
|
|
135
|
+
};
|
|
136
|
+
type: "say";
|
|
137
|
+
} | {
|
|
138
|
+
arguments?: {
|
|
139
|
+
[key: string]: unknown;
|
|
140
|
+
};
|
|
141
|
+
instruction?: string;
|
|
142
|
+
onFailure?: ({
|
|
143
|
+
instruction: string;
|
|
144
|
+
type: "ask";
|
|
145
|
+
} | {
|
|
146
|
+
instruction: string;
|
|
147
|
+
type: "tell";
|
|
148
|
+
} | {
|
|
149
|
+
message: string;
|
|
150
|
+
translations?: {
|
|
151
|
+
[key: string]: unknown;
|
|
152
|
+
};
|
|
153
|
+
type: "say";
|
|
154
|
+
} | {
|
|
155
|
+
procedureId: string;
|
|
156
|
+
type: "procedure";
|
|
157
|
+
} | {
|
|
158
|
+
type: "end";
|
|
159
|
+
} | {
|
|
160
|
+
maxRetries: number;
|
|
161
|
+
type: "retry";
|
|
162
|
+
})[];
|
|
163
|
+
tool: string;
|
|
164
|
+
type: "tool";
|
|
165
|
+
} | {
|
|
166
|
+
procedureId: string;
|
|
167
|
+
type: "procedure";
|
|
168
|
+
} | {
|
|
169
|
+
type: "end";
|
|
170
|
+
})[];
|
|
171
|
+
type: "branch";
|
|
172
|
+
} | {
|
|
173
|
+
procedureId: string;
|
|
174
|
+
type: "procedure";
|
|
175
|
+
} | {
|
|
176
|
+
type: "end";
|
|
177
|
+
})[];
|
|
178
|
+
/**
|
|
179
|
+
* When it applies, from the contact's side: When the contact asks to book or
|
|
180
|
+
* move an appointment. Empty makes a sub-procedure, which only runs when
|
|
181
|
+
* another procedure references it.
|
|
182
|
+
*/
|
|
183
|
+
trigger?: string;
|
|
184
|
+
/**
|
|
185
|
+
* `free_form`: instructions the Agent adapts. `structured`: steps that run
|
|
186
|
+
* the same way every time. Fixed once created.
|
|
187
|
+
*/
|
|
188
|
+
type: "free_form" | "structured";
|
|
28
189
|
}
|
|
29
190
|
export interface RaizBusinessHours {
|
|
30
191
|
/**
|
|
@@ -658,11 +819,14 @@ export interface RaizFailureResponse {
|
|
|
658
819
|
message: "Calls are unavailable right now. Try again in a few minutes.";
|
|
659
820
|
retryable: true;
|
|
660
821
|
} | {
|
|
661
|
-
code: "
|
|
822
|
+
code: "AGENT_PROCEDURES_INVALID";
|
|
662
823
|
data: {
|
|
663
|
-
|
|
824
|
+
issues: {
|
|
825
|
+
code: string;
|
|
826
|
+
path: string;
|
|
827
|
+
}[];
|
|
664
828
|
};
|
|
665
|
-
message: "
|
|
829
|
+
message: "A procedure is incomplete, references a tool, document or procedure the Agent does not have, or breaks the structured step rules. `issues` says where.";
|
|
666
830
|
retryable: false;
|
|
667
831
|
} | {
|
|
668
832
|
code: "AGENT_IN_USE";
|
|
@@ -728,11 +892,11 @@ export interface RaizFailureResponse {
|
|
|
728
892
|
message: "The organization's integrations cannot be read right now. Try again shortly.";
|
|
729
893
|
retryable: true;
|
|
730
894
|
} | {
|
|
731
|
-
code: "
|
|
895
|
+
code: "INTEGRATION_PROCEDURE_UNAVAILABLE";
|
|
732
896
|
data: {
|
|
733
897
|
[key: string]: unknown;
|
|
734
898
|
};
|
|
735
|
-
message: "A
|
|
899
|
+
message: "A procedure does not exist in this organization's connections, Raíz cannot run its connection, or the Agent is not a text Agent.";
|
|
736
900
|
retryable: false;
|
|
737
901
|
} | {
|
|
738
902
|
code: "INTEGRATION_TOOL_UNAVAILABLE";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbol-ai/sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.14.0",
|
|
4
4
|
"description": "The Arbol API for TypeScript and JavaScript, generated by Cloudflare Forge from the platform's public OpenAPI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"arbol",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"packageManager": "bun@1.4.3",
|
|
57
57
|
"arbol": {
|
|
58
58
|
"openapi": {
|
|
59
|
-
"release": "1.20261031.
|
|
60
|
-
"sha256": "
|
|
59
|
+
"release": "1.20261031.232616",
|
|
60
|
+
"sha256": "c278178a1672b31209b7ed57864896029959c7988f99d6d3adfc5256fd2990a6"
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}
|