@sixb/server 0.1.26 → 0.2.0

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 (98) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +2495 -1845
  5. package/dist/index.js.map +29 -27
  6. package/dist/routes/actions.d.ts +1 -1
  7. package/dist/routes/agent-approvals.d.ts +11 -5
  8. package/dist/routes/agent-approvals.d.ts.map +1 -1
  9. package/dist/routes/agent-children.d.ts +2 -2
  10. package/dist/routes/agent-computers.d.ts +214 -10
  11. package/dist/routes/agent-computers.d.ts.map +1 -1
  12. package/dist/routes/agent-runners.d.ts +1 -1
  13. package/dist/routes/agent-runners.d.ts.map +1 -1
  14. package/dist/routes/agents.d.ts +230 -24
  15. package/dist/routes/agents.d.ts.map +1 -1
  16. package/dist/routes/ai-accounting.d.ts.map +1 -1
  17. package/dist/routes/auth.d.ts +9 -0
  18. package/dist/routes/auth.d.ts.map +1 -1
  19. package/dist/routes/datasets.d.ts +93 -17
  20. package/dist/routes/datasets.d.ts.map +1 -1
  21. package/dist/routes/events.d.ts +1 -1
  22. package/dist/routes/links.d.ts +121 -81
  23. package/dist/routes/links.d.ts.map +1 -1
  24. package/dist/routes/logs.d.ts +3 -3
  25. package/dist/routes/objects.d.ts +149 -58
  26. package/dist/routes/objects.d.ts.map +1 -1
  27. package/dist/routes/observed-agent-threads.d.ts +23 -5
  28. package/dist/routes/observed-agent-threads.d.ts.map +1 -1
  29. package/dist/routes/pipelines.d.ts +2 -2
  30. package/dist/routes/projections.d.ts +122 -122
  31. package/dist/routes/rules.d.ts +2 -2
  32. package/dist/routes/telemetry.d.ts +0 -50
  33. package/dist/routes/telemetry.d.ts.map +1 -1
  34. package/dist/routes/webhook-runs.d.ts +1 -1
  35. package/dist/routes/workflows.d.ts +21 -10
  36. package/dist/routes/workflows.d.ts.map +1 -1
  37. package/dist/routes/ws/agents.d.ts +4 -1
  38. package/dist/routes/ws/agents.d.ts.map +1 -1
  39. package/dist/routes/ws/logs.d.ts +10 -10
  40. package/dist/schemas/actions.d.ts +3 -3
  41. package/dist/schemas/activity.d.ts +4 -4
  42. package/dist/schemas/agent-approvals.d.ts +21 -21
  43. package/dist/schemas/agents.d.ts +760 -107
  44. package/dist/schemas/agents.d.ts.map +1 -1
  45. package/dist/schemas/ai-accounting.d.ts +1114 -6
  46. package/dist/schemas/ai-accounting.d.ts.map +1 -1
  47. package/dist/schemas/auth.d.ts +47 -0
  48. package/dist/schemas/auth.d.ts.map +1 -1
  49. package/dist/schemas/datasets.d.ts +303 -60
  50. package/dist/schemas/datasets.d.ts.map +1 -1
  51. package/dist/schemas/event-payloads.d.ts +6 -6
  52. package/dist/schemas/events.d.ts +8 -8
  53. package/dist/schemas/lineage.d.ts +1272 -0
  54. package/dist/schemas/lineage.d.ts.map +1 -0
  55. package/dist/schemas/links.d.ts +4 -27
  56. package/dist/schemas/links.d.ts.map +1 -1
  57. package/dist/schemas/logs.d.ts +22 -22
  58. package/dist/schemas/objects.d.ts +7 -26
  59. package/dist/schemas/objects.d.ts.map +1 -1
  60. package/dist/schemas/pipelines.d.ts +12 -12
  61. package/dist/schemas/projections.d.ts +733 -733
  62. package/dist/schemas/rules.d.ts +4 -4
  63. package/dist/schemas/telemetry.d.ts +0 -13
  64. package/dist/schemas/telemetry.d.ts.map +1 -1
  65. package/dist/schemas/webhook-runs.d.ts +2 -2
  66. package/dist/schemas/workflows.d.ts +133 -44
  67. package/dist/schemas/workflows.d.ts.map +1 -1
  68. package/dist/server.d.ts +4 -0
  69. package/dist/server.d.ts.map +1 -1
  70. package/dist/utils/request-body.d.ts +5 -0
  71. package/dist/utils/request-body.d.ts.map +1 -1
  72. package/dist/utils/request-timing.d.ts +18 -0
  73. package/dist/utils/request-timing.d.ts.map +1 -0
  74. package/package.json +7 -7
  75. package/src/index.ts +1 -0
  76. package/src/routes/agent-approvals.ts +2 -2
  77. package/src/routes/agent-computers.ts +309 -87
  78. package/src/routes/agent-runners.ts +30 -6
  79. package/src/routes/agents.ts +187 -25
  80. package/src/routes/ai-accounting.ts +149 -12
  81. package/src/routes/auth.ts +24 -2
  82. package/src/routes/datasets.ts +55 -5
  83. package/src/routes/links.ts +43 -76
  84. package/src/routes/objects.ts +49 -42
  85. package/src/routes/observed-agent-threads.ts +2 -2
  86. package/src/routes/telemetry.ts +1 -42
  87. package/src/routes/ws/agents.ts +10 -1
  88. package/src/schemas/agents.ts +121 -6
  89. package/src/schemas/ai-accounting.ts +78 -15
  90. package/src/schemas/auth.ts +19 -0
  91. package/src/schemas/datasets.ts +36 -0
  92. package/src/schemas/lineage.ts +115 -0
  93. package/src/schemas/links.ts +3 -11
  94. package/src/schemas/objects.ts +6 -10
  95. package/src/schemas/telemetry.ts +0 -6
  96. package/src/server.ts +18 -2
  97. package/src/utils/request-body.ts +10 -4
  98. package/src/utils/request-timing.ts +136 -0
@@ -41,8 +41,8 @@ export declare function registerDatasetRoutes(app: Elysia, host: SixbHostView):
41
41
  versionId: string;
42
42
  rowCount?: number | undefined;
43
43
  } | null;
44
- syncIds: string[];
45
44
  materialized: boolean;
45
+ syncIds: string[];
46
46
  sourcePipelineIds: string[];
47
47
  targetPipelineIds: string[];
48
48
  projectionIds: string[];
@@ -96,8 +96,8 @@ export declare function registerDatasetRoutes(app: Elysia, host: SixbHostView):
96
96
  versionId: string;
97
97
  rowCount?: number | undefined;
98
98
  } | null;
99
- syncIds: string[];
100
99
  materialized: boolean;
100
+ syncIds: string[];
101
101
  sourcePipelineIds: string[];
102
102
  targetPipelineIds: string[];
103
103
  projectionIds: string[];
@@ -157,16 +157,17 @@ export declare function registerDatasetRoutes(app: Elysia, host: SixbHostView):
157
157
  datasetId: string;
158
158
  versionId: string;
159
159
  sizeBytes?: number | undefined;
160
- inputs?: {
161
- datasetId: string;
162
- versionId: string;
163
- }[] | undefined;
164
160
  parentVersionId?: string | undefined;
165
161
  producer?: {
166
- kind: "pipeline" | "sync" | "ingest";
162
+ kind: "sync" | "pipeline" | "ingest";
167
163
  id?: string | undefined;
168
164
  runId?: string | undefined;
165
+ stepId?: string | undefined;
169
166
  } | undefined;
167
+ inputs?: {
168
+ datasetId: string;
169
+ versionId: string;
170
+ }[] | undefined;
170
171
  rowCount?: number | undefined;
171
172
  }[];
172
173
  };
@@ -220,16 +221,17 @@ export declare function registerDatasetRoutes(app: Elysia, host: SixbHostView):
220
221
  datasetId: string;
221
222
  versionId: string;
222
223
  sizeBytes?: number | undefined;
223
- inputs?: {
224
- datasetId: string;
225
- versionId: string;
226
- }[] | undefined;
227
224
  parentVersionId?: string | undefined;
228
225
  producer?: {
229
- kind: "pipeline" | "sync" | "ingest";
226
+ kind: "sync" | "pipeline" | "ingest";
230
227
  id?: string | undefined;
231
228
  runId?: string | undefined;
229
+ stepId?: string | undefined;
232
230
  } | undefined;
231
+ inputs?: {
232
+ datasetId: string;
233
+ versionId: string;
234
+ }[] | undefined;
233
235
  rowCount?: number | undefined;
234
236
  };
235
237
  404: {
@@ -255,6 +257,79 @@ export declare function registerDatasetRoutes(app: Elysia, host: SixbHostView):
255
257
  };
256
258
  };
257
259
  };
260
+ } & {
261
+ api: {
262
+ datasets: {
263
+ ":datasetId": {
264
+ versions: {
265
+ ":versionId": {
266
+ lineage: {
267
+ get: {
268
+ body: unknown;
269
+ params: {
270
+ datasetId: string;
271
+ versionId: string;
272
+ };
273
+ query: {
274
+ depth?: string | undefined;
275
+ };
276
+ headers: unknown;
277
+ response: {
278
+ 200: {
279
+ truncated: boolean;
280
+ nodes: ({
281
+ mode: "append" | "schema" | "merge" | "snapshot";
282
+ createdAt: string;
283
+ datasetId: string;
284
+ versionId: string;
285
+ parentVersionId?: string | undefined;
286
+ producer?: {
287
+ kind: "sync" | "pipeline" | "ingest";
288
+ id?: string | undefined;
289
+ runId?: string | undefined;
290
+ stepId?: string | undefined;
291
+ } | undefined;
292
+ } | {
293
+ expired: true;
294
+ datasetId: string;
295
+ versionId: string;
296
+ })[];
297
+ edges: {
298
+ from: {
299
+ datasetId: string;
300
+ versionId: string;
301
+ };
302
+ to: {
303
+ datasetId: string;
304
+ versionId: string;
305
+ };
306
+ }[];
307
+ restricted: number;
308
+ };
309
+ 404: {
310
+ error: string;
311
+ code: "dataset.not_found" | "dataset.version_not_found";
312
+ };
313
+ 400: {
314
+ error: string;
315
+ };
316
+ 422: {
317
+ type: "validation";
318
+ on: string;
319
+ summary?: string;
320
+ message?: string;
321
+ found?: unknown;
322
+ property?: string;
323
+ expected?: string;
324
+ };
325
+ };
326
+ };
327
+ };
328
+ };
329
+ };
330
+ };
331
+ };
332
+ };
258
333
  } & {
259
334
  api: {
260
335
  datasets: {
@@ -288,16 +363,17 @@ export declare function registerDatasetRoutes(app: Elysia, host: SixbHostView):
288
363
  datasetId: string;
289
364
  versionId: string;
290
365
  sizeBytes?: number | undefined;
291
- inputs?: {
292
- datasetId: string;
293
- versionId: string;
294
- }[] | undefined;
295
366
  parentVersionId?: string | undefined;
296
367
  producer?: {
297
- kind: "pipeline" | "sync" | "ingest";
368
+ kind: "sync" | "pipeline" | "ingest";
298
369
  id?: string | undefined;
299
370
  runId?: string | undefined;
371
+ stepId?: string | undefined;
300
372
  } | undefined;
373
+ inputs?: {
374
+ datasetId: string;
375
+ versionId: string;
376
+ }[] | undefined;
301
377
  rowCount?: number | undefined;
302
378
  };
303
379
  limit: number;
@@ -1 +1 @@
1
- {"version":3,"file":"datasets.d.ts","sourceRoot":"","sources":["../../src/routes/datasets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,YAAY,EAAE,MAAM,YAAY,CAAA;AAOjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA4LpC,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqLpE"}
1
+ {"version":3,"file":"datasets.d.ts","sourceRoot":"","sources":["../../src/routes/datasets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqC,YAAY,EAAE,MAAM,YAAY,CAAA;AAOjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAuMpC,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4NpE"}
@@ -39,10 +39,10 @@ export declare function registerEventRoutes(app: Elysia, _host: SixbHostView): E
39
39
  type: "schedule.triggered" | "rule.triggered" | "rule.resolved" | "sync.run.started" | "sync.run.finished" | "pipeline.run.started" | "pipeline.run.step.started" | "pipeline.run.step.finished" | "pipeline.run.finished" | "workflow.run.queued" | "workflow.run.started" | "workflow.run.node.started" | "workflow.run.waiting" | "workflow.run.node.waiting" | "workflow.run.node.finished" | "workflow.run.finished" | "workflow.intervention.requested" | "workflow.intervention.submitted" | "workflow.intervention.cancelled" | "workflow.intervention.expired" | "dataset.version.committed" | "user.joined" | "user.suspended" | "user.reactivated" | "user.invited" | "user.profile.updated";
40
40
  occurredAt: string;
41
41
  cursor: string;
42
+ schemaVersion: 1;
42
43
  payload: Record<string, unknown>;
43
44
  topic: "objects" | "datasets" | "workflows" | "syncs" | "pipelines" | "rules" | "schedules" | "users" | "telemetry" | "links";
44
45
  partitionKey: string;
45
- schemaVersion: 1;
46
46
  origin?: {
47
47
  kind: "projection";
48
48
  datasetId: string;
@@ -22,89 +22,129 @@ export declare function registerLinkRoutes(app: Elysia, _host: SixbHostView): El
22
22
  ":objectId": {
23
23
  links: {
24
24
  ":linkId": {
25
- put: {
26
- body: {
27
- targetTypeId: string;
28
- targetId: string;
29
- properties?: Record<string, unknown> | undefined;
30
- };
31
- params: {
32
- objectTypeId: string;
33
- objectId: string;
34
- linkId: string;
35
- };
36
- query: unknown;
37
- headers: unknown;
38
- response: {
39
- 200: {
40
- success: boolean;
41
- };
42
- 404: {
43
- error: string;
44
- };
45
- 403: {
46
- error: string;
47
- };
48
- 400: {
49
- error: string;
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
- };
67
- };
68
- } & {
69
- api: {
70
- objects: {
71
- ":objectTypeId": {
72
- ":objectId": {
73
- links: {
74
- ":linkId": {
75
- delete: {
76
- body: unknown;
77
- params: {
78
- objectTypeId: string;
79
- objectId: string;
80
- linkId: string;
81
- };
82
- query: {
83
- targetTypeId: string;
84
- targetId: string;
85
- };
86
- headers: unknown;
87
- response: {
88
- 200: {
89
- success: boolean;
90
- };
91
- 404: {
92
- error: string;
93
- };
94
- 403: {
95
- error: string;
25
+ lineage: {
26
+ get: {
27
+ body: unknown;
28
+ params: {
29
+ objectTypeId: string;
30
+ linkId: string;
31
+ objectId: string;
96
32
  };
97
- 400: {
98
- error: string;
33
+ query: {
34
+ targetTypeId: string;
35
+ targetId: string;
99
36
  };
100
- 422: {
101
- type: "validation";
102
- on: string;
103
- summary?: string;
104
- message?: string;
105
- found?: unknown;
106
- property?: string;
107
- expected?: string;
37
+ headers: unknown;
38
+ response: {
39
+ 200: {
40
+ sourceId: string;
41
+ restricted: number;
42
+ sourceTypeId: string;
43
+ linkId: string;
44
+ targetTypeId: string;
45
+ targetId: string;
46
+ existence: {
47
+ source: string;
48
+ columns?: string[] | undefined;
49
+ origins?: {
50
+ datasetId: string;
51
+ column: string;
52
+ }[] | undefined;
53
+ };
54
+ sources: Record<string, {
55
+ kind: "projection";
56
+ projectionId: string;
57
+ projectionRunId?: string | undefined;
58
+ datasetVersion?: {
59
+ datasetId: string;
60
+ versionId: string;
61
+ } | undefined;
62
+ rowOrigins?: {
63
+ datasetId: string;
64
+ column: string;
65
+ }[] | undefined;
66
+ } | {
67
+ kind: "edit";
68
+ commitId: string | null;
69
+ committedAt: string;
70
+ executor?: {
71
+ type: "request";
72
+ requestId: string;
73
+ } | {
74
+ id: string;
75
+ kind: "workflow" | "action" | "sync" | "pipeline" | "projection" | "rule" | "webhook";
76
+ type: "primitive";
77
+ runId: string;
78
+ } | {
79
+ type: "agent";
80
+ runId: string;
81
+ } | {
82
+ type: "kernel";
83
+ operation: {
84
+ type: "ontology.recover";
85
+ recoveryId: string;
86
+ } | {
87
+ type: "ontology.indexVectors";
88
+ indexingId: string;
89
+ };
90
+ } | undefined;
91
+ requestedBy?: {
92
+ id: string;
93
+ type: "user" | "serviceAccount";
94
+ } | undefined;
95
+ action?: {
96
+ actionId: string;
97
+ runId: string;
98
+ } | undefined;
99
+ } | {
100
+ kind: "telemetry";
101
+ commitId: string;
102
+ committedAt: string;
103
+ executor?: {
104
+ type: "request";
105
+ requestId: string;
106
+ } | {
107
+ id: string;
108
+ kind: "workflow" | "action" | "sync" | "pipeline" | "projection" | "rule" | "webhook";
109
+ type: "primitive";
110
+ runId: string;
111
+ } | {
112
+ type: "agent";
113
+ runId: string;
114
+ } | {
115
+ type: "kernel";
116
+ operation: {
117
+ type: "ontology.recover";
118
+ recoveryId: string;
119
+ } | {
120
+ type: "ontology.indexVectors";
121
+ indexingId: string;
122
+ };
123
+ } | undefined;
124
+ requestedBy?: {
125
+ id: string;
126
+ type: "user" | "serviceAccount";
127
+ } | undefined;
128
+ projectionId?: string | undefined;
129
+ } | {
130
+ kind: "identity";
131
+ }>;
132
+ };
133
+ 404: {
134
+ error: string;
135
+ };
136
+ 400: {
137
+ error: string;
138
+ };
139
+ 422: {
140
+ type: "validation";
141
+ on: string;
142
+ summary?: string;
143
+ message?: string;
144
+ found?: unknown;
145
+ property?: string;
146
+ expected?: string;
147
+ };
108
148
  };
109
149
  };
110
150
  };
@@ -1 +1 @@
1
- {"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../src/routes/links.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAQpC,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+ElE"}
1
+ {"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../src/routes/links.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AASpC,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6ClE"}
@@ -22,11 +22,11 @@ export declare function registerLogRoutes(app: Elysia, _host: SixbHostView): Ely
22
22
  body: unknown;
23
23
  params: {};
24
24
  query: {
25
- kind?: "workflow" | "agent" | "action" | "pipeline" | "webhook" | "sync" | "projection" | undefined;
25
+ kind?: "workflow" | "agent" | "action" | "sync" | "pipeline" | "projection" | "webhook" | undefined;
26
26
  runId?: string | undefined;
27
27
  limit?: number | undefined;
28
- direction?: "forward" | "backward" | undefined;
29
28
  afterCursor?: string | undefined;
29
+ direction?: "forward" | "backward" | undefined;
30
30
  level?: "error" | "info" | "debug" | "warn" | undefined;
31
31
  beforeCursor?: string | undefined;
32
32
  };
@@ -40,7 +40,7 @@ export declare function registerLogRoutes(app: Elysia, _host: SixbHostView): Ely
40
40
  context: {
41
41
  run: {
42
42
  id: string;
43
- kind: "workflow" | "agent" | "action" | "pipeline" | "webhook" | "sync" | "projection";
43
+ kind: "workflow" | "agent" | "action" | "sync" | "pipeline" | "projection" | "webhook";
44
44
  };
45
45
  phase?: string | undefined;
46
46
  attempt?: number | undefined;