@actiondock/cli 2.2.0 → 2.2.1
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/commands/build.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { buildProject } from "@actiondock/builder";
|
|
2
1
|
import { findProjectRoot, resolvePackageRoot } from "@actiondock/core";
|
|
3
2
|
import { ExecutionError } from "../errors.js";
|
|
4
3
|
import { renderResult, writeStdout } from "../renderer.js";
|
|
@@ -38,6 +37,7 @@ export function registerBuildCommand(program, context) {
|
|
|
38
37
|
}
|
|
39
38
|
let result;
|
|
40
39
|
try {
|
|
40
|
+
const { buildProject } = await import("@actiondock/builder");
|
|
41
41
|
result = await buildProject({
|
|
42
42
|
projectRoot: root,
|
|
43
43
|
outDir: options.out,
|
package/dist/commands/export.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { basename } from "node:path";
|
|
3
|
-
import { exportCompositeSkill, exportSkill, exportSkillBatch } from "@actiondock/builder";
|
|
4
3
|
import { discoverProjects, findProjectRoot, listLinkedPackages, resolvePackageRoot } from "@actiondock/core";
|
|
5
4
|
import { ExecutionError } from "../errors.js";
|
|
6
5
|
import { renderResult, writeStdout } from "../renderer.js";
|
|
@@ -90,6 +89,7 @@ export function registerExportCommand(program, context) {
|
|
|
90
89
|
}
|
|
91
90
|
const isMachine = Boolean(options.json || options.envelope);
|
|
92
91
|
try {
|
|
92
|
+
const { exportCompositeSkill, exportSkill, exportSkillBatch } = await import("@actiondock/builder");
|
|
93
93
|
if (options.bundle !== undefined) {
|
|
94
94
|
const bundleName = typeof options.bundle === "string" && options.bundle.trim()
|
|
95
95
|
? options.bundle.trim()
|
package/dist/commands/mcp.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { resolve } from "node:path";
|
|
2
2
|
import { findProjectRoot, formatHostForUrl, loadProjectConfig, parseDuration } from "@actiondock/core";
|
|
3
|
-
import { startMcpHttpServer, startMcpStdio } from "@actiondock/mcp";
|
|
4
3
|
import { ArgumentError, ExecutionError } from "../errors.js";
|
|
5
4
|
import { writeStdout } from "../renderer.js";
|
|
6
5
|
import { getEffectiveOptions, parseByteSize, parseListOption } from "../utils/index.js";
|
|
@@ -36,6 +35,7 @@ export function registerMcpCommands(program, context) {
|
|
|
36
35
|
const packageIds = options.package && options.package.length > 0 ? options.package : undefined;
|
|
37
36
|
const all = Boolean(options.all);
|
|
38
37
|
try {
|
|
38
|
+
const { startMcpStdio } = await import("@actiondock/mcp");
|
|
39
39
|
await startMcpStdio({
|
|
40
40
|
projectRoots,
|
|
41
41
|
packageIds,
|
|
@@ -132,6 +132,7 @@ export function registerMcpCommands(program, context) {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
try {
|
|
135
|
+
const { startMcpHttpServer } = await import("@actiondock/mcp");
|
|
135
136
|
const server = await startMcpHttpServer({
|
|
136
137
|
port,
|
|
137
138
|
host,
|
package/dist/commands/pack.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { packProject } from "@actiondock/builder";
|
|
2
1
|
import { findProjectRoot, resolvePackageRoot } from "@actiondock/core";
|
|
3
2
|
import { ExecutionError } from "../errors.js";
|
|
4
3
|
import { renderResult, writeStdout } from "../renderer.js";
|
|
@@ -28,6 +27,7 @@ export function registerPackCommand(program, context) {
|
|
|
28
27
|
}
|
|
29
28
|
let result;
|
|
30
29
|
try {
|
|
30
|
+
const { packProject } = await import("@actiondock/builder");
|
|
31
31
|
result = await packProject({
|
|
32
32
|
projectRoot: root,
|
|
33
33
|
outDir: options.out,
|
package/dist/commands/serve.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { resolve } from "node:path";
|
|
2
2
|
import { findProjectRoot, formatHostForUrl, loadProjectConfig, startActionDockServer } from "@actiondock/core";
|
|
3
|
-
import { createActionDockMcpServer } from "@actiondock/mcp";
|
|
4
|
-
import { createMcpHandler } from "@modelcontextprotocol/server";
|
|
5
3
|
import { ArgumentError, ExecutionError } from "../errors.js";
|
|
6
4
|
import { writeStderr, writeStdout } from "../renderer.js";
|
|
7
5
|
import { getEffectiveOptions, parseByteSize } from "../utils/index.js";
|
|
@@ -24,6 +22,7 @@ export function registerServeCommand(program, context) {
|
|
|
24
22
|
.option("--expose-debug-info", "Expose project root path in health and info responses")
|
|
25
23
|
.option("--no-mcp", "Disable unified MCP protocol endpoint at /mcp")
|
|
26
24
|
.option("--allow-query-token", "Allow passing authentication token via URL query parameter (?token=xxx)")
|
|
25
|
+
.option("--management", "Enable config and state management API endpoints (disabled by default for security)")
|
|
27
26
|
.option("-d, --dir <path>", "Project root directory (default: current working directory)")
|
|
28
27
|
.action(async (rawOptions, cmd) => {
|
|
29
28
|
const options = getEffectiveOptions(rawOptions, cmd);
|
|
@@ -32,6 +31,7 @@ export function registerServeCommand(program, context) {
|
|
|
32
31
|
const token = options.token || (typeof process !== "undefined" ? process.env?.ACTIONDOCK_TOKEN : undefined);
|
|
33
32
|
const allowInsecureNoAuth = Boolean(options.allowInsecureNoAuth);
|
|
34
33
|
const allowQueryToken = Boolean(options.allowQueryToken);
|
|
34
|
+
const enableManagement = Boolean(options.management);
|
|
35
35
|
const corsOrigins = options.corsOrigin && options.corsOrigin.length > 0 ? options.corsOrigin : undefined;
|
|
36
36
|
const exposeDebugInfo = Boolean(options.exposeDebugInfo);
|
|
37
37
|
let maxBodyBytes;
|
|
@@ -61,6 +61,10 @@ export function registerServeCommand(program, context) {
|
|
|
61
61
|
if (enableMcp) {
|
|
62
62
|
// MCP 处理器创建失败时直接终止启动,避免横幅宣称不存在的端点
|
|
63
63
|
try {
|
|
64
|
+
const [{ createActionDockMcpServer }, { createMcpHandler }] = await Promise.all([
|
|
65
|
+
import("@actiondock/mcp"),
|
|
66
|
+
import("@modelcontextprotocol/server"),
|
|
67
|
+
]);
|
|
64
68
|
const handler = createMcpHandler(() => {
|
|
65
69
|
return createActionDockMcpServer({
|
|
66
70
|
projectRoot: projectRoot || undefined,
|
|
@@ -89,6 +93,7 @@ export function registerServeCommand(program, context) {
|
|
|
89
93
|
maxBodyBytes,
|
|
90
94
|
exposeDebugInfo,
|
|
91
95
|
enableMcp,
|
|
96
|
+
enableManagement,
|
|
92
97
|
mcpHandler,
|
|
93
98
|
projectRoot: projectRoot || undefined,
|
|
94
99
|
});
|
|
@@ -106,6 +111,7 @@ export function registerServeCommand(program, context) {
|
|
|
106
111
|
? (allowQueryToken ? "Bearer Token / Query Token Enabled" : "Bearer Token Enabled (Query Token Disabled)")
|
|
107
112
|
: "Disabled (Public/Local)";
|
|
108
113
|
writeStdout(` * Authentication: ${authDesc}`, context);
|
|
114
|
+
writeStdout(` * Management APIs: ${enableManagement ? "Enabled" : "Disabled (Default)"}`, context);
|
|
109
115
|
writeStdout(` * CORS Origins: ${corsOrigins ? corsOrigins.join(", ") : "Disabled (Default)"}`, context);
|
|
110
116
|
writeStdout(` * Max Body Size: ${options.maxBody || "1mb"}`, context);
|
|
111
117
|
writeStdout(` * Health Endpoint: http://${actualEndpointHost}:${server.port}/api/v1/health`, context);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { checkGeneratedTypes, findProjectRoot, GENERATED_TYPES_OUTDATED_CODE, loadActions, loadProjectConfig, resolvePackageRoot, } from "@actiondock/core";
|
|
2
|
-
import { SelectionPlanner } from "@actiondock/builder";
|
|
3
2
|
import { ArgumentError, ExecutionError } from "../errors.js";
|
|
4
3
|
import { renderActionValidation, renderResult } from "../renderer.js";
|
|
5
4
|
import { getEffectiveOptions } from "../utils/index.js";
|
|
@@ -84,6 +83,7 @@ export function registerValidateCommand(program, context) {
|
|
|
84
83
|
}
|
|
85
84
|
// 校验 Action 本地相对依赖完整性
|
|
86
85
|
try {
|
|
86
|
+
const { SelectionPlanner } = await import("@actiondock/builder");
|
|
87
87
|
SelectionPlanner.plan({ projectRoot: root, actions: id ? [id] : undefined });
|
|
88
88
|
}
|
|
89
89
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actiondock/cli",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
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.2.
|
|
38
|
-
"@actiondock/core": "^2.2.
|
|
39
|
-
"@actiondock/mcp": "^2.2.
|
|
40
|
-
"@actiondock/runtime-node": "^2.2.
|
|
41
|
-
"@actiondock/sdk": "^2.2.
|
|
37
|
+
"@actiondock/builder": "^2.2.1",
|
|
38
|
+
"@actiondock/core": "^2.2.1",
|
|
39
|
+
"@actiondock/mcp": "^2.2.1",
|
|
40
|
+
"@actiondock/runtime-node": "^2.2.1",
|
|
41
|
+
"@actiondock/sdk": "^2.2.1",
|
|
42
42
|
"commander": "^13.1.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|