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.
- package/README.md +4 -0
- package/dist/bundling-sources/apps/play-runner-workers/src/runtime/README.md +21 -0
- package/dist/bundling-sources/apps/play-runner-workers/src/runtime/batching.ts +185 -0
- package/dist/bundling-sources/apps/play-runner-workers/src/runtime/tool-batch.ts +107 -0
- package/dist/{repo → bundling-sources}/sdk/src/client.ts +116 -12
- package/dist/bundling-sources/sdk/src/compat.ts +191 -0
- package/dist/bundling-sources/sdk/src/gtm.ts +146 -0
- package/dist/bundling-sources/sdk/src/helpers.ts +12 -0
- package/dist/{repo → bundling-sources}/sdk/src/index.ts +2 -1
- package/dist/{repo → bundling-sources}/sdk/src/play.ts +3 -1
- package/dist/{repo → bundling-sources}/sdk/src/plays/bundle-play-file.ts +17 -5
- package/dist/{repo → bundling-sources}/sdk/src/release.ts +2 -2
- package/dist/{repo → bundling-sources}/sdk/src/runs/observe-transport.ts +2 -3
- package/dist/bundling-sources/shared_libs/play-data-plane/index.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +838 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +5510 -0
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-contract.ts +261 -0
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +828 -0
- package/dist/bundling-sources/shared_libs/play-runtime/dataset-id.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-runtime-config.ts +50 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durability-store.ts +20 -0
- package/dist/bundling-sources/shared_libs/play-runtime/event-wait-tools.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/in-memory-rate-state-backend.ts +171 -0
- package/dist/bundling-sources/shared_libs/play-runtime/hatchet-cold-execution-diagnosis.ts +321 -0
- package/dist/bundling-sources/shared_libs/play-runtime/hatchet-cold-execution-target.ts +158 -0
- package/dist/bundling-sources/shared_libs/play-runtime/internal-step-ids.ts +34 -0
- package/dist/bundling-sources/shared_libs/play-runtime/ledger-safe-payload.ts +34 -0
- package/dist/bundling-sources/shared_libs/play-runtime/live-state-contract.ts +50 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +119 -0
- package/dist/{repo → bundling-sources}/shared_libs/play-runtime/map-row-identity.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/play-latency-trace.ts +636 -0
- package/dist/bundling-sources/shared_libs/play-runtime/postgres-json.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/progress-emitter.ts +197 -0
- package/dist/bundling-sources/shared_libs/play-runtime/projection.ts +262 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +143 -0
- package/dist/bundling-sources/shared_libs/play-runtime/public-play-contract.ts +42 -0
- package/dist/bundling-sources/shared_libs/play-runtime/receipt-status.ts +40 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-actions.ts +178 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +4015 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-constraints.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-pg-driver-neon-serverless.ts +238 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-pg-driver-pg.ts +53 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-pg-driver.ts +149 -0
- package/dist/bundling-sources/shared_libs/play-runtime/suspension.ts +68 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-batch-executor.ts +149 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result-types.ts +159 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tracing.ts +33 -0
- package/dist/bundling-sources/shared_libs/play-runtime/waterfall-replay.ts +79 -0
- package/dist/bundling-sources/shared_libs/play-runtime/worker-api-types.ts +139 -0
- package/dist/bundling-sources/shared_libs/plays/artifact-transport.ts +14 -0
- package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +49 -0
- package/dist/bundling-sources/shared_libs/plays/compiler-manifest.ts +41 -0
- package/dist/bundling-sources/shared_libs/plays/dataset-summary.ts +163 -0
- package/dist/bundling-sources/shared_libs/plays/definition.ts +267 -0
- package/dist/bundling-sources/shared_libs/plays/file-refs.ts +11 -0
- package/dist/bundling-sources/shared_libs/plays/input-contract.ts +146 -0
- package/dist/bundling-sources/shared_libs/plays/resolve-static-pipeline.ts +190 -0
- package/dist/bundling-sources/shared_libs/plays/runtime-validation.ts +417 -0
- package/dist/bundling-sources/shared_libs/plays/tool-codegen.ts +142 -0
- package/dist/bundling-sources/shared_libs/security/safe-outbound-fetch.ts +274 -0
- package/dist/bundling-sources/shared_libs/temporal/preview-config.ts +150 -0
- package/dist/cli/index.js +811 -2207
- package/dist/cli/index.mjs +847 -2258
- package/dist/compiler-manifest-BjoRENv9.d.mts +227 -0
- package/dist/compiler-manifest-BjoRENv9.d.ts +227 -0
- package/dist/index.d.mts +8 -231
- package/dist/index.d.ts +8 -231
- package/dist/index.js +101 -15
- package/dist/index.mjs +101 -15
- package/dist/plays/bundle-play-file.d.mts +120 -0
- package/dist/plays/bundle-play-file.d.ts +120 -0
- package/dist/plays/bundle-play-file.mjs +1830 -0
- package/package.json +4 -9
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/child-play-await.ts +0 -0
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/child-play-submit.ts +0 -0
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/coordinator-entry.ts +0 -0
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/dedup-do.ts +0 -0
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/entry.ts +0 -0
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/csv-rows.ts +0 -0
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/dataset-handles.ts +0 -0
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/harness-receipt-store.ts +0 -0
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/live-progress.ts +0 -0
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/map-chunk-plan.ts +0 -0
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/receipts.ts +0 -0
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/row-isolation.ts +0 -0
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/runtime/tool-http-errors.ts +0 -0
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/workflow-instance-create.ts +0 -0
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/workflow-retry-state.ts +0 -0
- /package/dist/{repo → bundling-sources}/apps/play-runner-workers/src/workflow-retry.ts +0 -0
- /package/dist/{repo → bundling-sources}/sdk/src/agent-runtime.ts +0 -0
- /package/dist/{repo → bundling-sources}/sdk/src/config.ts +0 -0
- /package/dist/{repo → bundling-sources}/sdk/src/errors.ts +0 -0
- /package/dist/{repo → bundling-sources}/sdk/src/http.ts +0 -0
- /package/dist/{repo → bundling-sources}/sdk/src/plays/harness-stub.ts +0 -0
- /package/dist/{repo → bundling-sources}/sdk/src/plays/local-file-discovery.ts +0 -0
- /package/dist/{repo → bundling-sources}/sdk/src/stream-reconnect.ts +0 -0
- /package/dist/{repo → bundling-sources}/sdk/src/tool-output.ts +0 -0
- /package/dist/{repo → bundling-sources}/sdk/src/types.ts +0 -0
- /package/dist/{repo → bundling-sources}/sdk/src/version.ts +0 -0
- /package/dist/{repo → bundling-sources}/sdk/src/worker-play-entry.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-data-plane/cell-policy.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-data-plane/column-names.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-data-plane/sheet-contract.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/backend.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/batch-runtime.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/batching-types.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/cell-staleness.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/coordinator-headers.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/csv-rename.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/db-session-crypto.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/db-session-plan.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/db-session.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/dedup-backend.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/default-batch-strategies.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/email-status.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/execution-plan.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/extractor-targets.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/fullenrich-batching.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/governor/coordinator-rate-state-backend.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/governor/governor.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/governor/policy.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/governor/rate-state-backend.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/live-events.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/play-runtime-batching-registry.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/profiles.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/providers.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/run-failure.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/run-ledger.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/run-snapshot-stream.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/scheduler-backend.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/secret-capability.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/secret-redaction.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/step-lifecycle-tracker.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/step-program-dataset-builder.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/submit-limits.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/tool-result.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/play-runtime/work-receipts.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/plays/bootstrap-routes.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/plays/bundling/index.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/plays/bundling/limits.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/plays/contracts.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/plays/dataset.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/plays/row-identity.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/plays/secret-guardrails.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/plays/static-pipeline.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/security/outbound-url-policy.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/security/safe-fetch.ts +0 -0
- /package/dist/{repo → bundling-sources}/shared_libs/temporal/constants.ts +0 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import type { ComputeBillingItem } from './worker-api-types';
|
|
2
|
+
import type { DbLogicalTable, DbSessionOperation } from './db-session';
|
|
3
|
+
import type { PlayRowUpdate } from './ctx-types';
|
|
4
|
+
import type { PlaySheetContract } from '../plays/static-pipeline';
|
|
5
|
+
import type { PlayRunLedgerEvent } from './run-ledger';
|
|
6
|
+
|
|
7
|
+
export type RuntimeAppendRunEventsAction = {
|
|
8
|
+
action: 'append_run_events';
|
|
9
|
+
playId: string;
|
|
10
|
+
events: PlayRunLedgerEvent[];
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type RuntimeSheetAction =
|
|
14
|
+
| {
|
|
15
|
+
action: 'ensure_sheet';
|
|
16
|
+
playName: string;
|
|
17
|
+
tableNamespace: string;
|
|
18
|
+
sheetContract?: PlaySheetContract | null;
|
|
19
|
+
userEmail?: string | null;
|
|
20
|
+
}
|
|
21
|
+
| {
|
|
22
|
+
action: 'create_db_session';
|
|
23
|
+
playName: string;
|
|
24
|
+
target: {
|
|
25
|
+
tableNamespace: string;
|
|
26
|
+
logicalTable: DbLogicalTable;
|
|
27
|
+
};
|
|
28
|
+
operations: DbSessionOperation[];
|
|
29
|
+
limits?: {
|
|
30
|
+
maxRows?: number;
|
|
31
|
+
maxBytes?: number;
|
|
32
|
+
maxRequests?: number;
|
|
33
|
+
};
|
|
34
|
+
sheetContract?: PlaySheetContract | null;
|
|
35
|
+
ttlSeconds?: number;
|
|
36
|
+
userEmail?: string | null;
|
|
37
|
+
}
|
|
38
|
+
| {
|
|
39
|
+
action: 'apply_row_updates';
|
|
40
|
+
playName: string;
|
|
41
|
+
tableNamespace: string;
|
|
42
|
+
sheetContract?: PlaySheetContract | null;
|
|
43
|
+
contractSnapshot?: unknown;
|
|
44
|
+
runId: string;
|
|
45
|
+
userEmail?: string | null;
|
|
46
|
+
updates: Array<Omit<PlayRowUpdate, 'rowId'> & { runId?: string }>;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export type RuntimeArtifactAction =
|
|
50
|
+
| {
|
|
51
|
+
action: 'create_signed_artifact_url';
|
|
52
|
+
storageKey: string;
|
|
53
|
+
}
|
|
54
|
+
| {
|
|
55
|
+
action: 'create_signed_staged_file_url';
|
|
56
|
+
file: { storageKey: string };
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export type RuntimeBillingAction =
|
|
60
|
+
| {
|
|
61
|
+
action: 'compute_billing_upsert';
|
|
62
|
+
sessionId: string;
|
|
63
|
+
orgId: string;
|
|
64
|
+
userId?: string | null;
|
|
65
|
+
operation: string;
|
|
66
|
+
workflowId?: string;
|
|
67
|
+
runId?: string;
|
|
68
|
+
}
|
|
69
|
+
| {
|
|
70
|
+
action: 'compute_billing_record_item';
|
|
71
|
+
sessionId: string;
|
|
72
|
+
orgId: string;
|
|
73
|
+
userId?: string | null;
|
|
74
|
+
operation: string;
|
|
75
|
+
item: ComputeBillingItem;
|
|
76
|
+
}
|
|
77
|
+
| {
|
|
78
|
+
action: 'compute_billing_finalize';
|
|
79
|
+
sessionId: string;
|
|
80
|
+
orgId: string;
|
|
81
|
+
userId?: string | null;
|
|
82
|
+
operation: string;
|
|
83
|
+
status: 'completed' | 'error';
|
|
84
|
+
workflowId?: string;
|
|
85
|
+
runId?: string;
|
|
86
|
+
maxCreditsPerRun?: number | null;
|
|
87
|
+
finalItem: ComputeBillingItem;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export type RuntimeReceiptAction =
|
|
91
|
+
| {
|
|
92
|
+
action: 'get_runtime_step_receipt';
|
|
93
|
+
playName: string;
|
|
94
|
+
runId: string;
|
|
95
|
+
key: string;
|
|
96
|
+
}
|
|
97
|
+
| {
|
|
98
|
+
action: 'claim_runtime_step_receipt';
|
|
99
|
+
playName: string;
|
|
100
|
+
runId: string;
|
|
101
|
+
key: string;
|
|
102
|
+
reclaimRunning?: boolean;
|
|
103
|
+
}
|
|
104
|
+
| {
|
|
105
|
+
action: 'complete_runtime_step_receipt';
|
|
106
|
+
playName: string;
|
|
107
|
+
runId: string;
|
|
108
|
+
key: string;
|
|
109
|
+
output: unknown;
|
|
110
|
+
}
|
|
111
|
+
| {
|
|
112
|
+
action: 'fail_runtime_step_receipt';
|
|
113
|
+
playName: string;
|
|
114
|
+
runId: string;
|
|
115
|
+
key: string;
|
|
116
|
+
error: string;
|
|
117
|
+
}
|
|
118
|
+
| {
|
|
119
|
+
action: 'skip_runtime_step_receipt';
|
|
120
|
+
playName: string;
|
|
121
|
+
runId: string;
|
|
122
|
+
key: string;
|
|
123
|
+
output?: unknown;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export type RuntimePlayResolutionAction = {
|
|
127
|
+
action: 'resolve_play';
|
|
128
|
+
playRef: string;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export type RuntimeResultsAction = {
|
|
132
|
+
action: 'save_results';
|
|
133
|
+
playId: string;
|
|
134
|
+
userId?: string | null;
|
|
135
|
+
result: {
|
|
136
|
+
success: boolean;
|
|
137
|
+
error?: string;
|
|
138
|
+
publicResult?: Record<string, unknown> | null;
|
|
139
|
+
maxCreditsPerRun?: number | null;
|
|
140
|
+
temporalActionEstimate?: Record<string, unknown> | null;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export type RuntimeApiAction =
|
|
145
|
+
| RuntimePlayResolutionAction
|
|
146
|
+
| RuntimeSheetAction
|
|
147
|
+
| RuntimeArtifactAction
|
|
148
|
+
| RuntimeAppendRunEventsAction
|
|
149
|
+
| RuntimeResultsAction
|
|
150
|
+
| RuntimeBillingAction
|
|
151
|
+
| RuntimeReceiptAction;
|
|
152
|
+
|
|
153
|
+
export type RuntimeBatchAction = {
|
|
154
|
+
action: 'batch';
|
|
155
|
+
events: RuntimeApiAction[];
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export const runtimeRunActions = {
|
|
159
|
+
appendEvents(
|
|
160
|
+
input: Omit<RuntimeAppendRunEventsAction, 'action'>,
|
|
161
|
+
): RuntimeAppendRunEventsAction {
|
|
162
|
+
return { action: 'append_run_events', ...input };
|
|
163
|
+
},
|
|
164
|
+
} as const;
|
|
165
|
+
|
|
166
|
+
export const runtimeBillingActions = {
|
|
167
|
+
finalize(
|
|
168
|
+
input: Omit<
|
|
169
|
+
Extract<RuntimeBillingAction, { action: 'compute_billing_finalize' }>,
|
|
170
|
+
'action'
|
|
171
|
+
>,
|
|
172
|
+
) {
|
|
173
|
+
return {
|
|
174
|
+
action: 'compute_billing_finalize',
|
|
175
|
+
...input,
|
|
176
|
+
} satisfies RuntimeBillingAction;
|
|
177
|
+
},
|
|
178
|
+
} as const;
|