deepline 0.3.403 → 0.3.404
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/scheduler-backends/postgres.ts +114 -50
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +6 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +379 -133
- package/dist/cli/{auth-AHF355KV.mjs → auth-DVJWHHC3.mjs} +4 -4
- package/dist/cli/auth-UIC53AE2.js +40 -0
- package/dist/cli/{billing-LSZECOCV.mjs → billing-7UDFOLCT.mjs} +4 -4
- package/dist/cli/{billing-5L5X2OAC.js → billing-MHS6WS77.js} +73 -73
- package/dist/cli/{chunk-MJ4OWXFM.js → chunk-7CFSSEN3.js} +44 -44
- package/dist/cli/{chunk-QN55SQYI.mjs → chunk-ANL3NJV5.mjs} +5 -5
- package/dist/cli/{chunk-5SGQF4QF.js → chunk-AYUR2RZ6.js} +8 -8
- package/dist/cli/{chunk-57GMG2DV.js → chunk-B2BO6G7L.js} +26 -26
- package/dist/cli/{chunk-DJSPH5T2.js → chunk-CBMYUXAT.js} +6 -6
- package/dist/cli/{chunk-BYBRENKM.mjs → chunk-DSXMTZ64.mjs} +1 -1
- package/dist/cli/{chunk-CC3QT7Q5.mjs → chunk-EDSBH6W7.mjs} +2 -2
- package/dist/cli/{chunk-GJECLPJP.mjs → chunk-FF2H4YLR.mjs} +4 -4
- package/dist/cli/{chunk-V4PLPRWQ.js → chunk-GPWTKORH.js} +4 -4
- package/dist/cli/{chunk-RXVJYS76.mjs → chunk-JJZOGHEF.mjs} +1 -1
- package/dist/cli/{chunk-MQWZYCQJ.mjs → chunk-KTWTQPYM.mjs} +2 -2
- package/dist/cli/{chunk-SGPGIC3M.js → chunk-L3JGXPGB.js} +50 -50
- package/dist/cli/{chunk-HPEIY4UR.mjs → chunk-M55M5LDV.mjs} +3 -3
- package/dist/cli/{chunk-JHNYOTWR.mjs → chunk-NRI4TJVF.mjs} +1 -1
- package/dist/cli/{chunk-4BWZA57I.js → chunk-ODKHUBU3.js} +6 -6
- package/dist/cli/{chunk-VNO3VAJT.mjs → chunk-OHGXSFDQ.mjs} +1 -1
- package/dist/cli/{chunk-VYDYDELF.js → chunk-OPGILU75.js} +65 -65
- package/dist/cli/{chunk-B4Y2CZKS.mjs → chunk-TFIB4VNU.mjs} +2 -2
- package/dist/cli/{chunk-77FZLY5L.js → chunk-URQAM7RR.js} +1 -1
- package/dist/cli/{chunk-JZ7TJL7G.js → chunk-V5DPHNTE.js} +2 -2
- package/dist/cli/{chunk-KTBMDDEQ.mjs → chunk-VPCIT5N6.mjs} +3 -3
- package/dist/cli/{chunk-FQL75GML.js → chunk-W3SACRLJ.js} +8 -8
- package/dist/cli/{chunk-C27DGNII.mjs → chunk-XKVJZ5JC.mjs} +1 -1
- package/dist/cli/{chunk-J3OZIYU4.js → chunk-Y5QWK7SS.js} +15 -15
- package/dist/cli/{csv-IO2BKRNX.js → csv-7BXOAC3V.js} +12 -12
- package/dist/cli/{csv-J6ZPUWE4.mjs → csv-TG7SSGXW.mjs} +3 -3
- package/dist/cli/{db-ZVRBVSPU.js → db-BQCWAL3D.js} +25 -25
- package/dist/cli/{db-QICV6JWY.mjs → db-GBVIPT7D.mjs} +4 -4
- package/dist/cli/{describe-WX6VWGH6.js → describe-3ROS6TC6.js} +10 -10
- package/dist/cli/{describe-YA35XS55.mjs → describe-6LP2CWEF.mjs} +6 -6
- package/dist/cli/{executions-X3PDLFKO.mjs → executions-4TJOBZOQ.mjs} +4 -4
- package/dist/cli/{executions-YQAUBJLS.js → executions-KCKC2KKP.js} +6 -6
- package/dist/cli/{feedback-M2WMOY5B.js → feedback-7T77UCIV.js} +7 -7
- package/dist/cli/{feedback-HSERSHDV.mjs → feedback-CGJNFV3G.mjs} +3 -3
- package/dist/cli/{git-3JMX455D.mjs → git-5E3HETBN.mjs} +4 -4
- package/dist/cli/git-DRUSBG74.js +24 -0
- package/dist/cli/index.js +89 -89
- package/dist/cli/index.mjs +32 -32
- package/dist/cli/{legacy-noops-OKC6VDD3.mjs → legacy-noops-4FGVQLLD.mjs} +4 -4
- package/dist/cli/{legacy-noops-EMUCJ5KW.js → legacy-noops-X5MCVE34.js} +7 -7
- package/dist/cli/{monitors-M6DU2JXC.js → monitors-OTAQWJH5.js} +84 -84
- package/dist/cli/{monitors-RH3FIA63.mjs → monitors-QRZEIITA.mjs} +4 -4
- package/dist/cli/{org-KK3C5J6E.mjs → org-A6KANSFR.mjs} +4 -4
- package/dist/cli/{org-BZDZO32O.js → org-B3JK2BND.js} +64 -64
- package/dist/cli/{play-QXBNDI6C.mjs → play-CN6DOFMT.mjs} +7 -7
- package/dist/cli/{play-ZKYHO2KC.js → play-HLDZVD47.js} +231 -231
- package/dist/cli/{providers-JRN5FNXI.mjs → providers-EVPLX6BG.mjs} +4 -4
- package/dist/cli/{providers-VCT7HFYW.js → providers-XGCTTZ7T.js} +7 -7
- package/dist/cli/{quickstart-Y33XAQDY.mjs → quickstart-HXORYMNO.mjs} +3 -3
- package/dist/cli/{quickstart-X2IC2U6U.js → quickstart-LTH2MZNQ.js} +5 -5
- package/dist/cli/search-MH6VAITK.js +30 -0
- package/dist/cli/{search-R443WBN7.mjs → search-S4JOGJMH.mjs} +5 -5
- package/dist/cli/{secrets-U6V4M7R3.js → secrets-JV3TPKE6.js} +13 -13
- package/dist/cli/{secrets-EUKR5NG2.mjs → secrets-VNHUBHLN.mjs} +4 -4
- package/dist/cli/{sessions-RZVHJSVB.mjs → sessions-CDBTN53U.mjs} +4 -4
- package/dist/cli/{sessions-IPKYJT4M.js → sessions-QYYFCXGY.js} +5 -5
- package/dist/cli/{settings-FKU7KJ24.mjs → settings-I6LQQCMK.mjs} +7 -7
- package/dist/cli/{settings-W4YFY5JJ.js → settings-YYZ2IHFU.js} +74 -74
- package/dist/cli/{setup-BEIN6536.js → setup-IZQI5RZA.js} +41 -41
- package/dist/cli/{setup-6WIECL4V.mjs → setup-X24RP6O7.mjs} +6 -6
- package/dist/cli/skills-U4MIVNPW.js +29 -0
- package/dist/cli/{skills-CV72BOP7.mjs → skills-UYIFSY2Y.mjs} +4 -4
- package/dist/cli/{tools-2ADAYBNB.js → tools-BLP2VRAN.js} +7 -7
- package/dist/cli/{tools-2SH4RIFD.mjs → tools-IR5JEQF6.mjs} +6 -6
- package/dist/cli/update-EIYE45GT.js +29 -0
- package/dist/cli/{update-YTR4JUPG.mjs → update-MXFLD3ZQ.mjs} +6 -6
- package/dist/cli/{workflow-446CNNRV.js → workflow-CZ6CXXOL.js} +15 -15
- package/dist/cli/{workflow-BBSL2QKK.mjs → workflow-QGY342J5.mjs} +5 -5
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +70 -70
- 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-O7A7JS2M.js +0 -40
- package/dist/cli/git-IUDHAE5O.js +0 -24
- package/dist/cli/search-7257KVSQ.js +0 -30
- package/dist/cli/skills-A7ATFQEL.js +0 -29
- package/dist/cli/update-AUYYCJUT.js +0 -29
|
@@ -202,7 +202,7 @@ export const SDK_RELEASE = {
|
|
|
202
202
|
// getters keep their established compatibility behavior.
|
|
203
203
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
204
204
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
205
|
-
version: '0.3.
|
|
205
|
+
version: '0.3.404',
|
|
206
206
|
updateSummary:
|
|
207
207
|
'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.',
|
|
208
208
|
packageCapabilities: {
|
|
@@ -20574,9 +20574,7 @@ export function postgresSchedulerCancellationOutboxLease(runId: string): {
|
|
|
20574
20574
|
|
|
20575
20575
|
export type RunLedgerOutboxDispatchInput = {
|
|
20576
20576
|
/** Dedicated bounded checkout for indexing; claims/ACKs use withClient. */
|
|
20577
|
-
withObservabilityClient?:
|
|
20578
|
-
operation: (client: PostgresSchedulerQueryClient) => Promise<T>,
|
|
20579
|
-
) => Promise<T>;
|
|
20577
|
+
withObservabilityClient?: RunLedgerOutboxWithClient;
|
|
20580
20578
|
|
|
20581
20579
|
/** Only the existing background projector claims the independent search prefix. */
|
|
20582
20580
|
searchOnly?: boolean;
|
|
@@ -21435,6 +21433,29 @@ async function dispatchRunLedgerOutboxBatchWithScope(
|
|
|
21435
21433
|
let appendResponse:
|
|
21436
21434
|
| (RunLedgerDispatchResponseTrace & { roundTripMs: number | null })
|
|
21437
21435
|
| null = null;
|
|
21436
|
+
// Checkout spans include retries and overlap query/commit spans. Acquisition
|
|
21437
|
+
// includes earlier callback attempts: it is neither CPU nor pure pool wait.
|
|
21438
|
+
// These observations must not be summed. Null means the stage was not reached.
|
|
21439
|
+
const searchPhaseTimingsMs = {
|
|
21440
|
+
renewal: null as number | null,
|
|
21441
|
+
materializeCheckout: null as number | null,
|
|
21442
|
+
materializeAcquireAndRetry: null as number | null,
|
|
21443
|
+
materializeQuery: null as number | null,
|
|
21444
|
+
materializeCommit: null as number | null,
|
|
21445
|
+
acknowledge: null as number | null,
|
|
21446
|
+
};
|
|
21447
|
+
const observeSearchPhase = async <T>(
|
|
21448
|
+
phase: keyof typeof searchPhaseTimingsMs,
|
|
21449
|
+
operation: () => Promise<T>,
|
|
21450
|
+
): Promise<T> => {
|
|
21451
|
+
const startedAtMs = performance.now();
|
|
21452
|
+
try {
|
|
21453
|
+
return await operation();
|
|
21454
|
+
} finally {
|
|
21455
|
+
searchPhaseTimingsMs[phase] =
|
|
21456
|
+
(searchPhaseTimingsMs[phase] ?? 0) + performance.now() - startedAtMs;
|
|
21457
|
+
}
|
|
21458
|
+
};
|
|
21438
21459
|
const callerOnResponseMeta = input.runtimeApi?.onResponseMeta;
|
|
21439
21460
|
// The last append attempt sent, named even when it never gets a response
|
|
21440
21461
|
// (an append aborted at the caller's deadline has no response to read).
|
|
@@ -21481,35 +21502,50 @@ async function dispatchRunLedgerOutboxBatchWithScope(
|
|
|
21481
21502
|
) === true,
|
|
21482
21503
|
);
|
|
21483
21504
|
const materialize = async (prefix: typeof deferredEvents) => {
|
|
21484
|
-
await
|
|
21485
|
-
|
|
21486
|
-
client
|
|
21505
|
+
await observeSearchPhase('renewal', () =>
|
|
21506
|
+
withClient(
|
|
21507
|
+
(client) =>
|
|
21508
|
+
renewPostgresRunLedgerDelivery(
|
|
21509
|
+
client,
|
|
21510
|
+
{
|
|
21511
|
+
eventIds: events.map((event) => event.eventId),
|
|
21512
|
+
leaseOwner,
|
|
21513
|
+
leaseSeconds: 120,
|
|
21514
|
+
},
|
|
21515
|
+
options,
|
|
21516
|
+
),
|
|
21487
21517
|
{
|
|
21488
|
-
|
|
21489
|
-
|
|
21490
|
-
leaseSeconds: 120,
|
|
21518
|
+
runId: events[0]!.runId,
|
|
21519
|
+
phase: 'run_ledger_outbox_search_renew',
|
|
21491
21520
|
},
|
|
21492
|
-
options,
|
|
21493
21521
|
),
|
|
21494
21522
|
);
|
|
21495
|
-
|
|
21496
|
-
|
|
21497
|
-
|
|
21498
|
-
|
|
21499
|
-
|
|
21500
|
-
|
|
21501
|
-
|
|
21502
|
-
|
|
21503
|
-
|
|
21504
|
-
|
|
21505
|
-
|
|
21506
|
-
|
|
21507
|
-
|
|
21508
|
-
|
|
21509
|
-
|
|
21510
|
-
|
|
21511
|
-
|
|
21512
|
-
|
|
21523
|
+
const checkoutStartedAtMs = performance.now();
|
|
21524
|
+
let materializeEnteredAtMs: number | null = null;
|
|
21525
|
+
try {
|
|
21526
|
+
await (input.withObservabilityClient ?? withClient)(
|
|
21527
|
+
async (client) => {
|
|
21528
|
+
materializeEnteredAtMs = performance.now();
|
|
21529
|
+
await client.query('BEGIN');
|
|
21530
|
+
try {
|
|
21531
|
+
await client.query(
|
|
21532
|
+
"SELECT set_config('statement_timeout', $1, true)",
|
|
21533
|
+
[
|
|
21534
|
+
`${Math.min(60_000, RUNTIME_RELIABILITY_POLICY.schedulerDatabase.queryTimeoutMs - 1_000)}ms`,
|
|
21535
|
+
],
|
|
21536
|
+
);
|
|
21537
|
+
// The recursive dependency evaluates this already-bounded causal
|
|
21538
|
+
// prefix in order, in one database round trip. Its eight-fact
|
|
21539
|
+
// contract is unchanged. The timeout bounds the entire statement
|
|
21540
|
+
// below the lease; the installed function still fences every fact.
|
|
21541
|
+
const result = await observeSearchPhase(
|
|
21542
|
+
'materializeQuery',
|
|
21543
|
+
() =>
|
|
21544
|
+
client.query<{
|
|
21545
|
+
ordinal: number;
|
|
21546
|
+
payload: unknown;
|
|
21547
|
+
}>(
|
|
21548
|
+
`WITH RECURSIVE projected(ordinal, payload) AS (
|
|
21513
21549
|
SELECT 1, ${quoteIdent(schemaName(options))}.materialize_runtime_outbox_event(($1::text[])[1], $2)
|
|
21514
21550
|
UNION ALL
|
|
21515
21551
|
SELECT prior.ordinal + 1,
|
|
@@ -21518,18 +21554,33 @@ async function dispatchRunLedgerOutboxBatchWithScope(
|
|
|
21518
21554
|
WHERE prior.ordinal < cardinality($1::text[])
|
|
21519
21555
|
)
|
|
21520
21556
|
SELECT ordinal, payload FROM projected ORDER BY ordinal`,
|
|
21521
|
-
|
|
21522
|
-
|
|
21523
|
-
|
|
21524
|
-
|
|
21525
|
-
|
|
21526
|
-
|
|
21527
|
-
|
|
21528
|
-
|
|
21529
|
-
|
|
21530
|
-
|
|
21531
|
-
|
|
21532
|
-
|
|
21557
|
+
[prefix.map((event) => event.eventId), leaseOwner],
|
|
21558
|
+
),
|
|
21559
|
+
);
|
|
21560
|
+
await observeSearchPhase('materializeCommit', () =>
|
|
21561
|
+
client.query('COMMIT'),
|
|
21562
|
+
);
|
|
21563
|
+
for (const row of result.rows)
|
|
21564
|
+
prefix[row.ordinal - 1]!.payload = row.payload;
|
|
21565
|
+
} catch (error) {
|
|
21566
|
+
// A query timeout may already have closed this connection. Keep
|
|
21567
|
+
// the delivery failure for retry classification and diagnostics.
|
|
21568
|
+
await client.query('ROLLBACK').catch(() => undefined);
|
|
21569
|
+
throw error;
|
|
21570
|
+
}
|
|
21571
|
+
},
|
|
21572
|
+
{ runId: events[0]!.runId, phase: 'run_ledger_outbox_materialize' },
|
|
21573
|
+
);
|
|
21574
|
+
} finally {
|
|
21575
|
+
searchPhaseTimingsMs.materializeCheckout =
|
|
21576
|
+
(searchPhaseTimingsMs.materializeCheckout ?? 0) +
|
|
21577
|
+
performance.now() -
|
|
21578
|
+
checkoutStartedAtMs;
|
|
21579
|
+
searchPhaseTimingsMs.materializeAcquireAndRetry =
|
|
21580
|
+
(searchPhaseTimingsMs.materializeAcquireAndRetry ?? 0) +
|
|
21581
|
+
(materializeEnteredAtMs ?? performance.now()) -
|
|
21582
|
+
checkoutStartedAtMs;
|
|
21583
|
+
}
|
|
21533
21584
|
};
|
|
21534
21585
|
try {
|
|
21535
21586
|
await materialize(deferredEvents);
|
|
@@ -21591,11 +21642,18 @@ async function dispatchRunLedgerOutboxBatchWithScope(
|
|
|
21591
21642
|
)
|
|
21592
21643
|
)
|
|
21593
21644
|
throw new Error('Search lease includes a lifecycle fact.');
|
|
21594
|
-
const delivered = await
|
|
21595
|
-
|
|
21596
|
-
client
|
|
21597
|
-
|
|
21598
|
-
|
|
21645
|
+
const delivered = await observeSearchPhase('acknowledge', () =>
|
|
21646
|
+
withClient(
|
|
21647
|
+
(client) =>
|
|
21648
|
+
markPostgresSchedulerOutboxDeliveredRows(
|
|
21649
|
+
client,
|
|
21650
|
+
events.map((event) => event.eventId),
|
|
21651
|
+
{ ...options, leaseOwner },
|
|
21652
|
+
),
|
|
21653
|
+
{
|
|
21654
|
+
runId: events[0]!.runId,
|
|
21655
|
+
phase: 'run_ledger_outbox_search_acknowledge',
|
|
21656
|
+
},
|
|
21599
21657
|
),
|
|
21600
21658
|
);
|
|
21601
21659
|
if (delivered.length !== events.length)
|
|
@@ -22084,11 +22142,14 @@ async function dispatchRunLedgerOutboxBatchWithScope(
|
|
|
22084
22142
|
input.signal?.aborted ||
|
|
22085
22143
|
claimed.transportOwnershipUnconfirmed ||
|
|
22086
22144
|
(error instanceof RunLedgerProjectionLeaseLostError &&
|
|
22087
|
-
error.reason === 'head_lease_owner_mismatch'
|
|
22145
|
+
(error.reason === 'head_lease_owner_mismatch' ||
|
|
22146
|
+
(input.searchOnly === true &&
|
|
22147
|
+
error.reason === 'delivery_lease_not_current')))
|
|
22088
22148
|
) {
|
|
22089
|
-
// A skipped busy Run during prefix widening or a transferred
|
|
22090
|
-
// handoff, not a failed delivery. The owner fence also
|
|
22091
|
-
// cancellation lease. Caller deadline expiry uses the
|
|
22149
|
+
// A skipped busy Run during prefix widening or a transferred/settled
|
|
22150
|
+
// lease is a handoff, not a failed delivery. The owner fence also
|
|
22151
|
+
// protects a newer cancellation lease. Caller deadline expiry uses the
|
|
22152
|
+
// same handoff.
|
|
22092
22153
|
// Release the lease (fenced to this owner) without charging a
|
|
22093
22154
|
// projection attempt or scheduling backoff, and wake the durable
|
|
22094
22155
|
// projector. If the append already reached the ledger, the projector's
|
|
@@ -22135,7 +22196,9 @@ async function dispatchRunLedgerOutboxBatchWithScope(
|
|
|
22135
22196
|
// even when this owner's fenced release cannot update that row.
|
|
22136
22197
|
const handedOff =
|
|
22137
22198
|
error instanceof RunLedgerProjectionLeaseLostError &&
|
|
22138
|
-
error.reason === 'head_lease_owner_mismatch'
|
|
22199
|
+
(error.reason === 'head_lease_owner_mismatch' ||
|
|
22200
|
+
(input.searchOnly === true &&
|
|
22201
|
+
error.reason === 'delivery_lease_not_current'))
|
|
22139
22202
|
? eventIds
|
|
22140
22203
|
: released;
|
|
22141
22204
|
return withTransportDelivered({
|
|
@@ -22319,6 +22382,7 @@ async function dispatchRunLedgerOutboxBatchWithScope(
|
|
|
22319
22382
|
continuationMs:
|
|
22320
22383
|
acknowledgedAtMs === null ? null : settledAtMs - acknowledgedAtMs,
|
|
22321
22384
|
durationMs: settledAtMs - dispatchStartedAtMs,
|
|
22385
|
+
...(input.searchOnly ? { searchPhaseTimingsMs } : {}),
|
|
22322
22386
|
// Which platform requests served the two app hops, so a slow
|
|
22323
22387
|
// authority or append stage can be found in the app's request log.
|
|
22324
22388
|
...runLedgerSlowDeliveryResponseFields(
|
|
@@ -1042,8 +1042,12 @@ export function startRunLedgerOutboxRecoveryController(input: {
|
|
|
1042
1042
|
materializeObservability: true,
|
|
1043
1043
|
searchOnly,
|
|
1044
1044
|
...(runId === undefined ? {} : { runId }),
|
|
1045
|
-
withObservabilityClient: (operation) =>
|
|
1046
|
-
withRuntimeSchedulerClient(
|
|
1045
|
+
withObservabilityClient: (operation, trace) =>
|
|
1046
|
+
withRuntimeSchedulerClient(
|
|
1047
|
+
observabilityPoolOptions,
|
|
1048
|
+
operation,
|
|
1049
|
+
trace,
|
|
1050
|
+
),
|
|
1047
1051
|
limit: 8,
|
|
1048
1052
|
headPriority,
|
|
1049
1053
|
// The lease holder delivers a run's terminal committed during its
|