@sixb/server 0.1.21 → 0.1.22

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.
Files changed (165) hide show
  1. package/dist/artifacts/frame.d.ts +5 -0
  2. package/dist/artifacts/frame.d.ts.map +1 -1
  3. package/dist/auth/browser-origin.d.ts +5 -1
  4. package/dist/auth/browser-origin.d.ts.map +1 -1
  5. package/dist/auth/experience.d.ts +1 -0
  6. package/dist/auth/experience.d.ts.map +1 -1
  7. package/dist/auth/public-routes.d.ts.map +1 -1
  8. package/dist/auth/responses.d.ts +1 -1
  9. package/dist/auth/responses.d.ts.map +1 -1
  10. package/dist/auth/scope.d.ts +19 -3
  11. package/dist/auth/scope.d.ts.map +1 -1
  12. package/dist/index.js +10093 -7553
  13. package/dist/index.js.map +51 -39
  14. package/dist/models/display.d.ts +27 -0
  15. package/dist/models/display.d.ts.map +1 -1
  16. package/dist/openapi/components.d.ts +14 -0
  17. package/dist/openapi/components.d.ts.map +1 -0
  18. package/dist/openapi/tags.d.ts +14 -2
  19. package/dist/openapi/tags.d.ts.map +1 -1
  20. package/dist/registerRoutes.d.ts.map +1 -1
  21. package/dist/routes/actions.d.ts +5 -5
  22. package/dist/routes/agent-api-gateway.d.ts.map +1 -1
  23. package/dist/routes/agent-approval-gate.d.ts +27 -0
  24. package/dist/routes/agent-approval-gate.d.ts.map +1 -0
  25. package/dist/routes/agent-approvals.d.ts +599 -0
  26. package/dist/routes/agent-approvals.d.ts.map +1 -0
  27. package/dist/routes/agent-children.d.ts +318 -0
  28. package/dist/routes/agent-children.d.ts.map +1 -0
  29. package/dist/routes/agent-memory.d.ts +267 -0
  30. package/dist/routes/agent-memory.d.ts.map +1 -0
  31. package/dist/routes/agents.d.ts +999 -80
  32. package/dist/routes/agents.d.ts.map +1 -1
  33. package/dist/routes/ai-accounting.d.ts.map +1 -1
  34. package/dist/routes/artifact-frames.d.ts +3 -3
  35. package/dist/routes/artifact-frames.d.ts.map +1 -1
  36. package/dist/routes/artifacts.d.ts +790 -134
  37. package/dist/routes/artifacts.d.ts.map +1 -1
  38. package/dist/routes/auth.d.ts +116 -10
  39. package/dist/routes/auth.d.ts.map +1 -1
  40. package/dist/routes/connector-connection-runs.d.ts +50 -50
  41. package/dist/routes/connectors.d.ts +2 -2
  42. package/dist/routes/datasets.d.ts +20 -20
  43. package/dist/routes/events.d.ts +4 -4
  44. package/dist/routes/files.d.ts +14 -14
  45. package/dist/routes/files.d.ts.map +1 -1
  46. package/dist/routes/links.d.ts +2 -2
  47. package/dist/routes/logs.d.ts +5 -5
  48. package/dist/routes/model-calls.d.ts +155 -0
  49. package/dist/routes/model-calls.d.ts.map +1 -0
  50. package/dist/routes/model-generations.d.ts +400 -0
  51. package/dist/routes/model-generations.d.ts.map +1 -0
  52. package/dist/routes/models.d.ts +434 -1
  53. package/dist/routes/models.d.ts.map +1 -1
  54. package/dist/routes/objects.d.ts +71 -40
  55. package/dist/routes/objects.d.ts.map +1 -1
  56. package/dist/routes/observed-agent-threads.d.ts +682 -0
  57. package/dist/routes/observed-agent-threads.d.ts.map +1 -0
  58. package/dist/routes/ontology.d.ts +66 -62
  59. package/dist/routes/ontology.d.ts.map +1 -1
  60. package/dist/routes/pipelines.d.ts +24 -24
  61. package/dist/routes/projections.d.ts +55 -55
  62. package/dist/routes/rules.d.ts +2 -2
  63. package/dist/routes/share-grants.d.ts +9 -9
  64. package/dist/routes/syncs.d.ts +46 -46
  65. package/dist/routes/users.d.ts +117 -0
  66. package/dist/routes/users.d.ts.map +1 -0
  67. package/dist/routes/webhook-runs.d.ts +1 -1
  68. package/dist/routes/workflows.d.ts +118 -52
  69. package/dist/routes/workflows.d.ts.map +1 -1
  70. package/dist/routes/ws/agents.d.ts +7 -2
  71. package/dist/routes/ws/agents.d.ts.map +1 -1
  72. package/dist/routes/ws/events.d.ts +6 -6
  73. package/dist/routes/ws/logs.d.ts +14 -14
  74. package/dist/schemas/actions.d.ts +15 -15
  75. package/dist/schemas/activity.d.ts +48 -28
  76. package/dist/schemas/activity.d.ts.map +1 -1
  77. package/dist/schemas/agent-approvals.d.ts +1091 -0
  78. package/dist/schemas/agent-approvals.d.ts.map +1 -0
  79. package/dist/schemas/agent-memory.d.ts +250 -0
  80. package/dist/schemas/agent-memory.d.ts.map +1 -0
  81. package/dist/schemas/agents.d.ts +5442 -369
  82. package/dist/schemas/agents.d.ts.map +1 -1
  83. package/dist/schemas/ai-accounting.d.ts +1290 -411
  84. package/dist/schemas/ai-accounting.d.ts.map +1 -1
  85. package/dist/schemas/ai-limits.d.ts +10 -10
  86. package/dist/schemas/ai-usage.d.ts +12 -0
  87. package/dist/schemas/ai-usage.d.ts.map +1 -1
  88. package/dist/schemas/artifacts.d.ts +650 -98
  89. package/dist/schemas/artifacts.d.ts.map +1 -1
  90. package/dist/schemas/auth.d.ts +119 -46
  91. package/dist/schemas/auth.d.ts.map +1 -1
  92. package/dist/schemas/connectors.d.ts +22 -22
  93. package/dist/schemas/datasets.d.ts +98 -98
  94. package/dist/schemas/event-payloads.d.ts +6 -6
  95. package/dist/schemas/events.d.ts +26 -26
  96. package/dist/schemas/events.d.ts.map +1 -1
  97. package/dist/schemas/files.d.ts +24 -24
  98. package/dist/schemas/links.d.ts +2 -2
  99. package/dist/schemas/logs.d.ts +32 -32
  100. package/dist/schemas/models.d.ts +8889 -10
  101. package/dist/schemas/models.d.ts.map +1 -1
  102. package/dist/schemas/objects.d.ts +48 -12
  103. package/dist/schemas/objects.d.ts.map +1 -1
  104. package/dist/schemas/ontology.d.ts +127 -104
  105. package/dist/schemas/ontology.d.ts.map +1 -1
  106. package/dist/schemas/pipelines.d.ts +132 -132
  107. package/dist/schemas/projections.d.ts +314 -314
  108. package/dist/schemas/rules.d.ts +4 -4
  109. package/dist/schemas/share-grants.d.ts +30 -30
  110. package/dist/schemas/syncs.d.ts +49 -49
  111. package/dist/schemas/users.d.ts +72 -0
  112. package/dist/schemas/users.d.ts.map +1 -0
  113. package/dist/schemas/webhook-runs.d.ts +6 -6
  114. package/dist/schemas/workflows.d.ts +701 -186
  115. package/dist/schemas/workflows.d.ts.map +1 -1
  116. package/dist/server.d.ts +1 -0
  117. package/dist/server.d.ts.map +1 -1
  118. package/dist/utils/http.d.ts.map +1 -1
  119. package/package.json +7 -7
  120. package/src/artifacts/frame.ts +6 -1
  121. package/src/auth/browser-origin.ts +8 -3
  122. package/src/auth/experience.ts +1 -1
  123. package/src/auth/guard.ts +2 -2
  124. package/src/auth/public-routes.ts +6 -0
  125. package/src/auth/responses.ts +7 -6
  126. package/src/auth/scope.ts +32 -3
  127. package/src/models/display.ts +61 -16
  128. package/src/openapi/components.ts +54 -0
  129. package/src/openapi/tags.ts +12 -0
  130. package/src/registerRoutes.ts +14 -0
  131. package/src/routes/agent-api-gateway.ts +115 -91
  132. package/src/routes/agent-approval-gate.ts +213 -0
  133. package/src/routes/agent-approvals.ts +299 -0
  134. package/src/routes/agent-children.ts +209 -0
  135. package/src/routes/agent-memory.ts +210 -0
  136. package/src/routes/agents.ts +363 -142
  137. package/src/routes/ai-accounting.ts +4 -0
  138. package/src/routes/artifact-frames.ts +14 -8
  139. package/src/routes/artifacts.ts +297 -22
  140. package/src/routes/auth.ts +306 -13
  141. package/src/routes/files.ts +6 -7
  142. package/src/routes/model-calls.ts +120 -0
  143. package/src/routes/model-generations.ts +245 -0
  144. package/src/routes/models.ts +116 -9
  145. package/src/routes/objects.ts +55 -61
  146. package/src/routes/observed-agent-threads.ts +253 -0
  147. package/src/routes/ontology.ts +1 -0
  148. package/src/routes/users.ts +73 -0
  149. package/src/routes/workflows.ts +6 -9
  150. package/src/routes/ws/agents.ts +10 -5
  151. package/src/schemas/activity.ts +2 -0
  152. package/src/schemas/agent-approvals.ts +129 -0
  153. package/src/schemas/agent-memory.ts +96 -0
  154. package/src/schemas/agents.ts +239 -0
  155. package/src/schemas/ai-accounting.ts +40 -4
  156. package/src/schemas/ai-usage.ts +10 -0
  157. package/src/schemas/artifacts.ts +91 -3
  158. package/src/schemas/auth.ts +25 -0
  159. package/src/schemas/models.ts +197 -1
  160. package/src/schemas/objects.ts +181 -0
  161. package/src/schemas/ontology.ts +1 -0
  162. package/src/schemas/users.ts +24 -0
  163. package/src/schemas/workflows.ts +2 -0
  164. package/src/server.ts +9 -10
  165. package/src/utils/http.ts +2 -0
@@ -0,0 +1,117 @@
1
+ import { type SixbHostView } from "@sixb/core";
2
+ import type { Elysia } from "elysia";
3
+ export declare function registerUserRoutes(app: Elysia, _host: SixbHostView): Elysia<"", {
4
+ decorator: {};
5
+ store: {};
6
+ derive: {};
7
+ resolve: {};
8
+ }, {
9
+ typebox: {};
10
+ error: {};
11
+ }, {
12
+ schema: {};
13
+ standaloneSchema: {};
14
+ macro: {};
15
+ macroFn: {};
16
+ parser: {};
17
+ response: {};
18
+ }, {
19
+ api: {
20
+ users: {
21
+ get: {
22
+ body: unknown;
23
+ params: {};
24
+ query: {
25
+ status?: "active" | "all" | "suspended" | undefined;
26
+ search?: string | undefined;
27
+ limit?: number | undefined;
28
+ offset?: number | undefined;
29
+ };
30
+ headers: unknown;
31
+ response: {
32
+ 200: {
33
+ users: {
34
+ status: "active" | "suspended";
35
+ id: string;
36
+ email: string;
37
+ displayName?: string | undefined;
38
+ avatarUrl?: string | undefined;
39
+ }[];
40
+ hasMore: boolean;
41
+ total: number;
42
+ };
43
+ 403: {
44
+ error: string;
45
+ };
46
+ 400: {
47
+ error: string;
48
+ };
49
+ 422: {
50
+ type: "validation";
51
+ on: string;
52
+ summary?: string;
53
+ message?: string;
54
+ found?: unknown;
55
+ property?: string;
56
+ expected?: string;
57
+ };
58
+ };
59
+ };
60
+ };
61
+ };
62
+ } & {
63
+ api: {
64
+ users: {
65
+ ":userId": {
66
+ get: {
67
+ body: unknown;
68
+ params: {
69
+ userId: string;
70
+ };
71
+ query: unknown;
72
+ headers: unknown;
73
+ response: {
74
+ 200: {
75
+ status: "active" | "suspended";
76
+ id: string;
77
+ email: string;
78
+ displayName?: string | undefined;
79
+ avatarUrl?: string | undefined;
80
+ };
81
+ 404: {
82
+ error: string;
83
+ };
84
+ 403: {
85
+ error: string;
86
+ };
87
+ 400: {
88
+ error: string;
89
+ };
90
+ 422: {
91
+ type: "validation";
92
+ on: string;
93
+ summary?: string;
94
+ message?: string;
95
+ found?: unknown;
96
+ property?: string;
97
+ expected?: string;
98
+ };
99
+ };
100
+ };
101
+ };
102
+ };
103
+ };
104
+ }, {
105
+ derive: {};
106
+ resolve: {};
107
+ schema: {};
108
+ standaloneSchema: {};
109
+ response: {};
110
+ }, {
111
+ derive: {};
112
+ resolve: {};
113
+ schema: {};
114
+ standaloneSchema: {};
115
+ response: {};
116
+ }>;
117
+ //# sourceMappingURL=users.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/routes/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAW,MAAM,YAAY,CAAA;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AASpC,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DlE"}
@@ -41,8 +41,8 @@ export declare function registerWebhookRunRoutes(app: Elysia, host: SixbHostView
41
41
  id: string;
42
42
  startedAt: string;
43
43
  method: string;
44
- route: string;
45
44
  executionId: string;
45
+ route: string;
46
46
  connectorId: string;
47
47
  webhookId: string;
48
48
  requestBodyBytes: number;
@@ -34,9 +34,9 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
34
34
  nodes: ({
35
35
  id: string;
36
36
  type: "step";
37
- output: Record<string, import("../schemas/common").JsonValue>;
38
- key: string;
39
37
  input: Record<string, import("../schemas/common").JsonValue>;
38
+ key: string;
39
+ output: Record<string, import("../schemas/common").JsonValue>;
40
40
  } | {
41
41
  id: string;
42
42
  params: Record<string, import("../schemas/common").JsonValue>;
@@ -47,26 +47,26 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
47
47
  id: string;
48
48
  response: Record<string, import("../schemas/common").JsonValue>;
49
49
  type: "intervention";
50
- key: string;
51
50
  input: Record<string, import("../schemas/common").JsonValue>;
51
+ key: string;
52
52
  description?: string | undefined;
53
53
  } | {
54
54
  id: string;
55
55
  type: "agent";
56
- output: Record<string, import("../schemas/common").JsonValue>;
57
- key: string;
58
56
  input: Record<string, import("../schemas/common").JsonValue>;
57
+ key: string;
58
+ output: Record<string, import("../schemas/common").JsonValue>;
59
59
  })[];
60
60
  latestRun: {
61
- status: "succeeded" | "failed" | "queued" | "running" | "cancelled" | "waiting";
61
+ status: "succeeded" | "failed" | "cancelled" | "queued" | "running" | "waiting";
62
62
  projectId: string;
63
63
  id: string;
64
- startedAt: string;
65
- workflowId: string;
66
64
  requestedBy: {
67
65
  id: string;
68
66
  type: "user" | "serviceAccount" | "system";
69
67
  };
68
+ startedAt: string;
69
+ workflowId: string;
70
70
  error?: import("@sixb/core").SixbFailure<"ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
71
71
  finishedAt?: string | undefined;
72
72
  queuedAt?: string | undefined;
@@ -107,9 +107,9 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
107
107
  nodes: ({
108
108
  id: string;
109
109
  type: "step";
110
- output: Record<string, import("../schemas/common").JsonValue>;
111
- key: string;
112
110
  input: Record<string, import("../schemas/common").JsonValue>;
111
+ key: string;
112
+ output: Record<string, import("../schemas/common").JsonValue>;
113
113
  } | {
114
114
  id: string;
115
115
  params: Record<string, import("../schemas/common").JsonValue>;
@@ -120,26 +120,26 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
120
120
  id: string;
121
121
  response: Record<string, import("../schemas/common").JsonValue>;
122
122
  type: "intervention";
123
- key: string;
124
123
  input: Record<string, import("../schemas/common").JsonValue>;
124
+ key: string;
125
125
  description?: string | undefined;
126
126
  } | {
127
127
  id: string;
128
128
  type: "agent";
129
- output: Record<string, import("../schemas/common").JsonValue>;
130
- key: string;
131
129
  input: Record<string, import("../schemas/common").JsonValue>;
130
+ key: string;
131
+ output: Record<string, import("../schemas/common").JsonValue>;
132
132
  })[];
133
133
  latestRun: {
134
- status: "succeeded" | "failed" | "queued" | "running" | "cancelled" | "waiting";
134
+ status: "succeeded" | "failed" | "cancelled" | "queued" | "running" | "waiting";
135
135
  projectId: string;
136
136
  id: string;
137
- startedAt: string;
138
- workflowId: string;
139
137
  requestedBy: {
140
138
  id: string;
141
139
  type: "user" | "serviceAccount" | "system";
142
140
  };
141
+ startedAt: string;
142
+ workflowId: string;
143
143
  error?: import("@sixb/core").SixbFailure<"ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
144
144
  finishedAt?: string | undefined;
145
145
  queuedAt?: string | undefined;
@@ -169,7 +169,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
169
169
  body: unknown;
170
170
  params: {};
171
171
  query: {
172
- status?: "expired" | "cancelled" | "pending" | "submitted" | undefined;
172
+ status?: "pending" | "cancelled" | "expired" | "submitted" | undefined;
173
173
  limit?: string | undefined;
174
174
  offset?: string | undefined;
175
175
  order?: "asc" | "desc" | undefined;
@@ -188,11 +188,11 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
188
188
  hasMore: boolean;
189
189
  total: number;
190
190
  interventions: {
191
- status: "expired" | "cancelled" | "pending" | "submitted";
191
+ status: "pending" | "cancelled" | "expired" | "submitted";
192
192
  projectId: string;
193
193
  id: string;
194
- input: Record<string, import("../schemas/common").JsonValue>;
195
194
  workflowId: string;
195
+ input: Record<string, import("../schemas/common").JsonValue>;
196
196
  workflowRunId: string;
197
197
  nodeRunId: string;
198
198
  interventionId: string;
@@ -248,11 +248,11 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
248
248
  headers: unknown;
249
249
  response: {
250
250
  200: {
251
- status: "expired" | "cancelled" | "pending" | "submitted";
251
+ status: "pending" | "cancelled" | "expired" | "submitted";
252
252
  projectId: string;
253
253
  id: string;
254
- input: Record<string, import("../schemas/common").JsonValue>;
255
254
  workflowId: string;
255
+ input: Record<string, import("../schemas/common").JsonValue>;
256
256
  workflowRunId: string;
257
257
  nodeRunId: string;
258
258
  interventionId: string;
@@ -317,11 +317,11 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
317
317
  error: string;
318
318
  } | {
319
319
  intervention: {
320
- status: "expired" | "cancelled" | "pending" | "submitted";
320
+ status: "pending" | "cancelled" | "expired" | "submitted";
321
321
  projectId: string;
322
322
  id: string;
323
- input: Record<string, import("../schemas/common").JsonValue>;
324
323
  workflowId: string;
324
+ input: Record<string, import("../schemas/common").JsonValue>;
325
325
  workflowRunId: string;
326
326
  nodeRunId: string;
327
327
  interventionId: string;
@@ -357,11 +357,11 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
357
357
  };
358
358
  202: {
359
359
  intervention: {
360
- status: "expired" | "cancelled" | "pending" | "submitted";
360
+ status: "pending" | "cancelled" | "expired" | "submitted";
361
361
  projectId: string;
362
362
  id: string;
363
- input: Record<string, import("../schemas/common").JsonValue>;
364
363
  workflowId: string;
364
+ input: Record<string, import("../schemas/common").JsonValue>;
365
365
  workflowRunId: string;
366
366
  nodeRunId: string;
367
367
  interventionId: string;
@@ -416,11 +416,11 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
416
416
  response: {
417
417
  200: {
418
418
  intervention: {
419
- status: "expired" | "cancelled" | "pending" | "submitted";
419
+ status: "pending" | "cancelled" | "expired" | "submitted";
420
420
  projectId: string;
421
421
  id: string;
422
- input: Record<string, import("../schemas/common").JsonValue>;
423
422
  workflowId: string;
423
+ input: Record<string, import("../schemas/common").JsonValue>;
424
424
  workflowRunId: string;
425
425
  nodeRunId: string;
426
426
  interventionId: string;
@@ -475,7 +475,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
475
475
  body: unknown;
476
476
  params: {};
477
477
  query: {
478
- status?: "succeeded" | "failed" | "queued" | "running" | "cancelled" | "waiting" | undefined;
478
+ status?: "succeeded" | "failed" | "cancelled" | "queued" | "running" | "waiting" | undefined;
479
479
  startedAfter?: string | undefined;
480
480
  startedBefore?: string | undefined;
481
481
  limit?: string | undefined;
@@ -487,15 +487,15 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
487
487
  response: {
488
488
  200: {
489
489
  runs: {
490
- status: "succeeded" | "failed" | "queued" | "running" | "cancelled" | "waiting";
490
+ status: "succeeded" | "failed" | "cancelled" | "queued" | "running" | "waiting";
491
491
  projectId: string;
492
492
  id: string;
493
- startedAt: string;
494
- workflowId: string;
495
493
  requestedBy: {
496
494
  id: string;
497
495
  type: "user" | "serviceAccount" | "system";
498
496
  };
497
+ startedAt: string;
498
+ workflowId: string;
499
499
  error?: import("@sixb/core").SixbFailure<"ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
500
500
  finishedAt?: string | undefined;
501
501
  queuedAt?: string | undefined;
@@ -536,28 +536,28 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
536
536
  response: {
537
537
  200: {
538
538
  run: {
539
- status: "succeeded" | "failed" | "queued" | "running" | "cancelled" | "waiting";
539
+ status: "succeeded" | "failed" | "cancelled" | "queued" | "running" | "waiting";
540
540
  projectId: string;
541
541
  id: string;
542
- startedAt: string;
543
- input: Record<string, import("../schemas/common").JsonValue>;
544
- workflowId: string;
545
542
  requestedBy: {
546
543
  id: string;
547
544
  type: "user" | "serviceAccount" | "system";
548
545
  };
546
+ startedAt: string;
547
+ workflowId: string;
548
+ input: Record<string, import("../schemas/common").JsonValue>;
549
549
  error?: import("@sixb/core").SixbFailure<"ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
550
550
  finishedAt?: string | undefined;
551
- output?: Record<string, import("../schemas/common").JsonValue> | undefined;
552
551
  queuedAt?: string | undefined;
552
+ output?: Record<string, import("../schemas/common").JsonValue> | undefined;
553
553
  };
554
554
  nodes: {
555
- status: "succeeded" | "failed" | "running" | "cancelled" | "waiting";
555
+ status: "succeeded" | "failed" | "cancelled" | "running" | "waiting";
556
556
  projectId: string;
557
557
  id: string;
558
558
  startedAt: string;
559
- input: Record<string, import("../schemas/common").JsonValue>;
560
559
  workflowId: string;
560
+ input: Record<string, import("../schemas/common").JsonValue>;
561
561
  workflowRunId: string;
562
562
  nodeId: string;
563
563
  nodeKey: string;
@@ -565,7 +565,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
565
565
  nodeType: "agent" | "action" | "step" | "intervention";
566
566
  error?: import("@sixb/core").SixbFailure<"ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
567
567
  agentExecution?: {
568
- status: "succeeded" | "failed" | "queued" | "running" | "cancelled";
568
+ status: "succeeded" | "failed" | "cancelled" | "queued" | "running";
569
569
  attempt: number;
570
570
  modelId?: string | undefined;
571
571
  startedAt?: string | undefined;
@@ -581,6 +581,10 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
581
581
  textOutputTokens?: number | undefined;
582
582
  reasoningOutputTokens?: number | undefined;
583
583
  audioDurationMs?: number | undefined;
584
+ imageOutputTokens?: number | undefined;
585
+ audioOutputTokens?: number | undefined;
586
+ outputImages?: number | undefined;
587
+ inputCharacters?: number | undefined;
584
588
  } | undefined;
585
589
  cost?: {
586
590
  amounts: {
@@ -637,11 +641,11 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
637
641
  headers: unknown;
638
642
  response: {
639
643
  200: {
640
- status: "succeeded" | "failed" | "queued" | "running" | "cancelled";
641
- attempt: number;
642
- nodeRunId: string;
644
+ status: "succeeded" | "failed" | "cancelled" | "queued" | "running";
643
645
  createdAt: string;
644
646
  prompt: string;
647
+ attempt: number;
648
+ nodeRunId: string;
645
649
  error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
646
650
  modelId?: string | undefined;
647
651
  startedAt?: string | undefined;
@@ -657,6 +661,10 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
657
661
  textOutputTokens?: number | undefined;
658
662
  reasoningOutputTokens?: number | undefined;
659
663
  audioDurationMs?: number | undefined;
664
+ imageOutputTokens?: number | undefined;
665
+ audioOutputTokens?: number | undefined;
666
+ outputImages?: number | undefined;
667
+ inputCharacters?: number | undefined;
660
668
  } | undefined;
661
669
  cost?: {
662
670
  amounts: {
@@ -681,8 +689,8 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
681
689
  } | {
682
690
  id: string;
683
691
  kind: "app-state";
684
- description: string;
685
692
  value: import("../schemas/common").JsonValue;
693
+ description: string;
686
694
  label: string;
687
695
  };
688
696
  type: "context";
@@ -713,8 +721,8 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
713
721
  data: import("../schemas/common").JsonValue;
714
722
  } | {
715
723
  type: "tool-call";
716
- output: import("../schemas/common").JsonValue;
717
724
  input: import("../schemas/common").JsonValue;
725
+ output: import("../schemas/common").JsonValue;
718
726
  toolCallId: string;
719
727
  toolName: string;
720
728
  state: "output-available";
@@ -733,6 +741,59 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
733
741
  providerExecuted?: boolean | undefined;
734
742
  } | {
735
743
  type: "continuation";
744
+ } | {
745
+ status: "approved" | "denied" | "cancelled" | "superseded" | "expired";
746
+ type: "approval-outcome";
747
+ call: {
748
+ kind: "action";
749
+ actionId: string;
750
+ subject: {
751
+ kind: "none";
752
+ } | {
753
+ kind: "object";
754
+ objectTypeId: string;
755
+ primaryId: string;
756
+ };
757
+ } | {
758
+ kind: "workflow";
759
+ workflowId: string;
760
+ };
761
+ approvalId: string;
762
+ caller?: {
763
+ runId: string;
764
+ key: string;
765
+ continues?: true | undefined;
766
+ } | undefined;
767
+ outcome?: {
768
+ status: "succeeded" | "failed";
769
+ kind: "action-run";
770
+ runId: string;
771
+ error?: import("@sixb/core").ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "commit"> | undefined;
772
+ } | {
773
+ kind: "workflow-run";
774
+ runId: string;
775
+ queuedAt: string;
776
+ } | {
777
+ error: {
778
+ at: string;
779
+ code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
780
+ message: string;
781
+ retryable: boolean;
782
+ details?: import("../schemas/common").JsonValue | undefined;
783
+ httpStatus?: number | undefined;
784
+ redacted?: true | undefined;
785
+ truncated?: true | undefined;
786
+ };
787
+ kind: "error";
788
+ } | undefined;
789
+ } | {
790
+ id: string;
791
+ kind: "message" | "answer";
792
+ type: "mail";
793
+ text: string;
794
+ from: "parent";
795
+ inReplyTo?: string | undefined;
796
+ afterAnswer?: true | undefined;
736
797
  })[] | undefined;
737
798
  failurePhase?: "agent-loop" | "structured-finalizer" | undefined;
738
799
  };
@@ -777,28 +838,28 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
777
838
  response: {
778
839
  200: {
779
840
  run: {
780
- status: "succeeded" | "failed" | "queued" | "running" | "cancelled" | "waiting";
841
+ status: "succeeded" | "failed" | "cancelled" | "queued" | "running" | "waiting";
781
842
  projectId: string;
782
843
  id: string;
783
- startedAt: string;
784
- input: Record<string, import("../schemas/common").JsonValue>;
785
- workflowId: string;
786
844
  requestedBy: {
787
845
  id: string;
788
846
  type: "user" | "serviceAccount" | "system";
789
847
  };
848
+ startedAt: string;
849
+ workflowId: string;
850
+ input: Record<string, import("../schemas/common").JsonValue>;
790
851
  error?: import("@sixb/core").SixbFailure<"ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
791
852
  finishedAt?: string | undefined;
792
- output?: Record<string, import("../schemas/common").JsonValue> | undefined;
793
853
  queuedAt?: string | undefined;
854
+ output?: Record<string, import("../schemas/common").JsonValue> | undefined;
794
855
  };
795
856
  nodes: {
796
- status: "succeeded" | "failed" | "running" | "cancelled" | "waiting";
857
+ status: "succeeded" | "failed" | "cancelled" | "running" | "waiting";
797
858
  projectId: string;
798
859
  id: string;
799
860
  startedAt: string;
800
- input: Record<string, import("../schemas/common").JsonValue>;
801
861
  workflowId: string;
862
+ input: Record<string, import("../schemas/common").JsonValue>;
802
863
  workflowRunId: string;
803
864
  nodeId: string;
804
865
  nodeKey: string;
@@ -806,7 +867,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
806
867
  nodeType: "agent" | "action" | "step" | "intervention";
807
868
  error?: import("@sixb/core").SixbFailure<"ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
808
869
  agentExecution?: {
809
- status: "succeeded" | "failed" | "queued" | "running" | "cancelled";
870
+ status: "succeeded" | "failed" | "cancelled" | "queued" | "running";
810
871
  attempt: number;
811
872
  modelId?: string | undefined;
812
873
  startedAt?: string | undefined;
@@ -822,6 +883,10 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
822
883
  textOutputTokens?: number | undefined;
823
884
  reasoningOutputTokens?: number | undefined;
824
885
  audioDurationMs?: number | undefined;
886
+ imageOutputTokens?: number | undefined;
887
+ audioOutputTokens?: number | undefined;
888
+ outputImages?: number | undefined;
889
+ inputCharacters?: number | undefined;
825
890
  } | undefined;
826
891
  cost?: {
827
892
  amounts: {
@@ -1027,6 +1092,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
1027
1092
  runs: {
1028
1093
  post: {
1029
1094
  body: {
1095
+ runId?: string | undefined;
1030
1096
  input?: Record<string, import("../schemas/common").JsonValue> | undefined;
1031
1097
  };
1032
1098
  params: {
@@ -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;AAenB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA2hBpC,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuxBrE"}
@@ -1,4 +1,4 @@
1
- import { type AgentRunActivityEvent } from "@sixb/core/agents/streams";
1
+ import { type AgentActivityEvent } from "@sixb/core/agents/streams";
2
2
  import type { Sixb } from "@sixb/core/internal/request-execution";
3
3
  import type { Elysia } from "elysia";
4
4
  import { z } from "zod";
@@ -53,13 +53,18 @@ export declare function parseAgentStreamMessage(payload: unknown): {
53
53
  ok: false;
54
54
  error: string;
55
55
  };
56
+ /**
57
+ * A run's stream reaches whoever reads its thread: a turn's conversation, or a sub-agent's, which
58
+ * is read through its conversation. Either starts with the run's snapshot.
59
+ */
56
60
  export declare function canAccessAgentRunStream(sixb: Sixb, runId: string): Promise<{
57
61
  ok: true;
58
62
  } | {
59
63
  ok: false;
60
64
  message: string;
61
65
  }>;
62
- export declare function canAccessAgentThreadActivity(sixb: Sixb, event: AgentRunActivityEvent): Promise<boolean>;
66
+ /** A run's or an approval's activity reaches whoever reads the turn it belongs to. */
67
+ export declare function canAccessAgentThreadActivity(sixb: Sixb, event: AgentActivityEvent): Promise<boolean>;
63
68
  export declare function registerAgentStreamRoutes(app: Elysia, server: SixbServer): Elysia<"", {
64
69
  decorator: {};
65
70
  store: {};
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAE3B,MAAM,2BAA2B,CAAA;AAOlC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAA;AAC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