teamai-cli 0.26.0-beta.0 → 0.26.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teamai-cli",
3
- "version": "0.26.0-beta.0",
3
+ "version": "0.26.0-beta.2",
4
4
  "description": "TeamAI — Make Every Team AI Native (skill sync + shared knowledge base, powered by Git)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,7 +15,11 @@ do not skip, reorder, or invent commands.
15
15
 
16
16
  Look at what the user typed after `/teamai`.
17
17
 
18
- **If they gave NO scenario** (bare `/teamai`, or only greetings/no task):
18
+ **If they gave NO scenario right after a TeamAI friction reminder** (the
19
+ `[teamai]` line that suggests `/teamai share what this session taught me`),
20
+ that reminder is the scenario: load `teamai skill get share` and follow it.
21
+
22
+ **If they gave NO scenario otherwise** (bare `/teamai`, or only greetings/no task):
19
23
  print the menu below **exactly**, then **STOP and wait**. Take no other action —
20
24
  do not run any command, do not load another skill yet.
21
25
 
@@ -62,7 +66,8 @@ Sharing a session's learnings needs no menu choice: TeamAI prompts on its own at
62
66
  the end of a session that produced something worth sharing, and that prompt means
63
67
  `teamai skill get share`. (Only when recall is on; it is off by default. The team turns it on with
64
68
  `sharing.recall.enabled: true` in `teamai.yaml`, a member with `teamai recall enable`;
65
- while it is off, `teamai skill get share` says so.)
69
+ while it is off, or while the teamai config cannot be loaded, `teamai skill get share`
70
+ says so and why.)
66
71
 
67
72
  ## Global rules
68
73
 
@@ -207,6 +207,34 @@ Generated: do not edit by hand. Regenerate with
207
207
  - `teamai webhook test` — Send test event to webhook endpoints
208
208
  - `--url <url>` — Test specific endpoint URL
209
209
 
210
+ ## models
211
+
212
+ - `teamai models` — Share gateway model profiles and switch agents to them
213
+ - `teamai models list` — List team and personal model profiles and the agents using them
214
+ - `teamai models show <profile>` — Show a model profile without revealing its API key
215
+ - `teamai models add <id>` — Add a personal model profile stored only on this machine
216
+ - `--name <name>` — Display name
217
+ - `--protocol <protocols>` — Comma-separated: anthropic, openai-chat-completions, openai-responses
218
+ - `--base-url <url>` — Gateway root URL (without /v1)
219
+ - `--model <ids>` — Comma-separated model IDs; the first is the default
220
+ - `--from-env <name>` — Read the API key from this environment variable
221
+ - `--api-key-stdin` — Read the API key from stdin without placing it in shell history
222
+ - `teamai models configure <profile>` — Set the API key of a profile, or edit a personal profile
223
+ - `--from-env <name>` — Read the API key from this environment variable
224
+ - `--api-key-stdin` — Read the API key from stdin without placing it in shell history
225
+ - `--name <name>` — Personal profiles: new display name
226
+ - `--base-url <url>` — Personal profiles: new gateway root URL
227
+ - `--protocol <protocols>` — Personal profiles: serve models over these protocols too
228
+ - `--model <ids>` — Personal profiles: add model IDs
229
+ - `teamai models switch <profile>` — Point agents at a model profile (every compatible agent by default)
230
+ - `--agent <name>` — Only switch this agent. Repeatable or comma-separated.
231
+ - `--model <id>` — Default model to select (defaults to the first in the profile)
232
+ - `--dry-run` — Show what would change without writing
233
+ - `teamai models restore` — Restore agent model settings captured before the first TeamAI switch
234
+ - `--agent <name>` — Only restore this agent. Repeatable or comma-separated.
235
+ - `--dry-run` — Show what would change without writing
236
+ - `teamai models remove <profile>` — Remove a personal model profile without changing agent settings
237
+
210
238
  ## stats
211
239
 
212
240
  - `teamai stats` — Show local skill usage statistics
@@ -8,7 +8,7 @@ team"*, in whatever language they work in — then you run the publish for them.
8
8
  ## Which kind of contribution?
9
9
 
10
10
  - **A learning** (a lesson, a gotcha, how you solved something) → this is
11
- **automatic** once recall is on (off by default): TeamAI prompts at the end of a session worth sharing and the
11
+ **automatic** once recall is on (off by default) and the teamai config loads: TeamAI prompts at the end of a session worth sharing and the
12
12
  dedicated `share` workflow (`teamai skill get share`) takes over (it summarizes the
13
13
  session and runs `teamai contribute`). The user does not come through this flow
14
14
  for it. (Step A below is only a manual fallback for while recall is off.)
@@ -34,6 +34,20 @@ This is the #1 onboarding issue. In order:
34
34
  with `--scope user`.
35
35
  5. **Tool has no hook surface** (e.g. Gemini CLI, JoyCode): there is no auto-sync;
36
36
  run `teamai pull` manually each time.
37
+ 6. **Claude Code reads a different directory** (`CLAUDE_CONFIG_DIR` is set).
38
+ `teamai doctor` reports `Claude Code root matches CLAUDE_CONFIG_DIR` when the
39
+ directory the variable names is not the one this config syncs to. Re-run
40
+ `teamai init` from a shell that has the variable exported; it records the root
41
+ and moves the install. If the check says the value cannot be synced to (outside
42
+ your home, or nested deeper than `~/.config/<name>`), fix the variable first.
43
+ 6. **A command reports a broken manifest** (`Invalid roles manifest…`,
44
+ `Invalid projects manifest…`, `Invalid manifests…`, or `…manifest … could not
45
+ be read`). `pull` skips that scope on purpose, since syncing without the
46
+ manifest would deliver every namespace it gates; `push` stops before pushing
47
+ anything, even with `--role`; `status` lists the other resource types. The fix
48
+ belongs in the team repo's `manifest/roles.yaml` or `manifest/projects.yaml`,
49
+ which the error names by entry — tell the user to ask a team admin. Do not
50
+ delete the manifest or edit the local clone to get past it.
37
51
 
38
52
  ## Permission / access denied
39
53
 
@@ -88,6 +88,14 @@ teamai init --http https://your-team-host/api --token <api-key>
88
88
  This is a read-only consumer mode — `push` / `contribute` are not available, but
89
89
  skills and rules still sync.
90
90
 
91
+ **Claude Code kept in a different directory (`CLAUDE_CONFIG_DIR`):** `init` records
92
+ that directory (as `toolRoots.claude` in the local config) and syncs every Claude
93
+ path there, so run `init` from a shell that has the variable exported. Re-running
94
+ `init` after changing it moves the install (the old root's hooks, managed MCP
95
+ servers and delivered model credentials are removed; its skills and rules are left
96
+ and named in the output). To end the relocation, run `init` once with the variable
97
+ set but blank: `CLAUDE_CONFIG_DIR= teamai init …`.
98
+
91
99
  ## Step 5 — Verify with doctor
92
100
 
93
101
  ```bash
@@ -143,7 +151,8 @@ Summarize the outcome **in the user's own language** (global rule 1). Cover:
143
151
  summarize and contribute it. They do **not** invoke `/teamai` for this. (This
144
152
  prompt only appears when recall is on — it is off by default; the admin turns it
145
153
  on in `teamai.yaml` (`sharing.recall.enabled`), a member with `teamai recall enable` — and the admin has not switched the
146
- reminder off in `teamai.yaml`.)
154
+ reminder off in `teamai.yaml`. It also stays silent while their teamai config
155
+ cannot be loaded; `teamai skill get share` then names the file and the error.)
147
156
  3. **They can also contribute a skill — just ask in plain language.** A member does
148
157
  not need to be an admin to publish a skill. They tell TeamAI something like
149
158
  *"share this xxx skill with my team"*, in their own language, and you
@@ -81,6 +81,15 @@ teamai projects members <id> # who is registered on a project
81
81
  A member gets the union of their role resources and their active project's
82
82
  resources. Admins declare projects in `manifest/projects.yaml`, then `teamai push`.
83
83
 
84
+ Every namespace that names a directory — `knowledge`, `skills` and `agents` in
85
+ either manifest, and `learnings` in `projects.yaml` (a role's `learnings:` is
86
+ ignored and unchecked) — must be a single path segment: no `/`, `\`, `:` or control character, no trailing
87
+ `.` or space, and not a Windows device name (`CON`, `NUL`, `COM1`, …). Two
88
+ namespaces of one resource type may not differ only by case, across both
89
+ manifests. A manifest that breaks this, does not parse, or is empty stops
90
+ members' pull for that scope until it is fixed; the error names the entry. Fix
91
+ it rather than deleting it — with no `roles.yaml`, delivery is unfiltered.
92
+
84
93
  ## Team dashboard (web UI)
85
94
 
86
95
  ```bash
@@ -124,13 +133,16 @@ the team (`sharing.recall.enabled: true` in `teamai.yaml`, then `teamai push`; i
124
133
  off by default, and `teamai recall enable` turns it on for one machine only): at the end of a session
125
134
  worth sharing, TeamAI prompts the member and the dedicated
126
135
  `share` workflow (`teamai skill get share`) summarizes the session and runs
127
- `teamai contribute`. Nobody has to invoke it by hand.
136
+ `teamai contribute`. Nobody has to invoke it by hand. (A member whose teamai config
137
+ cannot be loaded gets no prompt; `teamai skill get share` names the file and the error.)
128
138
  (Publishing a **reusable skill** someone authored is a different task — any member
129
139
  can do it, see `"$(teamai skill path core)/references/contribute-member.md"`.)
130
140
 
131
141
  ### Turn the sharing prompt on or off (admin)
132
142
 
133
- The auto-share prompt is **on by default once recall is on**. To disable it team-wide, set this in
143
+ The auto-share prompt is **on by default once recall is on**, and only shows in directories set up
144
+ with teamai (never on a read-only HTTP source, or while a member's teamai config cannot be loaded).
145
+ To disable it team-wide, set this in
134
146
  `teamai.yaml` and `teamai push`:
135
147
 
136
148
  ```yaml
@@ -187,9 +187,11 @@ If the repo does not exist yet, `init` offers to create it — accept the prompt
187
187
  - If `init` detects an unknown GitLab host, it stops and asks you to set
188
188
  `GITLAB_URL` + `GITLAB_TOKEN`, then retry.
189
189
 
190
- If the repo has roles enabled, `init` may ask for a primary role — pick one with
191
- the user, or pass `--role <id>` for a non-interactive run. Without a terminal
192
- (or with `CI` / `TEAMAI_NONINTERACTIVE` set) `init` never waits: a provider that
190
+ If the repo has roles enabled, `init` asks for one or more comma-separated role
191
+ numbers when running interactively. The first number is the primary role and the
192
+ remaining numbers become additional roles; pass `--role <id>` for a
193
+ non-interactive run when only a primary role is needed. Without a terminal (or
194
+ with `CI` / `TEAMAI_NONINTERACTIVE` set) `init` never waits: a provider that
193
195
  would need a browser login fails at once and names the credential to prepare —
194
196
  a token for GitHub / CNB / GitLab / GitCode, and for TGit a prior `gf auth
195
197
  login` run in an interactive shell (see Step 3).
@@ -275,7 +277,8 @@ day-to-day work — they can keep letting the AI run things for them:
275
277
  its own at the end of a session worth sharing, and the `share` workflow
276
278
  (`teamai skill get share`) takes over. (Only once recall is on — off by default;
277
279
  turn it on team-wide with `sharing.recall.enabled: true` in `teamai.yaml`, then
278
- `teamai push`.)
280
+ `teamai push`. Never on a read-only HTTP source, or while a member's teamai
281
+ config cannot be loaded.)
279
282
 
280
283
  Mention the underlying commands (`teamai push`, `teamai roles`, …) only as a note
281
284
  for users who *do* want them — the primary path is re-invoking `/teamai`.