deepline 0.1.208 → 0.1.210

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 (39) hide show
  1. package/dist/bundling-sources/apps/play-runner-workers/src/coordinator-entry.ts +0 -2
  2. package/dist/bundling-sources/apps/play-runner-workers/src/entry.ts +102 -138
  3. package/dist/bundling-sources/apps/play-runner-workers/src/runtime/receipts.ts +2 -12
  4. package/dist/bundling-sources/apps/play-runner-workers/src/runtime/tool-dispatch.ts +12 -4
  5. package/dist/bundling-sources/apps/play-runner-workers/src/runtime/tool-receipts.ts +25 -92
  6. package/dist/bundling-sources/sdk/src/client.ts +10 -0
  7. package/dist/bundling-sources/sdk/src/play.ts +2 -2
  8. package/dist/bundling-sources/sdk/src/release.ts +2 -2
  9. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +16 -31
  10. package/dist/bundling-sources/shared_libs/play-runtime/child-execution-strategy.ts +18 -0
  11. package/dist/bundling-sources/shared_libs/play-runtime/child-run-id.ts +4 -5
  12. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +316 -232
  13. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +16 -2
  14. package/dist/bundling-sources/shared_libs/play-runtime/daytona-runtime-config.ts +0 -5
  15. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +2 -4
  16. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +1 -0
  17. package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +429 -102
  18. package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +27 -5
  19. package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +18 -0
  20. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +31 -12
  21. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +103 -0
  22. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +105 -10
  23. package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +21 -1
  24. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +32 -86
  25. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +141 -2
  26. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +45 -0
  27. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +180 -447
  28. package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +12 -0
  29. package/dist/bundling-sources/shared_libs/play-runtime/suspension.ts +33 -1
  30. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +11 -0
  31. package/dist/bundling-sources/shared_libs/plays/artifact-kind-guard.ts +112 -0
  32. package/dist/cli/index.js +33 -8
  33. package/dist/cli/index.mjs +33 -8
  34. package/dist/index.d.mts +11 -2
  35. package/dist/index.d.ts +11 -2
  36. package/dist/index.js +26 -4
  37. package/dist/index.mjs +26 -4
  38. package/package.json +1 -1
  39. package/dist/bundling-sources/shared_libs/play-runtime/child-run-lifecycle.ts +0 -70
@@ -281,7 +281,6 @@ export type CustomerDbQueryHandler = (
281
281
 
282
282
  export interface PlayCallOptions {
283
283
  description?: string;
284
- staleAfterSeconds?: number;
285
284
  }
286
285
 
287
286
  export interface StepOptions {
@@ -412,6 +411,14 @@ export type PlayExecutionEvent =
412
411
  completedRows: number;
413
412
  failedRows: number;
414
413
  totalRows?: number;
414
+ /**
415
+ * Inline child-play composition aggregates for this run. Maintained by the
416
+ * single-writer progress path (never per child), so fan-out cannot contend.
417
+ * See ADR 0013.
418
+ */
419
+ childrenTotal?: number;
420
+ childrenOk?: number;
421
+ childrenFailed?: number;
415
422
  at: number;
416
423
  }
417
424
  | {
@@ -436,6 +443,13 @@ export type PlayExecutionEvent =
436
443
  completedRows: number;
437
444
  failedRows: number;
438
445
  totalRows?: number;
446
+ /**
447
+ * Inline child-play composition aggregates for this run. Maintained by the
448
+ * single-writer progress path (never per child). See ADR 0013.
449
+ */
450
+ childrenTotal?: number;
451
+ childrenOk?: number;
452
+ childrenFailed?: number;
439
453
  at: number;
440
454
  };
441
455
 
@@ -576,7 +590,7 @@ export interface ContextOptions {
576
590
  runId?: string;
577
591
  /** Physical executor run that owns leases for an inline child context. */
578
592
  runtimeReceiptOwnerRunId?: string;
579
- /** Logical invocation scope for nested step/fetch/runPlay receipt identity. */
593
+ /** Logical invocation scope for receipts created inside an inline child. */
580
594
  runtimeReceiptScope?: string;
581
595
  runAttempt?: number | null;
582
596
  /**
@@ -1,7 +1,6 @@
1
1
  import type { Daytona } from '@daytonaio/sdk';
2
2
 
3
3
  export const DAYTONA_DEFAULT_WORKDIR = '/home/daytona';
4
- export const DAYTONA_BACKGROUND_CLEANUP_ENV = 'DAYTONA_BACKGROUND_CLEANUP';
5
4
 
6
5
  export type DaytonaClientOptions = NonNullable<
7
6
  ConstructorParameters<typeof Daytona>[0]
@@ -28,10 +27,6 @@ export function daytonaClientOptions(apiKey: string): DaytonaClientOptions {
28
27
  };
29
28
  }
30
29
 
31
- export function shouldCleanupSandboxInBackground(): boolean {
32
- return process.env[DAYTONA_BACKGROUND_CLEANUP_ENV]?.trim() === '1';
33
- }
34
-
35
30
  export function loadDaytonaRequiredConfig(): DaytonaRequiredConfig {
36
31
  const apiKey = process.env.DAYTONA_API_KEY?.trim();
37
32
  if (!apiKey) {
@@ -9,7 +9,7 @@ import {
9
9
 
10
10
  export const DURABLE_CALL_CACHE_POLICY_VERSION = 'call-cache-v1';
11
11
 
12
- export type DurableCallKind = 'tool' | 'step' | 'fetch' | 'runPlay';
12
+ export type DurableCallKind = 'tool' | 'step' | 'fetch';
13
13
 
14
14
  function validateStaleAfterSeconds(staleAfterSeconds?: number | null): void {
15
15
  if (staleAfterSeconds === undefined || staleAfterSeconds === null) {
@@ -121,16 +121,14 @@ export function buildDurableCtxCallCacheKey(input: {
121
121
  return `ctx:${orgId}:call:${input.kind}:${normalizedId}:${digest}`;
122
122
  }
123
123
 
124
- export function buildDurableRunPlaySemanticKey(input: {
124
+ export function buildDurableRunPlayInvocationScope(input: {
125
125
  childPlayName: string;
126
126
  input: Record<string, unknown>;
127
- childRevisionFingerprint?: string | null;
128
127
  rowScope?: Record<string, unknown> | null;
129
128
  }): string {
130
129
  return sha256Hex(
131
130
  stableStringify({
132
131
  childPlayName: input.childPlayName.trim(),
133
- childRevisionFingerprint: input.childRevisionFingerprint ?? null,
134
132
  input: input.input,
135
133
  rowScope: input.rowScope ?? null,
136
134
  }),
@@ -8,6 +8,7 @@ export const RUNTIME_EXECUTION_CAPABILITIES = [
8
8
  'event.wait',
9
9
  'run.child',
10
10
  'run.progress',
11
+ 'run.heartbeat',
11
12
  'sheet.read',
12
13
  'sheet.write',
13
14
  'db.session',