@actiondock/core 2.18.0 → 2.20.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.
Files changed (74) hide show
  1. package/dist/client/config.d.ts +17 -14
  2. package/dist/client/config.js +112 -14
  3. package/dist/client/index.d.ts +1 -1
  4. package/dist/client/index.js +1 -1
  5. package/dist/client/runs.d.ts +9 -0
  6. package/dist/client/runs.js +7 -0
  7. package/dist/errors.d.ts +3 -1
  8. package/dist/errors.js +2 -0
  9. package/dist/execution/service.js +8 -5
  10. package/dist/execution/types.d.ts +3 -3
  11. package/dist/host/host.d.ts +9 -1
  12. package/dist/host/host.js +266 -45
  13. package/dist/host/types.d.ts +3 -0
  14. package/dist/index.d.ts +4 -3
  15. package/dist/index.js +1 -1
  16. package/dist/input/config-override.d.ts +5 -0
  17. package/dist/input/config-override.js +23 -0
  18. package/dist/input/input-resolver.d.ts +24 -7
  19. package/dist/input/input-resolver.js +73 -5
  20. package/dist/invocation/bindings.d.ts +53 -0
  21. package/dist/invocation/bindings.js +248 -0
  22. package/dist/invocation/policy.d.ts +5 -1
  23. package/dist/invocation/policy.js +16 -9
  24. package/dist/invocation/remote.d.ts +40 -0
  25. package/dist/invocation/remote.js +489 -0
  26. package/dist/invocation/types.d.ts +2 -0
  27. package/dist/invocation/types.js +1 -0
  28. package/dist/package/index.d.ts +1 -1
  29. package/dist/package/runtime.js +105 -15
  30. package/dist/platform/types.d.ts +48 -1
  31. package/dist/project/config-declarations.d.ts +61 -0
  32. package/dist/project/config-declarations.js +297 -0
  33. package/dist/project/index.d.ts +5 -2
  34. package/dist/project/index.js +5 -2
  35. package/dist/project/init.js +2 -2
  36. package/dist/project/loader.js +4 -0
  37. package/dist/project/manifest.js +10 -0
  38. package/dist/project/types.d.ts +30 -0
  39. package/dist/runtime/context.d.ts +6 -3
  40. package/dist/runtime/context.js +60 -13
  41. package/dist/runtime/env.js +15 -1
  42. package/dist/runtime/standalone-commands.d.ts +2 -2
  43. package/dist/runtime/standalone-commands.js +113 -47
  44. package/dist/runtime/standalone-help.d.ts +1 -0
  45. package/dist/runtime/standalone-help.js +15 -9
  46. package/dist/runtime/standalone.js +2 -2
  47. package/dist/server/policy.d.ts +24 -107
  48. package/dist/server/policy.js +134 -291
  49. package/dist/server/routes/actions.js +10 -8
  50. package/dist/server/routes/common.d.ts +5 -20
  51. package/dist/server/routes/common.js +22 -58
  52. package/dist/server/routes/config.js +65 -7
  53. package/dist/server/routes/doctor.d.ts +1 -0
  54. package/dist/server/routes/doctor.js +4 -3
  55. package/dist/server/routes/info.js +100 -13
  56. package/dist/server/routes/playbooks.js +1 -3
  57. package/dist/server/routes/runs.js +112 -18
  58. package/dist/server/server.d.ts +2 -1
  59. package/dist/server/server.js +38 -55
  60. package/dist/server/types.d.ts +6 -6
  61. package/dist/service/factory.js +1 -0
  62. package/dist/service/remote.js +28 -29
  63. package/dist/service/types.d.ts +34 -5
  64. package/dist/service/types.js +8 -0
  65. package/dist/storage/mask.d.ts +33 -6
  66. package/dist/storage/mask.js +298 -16
  67. package/dist/storage/sqlite-runs.d.ts +5 -17
  68. package/dist/storage/sqlite-runs.js +127 -5
  69. package/dist/storage/sqlite.d.ts +5 -17
  70. package/dist/storage/sqlite.js +2 -2
  71. package/dist/storage/types.d.ts +31 -16
  72. package/dist/version.d.ts +1 -1
  73. package/dist/version.js +1 -1
  74. package/package.json +2 -2
@@ -32,6 +32,33 @@ export interface RunsRetentionPolicy {
32
32
  /** 最小保底保留终态记录数(默认 50,防止全清空) */
33
33
  minRetainRuns?: number;
34
34
  }
35
+ /**
36
+ * 运行记录通用检索与统计过滤选项。
37
+ */
38
+ export interface RunsQueryFilterOptions {
39
+ /** 目标动作标识筛选 */
40
+ actionId?: string;
41
+ /** 运行生命周期状态筛选 */
42
+ status?: string;
43
+ /** 运行通道筛选(如 http、mcp) */
44
+ channel?: string;
45
+ /** 服务视图名称筛选(如 default、admin) */
46
+ view?: string;
47
+ /** 起始时间筛选(匹配 started_at >= since) */
48
+ since?: string;
49
+ /** 截止时间筛选(匹配 started_at <= until) */
50
+ until?: string;
51
+ /** 根运行标识筛选 */
52
+ rootRunId?: string;
53
+ /** 父运行标识筛选 */
54
+ parentRunId?: string;
55
+ /** 最大返回记录条数限制 */
56
+ limit?: number;
57
+ /** 偏移游标条数(跳过的记录数) */
58
+ offset?: number;
59
+ /** 幂等请求标识列表(经 idempotency_keys 反查) */
60
+ requestIds?: string[];
61
+ }
35
62
  /**
36
63
  * SQLite 基础参数值类型。
37
64
  */
@@ -196,18 +223,9 @@ export interface RuntimeStorage {
196
223
  createRun(record: RunRecord): void;
197
224
  updateRun(id: string, status: TerminalRunStatus, output?: unknown, error?: RuntimeError, finishedAt?: string): void;
198
225
  getRun(id: string): RunRecord | null;
199
- listRuns(options?: {
200
- actionId?: string;
201
- status?: string;
202
- limit?: number;
203
- offset?: number;
204
- }): RunRecord[];
226
+ listRuns(options?: RunsQueryFilterOptions): RunRecord[];
205
227
  /** 统计符合条件的运行记录总数 */
206
- countRuns?(options?: {
207
- actionId?: string;
208
- status?: string;
209
- requestIds?: string[];
210
- }): number;
228
+ countRuns?(options?: RunsQueryFilterOptions): number;
211
229
  /** 查询单条运行记录并补齐幂等请求标识关联(详情路径专用) */
212
230
  getRunWithRequestId?(id: string): RunRecord | null;
213
231
  clearRuns(options?: {
@@ -241,12 +259,9 @@ export interface RuntimeStorage {
241
259
  * 不同宿主会话,ownerId 天然不一致;requestId 本身即跨进程全局唯一的外部
242
260
  * 事实源,包维度隔离已提供足够边界。
243
261
  */
244
- listRunsByRequestIds?(requestIds: string[]): RunRecord[];
262
+ listRunsByRequestIds?(requestIds: string[], options?: RunsQueryFilterOptions): RunRecord[];
245
263
  /** 按客户端幂等请求标识反查关联运行记录总数 */
246
- countRunsByRequestIds?(requestIds: string[], options?: {
247
- actionId?: string;
248
- status?: string;
249
- }): number;
264
+ countRunsByRequestIds?(requestIds: string[], options?: RunsQueryFilterOptions): number;
250
265
  /** 反查运行记录关联的幂等请求标识映射(仅限当前包范围,无关联时不含对应键) */
251
266
  getRunRequestIds?(runIds: string[]): Record<string, string>;
252
267
  appendEvent?(eventType: string, payload: unknown): void;
package/dist/version.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * ActionDock 核心版本号单一事实源。
3
3
  */
4
- export declare const ACTIONDOCK_VERSION = "2.18.0";
4
+ export declare const ACTIONDOCK_VERSION = "2.20.0";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * ActionDock 核心版本号单一事实源。
3
3
  */
4
- export const ACTIONDOCK_VERSION = "2.18.0";
4
+ export const ACTIONDOCK_VERSION = "2.20.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actiondock/core",
3
- "version": "2.18.0",
3
+ "version": "2.20.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.18.0",
62
+ "@actiondock/sdk": "^2.20.0",
63
63
  "ajv": "^8.17.1",
64
64
  "ajv-formats": "^3.0.1",
65
65
  "undici": "^7.29.1"