@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,318 @@
1
+ import type { AgentChildView, SixbHostView } from "@sixb/core";
2
+ import type { Elysia } from "elysia";
3
+ import { z } from "zod";
4
+ import { AgentChildSchema } from "../schemas/agents";
5
+ /**
6
+ * A file of one run of a sub-agent: one its parent handed it (`/handedFiles/<n>/fileRef`), or one
7
+ * the run returned from `out/` (`/files/<n>/fileRef`). What a tool showed it is a file of its
8
+ * thread's messages.
9
+ */
10
+ export declare const AgentChildFileContentQuerySchema: z.ZodObject<{
11
+ disposition: z.ZodOptional<z.ZodEnum<["inline", "attachment"]>>;
12
+ v: z.ZodOptional<z.ZodString>;
13
+ } & {
14
+ run: z.ZodString;
15
+ path: z.ZodString;
16
+ }, "strip", z.ZodTypeAny, {
17
+ path: string;
18
+ run: string;
19
+ disposition?: "inline" | "attachment" | undefined;
20
+ v?: string | undefined;
21
+ }, {
22
+ path: string;
23
+ run: string;
24
+ disposition?: "inline" | "attachment" | undefined;
25
+ v?: string | undefined;
26
+ }>;
27
+ /** A sub-agent as the lists return it. */
28
+ export declare function serializeAgentChild(child: AgentChildView): ReturnType<typeof AgentChildSchema.parse>;
29
+ /** A file of a sub-agent's run, read through whoever may read the sub-agent. */
30
+ export declare function agentChildFileContentResponse(host: SixbHostView, context: {
31
+ readonly query: unknown;
32
+ readonly request: Request;
33
+ readonly set: {
34
+ status?: number | string;
35
+ };
36
+ }, readChild: () => Promise<AgentChildView | null>, options?: {
37
+ readonly head?: boolean;
38
+ }): {
39
+ error: string;
40
+ } | Promise<Response | {
41
+ readonly error: string;
42
+ }>;
43
+ /**
44
+ * A conversation's sub-agents, and their files. What one did is its thread's: the thread routes
45
+ * read it, and `/api/agent-runs/:runId` its runs.
46
+ */
47
+ export declare function registerAgentChildRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
48
+ decorator: {};
49
+ store: {};
50
+ derive: {};
51
+ resolve: {};
52
+ }, {
53
+ typebox: {};
54
+ error: {};
55
+ }, {
56
+ schema: {};
57
+ standaloneSchema: {};
58
+ macro: {};
59
+ macroFn: {};
60
+ parser: {};
61
+ response: {};
62
+ }, {
63
+ api: {
64
+ "agent-threads": {
65
+ ":threadId": {
66
+ children: {
67
+ get: {
68
+ body: unknown;
69
+ params: {
70
+ threadId: string;
71
+ };
72
+ query: {
73
+ runId?: string | undefined;
74
+ };
75
+ headers: unknown;
76
+ response: {
77
+ 200: {
78
+ children: {
79
+ status: "succeeded" | "failed" | "cancelled" | "queued" | "running";
80
+ projectId: string;
81
+ id: string;
82
+ model: {
83
+ modelId: string;
84
+ provider: string;
85
+ };
86
+ runs: {
87
+ status: "succeeded" | "failed" | "cancelled" | "queued" | "running";
88
+ id: string;
89
+ createdAt: string;
90
+ attempt: number;
91
+ parentRunId: string;
92
+ streamId: string;
93
+ error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
94
+ modelId?: string | undefined;
95
+ startedAt?: string | undefined;
96
+ completedAt?: string | undefined;
97
+ result?: {
98
+ text: string;
99
+ files?: {
100
+ path: string;
101
+ fileRef: {
102
+ blobId: string;
103
+ digest: string;
104
+ sizeBytes: number;
105
+ fileName?: string | undefined;
106
+ mediaType?: string | undefined;
107
+ logicalPath?: string | undefined;
108
+ };
109
+ }[] | undefined;
110
+ filesError?: string | undefined;
111
+ } | undefined;
112
+ usage?: {
113
+ reportingStatus: "partial" | "complete" | "unavailable";
114
+ inputTokens?: number | undefined;
115
+ outputTokens?: number | undefined;
116
+ totalTokens?: number | undefined;
117
+ uncachedInputTokens?: number | undefined;
118
+ cacheReadInputTokens?: number | undefined;
119
+ cacheWriteInputTokens?: number | undefined;
120
+ textOutputTokens?: number | undefined;
121
+ reasoningOutputTokens?: number | undefined;
122
+ audioDurationMs?: number | undefined;
123
+ imageOutputTokens?: number | undefined;
124
+ audioOutputTokens?: number | undefined;
125
+ outputImages?: number | undefined;
126
+ inputCharacters?: number | undefined;
127
+ } | undefined;
128
+ cost?: {
129
+ amounts: {
130
+ currency: string;
131
+ amountNanos: string;
132
+ }[];
133
+ ratedCallCount: number;
134
+ unpriceableCallCount: number;
135
+ unvaluedCallCount: number;
136
+ } | undefined;
137
+ finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
138
+ }[];
139
+ threadId: string;
140
+ key: string;
141
+ createdAt: string;
142
+ spawnedBy: string;
143
+ activeRunId: string | null;
144
+ task: string;
145
+ handedFiles: {
146
+ path: string;
147
+ fileRef: {
148
+ blobId: string;
149
+ digest: string;
150
+ sizeBytes: number;
151
+ fileName?: string | undefined;
152
+ mediaType?: string | undefined;
153
+ logicalPath?: string | undefined;
154
+ };
155
+ }[];
156
+ error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
157
+ completedAt?: string | undefined;
158
+ tier?: "light" | "standard" | "heavy" | undefined;
159
+ reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
160
+ budgetTokens: number;
161
+ } | undefined;
162
+ usage?: {
163
+ reportingStatus: "partial" | "complete" | "unavailable";
164
+ inputTokens?: number | undefined;
165
+ outputTokens?: number | undefined;
166
+ totalTokens?: number | undefined;
167
+ uncachedInputTokens?: number | undefined;
168
+ cacheReadInputTokens?: number | undefined;
169
+ cacheWriteInputTokens?: number | undefined;
170
+ textOutputTokens?: number | undefined;
171
+ reasoningOutputTokens?: number | undefined;
172
+ audioDurationMs?: number | undefined;
173
+ imageOutputTokens?: number | undefined;
174
+ audioOutputTokens?: number | undefined;
175
+ outputImages?: number | undefined;
176
+ inputCharacters?: number | undefined;
177
+ } | undefined;
178
+ cost?: {
179
+ amounts: {
180
+ currency: string;
181
+ amountNanos: string;
182
+ }[];
183
+ ratedCallCount: number;
184
+ unpriceableCallCount: number;
185
+ unvaluedCallCount: number;
186
+ } | undefined;
187
+ finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
188
+ awaiting?: {
189
+ type: "approval";
190
+ approvalIds: string[];
191
+ } | {
192
+ type: "resume";
193
+ } | {
194
+ type: "answer";
195
+ question: {
196
+ id: string;
197
+ text: string;
198
+ };
199
+ } | undefined;
200
+ ended?: {
201
+ reason: "superseded" | "expired" | "stopped" | "replaced";
202
+ } | undefined;
203
+ }[];
204
+ };
205
+ 404: {
206
+ error: string;
207
+ };
208
+ 400: {
209
+ error: string;
210
+ };
211
+ 501: {
212
+ error: string;
213
+ };
214
+ 422: {
215
+ type: "validation";
216
+ on: string;
217
+ summary?: string;
218
+ message?: string;
219
+ found?: unknown;
220
+ property?: string;
221
+ expected?: string;
222
+ };
223
+ };
224
+ };
225
+ };
226
+ };
227
+ };
228
+ };
229
+ } & {
230
+ api: {
231
+ "agent-threads": {
232
+ ":threadId": {
233
+ "child-files": {
234
+ content: {
235
+ get: {
236
+ body: unknown;
237
+ params: {
238
+ threadId: string;
239
+ };
240
+ query: {
241
+ path: string;
242
+ run: string;
243
+ disposition?: "inline" | "attachment" | undefined;
244
+ v?: string | undefined;
245
+ };
246
+ headers: unknown;
247
+ response: {
248
+ 200: Response | {
249
+ readonly error: string;
250
+ };
251
+ 422: {
252
+ type: "validation";
253
+ on: string;
254
+ summary?: string;
255
+ message?: string;
256
+ found?: unknown;
257
+ property?: string;
258
+ expected?: string;
259
+ };
260
+ };
261
+ };
262
+ };
263
+ };
264
+ };
265
+ };
266
+ };
267
+ } & {
268
+ api: {
269
+ "agent-threads": {
270
+ ":threadId": {
271
+ "child-files": {
272
+ content: {
273
+ head: {
274
+ body: unknown;
275
+ params: {
276
+ threadId: string;
277
+ };
278
+ query: {
279
+ path: string;
280
+ run: string;
281
+ disposition?: "inline" | "attachment" | undefined;
282
+ v?: string | undefined;
283
+ };
284
+ headers: unknown;
285
+ response: {
286
+ 200: Response | {
287
+ readonly error: string;
288
+ };
289
+ 422: {
290
+ type: "validation";
291
+ on: string;
292
+ summary?: string;
293
+ message?: string;
294
+ found?: unknown;
295
+ property?: string;
296
+ expected?: string;
297
+ };
298
+ };
299
+ };
300
+ };
301
+ };
302
+ };
303
+ };
304
+ };
305
+ }, {
306
+ derive: {};
307
+ resolve: {};
308
+ schema: {};
309
+ standaloneSchema: {};
310
+ response: {};
311
+ }, {
312
+ derive: {};
313
+ resolve: {};
314
+ schema: {};
315
+ standaloneSchema: {};
316
+ response: {};
317
+ }>;
318
+ //# sourceMappingURL=agent-children.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-children.d.ts","sourceRoot":"","sources":["../../src/routes/agent-children.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,cAAc,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAUvB,OAAO,EAGL,gBAAgB,EAEjB,MAAM,mBAAmB,CAAA;AAM1B;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;EAS3C,CAAA;AAKF,0CAA0C;AAC1C,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,cAAc,GACpB,UAAU,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAwB3C;AAqBD,gFAAgF;AAChF,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE;IACP,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,GAAG,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CAC3C,EACD,SAAS,EAAE,MAAM,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,EAC/C,OAAO,GAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO;;;;GAqB1C;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFvE"}
@@ -0,0 +1,267 @@
1
+ import type { Elysia } from "elysia";
2
+ export declare function registerAgentMemoryRoutes(app: Elysia): Elysia<"", {
3
+ decorator: {};
4
+ store: {};
5
+ derive: {};
6
+ resolve: {};
7
+ }, {
8
+ typebox: {};
9
+ error: {};
10
+ }, {
11
+ schema: {};
12
+ standaloneSchema: {};
13
+ macro: {};
14
+ macroFn: {};
15
+ parser: {};
16
+ response: {};
17
+ }, {
18
+ api: {
19
+ "agent-memory": {
20
+ ":repo": {
21
+ get: {
22
+ body: unknown;
23
+ params: {
24
+ repo: "user" | "project";
25
+ };
26
+ query: {
27
+ revision?: string | undefined;
28
+ };
29
+ headers: unknown;
30
+ response: {
31
+ 200: {
32
+ files: {
33
+ path: string;
34
+ contents: string;
35
+ }[];
36
+ repo: "user" | "project";
37
+ revision: number;
38
+ };
39
+ 403: {
40
+ error: string;
41
+ code?: string | undefined;
42
+ };
43
+ 400: {
44
+ error: string;
45
+ code?: string | undefined;
46
+ };
47
+ 501: {
48
+ error: string;
49
+ code?: string | undefined;
50
+ };
51
+ 422: {
52
+ type: "validation";
53
+ on: string;
54
+ summary?: string;
55
+ message?: string;
56
+ found?: unknown;
57
+ property?: string;
58
+ expected?: string;
59
+ };
60
+ };
61
+ };
62
+ };
63
+ };
64
+ };
65
+ } & {
66
+ api: {
67
+ "agent-memory": {
68
+ ":repo": {
69
+ revisions: {
70
+ get: {
71
+ body: unknown;
72
+ params: {
73
+ repo: "user" | "project";
74
+ };
75
+ query: {
76
+ limit?: string | undefined;
77
+ offset?: string | undefined;
78
+ };
79
+ headers: unknown;
80
+ response: {
81
+ 200: {
82
+ hasMore: boolean;
83
+ total: number;
84
+ revisions: {
85
+ message: string;
86
+ createdAt: string;
87
+ revision: number;
88
+ author: {
89
+ id: string;
90
+ type: "user" | "serviceAccount" | "system";
91
+ };
92
+ changes: {
93
+ path: string;
94
+ deleted: boolean;
95
+ }[];
96
+ source?: string | undefined;
97
+ }[];
98
+ };
99
+ 403: {
100
+ error: string;
101
+ code?: string | undefined;
102
+ };
103
+ 400: {
104
+ error: string;
105
+ code?: string | undefined;
106
+ };
107
+ 501: {
108
+ error: string;
109
+ code?: string | undefined;
110
+ };
111
+ 422: {
112
+ type: "validation";
113
+ on: string;
114
+ summary?: string;
115
+ message?: string;
116
+ found?: unknown;
117
+ property?: string;
118
+ expected?: string;
119
+ };
120
+ };
121
+ };
122
+ };
123
+ };
124
+ };
125
+ };
126
+ } & {
127
+ api: {
128
+ "agent-memory": {
129
+ ":repo": {
130
+ revisions: {
131
+ post: {
132
+ body: {
133
+ message: string;
134
+ changes: {
135
+ path: string;
136
+ contents: string | null;
137
+ }[];
138
+ baseRevision: number;
139
+ };
140
+ params: {
141
+ repo: "user" | "project";
142
+ };
143
+ query: unknown;
144
+ headers: unknown;
145
+ response: {
146
+ 200: {
147
+ error: string;
148
+ code?: import("@sixb/core").SixbErrorCode;
149
+ details?: import("@sixb/core").ReadonlyJsonValue;
150
+ } | {
151
+ warnings: {
152
+ path: string;
153
+ link: string;
154
+ }[];
155
+ repo: "user" | "project";
156
+ revision: number;
157
+ } | {
158
+ error: string;
159
+ code: "conflict";
160
+ revision: number;
161
+ conflicts: {
162
+ path: string;
163
+ contents: string | null;
164
+ }[];
165
+ } | {
166
+ error: string;
167
+ code: import("@sixb/core").AgentMemoryErrorCode;
168
+ };
169
+ 403: {
170
+ error: string;
171
+ code?: string | undefined;
172
+ };
173
+ 409: {
174
+ error: string;
175
+ code: "conflict";
176
+ revision: number;
177
+ conflicts: {
178
+ path: string;
179
+ contents: string | null;
180
+ }[];
181
+ };
182
+ 400: {
183
+ error: string;
184
+ code?: string | undefined;
185
+ };
186
+ 501: {
187
+ error: string;
188
+ code?: string | undefined;
189
+ };
190
+ 201: {
191
+ warnings: {
192
+ path: string;
193
+ link: string;
194
+ }[];
195
+ repo: "user" | "project";
196
+ revision: number;
197
+ };
198
+ 422: {
199
+ type: "validation";
200
+ on: string;
201
+ summary?: string;
202
+ message?: string;
203
+ found?: unknown;
204
+ property?: string;
205
+ expected?: string;
206
+ };
207
+ };
208
+ };
209
+ };
210
+ };
211
+ };
212
+ };
213
+ } & {
214
+ api: {
215
+ "agent-memory": {
216
+ ":repo": {
217
+ delete: {
218
+ body: unknown;
219
+ params: {
220
+ repo: "user" | "project";
221
+ };
222
+ query: unknown;
223
+ headers: unknown;
224
+ response: {
225
+ 200: {
226
+ deleted: true;
227
+ };
228
+ 403: {
229
+ error: string;
230
+ code?: string | undefined;
231
+ };
232
+ 400: {
233
+ error: string;
234
+ code?: string | undefined;
235
+ };
236
+ 501: {
237
+ error: string;
238
+ code?: string | undefined;
239
+ };
240
+ 422: {
241
+ type: "validation";
242
+ on: string;
243
+ summary?: string;
244
+ message?: string;
245
+ found?: unknown;
246
+ property?: string;
247
+ expected?: string;
248
+ };
249
+ };
250
+ };
251
+ };
252
+ };
253
+ };
254
+ }, {
255
+ derive: {};
256
+ resolve: {};
257
+ schema: {};
258
+ standaloneSchema: {};
259
+ response: {};
260
+ }, {
261
+ derive: {};
262
+ resolve: {};
263
+ schema: {};
264
+ standaloneSchema: {};
265
+ response: {};
266
+ }>;
267
+ //# sourceMappingURL=agent-memory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-memory.d.ts","sourceRoot":"","sources":["../../src/routes/agent-memory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAiDpC,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+JpD"}