cowork-flow 2.7.0 → 2.7.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/CHANGELOG.md +8 -1
- package/docs/hosts.en.md +1 -1
- package/docs/hosts.md +1 -1
- package/package.json +1 -1
- package/presets/claude-code/.claude-plugin/plugin.json +1 -1
- package/presets/codex/.codex-plugin/plugin.json +1 -1
- package/presets/kimi-code/.kimi-plugin/plugin.json +1 -1
- package/presets/qoder/.qoder-plugin/plugin.json +1 -1
- package/presets/zcode/.zcode-plugin/plugin.json +1 -1
- package/src/commands/install-qoder-plugin.js +126 -5
- package/template/.cowork-flow/.version +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
### Changed
|
|
8
8
|
|
|
9
|
+
## [2.7.1] - 2026-11-05
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Qoder fixed agents 改为用户级安装**:三个 fixed agent 从插件 `agents/`(Qoder 会拼成 `cowork-flow:cowork-check`)迁到每个 edition 的用户级 `<home>/agents/`,文件名保持 `cowork-check.md` 等 plain name,避免 Windows 把插件命名空间里的 `:` 拼进子代理文件路径导致 `EINVAL`。`host add qoder` 会同步用户级 agent 并从插件缓存移除 `agents/`;已健康安装(无 `--force`)也会自动迁移。`host remove qoder` 只删除带 cowork-flow 管理标记的文件,不覆盖或删除用户自建 agent。
|
|
14
|
+
|
|
9
15
|
## [2.7.0] - 2026-11-05
|
|
10
16
|
|
|
11
17
|
### Added
|
|
@@ -502,7 +508,8 @@
|
|
|
502
508
|
|
|
503
509
|
此版本未保留本地条目正文,详情见 [GitHub Release](https://github.com/fishlikewater/cowork-flow/releases/tag/v0.0.47)。
|
|
504
510
|
|
|
505
|
-
[Unreleased]: https://github.com/fishlikewater/cowork-flow/compare/v2.7.
|
|
511
|
+
[Unreleased]: https://github.com/fishlikewater/cowork-flow/compare/v2.7.1...HEAD
|
|
512
|
+
[2.7.1]: https://github.com/fishlikewater/cowork-flow/compare/v2.7.0...v2.7.1
|
|
506
513
|
[2.7.0]: https://github.com/fishlikewater/cowork-flow/compare/v2.6.0...v2.7.0
|
|
507
514
|
[2.6.0]: https://github.com/fishlikewater/cowork-flow/compare/v2.5.2...v2.6.0
|
|
508
515
|
[2.5.2]: https://github.com/fishlikewater/cowork-flow/compare/v2.5.1...v2.5.2
|
package/docs/hosts.en.md
CHANGED
|
@@ -147,7 +147,7 @@ cwf host remove qoder
|
|
|
147
147
|
|
|
148
148
|
Qoder has two user-level install directories: `~/.qoder` (international) and `~/.qoder-cn` (Qoder CN). The bare command covers every edition present on the machine; for install and removal, `QODER_CONFIG_DIR` / `QODERCN_CONFIG_DIR` are full-path overrides, and setting either restricts the command to that target (setting both covers both). The directory names can be overridden with `QODER_CONFIG_DIR_NAME` / `QODERCN_CONFIG_DIR_NAME`.
|
|
149
149
|
|
|
150
|
-
`cwf host inspect qoder` prints one row per present edition, labelled `Qoder` or `Qoder CN`; an explicitly configured home is reported as `missing` even when it does not exist, and never hides another present edition. The plugin provides hooks
|
|
150
|
+
`cwf host inspect qoder` prints one row per present edition, labelled `Qoder` or `Qoder CN`; an explicitly configured home is reported as `missing` even when it does not exist, and never hides another present edition. The plugin provides hooks and the bootstrap Skill; the three fixed agents are installed as user-level `<home>/agents/` files (plain names, outside the plugin namespace), so Windows never puts the plugin's `:` into a subagent file name. The project-level `init` / `sync` commands only write the single `qoder` adaptation declaration and shared Skills (Qoder CN also uses `.qoder` as its project config directory).
|
|
151
151
|
|
|
152
152
|
## DeepSeek Harness
|
|
153
153
|
|
package/docs/hosts.md
CHANGED
|
@@ -147,7 +147,7 @@ cwf host remove qoder
|
|
|
147
147
|
|
|
148
148
|
Qoder 有两个用户级安装目录:`~/.qoder`(国际版)和 `~/.qoder-cn`(Qoder CN)。裸命令覆盖机器上所有已存在的 edition;安装/卸载时 `QODER_CONFIG_DIR` / `QODERCN_CONFIG_DIR` 是完整路径覆盖,显式设置时只处理对应目标(两个都设置则两者都处理),目录名可用 `QODER_CONFIG_DIR_NAME` / `QODERCN_CONFIG_DIR_NAME` 覆盖。
|
|
149
149
|
|
|
150
|
-
`cwf host inspect qoder` 每个存在的 edition 一行,文本输出用 `Qoder` / `Qoder CN` 区分;显式配置的目录即使不存在也按 `missing` 报告,且不会掩盖另一个已存在的 edition。插件提供 hook
|
|
150
|
+
`cwf host inspect qoder` 每个存在的 edition 一行,文本输出用 `Qoder` / `Qoder CN` 区分;显式配置的目录即使不存在也按 `missing` 报告,且不会掩盖另一个已存在的 edition。插件提供 hook 和引导技能;三个 fixed agent 安装为每个 edition 的用户级 `<home>/agents/`(plain name,不经插件命名空间),避免 Windows 上插件 agent 名里的 `:` 被拼进子代理文件名导致派发失败。项目级 `init` / `sync` 只写单一 `qoder` 适配声明和共享技能(Qoder CN 的项目配置目录同样叫 `.qoder`)。
|
|
151
151
|
|
|
152
152
|
## DeepSeek Harness
|
|
153
153
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cp, mkdir, readFile, rm } from 'node:fs/promises';
|
|
1
|
+
import { cp, mkdir, readFile, rename, rm, writeFile } from 'node:fs/promises';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
|
-
import { join, resolve } from 'node:path';
|
|
3
|
+
import { dirname, join, resolve } from 'node:path';
|
|
4
4
|
|
|
5
5
|
import { parseInstallArgs, pathExists, readJsonFile, writeJsonAtomic } from '../lib/install-support.js';
|
|
6
6
|
import { readPackageInfo } from '../lib/package-info.js';
|
|
@@ -10,6 +10,8 @@ const QODER_MARKETPLACE = 'cowork-flow-local';
|
|
|
10
10
|
const PLUGIN_NAME = 'cowork-flow';
|
|
11
11
|
const PLUGIN_KEY = `${PLUGIN_NAME}@${QODER_MARKETPLACE}`;
|
|
12
12
|
const REGISTRY_FILE = 'installed_plugins_v2.json';
|
|
13
|
+
const QODER_USER_AGENT_NAMES = ['cowork-check', 'cowork-implement', 'cowork-research'];
|
|
14
|
+
const QODER_USER_AGENT_MARKER = '<!-- cowork-flow-managed: qoder user agent -->';
|
|
13
15
|
|
|
14
16
|
// Rendered by `host add`/`host remove`; the installer's
|
|
15
17
|
// own vocabulary.
|
|
@@ -217,13 +219,116 @@ function failureSummary(failures) {
|
|
|
217
219
|
}
|
|
218
220
|
|
|
219
221
|
|
|
220
|
-
|
|
222
|
+
// Qoder namespaces plugin agents as `plugin:agent` and writes that name into
|
|
223
|
+
// subagent transcript paths; Windows rejects the colon with EINVAL. The fixed
|
|
224
|
+
// agents therefore live in the host's user-level `agents/` directory, whose
|
|
225
|
+
// loader keeps the plain file name. The marker lets uninstall distinguish our
|
|
226
|
+
// files from a user's own agent with the same name.
|
|
227
|
+
function qoderUserAgentTargets(home) {
|
|
228
|
+
return QODER_USER_AGENT_NAMES.map((name) => ({
|
|
229
|
+
name,
|
|
230
|
+
target: join(home, 'agents', `${name}.md`)
|
|
231
|
+
}));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
function managedAgentContent(source) {
|
|
236
|
+
const body = source.endsWith('\n') ? source : `${source}\n`;
|
|
237
|
+
return `${body}\n${QODER_USER_AGENT_MARKER}\n`;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
function agentIsManaged(content) {
|
|
242
|
+
return content.includes(QODER_USER_AGENT_MARKER);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
async function readOptionalFile(path) {
|
|
247
|
+
try {
|
|
248
|
+
return await readFile(path, 'utf8');
|
|
249
|
+
} catch (error) {
|
|
250
|
+
if (error?.code === 'ENOENT') return null;
|
|
251
|
+
throw error;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
async function syncQoderUserAgents(home, { sourceDir, dryRun }) {
|
|
257
|
+
// Validate every target before writing any of them: a user's unmanaged
|
|
258
|
+
// `cowork-check.md` must stop the whole home, not leave a partial set.
|
|
259
|
+
const pending = [];
|
|
260
|
+
for (const { name, target } of qoderUserAgentTargets(home)) {
|
|
261
|
+
const source = join(sourceDir, `${name}.md`);
|
|
262
|
+
let body;
|
|
263
|
+
try {
|
|
264
|
+
body = await readFile(source, 'utf8');
|
|
265
|
+
} catch (error) {
|
|
266
|
+
throw new Error(`Qoder user agent source missing or unreadable at ${source}: ${error.message}`);
|
|
267
|
+
}
|
|
268
|
+
const expected = managedAgentContent(body);
|
|
269
|
+
const existing = await readOptionalFile(target);
|
|
270
|
+
if (existing !== null && !agentIsManaged(existing)) {
|
|
271
|
+
throw new Error(
|
|
272
|
+
`Qoder user agent at ${target} is not managed by cowork-flow; file was left unchanged`
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
if (existing === expected) continue;
|
|
276
|
+
pending.push({ target, expected });
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
for (const { target, expected } of pending) {
|
|
280
|
+
if (dryRun) {
|
|
281
|
+
console.log(`[dry-run] Would install Qoder user agent: ${target}`);
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
await mkdir(dirname(target), { recursive: true });
|
|
285
|
+
const temporary = `${target}.tmp`;
|
|
286
|
+
await writeFile(temporary, expected, 'utf8');
|
|
287
|
+
try {
|
|
288
|
+
await rename(temporary, target);
|
|
289
|
+
} catch (error) {
|
|
290
|
+
await rm(temporary, { force: true });
|
|
291
|
+
throw error;
|
|
292
|
+
}
|
|
293
|
+
console.log(` User agent: ${target}`);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
async function removeQoderUserAgents(home, { dryRun }) {
|
|
299
|
+
for (const { target } of qoderUserAgentTargets(home)) {
|
|
300
|
+
const current = await readOptionalFile(target);
|
|
301
|
+
if (current === null || !agentIsManaged(current)) continue;
|
|
302
|
+
if (dryRun) {
|
|
303
|
+
console.log(`[dry-run] Would remove Qoder user agent: ${target}`);
|
|
304
|
+
continue;
|
|
305
|
+
}
|
|
306
|
+
await rm(target, { force: true });
|
|
307
|
+
console.log(` Removed user agent: ${target}`);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
async function stripBundledQoderAgents(installPath, { dryRun }) {
|
|
313
|
+
const bundled = join(installPath, 'agents');
|
|
314
|
+
if (!(await pathExists(bundled))) return;
|
|
315
|
+
if (dryRun) {
|
|
316
|
+
console.log(`[dry-run] Would remove bundled plugin agents: ${bundled}`);
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
await rm(bundled, { recursive: true, force: true });
|
|
320
|
+
console.log(` Removed bundled plugin agents: ${bundled}`);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
async function uninstallQoderHome(paths, { variant, home, dryRun }) {
|
|
221
325
|
const label = editionLabel(variant);
|
|
222
326
|
const { registry, settings } = await loadConfigs(paths);
|
|
223
327
|
const owned = registry.plugins[PLUGIN_KEY];
|
|
224
328
|
if (dryRun) {
|
|
225
329
|
console.log(`[dry-run] Would remove ${PLUGIN_KEY} from ${paths.registry}`);
|
|
226
330
|
console.log(`[dry-run] Would remove ${paths.cacheRoot}`);
|
|
331
|
+
await removeQoderUserAgents(home, { dryRun: true });
|
|
227
332
|
return 0;
|
|
228
333
|
}
|
|
229
334
|
if (owned) {
|
|
@@ -235,6 +340,7 @@ async function uninstallQoderHome(paths, { variant, dryRun }) {
|
|
|
235
340
|
await writeJsonAtomic(paths.settings, settings);
|
|
236
341
|
}
|
|
237
342
|
await rm(paths.cacheRoot, { recursive: true, force: true });
|
|
343
|
+
await removeQoderUserAgents(home, { dryRun: false });
|
|
238
344
|
console.log(
|
|
239
345
|
owned
|
|
240
346
|
? `✓ cowork-flow ${label} plugin uninstalled (${PLUGIN_KEY})`
|
|
@@ -248,7 +354,7 @@ async function uninstallQoderEditions(homes, dryRun) {
|
|
|
248
354
|
const failures = [];
|
|
249
355
|
for (const { variant, home } of homes) {
|
|
250
356
|
try {
|
|
251
|
-
await uninstallQoderHome(pluginPaths(home, null), { variant, dryRun });
|
|
357
|
+
await uninstallQoderHome(pluginPaths(home, null), { variant, home, dryRun });
|
|
252
358
|
} catch (error) {
|
|
253
359
|
failures.push({ variant, home, error });
|
|
254
360
|
}
|
|
@@ -261,7 +367,7 @@ async function uninstallQoderEditions(homes, dryRun) {
|
|
|
261
367
|
return 0;
|
|
262
368
|
}
|
|
263
369
|
|
|
264
|
-
async function installQoderHome(target, { version, pluginSrc, manifest, force, variant, dryRun }) {
|
|
370
|
+
async function installQoderHome(target, { version, pluginSrc, manifest, force, variant, home, dryRun }) {
|
|
265
371
|
const label = editionLabel(variant);
|
|
266
372
|
const configs = await loadConfigs(target);
|
|
267
373
|
console.log(` ${label}: ${pluginSrc} -> ${target.installPath}`);
|
|
@@ -276,6 +382,13 @@ async function installQoderHome(target, { version, pluginSrc, manifest, force, v
|
|
|
276
382
|
pluginRegistered &&
|
|
277
383
|
pluginEnabled
|
|
278
384
|
) {
|
|
385
|
+
// Migration path for a payload installed before agents moved to the user
|
|
386
|
+
// level: repair the agent files without recopying the healthy plugin.
|
|
387
|
+
// Sync first: it validates every target before writing, so an unmanaged
|
|
388
|
+
// file leaves the existing plugin payload intact instead of a home whose
|
|
389
|
+
// bundled agents were already stripped.
|
|
390
|
+
await syncQoderUserAgents(home, { sourceDir: join(pluginSrc, 'agents'), dryRun: false });
|
|
391
|
+
await stripBundledQoderAgents(target.installPath, { dryRun: false });
|
|
279
392
|
console.log(`cowork-flow ${label} plugin already installed at ${target.installPath}`);
|
|
280
393
|
console.log('Use --force to overwrite.');
|
|
281
394
|
return;
|
|
@@ -283,6 +396,8 @@ async function installQoderHome(target, { version, pluginSrc, manifest, force, v
|
|
|
283
396
|
|
|
284
397
|
const now = new Date().toISOString();
|
|
285
398
|
if (dryRun) {
|
|
399
|
+
await syncQoderUserAgents(home, { sourceDir: join(pluginSrc, 'agents'), dryRun: true });
|
|
400
|
+
await stripBundledQoderAgents(target.installPath, { dryRun: true });
|
|
286
401
|
await updateRegistry(configs.registry, target, version, now, true);
|
|
287
402
|
await enablePlugin(configs.settings, target, true);
|
|
288
403
|
return;
|
|
@@ -292,6 +407,11 @@ async function installQoderHome(target, { version, pluginSrc, manifest, force, v
|
|
|
292
407
|
await rm(target.installPath, { recursive: true, force: true });
|
|
293
408
|
await cp(pluginSrc, target.installPath, { recursive: true });
|
|
294
409
|
await stampPayloadManifest(target.installPath, manifest, version);
|
|
410
|
+
// The payload source still owns the canonical agent Markdown, but Qoder
|
|
411
|
+
// must not discover it as a plugin agent on Windows. Sync first so a
|
|
412
|
+
// conflicting user file cannot leave the payload half-migrated.
|
|
413
|
+
await syncQoderUserAgents(home, { sourceDir: join(pluginSrc, 'agents'), dryRun: false });
|
|
414
|
+
await stripBundledQoderAgents(target.installPath, { dryRun: false });
|
|
295
415
|
// Registry and enable flag come last: a half-copied
|
|
296
416
|
// payload must never be advertised as installed.
|
|
297
417
|
await updateRegistry(configs.registry, target, version, now, false);
|
|
@@ -324,6 +444,7 @@ export async function runInstallQoderPlugin(args = []) {
|
|
|
324
444
|
manifest,
|
|
325
445
|
force,
|
|
326
446
|
variant,
|
|
447
|
+
home,
|
|
327
448
|
dryRun
|
|
328
449
|
});
|
|
329
450
|
} catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
2.7.
|
|
1
|
+
2.7.1
|