@team-ai/teamai-cli 0.22.11 → 0.30.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 CHANGED
@@ -6,14 +6,31 @@ All notable changes to this project will be documented in this file. See [standa
6
6
 
7
7
  ### ✨ Features
8
8
 
9
+ - A coding session can run a team workflow with `--driver skill`. `invoke: allow`, `ask` or `deny` (the default) in a workflow says whether an agent session may start it, and `alias` gives it a second name for `workflow start`. `teamai pull` writes a `workflow-<name>` skill for each `allow` or `ask` workflow, which sends the agent to `teamai skill get workflow`. Command steps run in background processes, prompt steps in child agents the session starts, a required approval goes only to the person, and scored steps are judged in the background by the confined judge of the session's tool. `teamai skill get workflow-local` covers unattended runs with the local driver. teamai before 0.28.0 drops a workflow that sets `invoke` or `alias`, and `teamai review --branch` warns about each one (for [#1086](https://github.com/Tencent/teamai-cli/issues/1086)).
10
+ - With `--driver skill`, the session's agent works an `interactive` step with the person. A host that makes a worktree for each child has TeamAI check and adopt it, and a host that starts no child has the agent work each step in the checkout itself. A run the session cannot finish goes to the local driver: describe routes it there before it starts when a step that waits for env or a budget works in a workspace the run opens, and otherwise the session hands the person `teamai workflow resume <run>` once only those steps are left (for [#1086](https://github.com/Tencent/teamai-cli/issues/1086)).
11
+ - `teamai workflow resume <run> --driver skill` continues a published run from a coding session: it claims the run as `resume` does, with `--claim` from the install that owns it, takes the options of a skill start, and answers the first turn. `next --takeover` with `--driver skill` drives a run this machine has that no session drives yet (for [#1086](https://github.com/Tencent/teamai-cli/issues/1086)).
12
+ - `teamai workflow next --prepare` has TeamAI prepare a leased workspace, and `report` commits, pushes and fills `changes` or `read` for it. `--prepare --attempt <attempt>` prepares an attempt the driver already leased, and `--adopt <dir>` runs it in a place the host made (for [#1086](https://github.com/Tencent/teamai-cli/issues/1086)).
13
+ - A workflow run is attended or unattended: `TEAMAI_MODE` (`attended` or `unattended`) decides, else `CI`, else attended. Every process TeamAI starts for a step, setup included, gets the run's `TEAMAI_MODE` with either driver. In an unattended run, `workflow start --describe --driver skill` asks no question: it answers the recommended start with `--auto-approve`, or `denied` for a workflow that needs a person (for [#1086](https://github.com/Tencent/teamai-cli/issues/1086)).
14
+ - `driver.can.env` takes `"commands"`: the driver scopes team env for command steps and setup only, and a prompt step with `requires.env` waits (for [#1086](https://github.com/Tencent/teamai-cli/issues/1086)).
15
+ - `teamai score --next` takes `run`, to take only that run's workflow passes, and `canTakeLease: false`, to renew `running` and take nothing (for [#1086](https://github.com/Tencent/teamai-cli/issues/1086)).
9
16
  - `teamai pull --team-ref <ref>` pins a workspace and its checkouts to a team branch, tag, or commit. Later pulls and hooks follow the pin; passing the default branch unpins. Revision switches remove unchanged copies the new tree lacks, keep edits, and block all pushes while pinned. `--team-ref` with `--dry-run` is refused. `status` shows the pin. An older CLI saving the workspace's local config drops `repo.ref`, which unpins it (for [#1183](https://github.com/Tencent/teamai-cli/issues/1183)).
10
17
 
11
18
  ### Changed
12
19
 
20
+ - The local driver in a terminal answers optional approvals yes and choices with their default when started with `--auto-approve`. It used to ask anyway (for [#1086](https://github.com/Tencent/teamai-cli/issues/1086)).
21
+ - `teamai push --skill` refuses a generated `workflow-<name>` skill and a skill the CLI owns, such as `teamai` (for [#1086](https://github.com/Tencent/teamai-cli/issues/1086)).
13
22
  - `teamai init` no longer pulls team skills, rules, agents or MCP before it exits. It still saves config and installs hooks. In project scope it creates a tool directory only for a tool named with `--agent` or picked in a terminal; otherwise that directory appears when the tool starts a session, and that session start pulls. `teamai pull` still does not create a missing tool directory. A tool that reads rules and MCP once, before its SessionStart hook, sees them from the following session (for [#1065](https://github.com/Tencent/teamai-cli/issues/1065)).
23
+ - `teamai push --role <ns>` fails with exit 2 when no role or project declares `<ns>` for that type, as `--project` already does. It used to write the files under `<ns>` anyway, where pull delivers them to nobody. A team with neither manifest still accepts any namespace (for [#1101](https://github.com/Tencent/teamai-cli/issues/1101)).
24
+ - `teamai contribute --namespace ""` writes to the shared root `learnings/`, also for a member whose default is a namespace. It used to be rejected, so such a member could not reach the shared root (for [#1101](https://github.com/Tencent/teamai-cli/issues/1101)).
25
+ - In single-repo mode, `teamai push` from a branch behind the default branch leaves out a team file under `.teamai/` that the default branch changed since and the member did not, and names it. It used to push the member's older copy over the teammate's change. When the member changed that file too, push stops with exit 2 and names it; merge the default branch and push again (for [#1101](https://github.com/Tencent/teamai-cli/issues/1101)).
14
26
 
15
27
  ### 💥 Breaking Changes
16
28
 
29
+ - **An agent session starts only a workflow that allows it.** Inside an agent session (an agent's session variable such as `CLAUDE_CODE_SESSION_ID` is set), `teamai workflow start` of a workflow without `invoke`, or with `invoke: deny`, answers `invoke_denied` with every driver, and an `invoke: ask` workflow needs `--confirmed` with every driver, and is refused (`unattended_denied`) in an unattended run even with it. `workflow resume`, `next --takeover` and a `--json` claim with `next` refuse the same way, except for the session that drives the run. `CI` exempts nothing. Set `invoke: allow` or `ask` on the workflows agents start. A CI job sets no session variable and is unaffected (for [#1086](https://github.com/Tencent/teamai-cli/issues/1086)).
30
+ - **No workflow run starts or is driven from inside a workflow step.** The local driver now sets `TEAMAI_WORKFLOW_ATTEMPT` for the commands it runs, the tools of its prompt steps and setup. Every `teamai workflow` command that changes a run, `respond` included, answers `nested_workflow` there. `workflow start` also answers it in a workflow worktree and on a `teamai/<run>/...` branch. To run another workflow as part of a run, add it as a `workflow` step (for [#1086](https://github.com/Tencent/teamai-cli/issues/1086)).
31
+ - **An answer sent from inside an agent session counts as the agent's.** `teamai workflow respond --json` with a driver identity, and an answer typed in a terminal, record `agent: true` when the process has one of those variables, and a required approval refuses them with `agent_in_path`. So does a `teamai dashboard` started inside an agent session. The variables are evidence, not attestation: the person answers a required approval from their own terminal or the dashboard (for [#1086](https://github.com/Tencent/teamai-cli/issues/1086)).
32
+ - A driver that lists a judge lease ref in `teamai workflow next` `running` gets `judge_lease`, and the run does not change. The ref used to come back in `cancelled`. Renew judge leases with `teamai score --next` (for [#1086](https://github.com/Tencent/teamai-cli/issues/1086)).
33
+ - teamai before 0.28.0 answers `driver.can.env: "commands"` with `invalid_json`. An external driver checks the CLI version before it sends `"commands"` (for [#1086](https://github.com/Tencent/teamai-cli/issues/1086)).
17
34
  - **User-scope env no longer loads inside a project unless the project inherits the user scope.** Set `inheritUserScope: true` (`teamai init <repo> --inherit-user-scope`) in a project that needs the user scope's variables; its secrets stay out (#1018).
18
35
  - `teamai codebase --extract` is removed, with its `--incremental` and `--max-files`: it wrote a second `teamwiki/` into the source repo, which recall never read. Use `teamai import --dir <repo>` (`--incremental` to re-extract only what changed), and `--output <dir>` to keep the result in `<dir>/teamwiki/` instead of the team repo. `teamai codebase --lint`, `--reconcile`, `--deep-enrich` and `--status` read the same teamwiki the import wrote.
19
36
  - `teamai import --from-repo`, `--from-repo-list` and `--from-org` with `--output <dir>` now write `<dir>/teamwiki/`, as `--dir` and `teamai codebase` always did, instead of a `teamwiki/` beside `<dir>`; they no longer also rebuild or push the team repo. Without `--output`, an import now fails when teamai is not initialized, instead of writing to `./.teamai/team-repo/teamwiki/`.