@nathan33/nao-skill 0.9.4 → 0.9.5

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.
@@ -14,8 +14,22 @@
14
14
  //
15
15
  // 兼容性:pi-intercom 内部 API 若变化 → 本探针非 0 退出,nao-fleet 回退官方 CLI
16
16
  // (无 tmuxPane)再叠加「仓库内未认领 pi pane 唯一兜底」,不静默 no-op。
17
+ //
18
+ // 类型自检:`npm run check:agents`(tsconfig.agents.json)。动态 import 使 list 结果为
19
+ // any,下游 TS 项目(nao-todo/nue-ui 的 `vp check` 扫 `.agents/**`)会报 TS7006,
20
+ // 故此处用本地 ProbeSession 给 filter/map 显式定型(strict/noImplicitAny 下必需)。
17
21
  import { join } from "node:path";
18
22
 
23
+ type ProbeSession = {
24
+ id: string;
25
+ name?: string;
26
+ model?: string;
27
+ status?: string;
28
+ cwd: string;
29
+ tmuxPane?: string;
30
+ pid?: number;
31
+ };
32
+
19
33
  const agentDir = process.argv[2];
20
34
  if (!agentDir) {
21
35
  process.stderr.write("usage: intercom-probe.mts <pi-agent-dir>\n");
@@ -39,7 +53,7 @@ try {
39
53
  name: PROBE_NAME,
40
54
  status: "idle",
41
55
  });
42
- const sessions = await client.listSessions();
56
+ const sessions = (await client.listSessions()) as ProbeSession[];
43
57
  const rows = sessions
44
58
  .filter((s) => s.id !== client.sessionId)
45
59
  .map((s) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nathan33/nao-skill",
3
- "version": "0.9.4",
3
+ "version": "0.9.5",
4
4
  "description": "nao 多角色 AI 开发舰队:角色卡 / 技能 / 协作协议 / 工具链,一键接入项目(pi / Claude / 任意 Agent)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -32,8 +32,13 @@
32
32
  "node": ">=18"
33
33
  },
34
34
  "scripts": {
35
- "test": "bash .agents/scripts/nao-fleet.sh check",
36
- "prepack": "bash .agents/scripts/nao-fleet.sh check"
35
+ "test": "bash .agents/scripts/nao-fleet.sh check && npm run check:agents",
36
+ "check:agents": "tsc -p tsconfig.agents.json",
37
+ "prepack": "npm test"
38
+ },
39
+ "devDependencies": {
40
+ "@types/node": "^20.19.0",
41
+ "typescript": "^5.4.5"
37
42
  },
38
43
  "repository": {
39
44
  "type": "git",