deepline 0.3.504 → 0.3.505
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/types.ts +5 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +144 -7
- 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-3L5AA5AX.mjs → auth-AHE2EDQA.mjs} +5 -5
- package/dist/cli/auth-SEPKNRHV.js +43 -0
- package/dist/cli/{billing-E7EASVPO.mjs → billing-7CPWTGGI.mjs} +7 -7
- package/dist/cli/{billing-HOGXVE2V.js → billing-JOIZPHON.js} +82 -82
- package/dist/cli/{chunk-67OI26OE.js → chunk-3YEOOXD4.js} +96 -37
- package/dist/cli/{chunk-IPAMOMGP.js → chunk-45XYW477.js} +21 -21
- package/dist/cli/{chunk-OX2D6BG4.mjs → chunk-4OFSAZN6.mjs} +1 -1
- package/dist/cli/{chunk-2ABRDH3B.mjs → chunk-52FPW2RD.mjs} +2 -2
- package/dist/cli/{chunk-NZ7Z7WNM.mjs → chunk-5XT4DZQL.mjs} +2 -2
- package/dist/cli/{chunk-FTRVCIGC.js → chunk-6FEN6VWZ.js} +26 -26
- package/dist/cli/{chunk-7F4OEHQK.mjs → chunk-6U3AGJWI.mjs} +1 -1
- package/dist/cli/{chunk-YOQ2NNDO.mjs → chunk-7AD565DO.mjs} +1 -1
- package/dist/cli/{chunk-JPR2546F.js → chunk-7DDACLMX.js} +16 -16
- package/dist/cli/{chunk-HUX5DZO6.mjs → chunk-7DDKLFOY.mjs} +3 -3
- package/dist/cli/{chunk-2W77YCKH.js → chunk-7QLK2GHL.js} +5 -5
- package/dist/cli/{chunk-XHZSPMNC.mjs → chunk-ACI6CUDX.mjs} +11 -401
- package/dist/cli/{chunk-7P2QVMBP.js → chunk-BWAYMJ23.js} +7 -7
- package/dist/cli/{chunk-UXQQPMYO.js → chunk-CA3SYXCS.js} +2 -2
- package/dist/cli/{chunk-SVFTZTCI.mjs → chunk-CSLLQWAB.mjs} +1 -1
- package/dist/cli/{chunk-QKKU2FH4.js → chunk-EMUFF6EU.js} +7 -7
- package/dist/cli/chunk-FIQ5UEIF.mjs +405 -0
- package/dist/cli/{chunk-KGUGNEKL.js → chunk-GAUNJCXQ.js} +96 -96
- package/dist/cli/{chunk-5Z6EULD5.js → chunk-GXMNOUHP.js} +6 -6
- package/dist/cli/{chunk-A6LA42JY.js → chunk-HASFFOSU.js} +16 -16
- package/dist/cli/{chunk-SMSQVRHE.js → chunk-IDAE5VDH.js} +5 -5
- package/dist/cli/{chunk-GGBXNQCR.mjs → chunk-IZYOYXG7.mjs} +4 -4
- package/dist/cli/{chunk-22OCKCYS.mjs → chunk-JA7YBRP4.mjs} +1 -1
- package/dist/cli/{chunk-6SMR7LU7.js → chunk-JSTKLYYD.js} +2 -2
- package/dist/cli/{chunk-UFYJTRSF.mjs → chunk-JVKEZT7L.mjs} +20 -6
- package/dist/cli/{chunk-GJ2DA35C.js → chunk-K26YOPDO.js} +20 -6
- package/dist/cli/{chunk-FISP4LCK.js → chunk-LC4FG34E.js} +53 -53
- package/dist/cli/{chunk-BTWUNKKX.mjs → chunk-MAFZ64RN.mjs} +2 -2
- package/dist/cli/{chunk-WZSFIJMG.js → chunk-MHZAG2ZQ.js} +80 -470
- package/dist/cli/{chunk-5CHBIJIM.mjs → chunk-NARJWXBR.mjs} +2 -2
- package/dist/cli/{chunk-VJVJWZ6I.mjs → chunk-OA6U5NVB.mjs} +5 -5
- package/dist/cli/{chunk-QOLX2O2S.mjs → chunk-OMEDQ77C.mjs} +93 -34
- package/dist/cli/{chunk-LHXYCZYO.js → chunk-OORPAQVC.js} +8 -8
- package/dist/cli/{chunk-Z6FXUDIL.mjs → chunk-PDLOPF5L.mjs} +1 -1
- package/dist/cli/{chunk-3MLFFWDM.mjs → chunk-PZN24YQQ.mjs} +2 -2
- package/dist/cli/{chunk-DEAJVQEG.mjs → chunk-QGNNAZ5M.mjs} +1 -1
- package/dist/cli/chunk-QYGYVCRI.js +405 -0
- package/dist/cli/{chunk-IGNQKOWT.mjs → chunk-RT3HJBIH.mjs} +12 -12
- package/dist/cli/{chunk-Y6XKCEPK.mjs → chunk-SHKRL7CW.mjs} +1 -1
- package/dist/cli/{chunk-UJMBG5JU.js → chunk-SPN7U3MV.js} +4 -4
- package/dist/cli/{chunk-MLMWM5DV.mjs → chunk-UZ24SF7N.mjs} +5 -5
- package/dist/cli/{chunk-USTJEEND.js → chunk-VXKWF3AD.js} +9 -9
- package/dist/cli/{chunk-Y7VEHKID.mjs → chunk-W6I4N4JN.mjs} +6 -6
- package/dist/cli/{chunk-MJTK6Q3G.js → chunk-WPCF7C6B.js} +3 -3
- package/dist/cli/{chunk-KCKAFTPY.js → chunk-WTQLUULB.js} +6 -6
- package/dist/cli/{chunk-BX45XMXZ.mjs → chunk-WTUC5VKB.mjs} +2 -2
- package/dist/cli/{chunk-6JNBMTCZ.js → chunk-XHPB6RGY.js} +1 -1
- package/dist/cli/{chunk-GRAGUYIE.js → chunk-Y52XY56V.js} +41 -41
- package/dist/cli/{chunk-4CC67XH5.mjs → chunk-YBIVVAL7.mjs} +2 -2
- package/dist/cli/{chunk-WBIDPDKJ.js → chunk-ZLN2B5YA.js} +3 -3
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-2XWGPITO.js → csv-DZHVIW3G.js} +13 -13
- package/dist/cli/{csv-433JEHLQ.mjs → csv-WTPI6ZON.mjs} +4 -4
- package/dist/cli/{db-PJJMD4VH.js → db-D7LPPNCC.js} +27 -27
- package/dist/cli/{db-K747DH43.mjs → db-NR4PJ6AF.mjs} +6 -6
- package/dist/cli/describe-HVQBTKFM.js +50 -0
- package/dist/cli/{describe-VEDDYW4P.mjs → describe-NCKAJPUG.mjs} +18 -17
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-JWRX3XCT.mjs → executions-RQVJ4LAB.mjs} +6 -6
- package/dist/cli/{executions-HM5T72H6.js → executions-UQG6LWEN.js} +8 -8
- package/dist/cli/{feedback-MNSIA63Y.mjs → feedback-RD4Y3YQR.mjs} +4 -4
- package/dist/cli/{feedback-34UG4BO3.js → feedback-TCHA67IA.js} +8 -8
- package/dist/cli/git-TUB2ZUEH.js +25 -0
- package/dist/cli/{git-ZKEOXV3A.mjs → git-Z7434B7Y.mjs} +5 -5
- package/dist/cli/index.js +143 -141
- package/dist/cli/index.mjs +49 -47
- package/dist/cli/{legacy-noops-YXSI4FVU.js → legacy-noops-23WRA7DH.js} +8 -8
- package/dist/cli/{legacy-noops-5M4T4ZVT.mjs → legacy-noops-LQJU4UIV.mjs} +5 -5
- package/dist/cli/{monitors-O25GDOYE.js → monitors-KOWN7M3V.js} +95 -95
- package/dist/cli/{monitors-C65OC4AW.mjs → monitors-Z6VYUZ2W.mjs} +7 -7
- package/dist/cli/{org-2GSPLY2A.js → org-2T5K2VP5.js} +72 -72
- package/dist/cli/{org-ZRMG5NS2.mjs → org-UBNRO5XO.mjs} +6 -6
- package/dist/cli/{pages-TZZUFBRO.mjs → pages-GHPJBVV3.mjs} +6 -6
- package/dist/cli/{pages-45DPADK6.js → pages-SRXTU7XO.js} +18 -18
- package/dist/cli/{play-RCGMND6X.js → play-2HMZ57EZ.js} +317 -316
- package/dist/cli/{play-3D7HH273.mjs → play-HRQKGTXA.mjs} +18 -17
- package/dist/cli/{providers-PSAKV6CJ.mjs → providers-JWJRFRR5.mjs} +6 -6
- package/dist/cli/{providers-3N3ECMTY.js → providers-P5O676MZ.js} +9 -9
- package/dist/cli/{quickstart-2A35SMGC.mjs → quickstart-S7NZUQRO.mjs} +4 -4
- package/dist/cli/{quickstart-6R6AIXM6.js → quickstart-YCY72TAO.js} +6 -6
- package/dist/cli/{run-F6ZXTASZ.js → run-MHLLGF4G.js} +41 -40
- package/dist/cli/{run-F3TLDGUO.mjs → run-QWMRIUIU.mjs} +23 -22
- package/dist/cli/{search-CZLCY3D2.mjs → search-4BFTQUEP.mjs} +8 -7
- package/dist/cli/search-QPUHOEIL.js +33 -0
- package/dist/cli/{search-output-R5XDNILW.js → search-output-62LBVZHN.js} +6 -6
- package/dist/cli/{search-output-MQTSTLN5.mjs → search-output-LIYHDTBP.mjs} +4 -4
- package/dist/cli/{secrets-D3GF4B2Z.mjs → secrets-GW27V77E.mjs} +6 -6
- package/dist/cli/{secrets-DCJYHDSY.js → secrets-KKKHVSOO.js} +15 -15
- package/dist/cli/{sessions-Z4JYJSDP.js → sessions-R3OEINAR.js} +6 -6
- package/dist/cli/{sessions-QGEQ2UYZ.mjs → sessions-R75LBGIL.mjs} +5 -5
- package/dist/cli/{settings-G7QEXA4N.mjs → settings-I3AQZSYG.mjs} +12 -11
- package/dist/cli/{settings-UVXXAT4A.js → settings-MQIHAEZN.js} +79 -78
- package/dist/cli/{setup-QHJU3DUI.mjs → setup-2YA5MYMS.mjs} +10 -9
- package/dist/cli/{setup-5I42W7D4.js → setup-X3QRJERP.js} +50 -49
- package/dist/cli/{skills-5LRF4UKX.mjs → skills-7252FOOI.mjs} +8 -7
- package/dist/cli/skills-BPZWMZSL.js +37 -0
- package/dist/cli/tools-F7RVQ3IK.js +57 -0
- package/dist/cli/{tools-PUT6STVG.mjs → tools-SKQTSVGE.mjs} +17 -16
- package/dist/cli/{update-CJ2GA64X.mjs → update-GNBBSKTB.mjs} +10 -9
- package/dist/cli/update-TLSY6LC2.js +35 -0
- package/dist/cli/{workflow-HVEWRTXD.mjs → workflow-OJSAL5FO.mjs} +7 -7
- package/dist/cli/{workflow-O67MEBCP.js → workflow-QB7YYWPP.js} +17 -17
- package/dist/{client-CIwenMFS.d.ts → client-B3GSaSFn.d.ts} +1 -1
- package/dist/{client-DYAfJpaN.d.mts → client-DEJg0CZn.d.mts} +1 -1
- package/dist/{client-core-DlzP8vEs.d.mts → client-core-C404E33V.d.mts} +5 -0
- package/dist/{client-core-CRjtyMAI.d.ts → client-core-GQmy3N8y.d.ts} +5 -0
- 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 +107 -104
- 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-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
|
@@ -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.505',
|
|
209
209
|
updateSummary: {
|
|
210
210
|
introducedIn: '0.3.90',
|
|
211
211
|
summary:
|
|
@@ -638,6 +638,11 @@ export interface ToolSearchResult {
|
|
|
638
638
|
search_mode?: 'v1' | 'v2';
|
|
639
639
|
/** Whether search fell back to category matching. */
|
|
640
640
|
search_fallback_to_category?: boolean;
|
|
641
|
+
/** Query-writing advice when phrasing is unclear, matches are weak, or the search is empty. */
|
|
642
|
+
search_guidance?: {
|
|
643
|
+
reason: 'poor_query' | 'low_confidence' | 'no_results';
|
|
644
|
+
message: string;
|
|
645
|
+
};
|
|
641
646
|
/** Requested categories no tool has, left out of the filter. */
|
|
642
647
|
unknown_categories?: string[];
|
|
643
648
|
/** Explanation and next commands when filters/search succeed but match zero tools. */
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"successDefinition": "Snapshots are complete, marts validate, and the versioned serving pointer advances atomically.",
|
|
104
104
|
"failureDefinition": "A snapshot, dbt/mart validation, artifact, or pointer publish fails.",
|
|
105
105
|
"startGraceMs": 600000,
|
|
106
|
-
"runTimeoutMs":
|
|
106
|
+
"runTimeoutMs": 10800000,
|
|
107
107
|
"failureAlert": "github_workflow_run",
|
|
108
108
|
"domainReportRequired": true
|
|
109
109
|
},
|
package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts
CHANGED
|
@@ -65,6 +65,20 @@ const DAYTONA_TIMED_OUT_CREATE_RECONCILE_DELAYS_MS = [
|
|
|
65
65
|
// It is not a fence: a stalled owner can outlast it, so name uniqueness and the
|
|
66
66
|
// attempt fences on abandon and promotion keep custody safe.
|
|
67
67
|
const DAYTONA_ABSENT_OPERATION_RECREATE_AFTER_MS = 3 * 60_000;
|
|
68
|
+
// A named create still `creating` this long after its operation was reserved
|
|
69
|
+
// is stuck on its runner, not slow. On 2026-11-11 Preview, 1,222 healthy
|
|
70
|
+
// creates returned in p99 3.4 s and at most 16 s, and Daytona's runner fails
|
|
71
|
+
// its own container start after 120 s ("sysbox container start timed out
|
|
72
|
+
// after 120s"). One runner whose VM boot hung instead held every sandbox
|
|
73
|
+
// placed on it in `creating` for 11+ minutes before reporting `error`. Past
|
|
74
|
+
// this age the create's own reconcile ladder, or a resumed recovery, hands
|
|
75
|
+
// that exact sandbox to durable cleanup and reports a provider start timeout
|
|
76
|
+
// before customer code, so the placement policy moves the run to Modal where
|
|
77
|
+
// it allows that transition; otherwise recovery retries on Daytona once the
|
|
78
|
+
// cleanup settles. The sandbox has never started: its operation is still
|
|
79
|
+
// `reserved`, and `deleting` can never be promoted to `live`, so no runner
|
|
80
|
+
// command can reach it afterwards.
|
|
81
|
+
export const DAYTONA_STUCK_CREATING_REPLACE_AFTER_MS = 2 * 60_000;
|
|
68
82
|
// Explicit runner deadline + scheduler GC own the normal lifecycle. Daytona's
|
|
69
83
|
// inactivity stop is a wider crash backstop measured from sandbox creation, so
|
|
70
84
|
// setup time cannot consume the terminal-flush grace.
|
|
@@ -720,10 +734,55 @@ type TimedOutDaytonaSandboxReconcileObserved = {
|
|
|
720
734
|
type TimedOutDaytonaSandboxReconciliation = (
|
|
721
735
|
| { kind: 'started'; sandbox: DaytonaSandbox }
|
|
722
736
|
| { kind: 'deleted' }
|
|
737
|
+
/** Past the replacement age in `creating`; durable cleanup now owns it. */
|
|
738
|
+
| {
|
|
739
|
+
kind: 'stuck_creating';
|
|
740
|
+
sandbox: DaytonaSandbox;
|
|
741
|
+
operationAgeMs: number;
|
|
742
|
+
}
|
|
723
743
|
| { kind: 'not_found' }
|
|
724
744
|
| { kind: 'transition_pending' }
|
|
725
745
|
) & { observed: TimedOutDaytonaSandboxReconcileObserved };
|
|
726
746
|
|
|
747
|
+
/**
|
|
748
|
+
* A create stuck in `creating` past DAYTONA_STUCK_CREATING_REPLACE_AFTER_MS was
|
|
749
|
+
* handed to durable cleanup. Report it as a provider start timeout before
|
|
750
|
+
* customer code, the same failure the placement policy already moves to Modal.
|
|
751
|
+
* The log line feeds the Slack notice naming the runner.
|
|
752
|
+
*/
|
|
753
|
+
function daytonaStuckCreatingUnavailable(input: {
|
|
754
|
+
daytona: DaytonaClient;
|
|
755
|
+
context: DaytonaExecutionContext;
|
|
756
|
+
phase: 'create_reconcile' | 'resume';
|
|
757
|
+
providerAttempt: number;
|
|
758
|
+
reconciliation: Extract<
|
|
759
|
+
TimedOutDaytonaSandboxReconciliation,
|
|
760
|
+
{ kind: 'stuck_creating' }
|
|
761
|
+
>;
|
|
762
|
+
}): DaytonaSandboxAcquisitionUnavailableError {
|
|
763
|
+
const { sandbox, operationAgeMs } = input.reconciliation;
|
|
764
|
+
const placement = input.daytona.placementForLog?.(sandbox) ?? {};
|
|
765
|
+
console.warn('[play-runner.daytona.stuck_creating]', {
|
|
766
|
+
event: 'play_runner.daytona.stuck_creating',
|
|
767
|
+
runId: input.context.runId ?? null,
|
|
768
|
+
workflowId: input.context.workflowId ?? null,
|
|
769
|
+
phase: input.phase,
|
|
770
|
+
providerAttempt: input.providerAttempt,
|
|
771
|
+
sandboxId: sandbox.id,
|
|
772
|
+
operationAgeMs,
|
|
773
|
+
runnerId: placement.runnerId ?? null,
|
|
774
|
+
target: placement.target ?? null,
|
|
775
|
+
runtimeEnvironment:
|
|
776
|
+
process.env.DEEPLINE_RUNTIME_ENVIRONMENT === 'preview'
|
|
777
|
+
? 'preview'
|
|
778
|
+
: 'production',
|
|
779
|
+
});
|
|
780
|
+
return new DaytonaSandboxAcquisitionUnavailableError(
|
|
781
|
+
'daytona_sandbox_start_timeout',
|
|
782
|
+
`Daytona sandbox ${sandbox.id} stayed in creating for ${Math.round(operationAgeMs / 1_000)} s and was handed to cleanup before customer code started.`,
|
|
783
|
+
);
|
|
784
|
+
}
|
|
785
|
+
|
|
727
786
|
async function reconcileAndDeleteTimedOutDaytonaSandbox(input: {
|
|
728
787
|
daytona: DaytonaClient;
|
|
729
788
|
sandboxName: string;
|
|
@@ -738,6 +797,13 @@ async function reconcileAndDeleteTimedOutDaytonaSandbox(input: {
|
|
|
738
797
|
recordCleanupIntent?: (
|
|
739
798
|
intent: PlayRunnerDaytonaCleanupIntent,
|
|
740
799
|
) => Promise<void>;
|
|
800
|
+
/**
|
|
801
|
+
* Age of the reserved operation when this ladder started: the database
|
|
802
|
+
* clock on resume, or time since the create was sent in the creating
|
|
803
|
+
* process. Absent when it is unknown (a lease that expired), and then a
|
|
804
|
+
* `creating` sandbox is never replaced.
|
|
805
|
+
*/
|
|
806
|
+
operationAgeAtStartMs?: number;
|
|
741
807
|
}): Promise<TimedOutDaytonaSandboxReconciliation> {
|
|
742
808
|
const reconcileStartedAt = Date.now();
|
|
743
809
|
let last = NO_DAYTONA_NAMED_SANDBOX_LOOKUP;
|
|
@@ -753,6 +819,10 @@ async function reconcileAndDeleteTimedOutDaytonaSandbox(input: {
|
|
|
753
819
|
deleteTimeouts,
|
|
754
820
|
elapsedMs: Date.now() - reconcileStartedAt,
|
|
755
821
|
});
|
|
822
|
+
const operationAgeMs = (): number | null =>
|
|
823
|
+
input.operationAgeAtStartMs === undefined
|
|
824
|
+
? null
|
|
825
|
+
: input.operationAgeAtStartMs + (Date.now() - reconcileStartedAt);
|
|
756
826
|
if (!input.daytona.get) return { kind: 'not_found', observed: observed() };
|
|
757
827
|
let lastDeleteConflict: unknown = null;
|
|
758
828
|
let sawDeleteTimeout = false;
|
|
@@ -813,14 +883,44 @@ async function reconcileAndDeleteTimedOutDaytonaSandbox(input: {
|
|
|
813
883
|
}
|
|
814
884
|
// Keep an in-progress create under its original reservation. A late start
|
|
815
885
|
// belongs to the same operation, unless a prior DELETE timed out and made
|
|
816
|
-
// that sandbox's future state ambiguous
|
|
817
|
-
|
|
886
|
+
// that sandbox's future state ambiguous, or the create has outlived any
|
|
887
|
+
// healthy runner (DAYTONA_STUCK_CREATING_REPLACE_AFTER_MS). Only the
|
|
888
|
+
// durable cleanup owner may take a stuck create: deleting a creating
|
|
889
|
+
// sandbox in process turned failed deletes into terminal Play failures
|
|
890
|
+
// (docs/incidents/2026-11-03-daytona-create.md).
|
|
891
|
+
const ageMs = operationAgeMs();
|
|
892
|
+
const stuckCreatingAgeMs =
|
|
893
|
+
sandbox.state === 'creating' &&
|
|
894
|
+
input.recordCleanupIntent !== undefined &&
|
|
895
|
+
Boolean(input.operationIdentity?.runId) &&
|
|
896
|
+
Boolean(sandbox.organizationId?.trim()) &&
|
|
897
|
+
ageMs !== null &&
|
|
898
|
+
ageMs >= DAYTONA_STUCK_CREATING_REPLACE_AFTER_MS
|
|
899
|
+
? ageMs
|
|
900
|
+
: null;
|
|
901
|
+
const creatingPastReplacementAge = stuckCreatingAgeMs !== null;
|
|
902
|
+
if (
|
|
903
|
+
sandbox.state === 'creating' &&
|
|
904
|
+
!sawDeleteTimeout &&
|
|
905
|
+
!creatingPastReplacementAge
|
|
906
|
+
) {
|
|
907
|
+
continue;
|
|
908
|
+
}
|
|
818
909
|
if (sandbox.state === 'started' && !sawDeleteTimeout) {
|
|
819
910
|
return { kind: 'started', sandbox, observed: observed() };
|
|
820
911
|
}
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
912
|
+
if (creatingPastReplacementAge) {
|
|
913
|
+
input.emitStage?.('create:stuck_creating_cleanup', {
|
|
914
|
+
sandboxId: sandbox.id,
|
|
915
|
+
operationAgeMs: ageMs,
|
|
916
|
+
});
|
|
917
|
+
}
|
|
918
|
+
// Persist the exact identity before handing stable, stuck-creating, or
|
|
919
|
+
// ambiguously-deleted resources to the cleanup worker. A sandbox that is
|
|
920
|
+
// still creating stays with its create until it is past the replacement
|
|
921
|
+
// age: before then it may complete and be safely resumed. The intent moves
|
|
922
|
+
// the operation from `reserved` to `deleting`, which no writer promotes to
|
|
923
|
+
// `live`, so a late start of this sandbox can never receive a command.
|
|
824
924
|
if (input.operationIdentity && input.recordCleanupIntent) {
|
|
825
925
|
if (!input.operationIdentity.runId || !sandbox.organizationId?.trim()) {
|
|
826
926
|
throw new Error(
|
|
@@ -835,6 +935,14 @@ async function reconcileAndDeleteTimedOutDaytonaSandbox(input: {
|
|
|
835
935
|
sandboxId: sandbox.id,
|
|
836
936
|
routingDomain: sandbox.organizationId,
|
|
837
937
|
});
|
|
938
|
+
if (stuckCreatingAgeMs !== null) {
|
|
939
|
+
return {
|
|
940
|
+
kind: 'stuck_creating',
|
|
941
|
+
sandbox,
|
|
942
|
+
operationAgeMs: stuckCreatingAgeMs,
|
|
943
|
+
observed: observed(),
|
|
944
|
+
};
|
|
945
|
+
}
|
|
838
946
|
return { kind: 'transition_pending', observed: observed() };
|
|
839
947
|
}
|
|
840
948
|
// After a DELETE timed out, never run the sandbox until this same named
|
|
@@ -950,9 +1058,15 @@ async function createRetriedOneShotDaytonaSandbox(input: {
|
|
|
950
1058
|
if (!reservation.providerOperationToken) {
|
|
951
1059
|
throw new DaytonaSandboxTransitionPendingError(sandboxName);
|
|
952
1060
|
}
|
|
953
|
-
// Recovery must converge when the timed-out create has stopped
|
|
954
|
-
//
|
|
1061
|
+
// Recovery must converge when the timed-out create has stopped, failed,
|
|
1062
|
+
// or stayed `creating` past any healthy runner, using the same
|
|
1063
|
+
// provider-confirmed cleanup path as its initial observer.
|
|
955
1064
|
const reconciliation = await reconcileAndDeleteTimedOutDaytonaSandbox({
|
|
1065
|
+
...(reservation.existingProviderOperationAgeMs === undefined
|
|
1066
|
+
? {}
|
|
1067
|
+
: {
|
|
1068
|
+
operationAgeAtStartMs: reservation.existingProviderOperationAgeMs,
|
|
1069
|
+
}),
|
|
956
1070
|
daytona: input.daytona,
|
|
957
1071
|
sandboxName,
|
|
958
1072
|
cancellationSignal: input.cancellationSignal,
|
|
@@ -987,6 +1101,17 @@ async function createRetriedOneShotDaytonaSandbox(input: {
|
|
|
987
1101
|
'The resumed timed-out Daytona sandbox was reconciled and deleted before fallback.',
|
|
988
1102
|
);
|
|
989
1103
|
}
|
|
1104
|
+
// Cleanup owns the stuck sandbox and its capacity lease until Daytona
|
|
1105
|
+
// confirms it gone; the operation is `deleting` and never runs the Play.
|
|
1106
|
+
if (reconciliation.kind === 'stuck_creating') {
|
|
1107
|
+
throw daytonaStuckCreatingUnavailable({
|
|
1108
|
+
daytona: input.daytona,
|
|
1109
|
+
context: input.context,
|
|
1110
|
+
phase: 'resume',
|
|
1111
|
+
providerAttempt: attempt,
|
|
1112
|
+
reconciliation,
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
990
1115
|
// Neither absence nor an ongoing transition proves that create cannot
|
|
991
1116
|
// commit, so inside the create window retain the durable identity and
|
|
992
1117
|
// its capacity reservation. The detail only records which of the two
|
|
@@ -1088,6 +1213,9 @@ async function createRetriedOneShotDaytonaSandbox(input: {
|
|
|
1088
1213
|
let reconciliation: TimedOutDaytonaSandboxReconciliation;
|
|
1089
1214
|
try {
|
|
1090
1215
|
reconciliation = await reconcileAndDeleteTimedOutDaytonaSandbox({
|
|
1216
|
+
// The create was sent at attemptStartedAt, just after its
|
|
1217
|
+
// reservation committed.
|
|
1218
|
+
operationAgeAtStartMs: Date.now() - attemptStartedAt,
|
|
1091
1219
|
daytona: input.daytona,
|
|
1092
1220
|
sandboxName,
|
|
1093
1221
|
cancellationSignal: input.cancellationSignal,
|
|
@@ -1141,6 +1269,15 @@ async function createRetriedOneShotDaytonaSandbox(input: {
|
|
|
1141
1269
|
};
|
|
1142
1270
|
}
|
|
1143
1271
|
await recordCreateFailure();
|
|
1272
|
+
if (reconciliation.kind === 'stuck_creating') {
|
|
1273
|
+
throw daytonaStuckCreatingUnavailable({
|
|
1274
|
+
daytona: input.daytona,
|
|
1275
|
+
context: input.context,
|
|
1276
|
+
phase: 'create_reconcile',
|
|
1277
|
+
providerAttempt: attempt,
|
|
1278
|
+
reconciliation,
|
|
1279
|
+
});
|
|
1280
|
+
}
|
|
1144
1281
|
// Same decision as before; the detail records what the ladder saw.
|
|
1145
1282
|
const reconcileObserved = reconciliation.observed;
|
|
1146
1283
|
const reconcilePending = (): DaytonaSandboxTransitionPendingError =>
|
|
@@ -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
|
+
}
|
|
@@ -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-7DDKLFOY.mjs";
|
|
18
|
+
import "./chunk-PZN24YQQ.mjs";
|
|
19
|
+
import "./chunk-SHKRL7CW.mjs";
|
|
20
|
+
import "./chunk-7AD565DO.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-6U3AGJWI.mjs";
|
|
25
25
|
import "./chunk-WZYKRD7T.mjs";
|
|
26
26
|
import "./chunk-KRD6H754.mjs";
|
|
27
27
|
export {
|
|
@@ -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 _chunkLC4FG34Ejs = require('./chunk-LC4FG34E.js');
|
|
18
|
+
require('./chunk-EMUFF6EU.js');
|
|
19
|
+
require('./chunk-ZLN2B5YA.js');
|
|
20
|
+
require('./chunk-SPN7U3MV.js');
|
|
21
|
+
require('./chunk-ALJJRZNJ.js');
|
|
22
|
+
require('./chunk-XNYIZMNQ.js');
|
|
23
|
+
require('./chunk-DIAWYWT5.js');
|
|
24
|
+
require('./chunk-XHPB6RGY.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 = _chunkLC4FG34Ejs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkLC4FG34Ejs.authStatusLine; exports.clearPendingClaim = _chunkLC4FG34Ejs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkLC4FG34Ejs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkLC4FG34Ejs.handleRegister; exports.handleStatus = _chunkLC4FG34Ejs.handleStatus; exports.handleWait = _chunkLC4FG34Ejs.handleWait; exports.httpJson = _chunkLC4FG34Ejs.httpJson; exports.readPendingAuthClaim = _chunkLC4FG34Ejs.readPendingAuthClaim; exports.readStatusBanner = _chunkLC4FG34Ejs.readStatusBanner; exports.registerAuthCommands = _chunkLC4FG34Ejs.registerAuthCommands; exports.reportApprovalLinkShown = _chunkLC4FG34Ejs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunkLC4FG34Ejs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkLC4FG34Ejs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkLC4FG34Ejs.statusBannerLine;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-52FPW2RD.mjs";
|
|
4
4
|
import {
|
|
5
5
|
iterateCursorPages,
|
|
6
6
|
requireBillingIdempotencyKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4OFSAZN6.mjs";
|
|
8
8
|
import "./chunk-L2VKAASU.mjs";
|
|
9
9
|
import "./chunk-N4TR6QRI.mjs";
|
|
10
10
|
import "./chunk-S3A4IXBQ.mjs";
|
|
11
11
|
import "./chunk-BMCRTI6Z.mjs";
|
|
12
12
|
import {
|
|
13
13
|
PLAY_RUNTIME_PRICING_NOTE
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JVKEZT7L.mjs";
|
|
15
15
|
import "./chunk-5LUF4LAR.mjs";
|
|
16
16
|
import {
|
|
17
17
|
PLAY_SANDBOX_SIZE_INPUTS
|
|
@@ -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-PZN24YQQ.mjs";
|
|
26
|
+
import "./chunk-SHKRL7CW.mjs";
|
|
27
|
+
import "./chunk-7AD565DO.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-HBL4PM5Q.mjs";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-6U3AGJWI.mjs";
|
|
37
37
|
import "./chunk-WZYKRD7T.mjs";
|
|
38
38
|
import "./chunk-KRD6H754.mjs";
|
|
39
39
|
|