deepline 0.1.207 → 0.1.209
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/apps/play-runner-workers/src/runtime/receipts.ts +2 -12
- package/dist/bundling-sources/sdk/src/client.ts +10 -0
- package/dist/bundling-sources/sdk/src/http.ts +10 -1
- package/dist/bundling-sources/sdk/src/release.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +16 -31
- package/dist/bundling-sources/shared_libs/play-runtime/child-execution-strategy.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +312 -207
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +15 -0
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-runtime-config.ts +0 -5
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +429 -102
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +27 -5
- package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +31 -12
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +103 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +105 -10
- package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +21 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +32 -86
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +141 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +45 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +180 -447
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/suspension.ts +33 -1
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +11 -0
- package/dist/bundling-sources/shared_libs/plays/artifact-kind-guard.ts +112 -0
- package/dist/cli/index.js +38 -5
- package/dist/cli/index.mjs +38 -5
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +32 -5
- package/dist/index.mjs +32 -5
- package/package.json +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/child-run-lifecycle.ts +0 -70
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { RunExecutionScope } from './run-execution-scope';
|
|
2
|
-
|
|
3
|
-
export type ChildRunPlacement = 'inline' | 'scheduled';
|
|
4
|
-
|
|
5
|
-
export interface ChildRunLifecycleMetadata {
|
|
6
|
-
placement: ChildRunPlacement;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface ChildRunLifecycleAdapter<
|
|
10
|
-
Metadata extends ChildRunLifecycleMetadata,
|
|
11
|
-
Result,
|
|
12
|
-
> {
|
|
13
|
-
open(scope: RunExecutionScope, metadata: Metadata): Promise<void> | void;
|
|
14
|
-
started(scope: RunExecutionScope, metadata: Metadata): Promise<void> | void;
|
|
15
|
-
complete(
|
|
16
|
-
scope: RunExecutionScope,
|
|
17
|
-
metadata: Metadata,
|
|
18
|
-
result: Result,
|
|
19
|
-
): Promise<void> | void;
|
|
20
|
-
fail(
|
|
21
|
-
scope: RunExecutionScope,
|
|
22
|
-
metadata: Metadata,
|
|
23
|
-
error: unknown,
|
|
24
|
-
): Promise<void> | void;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface ExecuteChildRunLifecycleInput<
|
|
28
|
-
Metadata extends ChildRunLifecycleMetadata,
|
|
29
|
-
Result,
|
|
30
|
-
> {
|
|
31
|
-
scope: RunExecutionScope;
|
|
32
|
-
metadata: Metadata;
|
|
33
|
-
adapter: ChildRunLifecycleAdapter<Metadata, Result>;
|
|
34
|
-
execute(
|
|
35
|
-
scope: RunExecutionScope,
|
|
36
|
-
metadata: Metadata,
|
|
37
|
-
): Promise<Result> | Result;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Projects one logical child execution through its lifecycle. Placement is
|
|
42
|
-
* descriptive metadata; inline and scheduled children use the same protocol.
|
|
43
|
-
*/
|
|
44
|
-
export async function executeChildRunLifecycle<
|
|
45
|
-
Metadata extends ChildRunLifecycleMetadata,
|
|
46
|
-
Result,
|
|
47
|
-
>(input: ExecuteChildRunLifecycleInput<Metadata, Result>): Promise<Result> {
|
|
48
|
-
const { adapter, execute, metadata, scope } = input;
|
|
49
|
-
|
|
50
|
-
let result: Result;
|
|
51
|
-
try {
|
|
52
|
-
await adapter.open(scope, metadata);
|
|
53
|
-
await adapter.started(scope, metadata);
|
|
54
|
-
result = await execute(scope, metadata);
|
|
55
|
-
} catch (executionError) {
|
|
56
|
-
try {
|
|
57
|
-
await adapter.fail(scope, metadata, executionError);
|
|
58
|
-
} catch (failureProjectionError) {
|
|
59
|
-
throw new AggregateError(
|
|
60
|
-
[executionError, failureProjectionError],
|
|
61
|
-
'Child run execution and failure projection both failed',
|
|
62
|
-
{ cause: executionError },
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
throw executionError;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
await adapter.complete(scope, metadata, result);
|
|
69
|
-
return result;
|
|
70
|
-
}
|