deepline 0.3.315 → 0.3.317
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/sdk/src/runs/overview.ts +17 -10
- package/dist/bundling-sources/sdk/src/types.ts +6 -5
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +64 -0
- 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 +396 -35
- 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/scheduler-backends/run-ledger-outbox-recovery.ts +123 -19
- 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/cli/auth-XPLGQ2KO.js +31 -0
- package/dist/cli/{auth-OVWOO5NP.mjs → auth-YAHBE5WU.mjs} +4 -4
- package/dist/cli/{billing-W3OXKWNE.mjs → billing-AY4OS7MR.mjs} +4 -4
- package/dist/cli/{billing-SRZL7UOH.js → billing-ORZDEMH2.js} +70 -70
- package/dist/cli/{chunk-OJP4FCCX.js → chunk-2FKXFTOF.js} +48 -48
- package/dist/cli/{chunk-OJ243ZA5.js → chunk-2HKPAZVJ.js} +1 -1
- package/dist/cli/{chunk-LOWURQMF.js → chunk-342BTES3.js} +50 -50
- package/dist/cli/{chunk-FGAK6FET.js → chunk-3NRNDPAE.js} +26 -26
- package/dist/cli/{chunk-GK67FYMS.mjs → chunk-5BLF3HDM.mjs} +5 -5
- package/dist/cli/{chunk-TZ5KUDPP.mjs → chunk-5OFRM64Y.mjs} +1 -1
- package/dist/cli/{chunk-US4S3E4Y.mjs → chunk-7PZFGB7L.mjs} +1 -1
- package/dist/cli/{chunk-YL42TF53.js → chunk-AMJYFPFK.js} +6 -6
- package/dist/cli/{chunk-PPONZ6IE.js → chunk-AW355CLN.js} +15 -15
- package/dist/cli/{chunk-TQK662WG.js → chunk-BGBYK2T3.js} +60 -60
- package/dist/cli/{chunk-TQ3F77AC.mjs → chunk-CGGM4CE6.mjs} +3 -3
- package/dist/cli/{chunk-FTJQO757.mjs → chunk-D5MHSO5T.mjs} +1 -1
- package/dist/cli/{chunk-Y42UERUY.js → chunk-DSTUP75H.js} +6 -6
- package/dist/cli/{chunk-HNKHMHJ7.mjs → chunk-FRK2AGSG.mjs} +1 -1
- package/dist/cli/{chunk-OUIIYFG3.mjs → chunk-GX3WO4M4.mjs} +2 -2
- package/dist/cli/{chunk-OYJCNCUW.js → chunk-GYOLWON6.js} +2 -2
- package/dist/cli/{chunk-N5V2SBB2.mjs → chunk-KP7W5NO6.mjs} +1 -1
- package/dist/cli/{chunk-L5TSFCJ6.mjs → chunk-KXOXXVYJ.mjs} +2 -2
- package/dist/cli/{chunk-B473QUQU.mjs → chunk-L6ERGROE.mjs} +4 -4
- package/dist/cli/{chunk-R3IFZDJL.mjs → chunk-LI6YPPBR.mjs} +2 -2
- package/dist/cli/{chunk-IGE7EJJY.mjs → chunk-NDFBAMVI.mjs} +19 -15
- package/dist/cli/{chunk-JF4O5OMH.mjs → chunk-OTI562P3.mjs} +1 -1
- package/dist/cli/{chunk-AO4IWPP7.mjs → chunk-PSHIZP3K.mjs} +17 -15
- package/dist/cli/{chunk-VYK23G2C.js → chunk-QFKVAUIQ.js} +239 -235
- package/dist/cli/{chunk-AZWQJAQF.mjs → chunk-QPKHOZI3.mjs} +1 -1
- package/dist/cli/{chunk-URVZGYGG.js → chunk-SUPQQYGY.js} +4 -4
- package/dist/cli/{chunk-C5WSTXUB.js → chunk-TJ2V2JA3.js} +537 -535
- package/dist/cli/{chunk-6BJACIVK.js → chunk-UGQHYOT4.js} +1 -1
- package/dist/cli/{chunk-IALPYID6.js → chunk-XSEMQ4II.js} +3 -3
- package/dist/cli/{chunk-SNFSO2AN.js → chunk-Z5NRL7A7.js} +6 -6
- package/dist/cli/{client-WQ3J5BSH.mjs → client-QNLVLW54.mjs} +3 -3
- package/dist/cli/client-ZW5VAHWD.js +20 -0
- package/dist/cli/{csv-36ARCBNQ.mjs → csv-AKZASZP6.mjs} +3 -3
- package/dist/cli/{csv-CENMEWDH.js → csv-PW6S3SMJ.js} +12 -12
- package/dist/cli/{db-JU7XLKQM.mjs → db-DNF53LDS.mjs} +4 -4
- package/dist/cli/{db-6DQZG6NB.js → db-FLDYET2D.js} +20 -20
- package/dist/cli/{describe-VUD4AFBY.js → describe-JDAEOCYQ.js} +17 -17
- package/dist/cli/{describe-34ALEEFO.mjs → describe-U6RGIFMA.mjs} +10 -10
- package/dist/cli/{executions-H2UXS6FP.js → executions-DASCB6LS.js} +6 -6
- package/dist/cli/{executions-H66BMN6N.mjs → executions-W6BBU2HN.mjs} +4 -4
- package/dist/cli/{feedback-Q7LXXLSH.mjs → feedback-BVWPDWZG.mjs} +3 -3
- package/dist/cli/{feedback-YSYFQSAB.js → feedback-N3MBCT4A.js} +6 -6
- package/dist/cli/{git-XV43NSWN.mjs → git-4GJOKOLU.mjs} +4 -4
- package/dist/cli/git-WVHH3QXQ.js +23 -0
- package/dist/cli/index.js +171 -98
- package/dist/cli/index.mjs +114 -41
- package/dist/cli/{legacy-noops-Z2DTZQN3.mjs → legacy-noops-5XMSV7WL.mjs} +4 -4
- package/dist/cli/{legacy-noops-RGDW6SCA.js → legacy-noops-D7C7ZVKK.js} +7 -7
- package/dist/cli/{monitors-I75KZ2BP.js → monitors-NYP4LG3K.js} +85 -85
- package/dist/cli/{monitors-OFQ56O4S.mjs → monitors-Y4RKWAS5.mjs} +4 -4
- package/dist/cli/{org-75AH6RIB.js → org-PYKQMP6F.js} +60 -60
- package/dist/cli/{org-ZYMCU6XO.mjs → org-XZ26CUCV.mjs} +4 -4
- package/dist/cli/play-BYZCR4PP.js +152 -0
- package/dist/cli/{play-BKXM76DV.mjs → play-FYHIYZ3W.mjs} +9 -9
- package/dist/cli/{providers-GWG2WFIY.mjs → providers-3UG7NK55.mjs} +4 -4
- package/dist/cli/{providers-Z77MM7ID.js → providers-QS5X236G.js} +7 -7
- package/dist/cli/{quickstart-I4RECIQC.js → quickstart-GMASUT7T.js} +5 -5
- package/dist/cli/{quickstart-BGVIV374.mjs → quickstart-PHHHHHWO.mjs} +3 -3
- package/dist/cli/search-52CC3OVI.js +26 -0
- package/dist/cli/{search-TIKBP3RE.mjs → search-AVGITJP4.mjs} +5 -5
- package/dist/cli/{secrets-SNGRI4KS.js → secrets-HY5E6F6G.js} +13 -13
- package/dist/cli/{secrets-YCHKLWKC.mjs → secrets-RBEZRQ6P.mjs} +4 -4
- package/dist/cli/{sessions-WXLADGDX.js → sessions-7CDLWLVV.js} +5 -5
- package/dist/cli/{sessions-IRDG6ZRX.mjs → sessions-ME5R5FTG.mjs} +4 -4
- package/dist/cli/{settings-KZALJDXW.mjs → settings-X4JQLBB6.mjs} +7 -7
- package/dist/cli/{settings-72J4BVF6.js → settings-ZCVJPOFP.js} +74 -74
- package/dist/cli/{setup-FFB3KLFD.js → setup-DROGU6MC.js} +41 -41
- package/dist/cli/{setup-4KCA7ESV.mjs → setup-NEILS2UF.mjs} +6 -6
- package/dist/cli/skills-KUV3WWW5.js +28 -0
- package/dist/cli/{skills-MQZPYUQ3.mjs → skills-PC57GDXZ.mjs} +4 -4
- package/dist/cli/{tools-M3WKRZ5T.mjs → tools-IFJUWQC5.mjs} +6 -6
- package/dist/cli/tools-NHDAOQPB.js +38 -0
- package/dist/cli/update-DRWQCVXJ.js +28 -0
- package/dist/cli/{update-QJMNYGNF.mjs → update-N4HSH2TJ.mjs} +6 -6
- package/dist/cli/{workflow-6T2EUFCN.mjs → workflow-2OZBTUU2.mjs} +5 -5
- package/dist/cli/{workflow-35UUOZ5E.js → workflow-LP4Z6RF5.js} +15 -15
- package/dist/{client-Dh_4Ph1R.d.ts → client-BV68GMPo.d.ts} +7 -6
- package/dist/{client-CvpZsBqt.d.mts → client-D9ACjiRC.d.mts} +7 -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-P2TTZU36.js +0 -31
- package/dist/cli/client-CXFPFCIG.js +0 -20
- package/dist/cli/git-SYFCYIFP.js +0 -23
- package/dist/cli/play-OKXUWPMO.js +0 -152
- package/dist/cli/search-3KISUDDT.js +0 -26
- package/dist/cli/skills-XGOK4GRW.js +0 -28
- package/dist/cli/tools-LEAJ7EPW.js +0 -38
- package/dist/cli/update-ZN6LDUHS.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.317',
|
|
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: {
|
|
@@ -209,7 +209,11 @@ function stepExecution(
|
|
|
209
209
|
|
|
210
210
|
/** A read-only overview of recorded run facts, never a complete row export. */
|
|
211
211
|
export function buildRunOverview(status: PlayStatus, fullStatus?: PlayStatus) {
|
|
212
|
-
|
|
212
|
+
// Full inspection can observe a later lifecycle transition than the compact
|
|
213
|
+
// read. Present its package and status together; older full servers without
|
|
214
|
+
// a package retain the existing compact inspection path.
|
|
215
|
+
const inspectedStatus = fullStatus?.package ? fullStatus : status;
|
|
216
|
+
const pkg = inspectedStatus.package;
|
|
213
217
|
if (!pkg) {
|
|
214
218
|
throw new Error(
|
|
215
219
|
'This server did not return a run package; use runs get --full --json.',
|
|
@@ -218,7 +222,10 @@ export function buildRunOverview(status: PlayStatus, fullStatus?: PlayStatus) {
|
|
|
218
222
|
const outputs = Object.entries(pkg.outputs);
|
|
219
223
|
const resultPackage = fullStatus?.package?.resultState
|
|
220
224
|
? fullStatus.package
|
|
221
|
-
: pkg;
|
|
225
|
+
: (status.package ?? pkg);
|
|
226
|
+
// The CLI requests this log window with its compact read; full inspection
|
|
227
|
+
// may omit that independent query option.
|
|
228
|
+
const failedLogs = inspectedStatus.failedLogs ?? status.failedLogs;
|
|
222
229
|
const warnings = [...(pkg.warnings ?? [])];
|
|
223
230
|
const { outcome: _outcome, ...run } = pkg.run;
|
|
224
231
|
const steps = pkg.steps.map((step) => {
|
|
@@ -373,13 +380,13 @@ export function buildRunOverview(status: PlayStatus, fullStatus?: PlayStatus) {
|
|
|
373
380
|
return {
|
|
374
381
|
schemaVersion: pkg.schemaVersion,
|
|
375
382
|
kind: 'run_overview',
|
|
376
|
-
...((
|
|
377
|
-
? { runStatus:
|
|
383
|
+
...((inspectedStatus.runStatus ?? pkg.runStatus)
|
|
384
|
+
? { runStatus: inspectedStatus.runStatus ?? pkg.runStatus }
|
|
378
385
|
: {}),
|
|
379
386
|
run: {
|
|
380
387
|
...run,
|
|
381
|
-
...(
|
|
382
|
-
? { revisionId:
|
|
388
|
+
...(inspectedStatus.revisionId && !run.revisionId
|
|
389
|
+
? { revisionId: inspectedStatus.revisionId }
|
|
383
390
|
: {}),
|
|
384
391
|
},
|
|
385
392
|
steps,
|
|
@@ -406,23 +413,23 @@ export function buildRunOverview(status: PlayStatus, fullStatus?: PlayStatus) {
|
|
|
406
413
|
},
|
|
407
414
|
errorDetails: {
|
|
408
415
|
coverage: 'unknown',
|
|
409
|
-
reported: record(pkg)?.errors ?? record(
|
|
416
|
+
reported: record(pkg)?.errors ?? record(inspectedStatus)?.errors ?? [],
|
|
410
417
|
...(pkg.run.error ? { run: pkg.run.error } : {}),
|
|
411
418
|
steps: steps
|
|
412
419
|
.filter((step) => step.error)
|
|
413
420
|
.map((step) => ({ stepId: step.id, message: step.error })),
|
|
414
421
|
...(pkg.next?.logs ? { getMore: 'actions.getLogsCmd' } : {}),
|
|
415
422
|
},
|
|
416
|
-
rowOutcomes:
|
|
423
|
+
rowOutcomes: inspectedStatus.rowOutcomes ?? pkg.rowOutcomes,
|
|
417
424
|
warnings,
|
|
418
|
-
...(
|
|
425
|
+
...(failedLogs ? { failedLogs } : {}),
|
|
419
426
|
datasets,
|
|
420
427
|
...(Object.hasOwn(resultPackage, 'result')
|
|
421
428
|
? { result: resultPackage.result }
|
|
422
429
|
: {}),
|
|
423
430
|
resultState: resultPackage.resultState ?? 'unavailable',
|
|
424
431
|
actions: {
|
|
425
|
-
...lifecycleActions(
|
|
432
|
+
...lifecycleActions(inspectedStatus, pkg.run.id, pkg.run.status),
|
|
426
433
|
...actions(pkg.next, {
|
|
427
434
|
inspect: 'getRunCmd',
|
|
428
435
|
full: 'getFullRunCmd',
|
|
@@ -793,11 +793,8 @@ export type PlayRunDatasetActions = {
|
|
|
793
793
|
};
|
|
794
794
|
|
|
795
795
|
/**
|
|
796
|
-
* Compact canonical package for
|
|
797
|
-
*
|
|
798
|
-
* This object is designed for SDK/CLI/API consumers that need stable run
|
|
799
|
-
* metadata, output handles, and follow-up actions without reading dashboard
|
|
800
|
-
* internals.
|
|
796
|
+
* Compact canonical run package for SDK/CLI consumers: stable metadata,
|
|
797
|
+
* output handles and follow-up actions without dashboard internals.
|
|
801
798
|
*/
|
|
802
799
|
export interface PlayRunPackage {
|
|
803
800
|
/** Package schema version. */
|
|
@@ -818,6 +815,8 @@ export interface PlayRunPackage {
|
|
|
818
815
|
overview?: RunLifecycleStatus;
|
|
819
816
|
/** Optional bounded live evidence from the existing run status projection. */
|
|
820
817
|
runStatus?: RunGetStatus;
|
|
818
|
+
/** Terminal scalar row outcomes shared with full status and watch snapshots. */
|
|
819
|
+
rowOutcomes?: PlayStatus['rowOutcomes'];
|
|
821
820
|
/** Run identity, status, timing, and dashboard metadata. */
|
|
822
821
|
run: {
|
|
823
822
|
id: string;
|
|
@@ -969,6 +968,8 @@ export interface PlayStatus {
|
|
|
969
968
|
failedRows: number;
|
|
970
969
|
totalRows: number;
|
|
971
970
|
hasRowFailures: boolean;
|
|
971
|
+
/** Terminal rows omitted from this run's latest view because a newer write won. */
|
|
972
|
+
supersededRows?: number;
|
|
972
973
|
};
|
|
973
974
|
/** Compact typed run package returned by current run status endpoints. */
|
|
974
975
|
package?: PlayRunPackage;
|
|
@@ -385,9 +385,24 @@ export type WorkerRuntimeApiContext = {
|
|
|
385
385
|
* gateway record that produced it.
|
|
386
386
|
*/
|
|
387
387
|
onResponseMeta?: (meta: RuntimeApiResponseMeta) => void;
|
|
388
|
+
/**
|
|
389
|
+
* Observe each request attempt as it is sent. `onResponseMeta` only fires
|
|
390
|
+
* for a successful response, so an attempt that is aborted or times out
|
|
391
|
+
* names nothing there; this carries the per-attempt id that the request
|
|
392
|
+
* already sends in its transport-attempt header, which a receiver can log.
|
|
393
|
+
* Diagnostic only: log it, never persist it on a run, status, or receipt
|
|
394
|
+
* document.
|
|
395
|
+
*/
|
|
396
|
+
onRequestAttempt?: (attempt: RuntimeApiRequestAttempt) => void;
|
|
388
397
|
signal?: AbortSignal;
|
|
389
398
|
};
|
|
390
399
|
|
|
400
|
+
export type RuntimeApiRequestAttempt = {
|
|
401
|
+
action: RuntimeApiRequest['action'];
|
|
402
|
+
/** The value of this attempt's transport-attempt request header. */
|
|
403
|
+
transportAttemptId: string;
|
|
404
|
+
};
|
|
405
|
+
|
|
391
406
|
/**
|
|
392
407
|
* The receipt gateway's own account of a request, from its `Server-Timing`
|
|
393
408
|
* response header. Its `runtime.gateway.action.finished` durationMs starts
|
|
@@ -423,6 +438,19 @@ export type RuntimeApiResponseMeta = {
|
|
|
423
438
|
roundTripMs?: number | null;
|
|
424
439
|
/** Absent when the gateway sent no `Server-Timing` header. */
|
|
425
440
|
serverTiming?: RuntimeGatewayServerTiming | null;
|
|
441
|
+
/**
|
|
442
|
+
* The hosting platform's id for the responding request (`x-vercel-id`), so a
|
|
443
|
+
* slow app-runtime hop can be matched to its platform request log. Null when
|
|
444
|
+
* the receiver is not fronted by one. Diagnostic only: log it, never persist
|
|
445
|
+
* it on a run, status, or receipt document.
|
|
446
|
+
*/
|
|
447
|
+
platformRequestId?: string | null;
|
|
448
|
+
/**
|
|
449
|
+
* The raw `Server-Timing` header, truncated. App routes name their own
|
|
450
|
+
* entries, which `serverTiming` (the gateway's schema) does not parse.
|
|
451
|
+
* Diagnostic only, under the same rule as `platformRequestId`.
|
|
452
|
+
*/
|
|
453
|
+
serverTimingHeader?: string | null;
|
|
426
454
|
/**
|
|
427
455
|
* Serialized JSON bytes of the request body, before compression. Set on
|
|
428
456
|
* every request, so `wire / raw` across a run is the compression ratio the
|
|
@@ -447,6 +475,27 @@ export type RuntimeApiResponseMeta = {
|
|
|
447
475
|
requestBodyPackMs?: number | null;
|
|
448
476
|
};
|
|
449
477
|
|
|
478
|
+
const RUNTIME_API_DIAGNOSTIC_HEADER_MAX_CHARS = 256;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Read one response header for a log line: trimmed, bounded, and total. A
|
|
482
|
+
* receiver controls this value, so it is capped before it reaches a record.
|
|
483
|
+
*/
|
|
484
|
+
export function readRuntimeApiDiagnosticHeader(
|
|
485
|
+
headers: Pick<Headers, 'get'> | null | undefined,
|
|
486
|
+
name: string,
|
|
487
|
+
): string | null {
|
|
488
|
+
try {
|
|
489
|
+
const value = headers?.get(name)?.trim();
|
|
490
|
+
return value
|
|
491
|
+
? value.slice(0, RUNTIME_API_DIAGNOSTIC_HEADER_MAX_CHARS)
|
|
492
|
+
: null;
|
|
493
|
+
} catch {
|
|
494
|
+
// Observation must never affect durable delivery.
|
|
495
|
+
return null;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
450
499
|
const RUNTIME_GATEWAY_AUTH_SESSION_VALUES = new Set([
|
|
451
500
|
'hit',
|
|
452
501
|
'miss',
|
|
@@ -1519,6 +1568,13 @@ async function postAppRuntimeApi<TResponse>(
|
|
|
1519
1568
|
// would show up as network cost that no round trip explains.
|
|
1520
1569
|
const attemptStartedAt = Date.now();
|
|
1521
1570
|
const transportAttemptId = randomUUID();
|
|
1571
|
+
if (context.onRequestAttempt) {
|
|
1572
|
+
try {
|
|
1573
|
+
context.onRequestAttempt({ action: body.action, transportAttemptId });
|
|
1574
|
+
} catch {
|
|
1575
|
+
// Observation must never affect durable delivery.
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1522
1578
|
const requestSignal = context.signal
|
|
1523
1579
|
? AbortSignal.any([context.signal, AbortSignal.timeout(requestTimeoutMs)])
|
|
1524
1580
|
: AbortSignal.timeout(requestTimeoutMs);
|
|
@@ -1680,6 +1736,14 @@ async function postAppRuntimeApi<TResponse>(
|
|
|
1680
1736
|
serverTiming: parseRuntimeGatewayServerTiming(
|
|
1681
1737
|
response.headers.get('server-timing'),
|
|
1682
1738
|
),
|
|
1739
|
+
platformRequestId: readRuntimeApiDiagnosticHeader(
|
|
1740
|
+
response.headers,
|
|
1741
|
+
'x-vercel-id',
|
|
1742
|
+
),
|
|
1743
|
+
serverTimingHeader: readRuntimeApiDiagnosticHeader(
|
|
1744
|
+
response.headers,
|
|
1745
|
+
'server-timing',
|
|
1746
|
+
),
|
|
1683
1747
|
requestBodyRawBytes: wireBody.rawBytes,
|
|
1684
1748
|
requestBodyWireBytes: wireBody.wireBytes,
|
|
1685
1749
|
requestBodySerializeMs,
|