deepline 0.1.12 → 0.1.19

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 (80) hide show
  1. package/README.md +14 -6
  2. package/dist/cli/index.js +1298 -711
  3. package/dist/cli/index.mjs +1294 -707
  4. package/dist/index.d.mts +199 -23
  5. package/dist/index.d.ts +199 -23
  6. package/dist/index.js +219 -13
  7. package/dist/index.mjs +219 -13
  8. package/dist/repo/apps/play-runner-workers/src/coordinator-entry.ts +68 -12
  9. package/dist/repo/apps/play-runner-workers/src/entry.ts +241 -51
  10. package/dist/repo/sdk/src/client.ts +237 -0
  11. package/dist/repo/sdk/src/config.ts +125 -8
  12. package/dist/repo/sdk/src/http.ts +10 -2
  13. package/dist/repo/sdk/src/play.ts +19 -36
  14. package/dist/repo/sdk/src/plays/bundle-play-file.ts +22 -8
  15. package/dist/repo/sdk/src/plays/local-file-discovery.ts +207 -160
  16. package/dist/repo/sdk/src/types.ts +25 -0
  17. package/dist/repo/sdk/src/version.ts +2 -2
  18. package/dist/repo/shared_libs/play-runtime/tool-result.ts +237 -145
  19. package/dist/repo/shared_libs/plays/bundling/index.ts +206 -229
  20. package/dist/repo/shared_libs/plays/dataset.ts +28 -0
  21. package/package.json +5 -4
  22. package/dist/cli/index.js.map +0 -1
  23. package/dist/cli/index.mjs.map +0 -1
  24. package/dist/index.js.map +0 -1
  25. package/dist/index.mjs.map +0 -1
  26. package/dist/repo/apps/play-runner-workers/src/runtime/README.md +0 -21
  27. package/dist/repo/apps/play-runner-workers/src/runtime/batching.ts +0 -177
  28. package/dist/repo/apps/play-runner-workers/src/runtime/execution-plan.ts +0 -52
  29. package/dist/repo/apps/play-runner-workers/src/runtime/tool-batch.ts +0 -100
  30. package/dist/repo/sdk/src/cli/commands/auth.ts +0 -500
  31. package/dist/repo/sdk/src/cli/commands/billing.ts +0 -188
  32. package/dist/repo/sdk/src/cli/commands/csv.ts +0 -123
  33. package/dist/repo/sdk/src/cli/commands/db.ts +0 -119
  34. package/dist/repo/sdk/src/cli/commands/feedback.ts +0 -40
  35. package/dist/repo/sdk/src/cli/commands/org.ts +0 -117
  36. package/dist/repo/sdk/src/cli/commands/play.ts +0 -3441
  37. package/dist/repo/sdk/src/cli/commands/tools.ts +0 -687
  38. package/dist/repo/sdk/src/cli/dataset-stats.ts +0 -415
  39. package/dist/repo/sdk/src/cli/index.ts +0 -148
  40. package/dist/repo/sdk/src/cli/progress.ts +0 -149
  41. package/dist/repo/sdk/src/cli/skills-sync.ts +0 -141
  42. package/dist/repo/sdk/src/cli/trace.ts +0 -61
  43. package/dist/repo/sdk/src/cli/utils.ts +0 -145
  44. package/dist/repo/sdk/src/compat.ts +0 -77
  45. package/dist/repo/shared_libs/observability/node-tracing.ts +0 -129
  46. package/dist/repo/shared_libs/observability/tracing.ts +0 -98
  47. package/dist/repo/shared_libs/play-runtime/context.ts +0 -4242
  48. package/dist/repo/shared_libs/play-runtime/ctx-contract.ts +0 -250
  49. package/dist/repo/shared_libs/play-runtime/ctx-types.ts +0 -725
  50. package/dist/repo/shared_libs/play-runtime/dataset-id.ts +0 -10
  51. package/dist/repo/shared_libs/play-runtime/db-session-crypto.ts +0 -304
  52. package/dist/repo/shared_libs/play-runtime/db-session.ts +0 -462
  53. package/dist/repo/shared_libs/play-runtime/live-events.ts +0 -214
  54. package/dist/repo/shared_libs/play-runtime/live-state-contract.ts +0 -50
  55. package/dist/repo/shared_libs/play-runtime/map-execution-frame.ts +0 -114
  56. package/dist/repo/shared_libs/play-runtime/map-row-identity.ts +0 -158
  57. package/dist/repo/shared_libs/play-runtime/progress-emitter.ts +0 -172
  58. package/dist/repo/shared_libs/play-runtime/protocol.ts +0 -121
  59. package/dist/repo/shared_libs/play-runtime/public-play-contract.ts +0 -42
  60. package/dist/repo/shared_libs/play-runtime/result-normalization.ts +0 -33
  61. package/dist/repo/shared_libs/play-runtime/runtime-api.ts +0 -1873
  62. package/dist/repo/shared_libs/play-runtime/runtime-constraints.ts +0 -2
  63. package/dist/repo/shared_libs/play-runtime/runtime-pg-driver-neon-serverless.ts +0 -201
  64. package/dist/repo/shared_libs/play-runtime/runtime-pg-driver-pg.ts +0 -48
  65. package/dist/repo/shared_libs/play-runtime/runtime-pg-driver.ts +0 -84
  66. package/dist/repo/shared_libs/play-runtime/static-pipeline-types.ts +0 -147
  67. package/dist/repo/shared_libs/play-runtime/suspension.ts +0 -68
  68. package/dist/repo/shared_libs/play-runtime/tracing.ts +0 -31
  69. package/dist/repo/shared_libs/play-runtime/waterfall-replay.ts +0 -75
  70. package/dist/repo/shared_libs/play-runtime/worker-api-types.ts +0 -140
  71. package/dist/repo/shared_libs/plays/artifact-transport.ts +0 -14
  72. package/dist/repo/shared_libs/plays/artifact-types.ts +0 -49
  73. package/dist/repo/shared_libs/plays/compiler-manifest.ts +0 -186
  74. package/dist/repo/shared_libs/plays/definition.ts +0 -264
  75. package/dist/repo/shared_libs/plays/file-refs.ts +0 -11
  76. package/dist/repo/shared_libs/plays/rate-limit-scheduler.ts +0 -206
  77. package/dist/repo/shared_libs/plays/resolve-static-pipeline.ts +0 -164
  78. package/dist/repo/shared_libs/plays/runtime-validation.ts +0 -395
  79. package/dist/repo/shared_libs/temporal/constants.ts +0 -39
  80. package/dist/repo/shared_libs/temporal/preview-config.ts +0 -153
@@ -1,250 +0,0 @@
1
- export interface BatchResult {
2
- rowId: number;
3
- rowKey?: string | null;
4
- result: unknown | null;
5
- }
6
-
7
- export interface MapExecutionFrame {
8
- mapInvocationId: string;
9
- mapNodeId?: string | null;
10
- logicalNamespace: string;
11
- artifactTableNamespace: string;
12
- status: 'running' | 'suspended' | 'completed' | 'failed';
13
- totalRows: number;
14
- completedRowKeys: string[];
15
- pendingRowKeys: string[];
16
- activeBoundaryId?: string | null;
17
- startedAt: number;
18
- updatedAt: number;
19
- }
20
-
21
- export interface PlayRowUpdate {
22
- key: string;
23
- rowId: number;
24
- tableNamespace?: string | null;
25
- status?: 'running' | 'completed' | 'failed';
26
- stage?: string | null;
27
- provider?: string | null;
28
- error?: string | null;
29
- dataPatch?: Record<string, unknown>;
30
- cellMetaPatch?: Record<
31
- string,
32
- {
33
- status:
34
- | 'queued'
35
- | 'running'
36
- | 'completed'
37
- | 'failed'
38
- | 'cached'
39
- | 'missed'
40
- | 'skipped';
41
- stage?: string | null;
42
- provider?: string | null;
43
- error?: string | null;
44
- reused?: boolean;
45
- }
46
- >;
47
- }
48
-
49
- export type PlayExecutionEvent =
50
- | {
51
- type: 'map.preparing';
52
- mapInvocationId: string;
53
- mapNodeId?: string | null;
54
- logicalNamespace: string;
55
- artifactTableNamespace: string;
56
- totalRows: number;
57
- completedRows: number;
58
- pendingRows: number;
59
- at: number;
60
- }
61
- | {
62
- type: 'map.started';
63
- mapInvocationId: string;
64
- mapNodeId?: string | null;
65
- logicalNamespace: string;
66
- artifactTableNamespace: string;
67
- totalRows: number;
68
- completedRows: number;
69
- pendingRows: number;
70
- at: number;
71
- }
72
- | {
73
- type: 'map.progress';
74
- mapInvocationId: string;
75
- mapNodeId?: string | null;
76
- logicalNamespace: string;
77
- artifactTableNamespace: string;
78
- completedRows: number;
79
- failedRows: number;
80
- totalRows?: number;
81
- at: number;
82
- }
83
- | {
84
- type: 'map.row.updated';
85
- mapInvocationId: string;
86
- mapNodeId?: string | null;
87
- logicalNamespace: string;
88
- artifactTableNamespace: string;
89
- rowKey: string;
90
- rowStatus?: PlayRowUpdate['status'];
91
- fieldName?: string | null;
92
- stage?: string | null;
93
- provider?: string | null;
94
- at: number;
95
- }
96
- | {
97
- type: 'map.completed' | 'map.suspended' | 'map.resumed' | 'map.failed';
98
- mapInvocationId: string;
99
- mapNodeId?: string | null;
100
- logicalNamespace: string;
101
- artifactTableNamespace: string;
102
- completedRows: number;
103
- failedRows: number;
104
- totalRows?: number;
105
- at: number;
106
- };
107
-
108
- export interface PlayCheckpoint {
109
- completedBatches: Record<string, BatchResult[]>;
110
- completedToolBatches: Record<
111
- string,
112
- Record<string, { done: true; result: unknown | null }>
113
- >;
114
- resolvedWaterfalls: Record<string, Record<string, unknown>>;
115
- resolvedBoundaries?: Record<
116
- string,
117
- | {
118
- kind: 'sleep';
119
- delayMs: number;
120
- completedAt?: number;
121
- scope?: {
122
- type: 'workflow' | 'map_row';
123
- tableNamespace?: string;
124
- rowKey?: string;
125
- rowIndex?: number;
126
- fieldName?: string;
127
- };
128
- }
129
- | {
130
- kind: 'integration_event';
131
- eventKey: string;
132
- timeoutMs: number;
133
- provider?: string;
134
- toolId?: string;
135
- messageRef?: {
136
- channel: string;
137
- ts: string;
138
- };
139
- output?: unknown;
140
- completedAt?: number;
141
- }
142
- | {
143
- kind: 'fetch';
144
- url: string;
145
- method: string;
146
- output?: unknown;
147
- completedAt?: number;
148
- }
149
- | {
150
- kind: 'step';
151
- stepId: string;
152
- output?: unknown;
153
- completedAt?: number;
154
- }
155
- >;
156
- mapFrames?: Record<string, MapExecutionFrame>;
157
- }
158
-
159
- export interface PlayStepRowResult {
160
- rowId: number;
161
- status: 'completed' | 'failed' | 'missed' | 'skipped';
162
- success: boolean;
163
- provider?: string;
164
- value?: unknown;
165
- error?: string | null;
166
- }
167
-
168
- export type PlayStep =
169
- | { type: 'start'; trigger?: string; description?: string }
170
- | { type: 'csv_load'; arg?: string; rows?: number; description?: string }
171
- | {
172
- type: 'map';
173
- items: number;
174
- fields?: string[];
175
- substeps: PlayMapSubstep[];
176
- description?: string;
177
- }
178
- | {
179
- type: 'waterfall';
180
- tool?: string;
181
- providers?: string[];
182
- id?: string;
183
- output?: string;
184
- minResults?: number;
185
- steps?: Array<{
186
- id: string;
187
- kind?: 'tool' | 'code';
188
- toolId?: string;
189
- results: PlayStepRowResult[];
190
- }>;
191
- results: PlayStepRowResult[];
192
- description?: string;
193
- }
194
- | {
195
- type: 'tool';
196
- toolId: string;
197
- results: PlayStepRowResult[];
198
- description?: string;
199
- }
200
- | {
201
- type: 'play_call';
202
- playId: string;
203
- results?: PlayStepRowResult[];
204
- nestedSteps: PlayStep[];
205
- description?: string;
206
- }
207
- | {
208
- type: 'run_javascript';
209
- alias: string;
210
- results: PlayStepRowResult[];
211
- description?: string;
212
- }
213
- | { type: 'return'; outputRows: number; description?: string };
214
-
215
- export type PlayMapSubstep =
216
- | {
217
- type: 'waterfall';
218
- tool?: string;
219
- providers?: string[];
220
- id?: string;
221
- output?: string;
222
- minResults?: number;
223
- steps?: Array<{
224
- id: string;
225
- kind?: 'tool' | 'code';
226
- toolId?: string;
227
- results: PlayStepRowResult[];
228
- }>;
229
- results: PlayStepRowResult[];
230
- description?: string;
231
- }
232
- | {
233
- type: 'tool';
234
- toolId: string;
235
- results: PlayStepRowResult[];
236
- description?: string;
237
- }
238
- | {
239
- type: 'play_call';
240
- playId: string;
241
- results?: PlayStepRowResult[];
242
- nestedSteps: PlayStep[];
243
- description?: string;
244
- }
245
- | {
246
- type: 'run_javascript';
247
- alias: string;
248
- results: PlayStepRowResult[];
249
- description?: string;
250
- };