@co-villa/agentnest-tools 0.2.0 → 0.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/cli/index.mjs CHANGED
@@ -39,7 +39,23 @@ export async function collectFiles(directory) {
39
39
  }
40
40
 
41
41
  export async function main(args = process.argv.slice(2)) {
42
- const command = args.shift() ?? 'help';
42
+ const command =
43
+ args.includes('--help') || args.includes('-h') ? 'help' : (args.shift() ?? 'help');
44
+ if (command === 'help')
45
+ return {
46
+ usage: [
47
+ 'agentnest init [directory] --project my-site --kind static|node|worker',
48
+ 'agentnest projects',
49
+ 'agentnest deploy [directory] --project my-site --kind static|node|worker [--spa] [--build] [--no-wait]',
50
+ 'agentnest status <deployment-id>',
51
+ 'agentnest logs <deployment-id>',
52
+ 'agentnest promote <project-id> <deployment-id>',
53
+ 'agentnest env <project-id> --file variables.json',
54
+ ],
55
+ authentication:
56
+ 'AGENTDOCK_URL + AGENTDOCK_TOKEN(本地开发自动读取平台 .agentdock/admin-token)',
57
+ output: 'stdout 始终为 JSON;失败退出码 1。默认等待部署完成,--no-wait 立即返回部署 ID。',
58
+ };
43
59
  const flags = {};
44
60
  const positional = [];
45
61
  while (args.length) {
@@ -53,21 +69,6 @@ export async function main(args = process.argv.slice(2)) {
53
69
  }
54
70
  } else positional.push(arg);
55
71
  }
56
- if (command === 'help')
57
- return {
58
- usage: [
59
- 'agentdock init [directory] --project my-site --kind static|node|worker',
60
- 'agentdock projects',
61
- 'agentdock deploy [directory] --project my-site --kind static|node|worker [--spa] [--build] [--no-wait]',
62
- 'agentdock status <deployment-id>',
63
- 'agentdock logs <deployment-id>',
64
- 'agentdock promote <project-id> <deployment-id>',
65
- 'agentdock env <project-id> --file variables.json',
66
- ],
67
- authentication:
68
- 'AGENTDOCK_URL + AGENTDOCK_TOKEN(本地开发自动读取平台 .agentdock/admin-token)',
69
- output: 'stdout 始终为 JSON;失败退出码 1。默认等待部署完成,--no-wait 立即返回部署 ID。',
70
- };
71
72
  if (command === 'init') {
72
73
  const target = resolve(positional[0] ?? '.');
73
74
  const kind = flags.kind ?? 'static';
@@ -205,7 +206,7 @@ export async function main(args = process.argv.slice(2)) {
205
206
  const deadline = Date.now() + 300000;
206
207
  while (!['ready', 'failed', 'cancelled', 'deleted'].includes(result.status)) {
207
208
  if (Date.now() > deadline) {
208
- const error = new Error(`等待超时,部署仍可能继续。请执行 agentdock status ${result.id}`);
209
+ const error = new Error(`等待超时,部署仍可能继续。请执行 agentnest status ${result.id}`);
209
210
  error.code = 'WAIT_TIMEOUT';
210
211
  throw error;
211
212
  }
package/mcp/index.mjs CHANGED
@@ -7,7 +7,7 @@ import { registerResourceTools } from './resource-tools.mjs';
7
7
  import { registerProjectTools } from './project-tools.mjs';
8
8
  import { platformApi } from './api.mjs';
9
9
  import { saveLocalBinding } from './local-development.mjs';
10
- const server = new McpServer({ name: 'agentdock', version: '0.2.0' });
10
+ const server = new McpServer({ name: 'agentdock', version: '0.2.1' });
11
11
  const tool = (name, description, inputSchema, fn, readOnlyHint = false) =>
12
12
  server.registerTool(
13
13
  name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@co-villa/agentnest-tools",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "AgentNest deployment CLI and MCP stdio server",
6
6
  "engines": {