@actiondock/cli 2.16.0 → 2.17.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 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
- # 导出自包含 Node.js 目录模式技能
86
- ad export skill --mode node
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 技能包(支持 `--mode source` 与 `--mode node`) |
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` 自签名与生产证书) |
@@ -17,6 +17,8 @@ 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)
@@ -29,8 +31,8 @@ export function registerExportCommand(program, context) {
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.bundle && mode === "node") {
34
+ const mode = options.standalone || options.mode === "node" ? "node" : "source";
35
+ if (options.bundle !== undefined && (options.standalone || mode === "node")) {
34
36
  throw new ExecutionError("Composite Skill export (--bundle) currently only supports source mode. Please use '--mode source' to export as a composite workspace Skill.");
35
37
  }
36
38
  if (options.skillMdOnly && options.bundle === undefined) {
@@ -78,8 +80,8 @@ export function registerExportCommand(program, context) {
78
80
  throw notInProjectError("Please specify -P, --package <id>, --workspace, --all, or cd into a project directory.");
79
81
  }
80
82
  }
81
- if (roots.length > 1 && (options.actions || options.playbook)) {
82
- throw new ExecutionError("Filtering options (--actions, --playbook) can only be used when exporting a single package.");
83
+ if ((roots.length > 1 || options.bundle !== undefined) && (options.actions || options.playbook)) {
84
+ throw new ExecutionError("Filtering options (--actions, --playbook) cannot be combined with composite bundle export (--bundle) or multiple packages.");
83
85
  }
84
86
  const isMachine = Boolean(options.json);
85
87
  try {
@@ -100,6 +102,8 @@ export function registerExportCommand(program, context) {
100
102
  skillMdPath: options.skillMd,
101
103
  customMdPath: options.customMd,
102
104
  skillMdOnly: options.skillMdOnly,
105
+ bundleDeps: Boolean(options.bundleDeps),
106
+ standalone: Boolean(options.standalone),
103
107
  });
104
108
  renderResult(result, {
105
109
  json: isMachine,
@@ -148,6 +152,8 @@ export function registerExportCommand(program, context) {
148
152
  vendorDeps: options.vendorDeps,
149
153
  allowInstallScripts: options.allowInstallScripts,
150
154
  requireReproducible: options.requireReproducible,
155
+ bundleDeps: Boolean(options.bundleDeps),
156
+ standalone: Boolean(options.standalone),
151
157
  });
152
158
  results.push(res);
153
159
  }
@@ -190,6 +196,8 @@ export function registerExportCommand(program, context) {
190
196
  vendorDeps: options.vendorDeps,
191
197
  allowInstallScripts: options.allowInstallScripts,
192
198
  requireReproducible: options.requireReproducible,
199
+ bundleDeps: Boolean(options.bundleDeps),
200
+ standalone: Boolean(options.standalone),
193
201
  });
194
202
  renderResult(result, {
195
203
  json: isMachine,
@@ -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) => {
@@ -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.16.0",
3
+ "version": "2.17.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.16.0",
38
- "@actiondock/core": "^2.16.0",
39
- "@actiondock/mcp": "^2.16.0",
40
- "@actiondock/sdk": "^2.16.0",
37
+ "@actiondock/builder": "^2.17.0",
38
+ "@actiondock/core": "^2.17.0",
39
+ "@actiondock/mcp": "^2.17.0",
40
+ "@actiondock/sdk": "^2.17.0",
41
41
  "commander": "^13.1.0",
42
42
  "selfsigned": "^5.5.0"
43
43
  },