teamai-cli 0.25.0 → 0.26.0-beta.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 (45) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.zh-CN.md +6 -0
  3. package/dist/index.js +5377 -2786
  4. package/package.json +4 -1
  5. package/skill-data/core/SKILL.md +114 -0
  6. package/skill-data/core/references/commands.md +339 -0
  7. package/{skills/teamai → skill-data/core}/references/contribute-member.md +13 -10
  8. package/{skills/teamai → skill-data/core}/references/troubleshooting.md +1 -1
  9. package/skill-data/setup/SKILL.md +76 -0
  10. package/{skills/teamai → skill-data/setup}/references/join-member.md +17 -14
  11. package/{skills/teamai → skill-data/setup}/references/manage-admin.md +8 -6
  12. package/{skills/teamai → skill-data/setup}/references/provider-tgit.md +9 -6
  13. package/{skills/teamai → skill-data/setup}/references/setup-admin.md +41 -35
  14. package/skill-data/share/SKILL.md +70 -0
  15. package/skill-data/share/references/doc-template.md +44 -0
  16. package/skill-data/wiki/SKILL.md +314 -0
  17. package/skill-data/wiki/references/agents/graph-rag-agent.md +344 -0
  18. package/skill-data/wiki/references/agents/kb-doc-generator.md +323 -0
  19. package/skill-data/wiki/references/methodology/phase0-collection.md +54 -0
  20. package/skill-data/wiki/references/methodology/phase1-reverse-engineering.md +89 -0
  21. package/skill-data/wiki/references/methodology/phase2-document-types.md +341 -0
  22. package/skill-data/wiki/references/methodology/phase3-ai-enhancement.md +164 -0
  23. package/skill-data/wiki/references/methodology/phase4-quality.md +232 -0
  24. package/skill-data/wiki/references/overview.md +124 -0
  25. package/skill-data/wiki/references/phases/k1-reverse-engineering.md +118 -0
  26. package/skill-data/wiki/references/phases/k2-documents.md +68 -0
  27. package/skill-data/wiki/references/phases/k3-ai-native.md +121 -0
  28. package/skill-data/wiki/references/phases/k4-quality.md +190 -0
  29. package/skill-data/wiki/references/phases/phase0-init.md +112 -0
  30. package/skill-data/wiki/references/templates/project-overview.md +148 -0
  31. package/{skills/team-wiki-codebase → skill-data/wiki}/scripts/scan_repo.py +52 -52
  32. package/{skills/team-wiki-codebase → skill-data/wiki}/scripts/validate_kb.py +68 -62
  33. package/skills/teamai/SKILL.md +28 -128
  34. package/skills/team-wiki-codebase/README.md +0 -121
  35. package/skills/team-wiki-codebase/SKILL.md +0 -905
  36. package/skills/team-wiki-codebase/references/agents/graph-rag-agent.md +0 -344
  37. package/skills/team-wiki-codebase/references/agents/kb-doc-generator.md +0 -323
  38. package/skills/team-wiki-codebase/references/methodology/phase0-collection.md +0 -54
  39. package/skills/team-wiki-codebase/references/methodology/phase1-reverse-engineering.md +0 -89
  40. package/skills/team-wiki-codebase/references/methodology/phase2-document-types.md +0 -341
  41. package/skills/team-wiki-codebase/references/methodology/phase3-ai-enhancement.md +0 -164
  42. package/skills/team-wiki-codebase/references/methodology/phase4-quality.md +0 -232
  43. package/skills/team-wiki-codebase/references/templates/project-overview.md +0 -148
  44. package/skills/teamai-share-learnings/SKILL.md +0 -87
  45. /package/{skills/teamai → skill-data/setup}/references/uninstall.md +0 -0
package/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ All notable changes to this project will be documented in this file. See [standa
6
6
 
7
7
  ### ✨ Features
8
8
 
9
+ - Built-in skill content ships inside the npm package and is printed by the installed CLI: `teamai skill get <core|setup|wiki|share> [--full] [--all]`, `teamai skill path <name>` for the directory holding a skill's scripts, and `teamai skill list --json` for the catalog. Agents receive one file, `skills/teamai/SKILL.md`, a discovery stub that points at those commands, so what an agent reads always matches the CLI version it is running. `teamai pull` removes the `team-wiki-codebase`, `teamai-share-learnings` and `teamai/references/*.md` trees earlier releases copied into every agent directory, removing only files whose content a release shipped (an edited file, or a member's own skill under an old name, stays), archiving each removed file under `~/.teamai/removed-skills/<run>/…` first, and keeping any directory that holds a member's own file; `teamai uninstall` removes only the packaged files from CLI-owned skill directories by the same rule. `share` is served only while recall is on and the team source is writable (not a read-only HTTP one), and the end-of-session share reminder is withheld until then too. The served workflows are English; learning and knowledge-base documents are still written in Simplified Chinese, and an existing knowledge base keeps its file names and headings. The legacy names still resolve as aliases (for [#678](https://github.com/Tencent/teamai-cli/issues/678), [#730](https://github.com/Tencent/teamai-cli/issues/730)).
10
+
11
+ - Hooks, MCP servers and env variables can be scoped by logical project, the second membership axis they lacked. A `hooks/hooks.yaml` hook and an `mcp/mcp.yaml` server accept an optional `projects:` list beside `roles:`, and an `env/env.yaml` variable accepts both. An entry reaches a member when one of the projects its directory is bound to (`teamai projects set`) is listed; `projects: []` reaches nobody, and a directory bound to no project keeps receiving every entry, so nothing changes until a maintainer adds the key. The two axes compose as AND, the way `tools:` and `roles:` already do, so `roles: [frontend] projects: [checkout]` reaches frontend members of checkout rather than everyone on either. Rebinding with `teamai projects set` removes the previous project's entries on the next pull — for env that means the variable leaves `env.sh`, also on a pull that finds the team repo unchanged, so a machine upgrading from a CLI that ignored the keys drops a withheld variable without `--force`, and a refresh that cannot be written there is reported with the path and the way out rather than passing silently under `Already synced`; `teamai doctor` applies the same filter, so a variable correctly withheld is not reported as undelivered, while one that `env.sh` still exports after a rebind is reported until the next pull rewrites the file. An id that `manifest/projects.yaml` does not define produces one warning per pull, and so does a `projects:` key in a team with no projects manifest: the key still filters against the ids in the directory's `config.yaml`, but nothing can validate them. `teamai mcp list`, `teamai hooks list` and `teamai env list` show the restriction, and `pull` reports `Synced 1 of 3 env variable(s)` when scoping withheld some. This is what the keys exist to control: a team with five projects and three MCP servers each gave every member of a role fifteen server processes and fifteen tool lists in the context of every session (for [#668](https://github.com/Tencent/teamai-cli/issues/668)).
12
+
9
13
  - `teamai doctor` now checks what landed for every resource, not only skills and docs. `Rules delivered to <tool>` and `Agents delivered to <tool>` ask the resource handler where an item lands — a rule's filename and content change per tool, an agent's destination comes from its render and its `targets:` — and compare a delivered rule with the bytes the handler renders for that tool, so a `.mdc` whose `globs` drifted from the team rule's `paths:` is reported rather than passing on the presence of its frontmatter keys. An agent is compared with the bytes its render produces, so a copy left behind by an older spec is reported rather than counted as delivered. `Every team agent reaches a tool` names an agent that renders for no installed tool, and is reported whenever a tool is installed to receive agents, including when no agent renders anywhere. Two tools do not read a rules directory and get a check each: `Team rules are active in opencode` fails when `opencode.json` stops listing the glob that makes the delivered `.md` files load at all, and `Team rules are inlined in Hermes SOUL.md` compares the managed block of `SOUL.md` with what the team rules inline to. `MCP servers delivered to <tool>` compares each server the team resolves for a tool with the entry in that tool's own config — the entry, not the name, since reconciliation leaves an entry teamai does not own alone, so an unrelated server under a team name holds the key while the team's definition never arrives — and names any the reconcile skipped with its reason, so an unresolved `${VAR}` is reported with the variable instead of being mentioned once during a pull and never again. An `mcp.yaml` that does not parse is reported as `Team MCP servers can be read` rather than read as a team shipping no MCP at all. `Env variables injected in shell profile` stops at the marker comment no longer: it checks that `env/env.yaml` parses and declares its variables under `variables:` (an explicit `variables: []` is an empty configuration and fails nothing), that each reached `env.sh` with the declared value — read back through the generator's own inverse, so a multiline value quoted across several lines is matched rather than reported stale — and that the injected block would actually load it. The two expensive registries, rules and agents, are built for `teamai doctor` only, so the checks at the end of a pull keep their budget (for [#624](https://github.com/Tencent/teamai-cli/issues/624)).
10
14
  - A manual `teamai pull` ends by running the `teamai doctor` checks and printing each one that failed, with its fix. It prints nothing when they all pass, the exit code is unchanged, and the SessionStart hook path (`--silent`) and `--dry-run` run no checks, so session startup is untouched. Provider authentication checks are left to `teamai doctor`: the pull just used the provider. So is any check that pull already reported in its own words on that run — the queued-learnings warning is not immediately repeated as a check telling you to run the pull you just ran. A check the pull stayed silent about is still printed (for [#598](https://github.com/Tencent/teamai-cli/issues/598)).
11
15
  - `teamai doctor` now checks what landed, not only the plumbing. `Skills delivered to <tool>` compares the skills your roles, tag subscriptions and exclusions resolve to against each installed tool's directory, reporting a skill that never arrived separately from one that arrived unreadable (`SKILL.md` missing, unparseable frontmatter, or a `name` that does not match the directory, which keeps the agent from discovering it). `Team docs delivered` does the same for the docs bundle against `sharing.docs.localDir`. `<tool> is installed` fails when `enabledAgents` lists a tool with no directory here, instead of skipping it silently, and reports an installed one as passing so `--json` carries an entry either way. Resolving a skill's destination without a team copy to compare against no longer warns about a Codex shared-directory conflict, so a read-only `doctor` stops reporting one for copies the pull treats as identical. The installed check asks the same resolver the sync uses, so OpenClaw is judged at its workspace directory rather than its tool root. `Team docs delivered` requires each expected document to be a readable file, not merely a name that exists. And a pull that found a scope locked by another process runs no checks at the end, since they would read a clone that process may have mid-write (for [#598](https://github.com/Tencent/teamai-cli/issues/598)).
@@ -19,6 +23,8 @@ All notable changes to this project will be documented in this file. See [standa
19
23
 
20
24
  ### 🐛 Bug Fixes
21
25
 
26
+ - `teamai init` no longer hangs without a terminal. When the provider had no session it spawned `gh auth login --web` (or `gf auth login`, `cnb login`) with inherited stdio and waited for a browser device flow that nobody could complete, about five minutes for GitHub, then exited with the provider's error and no hint of the missing credential. Each login now refuses up front when the run is not interactive and names the credential to prepare (`GITHUB_TOKEN` / `GH_TOKEN`, `CNB_TOKEN`, or for TGit a prior `gf auth login`, since a `TGIT_TOKEN` PAT is REST-API-only and cannot clone). A run is non-interactive when stdin is not a TTY or when `CI` or `TEAMAI_NONINTERACTIVE` is set, so an agent sandbox with a pseudo-terminal can declare itself unattended, and every prompt in the CLI follows the same rule. `git` also runs with its prompts closed in that case — `GIT_TERMINAL_PROMPT=0`, `GIT_ASKPASS=echo` and `GCM_INTERACTIVE=never`, each only where the caller set nothing — so a missing clone credential fails at once instead of waiting on a terminal prompt or an askpass or credential-manager dialog. `ssh` keeps its own settings: its batch flag is only reachable through `GIT_SSH_COMMAND`, which would override each repository's `core.sshCommand` (for [#711](https://github.com/Tencent/teamai-cli/issues/711)).
27
+ - `teamai members list` and `teamai projects members` read the roster registered before the reports switch, so a team upgrading past the orphan-branch split no longer sees "No team members registered" while its `members/` still lives on the default branch. The default-branch copy becomes a read-only inherited root, the way learnings' already was: listed in union with the `teamai-reports` copy, with the branch copy winning when the same file exists on both; nothing is copied or deleted, and a cold `members list` still does not publish the reports branch. Member registration merges against the inherited copy too, so a re-init keeps the original `registeredAt` and projects. Fixes [#735](https://github.com/Tencent/teamai-cli/issues/735).
22
28
  - Cache GC now rejects partial integers such as `12abc`, decimals, zero and unsafe integers for `--max-bytes` and `--stale-days` before deleting anything. An invalid `TEAMAI_CACHE_MAX_BYTES` value falls back to the default 5 GB limit instead of using a numeric prefix.
23
29
  - Usage reporting scopes sessions by path on Windows too. The project/user scope filter compared an event's `cwd` against `projectRoot` with a hard-coded `/` separator, so on Windows only a session started in the project root itself matched: every session started in a subdirectory was dropped from the project team's report and counted in the user scope's instead, which is the isolation the usage guide promises. Windows paths are also compared case-insensitively, so a drive letter or a directory name spelled with different case in the two sources no longer leaks a project session into the user scope. POSIX paths keep their own rules: case-sensitive, and a `\` in a filename stays part of the name.
24
30
  - `teamai tags subscribe` and `teamai tags unsubscribe` now invalidate the pull revision cache, as `teamai skill exclude` already does, so the next `teamai pull` applies the new subscriptions instead of reporting "Already synced" when the team repo has not changed.
package/README.zh-CN.md CHANGED
@@ -37,6 +37,12 @@ TeamAI 将个人的 AI 能力转化为团队共享能力,并在不同 Agent、
37
37
  帮我装好 teamai skill : https://github.com/Tencent/teamai-cli/tree/main/skills/teamai , 加载 teamai skill, 然后从零搭建团队的 TeamAI。
38
38
  ```
39
39
 
40
+ 如无法访问 GitHub,改用下面这一句:
41
+
42
+ ```text
43
+ 请根据 https://skillhub.cn/install/skillhub.md,安装 @user_7be6e993/teamai。然后加载 teamai skill, 并从零初始化我的团队 teamai。
44
+ ```
45
+
40
46
  装好 TeamAI 后,在 AI 工具里直接跟 `/teamai` 对话就行:
41
47
 
42
48
  **从零搭建团队**