@team-ai/teamai-cli 0.40.9 → 0.50.0

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 (163) hide show
  1. package/CHANGELOG.md +167 -11
  2. package/README.ja.md +32 -29
  3. package/README.ko.md +32 -29
  4. package/README.md +32 -29
  5. package/README.th.md +32 -29
  6. package/README.zh-CN.md +32 -29
  7. package/agents/README.md +68 -0
  8. package/agents/README.zh-CN.md +68 -0
  9. package/agents/teamai-recall.md +10 -9
  10. package/dist/cli.js +210551 -136899
  11. package/dist/index.js +291 -0
  12. package/dist/runtime-paseo.js +27562 -0
  13. package/dist/runtime-sandbox.js +94740 -0
  14. package/dist/runtime-t3.js +41891 -0
  15. package/drivers/teamai-claude.yaml +6 -0
  16. package/drivers/teamai-codex.yaml +6 -0
  17. package/drivers/teamai-local.yaml +5 -0
  18. package/drivers/teamai-opencode.yaml +6 -0
  19. package/drivers/teamai-paseo.yaml +6 -0
  20. package/drivers/teamai-sandbox.yaml +7 -0
  21. package/drivers/teamai-t3.yaml +8 -0
  22. package/hooks/teamai-env-hint/HOOK.yaml +1 -0
  23. package/hooks/teamai-env-hint/README.md +80 -0
  24. package/hooks/teamai-env-hint/README.zh-CN.md +80 -0
  25. package/hooks/teamai-env-hint/exec.md +1 -0
  26. package/hooks/teamai-env-hint/secrets-rule.md +1 -0
  27. package/hooks/teamai-env-hint/secrets.md +1 -0
  28. package/hooks/teamai-env-hint/variables.md +1 -0
  29. package/hooks/teamai-friction-reminder/HOOK.yaml +1 -0
  30. package/hooks/teamai-friction-reminder/README.md +117 -0
  31. package/hooks/teamai-friction-reminder/README.zh-CN.md +117 -0
  32. package/hooks/teamai-friction-reminder/action-gap.md +1 -0
  33. package/hooks/teamai-friction-reminder/action-gap.zh.md +1 -0
  34. package/hooks/teamai-friction-reminder/action-share-learnings.md +1 -0
  35. package/hooks/teamai-friction-reminder/action-share-learnings.zh.md +1 -0
  36. package/hooks/teamai-friction-reminder/action.md +1 -0
  37. package/hooks/teamai-friction-reminder/action.zh.md +1 -0
  38. package/hooks/teamai-friction-reminder/gap-reasons.md +1 -0
  39. package/hooks/teamai-friction-reminder/gap-reasons.zh.md +1 -0
  40. package/hooks/teamai-friction-reminder/gap.md +1 -0
  41. package/hooks/teamai-friction-reminder/gap.zh.md +1 -0
  42. package/hooks/teamai-friction-reminder/params.yaml +12 -0
  43. package/hooks/teamai-friction-reminder/problem-reasons.md +1 -0
  44. package/hooks/teamai-friction-reminder/problem-reasons.zh.md +1 -0
  45. package/hooks/teamai-friction-reminder/problem.md +1 -0
  46. package/hooks/teamai-friction-reminder/problem.zh.md +1 -0
  47. package/hooks/teamai-friction-reminder/reason-correction.md +1 -0
  48. package/hooks/teamai-friction-reminder/reason-correction.zh.md +1 -0
  49. package/hooks/teamai-friction-reminder/reason-interrupt.md +1 -0
  50. package/hooks/teamai-friction-reminder/reason-interrupt.zh.md +1 -0
  51. package/hooks/teamai-friction-reminder/reason-tool-error.md +1 -0
  52. package/hooks/teamai-friction-reminder/reason-tool-error.zh.md +1 -0
  53. package/hooks/teamai-friction-reminder/reason-tool-reject.md +1 -0
  54. package/hooks/teamai-friction-reminder/reason-tool-reject.zh.md +1 -0
  55. package/hooks/teamai-friction-reminder/task.md +1 -0
  56. package/hooks/teamai-friction-reminder/task.zh.md +1 -0
  57. package/hooks/teamai-mr-hint/HOOK.yaml +1 -0
  58. package/hooks/teamai-mr-hint/README.md +81 -0
  59. package/hooks/teamai-mr-hint/README.zh-CN.md +81 -0
  60. package/hooks/teamai-mr-hint/offer-command.en.md +7 -0
  61. package/hooks/teamai-mr-hint/offer-command.md +10 -0
  62. package/hooks/teamai-mr-hint/offer-workflow.en.md +7 -0
  63. package/hooks/teamai-mr-hint/offer-workflow.md +10 -0
  64. package/hooks/teamai-mr-hint/params.yaml +2 -0
  65. package/hooks/teamai-package-hint/HOOK.yaml +1 -0
  66. package/hooks/teamai-package-hint/README.md +64 -0
  67. package/hooks/teamai-package-hint/README.zh-CN.md +64 -0
  68. package/hooks/teamai-package-hint/message.md +3 -0
  69. package/hooks/teamai-todowrite-hint/HOOK.yaml +1 -0
  70. package/hooks/teamai-todowrite-hint/README.md +68 -0
  71. package/hooks/teamai-todowrite-hint/README.zh-CN.md +68 -0
  72. package/hooks/teamai-todowrite-hint/message.en.md +6 -0
  73. package/hooks/teamai-todowrite-hint/message.md +9 -0
  74. package/package.json +41 -14
  75. package/rules/teamai-recall/README.md +78 -0
  76. package/rules/teamai-recall/README.zh-CN.md +78 -0
  77. package/rules/teamai-recall/RULE.en.md +36 -0
  78. package/rules/teamai-recall/RULE.md +43 -0
  79. package/rules/teamai-recall/block-direct.md +27 -0
  80. package/rules/teamai-recall/block.en.md +42 -0
  81. package/rules/teamai-recall/block.md +44 -0
  82. package/runtimes/teamai-paseo.yaml +5 -0
  83. package/runtimes/teamai-sandbox.yaml +3 -0
  84. package/runtimes/teamai-t3.yaml +5 -0
  85. package/sandboxes/teamai-bwrap.yaml +2 -0
  86. package/sandboxes/teamai-default.yaml +4 -0
  87. package/sandboxes/teamai-docker.yaml +5 -0
  88. package/sandboxes/teamai-podman.yaml +4 -0
  89. package/sandboxes/teamai-sbx.yaml +4 -0
  90. package/sandboxes/teamai-seatbelt.yaml +2 -0
  91. package/sandboxes/teamai-vercel.yaml +4 -0
  92. package/scorers/README.md +103 -0
  93. package/scorers/README.zh-CN.md +103 -0
  94. package/scorers/teamai-adoption.md +11 -0
  95. package/scorers/teamai-correctness.md +17 -0
  96. package/scorers/teamai-routing.md +11 -0
  97. package/skill-data/core/SKILL.md +4 -3
  98. package/skill-data/core/references/commands.md +300 -67
  99. package/skill-data/core/references/contribute-member.md +4 -4
  100. package/skill-data/core/references/troubleshooting.md +128 -18
  101. package/skill-data/setup/references/join-member.md +13 -9
  102. package/skill-data/setup/references/manage-admin.md +41 -17
  103. package/skill-data/setup/references/setup-admin.md +2 -2
  104. package/skill-data/setup/references/uninstall.md +30 -9
  105. package/skill-data/share/SKILL.md +17 -12
  106. package/skill-data/share/references/doc-template.md +3 -4
  107. package/skill-data/wiki/SKILL.md +1 -1
  108. package/skill-data/wiki/references/agents/graph-rag-agent.md +5 -1
  109. package/skill-data/workflow/SKILL.md +39 -16
  110. package/skill-data/workflow/references/fleet.md +13 -0
  111. package/skill-data/workflow/references/judging.md +17 -10
  112. package/skill-data/workflow/references/places.md +64 -7
  113. package/skill-data/workflow/references/sandbox.md +3 -3
  114. package/skill-data/workflow/references/session-hosts.md +27 -0
  115. package/skill-data/workflow-local/SKILL.md +4 -3
  116. package/skill-data/workflow-local/references/ci.md +1 -1
  117. package/skills/teamai/SKILL.md +4 -3
  118. package/workflows/README.md +103 -0
  119. package/workflows/README.zh-CN.md +103 -0
  120. package/workflows/teamai-benchmark.yaml +78 -0
  121. package/workflows/teamai-ci-extract-mr.yaml +66 -0
  122. package/workflows/teamai-codebase-deep-enrich/README.md +123 -0
  123. package/workflows/teamai-codebase-deep-enrich/README.zh-CN.md +123 -0
  124. package/workflows/teamai-codebase-deep-enrich/WORKFLOW.yaml +119 -0
  125. package/workflows/teamai-codebase-deep-enrich/architecture.md +30 -0
  126. package/workflows/teamai-codebase-deep-enrich/component.md +30 -0
  127. package/workflows/teamai-codebase-deep-enrich/params.yaml +1 -0
  128. package/workflows/teamai-codebase-deep-enrich/scenarios.md +32 -0
  129. package/workflows/teamai-codebase-enrich.yaml +98 -0
  130. package/workflows/teamai-draft-learning-updates/README.md +116 -0
  131. package/workflows/teamai-draft-learning-updates/README.zh-CN.md +116 -0
  132. package/workflows/teamai-draft-learning-updates/WORKFLOW.yaml +61 -0
  133. package/workflows/teamai-draft-learning-updates/params.yaml +4 -0
  134. package/workflows/teamai-finished-sessions/README.md +101 -0
  135. package/workflows/teamai-finished-sessions/README.zh-CN.md +101 -0
  136. package/workflows/teamai-finished-sessions/WORKFLOW.yaml +43 -0
  137. package/workflows/teamai-finished-sessions/params.yaml +1 -0
  138. package/workflows/teamai-import-from-iwiki.yaml +90 -0
  139. package/workflows/teamai-import-from-mr/README.md +104 -0
  140. package/workflows/teamai-import-from-mr/README.zh-CN.md +104 -0
  141. package/workflows/teamai-import-from-mr/WORKFLOW.yaml +94 -0
  142. package/workflows/teamai-import-from-mr/draft.en.md +48 -0
  143. package/workflows/teamai-import-from-mr/draft.zh.md +48 -0
  144. package/workflows/teamai-import-from-repo/README.md +106 -0
  145. package/workflows/teamai-import-from-repo/README.zh-CN.md +106 -0
  146. package/workflows/teamai-import-from-repo/WORKFLOW.yaml +109 -0
  147. package/workflows/teamai-import-from-repo/narrative.md +83 -0
  148. package/workflows/teamai-import-learnings.yaml +83 -0
  149. package/workflows/teamai-import-rules.yaml +34 -0
  150. package/workflows/teamai-new-scorer.yaml +54 -0
  151. package/workflows/teamai-promote-learning/README.md +122 -0
  152. package/workflows/teamai-promote-learning/README.zh-CN.md +122 -0
  153. package/workflows/teamai-promote-learning/WORKFLOW.yaml +102 -0
  154. package/workflows/teamai-promote-learning/params.yaml +4 -0
  155. package/workflows/teamai-score.yaml +121 -0
  156. package/workflows/teamai-self-improvement.yaml +37 -0
  157. package/workflows/teamai-session-to-task.yaml +69 -0
  158. package/workflows/teamai-sessions-to-tasks.yaml +62 -0
  159. package/workflows/teamai-share-learnings-from-sessions.yaml +36 -0
  160. package/workflows/teamai-share-learnings.yaml +25 -0
  161. package/workflows/teamai-share-session.yaml +21 -0
  162. package/workflows/teamai-try-scorer.yaml +32 -0
  163. package/skill-data/workflow/references/hosts.md +0 -27
@@ -0,0 +1,81 @@
1
+ # teamai-mr-hint
2
+
3
+ English | [中文](README.zh-CN.md)
4
+
5
+ - **Runs**: At session start, after the hook returns. The session's next prompt shows the offer, or the session start itself where teamai gives the tool no prompt hook
6
+ - **Input**: The MRs merged in the project's repository in the last `lookback_days`, except the ones it already offered
7
+ - **Output**: An offer to turn them into learnings with [`teamai-import-from-mr`](../../workflows/teamai-import-from-mr/README.md)
8
+ - **Files**: `params.yaml` holds teamai's parameters. Each `.md` file is one text of the offer
9
+
10
+ ## When it offers
11
+
12
+ ```mermaid
13
+ flowchart TD
14
+ start([Session start]) --> on{The MR hint on?}
15
+ on -- no --> none([No hint])
16
+ on -- yes --> remote{The project's origin is on GitHub or git.woa.com?}
17
+ remote -- no --> none
18
+ remote -- yes --> mrs{"MRs merged in the last lookback_days, at most max_mrs, that it has not offered yet?"}
19
+ mrs -- no --> none
20
+ mrs -- yes --> can{The agent can start teamai-import-from-mr?}
21
+ can -- yes --> w([offer-workflow.md])
22
+ can -- no --> c([offer-command.md, which names teamai import --from-mr])
23
+ classDef out fill:#2f8f4f,stroke:#1f6b39,color:#fff;
24
+ classDef skip fill:#6b6b6b,stroke:#4a4a4a,color:#fff;
25
+ class w,c out;
26
+ class none skip;
27
+ ```
28
+
29
+ The agent cannot start the workflow in a session that teamai itself launched.
30
+
31
+ ## Replace it
32
+
33
+ Put only the files you change in `hooks/teamai-mr-hint/` at the root of the team repo. Every other file, `params.yaml` included, stays teamai's and keeps getting teamai's updates.
34
+
35
+ ```yaml
36
+ # hooks/teamai-mr-hint/params.yaml
37
+ lookback_days: 14 # max_mrs keeps teamai's value
38
+ ```
39
+
40
+ Push the folder. The next `teamai pull` checks your files with teamai's other files and delivers them together. A key you leave out of `params.yaml` keeps teamai's value from its `params.yaml`.
41
+
42
+ ## Parameters
43
+
44
+ | Key | Range | What it sets |
45
+ |---|---|---|
46
+ | `lookback_days` | 1-90 | How many days back an MR may have merged |
47
+ | `max_mrs` | 1-100 | The most MRs listed, and the page size teamai asks the provider for |
48
+
49
+ ## Texts
50
+
51
+ Both texts take `{{ count }}`, `{{ mr_lines }}` and `{{ command }}`. `{{ mr_lines }}` has one line per MR:
52
+
53
+ | File | One line of `{{ mr_lines }}` |
54
+ |---|---|
55
+ | `offer-command.en.md` | `- Fix retry backoff (merged: 2026-11-02)` |
56
+ | `offer-command.md` | `- Fix retry backoff(merged: 2026-11-02)` |
57
+ | `offer-workflow.en.md`, `offer-workflow.md` | The same, followed by the MR's URL |
58
+
59
+ | `language` in `teamai.yaml` | The file teamai prints |
60
+ |---|---|
61
+ | Unset | `<text>.md`, in Chinese and English |
62
+ | `en` | `<text>.en.md`, in English only |
63
+ | `zh` | `<text>.zh.md` when the folder has it, else `<text>.md` |
64
+
65
+ ## What pull refuses
66
+
67
+ | The replacement | What pull does |
68
+ |---|---|
69
+ | Misses a text, sets a value out of range, sets a key the table above does not list, keeps `with:` in `HOOK.yaml`, or sets a `command` | Names the field and keeps teamai's folder |
70
+ | Uses a variable its text does not offer | The same |
71
+ | Sits in a namespace, such as `hooks/frontend/teamai-mr-hint/` | The same. A replacement goes at the root of the team repo |
72
+
73
+ ## Settings that change it
74
+
75
+ | Setting | Team `teamai.yaml` | Member config | Environment | Effect |
76
+ |---|---|---|---|---|
77
+ | The hint | `sharing.mrHint.enabled` | `mrHintEnabled` | `TEAMAI_MR_HINT_DISABLED=1` | When off, no session gets the hint |
78
+ | Language | `language` | | | Picks the text variant |
79
+ | GitHub token | | | `GITHUB_TOKEN` | When set, teamai sends it to GitHub, which then allows more requests |
80
+
81
+ The member config is `~/.teamai/projects/<slug>/config.yaml` in a workspace, then `~/.teamai/config.yaml`. The environment wins over the member config, and the member config wins over the team. See [member settings](https://github.com/Tencent/teamai-cli/blob/main/docs/guide/reference.md#member-settings) for the defaults.
@@ -0,0 +1,81 @@
1
+ # teamai-mr-hint
2
+
3
+ [English](README.md) | 中文
4
+
5
+ - **运行时机**: 会话开始时,在 hook 返回之后。提议在会话的下一条提示词时显示;teamai 没有给工具装提示词 hook 时,在会话开始时显示
6
+ - **输入**: 项目仓库在最近 `lookback_days` 天内合并的 MR,已经提议过的除外
7
+ - **输出**: 一条提议:用 [`teamai-import-from-mr`](../../workflows/teamai-import-from-mr/README.zh-CN.md) 把它们整理成 learning
8
+ - **文件**: `params.yaml` 保存 teamai 的参数。每个 `.md` 文件是提议的一段文案
9
+
10
+ ## 何时提议
11
+
12
+ ```mermaid
13
+ flowchart TD
14
+ start(["会话开始"]) --> on{"MR 提示开启?"}
15
+ on -- 否 --> none(["没有提示"])
16
+ on -- 是 --> remote{"项目的 origin 在 GitHub 或 git.woa.com 上?"}
17
+ remote -- 否 --> none
18
+ remote -- 是 --> mrs{"有最近 lookback_days 天内合并、还没提议过的 MR(最多 max_mrs 个)?"}
19
+ mrs -- 否 --> none
20
+ mrs -- 是 --> can{"agent 能启动 teamai-import-from-mr?"}
21
+ can -- 是 --> w([offer-workflow.md])
22
+ can -- 否 --> c(["offer-command.md,其中给出 teamai import --from-mr"])
23
+ classDef out fill:#2f8f4f,stroke:#1f6b39,color:#fff;
24
+ classDef skip fill:#6b6b6b,stroke:#4a4a4a,color:#fff;
25
+ class w,c out;
26
+ class none skip;
27
+ ```
28
+
29
+ 在 teamai 自己启动的会话里,agent 不能启动这个工作流。
30
+
31
+ ## 替换它
32
+
33
+ 在团队仓库根目录的 `hooks/teamai-mr-hint/` 里只放你要改的文件。其他文件(包括 `params.yaml`)仍用 teamai 的,并继续获得 teamai 的更新。
34
+
35
+ ```yaml
36
+ # hooks/teamai-mr-hint/params.yaml
37
+ lookback_days: 14 # max_mrs keeps teamai's value
38
+ ```
39
+
40
+ 推送这个文件夹。下一次 `teamai pull` 会把你的文件和 teamai 的其他文件一起检查并交付。`params.yaml` 里没写的键,沿用 teamai 的 `params.yaml` 里的值。
41
+
42
+ ## 参数
43
+
44
+ | 键 | 范围 | 设置什么 |
45
+ |---|---|---|
46
+ | `lookback_days` | 1-90 | MR 最多可以是多少天前合并的 |
47
+ | `max_mrs` | 1-100 | 最多列出多少个 MR,也是 teamai 向代码托管平台请求的每页数量 |
48
+
49
+ ## 文案
50
+
51
+ 两段文案都接收 `{{ count }}`、`{{ mr_lines }}` 和 `{{ command }}`。`{{ mr_lines }}` 每个 MR 一行:
52
+
53
+ | 文件 | `{{ mr_lines }}` 的一行 |
54
+ |---|---|
55
+ | `offer-command.en.md` | `- Fix retry backoff (merged: 2026-11-02)` |
56
+ | `offer-command.md` | `- Fix retry backoff(merged: 2026-11-02)` |
57
+ | `offer-workflow.en.md`、`offer-workflow.md` | 同上,后面跟着 MR 的 URL |
58
+
59
+ | `teamai.yaml` 里的 `language` | teamai 打印的文件 |
60
+ |---|---|
61
+ | 未设置 | `<text>.md`,中英双语 |
62
+ | `en` | `<text>.en.md`,只有英文 |
63
+ | `zh` | 文件夹里有 `<text>.zh.md` 时打印它,否则打印 `<text>.md` |
64
+
65
+ ## pull 拒绝什么
66
+
67
+ | 替换 | pull 怎么做 |
68
+ |---|---|
69
+ | 缺少某段文案、设置了超出范围的值、设置了上表没有列出的键、在 `HOOK.yaml` 里保留了 `with:`,或设置了 `command` | 指出是哪个字段,继续使用 teamai 的文件夹 |
70
+ | 使用了文案不提供的变量 | 同上 |
71
+ | 放在命名空间里,例如 `hooks/frontend/teamai-mr-hint/` | 同上。替换要放在团队仓库根目录 |
72
+
73
+ ## 影响它的设置
74
+
75
+ | 设置 | 团队 `teamai.yaml` | 成员配置 | 环境变量 | 作用 |
76
+ |---|---|---|---|---|
77
+ | 提示 | `sharing.mrHint.enabled` | `mrHintEnabled` | `TEAMAI_MR_HINT_DISABLED=1` | 关闭时,没有会话收到提示 |
78
+ | 语言 | `language` | | | 选择文案版本 |
79
+ | GitHub token | | | `GITHUB_TOKEN` | 设置后,teamai 把它发给 GitHub,GitHub 就允许更多请求 |
80
+
81
+ 成员配置在工作区里是 `~/.teamai/projects/<slug>/config.yaml`,其次是 `~/.teamai/config.yaml`。环境变量优先于成员配置,成员配置优先于团队。默认值见[成员设置](https://github.com/Tencent/teamai-cli/blob/main/docs/guide/zh-CN/reference.md#成员设置)。
@@ -0,0 +1,7 @@
1
+ [teamai:mr-hint] Found {{ count }} recently merged MR(s) not yet imported into the team knowledge base.
2
+
3
+ After this task, tell the user they can turn these MRs into learnings with:
4
+
5
+ {{ mr_lines }}
6
+
7
+ {{ command }}
@@ -0,0 +1,10 @@
1
+ [teamai:mr-hint] 发现 {{ count }} 个近期已合入但尚未提炼的 MR。
2
+
3
+ 请在任务完成后告知用户,可运行以下命令将这些 MR 提炼为 learning:
4
+
5
+ {{ mr_lines }}
6
+
7
+ {{ command }}
8
+
9
+ [teamai:mr-hint] Found merged MR(s) not yet imported into team knowledge base.
10
+ Please remind the user to run `teamai import --from-mr <url...>` when convenient.
@@ -0,0 +1,7 @@
1
+ [teamai:mr-hint] Found {{ count }} recently merged MR(s) not yet imported into the team knowledge base.
2
+
3
+ After this task, offer the user to turn these MRs into learnings with the teamai-import-from-mr workflow. Its describe proposes these MRs:
4
+
5
+ {{ mr_lines }}
6
+
7
+ {{ command }}
@@ -0,0 +1,10 @@
1
+ [teamai:mr-hint] 发现 {{ count }} 个近期已合入但尚未提炼的 MR。
2
+
3
+ 请在任务完成后告知用户,可运行以下命令将这些 MR 提炼为 learning:
4
+
5
+ {{ mr_lines }}
6
+
7
+ {{ command }}
8
+
9
+ [teamai:mr-hint] Found merged MR(s) not yet imported into team knowledge base.
10
+ Please offer the user the teamai-import-from-mr workflow when convenient. Its describe proposes these MRs.
@@ -0,0 +1,2 @@
1
+ lookback_days: 7
2
+ max_mrs: 10
@@ -0,0 +1 @@
1
+ description: Tell the agent the team's package declarations changed, and how to apply them
@@ -0,0 +1,64 @@
1
+ # teamai-package-hint
2
+
3
+ English | [中文](README.zh-CN.md)
4
+
5
+ - **Runs**: At session start
6
+ - **Input**: The `packages` section of the team's `teamai.yaml`, and what this machine last applied
7
+ - **Output**: When the section changed, a request to review it and run `teamai packages`
8
+ - **Files**: `HOOK.yaml` holds only `description`. `message.md` is the text of the hint
9
+
10
+ ## When it prints
11
+
12
+ ```mermaid
13
+ flowchart TD
14
+ start([Session start]) --> off{TEAMAI_PACKAGE_HINT_DISABLED=1?}
15
+ off -- yes --> none([No hint])
16
+ off -- no --> changed{"packages changed since this machine last ran teamai packages?"}
17
+ changed -- no --> none
18
+ changed -- yes --> hint([message.md])
19
+ classDef out fill:#2f8f4f,stroke:#1f6b39,color:#fff;
20
+ classDef skip fill:#6b6b6b,stroke:#4a4a4a,color:#fff;
21
+ class hint out;
22
+ class none skip;
23
+ ```
24
+
25
+ ## Replace it
26
+
27
+ Put only the files you change in `hooks/teamai-package-hint/` at the root of the team repo. Every other file, `HOOK.yaml` included, stays teamai's and keeps getting teamai's updates.
28
+
29
+ `hooks/teamai-package-hint/message.md`:
30
+
31
+ ```markdown
32
+ The team's packages changed ({{ summary }}). List what `teamai packages` installs, and ask the member before you run it.
33
+ ```
34
+
35
+ Push the folder. The next `teamai pull` checks your files with teamai's other files and delivers them together. The hint takes no parameters.
36
+
37
+ ## Texts
38
+
39
+ | File | Variables |
40
+ |---|---|
41
+ | `message.md` | `{{ summary }}`, such as `2 npm packages and 1 Claude plugin`. It is always English |
42
+
43
+ | `language` in `teamai.yaml` | The file teamai prints |
44
+ |---|---|
45
+ | Unset | `message.md` |
46
+ | `en` or `zh` | `message.en.md` or `message.zh.md` when the folder has it, else `message.md` |
47
+
48
+ ## What pull refuses
49
+
50
+ | The replacement | What pull does |
51
+ |---|---|
52
+ | Misses `message.md`, sets a `with:` key, or sets a `command` | Names the field and keeps teamai's folder |
53
+ | Uses a variable other than `summary` | The same |
54
+ | Sits in a namespace, such as `hooks/frontend/teamai-package-hint/` | The same. A replacement goes at the root of the team repo |
55
+
56
+ ## Settings that change it
57
+
58
+ | Setting | Team `teamai.yaml` | Environment | Effect |
59
+ |---|---|---|---|
60
+ | Packages | `packages` | | A change since this machine last ran `teamai packages` shows the hint |
61
+ | The hint | | `TEAMAI_PACKAGE_HINT_DISABLED=1` | Turns the hint off on this machine |
62
+ | Language | `language` | | Picks the text variant |
63
+
64
+ No member config key changes it.
@@ -0,0 +1,64 @@
1
+ # teamai-package-hint
2
+
3
+ [English](README.md) | 中文
4
+
5
+ - **运行时机**: 会话开始时
6
+ - **输入**: 团队 `teamai.yaml` 的 `packages` 部分,以及本机上次应用的内容
7
+ - **输出**: 这部分有变化时,请求检查它并运行 `teamai packages`
8
+ - **文件**: `HOOK.yaml` 里只有 `description`。`message.md` 是提示的文案
9
+
10
+ ## 何时打印
11
+
12
+ ```mermaid
13
+ flowchart TD
14
+ start(["会话开始"]) --> off{"TEAMAI_PACKAGE_HINT_DISABLED=1?"}
15
+ off -- 是 --> none(["没有提示"])
16
+ off -- 否 --> changed{"packages 在本机上次运行 teamai packages 之后有变化?"}
17
+ changed -- 否 --> none
18
+ changed -- 是 --> hint([message.md])
19
+ classDef out fill:#2f8f4f,stroke:#1f6b39,color:#fff;
20
+ classDef skip fill:#6b6b6b,stroke:#4a4a4a,color:#fff;
21
+ class hint out;
22
+ class none skip;
23
+ ```
24
+
25
+ ## 替换它
26
+
27
+ 在团队仓库根目录的 `hooks/teamai-package-hint/` 里只放你要改的文件。其他文件(包括 `HOOK.yaml`)仍用 teamai 的,并继续获得 teamai 的更新。
28
+
29
+ `hooks/teamai-package-hint/message.md`:
30
+
31
+ ```markdown
32
+ The team's packages changed ({{ summary }}). List what `teamai packages` installs, and ask the member before you run it.
33
+ ```
34
+
35
+ 推送这个文件夹。下一次 `teamai pull` 会把你的文件和 teamai 的其他文件一起检查并交付。这条提示没有参数。
36
+
37
+ ## 文案
38
+
39
+ | 文件 | 变量 |
40
+ |---|---|
41
+ | `message.md` | `{{ summary }}`,例如 `2 npm packages and 1 Claude plugin`。它总是英文 |
42
+
43
+ | `teamai.yaml` 里的 `language` | teamai 打印的文件 |
44
+ |---|---|
45
+ | 未设置 | `message.md` |
46
+ | `en` 或 `zh` | 文件夹里有 `message.en.md` 或 `message.zh.md` 时打印它,否则打印 `message.md` |
47
+
48
+ ## pull 拒绝什么
49
+
50
+ | 替换 | pull 怎么做 |
51
+ |---|---|
52
+ | 缺少 `message.md`、设置了 `with:` 键,或设置了 `command` | 指出是哪个字段,继续使用 teamai 的文件夹 |
53
+ | 使用了 `summary` 以外的变量 | 同上 |
54
+ | 放在命名空间里,例如 `hooks/frontend/teamai-package-hint/` | 同上。替换要放在团队仓库根目录 |
55
+
56
+ ## 影响它的设置
57
+
58
+ | 设置 | 团队 `teamai.yaml` | 环境变量 | 作用 |
59
+ |---|---|---|---|
60
+ | 包 | `packages` | | 本机上次运行 `teamai packages` 之后有变化,就显示提示 |
61
+ | 提示 | | `TEAMAI_PACKAGE_HINT_DISABLED=1` | 在本机关闭提示 |
62
+ | 语言 | `language` | | 选择文案版本 |
63
+
64
+ 没有成员配置键会改变它。
@@ -0,0 +1,3 @@
1
+ [teamai:pkg-hint] Team package declarations changed ({{ summary }}).
2
+ Review the packages section, then run `teamai packages` to apply it.
3
+ TeamAI never installs third-party package or plugin code automatically at SessionStart.
@@ -0,0 +1 @@
1
+ description: Suggest a teamai-recall search once a task is planned with TodoWrite
@@ -0,0 +1,68 @@
1
+ # teamai-todowrite-hint
2
+
3
+ English | [中文](README.zh-CN.md)
4
+
5
+ - **Runs**: After a TodoWrite call
6
+ - **Input**: None
7
+ - **Output**: A suggestion to search the team knowledge base once with the [`teamai-recall`](../../agents/README.md) subagent
8
+ - **Files**: `HOOK.yaml` holds only `description`. `message.md` is the text of the hint
9
+
10
+ ## When it suggests
11
+
12
+ ```mermaid
13
+ flowchart TD
14
+ call([A tool call]) --> todo{The tool is TodoWrite?}
15
+ todo -- no --> none([No hint])
16
+ todo -- yes --> recall{Recall on?}
17
+ recall -- no --> none
18
+ recall -- yes --> entry{"The team's hooks/hooks.yaml keeps the hook entry?"}
19
+ entry -- no --> none
20
+ entry -- yes --> once{Already suggested in this session?}
21
+ once -- yes --> none
22
+ once -- no --> hint([message.md])
23
+ classDef out fill:#2f8f4f,stroke:#1f6b39,color:#fff;
24
+ classDef skip fill:#6b6b6b,stroke:#4a4a4a,color:#fff;
25
+ class hint out;
26
+ class none skip;
27
+ ```
28
+
29
+ ## Replace it
30
+
31
+ Put only the files you change in `hooks/teamai-todowrite-hint/` at the root of the team repo. Every other file, `HOOK.yaml` included, stays teamai's and keeps getting teamai's updates.
32
+
33
+ `hooks/teamai-todowrite-hint/message.md`:
34
+
35
+ ```markdown
36
+ Call the `teamai-recall` subagent once before the first edit.
37
+ ```
38
+
39
+ Your `message.md` replaces every language of the text, so every `language` prints it. Push the folder. The next `teamai pull` checks your files with teamai's other files and delivers them together. The hint takes no parameters.
40
+
41
+ ## Texts
42
+
43
+ | File | Variables |
44
+ |---|---|
45
+ | `message.md` | None |
46
+
47
+ | `language` in `teamai.yaml` | The file teamai prints |
48
+ |---|---|
49
+ | Unset | `message.md` |
50
+ | `en` or `zh` | `message.en.md` or `message.zh.md` when the folder has it, else `message.md` |
51
+
52
+ ## What pull refuses
53
+
54
+ | The replacement | What pull does |
55
+ |---|---|
56
+ | Misses `message.md`, sets a `with:` key, or sets a `command` | Names the field and keeps teamai's folder |
57
+ | Uses a variable | The same. The text offers none |
58
+ | Sits in a namespace, such as `hooks/frontend/teamai-todowrite-hint/` | The same. A replacement goes at the root of the team repo |
59
+
60
+ ## Settings that change it
61
+
62
+ | Setting | Team | Member config | Environment | Effect |
63
+ |---|---|---|---|---|
64
+ | Recall | `sharing.recall.enabled` in `teamai.yaml` | `recallEnabled` | `TEAMAI_RECALL_DISABLED=1` | When off, no session gets the hint |
65
+ | The hook entry | `builtin.disabled: [Hook dispatch post-tool-use TodoWrite]` in `hooks/hooks.yaml` | | | When listed, no session gets the hint |
66
+ | Language | `language` in `teamai.yaml` | | | Picks the text variant |
67
+
68
+ The member config is `~/.teamai/projects/<slug>/config.yaml` in a workspace, then `~/.teamai/config.yaml`. The environment wins over the member config, and the member config wins over the team. See [member settings](https://github.com/Tencent/teamai-cli/blob/main/docs/guide/reference.md#member-settings) for the defaults.
@@ -0,0 +1,68 @@
1
+ # teamai-todowrite-hint
2
+
3
+ [English](README.md) | 中文
4
+
5
+ - **运行时机**: TodoWrite 调用之后
6
+ - **输入**: 无
7
+ - **输出**: 建议用 [`teamai-recall`](../../agents/README.zh-CN.md) subagent 检索一次团队知识库
8
+ - **文件**: `HOOK.yaml` 里只有 `description`。`message.md` 是提示的文案
9
+
10
+ ## 何时建议
11
+
12
+ ```mermaid
13
+ flowchart TD
14
+ call(["一次工具调用"]) --> todo{"工具是 TodoWrite?"}
15
+ todo -- 否 --> none(["没有提示"])
16
+ todo -- 是 --> recall{"recall 开启?"}
17
+ recall -- 否 --> none
18
+ recall -- 是 --> entry{"团队的 hooks/hooks.yaml 保留了这个 hook 条目?"}
19
+ entry -- 否 --> none
20
+ entry -- 是 --> once{"这次会话已经建议过?"}
21
+ once -- 是 --> none
22
+ once -- 否 --> hint([message.md])
23
+ classDef out fill:#2f8f4f,stroke:#1f6b39,color:#fff;
24
+ classDef skip fill:#6b6b6b,stroke:#4a4a4a,color:#fff;
25
+ class hint out;
26
+ class none skip;
27
+ ```
28
+
29
+ ## 替换它
30
+
31
+ 在团队仓库根目录的 `hooks/teamai-todowrite-hint/` 里只放你要改的文件。其他文件(包括 `HOOK.yaml`)仍用 teamai 的,并继续获得 teamai 的更新。
32
+
33
+ `hooks/teamai-todowrite-hint/message.md`:
34
+
35
+ ```markdown
36
+ Call the `teamai-recall` subagent once before the first edit.
37
+ ```
38
+
39
+ 你的 `message.md` 会替换这段文案的所有语言版本,所以每种 `language` 都会打印它。推送这个文件夹。下一次 `teamai pull` 会把你的文件和 teamai 的其他文件一起检查并交付。这条提示没有参数。
40
+
41
+ ## 文案
42
+
43
+ | 文件 | 变量 |
44
+ |---|---|
45
+ | `message.md` | 无 |
46
+
47
+ | `teamai.yaml` 里的 `language` | teamai 打印的文件 |
48
+ |---|---|
49
+ | 未设置 | `message.md` |
50
+ | `en` 或 `zh` | 文件夹里有 `message.en.md` 或 `message.zh.md` 时打印它,否则打印 `message.md` |
51
+
52
+ ## pull 拒绝什么
53
+
54
+ | 替换 | pull 怎么做 |
55
+ |---|---|
56
+ | 缺少 `message.md`、设置了 `with:` 键,或设置了 `command` | 指出是哪个字段,继续使用 teamai 的文件夹 |
57
+ | 使用了变量 | 同上。这段文案不提供变量 |
58
+ | 放在命名空间里,例如 `hooks/frontend/teamai-todowrite-hint/` | 同上。替换要放在团队仓库根目录 |
59
+
60
+ ## 影响它的设置
61
+
62
+ | 设置 | 团队 | 成员配置 | 环境变量 | 作用 |
63
+ |---|---|---|---|---|
64
+ | Recall | `teamai.yaml` 里的 `sharing.recall.enabled` | `recallEnabled` | `TEAMAI_RECALL_DISABLED=1` | 关闭时,没有会话收到提示 |
65
+ | hook 条目 | `hooks/hooks.yaml` 里的 `builtin.disabled: [Hook dispatch post-tool-use TodoWrite]` | | | 列出它时,没有会话收到提示 |
66
+ | 语言 | `teamai.yaml` 里的 `language` | | | 选择文案版本 |
67
+
68
+ 成员配置在工作区里是 `~/.teamai/projects/<slug>/config.yaml`,其次是 `~/.teamai/config.yaml`。环境变量优先于成员配置,成员配置优先于团队。默认值见[成员设置](https://github.com/Tencent/teamai-cli/blob/main/docs/guide/zh-CN/reference.md#成员设置)。
@@ -0,0 +1,6 @@
1
+ [teamai:todowrite-hint] Task plan detected.
2
+
3
+ If this task may benefit from the team knowledge base (not a trivial local
4
+ change, and the user has not provided the relevant context), call the
5
+ `teamai-recall` subagent once via the Agent tool before proceeding.
6
+ Skip that when the user already gave enough context or the change is trivial.
@@ -0,0 +1,9 @@
1
+ [teamai:todowrite-hint] 任务已规划。
2
+
3
+ 如本次任务可能受益于团队知识库(非简单局部改动、用户未提供相关上下文),
4
+ 建议通过 Agent tool 调用 teamai-recall subagent 检索一次。
5
+ 若用户已给出充分上下文或仅为简单修改,可跳过。
6
+
7
+ Task plan detected — if this task may benefit from team knowledge
8
+ (not a trivial local change, user has not provided relevant context),
9
+ consider invoking the `teamai-recall` subagent once before proceeding.
package/package.json CHANGED
@@ -1,10 +1,17 @@
1
1
  {
2
2
  "name": "@team-ai/teamai-cli",
3
- "version": "0.40.9",
3
+ "version": "0.50.0",
4
4
  "description": "TeamAI — Make Every Team AI Native (skill sync + shared knowledge base, powered by Git)",
5
5
  "type": "module",
6
6
  "bin": {
7
- "teamai": "dist/index.js"
7
+ "teamai": "dist/index.js",
8
+ "teamai-runtime-sandbox": "dist/runtime-sandbox.js",
9
+ "teamai-sandbox-claude": "dist/runtime-sandbox.js",
10
+ "teamai-sandbox-codex": "dist/runtime-sandbox.js",
11
+ "teamai-sandbox-codebuddy": "dist/runtime-sandbox.js",
12
+ "teamai-sandbox-opencode": "dist/runtime-sandbox.js",
13
+ "teamai-runtime-t3": "dist/runtime-t3.js",
14
+ "teamai-runtime-paseo": "dist/runtime-paseo.js"
8
15
  },
9
16
  "files": [
10
17
  "dist/**/*.js",
@@ -13,23 +20,35 @@
13
20
  "!**/__pycache__",
14
21
  "!**/*.pyc",
15
22
  "agents",
23
+ "workflows",
24
+ "rules",
25
+ "scorers",
26
+ "drivers",
27
+ "runtimes",
28
+ "sandboxes",
29
+ "hooks",
16
30
  "README.md",
17
31
  "CHANGELOG.md",
18
32
  "LICENSE"
19
33
  ],
34
+ "workspaces": [
35
+ "packages/*"
36
+ ],
20
37
  "publishConfig": {
21
38
  "access": "public"
22
39
  },
23
40
  "scripts": {
24
41
  "build": "tsup",
42
+ "verify": "node scripts/verify.mjs",
43
+ "verify:world": "node scripts/verify.mjs world",
25
44
  "dev": "tsup --watch",
26
45
  "test": "vitest run",
27
46
  "pretest:e2e": "npm run build",
28
47
  "test:e2e": "vitest run --config vitest.e2e.config.ts",
29
48
  "test:watch": "vitest",
30
49
  "test:coverage": "vitest run --coverage",
31
- "typecheck": "tsc --noEmit",
32
- "lint": "oxlint --type-aware --deny-warnings --report-unused-disable-directives",
50
+ "typecheck": "tsc --noEmit && tsc -p oxlint-plugin-teamai",
51
+ "lint": "oxlint --type-aware --deny-warnings --report-unused-disable-directives && node scripts/check-docs.mjs",
33
52
  "release": "standard-version",
34
53
  "prepublishOnly": "npm run build"
35
54
  },
@@ -51,47 +70,55 @@
51
70
  "author": "jeffyxu <jeffyxu@tencent.com>",
52
71
  "license": "MIT",
53
72
  "dependencies": {
73
+ "@vercel/sandbox": "^3.9.1",
54
74
  "chalk": "^5.3.0",
55
75
  "commander": "^12.1.0",
56
76
  "cross-spawn": "^7.0.6",
57
77
  "fflate": "^0.8.3",
58
78
  "fs-extra": "^11.2.0",
59
79
  "gray-matter": "^4.0.3",
80
+ "json5": "^2.2.3",
81
+ "jsonc-parser": "^3.3.1",
60
82
  "listr2": "^9.0.5",
61
83
  "ora": "^8.1.0",
62
84
  "semver": "^7.8.5",
63
- "simple-git": "^3.36.0",
64
- "smol-toml": "^1.7.1",
85
+ "simple-git": "^4.0.2",
86
+ "smol-toml": "^1.9.1",
65
87
  "tree-sitter-wasms": "0.1.13",
66
88
  "web-tree-sitter": "0.25.10",
67
89
  "yaml": "^2.6.0",
68
- "zod": "^3.24.0"
90
+ "zod": "^4.6.7"
69
91
  },
70
92
  "overrides": {
71
93
  "js-yaml": "^3.15.2",
72
- "brace-expansion@1": "1.1.18",
73
- "brace-expansion@2": "2.1.4",
74
- "brace-expansion@5": "5.0.9",
94
+ "brace-expansion@1": "1.1.21",
75
95
  "nanoid": "3.3.19",
76
96
  "postcss": "8.5.28",
77
- "picomatch": "4.0.7"
97
+ "picomatch": "4.0.7",
98
+ "esbuild": "^0.28.2"
78
99
  },
79
100
  "devDependencies": {
101
+ "@babel/parser": "7.29.11",
102
+ "@babel/types": "7.29.11",
103
+ "@oxlint/plugins": "1.85.0",
80
104
  "@types/cross-spawn": "^6.0.6",
81
105
  "@types/fs-extra": "^11.0.4",
106
+ "@types/mdast": "^4.0.4",
82
107
  "@types/node": "^20.17.0",
83
108
  "@types/semver": "^7.8.0",
84
- "@vitest/coverage-v8": "^3.2.7",
109
+ "@vitest/coverage-v8": "^4.1.12",
85
110
  "acorn": "^8.16.0",
86
- "esbuild": "^0.27.3",
111
+ "decode-named-character-reference": "^1.3.0",
112
+ "esbuild": "^0.28.2",
87
113
  "fast-check": "^4.10.2",
114
+ "mdast-util-from-markdown": "^2.1.0",
88
115
  "opencode-ai": "1.18.23",
89
116
  "oxlint": "1.85.0",
90
117
  "oxlint-tsgolint": "7.0.2003",
91
118
  "standard-version": "^9.5.0",
92
119
  "tsup": "^8.3.0",
93
120
  "typescript": "^7.0.2",
94
- "vitest": "^3.2.7"
121
+ "vitest": "^4.1.12"
95
122
  },
96
123
  "main": "index.js",
97
124
  "directories": {