teamai-cli 0.26.0-beta.3 → 0.26.0-beta.4
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/CHANGELOG.md +19 -6
- package/agents/teamai-recall.md +13 -5
- package/dist/index.js +18753 -14551
- package/package.json +2 -1
- package/skill-data/core/SKILL.md +4 -0
- package/skill-data/core/references/commands.md +10 -4
- package/skill-data/core/references/contribute-member.md +10 -1
- package/skill-data/core/references/troubleshooting.md +20 -3
- package/skill-data/setup/references/manage-admin.md +61 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "teamai-cli",
|
|
3
|
-
"version": "0.26.0-beta.
|
|
3
|
+
"version": "0.26.0-beta.4",
|
|
4
4
|
"description": "TeamAI — Make Every Team AI Native (skill sync + shared knowledge base, powered by Git)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
"@types/node": "^20.17.0",
|
|
81
81
|
"@types/semver": "^7.8.0",
|
|
82
82
|
"@vitest/coverage-v8": "^3.2.7",
|
|
83
|
+
"fast-check": "^4.10.2",
|
|
83
84
|
"opencode-ai": "1.18.23",
|
|
84
85
|
"standard-version": "^9.5.0",
|
|
85
86
|
"tsup": "^8.3.0",
|
package/skill-data/core/SKILL.md
CHANGED
|
@@ -105,6 +105,10 @@ teamai recall <q> # Search what the team has already learned
|
|
|
105
105
|
Every other command, every flag, and the flags `--help` hides live in the
|
|
106
106
|
generated reference below. Read it instead of guessing a flag.
|
|
107
107
|
|
|
108
|
+
`teamai pull` mirrors the non-hidden docs you receive into `sharing.docs.localDir`,
|
|
109
|
+
removing stale and local-only documents; an edited doc of a docs namespace you left
|
|
110
|
+
is kept and named. Use a dedicated directory; preview with `--dry-run`.
|
|
111
|
+
|
|
108
112
|
## References
|
|
109
113
|
|
|
110
114
|
In the files below, `{SKILL_DIR}` is the directory `teamai skill path core` prints; a reference file you open on its own writes that directory as `SKILL_DIR` in braces.
|
|
@@ -81,6 +81,8 @@ Generated: do not edit by hand. Regenerate with
|
|
|
81
81
|
|
|
82
82
|
- `teamai remove <type> <names...>` — Remove resource(s) from team repo and all local AI tools (type: skills|rules|agents|mcp)
|
|
83
83
|
- `--force` — Skip confirmation prompt
|
|
84
|
+
- `--role <ns>` — mcp: remove the server from mcp/<ns>/mcp.yaml instead of the root mcp/mcp.yaml
|
|
85
|
+
- `--project <id>` — mcp: remove the server from the project's mcp namespace instead of the root mcp/mcp.yaml
|
|
84
86
|
|
|
85
87
|
## packages
|
|
86
88
|
|
|
@@ -122,12 +124,12 @@ Generated: do not edit by hand. Regenerate with
|
|
|
122
124
|
- `teamai projects list` — List defined projects and the ones active in this directory
|
|
123
125
|
- `teamai projects set [ids...]` — Set the projects active in this directory (comma-separated or repeated; empty to clear)
|
|
124
126
|
- `teamai projects add <id>` — Add a project to manifest/projects.yaml, creating the file if needed (admin)
|
|
125
|
-
- `--namespaces <ns>` — Comma-separated namespaces for
|
|
127
|
+
- `--namespaces <ns>` — Comma-separated namespaces for knowledge, skills, learnings and agents (e.g. common,checkout); env, hooks, mcp, models and docs are declared by hand
|
|
126
128
|
- `--name <name>` — Display name for the project
|
|
127
129
|
- `-d, --description <desc>` — Description for the project
|
|
128
130
|
- `teamai projects update <id>` — Update a project in manifest/projects.yaml (admin)
|
|
129
|
-
- `--add-namespaces <ns>` — Comma-separated namespaces to add to
|
|
130
|
-
- `--remove-namespaces <ns>` — Comma-separated namespaces to remove from
|
|
131
|
+
- `--add-namespaces <ns>` — Comma-separated namespaces to add to knowledge, skills, learnings and agents
|
|
132
|
+
- `--remove-namespaces <ns>` — Comma-separated namespaces to remove from knowledge, skills, learnings and agents
|
|
131
133
|
- `--name <name>` — New display name for the project
|
|
132
134
|
- `-d, --description <desc>` — New description for the project
|
|
133
135
|
- `teamai projects remove <id>` — Remove a project from manifest/projects.yaml (admin)
|
|
@@ -192,7 +194,11 @@ Generated: do not edit by hand. Regenerate with
|
|
|
192
194
|
- `--reveal` — Show env variable values in plaintext (default: masked)
|
|
193
195
|
- `teamai env add <key> <value>` — Add or update a team environment variable
|
|
194
196
|
- `-d, --description <desc>` — Description for the variable
|
|
197
|
+
- `--role <ns>` — Write to env/<ns>/env.yaml instead of env/env.yaml
|
|
198
|
+
- `--project <id>` — Write to the project's env namespace (resources.env in manifest/projects.yaml)
|
|
195
199
|
- `teamai env remove <key>` — Remove a team environment variable
|
|
200
|
+
- `--role <ns>` — Remove from env/<ns>/env.yaml instead of env/env.yaml
|
|
201
|
+
- `--project <id>` — Remove from the project's env namespace (resources.env in manifest/projects.yaml)
|
|
196
202
|
|
|
197
203
|
## hooks
|
|
198
204
|
|
|
@@ -342,7 +348,7 @@ Generated: do not edit by hand. Regenerate with
|
|
|
342
348
|
- `teamai codebase` — Inspect and maintain team-codebase outputs
|
|
343
349
|
- `--extract [path]` — Extract code knowledge and build graph from source
|
|
344
350
|
- `--incremental` (hidden) — Only re-extract changed files (requires prior manifest)
|
|
345
|
-
- `--project <name>` (hidden) — Project slug for --extract (defaults to directory name) and required for --deep-enrich
|
|
351
|
+
- `--project <name>` (hidden) — Project slug for --extract (defaults to the directory name; a checkout's root uses the repo's name) and required for --deep-enrich
|
|
346
352
|
- `--max-files <n>` (hidden) — Max source files to scan (default: 200)
|
|
347
353
|
- `--upgrade-wiki` (hidden) — Migrate docs/team-codebase/ to teamwiki/ graph format
|
|
348
354
|
- `--lint` — Run global consistency lint over the teamwiki knowledge graph
|
|
@@ -97,11 +97,20 @@ The doc lands in the team's `learnings/` and appears for teammates on their next
|
|
|
97
97
|
new rule and a new agent land in that namespace too (a project resolves each
|
|
98
98
|
from its own axis — `knowledge` for rules, `agents` for agents). Without one,
|
|
99
99
|
a new resource whose namespace cannot be resolved stays at the shared root and
|
|
100
|
-
reaches the whole team.
|
|
100
|
+
reaches the whole team. An edit of a skill, rule or agent you received from a
|
|
101
|
+
namespace goes back to that namespace, even when it replaces a shared item of
|
|
102
|
+
the same name; the shared one is left as it is. Use `--branch <name>` when a new push must target a
|
|
101
103
|
specific branch; an existing open PR keeps its recorded branch. TeamAI refuses
|
|
102
104
|
to reset a team-repo clone with user changes, so commit or stash unrelated
|
|
103
105
|
modified, staged, untracked, or conflicted files before retrying.
|
|
104
106
|
|
|
107
|
+
In single-repo mode, a skill or rule under `.teamai/` that matches an older
|
|
108
|
+
version of the team's file, as it does when the branch is behind the default
|
|
109
|
+
branch, is skipped with a warning that it "is an older version of" that file:
|
|
110
|
+
pushing it would revert a teammate's update. To publish an edit of it, bring
|
|
111
|
+
the current version in first (`git fetch origin && git merge origin/<default>`,
|
|
112
|
+
or copy the team's current file over it), redo the edit on top, and push again.
|
|
113
|
+
|
|
105
114
|
## After contributing
|
|
106
115
|
|
|
107
116
|
- Confirm it landed: `teamai list skills` (or `teamai status`).
|
|
@@ -48,6 +48,21 @@ This is the #1 onboarding issue. In order:
|
|
|
48
48
|
belongs in the team repo's `manifest/roles.yaml` or `manifest/projects.yaml`,
|
|
49
49
|
which the error names by entry — tell the user to ask a team admin. Do not
|
|
50
50
|
delete the manifest or edit the local clone to get past it.
|
|
51
|
+
`recall` still searches learnings and warns once (`Recall indexed learnings
|
|
52
|
+
only…` or `Recall indexed the shared learnings only…`): what it names is
|
|
53
|
+
missing from results until the manifest is fixed and `teamai pull` rebuilds
|
|
54
|
+
the index, so do not report that the team has none of it. If recall also says
|
|
55
|
+
`Recall skips the older index at <path>…`, the smaller index could not be
|
|
56
|
+
written and that scope was not searched at all: resolve the error it names
|
|
57
|
+
(for example a read-only file or a full disk), then fix the manifest and pull.
|
|
58
|
+
7. **`pull` says `Nothing was synced: <file>: <reason>`.** The project's teamai
|
|
59
|
+
config exists but cannot be read, so no scope syncs there, not even the user
|
|
60
|
+
scope, and the session-start hook syncs nothing either. Show the user the
|
|
61
|
+
file and the reason; `teamai doctor` checks another config and can pass
|
|
62
|
+
here. Moving it aside and re-running `teamai init` replaces their settings
|
|
63
|
+
for that project: do it only with their consent.
|
|
64
|
+
`recall` refuses the same way with `Nothing was searched: <file>: <reason>`:
|
|
65
|
+
no team knowledge was searched, so do not report that the team has none.
|
|
51
66
|
|
|
52
67
|
## Permission / access denied
|
|
53
68
|
|
|
@@ -74,9 +89,11 @@ teamai init https://git.example.com/yourgroup/yourrepo
|
|
|
74
89
|
|
|
75
90
|
## Which tools actually get hooks
|
|
76
91
|
|
|
77
|
-
`teamai hooks inject`
|
|
78
|
-
|
|
79
|
-
|
|
92
|
+
`teamai hooks inject` prints **"Hooks injected into all AI tool settings"** even
|
|
93
|
+
for tools where it wrote nothing. **Do not take that line as proof.** (When the
|
|
94
|
+
team hooks cannot be resolved it exits 1 with the reason instead: the built-in
|
|
95
|
+
hooks are installed, the team hooks are left as they were.) Verify per-tool
|
|
96
|
+
instead:
|
|
80
97
|
|
|
81
98
|
```bash
|
|
82
99
|
teamai doctor # flags tools whose hooks are missing
|
|
@@ -92,15 +92,39 @@ above, each of which opens a PR (`--dry-run` previews). After `projects remove`,
|
|
|
92
92
|
keep the project's content in the team repo until members have pulled: that is
|
|
93
93
|
what lets their next pull clean up the copies they deployed.
|
|
94
94
|
|
|
95
|
-
Every namespace that names a directory — `knowledge`, `skills
|
|
96
|
-
either manifest, and `learnings` in `projects.yaml` (a role's `learnings:` is
|
|
95
|
+
Every namespace that names a directory — `knowledge`, `skills`, `agents`, `env`,
|
|
96
|
+
`hooks`, `mcp`, `models` and `docs` in either manifest, and `learnings` in `projects.yaml` (a role's `learnings:` is
|
|
97
97
|
ignored and unchecked) — must be a single path segment: no `/`, `\`, `:` or control character, no trailing
|
|
98
|
-
`.` or space, and not a Windows device name (`CON`, `NUL`, `COM1`, …).
|
|
98
|
+
`.` or space, and not a Windows device name (`CON`, `NUL`, `COM1`, …). `team-codebase`
|
|
99
|
+
cannot be a `docs` namespace (`docs/team-codebase/` is the legacy codebase output). Two
|
|
99
100
|
namespaces of one resource type may not differ only by case, across both
|
|
100
101
|
manifests. A manifest that breaks this, does not parse, or is empty stops
|
|
101
102
|
members' pull for that scope until it is fixed; the error names the entry. Fix
|
|
102
103
|
it rather than deleting it — with no `roles.yaml`, delivery is unfiltered.
|
|
103
104
|
|
|
105
|
+
An item in an active namespace replaces the root item of the same name, whole:
|
|
106
|
+
a skill by directory name (including a root skill a member gets through a tag),
|
|
107
|
+
an agent by file stem, a rule by first-level file name (`rules/<ns>/<name>.md`
|
|
108
|
+
replaces `rules/<name>.md`), and a `claudemd/<ns>/<name>.md` file replaces
|
|
109
|
+
`claudemd/<name>.md`. Use this to give a project its own version of a shared
|
|
110
|
+
item under the same name, and keep that shared item at the root rather than in
|
|
111
|
+
a namespace every role activates: `rules/code-style.md` is replaced by
|
|
112
|
+
`rules/checkout/code-style.md` for checkout members, while a
|
|
113
|
+
`rules/common/code-style.md` would reach them alongside it. The same skill or
|
|
114
|
+
agent name in two namespaces one member has active is an error naming both
|
|
115
|
+
files; two namespace rules or claudemd files of one name are both delivered.
|
|
116
|
+
A replacement must be usable to replace anything: a skill directory needs its
|
|
117
|
+
`SKILL.md` (pull names one without it), and while an agent file does not parse
|
|
118
|
+
the root agent stays installed. `teamai doctor` lists each replacement as a note. Teams without roles or
|
|
119
|
+
projects are unaffected.
|
|
120
|
+
|
|
121
|
+
Docs have no override. A top-level `docs/<ns>/` that any role or project lists
|
|
122
|
+
under `resources.docs` reaches only members with that namespace active; a
|
|
123
|
+
`docs/<dir>/` nobody lists stays shared with everyone. When a member leaves the
|
|
124
|
+
namespace, their next pull removes its docs that still match the team copy and
|
|
125
|
+
keeps (and names) the ones they edited. Recall and `teamai doctor` follow the
|
|
126
|
+
same filter.
|
|
127
|
+
|
|
104
128
|
## Team dashboard (web UI)
|
|
105
129
|
|
|
106
130
|
```bash
|
|
@@ -122,15 +146,45 @@ teamai packages install code-review@claude-plugins-official # Claude plugin
|
|
|
122
146
|
teamai push # share the updated teamai.yaml
|
|
123
147
|
```
|
|
124
148
|
|
|
125
|
-
## Shared environment variables
|
|
149
|
+
## Shared environment variables, hooks and MCP servers
|
|
126
150
|
|
|
127
151
|
```bash
|
|
128
|
-
teamai env list #
|
|
152
|
+
teamai env list # what reaches this directory, each with its namespace (values masked)
|
|
129
153
|
teamai env list --reveal # show values in plaintext
|
|
130
|
-
teamai env add <KEY> <VALUE> # add or update
|
|
131
|
-
teamai env
|
|
154
|
+
teamai env add <KEY> <VALUE> # add or update in env/env.yaml
|
|
155
|
+
teamai env add <KEY> <VALUE> --project <id> # or --role <ns>: in that namespace's env/<ns>/env.yaml (warns if nothing declares <ns>)
|
|
156
|
+
teamai env remove <KEY> # remove (same --role / --project)
|
|
157
|
+
teamai remove mcp <name> # root mcp/mcp.yaml if it has the name, else the one namespace file; --role / --project pick a namespace
|
|
132
158
|
```
|
|
133
159
|
|
|
160
|
+
Env variables, team hooks and MCP servers are scoped like skills: the root file
|
|
161
|
+
(`env/env.yaml`, `hooks/hooks.yaml`, `mcp/mcp.yaml`) reaches everyone, and
|
|
162
|
+
`env/<ns>/env.yaml`, `hooks/<ns>/hooks.yaml`, `mcp/<ns>/mcp.yaml` reach only
|
|
163
|
+
members whose role or project lists `<ns>` under `resources.env`, `resources.hooks`
|
|
164
|
+
or `resources.mcp`. A namespace entry replaces the root entry of the same key, hook
|
|
165
|
+
id or server name. Hooks and MCP servers have no add command, and `teamai push`
|
|
166
|
+
does not pick up `hooks/` or `mcp/`: edit the file in the team repo, then commit
|
|
167
|
+
and push it with git. `teamai doctor` lists each override.
|
|
168
|
+
|
|
169
|
+
- A name twice in one file, in two active namespaces, or an active file that does
|
|
170
|
+
not parse: that type is not applied for affected members and their installed
|
|
171
|
+
state is kept. Fix the file the warning names. A hooks or MCP file with none of
|
|
172
|
+
its top-level keys (`server:` for `servers:`) counts as one that does not parse.
|
|
173
|
+
- Per-entry `projects:` (and `roles:` on env) no longer works: such an entry reaches
|
|
174
|
+
nobody. `roles:` on hooks and MCP still filters for one more minor release. Pull
|
|
175
|
+
and `teamai doctor` name the namespace file each entry belongs in; move it there.
|
|
176
|
+
- An env, hook or MCP entry with a key its schema does not know (a mistyped `role:`)
|
|
177
|
+
also reaches nobody. Pull and `teamai doctor` name the file, entry and key; correct
|
|
178
|
+
the key or remove it. A key a later teamai version adds is unknown to an older one,
|
|
179
|
+
so upgrade every member before the team uses a new entry key.
|
|
180
|
+
- Team model profiles work the same way: `models/<ns>/models.yaml`, declared under
|
|
181
|
+
`resources.models`, replaces the root profile with the same `id` for members who
|
|
182
|
+
have `<ns>` active. A member's API key is bound to the profile's gateway origin:
|
|
183
|
+
when an override points at another host, their pull leaves the agent alone and
|
|
184
|
+
asks them to run `teamai models switch team:<id>` to set the key for it.
|
|
185
|
+
- Have every member upgrade before declaring `env`, `hooks`, `mcp`, `models` or `docs` in a
|
|
186
|
+
manifest: teamai 0.25.0 and the 0.26.0 betas reject those keys and their pull stops.
|
|
187
|
+
|
|
134
188
|
## When sync fails
|
|
135
189
|
|
|
136
190
|
Run `teamai doctor` first. If it reports hook or path problems, load
|