teamai-cli 0.25.0-beta.6 → 0.25.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.
- package/README.ja.md +26 -227
- package/README.ko.md +26 -227
- package/README.md +26 -227
- package/README.th.md +26 -227
- package/README.zh-CN.md +26 -227
- package/dist/index.js +519 -424
- package/package.json +1 -1
- package/skills/teamai/SKILL.md +6 -12
- package/skills/teamai/references/join-member.md +8 -10
- package/skills/teamai/references/provider-tgit.md +75 -0
- package/skills/teamai/references/setup-admin.md +23 -73
package/package.json
CHANGED
package/skills/teamai/SKILL.md
CHANGED
|
@@ -45,12 +45,6 @@ Usage examples (copy one to get started):
|
|
|
45
45
|
/teamai Uninstall TeamAI
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
> **Sharing a session's learnings is automatic — not a menu choice.** TeamAI
|
|
49
|
-
> prompts on its own at the end of a session that produced something worth sharing,
|
|
50
|
-
> and the **`teamai-share-learnings`** skill takes over. The user does not invoke
|
|
51
|
-
> `/teamai` for it. (Only appears when the admin left team sharing enabled — on by
|
|
52
|
-
> default.)
|
|
53
|
-
|
|
54
48
|
**If they DID describe a scenario**, match it to one row of the table below,
|
|
55
49
|
then open that reference file and follow it step by step.
|
|
56
50
|
|
|
@@ -63,13 +57,13 @@ then open that reference file and follow it step by step.
|
|
|
63
57
|
| Open the team dashboard (web UI) | run `teamai dashboard` (see cheat sheet) |
|
|
64
58
|
| Remove / uninstall TeamAI from this machine | `references/uninstall.md` |
|
|
65
59
|
|
|
66
|
-
> **Sharing session learnings is automatic
|
|
60
|
+
> **Sharing session *learnings* is automatic — not a menu choice, and not routed
|
|
67
61
|
> here.** TeamAI prompts on its own at the end of a session worth sharing, and the
|
|
68
|
-
> **`teamai-share-learnings`** skill summarizes
|
|
69
|
-
> `teamai contribute`. The user
|
|
70
|
-
>
|
|
71
|
-
> a member **publishing a reusable skill** on request ("share
|
|
72
|
-
> my team").
|
|
62
|
+
> separate **`teamai-share-learnings`** skill summarizes it and runs
|
|
63
|
+
> `teamai contribute`. The user never asks for it through `/teamai`. (Only when the
|
|
64
|
+
> admin left team sharing on — the default.) The `contribute-member.md` row above is
|
|
65
|
+
> a *different* task: a member **publishing a reusable skill** on request ("share
|
|
66
|
+
> this xxx skill with my team").
|
|
73
67
|
|
|
74
68
|
Choosing between "set up" and "join": a user **setting up a new team** becomes its
|
|
75
69
|
admin and creates the repo; a user **joining an existing team** needs a repo URL
|
|
@@ -40,10 +40,10 @@ If it fails, Node.js ≥ 20 is missing — have them install Node 20+ first.
|
|
|
40
40
|
Match the login to the URL's host (do NOT create a second repo):
|
|
41
41
|
|
|
42
42
|
- **`git.woa.com/...`** (Tencent TGit / 工蜂) → **you run both the `gf` install and
|
|
43
|
-
the `gf … auth login`** (never tell the user to run them).
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
the `gf … auth login`** (never tell the user to run them). Follow
|
|
44
|
+
`provider-tgit.md` ("Log in"); the user's only action is approving the login URL
|
|
45
|
+
in their browser / iOA. No `GITLAB_URL` needed. (Headless only: pre-set
|
|
46
|
+
`TGIT_TOKEN`.)
|
|
47
47
|
- **`cnb.cool/...`** → install the CNB CLI, then authorize, in this order:
|
|
48
48
|
1. `npm install -g @cnbcool/cnb-cli`
|
|
49
49
|
2. `cnb login` — have the user approve it in the browser (OAuth2 device flow);
|
|
@@ -94,12 +94,10 @@ teamai doctor
|
|
|
94
94
|
teamai hooks list # per-tool: which AI tools actually got the hooks
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
Fix anything `doctor` reports. **
|
|
98
|
-
settings" message alone** — it prints even for tools where nothing was written
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
skipped by design or not yet supported (CLI behaviour, not a broken setup). If it
|
|
102
|
-
flags hook problems, load `troubleshooting.md` ("Which tools actually get hooks").
|
|
97
|
+
Fix anything `doctor` reports. **Don't trust the "Hooks injected into all AI tool
|
|
98
|
+
settings" message alone** — it prints even for tools where nothing was written;
|
|
99
|
+
`teamai doctor` / `teamai hooks list` show the real per-tool status. If it flags
|
|
100
|
+
hook problems, load `troubleshooting.md` ("Which tools actually get hooks").
|
|
103
101
|
|
|
104
102
|
## Step 6 — Confirm the skills actually arrived
|
|
105
103
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Provider: Tencent TGit (工蜂)
|
|
2
|
+
|
|
3
|
+
git.woa.com is **Tencent-internal only**. TeamAI supports it natively as the `tgit`
|
|
4
|
+
provider — it recognizes the host on its own, so you **never** set `GITLAB_URL`.
|
|
5
|
+
Both `setup-admin.md` and `join-member.md` point here for the reachability probe
|
|
6
|
+
and the `gf` login; follow the relevant section for whichever flow you are in.
|
|
7
|
+
|
|
8
|
+
## Probe reachability (setup flow only)
|
|
9
|
+
|
|
10
|
+
When an admin is choosing a platform and hasn't named one, check whether this
|
|
11
|
+
machine can reach TGit. A request to git.woa.com that returns the header
|
|
12
|
+
`x-env: tgit` means TGit (工蜂) is reachable — plain reachability is not enough,
|
|
13
|
+
the header is what confirms it:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
curl -sS -m 3 -D - -o /dev/null https://git.woa.com 2>/dev/null | grep -qi '^x-env:[[:space:]]*tgit' && echo "tgit: OK" || echo "tgit: unreachable"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
If it prints `tgit: OK`, **prefer TGit** and list it first among the choices — it
|
|
20
|
+
is the Tencent-internal default. Choose by account + reachability only, never by
|
|
21
|
+
region. (A member joining an existing `git.woa.com` URL skips the probe — the URL
|
|
22
|
+
already fixes the platform.)
|
|
23
|
+
|
|
24
|
+
## Log in: install `gf`, then `gf auth login` — YOU run both
|
|
25
|
+
|
|
26
|
+
TeamAI drives the TGit CLI (`gf`) on the user's behalf. **Run every command in this
|
|
27
|
+
section yourself — both the install and the login. Never tell the user to run a
|
|
28
|
+
`gf` command.** The user's only action is approving the login in their browser /
|
|
29
|
+
iOA when it opens.
|
|
30
|
+
|
|
31
|
+
### 1. Install `gf` (you run this)
|
|
32
|
+
|
|
33
|
+
Use the **same source, path, and check teamai uses** — do not invent your own URL.
|
|
34
|
+
`${TEAMAI_HOME}` is `~/.teamai` unless overridden:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# pick the tarball for this machine's OS/arch (darwin|linux × x64|arm64)
|
|
38
|
+
os=$(uname -s | tr '[:upper:]' '[:lower:]') # darwin | linux
|
|
39
|
+
arch=$(uname -m); [ "$arch" = "x86_64" ] && arch=x64; [ "$arch" = "aarch64" ] && arch=arm64
|
|
40
|
+
dir="${TEAMAI_HOME:-$HOME/.teamai}/gf"
|
|
41
|
+
|
|
42
|
+
# download + extract from the Tencent-internal mirror (same URL teamai uses)
|
|
43
|
+
mkdir -p "$dir"
|
|
44
|
+
curl -fsSL "http://mirrors.tencent.com/repository/generic/gongfeng-cli/files/channels/stable/gf-${os}-${arch}.tar.gz" | tar xz -C "$dir"
|
|
45
|
+
|
|
46
|
+
# verify exactly as teamai does: the binary exists and is executable
|
|
47
|
+
test -x "$dir/gf/bin/gf" && echo "gf installed OK" || echo "gf install FAILED"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Only macOS and Linux, on x64 or arm64, are supported.
|
|
51
|
+
|
|
52
|
+
### 2. Log in (you run this too — don't hand it to the user)
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
"${TEAMAI_HOME:-$HOME/.teamai}/gf/gf/bin/gf" auth login
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`gf auth login` starts an interactive flow offering three ways to sign in — iOA, a
|
|
59
|
+
browser device code, or pasting a token. Pick the browser/iOA option, relay
|
|
60
|
+
whatever URL / device code it prints to the user, and ask them to approve it in
|
|
61
|
+
their browser — that approval is the *only* thing they do; the command finishes on
|
|
62
|
+
its own once they do. Confirm with
|
|
63
|
+
`"${TEAMAI_HOME:-$HOME/.teamai}/gf/gf/bin/gf" auth whoami` before continuing.
|
|
64
|
+
|
|
65
|
+
(Headless/CI only: skip the interactive login and pre-set `TGIT_TOKEN` — a
|
|
66
|
+
git.woa.com Personal Access Token — instead.)
|
|
67
|
+
|
|
68
|
+
## When you `teamai init` on TGit
|
|
69
|
+
|
|
70
|
+
Because `gf` and login are already done, `init` goes straight to creating/cloning —
|
|
71
|
+
no browser step. When the repo doesn't exist, **accept the create prompt and init
|
|
72
|
+
creates it via the API.** Prefer this over sending the user to the browser first.
|
|
73
|
+
|
|
74
|
+
It only falls back to https://git.woa.com/projects/new if the group/namespace
|
|
75
|
+
doesn't exist or you lack create permission there. No `GITLAB_URL` is ever needed.
|
|
@@ -24,19 +24,11 @@ through these sub-steps **in order**:
|
|
|
24
24
|
|
|
25
25
|
### 2a — Ask which platform they know
|
|
26
26
|
|
|
27
|
-
**Tencent-internal first:** before asking, probe whether
|
|
28
|
-
|
|
29
|
-
`x-env: tgit`
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
curl -sS -m 3 -D - -o /dev/null https://git.woa.com 2>/dev/null | grep -qi '^x-env:[[:space:]]*tgit' && echo "tgit: OK" || echo "tgit: unreachable"
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
If it prints `tgit: OK`, **list Tencent TGit (工蜂) first** and prefer it —
|
|
36
|
-
TeamAI supports it natively as the `tgit` provider (it detects `git.woa.com` on
|
|
37
|
-
its own; you install `gf` and log in in Step 3). Then ask:
|
|
38
|
-
*"Have you heard of / do you have an account on any of these — Tencent TGit
|
|
39
|
-
(工蜂), GitHub, GitLab, or CNB (cnb.cool)?"*
|
|
27
|
+
**Tencent-internal first:** before asking, probe whether TGit (工蜂) is reachable
|
|
28
|
+
on this machine — see `provider-tgit.md` ("Probe reachability") for the one-line
|
|
29
|
+
`x-env: tgit` check. If it says `tgit: OK`, **list Tencent TGit (工蜂) first** and
|
|
30
|
+
prefer it. Then ask: *"Have you heard of / do you have an account on any of these —
|
|
31
|
+
Tencent TGit (工蜂), GitHub, GitLab, or CNB (cnb.cool)?"*
|
|
40
32
|
|
|
41
33
|
- **Tencent TGit (工蜂)** — https://git.woa.com (Tencent-internal only; shown
|
|
42
34
|
first when the probe above says `tgit: OK`)
|
|
@@ -49,7 +41,8 @@ If they name one, use that platform and go to sub-step 2c.
|
|
|
49
41
|
### 2b — If they've heard of NONE, auto-probe reachability
|
|
50
42
|
|
|
51
43
|
Test which sites this network can actually reach (probe each, ~3s timeout each).
|
|
52
|
-
The TGit probe checks the `x-env: tgit` header, not just reachability
|
|
44
|
+
The TGit probe checks the `x-env: tgit` header, not just reachability (see
|
|
45
|
+
`provider-tgit.md`); the others just check reachability:
|
|
53
46
|
|
|
54
47
|
```bash
|
|
55
48
|
curl -sS -m 3 -D - -o /dev/null https://git.woa.com 2>/dev/null | grep -qi '^x-env:[[:space:]]*tgit' && echo "tgit: OK" || echo "tgit: unreachable"
|
|
@@ -79,12 +72,9 @@ the repository, then continue to the next step:
|
|
|
79
72
|
| GitLab | https://gitlab.com/users/sign_in | https://gitlab.com/projects/new |
|
|
80
73
|
| CNB | https://cnb.cool | https://cnb.cool/new/repos (org first: https://cnb.cool/new/groups) |
|
|
81
74
|
|
|
82
|
-
> **Tencent TGit (工蜂):**
|
|
83
|
-
>
|
|
84
|
-
> (
|
|
85
|
-
> back to https://git.woa.com/projects/new if init reports it can't (e.g. the
|
|
86
|
-
> group/namespace doesn't exist, or you lack create permission). git.woa.com is
|
|
87
|
-
> Tencent-internal only.
|
|
75
|
+
> **Tencent TGit (工蜂):** don't send the user to the browser to create the repo —
|
|
76
|
+
> prefer letting `teamai init` create it via the API in Step 5. See
|
|
77
|
+
> `provider-tgit.md` ("When you `teamai init` on TGit").
|
|
88
78
|
|
|
89
79
|
Tell the user to sign in, create an **empty** repo (suggested name
|
|
90
80
|
`TeamAi-<team-name>`), and give you the resulting repo URL. Explain in one
|
|
@@ -101,48 +91,11 @@ computer only holds a synced copy — you never put business code in it."*
|
|
|
101
91
|
Signing in on the website (Step 2c) is not enough — `teamai init` also needs the
|
|
102
92
|
platform's CLI credentials. Have the user complete the matching CLI login:
|
|
103
93
|
|
|
104
|
-
### Tencent TGit (工蜂)
|
|
105
|
-
|
|
106
|
-
TeamAI supports git.woa.com natively as the `tgit` provider (it recognizes the
|
|
107
|
-
host on its own — no `GITLAB_URL` needed). **Run every command below yourself** —
|
|
108
|
-
both the install and the login. **Never tell the user to run a `gf` command.** The
|
|
109
|
-
user's only action is approving the login in their browser / iOA when it opens.
|
|
110
|
-
|
|
111
|
-
**1. Install `gf` (you run this)** using the **same source, path, and check teamai
|
|
112
|
-
uses** — do not invent your own URL. `${TEAMAI_HOME}` is `~/.teamai` unless
|
|
113
|
-
overridden:
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
# pick the tarball for this machine's OS/arch (darwin|linux × x64|arm64)
|
|
117
|
-
os=$(uname -s | tr '[:upper:]' '[:lower:]') # darwin | linux
|
|
118
|
-
arch=$(uname -m); [ "$arch" = "x86_64" ] && arch=x64; [ "$arch" = "aarch64" ] && arch=arm64
|
|
119
|
-
dir="${TEAMAI_HOME:-$HOME/.teamai}/gf"
|
|
120
|
-
|
|
121
|
-
# download + extract from the Tencent-internal mirror (same URL teamai uses)
|
|
122
|
-
mkdir -p "$dir"
|
|
123
|
-
curl -fsSL "http://mirrors.tencent.com/repository/generic/gongfeng-cli/files/channels/stable/gf-${os}-${arch}.tar.gz" | tar xz -C "$dir"
|
|
124
|
-
|
|
125
|
-
# verify exactly as teamai does: the binary exists and is executable
|
|
126
|
-
test -x "$dir/gf/bin/gf" && echo "gf installed OK" || echo "gf install FAILED"
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Only macOS and Linux, on x64 or arm64, are supported.
|
|
130
|
-
|
|
131
|
-
**2. Log in (you run this too — don't hand it to the user):**
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
"${TEAMAI_HOME:-$HOME/.teamai}/gf/gf/bin/gf" auth login
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
`gf auth login` starts an interactive flow offering three ways to sign in — iOA, a
|
|
138
|
-
browser device code, or pasting a token. Pick the browser/iOA option, relay
|
|
139
|
-
whatever URL / device code it prints to the user, and ask them to approve it in
|
|
140
|
-
their browser — that approval is the *only* thing they do; the command finishes on
|
|
141
|
-
its own once they do. Confirm with
|
|
142
|
-
`"${TEAMAI_HOME:-$HOME/.teamai}/gf/gf/bin/gf" auth whoami` before continuing.
|
|
94
|
+
### Tencent TGit (工蜂)
|
|
143
95
|
|
|
144
|
-
(
|
|
145
|
-
|
|
96
|
+
See `provider-tgit.md` ("Log in") — you install `gf` and run `gf auth login`
|
|
97
|
+
yourself; the user only approves in the browser / iOA. No `GITLAB_URL` needed.
|
|
98
|
+
Then return here for Step 4.
|
|
146
99
|
|
|
147
100
|
### CNB — install the CLI, authorize, then read the repo (in this order)
|
|
148
101
|
|
|
@@ -219,11 +172,9 @@ teamai init https://<platform>/<org>/<repo-name> --scope user
|
|
|
219
172
|
|
|
220
173
|
If the repo does not exist yet, `init` offers to create it — accept the prompt.
|
|
221
174
|
|
|
222
|
-
- **Tencent TGit (工蜂):** `gf` and login are already done
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
to https://git.woa.com/projects/new if the group/namespace is missing or you
|
|
226
|
-
lack create permission. No `GITLAB_URL`.
|
|
175
|
+
- **Tencent TGit (工蜂):** `gf` and login are already done, so init creates the
|
|
176
|
+
repo via the API when it's missing — see `provider-tgit.md` ("When you
|
|
177
|
+
`teamai init` on TGit").
|
|
227
178
|
- **CNB caveat:** a `cnb login` token **cannot create** an org or repo — that is
|
|
228
179
|
exactly why the CNB flow has the user create the repo on the website first
|
|
229
180
|
(Step 2c). If the org/repo is still missing here, `init` prints web links
|
|
@@ -256,13 +207,12 @@ teamai hooks list # per-tool: which AI tools actually got the hooks
|
|
|
256
207
|
|
|
257
208
|
Resolve everything `doctor` flags before continuing.
|
|
258
209
|
|
|
259
|
-
**
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
worrying about a tool that shows as missing.
|
|
210
|
+
**Don't trust the "Hooks injected into all AI tool settings" message on its own** —
|
|
211
|
+
it prints even for tools where nothing was written. `teamai doctor` / `teamai hooks
|
|
212
|
+
list` show the real per-tool status. Only the tool you set up (e.g. `claude`) is
|
|
213
|
+
expected to show hooks installed; others are skipped by design or not yet supported,
|
|
214
|
+
which is normal. Full table in `troubleshooting.md` ("Which tools actually get
|
|
215
|
+
hooks").
|
|
266
216
|
|
|
267
217
|
## Step 7 — Grant members repo access (required before they can join)
|
|
268
218
|
|