diff --git a/.dwp/config.json b/.dwp/config.json index 2e07f9f..f0eadf9 100644 --- a/.dwp/config.json +++ b/.dwp/config.json @@ -2,7 +2,7 @@ "addons": { "agentkit": { "enabled": true, - "version": "v1.5.2" + "version": "v1.6.0" }, "ai-diff-reviewer": { "enabled": true, diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index dbfaa1e..be3f3c6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -12,7 +12,7 @@ body: attributes: label: ak version description: Output of `ak --version`. - placeholder: agentkit 1.5.2 (interface 1) + placeholder: agentkit 1.6.0 (interface 1) validations: required: true - type: dropdown diff --git a/AGENTS.md b/AGENTS.md index 6fc953f..fe43290 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,7 +15,7 @@ agentkit (alias ak); skills agentkit, agentkit-setup, agentkit-orchestrate | Path | What | | --- | --- | | `bin/ak`, `bin/agentkit` | one byte-identical bash launcher: sources the env file, exec's the python core | -| `lib/ak.py` + `lib/*.py` | the python3 stdlib core: `launch` (dispatcher), `kinds` (+ `tomlmini`, `writers`), `profiles`, `run`, `envcmd`, `doctor`, `usage`, `pick` (`ak pick`, the account-selection policy over the usage rows), `capacity` (`ak capacity`, one account's room and verdict, pick's arithmetic), `state` (the machine state dir: usage cache, atomic 0600 writes), `lease` (`ak lease`, advisory account leases), `setup`, `aliases`, `installer`, `update` (`ak update`, the verified vendor update: discover, install, resolve, re-pin; `docs/update.md`), `sessions` (the record every interactive launch leaves and `ak ps`, the running sessions joined to their account; `docs/ps.md`), `fanout` (`ak fanout`: N tasks in N git worktrees over the accounts `ak pick` chooses, one `fanout-v1` result; `docs/fanout.md`), `hooks`, `common` | +| `lib/ak.py` + `lib/*.py` | the python3 stdlib core: `launch` (dispatcher), `kinds` (+ `tomlmini`, `writers`), `profiles`, `run`, `envcmd`, `doctor`, `usage`, `pick` (`ak pick`, the account-selection policy over the usage rows), `capacity` (`ak capacity`, one account's room and verdict, pick's arithmetic), `state` (the machine state dir: usage cache, atomic 0600 writes), `lease` (`ak lease`, advisory account leases), `setup`, `aliases`, `installer`, `update` (`ak update`, the verified vendor update: discover, install, resolve, re-pin; `docs/update.md`), `sessions` (the record every interactive launch leaves and `ak ps`, the running sessions joined to their account; `docs/ps.md`), `models` (the model policy `models.toml`: `--model` / `--class`, deny and floor, for every launch path; `docs/models.md`), `fanout` (`ak fanout`: N tasks in N git worktrees over the accounts `ak pick` chooses, one `fanout-v1` result; `docs/fanout.md`), `hooks`, `common` | | `lib/common.sh`, `lib/env.template` | the launcher's shell half; the env file template | | `providers.toml` | the kinds model as data (CLIs, providers, kinds) — see `docs/kinds.md` | | `skills/agentkit/` | the bundled skill (`ak --skill`): `SKILL.md` + `references/` (`accounts.md`, `usage.md`) | @@ -23,7 +23,7 @@ agentkit (alias ak); skills agentkit, agentkit-setup, agentkit-orchestrate | `skills/agentkit-orchestrate/` | the orchestration skill (`ak --skill orchestrate`): several agents over several accounts; see `docs/orchestration.md` | | `install.sh`, `install.ps1`, `win/*.cmd` | installers (POSIX, Windows) and Windows shims | | `tests/run.sh`, `tests/scopes/`, `tests/fakes/`, `tests/py/` | the suite: sandbox HOME, fake CLIs, one scope per surface | -| `docs/` | user docs, `SECURITY.md`, `TESTING_GUIDE.md`, `schema/doctor-v1.json`, `schema/usage-v1.json`, `schema/pick-v1.json`, `schema/capacity-v1.json`, `schema/leases-v1.json`, `schema/profiles-v1.json`, `schema/setup-probe-v1.json`, `schema/setup-verify-v1.json`, `schema/sessions-v1.json`, `schema/fanout-v1.json`, `ps.md`, `fanout.md`, `accounts.md`, `orchestration.md`, `setup.md`, `usage.md` | +| `docs/` | user docs, `SECURITY.md`, `TESTING_GUIDE.md`, `schema/doctor-v1.json`, `schema/usage-v1.json`, `schema/pick-v1.json`, `schema/capacity-v1.json`, `schema/leases-v1.json`, `schema/profiles-v1.json`, `schema/setup-probe-v1.json`, `schema/setup-verify-v1.json`, `schema/sessions-v1.json`, `schema/fanout-v1.json`, `ps.md`, `fanout.md`, `models.md`, `accounts.md`, `orchestration.md`, `setup.md`, `usage.md` | | `scripts/` | maintainer tooling: `check-public-hygiene.sh`, `release.sh`, `update-pins.sh` | | `.agents/` (+ `.claude`, `.cursor` symlinks) | the agent kit for working on this repo: personas, `dwp-*` delegators, vendored skills, catalog in `.agents/docs/` | @@ -54,4 +54,4 @@ The test map lives in [`docs/TESTING_GUIDE.md`](docs/TESTING_GUIDE.md). Structured work runs through the installed `deepworkplan` skill (`.agents/skills/deepworkplan/`); plans live in the gitignored `.dwp/`; only the addon registry `.dwp/config.json` is tracked (see the skill's `spec/CONFIG.md`). -DWP standard: 8.0.0 (onboarded 2026-10-08; upgraded 2026-10-09, 2026-10-11, 2026-10-12, 2026-10-13, 2026-10-25, 2026-11-15, 2026-11-16, 2026-11-17 and 2026-11-19; skill 8.0.6, vendored 2026-11-19 from tag commit 8b348b9, all 188 files verified against the release SHA256SUMS (digest 1f807e4c…), together with herdr-peers 2.2.1 (tag commit 6b9f17d, all 37 skill files verified against its SHA256SUMS, digest 9855c625…); new plans use plan-contract/v8, existing plans keep their recorded generation; the addon registry records herdr-peers v2.2.1, coding-agents-kit v1.5.2 and ai-diff-reviewer v3.3.16) +DWP standard: 8.0.0 (onboarded 2026-10-08; upgraded 2026-10-09, 2026-10-11, 2026-10-12, 2026-10-13, 2026-10-25, 2026-11-15, 2026-11-16, 2026-11-17 and 2026-11-19; skill 8.0.6, vendored 2026-11-19 from tag commit 8b348b9, all 188 files verified against the release SHA256SUMS (digest 1f807e4c…), together with herdr-peers 2.2.1 (tag commit 6b9f17d, all 37 skill files verified against its SHA256SUMS, digest 9855c625…); new plans use plan-contract/v8, existing plans keep their recorded generation; the addon registry records herdr-peers v2.2.1, coding-agents-kit v1.6.0 and ai-diff-reviewer v3.3.16) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea369f1..e28c173 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,15 @@ permission posture changes. ## [Unreleased] +## [1.6.0] - 2026-12-02 + +A minor release: native orchestration and a model policy. Interface stays +**1** and every change is additive: `ak run` keeps its grammar, envelope +and exit codes without the new flags, and nothing changes without +`models.toml`. New separately versioned schemas: `sessions-v1` (`ak ps`), +`fanout-v1` (`ak fanout`) and `run-envelope-v1` (the `ak run` envelope); +`usage-v1` and pick-v2 gain optional keys. + ### Added - **`ak usage` keeps showing an account it cannot read now.** A row that is @@ -69,6 +78,12 @@ permission posture changes. unmerged commits unless `--discard`, and removes a worktree only when it is provably that run's. It never merges, pushes or rebases. See [`docs/fanout.md`](docs/fanout.md). +- **A model policy.** `~/.config/agentkit/models.toml` (`AGENTKIT_MODELS` moves it) names, per kind or CLI, a `default` model, a model per task class (`reasoning`, `execution`), models to `deny` and a version `floor`. `--class C` on `ak `, `ak run`, `ak pick` (also `--kinds … --class-for K=C`) and `ak fanout` (also per task) launches the class's model. Deny and floor refuse with exit 2 and never substitute; a guarded table with no model to pass, or a policy model for a CLI whose model flag ak does not know (Grok today), is refused rather than starting the CLI's own default. `ak run` gains `--model`. pick-v2 gains the optional `class` key and carries `--class` in its launch argv. Without the file nothing changes. See [`docs/models.md`](docs/models.md). +- **The `ak run` envelope has a schema**, [`docs/schema/run-envelope-v1.json`](docs/schema/run-envelope-v1.json). `attempts[].reason` and `failover` are closed sets that only grow (a new value is a new interface minor), the exit codes are stated stable, and every schema says its identifiers are profile names. `docs/usage.md` lists which window ids mean the same across vendors for `--need`, and `docs/run.md` states that `ak capacity --self` works inside an `ak run --pick` or `ak fanout` lane. +- **A fan-out that fits a plan.** `ak fanout run --branch-prefix P` puts lanes on `P/` (refused before anything is created when such a branch exists), `--label TEXT` is echoed in `fanout-v1` and the record, and a task may carry its own `timeout` and `exclude`. `ak fanout clean` deletes a prefixed branch only when the lane's proven worktree has it checked out. Additive. +- **`ak ps` shows more.** `--json` carries the effective `thresholds` `{low, critical}` and, per session, `herdr_server` (an opaque id: pane ids are unique per Herdr server, not per host). `ak ps --all` also lists running headless `ak run` processes (`mode` `run`, with `run_id` for fan-out lanes and `owner`). `ak ps` without `--all` lists what it listed before. Additive. +- **Leases are visible.** With `ak run --pick --owner`, each entry of `attempts` carries `lease: {owner, released}` (or `null` when the lease could not be taken), and `docs/run.md` states its lifetime. Each `ak ps --json` session carries `leases: [{owner, purpose}]` for its account. Additive. +- **A declared account pool.** `--only @a,@b` on `ak pick` (also with `--kinds`), `ak run --pick` and `ak fanout run`, or `AGENTKIT_POOL=@a,@b` when no flag is given, keeps every choice — failover included — inside those profiles. A profile outside the pool is listed as `outside the pool` and never chosen. Additive; without either nothing changes. ### Changed @@ -77,6 +92,7 @@ permission posture changes. run by hand (pick, worktree, run, discard, re-pick). The rules the commands do not enforce stay the lead's: run the gate in each worktree, merge only what passes, never use an account the user did not offer. +- **Z.AI GLM defaults move to the latest models.** The opus and sonnet slots of every `*-glm` kind now default to `glm-5.4` (GLM-5.4, Z.AI's flagship on the GLM Coding Plan), up from `glm-5.3`; the haiku slot stays on `glm-5.3-flash`, still the latest fast model (natively multimodal). `ZAI_DEFAULT_*_MODEL` still override them. `docs/kinds.md` explains Z.AI's `[1m]` suffix for a 1M context in `claude-glm`. ## [1.5.2] - 2026-11-19 @@ -929,7 +945,8 @@ First public release. **Interface 1.** Redesigned from the author's earlier coding-agents-setup-kit (wrappers, installers, provider writers) and profile work; see `CREDITS.md`. -[Unreleased]: https://github.com/DailybotHQ/coding-agents-kit/compare/v1.5.2...HEAD +[Unreleased]: https://github.com/DailybotHQ/coding-agents-kit/compare/v1.6.0...HEAD +[1.6.0]: https://github.com/DailybotHQ/coding-agents-kit/compare/v1.5.2...v1.6.0 [1.5.2]: https://github.com/DailybotHQ/coding-agents-kit/compare/v1.5.1...v1.5.2 [1.5.1]: https://github.com/DailybotHQ/coding-agents-kit/compare/v1.5.0...v1.5.1 [1.5.0]: https://github.com/DailybotHQ/coding-agents-kit/compare/v1.4.0...v1.5.0 diff --git a/README.md b/README.md index e8e1996..cd7d750 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ python3 ≥ 3.9. Nothing else. ## Install ```bash -git clone --branch v1.5.2 https://github.com/DailybotHQ/coding-agents-kit && ./coding-agents-kit/install.sh +git clone --branch v1.6.0 https://github.com/DailybotHQ/coding-agents-kit && ./coding-agents-kit/install.sh ``` Verify the checkout against the release's checksums (every shipped file is @@ -113,7 +113,7 @@ listed): ```bash cd coding-agents-kit -curl -fsSLO https://github.com/DailybotHQ/coding-agents-kit/releases/download/v1.5.2/SHA256SUMS +curl -fsSLO https://github.com/DailybotHQ/coding-agents-kit/releases/download/v1.6.0/SHA256SUMS shasum -a 256 -c SHA256SUMS --ignore-missing # Linux: sha256sum -c SHA256SUMS --ignore-missing ``` @@ -121,7 +121,7 @@ Windows: `.\coding-agents-kit\install.ps1`. Scripts and containers: `./coding-agents-kit/install.sh --no-rc`. Details, upgrades and uninstall: [docs/install.md](docs/install.md). -Let an agent do it: `npx --yes skills add DailybotHQ/coding-agents-kit@v1.5.2 --skill agentkit-setup`, then ask it +Let an agent do it: `npx --yes skills add DailybotHQ/coding-agents-kit@v1.6.0 --skill agentkit-setup`, then ask it to set the kit up on this machine or to write a container recipe ([setup](docs/setup.md)). ## Quickstart @@ -192,9 +192,9 @@ ak pick codex --owner local:w1:p1 --count 2 # spreads lanes: every active l | Skill | For | Install | | --- | --- | --- | -| `agentkit` | launching kinds, accounts, `ak run`, `ak usage`, `ak pick` (`ak --skill`) | `npx --yes skills add DailybotHQ/coding-agents-kit@v1.5.2 --skill agentkit` | -| `agentkit-setup` | installing, configuring and repairing the kit (`ak --skill setup`) | `npx --yes skills add DailybotHQ/coding-agents-kit@v1.5.2 --skill agentkit-setup` | -| `agentkit-orchestrate` | several agents over several accounts and vendors (`ak --skill orchestrate`) | `npx --yes skills add DailybotHQ/coding-agents-kit@v1.5.2 --skill agentkit-orchestrate` | +| `agentkit` | launching kinds, accounts, `ak run`, `ak usage`, `ak pick` (`ak --skill`) | `npx --yes skills add DailybotHQ/coding-agents-kit@v1.6.0 --skill agentkit` | +| `agentkit-setup` | installing, configuring and repairing the kit (`ak --skill setup`) | `npx --yes skills add DailybotHQ/coding-agents-kit@v1.6.0 --skill agentkit-setup` | +| `agentkit-orchestrate` | several agents over several accounts and vendors (`ak --skill orchestrate`) | `npx --yes skills add DailybotHQ/coding-agents-kit@v1.6.0 --skill agentkit-orchestrate` | ### The grammar @@ -260,6 +260,7 @@ the threat model is [docs/SECURITY.md](docs/SECURITY.md). ## Documentation - [Kinds and providers](docs/kinds.md) — the data model, provider keys, adding a kind +- [The model policy](docs/models.md) — which model each kind gets per task class (`--class reasoning|execution`), and models that are never started - [Accounts](docs/accounts.md) — the account model: per-CLI table, lifecycle, keys, macOS and Windows, troubleshooting - [Profiles](docs/profiles.md) — accounts per CLI, keys per profile, Herdr hooks - [Permissions](docs/permissions.md) — autonomy by default, the `--ask` opt-out, the `classic` and `providers` aliases diff --git a/docs/SECURITY.md b/docs/SECURITY.md index 39c4c31..32cf39a 100644 --- a/docs/SECURITY.md +++ b/docs/SECURITY.md @@ -155,7 +155,9 @@ profile and its headroom, nothing else. never read a reading that old, so no account is chosen on it. - **Session records** (`/sessions/`, `0600` files in a `0700` directory): written by an interactive launch, read and pruned by `ak ps`. - They hold names, a directory, times, a process id and the host's name — never a key, a + They hold names, a directory, times, a process id, the host's name and an + opaque id of the Herdr server (a hash of its socket path, never the path) — + never a key, a token, a session id, an account identity or the CLI's environment. `ak ps` joins them to the usage cache only: it makes no request, refreshes no login and writes nothing but the removal of ended records. The pane id is @@ -170,11 +172,18 @@ profile and its headroom, nothing else. account, and `ak fanout clean` — and only when the path is in the run's record, has the place and name the run gives its lanes, is a linked worktree of the recorded repository and is its own git top level; the - branch it deletes is computed from the run and the lane, never read from - the record. A branch that holds commits is never reset, and is deleted + branch it deletes is computed from the run and the lane (or the run's + `--branch-prefix` and the lane), never read from the record, and a + prefixed branch is deleted only when the proven worktree has it checked + out. A branch that holds commits is never reset, and is deleted only with `--discard`. It never merges, pushes or rebases. A lane's transcript holds whatever its CLI printed: treat the log files like the CLI's own session files. +- **Model policy** (`~/.config/agentkit/models.toml`, or `AGENTKIT_MODELS`): + read by every launch path, never written by `ak`. It holds model names only + — no key. A model it names reaches the CLI only as an argv element after the + CLI's own model flag. Its rules only narrow what starts: a denied model, or + one below the floor, is refused, never replaced. - **Accounts:** work moves only among the accounts you declared for the work, within each vendor's terms; no agent creates an account, renews a login or spends a Codex reset. @@ -259,7 +268,7 @@ paths. | `~/.config/agentkit/env` (`AGENTKIT_ENV`) | your keys and settings (created once, never overwritten) | 600 | | `~/.config/agentkit/aliases.json` | alias definitions | 600 | | your shell rc | one guarded block (PATH + aliases) | unchanged | -| `~/.local/state/agentkit/` (`AGENTKIT_STATE_DIR`) | `usage-cache/@.json` (usage numbers only), `leases/leases.json`, `fanout//` (a fan-out run's record and its lanes' transcripts and, by default, their worktrees), `launches.json` (per working directory: the kind, profile and posture of the last interactive launch, for `ak last`), `sessions/-