deepline 0.3.314 → 0.3.316
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/dist/bundling-sources/sdk/src/client.ts +12 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/overview.ts +17 -10
- package/dist/bundling-sources/sdk/src/types.ts +16 -5
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +217 -488
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +15 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +4 -1
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +13 -4
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/live-events.ts +31 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +444 -51
- package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +22 -43
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +4 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +136 -87
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +24 -6
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +56 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-errors.ts +94 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +5 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +20 -11
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +18 -12
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +140 -9
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-dispatch-authority.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +2 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +3 -2
- package/dist/bundling-sources/shared_libs/plays/docflow-binding-owner.ts +61 -11
- package/dist/cli/{auth-GWF55S3N.mjs → auth-JP7ZJ4OI.mjs} +4 -4
- package/dist/cli/auth-SPUJ4EXC.js +31 -0
- package/dist/cli/{billing-WWOJN7GV.mjs → billing-KG6MC2BC.mjs} +4 -4
- package/dist/cli/{billing-2YU6E2IF.js → billing-WZGS32ME.js} +70 -70
- package/dist/cli/{chunk-OJ243ZA5.js → chunk-2HKPAZVJ.js} +1 -1
- package/dist/cli/{chunk-YVMJTXEG.js → chunk-35YXDTOB.js} +26 -26
- package/dist/cli/{chunk-QB5MAFCU.mjs → chunk-46ZOD4PQ.mjs} +1 -1
- package/dist/cli/{chunk-CPN2N6EZ.mjs → chunk-6R5ACEWN.mjs} +43 -17
- package/dist/cli/{chunk-US4S3E4Y.mjs → chunk-7PZFGB7L.mjs} +1 -1
- package/dist/cli/{chunk-3CKNUJVZ.mjs → chunk-AXAPMVUC.mjs} +4 -4
- package/dist/cli/{chunk-ENQZV7NR.js → chunk-B6OOVO3A.js} +562 -536
- package/dist/cli/{chunk-WDPRE6DU.js → chunk-BOKHMPCZ.js} +48 -48
- package/dist/cli/{chunk-VFRZG4OW.js → chunk-C6QGM72M.js} +1 -1
- package/dist/cli/{chunk-IZTIBG7A.mjs → chunk-D3NMIACS.mjs} +29 -15
- package/dist/cli/{chunk-DR3S76BG.mjs → chunk-DAFGPNVW.mjs} +1 -1
- package/dist/cli/{chunk-3K6QD7Z3.mjs → chunk-F2T5UENG.mjs} +1 -1
- package/dist/cli/{chunk-VWW6VHQX.js → chunk-G2G67D3L.js} +60 -60
- package/dist/cli/{chunk-ODEWOXWW.js → chunk-GHLWDXUB.js} +6 -6
- package/dist/cli/{chunk-25SPKKF2.mjs → chunk-IDSDRGKF.mjs} +1 -1
- package/dist/cli/{chunk-OUHCJL5B.mjs → chunk-J3ZPMADG.mjs} +1 -1
- package/dist/cli/{chunk-MLEJ2FYH.js → chunk-K3BIRBT3.js} +248 -234
- package/dist/cli/{chunk-N5V2SBB2.mjs → chunk-KP7W5NO6.mjs} +1 -1
- package/dist/cli/{chunk-B5LUKLKH.js → chunk-MCPHK7AF.js} +4 -4
- package/dist/cli/{chunk-2Q2IKUL5.mjs → chunk-OB3SYJGU.mjs} +3 -3
- package/dist/cli/{chunk-UZTTPEG2.js → chunk-PJERS5VW.js} +6 -6
- package/dist/cli/{chunk-VBRO5QCI.js → chunk-RBBSRB56.js} +15 -15
- package/dist/cli/{chunk-NG4WDOGN.js → chunk-SRUWVQ66.js} +6 -6
- package/dist/cli/{chunk-WTO3ITBC.mjs → chunk-TYSAKSX7.mjs} +2 -2
- package/dist/cli/{chunk-HTXZLCSP.mjs → chunk-VC25WFXV.mjs} +2 -2
- package/dist/cli/{chunk-3A4LJUX6.mjs → chunk-VDPBQCRQ.mjs} +2 -2
- package/dist/cli/{chunk-IALPYID6.js → chunk-XSEMQ4II.js} +3 -3
- package/dist/cli/{chunk-JNUHGWB2.js → chunk-YEMOOWZI.js} +50 -50
- package/dist/cli/{chunk-JZZT4GAY.mjs → chunk-YNSAVFWL.mjs} +5 -5
- package/dist/cli/{chunk-GSRDZD7R.js → chunk-ZNHGAWYI.js} +2 -2
- package/dist/cli/client-GMMPQT7B.js +20 -0
- package/dist/cli/{client-EYGNDORT.mjs → client-MNPM4ME3.mjs} +3 -3
- package/dist/cli/{csv-YOW5JMOH.js → csv-G72FIQWI.js} +12 -12
- package/dist/cli/{csv-NZCN7SVV.mjs → csv-ZME7HAPR.mjs} +3 -3
- package/dist/cli/{db-HALJV3KY.mjs → db-K2DS4PEY.mjs} +4 -4
- package/dist/cli/{db-6BIYLZ6F.js → db-KRBWHSMA.js} +20 -20
- package/dist/cli/{describe-KY2ZYGBR.mjs → describe-LXBJP6OP.mjs} +10 -10
- package/dist/cli/{describe-WA6R2JSH.js → describe-UKFV376D.js} +17 -17
- package/dist/cli/{executions-CBOAN6KI.mjs → executions-2V3AROY6.mjs} +4 -4
- package/dist/cli/{executions-NMCTN7XM.js → executions-E66AM4JU.js} +6 -6
- package/dist/cli/{feedback-ZZFDSCWS.js → feedback-7C2N7M37.js} +6 -6
- package/dist/cli/{feedback-FOMPE3DJ.mjs → feedback-IEPZ2XKZ.mjs} +3 -3
- package/dist/cli/{git-YQR2NBCO.mjs → git-AR5KGN4O.mjs} +4 -4
- package/dist/cli/git-EXYB66IH.js +23 -0
- package/dist/cli/index.js +171 -98
- package/dist/cli/index.mjs +114 -41
- package/dist/cli/{legacy-noops-XH2TFFI6.js → legacy-noops-A2SH45P4.js} +7 -7
- package/dist/cli/{legacy-noops-KMU6P3K4.mjs → legacy-noops-LC2EGAZU.mjs} +4 -4
- package/dist/cli/{monitors-2ONK5L3I.mjs → monitors-5YPW3IZQ.mjs} +4 -4
- package/dist/cli/{monitors-5M3BZ5OR.js → monitors-IZBUPKPW.js} +85 -85
- package/dist/cli/{org-LR5BMCGL.mjs → org-2OMYI5KJ.mjs} +4 -4
- package/dist/cli/{org-6MKULUZI.js → org-L42SQ65U.js} +60 -60
- package/dist/cli/play-CQI3IDDN.js +152 -0
- package/dist/cli/{play-4NOSD7DW.mjs → play-UPCBLAOH.mjs} +9 -9
- package/dist/cli/{providers-UFJD3VKF.js → providers-GGNDWUKB.js} +7 -7
- package/dist/cli/{providers-UBGIKGCA.mjs → providers-VE2RM56M.mjs} +4 -4
- package/dist/cli/{quickstart-KQZHZE6C.js → quickstart-4CZHURUX.js} +5 -5
- package/dist/cli/{quickstart-KDUKQRUH.mjs → quickstart-HSJ7FU7Z.mjs} +3 -3
- package/dist/cli/{search-4BVOOS5Q.mjs → search-MWBM3I2L.mjs} +5 -5
- package/dist/cli/search-PD5FBCUN.js +26 -0
- package/dist/cli/{secrets-TVXZ3WJ3.js → secrets-CWBPGDZV.js} +13 -13
- package/dist/cli/{secrets-YGV23N3N.mjs → secrets-W5DQYKGU.mjs} +4 -4
- package/dist/cli/{sessions-RWIQWDFD.js → sessions-EDCFU6P2.js} +5 -5
- package/dist/cli/{sessions-G7ROUW35.mjs → sessions-Q42GUYTF.mjs} +4 -4
- package/dist/cli/{settings-TG3E2NR7.js → settings-OKRENZGX.js} +74 -74
- package/dist/cli/{settings-QZEVGCXE.mjs → settings-SO56AJPQ.mjs} +7 -7
- package/dist/cli/{setup-3KDUNEEE.js → setup-7PLHLNLS.js} +41 -41
- package/dist/cli/{setup-HUXINKOH.mjs → setup-OTYMF5CZ.mjs} +6 -6
- package/dist/cli/{skills-LHU3DB7J.mjs → skills-4UFS4FXP.mjs} +4 -4
- package/dist/cli/skills-IP7IW7EQ.js +28 -0
- package/dist/cli/{tools-J5WQ33BB.mjs → tools-6FV543YV.mjs} +6 -6
- package/dist/cli/tools-A2YNR6PI.js +38 -0
- package/dist/cli/{update-T6744RM7.mjs → update-6POGDXYW.mjs} +6 -6
- package/dist/cli/update-QXSGKLJG.js +28 -0
- package/dist/cli/{workflow-CG2B65HD.mjs → workflow-HVZSFWYR.mjs} +5 -5
- package/dist/cli/{workflow-YF5SQJLG.js → workflow-RB4POZP5.js} +15 -15
- package/dist/{client-OBwghxPC.d.ts → client-BV68GMPo.d.ts} +19 -6
- package/dist/{client-CtVdLZux.d.mts → client-D9ACjiRC.d.mts} +19 -6
- package/dist/{compiler-manifest-wOKNiXpa.d.mts → compiler-manifest-BXcZ4P4W.d.mts} +2 -2
- package/dist/{compiler-manifest-wOKNiXpa.d.ts → compiler-manifest-BXcZ4P4W.d.ts} +2 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7 -7
- package/dist/index.mjs +4 -4
- package/dist/install-integrity.json +82 -82
- package/dist/plays/bundle-play-file.d.mts +2 -2
- package/dist/plays/bundle-play-file.d.ts +2 -2
- package/dist/plays/bundle-play-file.mjs +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-QX2L4LPM.js +0 -31
- package/dist/cli/client-Z4VFNTUB.js +0 -20
- package/dist/cli/git-AC2ATBDK.js +0 -23
- package/dist/cli/play-U3CZ4F2W.js +0 -152
- package/dist/cli/search-Y7OTFRCI.js +0 -26
- package/dist/cli/skills-CO5YUWBK.js +0 -28
- package/dist/cli/tools-MWPT5X47.js +0 -38
- package/dist/cli/update-VVIJW7ZJ.js +0 -28
|
@@ -482,12 +482,19 @@ export interface MapExecutionFrame {
|
|
|
482
482
|
artifactTableNamespace: string;
|
|
483
483
|
status: 'running' | 'suspended' | 'completed' | 'failed';
|
|
484
484
|
totalRows: number;
|
|
485
|
+
/**
|
|
486
|
+
* Successful row identities visible at this checkpoint. Older frames may
|
|
487
|
+
* retain superseded history keys; the owning keyed sheet reader translates
|
|
488
|
+
* ambiguous frames before pending-only resume.
|
|
489
|
+
*/
|
|
485
490
|
completedRowKeys: string[];
|
|
486
491
|
pendingRowKeys: string[];
|
|
487
492
|
/**
|
|
488
493
|
* The admitted inputs that still need to run after a durable suspension.
|
|
489
494
|
* This prevents a replay from losing work when its authored source query is
|
|
490
495
|
* stateful and no longer returns rows that were selected before the pause.
|
|
496
|
+
* Accepted terminal writes remove inputs by their original index. An empty
|
|
497
|
+
* retained plan preserves the original counts during a pending-only reopen.
|
|
491
498
|
*/
|
|
492
499
|
suspendedInputRows?: Array<{
|
|
493
500
|
inputIndex: number;
|
|
@@ -495,6 +502,7 @@ export interface MapExecutionFrame {
|
|
|
495
502
|
/** Digest of the authored input before Runtime Sheet outputs were merged. */
|
|
496
503
|
authoredInputDigest?: string;
|
|
497
504
|
}>;
|
|
505
|
+
/** Successful inputs, including reused inputs with no distinct stored key. */
|
|
498
506
|
completedRowsCount?: number;
|
|
499
507
|
pendingRowsCount?: number;
|
|
500
508
|
failedRowsCount?: number;
|
|
@@ -616,6 +624,8 @@ export type PlayExecutionEvent =
|
|
|
616
624
|
artifactTableNamespace: string;
|
|
617
625
|
totalRows: number;
|
|
618
626
|
completedRows: number;
|
|
627
|
+
/** Settled failures restored on replay; absent on older producers. */
|
|
628
|
+
failedRows?: number;
|
|
619
629
|
pendingRows: number;
|
|
620
630
|
/** Rows omitted because a newer Runtime Sheet write already won. */
|
|
621
631
|
supersededRows?: number;
|
|
@@ -627,7 +637,12 @@ export type PlayExecutionEvent =
|
|
|
627
637
|
mapNodeId?: string | null;
|
|
628
638
|
logicalNamespace: string;
|
|
629
639
|
artifactTableNamespace: string;
|
|
640
|
+
/**
|
|
641
|
+
* Acknowledged successful rows, including restored rows exactly once.
|
|
642
|
+
* Sheet-backed maps acknowledge only committed terminal row writes.
|
|
643
|
+
*/
|
|
630
644
|
completedRows: number;
|
|
645
|
+
/** Explicit failed row outcomes; never inferred from sparse pending keys. */
|
|
631
646
|
failedRows: number;
|
|
632
647
|
totalRows?: number;
|
|
633
648
|
/** Rows whose resolver began, including rows awaiting a tool or receipt. */
|
|
@@ -14,6 +14,7 @@ export const RUNTIME_EXECUTION_CAPABILITIES = [
|
|
|
14
14
|
'event.wait',
|
|
15
15
|
'run.child',
|
|
16
16
|
'run.progress',
|
|
17
|
+
'run.ledger.project',
|
|
17
18
|
'run.heartbeat',
|
|
18
19
|
'sheet.read',
|
|
19
20
|
'sheet.write',
|
|
@@ -73,7 +74,9 @@ export type RuntimeAuthorityDescriptor = {
|
|
|
73
74
|
};
|
|
74
75
|
|
|
75
76
|
export const DEFAULT_RUNTIME_EXECUTION_CAPABILITIES = [
|
|
76
|
-
...RUNTIME_EXECUTION_CAPABILITIES
|
|
77
|
+
...RUNTIME_EXECUTION_CAPABILITIES.filter(
|
|
78
|
+
(capability) => capability !== 'run.ledger.project',
|
|
79
|
+
),
|
|
77
80
|
] as const satisfies readonly RuntimeExecutionCapability[];
|
|
78
81
|
|
|
79
82
|
/** Daytona receives these safe-to-steal capabilities, never raw DB access. */
|
|
@@ -330,6 +330,8 @@ export type WorkflowRunExecutionTokenClaims =
|
|
|
330
330
|
capabilities: RuntimeExecutionCapability[];
|
|
331
331
|
/** Trusted deployment origin that issued this run token. */
|
|
332
332
|
runtime_origin?: string;
|
|
333
|
+
/** Immutable receiver advertising leased Run Ledger ingress-prefix support. */
|
|
334
|
+
run_ledger_ingress_prefix_origin?: string;
|
|
333
335
|
};
|
|
334
336
|
|
|
335
337
|
export type RuntimeRateScopeTokenClaims = {
|
|
@@ -642,6 +644,8 @@ function isValidWorkflowClaimsShape(
|
|
|
642
644
|
typeof claims.terminal_contract === 'string') &&
|
|
643
645
|
(claims.runtime_origin === undefined ||
|
|
644
646
|
isValidRuntimeOrigin(claims.runtime_origin)) &&
|
|
647
|
+
(claims.run_ledger_ingress_prefix_origin === undefined ||
|
|
648
|
+
isValidRuntimeOrigin(claims.run_ledger_ingress_prefix_origin)) &&
|
|
645
649
|
Array.isArray(claims.capabilities) &&
|
|
646
650
|
claims.capabilities.length > 0 &&
|
|
647
651
|
claims.capabilities.every(isRuntimeExecutionCapability) &&
|
|
@@ -735,6 +739,7 @@ export async function mintWorkflowRunExecutionToken(input: {
|
|
|
735
739
|
terminalContract?: DirectCompletedTerminalContract | null;
|
|
736
740
|
capabilities?: readonly RuntimeExecutionCapability[];
|
|
737
741
|
runtimeOrigin?: string | null;
|
|
742
|
+
runLedgerIngressPrefixOrigin?: string | null;
|
|
738
743
|
subject?: string | null;
|
|
739
744
|
nowMs?: number;
|
|
740
745
|
}): Promise<string> {
|
|
@@ -811,6 +816,13 @@ export async function mintWorkflowRunExecutionToken(input: {
|
|
|
811
816
|
...(input.runtimeOrigin?.trim()
|
|
812
817
|
? { runtime_origin: new URL(input.runtimeOrigin).origin }
|
|
813
818
|
: {}),
|
|
819
|
+
...(input.runLedgerIngressPrefixOrigin?.trim()
|
|
820
|
+
? {
|
|
821
|
+
run_ledger_ingress_prefix_origin: new URL(
|
|
822
|
+
input.runLedgerIngressPrefixOrigin,
|
|
823
|
+
).origin,
|
|
824
|
+
}
|
|
825
|
+
: {}),
|
|
814
826
|
sub: input.subject ?? 'workflow_executor',
|
|
815
827
|
iat: issuedAt,
|
|
816
828
|
exp: issuedAt + INTERNAL_WORKFLOW_TOKEN_TTL_SECONDS,
|
|
@@ -1201,10 +1213,7 @@ export async function verifyPlayWebhookReceiptBatchAdmissionToken(
|
|
|
1201
1213
|
claims.sub === 'play_webhook_receipt_large_batch_dispatcher' &&
|
|
1202
1214
|
typeof claims.receipt_ids_sha256 === 'string' &&
|
|
1203
1215
|
/^[A-Za-z0-9_-]{43}$/.test(claims.receipt_ids_sha256);
|
|
1204
|
-
if (
|
|
1205
|
-
hasInvalidBaseClaims ||
|
|
1206
|
-
(!hasValidV1Claims && !hasValidV2Claims)
|
|
1207
|
-
) {
|
|
1216
|
+
if (hasInvalidBaseClaims || (!hasValidV1Claims && !hasValidV2Claims)) {
|
|
1208
1217
|
throw new Error('Invalid webhook receipt batch token.');
|
|
1209
1218
|
}
|
|
1210
1219
|
// `hasInvalidBaseClaims` is deliberately a named diagnostic, but TypeScript
|
|
@@ -70,6 +70,7 @@ export const PLAY_LAUNCH_ENVELOPE_FIELD_ROLES: {
|
|
|
70
70
|
preloadedDbSessions: 'detail',
|
|
71
71
|
preloadedDbSessionUnwrapKey: 'detail',
|
|
72
72
|
executorToken: 'detail',
|
|
73
|
+
runLedgerExecutorToken: 'detail',
|
|
73
74
|
runtimeAuthority: 'detail',
|
|
74
75
|
runtimeApiBaseUrl: 'detail',
|
|
75
76
|
runtimeTokenOrigin: 'detail',
|
|
@@ -78,10 +78,41 @@ export type PlayStepProgressEventPayload = {
|
|
|
78
78
|
activeRows?: number;
|
|
79
79
|
waitingRows?: number;
|
|
80
80
|
completedRows?: number;
|
|
81
|
+
/** Rows whose Runtime Sheet write lost to a newer write; neither successes nor failures. */
|
|
82
|
+
supersededRows?: number;
|
|
81
83
|
message?: string;
|
|
82
84
|
artifactTableNamespace?: string | null;
|
|
83
85
|
} & PlayRuntimeTimingWindow;
|
|
84
86
|
|
|
87
|
+
/** Scalar counts shared by public snapshots, change detection and progress events. */
|
|
88
|
+
export type PlayStepProgressCounters = Pick<
|
|
89
|
+
PlayStepProgressEventPayload,
|
|
90
|
+
| 'completed'
|
|
91
|
+
| 'total'
|
|
92
|
+
| 'failed'
|
|
93
|
+
| 'startedRows'
|
|
94
|
+
| 'activeRows'
|
|
95
|
+
| 'waitingRows'
|
|
96
|
+
| 'completedRows'
|
|
97
|
+
| 'supersededRows'
|
|
98
|
+
>;
|
|
99
|
+
|
|
100
|
+
/** Project only counters, preserving optional absence and excluding per-row data. */
|
|
101
|
+
export function projectPlayStepProgressCounters(
|
|
102
|
+
progress: PlayStepProgressCounters,
|
|
103
|
+
): PlayStepProgressCounters {
|
|
104
|
+
return {
|
|
105
|
+
completed: progress.completed,
|
|
106
|
+
total: progress.total,
|
|
107
|
+
failed: progress.failed,
|
|
108
|
+
startedRows: progress.startedRows,
|
|
109
|
+
activeRows: progress.activeRows,
|
|
110
|
+
waitingRows: progress.waitingRows,
|
|
111
|
+
completedRows: progress.completedRows,
|
|
112
|
+
supersededRows: progress.supersededRows,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
85
116
|
export type PlayRunHealthEventPayload = {
|
|
86
117
|
runId: string;
|
|
87
118
|
state: 'healthy' | 'degraded';
|