deepline 0.1.20 → 0.1.22
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/cli/index.js +845 -337
- package/dist/cli/index.mjs +902 -389
- package/dist/index.d.mts +23 -58
- package/dist/index.d.ts +23 -58
- package/dist/index.js +195 -92
- package/dist/index.mjs +195 -92
- package/dist/repo/apps/play-runner-workers/src/coordinator-entry.ts +888 -227
- package/dist/repo/apps/play-runner-workers/src/dedup-do.ts +540 -36
- package/dist/repo/apps/play-runner-workers/src/entry.ts +477 -374
- package/dist/repo/sdk/src/client.ts +245 -118
- package/dist/repo/sdk/src/http.ts +19 -1
- package/dist/repo/sdk/src/plays/harness-stub.ts +12 -0
- package/dist/repo/sdk/src/types.ts +8 -14
- package/dist/repo/sdk/src/version.ts +1 -1
- package/dist/repo/shared_libs/play-runtime/profiles.ts +4 -14
- package/dist/repo/shared_libs/play-runtime/runtime-actions.ts +1 -1
- package/dist/repo/shared_libs/play-runtime/scheduler-backend.ts +3 -6
- package/package.json +1 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Execution profile = the (scheduler, runner, dedup) tuple selected for a run.
|
|
3
3
|
*
|
|
4
|
-
* Profiles
|
|
4
|
+
* Profiles define the supported execution architectures:
|
|
5
5
|
* - `workers_edge` — Full-CF: Dynamic Workers + Cloudflare Workflows + DO dedup (default)
|
|
6
|
-
* - `legacy` — Daytona + Temporal + in-memory dedup (deprecated; kept for benchmarking)
|
|
7
6
|
* - `local` — Local subprocess + in-process scheduler (for tests)
|
|
8
7
|
*
|
|
9
8
|
* Selection: the API hardcodes `workers_edge` as the default. Per-run
|
|
@@ -30,7 +29,6 @@ export type PlayExecutionProfile = {
|
|
|
30
29
|
};
|
|
31
30
|
|
|
32
31
|
export const PLAY_EXECUTION_PROFILE_IDS = {
|
|
33
|
-
legacy: 'legacy',
|
|
34
32
|
workersEdge: 'workers_edge',
|
|
35
33
|
local: 'local',
|
|
36
34
|
} as const;
|
|
@@ -42,13 +40,6 @@ export const PLAY_EXECUTION_PROFILES: Record<
|
|
|
42
40
|
PlayExecutionProfileId,
|
|
43
41
|
PlayExecutionProfile
|
|
44
42
|
> = {
|
|
45
|
-
legacy: {
|
|
46
|
-
id: 'legacy',
|
|
47
|
-
scheduler: PLAY_SCHEDULER_BACKENDS.temporal,
|
|
48
|
-
runner: PLAY_RUNTIME_BACKENDS.daytona,
|
|
49
|
-
dedup: PLAY_DEDUP_BACKENDS.inMemory,
|
|
50
|
-
label: 'Daytona + Temporal (production today)',
|
|
51
|
-
},
|
|
52
43
|
workers_edge: {
|
|
53
44
|
id: 'workers_edge',
|
|
54
45
|
scheduler: PLAY_SCHEDULER_BACKENDS.cfWorkflows,
|
|
@@ -67,10 +58,9 @@ export const PLAY_EXECUTION_PROFILES: Record<
|
|
|
67
58
|
|
|
68
59
|
export function defaultExecutionProfile(): PlayExecutionProfile {
|
|
69
60
|
// Hardcoded. The full-Cloudflare path is the only production execution
|
|
70
|
-
// story
|
|
71
|
-
//
|
|
72
|
-
//
|
|
73
|
-
// env-var-based switching here.
|
|
61
|
+
// story: Dynamic Workflows + Dynamic Workers + DO dedup. local remains
|
|
62
|
+
// selectable via the per-run `profile` body field on POST /api/v2/plays/run
|
|
63
|
+
// for tests; do not reintroduce env-var-based switching here.
|
|
74
64
|
return PLAY_EXECUTION_PROFILES.workers_edge;
|
|
75
65
|
}
|
|
76
66
|
|
|
@@ -17,6 +17,7 @@ import type {
|
|
|
17
17
|
} from './ctx-types';
|
|
18
18
|
import type { ExecutionPlan } from './execution-plan';
|
|
19
19
|
import type { PlayRuntimeManifestMap } from '../plays/compiler-manifest';
|
|
20
|
+
import type { PreloadedRuntimeDbSession } from './db-session';
|
|
20
21
|
|
|
21
22
|
export const PLAY_SCHEDULER_BACKENDS = {
|
|
22
23
|
temporal: 'temporal',
|
|
@@ -79,6 +80,7 @@ export type PlaySchedulerSubmitInput = {
|
|
|
79
80
|
executionPlan?: ExecutionPlan | null;
|
|
80
81
|
childPlayManifests?: PlayRuntimeManifestMap | null;
|
|
81
82
|
playCallGovernance?: PlayCallGovernanceSnapshot | null;
|
|
83
|
+
preloadedDbSessions?: PreloadedRuntimeDbSession[] | null;
|
|
82
84
|
/** Optional immutable Worker module source for local Dynamic Worker loading. */
|
|
83
85
|
dynamicWorkerCode?: string | null;
|
|
84
86
|
executorToken: string;
|
|
@@ -109,12 +111,6 @@ export type PlaySchedulerProgressEvent =
|
|
|
109
111
|
|
|
110
112
|
export type PlaySchedulerRunHandle = {
|
|
111
113
|
runId: string;
|
|
112
|
-
/**
|
|
113
|
-
* Optional snapshot of the run's state captured during submit() so callers
|
|
114
|
-
* can skip an immediate follow-up status read. Populated by backends that
|
|
115
|
-
* piggyback the read on the create round-trip (currently cf-workflows).
|
|
116
|
-
*/
|
|
117
|
-
initialState?: Record<string, unknown> | null;
|
|
118
114
|
/**
|
|
119
115
|
* Stream live progress events. Implementations may use SSE, polling, etc.
|
|
120
116
|
* The contract: yields events in order until terminal status.
|
|
@@ -156,6 +152,7 @@ export interface PlaySchedulerBackend {
|
|
|
156
152
|
options?: {
|
|
157
153
|
coordinatorUrl?: string | null;
|
|
158
154
|
coordinatorInternalToken?: string | null;
|
|
155
|
+
initialState?: Record<string, unknown> | null;
|
|
159
156
|
},
|
|
160
157
|
): Promise<PlaySchedulerRunHandle>;
|
|
161
158
|
}
|