@actiondock/cli 2.16.0 → 2.18.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 +8 -5
- package/dist/commands/export.js +18 -5
- package/dist/commands/serve.js +2 -1
- package/dist/renderers/runs.js +3 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -77,13 +77,16 @@ ad test
|
|
|
77
77
|
ad mcp
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
- 导出为便携式 Agent Skill
|
|
80
|
+
- 导出为便携式 Agent Skill 资产:
|
|
81
81
|
```bash
|
|
82
|
-
#
|
|
82
|
+
# 默认源码模式浅导出(保留 uses 逻辑契约)
|
|
83
83
|
ad export skill
|
|
84
84
|
|
|
85
|
-
#
|
|
86
|
-
ad export skill --
|
|
85
|
+
# 独立自包含 Node.js 目录型导出(免全局 ad 命令行)
|
|
86
|
+
ad export skill --standalone --vendor-deps
|
|
87
|
+
|
|
88
|
+
# 显式物化外部依赖导出(展开为微型工作区)
|
|
89
|
+
ad export skill --bundle-deps
|
|
87
90
|
```
|
|
88
91
|
|
|
89
92
|
- 构建 Node.js 目录交付产物:
|
|
@@ -188,7 +191,7 @@ $data | ConvertTo-Json -Depth 100 | ad run complex-action --input-file -
|
|
|
188
191
|
| `ad test` | 执行快速单元测试 |
|
|
189
192
|
| `ad build` | 构建 Node.js 目录交付产物(支持 `--vendor-deps` 与 `--archive`) |
|
|
190
193
|
| `ad pack` | 打包为标准 npm tarball(`.tgz`),支持 `--dry-run` |
|
|
191
|
-
| `ad export skill` | 导出 Agent Skill
|
|
194
|
+
| `ad export skill` | 导出 Agent Skill 资产(默认单包源码浅导出,支持 `--standalone` 免全局工具自包含导出与 `--bundle-deps` 物化依赖) |
|
|
192
195
|
| `ad link` / `unlink` | 注册或注销工作区全局路由与符号链接 |
|
|
193
196
|
| `ad profile` | 管理远程执行节点凭证与环境配置 |
|
|
194
197
|
| `ad serve` | 启动远程 HTTP/HTTPS 执行调度微服务(支持 `-P` 包白名单与 `-A` 动作白名单细粒度权限控制,原生支持 `--https` 自签名与生产证书) |
|
package/dist/commands/export.js
CHANGED
|
@@ -17,20 +17,25 @@ export function registerExportCommand(program, context) {
|
|
|
17
17
|
.option("--all", "Export all linked packages from global registry")
|
|
18
18
|
.option("--bundle [name]", "Export multiple packages as a unified composite Skill bundle (defaults to workspace directory name if omitted)")
|
|
19
19
|
.option("-m, --mode <mode>", "Skill export mode ('source' or 'node')", "source")
|
|
20
|
+
.option("--bundle-deps", "Materialize and bundle external package dependencies into the exported skill")
|
|
21
|
+
.option("--standalone", "Export self-contained Node.js directory that does not require global ad CLI (alias for --mode node)")
|
|
20
22
|
.option("-o, --out <path>", "Output skill directory")
|
|
21
23
|
.option("-p, --playbook <playbooks...>", "Only export specific playbook(s) and their dependent actions", parseListOption)
|
|
22
24
|
.option("-a, --actions <actions...>", "Only export specific action(s)", parseListOption)
|
|
23
25
|
.option("-z, --archive", "Create a .zip archive of the exported skill")
|
|
24
26
|
.option("--skill-md <path>", "Use specified existing SKILL.md file instead of auto-generating")
|
|
25
|
-
.option("--custom-md <path>", "Custom skill declaration (SKILL.custom.md) with slot-marked sections and optional frontmatter description
|
|
27
|
+
.option("--custom-md <path>", "Custom skill declaration (SKILL.custom.md) with slot-marked sections and optional frontmatter description (auto-discovered at package or workspace root when omitted)")
|
|
26
28
|
.option("--skill-md-only", "Bundle mode only: regenerate only the composite SKILL.md in place (always regenerates, ignores any existing SKILL.md)")
|
|
27
29
|
.option("--vendor-deps", "Materialize locked production dependencies into the exported skill")
|
|
28
30
|
.option("--allow-install-scripts", "Allow lifecycle install scripts to run during dependency materialization")
|
|
29
31
|
.option("--require-reproducible", "Require reproducible build and fail if install scripts must run")
|
|
30
32
|
.action(async (rawOptions, cmd) => {
|
|
31
33
|
const options = getEffectiveOptions(rawOptions, cmd);
|
|
32
|
-
const mode = options.mode === "node" ? "node" : "source";
|
|
33
|
-
if (options.
|
|
34
|
+
const mode = options.standalone || options.mode === "node" ? "node" : "source";
|
|
35
|
+
if (options.skillMd && options.customMd) {
|
|
36
|
+
throw new ExecutionError("Options --skill-md and --custom-md cannot be used together. Use --skill-md to reuse an existing documentation file, or --custom-md to customize the generated document with custom slots.");
|
|
37
|
+
}
|
|
38
|
+
if (options.bundle !== undefined && (options.standalone || mode === "node")) {
|
|
34
39
|
throw new ExecutionError("Composite Skill export (--bundle) currently only supports source mode. Please use '--mode source' to export as a composite workspace Skill.");
|
|
35
40
|
}
|
|
36
41
|
if (options.skillMdOnly && options.bundle === undefined) {
|
|
@@ -78,8 +83,8 @@ export function registerExportCommand(program, context) {
|
|
|
78
83
|
throw notInProjectError("Please specify -P, --package <id>, --workspace, --all, or cd into a project directory.");
|
|
79
84
|
}
|
|
80
85
|
}
|
|
81
|
-
if (roots.length > 1 && (options.actions || options.playbook)) {
|
|
82
|
-
throw new ExecutionError("Filtering options (--actions, --playbook)
|
|
86
|
+
if ((roots.length > 1 || options.bundle !== undefined) && (options.actions || options.playbook)) {
|
|
87
|
+
throw new ExecutionError("Filtering options (--actions, --playbook) cannot be combined with composite bundle export (--bundle) or multiple packages.");
|
|
83
88
|
}
|
|
84
89
|
const isMachine = Boolean(options.json);
|
|
85
90
|
try {
|
|
@@ -100,6 +105,8 @@ export function registerExportCommand(program, context) {
|
|
|
100
105
|
skillMdPath: options.skillMd,
|
|
101
106
|
customMdPath: options.customMd,
|
|
102
107
|
skillMdOnly: options.skillMdOnly,
|
|
108
|
+
bundleDeps: Boolean(options.bundleDeps),
|
|
109
|
+
standalone: Boolean(options.standalone),
|
|
103
110
|
});
|
|
104
111
|
renderResult(result, {
|
|
105
112
|
json: isMachine,
|
|
@@ -145,9 +152,12 @@ export function registerExportCommand(program, context) {
|
|
|
145
152
|
playbooks: options.playbook,
|
|
146
153
|
actions: options.actions,
|
|
147
154
|
skillMdPath: options.skillMd,
|
|
155
|
+
customMdPath: options.customMd,
|
|
148
156
|
vendorDeps: options.vendorDeps,
|
|
149
157
|
allowInstallScripts: options.allowInstallScripts,
|
|
150
158
|
requireReproducible: options.requireReproducible,
|
|
159
|
+
bundleDeps: Boolean(options.bundleDeps),
|
|
160
|
+
standalone: Boolean(options.standalone),
|
|
151
161
|
});
|
|
152
162
|
results.push(res);
|
|
153
163
|
}
|
|
@@ -187,9 +197,12 @@ export function registerExportCommand(program, context) {
|
|
|
187
197
|
playbooks: options.playbook,
|
|
188
198
|
actions: options.actions,
|
|
189
199
|
skillMdPath: options.skillMd,
|
|
200
|
+
customMdPath: options.customMd,
|
|
190
201
|
vendorDeps: options.vendorDeps,
|
|
191
202
|
allowInstallScripts: options.allowInstallScripts,
|
|
192
203
|
requireReproducible: options.requireReproducible,
|
|
204
|
+
bundleDeps: Boolean(options.bundleDeps),
|
|
205
|
+
standalone: Boolean(options.standalone),
|
|
193
206
|
});
|
|
194
207
|
renderResult(result, {
|
|
195
208
|
json: isMachine,
|
package/dist/commands/serve.js
CHANGED
|
@@ -3,7 +3,7 @@ import { resolve } from "node:path";
|
|
|
3
3
|
import { createActionDock, createNodePlatform, findProjectRoot, loadProjectConfig, startActionDockServer, } from "@actiondock/core";
|
|
4
4
|
import { resolvePackageRoot } from "@actiondock/core/registry";
|
|
5
5
|
import { parseActionRef } from "@actiondock/core/graph";
|
|
6
|
-
import { formatHostForUrl, } from "@actiondock/core/server";
|
|
6
|
+
import { formatHostForUrl, createServerRunOrigin, } from "@actiondock/core/server";
|
|
7
7
|
import { ArgumentError, ExecutionError, packageNotFoundError } from "../errors.js";
|
|
8
8
|
import { writeStderr, writeStdout } from "../renderer.js";
|
|
9
9
|
import { ensureSelfSignedCertificate, getEffectiveOptions, loadViewsFromFile, mergeServerViews, normalizeCorsOrigins, registerStopSignalHandler, printServerBanner, resolveMaxBodyBytes, resolveServerHost, resolveServerPort, resolveServerToken, parseListOption, } from "../utils/index.js";
|
|
@@ -252,6 +252,7 @@ export function registerServeCommand(program, context) {
|
|
|
252
252
|
packageAllowlist: view.packageAllowlist,
|
|
253
253
|
packageIds: view.packageAllowlist,
|
|
254
254
|
actionAllowlist: view.actionAllowlist,
|
|
255
|
+
origin: createServerRunOrigin(view, "mcp"),
|
|
255
256
|
});
|
|
256
257
|
}, {
|
|
257
258
|
onerror: (err) => {
|
package/dist/renderers/runs.js
CHANGED
|
@@ -27,6 +27,9 @@ export function renderRunDetail(run) {
|
|
|
27
27
|
lines.push(`Package: ${run.packageId}`);
|
|
28
28
|
if (run.requestId)
|
|
29
29
|
lines.push(`Request ID: ${run.requestId}`);
|
|
30
|
+
if (run.origin) {
|
|
31
|
+
lines.push(`Origin: channel=${run.origin.channel} view=${run.origin.viewName} authenticated=${run.origin.authenticated}`);
|
|
32
|
+
}
|
|
30
33
|
lines.push(`Status: ${run.status}`);
|
|
31
34
|
if (run.parentRunId)
|
|
32
35
|
lines.push(`Parent Run: ${run.parentRunId}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actiondock/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.18.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,10 +34,10 @@
|
|
|
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/sdk": "^2.
|
|
37
|
+
"@actiondock/builder": "^2.18.0",
|
|
38
|
+
"@actiondock/core": "^2.18.0",
|
|
39
|
+
"@actiondock/mcp": "^2.18.0",
|
|
40
|
+
"@actiondock/sdk": "^2.18.0",
|
|
41
41
|
"commander": "^13.1.0",
|
|
42
42
|
"selfsigned": "^5.5.0"
|
|
43
43
|
},
|