deepline 0.3.309 → 0.3.310

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.
Files changed (86) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +67 -14
  3. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +4 -1
  4. package/dist/cli/auth-CP4YBO33.js +31 -0
  5. package/dist/cli/{auth-AA5SXOB6.mjs → auth-CS6NQ737.mjs} +4 -4
  6. package/dist/cli/{billing-6DJWMFV7.js → billing-7SIQJUEI.js} +70 -70
  7. package/dist/cli/{billing-CXUIXODY.mjs → billing-SDRP5BYV.mjs} +4 -4
  8. package/dist/cli/{chunk-6QWXPOZM.js → chunk-4YCPND5A.js} +2 -2
  9. package/dist/cli/{chunk-IQYTESPK.js → chunk-5VVRQY4Y.js} +6 -6
  10. package/dist/cli/{chunk-ATTN5BOA.mjs → chunk-7L27LIZO.mjs} +2 -2
  11. package/dist/cli/{chunk-A74BQEUC.mjs → chunk-AV4CJWNP.mjs} +175 -50
  12. package/dist/cli/{chunk-5VHI2LFM.js → chunk-D3HSRXCJ.js} +6 -6
  13. package/dist/cli/{chunk-52FXVKVC.js → chunk-DCUYMHHV.js} +48 -48
  14. package/dist/cli/{chunk-YBKMQLH2.mjs → chunk-HYACJPRJ.mjs} +1 -1
  15. package/dist/cli/{chunk-M2V27CEE.js → chunk-JVCD2CWD.js} +26 -26
  16. package/dist/cli/{chunk-3SZSFTLQ.js → chunk-KKAAKV77.js} +1 -1
  17. package/dist/cli/{chunk-TQ5BV5RT.mjs → chunk-LUJGLZCJ.mjs} +2 -2
  18. package/dist/cli/{chunk-N6P7NBX3.mjs → chunk-M4KGWEN2.mjs} +1 -1
  19. package/dist/cli/{chunk-CO5TGXG2.js → chunk-MWY35HT3.js} +250 -125
  20. package/dist/cli/{chunk-4SAHSARB.js → chunk-N2VXH4GK.js} +15 -15
  21. package/dist/cli/{chunk-W3CSORIT.mjs → chunk-NKRSVEP4.mjs} +1 -1
  22. package/dist/cli/{chunk-OTX2Z2Y7.mjs → chunk-NXFFT73P.mjs} +3 -3
  23. package/dist/cli/{chunk-GUUQJJBS.mjs → chunk-OJWZADOG.mjs} +1 -1
  24. package/dist/cli/{chunk-PAJVT47Z.js → chunk-PNNFR4L5.js} +6 -6
  25. package/dist/cli/{chunk-NZCFZXDP.js → chunk-QARMMLYE.js} +4 -4
  26. package/dist/cli/{chunk-V5PB43SQ.js → chunk-RYO6353O.js} +6 -6
  27. package/dist/cli/{chunk-YV5USGOP.mjs → chunk-T25I3M2J.mjs} +6 -6
  28. package/dist/cli/{chunk-3EVKBS6J.mjs → chunk-VN7Y4LVH.mjs} +1 -1
  29. package/dist/cli/{chunk-4A6BYN66.mjs → chunk-XOIOZ5JA.mjs} +2 -2
  30. package/dist/cli/{client-GXT2WRBH.mjs → client-G7HWPY6S.mjs} +3 -3
  31. package/dist/cli/client-MIVDO6SP.js +20 -0
  32. package/dist/cli/{csv-OLMTSK4E.mjs → csv-4JIXNZ6J.mjs} +3 -3
  33. package/dist/cli/{csv-FY7CVAUY.js → csv-6GDEDRY6.js} +12 -12
  34. package/dist/cli/{db-XHHF7SFB.js → db-MXNCRZNY.js} +20 -20
  35. package/dist/cli/{db-HWYKGEOK.mjs → db-TGAQ7XWX.mjs} +4 -4
  36. package/dist/cli/{executions-K2IJEKEN.js → executions-VEBKTUFZ.js} +6 -6
  37. package/dist/cli/{executions-5L7YUA7K.mjs → executions-XSGG4VCW.mjs} +4 -4
  38. package/dist/cli/{feedback-FZLBZKF7.js → feedback-GI3Q4RGW.js} +6 -6
  39. package/dist/cli/{feedback-BIN2IWO4.mjs → feedback-PY4ZCKEV.mjs} +3 -3
  40. package/dist/cli/git-5KB2XFJ6.js +23 -0
  41. package/dist/cli/{git-G4ULJPIH.mjs → git-7QAK7CKT.mjs} +4 -4
  42. package/dist/cli/index.js +73 -73
  43. package/dist/cli/index.mjs +30 -30
  44. package/dist/cli/{legacy-noops-TBTYKXMK.js → legacy-noops-2VT7K2VQ.js} +7 -7
  45. package/dist/cli/{legacy-noops-YBBLHKUV.mjs → legacy-noops-KCG3YZCN.mjs} +4 -4
  46. package/dist/cli/{monitors-PXBJTE6Q.js → monitors-7CLNZE7C.js} +85 -85
  47. package/dist/cli/{monitors-ZRNDHLTP.mjs → monitors-GTIHVO56.mjs} +4 -4
  48. package/dist/cli/{org-GR7CKJDU.mjs → org-FCPAM7NW.mjs} +4 -4
  49. package/dist/cli/{org-AUPHYG4W.js → org-HTA6MXVO.js} +60 -60
  50. package/dist/cli/{play-BXX6KDC5.js → play-Q5SVL5MG.js} +220 -220
  51. package/dist/cli/{play-7C4XXDLJ.mjs → play-YO22ZNSN.mjs} +6 -6
  52. package/dist/cli/{providers-2ALIWVHI.mjs → providers-25X5A5JC.mjs} +4 -4
  53. package/dist/cli/{providers-X3W5I7AI.js → providers-YHWPMW4J.js} +7 -7
  54. package/dist/cli/{quickstart-YU2FOUGV.js → quickstart-SLE7UMAK.js} +5 -5
  55. package/dist/cli/{quickstart-HFLMM6CB.mjs → quickstart-Z4CXNAQ3.mjs} +3 -3
  56. package/dist/cli/{search-5W6CX5FT.mjs → search-RQO3ZVKK.mjs} +5 -5
  57. package/dist/cli/{search-LBAPKYPL.js → search-UBWCREKT.js} +6 -6
  58. package/dist/cli/{secrets-N3LH3EFK.mjs → secrets-MV6MRXW5.mjs} +4 -4
  59. package/dist/cli/{secrets-4JYV6372.js → secrets-N37STTK4.js} +13 -13
  60. package/dist/cli/{sessions-4TCBDROP.mjs → sessions-4M2BUN2J.mjs} +4 -4
  61. package/dist/cli/{sessions-66MKLRBI.js → sessions-KBWZYHNE.js} +5 -5
  62. package/dist/cli/{settings-33RZDJOH.mjs → settings-EYMOSUED.mjs} +7 -7
  63. package/dist/cli/{settings-GQMXHDZN.js → settings-OCRYSYWC.js} +74 -74
  64. package/dist/cli/{setup-HU6LC4VR.js → setup-3UKEGBFB.js} +41 -41
  65. package/dist/cli/{setup-754356IS.mjs → setup-TUVPIGJV.mjs} +6 -6
  66. package/dist/cli/{skills-FLWPPQMH.mjs → skills-56ADS5BA.mjs} +4 -4
  67. package/dist/cli/skills-CUWFLZG4.js +28 -0
  68. package/dist/cli/{tools-IRLN4KYG.mjs → tools-M73P2E7K.mjs} +5 -5
  69. package/dist/cli/{tools-N4OW6HZK.js → tools-XSF6FCIM.js} +50 -50
  70. package/dist/cli/update-QOQRJM2S.js +28 -0
  71. package/dist/cli/{update-TOQOHGVE.mjs → update-Y6KMCBWD.mjs} +6 -6
  72. package/dist/cli/{workflow-WSYT32Y3.js → workflow-DHQ3NCVT.js} +15 -15
  73. package/dist/cli/{workflow-DRH7T3P4.mjs → workflow-DWKZA4FR.mjs} +5 -5
  74. package/dist/index.js +6 -6
  75. package/dist/index.mjs +3 -3
  76. package/dist/install-integrity.json +68 -68
  77. package/dist/release.d.mts +1 -1
  78. package/dist/release.d.ts +1 -1
  79. package/dist/release.js +2 -2
  80. package/dist/release.mjs +1 -1
  81. package/package.json +1 -1
  82. package/dist/cli/auth-MXBOMMLC.js +0 -31
  83. package/dist/cli/client-B2MYCJW5.js +0 -20
  84. package/dist/cli/git-KSXSQSH2.js +0 -23
  85. package/dist/cli/skills-WWO2EIQU.js +0 -28
  86. package/dist/cli/update-CLSJ7ODP.js +0 -28
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
200
200
  // getters keep their established compatibility behavior.
201
201
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
202
202
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
203
- version: '0.3.309',
203
+ version: '0.3.310',
204
204
  updateSummary:
205
205
  'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
206
206
  packageCapabilities: {
@@ -379,6 +379,12 @@ async function reconcileAndDeleteTimedOutDaytonaSandbox(input: {
379
379
  daytona: DaytonaClient;
380
380
  sandboxName: string;
381
381
  cancellationSignal?: AbortSignal;
382
+ emitStage?: DaytonaStageEmitter;
383
+ operationIdentity?: {
384
+ providerOperationToken: string;
385
+ orgId: string;
386
+ runId?: string;
387
+ };
382
388
  }): Promise<TimedOutDaytonaSandboxReconciliation> {
383
389
  if (!input.daytona.get) return { kind: 'not_found' };
384
390
  let lastDeleteConflict: unknown = null;
@@ -391,12 +397,26 @@ async function reconcileAndDeleteTimedOutDaytonaSandbox(input: {
391
397
  try {
392
398
  sandbox = await input.daytona.get(input.sandboxName);
393
399
  } catch (error) {
400
+ const providerStatus =
401
+ error && typeof error === 'object' && 'statusCode' in error
402
+ ? error.statusCode
403
+ : null;
404
+ input.emitStage?.('create:reconcile_lookup_failed', {
405
+ providerStatus:
406
+ typeof providerStatus === 'number' ? providerStatus : null,
407
+ });
408
+ // Invalid provider credentials are not a sandbox state transition.
409
+ if (providerStatus === 401 || providerStatus === 403) throw error;
394
410
  // A current absence is not proof that the sent create cannot commit.
395
411
  // Return it to the durable operation owner without another create or
396
412
  // releasing capacity; later recovery re-reads the same identity.
397
413
  if (isDaytonaSandboxNotFound(error)) return { kind: 'not_found' };
398
414
  continue;
399
415
  }
416
+ input.emitStage?.('create:reconcile_state', {
417
+ sandboxId: sandbox.id,
418
+ state: sandbox.state ?? null,
419
+ });
400
420
  // `create` waits only a bounded interval, but the named sandbox may finish
401
421
  // the same create transition immediately afterwards. It is already the
402
422
  // durable identity associated with this provider operation, so reusing it
@@ -405,6 +425,26 @@ async function reconcileAndDeleteTimedOutDaytonaSandbox(input: {
405
425
  if (sandbox.state === 'started') {
406
426
  return { kind: 'started', sandbox };
407
427
  }
428
+ if (input.operationIdentity) {
429
+ const expected = input.operationIdentity;
430
+ const configuredOrganizationId =
431
+ process.env.DAYTONA_ORGANIZATION_ID?.trim();
432
+ if (
433
+ sandbox.name !== input.sandboxName ||
434
+ sandbox.labels?.source !== DAYTONA_PLAY_RUNNER_LABEL_SOURCE ||
435
+ sandbox.labels?.operationKey !== expected.providerOperationToken ||
436
+ sandbox.labels?.orgId !== normalizeLabelValue(expected.orgId) ||
437
+ (normalizeLabelValue(expected.runId) &&
438
+ sandbox.labels?.runId !== normalizeLabelValue(expected.runId)) ||
439
+ !sandbox.organizationId?.trim() ||
440
+ (configuredOrganizationId &&
441
+ sandbox.organizationId !== configuredOrganizationId)
442
+ ) {
443
+ throw new Error(
444
+ 'Daytona resumed sandbox identity or organization routing does not match its reserved operation. Cleanup and fallback suppressed.',
445
+ );
446
+ }
447
+ }
408
448
  try {
409
449
  await input.daytona.delete(sandbox, 30);
410
450
  } catch (error) {
@@ -474,14 +514,24 @@ async function createRetriedOneShotDaytonaSandbox(input: {
474
514
  const reservation = await input.reserveSandboxCapacity?.(attempt);
475
515
  const sandboxName = daytonaSandboxName(reservation?.providerOperationToken);
476
516
  if (reservation?.resumeExistingProviderOperation) {
477
- if (!input.daytona.get) {
517
+ if (!reservation.providerOperationToken) {
478
518
  throw new DaytonaSandboxTransitionPendingError(sandboxName);
479
519
  }
480
- try {
481
- const sandbox = await input.daytona.get(sandboxName);
482
- if (sandbox.state !== 'started') {
483
- throw new DaytonaSandboxTransitionPendingError(sandboxName);
484
- }
520
+ // Recovery must converge when the timed-out create has stopped or failed,
521
+ // using the same provider-confirmed cleanup path as its initial observer.
522
+ const reconciliation = await reconcileAndDeleteTimedOutDaytonaSandbox({
523
+ daytona: input.daytona,
524
+ sandboxName,
525
+ cancellationSignal: input.cancellationSignal,
526
+ emitStage: input.emitStage,
527
+ operationIdentity: {
528
+ providerOperationToken: reservation.providerOperationToken,
529
+ orgId: input.orgId,
530
+ runId: input.context.runId ?? undefined,
531
+ },
532
+ });
533
+ if (reconciliation.kind === 'started') {
534
+ const sandbox = reconciliation.sandbox;
485
535
  const acquiredAt = Date.now();
486
536
  input.emitStage('create:resumed', {
487
537
  attempt,
@@ -494,15 +544,17 @@ async function createRetriedOneShotDaytonaSandbox(input: {
494
544
  attemptElapsedMs: acquiredAt - attemptStartedAt,
495
545
  sandboxCapacityLeaseId: reservation.leaseId,
496
546
  };
497
- } catch (error) {
498
- if (error instanceof DaytonaSandboxTransitionPendingError) throw error;
499
- if (!isDaytonaSandboxNotFound(error)) {
500
- throw new DaytonaSandboxTransitionPendingError(sandboxName);
501
- }
502
- // A lookup 404 does not prove that an earlier sent create cannot still
503
- // commit. Keep the durable identity reserved; never hedge its outcome.
504
- throw new DaytonaSandboxTransitionPendingError(sandboxName);
505
547
  }
548
+ if (reconciliation.kind === 'deleted') {
549
+ await input.releaseSandboxCapacity?.(reservation.leaseId);
550
+ throw new DaytonaSandboxAcquisitionUnavailableError(
551
+ 'daytona_sandbox_start_timeout',
552
+ 'The resumed timed-out Daytona sandbox was reconciled and deleted before fallback.',
553
+ );
554
+ }
555
+ // Neither absence nor an ongoing transition proves that create cannot
556
+ // commit. Retain the durable identity and its capacity reservation.
557
+ throw new DaytonaSandboxTransitionPendingError(sandboxName);
506
558
  }
507
559
  let sandbox: DaytonaSandbox;
508
560
  try {
@@ -551,6 +603,7 @@ async function createRetriedOneShotDaytonaSandbox(input: {
551
603
  daytona: input.daytona,
552
604
  sandboxName,
553
605
  cancellationSignal: input.cancellationSignal,
606
+ emitStage: input.emitStage,
554
607
  });
555
608
  } catch (reconciliationError) {
556
609
  await recordCreateFailure();
@@ -2271,6 +2271,10 @@ async function settleObservedTerminal(input: {
2271
2271
  });
2272
2272
  return;
2273
2273
  }
2274
+ // The terminal and its outbox fact are already committed. Visibility must
2275
+ // not wait for the mixed-version billing repair below; repair still finishes
2276
+ // before this worker retires the attempt.
2277
+ requestTerminalOutboxProjection({ ...input, trigger: input.source });
2274
2278
  const backfilledBilling = await input.deps.runWithClient((client) =>
2275
2279
  ensurePostgresSchedulerTerminalComputeBillingJob(
2276
2280
  client,
@@ -2288,7 +2292,6 @@ async function settleObservedTerminal(input: {
2288
2292
  },
2289
2293
  );
2290
2294
  }
2291
- requestTerminalOutboxProjection({ ...input, trigger: input.source });
2292
2295
  }
2293
2296
 
2294
2297
  /**
@@ -0,0 +1,31 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+ var _chunkDCUYMHHVjs = require('./chunk-DCUYMHHV.js');
13
+ require('./chunk-RYO6353O.js');
14
+ require('./chunk-QARMMLYE.js');
15
+ require('./chunk-XNYIZMNQ.js');
16
+ require('./chunk-KKAAKV77.js');
17
+ require('./chunk-7P5AA3SN.js');
18
+ require('./chunk-OG64RBAC.js');
19
+ require('./chunk-COGTRVWW.js');
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+ exports.EXIT_WORKSPACE_MISMATCH = _chunkDCUYMHHVjs.EXIT_WORKSPACE_MISMATCH; exports.clearPendingClaim = _chunkDCUYMHHVjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkDCUYMHHVjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkDCUYMHHVjs.handleRegister; exports.handleStatus = _chunkDCUYMHHVjs.handleStatus; exports.handleWait = _chunkDCUYMHHVjs.handleWait; exports.readPendingAuthClaim = _chunkDCUYMHHVjs.readPendingAuthClaim; exports.registerAuthCommands = _chunkDCUYMHHVjs.registerAuthCommands; exports.reportSetupCompleted = _chunkDCUYMHHVjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkDCUYMHHVjs.resolvePendingAuthClaimForResume;
@@ -9,11 +9,11 @@ import {
9
9
  registerAuthCommands,
10
10
  reportSetupCompleted,
11
11
  resolvePendingAuthClaimForResume
12
- } from "./chunk-TQ5BV5RT.mjs";
13
- import "./chunk-GUUQJJBS.mjs";
14
- import "./chunk-N6P7NBX3.mjs";
12
+ } from "./chunk-LUJGLZCJ.mjs";
13
+ import "./chunk-OJWZADOG.mjs";
14
+ import "./chunk-M4KGWEN2.mjs";
15
15
  import "./chunk-DLIRSHV6.mjs";
16
- import "./chunk-3EVKBS6J.mjs";
16
+ import "./chunk-VN7Y4LVH.mjs";
17
17
  import "./chunk-NXGCO4JB.mjs";
18
18
  import "./chunk-WZYKRD7T.mjs";
19
19
  import "./chunk-KRD6H754.mjs";