Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
063677b
feat(session): cross-platform session migration, IDE sync, and team sync
Sep 14, 2026
eccc0cd
docs(session): design for user-repo session sync (M1-M3)
Sep 15, 2026
f78b591
feat(session): split CodeBuddy into cli and ide platforms
Sep 15, 2026
6b90561
feat(session): cross-project consumption, native archive key, and cor…
Sep 16, 2026
e971d37
merge: bring in the canonical CodeBuddy cli/ide adapter split
Sep 16, 2026
2d0bad0
test(session)+docs: M3 — cross-repo coverage, guides, and E2E-discove…
Sep 16, 2026
9c53d2b
fix(session): write a summary record when migrating into claude-code
Sep 16, 2026
becc0ee
fix(session): QA sweep — crashes, fidelity, and robustness across 8 c…
Sep 16, 2026
0194202
fix(session): make migrated sessions actually visible and migration i…
Sep 22, 2026
a0f9291
feat(session): redact secrets during migration (--scrub)
Sep 22, 2026
ebd0ec3
feat(session): warn on unredacted push; --scrub redacts before archiving
Sep 22, 2026
68b0104
fix(session): review sweep — injection, dry-run, archive correctness
Sep 22, 2026
69f32b5
fix(session): treat a failed git commit as a failed push
Sep 22, 2026
ae4f11f
chore(session): English-only comments in new modules
Sep 22, 2026
1340de0
chore(session): English-only comments in cursor-store
Sep 22, 2026
47076ec
chore(session): English-only comments in codex adapter and new modules
Sep 22, 2026
2584925
chore(session): English comments in cursor adapter and scrub/doc touc…
Sep 22, 2026
6187866
chore(session): delete the leftover empty codebuddy.ts shell
Sep 23, 2026
84abac5
fix(cursor): synthesize placeholder tool results so targets don't ren…
Sep 23, 2026
8afe26e
fix(session): strip injected wrappers from IDE-bound user text; title…
Sep 23, 2026
22fa235
fix(cursor): synthesize stable callIds for id-less tool_use; prefer u…
Sep 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,42 @@ All notable changes to this project will be documented in this file. See [standa
- Multi-project management: `role` and `project` together resolve resource namespaces, and project-private learnings are isolated ([#426](https://github.com/Tencent/teamai-cli/pull/426), for [#375](https://github.com/Tencent/teamai-cli/issues/375)).
- Data partitions auto-migrate a legacy `.teamai`, resume interrupted migrations, smoke-check the clone, and keep a git-ignored backup ([#439](https://github.com/Tencent/teamai-cli/pull/439), for [#374](https://github.com/Tencent/teamai-cli/issues/374)).
- Teams add their own course-correction words via `sharing.intervention.correctionKeywords` in `teamai.yaml`. The built-in list still covers only Chinese, English and Japanese, so corrections typed in other languages count only once the team configures them. The `UserPromptSubmit` hook now stores a `correction` flag on each dashboard prompt event (for [#564](https://github.com/Tencent/teamai-cli/issues/564)).
- `teamai session migrate` splits CodeBuddy into two platforms: `codebuddy` (CLI, `~/.codebuddy/projects/...`) and `codebuddy-ide` (the IDE sidebar history). IDE conversations were readable by neither before, so migrating out of CodeBuddy only ever saw CLI sessions; they can now be listed, migrated, and rolled back directly.
- `teamai session migrate` no longer writes to CodeBuddy IDE when the target is `codebuddy`. The two stores are independent and only the CLI one is listed, so the implicit double-write produced sessions that showed up in the sidebar but could neither be listed nor deleted.
- User-level session repos: `session list --all`, `session pull --all`, and `session search --all` read across every archived project (plus `_unattributed`), not just the current directory's git identity. `search --all` previously had a dead loop and never actually searched other projects.
- `session push --all` archives every workspace of one platform (with `--source`, confirmation above 5 sessions, `-y` skips), so a personal team repo can collect sessions from any directory in one run.
- Session archive keys derive from the session's own native working directory instead of the directory where the command ran. `claude-code` / `codebuddy` / `cursor` recover the native cwd from the first JSONL record; sessions whose workspace is unknowable (codebuddy-ide md5 placeholders) archive under `_unattributed` with an explicit warning.
- Re-pushing the same session updates the existing entry (dedup key: origin sessionId + author) instead of accumulating `xxx_1` duplicates.

### 🐛 Bug Fixes

- `teamai import --cache-status` and `--cache-gc` now expose their existing JSON output through the CLI `--json` option.
- Course-correction matching normalizes prompts and keywords to Unicode NFC, so composed and decomposed accents match. Stored prompt summaries and the 60-second correction window are unchanged. Fixes [#573](https://github.com/Tencent/teamai-cli/issues/573).
- Course-correction detection matches keywords in space-separated scripts as whole words, so Spanish "segundo" no longer counts as `undo` (for [#564](https://github.com/Tencent/teamai-cli/issues/564)).
- `teamai doctor` no longer assumes TGit before initialization and now exits with code 1 when any diagnostic check fails.
- CodeBuddy IDE history roots are detected in both on-disk layouts. The `default` instance keeps `history` one level higher (`<extId>/CodeBuddyIDE/history`), and failing to recognize it skipped every conversation under that instance.
- CodeBuddy IDE 32-hex conversation ids are reused as-is instead of being hashed a second time. Write and delete computed different ids, so `rollback` reported success while leaving the conversation in place.
- CodeBuddy CLI project directories are encoded with CodeBuddy's own rule — only path separators become `-`, spaces are kept. The previous catch-all encoding turned `.../teamai cli` into `...-teamai-cli` and such workspaces could never be listed or read.
- CodeBuddy session titles no longer leak injected prompt text. Both the CLI and the IDE pick the first real user message (skipping `<system-reminder>`-style wrappers) instead of displaying raw prompt XML in `session migrate` listings.
- `claude-code`, `workbuddy`, and `cursor` titles get the same injected-text cleaning as CodeBuddy; their first "user message" is often a `<system-reminder>`-style wrapper too, which used to become the archived session name.
- Migrating **into** `claude-code` now writes a `summary` record, so `claude --resume` shows the session's real title instead of the bare session id (e.g. `824ff784`). `readSession` also honors that record, so write→read roundtrips keep the title.
- Session archive dedup key includes the platform: the same session pushed as `codebuddy` and re-archived after migrating to `claude-code` are two artifacts, not an update. Existing repos where a cross-platform overwrite already happened keep the surviving copy.
- Git operations in `session push` / `migrate --push` / `pull` no longer crash with a stack trace when the team repo is not a git repository, lacks a remote, is missing, or hits a concurrent `index.lock` — each prints a one-line English error with the repo root and exits 1.
- A corrupted `sessions/**/_index.json` now prints a warning with the rebuild command instead of silently emptying the dedup key (which used to produce `xxx_1` duplicates on the next push).
- Interactive prompts treat EOF like an answer of "n": `session push --all` and platform selection print `Cancelled.` and exit 0 instead of hanging into a silent success. `--limit` values that are not positive numbers fall back to the documented default instead of negative-slice trimming. A closed output pipe (`| head`) exits cleanly instead of dumping an EPIPE stack.
- `session push` remote failures report git's actual `fatal:` line instead of the contentless `Command failed: git push origin` first line.
- Codex sessions keep their per-message timestamps: `readSession` reads `response_item.timestamp` and `writeSession` stamps records with the message's own time instead of the migration moment (roundtrips through claude-code no longer collapse the timeline). Codex session lookup matches whole ids — a 4-character prefix can no longer resolve to a different session file.
- Cursor duplicate-write idempotency restored (a malformed UUID regex made `writeSession` mint a new id every time, piling up copies), and cursor/workbuddy titles skip tool-output snippets and injected `ai-title` wrappers.
- `workbuddy` / `claude-code` / `cursor` `extractMeta` no longer stop scanning at the first injected text block, so a real question after a `<system-reminder>` wrapper becomes the title.
- Project directory names encode the symlink-resolved cwd for `claude-code`, `codebuddy`, `cursor`, and `workbuddy`. On macOS, writing with `--target-cwd /tmp/x` used to land in a directory nothing could list back, because listing runs with the resolved `/private/tmp/x`.
- `session push` no longer crashes with a stack trace when the remote push fails (no upstream, read-only HTTP mode, network) — the local save and commit already succeeded, so it prints a warning and keeps them.
- CodeBuddy IDE workspace hashes resolve symlinks before hashing. On macOS, writing with `/tmp/foo` and listing from `/private/tmp/foo` used to produce two different workspaces, so migrated sessions appeared to vanish.
- `migrate --push` re-reads exactly the migrated target session ids instead of "the N most recent" of the target directory, which could push unrelated pre-existing sessions while dropping the migrated ones.
- Pushed session meta no longer lies: `fidelityScore` records the real migration preview score instead of a hardcoded 1.0, and `createdAt` keeps the session's own creation time instead of the push time (the latter also skewed `session search` time-decay ranking).
- `session push` no longer reports "✓ Pushed N session(s)" when nothing was committed (empty pushes print "No changes to push").
- `session resume` failures explain that the session may be archived under another project identity and suggest `session search --all` / `--cwd`, instead of a bare uncaught error.
- 14 Chinese user-facing strings in `session-flow` (console output and thrown errors) are now English, per the project's English-output rule.
- `codebuddy-ide` no longer silently relabels a session's cwd with the directory passed to `readSession` when the global fallback finds the conversation in a different workspace; the cwd is reported as an `md5:` placeholder so archive keys stay honest.
- MCP `requires` is resolved from `PATH` (including Windows `PATHEXT`), so `teamai mcp inject` no longer skips servers such as `uvx` on Windows ([#540](https://github.com/Tencent/teamai-cli/pull/540), for [#539](https://github.com/Tencent/teamai-cli/issues/539)).
- The GitHub and CNB providers resolve their CLI to a launchable absolute path and start it through cross-spawn, so on Windows they no longer answer "installed" while every call fails silently ([#520](https://github.com/Tencent/teamai-cli/pull/520)).
- `enabledAgents` now also gates CLI builtin deploy, CLAUDE.md-class injects, and last-pull skip-sync targets, so an already-installed tool outside the whitelist is not written to ([#510](https://github.com/Tencent/teamai-cli/issues/510)).
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ Insight into how the team actually uses its AI tools, and a starting point for t
|------------|---------|---------------|
| **Usage** | `teamai digest` | Weekly team digest — 7-day success, prompt, active-time, estimated cost, cache, and correction trends, plus lifetime totals. |
| **Sessions** | `teamai session save` | Privacy-scrubbed per-session summaries (tool sequence, prompt turns, interventions) that feed the digest's Session Highlights. |
| **Session Sync** | `teamai session migrate` | Move full transcripts between AI tools; archive, search, and restore team sessions (`push` / `pull` / `list` / `resume` / `search`). |
| **Dashboard** | `teamai dashboard` | Web dashboard showing live sessions and local 7-day trends compared with the prior 7 days. |
| **KB Health** | `teamai dashboard` → KB Health | Built-in dashboard page reporting knowledge-base usage & health — coverage by type, top recalled entries, silent entries, recall trend, author contributions, and a maintenance console. |

Expand Down Expand Up @@ -265,6 +266,7 @@ Insight into how the team actually uses its AI tools, and a starting point for t
| `teamai source` | Manage skill subscription sources (other teams or your org's shared repos) |
| `teamai remove <type> <name>` | Remove a resource and open MR |
| `teamai session save` | Record a privacy-scrubbed session summary to a monthly log (`--push` feeds `digest`) |
| `teamai session migrate/push/pull/list/resume/search/rollback` | Migrate full sessions across AI tools; archive to and restore from the team repo |
| `teamai digest` | Generate weekly team usage digest |
| `teamai doctor` | Diagnose configuration issues |
| `teamai uninstall` | Remove all teamai resources and hooks |
Expand Down
2 changes: 2 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ teamai recall maintenance --update-quality # 为过时 skills / docs 生
|------|------|----------|
| **用量(Usage)** | `teamai digest` | 团队周报——近 7 天成功率、对话、活跃时长、估算成本、缓存与纠偏趋势,以及历史累计数据。 |
| **会话(Sessions)** | `teamai session save` | 脱敏的单会话摘要(工具序列、对话轮次、干预次数),喂给周报的 Session Highlights。 |
| **会话同步(Session Sync)** | `teamai session migrate` | 在 AI 工具间迁移完整会话;团队会话的归档、搜索与恢复(`push` / `pull` / `list` / `resume` / `search`)。 |
| **看板(Dashboard)** | `teamai dashboard` | Web 看板,展示实时会话,以及本机近 7 天相对前 7 天的趋势。 |
| **知识库健康(KB Health)** | `teamai dashboard` → KB Health | 内置于看板的报告页面,展示知识库使用情况与健康状态——各类型覆盖率、高频召回条目、沉默条目、召回趋势、作者贡献及维护控制台。 |

Expand Down Expand Up @@ -265,6 +266,7 @@ teamai recall maintenance --update-quality # 为过时 skills / docs 生
| `teamai source` | 管理 skill 订阅源(其他团队或本团队公共仓库) |
| `teamai remove <type> <name>` | 删除资源并创建 MR |
| `teamai session save` | 将脱敏后的 session 摘要记录到月度日志(`--push` 可喂给 `digest`) |
| `teamai session migrate/push/pull/list/resume/search/rollback` | 跨 AI 工具迁移完整会话;归档到团队仓库并从中恢复 |
| `teamai digest` | 生成团队周报 |
| `teamai doctor` | 诊断配置问题 |
| `teamai uninstall` | 移除所有 teamai 资源和 hooks |
Expand Down
Loading
Loading