deepline 0.3.208 → 0.3.209
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/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +70 -3
- package/dist/cli/index.js +5 -1
- package/dist/cli/index.mjs +5 -1
- package/dist/index.js +5 -1
- package/dist/index.mjs +5 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +1 -1
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
|
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
|
|
|
200
200
|
// getters keep their established compatibility behavior.
|
|
201
201
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
202
202
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
203
|
-
version: '0.3.
|
|
203
|
+
version: '0.3.209',
|
|
204
204
|
updateSummary:
|
|
205
205
|
'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
|
|
206
206
|
packageCapabilities: {
|
|
@@ -126,6 +126,9 @@ export type PlayRunLedgerSnapshot = {
|
|
|
126
126
|
runId: string;
|
|
127
127
|
playName?: string | null;
|
|
128
128
|
status: PlayRunLedgerStatus;
|
|
129
|
+
/** Typed scheduler wait, when a durable waiting event supplied it. */
|
|
130
|
+
waitKind?: string | null;
|
|
131
|
+
waitUntil?: number | null;
|
|
129
132
|
error?: string | null;
|
|
130
133
|
createdAt?: number | null;
|
|
131
134
|
startedAt?: number | null;
|
|
@@ -201,6 +204,8 @@ export type PlayRunLedgerEvent =
|
|
|
201
204
|
})
|
|
202
205
|
| (PlayRunLedgerBaseEvent & {
|
|
203
206
|
type: 'run.waiting';
|
|
207
|
+
waitKind?: string | null;
|
|
208
|
+
waitUntil?: number | null;
|
|
204
209
|
})
|
|
205
210
|
| (PlayRunLedgerBaseEvent & {
|
|
206
211
|
type: 'run.resumed';
|
|
@@ -541,6 +546,8 @@ export function createEmptyPlayRunLedgerSnapshot(input: {
|
|
|
541
546
|
runId: input.runId,
|
|
542
547
|
playName: input.playName ?? null,
|
|
543
548
|
status,
|
|
549
|
+
waitKind: null,
|
|
550
|
+
waitUntil: null,
|
|
544
551
|
error: optionalNullableString(input.error) ?? null,
|
|
545
552
|
createdAt: finiteNumber(input.createdAt) ?? null,
|
|
546
553
|
startedAt,
|
|
@@ -677,6 +684,8 @@ export function normalizePlayRunLedgerSnapshot(
|
|
|
677
684
|
playName:
|
|
678
685
|
optionalNullableString(value.playName) ?? fallback.playName ?? null,
|
|
679
686
|
status: normalizePlayRunLedgerStatus(value.status ?? fallback.status),
|
|
687
|
+
waitKind: optionalNullableString(value.waitKind),
|
|
688
|
+
waitUntil: finiteNumber(value.waitUntil),
|
|
680
689
|
error,
|
|
681
690
|
createdAt,
|
|
682
691
|
startedAt,
|
|
@@ -1312,11 +1321,17 @@ export function reducePlayRunLedgerEvent(
|
|
|
1312
1321
|
return withTiming({
|
|
1313
1322
|
...base,
|
|
1314
1323
|
status: 'waiting',
|
|
1324
|
+
waitKind: event.waitKind ?? null,
|
|
1325
|
+
waitUntil: event.waitUntil ?? null,
|
|
1326
|
+
activeActivityId: null,
|
|
1315
1327
|
});
|
|
1316
1328
|
case 'run.resumed':
|
|
1317
1329
|
return withTiming({
|
|
1318
1330
|
...base,
|
|
1319
1331
|
status: 'running',
|
|
1332
|
+
waitKind: null,
|
|
1333
|
+
waitUntil: null,
|
|
1334
|
+
activeActivityId: null,
|
|
1320
1335
|
});
|
|
1321
1336
|
case 'run.completed':
|
|
1322
1337
|
return (
|
|
@@ -1330,6 +1345,8 @@ export function reducePlayRunLedgerEvent(
|
|
|
1330
1345
|
withTiming({
|
|
1331
1346
|
...settleRunningStepsOnTerminal(base, 'completed', occurredAt),
|
|
1332
1347
|
status: 'completed',
|
|
1348
|
+
waitKind: null,
|
|
1349
|
+
waitUntil: null,
|
|
1333
1350
|
error: null,
|
|
1334
1351
|
startedAt: base.startedAt ?? occurredAt,
|
|
1335
1352
|
finishedAt: terminalFinishedAt(base, event.type, occurredAt),
|
|
@@ -1358,6 +1375,8 @@ export function reducePlayRunLedgerEvent(
|
|
|
1358
1375
|
withTiming({
|
|
1359
1376
|
...settleRunningStepsOnTerminal(base, 'failed', occurredAt),
|
|
1360
1377
|
status: 'failed',
|
|
1378
|
+
waitKind: null,
|
|
1379
|
+
waitUntil: null,
|
|
1361
1380
|
error:
|
|
1362
1381
|
base.status === 'failed'
|
|
1363
1382
|
? (base.error ?? event.error ?? null)
|
|
@@ -1386,6 +1405,8 @@ export function reducePlayRunLedgerEvent(
|
|
|
1386
1405
|
withTiming({
|
|
1387
1406
|
...settleRunningStepsOnTerminal(base, 'failed', occurredAt),
|
|
1388
1407
|
status: 'cancelled',
|
|
1408
|
+
waitKind: null,
|
|
1409
|
+
waitUntil: null,
|
|
1389
1410
|
error:
|
|
1390
1411
|
base.status === 'cancelled'
|
|
1391
1412
|
? (base.error ?? event.error ?? null)
|
|
@@ -78,6 +78,7 @@ import {
|
|
|
78
78
|
} from '../work-receipts';
|
|
79
79
|
import type { PlayStaticPipeline } from '../../plays/static-pipeline';
|
|
80
80
|
import {
|
|
81
|
+
isPlayRunLedgerOpaqueEvent,
|
|
81
82
|
LOG_TAIL_LIMIT,
|
|
82
83
|
type AcceptedPlayRunLedgerEvent,
|
|
83
84
|
type PlayRunLedgerEvent,
|
|
@@ -15920,6 +15921,64 @@ async function appendRunLedgerOutboxFact(
|
|
|
15920
15921
|
|
|
15921
15922
|
export { RunLedgerProjectionLeaseLostError } from '../run-ledger-projection-contract';
|
|
15922
15923
|
|
|
15924
|
+
/**
|
|
15925
|
+
* A newer app can receive a projection from a worker that predates optional
|
|
15926
|
+
* wait metadata. Treat only those absent fields as their canonical values;
|
|
15927
|
+
* lease identity, event ordering, and every field the worker did send remain
|
|
15928
|
+
* exact.
|
|
15929
|
+
*/
|
|
15930
|
+
function normalizeLegacyRunWaitingProjectionFields(
|
|
15931
|
+
projectedEvents: readonly AcceptedPlayRunLedgerEvent[],
|
|
15932
|
+
expectedEvents: readonly (
|
|
15933
|
+
| AcceptedPlayRunLedgerEvent
|
|
15934
|
+
| PlayRunLedgerIngressEvent
|
|
15935
|
+
)[],
|
|
15936
|
+
): AcceptedPlayRunLedgerEvent[] {
|
|
15937
|
+
return projectedEvents.map((event, index) => {
|
|
15938
|
+
const expected = expectedEvents[index];
|
|
15939
|
+
if (
|
|
15940
|
+
isPlayRunLedgerOpaqueEvent(event) ||
|
|
15941
|
+
event.type !== 'run.waiting' ||
|
|
15942
|
+
expected?.type !== 'run.waiting' ||
|
|
15943
|
+
('opaque' in expected && expected.opaque === true)
|
|
15944
|
+
) {
|
|
15945
|
+
return event;
|
|
15946
|
+
}
|
|
15947
|
+
const expectedEvent = expected as Record<string, unknown>;
|
|
15948
|
+
const expectedWaitKind = expectedEvent.waitKind;
|
|
15949
|
+
const expectedWaitUntil = expectedEvent.waitUntil;
|
|
15950
|
+
return {
|
|
15951
|
+
...event,
|
|
15952
|
+
...(event.waitKind === undefined &&
|
|
15953
|
+
(typeof expectedWaitKind === 'string' || expectedWaitKind === null)
|
|
15954
|
+
? { waitKind: expectedWaitKind }
|
|
15955
|
+
: {}),
|
|
15956
|
+
...(event.waitUntil === undefined &&
|
|
15957
|
+
(typeof expectedWaitUntil === 'number' || expectedWaitUntil === null)
|
|
15958
|
+
? { waitUntil: expectedWaitUntil }
|
|
15959
|
+
: {}),
|
|
15960
|
+
};
|
|
15961
|
+
});
|
|
15962
|
+
}
|
|
15963
|
+
|
|
15964
|
+
function runLedgerProjectionMatchesCanonicalPrefix(
|
|
15965
|
+
projectedEvents: readonly AcceptedPlayRunLedgerEvent[],
|
|
15966
|
+
expectedEvents: readonly (
|
|
15967
|
+
| AcceptedPlayRunLedgerEvent
|
|
15968
|
+
| PlayRunLedgerIngressEvent
|
|
15969
|
+
)[],
|
|
15970
|
+
): boolean {
|
|
15971
|
+
if (projectedEvents.length !== expectedEvents.length) return false;
|
|
15972
|
+
return (
|
|
15973
|
+
stableStringify(
|
|
15974
|
+
normalizeLegacyRunWaitingProjectionFields(
|
|
15975
|
+
projectedEvents,
|
|
15976
|
+
expectedEvents,
|
|
15977
|
+
),
|
|
15978
|
+
) === stableStringify(expectedEvents)
|
|
15979
|
+
);
|
|
15980
|
+
}
|
|
15981
|
+
|
|
15923
15982
|
/** Extend only our still-live lease before another bounded transport piece. */
|
|
15924
15983
|
export async function renewPostgresRunLedgerDelivery(
|
|
15925
15984
|
client: PostgresSchedulerQueryClient,
|
|
@@ -16074,12 +16133,17 @@ export async function assertPostgresRunLedgerDelivery(
|
|
|
16074
16133
|
}),
|
|
16075
16134
|
);
|
|
16076
16135
|
}
|
|
16077
|
-
const comparablePrefixEvents
|
|
16136
|
+
const comparablePrefixEvents: readonly (
|
|
16137
|
+
| AcceptedPlayRunLedgerEvent
|
|
16138
|
+
| PlayRunLedgerIngressEvent
|
|
16139
|
+
)[] = input.normalizeProjectedEvents
|
|
16078
16140
|
? input.normalizeProjectedEvents(prefixEvents)
|
|
16079
16141
|
: prefixEvents;
|
|
16080
16142
|
if (
|
|
16081
|
-
|
|
16082
|
-
|
|
16143
|
+
runLedgerProjectionMatchesCanonicalPrefix(
|
|
16144
|
+
input.projectedEvents,
|
|
16145
|
+
comparablePrefixEvents,
|
|
16146
|
+
)
|
|
16083
16147
|
) {
|
|
16084
16148
|
return;
|
|
16085
16149
|
}
|
|
@@ -16965,6 +17029,9 @@ export function buildRunLedgerEventsFromPostgresSchedulerOutbox(
|
|
|
16965
17029
|
runId: event.runId,
|
|
16966
17030
|
occurredAt,
|
|
16967
17031
|
source: 'system',
|
|
17032
|
+
...(event.eventType === 'run.waiting' && waitKind !== null
|
|
17033
|
+
? { waitKind }
|
|
17034
|
+
: {}),
|
|
16968
17035
|
} as PlayRunLedgerEvent;
|
|
16969
17036
|
if (
|
|
16970
17037
|
waitKind !== null &&
|
package/dist/cli/index.js
CHANGED
|
@@ -3051,7 +3051,7 @@ var SDK_RELEASE = {
|
|
|
3051
3051
|
// getters keep their established compatibility behavior.
|
|
3052
3052
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
3053
3053
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
3054
|
-
version: "0.3.
|
|
3054
|
+
version: "0.3.209",
|
|
3055
3055
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
3056
3056
|
packageCapabilities: {
|
|
3057
3057
|
updatePreferences: 1
|
|
@@ -5450,6 +5450,8 @@ function createEmptyPlayRunLedgerSnapshot(input2) {
|
|
|
5450
5450
|
runId: input2.runId,
|
|
5451
5451
|
playName: input2.playName ?? null,
|
|
5452
5452
|
status,
|
|
5453
|
+
waitKind: null,
|
|
5454
|
+
waitUntil: null,
|
|
5453
5455
|
error: optionalNullableString(input2.error) ?? null,
|
|
5454
5456
|
createdAt: finiteNumber(input2.createdAt) ?? null,
|
|
5455
5457
|
startedAt,
|
|
@@ -5546,6 +5548,8 @@ function normalizePlayRunLedgerSnapshot(value, fallback) {
|
|
|
5546
5548
|
runId: optionalString(value.runId) ?? fallback.runId,
|
|
5547
5549
|
playName: optionalNullableString(value.playName) ?? fallback.playName ?? null,
|
|
5548
5550
|
status: normalizePlayRunLedgerStatus(value.status ?? fallback.status),
|
|
5551
|
+
waitKind: optionalNullableString(value.waitKind),
|
|
5552
|
+
waitUntil: finiteNumber(value.waitUntil),
|
|
5549
5553
|
error,
|
|
5550
5554
|
createdAt,
|
|
5551
5555
|
startedAt,
|
package/dist/cli/index.mjs
CHANGED
|
@@ -3046,7 +3046,7 @@ var SDK_RELEASE = {
|
|
|
3046
3046
|
// getters keep their established compatibility behavior.
|
|
3047
3047
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
3048
3048
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
3049
|
-
version: "0.3.
|
|
3049
|
+
version: "0.3.209",
|
|
3050
3050
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
3051
3051
|
packageCapabilities: {
|
|
3052
3052
|
updatePreferences: 1
|
|
@@ -5445,6 +5445,8 @@ function createEmptyPlayRunLedgerSnapshot(input2) {
|
|
|
5445
5445
|
runId: input2.runId,
|
|
5446
5446
|
playName: input2.playName ?? null,
|
|
5447
5447
|
status,
|
|
5448
|
+
waitKind: null,
|
|
5449
|
+
waitUntil: null,
|
|
5448
5450
|
error: optionalNullableString(input2.error) ?? null,
|
|
5449
5451
|
createdAt: finiteNumber(input2.createdAt) ?? null,
|
|
5450
5452
|
startedAt,
|
|
@@ -5541,6 +5543,8 @@ function normalizePlayRunLedgerSnapshot(value, fallback) {
|
|
|
5541
5543
|
runId: optionalString(value.runId) ?? fallback.runId,
|
|
5542
5544
|
playName: optionalNullableString(value.playName) ?? fallback.playName ?? null,
|
|
5543
5545
|
status: normalizePlayRunLedgerStatus(value.status ?? fallback.status),
|
|
5546
|
+
waitKind: optionalNullableString(value.waitKind),
|
|
5547
|
+
waitUntil: finiteNumber(value.waitUntil),
|
|
5544
5548
|
error,
|
|
5545
5549
|
createdAt,
|
|
5546
5550
|
startedAt,
|
package/dist/index.js
CHANGED
|
@@ -864,7 +864,7 @@ var SDK_RELEASE = {
|
|
|
864
864
|
// getters keep their established compatibility behavior.
|
|
865
865
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
866
866
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
867
|
-
version: "0.3.
|
|
867
|
+
version: "0.3.209",
|
|
868
868
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
869
869
|
packageCapabilities: {
|
|
870
870
|
updatePreferences: 1
|
|
@@ -3211,6 +3211,8 @@ function createEmptyPlayRunLedgerSnapshot(input) {
|
|
|
3211
3211
|
runId: input.runId,
|
|
3212
3212
|
playName: input.playName ?? null,
|
|
3213
3213
|
status,
|
|
3214
|
+
waitKind: null,
|
|
3215
|
+
waitUntil: null,
|
|
3214
3216
|
error: optionalNullableString(input.error) ?? null,
|
|
3215
3217
|
createdAt: finiteNumber(input.createdAt) ?? null,
|
|
3216
3218
|
startedAt,
|
|
@@ -3307,6 +3309,8 @@ function normalizePlayRunLedgerSnapshot(value, fallback) {
|
|
|
3307
3309
|
runId: optionalString(value.runId) ?? fallback.runId,
|
|
3308
3310
|
playName: optionalNullableString(value.playName) ?? fallback.playName ?? null,
|
|
3309
3311
|
status: normalizePlayRunLedgerStatus(value.status ?? fallback.status),
|
|
3312
|
+
waitKind: optionalNullableString(value.waitKind),
|
|
3313
|
+
waitUntil: finiteNumber(value.waitUntil),
|
|
3310
3314
|
error,
|
|
3311
3315
|
createdAt,
|
|
3312
3316
|
startedAt,
|
package/dist/index.mjs
CHANGED
|
@@ -768,7 +768,7 @@ var SDK_RELEASE = {
|
|
|
768
768
|
// getters keep their established compatibility behavior.
|
|
769
769
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
770
770
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
771
|
-
version: "0.3.
|
|
771
|
+
version: "0.3.209",
|
|
772
772
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
773
773
|
packageCapabilities: {
|
|
774
774
|
updatePreferences: 1
|
|
@@ -3115,6 +3115,8 @@ function createEmptyPlayRunLedgerSnapshot(input) {
|
|
|
3115
3115
|
runId: input.runId,
|
|
3116
3116
|
playName: input.playName ?? null,
|
|
3117
3117
|
status,
|
|
3118
|
+
waitKind: null,
|
|
3119
|
+
waitUntil: null,
|
|
3118
3120
|
error: optionalNullableString(input.error) ?? null,
|
|
3119
3121
|
createdAt: finiteNumber(input.createdAt) ?? null,
|
|
3120
3122
|
startedAt,
|
|
@@ -3211,6 +3213,8 @@ function normalizePlayRunLedgerSnapshot(value, fallback) {
|
|
|
3211
3213
|
runId: optionalString(value.runId) ?? fallback.runId,
|
|
3212
3214
|
playName: optionalNullableString(value.playName) ?? fallback.playName ?? null,
|
|
3213
3215
|
status: normalizePlayRunLedgerStatus(value.status ?? fallback.status),
|
|
3216
|
+
waitKind: optionalNullableString(value.waitKind),
|
|
3217
|
+
waitUntil: finiteNumber(value.waitUntil),
|
|
3214
3218
|
error,
|
|
3215
3219
|
createdAt,
|
|
3216
3220
|
startedAt,
|
package/dist/release.d.mts
CHANGED
|
@@ -149,7 +149,7 @@ type SdkRelease = {
|
|
|
149
149
|
supportPolicy: SdkSupportPolicy;
|
|
150
150
|
};
|
|
151
151
|
declare const SDK_RELEASE: {
|
|
152
|
-
readonly version: "0.3.
|
|
152
|
+
readonly version: "0.3.209";
|
|
153
153
|
readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
|
|
154
154
|
readonly packageCapabilities: {
|
|
155
155
|
readonly updatePreferences: 1;
|
package/dist/release.d.ts
CHANGED
|
@@ -149,7 +149,7 @@ type SdkRelease = {
|
|
|
149
149
|
supportPolicy: SdkSupportPolicy;
|
|
150
150
|
};
|
|
151
151
|
declare const SDK_RELEASE: {
|
|
152
|
-
readonly version: "0.3.
|
|
152
|
+
readonly version: "0.3.209";
|
|
153
153
|
readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
|
|
154
154
|
readonly packageCapabilities: {
|
|
155
155
|
readonly updatePreferences: 1;
|
package/dist/release.js
CHANGED
|
@@ -74,7 +74,7 @@ var SDK_RELEASE = {
|
|
|
74
74
|
// getters keep their established compatibility behavior.
|
|
75
75
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
76
76
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
77
|
-
version: "0.3.
|
|
77
|
+
version: "0.3.209",
|
|
78
78
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
79
79
|
packageCapabilities: {
|
|
80
80
|
updatePreferences: 1
|
package/dist/release.mjs
CHANGED
|
@@ -48,7 +48,7 @@ var SDK_RELEASE = {
|
|
|
48
48
|
// getters keep their established compatibility behavior.
|
|
49
49
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
50
50
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
51
|
-
version: "0.3.
|
|
51
|
+
version: "0.3.209",
|
|
52
52
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
53
53
|
packageCapabilities: {
|
|
54
54
|
updatePreferences: 1
|