deepline 0.3.309 → 0.3.311
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/ledger-safe-payload.ts +7 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +67 -14
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +4 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +53 -7
- package/dist/cli/{auth-AA5SXOB6.mjs → auth-2A7OYHFJ.mjs} +4 -4
- package/dist/cli/auth-66JFXP6C.js +31 -0
- package/dist/cli/{billing-6DJWMFV7.js → billing-2PQ4VDRR.js} +70 -70
- package/dist/cli/{billing-CXUIXODY.mjs → billing-P7GIAP3U.mjs} +4 -4
- package/dist/cli/{chunk-ATTN5BOA.mjs → chunk-4WFNAWVO.mjs} +2 -2
- package/dist/cli/{chunk-5VHI2LFM.js → chunk-5IBHISKA.js} +6 -6
- package/dist/cli/{chunk-W3CSORIT.mjs → chunk-5OVNL6LS.mjs} +1 -1
- package/dist/cli/{chunk-CO5TGXG2.js → chunk-7TT4LZIR.js} +250 -125
- package/dist/cli/{chunk-YBKMQLH2.mjs → chunk-DUEHAEPM.mjs} +1 -1
- package/dist/cli/{chunk-3SZSFTLQ.js → chunk-FYPZ43Y4.js} +1 -1
- package/dist/cli/{chunk-YV5USGOP.mjs → chunk-G3QP2WYR.mjs} +6 -6
- package/dist/cli/{chunk-52FXVKVC.js → chunk-GCX3343L.js} +48 -48
- package/dist/cli/{chunk-TQ5BV5RT.mjs → chunk-HOCPOTDX.mjs} +2 -2
- package/dist/cli/{chunk-IQYTESPK.js → chunk-IB7OGQGH.js} +6 -6
- package/dist/cli/{chunk-OTX2Z2Y7.mjs → chunk-ICZB4GTY.mjs} +3 -3
- package/dist/cli/{chunk-M2V27CEE.js → chunk-LRI2FQF2.js} +26 -26
- package/dist/cli/{chunk-N6P7NBX3.mjs → chunk-Q3LYQTSO.mjs} +1 -1
- package/dist/cli/{chunk-4A6BYN66.mjs → chunk-QJA6SJHA.mjs} +2 -2
- package/dist/cli/{chunk-6QWXPOZM.js → chunk-QO3GH6UP.js} +2 -2
- package/dist/cli/{chunk-PAJVT47Z.js → chunk-QYL5ZV4U.js} +6 -6
- package/dist/cli/{chunk-NZCFZXDP.js → chunk-RNJ74JDH.js} +4 -4
- package/dist/cli/{chunk-3EVKBS6J.mjs → chunk-SGTSJCOA.mjs} +1 -1
- package/dist/cli/{chunk-GUUQJJBS.mjs → chunk-SPUTBCUR.mjs} +1 -1
- package/dist/cli/{chunk-A74BQEUC.mjs → chunk-TBX7AA7Y.mjs} +175 -50
- package/dist/cli/{chunk-4SAHSARB.js → chunk-VODJJUKE.js} +15 -15
- package/dist/cli/{chunk-V5PB43SQ.js → chunk-XDUQQTIS.js} +6 -6
- package/dist/cli/client-ADWRS22F.js +20 -0
- package/dist/cli/{client-GXT2WRBH.mjs → client-PNLDT2M3.mjs} +3 -3
- package/dist/cli/{csv-OLMTSK4E.mjs → csv-KUAATBZQ.mjs} +3 -3
- package/dist/cli/{csv-FY7CVAUY.js → csv-L5DN7F45.js} +12 -12
- package/dist/cli/{db-XHHF7SFB.js → db-6NIH4KTZ.js} +20 -20
- package/dist/cli/{db-HWYKGEOK.mjs → db-WZOD6NP5.mjs} +4 -4
- package/dist/cli/{executions-5L7YUA7K.mjs → executions-RDDXGT2Y.mjs} +4 -4
- package/dist/cli/{executions-K2IJEKEN.js → executions-TQ5WRHDS.js} +6 -6
- package/dist/cli/{feedback-FZLBZKF7.js → feedback-NYKLEQB6.js} +6 -6
- package/dist/cli/{feedback-BIN2IWO4.mjs → feedback-ZB4WKBSS.mjs} +3 -3
- package/dist/cli/git-E56KOYJR.js +23 -0
- package/dist/cli/{git-G4ULJPIH.mjs → git-E6DKAX3X.mjs} +4 -4
- package/dist/cli/index.js +73 -73
- package/dist/cli/index.mjs +30 -30
- package/dist/cli/{legacy-noops-YBBLHKUV.mjs → legacy-noops-25B7JCOZ.mjs} +4 -4
- package/dist/cli/{legacy-noops-TBTYKXMK.js → legacy-noops-26Y5NSU6.js} +7 -7
- package/dist/cli/{monitors-PXBJTE6Q.js → monitors-L3GFT4MG.js} +85 -85
- package/dist/cli/{monitors-ZRNDHLTP.mjs → monitors-WRTHO7DT.mjs} +4 -4
- package/dist/cli/{org-AUPHYG4W.js → org-BNCTGPWF.js} +60 -60
- package/dist/cli/{org-GR7CKJDU.mjs → org-ZTHOFVEO.mjs} +4 -4
- package/dist/cli/{play-BXX6KDC5.js → play-BCMGFYTF.js} +220 -220
- package/dist/cli/{play-7C4XXDLJ.mjs → play-SOG5Q2GE.mjs} +6 -6
- package/dist/cli/{providers-X3W5I7AI.js → providers-MLOKTD6O.js} +7 -7
- package/dist/cli/{providers-2ALIWVHI.mjs → providers-SLAPPVMU.mjs} +4 -4
- package/dist/cli/{quickstart-YU2FOUGV.js → quickstart-IWJLGET3.js} +5 -5
- package/dist/cli/{quickstart-HFLMM6CB.mjs → quickstart-LZRKZLNQ.mjs} +3 -3
- package/dist/cli/{search-LBAPKYPL.js → search-6FBDSA3K.js} +6 -6
- package/dist/cli/{search-5W6CX5FT.mjs → search-RCDGSNWW.mjs} +5 -5
- package/dist/cli/{secrets-4JYV6372.js → secrets-24KEMSCU.js} +13 -13
- package/dist/cli/{secrets-N3LH3EFK.mjs → secrets-GDPYV6OC.mjs} +4 -4
- package/dist/cli/{sessions-66MKLRBI.js → sessions-QOUUGVP3.js} +5 -5
- package/dist/cli/{sessions-4TCBDROP.mjs → sessions-ST5XQQZN.mjs} +4 -4
- package/dist/cli/{settings-GQMXHDZN.js → settings-4XWDMAA2.js} +74 -74
- package/dist/cli/{settings-33RZDJOH.mjs → settings-V6Z775TO.mjs} +7 -7
- package/dist/cli/{setup-754356IS.mjs → setup-QPZLP25U.mjs} +6 -6
- package/dist/cli/{setup-HU6LC4VR.js → setup-W7SPZTUL.js} +41 -41
- package/dist/cli/{skills-FLWPPQMH.mjs → skills-QG22R2EI.mjs} +4 -4
- package/dist/cli/skills-WKOQBJY7.js +28 -0
- package/dist/cli/{tools-IRLN4KYG.mjs → tools-G4HGCHNQ.mjs} +5 -5
- package/dist/cli/{tools-N4OW6HZK.js → tools-WN7T25LW.js} +50 -50
- package/dist/cli/{update-TOQOHGVE.mjs → update-5PSYBGVU.mjs} +6 -6
- package/dist/cli/update-WKVCWGYY.js +28 -0
- package/dist/cli/{workflow-DRH7T3P4.mjs → workflow-EK7DV4AQ.mjs} +5 -5
- package/dist/cli/{workflow-WSYT32Y3.js → workflow-ZEQ46MGG.js} +15 -15
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +68 -68
- 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-MXBOMMLC.js +0 -31
- package/dist/cli/client-B2MYCJW5.js +0 -20
- package/dist/cli/git-KSXSQSH2.js +0 -23
- package/dist/cli/skills-WWO2EIQU.js +0 -28
- package/dist/cli/update-CLSJ7ODP.js +0 -28
|
@@ -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.311',
|
|
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: {
|
|
@@ -95,8 +95,12 @@ export function sanitizeLedgerLogLines(value: unknown): string[] {
|
|
|
95
95
|
return value
|
|
96
96
|
.filter((line): line is string => typeof line === 'string')
|
|
97
97
|
.slice(0, MAX_LEDGER_LOG_LINES_PER_EVENT)
|
|
98
|
-
.map((line) =>
|
|
99
|
-
boundRunLogLine(ledgerIngressRedactor.redactString(line.trim())),
|
|
100
|
-
)
|
|
98
|
+
.map((line) => sanitizeLedgerLogLine(line))
|
|
101
99
|
.filter(Boolean);
|
|
102
100
|
}
|
|
101
|
+
|
|
102
|
+
/** Runtime measurement records use the terminal transport's existing byte budget. */
|
|
103
|
+
export function sanitizeLedgerLogLine(line: string, bounded = true): string {
|
|
104
|
+
const redacted = ledgerIngressRedactor.redactString(line.trim());
|
|
105
|
+
return bounded ? boundRunLogLine(redacted) : redacted;
|
|
106
|
+
}
|
package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts
CHANGED
|
@@ -379,6 +379,12 @@ async function reconcileAndDeleteTimedOutDaytonaSandbox(input: {
|
|
|
379
379
|
daytona: DaytonaClient;
|
|
380
380
|
sandboxName: string;
|
|
381
381
|
cancellationSignal?: AbortSignal;
|
|
382
|
+
emitStage?: DaytonaStageEmitter;
|
|
383
|
+
operationIdentity?: {
|
|
384
|
+
providerOperationToken: string;
|
|
385
|
+
orgId: string;
|
|
386
|
+
runId?: string;
|
|
387
|
+
};
|
|
382
388
|
}): Promise<TimedOutDaytonaSandboxReconciliation> {
|
|
383
389
|
if (!input.daytona.get) return { kind: 'not_found' };
|
|
384
390
|
let lastDeleteConflict: unknown = null;
|
|
@@ -391,12 +397,26 @@ async function reconcileAndDeleteTimedOutDaytonaSandbox(input: {
|
|
|
391
397
|
try {
|
|
392
398
|
sandbox = await input.daytona.get(input.sandboxName);
|
|
393
399
|
} catch (error) {
|
|
400
|
+
const providerStatus =
|
|
401
|
+
error && typeof error === 'object' && 'statusCode' in error
|
|
402
|
+
? error.statusCode
|
|
403
|
+
: null;
|
|
404
|
+
input.emitStage?.('create:reconcile_lookup_failed', {
|
|
405
|
+
providerStatus:
|
|
406
|
+
typeof providerStatus === 'number' ? providerStatus : null,
|
|
407
|
+
});
|
|
408
|
+
// Invalid provider credentials are not a sandbox state transition.
|
|
409
|
+
if (providerStatus === 401 || providerStatus === 403) throw error;
|
|
394
410
|
// A current absence is not proof that the sent create cannot commit.
|
|
395
411
|
// Return it to the durable operation owner without another create or
|
|
396
412
|
// releasing capacity; later recovery re-reads the same identity.
|
|
397
413
|
if (isDaytonaSandboxNotFound(error)) return { kind: 'not_found' };
|
|
398
414
|
continue;
|
|
399
415
|
}
|
|
416
|
+
input.emitStage?.('create:reconcile_state', {
|
|
417
|
+
sandboxId: sandbox.id,
|
|
418
|
+
state: sandbox.state ?? null,
|
|
419
|
+
});
|
|
400
420
|
// `create` waits only a bounded interval, but the named sandbox may finish
|
|
401
421
|
// the same create transition immediately afterwards. It is already the
|
|
402
422
|
// durable identity associated with this provider operation, so reusing it
|
|
@@ -405,6 +425,26 @@ async function reconcileAndDeleteTimedOutDaytonaSandbox(input: {
|
|
|
405
425
|
if (sandbox.state === 'started') {
|
|
406
426
|
return { kind: 'started', sandbox };
|
|
407
427
|
}
|
|
428
|
+
if (input.operationIdentity) {
|
|
429
|
+
const expected = input.operationIdentity;
|
|
430
|
+
const configuredOrganizationId =
|
|
431
|
+
process.env.DAYTONA_ORGANIZATION_ID?.trim();
|
|
432
|
+
if (
|
|
433
|
+
sandbox.name !== input.sandboxName ||
|
|
434
|
+
sandbox.labels?.source !== DAYTONA_PLAY_RUNNER_LABEL_SOURCE ||
|
|
435
|
+
sandbox.labels?.operationKey !== expected.providerOperationToken ||
|
|
436
|
+
sandbox.labels?.orgId !== normalizeLabelValue(expected.orgId) ||
|
|
437
|
+
(normalizeLabelValue(expected.runId) &&
|
|
438
|
+
sandbox.labels?.runId !== normalizeLabelValue(expected.runId)) ||
|
|
439
|
+
!sandbox.organizationId?.trim() ||
|
|
440
|
+
(configuredOrganizationId &&
|
|
441
|
+
sandbox.organizationId !== configuredOrganizationId)
|
|
442
|
+
) {
|
|
443
|
+
throw new Error(
|
|
444
|
+
'Daytona resumed sandbox identity or organization routing does not match its reserved operation. Cleanup and fallback suppressed.',
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
408
448
|
try {
|
|
409
449
|
await input.daytona.delete(sandbox, 30);
|
|
410
450
|
} catch (error) {
|
|
@@ -474,14 +514,24 @@ async function createRetriedOneShotDaytonaSandbox(input: {
|
|
|
474
514
|
const reservation = await input.reserveSandboxCapacity?.(attempt);
|
|
475
515
|
const sandboxName = daytonaSandboxName(reservation?.providerOperationToken);
|
|
476
516
|
if (reservation?.resumeExistingProviderOperation) {
|
|
477
|
-
if (!
|
|
517
|
+
if (!reservation.providerOperationToken) {
|
|
478
518
|
throw new DaytonaSandboxTransitionPendingError(sandboxName);
|
|
479
519
|
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
520
|
+
// Recovery must converge when the timed-out create has stopped or failed,
|
|
521
|
+
// using the same provider-confirmed cleanup path as its initial observer.
|
|
522
|
+
const reconciliation = await reconcileAndDeleteTimedOutDaytonaSandbox({
|
|
523
|
+
daytona: input.daytona,
|
|
524
|
+
sandboxName,
|
|
525
|
+
cancellationSignal: input.cancellationSignal,
|
|
526
|
+
emitStage: input.emitStage,
|
|
527
|
+
operationIdentity: {
|
|
528
|
+
providerOperationToken: reservation.providerOperationToken,
|
|
529
|
+
orgId: input.orgId,
|
|
530
|
+
runId: input.context.runId ?? undefined,
|
|
531
|
+
},
|
|
532
|
+
});
|
|
533
|
+
if (reconciliation.kind === 'started') {
|
|
534
|
+
const sandbox = reconciliation.sandbox;
|
|
485
535
|
const acquiredAt = Date.now();
|
|
486
536
|
input.emitStage('create:resumed', {
|
|
487
537
|
attempt,
|
|
@@ -494,15 +544,17 @@ async function createRetriedOneShotDaytonaSandbox(input: {
|
|
|
494
544
|
attemptElapsedMs: acquiredAt - attemptStartedAt,
|
|
495
545
|
sandboxCapacityLeaseId: reservation.leaseId,
|
|
496
546
|
};
|
|
497
|
-
} catch (error) {
|
|
498
|
-
if (error instanceof DaytonaSandboxTransitionPendingError) throw error;
|
|
499
|
-
if (!isDaytonaSandboxNotFound(error)) {
|
|
500
|
-
throw new DaytonaSandboxTransitionPendingError(sandboxName);
|
|
501
|
-
}
|
|
502
|
-
// A lookup 404 does not prove that an earlier sent create cannot still
|
|
503
|
-
// commit. Keep the durable identity reserved; never hedge its outcome.
|
|
504
|
-
throw new DaytonaSandboxTransitionPendingError(sandboxName);
|
|
505
547
|
}
|
|
548
|
+
if (reconciliation.kind === 'deleted') {
|
|
549
|
+
await input.releaseSandboxCapacity?.(reservation.leaseId);
|
|
550
|
+
throw new DaytonaSandboxAcquisitionUnavailableError(
|
|
551
|
+
'daytona_sandbox_start_timeout',
|
|
552
|
+
'The resumed timed-out Daytona sandbox was reconciled and deleted before fallback.',
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
// Neither absence nor an ongoing transition proves that create cannot
|
|
556
|
+
// commit. Retain the durable identity and its capacity reservation.
|
|
557
|
+
throw new DaytonaSandboxTransitionPendingError(sandboxName);
|
|
506
558
|
}
|
|
507
559
|
let sandbox: DaytonaSandbox;
|
|
508
560
|
try {
|
|
@@ -551,6 +603,7 @@ async function createRetriedOneShotDaytonaSandbox(input: {
|
|
|
551
603
|
daytona: input.daytona,
|
|
552
604
|
sandboxName,
|
|
553
605
|
cancellationSignal: input.cancellationSignal,
|
|
606
|
+
emitStage: input.emitStage,
|
|
554
607
|
});
|
|
555
608
|
} catch (reconciliationError) {
|
|
556
609
|
await recordCreateFailure();
|
package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts
CHANGED
|
@@ -2271,6 +2271,10 @@ async function settleObservedTerminal(input: {
|
|
|
2271
2271
|
});
|
|
2272
2272
|
return;
|
|
2273
2273
|
}
|
|
2274
|
+
// The terminal and its outbox fact are already committed. Visibility must
|
|
2275
|
+
// not wait for the mixed-version billing repair below; repair still finishes
|
|
2276
|
+
// before this worker retires the attempt.
|
|
2277
|
+
requestTerminalOutboxProjection({ ...input, trigger: input.source });
|
|
2274
2278
|
const backfilledBilling = await input.deps.runWithClient((client) =>
|
|
2275
2279
|
ensurePostgresSchedulerTerminalComputeBillingJob(
|
|
2276
2280
|
client,
|
|
@@ -2288,7 +2292,6 @@ async function settleObservedTerminal(input: {
|
|
|
2288
2292
|
},
|
|
2289
2293
|
);
|
|
2290
2294
|
}
|
|
2291
|
-
requestTerminalOutboxProjection({ ...input, trigger: input.source });
|
|
2292
2295
|
}
|
|
2293
2296
|
|
|
2294
2297
|
/**
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
type RunLedgerDispatchLaunch,
|
|
5
5
|
} from './run-ledger-dispatch-authority';
|
|
6
6
|
import { normalizeRunLogIds } from '../run-log-buffer';
|
|
7
|
+
import { sanitizeLedgerLogLine } from '../ledger-safe-payload';
|
|
7
8
|
import {
|
|
8
9
|
retainedPlayPipelineFields,
|
|
9
10
|
hydrateRetainedPlayPipelines,
|
|
@@ -10926,7 +10927,9 @@ export async function directCompletePostgresSchedulerRunnerTerminal(
|
|
|
10926
10927
|
stringifyPostgresJson(runtimeTiming ?? null),
|
|
10927
10928
|
stringifyPostgresJson(ledgerTerminalResult ?? null),
|
|
10928
10929
|
JSON.stringify(terminalLogLines),
|
|
10929
|
-
JSON.stringify(
|
|
10930
|
+
JSON.stringify(
|
|
10931
|
+
sanitizeTerminalProgressEvents(input.terminalProgressEvents),
|
|
10932
|
+
),
|
|
10930
10933
|
postgresSchedulerNotifyChannel('terminal', options),
|
|
10931
10934
|
JSON.stringify({ runId: input.runId, status: 'completed' }),
|
|
10932
10935
|
input.leaseToken,
|
|
@@ -13305,7 +13308,7 @@ export async function completePostgresSchedulerAttempt(
|
|
|
13305
13308
|
);
|
|
13306
13309
|
const terminalLogEntries = (input.terminalLogLines ?? [])
|
|
13307
13310
|
.map((line, index) => ({
|
|
13308
|
-
line: line
|
|
13311
|
+
line: sanitizeTerminalLogBody(line),
|
|
13309
13312
|
context: input.terminalLogContexts?.[index] ?? null,
|
|
13310
13313
|
metadata: input.terminalLogMetadata?.[index] ?? null,
|
|
13311
13314
|
entryId: terminalLogIds?.[index] ?? null,
|
|
@@ -13529,7 +13532,9 @@ export async function completePostgresSchedulerAttempt(
|
|
|
13529
13532
|
JSON.stringify(terminalLogContexts),
|
|
13530
13533
|
stringifyPostgresJson(input.terminalWorkCounterSegment ?? null),
|
|
13531
13534
|
JSON.stringify(terminalLogMetadata),
|
|
13532
|
-
JSON.stringify(
|
|
13535
|
+
JSON.stringify(
|
|
13536
|
+
sanitizeTerminalProgressEvents(input.terminalProgressEvents),
|
|
13537
|
+
),
|
|
13533
13538
|
stringifyPostgresJson(
|
|
13534
13539
|
terminalLogIds
|
|
13535
13540
|
? terminalLogEntries.map((entry) => entry.entryId)
|
|
@@ -13615,7 +13620,7 @@ export async function failPostgresSchedulerAttempt(
|
|
|
13615
13620
|
);
|
|
13616
13621
|
const terminalLogEntries = (input.terminalLogLines ?? [])
|
|
13617
13622
|
.map((line, index) => ({
|
|
13618
|
-
line: line
|
|
13623
|
+
line: sanitizeTerminalLogBody(line),
|
|
13619
13624
|
context: input.terminalLogContexts?.[index] ?? null,
|
|
13620
13625
|
metadata: input.terminalLogMetadata?.[index] ?? null,
|
|
13621
13626
|
entryId: terminalLogIds?.[index] ?? null,
|
|
@@ -13901,7 +13906,9 @@ export async function failPostgresSchedulerAttempt(
|
|
|
13901
13906
|
stringifyPostgresJson(resultSummary),
|
|
13902
13907
|
JSON.stringify(terminalLogContexts),
|
|
13903
13908
|
stringifyPostgresJson(terminalWorkCounterSegment ?? null),
|
|
13904
|
-
stringifyPostgresJson(
|
|
13909
|
+
stringifyPostgresJson(
|
|
13910
|
+
sanitizeTerminalProgressEvents(input.terminalProgressEvents),
|
|
13911
|
+
),
|
|
13905
13912
|
JSON.stringify(terminalLogMetadata),
|
|
13906
13913
|
stringifyPostgresJson(
|
|
13907
13914
|
terminalLogIds
|
|
@@ -14612,7 +14619,9 @@ function runnerTerminalLogPayload(input: {
|
|
|
14612
14619
|
terminalLogContexts: projection.lineContexts,
|
|
14613
14620
|
terminalLogMetadata: projection.lineMetadata,
|
|
14614
14621
|
...(projection.lineIds ? { terminalLogIds: projection.lineIds } : {}),
|
|
14615
|
-
terminalProgressEvents:
|
|
14622
|
+
terminalProgressEvents: sanitizeTerminalProgressEvents(
|
|
14623
|
+
input.terminalProgressEvents,
|
|
14624
|
+
),
|
|
14616
14625
|
// Older runner envelopes conveyed these diagnostics only in tagged log
|
|
14617
14626
|
// text. Preserve their small structured facts before removing that text.
|
|
14618
14627
|
recoveredRuntimeDiagnostics:
|
|
@@ -14629,6 +14638,41 @@ function runnerTerminalLogPayload(input: {
|
|
|
14629
14638
|
};
|
|
14630
14639
|
}
|
|
14631
14640
|
|
|
14641
|
+
function sanitizeTerminalProgressEvents(
|
|
14642
|
+
events: readonly unknown[] = [],
|
|
14643
|
+
): unknown[] {
|
|
14644
|
+
return events.map((event) => {
|
|
14645
|
+
if (!event || typeof event !== 'object' || Array.isArray(event))
|
|
14646
|
+
return event;
|
|
14647
|
+
const item = event as Record<string, unknown>;
|
|
14648
|
+
if (item.type !== 'log.appended' || !Array.isArray(item.lines))
|
|
14649
|
+
return event;
|
|
14650
|
+
return {
|
|
14651
|
+
...item,
|
|
14652
|
+
// Keep every position and annotation aligned, including blank lines.
|
|
14653
|
+
// Invalid values still reach the existing SQL validation unchanged.
|
|
14654
|
+
lines: item.lines.map((line) =>
|
|
14655
|
+
typeof line === 'string'
|
|
14656
|
+
? sanitizeTerminalLogBody(line) || '(blank log line)'
|
|
14657
|
+
: line,
|
|
14658
|
+
),
|
|
14659
|
+
};
|
|
14660
|
+
});
|
|
14661
|
+
}
|
|
14662
|
+
|
|
14663
|
+
function sanitizeTerminalLogBody(line: string): string {
|
|
14664
|
+
const body = line.trim();
|
|
14665
|
+
const runtimeDiagnostic =
|
|
14666
|
+
body.startsWith('[runtime.failure_diagnostic] ') ||
|
|
14667
|
+
body.startsWith('[runtime.phase_summary] ') ||
|
|
14668
|
+
body.startsWith('[runtime.logs] ') ||
|
|
14669
|
+
body.startsWith('[runtime.log_transport] ');
|
|
14670
|
+
// These runtime records contain machine-readable JSON, already bounded by
|
|
14671
|
+
// the terminal transport. Keep it parseable while applying the same redaction.
|
|
14672
|
+
// Authored tagged lines retain the ordinary live-ingress line bound.
|
|
14673
|
+
return sanitizeLedgerLogLine(body, !runtimeDiagnostic);
|
|
14674
|
+
}
|
|
14675
|
+
|
|
14632
14676
|
function terminalLogProjectionForOutbox(
|
|
14633
14677
|
runnerResult: unknown,
|
|
14634
14678
|
mode: PostgresSchedulerTerminalLogOutbox | undefined,
|
|
@@ -14689,7 +14733,9 @@ function terminalLogProjectionForOutbox(
|
|
|
14689
14733
|
normalized.startsWith('[runtime.log_transport] ');
|
|
14690
14734
|
if (!retained) return null;
|
|
14691
14735
|
return {
|
|
14692
|
-
|
|
14736
|
+
// The live API applies this same canonicalization before indexing.
|
|
14737
|
+
// Replaying an origin ID must carry that exact redacted, bounded body.
|
|
14738
|
+
line: sanitizeTerminalLogBody(line),
|
|
14693
14739
|
context: normalizePlayLogContext(logContexts?.[index]),
|
|
14694
14740
|
metadata: normalizePlayLogMetadata(logMetadata?.[index]),
|
|
14695
14741
|
entryId: logIds?.[index] ?? null,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
registerAuthCommands,
|
|
10
10
|
reportSetupCompleted,
|
|
11
11
|
resolvePendingAuthClaimForResume
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-HOCPOTDX.mjs";
|
|
13
|
+
import "./chunk-SPUTBCUR.mjs";
|
|
14
|
+
import "./chunk-Q3LYQTSO.mjs";
|
|
15
15
|
import "./chunk-DLIRSHV6.mjs";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-SGTSJCOA.mjs";
|
|
17
17
|
import "./chunk-NXGCO4JB.mjs";
|
|
18
18
|
import "./chunk-WZYKRD7T.mjs";
|
|
19
19
|
import "./chunk-KRD6H754.mjs";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkGCX3343Ljs = require('./chunk-GCX3343L.js');
|
|
13
|
+
require('./chunk-XDUQQTIS.js');
|
|
14
|
+
require('./chunk-RNJ74JDH.js');
|
|
15
|
+
require('./chunk-XNYIZMNQ.js');
|
|
16
|
+
require('./chunk-FYPZ43Y4.js');
|
|
17
|
+
require('./chunk-7P5AA3SN.js');
|
|
18
|
+
require('./chunk-OG64RBAC.js');
|
|
19
|
+
require('./chunk-COGTRVWW.js');
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
exports.EXIT_WORKSPACE_MISMATCH = _chunkGCX3343Ljs.EXIT_WORKSPACE_MISMATCH; exports.clearPendingClaim = _chunkGCX3343Ljs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkGCX3343Ljs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkGCX3343Ljs.handleRegister; exports.handleStatus = _chunkGCX3343Ljs.handleStatus; exports.handleWait = _chunkGCX3343Ljs.handleWait; exports.readPendingAuthClaim = _chunkGCX3343Ljs.readPendingAuthClaim; exports.registerAuthCommands = _chunkGCX3343Ljs.registerAuthCommands; exports.reportSetupCompleted = _chunkGCX3343Ljs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkGCX3343Ljs.resolvePendingAuthClaimForResume;
|