@house365/comate 0.9.12 → 0.9.13

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.
Files changed (2) hide show
  1. package/bin/cli.mjs +7 -0
  2. package/package.json +2 -2
package/bin/cli.mjs CHANGED
@@ -5,11 +5,18 @@
5
5
  // handles agent detection, symlinking, update/remove for 70+ agents.
6
6
  import { fileURLToPath } from 'node:url';
7
7
  import { dirname } from 'node:path';
8
+ import { readFileSync } from 'node:fs';
8
9
 
9
10
  import { run, skillsInvocation, SKILLS_TIMEOUT_MS } from './init.mjs';
10
11
 
11
12
  const pkgRoot = dirname(dirname(fileURLToPath(import.meta.url)));
12
13
  const args = process.argv.slice(2);
14
+ const packageVersion = JSON.parse(readFileSync(`${pkgRoot}/package.json`, 'utf8')).version;
15
+
16
+ if (args[0] === '--version' || args[0] === '-v') {
17
+ console.log(packageVersion);
18
+ process.exit(0);
19
+ }
13
20
 
14
21
  if (args[0] === 'init') {
15
22
  const { init } = await import('./init-run.mjs');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@house365/comate",
3
- "version": "0.9.12",
3
+ "version": "0.9.13",
4
4
  "description": "comate —— SDD (规约驱动开发) 的 AI 开发编排器(Agent Skills)",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "scripts": {
48
48
  "postinstall": "node bin/postinstall.mjs",
49
- "test": "node bin/init.test.mjs && node bin/usage.test.mjs && bash skills/comate/tests/run.sh",
49
+ "test": "node bin/cli.test.mjs && node bin/init.test.mjs && node bin/usage.test.mjs && bash skills/comate/tests/run.sh",
50
50
  "doctor": "cd skills && bash comate/scripts/comate.sh doctor",
51
51
  "prepublish-check": "node scripts/prepublish-check.mjs",
52
52
  "pack-check": "node scripts/pack-check.mjs",