@actiondock/cli 2.5.0 → 2.6.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 +44 -3
- package/dist/commands/action/create.js +2 -2
- package/dist/commands/add.js +5 -5
- package/dist/commands/build.js +4 -5
- package/dist/commands/config/delete.js +2 -2
- package/dist/commands/config/env.js +6 -15
- package/dist/commands/config/get.js +8 -39
- package/dist/commands/config/list.js +8 -55
- package/dist/commands/config/schema.js +4 -6
- package/dist/commands/config/set.js +2 -2
- package/dist/commands/describe.js +2 -4
- package/dist/commands/doctor.js +3 -10
- package/dist/commands/export.js +4 -7
- package/dist/commands/generate.js +2 -4
- package/dist/commands/index.js +2 -5
- package/dist/commands/info.js +7 -15
- package/dist/commands/list.js +3 -5
- package/dist/commands/mcp.js +23 -3
- package/dist/commands/pack.js +4 -5
- package/dist/commands/playbook.js +14 -36
- package/dist/commands/profile.js +4 -11
- package/dist/commands/remove.js +13 -9
- package/dist/commands/run.d.ts +8 -0
- package/dist/commands/run.js +118 -33
- package/dist/commands/runs.js +10 -25
- package/dist/commands/serve.js +31 -4
- package/dist/commands/state-list.js +2 -5
- package/dist/commands/state.js +29 -16
- package/dist/commands/test.js +6 -2
- package/dist/commands/validate.js +3 -5
- package/dist/errors.d.ts +14 -1
- package/dist/errors.js +20 -2
- package/dist/index.js +1 -2
- package/dist/renderer.d.ts +0 -2
- package/dist/renderer.js +3 -15
- package/dist/services/config-merge.d.ts +41 -0
- package/dist/services/config-merge.js +93 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +1 -0
- package/dist/types.d.ts +0 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/input.d.ts +46 -0
- package/dist/utils/input.js +89 -0
- package/dist/utils/spawn.d.ts +13 -0
- package/dist/utils/spawn.js +31 -0
- package/dist/utils/target.d.ts +21 -0
- package/dist/utils/target.js +29 -14
- package/dist/utils/utils.d.ts +2 -3
- package/dist/utils/utils.js +6 -6
- package/package.json +6 -6
package/dist/utils/utils.d.ts
CHANGED
|
@@ -20,18 +20,17 @@ export declare function getTargetRoot(packageOption?: string, keyHint?: string):
|
|
|
20
20
|
key: string;
|
|
21
21
|
};
|
|
22
22
|
/**
|
|
23
|
-
* 聚合命令自身选项与根程序全局选项(如 --json、--
|
|
23
|
+
* 聚合命令自身选项与根程序全局选项(如 --json、--data-dir 等)。
|
|
24
24
|
*/
|
|
25
25
|
export declare function getEffectiveOptions(rawOptions: any, cmd?: any): any;
|
|
26
26
|
/**
|
|
27
27
|
* 解析意图过滤回退策略。
|
|
28
|
-
* 机器输出模式(--json
|
|
28
|
+
* 机器输出模式(--json)仅在显式传 --fallback 时回退,
|
|
29
29
|
* 人类交互模式默认回退(可被 --no-fallback 关闭)。
|
|
30
30
|
*/
|
|
31
31
|
export declare function resolveFallbackStrategy(options: {
|
|
32
32
|
fallback?: boolean;
|
|
33
33
|
json?: boolean;
|
|
34
|
-
envelope?: boolean;
|
|
35
34
|
}): {
|
|
36
35
|
isMachine: boolean;
|
|
37
36
|
shouldFallback: boolean;
|
package/dist/utils/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolvePackageRoot, findProjectRoot } from "@actiondock/core";
|
|
2
|
-
import { ArgumentError } from "../errors.js";
|
|
2
|
+
import { ArgumentError, notInProjectError, packageNotFoundError } from "../errors.js";
|
|
3
3
|
/**
|
|
4
4
|
* 解析意图字符串(从显式 --intent 或位置模式参数聚合)。
|
|
5
5
|
* 多个关键字使用 '|'(正则逻辑或)连接。
|
|
@@ -78,16 +78,16 @@ export function getTargetRoot(packageOption, keyHint) {
|
|
|
78
78
|
const root = resolvePackageRoot(targetPackage) || (targetPackage ? null : findProjectRoot());
|
|
79
79
|
if (!root) {
|
|
80
80
|
if (targetPackage) {
|
|
81
|
-
throw
|
|
81
|
+
throw packageNotFoundError(targetPackage);
|
|
82
82
|
}
|
|
83
83
|
else {
|
|
84
|
-
throw
|
|
84
|
+
throw notInProjectError("Please specify -P, --package <id> or cd into a project directory.");
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
return { root, key: effectiveKey };
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
|
-
* 聚合命令自身选项与根程序全局选项(如 --json、--
|
|
90
|
+
* 聚合命令自身选项与根程序全局选项(如 --json、--data-dir 等)。
|
|
91
91
|
*/
|
|
92
92
|
export function getEffectiveOptions(rawOptions, cmd) {
|
|
93
93
|
if (cmd && typeof cmd.optsWithGlobals === "function") {
|
|
@@ -97,11 +97,11 @@ export function getEffectiveOptions(rawOptions, cmd) {
|
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* 解析意图过滤回退策略。
|
|
100
|
-
* 机器输出模式(--json
|
|
100
|
+
* 机器输出模式(--json)仅在显式传 --fallback 时回退,
|
|
101
101
|
* 人类交互模式默认回退(可被 --no-fallback 关闭)。
|
|
102
102
|
*/
|
|
103
103
|
export function resolveFallbackStrategy(options) {
|
|
104
|
-
const isMachine = Boolean(options.json
|
|
104
|
+
const isMachine = Boolean(options.json);
|
|
105
105
|
const fallbackExplicit = options.fallback === true ||
|
|
106
106
|
(Array.isArray(process.argv) && process.argv.includes("--fallback"));
|
|
107
107
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actiondock/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "ActionDock CLI facade for developing, testing, building, and exporting standalone Agent Actions and Skills",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"test": "node ../../scripts/run-tests.ts"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@actiondock/builder": "^2.
|
|
38
|
-
"@actiondock/core": "^2.
|
|
39
|
-
"@actiondock/mcp": "^2.
|
|
40
|
-
"@actiondock/runtime-node": "^2.
|
|
41
|
-
"@actiondock/sdk": "^2.
|
|
37
|
+
"@actiondock/builder": "^2.6.0",
|
|
38
|
+
"@actiondock/core": "^2.6.0",
|
|
39
|
+
"@actiondock/mcp": "^2.6.0",
|
|
40
|
+
"@actiondock/runtime-node": "^2.6.0",
|
|
41
|
+
"@actiondock/sdk": "^2.6.0",
|
|
42
42
|
"commander": "^13.1.0",
|
|
43
43
|
"selfsigned": "^5.5.0"
|
|
44
44
|
},
|