@ravi-os/sdk 0.260716.1 → 0.260725.1
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/README.md +53 -0
- package/dist/channel-backend.d.ts +246 -0
- package/dist/channel-backend.d.ts.map +1 -0
- package/dist/channel-backend.js +193 -0
- package/dist/channel-backend.js.map +1 -0
- package/dist/channel-runtime-events.d.ts +801 -0
- package/dist/channel-runtime-events.d.ts.map +1 -0
- package/dist/channel-runtime-events.js +184 -0
- package/dist/channel-runtime-events.js.map +1 -0
- package/dist/client.d.ts +74 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +48 -2
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/local-agent-reconciliation.d.ts +172 -0
- package/dist/local-agent-reconciliation.d.ts.map +1 -0
- package/dist/local-agent-reconciliation.js +597 -0
- package/dist/local-agent-reconciliation.js.map +1 -0
- package/dist/native-channel-driver.d.ts +199 -0
- package/dist/native-channel-driver.d.ts.map +1 -0
- package/dist/native-channel-driver.js +55 -0
- package/dist/native-channel-driver.js.map +1 -0
- package/dist/schemas.d.ts +2936 -84
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +3970 -209
- package/dist/schemas.js.map +1 -1
- package/dist/types.d.ts +716 -15
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/package.json +17 -1
package/dist/types.d.ts
CHANGED
|
@@ -170,22 +170,120 @@ export type AgentsListInput = {
|
|
|
170
170
|
};
|
|
171
171
|
/** Return shape for `agents.list`. */
|
|
172
172
|
export type AgentsListReturn = {
|
|
173
|
-
agents: Array<
|
|
173
|
+
agents: Array<{
|
|
174
|
+
allowedSessions?: string[];
|
|
175
|
+
contactScope?: string;
|
|
176
|
+
cwd: string;
|
|
177
|
+
debounceMs?: number;
|
|
178
|
+
defaults?: (Record<string, unknown>) | null;
|
|
179
|
+
dmScope?: "main" | "per-peer" | "per-channel-peer" | "per-account-channel-peer";
|
|
180
|
+
effectiveModel: string | null;
|
|
181
|
+
effectiveProvider: string;
|
|
182
|
+
effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
|
|
183
|
+
groupDebounceMs?: number;
|
|
184
|
+
heartbeat?: {
|
|
185
|
+
accountId?: string;
|
|
186
|
+
activeEnd?: string;
|
|
187
|
+
activeStart?: string;
|
|
188
|
+
enabled: boolean;
|
|
189
|
+
intervalMs: number;
|
|
190
|
+
lastRunAt?: number;
|
|
191
|
+
model?: string;
|
|
192
|
+
};
|
|
193
|
+
id: string;
|
|
194
|
+
isDefault: boolean;
|
|
195
|
+
matrixAccount?: string;
|
|
196
|
+
memoryModel?: string;
|
|
197
|
+
mode?: "active" | "sentinel";
|
|
198
|
+
model?: string;
|
|
199
|
+
modelPresetId: string | null;
|
|
200
|
+
modelPresetVersion: number | null;
|
|
201
|
+
modelSource: ("agent_preset" | "agent_default" | "global_default") | null;
|
|
202
|
+
name?: string;
|
|
203
|
+
provider?: string;
|
|
204
|
+
remote?: string;
|
|
205
|
+
remoteUser?: string;
|
|
206
|
+
settingSources?: Array<"user" | "project">;
|
|
207
|
+
specMode?: boolean;
|
|
208
|
+
systemPromptAppend?: string;
|
|
209
|
+
tags: Array<{
|
|
210
|
+
assetId: string;
|
|
211
|
+
assetType: "agent" | "automation" | "app" | "session" | "task" | "project" | "profile" | "contact" | "chat" | "route" | "instance" | "artifact" | "insight" | "workflow_spec" | "workflow_run" | "workflow_node" | "cron_job" | "trigger" | "hook" | "task_automation" | "observer_rule" | "observer_binding" | "observer_profile" | "command" | "skill" | "skill_gate_rule" | "context" | "call_profile" | "call_request" | "call_voice_agent" | "call_tool" | "outbound_queue" | "outbound_entry" | "spec" | "devin_session";
|
|
212
|
+
createdAt: number;
|
|
213
|
+
createdBy?: string;
|
|
214
|
+
id: string;
|
|
215
|
+
metadata?: Record<string, unknown>;
|
|
216
|
+
source: string;
|
|
217
|
+
tagId: string;
|
|
218
|
+
tagSlug: string;
|
|
219
|
+
updatedAt: number;
|
|
220
|
+
updatedBy?: string;
|
|
221
|
+
}>;
|
|
222
|
+
}>;
|
|
174
223
|
defaultAgent: string;
|
|
175
|
-
filters:
|
|
176
|
-
|
|
224
|
+
filters: {
|
|
225
|
+
tag: string | null;
|
|
226
|
+
};
|
|
227
|
+
items: Array<{
|
|
228
|
+
allowedSessions?: string[];
|
|
229
|
+
contactScope?: string;
|
|
230
|
+
cwd: string;
|
|
231
|
+
debounceMs?: number;
|
|
232
|
+
defaults?: (Record<string, unknown>) | null;
|
|
233
|
+
dmScope?: "main" | "per-peer" | "per-channel-peer" | "per-account-channel-peer";
|
|
234
|
+
effectiveModel: string | null;
|
|
235
|
+
effectiveProvider: string;
|
|
236
|
+
effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
|
|
237
|
+
groupDebounceMs?: number;
|
|
238
|
+
heartbeat?: {
|
|
239
|
+
accountId?: string;
|
|
240
|
+
activeEnd?: string;
|
|
241
|
+
activeStart?: string;
|
|
242
|
+
enabled: boolean;
|
|
243
|
+
intervalMs: number;
|
|
244
|
+
lastRunAt?: number;
|
|
245
|
+
model?: string;
|
|
246
|
+
};
|
|
247
|
+
id: string;
|
|
248
|
+
isDefault: boolean;
|
|
249
|
+
matrixAccount?: string;
|
|
250
|
+
memoryModel?: string;
|
|
251
|
+
mode?: "active" | "sentinel";
|
|
252
|
+
model?: string;
|
|
253
|
+
modelPresetId: string | null;
|
|
254
|
+
modelPresetVersion: number | null;
|
|
255
|
+
modelSource: ("agent_preset" | "agent_default" | "global_default") | null;
|
|
256
|
+
name?: string;
|
|
257
|
+
provider?: string;
|
|
258
|
+
remote?: string;
|
|
259
|
+
remoteUser?: string;
|
|
260
|
+
settingSources?: Array<"user" | "project">;
|
|
261
|
+
specMode?: boolean;
|
|
262
|
+
systemPromptAppend?: string;
|
|
263
|
+
tags: Array<{
|
|
264
|
+
assetId: string;
|
|
265
|
+
assetType: "agent" | "automation" | "app" | "session" | "task" | "project" | "profile" | "contact" | "chat" | "route" | "instance" | "artifact" | "insight" | "workflow_spec" | "workflow_run" | "workflow_node" | "cron_job" | "trigger" | "hook" | "task_automation" | "observer_rule" | "observer_binding" | "observer_profile" | "command" | "skill" | "skill_gate_rule" | "context" | "call_profile" | "call_request" | "call_voice_agent" | "call_tool" | "outbound_queue" | "outbound_entry" | "spec" | "devin_session";
|
|
266
|
+
createdAt: number;
|
|
267
|
+
createdBy?: string;
|
|
268
|
+
id: string;
|
|
269
|
+
metadata?: Record<string, unknown>;
|
|
270
|
+
source: string;
|
|
271
|
+
tagId: string;
|
|
272
|
+
tagSlug: string;
|
|
273
|
+
updatedAt: number;
|
|
274
|
+
updatedBy?: string;
|
|
275
|
+
}>;
|
|
276
|
+
}>;
|
|
177
277
|
pagination: {
|
|
178
|
-
hasMore
|
|
278
|
+
hasMore?: boolean;
|
|
179
279
|
limit: number;
|
|
180
|
-
nextCommand
|
|
181
|
-
nextOffset
|
|
280
|
+
nextCommand?: string | null;
|
|
281
|
+
nextOffset?: number | null;
|
|
182
282
|
offset: number;
|
|
183
283
|
returned: number;
|
|
184
284
|
total: number;
|
|
185
|
-
[k: string]: unknown;
|
|
186
285
|
};
|
|
187
286
|
total: number;
|
|
188
|
-
[k: string]: unknown;
|
|
189
287
|
};
|
|
190
288
|
/** Input shape for `agents.permissions`. */
|
|
191
289
|
export type AgentsPermissionsInput = {
|
|
@@ -288,9 +386,66 @@ export type AgentsShowInput = {
|
|
|
288
386
|
};
|
|
289
387
|
/** Return shape for `agents.show`. */
|
|
290
388
|
export type AgentsShowReturn = {
|
|
291
|
-
agent:
|
|
389
|
+
agent: {
|
|
390
|
+
allowedSessions?: string[];
|
|
391
|
+
contactScope?: string;
|
|
392
|
+
cwd: string;
|
|
393
|
+
debounceMs?: number;
|
|
394
|
+
defaults?: (Record<string, unknown>) | null;
|
|
395
|
+
dmScope?: "main" | "per-peer" | "per-channel-peer" | "per-account-channel-peer";
|
|
396
|
+
effectiveModel: string | null;
|
|
397
|
+
effectiveProvider: string;
|
|
398
|
+
effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
|
|
399
|
+
groupDebounceMs?: number;
|
|
400
|
+
heartbeat?: {
|
|
401
|
+
accountId?: string;
|
|
402
|
+
activeEnd?: string;
|
|
403
|
+
activeStart?: string;
|
|
404
|
+
enabled: boolean;
|
|
405
|
+
intervalMs: number;
|
|
406
|
+
lastRunAt?: number;
|
|
407
|
+
model?: string;
|
|
408
|
+
};
|
|
409
|
+
id: string;
|
|
410
|
+
isDefault: boolean;
|
|
411
|
+
matrixAccount?: string;
|
|
412
|
+
memoryModel?: string;
|
|
413
|
+
mode?: "active" | "sentinel";
|
|
414
|
+
model?: string;
|
|
415
|
+
modelPresetId: string | null;
|
|
416
|
+
modelPresetVersion: number | null;
|
|
417
|
+
modelSource: ("agent_preset" | "agent_default" | "global_default") | null;
|
|
418
|
+
name?: string;
|
|
419
|
+
provider?: string;
|
|
420
|
+
remote?: string;
|
|
421
|
+
remoteUser?: string;
|
|
422
|
+
settingSources?: Array<"user" | "project">;
|
|
423
|
+
specMode?: boolean;
|
|
424
|
+
systemPromptAppend?: string;
|
|
425
|
+
tags: Array<{
|
|
426
|
+
assetId: string;
|
|
427
|
+
assetType: "agent" | "automation" | "app" | "session" | "task" | "project" | "profile" | "contact" | "chat" | "route" | "instance" | "artifact" | "insight" | "workflow_spec" | "workflow_run" | "workflow_node" | "cron_job" | "trigger" | "hook" | "task_automation" | "observer_rule" | "observer_binding" | "observer_profile" | "command" | "skill" | "skill_gate_rule" | "context" | "call_profile" | "call_request" | "call_voice_agent" | "call_tool" | "outbound_queue" | "outbound_entry" | "spec" | "devin_session";
|
|
428
|
+
createdAt: number;
|
|
429
|
+
createdBy?: string;
|
|
430
|
+
id: string;
|
|
431
|
+
metadata?: Record<string, unknown>;
|
|
432
|
+
source: string;
|
|
433
|
+
tagId: string;
|
|
434
|
+
tagSlug: string;
|
|
435
|
+
updatedAt: number;
|
|
436
|
+
updatedBy?: string;
|
|
437
|
+
}>;
|
|
438
|
+
};
|
|
292
439
|
permissionsCommand: string;
|
|
293
|
-
|
|
440
|
+
runtimePermissions: ({
|
|
441
|
+
capabilities?: Array<string | ({
|
|
442
|
+
objectId?: string;
|
|
443
|
+
objectType?: string;
|
|
444
|
+
permission?: string;
|
|
445
|
+
source?: string;
|
|
446
|
+
})>;
|
|
447
|
+
profile?: "bootstrap" | "full-access";
|
|
448
|
+
}) | null;
|
|
294
449
|
};
|
|
295
450
|
/** Input shape for `agents.spec-mode`. */
|
|
296
451
|
export type AgentsSpecModeInput = {
|
|
@@ -2098,6 +2253,129 @@ export type CalendarsShowReturn = {
|
|
|
2098
2253
|
updatedAt: number;
|
|
2099
2254
|
}>;
|
|
2100
2255
|
};
|
|
2256
|
+
/** Input shape for `channels.backend.ingress`. */
|
|
2257
|
+
export type ChannelsBackendIngressInput = {
|
|
2258
|
+
agentId: string;
|
|
2259
|
+
request: {
|
|
2260
|
+
agentId: string;
|
|
2261
|
+
channelInstanceId: string;
|
|
2262
|
+
content: Array<({
|
|
2263
|
+
text: string;
|
|
2264
|
+
type: "text";
|
|
2265
|
+
}) | ({
|
|
2266
|
+
artifactId: string;
|
|
2267
|
+
mediaType?: string;
|
|
2268
|
+
name?: string;
|
|
2269
|
+
sizeBytes?: number;
|
|
2270
|
+
type: "artifact";
|
|
2271
|
+
})>;
|
|
2272
|
+
external: {
|
|
2273
|
+
channelKind: string;
|
|
2274
|
+
connectionId: string;
|
|
2275
|
+
conversationId: string;
|
|
2276
|
+
messageId: string;
|
|
2277
|
+
senderId: string;
|
|
2278
|
+
};
|
|
2279
|
+
idempotencyKey: string;
|
|
2280
|
+
localActorId: string;
|
|
2281
|
+
protocol: "ravi.channel.backend";
|
|
2282
|
+
receivedAt: string;
|
|
2283
|
+
requestId: string;
|
|
2284
|
+
schemaVersion: 1;
|
|
2285
|
+
};
|
|
2286
|
+
};
|
|
2287
|
+
/** Return shape for `channels.backend.ingress`. */
|
|
2288
|
+
export type ChannelsBackendIngressReturn = {
|
|
2289
|
+
acceptedAt: string;
|
|
2290
|
+
binding?: {
|
|
2291
|
+
agentId: string;
|
|
2292
|
+
channelInstanceId: string;
|
|
2293
|
+
chatId: string;
|
|
2294
|
+
messageId: string;
|
|
2295
|
+
sessionId: string;
|
|
2296
|
+
turnId: string;
|
|
2297
|
+
};
|
|
2298
|
+
disposition: "accepted" | "duplicate" | "rejected";
|
|
2299
|
+
error?: {
|
|
2300
|
+
category: "validation" | "authentication" | "authorization" | "capacity" | "availability" | "internal";
|
|
2301
|
+
code: "INVALID_REQUEST" | "IDEMPOTENCY_CONFLICT" | "UNAUTHENTICATED" | "PERMISSION_DENIED" | "LOCAL_PERMISSION_DENIED" | "NOT_FOUND" | "RATE_LIMITED" | "OVERLOADED" | "UNAVAILABLE" | "INTERNAL";
|
|
2302
|
+
correlationId?: string;
|
|
2303
|
+
retryAfterMs?: number;
|
|
2304
|
+
retryable: boolean;
|
|
2305
|
+
};
|
|
2306
|
+
protocol: "ravi.channel.backend";
|
|
2307
|
+
requestId: string;
|
|
2308
|
+
schemaVersion: 1;
|
|
2309
|
+
};
|
|
2310
|
+
/** Input shape for `channels.backend.runtime.interrupt`. */
|
|
2311
|
+
export type ChannelsBackendRuntimeInterruptInput = {
|
|
2312
|
+
agentId: string;
|
|
2313
|
+
request: {
|
|
2314
|
+
binding: {
|
|
2315
|
+
agentId: string;
|
|
2316
|
+
channelInstanceId: string;
|
|
2317
|
+
chatId: string;
|
|
2318
|
+
messageId: string;
|
|
2319
|
+
sessionId: string;
|
|
2320
|
+
turnId: string;
|
|
2321
|
+
};
|
|
2322
|
+
idempotencyKey: string;
|
|
2323
|
+
protocol: "ravi.channel.runtime-events";
|
|
2324
|
+
requestId: string;
|
|
2325
|
+
requestedAt: string;
|
|
2326
|
+
schemaVersion: 1;
|
|
2327
|
+
};
|
|
2328
|
+
};
|
|
2329
|
+
/** Return shape for `channels.backend.runtime.interrupt`. */
|
|
2330
|
+
export type ChannelsBackendRuntimeInterruptReturn = {
|
|
2331
|
+
acceptedAt: string;
|
|
2332
|
+
disposition: "requested" | "duplicate" | "rejected";
|
|
2333
|
+
error?: {
|
|
2334
|
+
category: "validation" | "authentication" | "authorization" | "capacity" | "availability" | "internal";
|
|
2335
|
+
code: "INVALID_REQUEST" | "IDEMPOTENCY_CONFLICT" | "UNAUTHENTICATED" | "PERMISSION_DENIED" | "LOCAL_PERMISSION_DENIED" | "NOT_FOUND" | "RATE_LIMITED" | "OVERLOADED" | "UNAVAILABLE" | "INTERNAL";
|
|
2336
|
+
correlationId?: string;
|
|
2337
|
+
retryAfterMs?: number;
|
|
2338
|
+
retryable: boolean;
|
|
2339
|
+
};
|
|
2340
|
+
protocol: "ravi.channel.runtime-events";
|
|
2341
|
+
requestId: string;
|
|
2342
|
+
schemaVersion: 1;
|
|
2343
|
+
};
|
|
2344
|
+
/** Input shape for `channels.backend.runtime.readback`. */
|
|
2345
|
+
export type ChannelsBackendRuntimeReadbackInput = {
|
|
2346
|
+
agentId: string;
|
|
2347
|
+
request: {
|
|
2348
|
+
binding: {
|
|
2349
|
+
agentId: string;
|
|
2350
|
+
channelInstanceId: string;
|
|
2351
|
+
chatId: string;
|
|
2352
|
+
messageId: string;
|
|
2353
|
+
sessionId: string;
|
|
2354
|
+
turnId: string;
|
|
2355
|
+
};
|
|
2356
|
+
protocol: "ravi.channel.runtime-events";
|
|
2357
|
+
requestId: string;
|
|
2358
|
+
schemaVersion: 1;
|
|
2359
|
+
};
|
|
2360
|
+
};
|
|
2361
|
+
/** Return shape for `channels.backend.runtime.readback`. */
|
|
2362
|
+
export type ChannelsBackendRuntimeReadbackReturn = {
|
|
2363
|
+
assistantMessageId?: string;
|
|
2364
|
+
binding: {
|
|
2365
|
+
agentId: string;
|
|
2366
|
+
channelInstanceId: string;
|
|
2367
|
+
chatId: string;
|
|
2368
|
+
messageId: string;
|
|
2369
|
+
sessionId: string;
|
|
2370
|
+
turnId: string;
|
|
2371
|
+
};
|
|
2372
|
+
lastSequence: number;
|
|
2373
|
+
observedAt: string;
|
|
2374
|
+
protocol: "ravi.channel.runtime-events";
|
|
2375
|
+
requestId: string;
|
|
2376
|
+
schemaVersion: 1;
|
|
2377
|
+
state: "accepted" | "running" | "waiting_approval" | "completed" | "failed" | "interrupted";
|
|
2378
|
+
};
|
|
2101
2379
|
/** Input shape for `channels.create`. */
|
|
2102
2380
|
export type ChannelsCreateInput = {
|
|
2103
2381
|
credentialConnection?: string;
|
|
@@ -2194,6 +2472,12 @@ export type ChannelsRestartReturn = {
|
|
|
2194
2472
|
running: boolean;
|
|
2195
2473
|
status: string;
|
|
2196
2474
|
};
|
|
2475
|
+
health?: {
|
|
2476
|
+
checkedAt: number;
|
|
2477
|
+
reachable: boolean;
|
|
2478
|
+
reason?: string;
|
|
2479
|
+
status: "ready" | "starting" | "degraded" | "unreachable" | "stopped";
|
|
2480
|
+
};
|
|
2197
2481
|
pm2Available: boolean;
|
|
2198
2482
|
processName: string;
|
|
2199
2483
|
processes: Array<{
|
|
@@ -2207,6 +2491,45 @@ export type ChannelsRestartReturn = {
|
|
|
2207
2491
|
running: boolean;
|
|
2208
2492
|
status: string;
|
|
2209
2493
|
}>;
|
|
2494
|
+
runner?: ({
|
|
2495
|
+
adapters: Array<{
|
|
2496
|
+
channelId: string;
|
|
2497
|
+
connectedAt?: number;
|
|
2498
|
+
id: string;
|
|
2499
|
+
lastPongAt?: number;
|
|
2500
|
+
reason?: string;
|
|
2501
|
+
reconnectCount?: number;
|
|
2502
|
+
status: "disabled" | "starting" | "connected" | "degraded" | "reconnecting" | "disconnected" | "failed";
|
|
2503
|
+
}>;
|
|
2504
|
+
observedAt: number;
|
|
2505
|
+
outbound: {
|
|
2506
|
+
consumer: string;
|
|
2507
|
+
consuming: boolean;
|
|
2508
|
+
enabled: boolean;
|
|
2509
|
+
infrastructureReady: boolean;
|
|
2510
|
+
lastError?: {
|
|
2511
|
+
at: number;
|
|
2512
|
+
message: string;
|
|
2513
|
+
phase: "consume_loop";
|
|
2514
|
+
};
|
|
2515
|
+
lastMessageAt?: number;
|
|
2516
|
+
publishOutbox?: {
|
|
2517
|
+
lastError?: {
|
|
2518
|
+
at: number;
|
|
2519
|
+
message: string;
|
|
2520
|
+
};
|
|
2521
|
+
lastPublishedAt?: number;
|
|
2522
|
+
nextAttemptAt?: number;
|
|
2523
|
+
oldestPendingAt?: number;
|
|
2524
|
+
pendingCount: number;
|
|
2525
|
+
};
|
|
2526
|
+
stream: string;
|
|
2527
|
+
};
|
|
2528
|
+
pid: number;
|
|
2529
|
+
running: boolean;
|
|
2530
|
+
schemaVersion: 1;
|
|
2531
|
+
startedAt: number | null;
|
|
2532
|
+
}) | null;
|
|
2210
2533
|
};
|
|
2211
2534
|
target?: {
|
|
2212
2535
|
bundlePath: string;
|
|
@@ -2276,6 +2599,12 @@ export type ChannelsStartReturn = {
|
|
|
2276
2599
|
running: boolean;
|
|
2277
2600
|
status: string;
|
|
2278
2601
|
};
|
|
2602
|
+
health?: {
|
|
2603
|
+
checkedAt: number;
|
|
2604
|
+
reachable: boolean;
|
|
2605
|
+
reason?: string;
|
|
2606
|
+
status: "ready" | "starting" | "degraded" | "unreachable" | "stopped";
|
|
2607
|
+
};
|
|
2279
2608
|
pm2Available: boolean;
|
|
2280
2609
|
processName: string;
|
|
2281
2610
|
processes: Array<{
|
|
@@ -2289,6 +2618,45 @@ export type ChannelsStartReturn = {
|
|
|
2289
2618
|
running: boolean;
|
|
2290
2619
|
status: string;
|
|
2291
2620
|
}>;
|
|
2621
|
+
runner?: ({
|
|
2622
|
+
adapters: Array<{
|
|
2623
|
+
channelId: string;
|
|
2624
|
+
connectedAt?: number;
|
|
2625
|
+
id: string;
|
|
2626
|
+
lastPongAt?: number;
|
|
2627
|
+
reason?: string;
|
|
2628
|
+
reconnectCount?: number;
|
|
2629
|
+
status: "disabled" | "starting" | "connected" | "degraded" | "reconnecting" | "disconnected" | "failed";
|
|
2630
|
+
}>;
|
|
2631
|
+
observedAt: number;
|
|
2632
|
+
outbound: {
|
|
2633
|
+
consumer: string;
|
|
2634
|
+
consuming: boolean;
|
|
2635
|
+
enabled: boolean;
|
|
2636
|
+
infrastructureReady: boolean;
|
|
2637
|
+
lastError?: {
|
|
2638
|
+
at: number;
|
|
2639
|
+
message: string;
|
|
2640
|
+
phase: "consume_loop";
|
|
2641
|
+
};
|
|
2642
|
+
lastMessageAt?: number;
|
|
2643
|
+
publishOutbox?: {
|
|
2644
|
+
lastError?: {
|
|
2645
|
+
at: number;
|
|
2646
|
+
message: string;
|
|
2647
|
+
};
|
|
2648
|
+
lastPublishedAt?: number;
|
|
2649
|
+
nextAttemptAt?: number;
|
|
2650
|
+
oldestPendingAt?: number;
|
|
2651
|
+
pendingCount: number;
|
|
2652
|
+
};
|
|
2653
|
+
stream: string;
|
|
2654
|
+
};
|
|
2655
|
+
pid: number;
|
|
2656
|
+
running: boolean;
|
|
2657
|
+
schemaVersion: 1;
|
|
2658
|
+
startedAt: number | null;
|
|
2659
|
+
}) | null;
|
|
2292
2660
|
};
|
|
2293
2661
|
target?: {
|
|
2294
2662
|
bundlePath: string;
|
|
@@ -2311,6 +2679,12 @@ export type ChannelsStatusReturn = {
|
|
|
2311
2679
|
running: boolean;
|
|
2312
2680
|
status: string;
|
|
2313
2681
|
};
|
|
2682
|
+
health?: {
|
|
2683
|
+
checkedAt: number;
|
|
2684
|
+
reachable: boolean;
|
|
2685
|
+
reason?: string;
|
|
2686
|
+
status: "ready" | "starting" | "degraded" | "unreachable" | "stopped";
|
|
2687
|
+
};
|
|
2314
2688
|
pm2Available: boolean;
|
|
2315
2689
|
processName: string;
|
|
2316
2690
|
processes: Array<{
|
|
@@ -2324,6 +2698,45 @@ export type ChannelsStatusReturn = {
|
|
|
2324
2698
|
running: boolean;
|
|
2325
2699
|
status: string;
|
|
2326
2700
|
}>;
|
|
2701
|
+
runner?: ({
|
|
2702
|
+
adapters: Array<{
|
|
2703
|
+
channelId: string;
|
|
2704
|
+
connectedAt?: number;
|
|
2705
|
+
id: string;
|
|
2706
|
+
lastPongAt?: number;
|
|
2707
|
+
reason?: string;
|
|
2708
|
+
reconnectCount?: number;
|
|
2709
|
+
status: "disabled" | "starting" | "connected" | "degraded" | "reconnecting" | "disconnected" | "failed";
|
|
2710
|
+
}>;
|
|
2711
|
+
observedAt: number;
|
|
2712
|
+
outbound: {
|
|
2713
|
+
consumer: string;
|
|
2714
|
+
consuming: boolean;
|
|
2715
|
+
enabled: boolean;
|
|
2716
|
+
infrastructureReady: boolean;
|
|
2717
|
+
lastError?: {
|
|
2718
|
+
at: number;
|
|
2719
|
+
message: string;
|
|
2720
|
+
phase: "consume_loop";
|
|
2721
|
+
};
|
|
2722
|
+
lastMessageAt?: number;
|
|
2723
|
+
publishOutbox?: {
|
|
2724
|
+
lastError?: {
|
|
2725
|
+
at: number;
|
|
2726
|
+
message: string;
|
|
2727
|
+
};
|
|
2728
|
+
lastPublishedAt?: number;
|
|
2729
|
+
nextAttemptAt?: number;
|
|
2730
|
+
oldestPendingAt?: number;
|
|
2731
|
+
pendingCount: number;
|
|
2732
|
+
};
|
|
2733
|
+
stream: string;
|
|
2734
|
+
};
|
|
2735
|
+
pid: number;
|
|
2736
|
+
running: boolean;
|
|
2737
|
+
schemaVersion: 1;
|
|
2738
|
+
startedAt: number | null;
|
|
2739
|
+
}) | null;
|
|
2327
2740
|
};
|
|
2328
2741
|
/** Input shape for `channels.stop`. */
|
|
2329
2742
|
export type ChannelsStopInput = Record<string, never>;
|
|
@@ -2349,6 +2762,12 @@ export type ChannelsStopReturn = {
|
|
|
2349
2762
|
running: boolean;
|
|
2350
2763
|
status: string;
|
|
2351
2764
|
};
|
|
2765
|
+
health?: {
|
|
2766
|
+
checkedAt: number;
|
|
2767
|
+
reachable: boolean;
|
|
2768
|
+
reason?: string;
|
|
2769
|
+
status: "ready" | "starting" | "degraded" | "unreachable" | "stopped";
|
|
2770
|
+
};
|
|
2352
2771
|
pm2Available: boolean;
|
|
2353
2772
|
processName: string;
|
|
2354
2773
|
processes: Array<{
|
|
@@ -2362,6 +2781,45 @@ export type ChannelsStopReturn = {
|
|
|
2362
2781
|
running: boolean;
|
|
2363
2782
|
status: string;
|
|
2364
2783
|
}>;
|
|
2784
|
+
runner?: ({
|
|
2785
|
+
adapters: Array<{
|
|
2786
|
+
channelId: string;
|
|
2787
|
+
connectedAt?: number;
|
|
2788
|
+
id: string;
|
|
2789
|
+
lastPongAt?: number;
|
|
2790
|
+
reason?: string;
|
|
2791
|
+
reconnectCount?: number;
|
|
2792
|
+
status: "disabled" | "starting" | "connected" | "degraded" | "reconnecting" | "disconnected" | "failed";
|
|
2793
|
+
}>;
|
|
2794
|
+
observedAt: number;
|
|
2795
|
+
outbound: {
|
|
2796
|
+
consumer: string;
|
|
2797
|
+
consuming: boolean;
|
|
2798
|
+
enabled: boolean;
|
|
2799
|
+
infrastructureReady: boolean;
|
|
2800
|
+
lastError?: {
|
|
2801
|
+
at: number;
|
|
2802
|
+
message: string;
|
|
2803
|
+
phase: "consume_loop";
|
|
2804
|
+
};
|
|
2805
|
+
lastMessageAt?: number;
|
|
2806
|
+
publishOutbox?: {
|
|
2807
|
+
lastError?: {
|
|
2808
|
+
at: number;
|
|
2809
|
+
message: string;
|
|
2810
|
+
};
|
|
2811
|
+
lastPublishedAt?: number;
|
|
2812
|
+
nextAttemptAt?: number;
|
|
2813
|
+
oldestPendingAt?: number;
|
|
2814
|
+
pendingCount: number;
|
|
2815
|
+
};
|
|
2816
|
+
stream: string;
|
|
2817
|
+
};
|
|
2818
|
+
pid: number;
|
|
2819
|
+
running: boolean;
|
|
2820
|
+
schemaVersion: 1;
|
|
2821
|
+
startedAt: number | null;
|
|
2822
|
+
}) | null;
|
|
2365
2823
|
};
|
|
2366
2824
|
target?: {
|
|
2367
2825
|
bundlePath: string;
|
|
@@ -2377,6 +2835,35 @@ export type ChatsBackfillProviderTimestampsInput = {
|
|
|
2377
2835
|
};
|
|
2378
2836
|
/** Return shape for `chats.backfill-provider-timestamps`. */
|
|
2379
2837
|
export type ChatsBackfillProviderTimestampsReturn = Record<string, unknown>;
|
|
2838
|
+
/** Input shape for `chats.ensure`. */
|
|
2839
|
+
export type ChatsEnsureInput = {
|
|
2840
|
+
actorId: string;
|
|
2841
|
+
agentId: string;
|
|
2842
|
+
clientRequestId: string;
|
|
2843
|
+
};
|
|
2844
|
+
/** Return shape for `chats.ensure`. */
|
|
2845
|
+
export type ChatsEnsureReturn = {
|
|
2846
|
+
chat: {
|
|
2847
|
+
actorId: string;
|
|
2848
|
+
agentId: string;
|
|
2849
|
+
avatarUrl?: string;
|
|
2850
|
+
channel: string;
|
|
2851
|
+
chatType: "dm" | "group" | "room" | "thread" | "channel" | "unknown";
|
|
2852
|
+
createdAt: number;
|
|
2853
|
+
firstSeenAt: number;
|
|
2854
|
+
id: string;
|
|
2855
|
+
instanceId: string;
|
|
2856
|
+
lastSeenAt: number;
|
|
2857
|
+
metadata?: Record<string, unknown>;
|
|
2858
|
+
normalizedChatId?: string;
|
|
2859
|
+
platformChatId?: string;
|
|
2860
|
+
rawProvenance?: Record<string, unknown>;
|
|
2861
|
+
title?: string;
|
|
2862
|
+
updatedAt: number;
|
|
2863
|
+
};
|
|
2864
|
+
clientRequestId: string;
|
|
2865
|
+
disposition: "created" | "existing";
|
|
2866
|
+
};
|
|
2380
2867
|
/** Input shape for `chats.list`. */
|
|
2381
2868
|
export type ChatsListInput = {
|
|
2382
2869
|
agent?: string;
|
|
@@ -2390,7 +2877,114 @@ export type ChatsListInput = {
|
|
|
2390
2877
|
type?: string;
|
|
2391
2878
|
};
|
|
2392
2879
|
/** Return shape for `chats.list`. */
|
|
2393
|
-
export type ChatsListReturn =
|
|
2880
|
+
export type ChatsListReturn = {
|
|
2881
|
+
chats: Array<{
|
|
2882
|
+
chat: {
|
|
2883
|
+
actorId?: string;
|
|
2884
|
+
agentId?: string;
|
|
2885
|
+
avatarUrl?: string;
|
|
2886
|
+
channel: string;
|
|
2887
|
+
chatType: "dm" | "group" | "room" | "thread" | "channel" | "unknown";
|
|
2888
|
+
createdAt: number;
|
|
2889
|
+
firstSeenAt: number;
|
|
2890
|
+
id: string;
|
|
2891
|
+
instanceId: string;
|
|
2892
|
+
lastSeenAt: number;
|
|
2893
|
+
metadata?: Record<string, unknown>;
|
|
2894
|
+
normalizedChatId?: string;
|
|
2895
|
+
platformChatId?: string;
|
|
2896
|
+
rawProvenance?: Record<string, unknown>;
|
|
2897
|
+
title?: string;
|
|
2898
|
+
updatedAt: number;
|
|
2899
|
+
};
|
|
2900
|
+
lastMessage: ({
|
|
2901
|
+
actorId?: string;
|
|
2902
|
+
actorType: string;
|
|
2903
|
+
agentId?: string;
|
|
2904
|
+
channel?: string;
|
|
2905
|
+
chatId: string;
|
|
2906
|
+
clientMessageId?: string;
|
|
2907
|
+
contactId?: string;
|
|
2908
|
+
content?: Record<string, unknown>;
|
|
2909
|
+
createdAt: number;
|
|
2910
|
+
id: string;
|
|
2911
|
+
ingestedAt: number;
|
|
2912
|
+
instanceId?: string;
|
|
2913
|
+
messageType?: string;
|
|
2914
|
+
normalizedSenderId?: string;
|
|
2915
|
+
platformIdentityId?: string;
|
|
2916
|
+
providerMessageId?: string;
|
|
2917
|
+
providerTimestamp?: number;
|
|
2918
|
+
rawChatId?: string;
|
|
2919
|
+
rawProvenance?: Record<string, unknown>;
|
|
2920
|
+
rawSenderId?: string;
|
|
2921
|
+
revision?: number;
|
|
2922
|
+
sortKey: string;
|
|
2923
|
+
state?: string;
|
|
2924
|
+
updatedAt: number;
|
|
2925
|
+
}) | null;
|
|
2926
|
+
messageCount: number;
|
|
2927
|
+
participantCount: number;
|
|
2928
|
+
}>;
|
|
2929
|
+
items: Array<{
|
|
2930
|
+
chat: {
|
|
2931
|
+
actorId?: string;
|
|
2932
|
+
agentId?: string;
|
|
2933
|
+
avatarUrl?: string;
|
|
2934
|
+
channel: string;
|
|
2935
|
+
chatType: "dm" | "group" | "room" | "thread" | "channel" | "unknown";
|
|
2936
|
+
createdAt: number;
|
|
2937
|
+
firstSeenAt: number;
|
|
2938
|
+
id: string;
|
|
2939
|
+
instanceId: string;
|
|
2940
|
+
lastSeenAt: number;
|
|
2941
|
+
metadata?: Record<string, unknown>;
|
|
2942
|
+
normalizedChatId?: string;
|
|
2943
|
+
platformChatId?: string;
|
|
2944
|
+
rawProvenance?: Record<string, unknown>;
|
|
2945
|
+
title?: string;
|
|
2946
|
+
updatedAt: number;
|
|
2947
|
+
};
|
|
2948
|
+
lastMessage: ({
|
|
2949
|
+
actorId?: string;
|
|
2950
|
+
actorType: string;
|
|
2951
|
+
agentId?: string;
|
|
2952
|
+
channel?: string;
|
|
2953
|
+
chatId: string;
|
|
2954
|
+
clientMessageId?: string;
|
|
2955
|
+
contactId?: string;
|
|
2956
|
+
content?: Record<string, unknown>;
|
|
2957
|
+
createdAt: number;
|
|
2958
|
+
id: string;
|
|
2959
|
+
ingestedAt: number;
|
|
2960
|
+
instanceId?: string;
|
|
2961
|
+
messageType?: string;
|
|
2962
|
+
normalizedSenderId?: string;
|
|
2963
|
+
platformIdentityId?: string;
|
|
2964
|
+
providerMessageId?: string;
|
|
2965
|
+
providerTimestamp?: number;
|
|
2966
|
+
rawChatId?: string;
|
|
2967
|
+
rawProvenance?: Record<string, unknown>;
|
|
2968
|
+
rawSenderId?: string;
|
|
2969
|
+
revision?: number;
|
|
2970
|
+
sortKey: string;
|
|
2971
|
+
state?: string;
|
|
2972
|
+
updatedAt: number;
|
|
2973
|
+
}) | null;
|
|
2974
|
+
messageCount: number;
|
|
2975
|
+
participantCount: number;
|
|
2976
|
+
}>;
|
|
2977
|
+
pagination: {
|
|
2978
|
+
hasMore?: boolean;
|
|
2979
|
+
limit: number;
|
|
2980
|
+
nextCommand?: string | null;
|
|
2981
|
+
nextOffset?: number | null;
|
|
2982
|
+
offset: number;
|
|
2983
|
+
returned: number;
|
|
2984
|
+
total: number;
|
|
2985
|
+
};
|
|
2986
|
+
total: number;
|
|
2987
|
+
};
|
|
2394
2988
|
/** Input shape for `chats.lists.add`. */
|
|
2395
2989
|
export type ChatsListsAddInput = {
|
|
2396
2990
|
channel?: string;
|
|
@@ -2621,6 +3215,45 @@ export type ChatsListsShowReturn = {
|
|
|
2621
3215
|
valid: boolean;
|
|
2622
3216
|
};
|
|
2623
3217
|
};
|
|
3218
|
+
/** Input shape for `chats.messages.create`. */
|
|
3219
|
+
export type ChatsMessagesCreateInput = {
|
|
3220
|
+
actorId: string;
|
|
3221
|
+
chatId: string;
|
|
3222
|
+
clientMessageId: string;
|
|
3223
|
+
content: string;
|
|
3224
|
+
};
|
|
3225
|
+
/** Return shape for `chats.messages.create`. */
|
|
3226
|
+
export type ChatsMessagesCreateReturn = {
|
|
3227
|
+
clientMessageId: string;
|
|
3228
|
+
disposition: "created" | "duplicate";
|
|
3229
|
+
message: {
|
|
3230
|
+
actorId: string;
|
|
3231
|
+
actorType: "actor";
|
|
3232
|
+
agentId?: string;
|
|
3233
|
+
channel?: string;
|
|
3234
|
+
chatId: string;
|
|
3235
|
+
clientMessageId: string;
|
|
3236
|
+
contactId?: string;
|
|
3237
|
+
content: Record<string, unknown>;
|
|
3238
|
+
createdAt: number;
|
|
3239
|
+
id: string;
|
|
3240
|
+
ingestedAt: number;
|
|
3241
|
+
instanceId?: string;
|
|
3242
|
+
messageType?: string;
|
|
3243
|
+
normalizedSenderId?: string;
|
|
3244
|
+
platformIdentityId?: string;
|
|
3245
|
+
providerMessageId?: string;
|
|
3246
|
+
providerTimestamp?: number;
|
|
3247
|
+
rawChatId?: string;
|
|
3248
|
+
rawProvenance?: Record<string, unknown>;
|
|
3249
|
+
rawSenderId?: string;
|
|
3250
|
+
revision: 1;
|
|
3251
|
+
sortKey: string;
|
|
3252
|
+
state: "created";
|
|
3253
|
+
updatedAt: number;
|
|
3254
|
+
};
|
|
3255
|
+
messageId: string;
|
|
3256
|
+
};
|
|
2624
3257
|
/** Input shape for `chats.read`. */
|
|
2625
3258
|
export type ChatsReadInput = {
|
|
2626
3259
|
channel?: string;
|
|
@@ -2633,7 +3266,62 @@ export type ChatsReadInput = {
|
|
|
2633
3266
|
type?: string;
|
|
2634
3267
|
};
|
|
2635
3268
|
/** Return shape for `chats.read`. */
|
|
2636
|
-
export type ChatsReadReturn =
|
|
3269
|
+
export type ChatsReadReturn = {
|
|
3270
|
+
chat: {
|
|
3271
|
+
actorId?: string;
|
|
3272
|
+
agentId?: string;
|
|
3273
|
+
avatarUrl?: string;
|
|
3274
|
+
channel: string;
|
|
3275
|
+
chatType: "dm" | "group" | "room" | "thread" | "channel" | "unknown";
|
|
3276
|
+
createdAt: number;
|
|
3277
|
+
firstSeenAt: number;
|
|
3278
|
+
id: string;
|
|
3279
|
+
instanceId: string;
|
|
3280
|
+
lastSeenAt: number;
|
|
3281
|
+
metadata?: Record<string, unknown>;
|
|
3282
|
+
normalizedChatId?: string;
|
|
3283
|
+
platformChatId?: string;
|
|
3284
|
+
rawProvenance?: Record<string, unknown>;
|
|
3285
|
+
title?: string;
|
|
3286
|
+
updatedAt: number;
|
|
3287
|
+
};
|
|
3288
|
+
messages: Array<{
|
|
3289
|
+
actorId?: string;
|
|
3290
|
+
actorType: string;
|
|
3291
|
+
agentId?: string;
|
|
3292
|
+
channel?: string;
|
|
3293
|
+
chatId: string;
|
|
3294
|
+
clientMessageId?: string;
|
|
3295
|
+
contactId?: string;
|
|
3296
|
+
content?: Record<string, unknown>;
|
|
3297
|
+
createdAt: number;
|
|
3298
|
+
id: string;
|
|
3299
|
+
ingestedAt: number;
|
|
3300
|
+
instanceId?: string;
|
|
3301
|
+
messageType?: string;
|
|
3302
|
+
normalizedSenderId?: string;
|
|
3303
|
+
platformIdentityId?: string;
|
|
3304
|
+
providerMessageId?: string;
|
|
3305
|
+
providerTimestamp?: number;
|
|
3306
|
+
rawChatId?: string;
|
|
3307
|
+
rawProvenance?: Record<string, unknown>;
|
|
3308
|
+
rawSenderId?: string;
|
|
3309
|
+
revision?: number;
|
|
3310
|
+
sortKey: string;
|
|
3311
|
+
state?: string;
|
|
3312
|
+
updatedAt: number;
|
|
3313
|
+
}>;
|
|
3314
|
+
pagination: {
|
|
3315
|
+
hasMore?: boolean;
|
|
3316
|
+
limit: number;
|
|
3317
|
+
nextCommand?: string | null;
|
|
3318
|
+
nextOffset?: number | null;
|
|
3319
|
+
offset: number;
|
|
3320
|
+
returned: number;
|
|
3321
|
+
total: number;
|
|
3322
|
+
};
|
|
3323
|
+
total: number;
|
|
3324
|
+
};
|
|
2637
3325
|
/** Input shape for `cloud.projects.create`. */
|
|
2638
3326
|
export type CloudProjectsCreateInput = {
|
|
2639
3327
|
console?: string;
|
|
@@ -4828,6 +5516,7 @@ export type CronAddInput = {
|
|
|
4828
5516
|
envFile?: string;
|
|
4829
5517
|
every?: string;
|
|
4830
5518
|
exec?: string;
|
|
5519
|
+
idempotencyKey?: string;
|
|
4831
5520
|
isolated?: boolean;
|
|
4832
5521
|
message?: string;
|
|
4833
5522
|
name: string;
|
|
@@ -7619,14 +8308,18 @@ export type ObserversProfilesValidateReturn = {
|
|
|
7619
8308
|
};
|
|
7620
8309
|
/** Input shape for `observers.refresh`. */
|
|
7621
8310
|
export type ObserversRefreshInput = {
|
|
8311
|
+
reconcile?: string;
|
|
7622
8312
|
session: string;
|
|
7623
8313
|
};
|
|
7624
8314
|
/** Return shape for `observers.refresh`. */
|
|
7625
8315
|
export type ObserversRefreshReturn = {
|
|
7626
8316
|
bindings: Array<Record<string, unknown>>;
|
|
7627
8317
|
created: Array<Record<string, unknown>>;
|
|
8318
|
+
disabled: Array<Record<string, unknown>>;
|
|
8319
|
+
mode: "attach-missing" | "detach-disabled" | "refresh-profile" | "full-reconcile";
|
|
8320
|
+
refreshedProfiles: Array<Record<string, unknown>>;
|
|
7628
8321
|
skipped: Array<Record<string, unknown>>;
|
|
7629
|
-
source: Record<string, unknown
|
|
8322
|
+
source: (Record<string, unknown>) | null;
|
|
7630
8323
|
total: number;
|
|
7631
8324
|
[k: string]: unknown;
|
|
7632
8325
|
};
|
|
@@ -7709,6 +8402,7 @@ export type ObserversRulesSetInput = {
|
|
|
7709
8402
|
provider?: string;
|
|
7710
8403
|
role?: string;
|
|
7711
8404
|
scope?: string;
|
|
8405
|
+
selector?: string;
|
|
7712
8406
|
sourceAgent?: string;
|
|
7713
8407
|
sourceProfile?: string;
|
|
7714
8408
|
sourceProject?: string;
|
|
@@ -8707,17 +9401,24 @@ export type ReactSendReturn = {
|
|
|
8707
9401
|
messageId: string;
|
|
8708
9402
|
[k: string]: unknown;
|
|
8709
9403
|
};
|
|
9404
|
+
executionMode: "durable" | "legacy";
|
|
9405
|
+
idempotencyKey?: string;
|
|
9406
|
+
nextAttemptAt?: number;
|
|
9407
|
+
publishPending?: boolean;
|
|
9408
|
+
publishedNow?: boolean;
|
|
9409
|
+
queued: boolean;
|
|
8710
9410
|
reaction: {
|
|
8711
9411
|
emoji: string;
|
|
8712
9412
|
messageId: string;
|
|
8713
9413
|
};
|
|
8714
|
-
|
|
9414
|
+
requestId?: string;
|
|
9415
|
+
status: "queued" | "accepted";
|
|
8715
9416
|
target: {
|
|
8716
9417
|
accountId: string;
|
|
8717
9418
|
channel: string;
|
|
8718
9419
|
chatId: string;
|
|
8719
9420
|
};
|
|
8720
|
-
topic:
|
|
9421
|
+
topic: string;
|
|
8721
9422
|
};
|
|
8722
9423
|
/** Input shape for `routes.explain`. */
|
|
8723
9424
|
export type RoutesExplainInput = {
|