@sixb/server 0.1.15 → 0.1.17
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 +6 -0
- package/dist/auth/public-routes.d.ts.map +1 -1
- package/dist/auth/shared-access.d.ts.map +1 -1
- package/dist/index.js +408 -327
- package/dist/index.js.map +19 -18
- package/dist/registerRoutes.d.ts.map +1 -1
- package/dist/routes/agents.d.ts +8 -0
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/ai-accounting.d.ts.map +1 -1
- package/dist/routes/auth.d.ts +1 -1
- package/dist/routes/file-downloads.d.ts +98 -0
- package/dist/routes/file-downloads.d.ts.map +1 -0
- package/dist/routes/objects.d.ts +3 -0
- package/dist/routes/objects.d.ts.map +1 -1
- package/dist/routes/ontology.d.ts +6 -4
- package/dist/routes/ontology.d.ts.map +1 -1
- package/dist/routes/status.d.ts +0 -4
- package/dist/routes/status.d.ts.map +1 -1
- package/dist/routes/workflows.d.ts +3 -0
- package/dist/routes/workflows.d.ts.map +1 -1
- package/dist/routes/ws/events.d.ts.map +1 -1
- package/dist/routes/ws/logs.d.ts +11 -0
- package/dist/routes/ws/logs.d.ts.map +1 -1
- package/dist/routes/ws/subscription-hub.d.ts +66 -0
- package/dist/routes/ws/subscription-hub.d.ts.map +1 -0
- package/dist/schemas/agents.d.ts +33 -0
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/ai-accounting.d.ts +224 -100
- package/dist/schemas/ai-accounting.d.ts.map +1 -1
- package/dist/schemas/ai-usage.d.ts +3 -0
- package/dist/schemas/ai-usage.d.ts.map +1 -1
- package/dist/schemas/auth.d.ts +2 -2
- package/dist/schemas/objects.d.ts.map +1 -1
- package/dist/schemas/ontology.d.ts +27 -18
- package/dist/schemas/ontology.d.ts.map +1 -1
- package/dist/schemas/status.d.ts +0 -26
- package/dist/schemas/status.d.ts.map +1 -1
- package/dist/schemas/workflows.d.ts +35 -0
- package/dist/schemas/workflows.d.ts.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/auth/public-routes.ts +10 -0
- package/src/auth/shared-access.ts +48 -6
- package/src/registerRoutes.ts +2 -0
- package/src/routes/ai-accounting.ts +1 -0
- package/src/routes/file-downloads.ts +48 -0
- package/src/routes/objects.ts +13 -3
- package/src/routes/ontology.ts +1 -0
- package/src/routes/ws/events.ts +96 -133
- package/src/routes/ws/logs.ts +67 -5
- package/src/routes/ws/{log-subscription-hub.ts → subscription-hub.ts} +137 -127
- package/src/schemas/ai-accounting.ts +5 -0
- package/src/schemas/ai-usage.ts +3 -0
- package/src/schemas/objects.ts +28 -2
- package/src/schemas/ontology.ts +1 -0
- package/src/schemas/status.ts +0 -6
- package/src/server.ts +5 -0
- package/dist/routes/ws/log-subscription-hub.d.ts +0 -50
- package/dist/routes/ws/log-subscription-hub.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerRoutes.d.ts","sourceRoot":"","sources":["../src/registerRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAMhE,OAAO,EACL,KAAK,+BAA+B,EAErC,MAAM,oCAAoC,CAAA;
|
|
1
|
+
{"version":3,"file":"registerRoutes.d.ts","sourceRoot":"","sources":["../src/registerRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAMhE,OAAO,EACL,KAAK,+BAA+B,EAErC,MAAM,oCAAoC,CAAA;AAwB3C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,oBAAoB,EAAE,+BAA+B,CAAA;IAC9D,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAA;CAC5C;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+B5F"}
|
package/dist/routes/agents.d.ts
CHANGED
|
@@ -611,6 +611,7 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
611
611
|
cacheWriteInputTokens?: number | undefined;
|
|
612
612
|
textOutputTokens?: number | undefined;
|
|
613
613
|
reasoningOutputTokens?: number | undefined;
|
|
614
|
+
audioDurationMs?: number | undefined;
|
|
614
615
|
} | undefined;
|
|
615
616
|
cost?: {
|
|
616
617
|
amounts: {
|
|
@@ -688,6 +689,7 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
688
689
|
cacheWriteInputTokens?: number | undefined;
|
|
689
690
|
textOutputTokens?: number | undefined;
|
|
690
691
|
reasoningOutputTokens?: number | undefined;
|
|
692
|
+
audioDurationMs?: number | undefined;
|
|
691
693
|
} | undefined;
|
|
692
694
|
cost?: {
|
|
693
695
|
amounts: {
|
|
@@ -773,6 +775,7 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
773
775
|
cacheWriteInputTokens?: number | undefined;
|
|
774
776
|
textOutputTokens?: number | undefined;
|
|
775
777
|
reasoningOutputTokens?: number | undefined;
|
|
778
|
+
audioDurationMs?: number | undefined;
|
|
776
779
|
} | undefined;
|
|
777
780
|
cost?: {
|
|
778
781
|
amounts: {
|
|
@@ -842,6 +845,7 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
842
845
|
cacheWriteInputTokens?: number | undefined;
|
|
843
846
|
textOutputTokens?: number | undefined;
|
|
844
847
|
reasoningOutputTokens?: number | undefined;
|
|
848
|
+
audioDurationMs?: number | undefined;
|
|
845
849
|
} | undefined;
|
|
846
850
|
cost?: {
|
|
847
851
|
amounts: {
|
|
@@ -928,6 +932,7 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
928
932
|
cacheWriteInputTokens?: number | undefined;
|
|
929
933
|
textOutputTokens?: number | undefined;
|
|
930
934
|
reasoningOutputTokens?: number | undefined;
|
|
935
|
+
audioDurationMs?: number | undefined;
|
|
931
936
|
} | undefined;
|
|
932
937
|
cost?: {
|
|
933
938
|
amounts: {
|
|
@@ -1002,6 +1007,7 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
1002
1007
|
cacheWriteInputTokens?: number | undefined;
|
|
1003
1008
|
textOutputTokens?: number | undefined;
|
|
1004
1009
|
reasoningOutputTokens?: number | undefined;
|
|
1010
|
+
audioDurationMs?: number | undefined;
|
|
1005
1011
|
} | undefined;
|
|
1006
1012
|
cost?: {
|
|
1007
1013
|
amounts: {
|
|
@@ -1092,6 +1098,7 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
1092
1098
|
cacheWriteInputTokens?: number | undefined;
|
|
1093
1099
|
textOutputTokens?: number | undefined;
|
|
1094
1100
|
reasoningOutputTokens?: number | undefined;
|
|
1101
|
+
audioDurationMs?: number | undefined;
|
|
1095
1102
|
} | undefined;
|
|
1096
1103
|
cost?: {
|
|
1097
1104
|
amounts: {
|
|
@@ -1184,6 +1191,7 @@ export declare function registerAgentRoutes(app: Elysia, host: SixbHostView): El
|
|
|
1184
1191
|
cacheWriteInputTokens?: number | undefined;
|
|
1185
1192
|
textOutputTokens?: number | undefined;
|
|
1186
1193
|
reasoningOutputTokens?: number | undefined;
|
|
1194
|
+
audioDurationMs?: number | undefined;
|
|
1187
1195
|
} | undefined;
|
|
1188
1196
|
cost?: {
|
|
1189
1197
|
amounts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/routes/agents.ts"],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;;;;;uCAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2oBvF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-accounting.d.ts","sourceRoot":"","sources":["../../src/routes/ai-accounting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAW9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"ai-accounting.d.ts","sourceRoot":"","sources":["../../src/routes/ai-accounting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAW9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAoMpC,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+VzE"}
|
package/dist/routes/auth.d.ts
CHANGED
|
@@ -211,8 +211,8 @@ export declare function registerAuthRoutes(app: Elysia, host: SixbHostView, opti
|
|
|
211
211
|
post: {
|
|
212
212
|
body: {
|
|
213
213
|
csrfToken: string;
|
|
214
|
-
userCode: string;
|
|
215
214
|
decision: "deny" | "approve";
|
|
215
|
+
userCode: string;
|
|
216
216
|
};
|
|
217
217
|
params: {};
|
|
218
218
|
query: unknown;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { SixbHostView } from "@sixb/core";
|
|
2
|
+
import type { Elysia } from "elysia";
|
|
3
|
+
/**
|
|
4
|
+
* Serves the URLs `blobs.createDownloadUrl()` issues. Public, because their readers — social
|
|
5
|
+
* networks fetching media to publish — cannot hold a session: the token is the credential.
|
|
6
|
+
* Hidden from OpenAPI like webhooks; clients receive these URLs, they never build them.
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerFileDownloadRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
|
|
9
|
+
decorator: {};
|
|
10
|
+
store: {};
|
|
11
|
+
derive: {};
|
|
12
|
+
resolve: {};
|
|
13
|
+
}, {
|
|
14
|
+
typebox: {};
|
|
15
|
+
error: {};
|
|
16
|
+
}, {
|
|
17
|
+
schema: {};
|
|
18
|
+
standaloneSchema: {};
|
|
19
|
+
macro: {};
|
|
20
|
+
macroFn: {};
|
|
21
|
+
parser: {};
|
|
22
|
+
response: {};
|
|
23
|
+
}, {
|
|
24
|
+
api: {
|
|
25
|
+
files: {
|
|
26
|
+
downloads: {
|
|
27
|
+
":token": {
|
|
28
|
+
get: {
|
|
29
|
+
body: unknown;
|
|
30
|
+
params: {
|
|
31
|
+
token: string;
|
|
32
|
+
} & {};
|
|
33
|
+
query: unknown;
|
|
34
|
+
headers: unknown;
|
|
35
|
+
response: {
|
|
36
|
+
200: Response | {
|
|
37
|
+
readonly error: string;
|
|
38
|
+
};
|
|
39
|
+
422: {
|
|
40
|
+
type: "validation";
|
|
41
|
+
on: string;
|
|
42
|
+
summary?: string;
|
|
43
|
+
message?: string;
|
|
44
|
+
found?: unknown;
|
|
45
|
+
property?: string;
|
|
46
|
+
expected?: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
} & {
|
|
55
|
+
api: {
|
|
56
|
+
files: {
|
|
57
|
+
downloads: {
|
|
58
|
+
":token": {
|
|
59
|
+
head: {
|
|
60
|
+
body: unknown;
|
|
61
|
+
params: {
|
|
62
|
+
token: string;
|
|
63
|
+
} & {};
|
|
64
|
+
query: unknown;
|
|
65
|
+
headers: unknown;
|
|
66
|
+
response: {
|
|
67
|
+
200: Response | {
|
|
68
|
+
readonly error: string;
|
|
69
|
+
};
|
|
70
|
+
422: {
|
|
71
|
+
type: "validation";
|
|
72
|
+
on: string;
|
|
73
|
+
summary?: string;
|
|
74
|
+
message?: string;
|
|
75
|
+
found?: unknown;
|
|
76
|
+
property?: string;
|
|
77
|
+
expected?: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
}, {
|
|
86
|
+
derive: {};
|
|
87
|
+
resolve: {};
|
|
88
|
+
schema: {};
|
|
89
|
+
standaloneSchema: {};
|
|
90
|
+
response: {};
|
|
91
|
+
}, {
|
|
92
|
+
derive: {};
|
|
93
|
+
resolve: {};
|
|
94
|
+
schema: {};
|
|
95
|
+
standaloneSchema: {};
|
|
96
|
+
response: {};
|
|
97
|
+
}>;
|
|
98
|
+
//# sourceMappingURL=file-downloads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-downloads.d.ts","sourceRoot":"","sources":["../../src/routes/file-downloads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AASpC;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAalC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAN7C"}
|
package/dist/routes/objects.d.ts
CHANGED
|
@@ -311,6 +311,7 @@ export declare function registerObjectRoutes(app: Elysia, host: SixbHostView): E
|
|
|
311
311
|
error: string;
|
|
312
312
|
issues: readonly import("@sixb/core").ObjectQueryValidationIssue[] | readonly import("@sixb/core/internal/query").ObjectQueryPlanningIssue[];
|
|
313
313
|
} | {
|
|
314
|
+
total: number;
|
|
314
315
|
facets: readonly import("@sixb/core/storage").ObjectFacetResult[];
|
|
315
316
|
plan: {
|
|
316
317
|
mode: string;
|
|
@@ -345,6 +346,7 @@ export declare function registerObjectRoutes(app: Elysia, host: SixbHostView): E
|
|
|
345
346
|
query: {
|
|
346
347
|
path: string;
|
|
347
348
|
audience?: "atlas" | "app" | undefined;
|
|
349
|
+
shareGrant?: string | undefined;
|
|
348
350
|
disposition?: "inline" | "attachment" | undefined;
|
|
349
351
|
v?: string | undefined;
|
|
350
352
|
};
|
|
@@ -386,6 +388,7 @@ export declare function registerObjectRoutes(app: Elysia, host: SixbHostView): E
|
|
|
386
388
|
query: {
|
|
387
389
|
path: string;
|
|
388
390
|
audience?: "atlas" | "app" | undefined;
|
|
391
|
+
shareGrant?: string | undefined;
|
|
389
392
|
disposition?: "inline" | "attachment" | undefined;
|
|
390
393
|
v?: string | undefined;
|
|
391
394
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../../src/routes/objects.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,YAAY,EAClB,MAAM,YAAY,CAAA;AAOnB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../../src/routes/objects.ts"],"names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DAA/C,MAAM;wEAAkC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoxBxF"}
|
|
@@ -48,7 +48,6 @@ export declare function registerOntologyRoutes(app: Elysia, host: SixbHostView):
|
|
|
48
48
|
properties?: {
|
|
49
49
|
id: string;
|
|
50
50
|
name: string;
|
|
51
|
-
description?: string | undefined;
|
|
52
51
|
query?: {
|
|
53
52
|
text?: boolean | undefined;
|
|
54
53
|
exact?: boolean | undefined;
|
|
@@ -58,6 +57,7 @@ export declare function registerOntologyRoutes(app: Elysia, host: SixbHostView):
|
|
|
58
57
|
facet?: boolean | undefined;
|
|
59
58
|
weight?: number | undefined;
|
|
60
59
|
} | undefined;
|
|
60
|
+
description?: string | undefined;
|
|
61
61
|
nullable?: boolean | undefined;
|
|
62
62
|
required?: boolean | undefined;
|
|
63
63
|
mode?: "telemetry" | "static" | undefined;
|
|
@@ -77,7 +77,6 @@ export declare function registerOntologyRoutes(app: Elysia, host: SixbHostView):
|
|
|
77
77
|
facet: boolean;
|
|
78
78
|
operators: ("eq" | "neq" | "lt" | "lte" | "gt" | "gte" | "in" | "exists" | "contains")[];
|
|
79
79
|
};
|
|
80
|
-
description?: string | undefined;
|
|
81
80
|
query?: {
|
|
82
81
|
text?: boolean | undefined;
|
|
83
82
|
exact?: boolean | undefined;
|
|
@@ -87,6 +86,7 @@ export declare function registerOntologyRoutes(app: Elysia, host: SixbHostView):
|
|
|
87
86
|
facet?: boolean | undefined;
|
|
88
87
|
weight?: number | undefined;
|
|
89
88
|
} | undefined;
|
|
89
|
+
description?: string | undefined;
|
|
90
90
|
nullable?: boolean | undefined;
|
|
91
91
|
required?: boolean | undefined;
|
|
92
92
|
mode?: "telemetry" | "static" | undefined;
|
|
@@ -107,6 +107,7 @@ export declare function registerOntologyRoutes(app: Elysia, host: SixbHostView):
|
|
|
107
107
|
providerId: string;
|
|
108
108
|
modelId: string;
|
|
109
109
|
dimensions: number;
|
|
110
|
+
inputMode?: "symmetric" | "asymmetric" | undefined;
|
|
110
111
|
representation?: {
|
|
111
112
|
name: string;
|
|
112
113
|
version?: string | undefined;
|
|
@@ -164,7 +165,6 @@ export declare function registerOntologyRoutes(app: Elysia, host: SixbHostView):
|
|
|
164
165
|
properties?: {
|
|
165
166
|
id: string;
|
|
166
167
|
name: string;
|
|
167
|
-
description?: string | undefined;
|
|
168
168
|
query?: {
|
|
169
169
|
text?: boolean | undefined;
|
|
170
170
|
exact?: boolean | undefined;
|
|
@@ -174,6 +174,7 @@ export declare function registerOntologyRoutes(app: Elysia, host: SixbHostView):
|
|
|
174
174
|
facet?: boolean | undefined;
|
|
175
175
|
weight?: number | undefined;
|
|
176
176
|
} | undefined;
|
|
177
|
+
description?: string | undefined;
|
|
177
178
|
nullable?: boolean | undefined;
|
|
178
179
|
required?: boolean | undefined;
|
|
179
180
|
mode?: "telemetry" | "static" | undefined;
|
|
@@ -193,7 +194,6 @@ export declare function registerOntologyRoutes(app: Elysia, host: SixbHostView):
|
|
|
193
194
|
facet: boolean;
|
|
194
195
|
operators: ("eq" | "neq" | "lt" | "lte" | "gt" | "gte" | "in" | "exists" | "contains")[];
|
|
195
196
|
};
|
|
196
|
-
description?: string | undefined;
|
|
197
197
|
query?: {
|
|
198
198
|
text?: boolean | undefined;
|
|
199
199
|
exact?: boolean | undefined;
|
|
@@ -203,6 +203,7 @@ export declare function registerOntologyRoutes(app: Elysia, host: SixbHostView):
|
|
|
203
203
|
facet?: boolean | undefined;
|
|
204
204
|
weight?: number | undefined;
|
|
205
205
|
} | undefined;
|
|
206
|
+
description?: string | undefined;
|
|
206
207
|
nullable?: boolean | undefined;
|
|
207
208
|
required?: boolean | undefined;
|
|
208
209
|
mode?: "telemetry" | "static" | undefined;
|
|
@@ -223,6 +224,7 @@ export declare function registerOntologyRoutes(app: Elysia, host: SixbHostView):
|
|
|
223
224
|
providerId: string;
|
|
224
225
|
modelId: string;
|
|
225
226
|
dimensions: number;
|
|
227
|
+
inputMode?: "symmetric" | "asymmetric" | undefined;
|
|
226
228
|
representation?: {
|
|
227
229
|
name: string;
|
|
228
230
|
version?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ontology.d.ts","sourceRoot":"","sources":["../../src/routes/ontology.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,YAAY,EAAa,MAAM,YAAY,CAAA;AAGnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"ontology.d.ts","sourceRoot":"","sources":["../../src/routes/ontology.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,YAAY,EAAa,MAAM,YAAY,CAAA;AAGnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA2GpC,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CrE"}
|
package/dist/routes/status.d.ts
CHANGED
|
@@ -41,10 +41,6 @@ export declare function registerStatusRoutes(app: Elysia, host: SixbHostView): E
|
|
|
41
41
|
retryingCount: number;
|
|
42
42
|
maxAttempts: number;
|
|
43
43
|
} | null;
|
|
44
|
-
terminalSources: {
|
|
45
|
-
count: number;
|
|
46
|
-
oldestTerminalAt: string | null;
|
|
47
|
-
} | null;
|
|
48
44
|
cleanup: {
|
|
49
45
|
publishedOutboxRowsDeleted: number;
|
|
50
46
|
terminalSourceRowsDeleted: number;
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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"}
|
|
@@ -580,6 +580,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
|
|
|
580
580
|
cacheWriteInputTokens?: number | undefined;
|
|
581
581
|
textOutputTokens?: number | undefined;
|
|
582
582
|
reasoningOutputTokens?: number | undefined;
|
|
583
|
+
audioDurationMs?: number | undefined;
|
|
583
584
|
} | undefined;
|
|
584
585
|
cost?: {
|
|
585
586
|
amounts: {
|
|
@@ -655,6 +656,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
|
|
|
655
656
|
cacheWriteInputTokens?: number | undefined;
|
|
656
657
|
textOutputTokens?: number | undefined;
|
|
657
658
|
reasoningOutputTokens?: number | undefined;
|
|
659
|
+
audioDurationMs?: number | undefined;
|
|
658
660
|
} | undefined;
|
|
659
661
|
cost?: {
|
|
660
662
|
amounts: {
|
|
@@ -816,6 +818,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
|
|
|
816
818
|
cacheWriteInputTokens?: number | undefined;
|
|
817
819
|
textOutputTokens?: number | undefined;
|
|
818
820
|
reasoningOutputTokens?: number | undefined;
|
|
821
|
+
audioDurationMs?: number | undefined;
|
|
819
822
|
} | undefined;
|
|
820
823
|
cost?: {
|
|
821
824
|
amounts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/routes/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EAKlB,MAAM,YAAY,CAAA;AAcnB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA2hBpC,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/routes/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EAKlB,MAAM,YAAY,CAAA;AAcnB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA2hBpC,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkxBrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/events.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/events.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AA6B9C,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAgD,CAAA;AAE/E,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GACrD;IACE,EAAE,EAAE,IAAI,CAAA;IACR,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;CAChD,GACD;IACE,EAAE,EAAE,KAAK,CAAA;IACT,KAAK,EAAE,MAAM,CAAA;CACd,CAcJ;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2IxE"}
|
package/dist/routes/ws/logs.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
import type { LogLevel, LogRunRef, SixbRunKind, StoredLogLine } from "@sixb/core";
|
|
2
|
+
import type { LoggingService } from "@sixb/core/internal/logging";
|
|
1
3
|
import type { Elysia } from "elysia";
|
|
2
4
|
import { z } from "zod";
|
|
3
5
|
import type { SixbServer } from "../../server";
|
|
6
|
+
import { type HubSubscription, SubscriptionHub } from "./subscription-hub";
|
|
7
|
+
export interface LogSubscriptionFilter {
|
|
8
|
+
readonly kinds?: readonly SixbRunKind[];
|
|
9
|
+
readonly levels?: readonly LogLevel[];
|
|
10
|
+
readonly run?: LogRunRef;
|
|
11
|
+
readonly afterCursor?: string;
|
|
12
|
+
}
|
|
4
13
|
declare const SubscriptionMessageSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
5
14
|
type: z.ZodLiteral<"subscribe">;
|
|
6
15
|
kinds: z.ZodOptional<z.ZodArray<z.ZodEnum<["action", "agent", "pipeline", "projection", "sync", "webhook", "workflow"]>, "many">>;
|
|
@@ -66,6 +75,8 @@ export declare function parseLogSubscriptionMessage(payload: unknown): {
|
|
|
66
75
|
ok: false;
|
|
67
76
|
error: string;
|
|
68
77
|
};
|
|
78
|
+
export declare function createLogSubscriptionHub(logging: LoggingService): SubscriptionHub<StoredLogLine>;
|
|
79
|
+
export declare function logSubscription(logging: LoggingService, filter: LogSubscriptionFilter): HubSubscription<StoredLogLine>;
|
|
69
80
|
export declare function registerLogStreamRoutes(app: Elysia, server: SixbServer): Elysia<"", {
|
|
70
81
|
decorator: {};
|
|
71
82
|
store: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/logs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/logs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C,OAAO,EAAE,KAAK,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAI1E,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,WAAW,EAAE,CAAA;IACvC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAA;IACrC,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,CAAA;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAC9B;AA0BD,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAgD,CAAA;AAE/E,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,GACf;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAY9F;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,cAAc,GAAG,eAAe,CAAC,aAAa,CAAC,CAahG;AAED,wBAAgB,eAAe,CAC7B,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE,qBAAqB,GAC5B,eAAe,CAAC,aAAa,CAAC,CAoBhC;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EtE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
interface HubSocket {
|
|
2
|
+
send(message: string): unknown;
|
|
3
|
+
close(code?: number, reason?: string): unknown;
|
|
4
|
+
readonly raw?: unknown;
|
|
5
|
+
}
|
|
6
|
+
interface HubRecord {
|
|
7
|
+
readonly cursor: string;
|
|
8
|
+
}
|
|
9
|
+
/** One retained broker stream, as the hub consumes and frames it. */
|
|
10
|
+
export interface HubSource<T extends HubRecord> {
|
|
11
|
+
/** Delivers records appended after the call. */
|
|
12
|
+
subscribe(deliver: (records: readonly T[]) => void): Promise<() => void>;
|
|
13
|
+
/** Socket frames for one flushed batch, in order. */
|
|
14
|
+
frames(records: readonly T[]): readonly unknown[];
|
|
15
|
+
/** Frame for a client whose replay cursor left retention. Live delivery continues after it. */
|
|
16
|
+
expired(): Promise<unknown>;
|
|
17
|
+
}
|
|
18
|
+
/** One socket's view of the stream. */
|
|
19
|
+
export interface HubSubscription<T extends HubRecord> {
|
|
20
|
+
matches(record: T): boolean;
|
|
21
|
+
/** Replays retained records after `afterCursor` (or from the oldest) before live ones. */
|
|
22
|
+
readonly replay?: {
|
|
23
|
+
readonly afterCursor: string | undefined;
|
|
24
|
+
read(afterCursor: string | undefined): Promise<{
|
|
25
|
+
readonly records: readonly T[];
|
|
26
|
+
readonly cursor?: string;
|
|
27
|
+
readonly hasMore: boolean;
|
|
28
|
+
}>;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* One broker subscription per server/project and stream, multiplexed to all connected clients
|
|
33
|
+
* and released when the last one leaves. Each client has a bounded queue so a slow socket cannot
|
|
34
|
+
* retain an unbounded portion of the process heap.
|
|
35
|
+
*/
|
|
36
|
+
export declare class SubscriptionHub<T extends HubRecord> {
|
|
37
|
+
private readonly source;
|
|
38
|
+
private readonly clients;
|
|
39
|
+
private readonly subscriptionGenerations;
|
|
40
|
+
private started;
|
|
41
|
+
private closed;
|
|
42
|
+
constructor(source: HubSource<T>);
|
|
43
|
+
subscribe(key: object, ws: HubSocket, subscription: HubSubscription<T>, onSubscribed: () => void): Promise<void>;
|
|
44
|
+
unsubscribe(key: object): void;
|
|
45
|
+
private removeClient;
|
|
46
|
+
private deleteClient;
|
|
47
|
+
private nextSubscriptionGeneration;
|
|
48
|
+
private isCurrentSubscription;
|
|
49
|
+
close(): Promise<void>;
|
|
50
|
+
private start;
|
|
51
|
+
private release;
|
|
52
|
+
private deliverLive;
|
|
53
|
+
private catchUp;
|
|
54
|
+
private enqueue;
|
|
55
|
+
private enqueueReplay;
|
|
56
|
+
private pushQueuedRecord;
|
|
57
|
+
private enqueuePendingLive;
|
|
58
|
+
private scheduleFlush;
|
|
59
|
+
private flush;
|
|
60
|
+
private waitForQueueProgress;
|
|
61
|
+
private notifyQueueProgress;
|
|
62
|
+
private send;
|
|
63
|
+
private fail;
|
|
64
|
+
}
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=subscription-hub.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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