@sixb/server 0.1.0 → 0.1.2
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 +3 -3
- package/dist/auth/application-access.d.ts +2 -2
- package/dist/auth/application-access.d.ts.map +1 -1
- package/dist/auth/connector-callback-cookie.d.ts +12 -0
- package/dist/auth/connector-callback-cookie.d.ts.map +1 -0
- package/dist/auth/guard.d.ts +3 -3
- package/dist/auth/guard.d.ts.map +1 -1
- package/dist/auth/public-routes.d.ts.map +1 -1
- package/dist/auth/scope.d.ts +21 -27
- package/dist/auth/scope.d.ts.map +1 -1
- package/dist/auth/session-cookies.d.ts +2 -2
- package/dist/auth/session-cookies.d.ts.map +1 -1
- package/dist/connectors/http.d.ts +16 -0
- package/dist/connectors/http.d.ts.map +1 -0
- package/dist/files/content.d.ts +11 -0
- package/dist/files/content.d.ts.map +1 -1
- package/dist/index.js +4164 -3541
- package/dist/index.js.map +57 -52
- package/dist/openapi/tags.d.ts +11 -3
- package/dist/openapi/tags.d.ts.map +1 -1
- package/dist/registerRoutes.d.ts +6 -2
- package/dist/registerRoutes.d.ts.map +1 -1
- package/dist/routes/action-runs.d.ts +21 -31
- package/dist/routes/action-runs.d.ts.map +1 -1
- package/dist/routes/actions.d.ts +9 -8
- package/dist/routes/actions.d.ts.map +1 -1
- package/dist/routes/agent-api-gateway.d.ts +2 -2
- package/dist/routes/agent-api-gateway.d.ts.map +1 -1
- package/dist/routes/agents.d.ts +130 -131
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/auth.d.ts +90 -90
- package/dist/routes/auth.d.ts.map +1 -1
- package/dist/routes/connector-connection-runs.d.ts +794 -0
- package/dist/routes/connector-connection-runs.d.ts.map +1 -0
- package/dist/routes/connector-connections.d.ts +219 -0
- package/dist/routes/connector-connections.d.ts.map +1 -0
- package/dist/routes/connectors.d.ts +10 -4
- package/dist/routes/connectors.d.ts.map +1 -1
- package/dist/routes/datasets.d.ts +15 -9
- package/dist/routes/datasets.d.ts.map +1 -1
- package/dist/routes/events.d.ts +8 -8
- package/dist/routes/events.d.ts.map +1 -1
- package/dist/routes/files.d.ts +11 -10
- package/dist/routes/files.d.ts.map +1 -1
- package/dist/routes/links.d.ts +2 -2
- package/dist/routes/links.d.ts.map +1 -1
- package/dist/routes/logs.d.ts +5 -5
- package/dist/routes/logs.d.ts.map +1 -1
- package/dist/routes/objects.d.ts +34 -34
- package/dist/routes/objects.d.ts.map +1 -1
- package/dist/routes/ontology.d.ts +62 -62
- package/dist/routes/ontology.d.ts.map +1 -1
- package/dist/routes/pipelines.d.ts +28 -34
- package/dist/routes/pipelines.d.ts.map +1 -1
- package/dist/routes/project.d.ts +2 -2
- package/dist/routes/project.d.ts.map +1 -1
- package/dist/routes/projections.d.ts +131 -83
- package/dist/routes/projections.d.ts.map +1 -1
- package/dist/routes/rules.d.ts +6 -6
- package/dist/routes/rules.d.ts.map +1 -1
- package/dist/routes/status.d.ts +2 -2
- package/dist/routes/status.d.ts.map +1 -1
- package/dist/routes/syncs.d.ts +27 -30
- package/dist/routes/syncs.d.ts.map +1 -1
- package/dist/routes/telemetry.d.ts +2 -2
- package/dist/routes/telemetry.d.ts.map +1 -1
- package/dist/routes/webhook-runs.d.ts +9 -9
- package/dist/routes/webhook-runs.d.ts.map +1 -1
- package/dist/routes/webhooks.d.ts +2 -2
- package/dist/routes/webhooks.d.ts.map +1 -1
- package/dist/routes/workflows.d.ts +132 -107
- package/dist/routes/workflows.d.ts.map +1 -1
- package/dist/routes/ws/agents.d.ts +11 -5
- package/dist/routes/ws/agents.d.ts.map +1 -1
- package/dist/routes/ws/events.d.ts +8 -8
- package/dist/routes/ws/events.d.ts.map +1 -1
- package/dist/routes/ws/log-subscription-hub.d.ts +6 -3
- package/dist/routes/ws/log-subscription-hub.d.ts.map +1 -1
- package/dist/routes/ws/logs.d.ts +10 -10
- package/dist/routes/ws/logs.d.ts.map +1 -1
- package/dist/schemas/actions.d.ts +97 -202
- package/dist/schemas/actions.d.ts.map +1 -1
- package/dist/schemas/agents.d.ts +443 -440
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/ai-usage.d.ts +34 -0
- package/dist/schemas/ai-usage.d.ts.map +1 -0
- package/dist/schemas/auth.d.ts +168 -168
- package/dist/schemas/common.d.ts +37 -0
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/connectors.d.ts +713 -2
- package/dist/schemas/connectors.d.ts.map +1 -1
- package/dist/schemas/datasets.d.ts +29 -23
- package/dist/schemas/datasets.d.ts.map +1 -1
- package/dist/schemas/event-payloads.d.ts +6 -6
- package/dist/schemas/events.d.ts +34 -34
- package/dist/schemas/logs.d.ts +22 -22
- package/dist/schemas/objects.d.ts +10 -10
- package/dist/schemas/ontology.d.ts +174 -174
- package/dist/schemas/pipelines.d.ts +131 -190
- package/dist/schemas/pipelines.d.ts.map +1 -1
- package/dist/schemas/projections.d.ts +918 -563
- package/dist/schemas/projections.d.ts.map +1 -1
- package/dist/schemas/rules.d.ts +6 -6
- package/dist/schemas/status.d.ts +2 -2
- package/dist/schemas/syncs.d.ts +88 -124
- package/dist/schemas/syncs.d.ts.map +1 -1
- package/dist/schemas/webhook-runs.d.ts +41 -41
- package/dist/schemas/webhook-runs.d.ts.map +1 -1
- package/dist/schemas/workflows.d.ts +792 -406
- package/dist/schemas/workflows.d.ts.map +1 -1
- package/dist/server.d.ts +6 -6
- package/dist/server.d.ts.map +1 -1
- package/dist/utils/http.d.ts +2 -0
- package/dist/utils/http.d.ts.map +1 -1
- package/dist/utils/ws.d.ts +4 -3
- package/dist/utils/ws.d.ts.map +1 -1
- package/package.json +8 -5
- package/src/auth/access-token-boundary.ts +4 -4
- package/src/auth/application-access.ts +8 -9
- package/src/auth/connector-callback-cookie.ts +95 -0
- package/src/auth/guard.ts +11 -11
- package/src/auth/public-routes.ts +13 -0
- package/src/auth/scope.ts +34 -30
- package/src/auth/session-cookies.ts +3 -3
- package/src/connectors/http.ts +110 -0
- package/src/files/content.ts +11 -0
- package/src/openapi/tags.ts +9 -1
- package/src/registerRoutes.ts +34 -23
- package/src/routes/action-runs.ts +49 -42
- package/src/routes/actions.ts +7 -13
- package/src/routes/agent-api-gateway.ts +87 -42
- package/src/routes/agents.ts +89 -200
- package/src/routes/auth.ts +87 -91
- package/src/routes/connector-connection-runs.ts +346 -0
- package/src/routes/connector-connections.ts +135 -0
- package/src/routes/connectors.ts +24 -12
- package/src/routes/datasets.ts +55 -54
- package/src/routes/events.ts +5 -5
- package/src/routes/files.ts +24 -31
- package/src/routes/links.ts +32 -35
- package/src/routes/logs.ts +6 -11
- package/src/routes/objects.ts +51 -114
- package/src/routes/ontology.ts +27 -38
- package/src/routes/pipelines.ts +28 -62
- package/src/routes/project.ts +3 -3
- package/src/routes/projections.ts +26 -38
- package/src/routes/rules.ts +11 -25
- package/src/routes/status.ts +5 -5
- package/src/routes/syncs.ts +19 -45
- package/src/routes/telemetry.ts +18 -29
- package/src/routes/webhook-runs.ts +5 -5
- package/src/routes/webhooks.ts +259 -341
- package/src/routes/workflows.ts +260 -259
- package/src/routes/ws/agents.ts +196 -66
- package/src/routes/ws/events.ts +11 -10
- package/src/routes/ws/log-subscription-hub.ts +6 -12
- package/src/routes/ws/logs.ts +13 -5
- package/src/schemas/actions.ts +58 -25
- package/src/schemas/agents.ts +19 -14
- package/src/schemas/ai-usage.ts +16 -0
- package/src/schemas/common.ts +24 -0
- package/src/schemas/connectors.ts +164 -0
- package/src/schemas/datasets.ts +3 -2
- package/src/schemas/pipelines.ts +24 -40
- package/src/schemas/projections.ts +17 -3
- package/src/schemas/syncs.ts +16 -10
- package/src/schemas/webhook-runs.ts +10 -5
- package/src/schemas/workflows.ts +42 -25
- package/src/server.ts +65 -26
- package/src/utils/http.ts +34 -6
- package/src/utils/ws.ts +10 -5
package/dist/routes/agents.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type AgentRunRecord } from "@sixb/core/storage";
|
|
1
|
+
import { type AgentRunView, type SixbHostView } from "@sixb/core";
|
|
3
2
|
import type { Elysia } from "elysia";
|
|
4
3
|
import { AgentRunSchema } from "../schemas/agents";
|
|
5
|
-
export declare function serializeAgentRun(run:
|
|
6
|
-
export declare function registerAgentRoutes(app: Elysia,
|
|
4
|
+
export declare function serializeAgentRun(run: AgentRunView): ReturnType<typeof AgentRunSchema.parse>;
|
|
5
|
+
export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
|
|
7
6
|
decorator: {};
|
|
8
7
|
store: {};
|
|
9
8
|
derive: {};
|
|
@@ -28,8 +27,8 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
28
27
|
headers: unknown;
|
|
29
28
|
response: {
|
|
30
29
|
200: {
|
|
31
|
-
name: string;
|
|
32
30
|
id: string;
|
|
31
|
+
name: string;
|
|
33
32
|
groupIds: string[];
|
|
34
33
|
description?: string | undefined;
|
|
35
34
|
modelId?: string | undefined;
|
|
@@ -66,8 +65,8 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
66
65
|
headers: unknown;
|
|
67
66
|
response: {
|
|
68
67
|
200: {
|
|
69
|
-
name: string;
|
|
70
68
|
id: string;
|
|
69
|
+
name: string;
|
|
71
70
|
groupIds: string[];
|
|
72
71
|
description?: string | undefined;
|
|
73
72
|
modelId?: string | undefined;
|
|
@@ -103,10 +102,10 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
103
102
|
params: {};
|
|
104
103
|
query: {
|
|
105
104
|
status?: "active" | "archived" | undefined;
|
|
106
|
-
agentId?: string | undefined;
|
|
107
105
|
limit?: string | undefined;
|
|
108
106
|
offset?: string | undefined;
|
|
109
107
|
order?: "asc" | "desc" | undefined;
|
|
108
|
+
agentId?: string | undefined;
|
|
110
109
|
};
|
|
111
110
|
headers: unknown;
|
|
112
111
|
response: {
|
|
@@ -114,14 +113,14 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
114
113
|
hasMore: boolean;
|
|
115
114
|
total: number;
|
|
116
115
|
threads: {
|
|
117
|
-
status: "active" | "archived";
|
|
118
116
|
projectId: string;
|
|
117
|
+
id: string;
|
|
118
|
+
status: "active" | "archived";
|
|
119
|
+
agentId: string;
|
|
119
120
|
ownerPrincipal: {
|
|
120
|
-
type: "serviceAccount" | "user" | "system";
|
|
121
121
|
id: string;
|
|
122
|
+
type: "user" | "serviceAccount" | "system";
|
|
122
123
|
};
|
|
123
|
-
agentId: string;
|
|
124
|
-
id: string;
|
|
125
124
|
activeRunId: string | null;
|
|
126
125
|
messageCount: number;
|
|
127
126
|
createdAt: string;
|
|
@@ -164,14 +163,14 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
164
163
|
response: {
|
|
165
164
|
200: {
|
|
166
165
|
thread: {
|
|
167
|
-
status: "active" | "archived";
|
|
168
166
|
projectId: string;
|
|
167
|
+
id: string;
|
|
168
|
+
status: "active" | "archived";
|
|
169
|
+
agentId: string;
|
|
169
170
|
ownerPrincipal: {
|
|
170
|
-
type: "serviceAccount" | "user" | "system";
|
|
171
171
|
id: string;
|
|
172
|
+
type: "user" | "serviceAccount" | "system";
|
|
172
173
|
};
|
|
173
|
-
agentId: string;
|
|
174
|
-
id: string;
|
|
175
174
|
activeRunId: string | null;
|
|
176
175
|
messageCount: number;
|
|
177
176
|
createdAt: string;
|
|
@@ -188,22 +187,22 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
188
187
|
404: {
|
|
189
188
|
error: string;
|
|
190
189
|
};
|
|
191
|
-
|
|
190
|
+
409: {
|
|
192
191
|
error: string;
|
|
193
192
|
};
|
|
194
|
-
|
|
193
|
+
501: {
|
|
195
194
|
error: string;
|
|
196
195
|
};
|
|
197
196
|
201: {
|
|
198
197
|
thread: {
|
|
199
|
-
status: "active" | "archived";
|
|
200
198
|
projectId: string;
|
|
199
|
+
id: string;
|
|
200
|
+
status: "active" | "archived";
|
|
201
|
+
agentId: string;
|
|
201
202
|
ownerPrincipal: {
|
|
202
|
-
type: "serviceAccount" | "user" | "system";
|
|
203
203
|
id: string;
|
|
204
|
+
type: "user" | "serviceAccount" | "system";
|
|
204
205
|
};
|
|
205
|
-
agentId: string;
|
|
206
|
-
id: string;
|
|
207
206
|
activeRunId: string | null;
|
|
208
207
|
messageCount: number;
|
|
209
208
|
createdAt: string;
|
|
@@ -238,14 +237,14 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
238
237
|
headers: unknown;
|
|
239
238
|
response: {
|
|
240
239
|
200: {
|
|
241
|
-
status: "active" | "archived";
|
|
242
240
|
projectId: string;
|
|
241
|
+
id: string;
|
|
242
|
+
status: "active" | "archived";
|
|
243
|
+
agentId: string;
|
|
243
244
|
ownerPrincipal: {
|
|
244
|
-
type: "serviceAccount" | "user" | "system";
|
|
245
245
|
id: string;
|
|
246
|
+
type: "user" | "serviceAccount" | "system";
|
|
246
247
|
};
|
|
247
|
-
agentId: string;
|
|
248
|
-
id: string;
|
|
249
248
|
activeRunId: string | null;
|
|
250
249
|
messageCount: number;
|
|
251
250
|
createdAt: string;
|
|
@@ -311,10 +310,10 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
311
310
|
primaryId: string;
|
|
312
311
|
};
|
|
313
312
|
} | {
|
|
313
|
+
id: string;
|
|
314
314
|
kind: "app-state";
|
|
315
315
|
description: string;
|
|
316
316
|
value: import("../schemas/common").JsonValue;
|
|
317
|
-
id: string;
|
|
318
317
|
label: string;
|
|
319
318
|
};
|
|
320
319
|
} | {
|
|
@@ -373,8 +372,8 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
373
372
|
contentVersion: number;
|
|
374
373
|
completedAt?: string | undefined;
|
|
375
374
|
authorPrincipal?: {
|
|
376
|
-
type: "serviceAccount" | "user" | "system";
|
|
377
375
|
id: string;
|
|
376
|
+
type: "user" | "serviceAccount" | "system";
|
|
378
377
|
} | undefined;
|
|
379
378
|
metadata?: import("../schemas/common").JsonValue | undefined;
|
|
380
379
|
}[];
|
|
@@ -493,7 +492,6 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
493
492
|
post: {
|
|
494
493
|
body: {
|
|
495
494
|
text: string;
|
|
496
|
-
messageId?: string | undefined;
|
|
497
495
|
context?: {
|
|
498
496
|
origin: "ambient" | "explicit";
|
|
499
497
|
context: {
|
|
@@ -503,13 +501,14 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
503
501
|
primaryId: string;
|
|
504
502
|
};
|
|
505
503
|
} | {
|
|
504
|
+
id: string;
|
|
506
505
|
kind: "app-state";
|
|
507
506
|
description: string;
|
|
508
507
|
value: import("../schemas/common").JsonValue;
|
|
509
|
-
id: string;
|
|
510
508
|
label: string;
|
|
511
509
|
};
|
|
512
510
|
}[] | undefined;
|
|
511
|
+
messageId?: string | undefined;
|
|
513
512
|
attachments?: {
|
|
514
513
|
blobId: string;
|
|
515
514
|
digest: string;
|
|
@@ -527,34 +526,34 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
527
526
|
response: {
|
|
528
527
|
200: {
|
|
529
528
|
run: {
|
|
530
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
531
529
|
projectId: string;
|
|
532
|
-
agentId: string;
|
|
533
530
|
id: string;
|
|
531
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
532
|
+
agentId: string;
|
|
534
533
|
threadId: string;
|
|
535
534
|
createdAt: string;
|
|
536
535
|
triggerMessageId: string;
|
|
537
|
-
requestedByPrincipal: {
|
|
538
|
-
type: "serviceAccount" | "user" | "system";
|
|
539
|
-
id: string;
|
|
540
|
-
};
|
|
541
536
|
attempt: number;
|
|
542
537
|
streamId: string;
|
|
543
|
-
error?:
|
|
538
|
+
error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
544
539
|
startedAt?: string | undefined;
|
|
545
540
|
completedAt?: string | undefined;
|
|
546
|
-
|
|
547
|
-
|
|
541
|
+
modelId?: string | undefined;
|
|
542
|
+
requestedBy?: {
|
|
548
543
|
id: string;
|
|
544
|
+
type: "user" | "serviceAccount";
|
|
549
545
|
} | undefined;
|
|
550
|
-
modelId?: string | undefined;
|
|
551
546
|
finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
|
|
552
547
|
usage?: {
|
|
548
|
+
reportingStatus: "complete" | "partial" | "unavailable";
|
|
553
549
|
inputTokens?: number | undefined;
|
|
554
550
|
outputTokens?: number | undefined;
|
|
555
551
|
totalTokens?: number | undefined;
|
|
556
|
-
|
|
557
|
-
|
|
552
|
+
uncachedInputTokens?: number | undefined;
|
|
553
|
+
cacheReadInputTokens?: number | undefined;
|
|
554
|
+
cacheWriteInputTokens?: number | undefined;
|
|
555
|
+
textOutputTokens?: number | undefined;
|
|
556
|
+
reasoningOutputTokens?: number | undefined;
|
|
558
557
|
} | undefined;
|
|
559
558
|
diagnostics?: {
|
|
560
559
|
code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
|
|
@@ -576,42 +575,42 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
576
575
|
404: {
|
|
577
576
|
error: string;
|
|
578
577
|
};
|
|
579
|
-
|
|
578
|
+
409: {
|
|
580
579
|
error: string;
|
|
581
580
|
};
|
|
582
|
-
|
|
581
|
+
501: {
|
|
583
582
|
error: string;
|
|
584
583
|
};
|
|
585
584
|
202: {
|
|
586
585
|
run: {
|
|
587
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
588
586
|
projectId: string;
|
|
589
|
-
agentId: string;
|
|
590
587
|
id: string;
|
|
588
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
589
|
+
agentId: string;
|
|
591
590
|
threadId: string;
|
|
592
591
|
createdAt: string;
|
|
593
592
|
triggerMessageId: string;
|
|
594
|
-
requestedByPrincipal: {
|
|
595
|
-
type: "serviceAccount" | "user" | "system";
|
|
596
|
-
id: string;
|
|
597
|
-
};
|
|
598
593
|
attempt: number;
|
|
599
594
|
streamId: string;
|
|
600
|
-
error?:
|
|
595
|
+
error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
601
596
|
startedAt?: string | undefined;
|
|
602
597
|
completedAt?: string | undefined;
|
|
603
|
-
|
|
604
|
-
|
|
598
|
+
modelId?: string | undefined;
|
|
599
|
+
requestedBy?: {
|
|
605
600
|
id: string;
|
|
601
|
+
type: "user" | "serviceAccount";
|
|
606
602
|
} | undefined;
|
|
607
|
-
modelId?: string | undefined;
|
|
608
603
|
finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
|
|
609
604
|
usage?: {
|
|
605
|
+
reportingStatus: "complete" | "partial" | "unavailable";
|
|
610
606
|
inputTokens?: number | undefined;
|
|
611
607
|
outputTokens?: number | undefined;
|
|
612
608
|
totalTokens?: number | undefined;
|
|
613
|
-
|
|
614
|
-
|
|
609
|
+
uncachedInputTokens?: number | undefined;
|
|
610
|
+
cacheReadInputTokens?: number | undefined;
|
|
611
|
+
cacheWriteInputTokens?: number | undefined;
|
|
612
|
+
textOutputTokens?: number | undefined;
|
|
613
|
+
reasoningOutputTokens?: number | undefined;
|
|
615
614
|
} | undefined;
|
|
616
615
|
diagnostics?: {
|
|
617
616
|
code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
|
|
@@ -654,34 +653,34 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
654
653
|
response: {
|
|
655
654
|
200: {
|
|
656
655
|
run: {
|
|
657
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
658
656
|
projectId: string;
|
|
659
|
-
agentId: string;
|
|
660
657
|
id: string;
|
|
658
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
659
|
+
agentId: string;
|
|
661
660
|
threadId: string;
|
|
662
661
|
createdAt: string;
|
|
663
662
|
triggerMessageId: string;
|
|
664
|
-
requestedByPrincipal: {
|
|
665
|
-
type: "serviceAccount" | "user" | "system";
|
|
666
|
-
id: string;
|
|
667
|
-
};
|
|
668
663
|
attempt: number;
|
|
669
664
|
streamId: string;
|
|
670
|
-
error?:
|
|
665
|
+
error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
671
666
|
startedAt?: string | undefined;
|
|
672
667
|
completedAt?: string | undefined;
|
|
673
|
-
|
|
674
|
-
|
|
668
|
+
modelId?: string | undefined;
|
|
669
|
+
requestedBy?: {
|
|
675
670
|
id: string;
|
|
671
|
+
type: "user" | "serviceAccount";
|
|
676
672
|
} | undefined;
|
|
677
|
-
modelId?: string | undefined;
|
|
678
673
|
finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
|
|
679
674
|
usage?: {
|
|
675
|
+
reportingStatus: "complete" | "partial" | "unavailable";
|
|
680
676
|
inputTokens?: number | undefined;
|
|
681
677
|
outputTokens?: number | undefined;
|
|
682
678
|
totalTokens?: number | undefined;
|
|
683
|
-
|
|
684
|
-
|
|
679
|
+
uncachedInputTokens?: number | undefined;
|
|
680
|
+
cacheReadInputTokens?: number | undefined;
|
|
681
|
+
cacheWriteInputTokens?: number | undefined;
|
|
682
|
+
textOutputTokens?: number | undefined;
|
|
683
|
+
reasoningOutputTokens?: number | undefined;
|
|
685
684
|
} | undefined;
|
|
686
685
|
diagnostics?: {
|
|
687
686
|
code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
|
|
@@ -700,42 +699,42 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
700
699
|
404: {
|
|
701
700
|
error: string;
|
|
702
701
|
};
|
|
703
|
-
|
|
702
|
+
409: {
|
|
704
703
|
error: string;
|
|
705
704
|
};
|
|
706
|
-
|
|
705
|
+
501: {
|
|
707
706
|
error: string;
|
|
708
707
|
};
|
|
709
708
|
202: {
|
|
710
709
|
run: {
|
|
711
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
712
710
|
projectId: string;
|
|
713
|
-
agentId: string;
|
|
714
711
|
id: string;
|
|
712
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
713
|
+
agentId: string;
|
|
715
714
|
threadId: string;
|
|
716
715
|
createdAt: string;
|
|
717
716
|
triggerMessageId: string;
|
|
718
|
-
requestedByPrincipal: {
|
|
719
|
-
type: "serviceAccount" | "user" | "system";
|
|
720
|
-
id: string;
|
|
721
|
-
};
|
|
722
717
|
attempt: number;
|
|
723
718
|
streamId: string;
|
|
724
|
-
error?:
|
|
719
|
+
error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
725
720
|
startedAt?: string | undefined;
|
|
726
721
|
completedAt?: string | undefined;
|
|
727
|
-
|
|
728
|
-
|
|
722
|
+
modelId?: string | undefined;
|
|
723
|
+
requestedBy?: {
|
|
729
724
|
id: string;
|
|
725
|
+
type: "user" | "serviceAccount";
|
|
730
726
|
} | undefined;
|
|
731
|
-
modelId?: string | undefined;
|
|
732
727
|
finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
|
|
733
728
|
usage?: {
|
|
729
|
+
reportingStatus: "complete" | "partial" | "unavailable";
|
|
734
730
|
inputTokens?: number | undefined;
|
|
735
731
|
outputTokens?: number | undefined;
|
|
736
732
|
totalTokens?: number | undefined;
|
|
737
|
-
|
|
738
|
-
|
|
733
|
+
uncachedInputTokens?: number | undefined;
|
|
734
|
+
cacheReadInputTokens?: number | undefined;
|
|
735
|
+
cacheWriteInputTokens?: number | undefined;
|
|
736
|
+
textOutputTokens?: number | undefined;
|
|
737
|
+
reasoningOutputTokens?: number | undefined;
|
|
739
738
|
} | undefined;
|
|
740
739
|
diagnostics?: {
|
|
741
740
|
code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
|
|
@@ -779,34 +778,34 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
779
778
|
response: {
|
|
780
779
|
200: {
|
|
781
780
|
run: {
|
|
782
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
783
781
|
projectId: string;
|
|
784
|
-
agentId: string;
|
|
785
782
|
id: string;
|
|
783
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
784
|
+
agentId: string;
|
|
786
785
|
threadId: string;
|
|
787
786
|
createdAt: string;
|
|
788
787
|
triggerMessageId: string;
|
|
789
|
-
requestedByPrincipal: {
|
|
790
|
-
type: "serviceAccount" | "user" | "system";
|
|
791
|
-
id: string;
|
|
792
|
-
};
|
|
793
788
|
attempt: number;
|
|
794
789
|
streamId: string;
|
|
795
|
-
error?:
|
|
790
|
+
error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
796
791
|
startedAt?: string | undefined;
|
|
797
792
|
completedAt?: string | undefined;
|
|
798
|
-
|
|
799
|
-
|
|
793
|
+
modelId?: string | undefined;
|
|
794
|
+
requestedBy?: {
|
|
800
795
|
id: string;
|
|
796
|
+
type: "user" | "serviceAccount";
|
|
801
797
|
} | undefined;
|
|
802
|
-
modelId?: string | undefined;
|
|
803
798
|
finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
|
|
804
799
|
usage?: {
|
|
800
|
+
reportingStatus: "complete" | "partial" | "unavailable";
|
|
805
801
|
inputTokens?: number | undefined;
|
|
806
802
|
outputTokens?: number | undefined;
|
|
807
803
|
totalTokens?: number | undefined;
|
|
808
|
-
|
|
809
|
-
|
|
804
|
+
uncachedInputTokens?: number | undefined;
|
|
805
|
+
cacheReadInputTokens?: number | undefined;
|
|
806
|
+
cacheWriteInputTokens?: number | undefined;
|
|
807
|
+
textOutputTokens?: number | undefined;
|
|
808
|
+
reasoningOutputTokens?: number | undefined;
|
|
810
809
|
} | undefined;
|
|
811
810
|
diagnostics?: {
|
|
812
811
|
code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
|
|
@@ -825,42 +824,42 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
825
824
|
404: {
|
|
826
825
|
error: string;
|
|
827
826
|
};
|
|
828
|
-
|
|
827
|
+
409: {
|
|
829
828
|
error: string;
|
|
830
829
|
};
|
|
831
|
-
|
|
830
|
+
501: {
|
|
832
831
|
error: string;
|
|
833
832
|
};
|
|
834
833
|
202: {
|
|
835
834
|
run: {
|
|
836
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
837
835
|
projectId: string;
|
|
838
|
-
agentId: string;
|
|
839
836
|
id: string;
|
|
837
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
838
|
+
agentId: string;
|
|
840
839
|
threadId: string;
|
|
841
840
|
createdAt: string;
|
|
842
841
|
triggerMessageId: string;
|
|
843
|
-
requestedByPrincipal: {
|
|
844
|
-
type: "serviceAccount" | "user" | "system";
|
|
845
|
-
id: string;
|
|
846
|
-
};
|
|
847
842
|
attempt: number;
|
|
848
843
|
streamId: string;
|
|
849
|
-
error?:
|
|
844
|
+
error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
850
845
|
startedAt?: string | undefined;
|
|
851
846
|
completedAt?: string | undefined;
|
|
852
|
-
|
|
853
|
-
|
|
847
|
+
modelId?: string | undefined;
|
|
848
|
+
requestedBy?: {
|
|
854
849
|
id: string;
|
|
850
|
+
type: "user" | "serviceAccount";
|
|
855
851
|
} | undefined;
|
|
856
|
-
modelId?: string | undefined;
|
|
857
852
|
finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
|
|
858
853
|
usage?: {
|
|
854
|
+
reportingStatus: "complete" | "partial" | "unavailable";
|
|
859
855
|
inputTokens?: number | undefined;
|
|
860
856
|
outputTokens?: number | undefined;
|
|
861
857
|
totalTokens?: number | undefined;
|
|
862
|
-
|
|
863
|
-
|
|
858
|
+
uncachedInputTokens?: number | undefined;
|
|
859
|
+
cacheReadInputTokens?: number | undefined;
|
|
860
|
+
cacheWriteInputTokens?: number | undefined;
|
|
861
|
+
textOutputTokens?: number | undefined;
|
|
862
|
+
reasoningOutputTokens?: number | undefined;
|
|
864
863
|
} | undefined;
|
|
865
864
|
diagnostics?: {
|
|
866
865
|
code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
|
|
@@ -908,34 +907,34 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
908
907
|
response: {
|
|
909
908
|
200: {
|
|
910
909
|
runs: {
|
|
911
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
912
910
|
projectId: string;
|
|
913
|
-
agentId: string;
|
|
914
911
|
id: string;
|
|
912
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
913
|
+
agentId: string;
|
|
915
914
|
threadId: string;
|
|
916
915
|
createdAt: string;
|
|
917
916
|
triggerMessageId: string;
|
|
918
|
-
requestedByPrincipal: {
|
|
919
|
-
type: "serviceAccount" | "user" | "system";
|
|
920
|
-
id: string;
|
|
921
|
-
};
|
|
922
917
|
attempt: number;
|
|
923
918
|
streamId: string;
|
|
924
|
-
error?:
|
|
919
|
+
error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
925
920
|
startedAt?: string | undefined;
|
|
926
921
|
completedAt?: string | undefined;
|
|
927
|
-
|
|
928
|
-
|
|
922
|
+
modelId?: string | undefined;
|
|
923
|
+
requestedBy?: {
|
|
929
924
|
id: string;
|
|
925
|
+
type: "user" | "serviceAccount";
|
|
930
926
|
} | undefined;
|
|
931
|
-
modelId?: string | undefined;
|
|
932
927
|
finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
|
|
933
928
|
usage?: {
|
|
929
|
+
reportingStatus: "complete" | "partial" | "unavailable";
|
|
934
930
|
inputTokens?: number | undefined;
|
|
935
931
|
outputTokens?: number | undefined;
|
|
936
932
|
totalTokens?: number | undefined;
|
|
937
|
-
|
|
938
|
-
|
|
933
|
+
uncachedInputTokens?: number | undefined;
|
|
934
|
+
cacheReadInputTokens?: number | undefined;
|
|
935
|
+
cacheWriteInputTokens?: number | undefined;
|
|
936
|
+
textOutputTokens?: number | undefined;
|
|
937
|
+
reasoningOutputTokens?: number | undefined;
|
|
939
938
|
} | undefined;
|
|
940
939
|
diagnostics?: {
|
|
941
940
|
code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
|
|
@@ -985,34 +984,34 @@ export declare function registerAgentRoutes(app: Elysia, sixb: Sixb<readonly Ont
|
|
|
985
984
|
headers: unknown;
|
|
986
985
|
response: {
|
|
987
986
|
200: {
|
|
988
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
989
987
|
projectId: string;
|
|
990
|
-
agentId: string;
|
|
991
988
|
id: string;
|
|
989
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
990
|
+
agentId: string;
|
|
992
991
|
threadId: string;
|
|
993
992
|
createdAt: string;
|
|
994
993
|
triggerMessageId: string;
|
|
995
|
-
requestedByPrincipal: {
|
|
996
|
-
type: "serviceAccount" | "user" | "system";
|
|
997
|
-
id: string;
|
|
998
|
-
};
|
|
999
994
|
attempt: number;
|
|
1000
995
|
streamId: string;
|
|
1001
|
-
error?:
|
|
996
|
+
error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
1002
997
|
startedAt?: string | undefined;
|
|
1003
998
|
completedAt?: string | undefined;
|
|
1004
|
-
|
|
1005
|
-
|
|
999
|
+
modelId?: string | undefined;
|
|
1000
|
+
requestedBy?: {
|
|
1006
1001
|
id: string;
|
|
1002
|
+
type: "user" | "serviceAccount";
|
|
1007
1003
|
} | undefined;
|
|
1008
|
-
modelId?: string | undefined;
|
|
1009
1004
|
finishReason?: "length" | "error" | "unknown" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
|
|
1010
1005
|
usage?: {
|
|
1006
|
+
reportingStatus: "complete" | "partial" | "unavailable";
|
|
1011
1007
|
inputTokens?: number | undefined;
|
|
1012
1008
|
outputTokens?: number | undefined;
|
|
1013
1009
|
totalTokens?: number | undefined;
|
|
1014
|
-
|
|
1015
|
-
|
|
1010
|
+
uncachedInputTokens?: number | undefined;
|
|
1011
|
+
cacheReadInputTokens?: number | undefined;
|
|
1012
|
+
cacheWriteInputTokens?: number | undefined;
|
|
1013
|
+
textOutputTokens?: number | undefined;
|
|
1014
|
+
reasoningOutputTokens?: number | undefined;
|
|
1016
1015
|
} | undefined;
|
|
1017
1016
|
diagnostics?: {
|
|
1018
1017
|
code: "output_file_limit_exceeded" | "output_file_too_large" | "output_budget_exhausted" | "output_collection_failed" | "output_file_changed" | "output_storage_failed";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/routes/agents.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/routes/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EAEjB,KAAK,YAAY,EAClB,MAAM,YAAY,CAAA;AAWnB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAYpC,OAAO,EAUL,cAAc,EAYf,MAAM,mBAAmB,CAAA;AAkE1B,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,YAAY,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,CAoB5F;AAgJD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BA3GvD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mDAmCgE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mDAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAnC5E,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAipBjB"}
|