deepline 0.3.548 → 0.3.549
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-core.ts +93 -11
- package/dist/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/plays/check-local-play-graph.ts +3 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +11 -0
- package/dist/bundling-sources/shared_libs/monitors/action-actor.ts +203 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +20 -0
- package/dist/bundling-sources/shared_libs/monitors/package.json +2 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +33 -0
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +19 -3
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-failure-codes.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +36 -6
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +93 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +9 -1
- package/dist/bundling-sources/shared_libs/plays/play-check-compact.ts +636 -0
- package/dist/cli/auth-UVEZIP3H.js +43 -0
- package/dist/cli/{auth-YOOVLLUL.mjs → auth-YENF525S.mjs} +5 -5
- package/dist/cli/{billing-HETIOUD6.js → billing-52GAHIDZ.js} +95 -95
- package/dist/cli/{billing-2NCNX6L2.mjs → billing-XPXB27G7.mjs} +9 -9
- package/dist/cli/{chunk-IIWXBRDK.js → chunk-3IUQNHIG.js} +3 -3
- package/dist/cli/{chunk-HIMZ57QD.mjs → chunk-4AUV5QJF.mjs} +5 -5
- package/dist/cli/{chunk-PVE3A2BO.js → chunk-4DJNXAPH.js} +75 -37
- package/dist/cli/{chunk-WIHQAZPV.js → chunk-4HSSPT73.js} +6 -6
- package/dist/cli/{chunk-OGDQFVCP.mjs → chunk-4QUWXUUJ.mjs} +35 -6
- package/dist/cli/{chunk-CXZLHBNK.js → chunk-5622PYAP.js} +4 -4
- package/dist/cli/{chunk-F4ON5COB.mjs → chunk-5CXE22BI.mjs} +2 -2
- package/dist/cli/{chunk-HU3DDLGD.mjs → chunk-5T37KQNG.mjs} +5 -5
- package/dist/cli/{chunk-T3RDWG5J.js → chunk-7FY7AHR6.js} +2 -2
- package/dist/cli/{chunk-PVQCX6KQ.js → chunk-ADWMIZCB.js} +67 -9
- package/dist/cli/{chunk-OQCYSLML.mjs → chunk-ANOTB6V3.mjs} +4 -4
- package/dist/cli/{chunk-XKEBQVCP.mjs → chunk-AZSVDAXT.mjs} +5 -5
- package/dist/cli/{chunk-NFMX7BRF.mjs → chunk-BDOLPGHD.mjs} +2 -2
- package/dist/cli/{chunk-VK2GSTRN.js → chunk-BDUZJX4V.js} +26 -26
- package/dist/cli/{chunk-7H6TQ6W2.js → chunk-BPBPY42E.js} +5 -5
- package/dist/cli/{chunk-3QRU6RY7.mjs → chunk-CX4KGWCH.mjs} +3 -3
- package/dist/cli/{chunk-HTZIJORU.js → chunk-CXFOYRI4.js} +99 -99
- package/dist/cli/{chunk-U35ZLVBA.mjs → chunk-DCTEH6N5.mjs} +2 -2
- package/dist/cli/{chunk-LAVPP6WD.js → chunk-DIRLEJJX.js} +41 -41
- package/dist/cli/{chunk-7JIOJLTS.js → chunk-ETLEPHLT.js} +7 -7
- package/dist/cli/{chunk-6GIZNOXQ.js → chunk-HPSCRVTM.js} +12 -12
- package/dist/cli/{chunk-BDBEEV6X.js → chunk-HWCIU3KY.js} +22 -22
- package/dist/cli/{chunk-TKGFHRHE.mjs → chunk-J6FINSAK.mjs} +49 -11
- package/dist/cli/{chunk-JQWX377P.js → chunk-KBMBNUUW.js} +5 -5
- package/dist/cli/{chunk-WI4MCR7M.js → chunk-KTZ3VU6S.js} +5 -5
- package/dist/cli/{chunk-7AJ5V3BK.mjs → chunk-L6UMWAAY.mjs} +1 -1
- package/dist/cli/{chunk-FUUYWEF4.mjs → chunk-LMFTDDAM.mjs} +2 -2
- package/dist/cli/{chunk-MWQ4WWZF.mjs → chunk-LP2VNGG3.mjs} +2 -2
- package/dist/cli/{chunk-RMCCB3XY.mjs → chunk-MAE3AKDR.mjs} +67 -9
- package/dist/cli/{chunk-BWJZ4NQJ.js → chunk-NVALIJQS.js} +15 -15
- package/dist/cli/{chunk-5XFJBIQT.js → chunk-OWX4AAJ4.js} +13 -13
- package/dist/cli/{chunk-FMQA7UZZ.mjs → chunk-PLAJ6HPD.mjs} +2 -2
- package/dist/cli/{chunk-GCEGQ7TQ.mjs → chunk-PLJCY35C.mjs} +1 -1
- package/dist/cli/{chunk-ATTURFOV.mjs → chunk-PQX4WTBY.mjs} +1 -1
- package/dist/cli/{chunk-I2JIWKCQ.js → chunk-QGKX2WBZ.js} +52 -23
- package/dist/cli/{chunk-UBQQR56I.mjs → chunk-QIZBUY2N.mjs} +4 -4
- package/dist/cli/{chunk-5XXPP3PR.js → chunk-QUELC3B2.js} +10 -10
- package/dist/cli/{chunk-HDLMX7SG.js → chunk-RMKRZJOS.js} +16 -16
- package/dist/cli/{chunk-7UJZWI5Z.js → chunk-SVNAP2QI.js} +9 -9
- package/dist/cli/{chunk-GUIYFOG2.js → chunk-TYOAOSDL.js} +3 -3
- package/dist/cli/{chunk-QZ74ZC55.mjs → chunk-U6KHWIAO.mjs} +1 -1
- package/dist/cli/{chunk-MQSKSISW.mjs → chunk-UGVXHT62.mjs} +1 -1
- package/dist/cli/{chunk-VSACOMIA.mjs → chunk-V5WPYOAE.mjs} +5 -5
- package/dist/cli/{chunk-2OG2KBYJ.js → chunk-V7WMNX4R.js} +1 -1
- package/dist/cli/{chunk-M2OZORIH.js → chunk-VLAJGF27.js} +2 -2
- package/dist/cli/{chunk-QQBRXMZM.mjs → chunk-W77LBYF3.mjs} +11 -11
- package/dist/cli/{chunk-53QLWPZK.mjs → chunk-X4RGDE4J.mjs} +1 -1
- package/dist/cli/{chunk-5OJOFUMO.js → chunk-XPYCNA43.js} +44 -44
- package/dist/cli/{chunk-XU3D2KFR.mjs → chunk-XS72HELO.mjs} +1 -1
- package/dist/cli/{chunk-AUYBBFPT.js → chunk-Y5MDCPWA.js} +53 -53
- package/dist/cli/{chunk-IQBXX54G.mjs → chunk-Y5SKYU5X.mjs} +3 -3
- package/dist/cli/{chunk-64BFUBXX.mjs → chunk-YX7BX2FA.mjs} +2 -2
- package/dist/cli/{chunk-U7HJXE6Y.js → chunk-YZTS3XA7.js} +2 -2
- package/dist/cli/{chunk-WVZF4DU7.mjs → chunk-Z3DKJOUL.mjs} +1 -1
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/concurrent-runs-help-74AFW3BD.js +21 -0
- package/dist/cli/{concurrent-runs-help-FDCCZ45D.mjs → concurrent-runs-help-OYSLW55L.mjs} +6 -6
- package/dist/cli/{csv-OCEQWZO3.js → csv-FRO3UFMQ.js} +13 -13
- package/dist/cli/{csv-GJYLQ52D.mjs → csv-TFCTUYF2.mjs} +4 -4
- package/dist/cli/{db-5MA2UUHQ.mjs → db-NHVZBT2H.mjs} +6 -6
- package/dist/cli/{db-G5QGXFAX.js → db-SNFNRVZJ.js} +27 -27
- package/dist/cli/describe-2JCOC4AK.js +50 -0
- package/dist/cli/{describe-4DOJ4DHA.mjs → describe-OVFPRJJL.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-C7SMBHHB.mjs → executions-HWMH2LTC.mjs} +6 -6
- package/dist/cli/{executions-IYEVUPJI.js → executions-RZLKKPZV.js} +8 -8
- package/dist/cli/{feedback-GYAF46GA.js → feedback-3D5OROCI.js} +14 -14
- package/dist/cli/{feedback-XUU2UKM6.mjs → feedback-WD4JVF77.mjs} +6 -6
- package/dist/cli/git-GCCPCUWJ.js +25 -0
- package/dist/cli/{git-WVCMK5AH.mjs → git-RYUKBCUZ.mjs} +5 -5
- package/dist/cli/index.js +146 -146
- package/dist/cli/index.mjs +45 -45
- package/dist/cli/{integrations-FXADGAX2.mjs → integrations-KJPFCEXL.mjs} +7 -7
- package/dist/cli/{integrations-YYBJJFVX.js → integrations-Y7OK23DW.js} +15 -15
- package/dist/cli/{legacy-noops-LJY7LDUE.mjs → legacy-noops-2PU2ZVEP.mjs} +6 -6
- package/dist/cli/{legacy-noops-REZCYES2.js → legacy-noops-G7ZY7K3K.js} +9 -9
- package/dist/cli/{mcp-XSB3ZJFR.mjs → mcp-D7F2RSOI.mjs} +4 -4
- package/dist/cli/{mcp-L5PURE5S.js → mcp-GILBYX72.js} +24 -24
- package/dist/cli/{monitors-UBPF2OLO.mjs → monitors-IK5KXY2H.mjs} +32 -8
- package/dist/cli/{monitors-I5EIHSGV.js → monitors-OXNHOT3C.js} +125 -101
- package/dist/cli/{org-PHHIN2ER.mjs → org-L5D7EISU.mjs} +6 -6
- package/dist/cli/{org-SGSTGGUD.js → org-OYM3UNTP.js} +88 -88
- package/dist/cli/{play-LEJNJLWY.mjs → play-PK6QO3WX.mjs} +837 -290
- package/dist/cli/{play-WQEKMANL.js → play-YK22QPYO.js} +1423 -876
- package/dist/cli/{providers-RSDXBXIS.js → providers-5CYP7P4N.js} +9 -9
- package/dist/cli/{providers-3W26ZDAV.mjs → providers-Z6MNJDCG.mjs} +6 -6
- package/dist/cli/{quickstart-LGJD2M36.mjs → quickstart-2I73XQXB.mjs} +4 -4
- package/dist/cli/{quickstart-U3QX4EMI.js → quickstart-2YKETYJY.js} +6 -6
- package/dist/cli/{run-YWZ3W5HK.mjs → run-KGQ6TUBB.mjs} +23 -23
- package/dist/cli/{run-F2UPZUJS.js → run-YVSEAVE5.js} +43 -43
- package/dist/cli/{search-O2OJH3PY.mjs → search-V2HPN6FU.mjs} +7 -7
- package/dist/cli/search-YG3UIZ6A.js +32 -0
- package/dist/cli/{search-output-W7OCBYBU.js → search-output-BUSANFRN.js} +6 -6
- package/dist/cli/{search-output-H5BF6SJ3.mjs → search-output-OCTOSDEO.mjs} +4 -4
- package/dist/cli/{secrets-BN4GYVRI.js → secrets-VDKTHCVB.js} +15 -15
- package/dist/cli/{secrets-65XCAA7U.mjs → secrets-WZGRBWI5.mjs} +6 -6
- package/dist/cli/{sessions-SVEVESCQ.mjs → sessions-5DTN55DZ.mjs} +6 -6
- package/dist/cli/sessions-NSPT6LHT.js +22 -0
- package/dist/cli/{settings-7YMDAFCN.js → settings-A7VSNOLI.js} +85 -85
- package/dist/cli/{settings-HAU2NP2H.mjs → settings-BK5FPQ3X.mjs} +12 -12
- package/dist/cli/{setup-5RXHZ6YI.mjs → setup-LLQVPZTP.mjs} +9 -9
- package/dist/cli/{setup-G37QXQGM.js → setup-NV27CYQ5.js} +49 -49
- package/dist/cli/{skills-Q7A3XFAU.mjs → skills-IV6HK4XA.mjs} +7 -7
- package/dist/cli/skills-UA5E4DA3.js +36 -0
- package/dist/cli/{tools-ZG4NYRGB.mjs → tools-4FKPCRD7.mjs} +17 -17
- package/dist/cli/tools-NJVPAG37.js +57 -0
- package/dist/cli/update-DKX27XZB.js +34 -0
- package/dist/cli/{update-2CMZTZCL.mjs → update-MH5M746E.mjs} +9 -9
- package/dist/cli/{views-XUMDMDIE.js → views-JW44TCGL.js} +21 -21
- package/dist/cli/{views-A6IIY4OQ.mjs → views-KXC4JDT7.mjs} +6 -6
- package/dist/cli/{workflow-4EEW6MCD.js → workflow-F5AHL2ET.js} +17 -17
- package/dist/cli/{workflow-74MYISHU.mjs → workflow-FI4DL7ZI.mjs} +7 -7
- package/dist/{client-D1uWA2Vc.d.mts → client-BEJqhQAj.d.mts} +1 -1
- package/dist/{client-Hz7SsBXs.d.ts → client-Ceo295L2.d.ts} +1 -1
- package/dist/{client-core-D3Ad7Flt.d.ts → client-core-BPYuWfBC.d.ts} +49 -1
- package/dist/{client-core-Db_e63Hb.d.mts → client-core-BqetRxx-.d.mts} +49 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +118 -116
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- 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/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-7UJFY5BY.js +0 -43
- package/dist/cli/concurrent-runs-help-A2IQVZRJ.js +0 -21
- package/dist/cli/describe-SD7DRTBW.js +0 -50
- package/dist/cli/git-7YYVMY6L.js +0 -25
- package/dist/cli/search-K6ANAXLF.js +0 -32
- package/dist/cli/sessions-M52QWLA6.js +0 -22
- package/dist/cli/skills-ZK4D5BJW.js +0 -36
- package/dist/cli/tools-DBZTLYFM.js +0 -57
- package/dist/cli/update-LC5HGEEH.js +0 -34
|
@@ -13846,6 +13846,99 @@ export type PostgresSchedulerComputeBillingJob = {
|
|
|
13846
13846
|
bootstrapSessionPending: boolean;
|
|
13847
13847
|
};
|
|
13848
13848
|
|
|
13849
|
+
/**
|
|
13850
|
+
* Whether the organization has a compute-billing obligation the scheduler has
|
|
13851
|
+
* not settled, quarantined ones included. This is the obligation's own truth:
|
|
13852
|
+
* its Convex session can already be finalized while a retry still owes a
|
|
13853
|
+
* late-resource adjustment, and every retry records into that session again.
|
|
13854
|
+
* `schema_absent` means the schema has no billing tables to read (dropped or
|
|
13855
|
+
* half rebuilt), which is not proof that nothing is owed. An unsettled answer
|
|
13856
|
+
* carries fixed counts so a caller can tell a quarantined or long-stuck
|
|
13857
|
+
* obligation, which only an operator recovers, from one still settling.
|
|
13858
|
+
* Read-only; uses the unsettled partial index and the runs primary key.
|
|
13859
|
+
*/
|
|
13860
|
+
export type PostgresSchedulerComputeBillingObligation =
|
|
13861
|
+
| { state: 'settled' }
|
|
13862
|
+
| { state: 'schema_absent' }
|
|
13863
|
+
| {
|
|
13864
|
+
state: 'unsettled';
|
|
13865
|
+
unsettledCount: number;
|
|
13866
|
+
blockedCount: number;
|
|
13867
|
+
oldestUnsettledCreatedAtMs: number;
|
|
13868
|
+
};
|
|
13869
|
+
|
|
13870
|
+
export async function readPostgresSchedulerComputeBillingObligationForOrg(
|
|
13871
|
+
client: PostgresSchedulerQueryClient,
|
|
13872
|
+
input: { orgId: string },
|
|
13873
|
+
options?: Pick<PostgresSchedulerOptions, 'schema'>,
|
|
13874
|
+
): Promise<PostgresSchedulerComputeBillingObligation> {
|
|
13875
|
+
const presence = await client.query<{ present: boolean }>(
|
|
13876
|
+
`
|
|
13877
|
+
SELECT (
|
|
13878
|
+
to_regclass($1) IS NOT NULL AND to_regclass($2) IS NOT NULL
|
|
13879
|
+
) AS present
|
|
13880
|
+
`,
|
|
13881
|
+
[tableName('compute_billing_jobs_v2', options), tableName('runs', options)],
|
|
13882
|
+
);
|
|
13883
|
+
const present = presence.rows[0]?.present;
|
|
13884
|
+
if (typeof present !== 'boolean') {
|
|
13885
|
+
throw new Error('Compute billing schema presence read returned no answer.');
|
|
13886
|
+
}
|
|
13887
|
+
if (!present) return { state: 'schema_absent' };
|
|
13888
|
+
const result = await client.query<{
|
|
13889
|
+
unsettled_count: number | string;
|
|
13890
|
+
blocked_count: number | string;
|
|
13891
|
+
oldest_created_at_ms: number | string | null;
|
|
13892
|
+
}>(
|
|
13893
|
+
`
|
|
13894
|
+
SELECT
|
|
13895
|
+
count(*) AS unsettled_count,
|
|
13896
|
+
count(*) FILTER (WHERE job.blocked_at IS NOT NULL) AS blocked_count,
|
|
13897
|
+
floor(extract(epoch FROM min(job.created_at)) * 1000)::bigint
|
|
13898
|
+
AS oldest_created_at_ms
|
|
13899
|
+
FROM ${tableName('compute_billing_jobs_v2', options)} AS job
|
|
13900
|
+
JOIN ${tableName('runs', options)} AS run ON run.run_id = job.run_id
|
|
13901
|
+
WHERE job.status <> 'settled'
|
|
13902
|
+
AND run.org_id = $1
|
|
13903
|
+
`,
|
|
13904
|
+
[input.orgId],
|
|
13905
|
+
);
|
|
13906
|
+
const row = result.rows[0];
|
|
13907
|
+
if (!row) {
|
|
13908
|
+
throw new Error('Compute billing obligation read returned no answer.');
|
|
13909
|
+
}
|
|
13910
|
+
const unsettledCount = Number(row.unsettled_count);
|
|
13911
|
+
const blockedCount = Number(row.blocked_count);
|
|
13912
|
+
if (!Number.isSafeInteger(unsettledCount) || !Number.isSafeInteger(blockedCount)) {
|
|
13913
|
+
throw new Error('Compute billing obligation read returned invalid counts.');
|
|
13914
|
+
}
|
|
13915
|
+
if (unsettledCount === 0) return { state: 'settled' };
|
|
13916
|
+
const oldestUnsettledCreatedAtMs = Number(row.oldest_created_at_ms);
|
|
13917
|
+
if (!Number.isSafeInteger(oldestUnsettledCreatedAtMs)) {
|
|
13918
|
+
throw new Error('Compute billing obligation read returned no oldest job.');
|
|
13919
|
+
}
|
|
13920
|
+
return {
|
|
13921
|
+
state: 'unsettled',
|
|
13922
|
+
unsettledCount,
|
|
13923
|
+
blockedCount,
|
|
13924
|
+
oldestUnsettledCreatedAtMs,
|
|
13925
|
+
};
|
|
13926
|
+
}
|
|
13927
|
+
|
|
13928
|
+
export async function readComputeBillingObligationForOrgViaRuntimeScheduler(input: {
|
|
13929
|
+
poolOptions: RuntimeSchedulerPoolOptions;
|
|
13930
|
+
orgId: string;
|
|
13931
|
+
schedulerOptions: Pick<PostgresSchedulerOptions, 'schema'>;
|
|
13932
|
+
}): Promise<PostgresSchedulerComputeBillingObligation> {
|
|
13933
|
+
return await withRuntimeSchedulerClient(input.poolOptions, (client) =>
|
|
13934
|
+
readPostgresSchedulerComputeBillingObligationForOrg(
|
|
13935
|
+
client,
|
|
13936
|
+
{ orgId: input.orgId },
|
|
13937
|
+
input.schedulerOptions,
|
|
13938
|
+
),
|
|
13939
|
+
);
|
|
13940
|
+
}
|
|
13941
|
+
|
|
13849
13942
|
/**
|
|
13850
13943
|
* Rolling-deploy bridge for terminal rows written by a retained v1 runtime.
|
|
13851
13944
|
* Current terminal writers create this obligation atomically; an observing
|
|
@@ -125,8 +125,15 @@ export class RuntimeSandboxCapacityLimitError extends RuntimeSchedulerCapacityEr
|
|
|
125
125
|
readonly orgId: string;
|
|
126
126
|
readonly limit: number;
|
|
127
127
|
readonly activeLeases: number;
|
|
128
|
+
/** The attempt generation refused, so any catcher can back off by age. */
|
|
129
|
+
readonly attempt: number | null;
|
|
128
130
|
|
|
129
|
-
constructor(input: {
|
|
131
|
+
constructor(input: {
|
|
132
|
+
orgId: string;
|
|
133
|
+
limit: number;
|
|
134
|
+
activeLeases: number;
|
|
135
|
+
attempt?: number;
|
|
136
|
+
}) {
|
|
130
137
|
super(
|
|
131
138
|
`Runtime scheduler sandbox capacity is full for organization ${input.orgId} (${input.activeLeases}/${input.limit} active leases).`,
|
|
132
139
|
15_000,
|
|
@@ -135,6 +142,7 @@ export class RuntimeSandboxCapacityLimitError extends RuntimeSchedulerCapacityEr
|
|
|
135
142
|
this.orgId = input.orgId;
|
|
136
143
|
this.limit = input.limit;
|
|
137
144
|
this.activeLeases = input.activeLeases;
|
|
145
|
+
this.attempt = input.attempt ?? null;
|
|
138
146
|
}
|
|
139
147
|
}
|
|
140
148
|
|