@spzxg/cli-skill 0.1.3 → 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,6 +1,10 @@
1
1
  # @spzxg/cli-skill
2
2
 
3
- **本次发布目标:`@spzxg/cli-skill@0.1.3`(本地候选,未发布)。** 源码包名和现有业务依赖保留 `@xgspz`,各自版本不变;七包批量脚本通过 `--prepare-only` 隔离转换,不发布。下列 `@spzxg` 命令须等维护者发布后使用;现在可先安装本地 tarball。历史已发布记录保留原包名。
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 发布不代表中枢、节点、数据库迁移或线上文档已部署。
4
8
 
5
9
  中枢 CLI Task Center 的独立 API 客户端、命令行和可安装 Skill。业务系统通过它把工作交给已配置的远端 CLI Agent,支持一次性多任务拆解、依赖关系、派发即返回、等待结果和节点 ego 浏览器开关。只调用现有 HTTP API,不修改中枢服务、调度器或 Operator。
6
10
 
@@ -8,7 +12,7 @@
8
12
 
9
13
  ## 安装 Skill
10
14
 
11
- 要求 Node.js 22+。以下安装示例面向待发布的 @spzxg 0.1.3,支持本文全部命令:
15
+ 要求 Node.js 22+。以下安装示例使用已发布的 @spzxg 0.1.3,支持本文全部命令:
12
16
 
13
17
  ```bash
14
18
  npx -y @spzxg/cli-skill@0.1.3 install --agent codex
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.3
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.3\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,6 +1,6 @@
1
1
  {
2
2
  "name": "@spzxg/cli-skill",
3
- "version": "0.1.3",
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
6
  "engines": {
@@ -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 targets `@spzxg/cli-skill@0.1.3` (local candidate, not yet published). Source packages and existing business dependencies remain `@xgspz`; isolated packaging converts the package and runtime imports. Install the local tarball now, or use `npx -y @spzxg/cli-skill@0.1.3` after the maintainer publishes it. 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.
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) => {