teamai-cli 0.27.0-beta.1 → 0.27.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/CHANGELOG.md +3 -1
- package/dist/index.js +9184 -8663
- package/package.json +1 -1
- package/skill-data/core/SKILL.md +5 -3
- package/skill-data/core/references/commands.md +3 -2
- package/skill-data/core/references/troubleshooting.md +18 -3
- package/skill-data/setup/references/manage-admin.md +21 -5
- package/skill-data/setup/references/uninstall.md +3 -3
package/package.json
CHANGED
package/skill-data/core/SKILL.md
CHANGED
|
@@ -128,18 +128,20 @@ the copy and run `teamai pull --force`. The first pull after upgrading, and a
|
|
|
128
128
|
new worktree's first pull, still overwrite: nothing is recorded yet.
|
|
129
129
|
|
|
130
130
|
In project scope, `init` and `pull` also install a git hook in the repository's
|
|
131
|
-
local git config (`hook.teamai-post-checkout`, `hook.teamai-post-merge`; Git
|
|
131
|
+
local git config (`hook.teamai-post-checkout`, `hook.teamai-post-merge`, `hook.teamai-post-rewrite`; Git
|
|
132
132
|
2.54+; older Git without `core.hooksPath` gets a marked block in `.git/hooks/`
|
|
133
133
|
scripts, and with it `teamai doctor` advises), beside any `core.hooksPath` manager or `.git/hooks` script. When a
|
|
134
134
|
worktree is created by `git worktree add` or an app that runs checkout hooks, it creates the project roots
|
|
135
135
|
of `enabledAgents` (else the ones the main checkout has) and pulls into it before
|
|
136
136
|
the command returns, from the team clone as last fetched when that was within
|
|
137
137
|
24 h; a full pull then runs in the background. A branch switch does nothing.
|
|
138
|
-
After `git pull` it fetches the team repo (5 s cap, then the background pull) and
|
|
138
|
+
After `git pull` (merge or a completed rebase) it fetches the team repo (5 s cap, then the background pull) and
|
|
139
139
|
delivers; in single-repo mode it delivers what `git pull` brought, offline. It prints nothing and always
|
|
140
140
|
exits 0; a failure inside it is recorded, and `teamai doctor` names it (`Last git
|
|
141
141
|
hook run failed: ...`) with its fix, as does the next interactive `teamai pull`, once.
|
|
142
|
-
`teamai doctor` also reports whether the
|
|
142
|
+
`teamai doctor` also reports whether the hooks are installed and enabled, with a
|
|
143
|
+
reactivation command when Git disables a hook or event. Pull preserves explicit
|
|
144
|
+
disablement. A conflicting rebase syncs only on completion; commit amend does not sync.
|
|
143
145
|
`pull --dry-run` says when it would install or update the hook, writing nothing;
|
|
144
146
|
`teamai uninstall` removes only teamai's hook entries and blocks. For hosts that
|
|
145
147
|
skip checkout hooks, prepare the worktree before launch; see the new-worktree
|
|
@@ -125,7 +125,7 @@ Generated: do not edit by hand. Regenerate with
|
|
|
125
125
|
- `teamai projects list` — List defined projects and the ones active in this directory
|
|
126
126
|
- `teamai projects set [ids...]` — Set the projects active in this directory (comma-separated or repeated; empty to clear)
|
|
127
127
|
- `teamai projects add <id>` — Add a project to manifest/projects.yaml, creating the file if needed (admin)
|
|
128
|
-
- `--namespaces <ns>` — Comma-separated namespaces for knowledge, skills, learnings and agents (e.g. common,checkout); env, hooks, mcp, models and
|
|
128
|
+
- `--namespaces <ns>` — Comma-separated namespaces for knowledge, skills, learnings and agents (e.g. common,checkout); env, hooks, mcp, models, docs and wiki are declared by hand
|
|
129
129
|
- `--name <name>` — Display name for the project
|
|
130
130
|
- `-d, --description <desc>` — Description for the project
|
|
131
131
|
- `teamai projects update <id>` — Update a project in manifest/projects.yaml (admin)
|
|
@@ -295,9 +295,10 @@ Generated: do not edit by hand. Regenerate with
|
|
|
295
295
|
|
|
296
296
|
## contribute
|
|
297
297
|
|
|
298
|
-
- `teamai contribute` — Contribute session knowledge to team repo
|
|
298
|
+
- `teamai contribute` — Contribute session knowledge to team repo; projects list shows the default destination and allowed namespaces
|
|
299
299
|
- `--file <path>` — Path to the contribution document
|
|
300
300
|
- `--title <title>` — Title for the contribution document
|
|
301
|
+
- `--namespace <ns>` — Write to an active learnings namespace (default: the only active namespace, or the shared root when none or several are active)
|
|
301
302
|
- `--session-id <id>` — Session ID for dedup tracking
|
|
302
303
|
- `--scope <scope>` — Target scope: user or project
|
|
303
304
|
|
|
@@ -85,9 +85,12 @@ This is the #1 onboarding issue. In order:
|
|
|
85
85
|
## "Last git hook run failed: ..." / a new worktree lacks team resources
|
|
86
86
|
|
|
87
87
|
In project scope, teamai's git hook syncs on `git worktree add` and `git pull`
|
|
88
|
+
through merge or a completed rebase (`post-rewrite`, including `pull.rebase=true`; on Git 2.32
|
|
89
|
+
and older, a fast-forward rebase with autostash syncs on `post-checkout`).
|
|
90
|
+
A conflicting rebase syncs only on completion; `git commit --amend` does not sync. It runs
|
|
88
91
|
silently and always exits 0, so its failures surface only here: `teamai doctor`
|
|
89
92
|
names the last one with its fix, and the next interactive `teamai pull` says it
|
|
90
|
-
once. The causes are a team repo fetch that failed or hit the 5 s
|
|
93
|
+
once. The causes are a team repo fetch that failed or hit the 5 s git-pull hook
|
|
91
94
|
cap without the background pull finishing it, and another teamai process
|
|
92
95
|
holding the project's sync lock longer than the hook waits, or incomplete resource,
|
|
93
96
|
hook or MCP delivery. Only a complete startup sync clears the recorded failure.
|
|
@@ -96,10 +99,14 @@ in the checkout (after a stuck pull ends, or once the team repo is reachable);
|
|
|
96
99
|
`~/.teamai/debug.log` has the details. If doctor reports `Git hook syncs new
|
|
97
100
|
worktrees and git pull` as failing, follow its fix: `teamai pull` installs it.
|
|
98
101
|
Git older than 2.54 has no config hooks: teamai then adds a marked block to
|
|
99
|
-
`.git/hooks/post-checkout` and `post-
|
|
102
|
+
`.git/hooks/post-checkout`, `post-merge` and `post-rewrite`, unless `core.hooksPath` is set (or a
|
|
100
103
|
hook there is a symlink or not an executable shell script), in which case doctor's fix says to upgrade Git
|
|
101
104
|
or, if the team agrees, to commit its guarded `command -v teamai ... || true`
|
|
102
|
-
line into the manager's post-checkout and post-
|
|
105
|
+
line into the manager's post-checkout, post-merge and post-rewrite hooks.
|
|
106
|
+
Doctor also detects hooks disabled by name (Git 2.54+) or event (Git 2.55+)
|
|
107
|
+
in effective global, local or worktree config. Follow its command (`git config --local <key> true`,
|
|
108
|
+
or `git config --worktree --unset <key>` for a worktree setting) to enable the named hook or event, then run `teamai pull` to sync. Pull preserves
|
|
109
|
+
explicit disable settings, so reinstalling alone does not enable a disabled hook.
|
|
103
110
|
Existing hook contents and permissions stay unchanged; read/write errors propagate
|
|
104
111
|
from `init` and `hooks inject`, and Git-started pulls record them. An unreadable
|
|
105
112
|
project config prevents sync and keeps its reason in `~/.teamai/debug.log`.
|
|
@@ -277,6 +284,14 @@ session's runs, recalled docs and adopted docs. Per agent:
|
|
|
277
284
|
A read after the session's last Stop is credited at SubagentStop, at Copilot CLI's
|
|
278
285
|
SessionEnd, or at the next `teamai pull`.
|
|
279
286
|
|
|
287
|
+
## OpenCode V2 rejects the hooks plugin
|
|
288
|
+
|
|
289
|
+
If OpenCode reports “Plugin must export a default definition”, upgrade TeamAI,
|
|
290
|
+
run `teamai hooks inject` or `teamai pull`, and restart OpenCode. The generated
|
|
291
|
+
built-in and enterprise plugins support both OpenCode 1.18.23 (`server`) and V2
|
|
292
|
+
(`setup`). V1 shell recall uses `TEAMAI_AGENT_SESSION_ID`; V2 supplies its native
|
|
293
|
+
`OPENCODE_SESSION_ID`.
|
|
294
|
+
|
|
280
295
|
## Still stuck
|
|
281
296
|
|
|
282
297
|
- Re-run the failing command with `-v` / `--verbose` for detail.
|
|
@@ -134,14 +134,24 @@ teamai projects remove <id> # remove a project
|
|
|
134
134
|
|
|
135
135
|
A member gets the union of their role resources and their active project's
|
|
136
136
|
resources. Admins declare projects in `manifest/projects.yaml` with the commands
|
|
137
|
-
above, each of which opens a PR.
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
above, each of which opens a PR. `roles init/add/update/remove` and
|
|
138
|
+
`projects add/update/remove` support `--dry-run` without pulling the team repo.
|
|
139
|
+
Clone previews use the contents after a real pull on the checked-out branch: an
|
|
140
|
+
ahead branch stays ahead, a behind branch advances, and a diverged branch uses
|
|
141
|
+
origin/current-branch. `roles init` preview checks that manifest before asking
|
|
142
|
+
for overwrite confirmation. After `projects remove`,
|
|
140
143
|
keep the project's content in the team repo until members have pulled: that is
|
|
141
144
|
what lets their next pull clean up the copies they deployed.
|
|
142
145
|
|
|
146
|
+
`roles init/add/update/remove` and `projects add/update/remove` previews, and resource removal
|
|
147
|
+
previews, refuse a team clone with uncommitted changes. Commit or stash them before retrying. Single-repo
|
|
148
|
+
previews still work with dirty business files because they read origin. Clone
|
|
149
|
+
previews refresh the configured upstream first, even when its branch or remote
|
|
150
|
+
name differs. A failed fast-forward or missing upstream uses origin/current-branch
|
|
151
|
+
for the real reset fallback. Removal refuses when that refresh also fails.
|
|
152
|
+
|
|
143
153
|
Every namespace that names a directory — `knowledge`, `skills`, `agents`, `env`,
|
|
144
|
-
`hooks`, `mcp`, `models` and `
|
|
154
|
+
`hooks`, `mcp`, `models`, `docs` and `wiki` in either manifest, and `learnings` in `projects.yaml` (a role's `learnings:` is
|
|
145
155
|
ignored and unchecked) — must be a single path segment: no `/`, `\`, `:` or control character, no trailing
|
|
146
156
|
`.` or space, and not a Windows device name (`CON`, `NUL`, `COM1`, …). `team-codebase`
|
|
147
157
|
cannot be a `docs` namespace (`docs/team-codebase/` is the legacy codebase output). Two
|
|
@@ -173,6 +183,12 @@ namespace, their next pull removes its docs that still match the team copy and
|
|
|
173
183
|
keeps (and names) the ones they edited. Recall and `teamai doctor` follow the
|
|
174
184
|
same filter.
|
|
175
185
|
|
|
186
|
+
Wiki codebase slugs follow the same rule under `resources.wiki`: once any role
|
|
187
|
+
or project lists a `teamwiki/evidence/code/<slug>/` slug there, `recall` only
|
|
188
|
+
surfaces it for members with that namespace active; an undeclared slug stays
|
|
189
|
+
shared. The slug is whatever `teamai codebase --project <slug>` wrote, not
|
|
190
|
+
necessarily the project's manifest id.
|
|
191
|
+
|
|
176
192
|
## Team dashboard (web UI)
|
|
177
193
|
|
|
178
194
|
```bash
|
|
@@ -253,7 +269,7 @@ and push it with git. `teamai doctor` lists each override.
|
|
|
253
269
|
and also set in `env.yaml` is a secret: its `env.yaml` value is not delivered. A
|
|
254
270
|
secrets file that does not parse keeps `env.sh` and MCP servers as they were, and
|
|
255
271
|
`teamai doctor` fails a check naming the file.
|
|
256
|
-
- Have every member upgrade before declaring `env`, `hooks`, `mcp`, `models` or `
|
|
272
|
+
- Have every member upgrade before declaring `env`, `hooks`, `mcp`, `models`, `docs` or `wiki` in a
|
|
257
273
|
manifest: teamai 0.25.0 and the 0.26.0 betas reject those keys and their pull stops.
|
|
258
274
|
|
|
259
275
|
## When sync fails
|
|
@@ -102,9 +102,9 @@ and give it your team repo URL."*
|
|
|
102
102
|
- If the user only wants to stop auto-sync for one tool but keep TeamAI otherwise,
|
|
103
103
|
that is the `--agent <tool>` form, not a full uninstall.
|
|
104
104
|
- In a project, uninstall also removes teamai's git hook: the
|
|
105
|
-
`hook.teamai-post-checkout`
|
|
106
|
-
config and the `# >>> teamai git hook` block in `.git/hooks/post-checkout
|
|
107
|
-
`post-merge`. Other hooks stay; a script left with only its shebang is deleted.
|
|
105
|
+
`hook.teamai-post-checkout`, `hook.teamai-post-merge` and `hook.teamai-post-rewrite` entries in the repo's git
|
|
106
|
+
config and the `# >>> teamai git hook` block in `.git/hooks/post-checkout`,
|
|
107
|
+
`post-merge` and `post-rewrite`. Other hooks stay; a script left with only its shebang is deleted.
|
|
108
108
|
- In a project, uninstall also takes teamai's lines out of `.git/info/exclude`
|
|
109
109
|
(the `# [teamai:mcp-exclude:start]` block) for MCP configs it proves hold no
|
|
110
110
|
resolved `${VAR}` value. A line names the path a write lands in: for a config
|