Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .dwp/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"addons": {
"agentkit": {
"enabled": true,
"version": "v1.1.0"
"version": "v1.2.0"
},
"ai-diff-reviewer": {
"enabled": true,
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ body:
attributes:
label: ak version
description: Output of `ak --version`.
placeholder: agentkit 1.1.0 (interface 1)
placeholder: agentkit 1.2.0 (interface 1)
validations:
required: true
- type: dropdown
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ jobs:
& "$prefix\bin\ak.cmd" env claude
./install.ps1 -NoPath -Uninstall -Prefix $prefix -EnvFile $envFile
if (Test-Path "$prefix\lib") { throw 'uninstall left lib behind' }
- name: ak usage and ak pick checks run natively (no bash)
- name: ak usage, ak pick, capacity and restore checks run natively (no bash)
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
foreach ($script in @('tests/py/usage_checks.py', 'tests/py/usage_provider_checks.py', 'tests/py/pick_checks.py', 'tests/py/capacity_checks.py')) {
foreach ($script in @('tests/py/usage_checks.py', 'tests/py/usage_provider_checks.py', 'tests/py/pick_checks.py', 'tests/py/capacity_checks.py', 'tests/py/restore_checks.py')) {
$out = & python $script
if ($LASTEXITCODE -ne 0) { throw "$script failed: $($out | Select-String '^FAIL')" }
Write-Output "$script : $(@($out | Select-String '^ok').Count) checks ok"
Expand Down
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,28 @@ permission posture changes.

## [Unreleased]

## [1.2.0] - 2026-10-27

A minor release. Interface stays **1**: `ak doctor --json`, `ak env` and
`ak run` are unchanged; `ak last` is a new command.

### Added

- **Herdr restores a pane through `ak`.** An interactive `ak <kind>
[@profile]` inside a Herdr pane starts a detached watcher that, each time
Herdr records a new session id for that CLI, reports it again with the
resume command `ak <kind> @<profile> [--ask] --resume <id>`. After a reboot
or a Herdr restart the pane comes back in the same account, with its key
from the env file and its permission posture, instead of the bare CLI
(`claude --resume <id>`: the wrong home, or a login screen). Works on macOS,
Linux and Windows; the watcher gets no key, writes nothing and exits with
the CLI. `AGENTKIT_HERDR_RESUME=0` turns it off.
- **`ak last`.** Every interactive launch records its kind and profile per
working directory; `ak last` relaunches it with `-c` (continue the newest
session there) in any terminal, `ak last -r` opens the CLI's picker in that
account, `ak last ls` lists the record (`launches.json` in the state
directory, mode 0600, no key or session id).

## [1.1.0] - 2026-10-25

A minor release. Interface stays **1**; no command, flag, key or schema
Expand Down Expand Up @@ -695,7 +717,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.1.0...HEAD
[Unreleased]: https://github.com/DailybotHQ/coding-agents-kit/compare/v1.2.0...HEAD
[1.2.0]: https://github.com/DailybotHQ/coding-agents-kit/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/DailybotHQ/coding-agents-kit/compare/v1.0.1...v1.1.0
[1.0.1]: https://github.com/DailybotHQ/coding-agents-kit/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/DailybotHQ/coding-agents-kit/compare/v0.7.1...v1.0.0
Expand Down
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,23 +105,23 @@ python3 ≥ 3.9. Nothing else.
## Install

```bash
git clone --branch v1.1.0 https://github.com/DailybotHQ/coding-agents-kit && ./coding-agents-kit/install.sh
git clone --branch v1.2.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
listed):

```bash
cd coding-agents-kit
curl -fsSLO https://github.com/DailybotHQ/coding-agents-kit/releases/download/v1.1.0/SHA256SUMS
curl -fsSLO https://github.com/DailybotHQ/coding-agents-kit/releases/download/v1.2.0/SHA256SUMS
shasum -a 256 -c SHA256SUMS --ignore-missing # Linux: sha256sum -c SHA256SUMS --ignore-missing
```

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.1.0 --skill agentkit-setup`, then ask it
Let an agent do it: `npx --yes skills add DailybotHQ/coding-agents-kit@v1.2.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
Expand Down Expand Up @@ -190,9 +190,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.1.0 --skill agentkit` |
| `agentkit-setup` | installing, configuring and repairing the kit (`ak --skill setup`) | `npx --yes skills add DailybotHQ/coding-agents-kit@v1.1.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.1.0 --skill agentkit-orchestrate` |
| `agentkit` | launching kinds, accounts, `ak run`, `ak usage`, `ak pick` (`ak --skill`) | `npx --yes skills add DailybotHQ/coding-agents-kit@v1.2.0 --skill agentkit` |
| `agentkit-setup` | installing, configuring and repairing the kit (`ak --skill setup`) | `npx --yes skills add DailybotHQ/coding-agents-kit@v1.2.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.2.0 --skill agentkit-orchestrate` |

### The grammar

Expand All @@ -213,6 +213,11 @@ Only the head of the arguments belongs to `ak`; the first token it does not
recognise, and everything after it, reaches the CLI unchanged. `ak`
replaces itself with the CLI (`exec`), so Herdr and your terminal see the
agent itself.
Inside a Herdr pane, `ak` also makes Herdr restore the pane after a restart
as `ak <kind> @<profile> --resume <id>` — the same account, key and posture —
instead of the bare CLI ([Profiles → Resuming after a Herdr restart](docs/profiles.md#resuming-after-a-herdr-restart)).
In any other terminal, `ak last` relaunches the last `ak <kind> @<profile>` of
the current directory with `-c` (`-r` for the picker, `ak last ls` for the list).

## How it fits with DeepWorkPlan

Expand Down
3 changes: 2 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

| Version | Supported |
| --- | --- |
| 1.1.0 (latest) | yes |
| 1.2.0 (latest) | yes |
| 1.1.0 | yes |
| 1.0.1 | yes |
| 1.0.0 | yes |
| 0.7.1 | yes |
Expand Down
15 changes: 14 additions & 1 deletion docs/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,19 @@ a lead agent send one keystroke only — the folder-trust screen of its own
lane, on a pane it launched, when `--trust-cwd` was unavailable — and
escalates every other screen.

## Herdr resume watcher

An interactive launch inside a Herdr pane (`HERDR_ENV=1`) starts one
detached watcher (`lib/restore.py`) that runs the `herdr` CLI found on
`PATH`: `herdr pane get <its pane>` every 2 seconds and, on a new session
id, `herdr pane report-agent-session` with the resume command
`ak <kind> @<profile> [--ask] --resume <id>`. It talks only to the local
Herdr server of that pane, writes no file, prints nothing, and exits with
the CLI. Its environment is `PATH`, the home and temp variables and
`HERDR_*` only: no key, token or profile home reaches it, and the resume
command carries a kind, a profile name and a session id, never a secret.
`AGENTKIT_HERDR_RESUME=0` turns it off.

## Profiles with a HOME of their own

Cursor and Antigravity profiles get a separate `HOME` whose other entries are
Expand All @@ -210,7 +223,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/<cli>@<profile>.json` (usage numbers only), `leases/leases.json` | dirs 700, files 600 |
| `~/.local/state/agentkit/` (`AGENTKIT_STATE_DIR`) | `usage-cache/<cli>@<profile>.json` (usage numbers only), `leases/leases.json`, `launches.json` (per working directory: the kind, profile and posture of the last interactive launch, for `ak last`) | dirs 700, files 600 |
| a CLI's own config | Codex overlay `<provider>.config.toml`, one provider in OpenCode's `opencode.json` / Pi's `models.json` — only when you launch that provider kind, inside the profile when one is used; one-time `.agentkit.bak` before the first change | 600 for files it creates |

`ak usage`, `ak pick` and `ak capacity` write nothing but the usage cache;
Expand Down
1 change: 1 addition & 0 deletions docs/TESTING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ when nothing failed.
| `ak alias` (`lib/aliases.py`), the rc block, the `classic` preset | `aliases` |
| `skills/agentkit/` | `skill` |
| `ak profiles hooks` (`lib/hooks.py`) | `hooks` |
| Herdr resume and `ak last` (`lib/restore.py`, `lib/last.py`, the launch hook in `lib/launch.py`, checks in `tests/py/restore_checks.py`, the fake `tests/fakes-host/herdr/herdr`) | `restore` (+ `dispatch`, `security`) |
| anything that prints, logs or writes | `security` |
| the frozen interface (grammar, env prefix, outputs) | `contract` |
| `scripts/check-public-hygiene.sh`, `.public-hygiene-allow`, any tracked file | `hygiene` (and the CI job `public hygiene`: `bash scripts/check-public-hygiene.sh`) |
Expand Down
2 changes: 1 addition & 1 deletion docs/doctor.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The JSON form is the contract. Schema: [`schema/doctor-v1.json`](schema/doctor-v
```json
{
"interface": 1,
"version": "1.1.0",
"version": "1.2.0",
"os": "macos",
"kinds": {
"claude": { "cli": "claude", "provider": null, "installed": true, "path": "/…/claude", "version": "2.1.295 (Claude Code)", "logged_in": true },
Expand Down
4 changes: 2 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
macOS, Linux, WSL (and Git Bash):

```bash
git clone --branch v1.1.0 https://github.com/DailybotHQ/coding-agents-kit
git clone --branch v1.2.0 https://github.com/DailybotHQ/coding-agents-kit
./coding-agents-kit/install.sh
```

Windows (PowerShell 5.1 or 7):

```powershell
git clone --branch v1.1.0 https://github.com/DailybotHQ/coding-agents-kit
git clone --branch v1.2.0 https://github.com/DailybotHQ/coding-agents-kit
.\coding-agents-kit\install.ps1
```

Expand Down
58 changes: 58 additions & 0 deletions docs/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,64 @@ does not parse is refused and left untouched. The real home is read, never
written. Rerunning is a no-op. Cline has no Herdr integration (Herdr reads
its screen). `ak doctor` shows `herdr_hooks` per profile.

### Resuming after a Herdr restart

When Herdr restarts (a reboot, `herdr server stop`), it reopens each agent
pane from the session the CLI's Herdr integration reported. By itself it
runs the bare CLI (`claude --resume <id>`): no profile home, no key from the
env file, no autonomy flag, so the session is not found, the wrong account
opens, or the CLI asks for a login.

`ak <kind> [@profile]` started inside a Herdr pane (`HERDR_ENV=1`,
`HERDR_PANE_ID`) fixes that on its own. Next to the CLI it starts a small
detached watcher that reads the pane through the `herdr` CLI and, each time
Herdr records a new session id for that CLI, reports it again with the
command Herdr runs on restore:

```text
ak <kind> @<profile> [--ask] --resume <id>
```

- The profile is always explicit (`@default` included), so a default
profile set later cannot move the session to another account; `--ask` is
kept when the launch opted out of autonomy. A provider variant keeps its
kind (`ak claude-glm @x --resume <id>`).
- A new id (`/clear`, a new conversation) is reported again: Herdr keeps an
earlier resume command when a later report omits it.
- The watcher exits with the CLI, never prints into the pane, and gets no
key or token: only `PATH`, the home and temp variables and `HERDR_*`.
- It covers every CLI Herdr reports sessions for (claude, codex, cursor,
opencode, pi, grok and their variants), on macOS, Linux and Windows.
Antigravity and Cline have no Herdr session report, so there is nothing to
resume.
- It needs the session report itself: the CLI's own home has it after
`herdr integration install <cli>`; a profile needs `ak profiles hooks
<cli> @name` (above). Panes started before this version are reported from
their next launch.
- `ak` must be on the `PATH` of the shell Herdr restores into.
- `AGENTKIT_HERDR_RESUME=0` turns it off; Herdr then restores the bare CLI.

### Back to the last session in any terminal: `ak last`

Every interactive `ak <kind> [@profile]` records, per directory, which kind
and profile it launched. In a terminal without Herdr (or after closing the
pane), go back to it from the same directory:

```bash
ak last # = ak <kind> @<profile> [--ask] -c: continue the newest session here
ak last -r # the same account, with the CLI's session picker
ak last ls # what is recorded: directory, command, time
```

`ak last` prints the command it runs on stderr. Continuing is the CLI's own
`-c` in that profile's home (the table in the [README](../README.md)), so it
picks the newest session of that account in this directory. When two sessions of
the same account run in one directory, that is the most recently active one:
use `ak last -r` to choose. Only interactive
launches are recorded (`ak run` is not); the record keeps the 200 most
recent directories in the kit's state directory (`launches.json`, mode 0600)
and holds no key and no session id.

## Limits

- Whether running several subscriptions of one provider at once is allowed
Expand Down
2 changes: 1 addition & 1 deletion docs/schema/capacity-v1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.1.0/docs/schema/capacity-v1.json",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.2.0/docs/schema/capacity-v1.json",
"title": "ak capacity --json (capacity-v1)",
"description": "One account's headroom and a verdict, computed with ak pick's arithmetic (pick.evaluate: the smallest free share of the governing windows, a 10% reserve on windows of 7 days or more) and pick's lower-only drill cap. The reading comes from the kit's usage cache when fresh (usage numbers only; ak usage is the only command that always reads live). Exit 0 for every reading; the verdict is here, not in the exit code. Never contains a secret value. Consumers check `schema` and `interface` first; additional keys may appear in later minor versions.",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion docs/schema/doctor-v1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.1.0/docs/schema/doctor-v1.json",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.2.0/docs/schema/doctor-v1.json",
"title": "ak doctor --json (interface 1)",
"description": "What coding-agents-kit reports about a machine. Never contains a secret value: keys are variable names only. Consumers check `interface` before reading anything else; additional top-level keys may appear in later minor versions.",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion docs/schema/leases-v1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.1.0/docs/schema/leases-v1.json",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.2.0/docs/schema/leases-v1.json",
"title": "ak lease ls --json (leases-v1)",
"description": "Every active (unexpired) advisory account lease on this machine, oldest first. Leases grant nothing: ak pick --owner and the orchestration skill respect them. Holds profile names, owner addresses, times and a purpose note; never a secret value or a path. Additional keys may appear in later minor versions.",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion docs/schema/pick-v1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.1.0/docs/schema/pick-v1.json",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.2.0/docs/schema/pick-v1.json",
"title": "ak pick --json (pick-v1)",
"description": "The account(s) with the most usable headroom for a kind, chosen from the same rows as `ak usage` by one documented policy (docs/usage.md#choosing-an-account). No login is refreshed, no reset is spent; since 0.6.0 a fresh reading may come from the kit's usage cache (usage numbers only; --max-age). Never contains a secret value or an account identity. Consumers check `schema` and `interface` before reading anything else; additional top-level keys may appear in later minor versions.",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion docs/schema/profiles-v1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.1.0/docs/schema/profiles-v1.json",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.2.0/docs/schema/profiles-v1.json",
"title": "ak profiles --json (profiles-v1)",
"description": "Every account the kit knows, portable to another host: names and kinds only. Never contains a secret value, an account identity or an absolute path. Another host recreates the set with `ak profiles add <cli> @<name>` and logs each one in. Consumers check `schema` and `interface` first; additional keys may appear in later minor versions.",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion docs/schema/setup-probe-v1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.1.0/docs/schema/setup-probe-v1.json",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.2.0/docs/schema/setup-probe-v1.json",
"title": "ak setup probe --json (setup-probe-v1)",
"description": "What a machine or container looks like to someone about to install or configure coding-agents-kit. Read-only; it works from an uninstalled clone. Never contains a secret value: keys are variable names only. Consumers check `schema` and `interface` first; additional top-level keys may appear in later minor versions.",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion docs/schema/setup-verify-v1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.1.0/docs/schema/setup-verify-v1.json",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.2.0/docs/schema/setup-verify-v1.json",
"title": "ak setup verify --json (setup-verify-v1)",
"description": "A closed list of named checks about a kit setup, each with a verdict and the one command that repairs it. Read-only: verify never applies a repair. Never contains a secret value. Consumers check `schema` and `interface` first.",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion docs/schema/usage-v1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.1.0/docs/schema/usage-v1.json",
"$id": "https://github.com/DailybotHQ/coding-agents-kit/blob/v1.2.0/docs/schema/usage-v1.json",
"title": "ak usage --json (usage-v1)",
"description": "Quota and usage of each account the kit can see, one row per credential identity. Never contains a secret value, an account identity (e-mail, organisation, id) or a token. The endpoints behind it are vendor-internal and unofficial: a row whose source changed shape reports status `error`, never a crash. Consumers check `schema` and `interface` before reading anything else; additional top-level keys may appear in later minor versions.",
"type": "object",
Expand Down
Loading
Loading