deepline 0.1.119 → 0.1.121

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 (148) hide show
  1. package/README.md +4 -0
  2. package/dist/bundling-sources/apps/play-runner-workers/src/runtime/README.md +21 -0
  3. package/dist/bundling-sources/apps/play-runner-workers/src/runtime/batching.ts +185 -0
  4. package/dist/bundling-sources/apps/play-runner-workers/src/runtime/tool-batch.ts +107 -0
  5. package/dist/{repo → bundling-sources}/sdk/src/client.ts +116 -12
  6. package/dist/bundling-sources/sdk/src/compat.ts +191 -0
  7. package/dist/bundling-sources/sdk/src/gtm.ts +146 -0
  8. package/dist/bundling-sources/sdk/src/helpers.ts +12 -0
  9. package/dist/{repo → bundling-sources}/sdk/src/index.ts +2 -1
  10. package/dist/{repo → bundling-sources}/sdk/src/play.ts +3 -1
  11. package/dist/{repo → bundling-sources}/sdk/src/plays/bundle-play-file.ts +17 -5
  12. package/dist/{repo → bundling-sources}/sdk/src/release.ts +2 -2
  13. package/dist/{repo → bundling-sources}/sdk/src/runs/observe-transport.ts +2 -3
  14. package/dist/bundling-sources/shared_libs/play-data-plane/index.ts +3 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +838 -0
  16. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +5510 -0
  17. package/dist/bundling-sources/shared_libs/play-runtime/ctx-contract.ts +261 -0
  18. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +828 -0
  19. package/dist/bundling-sources/shared_libs/play-runtime/dataset-id.ts +10 -0
  20. package/dist/bundling-sources/shared_libs/play-runtime/daytona-runtime-config.ts +50 -0
  21. package/dist/bundling-sources/shared_libs/play-runtime/durability-store.ts +20 -0
  22. package/dist/bundling-sources/shared_libs/play-runtime/event-wait-tools.ts +9 -0
  23. package/dist/bundling-sources/shared_libs/play-runtime/governor/in-memory-rate-state-backend.ts +171 -0
  24. package/dist/bundling-sources/shared_libs/play-runtime/hatchet-cold-execution-diagnosis.ts +321 -0
  25. package/dist/bundling-sources/shared_libs/play-runtime/hatchet-cold-execution-target.ts +158 -0
  26. package/dist/bundling-sources/shared_libs/play-runtime/internal-step-ids.ts +34 -0
  27. package/dist/bundling-sources/shared_libs/play-runtime/ledger-safe-payload.ts +34 -0
  28. package/dist/bundling-sources/shared_libs/play-runtime/live-state-contract.ts +50 -0
  29. package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +119 -0
  30. package/dist/{repo → bundling-sources}/shared_libs/play-runtime/map-row-identity.ts +1 -1
  31. package/dist/bundling-sources/shared_libs/play-runtime/play-latency-trace.ts +636 -0
  32. package/dist/bundling-sources/shared_libs/play-runtime/postgres-json.ts +9 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/progress-emitter.ts +197 -0
  34. package/dist/bundling-sources/shared_libs/play-runtime/projection.ts +262 -0
  35. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +143 -0
  36. package/dist/bundling-sources/shared_libs/play-runtime/public-play-contract.ts +42 -0
  37. package/dist/bundling-sources/shared_libs/play-runtime/receipt-status.ts +40 -0
  38. package/dist/bundling-sources/shared_libs/play-runtime/runtime-actions.ts +178 -0
  39. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +4015 -0
  40. package/dist/bundling-sources/shared_libs/play-runtime/runtime-constraints.ts +2 -0
  41. package/dist/bundling-sources/shared_libs/play-runtime/runtime-pg-driver-neon-serverless.ts +238 -0
  42. package/dist/bundling-sources/shared_libs/play-runtime/runtime-pg-driver-pg.ts +53 -0
  43. package/dist/bundling-sources/shared_libs/play-runtime/runtime-pg-driver.ts +149 -0
  44. package/dist/bundling-sources/shared_libs/play-runtime/suspension.ts +68 -0
  45. package/dist/bundling-sources/shared_libs/play-runtime/tool-batch-executor.ts +149 -0
  46. package/dist/bundling-sources/shared_libs/play-runtime/tool-result-types.ts +159 -0
  47. package/dist/bundling-sources/shared_libs/play-runtime/tracing.ts +33 -0
  48. package/dist/bundling-sources/shared_libs/play-runtime/waterfall-replay.ts +79 -0
  49. package/dist/bundling-sources/shared_libs/play-runtime/worker-api-types.ts +139 -0
  50. package/dist/bundling-sources/shared_libs/plays/artifact-transport.ts +14 -0
  51. package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +49 -0
  52. package/dist/bundling-sources/shared_libs/plays/compiler-manifest.ts +41 -0
  53. package/dist/bundling-sources/shared_libs/plays/dataset-summary.ts +163 -0
  54. package/dist/bundling-sources/shared_libs/plays/definition.ts +267 -0
  55. package/dist/bundling-sources/shared_libs/plays/file-refs.ts +11 -0
  56. package/dist/bundling-sources/shared_libs/plays/input-contract.ts +146 -0
  57. package/dist/bundling-sources/shared_libs/plays/resolve-static-pipeline.ts +190 -0
  58. package/dist/bundling-sources/shared_libs/plays/runtime-validation.ts +417 -0
  59. package/dist/bundling-sources/shared_libs/plays/tool-codegen.ts +142 -0
  60. package/dist/bundling-sources/shared_libs/security/safe-outbound-fetch.ts +274 -0
  61. package/dist/bundling-sources/shared_libs/temporal/preview-config.ts +150 -0
  62. package/dist/cli/index.js +811 -2207
  63. package/dist/cli/index.mjs +847 -2258
  64. package/dist/compiler-manifest-BjoRENv9.d.mts +227 -0
  65. package/dist/compiler-manifest-BjoRENv9.d.ts +227 -0
  66. package/dist/index.d.mts +8 -231
  67. package/dist/index.d.ts +8 -231
  68. package/dist/index.js +101 -15
  69. package/dist/index.mjs +101 -15
  70. package/dist/plays/bundle-play-file.d.mts +120 -0
  71. package/dist/plays/bundle-play-file.d.ts +120 -0
  72. package/dist/plays/bundle-play-file.mjs +1830 -0
  73. package/package.json +4 -9
  74. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/child-play-await.ts +0 -0
  75. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/child-play-submit.ts +0 -0
  76. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/coordinator-entry.ts +0 -0
  77. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/dedup-do.ts +0 -0
  78. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/entry.ts +0 -0
  79. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/csv-rows.ts +0 -0
  80. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/dataset-handles.ts +0 -0
  81. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/harness-receipt-store.ts +0 -0
  82. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/live-progress.ts +0 -0
  83. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/map-chunk-plan.ts +0 -0
  84. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/receipts.ts +0 -0
  85. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/row-isolation.ts +0 -0
  86. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/tool-http-errors.ts +0 -0
  87. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/workflow-instance-create.ts +0 -0
  88. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/workflow-retry-state.ts +0 -0
  89. /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/workflow-retry.ts +0 -0
  90. /package/dist/{repo → bundling-sources}/sdk/src/agent-runtime.ts +0 -0
  91. /package/dist/{repo → bundling-sources}/sdk/src/config.ts +0 -0
  92. /package/dist/{repo → bundling-sources}/sdk/src/errors.ts +0 -0
  93. /package/dist/{repo → bundling-sources}/sdk/src/http.ts +0 -0
  94. /package/dist/{repo → bundling-sources}/sdk/src/plays/harness-stub.ts +0 -0
  95. /package/dist/{repo → bundling-sources}/sdk/src/plays/local-file-discovery.ts +0 -0
  96. /package/dist/{repo → bundling-sources}/sdk/src/stream-reconnect.ts +0 -0
  97. /package/dist/{repo → bundling-sources}/sdk/src/tool-output.ts +0 -0
  98. /package/dist/{repo → bundling-sources}/sdk/src/types.ts +0 -0
  99. /package/dist/{repo → bundling-sources}/sdk/src/version.ts +0 -0
  100. /package/dist/{repo → bundling-sources}/sdk/src/worker-play-entry.ts +0 -0
  101. /package/dist/{repo → bundling-sources}/shared_libs/play-data-plane/cell-policy.ts +0 -0
  102. /package/dist/{repo → bundling-sources}/shared_libs/play-data-plane/column-names.ts +0 -0
  103. /package/dist/{repo → bundling-sources}/shared_libs/play-data-plane/sheet-contract.ts +0 -0
  104. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/backend.ts +0 -0
  105. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/batch-runtime.ts +0 -0
  106. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/batching-types.ts +0 -0
  107. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/cell-staleness.ts +0 -0
  108. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/coordinator-headers.ts +0 -0
  109. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/csv-rename.ts +0 -0
  110. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/db-session-crypto.ts +0 -0
  111. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/db-session-plan.ts +0 -0
  112. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/db-session.ts +0 -0
  113. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/dedup-backend.ts +0 -0
  114. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/default-batch-strategies.ts +0 -0
  115. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/email-status.ts +0 -0
  116. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/execution-plan.ts +0 -0
  117. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/extractor-targets.ts +0 -0
  118. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/fullenrich-batching.ts +0 -0
  119. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/governor/coordinator-rate-state-backend.ts +0 -0
  120. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/governor/governor.ts +0 -0
  121. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/governor/policy.ts +0 -0
  122. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/governor/rate-state-backend.ts +0 -0
  123. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/live-events.ts +0 -0
  124. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/play-runtime-batching-registry.ts +0 -0
  125. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/profiles.ts +0 -0
  126. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/providers.ts +0 -0
  127. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/run-failure.ts +0 -0
  128. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/run-ledger.ts +0 -0
  129. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/run-snapshot-stream.ts +0 -0
  130. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/scheduler-backend.ts +0 -0
  131. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/secret-capability.ts +0 -0
  132. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/secret-redaction.ts +0 -0
  133. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/step-lifecycle-tracker.ts +0 -0
  134. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/step-program-dataset-builder.ts +0 -0
  135. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/submit-limits.ts +0 -0
  136. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/tool-result.ts +0 -0
  137. /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/work-receipts.ts +0 -0
  138. /package/dist/{repo → bundling-sources}/shared_libs/plays/bootstrap-routes.ts +0 -0
  139. /package/dist/{repo → bundling-sources}/shared_libs/plays/bundling/index.ts +0 -0
  140. /package/dist/{repo → bundling-sources}/shared_libs/plays/bundling/limits.ts +0 -0
  141. /package/dist/{repo → bundling-sources}/shared_libs/plays/contracts.ts +0 -0
  142. /package/dist/{repo → bundling-sources}/shared_libs/plays/dataset.ts +0 -0
  143. /package/dist/{repo → bundling-sources}/shared_libs/plays/row-identity.ts +0 -0
  144. /package/dist/{repo → bundling-sources}/shared_libs/plays/secret-guardrails.ts +0 -0
  145. /package/dist/{repo → bundling-sources}/shared_libs/plays/static-pipeline.ts +0 -0
  146. /package/dist/{repo → bundling-sources}/shared_libs/security/outbound-url-policy.ts +0 -0
  147. /package/dist/{repo → bundling-sources}/shared_libs/security/safe-fetch.ts +0 -0
  148. /package/dist/{repo → bundling-sources}/shared_libs/temporal/constants.ts +0 -0
@@ -0,0 +1,261 @@
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
+ producer?: {
45
+ kind: 'play' | 'tool' | 'code';
46
+ id?: string | null;
47
+ displayName?: string | null;
48
+ playId?: string | null;
49
+ toolId?: string | null;
50
+ runId?: string | null;
51
+ } | null;
52
+ reused?: boolean;
53
+ completedAt?: number;
54
+ staleAt?: number | null;
55
+ staleAfterSeconds?: number | null;
56
+ }
57
+ >;
58
+ }
59
+
60
+ export type PlayExecutionEvent =
61
+ | {
62
+ type: 'map.preparing';
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.started';
74
+ mapInvocationId: string;
75
+ mapNodeId?: string | null;
76
+ logicalNamespace: string;
77
+ artifactTableNamespace: string;
78
+ totalRows: number;
79
+ completedRows: number;
80
+ pendingRows: number;
81
+ at: number;
82
+ }
83
+ | {
84
+ type: 'map.progress';
85
+ mapInvocationId: string;
86
+ mapNodeId?: string | null;
87
+ logicalNamespace: string;
88
+ artifactTableNamespace: string;
89
+ completedRows: number;
90
+ failedRows: number;
91
+ totalRows?: number;
92
+ at: number;
93
+ }
94
+ | {
95
+ type: 'map.row.updated';
96
+ mapInvocationId: string;
97
+ mapNodeId?: string | null;
98
+ logicalNamespace: string;
99
+ artifactTableNamespace: string;
100
+ rowKey: string;
101
+ rowStatus?: PlayRowUpdate['status'];
102
+ fieldName?: string | null;
103
+ stage?: string | null;
104
+ provider?: string | null;
105
+ at: number;
106
+ }
107
+ | {
108
+ type: 'map.completed' | 'map.suspended' | 'map.resumed' | 'map.failed';
109
+ mapInvocationId: string;
110
+ mapNodeId?: string | null;
111
+ logicalNamespace: string;
112
+ artifactTableNamespace: string;
113
+ completedRows: number;
114
+ failedRows: number;
115
+ totalRows?: number;
116
+ at: number;
117
+ };
118
+
119
+ export interface PlayCheckpoint {
120
+ completedBatches: Record<string, BatchResult[]>;
121
+ completedToolBatches: Record<
122
+ string,
123
+ Record<string, { done: true; result: unknown | null }>
124
+ >;
125
+ resolvedWaterfalls: Record<string, Record<string, unknown>>;
126
+ resolvedBoundaries?: Record<
127
+ string,
128
+ | {
129
+ kind: 'sleep';
130
+ delayMs: number;
131
+ completedAt?: number;
132
+ scope?: {
133
+ type: 'workflow' | 'map_row';
134
+ tableNamespace?: string;
135
+ rowKey?: string;
136
+ rowIndex?: number;
137
+ fieldName?: string;
138
+ };
139
+ }
140
+ | {
141
+ kind: 'integration_event';
142
+ eventKey: string;
143
+ timeoutMs: number;
144
+ provider?: string;
145
+ toolId?: string;
146
+ messageRef?: {
147
+ channel: string;
148
+ ts: string;
149
+ };
150
+ output?: unknown;
151
+ completedAt?: number;
152
+ }
153
+ | {
154
+ kind: 'fetch';
155
+ url: string;
156
+ method: string;
157
+ output?: unknown;
158
+ completedAt?: number;
159
+ }
160
+ | {
161
+ kind: 'step';
162
+ stepId: string;
163
+ output?: unknown;
164
+ completedAt?: number;
165
+ }
166
+ >;
167
+ mapFrames?: Record<string, MapExecutionFrame>;
168
+ }
169
+
170
+ export interface PlayStepRowResult {
171
+ rowId: number;
172
+ status: 'completed' | 'failed' | 'missed' | 'skipped';
173
+ success: boolean;
174
+ provider?: string;
175
+ value?: unknown;
176
+ error?: string | null;
177
+ }
178
+
179
+ export type PlayStep =
180
+ | { type: 'start'; trigger?: string; description?: string }
181
+ | { type: 'csv_load'; arg?: string; rows?: number; description?: string }
182
+ | {
183
+ type: 'dataset';
184
+ items: number;
185
+ fields?: string[];
186
+ substeps: PlayDatasetSubstep[];
187
+ description?: string;
188
+ }
189
+ | {
190
+ type: 'waterfall';
191
+ tool?: string;
192
+ providers?: string[];
193
+ id?: string;
194
+ output?: string;
195
+ minResults?: number;
196
+ steps?: Array<{
197
+ id: string;
198
+ kind?: 'tool' | 'code';
199
+ toolId?: string;
200
+ results: PlayStepRowResult[];
201
+ }>;
202
+ results: PlayStepRowResult[];
203
+ description?: string;
204
+ }
205
+ | {
206
+ type: 'tool';
207
+ toolId: string;
208
+ results: PlayStepRowResult[];
209
+ description?: string;
210
+ }
211
+ | {
212
+ type: 'play_call';
213
+ playId: string;
214
+ results?: PlayStepRowResult[];
215
+ nestedSteps: PlayStep[];
216
+ description?: string;
217
+ }
218
+ | {
219
+ type: 'run_javascript';
220
+ alias: string;
221
+ results: PlayStepRowResult[];
222
+ description?: string;
223
+ }
224
+ | { type: 'return'; outputRows: number; description?: string };
225
+
226
+ export type PlayDatasetSubstep =
227
+ | {
228
+ type: 'waterfall';
229
+ tool?: string;
230
+ providers?: string[];
231
+ id?: string;
232
+ output?: string;
233
+ minResults?: number;
234
+ steps?: Array<{
235
+ id: string;
236
+ kind?: 'tool' | 'code';
237
+ toolId?: string;
238
+ results: PlayStepRowResult[];
239
+ }>;
240
+ results: PlayStepRowResult[];
241
+ description?: string;
242
+ }
243
+ | {
244
+ type: 'tool';
245
+ toolId: string;
246
+ results: PlayStepRowResult[];
247
+ description?: string;
248
+ }
249
+ | {
250
+ type: 'play_call';
251
+ playId: string;
252
+ results?: PlayStepRowResult[];
253
+ nestedSteps: PlayStep[];
254
+ description?: string;
255
+ }
256
+ | {
257
+ type: 'run_javascript';
258
+ alias: string;
259
+ results: PlayStepRowResult[];
260
+ description?: string;
261
+ };