@colin4k1024/tsp 2.4.7 → 2.4.8

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
@@ -80,7 +80,7 @@ TSP 整合了多个社区开源框架的精华能力,而非从零构建:
80
80
 
81
81
  TSP 当前支持把第三方设计能力作为外部扩展接入使用。设计工具负责高保真 artifact,TSP 负责团队协作、角色分工、handoff、quality gate 与发布收口。
82
82
 
83
- [Open Design](https://github.com/nexu-io/open-design) 是当前已纳入安装面导航的受控可选设计工作台:它提供本地优先 web/daemon、coding-agent CLI 调度、31 个设计 skills、设计系统库、sandbox preview 与 HTML/PDF/PPTX/ZIP/MP4 等导出链路。TSP 侧落点是 [skills/open-design/SKILL.md](skills/open-design/SKILL.md) 与 [docs/runbooks/open-design-integration.md](docs/runbooks/open-design-integration.md),并通过 `design-prototyping` module 进入 `team` / `full` profile。其中 `full` profile 会自动执行 [scripts/install-open-design.js](scripts/install-open-design.js),把 Open Design clone/update 到 `~/.tsp/open-design`,并在 `corepack` / `pnpm` 可用时安装依赖。TSP 不 vendoring Open Design 源码、daemon、skills、design-systems 或 SQLite 数据。
83
+ [Open Design](https://github.com/nexu-io/open-design) 是当前已纳入安装面导航的受控可选设计工作台:它提供本地优先 web/daemon、coding-agent CLI 调度、31 个设计 skills、设计系统库、sandbox preview 与 HTML/PDF/PPTX/ZIP/MP4 等导出链路。TSP 侧落点是 [skills/open-design/SKILL.md](skills/open-design/SKILL.md) 与 [docs/runbooks/open-design-integration.md](docs/runbooks/open-design-integration.md),并通过 `design-prototyping` module 进入 `team` / `full` profile。其中 `full` profile 会自动执行 [scripts/install-open-design.js](scripts/install-open-design.js),把 Open Design clone/update 到 `~/.tsp/open-design`,并在 `corepack` / `pnpm` 可用时安装依赖;如果 GitHub 网络不可达,该步骤只警告并继续完成 TSP 核心安装。TSP 不 vendoring Open Design 源码、daemon、skills、design-systems 或 SQLite 数据。
84
84
 
85
85
  [huashu-design](https://github.com/alchaincyf/huashu-design) 仍作为文档级协同能力保留:它偏向高保真设计产出,覆盖 HTML 原生交互原型、浏览器演讲幻灯片、时间轴动画、信息图与 5 维度设计评审。
86
86
 
@@ -344,6 +344,8 @@
344
344
  "profiles": [
345
345
  "full"
346
346
  ],
347
+ "failureMode": "warn",
348
+ "failureHint": "Open Design is an optional sidecar. TSP core files are still installed; rerun full install when GitHub access is available to refresh ~/.tsp/open-design.",
347
349
  "command": "node",
348
350
  "script": "scripts/install-open-design.js",
349
351
  "args": []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colin4k1024/tsp",
3
- "version": "2.4.7",
3
+ "version": "2.4.8",
4
4
  "description": "Open-source Team Skills Platform for role-based AI delivery workflows, shared skills, hooks, commands, and multi-platform installs.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -85,6 +85,58 @@
85
85
  "beta",
86
86
  "stable"
87
87
  ]
88
+ },
89
+ "externalInstall": {
90
+ "type": "object",
91
+ "properties": {
92
+ "id": {
93
+ "type": "string",
94
+ "pattern": "^[a-z0-9-]+$"
95
+ },
96
+ "description": {
97
+ "type": "string",
98
+ "minLength": 1
99
+ },
100
+ "profiles": {
101
+ "type": "array",
102
+ "items": {
103
+ "type": "string",
104
+ "minLength": 1
105
+ }
106
+ },
107
+ "failureMode": {
108
+ "type": "string",
109
+ "enum": [
110
+ "error",
111
+ "warn"
112
+ ]
113
+ },
114
+ "failureHint": {
115
+ "type": "string"
116
+ },
117
+ "command": {
118
+ "type": "string",
119
+ "minLength": 1
120
+ },
121
+ "script": {
122
+ "type": "string",
123
+ "minLength": 1
124
+ },
125
+ "args": {
126
+ "type": "array",
127
+ "items": {
128
+ "type": "string"
129
+ }
130
+ }
131
+ },
132
+ "required": [
133
+ "id",
134
+ "description",
135
+ "command",
136
+ "script",
137
+ "args"
138
+ ],
139
+ "additionalProperties": false
88
140
  }
89
141
  },
90
142
  "required": [
@@ -218,7 +218,8 @@ function printHumanPlan(plan, dryRun, knownRisks = []) {
218
218
  if (Array.isArray(plan.externalInstalls) && plan.externalInstalls.length > 0) {
219
219
  console.log('\nPlanned external installs:');
220
220
  for (const externalInstall of plan.externalInstalls) {
221
- console.log(`- ${externalInstall.id}: ${externalInstall.description || externalInstall.script}`);
221
+ const mode = externalInstall.failureMode === 'warn' ? ' [warn-on-failure]' : '';
222
+ console.log(`- ${externalInstall.id}${mode}: ${externalInstall.description || externalInstall.script}`);
222
223
  }
223
224
  }
224
225
 
@@ -156,6 +156,8 @@ function resolvePlanExternalInstalls(plan) {
156
156
  args: Array.isArray(externalInstall.args)
157
157
  ? externalInstall.args.map(value => String(value))
158
158
  : [],
159
+ failureMode: externalInstall.failureMode === 'warn' ? 'warn' : 'error',
160
+ failureHint: typeof externalInstall.failureHint === 'string' ? externalInstall.failureHint : '',
159
161
  target: plan.target || null,
160
162
  profileId: plan.profileId || null,
161
163
  }));
@@ -213,7 +215,8 @@ function printPlan(plan) {
213
215
  console.log('');
214
216
  console.log(`External install plan (${externalInstalls.length}):`);
215
217
  for (const externalInstall of externalInstalls) {
216
- console.log(`- ${externalInstall.id}: ${externalInstall.description || externalInstall.script}`);
218
+ const mode = externalInstall.failureMode === 'warn' ? ' [warn-on-failure]' : '';
219
+ console.log(`- ${externalInstall.id}${mode}: ${externalInstall.description || externalInstall.script}`);
217
220
  }
218
221
  }
219
222
  }
@@ -219,6 +219,11 @@ function runExternalInstall(externalInstall) {
219
219
  });
220
220
 
221
221
  if (result.status !== 0) {
222
+ if (externalInstall.failureMode === 'warn') {
223
+ console.error(`Warning: optional external install failed: ${label}`);
224
+ console.error(externalInstall.failureHint || 'TSP core install will continue; rerun when the external dependency is reachable.');
225
+ return;
226
+ }
222
227
  throw new Error(`External install failed: ${label}`);
223
228
  }
224
229
  }
@@ -162,6 +162,10 @@ function resolveExternalInstalls(selectedModules, options = {}) {
162
162
  const args = Array.isArray(externalInstall.args)
163
163
  ? externalInstall.args.map(value => String(value))
164
164
  : [];
165
+ const failureMode = externalInstall.failureMode === 'warn' ? 'warn' : 'error';
166
+ const failureHint = typeof externalInstall.failureHint === 'string' && externalInstall.failureHint.trim()
167
+ ? externalInstall.failureHint.trim()
168
+ : '';
165
169
 
166
170
  if (!script) {
167
171
  throw new Error(`Install module ${module.id} has externalInstall but no script`);
@@ -175,6 +179,8 @@ function resolveExternalInstalls(selectedModules, options = {}) {
175
179
  script,
176
180
  scriptPath: path.join(sourceRoot, script),
177
181
  args,
182
+ failureMode,
183
+ failureHint,
178
184
  cwd: sourceRoot,
179
185
  target,
180
186
  profileId,