deepline 0.3.504 → 0.3.506
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 +121 -5
- package/dist/bundling-sources/sdk/src/index.ts +3 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +5 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +176 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +17 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/overview.ts +118 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +29 -1
- package/dist/bundling-sources/shared_libs/monitors/legacy-radar-retirement.ts +29 -10
- package/dist/bundling-sources/shared_libs/monitors/package.json +4 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +9 -9
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +52 -5
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +48 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +157 -47
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +36 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-egress.ts +55 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +66 -0
- package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +18 -0
- package/dist/bundling-sources/shared_libs/product-notifications/onboarding-unsubscribe.ts +23 -0
- package/dist/cli/auth-MMHG2OFE.js +43 -0
- package/dist/cli/{auth-3L5AA5AX.mjs → auth-ZHFONT2D.mjs} +5 -5
- package/dist/cli/{billing-HOGXVE2V.js → billing-3Z7N4WTL.js} +101 -91
- package/dist/cli/{billing-E7EASVPO.mjs → billing-B2YEMNHE.mjs} +27 -17
- package/dist/cli/{chunk-UXQQPMYO.js → chunk-26DJ4BDY.js} +2 -2
- package/dist/cli/{chunk-3MLFFWDM.mjs → chunk-2CFTDVEP.mjs} +2 -2
- package/dist/cli/{chunk-QOLX2O2S.mjs → chunk-2IXXB7OA.mjs} +93 -34
- package/dist/cli/{chunk-6JNBMTCZ.js → chunk-2OY5DXTC.js} +1 -1
- package/dist/cli/{chunk-SVFTZTCI.mjs → chunk-3BFZEHBH.mjs} +1 -1
- package/dist/cli/{chunk-67OI26OE.js → chunk-3F676QXJ.js} +96 -37
- package/dist/cli/{chunk-KCKAFTPY.js → chunk-5ARG7J7A.js} +6 -6
- package/dist/cli/{chunk-5CHBIJIM.mjs → chunk-6RYVIZRP.mjs} +2 -2
- package/dist/cli/{chunk-QKKU2FH4.js → chunk-75NAFY36.js} +7 -7
- package/dist/cli/{chunk-7P2QVMBP.js → chunk-AD2WJUZA.js} +91 -48
- package/dist/cli/{chunk-UFYJTRSF.mjs → chunk-AFSYNOG4.mjs} +42 -7
- package/dist/cli/{chunk-VJVJWZ6I.mjs → chunk-BJ5OX62J.mjs} +5 -5
- package/dist/cli/{chunk-HUX5DZO6.mjs → chunk-BQBPVUFJ.mjs} +3 -3
- package/dist/cli/{chunk-MLMWM5DV.mjs → chunk-CHGRURBN.mjs} +5 -5
- package/dist/cli/{chunk-22OCKCYS.mjs → chunk-D7OCORZ7.mjs} +1 -1
- package/dist/cli/{chunk-SMSQVRHE.js → chunk-DB54ROPH.js} +5 -5
- package/dist/cli/{chunk-KGUGNEKL.js → chunk-E554XCJI.js} +96 -96
- package/dist/cli/{chunk-GGBXNQCR.mjs → chunk-EN7GXLFX.mjs} +4 -4
- package/dist/cli/{chunk-2W77YCKH.js → chunk-F53SGS3C.js} +5 -5
- package/dist/cli/{chunk-6SMR7LU7.js → chunk-F7IQQYKV.js} +2 -2
- package/dist/cli/chunk-FFGQR5J3.mjs +405 -0
- package/dist/cli/{chunk-UJMBG5JU.js → chunk-FWSEGIT6.js} +4 -4
- package/dist/cli/{chunk-GJ2DA35C.js → chunk-GDHLL5EQ.js} +42 -7
- package/dist/cli/{chunk-XHZSPMNC.mjs → chunk-GJNIC2CO.mjs} +84 -441
- package/dist/cli/chunk-GRESJ3H3.js +405 -0
- package/dist/cli/{chunk-WZSFIJMG.js → chunk-HINTYT5H.js} +113 -470
- package/dist/cli/{chunk-A6LA42JY.js → chunk-LRSRJJPD.js} +16 -16
- package/dist/cli/{chunk-WBIDPDKJ.js → chunk-MHRR47VQ.js} +3 -3
- package/dist/cli/{chunk-FTRVCIGC.js → chunk-N7G36GXB.js} +26 -26
- package/dist/cli/{chunk-BTWUNKKX.mjs → chunk-ND4WPLTE.mjs} +2 -2
- package/dist/cli/{chunk-NZ7Z7WNM.mjs → chunk-O4DZG4VA.mjs} +2 -2
- package/dist/cli/{chunk-LHXYCZYO.js → chunk-OD6TASBP.js} +8 -8
- package/dist/cli/{chunk-GRAGUYIE.js → chunk-OHNMJ5XQ.js} +41 -41
- package/dist/cli/{chunk-OX2D6BG4.mjs → chunk-ONBXTEFQ.mjs} +46 -3
- package/dist/cli/{chunk-7F4OEHQK.mjs → chunk-OPBXKB57.mjs} +1 -1
- package/dist/cli/{chunk-Y7VEHKID.mjs → chunk-OUGJUM5X.mjs} +6 -6
- package/dist/cli/{chunk-USTJEEND.js → chunk-PRIHD5XS.js} +9 -9
- package/dist/cli/{chunk-IGNQKOWT.mjs → chunk-QAY5AS2H.mjs} +12 -12
- package/dist/cli/{chunk-5Z6EULD5.js → chunk-QP333GFE.js} +7 -7
- package/dist/cli/{chunk-JPR2546F.js → chunk-SUJIVF6L.js} +16 -16
- package/dist/cli/{chunk-DEAJVQEG.mjs → chunk-TEMORCEE.mjs} +1 -1
- package/dist/cli/{chunk-YOQ2NNDO.mjs → chunk-TS4KFQKS.mjs} +1 -1
- package/dist/cli/{chunk-4CC67XH5.mjs → chunk-XUY7WQ2R.mjs} +3 -3
- package/dist/cli/{chunk-Z6FXUDIL.mjs → chunk-YEX6RPUO.mjs} +1 -1
- package/dist/cli/{chunk-MJTK6Q3G.js → chunk-YJKKOSXS.js} +3 -3
- package/dist/cli/{chunk-Y6XKCEPK.mjs → chunk-YVOS5KSG.mjs} +1 -1
- package/dist/cli/{chunk-2ABRDH3B.mjs → chunk-YWZEBPXK.mjs} +2 -2
- package/dist/cli/{chunk-BX45XMXZ.mjs → chunk-Z7EHY2MF.mjs} +2 -2
- package/dist/cli/{chunk-FISP4LCK.js → chunk-ZM5BJ5MP.js} +53 -53
- package/dist/cli/{chunk-IPAMOMGP.js → chunk-ZZDTWVCQ.js} +21 -21
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-2XWGPITO.js → csv-7K7LK63Y.js} +13 -13
- package/dist/cli/{csv-433JEHLQ.mjs → csv-ARHQ54HA.mjs} +4 -4
- package/dist/cli/{db-K747DH43.mjs → db-JBX24NJY.mjs} +6 -6
- package/dist/cli/{db-PJJMD4VH.js → db-V4Z2I6DY.js} +27 -27
- package/dist/cli/describe-AYXVS6DZ.js +50 -0
- package/dist/cli/{describe-VEDDYW4P.mjs → describe-RBDSGSZ7.mjs} +18 -17
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-JWRX3XCT.mjs → executions-BAZEU63W.mjs} +6 -6
- package/dist/cli/{executions-HM5T72H6.js → executions-XEZKV5QU.js} +8 -8
- package/dist/cli/{feedback-34UG4BO3.js → feedback-LOERESRU.js} +8 -8
- package/dist/cli/{feedback-MNSIA63Y.mjs → feedback-YDSWBHCO.mjs} +4 -4
- package/dist/cli/{git-ZKEOXV3A.mjs → git-4Z3W2CQU.mjs} +5 -5
- package/dist/cli/git-T6WKO7EA.js +25 -0
- package/dist/cli/index.js +146 -148
- package/dist/cli/index.mjs +53 -55
- package/dist/cli/{legacy-noops-YXSI4FVU.js → legacy-noops-4QIQPVE5.js} +8 -8
- package/dist/cli/{legacy-noops-5M4T4ZVT.mjs → legacy-noops-E4HH7S5O.mjs} +5 -5
- package/dist/cli/{monitors-C65OC4AW.mjs → monitors-FPDW5DDM.mjs} +305 -8
- package/dist/cli/{monitors-O25GDOYE.js → monitors-QBHDSDA7.js} +423 -126
- package/dist/cli/{org-2GSPLY2A.js → org-JO4GGSAH.js} +72 -72
- package/dist/cli/{org-ZRMG5NS2.mjs → org-UCDHIHAD.mjs} +6 -6
- package/dist/cli/{pages-TZZUFBRO.mjs → pages-6V52IZXY.mjs} +6 -6
- package/dist/cli/{pages-45DPADK6.js → pages-FJAAXAWO.js} +18 -18
- package/dist/cli/{play-RCGMND6X.js → play-F3AENS6W.js} +317 -316
- package/dist/cli/{play-3D7HH273.mjs → play-MF4DWROJ.mjs} +18 -17
- package/dist/cli/{providers-PSAKV6CJ.mjs → providers-NJJLTECA.mjs} +6 -6
- package/dist/cli/{providers-3N3ECMTY.js → providers-XXOQLPX7.js} +9 -9
- package/dist/cli/{quickstart-6R6AIXM6.js → quickstart-JCE3XGQG.js} +6 -6
- package/dist/cli/{quickstart-2A35SMGC.mjs → quickstart-Z5MSMI7S.mjs} +4 -4
- package/dist/cli/{run-F3TLDGUO.mjs → run-56UGPIRL.mjs} +23 -22
- package/dist/cli/{run-F6ZXTASZ.js → run-X2DNIW3F.js} +41 -40
- package/dist/cli/search-B753RTKC.js +33 -0
- package/dist/cli/{search-CZLCY3D2.mjs → search-SZYI4NBB.mjs} +8 -7
- package/dist/cli/{search-output-R5XDNILW.js → search-output-7UNT6EMP.js} +6 -6
- package/dist/cli/{search-output-MQTSTLN5.mjs → search-output-T35QNZUF.mjs} +4 -4
- package/dist/cli/{secrets-DCJYHDSY.js → secrets-JMUAVIVC.js} +15 -15
- package/dist/cli/{secrets-D3GF4B2Z.mjs → secrets-Q36VC35L.mjs} +6 -6
- package/dist/cli/{sessions-QGEQ2UYZ.mjs → sessions-HG6I3HMY.mjs} +5 -5
- package/dist/cli/{sessions-Z4JYJSDP.js → sessions-SUXU7OM7.js} +6 -6
- package/dist/cli/{settings-UVXXAT4A.js → settings-UIELQ5CV.js} +106 -78
- package/dist/cli/{settings-G7QEXA4N.mjs → settings-Z76XW4KF.mjs} +39 -11
- package/dist/cli/{setup-5I42W7D4.js → setup-2L7H5P2O.js} +50 -49
- package/dist/cli/{setup-QHJU3DUI.mjs → setup-OXNYAOQ4.mjs} +10 -9
- package/dist/cli/skills-DEVXYGYH.js +37 -0
- package/dist/cli/{skills-5LRF4UKX.mjs → skills-XSNLXJGI.mjs} +8 -7
- package/dist/cli/tools-SCGHABDL.js +57 -0
- package/dist/cli/{tools-PUT6STVG.mjs → tools-SUSFAYFH.mjs} +17 -16
- package/dist/cli/update-BSIILGO3.js +35 -0
- package/dist/cli/{update-CJ2GA64X.mjs → update-ENSTG3QO.mjs} +10 -9
- package/dist/cli/{workflow-O67MEBCP.js → workflow-FMBZNY4F.js} +17 -17
- package/dist/cli/{workflow-HVEWRTXD.mjs → workflow-Z33QE6VT.mjs} +7 -7
- package/dist/{client-DYAfJpaN.d.mts → client-BDbouy3Y.d.mts} +1 -1
- package/dist/{client-CIwenMFS.d.ts → client-Cx0420fs.d.ts} +1 -1
- package/dist/{client-core-CRjtyMAI.d.ts → client-core-B4hq0-m2.d.ts} +56 -4
- package/dist/{client-core-DlzP8vEs.d.mts → client-core-CwiVaMZ5.d.mts} +56 -4
- package/dist/{compiler-manifest-DaJrA2KV.d.mts → compiler-manifest-BeURaD5Y.d.mts} +2 -0
- package/dist/{compiler-manifest-DaJrA2KV.d.ts → compiler-manifest-BeURaD5Y.d.ts} +2 -0
- package/dist/{errors-KLga4bLr.d.ts → errors-BoPXPrSy.d.ts} +1 -1
- package/dist/{errors-BKnSYueU.d.mts → errors-kBuT4kGK.d.mts} +1 -1
- package/dist/{index-C5nAZ-VS.d.ts → index-D0crdGM1.d.ts} +1 -1
- package/dist/{index-C-8AFpWy.d.mts → index-DC7oRAAC.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +116 -110
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +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/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-UPK4IIIN.js +0 -43
- package/dist/cli/describe-OYS7LZJD.js +0 -49
- package/dist/cli/git-5YQJSJFR.js +0 -25
- package/dist/cli/search-R5VEWJO2.js +0 -32
- package/dist/cli/skills-FB6TV52O.js +0 -36
- package/dist/cli/tools-L2364RPA.js +0 -56
- package/dist/cli/update-ESYJGYVZ.js +0 -34
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { resolve4 } from 'node:dns/promises';
|
|
2
|
+
import type { RuntimeGatewayCredentialScope } from './runtime-gateway-sandbox-credential';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Egress to the pinned Runtime gateway host for a sandbox whose outbound
|
|
6
|
+
* network is restricted to a CIDR list. Shared by every sandbox provider
|
|
7
|
+
* (Daytona `networkAllowList`, Modal `outboundCidrAllowlist`).
|
|
8
|
+
*
|
|
9
|
+
* A pinned run reaches its immutable app deployment by hostname, whose
|
|
10
|
+
* addresses cannot be enumerated ahead of time, and the providers accept a
|
|
11
|
+
* CIDR list (Daytona refuses a CIDR list and a domain list together). So when
|
|
12
|
+
* egress is already restricted, add the /24 around each IPv4 address the
|
|
13
|
+
* pinned host resolves to: the sandbox resolves the same name and may be
|
|
14
|
+
* answered with a different address in the same range. An unrestricted
|
|
15
|
+
* sandbox needs nothing (a list would restrict it), and an unpinned run is
|
|
16
|
+
* returned unchanged without resolving anything.
|
|
17
|
+
*/
|
|
18
|
+
export async function withRuntimeGatewayEgressCidrs(input: {
|
|
19
|
+
credentialScope: RuntimeGatewayCredentialScope | null | undefined;
|
|
20
|
+
/** The provider's CIDR allow-list; null or empty means unrestricted. */
|
|
21
|
+
cidrs: readonly string[] | null;
|
|
22
|
+
resolveIpv4?: (hostname: string) => Promise<string[]>;
|
|
23
|
+
}): Promise<string[] | null> {
|
|
24
|
+
const scope = input.credentialScope;
|
|
25
|
+
if (!scope || !input.cidrs || input.cidrs.length === 0) {
|
|
26
|
+
return input.cidrs ? [...input.cidrs] : null;
|
|
27
|
+
}
|
|
28
|
+
const hostname = new URL(scope.origin).hostname;
|
|
29
|
+
if (!hostname) {
|
|
30
|
+
throw new Error('Runtime gateway credential scope has no hostname.');
|
|
31
|
+
}
|
|
32
|
+
const addresses = await (input.resolveIpv4 ?? resolve4)(hostname);
|
|
33
|
+
const networks = [
|
|
34
|
+
...new Set(
|
|
35
|
+
addresses
|
|
36
|
+
.map((address) => address.split('.'))
|
|
37
|
+
.filter(
|
|
38
|
+
(octets) =>
|
|
39
|
+
octets.length === 4 &&
|
|
40
|
+
octets.every((octet) => /^\d{1,3}$/.test(octet)),
|
|
41
|
+
)
|
|
42
|
+
.map((octets) => `${octets[0]}.${octets[1]}.${octets[2]}.0/24`),
|
|
43
|
+
),
|
|
44
|
+
];
|
|
45
|
+
if (networks.length === 0) {
|
|
46
|
+
throw new Error(
|
|
47
|
+
`Runtime gateway host ${hostname} resolved to no IPv4 address; refusing to start a pinned sandbox that could not reach it.`,
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
const existing = input.cidrs.map((entry) => entry.trim());
|
|
51
|
+
return [
|
|
52
|
+
...existing,
|
|
53
|
+
...networks.filter((network) => !existing.includes(network)),
|
|
54
|
+
];
|
|
55
|
+
}
|
|
@@ -13706,6 +13706,72 @@ export async function readPostgresSchedulerComputeBillingRecovery(
|
|
|
13706
13706
|
: null;
|
|
13707
13707
|
}
|
|
13708
13708
|
|
|
13709
|
+
/** A finalized Preview charge can outlive its test workspace and job ACK. */
|
|
13710
|
+
export async function acknowledgeFinalizedTrainComputeBillingJob(
|
|
13711
|
+
client: PostgresSchedulerQueryClient,
|
|
13712
|
+
input: {
|
|
13713
|
+
schema: string;
|
|
13714
|
+
runId: string;
|
|
13715
|
+
orgId: string;
|
|
13716
|
+
attemptCount: number;
|
|
13717
|
+
resumeEpoch: string | null;
|
|
13718
|
+
resourceSnapshot: ReadonlyArray<readonly [number, unknown]>;
|
|
13719
|
+
},
|
|
13720
|
+
): Promise<boolean> {
|
|
13721
|
+
const { schema, runId, orgId, attemptCount, resumeEpoch, resourceSnapshot } =
|
|
13722
|
+
input;
|
|
13723
|
+
if (!/^runtime_scheduler_preview_release_train(?:_[b-d])?$/u.test(schema)) {
|
|
13724
|
+
throw new Error(
|
|
13725
|
+
'Finalized train billing recovery requires a named Preview lane.',
|
|
13726
|
+
);
|
|
13727
|
+
}
|
|
13728
|
+
const result = await client.query(
|
|
13729
|
+
`WITH matching_run AS MATERIALIZED (
|
|
13730
|
+
SELECT run.run_id
|
|
13731
|
+
FROM ${tableName('runs', { schema })} AS run
|
|
13732
|
+
WHERE run.run_id = $1 AND run.org_id = $2
|
|
13733
|
+
AND run.status IN ('completed', 'failed', 'cancelled')
|
|
13734
|
+
AND run.launch_json->>'schedulerSchema' = $3
|
|
13735
|
+
AND (run.launch_json->>'resumeEpoch') IS NOT DISTINCT FROM $4
|
|
13736
|
+
AND coalesce(run.admission_json, run.launch_json)->>'schedulerSchema' = $3
|
|
13737
|
+
AND (coalesce(run.admission_json, run.launch_json)->>'resumeEpoch')
|
|
13738
|
+
IS NOT DISTINCT FROM $4
|
|
13739
|
+
FOR UPDATE OF run
|
|
13740
|
+
), matching_attempts AS MATERIALIZED (
|
|
13741
|
+
SELECT attempt.attempt, attempt.resource_json
|
|
13742
|
+
FROM ${tableName('attempts', { schema })} AS attempt
|
|
13743
|
+
JOIN matching_run ON matching_run.run_id = attempt.run_id
|
|
13744
|
+
ORDER BY attempt.attempt
|
|
13745
|
+
FOR UPDATE OF attempt
|
|
13746
|
+
)
|
|
13747
|
+
UPDATE ${tableName('compute_billing_jobs_v2', { schema })} AS job
|
|
13748
|
+
SET status = 'settled', blocked_at = NULL, block_reason = NULL,
|
|
13749
|
+
last_error = NULL, settled_at = now(), updated_at = now()
|
|
13750
|
+
FROM matching_run
|
|
13751
|
+
WHERE job.run_id = matching_run.run_id
|
|
13752
|
+
AND job.status = 'pending' AND job.blocked_at IS NOT NULL
|
|
13753
|
+
AND job.lease_owner IS NULL AND job.lease_expires_at IS NULL
|
|
13754
|
+
AND job.attempt_count = $5
|
|
13755
|
+
AND $6::jsonb = (
|
|
13756
|
+
SELECT coalesce(
|
|
13757
|
+
jsonb_agg(jsonb_build_array(attempt, resource_json) ORDER BY attempt),
|
|
13758
|
+
'[]'::jsonb
|
|
13759
|
+
)
|
|
13760
|
+
FROM matching_attempts
|
|
13761
|
+
)
|
|
13762
|
+
RETURNING job.run_id`,
|
|
13763
|
+
[
|
|
13764
|
+
runId,
|
|
13765
|
+
orgId,
|
|
13766
|
+
schema,
|
|
13767
|
+
resumeEpoch,
|
|
13768
|
+
attemptCount,
|
|
13769
|
+
JSON.stringify(resourceSnapshot),
|
|
13770
|
+
],
|
|
13771
|
+
);
|
|
13772
|
+
return result.rows.length === 1;
|
|
13773
|
+
}
|
|
13774
|
+
|
|
13709
13775
|
/**
|
|
13710
13776
|
* Explicit operator reconciliation takes its own settlement lease atomically.
|
|
13711
13777
|
* A retained worker must not win a pending-row race and use the old issuer.
|
|
@@ -39,6 +39,24 @@ export class ConvexEdgeUnavailableError extends Error {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* True only for the branded edge refusal itself, never for message text.
|
|
44
|
+
*
|
|
45
|
+
* `transientServiceUnavailableDetail` also matches Convex's own admission
|
|
46
|
+
* responses by message, so an application exception that happens to say
|
|
47
|
+
* "ServiceUnavailable" would pass it. A caller that uses the answer to keep a
|
|
48
|
+
* failure out of a verdict needs the structured signal alone.
|
|
49
|
+
*/
|
|
50
|
+
export function isConvexEdgeUnavailableError(
|
|
51
|
+
error: unknown,
|
|
52
|
+
): error is ConvexEdgeUnavailableError {
|
|
53
|
+
// The name check covers an error raised by another copy of this module.
|
|
54
|
+
return (
|
|
55
|
+
error instanceof ConvexEdgeUnavailableError ||
|
|
56
|
+
(error instanceof Error && error.name === 'ConvexEdgeUnavailableError')
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
42
60
|
export function transientServiceUnavailableDetail(
|
|
43
61
|
error: unknown,
|
|
44
62
|
): string | null {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
// This campaign belongs to Deepline's own workspace, never the requester's.
|
|
4
|
+
export const ONBOARDING_WORKSPACE = 'jh7eep8wqe12fx2e0hd5en44m182v3jg';
|
|
5
|
+
|
|
6
|
+
export function onboardingTokenHash(token: string): string | null {
|
|
7
|
+
if (!/^[a-f0-9]{64}$/.test(token)) return null;
|
|
8
|
+
return createHash('sha256').update(token).digest('hex');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function onboardingOptOutSql(hash: string): string {
|
|
12
|
+
if (!/^[a-f0-9]{64}$/.test(hash)) throw new Error('INVALID_TOKEN_HASH');
|
|
13
|
+
return `WITH recipient AS MATERIALIZED (
|
|
14
|
+
SELECT email FROM storage.signup_nurture_unsubscribe_tokens WHERE token_hash='${hash}'
|
|
15
|
+
), stopped AS (
|
|
16
|
+
INSERT INTO storage.signup_nurture_optouts(email,source)
|
|
17
|
+
SELECT email,'recipient_link' FROM recipient
|
|
18
|
+
ON CONFLICT(email) DO UPDATE SET source=storage.signup_nurture_optouts.source RETURNING email
|
|
19
|
+
), sync AS (
|
|
20
|
+
INSERT INTO storage.signup_nurture_preference_outbox(email)
|
|
21
|
+
SELECT email FROM stopped ON CONFLICT(email) DO NOTHING
|
|
22
|
+
) SELECT count(*)::integer AS matched FROM stopped`;
|
|
23
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var _chunkZM5BJ5MPjs = require('./chunk-ZM5BJ5MP.js');
|
|
18
|
+
require('./chunk-75NAFY36.js');
|
|
19
|
+
require('./chunk-MHRR47VQ.js');
|
|
20
|
+
require('./chunk-FWSEGIT6.js');
|
|
21
|
+
require('./chunk-ALJJRZNJ.js');
|
|
22
|
+
require('./chunk-XNYIZMNQ.js');
|
|
23
|
+
require('./chunk-DIAWYWT5.js');
|
|
24
|
+
require('./chunk-2OY5DXTC.js');
|
|
25
|
+
require('./chunk-OG64RBAC.js');
|
|
26
|
+
require('./chunk-COGTRVWW.js');
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
exports.EXIT_WORKSPACE_MISMATCH = _chunkZM5BJ5MPjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkZM5BJ5MPjs.authStatusLine; exports.clearPendingClaim = _chunkZM5BJ5MPjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkZM5BJ5MPjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkZM5BJ5MPjs.handleRegister; exports.handleStatus = _chunkZM5BJ5MPjs.handleStatus; exports.handleWait = _chunkZM5BJ5MPjs.handleWait; exports.httpJson = _chunkZM5BJ5MPjs.httpJson; exports.readPendingAuthClaim = _chunkZM5BJ5MPjs.readPendingAuthClaim; exports.readStatusBanner = _chunkZM5BJ5MPjs.readStatusBanner; exports.registerAuthCommands = _chunkZM5BJ5MPjs.registerAuthCommands; exports.reportApprovalLinkShown = _chunkZM5BJ5MPjs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunkZM5BJ5MPjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkZM5BJ5MPjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkZM5BJ5MPjs.statusBannerLine;
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
reportSetupCompleted,
|
|
15
15
|
resolvePendingAuthClaimForResume,
|
|
16
16
|
statusBannerLine
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-BQBPVUFJ.mjs";
|
|
18
|
+
import "./chunk-2CFTDVEP.mjs";
|
|
19
|
+
import "./chunk-YVOS5KSG.mjs";
|
|
20
|
+
import "./chunk-TS4KFQKS.mjs";
|
|
21
21
|
import "./chunk-4QF2K7TM.mjs";
|
|
22
22
|
import "./chunk-DLIRSHV6.mjs";
|
|
23
23
|
import "./chunk-HBL4PM5Q.mjs";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-OPBXKB57.mjs";
|
|
25
25
|
import "./chunk-WZYKRD7T.mjs";
|
|
26
26
|
import "./chunk-KRD6H754.mjs";
|
|
27
27
|
export {
|