@superkou/openspec 1.4.1 → 1.4.2
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/dist/core/command-generation/adapters/index.d.ts +2 -0
- package/dist/core/command-generation/adapters/index.js +2 -0
- package/dist/core/command-generation/adapters/trae.d.ts +18 -0
- package/dist/core/command-generation/adapters/trae.js +32 -0
- package/dist/core/command-generation/adapters/zcode.d.ts +15 -0
- package/dist/core/command-generation/adapters/zcode.js +29 -0
- package/dist/core/command-generation/registry.js +4 -0
- package/dist/core/config.js +2 -1
- package/package.json +21 -23
|
@@ -28,5 +28,7 @@ export { qoderAdapter } from './qoder.js';
|
|
|
28
28
|
export { lingmaAdapter } from './lingma.js';
|
|
29
29
|
export { qwenAdapter } from './qwen.js';
|
|
30
30
|
export { roocodeAdapter } from './roocode.js';
|
|
31
|
+
export { traeAdapter } from './trae.js';
|
|
31
32
|
export { windsurfAdapter } from './windsurf.js';
|
|
33
|
+
export { zcodeAdapter } from './zcode.js';
|
|
32
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -28,5 +28,7 @@ export { qoderAdapter } from './qoder.js';
|
|
|
28
28
|
export { lingmaAdapter } from './lingma.js';
|
|
29
29
|
export { qwenAdapter } from './qwen.js';
|
|
30
30
|
export { roocodeAdapter } from './roocode.js';
|
|
31
|
+
export { traeAdapter } from './trae.js';
|
|
31
32
|
export { windsurfAdapter } from './windsurf.js';
|
|
33
|
+
export { zcodeAdapter } from './zcode.js';
|
|
32
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trae Command Adapter
|
|
3
|
+
*
|
|
4
|
+
* Formats commands for Trae following its command specification.
|
|
5
|
+
* Docs: Trae IDE 官方文档 - 命令功能
|
|
6
|
+
*
|
|
7
|
+
* Trae 支持项目级命令(.trae/commands/)和全局命令(~/.trae/commands/),
|
|
8
|
+
* 支持最多 3 层目录嵌套。本 adapter 生成项目级命令,路径为
|
|
9
|
+
* .trae/commands/opsx/<id>.md(2 层嵌套,在 3 层限制内)。
|
|
10
|
+
*/
|
|
11
|
+
import type { ToolCommandAdapter } from '../types.js';
|
|
12
|
+
/**
|
|
13
|
+
* Trae adapter for command generation.
|
|
14
|
+
* File path: .trae/commands/opsx/<id>.md
|
|
15
|
+
* Frontmatter: name, description
|
|
16
|
+
*/
|
|
17
|
+
export declare const traeAdapter: ToolCommandAdapter;
|
|
18
|
+
//# sourceMappingURL=trae.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trae Command Adapter
|
|
3
|
+
*
|
|
4
|
+
* Formats commands for Trae following its command specification.
|
|
5
|
+
* Docs: Trae IDE 官方文档 - 命令功能
|
|
6
|
+
*
|
|
7
|
+
* Trae 支持项目级命令(.trae/commands/)和全局命令(~/.trae/commands/),
|
|
8
|
+
* 支持最多 3 层目录嵌套。本 adapter 生成项目级命令,路径为
|
|
9
|
+
* .trae/commands/opsx/<id>.md(2 层嵌套,在 3 层限制内)。
|
|
10
|
+
*/
|
|
11
|
+
import path from 'path';
|
|
12
|
+
/**
|
|
13
|
+
* Trae adapter for command generation.
|
|
14
|
+
* File path: .trae/commands/opsx/<id>.md
|
|
15
|
+
* Frontmatter: name, description
|
|
16
|
+
*/
|
|
17
|
+
export const traeAdapter = {
|
|
18
|
+
toolId: 'trae',
|
|
19
|
+
getFilePath(commandId) {
|
|
20
|
+
return path.join('.trae', 'commands', 'opsx', `${commandId}.md`);
|
|
21
|
+
},
|
|
22
|
+
formatFile(content) {
|
|
23
|
+
return `---
|
|
24
|
+
name: ${content.name}
|
|
25
|
+
description: "${content.description}"
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
${content.body}
|
|
29
|
+
`;
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=trae.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ZCode Command Adapter
|
|
3
|
+
*
|
|
4
|
+
* Formats commands for ZCode CLI following its command specification.
|
|
5
|
+
* ZCode 在 .zcode/commands/ 下使用扁平的 opsx-<id>.md 命令文件,
|
|
6
|
+
* frontmatter 含 description 与可选的 argument-hint。
|
|
7
|
+
*/
|
|
8
|
+
import type { ToolCommandAdapter } from '../types.js';
|
|
9
|
+
/**
|
|
10
|
+
* ZCode adapter for command generation.
|
|
11
|
+
* File path: .zcode/commands/opsx-<id>.md
|
|
12
|
+
* Frontmatter: description, argument-hint
|
|
13
|
+
*/
|
|
14
|
+
export declare const zcodeAdapter: ToolCommandAdapter;
|
|
15
|
+
//# sourceMappingURL=zcode.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ZCode Command Adapter
|
|
3
|
+
*
|
|
4
|
+
* Formats commands for ZCode CLI following its command specification.
|
|
5
|
+
* ZCode 在 .zcode/commands/ 下使用扁平的 opsx-<id>.md 命令文件,
|
|
6
|
+
* frontmatter 含 description 与可选的 argument-hint。
|
|
7
|
+
*/
|
|
8
|
+
import path from 'path';
|
|
9
|
+
/**
|
|
10
|
+
* ZCode adapter for command generation.
|
|
11
|
+
* File path: .zcode/commands/opsx-<id>.md
|
|
12
|
+
* Frontmatter: description, argument-hint
|
|
13
|
+
*/
|
|
14
|
+
export const zcodeAdapter = {
|
|
15
|
+
toolId: 'zcode',
|
|
16
|
+
getFilePath(commandId) {
|
|
17
|
+
return path.join('.zcode', 'commands', `opsx-${commandId}.md`);
|
|
18
|
+
},
|
|
19
|
+
formatFile(content) {
|
|
20
|
+
return `---
|
|
21
|
+
description: ${content.description}
|
|
22
|
+
argument-hint: command arguments
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
${content.body}
|
|
26
|
+
`;
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=zcode.js.map
|
|
@@ -29,7 +29,9 @@ import { qoderAdapter } from './adapters/qoder.js';
|
|
|
29
29
|
import { lingmaAdapter } from './adapters/lingma.js';
|
|
30
30
|
import { qwenAdapter } from './adapters/qwen.js';
|
|
31
31
|
import { roocodeAdapter } from './adapters/roocode.js';
|
|
32
|
+
import { traeAdapter } from './adapters/trae.js';
|
|
32
33
|
import { windsurfAdapter } from './adapters/windsurf.js';
|
|
34
|
+
import { zcodeAdapter } from './adapters/zcode.js';
|
|
33
35
|
/**
|
|
34
36
|
* Registry for looking up tool command adapters.
|
|
35
37
|
*/
|
|
@@ -62,7 +64,9 @@ export class CommandAdapterRegistry {
|
|
|
62
64
|
CommandAdapterRegistry.register(lingmaAdapter);
|
|
63
65
|
CommandAdapterRegistry.register(qwenAdapter);
|
|
64
66
|
CommandAdapterRegistry.register(roocodeAdapter);
|
|
67
|
+
CommandAdapterRegistry.register(traeAdapter);
|
|
65
68
|
CommandAdapterRegistry.register(windsurfAdapter);
|
|
69
|
+
CommandAdapterRegistry.register(zcodeAdapter);
|
|
66
70
|
}
|
|
67
71
|
/**
|
|
68
72
|
* Register a tool command adapter.
|
package/dist/core/config.js
CHANGED
|
@@ -32,8 +32,9 @@ export const AI_TOOLS = [
|
|
|
32
32
|
{ name: 'Qoder', value: 'qoder', available: true, successLabel: 'Qoder', skillsDir: '.qoder' },
|
|
33
33
|
{ name: 'Qwen Code', value: 'qwen', available: true, successLabel: 'Qwen Code', skillsDir: '.qwen' },
|
|
34
34
|
{ name: 'RooCode', value: 'roocode', available: true, successLabel: 'RooCode', skillsDir: '.roo' },
|
|
35
|
-
{ name: 'Trae', value: 'trae', available: true, successLabel: 'Trae', skillsDir: '.trae' },
|
|
35
|
+
{ name: 'Trae', value: 'trae', available: true, successLabel: 'Trae', skillsDir: '.trae', detectionPaths: ['.trae/commands', '.trae/skills'] },
|
|
36
36
|
{ name: 'Windsurf', value: 'windsurf', available: true, successLabel: 'Windsurf', skillsDir: '.windsurf' },
|
|
37
|
+
{ name: 'ZCode', value: 'zcode', available: true, successLabel: 'ZCode', skillsDir: '.zcode', detectionPaths: ['.zcode/commands', '.zcode/skills'] },
|
|
37
38
|
{ name: 'AGENTS.md (works with Amp, VS Code, …)', value: 'agents', available: false, successLabel: 'your AGENTS.md-compatible assistant' }
|
|
38
39
|
];
|
|
39
40
|
//# sourceMappingURL=config.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superkou/openspec",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "AI-native system for spec-driven development",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"openspec",
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"ai",
|
|
10
10
|
"development"
|
|
11
11
|
],
|
|
12
|
-
"homepage": "https://github.com/
|
|
12
|
+
"homepage": "https://github.com/sevensky/OpenSpec",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "https://github.com/
|
|
15
|
+
"url": "git+https://github.com/sevensky/OpenSpec.git"
|
|
16
16
|
},
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"author": "OpenSpec Contributors",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"bin": {
|
|
31
|
-
"openspec": "
|
|
31
|
+
"openspec": "bin/openspec.js"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"dist",
|
|
@@ -39,24 +39,6 @@
|
|
|
39
39
|
"!dist/**/__tests__",
|
|
40
40
|
"!dist/**/*.map"
|
|
41
41
|
],
|
|
42
|
-
"scripts": {
|
|
43
|
-
"lint": "eslint src/",
|
|
44
|
-
"build": "node build.js",
|
|
45
|
-
"dev": "tsc --watch",
|
|
46
|
-
"dev:cli": "pnpm build && node bin/openspec.js",
|
|
47
|
-
"test": "vitest run",
|
|
48
|
-
"test:watch": "vitest",
|
|
49
|
-
"test:ui": "vitest --ui",
|
|
50
|
-
"test:coverage": "vitest --coverage",
|
|
51
|
-
"test:postinstall": "node scripts/postinstall.js",
|
|
52
|
-
"prepare": "pnpm run build",
|
|
53
|
-
"prepublishOnly": "pnpm run build",
|
|
54
|
-
"postinstall": "node scripts/postinstall.js",
|
|
55
|
-
"check:pack-version": "node scripts/pack-version-check.mjs",
|
|
56
|
-
"release": "pnpm run release:ci",
|
|
57
|
-
"release:ci": "pnpm run check:pack-version && pnpm exec changeset publish",
|
|
58
|
-
"changeset": "changeset"
|
|
59
|
-
},
|
|
60
42
|
"engines": {
|
|
61
43
|
"node": ">=20.19.0"
|
|
62
44
|
},
|
|
@@ -81,5 +63,21 @@
|
|
|
81
63
|
"posthog-node": "^5.20.0",
|
|
82
64
|
"yaml": "^2.8.2",
|
|
83
65
|
"zod": "^4.0.17"
|
|
66
|
+
},
|
|
67
|
+
"scripts": {
|
|
68
|
+
"lint": "eslint src/",
|
|
69
|
+
"build": "node build.js",
|
|
70
|
+
"dev": "tsc --watch",
|
|
71
|
+
"dev:cli": "pnpm build && node bin/openspec.js",
|
|
72
|
+
"test": "vitest run",
|
|
73
|
+
"test:watch": "vitest",
|
|
74
|
+
"test:ui": "vitest --ui",
|
|
75
|
+
"test:coverage": "vitest --coverage",
|
|
76
|
+
"test:postinstall": "node scripts/postinstall.js",
|
|
77
|
+
"postinstall": "node scripts/postinstall.js",
|
|
78
|
+
"check:pack-version": "node scripts/pack-version-check.mjs",
|
|
79
|
+
"release": "pnpm run release:ci",
|
|
80
|
+
"release:ci": "pnpm run check:pack-version && pnpm exec changeset publish",
|
|
81
|
+
"changeset": "changeset"
|
|
84
82
|
}
|
|
85
|
-
}
|
|
83
|
+
}
|