teamai-cli 0.21.0 → 0.22.0-beta.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/README.md CHANGED
@@ -25,7 +25,7 @@ npm install -g teamai-cli
25
25
 
26
26
  ### Team admin / solo user
27
27
 
28
- Create a shared-experience repo on your git host (GitHub, GitLab, CNB, TGit, or a private Git service), **grant write access to team members**, then run `teamai init https://github.com/yourorg/yourrepo`.
28
+ Create a shared-experience repo on your git host (GitHub, GitLab, GitCode, CNB, TGit, or a private Git service), **grant write access to team members**, then run `teamai init https://github.com/yourorg/yourrepo`.
29
29
 
30
30
  > **No team repo yet?** Start from a template pre-loaded with production-ready skills, rules, and review agents. Browse the [teamai-hub](https://github.com/teamai-hub) org, click **Use this template**, then `teamai init` against your new repo.
31
31
 
@@ -75,7 +75,7 @@ Once initialized, every AI session automatically pulls the latest skills / rules
75
75
  </tbody>
76
76
  </table>
77
77
 
78
- **Git providers** — GitHub · GitLab · CNB · TGit · private Git service.
78
+ **Git providers** — GitHub · GitLab · GitCode · CNB · TGit · private Git service.
79
79
 
80
80
  ### Distribution Controls
81
81
 
@@ -109,7 +109,7 @@ teamai push → create branch + MR → reviewer approves + merges
109
109
  SessionStart hook → teamai pull → synced to local AI tools
110
110
  ```
111
111
 
112
- Members push changes via `teamai push`, which opens a Merge Request for review. Once merged, `teamai pull` (triggered automatically on session start via the SessionStart hook) syncs the latest resources locally. Skills sync to `~/.claude/skills/`, `~/.codex/skills/`, `~/.cursor/skills/`, `~/.codebuddy/skills/`, etc. In a **project-scope** install, SessionStart first creates that tool's project root (e.g. `<project>/.claude`) if it is missing, then pulls into it — a bare `teamai pull` still will not invent agent directories.
112
+ Members push changes via `teamai push`, which opens a Merge Request for review. Re-running `teamai push` on a resource that is still waiting in an unmerged PR updates that PR in place instead of opening a duplicate. Once merged, `teamai pull` (triggered automatically on session start via the SessionStart hook) syncs the latest resources locally. Skills sync to `~/.claude/skills/`, `~/.codex/skills/`, `~/.cursor/skills/`, `~/.codebuddy/skills/`, etc. In a **project-scope** install, SessionStart first creates that tool's project root (e.g. `<project>/.claude`) if it is missing, then pulls into it — a bare `teamai pull` still will not invent agent directories.
113
113
 
114
114
  ### Team Hooks
115
115
 
@@ -215,6 +215,13 @@ teamai codebase --lint # health check
215
215
  The graph stores components, interfaces, configs, and cross-repo import edges. `teamai recall` uses it for graph-boosted re-ranking.
216
216
  When a recall hit comes from a codebase page, the result includes a `Sources:` line listing the relevant source file paths — giving agents a direct starting point for code changes instead of re-exploring the repo.
217
217
 
218
+ Edges come from two tracks that run together, with AST results taking precedence on overlap:
219
+
220
+ - **AST track** (TypeScript/JavaScript, Python, Go): a WASM [tree-sitter](https://tree-sitter.github.io/) parser resolves `import`/`require`, call sites, and TS `implements` clauses to precise file-to-file `DEPENDS_ON` / `REFERENCES` / `IMPLEMENTS` edges (tagged `code-ast`, with confidence weights).
221
+ - **Heuristic track** (all languages, including Java/Rust): regex-based extraction (tagged `code-heuristic`), which also covers languages the AST track does not.
222
+
223
+ The WASM parser is a pure-JavaScript dependency — no native toolchain is required. If it fails to load for any reason, extraction falls back to the heuristic track and records an `AST_UNAVAILABLE` gap. Set `TEAMAI_SKIP_AST=1` to force heuristic-only extraction.
224
+
218
225
  ## Commands
219
226
 
220
227
  | Command | Description |
package/README.zh-CN.md CHANGED
@@ -25,7 +25,7 @@ npm install -g teamai-cli
25
25
 
26
26
  ### 团队管理员 / 个人使用者
27
27
 
28
- 在 Git 托管平台(GitHub、GitLab、CNB、TGit,或私有 Git 服务)创建共享经验仓库,**授予团队成员写权限**,然后运行 `teamai init https://github.com/yourorg/yourrepo`。
28
+ 在 Git 托管平台(GitHub、GitLab、GitCode、CNB、TGit,或私有 Git 服务)创建共享经验仓库,**授予团队成员写权限**,然后运行 `teamai init https://github.com/yourorg/yourrepo`。
29
29
 
30
30
  > **还没有团队仓库?** 可以从内置了成套 skills、rules、review agents 的模板起步。浏览 [teamai-hub](https://github.com/teamai-hub) org,点 **Use this template** 生成自己的仓库,再对它执行 `teamai init`。
31
31
 
@@ -75,7 +75,7 @@ teamai init https://github.com/yourorg/yourrepo --scope user
75
75
  </tbody>
76
76
  </table>
77
77
 
78
- **Git 托管平台** —— GitHub · GitLab · CNB · TGit · 私有 Git 服务。
78
+ **Git 托管平台** —— GitHub · GitLab · GitCode · CNB · TGit · 私有 Git 服务。
79
79
 
80
80
  ### 分发策略
81
81
 
@@ -109,7 +109,7 @@ teamai push → 创建分支 + MR → reviewer 审批合并
109
109
  SessionStart hook → teamai pull → 同步到本地 AI 工具
110
110
  ```
111
111
 
112
- 成员通过 `teamai push` 提交变更并创建合并请求供审核。合并后,`teamai pull`(由 SessionStart hook 在会话启动时自动触发)将最新资源同步到本地。Skills 会同步到 `~/.claude/skills/`、`~/.codex/skills/`、`~/.cursor/skills/`、`~/.codebuddy/skills/` 等目录。在 **project scope** 安装下,SessionStart 会先为当前工具创建项目根目录(例如 `<project>/.claude`),再 pull 写入;单独执行 `teamai pull` 仍不会凭空创建 Agent 目录。
112
+ 成员通过 `teamai push` 提交变更并创建合并请求供审核。若某个资源已在未合并的 PR 中等待评审,再次对它执行 `teamai push` 会就地更新该 PR,而非新开一个重复的 PR。合并后,`teamai pull`(由 SessionStart hook 在会话启动时自动触发)将最新资源同步到本地。Skills 会同步到 `~/.claude/skills/`、`~/.codex/skills/`、`~/.cursor/skills/`、`~/.codebuddy/skills/` 等目录。在 **project scope** 安装下,SessionStart 会先为当前工具创建项目根目录(例如 `<project>/.claude`),再 pull 写入;单独执行 `teamai pull` 仍不会凭空创建 Agent 目录。
113
113
 
114
114
  ### 团队 Hooks
115
115
 
@@ -215,6 +215,13 @@ teamai codebase --lint # 健康检查
215
215
  图谱存储组件、接口、配置和跨仓库依赖边。`teamai recall` 利用图谱进行增强排名。
216
216
  当召回命中 codebase 页面时,结果会附带一行 `Sources:`,列出相关源文件路径,供 agent 直接作为代码改动的入口,无需重新探索代码库。
217
217
 
218
+ 依赖边来自两条并行的提取轨道,重叠时以 AST 结果优先:
219
+
220
+ - **AST 轨**(TypeScript/JavaScript、Python、Go):使用 WASM 版 [tree-sitter](https://tree-sitter.github.io/) 解析器,将 `import`/`require`、调用点、以及 TS `implements` 子句解析为精确的文件到文件 `DEPENDS_ON` / `REFERENCES` / `IMPLEMENTS` 边(标记为 `code-ast`,带置信度权重)。
221
+ - **启发式轨**(所有语言,含 Java/Rust):基于正则的提取(标记为 `code-heuristic`),同时覆盖 AST 轨未支持的语言。
222
+
223
+ WASM 解析器是纯 JavaScript 依赖,无需任何原生编译工具链。若因任何原因加载失败,提取会降级到启发式轨并记录一条 `AST_UNAVAILABLE` gap。设置 `TEAMAI_SKIP_AST=1` 可强制仅使用启发式提取。
224
+
218
225
  ## 命令一览
219
226
 
220
227
  | 命令 | 说明 |