@actiondock/core 2.19.0 → 2.21.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/dist/client/config.d.ts +17 -14
- package/dist/client/config.js +112 -14
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/errors.d.ts +13 -1
- package/dist/errors.js +25 -0
- package/dist/execution/service.js +44 -10
- package/dist/execution/types.d.ts +3 -3
- package/dist/host/host.d.ts +20 -1
- package/dist/host/host.js +430 -66
- package/dist/host/types.d.ts +13 -1
- package/dist/index.d.ts +11 -3
- package/dist/index.js +5 -1
- package/dist/input/config-override.d.ts +5 -0
- package/dist/input/config-override.js +23 -0
- package/dist/input/input-resolver.d.ts +24 -7
- package/dist/input/input-resolver.js +73 -5
- package/dist/invocation/bindings.d.ts +53 -0
- package/dist/invocation/bindings.js +248 -0
- package/dist/invocation/policy.d.ts +5 -1
- package/dist/invocation/policy.js +16 -9
- package/dist/invocation/remote.d.ts +40 -0
- package/dist/invocation/remote.js +489 -0
- package/dist/invocation/types.d.ts +33 -0
- package/dist/invocation/types.js +11 -1
- package/dist/package/index.d.ts +2 -2
- package/dist/package/runtime.js +48 -15
- package/dist/platform/node.d.ts +6 -0
- package/dist/platform/node.js +59 -16
- package/dist/platform/types.d.ts +59 -1
- package/dist/process/command-executor.d.ts +35 -0
- package/dist/process/command-executor.js +326 -0
- package/dist/process/index.d.ts +1 -0
- package/dist/process/index.js +1 -0
- package/dist/process/process-driver.d.ts +19 -6
- package/dist/process/process-driver.js +223 -54
- package/dist/process/run-executor.js +101 -47
- package/dist/project/config-declarations.d.ts +61 -0
- package/dist/project/config-declarations.js +297 -0
- package/dist/project/dependencies.d.ts +92 -0
- package/dist/project/dependencies.js +543 -0
- package/dist/project/index.d.ts +8 -2
- package/dist/project/index.js +8 -2
- package/dist/project/init.js +2 -2
- package/dist/project/loader.js +19 -30
- package/dist/project/manifest.js +10 -0
- package/dist/project/package-manager.d.ts +40 -0
- package/dist/project/package-manager.js +224 -0
- package/dist/project/preparation.d.ts +8 -0
- package/dist/project/preparation.js +130 -0
- package/dist/project/transactions.d.ts +5 -1
- package/dist/project/transactions.js +35 -75
- package/dist/project/types.d.ts +30 -0
- package/dist/runtime/context.d.ts +27 -5
- package/dist/runtime/context.js +98 -26
- package/dist/runtime/env.js +15 -1
- package/dist/runtime/run-persistence.d.ts +1 -1
- package/dist/runtime/run-persistence.js +4 -3
- package/dist/runtime/standalone-commands.d.ts +2 -2
- package/dist/runtime/standalone-commands.js +113 -47
- package/dist/runtime/standalone-help.d.ts +1 -0
- package/dist/runtime/standalone-help.js +15 -9
- package/dist/runtime/standalone.js +2 -2
- package/dist/security/config-cipher.d.ts +54 -0
- package/dist/security/config-cipher.js +190 -0
- package/dist/security/config-key.d.ts +35 -0
- package/dist/security/config-key.js +469 -0
- package/dist/server/policy.d.ts +24 -107
- package/dist/server/policy.js +134 -291
- package/dist/server/routes/actions.js +10 -8
- package/dist/server/routes/common.d.ts +5 -20
- package/dist/server/routes/common.js +22 -58
- package/dist/server/routes/config.js +84 -7
- package/dist/server/routes/doctor.d.ts +1 -0
- package/dist/server/routes/doctor.js +4 -3
- package/dist/server/routes/info.js +100 -13
- package/dist/server/routes/playbooks.js +1 -3
- package/dist/server/routes/runs.js +96 -18
- package/dist/server/server.js +25 -53
- package/dist/server/types.d.ts +6 -6
- package/dist/service/factory.js +4 -0
- package/dist/service/remote.js +14 -29
- package/dist/service/types.d.ts +28 -5
- package/dist/service/types.js +8 -0
- package/dist/storage/config-value.d.ts +33 -0
- package/dist/storage/config-value.js +102 -0
- package/dist/storage/file-lock.js +35 -21
- package/dist/storage/index.d.ts +24 -2
- package/dist/storage/index.js +65 -2
- package/dist/storage/mask.d.ts +33 -6
- package/dist/storage/mask.js +298 -16
- package/dist/storage/migrations/index.d.ts +40 -0
- package/dist/storage/migrations/index.js +96 -0
- package/dist/storage/migrations/v2-to-v3.d.ts +16 -0
- package/dist/storage/migrations/v2-to-v3.js +116 -0
- package/dist/storage/sqlite-config.d.ts +62 -3
- package/dist/storage/sqlite-config.js +163 -9
- package/dist/storage/sqlite-driver.d.ts +5 -2
- package/dist/storage/sqlite-driver.js +24 -3
- package/dist/storage/sqlite-schema.d.ts +20 -2
- package/dist/storage/sqlite-schema.js +129 -132
- package/dist/storage/sqlite.d.ts +7 -2
- package/dist/storage/sqlite.js +64 -13
- package/dist/storage/types.d.ts +72 -4
- package/dist/storage/types.js +7 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/storage/sqlite.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { decodeStateKey, encodeStateKey, escapeStateSegment, unescapeStateSegment, type Logger, type RuntimeError, type RunRecord } from "@actiondock/sdk";
|
|
2
|
-
import { type IdempotencyCheckResult, type IdempotencyRecord, type RunsQueryFilterOptions, type RunsRetentionPolicy, type RuntimeStorage, type StateEntry, type StorageOptions, type TerminalRunStatus } from "./types.js";
|
|
2
|
+
import { type ConfigSnapshot, type ConfigWriteOptions, type IdempotencyCheckResult, type IdempotencyRecord, type RunsQueryFilterOptions, type RunsRetentionPolicy, type RuntimeStorage, type StateEntry, type StorageOptions, type TerminalRunStatus } from "./types.js";
|
|
3
|
+
import type { ConfigItemDefinition } from "../project/types.js";
|
|
3
4
|
export { decodeStateKey, encodeStateKey, escapeStateSegment, unescapeStateSegment, };
|
|
4
5
|
export interface SqliteStorageOptions extends StorageOptions {
|
|
5
6
|
logger?: Logger;
|
|
@@ -13,6 +14,8 @@ export declare class SqliteRuntimeStorage implements RuntimeStorage {
|
|
|
13
14
|
private dbPath;
|
|
14
15
|
private recoverOrphans;
|
|
15
16
|
private retentionPolicy?;
|
|
17
|
+
private configKeyProvider?;
|
|
18
|
+
private configDeclarations?;
|
|
16
19
|
private runsStore;
|
|
17
20
|
private stateStore;
|
|
18
21
|
private configStore;
|
|
@@ -27,8 +30,10 @@ export declare class SqliteRuntimeStorage implements RuntimeStorage {
|
|
|
27
30
|
}): number;
|
|
28
31
|
getConfig<T = unknown>(key: string): T | undefined;
|
|
29
32
|
listConfig(): Record<string, unknown>;
|
|
30
|
-
setConfig(key: string, value: unknown): void;
|
|
33
|
+
setConfig(key: string, value: unknown, options?: ConfigWriteOptions): void;
|
|
31
34
|
deleteConfig(key: string): boolean;
|
|
35
|
+
getConfigSnapshot(key: string): ConfigSnapshot | undefined;
|
|
36
|
+
getConfigProtection(key: string): readonly ConfigItemDefinition[] | undefined;
|
|
32
37
|
getState<T = unknown>(namespace: string, key: string): Promise<T | undefined>;
|
|
33
38
|
findState<T = unknown>(targetKey: string, namespace?: string): Promise<StateEntry | undefined>;
|
|
34
39
|
setState<T = unknown>(namespace: string, key: string, value: T, ttl?: number): Promise<void>;
|
package/dist/storage/sqlite.js
CHANGED
|
@@ -1,14 +1,32 @@
|
|
|
1
1
|
import { chmodSync, existsSync, mkdirSync } from "node:fs";
|
|
2
|
+
import { randomBytes } from "node:crypto";
|
|
2
3
|
import { dirname } from "node:path";
|
|
3
4
|
import { decodeStateKey, encodeStateKey, escapeStateSegment, unescapeStateSegment, } from "@actiondock/sdk";
|
|
4
5
|
import { SystemClock } from "./clock.js";
|
|
5
6
|
import { NodeSqliteDriver } from "./sqlite-driver.js";
|
|
6
|
-
import {
|
|
7
|
+
import { ensureStorageSchema } from "./migrations/index.js";
|
|
7
8
|
import { SqliteRunsStore } from "./sqlite-runs.js";
|
|
8
9
|
import { SqliteStateStore } from "./sqlite-state.js";
|
|
9
10
|
import { SqliteConfigStore } from "./sqlite-config.js";
|
|
10
11
|
import { SqliteEventsStore } from "./sqlite-events.js";
|
|
12
|
+
import { createConfigKeyProvider } from "../security/config-key.js";
|
|
11
13
|
export { decodeStateKey, encodeStateKey, escapeStateSegment, unescapeStateSegment, };
|
|
14
|
+
/**
|
|
15
|
+
* 内存库默认密钥提供器:一次性随机内存密钥。
|
|
16
|
+
*
|
|
17
|
+
* 通过 createConfigKeyProvider({ key }) 注入纯内存材料,懒加载缓存,
|
|
18
|
+
* 绝不读取环境变量,也绝不访问或创建任何密钥文件;同一存储实例
|
|
19
|
+
* 生命周期内密钥恒定,进程退出即失效。
|
|
20
|
+
*/
|
|
21
|
+
function createMemoryConfigKeyProvider() {
|
|
22
|
+
return createConfigKeyProvider({ key: randomBytes(32) });
|
|
23
|
+
}
|
|
24
|
+
/** 解析存储级密钥提供器:显式注入优先,否则按库类型选择默认。 */
|
|
25
|
+
function resolveConfigKeyProvider(dbPath, injected) {
|
|
26
|
+
if (injected)
|
|
27
|
+
return injected;
|
|
28
|
+
return dbPath === ":memory:" ? createMemoryConfigKeyProvider() : createConfigKeyProvider();
|
|
29
|
+
}
|
|
12
30
|
export class SqliteRuntimeStorage {
|
|
13
31
|
driver;
|
|
14
32
|
packageId;
|
|
@@ -18,6 +36,8 @@ export class SqliteRuntimeStorage {
|
|
|
18
36
|
dbPath;
|
|
19
37
|
recoverOrphans;
|
|
20
38
|
retentionPolicy;
|
|
39
|
+
configKeyProvider;
|
|
40
|
+
configDeclarations;
|
|
21
41
|
runsStore;
|
|
22
42
|
stateStore;
|
|
23
43
|
configStore;
|
|
@@ -44,6 +64,8 @@ export class SqliteRuntimeStorage {
|
|
|
44
64
|
this.dbPath = dbPath;
|
|
45
65
|
this.recoverOrphans = options.recoverOrphans === true;
|
|
46
66
|
this.retentionPolicy = options.retentionPolicy;
|
|
67
|
+
this.configKeyProvider = options.configKeyProvider;
|
|
68
|
+
this.configDeclarations = options.configDeclarations;
|
|
47
69
|
if (dbPath !== ":memory:") {
|
|
48
70
|
const dir = dirname(dbPath);
|
|
49
71
|
if (!existsSync(dir)) {
|
|
@@ -57,23 +79,46 @@ export class SqliteRuntimeStorage {
|
|
|
57
79
|
}
|
|
58
80
|
}
|
|
59
81
|
this.driver = options.driver ?? new NodeSqliteDriver(dbPath);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
82
|
+
try {
|
|
83
|
+
this.init();
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
// 构造失败回收自建连接,避免数据库文件锁泄漏:注入的 driver 归调用方管理,
|
|
87
|
+
// 自建的 driver 生命周期归本实例,初始化失败时必须立即关闭
|
|
88
|
+
if (options.driver === undefined) {
|
|
89
|
+
try {
|
|
90
|
+
this.driver.close();
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
// 回收失败不得掩盖导致构造失败的原始异常
|
|
94
|
+
}
|
|
66
95
|
}
|
|
96
|
+
throw err;
|
|
67
97
|
}
|
|
68
|
-
this.init();
|
|
69
98
|
}
|
|
70
99
|
init() {
|
|
71
|
-
|
|
72
|
-
|
|
100
|
+
const keyProvider = resolveConfigKeyProvider(this.dbPath, this.configKeyProvider);
|
|
101
|
+
// 版本就绪:新库建当前版本、旧库迁移、当前库校验。
|
|
102
|
+
// 迁移先于任何正常子存储构造(当前版本实现始终假定库已是当前版本),
|
|
103
|
+
// 也先于运行记录恢复(恢复依赖子存储)。
|
|
104
|
+
ensureStorageSchema({
|
|
105
|
+
driver: this.driver,
|
|
106
|
+
dbPath: this.dbPath,
|
|
107
|
+
packageId: this.packageId,
|
|
108
|
+
declarations: this.configDeclarations ?? [],
|
|
109
|
+
keyProvider,
|
|
110
|
+
clock: this.clock,
|
|
111
|
+
});
|
|
112
|
+
// 构造正常子存储
|
|
113
|
+
this.configStore = new SqliteConfigStore(this.driver, this.packageId, this.dbPath, this.clock, keyProvider);
|
|
73
114
|
this.stateStore = new SqliteStateStore(this.driver, this.packageId, this.dbPath, this.clock, this.logger, (msg) => this.logWarn(msg));
|
|
74
115
|
this.runsStore = new SqliteRunsStore(this.driver, this.packageId, this.dbPath, this.clock, this.retentionPolicy, (k) => this.getConfig(k), this.logger, (msg) => this.logWarn(msg));
|
|
75
116
|
this.eventsStore = new SqliteEventsStore(this.driver, this.packageId, this.clock);
|
|
76
|
-
|
|
117
|
+
// 数据目录持有者语义下的遗留运行收割(与迁移无关,依赖子存储就绪)
|
|
118
|
+
if (this.recoverOrphans) {
|
|
119
|
+
this.recoverDeadSessionRuns();
|
|
120
|
+
this.cleanExpiredRuns();
|
|
121
|
+
}
|
|
77
122
|
if (this.dbPath !== ":memory:" && existsSync(this.dbPath)) {
|
|
78
123
|
try {
|
|
79
124
|
chmodSync(this.dbPath, 0o600);
|
|
@@ -93,12 +138,18 @@ export class SqliteRuntimeStorage {
|
|
|
93
138
|
listConfig() {
|
|
94
139
|
return this.configStore.listConfig();
|
|
95
140
|
}
|
|
96
|
-
setConfig(key, value) {
|
|
97
|
-
this.configStore.setConfig(key, value);
|
|
141
|
+
setConfig(key, value, options) {
|
|
142
|
+
this.configStore.setConfig(key, value, options);
|
|
98
143
|
}
|
|
99
144
|
deleteConfig(key) {
|
|
100
145
|
return this.configStore.deleteConfig(key);
|
|
101
146
|
}
|
|
147
|
+
getConfigSnapshot(key) {
|
|
148
|
+
return this.configStore.getConfigSnapshot(key);
|
|
149
|
+
}
|
|
150
|
+
getConfigProtection(key) {
|
|
151
|
+
return this.configStore.getConfigProtection(key);
|
|
152
|
+
}
|
|
102
153
|
// --- State 状态管理 ---
|
|
103
154
|
async getState(namespace, key) {
|
|
104
155
|
return this.stateStore.getState(namespace, key);
|
package/dist/storage/types.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import type { RuntimeError, RunRecord, RunStatus } from "@actiondock/sdk";
|
|
2
|
+
import type { ConfigItemDefinition } from "../project/types.js";
|
|
3
|
+
import type { ConfigKeyProvider } from "../security/config-cipher.js";
|
|
2
4
|
import type { Clock } from "./clock.js";
|
|
3
5
|
/**
|
|
4
|
-
* 固定的存储 Schema
|
|
6
|
+
* 固定的存储 Schema 当前版本常量。
|
|
7
|
+
*
|
|
8
|
+
* 当前版本(3)数据库总是携带 config_encryption 密钥元数据表(无敏感
|
|
9
|
+
* 写入时表保持空置),config 表允许普通 JSON 明文行与 adenc: 密文行
|
|
10
|
+
* 共存。旧版本数据库在存储打开前由 migrations/ 通用版本调度完成升级,
|
|
11
|
+
* 当前版本读写代码不感知历史版本。
|
|
5
12
|
*/
|
|
6
|
-
export declare const STORAGE_SCHEMA_VERSION =
|
|
13
|
+
export declare const STORAGE_SCHEMA_VERSION = 3;
|
|
7
14
|
/**
|
|
8
15
|
* 幂等去重记录保留窗口(24 小时),与 ActionDockService.info()
|
|
9
16
|
* 中的 idempotencyPolicy.retentionMs 保持单一事实源。
|
|
@@ -78,6 +85,14 @@ export interface SqliteStatement {
|
|
|
78
85
|
get<T>(...params: any[]): T | undefined;
|
|
79
86
|
all<T>(...params: any[]): T[];
|
|
80
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* 事务开启模式。
|
|
90
|
+
*
|
|
91
|
+
* deferred 为历史默认;读后写升级场景(如先读旧行再决定加密写入)
|
|
92
|
+
* 必须使用 immediate,在事务开始即取得写锁,避免并发提交下的
|
|
93
|
+
* 快照升级 SQLITE_BUSY;exclusive 供离线维护取得持续排他锁。
|
|
94
|
+
*/
|
|
95
|
+
export type SqliteTransactionMode = "deferred" | "immediate" | "exclusive";
|
|
81
96
|
/**
|
|
82
97
|
* 统一 SQLite 驱动层接口(严格同步契约)。
|
|
83
98
|
*
|
|
@@ -90,7 +105,7 @@ export interface SqliteStatement {
|
|
|
90
105
|
export interface SqliteDriver {
|
|
91
106
|
exec(sql: string): void;
|
|
92
107
|
prepare(sql: string): SqliteStatement;
|
|
93
|
-
transaction<T>(fn: () => T extends PromiseLike<unknown> ? never : T): T;
|
|
108
|
+
transaction<T>(fn: () => T extends PromiseLike<unknown> ? never : T, mode?: SqliteTransactionMode): T;
|
|
94
109
|
close(): void;
|
|
95
110
|
}
|
|
96
111
|
/**
|
|
@@ -125,6 +140,29 @@ export interface StateEntry {
|
|
|
125
140
|
/** 自动过期时间戳(ISO 8601 格式,null/undefined 表示不过期) */
|
|
126
141
|
expiresAt?: string;
|
|
127
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* 配置写入选项。
|
|
145
|
+
*
|
|
146
|
+
* declarations 为写入时目标键的有效声明集合(跨包并集),存储层据此
|
|
147
|
+
* 判定敏感性、执行整键加密并合并历史保护声明;缺省视为无敏感声明。
|
|
148
|
+
*/
|
|
149
|
+
export interface ConfigWriteOptions {
|
|
150
|
+
/** 写入时目标键的有效配置声明集合 */
|
|
151
|
+
declarations?: readonly ConfigItemDefinition[];
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* 单键配置原子读取快照。
|
|
155
|
+
*
|
|
156
|
+
* 单次 SELECT 同时解出业务值与历史保护声明,避免管理视图分两次读取
|
|
157
|
+
* 时因其他进程恰好删除行而出现「旧秘密值 + 空保护」的组合泄漏。
|
|
158
|
+
* 明文行的快照仅含 value;密文行同时携带解密验证后的保护声明。
|
|
159
|
+
*/
|
|
160
|
+
export interface ConfigSnapshot {
|
|
161
|
+
/** 业务配置值(密文行经透明解密还原) */
|
|
162
|
+
value: unknown;
|
|
163
|
+
/** 历史保护声明(仅密文行存在;用于当前声明弱化后的脱敏兜底) */
|
|
164
|
+
protection?: readonly ConfigItemDefinition[];
|
|
165
|
+
}
|
|
128
166
|
/**
|
|
129
167
|
* 初始化存储引擎所需的选项。
|
|
130
168
|
*/
|
|
@@ -147,6 +185,21 @@ export interface StorageOptions {
|
|
|
147
185
|
recoverOrphans?: boolean;
|
|
148
186
|
/** 运行记录保留策略配置 */
|
|
149
187
|
retentionPolicy?: RunsRetentionPolicy;
|
|
188
|
+
/**
|
|
189
|
+
* 配置加密密钥提供器。
|
|
190
|
+
*
|
|
191
|
+
* 缺省时文件库懒使用本地默认密钥定位(createConfigKeyProvider),
|
|
192
|
+
* 内存库使用一次性随机内存密钥(不读取环境变量或密钥文件)。
|
|
193
|
+
*/
|
|
194
|
+
configKeyProvider?: ConfigKeyProvider;
|
|
195
|
+
/**
|
|
196
|
+
* 打开存储时用于版本迁移判定的配置声明字典集合。
|
|
197
|
+
*
|
|
198
|
+
* 包级存储传当前包声明;全局存储传所有已加载包的声明字典(跨包并集
|
|
199
|
+
* 判定敏感性)。声明解析遵循各字典内具体键优先于模板、跨字典取并集。
|
|
200
|
+
* 仅在旧版本数据库需要迁移时被读取;版本迁移只在首次打开执行。
|
|
201
|
+
*/
|
|
202
|
+
configDeclarations?: readonly Record<string, ConfigItemDefinition>[];
|
|
150
203
|
}
|
|
151
204
|
/**
|
|
152
205
|
* 数据库中存储的幂等请求去重记录实体。
|
|
@@ -202,8 +255,23 @@ export interface RuntimeStorage {
|
|
|
202
255
|
readonly closed?: boolean;
|
|
203
256
|
getConfig<T = unknown>(key: string): T | undefined;
|
|
204
257
|
listConfig(): Record<string, unknown>;
|
|
205
|
-
setConfig(key: string, value: unknown): void | Promise<void>;
|
|
258
|
+
setConfig(key: string, value: unknown, options?: ConfigWriteOptions): void | Promise<void>;
|
|
206
259
|
deleteConfig(key: string): boolean | Promise<boolean>;
|
|
260
|
+
/**
|
|
261
|
+
* 单次读取同时解出业务值与历史保护声明的原子快照。
|
|
262
|
+
*
|
|
263
|
+
* 键不存在返回 undefined;明文行仅含 value;密文行经严格解密验证后
|
|
264
|
+
* 同时携带 protection。管理视图优先使用本方法,避免分离读取的
|
|
265
|
+
* 并发窗口泄漏无保护的秘密值。
|
|
266
|
+
*/
|
|
267
|
+
getConfigSnapshot?(key: string): ConfigSnapshot | undefined;
|
|
268
|
+
/**
|
|
269
|
+
* 读取目标键的历史保护声明(密文行解密验证后返回;明文行或不存在返回 undefined)。
|
|
270
|
+
*
|
|
271
|
+
* 用于当前声明弱化(如移除 secret 标记)后的脱敏兜底,防止已加密的
|
|
272
|
+
* 历史敏感值在管理视图重新明文展示。
|
|
273
|
+
*/
|
|
274
|
+
getConfigProtection?(key: string): readonly ConfigItemDefinition[] | undefined;
|
|
207
275
|
getState<T = unknown>(namespace: string, key: string): Promise<T | undefined>;
|
|
208
276
|
findState<T = unknown>(targetKey: string, namespace?: string): Promise<StateEntry | undefined>;
|
|
209
277
|
setState<T = unknown>(namespace: string, key: string, value: T, ttl?: number): Promise<void>;
|
package/dist/storage/types.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { ACTION_CANCELLED, ACTION_TIMEOUT } from "../errors.js";
|
|
2
2
|
/**
|
|
3
|
-
* 固定的存储 Schema
|
|
3
|
+
* 固定的存储 Schema 当前版本常量。
|
|
4
|
+
*
|
|
5
|
+
* 当前版本(3)数据库总是携带 config_encryption 密钥元数据表(无敏感
|
|
6
|
+
* 写入时表保持空置),config 表允许普通 JSON 明文行与 adenc: 密文行
|
|
7
|
+
* 共存。旧版本数据库在存储打开前由 migrations/ 通用版本调度完成升级,
|
|
8
|
+
* 当前版本读写代码不感知历史版本。
|
|
4
9
|
*/
|
|
5
|
-
export const STORAGE_SCHEMA_VERSION =
|
|
10
|
+
export const STORAGE_SCHEMA_VERSION = 3;
|
|
6
11
|
/**
|
|
7
12
|
* 幂等去重记录保留窗口(24 小时),与 ActionDockService.info()
|
|
8
13
|
* 中的 idempotencyPolicy.retentionMs 保持单一事实源。
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actiondock/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.0",
|
|
4
4
|
"description": "ActionDock Core Engine - Project loader, runtime execution, SQLite storage, standalone builder, and skill exporter",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"test": "node ../../scripts/run-tests.ts"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@actiondock/sdk": "^2.
|
|
62
|
+
"@actiondock/sdk": "^2.21.0",
|
|
63
63
|
"ajv": "^8.17.1",
|
|
64
64
|
"ajv-formats": "^3.0.1",
|
|
65
65
|
"undici": "^7.29.1"
|