@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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type SixbHostView } from "@sixb/core";
|
|
2
2
|
import type { Elysia } from "elysia";
|
|
3
|
-
export declare function registerWorkflowRoutes(app: Elysia,
|
|
3
|
+
export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
|
|
4
4
|
decorator: {};
|
|
5
5
|
store: {};
|
|
6
6
|
derive: {};
|
|
@@ -26,50 +26,49 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
26
26
|
response: {
|
|
27
27
|
200: {
|
|
28
28
|
id: string;
|
|
29
|
-
input: Record<string,
|
|
29
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
30
30
|
triggers: {
|
|
31
31
|
type: "schedule";
|
|
32
32
|
scheduleId: string;
|
|
33
33
|
}[];
|
|
34
34
|
nodes: ({
|
|
35
|
-
type: "step";
|
|
36
35
|
id: string;
|
|
37
|
-
|
|
36
|
+
type: "step";
|
|
37
|
+
output: Record<string, import("../schemas/common").JsonValue>;
|
|
38
38
|
key: string;
|
|
39
|
-
input: Record<string,
|
|
39
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
40
40
|
} | {
|
|
41
|
-
type: "action";
|
|
42
|
-
params: Record<string, unknown>;
|
|
43
41
|
id: string;
|
|
42
|
+
type: "action";
|
|
43
|
+
params: Record<string, import("../schemas/common").JsonValue>;
|
|
44
44
|
key: string;
|
|
45
45
|
objectTypeId?: string | undefined;
|
|
46
46
|
} | {
|
|
47
|
-
response: Record<string, unknown>;
|
|
48
|
-
type: "intervention";
|
|
49
47
|
id: string;
|
|
48
|
+
response: Record<string, import("../schemas/common").JsonValue>;
|
|
49
|
+
type: "intervention";
|
|
50
50
|
key: string;
|
|
51
|
-
input: Record<string,
|
|
51
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
52
52
|
description?: string | undefined;
|
|
53
53
|
} | {
|
|
54
|
-
agentId: string;
|
|
55
|
-
type: "agent";
|
|
56
54
|
id: string;
|
|
57
|
-
|
|
55
|
+
type: "agent";
|
|
56
|
+
output: Record<string, import("../schemas/common").JsonValue>;
|
|
58
57
|
key: string;
|
|
59
|
-
|
|
58
|
+
agentId: string;
|
|
59
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
60
60
|
})[];
|
|
61
61
|
latestRun: {
|
|
62
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
63
62
|
projectId: string;
|
|
64
63
|
id: string;
|
|
64
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
65
65
|
startedAt: string;
|
|
66
|
-
input: Record<string, unknown>;
|
|
67
|
-
workflowId: string;
|
|
68
66
|
requestedBy: {
|
|
69
|
-
principalType: "
|
|
67
|
+
principalType: "user" | "serviceAccount" | "system";
|
|
70
68
|
principalId: string;
|
|
71
69
|
};
|
|
72
|
-
|
|
70
|
+
workflowId: string;
|
|
71
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
|
|
73
72
|
queuedAt?: string | undefined;
|
|
74
73
|
finishedAt?: string | undefined;
|
|
75
74
|
} | null;
|
|
@@ -101,50 +100,49 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
101
100
|
response: {
|
|
102
101
|
200: {
|
|
103
102
|
id: string;
|
|
104
|
-
input: Record<string,
|
|
103
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
105
104
|
triggers: {
|
|
106
105
|
type: "schedule";
|
|
107
106
|
scheduleId: string;
|
|
108
107
|
}[];
|
|
109
108
|
nodes: ({
|
|
110
|
-
type: "step";
|
|
111
109
|
id: string;
|
|
112
|
-
|
|
110
|
+
type: "step";
|
|
111
|
+
output: Record<string, import("../schemas/common").JsonValue>;
|
|
113
112
|
key: string;
|
|
114
|
-
input: Record<string,
|
|
113
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
115
114
|
} | {
|
|
116
|
-
type: "action";
|
|
117
|
-
params: Record<string, unknown>;
|
|
118
115
|
id: string;
|
|
116
|
+
type: "action";
|
|
117
|
+
params: Record<string, import("../schemas/common").JsonValue>;
|
|
119
118
|
key: string;
|
|
120
119
|
objectTypeId?: string | undefined;
|
|
121
120
|
} | {
|
|
122
|
-
response: Record<string, unknown>;
|
|
123
|
-
type: "intervention";
|
|
124
121
|
id: string;
|
|
122
|
+
response: Record<string, import("../schemas/common").JsonValue>;
|
|
123
|
+
type: "intervention";
|
|
125
124
|
key: string;
|
|
126
|
-
input: Record<string,
|
|
125
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
127
126
|
description?: string | undefined;
|
|
128
127
|
} | {
|
|
129
|
-
agentId: string;
|
|
130
|
-
type: "agent";
|
|
131
128
|
id: string;
|
|
132
|
-
|
|
129
|
+
type: "agent";
|
|
130
|
+
output: Record<string, import("../schemas/common").JsonValue>;
|
|
133
131
|
key: string;
|
|
134
|
-
|
|
132
|
+
agentId: string;
|
|
133
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
135
134
|
})[];
|
|
136
135
|
latestRun: {
|
|
137
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
138
136
|
projectId: string;
|
|
139
137
|
id: string;
|
|
138
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
140
139
|
startedAt: string;
|
|
141
|
-
input: Record<string, unknown>;
|
|
142
|
-
workflowId: string;
|
|
143
140
|
requestedBy: {
|
|
144
|
-
principalType: "
|
|
141
|
+
principalType: "user" | "serviceAccount" | "system";
|
|
145
142
|
principalId: string;
|
|
146
143
|
};
|
|
147
|
-
|
|
144
|
+
workflowId: string;
|
|
145
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
|
|
148
146
|
queuedAt?: string | undefined;
|
|
149
147
|
finishedAt?: string | undefined;
|
|
150
148
|
} | null;
|
|
@@ -192,10 +190,10 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
192
190
|
hasMore: boolean;
|
|
193
191
|
total: number;
|
|
194
192
|
interventions: {
|
|
195
|
-
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
196
193
|
projectId: string;
|
|
197
194
|
id: string;
|
|
198
|
-
|
|
195
|
+
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
196
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
199
197
|
workflowId: string;
|
|
200
198
|
nodeRunId: string;
|
|
201
199
|
nodeIndex: number;
|
|
@@ -204,18 +202,18 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
204
202
|
interventionId: string;
|
|
205
203
|
requestedAt: string;
|
|
206
204
|
workflowRunId: string;
|
|
207
|
-
defaultResponse: Record<string,
|
|
208
|
-
response?: Record<string,
|
|
205
|
+
defaultResponse: Record<string, import("../schemas/common").JsonValue>;
|
|
206
|
+
response?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
209
207
|
expiresAt?: string | undefined;
|
|
210
208
|
submittedAt?: string | undefined;
|
|
211
209
|
cancelledAt?: string | undefined;
|
|
212
210
|
expiredAt?: string | undefined;
|
|
213
211
|
submittedBy?: {
|
|
214
|
-
principalType: "
|
|
212
|
+
principalType: "user" | "serviceAccount" | "system";
|
|
215
213
|
principalId: string;
|
|
216
214
|
} | undefined;
|
|
217
215
|
cancelledBy?: {
|
|
218
|
-
principalType: "
|
|
216
|
+
principalType: "user" | "serviceAccount" | "system";
|
|
219
217
|
principalId: string;
|
|
220
218
|
} | undefined;
|
|
221
219
|
}[];
|
|
@@ -252,10 +250,10 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
252
250
|
headers: unknown;
|
|
253
251
|
response: {
|
|
254
252
|
200: {
|
|
255
|
-
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
256
253
|
projectId: string;
|
|
257
254
|
id: string;
|
|
258
|
-
|
|
255
|
+
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
256
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
259
257
|
workflowId: string;
|
|
260
258
|
nodeRunId: string;
|
|
261
259
|
nodeIndex: number;
|
|
@@ -264,18 +262,18 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
264
262
|
interventionId: string;
|
|
265
263
|
requestedAt: string;
|
|
266
264
|
workflowRunId: string;
|
|
267
|
-
defaultResponse: Record<string,
|
|
268
|
-
response?: Record<string,
|
|
265
|
+
defaultResponse: Record<string, import("../schemas/common").JsonValue>;
|
|
266
|
+
response?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
269
267
|
expiresAt?: string | undefined;
|
|
270
268
|
submittedAt?: string | undefined;
|
|
271
269
|
cancelledAt?: string | undefined;
|
|
272
270
|
expiredAt?: string | undefined;
|
|
273
271
|
submittedBy?: {
|
|
274
|
-
principalType: "
|
|
272
|
+
principalType: "user" | "serviceAccount" | "system";
|
|
275
273
|
principalId: string;
|
|
276
274
|
} | undefined;
|
|
277
275
|
cancelledBy?: {
|
|
278
|
-
principalType: "
|
|
276
|
+
principalType: "user" | "serviceAccount" | "system";
|
|
279
277
|
principalId: string;
|
|
280
278
|
} | undefined;
|
|
281
279
|
};
|
|
@@ -309,7 +307,7 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
309
307
|
submit: {
|
|
310
308
|
post: {
|
|
311
309
|
body: {
|
|
312
|
-
response: Record<string,
|
|
310
|
+
response: Record<string, import("../schemas/common").JsonValue>;
|
|
313
311
|
};
|
|
314
312
|
params: {
|
|
315
313
|
interventionId: string;
|
|
@@ -322,10 +320,10 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
322
320
|
} | {
|
|
323
321
|
jobId: string;
|
|
324
322
|
intervention: {
|
|
325
|
-
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
326
323
|
projectId: string;
|
|
327
324
|
id: string;
|
|
328
|
-
|
|
325
|
+
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
326
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
329
327
|
workflowId: string;
|
|
330
328
|
nodeRunId: string;
|
|
331
329
|
nodeIndex: number;
|
|
@@ -334,18 +332,18 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
334
332
|
interventionId: string;
|
|
335
333
|
requestedAt: string;
|
|
336
334
|
workflowRunId: string;
|
|
337
|
-
defaultResponse: Record<string,
|
|
338
|
-
response?: Record<string,
|
|
335
|
+
defaultResponse: Record<string, import("../schemas/common").JsonValue>;
|
|
336
|
+
response?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
339
337
|
expiresAt?: string | undefined;
|
|
340
338
|
submittedAt?: string | undefined;
|
|
341
339
|
cancelledAt?: string | undefined;
|
|
342
340
|
expiredAt?: string | undefined;
|
|
343
341
|
submittedBy?: {
|
|
344
|
-
principalType: "
|
|
342
|
+
principalType: "user" | "serviceAccount" | "system";
|
|
345
343
|
principalId: string;
|
|
346
344
|
} | undefined;
|
|
347
345
|
cancelledBy?: {
|
|
348
|
-
principalType: "
|
|
346
|
+
principalType: "user" | "serviceAccount" | "system";
|
|
349
347
|
principalId: string;
|
|
350
348
|
} | undefined;
|
|
351
349
|
};
|
|
@@ -362,10 +360,10 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
362
360
|
202: {
|
|
363
361
|
jobId: string;
|
|
364
362
|
intervention: {
|
|
365
|
-
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
366
363
|
projectId: string;
|
|
367
364
|
id: string;
|
|
368
|
-
|
|
365
|
+
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
366
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
369
367
|
workflowId: string;
|
|
370
368
|
nodeRunId: string;
|
|
371
369
|
nodeIndex: number;
|
|
@@ -374,18 +372,18 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
374
372
|
interventionId: string;
|
|
375
373
|
requestedAt: string;
|
|
376
374
|
workflowRunId: string;
|
|
377
|
-
defaultResponse: Record<string,
|
|
378
|
-
response?: Record<string,
|
|
375
|
+
defaultResponse: Record<string, import("../schemas/common").JsonValue>;
|
|
376
|
+
response?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
379
377
|
expiresAt?: string | undefined;
|
|
380
378
|
submittedAt?: string | undefined;
|
|
381
379
|
cancelledAt?: string | undefined;
|
|
382
380
|
expiredAt?: string | undefined;
|
|
383
381
|
submittedBy?: {
|
|
384
|
-
principalType: "
|
|
382
|
+
principalType: "user" | "serviceAccount" | "system";
|
|
385
383
|
principalId: string;
|
|
386
384
|
} | undefined;
|
|
387
385
|
cancelledBy?: {
|
|
388
|
-
principalType: "
|
|
386
|
+
principalType: "user" | "serviceAccount" | "system";
|
|
389
387
|
principalId: string;
|
|
390
388
|
} | undefined;
|
|
391
389
|
};
|
|
@@ -420,10 +418,10 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
420
418
|
response: {
|
|
421
419
|
200: {
|
|
422
420
|
intervention: {
|
|
423
|
-
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
424
421
|
projectId: string;
|
|
425
422
|
id: string;
|
|
426
|
-
|
|
423
|
+
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
424
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
427
425
|
workflowId: string;
|
|
428
426
|
nodeRunId: string;
|
|
429
427
|
nodeIndex: number;
|
|
@@ -432,18 +430,18 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
432
430
|
interventionId: string;
|
|
433
431
|
requestedAt: string;
|
|
434
432
|
workflowRunId: string;
|
|
435
|
-
defaultResponse: Record<string,
|
|
436
|
-
response?: Record<string,
|
|
433
|
+
defaultResponse: Record<string, import("../schemas/common").JsonValue>;
|
|
434
|
+
response?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
437
435
|
expiresAt?: string | undefined;
|
|
438
436
|
submittedAt?: string | undefined;
|
|
439
437
|
cancelledAt?: string | undefined;
|
|
440
438
|
expiredAt?: string | undefined;
|
|
441
439
|
submittedBy?: {
|
|
442
|
-
principalType: "
|
|
440
|
+
principalType: "user" | "serviceAccount" | "system";
|
|
443
441
|
principalId: string;
|
|
444
442
|
} | undefined;
|
|
445
443
|
cancelledBy?: {
|
|
446
|
-
principalType: "
|
|
444
|
+
principalType: "user" | "serviceAccount" | "system";
|
|
447
445
|
principalId: string;
|
|
448
446
|
} | undefined;
|
|
449
447
|
};
|
|
@@ -480,28 +478,27 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
480
478
|
params: {};
|
|
481
479
|
query: {
|
|
482
480
|
status?: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting" | undefined;
|
|
481
|
+
startedAfter?: string | undefined;
|
|
482
|
+
startedBefore?: string | undefined;
|
|
483
483
|
limit?: string | undefined;
|
|
484
484
|
offset?: string | undefined;
|
|
485
485
|
order?: "asc" | "desc" | undefined;
|
|
486
|
-
startedAfter?: string | undefined;
|
|
487
|
-
startedBefore?: string | undefined;
|
|
488
486
|
workflowId?: string | undefined;
|
|
489
487
|
};
|
|
490
488
|
headers: unknown;
|
|
491
489
|
response: {
|
|
492
490
|
200: {
|
|
493
491
|
runs: {
|
|
494
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
495
492
|
projectId: string;
|
|
496
493
|
id: string;
|
|
494
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
497
495
|
startedAt: string;
|
|
498
|
-
input: Record<string, unknown>;
|
|
499
|
-
workflowId: string;
|
|
500
496
|
requestedBy: {
|
|
501
|
-
principalType: "
|
|
497
|
+
principalType: "user" | "serviceAccount" | "system";
|
|
502
498
|
principalId: string;
|
|
503
499
|
};
|
|
504
|
-
|
|
500
|
+
workflowId: string;
|
|
501
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
|
|
505
502
|
queuedAt?: string | undefined;
|
|
506
503
|
finishedAt?: string | undefined;
|
|
507
504
|
}[];
|
|
@@ -541,35 +538,33 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
541
538
|
response: {
|
|
542
539
|
200: {
|
|
543
540
|
run: {
|
|
544
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
545
541
|
projectId: string;
|
|
546
542
|
id: string;
|
|
543
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
547
544
|
startedAt: string;
|
|
548
|
-
input: Record<string,
|
|
549
|
-
workflowId: string;
|
|
545
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
550
546
|
requestedBy: {
|
|
551
|
-
principalType: "
|
|
547
|
+
principalType: "user" | "serviceAccount" | "system";
|
|
552
548
|
principalId: string;
|
|
553
549
|
};
|
|
554
|
-
|
|
550
|
+
workflowId: string;
|
|
551
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
|
|
555
552
|
queuedAt?: string | undefined;
|
|
556
553
|
finishedAt?: string | undefined;
|
|
554
|
+
output?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
557
555
|
};
|
|
558
556
|
nodes: {
|
|
559
|
-
status: "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
560
557
|
projectId: string;
|
|
561
558
|
id: string;
|
|
559
|
+
status: "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
562
560
|
startedAt: string;
|
|
563
|
-
input: Record<string,
|
|
561
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
564
562
|
workflowId: string;
|
|
565
563
|
nodeIndex: number;
|
|
566
|
-
nodeType: "action" | "
|
|
564
|
+
nodeType: "action" | "step" | "intervention" | "agent";
|
|
567
565
|
nodeId: string;
|
|
568
566
|
nodeKey: string;
|
|
569
567
|
workflowRunId: string;
|
|
570
|
-
error?: string | undefined;
|
|
571
|
-
finishedAt?: string | undefined;
|
|
572
|
-
output?: Record<string, unknown> | undefined;
|
|
573
568
|
agentExecution?: {
|
|
574
569
|
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
575
570
|
agentId: string;
|
|
@@ -578,8 +573,21 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
578
573
|
completedAt?: string | undefined;
|
|
579
574
|
modelId?: string | undefined;
|
|
580
575
|
finishReason?: string | undefined;
|
|
581
|
-
usage?:
|
|
576
|
+
usage?: {
|
|
577
|
+
reportingStatus: "complete" | "partial" | "unavailable";
|
|
578
|
+
inputTokens?: number | undefined;
|
|
579
|
+
outputTokens?: number | undefined;
|
|
580
|
+
totalTokens?: number | undefined;
|
|
581
|
+
uncachedInputTokens?: number | undefined;
|
|
582
|
+
cacheReadInputTokens?: number | undefined;
|
|
583
|
+
cacheWriteInputTokens?: number | undefined;
|
|
584
|
+
textOutputTokens?: number | undefined;
|
|
585
|
+
reasoningOutputTokens?: number | undefined;
|
|
586
|
+
} | undefined;
|
|
582
587
|
} | undefined;
|
|
588
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
|
|
589
|
+
finishedAt?: string | undefined;
|
|
590
|
+
output?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
583
591
|
}[];
|
|
584
592
|
};
|
|
585
593
|
400: {
|
|
@@ -628,16 +636,22 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
628
636
|
attempt: number;
|
|
629
637
|
nodeRunId: string;
|
|
630
638
|
prompt: string;
|
|
631
|
-
error?:
|
|
639
|
+
error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
632
640
|
startedAt?: string | undefined;
|
|
633
641
|
completedAt?: string | undefined;
|
|
634
|
-
executionPrincipal?: {
|
|
635
|
-
principalType: "serviceAccount" | "user" | "system";
|
|
636
|
-
principalId: string;
|
|
637
|
-
} | undefined;
|
|
638
642
|
modelId?: string | undefined;
|
|
639
643
|
finishReason?: string | undefined;
|
|
640
|
-
usage?:
|
|
644
|
+
usage?: {
|
|
645
|
+
reportingStatus: "complete" | "partial" | "unavailable";
|
|
646
|
+
inputTokens?: number | undefined;
|
|
647
|
+
outputTokens?: number | undefined;
|
|
648
|
+
totalTokens?: number | undefined;
|
|
649
|
+
uncachedInputTokens?: number | undefined;
|
|
650
|
+
cacheReadInputTokens?: number | undefined;
|
|
651
|
+
cacheWriteInputTokens?: number | undefined;
|
|
652
|
+
textOutputTokens?: number | undefined;
|
|
653
|
+
reasoningOutputTokens?: number | undefined;
|
|
654
|
+
} | undefined;
|
|
641
655
|
diagnostics?: unknown[] | undefined;
|
|
642
656
|
trace?: unknown[] | undefined;
|
|
643
657
|
};
|
|
@@ -682,35 +696,33 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
682
696
|
response: {
|
|
683
697
|
200: {
|
|
684
698
|
run: {
|
|
685
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
686
699
|
projectId: string;
|
|
687
700
|
id: string;
|
|
701
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
688
702
|
startedAt: string;
|
|
689
|
-
input: Record<string,
|
|
690
|
-
workflowId: string;
|
|
703
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
691
704
|
requestedBy: {
|
|
692
|
-
principalType: "
|
|
705
|
+
principalType: "user" | "serviceAccount" | "system";
|
|
693
706
|
principalId: string;
|
|
694
707
|
};
|
|
695
|
-
|
|
708
|
+
workflowId: string;
|
|
709
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
|
|
696
710
|
queuedAt?: string | undefined;
|
|
697
711
|
finishedAt?: string | undefined;
|
|
712
|
+
output?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
698
713
|
};
|
|
699
714
|
nodes: {
|
|
700
|
-
status: "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
701
715
|
projectId: string;
|
|
702
716
|
id: string;
|
|
717
|
+
status: "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
703
718
|
startedAt: string;
|
|
704
|
-
input: Record<string,
|
|
719
|
+
input: Record<string, import("../schemas/common").JsonValue>;
|
|
705
720
|
workflowId: string;
|
|
706
721
|
nodeIndex: number;
|
|
707
|
-
nodeType: "action" | "
|
|
722
|
+
nodeType: "action" | "step" | "intervention" | "agent";
|
|
708
723
|
nodeId: string;
|
|
709
724
|
nodeKey: string;
|
|
710
725
|
workflowRunId: string;
|
|
711
|
-
error?: string | undefined;
|
|
712
|
-
finishedAt?: string | undefined;
|
|
713
|
-
output?: Record<string, unknown> | undefined;
|
|
714
726
|
agentExecution?: {
|
|
715
727
|
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
716
728
|
agentId: string;
|
|
@@ -719,8 +731,21 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
719
731
|
completedAt?: string | undefined;
|
|
720
732
|
modelId?: string | undefined;
|
|
721
733
|
finishReason?: string | undefined;
|
|
722
|
-
usage?:
|
|
734
|
+
usage?: {
|
|
735
|
+
reportingStatus: "complete" | "partial" | "unavailable";
|
|
736
|
+
inputTokens?: number | undefined;
|
|
737
|
+
outputTokens?: number | undefined;
|
|
738
|
+
totalTokens?: number | undefined;
|
|
739
|
+
uncachedInputTokens?: number | undefined;
|
|
740
|
+
cacheReadInputTokens?: number | undefined;
|
|
741
|
+
cacheWriteInputTokens?: number | undefined;
|
|
742
|
+
textOutputTokens?: number | undefined;
|
|
743
|
+
reasoningOutputTokens?: number | undefined;
|
|
744
|
+
} | undefined;
|
|
723
745
|
} | undefined;
|
|
746
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
|
|
747
|
+
finishedAt?: string | undefined;
|
|
748
|
+
output?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
724
749
|
}[];
|
|
725
750
|
};
|
|
726
751
|
400: {
|
|
@@ -908,7 +933,7 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
908
933
|
runs: {
|
|
909
934
|
post: {
|
|
910
935
|
body: {
|
|
911
|
-
input?: Record<string,
|
|
936
|
+
input?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
912
937
|
};
|
|
913
938
|
params: {
|
|
914
939
|
workflowId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/routes/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/routes/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EAKlB,MAAM,YAAY,CAAA;AAcnB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA6gBpC,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkxBrE"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OntologySource } from "@sixb/core";
|
|
2
|
+
import { type AgentRunActivityEvent } from "@sixb/core/agents/streams";
|
|
3
|
+
import type { Sixb } from "@sixb/core/internal/request-execution";
|
|
2
4
|
import type { Elysia } from "elysia";
|
|
3
5
|
import { z } from "zod";
|
|
4
6
|
import type { SixbServer } from "../../server";
|
|
@@ -14,6 +16,12 @@ declare const AgentStreamMessageSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
14
16
|
type: "subscribe";
|
|
15
17
|
runId: string;
|
|
16
18
|
afterCursor?: string | undefined;
|
|
19
|
+
}>, z.ZodObject<{
|
|
20
|
+
type: z.ZodLiteral<"subscribe.activity">;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
type: "subscribe.activity";
|
|
23
|
+
}, {
|
|
24
|
+
type: "subscribe.activity";
|
|
17
25
|
}>, z.ZodObject<{
|
|
18
26
|
type: z.ZodLiteral<"replay">;
|
|
19
27
|
runId: z.ZodString;
|
|
@@ -46,15 +54,13 @@ export declare function parseAgentStreamMessage(payload: unknown): {
|
|
|
46
54
|
ok: false;
|
|
47
55
|
error: string;
|
|
48
56
|
};
|
|
49
|
-
export declare function canAccessAgentRunStream(sixb: Sixb<readonly OntologySource[]>,
|
|
50
|
-
readonly runId: string;
|
|
51
|
-
readonly authz: AuthorizationContext | null;
|
|
52
|
-
}): Promise<{
|
|
57
|
+
export declare function canAccessAgentRunStream(sixb: Sixb<readonly OntologySource[]>, runId: string): Promise<{
|
|
53
58
|
ok: true;
|
|
54
59
|
} | {
|
|
55
60
|
ok: false;
|
|
56
61
|
message: string;
|
|
57
62
|
}>;
|
|
63
|
+
export declare function canAccessAgentThreadActivity(sixb: Sixb<readonly OntologySource[]>, event: AgentRunActivityEvent): Promise<boolean>;
|
|
58
64
|
export declare function registerAgentStreamRoutes(app: Elysia, server: SixbServer): Elysia<"", {
|
|
59
65
|
decorator: {};
|
|
60
66
|
store: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/agents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/agents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAEL,KAAK,qBAAqB,EAK3B,MAAM,2BAA2B,CAAA;AAElC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAA;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAgC9C,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK5B,CAAA;AAMF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GACpD;IACE,EAAE,EAAE,IAAI,CAAA;IACR,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;CAC/C,GACD;IACE,EAAE,EAAE,KAAK,CAAA;IACT,KAAK,EAAE,MAAM,CAAA;CACd,CAcJ;AAED,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,IAAI,CAAC,SAAS,cAAc,EAAE,CAAC,EACrC,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAMxD;AAED,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,IAAI,CAAC,SAAS,cAAc,EAAE,CAAC,EACrC,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,OAAO,CAAC,CAGlB;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCxE"}
|