deepline 0.3.518 → 0.3.519
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/durable-runs-rollout.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +142 -68
- package/dist/cli/{artifacts-EAOGAB5K.js → artifacts-YRKH7KNC.js} +18 -18
- package/dist/cli/{artifacts-LGFPVJSE.mjs → artifacts-ZZULJ6X5.mjs} +6 -6
- package/dist/cli/auth-DF6WJLN2.js +43 -0
- package/dist/cli/{auth-FXXZIWLI.mjs → auth-WU2BDO3T.mjs} +5 -5
- package/dist/cli/{billing-4Q5WAB5D.mjs → billing-DG62VVXW.mjs} +6 -6
- package/dist/cli/{billing-ESZXVREA.js → billing-MUMMBMQK.js} +79 -79
- package/dist/cli/{chunk-HIJM54NU.js → chunk-25WXWSFS.js} +22 -22
- package/dist/cli/{chunk-XA7OTIYW.mjs → chunk-3CUIIVGR.mjs} +1 -1
- package/dist/cli/{chunk-K5GUMXRT.js → chunk-4ECU5DI3.js} +26 -26
- package/dist/cli/{chunk-ZJ3HEEGF.js → chunk-4PWBHYH4.js} +7 -7
- package/dist/cli/{chunk-BVQDUYXJ.js → chunk-52DFTRVC.js} +16 -16
- package/dist/cli/{chunk-W3UFYU63.mjs → chunk-5A2SIIPH.mjs} +1 -1
- package/dist/cli/{chunk-LTCNF6KG.mjs → chunk-A7W3CCU5.mjs} +5 -5
- package/dist/cli/{chunk-QX4QFGU7.mjs → chunk-AL7FDMD6.mjs} +1 -1
- package/dist/cli/{chunk-MNWLM3FA.mjs → chunk-AXA5DFY5.mjs} +1 -1
- package/dist/cli/{chunk-SNFRDG7G.js → chunk-BQYXIAJM.js} +3 -3
- package/dist/cli/{chunk-6IPKRQMH.js → chunk-C7ZD4LXZ.js} +2 -2
- package/dist/cli/{chunk-2DRW5ALK.mjs → chunk-CBMTBMIJ.mjs} +1 -1
- package/dist/cli/{chunk-KIYDPAGX.mjs → chunk-CRE3OGHH.mjs} +2 -2
- package/dist/cli/{chunk-M4DA3HTT.js → chunk-E6YWCXII.js} +16 -16
- package/dist/cli/{chunk-5X4P3MNG.js → chunk-EMV6EHK2.js} +9 -9
- package/dist/cli/{chunk-NQFVQCCV.js → chunk-F6XD4CRW.js} +1 -1
- package/dist/cli/{chunk-4YR3W2YB.mjs → chunk-FEJKDR67.mjs} +1 -1
- package/dist/cli/{chunk-DYWQ72ZQ.mjs → chunk-FJAGGBDR.mjs} +1 -1
- package/dist/cli/{chunk-TU5RR775.mjs → chunk-FTJ2D3XD.mjs} +3 -3
- package/dist/cli/{chunk-VHFICSS7.js → chunk-G2QD575P.js} +6 -6
- package/dist/cli/{chunk-GDMO6MMY.js → chunk-GO467AXG.js} +41 -41
- package/dist/cli/{chunk-RFUJBBJE.mjs → chunk-HKKC7J6K.mjs} +6 -6
- package/dist/cli/{chunk-3NMQ5EIV.js → chunk-HXPHRSNM.js} +14 -14
- package/dist/cli/{chunk-J2UOHFDH.js → chunk-I3ICKVYH.js} +53 -53
- package/dist/cli/{chunk-L4RQDVCN.mjs → chunk-IMIHYCJ5.mjs} +5 -5
- package/dist/cli/{chunk-TH2AQ4VG.mjs → chunk-J4X4RNSP.mjs} +3 -3
- package/dist/cli/{chunk-B26LSUCI.js → chunk-LKYLIZ5X.js} +2 -2
- package/dist/cli/{chunk-L256EFFV.mjs → chunk-MI5DKOBD.mjs} +2 -2
- package/dist/cli/{chunk-KQV75ZUA.mjs → chunk-N3LUYBOB.mjs} +10 -10
- package/dist/cli/{chunk-B2MSOFEI.mjs → chunk-NH22WUUG.mjs} +2 -2
- package/dist/cli/{chunk-V6DIYGTK.mjs → chunk-NIJE62ZD.mjs} +1 -1
- package/dist/cli/{chunk-2G6MARKU.js → chunk-O655PVT4.js} +7 -7
- package/dist/cli/{chunk-ENVSFG5E.js → chunk-ORNLTNBN.js} +44 -44
- package/dist/cli/{chunk-UY5JSZDA.js → chunk-P62S3ZMS.js} +11 -11
- package/dist/cli/{chunk-ST7WCRVQ.js → chunk-PK6VYYEY.js} +5 -5
- package/dist/cli/{chunk-YNIH4YTR.mjs → chunk-R3OAKFHJ.mjs} +5 -5
- package/dist/cli/{chunk-2LBKIVIW.mjs → chunk-RHQKDHCX.mjs} +2 -2
- package/dist/cli/{chunk-X6H3JGOP.mjs → chunk-RQ2BHYUM.mjs} +2 -2
- package/dist/cli/{chunk-JKSLK5PS.js → chunk-RQDD2VV3.js} +5 -5
- package/dist/cli/{chunk-RYHNKT4P.mjs → chunk-RU5JRQKJ.mjs} +2 -2
- package/dist/cli/{chunk-LLO5UYI5.js → chunk-S7R4O62I.js} +6 -6
- package/dist/cli/{chunk-WTQF2Z6X.mjs → chunk-SBF4K3QF.mjs} +4 -4
- package/dist/cli/{chunk-R4ZEJD5F.js → chunk-TT2XB433.js} +4 -4
- package/dist/cli/{chunk-RASCFMYI.mjs → chunk-UB2REJPL.mjs} +2 -2
- package/dist/cli/{chunk-XJ5NVLIP.js → chunk-UMPHUAGZ.js} +3 -3
- package/dist/cli/{chunk-7X32UR2E.js → chunk-XBS4RDKU.js} +96 -96
- package/dist/cli/{chunk-REEWKGQZ.js → chunk-XUCAH3LN.js} +10 -10
- package/dist/cli/{chunk-G6BD4K3K.mjs → chunk-Y7D6L4M7.mjs} +5 -5
- package/dist/cli/{chunk-KP5AAMJ3.mjs → chunk-YRU46P7H.mjs} +1 -1
- package/dist/cli/{chunk-ICHUGGZ3.js → chunk-ZQ23WQP3.js} +2 -2
- package/dist/cli/{csv-KRGEVVN7.mjs → csv-3TUJHAOW.mjs} +4 -4
- package/dist/cli/{csv-RLFOF4P4.js → csv-BKWIYPMK.js} +13 -13
- package/dist/cli/{db-NJC3NPOL.js → db-EJMJDKDA.js} +27 -27
- package/dist/cli/{db-2B6G4YO3.mjs → db-I75IQ7XI.mjs} +6 -6
- package/dist/cli/describe-EAK3MPTG.js +50 -0
- package/dist/cli/{describe-BLJFAM4U.mjs → describe-RUFLLRIN.mjs} +18 -18
- package/dist/cli/{executions-ENELLT7A.js → executions-TQJCMUUG.js} +8 -8
- package/dist/cli/{executions-25XYBGJ5.mjs → executions-VW3MYJEE.mjs} +6 -6
- package/dist/cli/{feedback-5OAKHVQE.mjs → feedback-76342G7E.mjs} +5 -5
- package/dist/cli/{feedback-UPI2JQPL.js → feedback-UFAEXH5B.js} +10 -10
- package/dist/cli/{git-MRYSIZV4.mjs → git-L5XKAODI.mjs} +5 -5
- package/dist/cli/git-OOCPCIGZ.js +25 -0
- package/dist/cli/index.js +141 -141
- package/dist/cli/index.mjs +43 -43
- package/dist/cli/{legacy-noops-OJD5KYUO.mjs → legacy-noops-DKAZ7JG3.mjs} +6 -6
- package/dist/cli/{legacy-noops-DHEWQKER.js → legacy-noops-DM66YISP.js} +9 -9
- package/dist/cli/{monitors-22AFKUQN.js → monitors-NKDIH4TY.js} +100 -100
- package/dist/cli/{monitors-24JM24NV.mjs → monitors-QXEJI54B.mjs} +7 -7
- package/dist/cli/{org-I2X7ZZGQ.mjs → org-KZQCVREB.mjs} +6 -6
- package/dist/cli/{org-HNYKUDJB.js → org-NKIIBUNO.js} +72 -72
- package/dist/cli/{pages-4LSYUDES.mjs → pages-E7IT5SWT.mjs} +6 -6
- package/dist/cli/{pages-OUSF2RNH.js → pages-UJUFCJEL.js} +18 -18
- package/dist/cli/{play-64XKQRA4.mjs → play-AKL5E2DF.mjs} +18 -18
- package/dist/cli/{play-ESY43EFW.js → play-SPI5MO67.js} +317 -317
- package/dist/cli/{providers-ENWSSRYR.js → providers-4NVQ3FSC.js} +9 -9
- package/dist/cli/{providers-VHK26CSP.mjs → providers-6HSSVI74.mjs} +6 -6
- package/dist/cli/{quickstart-4NNLQMD7.mjs → quickstart-EHLEHSMI.mjs} +4 -4
- package/dist/cli/{quickstart-TZ6IAUMS.js → quickstart-FEQD7S4Z.js} +6 -6
- package/dist/cli/{run-RR7KPWP7.js → run-GH6ECTJF.js} +41 -41
- package/dist/cli/{run-DOH3AMYU.mjs → run-IWVM7BD6.mjs} +23 -23
- package/dist/cli/search-NIRYA3VL.js +33 -0
- package/dist/cli/{search-YFOCGXWL.mjs → search-X4CDMN7J.mjs} +8 -8
- package/dist/cli/{search-output-AOTV6C36.js → search-output-IIYMGZTQ.js} +6 -6
- package/dist/cli/{search-output-IV2HSRLQ.mjs → search-output-PJ7N5WUQ.mjs} +4 -4
- package/dist/cli/{secrets-GMFCHPTV.mjs → secrets-4YPMC7XZ.mjs} +6 -6
- package/dist/cli/{secrets-ATPM2AXV.js → secrets-QPP2FXID.js} +15 -15
- package/dist/cli/sessions-5I2IFTW7.js +18 -0
- package/dist/cli/{sessions-X3M4H2WY.mjs → sessions-BEOI47VZ.mjs} +6 -6
- package/dist/cli/{settings-4V52LMWP.js → settings-FZDONKPW.js} +86 -86
- package/dist/cli/{settings-GRXFOR5V.mjs → settings-VHULXNY3.mjs} +13 -13
- package/dist/cli/{setup-63WAXGPH.mjs → setup-5IV3NHGD.mjs} +10 -10
- package/dist/cli/{setup-OCCXAVQL.js → setup-LZ6IN5JS.js} +50 -50
- package/dist/cli/{skills-IVGTO4NE.mjs → skills-FZAFBW5J.mjs} +8 -8
- package/dist/cli/skills-WJWLFSHI.js +37 -0
- package/dist/cli/tools-SH35NRGU.js +57 -0
- package/dist/cli/{tools-KGHX6MLB.mjs → tools-TLBH3RFK.mjs} +17 -17
- package/dist/cli/{update-2OBZ4IUJ.mjs → update-KPLIZYOV.mjs} +10 -10
- package/dist/cli/update-MA46YSGR.js +35 -0
- package/dist/cli/{workflow-HGLO4V7R.js → workflow-ACHPT3DD.js} +17 -17
- package/dist/cli/{workflow-ZZOATQYV.mjs → workflow-GYJOYYWK.mjs} +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +104 -104
- 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.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-CLNPH65D.js +0 -43
- package/dist/cli/describe-DRMUODJN.js +0 -50
- package/dist/cli/git-P4OPT6Q7.js +0 -25
- package/dist/cli/search-SE6PM33H.js +0 -33
- package/dist/cli/sessions-NN3H2KSE.js +0 -18
- package/dist/cli/skills-6XXVKQP4.js +0 -37
- package/dist/cli/tools-5COWG5TH.js +0 -57
- package/dist/cli/update-SQD25OCL.js +0 -35
|
@@ -205,7 +205,7 @@ export const SDK_RELEASE = {
|
|
|
205
205
|
// getters keep their established compatibility behavior.
|
|
206
206
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
207
207
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
208
|
-
version: '0.3.
|
|
208
|
+
version: '0.3.519',
|
|
209
209
|
updateSummary: {
|
|
210
210
|
introducedIn: '0.3.90',
|
|
211
211
|
summary:
|
|
@@ -23,8 +23,14 @@ export const DURABLE_RUNS_ROLLOUT = {
|
|
|
23
23
|
/**
|
|
24
24
|
* The worker defers a replay-safe run whose attempt ended in a post-code
|
|
25
25
|
* platform failure instead of failing it.
|
|
26
|
+
*
|
|
27
|
+
* The switch is read by the worker and the execution gateway of the
|
|
28
|
+
* release that runs it, so a lane built before this flip keeps failing such
|
|
29
|
+
* runs. Turned off again, a lane no longer continues a run already
|
|
30
|
+
* deferred (its start gate and fence-owner attempts are ignored), so roll
|
|
31
|
+
* back only after deferred runs drain.
|
|
26
32
|
*/
|
|
27
|
-
automaticPostCodeRecovery:
|
|
33
|
+
automaticPostCodeRecovery: true,
|
|
28
34
|
/**
|
|
29
35
|
* After a live edition-11 read with `staleAfterSeconds` other than 0
|
|
30
36
|
* (including one refreshed by `--refresh-cache`), also publish the result
|
package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts
CHANGED
|
@@ -276,6 +276,7 @@ import {
|
|
|
276
276
|
replayTrackedMarkerReceiptKey,
|
|
277
277
|
replayUnsafeMarkerReceiptKey,
|
|
278
278
|
withoutWorkerEvidence,
|
|
279
|
+
type PostCodeRecoveryReason,
|
|
279
280
|
type WorkerAttemptEvidence,
|
|
280
281
|
} from '../post-code-recovery-policy';
|
|
281
282
|
import {
|
|
@@ -2764,6 +2765,109 @@ async function terminalizeSandboxCapacityRejection(input: {
|
|
|
2764
2765
|
});
|
|
2765
2766
|
}
|
|
2766
2767
|
|
|
2768
|
+
/**
|
|
2769
|
+
* The worker's own probe for a control-plane outage, used only as evidence for
|
|
2770
|
+
* automatic post-code recovery. The probe is optional: a result it cannot
|
|
2771
|
+
* obtain means "no outage observed", which leaves the failure the Play's, as
|
|
2772
|
+
* it is with recovery off. It never throws, so a probe error cannot fail the
|
|
2773
|
+
* liveness confirmation or the run it is gathering evidence for.
|
|
2774
|
+
*/
|
|
2775
|
+
export async function observeControlPlaneOutageEvidence(input: {
|
|
2776
|
+
gatewayUrl: string | undefined;
|
|
2777
|
+
readReplayMarker: () => Promise<unknown>;
|
|
2778
|
+
log: (event: string, fields: Record<string, unknown>) => void;
|
|
2779
|
+
fetchImpl?: typeof fetch;
|
|
2780
|
+
}): Promise<boolean> {
|
|
2781
|
+
const gateway = input.gatewayUrl?.trim();
|
|
2782
|
+
const fetchImpl = input.fetchImpl ?? fetch;
|
|
2783
|
+
// This URL belongs to the worker's release, never the sandbox's result.
|
|
2784
|
+
let gatewayUnavailable = false;
|
|
2785
|
+
let endpoint: URL | null = null;
|
|
2786
|
+
if (gateway) {
|
|
2787
|
+
try {
|
|
2788
|
+
endpoint = new URL('/readyz', gateway);
|
|
2789
|
+
} catch (error) {
|
|
2790
|
+
// A malformed release configuration is not evidence of an outage.
|
|
2791
|
+
input.log('control_plane_probe_failed', {
|
|
2792
|
+
error: error instanceof Error ? error.message : String(error),
|
|
2793
|
+
});
|
|
2794
|
+
}
|
|
2795
|
+
}
|
|
2796
|
+
if (endpoint) {
|
|
2797
|
+
try {
|
|
2798
|
+
const response = await fetchImpl(endpoint, {
|
|
2799
|
+
signal: AbortSignal.timeout(5_000),
|
|
2800
|
+
redirect: 'manual',
|
|
2801
|
+
});
|
|
2802
|
+
gatewayUnavailable = response.status >= 500;
|
|
2803
|
+
if (response.ok) {
|
|
2804
|
+
const readiness = (await response.json()) as {
|
|
2805
|
+
schedulerBreakerOpen?: unknown;
|
|
2806
|
+
};
|
|
2807
|
+
gatewayUnavailable = readiness.schedulerBreakerOpen === true;
|
|
2808
|
+
} else {
|
|
2809
|
+
await response.body?.cancel();
|
|
2810
|
+
}
|
|
2811
|
+
} catch (error) {
|
|
2812
|
+
// Authentication, malformed configuration and invalid JSON are not
|
|
2813
|
+
// evidence of an outage. Fetch transport failures and timeouts are.
|
|
2814
|
+
gatewayUnavailable =
|
|
2815
|
+
error instanceof TypeError ||
|
|
2816
|
+
(error instanceof Error &&
|
|
2817
|
+
['TimeoutError', 'AbortError'].includes(error.name));
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2820
|
+
let receiptStoreUnavailable = false;
|
|
2821
|
+
try {
|
|
2822
|
+
await input.readReplayMarker();
|
|
2823
|
+
} catch (error) {
|
|
2824
|
+
receiptStoreUnavailable =
|
|
2825
|
+
isConnectionCategoryError(error) ||
|
|
2826
|
+
isRuntimeSchedulerServerUnavailableError(error) ||
|
|
2827
|
+
isRuntimeSchedulerCapacityError(error);
|
|
2828
|
+
if (!receiptStoreUnavailable) {
|
|
2829
|
+
input.log('control_plane_probe_failed', {
|
|
2830
|
+
error: error instanceof Error ? error.message : String(error),
|
|
2831
|
+
});
|
|
2832
|
+
}
|
|
2833
|
+
}
|
|
2834
|
+
return gatewayUnavailable || receiptStoreUnavailable;
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2837
|
+
/**
|
|
2838
|
+
* After a post-code deferral is committed, release the lost attempts' receipt
|
|
2839
|
+
* claims at once when that is safe. Only a provider-confirmed loss, or a loss
|
|
2840
|
+
* whose sandbox deletion is confirmed, may release; otherwise the retried
|
|
2841
|
+
* attempt's start gate releases them. The release is an optimization, so any
|
|
2842
|
+
* failure here is logged and never fails the run the deferral already saved.
|
|
2843
|
+
*/
|
|
2844
|
+
export async function releasePostCodeClaimsAfterDeferralBestEffort(input: {
|
|
2845
|
+
reason: PostCodeRecoveryReason;
|
|
2846
|
+
cleanupPersisted: boolean;
|
|
2847
|
+
deletionPending: () => Promise<boolean>;
|
|
2848
|
+
release: () => Promise<{ released: number }>;
|
|
2849
|
+
log: (
|
|
2850
|
+
level: 'info' | 'warn',
|
|
2851
|
+
event: string,
|
|
2852
|
+
fields: Record<string, unknown>,
|
|
2853
|
+
) => void;
|
|
2854
|
+
}): Promise<void> {
|
|
2855
|
+
try {
|
|
2856
|
+
const deletionUnconfirmed =
|
|
2857
|
+
postCodeRecoveryRequiresSandboxDeletion(input.reason) &&
|
|
2858
|
+
(!input.cleanupPersisted || (await input.deletionPending()));
|
|
2859
|
+
if (deletionUnconfirmed) return;
|
|
2860
|
+
const released = await input.release();
|
|
2861
|
+
input.log('info', 'post_code_receipts_released', {
|
|
2862
|
+
releasedReceipts: released.released,
|
|
2863
|
+
});
|
|
2864
|
+
} catch (error) {
|
|
2865
|
+
input.log('warn', 'post_code_receipt_release_skipped', {
|
|
2866
|
+
error: error instanceof Error ? error.message : String(error),
|
|
2867
|
+
});
|
|
2868
|
+
}
|
|
2869
|
+
}
|
|
2870
|
+
|
|
2767
2871
|
/**
|
|
2768
2872
|
* A post-code retry starts no sandbox until every earlier attempt's sandbox
|
|
2769
2873
|
* cleanup is confirmed deleted (A11). While one is unconfirmed the attempt is
|
|
@@ -4097,54 +4201,25 @@ async function executeAssignedAbsurdAttempt(input: {
|
|
|
4097
4201
|
// evidence shows the platform failed it, retry the same run from its
|
|
4098
4202
|
// checkpoint instead of failing it. Recorded calls return their results on
|
|
4099
4203
|
// the next attempt. Returns the result to finalize, or throws DeferTask.
|
|
4100
|
-
const observeControlPlaneOutage = async (): Promise<boolean> =>
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
});
|
|
4112
|
-
gatewayUnavailable = response.status >= 500;
|
|
4113
|
-
if (response.ok) {
|
|
4114
|
-
const readiness = (await response.json()) as {
|
|
4115
|
-
schedulerBreakerOpen?: unknown;
|
|
4116
|
-
};
|
|
4117
|
-
gatewayUnavailable = readiness.schedulerBreakerOpen === true;
|
|
4118
|
-
} else {
|
|
4119
|
-
await response.body?.cancel();
|
|
4120
|
-
}
|
|
4121
|
-
} catch (error) {
|
|
4122
|
-
// Authentication, malformed configuration and invalid JSON are not
|
|
4123
|
-
// evidence of an outage. Fetch transport failures and timeouts are.
|
|
4124
|
-
gatewayUnavailable =
|
|
4125
|
-
error instanceof TypeError ||
|
|
4126
|
-
(error instanceof Error &&
|
|
4127
|
-
['TimeoutError', 'AbortError'].includes(error.name));
|
|
4128
|
-
}
|
|
4129
|
-
}
|
|
4130
|
-
let receiptStoreUnavailable = false;
|
|
4131
|
-
try {
|
|
4132
|
-
await deps.runWithClient((client) =>
|
|
4133
|
-
getPostgresSchedulerReceipt(
|
|
4134
|
-
client,
|
|
4135
|
-
{ key: replayTrackedMarkerReceiptKey(launch.orgId, runId) },
|
|
4136
|
-
{ ...options, orgId: launch.orgId },
|
|
4204
|
+
const observeControlPlaneOutage = async (): Promise<boolean> =>
|
|
4205
|
+
DURABLE_RUNS_ROLLOUT.automaticPostCodeRecovery &&
|
|
4206
|
+
(await observeControlPlaneOutageEvidence({
|
|
4207
|
+
gatewayUrl: process.env.DEEPLINE_RUNTIME_RECEIPT_GATEWAY_URL,
|
|
4208
|
+
readReplayMarker: () =>
|
|
4209
|
+
deps.runWithClient((client) =>
|
|
4210
|
+
getPostgresSchedulerReceipt(
|
|
4211
|
+
client,
|
|
4212
|
+
{ key: replayTrackedMarkerReceiptKey(launch.orgId, runId) },
|
|
4213
|
+
{ ...options, orgId: launch.orgId },
|
|
4214
|
+
),
|
|
4137
4215
|
),
|
|
4138
|
-
)
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
}
|
|
4146
|
-
return gatewayUnavailable || receiptStoreUnavailable;
|
|
4147
|
-
};
|
|
4216
|
+
log: (event, fields) =>
|
|
4217
|
+
console.warn(`[absurd-runtime.worker] ${event}`, {
|
|
4218
|
+
runId,
|
|
4219
|
+
generation,
|
|
4220
|
+
...fields,
|
|
4221
|
+
}),
|
|
4222
|
+
}));
|
|
4148
4223
|
|
|
4149
4224
|
const deferPostCodePlatformFailure = async (
|
|
4150
4225
|
runnerResult: PlayRunnerResult,
|
|
@@ -4213,33 +4288,32 @@ async function executeAssignedAbsurdAttempt(input: {
|
|
|
4213
4288
|
// stopped sandbox or an unreachable control plane the old runner may
|
|
4214
4289
|
// still be alive, so its claims stay until its sandbox cleanup is
|
|
4215
4290
|
// confirmed deleted; the retried attempt's start gate releases them.
|
|
4216
|
-
|
|
4217
|
-
outcome.reason,
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
(!cleanupPersisted ||
|
|
4222
|
-
(await deps.runWithClient((client) =>
|
|
4291
|
+
await releasePostCodeClaimsAfterDeferralBestEffort({
|
|
4292
|
+
reason: outcome.reason,
|
|
4293
|
+
cleanupPersisted,
|
|
4294
|
+
deletionPending: () =>
|
|
4295
|
+
deps.runWithClient((client) =>
|
|
4223
4296
|
hasPendingPostgresSchedulerSandboxDeletionThroughAttempt(
|
|
4224
4297
|
client,
|
|
4225
4298
|
{ runId, throughAttempt },
|
|
4226
4299
|
options,
|
|
4227
4300
|
),
|
|
4228
|
-
)));
|
|
4229
|
-
if (!deletionUnconfirmed) {
|
|
4230
|
-
const released = await deps.runWithClient((client) =>
|
|
4231
|
-
releasePostgresSchedulerReceiptsThroughAttempt(
|
|
4232
|
-
client,
|
|
4233
|
-
{ runId, throughAttempt },
|
|
4234
|
-
{ ...options, orgId: launch.orgId },
|
|
4235
4301
|
),
|
|
4236
|
-
)
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4302
|
+
release: () =>
|
|
4303
|
+
deps.runWithClient((client) =>
|
|
4304
|
+
releasePostgresSchedulerReceiptsThroughAttempt(
|
|
4305
|
+
client,
|
|
4306
|
+
{ runId, throughAttempt },
|
|
4307
|
+
{ ...options, orgId: launch.orgId },
|
|
4308
|
+
),
|
|
4309
|
+
),
|
|
4310
|
+
log: (level, event, fields) =>
|
|
4311
|
+
console[level](`[absurd-runtime.worker] ${event}`, {
|
|
4312
|
+
runId,
|
|
4313
|
+
generation,
|
|
4314
|
+
...fields,
|
|
4315
|
+
}),
|
|
4316
|
+
});
|
|
4243
4317
|
throw new DeferTask(
|
|
4244
4318
|
`Platform recovery deferred after the runner was lost: ${outcome.reason}`,
|
|
4245
4319
|
Math.max(1, Math.ceil(deferral.delayMs / 1_000)),
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunkPK6VYYEYjs = require('./chunk-PK6VYYEY.js');
|
|
4
|
+
require('./chunk-O655PVT4.js');
|
|
5
5
|
require('./chunk-E4CABWXL.js');
|
|
6
6
|
require('./chunk-6Y3DDRRN.js');
|
|
7
7
|
require('./chunk-NMU3VR5U.js');
|
|
8
8
|
require('./chunk-WSGXBROE.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk4PWBHYH4js = require('./chunk-4PWBHYH4.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
15
|
-
require('./chunk-
|
|
14
|
+
var _chunkBQYXIAJMjs = require('./chunk-BQYXIAJM.js');
|
|
15
|
+
require('./chunk-TT2XB433.js');
|
|
16
16
|
require('./chunk-T2N3B7IQ.js');
|
|
17
17
|
require('./chunk-XNYIZMNQ.js');
|
|
18
18
|
require('./chunk-SQWET4SL.js');
|
|
19
|
-
require('./chunk-
|
|
19
|
+
require('./chunk-F6XD4CRW.js');
|
|
20
20
|
require('./chunk-OG64RBAC.js');
|
|
21
21
|
require('./chunk-COGTRVWW.js');
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ require('./chunk-COGTRVWW.js');
|
|
|
24
24
|
var _promises = require('fs/promises');
|
|
25
25
|
var ARTIFACTS_FEATURE = "artifacts";
|
|
26
26
|
function print(command, json, data, lines) {
|
|
27
|
-
|
|
27
|
+
_chunk4PWBHYH4js.printCommandEnvelope.call(void 0,
|
|
28
28
|
{ command, ...data, render: { sections: [{ title: command, lines }] } },
|
|
29
29
|
{ json: Boolean(json), text: `${lines.join("\n")}
|
|
30
30
|
` }
|
|
@@ -56,7 +56,7 @@ function artifactLines(artifact) {
|
|
|
56
56
|
];
|
|
57
57
|
}
|
|
58
58
|
function registerArtifactsCommands(program) {
|
|
59
|
-
const artifacts = program.command("artifacts", { hidden: !
|
|
59
|
+
const artifacts = program.command("artifacts", { hidden: !_chunkBQYXIAJMjs.cliFeatureEnabled.call(void 0, ARTIFACTS_FEATURE) }).description(
|
|
60
60
|
"Show what a Play returns at a fixed URL on artifacts.deepline.com."
|
|
61
61
|
).addHelpText(
|
|
62
62
|
"after",
|
|
@@ -69,7 +69,7 @@ Examples:
|
|
|
69
69
|
);
|
|
70
70
|
artifacts.command("list").description("List this workspace's artifacts.").option("--cursor <cursor>", "Continue from a previous page of results").option("--limit <n>", "Results per request, up to 100", Number).option("--json", "Emit raw JSON response").action(
|
|
71
71
|
async (options) => run(async () => {
|
|
72
|
-
const result = await new (0,
|
|
72
|
+
const result = await new (0, _chunkPK6VYYEYjs.DeeplineClient)().listArtifacts({
|
|
73
73
|
cursor: options.cursor,
|
|
74
74
|
limit: options.limit
|
|
75
75
|
});
|
|
@@ -84,7 +84,7 @@ Examples:
|
|
|
84
84
|
);
|
|
85
85
|
artifacts.command("get <id>").description("Show one artifact and what you may do with it.").option("--json", "Emit raw JSON response").action(
|
|
86
86
|
async (id, options) => run(async () => {
|
|
87
|
-
const artifact = await new (0,
|
|
87
|
+
const artifact = await new (0, _chunkPK6VYYEYjs.DeeplineClient)().getArtifact(id);
|
|
88
88
|
print("artifacts get", options.json, artifact, [
|
|
89
89
|
...artifactLines(artifact),
|
|
90
90
|
` saved input ${JSON.stringify(artifact.input)}`
|
|
@@ -106,7 +106,7 @@ Examples:
|
|
|
106
106
|
`
|
|
107
107
|
).action(
|
|
108
108
|
async (options) => run(async () => {
|
|
109
|
-
const artifact = await new (0,
|
|
109
|
+
const artifact = await new (0, _chunkPK6VYYEYjs.DeeplineClient)().createArtifact({
|
|
110
110
|
name: options.name,
|
|
111
111
|
play: options.play,
|
|
112
112
|
...options.input !== void 0 ? {
|
|
@@ -146,7 +146,7 @@ Examples:
|
|
|
146
146
|
"Nothing to change. See: deepline artifacts edit --help"
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
|
-
const artifact = await new (0,
|
|
149
|
+
const artifact = await new (0, _chunkPK6VYYEYjs.DeeplineClient)().updateArtifact(id, fields);
|
|
150
150
|
print(
|
|
151
151
|
"artifacts edit",
|
|
152
152
|
options.json,
|
|
@@ -157,7 +157,7 @@ Examples:
|
|
|
157
157
|
);
|
|
158
158
|
artifacts.command("runs <id>").description("List runs of the artifact's Play, newest first.").option("--limit <n>", "Runs to list, up to 100", Number).option("--json", "Emit raw JSON response").action(
|
|
159
159
|
async (id, options) => run(async () => {
|
|
160
|
-
const result = await new (0,
|
|
160
|
+
const result = await new (0, _chunkPK6VYYEYjs.DeeplineClient)().listArtifactRuns(id, {
|
|
161
161
|
limit: options.limit
|
|
162
162
|
});
|
|
163
163
|
print("artifacts runs", options.json, result, [
|
|
@@ -176,7 +176,7 @@ Examples:
|
|
|
176
176
|
).option("--json", "Emit raw JSON response").action(
|
|
177
177
|
async (id, options) => run(async () => {
|
|
178
178
|
const input = options.input !== void 0 ? await readJsonOption(options.input, "--input") : void 0;
|
|
179
|
-
const started = await new (0,
|
|
179
|
+
const started = await new (0, _chunkPK6VYYEYjs.DeeplineClient)().refreshArtifact(id, input);
|
|
180
180
|
print("artifacts refresh", options.json, started, [
|
|
181
181
|
`Started run ${started.workflowId}.`,
|
|
182
182
|
`Watch it: deepline runs get ${started.workflowId}`
|
|
@@ -190,7 +190,7 @@ Examples:
|
|
|
190
190
|
if (access !== "workspace" && access !== "public") {
|
|
191
191
|
throw new Error("Access is workspace or public.");
|
|
192
192
|
}
|
|
193
|
-
const artifact = await new (0,
|
|
193
|
+
const artifact = await new (0, _chunkPK6VYYEYjs.DeeplineClient)().setArtifactAccess(
|
|
194
194
|
id,
|
|
195
195
|
access
|
|
196
196
|
);
|
|
@@ -204,7 +204,7 @@ Examples:
|
|
|
204
204
|
);
|
|
205
205
|
artifacts.command("delete <id>").description("Delete an artifact. Its Play and runs are not touched.").option("--json", "Emit raw JSON response").action(
|
|
206
206
|
async (id, options) => run(async () => {
|
|
207
|
-
const result = await new (0,
|
|
207
|
+
const result = await new (0, _chunkPK6VYYEYjs.DeeplineClient)().deleteArtifact(id);
|
|
208
208
|
print("artifacts delete", options.json, result, [
|
|
209
209
|
`Deleted artifact ${id}.`
|
|
210
210
|
]);
|
|
@@ -215,7 +215,7 @@ Examples:
|
|
|
215
215
|
);
|
|
216
216
|
permissions.command("get", { isDefault: true }).description("Show the workspace's artifact rules and what you may do.").option("--json", "Emit raw JSON response").action(
|
|
217
217
|
async (options) => run(async () => {
|
|
218
|
-
const result = await new (0,
|
|
218
|
+
const result = await new (0, _chunkPK6VYYEYjs.DeeplineClient)().getArtifactPermissions();
|
|
219
219
|
print("artifacts permissions", options.json, result, [
|
|
220
220
|
...Object.entries(result.rules).map(
|
|
221
221
|
([verb, level]) => `${verb}: ${level}`
|
|
@@ -253,7 +253,7 @@ Examples:
|
|
|
253
253
|
"Pass at least one rule. See: deepline artifacts permissions set --help"
|
|
254
254
|
);
|
|
255
255
|
}
|
|
256
|
-
const result = await new (0,
|
|
256
|
+
const result = await new (0, _chunkPK6VYYEYjs.DeeplineClient)().setArtifactPermissions(rules);
|
|
257
257
|
print(
|
|
258
258
|
"artifacts permissions set",
|
|
259
259
|
options.json,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-NH22WUUG.mjs";
|
|
4
|
+
import "./chunk-FJAGGBDR.mjs";
|
|
5
5
|
import "./chunk-L2VKAASU.mjs";
|
|
6
6
|
import "./chunk-HT675XNR.mjs";
|
|
7
7
|
import "./chunk-S3A4IXBQ.mjs";
|
|
8
8
|
import "./chunk-BMCRTI6Z.mjs";
|
|
9
9
|
import {
|
|
10
10
|
printCommandEnvelope
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CRE3OGHH.mjs";
|
|
12
12
|
import {
|
|
13
13
|
cliFeatureEnabled
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-CBMTBMIJ.mjs";
|
|
15
|
+
import "./chunk-5A2SIIPH.mjs";
|
|
16
16
|
import "./chunk-QNHHZ63P.mjs";
|
|
17
17
|
import "./chunk-DLIRSHV6.mjs";
|
|
18
18
|
import "./chunk-ZPGGW27Q.mjs";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-NIJE62ZD.mjs";
|
|
20
20
|
import "./chunk-WZYKRD7T.mjs";
|
|
21
21
|
import "./chunk-KRD6H754.mjs";
|
|
22
22
|
|
|
@@ -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 _chunkI3ICKVYHjs = require('./chunk-I3ICKVYH.js');
|
|
18
|
+
require('./chunk-4PWBHYH4.js');
|
|
19
|
+
require('./chunk-BQYXIAJM.js');
|
|
20
|
+
require('./chunk-TT2XB433.js');
|
|
21
|
+
require('./chunk-T2N3B7IQ.js');
|
|
22
|
+
require('./chunk-XNYIZMNQ.js');
|
|
23
|
+
require('./chunk-SQWET4SL.js');
|
|
24
|
+
require('./chunk-F6XD4CRW.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 = _chunkI3ICKVYHjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkI3ICKVYHjs.authStatusLine; exports.clearPendingClaim = _chunkI3ICKVYHjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkI3ICKVYHjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkI3ICKVYHjs.handleRegister; exports.handleStatus = _chunkI3ICKVYHjs.handleStatus; exports.handleWait = _chunkI3ICKVYHjs.handleWait; exports.httpJson = _chunkI3ICKVYHjs.httpJson; exports.readPendingAuthClaim = _chunkI3ICKVYHjs.readPendingAuthClaim; exports.readStatusBanner = _chunkI3ICKVYHjs.readStatusBanner; exports.registerAuthCommands = _chunkI3ICKVYHjs.registerAuthCommands; exports.reportApprovalLinkShown = _chunkI3ICKVYHjs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunkI3ICKVYHjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkI3ICKVYHjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkI3ICKVYHjs.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-FTJ2D3XD.mjs";
|
|
18
|
+
import "./chunk-CRE3OGHH.mjs";
|
|
19
|
+
import "./chunk-CBMTBMIJ.mjs";
|
|
20
|
+
import "./chunk-5A2SIIPH.mjs";
|
|
21
21
|
import "./chunk-QNHHZ63P.mjs";
|
|
22
22
|
import "./chunk-DLIRSHV6.mjs";
|
|
23
23
|
import "./chunk-ZPGGW27Q.mjs";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-NIJE62ZD.mjs";
|
|
25
25
|
import "./chunk-WZYKRD7T.mjs";
|
|
26
26
|
import "./chunk-KRD6H754.mjs";
|
|
27
27
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NH22WUUG.mjs";
|
|
4
4
|
import {
|
|
5
5
|
iterateCursorPages,
|
|
6
6
|
requireBillingIdempotencyKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FJAGGBDR.mjs";
|
|
8
8
|
import "./chunk-L2VKAASU.mjs";
|
|
9
9
|
import "./chunk-HT675XNR.mjs";
|
|
10
10
|
import "./chunk-S3A4IXBQ.mjs";
|
|
@@ -22,9 +22,9 @@ import {
|
|
|
22
22
|
openInBrowser,
|
|
23
23
|
printCommandEnvelope,
|
|
24
24
|
shouldEmitJson
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-CRE3OGHH.mjs";
|
|
26
|
+
import "./chunk-CBMTBMIJ.mjs";
|
|
27
|
+
import "./chunk-5A2SIIPH.mjs";
|
|
28
28
|
import {
|
|
29
29
|
AuthError,
|
|
30
30
|
ConfigError
|
|
@@ -33,7 +33,7 @@ import "./chunk-DLIRSHV6.mjs";
|
|
|
33
33
|
import {
|
|
34
34
|
DeeplineError
|
|
35
35
|
} from "./chunk-ZPGGW27Q.mjs";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-NIJE62ZD.mjs";
|
|
37
37
|
import "./chunk-WZYKRD7T.mjs";
|
|
38
38
|
import "./chunk-KRD6H754.mjs";
|
|
39
39
|
|