@sixb/server 0.1.21 → 0.1.23

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,599 @@
1
+ import type { SixbHostView } from "@sixb/core";
2
+ import type { Elysia } from "elysia";
3
+ /** Approval modes and held calls. Session routes only, and never on the agent API gateway. */
4
+ export declare function registerAgentApprovalRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
5
+ decorator: {};
6
+ store: {};
7
+ derive: {};
8
+ resolve: {};
9
+ }, {
10
+ typebox: {};
11
+ error: {};
12
+ }, {
13
+ schema: {};
14
+ standaloneSchema: {};
15
+ macro: {};
16
+ macroFn: {};
17
+ parser: {};
18
+ response: {};
19
+ }, {
20
+ api: {
21
+ agent: {
22
+ preferences: {
23
+ get: {
24
+ body: unknown;
25
+ params: {};
26
+ query: unknown;
27
+ headers: unknown;
28
+ response: {
29
+ 200: {
30
+ approvalMode: "manual" | "accept-edits" | "auto";
31
+ approvalModeSource: "default" | "fallback";
32
+ };
33
+ 404: {
34
+ error: string;
35
+ code?: string | undefined;
36
+ };
37
+ 501: {
38
+ error: string;
39
+ };
40
+ 422: {
41
+ type: "validation";
42
+ on: string;
43
+ summary?: string;
44
+ message?: string;
45
+ found?: unknown;
46
+ property?: string;
47
+ expected?: string;
48
+ };
49
+ };
50
+ };
51
+ };
52
+ };
53
+ };
54
+ } & {
55
+ api: {
56
+ agent: {
57
+ preferences: {
58
+ put: {
59
+ body: {
60
+ approvalMode: "manual" | "accept-edits" | "auto";
61
+ };
62
+ params: {};
63
+ query: unknown;
64
+ headers: unknown;
65
+ response: {
66
+ 200: {
67
+ approvalMode: "manual" | "accept-edits" | "auto";
68
+ approvalModeSource: "default" | "fallback";
69
+ };
70
+ 404: {
71
+ error: string;
72
+ code?: string | undefined;
73
+ };
74
+ 400: {
75
+ error: string;
76
+ code?: string | undefined;
77
+ };
78
+ 501: {
79
+ error: string;
80
+ };
81
+ 422: {
82
+ type: "validation";
83
+ on: string;
84
+ summary?: string;
85
+ message?: string;
86
+ found?: unknown;
87
+ property?: string;
88
+ expected?: string;
89
+ };
90
+ };
91
+ };
92
+ };
93
+ };
94
+ };
95
+ } & {
96
+ api: {
97
+ "agent-threads": {
98
+ ":threadId": {
99
+ "approval-mode": {
100
+ put: {
101
+ body: {
102
+ approvalMode: "manual" | "accept-edits" | "auto" | null;
103
+ };
104
+ params: {
105
+ threadId: string;
106
+ };
107
+ query: unknown;
108
+ headers: unknown;
109
+ response: {
110
+ 200: {
111
+ status: "active" | "archived";
112
+ projectId: string;
113
+ id: string;
114
+ kind: "conversation" | "subagent";
115
+ createdAt: string;
116
+ ownerPrincipal: {
117
+ id: string;
118
+ type: "user" | "serviceAccount" | "system";
119
+ };
120
+ owner: {
121
+ id: string;
122
+ type: "user" | "serviceAccount" | "system";
123
+ displayName?: string | undefined;
124
+ };
125
+ participants: {
126
+ principal: {
127
+ id: string;
128
+ type: "user";
129
+ displayName?: string | undefined;
130
+ };
131
+ addedAt: string;
132
+ addedBy: {
133
+ id: string;
134
+ type: "user" | "serviceAccount" | "system";
135
+ };
136
+ }[];
137
+ activeRunId: string | null;
138
+ messageCount: number;
139
+ updatedAt: string;
140
+ title?: string | undefined;
141
+ approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
142
+ approvalModeSource?: "default" | "thread" | "fallback" | "run" | undefined;
143
+ sandboxState?: {
144
+ status: "unavailable" | "new" | "busy" | "ready" | "blocked";
145
+ name: string;
146
+ initialized: boolean;
147
+ } | undefined;
148
+ parent?: {
149
+ threadId: string;
150
+ key: string;
151
+ spawnedBy: string;
152
+ } | undefined;
153
+ sandboxParams?: Record<string, import("../schemas/common").JsonValue> | undefined;
154
+ lastMessageAt?: string | undefined;
155
+ };
156
+ 404: {
157
+ error: string;
158
+ code?: string | undefined;
159
+ };
160
+ 409: {
161
+ error: string;
162
+ code?: string | undefined;
163
+ };
164
+ 400: {
165
+ error: string;
166
+ code?: string | undefined;
167
+ };
168
+ 501: {
169
+ error: string;
170
+ };
171
+ 422: {
172
+ type: "validation";
173
+ on: string;
174
+ summary?: string;
175
+ message?: string;
176
+ found?: unknown;
177
+ property?: string;
178
+ expected?: string;
179
+ };
180
+ };
181
+ };
182
+ };
183
+ };
184
+ };
185
+ };
186
+ } & {
187
+ api: {
188
+ "agent-threads": {
189
+ ":threadId": {
190
+ approvals: {
191
+ get: {
192
+ body: unknown;
193
+ params: {
194
+ threadId: string;
195
+ };
196
+ query: {
197
+ status?: "pending" | "approved" | "denied" | "cancelled" | "superseded" | "expired" | undefined;
198
+ runId?: string | undefined;
199
+ limit?: string | undefined;
200
+ offset?: string | undefined;
201
+ };
202
+ headers: unknown;
203
+ response: {
204
+ 200: {
205
+ hasMore: boolean;
206
+ total: number;
207
+ approvals: {
208
+ status: "pending" | "approved" | "denied" | "cancelled" | "superseded" | "expired";
209
+ id: string;
210
+ requestedBy: {
211
+ id: string;
212
+ type: "user" | "serviceAccount" | "system";
213
+ };
214
+ mode: "manual" | "accept-edits";
215
+ runId: string;
216
+ threadId: string;
217
+ callerRunId: string;
218
+ call: {
219
+ kind: "action";
220
+ params: Record<string, import("../schemas/common").JsonValue>;
221
+ actionId: string;
222
+ subject: {
223
+ kind: "none";
224
+ } | {
225
+ kind: "object";
226
+ objectTypeId: string;
227
+ primaryId: string;
228
+ };
229
+ actionRunId: string;
230
+ effect: "ontology" | "external";
231
+ } | {
232
+ kind: "workflow";
233
+ workflowId: string;
234
+ input: Record<string, import("../schemas/common").JsonValue>;
235
+ workflowRunId: string;
236
+ };
237
+ createdAt: string;
238
+ expiresAt: string;
239
+ reported: boolean;
240
+ caller?: {
241
+ runId: string;
242
+ key: string;
243
+ } | undefined;
244
+ decidedAt?: string | undefined;
245
+ decidedBy?: {
246
+ id: string;
247
+ type: "user" | "serviceAccount" | "system";
248
+ } | undefined;
249
+ outcome?: {
250
+ status: "succeeded" | "failed";
251
+ kind: "action-run";
252
+ runId: string;
253
+ error?: import("@sixb/core").ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "commit"> | undefined;
254
+ } | {
255
+ kind: "workflow-run";
256
+ runId: string;
257
+ queuedAt: string;
258
+ } | {
259
+ error: {
260
+ at: string;
261
+ 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";
262
+ message: string;
263
+ retryable: boolean;
264
+ details?: import("../schemas/common").JsonValue | undefined;
265
+ httpStatus?: number | undefined;
266
+ redacted?: true | undefined;
267
+ truncated?: true | undefined;
268
+ };
269
+ kind: "error";
270
+ } | undefined;
271
+ }[];
272
+ };
273
+ 404: {
274
+ error: string;
275
+ };
276
+ 400: {
277
+ error: string;
278
+ };
279
+ 501: {
280
+ error: string;
281
+ };
282
+ 422: {
283
+ type: "validation";
284
+ on: string;
285
+ summary?: string;
286
+ message?: string;
287
+ found?: unknown;
288
+ property?: string;
289
+ expected?: string;
290
+ };
291
+ };
292
+ };
293
+ };
294
+ };
295
+ };
296
+ };
297
+ } & {
298
+ api: {
299
+ "agent-threads": {
300
+ ":threadId": {
301
+ approvals: {
302
+ ":approvalId": {
303
+ decision: {
304
+ post: {
305
+ body: {
306
+ decision: "deny" | "approve";
307
+ always?: true | undefined;
308
+ };
309
+ params: {
310
+ threadId: string;
311
+ approvalId: string;
312
+ };
313
+ query: unknown;
314
+ headers: unknown;
315
+ response: {
316
+ 200: {
317
+ approval: {
318
+ status: "pending" | "approved" | "denied" | "cancelled" | "superseded" | "expired";
319
+ id: string;
320
+ requestedBy: {
321
+ id: string;
322
+ type: "user" | "serviceAccount" | "system";
323
+ };
324
+ mode: "manual" | "accept-edits";
325
+ runId: string;
326
+ threadId: string;
327
+ callerRunId: string;
328
+ call: {
329
+ kind: "action";
330
+ params: Record<string, import("../schemas/common").JsonValue>;
331
+ actionId: string;
332
+ subject: {
333
+ kind: "none";
334
+ } | {
335
+ kind: "object";
336
+ objectTypeId: string;
337
+ primaryId: string;
338
+ };
339
+ actionRunId: string;
340
+ effect: "ontology" | "external";
341
+ } | {
342
+ kind: "workflow";
343
+ workflowId: string;
344
+ input: Record<string, import("../schemas/common").JsonValue>;
345
+ workflowRunId: string;
346
+ };
347
+ createdAt: string;
348
+ expiresAt: string;
349
+ reported: boolean;
350
+ caller?: {
351
+ runId: string;
352
+ key: string;
353
+ } | undefined;
354
+ decidedAt?: string | undefined;
355
+ decidedBy?: {
356
+ id: string;
357
+ type: "user" | "serviceAccount" | "system";
358
+ } | undefined;
359
+ outcome?: {
360
+ status: "succeeded" | "failed";
361
+ kind: "action-run";
362
+ runId: string;
363
+ error?: import("@sixb/core").ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "commit"> | undefined;
364
+ } | {
365
+ kind: "workflow-run";
366
+ runId: string;
367
+ queuedAt: string;
368
+ } | {
369
+ error: {
370
+ at: string;
371
+ 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";
372
+ message: string;
373
+ retryable: boolean;
374
+ details?: import("../schemas/common").JsonValue | undefined;
375
+ httpStatus?: number | undefined;
376
+ redacted?: true | undefined;
377
+ truncated?: true | undefined;
378
+ };
379
+ kind: "error";
380
+ } | undefined;
381
+ };
382
+ run?: {
383
+ status: "succeeded" | "failed" | "cancelled" | "queued" | "running";
384
+ projectId: string;
385
+ id: string;
386
+ kind: "conversation" | "subagent";
387
+ threadId: string;
388
+ createdAt: string;
389
+ attempt: number;
390
+ triggerMessageId: string;
391
+ streamId: string;
392
+ error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
393
+ requestedBy?: {
394
+ id: string;
395
+ type: "user" | "serviceAccount";
396
+ } | undefined;
397
+ model?: {
398
+ modelId: string;
399
+ provider: string;
400
+ } | undefined;
401
+ modelId?: string | undefined;
402
+ startedAt?: string | undefined;
403
+ completedAt?: string | undefined;
404
+ approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
405
+ tier?: "light" | "standard" | "heavy" | undefined;
406
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
407
+ budgetTokens: number;
408
+ } | undefined;
409
+ usage?: {
410
+ reportingStatus: "partial" | "complete" | "unavailable";
411
+ inputTokens?: number | undefined;
412
+ outputTokens?: number | undefined;
413
+ totalTokens?: number | undefined;
414
+ uncachedInputTokens?: number | undefined;
415
+ cacheReadInputTokens?: number | undefined;
416
+ cacheWriteInputTokens?: number | undefined;
417
+ textOutputTokens?: number | undefined;
418
+ reasoningOutputTokens?: number | undefined;
419
+ audioDurationMs?: number | undefined;
420
+ imageOutputTokens?: number | undefined;
421
+ audioOutputTokens?: number | undefined;
422
+ outputImages?: number | undefined;
423
+ inputCharacters?: number | undefined;
424
+ } | undefined;
425
+ cost?: {
426
+ amounts: {
427
+ currency: string;
428
+ amountNanos: string;
429
+ }[];
430
+ ratedCallCount: number;
431
+ unpriceableCallCount: number;
432
+ unvaluedCallCount: number;
433
+ } | undefined;
434
+ finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
435
+ parentRunId?: string | undefined;
436
+ diagnostics?: {
437
+ code: "step_limit_reached" | "output_limit_reached";
438
+ message: string;
439
+ severity: "error" | "warning";
440
+ scope: "run";
441
+ }[] | undefined;
442
+ } | undefined;
443
+ resume?: {
444
+ status: "refused";
445
+ code: string;
446
+ message: string;
447
+ retrying: boolean;
448
+ } | undefined;
449
+ };
450
+ 404: {
451
+ error: string;
452
+ };
453
+ 403: {
454
+ error: string;
455
+ code?: string | undefined;
456
+ };
457
+ 409: {
458
+ error: string;
459
+ code?: string | undefined;
460
+ };
461
+ 400: {
462
+ error: string;
463
+ code?: string | undefined;
464
+ };
465
+ 501: {
466
+ error: string;
467
+ };
468
+ 422: {
469
+ type: "validation";
470
+ on: string;
471
+ summary?: string;
472
+ message?: string;
473
+ found?: unknown;
474
+ property?: string;
475
+ expected?: string;
476
+ };
477
+ };
478
+ };
479
+ };
480
+ };
481
+ };
482
+ };
483
+ };
484
+ };
485
+ } & {
486
+ api: {
487
+ "agent-approvals": {
488
+ get: {
489
+ body: unknown;
490
+ params: {};
491
+ query: {
492
+ status?: "pending" | "approved" | "denied" | "cancelled" | "superseded" | "expired" | undefined;
493
+ limit?: string | undefined;
494
+ offset?: string | undefined;
495
+ };
496
+ headers: unknown;
497
+ response: {
498
+ 200: {
499
+ hasMore: boolean;
500
+ total: number;
501
+ approvals: {
502
+ status: "pending" | "approved" | "denied" | "cancelled" | "superseded" | "expired";
503
+ id: string;
504
+ requestedBy: {
505
+ id: string;
506
+ type: "user" | "serviceAccount" | "system";
507
+ };
508
+ mode: "manual" | "accept-edits";
509
+ runId: string;
510
+ threadId: string;
511
+ callerRunId: string;
512
+ call: {
513
+ kind: "action";
514
+ params: Record<string, import("../schemas/common").JsonValue>;
515
+ actionId: string;
516
+ subject: {
517
+ kind: "none";
518
+ } | {
519
+ kind: "object";
520
+ objectTypeId: string;
521
+ primaryId: string;
522
+ };
523
+ actionRunId: string;
524
+ effect: "ontology" | "external";
525
+ } | {
526
+ kind: "workflow";
527
+ workflowId: string;
528
+ input: Record<string, import("../schemas/common").JsonValue>;
529
+ workflowRunId: string;
530
+ };
531
+ createdAt: string;
532
+ expiresAt: string;
533
+ reported: boolean;
534
+ caller?: {
535
+ runId: string;
536
+ key: string;
537
+ } | undefined;
538
+ decidedAt?: string | undefined;
539
+ decidedBy?: {
540
+ id: string;
541
+ type: "user" | "serviceAccount" | "system";
542
+ } | undefined;
543
+ outcome?: {
544
+ status: "succeeded" | "failed";
545
+ kind: "action-run";
546
+ runId: string;
547
+ error?: import("@sixb/core").ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "commit"> | undefined;
548
+ } | {
549
+ kind: "workflow-run";
550
+ runId: string;
551
+ queuedAt: string;
552
+ } | {
553
+ error: {
554
+ at: string;
555
+ 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";
556
+ message: string;
557
+ retryable: boolean;
558
+ details?: import("../schemas/common").JsonValue | undefined;
559
+ httpStatus?: number | undefined;
560
+ redacted?: true | undefined;
561
+ truncated?: true | undefined;
562
+ };
563
+ kind: "error";
564
+ } | undefined;
565
+ }[];
566
+ };
567
+ 400: {
568
+ error: string;
569
+ };
570
+ 501: {
571
+ error: string;
572
+ };
573
+ 422: {
574
+ type: "validation";
575
+ on: string;
576
+ summary?: string;
577
+ message?: string;
578
+ found?: unknown;
579
+ property?: string;
580
+ expected?: string;
581
+ };
582
+ };
583
+ };
584
+ };
585
+ };
586
+ }, {
587
+ derive: {};
588
+ resolve: {};
589
+ schema: {};
590
+ standaloneSchema: {};
591
+ response: {};
592
+ }, {
593
+ derive: {};
594
+ resolve: {};
595
+ schema: {};
596
+ standaloneSchema: {};
597
+ response: {};
598
+ }>;
599
+ //# sourceMappingURL=agent-approvals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-approvals.d.ts","sourceRoot":"","sources":["../../src/routes/agent-approvals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,YAAY,EAAE,MAAM,YAAY,CAAA;AAGnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA+DpC,8FAA8F;AAC9F,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuO1E"}