@sixb/server 0.2.5 → 0.2.6
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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +525 -61
- package/dist/index.js.map +19 -18
- package/dist/registerRoutes.d.ts +1 -0
- package/dist/registerRoutes.d.ts.map +1 -1
- package/dist/routes/agent-approvals.d.ts +22 -0
- package/dist/routes/agent-approvals.d.ts.map +1 -1
- package/dist/routes/agent-computers.d.ts +36 -0
- package/dist/routes/agent-computers.d.ts.map +1 -1
- package/dist/routes/agent-thread-reads.d.ts +82 -0
- package/dist/routes/agent-thread-reads.d.ts.map +1 -0
- package/dist/routes/agents.d.ts +783 -1
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/ai-accounting.d.ts.map +1 -1
- package/dist/routes/model-generations.d.ts +6 -0
- package/dist/routes/model-generations.d.ts.map +1 -1
- package/dist/routes/observed-agent-threads.d.ts +22 -0
- package/dist/routes/observed-agent-threads.d.ts.map +1 -1
- package/dist/routes/status.d.ts +4 -1
- package/dist/routes/status.d.ts.map +1 -1
- package/dist/routes/syncs.d.ts +175 -12
- package/dist/routes/syncs.d.ts.map +1 -1
- package/dist/routes/workflows.d.ts +6 -6
- package/dist/routes/ws/agents.d.ts.map +1 -1
- package/dist/schemas/activity.d.ts +4 -4
- package/dist/schemas/agents.d.ts +2602 -6
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/ai-accounting.d.ts +3 -0
- package/dist/schemas/ai-accounting.d.ts.map +1 -1
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/models.d.ts +46 -0
- package/dist/schemas/models.d.ts.map +1 -1
- package/dist/schemas/syncs.d.ts +724 -25
- package/dist/schemas/syncs.d.ts.map +1 -1
- package/dist/schemas/workflows.d.ts +22 -22
- package/dist/server.d.ts +16 -1
- package/dist/server.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +6 -1
- package/src/registerRoutes.ts +4 -1
- package/src/routes/agent-computers.ts +7 -6
- package/src/routes/agent-thread-reads.ts +67 -0
- package/src/routes/agents.ts +129 -16
- package/src/routes/ai-accounting.ts +1 -0
- package/src/routes/model-generations.ts +1 -1
- package/src/routes/observed-agent-threads.ts +3 -4
- package/src/routes/status.ts +18 -1
- package/src/routes/syncs.ts +135 -8
- package/src/routes/ws/agents.ts +43 -3
- package/src/schemas/agents.ts +80 -10
- package/src/schemas/ai-accounting.ts +12 -0
- package/src/schemas/common.ts +15 -9
- package/src/schemas/models.ts +10 -0
- package/src/schemas/syncs.ts +63 -1
- package/src/server.ts +205 -13
package/dist/routes/agents.d.ts
CHANGED
|
@@ -14,7 +14,13 @@ export declare function serializeThread(host: SixbHostView, thread: AgentThreadV
|
|
|
14
14
|
/** Whether a reported background command is the one `ref` names: by its start, as ids repeat. */
|
|
15
15
|
export declare function sameBackgroundCommand(command: AgentBackgroundCommandRef, ref: AgentBackgroundCommandRef): boolean;
|
|
16
16
|
export declare function serializeAgentInboxItem(item: AgentInboxItemRecord): ReturnType<typeof AgentInboxItemSchema.parse>;
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* A run as the API returns it. `ownerReads`: its thread's owner reads it, and alone sees the folder
|
|
19
|
+
* on their computer it runs in, as with the thread's own `computer`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function serializeAgentRun(run: AgentRunView, { ownerReads }?: {
|
|
22
|
+
readonly ownerReads?: boolean;
|
|
23
|
+
}): ReturnType<typeof AgentRunSchema.parse>;
|
|
18
24
|
export declare function handleAgentRouteError(error: unknown, set: {
|
|
19
25
|
status?: number | string;
|
|
20
26
|
headers?: unknown;
|
|
@@ -238,6 +244,13 @@ export declare function serializeThreadRead(host: SixbHostView, sixb: ReturnType
|
|
|
238
244
|
activeRunId: string | null;
|
|
239
245
|
messageCount: number;
|
|
240
246
|
updatedAt: string;
|
|
247
|
+
read?: {
|
|
248
|
+
threadId: string;
|
|
249
|
+
throughSeq: number;
|
|
250
|
+
headSeq: number;
|
|
251
|
+
unread: number;
|
|
252
|
+
readAt?: string | undefined;
|
|
253
|
+
} | undefined;
|
|
241
254
|
title?: string | undefined;
|
|
242
255
|
computer?: {
|
|
243
256
|
id: string;
|
|
@@ -269,6 +282,17 @@ export declare function serializeThreadRead(host: SixbHostView, sixb: ReturnType
|
|
|
269
282
|
}[] | undefined;
|
|
270
283
|
movedAt?: string | undefined;
|
|
271
284
|
lastMessageAt?: string | undefined;
|
|
285
|
+
lastRun?: {
|
|
286
|
+
status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
|
|
287
|
+
id: string;
|
|
288
|
+
requestedBy?: {
|
|
289
|
+
id: string;
|
|
290
|
+
type: "user" | "serviceAccount";
|
|
291
|
+
} | undefined;
|
|
292
|
+
completedAt?: string | undefined;
|
|
293
|
+
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
294
|
+
errorCode?: "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | undefined;
|
|
295
|
+
} | undefined;
|
|
272
296
|
}>;
|
|
273
297
|
export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
|
|
274
298
|
decorator: {};
|
|
@@ -365,6 +389,13 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
365
389
|
activeRunId: string | null;
|
|
366
390
|
messageCount: number;
|
|
367
391
|
updatedAt: string;
|
|
392
|
+
read?: {
|
|
393
|
+
threadId: string;
|
|
394
|
+
throughSeq: number;
|
|
395
|
+
headSeq: number;
|
|
396
|
+
unread: number;
|
|
397
|
+
readAt?: string | undefined;
|
|
398
|
+
} | undefined;
|
|
368
399
|
title?: string | undefined;
|
|
369
400
|
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
370
401
|
approvalModeSource?: "default" | "thread" | "fallback" | "run" | undefined;
|
|
@@ -398,6 +429,17 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
398
429
|
}[] | undefined;
|
|
399
430
|
movedAt?: string | undefined;
|
|
400
431
|
lastMessageAt?: string | undefined;
|
|
432
|
+
lastRun?: {
|
|
433
|
+
status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
|
|
434
|
+
id: string;
|
|
435
|
+
requestedBy?: {
|
|
436
|
+
id: string;
|
|
437
|
+
type: "user" | "serviceAccount";
|
|
438
|
+
} | undefined;
|
|
439
|
+
completedAt?: string | undefined;
|
|
440
|
+
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
441
|
+
errorCode?: "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | undefined;
|
|
442
|
+
} | undefined;
|
|
401
443
|
}[];
|
|
402
444
|
};
|
|
403
445
|
400: {
|
|
@@ -469,6 +511,13 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
469
511
|
activeRunId: string | null;
|
|
470
512
|
messageCount: number;
|
|
471
513
|
updatedAt: string;
|
|
514
|
+
read?: {
|
|
515
|
+
threadId: string;
|
|
516
|
+
throughSeq: number;
|
|
517
|
+
headSeq: number;
|
|
518
|
+
unread: number;
|
|
519
|
+
readAt?: string | undefined;
|
|
520
|
+
} | undefined;
|
|
472
521
|
title?: string | undefined;
|
|
473
522
|
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
474
523
|
approvalModeSource?: "default" | "thread" | "fallback" | "run" | undefined;
|
|
@@ -502,6 +551,17 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
502
551
|
}[] | undefined;
|
|
503
552
|
movedAt?: string | undefined;
|
|
504
553
|
lastMessageAt?: string | undefined;
|
|
554
|
+
lastRun?: {
|
|
555
|
+
status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
|
|
556
|
+
id: string;
|
|
557
|
+
requestedBy?: {
|
|
558
|
+
id: string;
|
|
559
|
+
type: "user" | "serviceAccount";
|
|
560
|
+
} | undefined;
|
|
561
|
+
completedAt?: string | undefined;
|
|
562
|
+
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
563
|
+
errorCode?: "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | undefined;
|
|
564
|
+
} | undefined;
|
|
505
565
|
};
|
|
506
566
|
} | {
|
|
507
567
|
readonly error: string;
|
|
@@ -552,6 +612,13 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
552
612
|
activeRunId: string | null;
|
|
553
613
|
messageCount: number;
|
|
554
614
|
updatedAt: string;
|
|
615
|
+
read?: {
|
|
616
|
+
threadId: string;
|
|
617
|
+
throughSeq: number;
|
|
618
|
+
headSeq: number;
|
|
619
|
+
unread: number;
|
|
620
|
+
readAt?: string | undefined;
|
|
621
|
+
} | undefined;
|
|
555
622
|
title?: string | undefined;
|
|
556
623
|
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
557
624
|
approvalModeSource?: "default" | "thread" | "fallback" | "run" | undefined;
|
|
@@ -585,6 +652,17 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
585
652
|
}[] | undefined;
|
|
586
653
|
movedAt?: string | undefined;
|
|
587
654
|
lastMessageAt?: string | undefined;
|
|
655
|
+
lastRun?: {
|
|
656
|
+
status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
|
|
657
|
+
id: string;
|
|
658
|
+
requestedBy?: {
|
|
659
|
+
id: string;
|
|
660
|
+
type: "user" | "serviceAccount";
|
|
661
|
+
} | undefined;
|
|
662
|
+
completedAt?: string | undefined;
|
|
663
|
+
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
664
|
+
errorCode?: "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | undefined;
|
|
665
|
+
} | undefined;
|
|
588
666
|
};
|
|
589
667
|
};
|
|
590
668
|
422: {
|
|
@@ -642,6 +720,13 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
642
720
|
activeRunId: string | null;
|
|
643
721
|
messageCount: number;
|
|
644
722
|
updatedAt: string;
|
|
723
|
+
read?: {
|
|
724
|
+
threadId: string;
|
|
725
|
+
throughSeq: number;
|
|
726
|
+
headSeq: number;
|
|
727
|
+
unread: number;
|
|
728
|
+
readAt?: string | undefined;
|
|
729
|
+
} | undefined;
|
|
645
730
|
title?: string | undefined;
|
|
646
731
|
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
647
732
|
approvalModeSource?: "default" | "thread" | "fallback" | "run" | undefined;
|
|
@@ -675,6 +760,17 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
675
760
|
}[] | undefined;
|
|
676
761
|
movedAt?: string | undefined;
|
|
677
762
|
lastMessageAt?: string | undefined;
|
|
763
|
+
lastRun?: {
|
|
764
|
+
status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
|
|
765
|
+
id: string;
|
|
766
|
+
requestedBy?: {
|
|
767
|
+
id: string;
|
|
768
|
+
type: "user" | "serviceAccount";
|
|
769
|
+
} | undefined;
|
|
770
|
+
completedAt?: string | undefined;
|
|
771
|
+
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
772
|
+
errorCode?: "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | undefined;
|
|
773
|
+
} | undefined;
|
|
678
774
|
};
|
|
679
775
|
404: {
|
|
680
776
|
error: string;
|
|
@@ -749,6 +845,13 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
749
845
|
activeRunId: string | null;
|
|
750
846
|
messageCount: number;
|
|
751
847
|
updatedAt: string;
|
|
848
|
+
read?: {
|
|
849
|
+
threadId: string;
|
|
850
|
+
throughSeq: number;
|
|
851
|
+
headSeq: number;
|
|
852
|
+
unread: number;
|
|
853
|
+
readAt?: string | undefined;
|
|
854
|
+
} | undefined;
|
|
752
855
|
title?: string | undefined;
|
|
753
856
|
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
754
857
|
approvalModeSource?: "default" | "thread" | "fallback" | "run" | undefined;
|
|
@@ -782,6 +885,17 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
782
885
|
}[] | undefined;
|
|
783
886
|
movedAt?: string | undefined;
|
|
784
887
|
lastMessageAt?: string | undefined;
|
|
888
|
+
lastRun?: {
|
|
889
|
+
status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
|
|
890
|
+
id: string;
|
|
891
|
+
requestedBy?: {
|
|
892
|
+
id: string;
|
|
893
|
+
type: "user" | "serviceAccount";
|
|
894
|
+
} | undefined;
|
|
895
|
+
completedAt?: string | undefined;
|
|
896
|
+
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
897
|
+
errorCode?: "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | undefined;
|
|
898
|
+
} | undefined;
|
|
785
899
|
};
|
|
786
900
|
404: {
|
|
787
901
|
error: string;
|
|
@@ -910,6 +1024,13 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
910
1024
|
activeRunId: string | null;
|
|
911
1025
|
messageCount: number;
|
|
912
1026
|
updatedAt: string;
|
|
1027
|
+
read?: {
|
|
1028
|
+
threadId: string;
|
|
1029
|
+
throughSeq: number;
|
|
1030
|
+
headSeq: number;
|
|
1031
|
+
unread: number;
|
|
1032
|
+
readAt?: string | undefined;
|
|
1033
|
+
} | undefined;
|
|
913
1034
|
title?: string | undefined;
|
|
914
1035
|
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
915
1036
|
approvalModeSource?: "default" | "thread" | "fallback" | "run" | undefined;
|
|
@@ -943,6 +1064,17 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
943
1064
|
}[] | undefined;
|
|
944
1065
|
movedAt?: string | undefined;
|
|
945
1066
|
lastMessageAt?: string | undefined;
|
|
1067
|
+
lastRun?: {
|
|
1068
|
+
status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
|
|
1069
|
+
id: string;
|
|
1070
|
+
requestedBy?: {
|
|
1071
|
+
id: string;
|
|
1072
|
+
type: "user" | "serviceAccount";
|
|
1073
|
+
} | undefined;
|
|
1074
|
+
completedAt?: string | undefined;
|
|
1075
|
+
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
1076
|
+
errorCode?: "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | undefined;
|
|
1077
|
+
} | undefined;
|
|
946
1078
|
};
|
|
947
1079
|
} | {
|
|
948
1080
|
readonly error: string;
|
|
@@ -995,6 +1127,13 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
995
1127
|
activeRunId: string | null;
|
|
996
1128
|
messageCount: number;
|
|
997
1129
|
updatedAt: string;
|
|
1130
|
+
read?: {
|
|
1131
|
+
threadId: string;
|
|
1132
|
+
throughSeq: number;
|
|
1133
|
+
headSeq: number;
|
|
1134
|
+
unread: number;
|
|
1135
|
+
readAt?: string | undefined;
|
|
1136
|
+
} | undefined;
|
|
998
1137
|
title?: string | undefined;
|
|
999
1138
|
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
1000
1139
|
approvalModeSource?: "default" | "thread" | "fallback" | "run" | undefined;
|
|
@@ -1028,6 +1167,17 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
1028
1167
|
}[] | undefined;
|
|
1029
1168
|
movedAt?: string | undefined;
|
|
1030
1169
|
lastMessageAt?: string | undefined;
|
|
1170
|
+
lastRun?: {
|
|
1171
|
+
status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
|
|
1172
|
+
id: string;
|
|
1173
|
+
requestedBy?: {
|
|
1174
|
+
id: string;
|
|
1175
|
+
type: "user" | "serviceAccount";
|
|
1176
|
+
} | undefined;
|
|
1177
|
+
completedAt?: string | undefined;
|
|
1178
|
+
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
1179
|
+
errorCode?: "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | undefined;
|
|
1180
|
+
} | undefined;
|
|
1031
1181
|
};
|
|
1032
1182
|
};
|
|
1033
1183
|
422: {
|
|
@@ -1091,6 +1241,13 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
1091
1241
|
activeRunId: string | null;
|
|
1092
1242
|
messageCount: number;
|
|
1093
1243
|
updatedAt: string;
|
|
1244
|
+
read?: {
|
|
1245
|
+
threadId: string;
|
|
1246
|
+
throughSeq: number;
|
|
1247
|
+
headSeq: number;
|
|
1248
|
+
unread: number;
|
|
1249
|
+
readAt?: string | undefined;
|
|
1250
|
+
} | undefined;
|
|
1094
1251
|
title?: string | undefined;
|
|
1095
1252
|
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
1096
1253
|
approvalModeSource?: "default" | "thread" | "fallback" | "run" | undefined;
|
|
@@ -1124,6 +1281,17 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
1124
1281
|
}[] | undefined;
|
|
1125
1282
|
movedAt?: string | undefined;
|
|
1126
1283
|
lastMessageAt?: string | undefined;
|
|
1284
|
+
lastRun?: {
|
|
1285
|
+
status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
|
|
1286
|
+
id: string;
|
|
1287
|
+
requestedBy?: {
|
|
1288
|
+
id: string;
|
|
1289
|
+
type: "user" | "serviceAccount";
|
|
1290
|
+
} | undefined;
|
|
1291
|
+
completedAt?: string | undefined;
|
|
1292
|
+
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
1293
|
+
errorCode?: "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | undefined;
|
|
1294
|
+
} | undefined;
|
|
1127
1295
|
};
|
|
1128
1296
|
404: {
|
|
1129
1297
|
error: string;
|
|
@@ -1201,6 +1369,13 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
1201
1369
|
activeRunId: string | null;
|
|
1202
1370
|
messageCount: number;
|
|
1203
1371
|
updatedAt: string;
|
|
1372
|
+
read?: {
|
|
1373
|
+
threadId: string;
|
|
1374
|
+
throughSeq: number;
|
|
1375
|
+
headSeq: number;
|
|
1376
|
+
unread: number;
|
|
1377
|
+
readAt?: string | undefined;
|
|
1378
|
+
} | undefined;
|
|
1204
1379
|
title?: string | undefined;
|
|
1205
1380
|
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
1206
1381
|
approvalModeSource?: "default" | "thread" | "fallback" | "run" | undefined;
|
|
@@ -1234,6 +1409,17 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
1234
1409
|
}[] | undefined;
|
|
1235
1410
|
movedAt?: string | undefined;
|
|
1236
1411
|
lastMessageAt?: string | undefined;
|
|
1412
|
+
lastRun?: {
|
|
1413
|
+
status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
|
|
1414
|
+
id: string;
|
|
1415
|
+
requestedBy?: {
|
|
1416
|
+
id: string;
|
|
1417
|
+
type: "user" | "serviceAccount";
|
|
1418
|
+
} | undefined;
|
|
1419
|
+
completedAt?: string | undefined;
|
|
1420
|
+
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
1421
|
+
errorCode?: "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | undefined;
|
|
1422
|
+
} | undefined;
|
|
1237
1423
|
};
|
|
1238
1424
|
404: {
|
|
1239
1425
|
error: string;
|
|
@@ -1665,6 +1851,10 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
1665
1851
|
} | undefined;
|
|
1666
1852
|
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
1667
1853
|
parentRunId?: string | undefined;
|
|
1854
|
+
computer?: {
|
|
1855
|
+
id: string;
|
|
1856
|
+
folder: string;
|
|
1857
|
+
} | undefined;
|
|
1668
1858
|
runsOn?: "computer" | undefined;
|
|
1669
1859
|
diagnostics?: {
|
|
1670
1860
|
code: "step_limit_reached" | "output_limit_reached";
|
|
@@ -1828,6 +2018,7 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
1828
2018
|
} | undefined;
|
|
1829
2019
|
} | undefined;
|
|
1830
2020
|
immediate?: boolean | undefined;
|
|
2021
|
+
replacesMessageId?: string | undefined;
|
|
1831
2022
|
} | undefined;
|
|
1832
2023
|
} | {
|
|
1833
2024
|
readonly error: string;
|
|
@@ -1916,6 +2107,10 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
1916
2107
|
} | undefined;
|
|
1917
2108
|
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
1918
2109
|
parentRunId?: string | undefined;
|
|
2110
|
+
computer?: {
|
|
2111
|
+
id: string;
|
|
2112
|
+
folder: string;
|
|
2113
|
+
} | undefined;
|
|
1919
2114
|
runsOn?: "computer" | undefined;
|
|
1920
2115
|
diagnostics?: {
|
|
1921
2116
|
code: "step_limit_reached" | "output_limit_reached";
|
|
@@ -2079,6 +2274,7 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
2079
2274
|
} | undefined;
|
|
2080
2275
|
} | undefined;
|
|
2081
2276
|
immediate?: boolean | undefined;
|
|
2277
|
+
replacesMessageId?: string | undefined;
|
|
2082
2278
|
} | undefined;
|
|
2083
2279
|
};
|
|
2084
2280
|
422: {
|
|
@@ -2265,6 +2461,7 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
2265
2461
|
} | undefined;
|
|
2266
2462
|
} | undefined;
|
|
2267
2463
|
immediate?: boolean | undefined;
|
|
2464
|
+
replacesMessageId?: string | undefined;
|
|
2268
2465
|
}[];
|
|
2269
2466
|
};
|
|
2270
2467
|
404: {
|
|
@@ -2475,6 +2672,7 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
2475
2672
|
} | undefined;
|
|
2476
2673
|
} | undefined;
|
|
2477
2674
|
immediate?: boolean | undefined;
|
|
2675
|
+
replacesMessageId?: string | undefined;
|
|
2478
2676
|
};
|
|
2479
2677
|
};
|
|
2480
2678
|
404: {
|
|
@@ -2561,6 +2759,558 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
2561
2759
|
};
|
|
2562
2760
|
};
|
|
2563
2761
|
};
|
|
2762
|
+
} & {
|
|
2763
|
+
api: {
|
|
2764
|
+
"agent-threads": {
|
|
2765
|
+
":threadId": {
|
|
2766
|
+
messages: {
|
|
2767
|
+
":messageId": {
|
|
2768
|
+
edit: {
|
|
2769
|
+
post: {
|
|
2770
|
+
body: {
|
|
2771
|
+
model?: {
|
|
2772
|
+
modelId: string;
|
|
2773
|
+
provider: string;
|
|
2774
|
+
} | undefined;
|
|
2775
|
+
locale?: string | undefined;
|
|
2776
|
+
timeZone?: string | undefined;
|
|
2777
|
+
context?: {
|
|
2778
|
+
origin: "ambient" | "explicit";
|
|
2779
|
+
context: {
|
|
2780
|
+
kind: "object";
|
|
2781
|
+
ref: {
|
|
2782
|
+
objectTypeId: string;
|
|
2783
|
+
primaryId: string;
|
|
2784
|
+
};
|
|
2785
|
+
label?: string | undefined;
|
|
2786
|
+
} | {
|
|
2787
|
+
id: string;
|
|
2788
|
+
kind: "app-state";
|
|
2789
|
+
value: import("../schemas/common").JsonValue;
|
|
2790
|
+
description: string;
|
|
2791
|
+
label: string;
|
|
2792
|
+
};
|
|
2793
|
+
}[] | undefined;
|
|
2794
|
+
text?: string | undefined;
|
|
2795
|
+
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
2796
|
+
attachments?: {
|
|
2797
|
+
blobId: string;
|
|
2798
|
+
digest: string;
|
|
2799
|
+
sizeBytes: number;
|
|
2800
|
+
fileName?: string | undefined;
|
|
2801
|
+
mediaType?: string | undefined;
|
|
2802
|
+
logicalPath?: string | undefined;
|
|
2803
|
+
}[] | undefined;
|
|
2804
|
+
reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
|
|
2805
|
+
budgetTokens: number;
|
|
2806
|
+
} | undefined;
|
|
2807
|
+
nextMessageId?: string | undefined;
|
|
2808
|
+
};
|
|
2809
|
+
params: {
|
|
2810
|
+
threadId: string;
|
|
2811
|
+
messageId: string;
|
|
2812
|
+
};
|
|
2813
|
+
query: unknown;
|
|
2814
|
+
headers: unknown;
|
|
2815
|
+
response: {
|
|
2816
|
+
200: {
|
|
2817
|
+
run?: {
|
|
2818
|
+
status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
|
|
2819
|
+
projectId: string;
|
|
2820
|
+
id: string;
|
|
2821
|
+
kind: "conversation" | "subagent";
|
|
2822
|
+
threadId: string;
|
|
2823
|
+
createdAt: string;
|
|
2824
|
+
attempt: number;
|
|
2825
|
+
triggerMessageId: string;
|
|
2826
|
+
streamId: string;
|
|
2827
|
+
error?: import("@sixb/core").SixbFailure<"agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
2828
|
+
model?: {
|
|
2829
|
+
modelId: string;
|
|
2830
|
+
provider: string;
|
|
2831
|
+
} | undefined;
|
|
2832
|
+
requestedBy?: {
|
|
2833
|
+
id: string;
|
|
2834
|
+
type: "user" | "serviceAccount";
|
|
2835
|
+
} | undefined;
|
|
2836
|
+
modelId?: string | undefined;
|
|
2837
|
+
startedAt?: string | undefined;
|
|
2838
|
+
completedAt?: string | undefined;
|
|
2839
|
+
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
2840
|
+
tier?: "light" | "standard" | "heavy" | undefined;
|
|
2841
|
+
reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
|
|
2842
|
+
budgetTokens: number;
|
|
2843
|
+
} | undefined;
|
|
2844
|
+
usage?: {
|
|
2845
|
+
reportingStatus: "partial" | "complete" | "unavailable";
|
|
2846
|
+
inputTokens?: number | undefined;
|
|
2847
|
+
outputTokens?: number | undefined;
|
|
2848
|
+
totalTokens?: number | undefined;
|
|
2849
|
+
uncachedInputTokens?: number | undefined;
|
|
2850
|
+
cacheReadInputTokens?: number | undefined;
|
|
2851
|
+
cacheWriteInputTokens?: number | undefined;
|
|
2852
|
+
textOutputTokens?: number | undefined;
|
|
2853
|
+
reasoningOutputTokens?: number | undefined;
|
|
2854
|
+
audioDurationMs?: number | undefined;
|
|
2855
|
+
imageOutputTokens?: number | undefined;
|
|
2856
|
+
audioOutputTokens?: number | undefined;
|
|
2857
|
+
outputImages?: number | undefined;
|
|
2858
|
+
inputCharacters?: number | undefined;
|
|
2859
|
+
} | undefined;
|
|
2860
|
+
cost?: {
|
|
2861
|
+
amounts: {
|
|
2862
|
+
currency: string;
|
|
2863
|
+
amountNanos: string;
|
|
2864
|
+
}[];
|
|
2865
|
+
ratedCallCount: number;
|
|
2866
|
+
unpriceableCallCount: number;
|
|
2867
|
+
unvaluedCallCount: number;
|
|
2868
|
+
} | undefined;
|
|
2869
|
+
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
2870
|
+
parentRunId?: string | undefined;
|
|
2871
|
+
computer?: {
|
|
2872
|
+
id: string;
|
|
2873
|
+
folder: string;
|
|
2874
|
+
} | undefined;
|
|
2875
|
+
runsOn?: "computer" | undefined;
|
|
2876
|
+
diagnostics?: {
|
|
2877
|
+
code: "step_limit_reached" | "output_limit_reached";
|
|
2878
|
+
message: string;
|
|
2879
|
+
severity: "error" | "warning";
|
|
2880
|
+
scope: "run";
|
|
2881
|
+
}[] | undefined;
|
|
2882
|
+
} | undefined;
|
|
2883
|
+
item?: {
|
|
2884
|
+
projectId: string;
|
|
2885
|
+
id: string;
|
|
2886
|
+
mode: "steer" | "queue";
|
|
2887
|
+
threadId: string;
|
|
2888
|
+
createdAt: string;
|
|
2889
|
+
parts: ({
|
|
2890
|
+
origin: "ambient" | "explicit";
|
|
2891
|
+
context: {
|
|
2892
|
+
kind: "object";
|
|
2893
|
+
ref: {
|
|
2894
|
+
objectTypeId: string;
|
|
2895
|
+
primaryId: string;
|
|
2896
|
+
};
|
|
2897
|
+
label?: string | undefined;
|
|
2898
|
+
} | {
|
|
2899
|
+
id: string;
|
|
2900
|
+
kind: "app-state";
|
|
2901
|
+
value: import("../schemas/common").JsonValue;
|
|
2902
|
+
description: string;
|
|
2903
|
+
label: string;
|
|
2904
|
+
};
|
|
2905
|
+
type: "context";
|
|
2906
|
+
} | {
|
|
2907
|
+
type: "text";
|
|
2908
|
+
text: string;
|
|
2909
|
+
providerMetadata?: import("../schemas/common").JsonValue | undefined;
|
|
2910
|
+
} | {
|
|
2911
|
+
type: "reasoning";
|
|
2912
|
+
text: string;
|
|
2913
|
+
providerMetadata?: import("../schemas/common").JsonValue | undefined;
|
|
2914
|
+
} | {
|
|
2915
|
+
type: "step-start";
|
|
2916
|
+
} | {
|
|
2917
|
+
type: "file";
|
|
2918
|
+
fileRef: {
|
|
2919
|
+
blobId: string;
|
|
2920
|
+
digest: string;
|
|
2921
|
+
sizeBytes: number;
|
|
2922
|
+
fileName?: string | undefined;
|
|
2923
|
+
mediaType?: string | undefined;
|
|
2924
|
+
logicalPath?: string | undefined;
|
|
2925
|
+
};
|
|
2926
|
+
providerMetadata?: import("../schemas/common").JsonValue | undefined;
|
|
2927
|
+
} | {
|
|
2928
|
+
type: "provider-state";
|
|
2929
|
+
providerId: string;
|
|
2930
|
+
data: import("../schemas/common").JsonValue;
|
|
2931
|
+
} | {
|
|
2932
|
+
type: "tool-call";
|
|
2933
|
+
input: import("../schemas/common").JsonValue;
|
|
2934
|
+
output: import("../schemas/common").JsonValue;
|
|
2935
|
+
toolCallId: string;
|
|
2936
|
+
toolName: string;
|
|
2937
|
+
state: "output-available";
|
|
2938
|
+
providerMetadata?: import("../schemas/common").JsonValue | undefined;
|
|
2939
|
+
dynamic?: boolean | undefined;
|
|
2940
|
+
providerExecuted?: boolean | undefined;
|
|
2941
|
+
outputFile?: {
|
|
2942
|
+
path: string;
|
|
2943
|
+
fileRef: {
|
|
2944
|
+
blobId: string;
|
|
2945
|
+
digest: string;
|
|
2946
|
+
sizeBytes: number;
|
|
2947
|
+
fileName?: string | undefined;
|
|
2948
|
+
mediaType?: string | undefined;
|
|
2949
|
+
logicalPath?: string | undefined;
|
|
2950
|
+
};
|
|
2951
|
+
} | undefined;
|
|
2952
|
+
} | {
|
|
2953
|
+
type: "tool-call";
|
|
2954
|
+
input: import("../schemas/common").JsonValue;
|
|
2955
|
+
toolCallId: string;
|
|
2956
|
+
toolName: string;
|
|
2957
|
+
state: "output-error";
|
|
2958
|
+
errorText: string;
|
|
2959
|
+
providerMetadata?: import("../schemas/common").JsonValue | undefined;
|
|
2960
|
+
dynamic?: boolean | undefined;
|
|
2961
|
+
providerExecuted?: boolean | undefined;
|
|
2962
|
+
} | {
|
|
2963
|
+
type: "continuation";
|
|
2964
|
+
} | {
|
|
2965
|
+
status: "approved" | "denied" | "cancelled" | "superseded" | "expired";
|
|
2966
|
+
type: "approval-outcome";
|
|
2967
|
+
call: {
|
|
2968
|
+
kind: "action";
|
|
2969
|
+
actionId: string;
|
|
2970
|
+
subject: {
|
|
2971
|
+
kind: "none";
|
|
2972
|
+
} | {
|
|
2973
|
+
kind: "object";
|
|
2974
|
+
objectTypeId: string;
|
|
2975
|
+
primaryId: string;
|
|
2976
|
+
};
|
|
2977
|
+
} | {
|
|
2978
|
+
kind: "workflow";
|
|
2979
|
+
workflowId: string;
|
|
2980
|
+
};
|
|
2981
|
+
approvalId: string;
|
|
2982
|
+
caller?: {
|
|
2983
|
+
runId: string;
|
|
2984
|
+
key: string;
|
|
2985
|
+
continues?: true | undefined;
|
|
2986
|
+
} | undefined;
|
|
2987
|
+
outcome?: {
|
|
2988
|
+
status: "succeeded" | "failed";
|
|
2989
|
+
kind: "action-run";
|
|
2990
|
+
runId: string;
|
|
2991
|
+
error?: import("@sixb/core").ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "commit"> | undefined;
|
|
2992
|
+
} | {
|
|
2993
|
+
kind: "workflow-run";
|
|
2994
|
+
runId: string;
|
|
2995
|
+
queuedAt: string;
|
|
2996
|
+
} | {
|
|
2997
|
+
error: {
|
|
2998
|
+
at: string;
|
|
2999
|
+
code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.change_refused" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
|
|
3000
|
+
message: string;
|
|
3001
|
+
retryable: boolean;
|
|
3002
|
+
details?: import("../schemas/common").JsonValue | undefined;
|
|
3003
|
+
httpStatus?: number | undefined;
|
|
3004
|
+
redacted?: true | undefined;
|
|
3005
|
+
truncated?: true | undefined;
|
|
3006
|
+
};
|
|
3007
|
+
kind: "error";
|
|
3008
|
+
} | undefined;
|
|
3009
|
+
} | {
|
|
3010
|
+
id: string;
|
|
3011
|
+
kind: "message" | "answer";
|
|
3012
|
+
type: "mail";
|
|
3013
|
+
text: string;
|
|
3014
|
+
from: "parent";
|
|
3015
|
+
inReplyTo?: string | undefined;
|
|
3016
|
+
afterAnswer?: true | undefined;
|
|
3017
|
+
})[];
|
|
3018
|
+
messageId: string;
|
|
3019
|
+
updatedAt: string;
|
|
3020
|
+
authorPrincipal: {
|
|
3021
|
+
id: string;
|
|
3022
|
+
type: "user" | "serviceAccount" | "system";
|
|
3023
|
+
};
|
|
3024
|
+
seq: number;
|
|
3025
|
+
locale?: string | undefined;
|
|
3026
|
+
timeZone?: string | undefined;
|
|
3027
|
+
spec?: {
|
|
3028
|
+
model?: {
|
|
3029
|
+
modelId: string;
|
|
3030
|
+
provider: string;
|
|
3031
|
+
} | undefined;
|
|
3032
|
+
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
3033
|
+
reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
|
|
3034
|
+
budgetTokens: number;
|
|
3035
|
+
} | undefined;
|
|
3036
|
+
} | undefined;
|
|
3037
|
+
immediate?: boolean | undefined;
|
|
3038
|
+
replacesMessageId?: string | undefined;
|
|
3039
|
+
} | undefined;
|
|
3040
|
+
} | {
|
|
3041
|
+
readonly error: string;
|
|
3042
|
+
readonly code: AgentRequestErrorCode;
|
|
3043
|
+
} | {
|
|
3044
|
+
readonly error: string;
|
|
3045
|
+
readonly code: "invalid_state" | "inbox_limit";
|
|
3046
|
+
} | {
|
|
3047
|
+
error: string;
|
|
3048
|
+
};
|
|
3049
|
+
404: {
|
|
3050
|
+
error: string;
|
|
3051
|
+
};
|
|
3052
|
+
403: {
|
|
3053
|
+
error: string;
|
|
3054
|
+
code?: string | undefined;
|
|
3055
|
+
};
|
|
3056
|
+
409: {
|
|
3057
|
+
error: string;
|
|
3058
|
+
code?: string | undefined;
|
|
3059
|
+
};
|
|
3060
|
+
400: {
|
|
3061
|
+
error: string;
|
|
3062
|
+
code?: string | undefined;
|
|
3063
|
+
};
|
|
3064
|
+
429: {
|
|
3065
|
+
error: string;
|
|
3066
|
+
code: "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable";
|
|
3067
|
+
details?: import("../schemas/common").JsonValue | undefined;
|
|
3068
|
+
};
|
|
3069
|
+
501: {
|
|
3070
|
+
error: string;
|
|
3071
|
+
};
|
|
3072
|
+
202: {
|
|
3073
|
+
run?: {
|
|
3074
|
+
status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
|
|
3075
|
+
projectId: string;
|
|
3076
|
+
id: string;
|
|
3077
|
+
kind: "conversation" | "subagent";
|
|
3078
|
+
threadId: string;
|
|
3079
|
+
createdAt: string;
|
|
3080
|
+
attempt: number;
|
|
3081
|
+
triggerMessageId: string;
|
|
3082
|
+
streamId: string;
|
|
3083
|
+
error?: import("@sixb/core").SixbFailure<"agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
3084
|
+
model?: {
|
|
3085
|
+
modelId: string;
|
|
3086
|
+
provider: string;
|
|
3087
|
+
} | undefined;
|
|
3088
|
+
requestedBy?: {
|
|
3089
|
+
id: string;
|
|
3090
|
+
type: "user" | "serviceAccount";
|
|
3091
|
+
} | undefined;
|
|
3092
|
+
modelId?: string | undefined;
|
|
3093
|
+
startedAt?: string | undefined;
|
|
3094
|
+
completedAt?: string | undefined;
|
|
3095
|
+
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
3096
|
+
tier?: "light" | "standard" | "heavy" | undefined;
|
|
3097
|
+
reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
|
|
3098
|
+
budgetTokens: number;
|
|
3099
|
+
} | undefined;
|
|
3100
|
+
usage?: {
|
|
3101
|
+
reportingStatus: "partial" | "complete" | "unavailable";
|
|
3102
|
+
inputTokens?: number | undefined;
|
|
3103
|
+
outputTokens?: number | undefined;
|
|
3104
|
+
totalTokens?: number | undefined;
|
|
3105
|
+
uncachedInputTokens?: number | undefined;
|
|
3106
|
+
cacheReadInputTokens?: number | undefined;
|
|
3107
|
+
cacheWriteInputTokens?: number | undefined;
|
|
3108
|
+
textOutputTokens?: number | undefined;
|
|
3109
|
+
reasoningOutputTokens?: number | undefined;
|
|
3110
|
+
audioDurationMs?: number | undefined;
|
|
3111
|
+
imageOutputTokens?: number | undefined;
|
|
3112
|
+
audioOutputTokens?: number | undefined;
|
|
3113
|
+
outputImages?: number | undefined;
|
|
3114
|
+
inputCharacters?: number | undefined;
|
|
3115
|
+
} | undefined;
|
|
3116
|
+
cost?: {
|
|
3117
|
+
amounts: {
|
|
3118
|
+
currency: string;
|
|
3119
|
+
amountNanos: string;
|
|
3120
|
+
}[];
|
|
3121
|
+
ratedCallCount: number;
|
|
3122
|
+
unpriceableCallCount: number;
|
|
3123
|
+
unvaluedCallCount: number;
|
|
3124
|
+
} | undefined;
|
|
3125
|
+
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
3126
|
+
parentRunId?: string | undefined;
|
|
3127
|
+
computer?: {
|
|
3128
|
+
id: string;
|
|
3129
|
+
folder: string;
|
|
3130
|
+
} | undefined;
|
|
3131
|
+
runsOn?: "computer" | undefined;
|
|
3132
|
+
diagnostics?: {
|
|
3133
|
+
code: "step_limit_reached" | "output_limit_reached";
|
|
3134
|
+
message: string;
|
|
3135
|
+
severity: "error" | "warning";
|
|
3136
|
+
scope: "run";
|
|
3137
|
+
}[] | undefined;
|
|
3138
|
+
} | undefined;
|
|
3139
|
+
item?: {
|
|
3140
|
+
projectId: string;
|
|
3141
|
+
id: string;
|
|
3142
|
+
mode: "steer" | "queue";
|
|
3143
|
+
threadId: string;
|
|
3144
|
+
createdAt: string;
|
|
3145
|
+
parts: ({
|
|
3146
|
+
origin: "ambient" | "explicit";
|
|
3147
|
+
context: {
|
|
3148
|
+
kind: "object";
|
|
3149
|
+
ref: {
|
|
3150
|
+
objectTypeId: string;
|
|
3151
|
+
primaryId: string;
|
|
3152
|
+
};
|
|
3153
|
+
label?: string | undefined;
|
|
3154
|
+
} | {
|
|
3155
|
+
id: string;
|
|
3156
|
+
kind: "app-state";
|
|
3157
|
+
value: import("../schemas/common").JsonValue;
|
|
3158
|
+
description: string;
|
|
3159
|
+
label: string;
|
|
3160
|
+
};
|
|
3161
|
+
type: "context";
|
|
3162
|
+
} | {
|
|
3163
|
+
type: "text";
|
|
3164
|
+
text: string;
|
|
3165
|
+
providerMetadata?: import("../schemas/common").JsonValue | undefined;
|
|
3166
|
+
} | {
|
|
3167
|
+
type: "reasoning";
|
|
3168
|
+
text: string;
|
|
3169
|
+
providerMetadata?: import("../schemas/common").JsonValue | undefined;
|
|
3170
|
+
} | {
|
|
3171
|
+
type: "step-start";
|
|
3172
|
+
} | {
|
|
3173
|
+
type: "file";
|
|
3174
|
+
fileRef: {
|
|
3175
|
+
blobId: string;
|
|
3176
|
+
digest: string;
|
|
3177
|
+
sizeBytes: number;
|
|
3178
|
+
fileName?: string | undefined;
|
|
3179
|
+
mediaType?: string | undefined;
|
|
3180
|
+
logicalPath?: string | undefined;
|
|
3181
|
+
};
|
|
3182
|
+
providerMetadata?: import("../schemas/common").JsonValue | undefined;
|
|
3183
|
+
} | {
|
|
3184
|
+
type: "provider-state";
|
|
3185
|
+
providerId: string;
|
|
3186
|
+
data: import("../schemas/common").JsonValue;
|
|
3187
|
+
} | {
|
|
3188
|
+
type: "tool-call";
|
|
3189
|
+
input: import("../schemas/common").JsonValue;
|
|
3190
|
+
output: import("../schemas/common").JsonValue;
|
|
3191
|
+
toolCallId: string;
|
|
3192
|
+
toolName: string;
|
|
3193
|
+
state: "output-available";
|
|
3194
|
+
providerMetadata?: import("../schemas/common").JsonValue | undefined;
|
|
3195
|
+
dynamic?: boolean | undefined;
|
|
3196
|
+
providerExecuted?: boolean | undefined;
|
|
3197
|
+
outputFile?: {
|
|
3198
|
+
path: string;
|
|
3199
|
+
fileRef: {
|
|
3200
|
+
blobId: string;
|
|
3201
|
+
digest: string;
|
|
3202
|
+
sizeBytes: number;
|
|
3203
|
+
fileName?: string | undefined;
|
|
3204
|
+
mediaType?: string | undefined;
|
|
3205
|
+
logicalPath?: string | undefined;
|
|
3206
|
+
};
|
|
3207
|
+
} | undefined;
|
|
3208
|
+
} | {
|
|
3209
|
+
type: "tool-call";
|
|
3210
|
+
input: import("../schemas/common").JsonValue;
|
|
3211
|
+
toolCallId: string;
|
|
3212
|
+
toolName: string;
|
|
3213
|
+
state: "output-error";
|
|
3214
|
+
errorText: string;
|
|
3215
|
+
providerMetadata?: import("../schemas/common").JsonValue | undefined;
|
|
3216
|
+
dynamic?: boolean | undefined;
|
|
3217
|
+
providerExecuted?: boolean | undefined;
|
|
3218
|
+
} | {
|
|
3219
|
+
type: "continuation";
|
|
3220
|
+
} | {
|
|
3221
|
+
status: "approved" | "denied" | "cancelled" | "superseded" | "expired";
|
|
3222
|
+
type: "approval-outcome";
|
|
3223
|
+
call: {
|
|
3224
|
+
kind: "action";
|
|
3225
|
+
actionId: string;
|
|
3226
|
+
subject: {
|
|
3227
|
+
kind: "none";
|
|
3228
|
+
} | {
|
|
3229
|
+
kind: "object";
|
|
3230
|
+
objectTypeId: string;
|
|
3231
|
+
primaryId: string;
|
|
3232
|
+
};
|
|
3233
|
+
} | {
|
|
3234
|
+
kind: "workflow";
|
|
3235
|
+
workflowId: string;
|
|
3236
|
+
};
|
|
3237
|
+
approvalId: string;
|
|
3238
|
+
caller?: {
|
|
3239
|
+
runId: string;
|
|
3240
|
+
key: string;
|
|
3241
|
+
continues?: true | undefined;
|
|
3242
|
+
} | undefined;
|
|
3243
|
+
outcome?: {
|
|
3244
|
+
status: "succeeded" | "failed";
|
|
3245
|
+
kind: "action-run";
|
|
3246
|
+
runId: string;
|
|
3247
|
+
error?: import("@sixb/core").ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "commit"> | undefined;
|
|
3248
|
+
} | {
|
|
3249
|
+
kind: "workflow-run";
|
|
3250
|
+
runId: string;
|
|
3251
|
+
queuedAt: string;
|
|
3252
|
+
} | {
|
|
3253
|
+
error: {
|
|
3254
|
+
at: string;
|
|
3255
|
+
code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.change_refused" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
|
|
3256
|
+
message: string;
|
|
3257
|
+
retryable: boolean;
|
|
3258
|
+
details?: import("../schemas/common").JsonValue | undefined;
|
|
3259
|
+
httpStatus?: number | undefined;
|
|
3260
|
+
redacted?: true | undefined;
|
|
3261
|
+
truncated?: true | undefined;
|
|
3262
|
+
};
|
|
3263
|
+
kind: "error";
|
|
3264
|
+
} | undefined;
|
|
3265
|
+
} | {
|
|
3266
|
+
id: string;
|
|
3267
|
+
kind: "message" | "answer";
|
|
3268
|
+
type: "mail";
|
|
3269
|
+
text: string;
|
|
3270
|
+
from: "parent";
|
|
3271
|
+
inReplyTo?: string | undefined;
|
|
3272
|
+
afterAnswer?: true | undefined;
|
|
3273
|
+
})[];
|
|
3274
|
+
messageId: string;
|
|
3275
|
+
updatedAt: string;
|
|
3276
|
+
authorPrincipal: {
|
|
3277
|
+
id: string;
|
|
3278
|
+
type: "user" | "serviceAccount" | "system";
|
|
3279
|
+
};
|
|
3280
|
+
seq: number;
|
|
3281
|
+
locale?: string | undefined;
|
|
3282
|
+
timeZone?: string | undefined;
|
|
3283
|
+
spec?: {
|
|
3284
|
+
model?: {
|
|
3285
|
+
modelId: string;
|
|
3286
|
+
provider: string;
|
|
3287
|
+
} | undefined;
|
|
3288
|
+
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
3289
|
+
reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
|
|
3290
|
+
budgetTokens: number;
|
|
3291
|
+
} | undefined;
|
|
3292
|
+
} | undefined;
|
|
3293
|
+
immediate?: boolean | undefined;
|
|
3294
|
+
replacesMessageId?: string | undefined;
|
|
3295
|
+
} | undefined;
|
|
3296
|
+
};
|
|
3297
|
+
422: {
|
|
3298
|
+
type: "validation";
|
|
3299
|
+
on: string;
|
|
3300
|
+
summary?: string;
|
|
3301
|
+
message?: string;
|
|
3302
|
+
found?: unknown;
|
|
3303
|
+
property?: string;
|
|
3304
|
+
expected?: string;
|
|
3305
|
+
};
|
|
3306
|
+
};
|
|
3307
|
+
};
|
|
3308
|
+
};
|
|
3309
|
+
};
|
|
3310
|
+
};
|
|
3311
|
+
};
|
|
3312
|
+
};
|
|
3313
|
+
};
|
|
2564
3314
|
} & {
|
|
2565
3315
|
api: {
|
|
2566
3316
|
"agent-threads": {
|
|
@@ -2631,6 +3381,10 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
2631
3381
|
} | undefined;
|
|
2632
3382
|
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
2633
3383
|
parentRunId?: string | undefined;
|
|
3384
|
+
computer?: {
|
|
3385
|
+
id: string;
|
|
3386
|
+
folder: string;
|
|
3387
|
+
} | undefined;
|
|
2634
3388
|
runsOn?: "computer" | undefined;
|
|
2635
3389
|
diagnostics?: {
|
|
2636
3390
|
code: "step_limit_reached" | "output_limit_reached";
|
|
@@ -2718,6 +3472,10 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
2718
3472
|
} | undefined;
|
|
2719
3473
|
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
2720
3474
|
parentRunId?: string | undefined;
|
|
3475
|
+
computer?: {
|
|
3476
|
+
id: string;
|
|
3477
|
+
folder: string;
|
|
3478
|
+
} | undefined;
|
|
2721
3479
|
runsOn?: "computer" | undefined;
|
|
2722
3480
|
diagnostics?: {
|
|
2723
3481
|
code: "step_limit_reached" | "output_limit_reached";
|
|
@@ -2813,6 +3571,10 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
2813
3571
|
} | undefined;
|
|
2814
3572
|
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
2815
3573
|
parentRunId?: string | undefined;
|
|
3574
|
+
computer?: {
|
|
3575
|
+
id: string;
|
|
3576
|
+
folder: string;
|
|
3577
|
+
} | undefined;
|
|
2816
3578
|
runsOn?: "computer" | undefined;
|
|
2817
3579
|
diagnostics?: {
|
|
2818
3580
|
code: "step_limit_reached" | "output_limit_reached";
|
|
@@ -2905,6 +3667,10 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
2905
3667
|
} | undefined;
|
|
2906
3668
|
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
2907
3669
|
parentRunId?: string | undefined;
|
|
3670
|
+
computer?: {
|
|
3671
|
+
id: string;
|
|
3672
|
+
folder: string;
|
|
3673
|
+
} | undefined;
|
|
2908
3674
|
runsOn?: "computer" | undefined;
|
|
2909
3675
|
diagnostics?: {
|
|
2910
3676
|
code: "step_limit_reached" | "output_limit_reached";
|
|
@@ -3073,6 +3839,10 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
3073
3839
|
} | undefined;
|
|
3074
3840
|
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
3075
3841
|
parentRunId?: string | undefined;
|
|
3842
|
+
computer?: {
|
|
3843
|
+
id: string;
|
|
3844
|
+
folder: string;
|
|
3845
|
+
} | undefined;
|
|
3076
3846
|
runsOn?: "computer" | undefined;
|
|
3077
3847
|
diagnostics?: {
|
|
3078
3848
|
code: "step_limit_reached" | "output_limit_reached";
|
|
@@ -3174,6 +3944,10 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
3174
3944
|
} | undefined;
|
|
3175
3945
|
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
3176
3946
|
parentRunId?: string | undefined;
|
|
3947
|
+
computer?: {
|
|
3948
|
+
id: string;
|
|
3949
|
+
folder: string;
|
|
3950
|
+
} | undefined;
|
|
3177
3951
|
runsOn?: "computer" | undefined;
|
|
3178
3952
|
diagnostics?: {
|
|
3179
3953
|
code: "step_limit_reached" | "output_limit_reached";
|
|
@@ -3273,6 +4047,10 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
3273
4047
|
} | undefined;
|
|
3274
4048
|
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
3275
4049
|
parentRunId?: string | undefined;
|
|
4050
|
+
computer?: {
|
|
4051
|
+
id: string;
|
|
4052
|
+
folder: string;
|
|
4053
|
+
} | undefined;
|
|
3276
4054
|
runsOn?: "computer" | undefined;
|
|
3277
4055
|
diagnostics?: {
|
|
3278
4056
|
code: "step_limit_reached" | "output_limit_reached";
|
|
@@ -3360,6 +4138,10 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
3360
4138
|
} | undefined;
|
|
3361
4139
|
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
3362
4140
|
parentRunId?: string | undefined;
|
|
4141
|
+
computer?: {
|
|
4142
|
+
id: string;
|
|
4143
|
+
folder: string;
|
|
4144
|
+
} | undefined;
|
|
3363
4145
|
runsOn?: "computer" | undefined;
|
|
3364
4146
|
diagnostics?: {
|
|
3365
4147
|
code: "step_limit_reached" | "output_limit_reached";
|