@spzxg/cli-skill 0.1.2 → 0.1.4

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
@@ -1,28 +1,27 @@
1
1
  # @spzxg/cli-skill
2
2
 
3
+ > 2026-11-24:本地源码已升级至 `@spzxg/cli-skill@0.1.4`(待发布,配套 `@spzxg/cli-mcp@0.1.4`、`@spzxg/cli-ui@0.6.18`、四个基础包 `1.0.7`),新增校验并透传 `continue_on_task_failure` 与 `workspace.material_root`;发布前 npm 上最新已发布版本仍为 `@spzxg/cli-skill@0.1.3`(2026-11-16)。
4
+
5
+ > 2026-11-16:源码包名、当前依赖和导入统一使用 `@spzxg`,四个基础包为 `1.0.6`,CLI 三包各自版本不变。构建与更新依赖直接使用该命名空间;历史发布记录保留原包名。发布仍使用隔离打包和完整性检查,本次源码改名不重新发布 npm,也不代表线上文档或节点已更新。
6
+
7
+ **`@spzxg/cli-skill@0.1.3` 已发布(2026-11-16),npm 已核验可获取。** 以下接入命令、源码包名和当前业务引用统一使用 `@spzxg`,各自版本不变,历史发布记录保留原包名。npm 发布不代表中枢、节点、数据库迁移或线上文档已部署。
8
+
3
9
  中枢 CLI Task Center 的独立 API 客户端、命令行和可安装 Skill。业务系统通过它把工作交给已配置的远端 CLI Agent,支持一次性多任务拆解、依赖关系、派发即返回、等待结果和节点 ego 浏览器开关。只调用现有 HTTP API,不修改中枢服务、调度器或 Operator。
4
10
 
5
- **0.1.1 已发布到 npm**,包含普通对话的执行配置、能力读取和按修订号保存。当前源码为 **0.1.2 本地候选**,仅修正文档与版本标识,功能与 0.1.1 相同;不会覆盖已发布版本。执行配置需要配套中枢迁移和节点升级,安装本包不会完成这些服务端步骤。可与已发布的 `@spzxg/cli-ui@0.6.9` 协同使用,各包版本独立。
11
+ **@xgspz/cli-skill@0.1.3 已发布(2026-11-11)**,包含普通对话执行配置、能力读取和按修订号保存。0.1.3 只更新包内说明,命令和功能与 0.1.2、旧命名空间 0.1.1 相同。可与 `@xgspz/cli-ui@0.6.15` 协同使用,各包版本独立;执行配置仍需配套中枢迁移和节点升级,安装本包不会部署服务。
6
12
 
7
13
  ## 安装 Skill
8
14
 
9
- 要求 Node.js 22+。以下安装示例固定使用已核验发布的 0.1.1,支持本文全部命令:
15
+ 要求 Node.js 22+。以下安装示例使用已发布的 @spzxg 0.1.3,支持本文全部命令:
10
16
 
11
17
  ```bash
12
- npx -y @spzxg/cli-skill@0.1.1 install --agent codex
13
- npx -y @spzxg/cli-skill@0.1.1 install --agent claude
18
+ npx -y @spzxg/cli-skill@0.1.3 install --agent codex
19
+ npx -y @spzxg/cli-skill@0.1.3 install --agent claude
14
20
  # 或同时安装到两者
15
- npx -y @spzxg/cli-skill@0.1.1 install --agent all
16
- ```
17
-
18
- 验收 0.1.2 时安装本地候选 tarball,并用同版本命令安装 Skill:
19
-
20
- ```bash
21
- npm install -g /path/to/spzxg-cli-skill-0.1.2.tgz
22
- cli-skill install --agent codex
21
+ npx -y @spzxg/cli-skill@0.1.3 install --agent all
23
22
  ```
24
23
 
25
- 0.1.2 尚未发布,当前公开 npm 命令继续使用 0.1.1。历史版本 0.1.0 不支持执行配置命令或 `execution_config` 字段。
24
+ 需要全局安装时使用 `npm i -g @spzxg/cli-skill@0.1.3`,然后运行 `cli-skill install --agent codex`。历史版本 0.1.0 不支持执行配置命令或 `execution_config` 字段。
26
25
 
27
26
  默认安装到 `~/.codex/skills/cli-task-center` 或 `~/.claude/skills/cli-task-center`;Codex 尊重 `CODEX_HOME`。自定义宿主用 `install --dir /path/to/skills`。已有目录时明确报错;确认替换本 Skill 时加 `--force`。无 npm 安装后脚本,不自动修改任何宿主配置。安装后按宿主的技能刷新方式加载,或重开会话。
28
27
 
@@ -50,12 +49,12 @@ Base URL 是中枢根地址;也支持业务代理前缀,例如 `https://busi
50
49
 
51
50
  ```bash
52
51
  # 接受后立即返回 IDs,不后台轮询
53
- npx -y @spzxg/cli-skill@0.1.1 dispatch --input job.json
52
+ npx -y @spzxg/cli-skill@0.1.3 dispatch --input job.json
54
53
  # 接受后等待,最多 60 秒
55
- npx -y @spzxg/cli-skill@0.1.1 dispatch --input job.json --wait --timeout-seconds 60
54
+ npx -y @spzxg/cli-skill@0.1.3 dispatch --input job.json --wait --timeout-seconds 60
56
55
  # 延续已有任务的等待,不新建任务
57
- npx -y @spzxg/cli-skill@0.1.1 wait <job_id> --timeout-seconds 60
58
- npx -y @spzxg/cli-skill@0.1.1 get <job_id>
56
+ npx -y @spzxg/cli-skill@0.1.3 wait <job_id> --timeout-seconds 60
57
+ npx -y @spzxg/cli-skill@0.1.3 get <job_id>
59
58
  ```
60
59
 
61
60
  也支持 `--input -` 从 stdin 读取 JSON。`--browser true|false` 覆盖整个提交中的子任务;省略时保留每个 `tasks[].browser`,缺省 false。true 由现有服务在执行节点准备 ego 浏览器,本机不会启动浏览器。
package/bin/cli-skill.js CHANGED
@@ -4,7 +4,7 @@ import { readFile } from 'node:fs/promises';
4
4
  import { createClientFromEnv } from '../src/client.js';
5
5
  import { installSkill } from '../src/install.js';
6
6
 
7
- const help = `CLI Task Center · @spzxg/cli-skill 0.1.2
7
+ const help = `CLI Task Center · @spzxg/cli-skill 0.1.4
8
8
 
9
9
  Install an agent skill:
10
10
  cli-skill install [--agent codex|claude|all] [--dir <skills-directory>] [--force]
@@ -38,7 +38,7 @@ try {
38
38
  'turn-id': { type: 'string' }, help: { type: 'boolean', short: 'h' }, version: { type: 'boolean', short: 'v' },
39
39
  'task-id': { type: 'string' }, 'expected-revision': { type: 'string' },
40
40
  } });
41
- if (values.version) { process.stdout.write('0.1.2\n'); }
41
+ if (values.version) { process.stdout.write('0.1.4\n'); }
42
42
  else if (values.help || !positionals.length) { process.stdout.write(help); }
43
43
  else {
44
44
  const [command, id, ...extra] = positionals;
package/package.json CHANGED
@@ -1,19 +1,44 @@
1
1
  {
2
2
  "name": "@spzxg/cli-skill",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "CLI Task Center API client and installable agent skill: dispatch background tasks, wait for results, split dependent work, and enable execution-node ego browsers.",
5
5
  "type": "module",
6
- "engines": { "node": ">=22" },
7
- "bin": { "cli-skill": "./bin/cli-skill.js" },
8
- "exports": { ".": { "types": "./src/client.d.ts", "default": "./src/client.js" } },
6
+ "engines": {
7
+ "node": ">=22"
8
+ },
9
+ "bin": {
10
+ "cli-skill": "./bin/cli-skill.js"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "types": "./src/client.d.ts",
15
+ "default": "./src/client.js"
16
+ }
17
+ },
9
18
  "types": "./src/client.d.ts",
10
- "files": ["bin", "src", "skills", "README.md", "LICENSE"],
19
+ "files": [
20
+ "bin",
21
+ "src",
22
+ "skills",
23
+ "README.md",
24
+ "LICENSE"
25
+ ],
11
26
  "scripts": {
12
27
  "test": "node --test test/*.test.js",
13
28
  "check": "node --check bin/cli-skill.js && node --check src/client.js && node --check src/install.js",
14
29
  "prepublishOnly": "npm run check && npm test"
15
30
  },
16
- "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" },
17
- "keywords": ["cli-task-center", "skill", "codex", "claude-code", "ego-browser", "task-orchestration"],
31
+ "publishConfig": {
32
+ "access": "public",
33
+ "registry": "https://registry.npmjs.org/"
34
+ },
35
+ "keywords": [
36
+ "cli-task-center",
37
+ "skill",
38
+ "codex",
39
+ "claude-code",
40
+ "ego-browser",
41
+ "task-orchestration"
42
+ ],
18
43
  "license": "MIT"
19
44
  }
@@ -11,7 +11,7 @@ Use this skill when the user wants work executed by their configured Center and
11
11
 
12
12
  Commands require Node.js 22+ and two environment variables: `CLI_CENTER_BASE_URL` (Center root or business backend proxy URL, without a trailing `/api`) and `CLI_CENTER_TOKEN` (product-line token). The credential stays in the environment; never place it in prompts, JSON job files, skill files, or published artifacts. Do not read an admin token to supply missing product-line configuration.
13
13
 
14
- This Skill accompanies the `@spzxg/cli-skill@0.1.2` documentation/version correction candidate; its commands are unchanged from the published 0.1.1. For the published package, use `npx -y @spzxg/cli-skill@0.1.1` followed by a command below, or an installed 0.1.1 `cli-skill`. To validate the 0.1.2 candidate, use the matching installed command from its local tarball; 0.1.2 is not yet published. Version 0.1.0 lacks the execution-settings commands. Settings still require the matching Center migration and node upgrade; installing the client does not deploy services or migrate a database.
14
+ This Skill targets `@spzxg/cli-skill@0.1.4` (pending release; previous published `@spzxg/cli-skill@0.1.3`, 2026-11-16), adding support for `continue_on_task_failure` and `workspace.material_root`. Use `npx -y @spzxg/cli-skill@0.1.4` once published (or `0.1.3` prior to publication) or an installed `cli-skill`. Commands are unchanged from 0.1.1. Version 0.1.0 lacks execution-settings commands. Settings require the matching Center migration and node upgrade; installing the client does not deploy services or migrate a database.
15
15
 
16
16
  ## Choose the user's completion contract
17
17
 
package/src/client.d.ts CHANGED
@@ -17,7 +17,8 @@ export interface TaskInput {
17
17
  }
18
18
  export interface JobInput {
19
19
  title: string; tasks: TaskInput[]; mode?: 'conversation'; max_concurrent_tasks?: number;
20
- workspace?: { version?: 1; name?: string; context?: string; branch?: string }; callback?: Callback;
20
+ continue_on_task_failure?: boolean;
21
+ workspace?: { version?: 1; name?: string; context?: string; branch?: string; material_root?: string }; callback?: Callback;
21
22
  }
22
23
  export interface DispatchReceipt {
23
24
  id?: string; job_id: string; status: string; task_ids?: string[]; tasks?: string[];
package/src/client.js CHANGED
@@ -49,16 +49,18 @@ function executionReply(value, uncertain = false) {
49
49
  /** Validate wrapper-sensitive fields; the Center remains the API authority. */
50
50
  export function validateJob(input, options = {}) {
51
51
  requireValue(object(input) && nonempty(input.title), 'job.title is required');
52
- const allowed = new Set(['title', 'mode', 'tasks', 'workspace', 'callback', 'max_concurrent_tasks']);
52
+ const allowed = new Set(['title', 'mode', 'tasks', 'workspace', 'callback', 'max_concurrent_tasks', 'continue_on_task_failure']);
53
53
  for (const key of Object.keys(input)) requireValue(allowed.has(key), `Unsupported job field: ${key}`);
54
54
  requireValue(input.mode === undefined || input.mode === 'conversation', 'Omit mode for a one-shot job, or use conversation');
55
55
  requireValue(Array.isArray(input.tasks) && input.tasks.length > 0, 'job.tasks must be a nonempty array');
56
56
  if (options.browser !== undefined) requireValue(typeof options.browser === 'boolean', 'browser must be a boolean');
57
57
  if (input.callback !== undefined) callback(input.callback);
58
58
  if (input.max_concurrent_tasks !== undefined) requireValue(Number.isInteger(input.max_concurrent_tasks) && input.max_concurrent_tasks >= 1 && input.max_concurrent_tasks <= 20, 'max_concurrent_tasks must be an integer from 1 to 20');
59
+ if (input.continue_on_task_failure !== undefined) requireValue(typeof input.continue_on_task_failure === 'boolean', 'continue_on_task_failure must be a boolean');
59
60
  if (input.workspace !== undefined) {
60
61
  requireValue(object(input.workspace), 'workspace must be an object');
61
- for (const key of Object.keys(input.workspace)) requireValue(['version', 'name', 'context', 'branch'].includes(key), `Unsupported workspace field: ${key}`);
62
+ for (const key of Object.keys(input.workspace)) requireValue(['version', 'name', 'context', 'branch', 'material_root'].includes(key), `Unsupported workspace field: ${key}`);
63
+ if (input.workspace.material_root !== undefined) requireValue(nonempty(input.workspace.material_root), 'workspace.material_root must be nonempty');
62
64
  }
63
65
  const keys = new Map();
64
66
  const tasks = input.tasks.map((task, index) => {