@sixb/server 0.1.1 → 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 +13 -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/index.js +3293 -2704
- package/dist/index.js.map +55 -50
- 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 +84 -84
- 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 +8 -4
- 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 +50 -50
- package/dist/routes/ontology.d.ts.map +1 -1
- package/dist/routes/pipelines.d.ts +24 -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 +20 -25
- 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 +74 -48
- 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 +442 -439
- 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 +142 -142
- 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 +2 -2
- 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 +118 -118
- package/dist/schemas/pipelines.d.ts +95 -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 +65 -108
- 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 +516 -183
- 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 +4 -4
- 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 +26 -36
- package/src/auth/session-cookies.ts +3 -3
- package/src/connectors/http.ts +110 -0
- package/src/openapi/tags.ts +9 -1
- package/src/registerRoutes.ts +34 -23
- package/src/routes/action-runs.ts +39 -39
- package/src/routes/actions.ts +7 -13
- package/src/routes/agent-api-gateway.ts +41 -38
- 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 +22 -30
- package/src/routes/links.ts +31 -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 +226 -248
- 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/pipelines.ts +23 -15
- package/src/schemas/projections.ts +17 -3
- package/src/schemas/syncs.ts +13 -8
- package/src/schemas/webhook-runs.ts +10 -5
- package/src/schemas/workflows.ts +16 -6
- package/src/server.ts +65 -26
- package/src/utils/http.ts +34 -6
- package/src/utils/ws.ts +10 -5
package/dist/routes/status.d.ts
CHANGED
|
@@ -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 registerStatusRoutes(app: Elysia,
|
|
3
|
+
export declare function registerStatusRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
|
|
4
4
|
decorator: {};
|
|
5
5
|
store: {};
|
|
6
6
|
derive: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/routes/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/routes/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAOpC,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CnE"}
|
package/dist/routes/syncs.d.ts
CHANGED
|
@@ -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 registerSyncRoutes(app: Elysia,
|
|
3
|
+
export declare function registerSyncRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
|
|
4
4
|
decorator: {};
|
|
5
5
|
store: {};
|
|
6
6
|
derive: {};
|
|
@@ -32,17 +32,15 @@ export declare function registerSyncRoutes(app: Elysia, sixb: Sixb<readonly Onto
|
|
|
32
32
|
scheduleId: string;
|
|
33
33
|
}[];
|
|
34
34
|
latestRun: {
|
|
35
|
-
status: "running" | "succeeded" | "failed" | "cancelled";
|
|
36
35
|
projectId: string;
|
|
37
36
|
id: string;
|
|
37
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
38
38
|
mode: "append" | "snapshot" | "merge";
|
|
39
|
-
|
|
39
|
+
queuedAt: string;
|
|
40
40
|
datasetId: string;
|
|
41
41
|
syncId: string;
|
|
42
|
-
error?:
|
|
43
|
-
|
|
44
|
-
name?: string | undefined;
|
|
45
|
-
} | undefined;
|
|
42
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
|
|
43
|
+
startedAt?: string | undefined;
|
|
46
44
|
finishedAt?: string | undefined;
|
|
47
45
|
output?: {
|
|
48
46
|
datasetId: string;
|
|
@@ -69,8 +67,8 @@ export declare function registerSyncRoutes(app: Elysia, sixb: Sixb<readonly Onto
|
|
|
69
67
|
};
|
|
70
68
|
};
|
|
71
69
|
connector: {
|
|
72
|
-
type: string;
|
|
73
70
|
id: string;
|
|
71
|
+
type: string;
|
|
74
72
|
};
|
|
75
73
|
}[];
|
|
76
74
|
422: {
|
|
@@ -106,17 +104,15 @@ export declare function registerSyncRoutes(app: Elysia, sixb: Sixb<readonly Onto
|
|
|
106
104
|
scheduleId: string;
|
|
107
105
|
}[];
|
|
108
106
|
latestRun: {
|
|
109
|
-
status: "running" | "succeeded" | "failed" | "cancelled";
|
|
110
107
|
projectId: string;
|
|
111
108
|
id: string;
|
|
109
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
112
110
|
mode: "append" | "snapshot" | "merge";
|
|
113
|
-
|
|
111
|
+
queuedAt: string;
|
|
114
112
|
datasetId: string;
|
|
115
113
|
syncId: string;
|
|
116
|
-
error?:
|
|
117
|
-
|
|
118
|
-
name?: string | undefined;
|
|
119
|
-
} | undefined;
|
|
114
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
|
|
115
|
+
startedAt?: string | undefined;
|
|
120
116
|
finishedAt?: string | undefined;
|
|
121
117
|
output?: {
|
|
122
118
|
datasetId: string;
|
|
@@ -143,8 +139,8 @@ export declare function registerSyncRoutes(app: Elysia, sixb: Sixb<readonly Onto
|
|
|
143
139
|
};
|
|
144
140
|
};
|
|
145
141
|
connector: {
|
|
146
|
-
type: string;
|
|
147
142
|
id: string;
|
|
143
|
+
type: string;
|
|
148
144
|
};
|
|
149
145
|
};
|
|
150
146
|
404: {
|
|
@@ -171,12 +167,12 @@ export declare function registerSyncRoutes(app: Elysia, sixb: Sixb<readonly Onto
|
|
|
171
167
|
body: unknown;
|
|
172
168
|
params: {};
|
|
173
169
|
query: {
|
|
174
|
-
status?: "running" | "succeeded" | "failed" | "cancelled" | undefined;
|
|
170
|
+
status?: "queued" | "running" | "succeeded" | "failed" | "cancelled" | undefined;
|
|
171
|
+
startedAfter?: string | undefined;
|
|
172
|
+
startedBefore?: string | undefined;
|
|
175
173
|
limit?: string | undefined;
|
|
176
174
|
offset?: string | undefined;
|
|
177
175
|
order?: "asc" | "desc" | undefined;
|
|
178
|
-
startedAfter?: string | undefined;
|
|
179
|
-
startedBefore?: string | undefined;
|
|
180
176
|
datasetId?: string | undefined;
|
|
181
177
|
syncId?: string | undefined;
|
|
182
178
|
};
|
|
@@ -184,17 +180,15 @@ export declare function registerSyncRoutes(app: Elysia, sixb: Sixb<readonly Onto
|
|
|
184
180
|
response: {
|
|
185
181
|
200: {
|
|
186
182
|
runs: {
|
|
187
|
-
status: "running" | "succeeded" | "failed" | "cancelled";
|
|
188
183
|
projectId: string;
|
|
189
184
|
id: string;
|
|
185
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
190
186
|
mode: "append" | "snapshot" | "merge";
|
|
191
|
-
|
|
187
|
+
queuedAt: string;
|
|
192
188
|
datasetId: string;
|
|
193
189
|
syncId: string;
|
|
194
|
-
error?:
|
|
195
|
-
|
|
196
|
-
name?: string | undefined;
|
|
197
|
-
} | undefined;
|
|
190
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "queue.enqueue_failed" | "runtime.cancelled" | "sync.execution_failed"> | undefined;
|
|
191
|
+
startedAt?: string | undefined;
|
|
198
192
|
finishedAt?: string | undefined;
|
|
199
193
|
output?: {
|
|
200
194
|
datasetId: string;
|
|
@@ -244,6 +238,7 @@ export declare function registerSyncRoutes(app: Elysia, sixb: Sixb<readonly Onto
|
|
|
244
238
|
response: {
|
|
245
239
|
200: {
|
|
246
240
|
error: string;
|
|
241
|
+
code?: import("@sixb/core").SixbErrorCode;
|
|
247
242
|
} | {
|
|
248
243
|
runId: string;
|
|
249
244
|
jobId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syncs.d.ts","sourceRoot":"","sources":["../../src/routes/syncs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"syncs.d.ts","sourceRoot":"","sources":["../../src/routes/syncs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,YAAY,CAAA;AAE9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAqFpC,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiIjE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { SixbHostView } from "@sixb/core";
|
|
2
2
|
import type { Elysia } from "elysia";
|
|
3
|
-
export declare function registerTelemetryRoutes(app: Elysia,
|
|
3
|
+
export declare function registerTelemetryRoutes(app: Elysia, _host: SixbHostView): Elysia<"", {
|
|
4
4
|
decorator: {};
|
|
5
5
|
store: {};
|
|
6
6
|
derive: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/routes/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/routes/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA2BpC,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsKvE"}
|
|
@@ -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 registerWebhookRunRoutes(app: Elysia,
|
|
3
|
+
export declare function registerWebhookRunRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
|
|
4
4
|
decorator: {};
|
|
5
5
|
store: {};
|
|
6
6
|
derive: {};
|
|
@@ -22,12 +22,12 @@ export declare function registerWebhookRunRoutes(app: Elysia, sixb: Sixb<readonl
|
|
|
22
22
|
body: unknown;
|
|
23
23
|
params: {};
|
|
24
24
|
query: {
|
|
25
|
-
status?: "running" | "succeeded" | "failed" |
|
|
25
|
+
status?: "running" | "succeeded" | "failed" | undefined;
|
|
26
|
+
startedAfter?: string | undefined;
|
|
27
|
+
startedBefore?: string | undefined;
|
|
26
28
|
limit?: string | undefined;
|
|
27
29
|
offset?: string | undefined;
|
|
28
30
|
order?: "asc" | "desc" | undefined;
|
|
29
|
-
startedAfter?: string | undefined;
|
|
30
|
-
startedBefore?: string | undefined;
|
|
31
31
|
connectorId?: string | undefined;
|
|
32
32
|
idempotencyKey?: string | undefined;
|
|
33
33
|
webhookId?: string | undefined;
|
|
@@ -36,20 +36,20 @@ export declare function registerWebhookRunRoutes(app: Elysia, sixb: Sixb<readonl
|
|
|
36
36
|
response: {
|
|
37
37
|
200: {
|
|
38
38
|
runs: {
|
|
39
|
-
status: "running" | "succeeded" | "failed" | "skipped";
|
|
40
39
|
projectId: string;
|
|
41
40
|
id: string;
|
|
41
|
+
status: "running" | "succeeded" | "failed";
|
|
42
42
|
startedAt: string;
|
|
43
43
|
method: string;
|
|
44
44
|
route: string;
|
|
45
45
|
connectorId: string;
|
|
46
|
+
executionId: string;
|
|
46
47
|
webhookId: string;
|
|
47
|
-
|
|
48
|
+
requestBodyBytes: number;
|
|
49
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "webhook.delivery_failed" | "webhook.delivery_rejected"> | undefined;
|
|
48
50
|
finishedAt?: string | undefined;
|
|
49
51
|
idempotencyKey?: string | undefined;
|
|
50
|
-
requestBodyBytes?: number | undefined;
|
|
51
52
|
responseStatus?: number | undefined;
|
|
52
|
-
deliveryClaimResult?: "claimed" | "duplicate" | "in_progress" | undefined;
|
|
53
53
|
}[];
|
|
54
54
|
hasMore: boolean;
|
|
55
55
|
total: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-runs.d.ts","sourceRoot":"","sources":["../../src/routes/webhook-runs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"webhook-runs.d.ts","sourceRoot":"","sources":["../../src/routes/webhook-runs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA+BpC,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CvE"}
|
|
@@ -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 registerWebhookRoutes(app: Elysia,
|
|
3
|
+
export declare function registerWebhookRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
|
|
4
4
|
decorator: {};
|
|
5
5
|
store: {};
|
|
6
6
|
derive: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/routes/webhooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/routes/webhooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAMV,YAAY,EAKb,MAAM,YAAY,CAAA;AAOnB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAgDpC,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAapE"}
|
|
@@ -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: {};
|
|
@@ -32,43 +32,43 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
32
32
|
scheduleId: string;
|
|
33
33
|
}[];
|
|
34
34
|
nodes: ({
|
|
35
|
-
type: "step";
|
|
36
35
|
id: string;
|
|
36
|
+
type: "step";
|
|
37
37
|
output: Record<string, import("../schemas/common").JsonValue>;
|
|
38
38
|
key: string;
|
|
39
39
|
input: Record<string, import("../schemas/common").JsonValue>;
|
|
40
40
|
} | {
|
|
41
|
+
id: string;
|
|
41
42
|
type: "action";
|
|
42
43
|
params: Record<string, import("../schemas/common").JsonValue>;
|
|
43
|
-
id: string;
|
|
44
44
|
key: string;
|
|
45
45
|
objectTypeId?: string | undefined;
|
|
46
46
|
} | {
|
|
47
|
+
id: string;
|
|
47
48
|
response: Record<string, import("../schemas/common").JsonValue>;
|
|
48
49
|
type: "intervention";
|
|
49
|
-
id: string;
|
|
50
50
|
key: string;
|
|
51
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;
|
|
55
|
+
type: "agent";
|
|
57
56
|
output: Record<string, import("../schemas/common").JsonValue>;
|
|
58
57
|
key: string;
|
|
58
|
+
agentId: string;
|
|
59
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
|
-
workflowId: string;
|
|
67
66
|
requestedBy: {
|
|
68
67
|
principalType: "user" | "serviceAccount" | "system";
|
|
69
68
|
principalId: string;
|
|
70
69
|
};
|
|
71
|
-
|
|
70
|
+
workflowId: string;
|
|
71
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
|
|
72
72
|
queuedAt?: string | undefined;
|
|
73
73
|
finishedAt?: string | undefined;
|
|
74
74
|
} | null;
|
|
@@ -106,43 +106,43 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
106
106
|
scheduleId: string;
|
|
107
107
|
}[];
|
|
108
108
|
nodes: ({
|
|
109
|
-
type: "step";
|
|
110
109
|
id: string;
|
|
110
|
+
type: "step";
|
|
111
111
|
output: Record<string, import("../schemas/common").JsonValue>;
|
|
112
112
|
key: string;
|
|
113
113
|
input: Record<string, import("../schemas/common").JsonValue>;
|
|
114
114
|
} | {
|
|
115
|
+
id: string;
|
|
115
116
|
type: "action";
|
|
116
117
|
params: Record<string, import("../schemas/common").JsonValue>;
|
|
117
|
-
id: string;
|
|
118
118
|
key: string;
|
|
119
119
|
objectTypeId?: string | undefined;
|
|
120
120
|
} | {
|
|
121
|
+
id: string;
|
|
121
122
|
response: Record<string, import("../schemas/common").JsonValue>;
|
|
122
123
|
type: "intervention";
|
|
123
|
-
id: string;
|
|
124
124
|
key: string;
|
|
125
125
|
input: Record<string, import("../schemas/common").JsonValue>;
|
|
126
126
|
description?: string | undefined;
|
|
127
127
|
} | {
|
|
128
|
-
agentId: string;
|
|
129
|
-
type: "agent";
|
|
130
128
|
id: string;
|
|
129
|
+
type: "agent";
|
|
131
130
|
output: Record<string, import("../schemas/common").JsonValue>;
|
|
132
131
|
key: string;
|
|
132
|
+
agentId: string;
|
|
133
133
|
input: Record<string, import("../schemas/common").JsonValue>;
|
|
134
134
|
})[];
|
|
135
135
|
latestRun: {
|
|
136
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
137
136
|
projectId: string;
|
|
138
137
|
id: string;
|
|
138
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
139
139
|
startedAt: string;
|
|
140
|
-
workflowId: string;
|
|
141
140
|
requestedBy: {
|
|
142
141
|
principalType: "user" | "serviceAccount" | "system";
|
|
143
142
|
principalId: string;
|
|
144
143
|
};
|
|
145
|
-
|
|
144
|
+
workflowId: string;
|
|
145
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
|
|
146
146
|
queuedAt?: string | undefined;
|
|
147
147
|
finishedAt?: string | undefined;
|
|
148
148
|
} | null;
|
|
@@ -190,9 +190,9 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
190
190
|
hasMore: boolean;
|
|
191
191
|
total: number;
|
|
192
192
|
interventions: {
|
|
193
|
-
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
194
193
|
projectId: string;
|
|
195
194
|
id: string;
|
|
195
|
+
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
196
196
|
input: Record<string, import("../schemas/common").JsonValue>;
|
|
197
197
|
workflowId: string;
|
|
198
198
|
nodeRunId: string;
|
|
@@ -250,9 +250,9 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
250
250
|
headers: unknown;
|
|
251
251
|
response: {
|
|
252
252
|
200: {
|
|
253
|
-
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
254
253
|
projectId: string;
|
|
255
254
|
id: string;
|
|
255
|
+
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
256
256
|
input: Record<string, import("../schemas/common").JsonValue>;
|
|
257
257
|
workflowId: string;
|
|
258
258
|
nodeRunId: string;
|
|
@@ -320,9 +320,9 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
320
320
|
} | {
|
|
321
321
|
jobId: string;
|
|
322
322
|
intervention: {
|
|
323
|
-
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
324
323
|
projectId: string;
|
|
325
324
|
id: string;
|
|
325
|
+
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
326
326
|
input: Record<string, import("../schemas/common").JsonValue>;
|
|
327
327
|
workflowId: string;
|
|
328
328
|
nodeRunId: string;
|
|
@@ -360,9 +360,9 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
360
360
|
202: {
|
|
361
361
|
jobId: string;
|
|
362
362
|
intervention: {
|
|
363
|
-
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
364
363
|
projectId: string;
|
|
365
364
|
id: string;
|
|
365
|
+
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
366
366
|
input: Record<string, import("../schemas/common").JsonValue>;
|
|
367
367
|
workflowId: string;
|
|
368
368
|
nodeRunId: string;
|
|
@@ -418,9 +418,9 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
418
418
|
response: {
|
|
419
419
|
200: {
|
|
420
420
|
intervention: {
|
|
421
|
-
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
422
421
|
projectId: string;
|
|
423
422
|
id: string;
|
|
423
|
+
status: "cancelled" | "expired" | "pending" | "submitted";
|
|
424
424
|
input: Record<string, import("../schemas/common").JsonValue>;
|
|
425
425
|
workflowId: string;
|
|
426
426
|
nodeRunId: string;
|
|
@@ -478,27 +478,27 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
478
478
|
params: {};
|
|
479
479
|
query: {
|
|
480
480
|
status?: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting" | undefined;
|
|
481
|
+
startedAfter?: string | undefined;
|
|
482
|
+
startedBefore?: string | undefined;
|
|
481
483
|
limit?: string | undefined;
|
|
482
484
|
offset?: string | undefined;
|
|
483
485
|
order?: "asc" | "desc" | undefined;
|
|
484
|
-
startedAfter?: string | undefined;
|
|
485
|
-
startedBefore?: string | undefined;
|
|
486
486
|
workflowId?: string | undefined;
|
|
487
487
|
};
|
|
488
488
|
headers: unknown;
|
|
489
489
|
response: {
|
|
490
490
|
200: {
|
|
491
491
|
runs: {
|
|
492
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
493
492
|
projectId: string;
|
|
494
493
|
id: string;
|
|
494
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
495
495
|
startedAt: string;
|
|
496
|
-
workflowId: string;
|
|
497
496
|
requestedBy: {
|
|
498
497
|
principalType: "user" | "serviceAccount" | "system";
|
|
499
498
|
principalId: string;
|
|
500
499
|
};
|
|
501
|
-
|
|
500
|
+
workflowId: string;
|
|
501
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
|
|
502
502
|
queuedAt?: string | undefined;
|
|
503
503
|
finishedAt?: string | undefined;
|
|
504
504
|
}[];
|
|
@@ -538,30 +538,30 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
538
538
|
response: {
|
|
539
539
|
200: {
|
|
540
540
|
run: {
|
|
541
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
542
541
|
projectId: string;
|
|
543
542
|
id: string;
|
|
543
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
544
544
|
startedAt: string;
|
|
545
545
|
input: Record<string, import("../schemas/common").JsonValue>;
|
|
546
|
-
workflowId: string;
|
|
547
546
|
requestedBy: {
|
|
548
547
|
principalType: "user" | "serviceAccount" | "system";
|
|
549
548
|
principalId: string;
|
|
550
549
|
};
|
|
551
|
-
|
|
550
|
+
workflowId: string;
|
|
551
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
|
|
552
552
|
queuedAt?: string | undefined;
|
|
553
553
|
finishedAt?: string | undefined;
|
|
554
554
|
output?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
555
555
|
};
|
|
556
556
|
nodes: {
|
|
557
|
-
status: "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
558
557
|
projectId: string;
|
|
559
558
|
id: string;
|
|
559
|
+
status: "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
560
560
|
startedAt: string;
|
|
561
561
|
input: Record<string, import("../schemas/common").JsonValue>;
|
|
562
562
|
workflowId: string;
|
|
563
563
|
nodeIndex: number;
|
|
564
|
-
nodeType: "action" | "
|
|
564
|
+
nodeType: "action" | "step" | "intervention" | "agent";
|
|
565
565
|
nodeId: string;
|
|
566
566
|
nodeKey: string;
|
|
567
567
|
workflowRunId: string;
|
|
@@ -573,9 +573,19 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
573
573
|
completedAt?: string | undefined;
|
|
574
574
|
modelId?: string | undefined;
|
|
575
575
|
finishReason?: string | undefined;
|
|
576
|
-
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;
|
|
577
587
|
} | undefined;
|
|
578
|
-
error?:
|
|
588
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
|
|
579
589
|
finishedAt?: string | undefined;
|
|
580
590
|
output?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
581
591
|
}[];
|
|
@@ -626,16 +636,22 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
626
636
|
attempt: number;
|
|
627
637
|
nodeRunId: string;
|
|
628
638
|
prompt: string;
|
|
629
|
-
error?:
|
|
639
|
+
error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
630
640
|
startedAt?: string | undefined;
|
|
631
641
|
completedAt?: string | undefined;
|
|
632
|
-
executionPrincipal?: {
|
|
633
|
-
principalType: "user" | "serviceAccount" | "system";
|
|
634
|
-
principalId: string;
|
|
635
|
-
} | undefined;
|
|
636
642
|
modelId?: string | undefined;
|
|
637
643
|
finishReason?: string | undefined;
|
|
638
|
-
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;
|
|
639
655
|
diagnostics?: unknown[] | undefined;
|
|
640
656
|
trace?: unknown[] | undefined;
|
|
641
657
|
};
|
|
@@ -680,30 +696,30 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
680
696
|
response: {
|
|
681
697
|
200: {
|
|
682
698
|
run: {
|
|
683
|
-
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
684
699
|
projectId: string;
|
|
685
700
|
id: string;
|
|
701
|
+
status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
686
702
|
startedAt: string;
|
|
687
703
|
input: Record<string, import("../schemas/common").JsonValue>;
|
|
688
|
-
workflowId: string;
|
|
689
704
|
requestedBy: {
|
|
690
705
|
principalType: "user" | "serviceAccount" | "system";
|
|
691
706
|
principalId: string;
|
|
692
707
|
};
|
|
693
|
-
|
|
708
|
+
workflowId: string;
|
|
709
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
|
|
694
710
|
queuedAt?: string | undefined;
|
|
695
711
|
finishedAt?: string | undefined;
|
|
696
712
|
output?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
697
713
|
};
|
|
698
714
|
nodes: {
|
|
699
|
-
status: "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
700
715
|
projectId: string;
|
|
701
716
|
id: string;
|
|
717
|
+
status: "running" | "succeeded" | "failed" | "cancelled" | "waiting";
|
|
702
718
|
startedAt: string;
|
|
703
719
|
input: Record<string, import("../schemas/common").JsonValue>;
|
|
704
720
|
workflowId: string;
|
|
705
721
|
nodeIndex: number;
|
|
706
|
-
nodeType: "action" | "
|
|
722
|
+
nodeType: "action" | "step" | "intervention" | "agent";
|
|
707
723
|
nodeId: string;
|
|
708
724
|
nodeKey: string;
|
|
709
725
|
workflowRunId: string;
|
|
@@ -715,9 +731,19 @@ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly
|
|
|
715
731
|
completedAt?: string | undefined;
|
|
716
732
|
modelId?: string | undefined;
|
|
717
733
|
finishReason?: string | undefined;
|
|
718
|
-
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;
|
|
719
745
|
} | undefined;
|
|
720
|
-
error?:
|
|
746
|
+
error?: import("@sixb/core").SixbFailure<"internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
|
|
721
747
|
finishedAt?: string | undefined;
|
|
722
748
|
output?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
723
749
|
}[];
|
|
@@ -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"}
|