@actiondock/core 2.9.1 → 2.11.0
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/README.md +1 -2
- package/dist/catalog/action-catalog.js +3 -33
- package/dist/catalog/discovery.d.ts +0 -3
- package/dist/catalog/discovery.js +4 -4
- package/dist/catalog/graph.d.ts +0 -4
- package/dist/catalog/graph.js +12 -15
- package/dist/{profile/client-actions.d.ts → client/actions.d.ts} +1 -1
- package/dist/{profile/client-actions.js → client/actions.js} +2 -8
- package/dist/{profile/client-config.d.ts → client/config.d.ts} +1 -1
- package/dist/{profile/client-config.js → client/config.js} +1 -1
- package/dist/client/dispatcher.d.ts +4 -0
- package/dist/client/dispatcher.js +21 -0
- package/dist/client/health.d.ts +38 -0
- package/dist/{profile/client-health.js → client/health.js} +9 -6
- package/dist/client/index.d.ts +16 -0
- package/dist/client/index.js +20 -0
- package/dist/{profile/client-playbooks.d.ts → client/playbooks.d.ts} +1 -1
- package/dist/{profile/client-playbooks.js → client/playbooks.js} +1 -1
- package/dist/{profile/client-runs.d.ts → client/runs.d.ts} +4 -2
- package/dist/{profile/client-runs.js → client/runs.js} +7 -1
- package/dist/{profile/client-state.d.ts → client/state.d.ts} +1 -1
- package/dist/{profile/client-state.js → client/state.js} +1 -1
- package/dist/{profile/client-transport.d.ts → client/transport.d.ts} +29 -10
- package/dist/{profile/client-transport.js → client/transport.js} +125 -35
- package/dist/doctor/checks/index.d.ts +1 -1
- package/dist/doctor/checks/index.js +1 -1
- package/dist/doctor/checks/project.js +24 -92
- package/dist/doctor/checks/registry.js +1 -1
- package/dist/doctor/checks/runtime.d.ts +0 -4
- package/dist/doctor/checks/runtime.js +0 -28
- package/dist/doctor/doctor.js +1 -2
- package/dist/errors.d.ts +85 -4
- package/dist/errors.js +114 -4
- package/dist/execution/service.d.ts +55 -37
- package/dist/execution/service.js +601 -212
- package/dist/execution/types.d.ts +24 -5
- package/dist/host/host.d.ts +42 -22
- package/dist/host/host.js +565 -150
- package/dist/host/routing.js +6 -6
- package/dist/host/types.d.ts +25 -13
- package/dist/index.d.ts +9 -4
- package/dist/index.js +5 -2
- package/dist/input/advice.d.ts +0 -44
- package/dist/input/advice.js +7 -141
- package/dist/input/describe.d.ts +6 -0
- package/dist/input/describe.js +26 -1
- package/dist/input/flat-materializer.js +1 -1
- package/dist/input/flat-parser.js +1 -1
- package/dist/input/index.d.ts +0 -1
- package/dist/input/index.js +0 -1
- package/dist/input/input-resolver.js +2 -2
- package/dist/input/validation-mapper.d.ts +1 -1
- package/dist/invocation/policy.js +2 -0
- package/dist/ipc/diagnostic.d.ts +8 -21
- package/dist/ipc/diagnostic.js +24 -57
- package/dist/ipc/host.js +21 -7
- package/dist/ipc/service.d.ts +14 -0
- package/dist/ipc/service.js +132 -26
- package/dist/ipc/types.d.ts +0 -4
- package/dist/package/index.d.ts +4 -5
- package/dist/package/index.js +1 -2
- package/dist/package/runtime.d.ts +94 -23
- package/dist/package/runtime.js +628 -274
- package/dist/package/static-index.d.ts +3 -6
- package/dist/package/static-index.js +11 -40
- package/dist/package/types.d.ts +19 -4
- package/dist/platform/index.d.ts +2 -1
- package/dist/platform/index.js +2 -1
- package/dist/platform/loader-hook.d.ts +32 -0
- package/dist/platform/loader-hook.js +90 -0
- package/dist/{node → platform}/module-loader.d.ts +13 -0
- package/dist/{node → platform}/module-loader.js +51 -4
- package/dist/platform/node.d.ts +19 -8
- package/dist/platform/node.js +50 -20
- package/dist/platform/types.d.ts +7 -47
- package/dist/process/context-process.d.ts +3 -18
- package/dist/process/context-process.js +3 -44
- package/dist/process/control.d.ts +21 -0
- package/dist/process/control.js +34 -0
- package/dist/process/converters.d.ts +23 -0
- package/dist/process/converters.js +92 -0
- package/dist/process/cursor.js +2 -22
- package/dist/process/{diagnostics-sink.d.ts → diagnostics.d.ts} +0 -7
- package/dist/process/{diagnostics-sink.js → diagnostics.js} +6 -8
- package/dist/process/index.d.ts +1 -3
- package/dist/process/index.js +1 -3
- package/dist/process/input-dispatcher.d.ts +4 -13
- package/dist/process/input-dispatcher.js +48 -69
- package/dist/process/managed-record.d.ts +3 -31
- package/dist/process/metadata-store.d.ts +0 -41
- package/dist/process/metadata-store.js +2 -341
- package/dist/process/process-driver.js +2 -2
- package/dist/process/process-manager.d.ts +8 -50
- package/dist/process/process-manager.js +28 -417
- package/dist/process/quotas.d.ts +14 -0
- package/dist/process/quotas.js +29 -0
- package/dist/process/run-executor.js +0 -1
- package/dist/process/terminal-output-cache.d.ts +20 -34
- package/dist/process/terminal-output-cache.js +43 -64
- package/dist/profile/index.d.ts +1 -2
- package/dist/profile/index.js +1 -2
- package/dist/profile/manager.d.ts +2 -4
- package/dist/profile/manager.js +10 -40
- package/dist/profile/types.d.ts +1 -17
- package/dist/project/digest.d.ts +5 -1
- package/dist/project/digest.js +81 -219
- package/dist/project/index.d.ts +4 -5
- package/dist/project/index.js +4 -5
- package/dist/project/init.js +2 -2
- package/dist/project/loader.d.ts +3 -3
- package/dist/project/loader.js +72 -50
- package/dist/project/lockfile.js +6 -5
- package/dist/project/manifest.js +5 -4
- package/dist/project/transactions.d.ts +4 -42
- package/dist/project/transactions.js +83 -138
- package/dist/project/types-generator.js +2 -1
- package/dist/project/types.d.ts +2 -0
- package/dist/registry/index.d.ts +0 -1
- package/dist/registry/index.js +0 -1
- package/dist/registry/lock.d.ts +2 -11
- package/dist/registry/lock.js +14 -183
- package/dist/registry/registry.d.ts +1 -6
- package/dist/registry/registry.js +5 -17
- package/dist/runtime/action-registry.d.ts +1 -5
- package/dist/runtime/action-registry.js +0 -12
- package/dist/runtime/context.js +2 -2
- package/dist/runtime/events.d.ts +11 -50
- package/dist/runtime/events.js +88 -368
- package/dist/runtime/index.d.ts +0 -4
- package/dist/runtime/index.js +0 -4
- package/dist/runtime/run-persistence.d.ts +2 -0
- package/dist/runtime/run-persistence.js +2 -1
- package/dist/runtime/standalone-commands.d.ts +18 -0
- package/dist/runtime/standalone-commands.js +466 -0
- package/dist/runtime/standalone-help.d.ts +20 -0
- package/dist/runtime/standalone-help.js +72 -0
- package/dist/runtime/standalone.d.ts +1 -44
- package/dist/runtime/standalone.js +31 -526
- package/dist/schema/validator.d.ts +2 -2
- package/dist/schema/validator.js +2 -9
- package/dist/server/index.d.ts +0 -2
- package/dist/server/index.js +0 -2
- package/dist/server/routes/actions.js +1 -1
- package/dist/server/routes/info.js +1 -1
- package/dist/server/routes/playbooks.js +1 -1
- package/dist/server/routes/runs.js +123 -16
- package/dist/server/routes/state.js +43 -18
- package/dist/server/security.d.ts +1 -1
- package/dist/server/security.js +2 -2
- package/dist/server/server.js +3 -7
- package/dist/service/factory.js +4 -3
- package/dist/service/index.d.ts +1 -1
- package/dist/service/index.js +1 -1
- package/dist/service/remote-errors.d.ts +1 -1
- package/dist/service/remote-errors.js +6 -6
- package/dist/service/remote-polling.d.ts +3 -0
- package/dist/service/remote-polling.js +10 -5
- package/dist/service/remote.d.ts +5 -1
- package/dist/service/remote.js +108 -17
- package/dist/service/sse-stream.js +2 -2
- package/dist/service/types.d.ts +22 -19
- package/dist/service/types.js +1 -24
- package/dist/storage/clock.d.ts +1 -1
- package/dist/storage/clock.js +1 -1
- package/dist/storage/data-dir-lock.d.ts +10 -22
- package/dist/storage/data-dir-lock.js +28 -56
- package/dist/storage/file-lock.d.ts +64 -0
- package/dist/storage/file-lock.js +447 -0
- package/dist/storage/index.d.ts +2 -2
- package/dist/storage/index.js +5 -4
- package/dist/storage/run-liveness.d.ts +48 -0
- package/dist/storage/run-liveness.js +44 -0
- package/dist/storage/sqlite-config.d.ts +16 -0
- package/dist/storage/sqlite-config.js +59 -0
- package/dist/storage/sqlite-driver.d.ts +3 -1
- package/dist/storage/sqlite-driver.js +14 -4
- package/dist/storage/sqlite-events.d.ts +13 -0
- package/dist/storage/sqlite-events.js +48 -0
- package/dist/storage/sqlite-runs.d.ts +107 -0
- package/dist/storage/sqlite-runs.js +622 -0
- package/dist/storage/sqlite-schema.d.ts +5 -0
- package/dist/storage/sqlite-schema.js +143 -0
- package/dist/storage/sqlite-state.d.ts +33 -0
- package/dist/storage/sqlite-state.js +270 -0
- package/dist/storage/sqlite.d.ts +30 -57
- package/dist/storage/sqlite.js +84 -741
- package/dist/storage/types.d.ts +35 -2
- package/dist/utils/index.d.ts +18 -14
- package/dist/utils/index.js +37 -29
- package/dist/utils/semver.d.ts +18 -0
- package/dist/utils/semver.js +19 -0
- package/dist/utils/warning.d.ts +1 -0
- package/dist/utils/warning.js +52 -0
- package/dist/{json/value-validator.d.ts → value-validator.d.ts} +9 -0
- package/dist/value-validator.js +330 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +10 -12
- package/dist/execution/index.d.ts +0 -2
- package/dist/execution/index.js +0 -2
- package/dist/filter/index.d.ts +0 -1
- package/dist/filter/index.js +0 -1
- package/dist/graph/index.d.ts +0 -4
- package/dist/graph/index.js +0 -4
- package/dist/input/metadata.d.ts +0 -99
- package/dist/input/metadata.js +0 -99
- package/dist/invocation/index.d.ts +0 -2
- package/dist/invocation/index.js +0 -2
- package/dist/ipc/index.d.ts +0 -4
- package/dist/ipc/index.js +0 -4
- package/dist/json/index.d.ts +0 -1
- package/dist/json/index.js +0 -1
- package/dist/json/value-validator.js +0 -330
- package/dist/node/index.d.ts +0 -1
- package/dist/node/index.js +0 -1
- package/dist/platform/node-fs.d.ts +0 -37
- package/dist/platform/node-fs.js +0 -81
- package/dist/process/control-arbiter.d.ts +0 -108
- package/dist/process/control-arbiter.js +0 -250
- package/dist/process/process-executor.d.ts +0 -47
- package/dist/process/process-executor.js +0 -296
- package/dist/profile/client-health.d.ts +0 -14
- package/dist/profile/client-query.d.ts +0 -30
- package/dist/profile/client-query.js +0 -69
- package/dist/profile/client.d.ts +0 -26
- package/dist/profile/client.js +0 -31
- package/dist/project/closure.d.ts +0 -25
- package/dist/project/closure.js +0 -74
- package/dist/registry/store.d.ts +0 -42
- package/dist/registry/store.js +0 -43
- package/dist/runtime/clock.d.ts +0 -7
- package/dist/runtime/clock.js +0 -7
- package/dist/runtime/module-loader.d.ts +0 -2
- package/dist/runtime/module-loader.js +0 -1
- package/dist/runtime/process.d.ts +0 -8
- package/dist/runtime/process.js +0 -1
- package/dist/runtime/runner.d.ts +0 -234
- package/dist/runtime/runner.js +0 -609
- package/dist/schema/index.d.ts +0 -1
- package/dist/schema/index.js +0 -1
- package/dist/server/dispatcher.d.ts +0 -25
- package/dist/server/dispatcher.js +0 -54
- package/dist/service/local.d.ts +0 -27
- package/dist/service/local.js +0 -141
- package/dist/storage/driver.d.ts +0 -10
- package/dist/storage/driver.js +0 -10
- package/dist/storage/lazy.d.ts +0 -8
- package/dist/storage/lazy.js +0 -45
- package/dist/storage/lock-core.d.ts +0 -158
- package/dist/storage/lock-core.js +0 -872
- package/dist/utils/net.d.ts +0 -10
- package/dist/utils/net.js +0 -16
- package/dist/utils/process.d.ts +0 -10
- package/dist/utils/process.js +0 -21
- /package/dist/{filter → utils}/intent.d.ts +0 -0
- /package/dist/{filter → utils}/intent.js +0 -0
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
import type { ActionDefinition, ActionRef, ExecutionEvent, ExecutionResult, JsonValue, Logger, ProcessAPI, RunRecord, RunStatus } from "@actiondock/sdk";
|
|
2
2
|
import type { ProjectConfig } from "../project/types.js";
|
|
3
|
-
import type {
|
|
4
|
-
import type { Clock } from "../runtime/clock.js";
|
|
3
|
+
import type { Clock } from "../storage/clock.js";
|
|
5
4
|
import type { EventSink } from "../runtime/events.js";
|
|
6
5
|
import type { RuntimeStorage } from "../storage/types.js";
|
|
7
|
-
import type { ModuleLoader } from "../
|
|
6
|
+
import type { ModuleLoader } from "../platform/module-loader.js";
|
|
8
7
|
import { type PackageIdentity, type RunOptions, type InvocationContext, createInvocationContext, createRootInvocationContext } from "../invocation/types.js";
|
|
9
|
-
import type { LocalActionResolver } from "../runtime/runner.js";
|
|
10
8
|
export { createInvocationContext, createRootInvocationContext };
|
|
11
|
-
export type { PackageIdentity, RunOptions, InvocationContext
|
|
9
|
+
export type { PackageIdentity, RunOptions, InvocationContext };
|
|
10
|
+
/**
|
|
11
|
+
* 局部动作解析器委托函数契约(仅限当前包内部动作)。
|
|
12
|
+
*/
|
|
13
|
+
export type LocalActionResolver = (actionId: string) => ActionDefinition | undefined | Promise<ActionDefinition | undefined>;
|
|
14
|
+
/**
|
|
15
|
+
* 异步执行句柄,支持获取执行结果 Promise 与主动取消操作。
|
|
16
|
+
*/
|
|
17
|
+
export interface ExecutionHandle {
|
|
18
|
+
/** 本次执行生成的全局唯一运行 ID */
|
|
19
|
+
runId: string;
|
|
20
|
+
/** 最终执行结果信封 Promise */
|
|
21
|
+
result: Promise<ExecutionResult>;
|
|
22
|
+
/**
|
|
23
|
+
* 取消当前正在执行的任务
|
|
24
|
+
* @param reason 取消原因
|
|
25
|
+
* @returns 是否成功触发取消
|
|
26
|
+
*/
|
|
27
|
+
cancel(reason?: string): boolean;
|
|
28
|
+
}
|
|
12
29
|
/**
|
|
13
30
|
* 跨包动作调用委托函数。
|
|
14
31
|
*/
|
|
@@ -47,6 +64,8 @@ export interface ExecutionTicket {
|
|
|
47
64
|
status: RunStatus;
|
|
48
65
|
/** 任务终态结果 Promise(用于需要异步等待执行结果的场景) */
|
|
49
66
|
result?: Promise<ExecutionResult>;
|
|
67
|
+
/** 取消执行操作(与 ExecutionHandle 对齐) */
|
|
68
|
+
cancel?: (reason?: string) => boolean;
|
|
50
69
|
}
|
|
51
70
|
/**
|
|
52
71
|
* 取消操作结果枚举。
|
package/dist/host/host.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ActionRef,
|
|
1
|
+
import type { ActionRef, ExecutionResult, JsonValue, RunRecord } from "@actiondock/sdk";
|
|
2
2
|
import type { PackageInfo, PackageRuntime, ActionSpec, ActionSummary, ListActionsOptions, PlaybookSpec, PlaybookSummary } from "../package/types.js";
|
|
3
3
|
import type { CancelResult, ExecutionTicket } from "../execution/types.js";
|
|
4
4
|
import { type RunOptions } from "../invocation/types.js";
|
|
5
5
|
import { InvocationPolicy } from "../invocation/policy.js";
|
|
6
|
-
import type { ActionDockHost, ActionDockHostOptions } from "./types.js";
|
|
7
|
-
import type { ConfigValueView, ListRunsOptions, StateScopeOptions } from "../service/types.js";
|
|
6
|
+
import type { ActionDockHost, ActionDockHostOptions, HostEventsPort } from "./types.js";
|
|
7
|
+
import type { ConfigPort, ConfigValueView, DiscoveryPort, ExecutionPort, ListRunsOptions, RunsPort, StatePort, StateScopeOptions } from "../service/types.js";
|
|
8
8
|
import type { StateEntry } from "../storage/types.js";
|
|
9
9
|
export declare class DefaultActionDockHost implements ActionDockHost {
|
|
10
10
|
readonly hostSessionId: string;
|
|
@@ -24,24 +24,46 @@ export declare class DefaultActionDockHost implements ActionDockHost {
|
|
|
24
24
|
private graph;
|
|
25
25
|
private catalog;
|
|
26
26
|
private globalStorage?;
|
|
27
|
+
private initPromise?;
|
|
28
|
+
private isInitialized;
|
|
29
|
+
readonly discovery: DiscoveryPort;
|
|
30
|
+
readonly execution: ExecutionPort;
|
|
31
|
+
readonly runs: RunsPort;
|
|
32
|
+
readonly events: HostEventsPort;
|
|
33
|
+
readonly management?: {
|
|
34
|
+
config: ConfigPort;
|
|
35
|
+
state: StatePort;
|
|
36
|
+
};
|
|
37
|
+
/** 自引用 host 属性,向后兼容服务实例字段访问 */
|
|
38
|
+
get host(): ActionDockHost;
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated 直接使用 new DefaultActionDockHost() 构造已弃用,请迁移至 createActionDockHost() 异步工厂函数以完成完整的生命周期初始化。
|
|
41
|
+
*/
|
|
27
42
|
constructor(options?: ActionDockHostOptions, internalOptions?: {
|
|
28
|
-
|
|
43
|
+
fromFactory?: boolean;
|
|
29
44
|
});
|
|
30
|
-
private initializeSync;
|
|
31
|
-
initializeAsync(): Promise<void>;
|
|
32
45
|
/**
|
|
33
|
-
*
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
*
|
|
46
|
+
* 静态工厂方法:创建并初始化 ActionDockHost 宿主容器。
|
|
47
|
+
*/
|
|
48
|
+
static create(options?: ActionDockHostOptions): Promise<ActionDockHost>;
|
|
49
|
+
/**
|
|
50
|
+
* 确保宿主容器已完成异步生命周期初始化。
|
|
51
|
+
* 当通过 ActionDockHost.create() / createActionDockHost() 创建时在工厂阶段预先就绪;
|
|
52
|
+
* 当直接通过 new DefaultActionDockHost() 构造时,在首次异步调用时惰性触发加载。
|
|
53
|
+
*/
|
|
54
|
+
private ensureInitialized;
|
|
55
|
+
private performInitialization;
|
|
56
|
+
/**
|
|
57
|
+
* 持有者预热:等待内部创建的全部包完成存储准备(含运行记录恢复),
|
|
58
|
+
* 并打开共享全局存储。预热的是存储,不是执行服务、进程接口或业务模块;
|
|
59
|
+
* 任一包准备失败按既有初始化失败时机整体回滚。
|
|
60
|
+
* 外部注入的 Runtime 保持既有生命周期约定,不在此预热。
|
|
38
61
|
*/
|
|
39
|
-
private
|
|
62
|
+
private prewarmManagedRuntimes;
|
|
40
63
|
/**
|
|
41
64
|
* 异步安全回滚初始化失败时所占用的资源。
|
|
42
65
|
*/
|
|
43
66
|
rollbackInitialization(): Promise<void>;
|
|
44
|
-
private rollbackSync;
|
|
45
67
|
/**
|
|
46
68
|
* 阶段函数:注册显式传入的 packages 列表(PackageRuntimeOptions 配置或包目录物理路径)。
|
|
47
69
|
*/
|
|
@@ -84,8 +106,9 @@ export declare class DefaultActionDockHost implements ActionDockHost {
|
|
|
84
106
|
describePlaybook(id: string): Promise<PlaybookSpec>;
|
|
85
107
|
runAction(ref: ActionRef | string, input: JsonValue, options?: RunOptions): Promise<ExecutionResult>;
|
|
86
108
|
startAction(ref: ActionRef | string, input: JsonValue, options?: RunOptions): Promise<ExecutionTicket>;
|
|
87
|
-
getRun(runId: string): Promise<RunRecord | undefined>;
|
|
88
|
-
listRuns(query?: ListRunsOptions): Promise<RunRecord[]>;
|
|
109
|
+
getRun(runId: string, signal?: AbortSignal): Promise<RunRecord | undefined>;
|
|
110
|
+
listRuns(query?: ListRunsOptions, signal?: AbortSignal): Promise<RunRecord[]>;
|
|
111
|
+
countRuns(query?: ListRunsOptions, signal?: AbortSignal): Promise<number>;
|
|
89
112
|
clearRuns(options?: {
|
|
90
113
|
packageId?: string;
|
|
91
114
|
actionId?: string;
|
|
@@ -95,11 +118,7 @@ export declare class DefaultActionDockHost implements ActionDockHost {
|
|
|
95
118
|
}): Promise<number>;
|
|
96
119
|
cleanExpiredRuns(policy?: import("../storage/types.js").RunsRetentionPolicy): Promise<number>;
|
|
97
120
|
cancelRun(runId: string, reason?: string): Promise<CancelResult>;
|
|
98
|
-
|
|
99
|
-
after?: number | string;
|
|
100
|
-
signal?: AbortSignal;
|
|
101
|
-
maxQueueSize?: number;
|
|
102
|
-
}): AsyncIterable<ExecutionEvent>;
|
|
121
|
+
private subscribeEvents;
|
|
103
122
|
private getGlobalStorage;
|
|
104
123
|
private findDeclaredConfigItem;
|
|
105
124
|
private resolveRuntime;
|
|
@@ -114,8 +133,8 @@ export declare class DefaultActionDockHost implements ActionDockHost {
|
|
|
114
133
|
getState<T extends JsonValue = JsonValue>(packageId: string, actionId: string, key: string, options?: StateScopeOptions): Promise<T | undefined>;
|
|
115
134
|
setState<T extends JsonValue = JsonValue>(packageId: string, actionId: string, key: string, value: T, options?: StateScopeOptions): Promise<void>;
|
|
116
135
|
deleteState(packageId: string, actionId: string, key: string, options?: StateScopeOptions): Promise<boolean>;
|
|
117
|
-
listStateKeys(packageId: string, actionId
|
|
118
|
-
clearState(packageId: string, actionId
|
|
136
|
+
listStateKeys(packageId: string, actionId?: string, options?: StateScopeOptions): Promise<string[]>;
|
|
137
|
+
clearState(packageId: string, actionId?: string, options?: StateScopeOptions): Promise<number>;
|
|
119
138
|
listStateEntries(packageId: string, options?: any): Promise<StateEntry[]>;
|
|
120
139
|
/**
|
|
121
140
|
* 优雅关闭宿主容器。
|
|
@@ -123,6 +142,7 @@ export declare class DefaultActionDockHost implements ActionDockHost {
|
|
|
123
142
|
* 外部传入借用的 Runtime 实例生命周期完全由调用方负责管理,Host 关闭时仅解绑引用并清理自身内部实例。
|
|
124
143
|
*/
|
|
125
144
|
close(options?: {
|
|
145
|
+
timeoutMs?: number;
|
|
126
146
|
graceMs?: number;
|
|
127
147
|
}): Promise<void>;
|
|
128
148
|
}
|