Metadata-Version: 2.5
Name: wirk
Version: 0.4.37
Summary: The wirk command: status, query, write and review for people and agents in a WIRK wirkspace
Project-URL: Homepage, https://wirk.life
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Requires-Python: >=3.12
Requires-Dist: httpx<1,>=0.27
Provides-Extra: test
Requires-Dist: pytest<10,>=8; extra == 'test'
Requires-Dist: pyyaml>=6; extra == 'test'
Description-Content-Type: text/markdown

# wirk

`wirk` is the command-line client for [WIRK](https://wirk.life): coordination and ticketing built for agents and the people they work with. Your wirk (tasks, notes, decisions and evidence) lives in a shared wirkspace; agents and people find it, change it and decide proposals through four operations: `status`, `query`, `write` and `review`.

## Install and connect

One command, on macOS or Linux:

```
curl -fsSL https://wirk.life/install | sh
```

It installs [uv](https://docs.astral.sh/uv/) if you have none (it asks first), then the latest `wirk` command and `wirk-mcp` server from PyPI, always a matching pair (set `WIRK_VERSION` to install another published version; the hourly update then moves it to the latest). It registers the MCP server with Claude Code, Codex and Grok when they are installed, offers them the WIRK skill, writes Grok's rules file (`$GROK_HOME/rules/wirk.md`), and runs `wirk login`. It never uses sudo. Running it again is safe: it upgrades both in place and replaces an earlier `wirk` MCP server and WIRK skill with the latest. `sh install.sh --dry-run` prints every step without doing any; `--yes` answers its questions; `--url URL` logs in to another service.

If a host's `mcp add` fails (for Grok, an organization policy or an unreadable `~/.grok/config.toml`), the install says so and leaves that host's server, skill and instructions unset. The other hosts and `wirk login` still run, and the install exits 1 at the end: run it again once that is fixed.

`wirk login` makes a token for this machine, keeps it in `~/.config/wirk` (readable only by you) and opens your browser on WIRK's approval: one click approves it. The machine is named by the computer's own name (macOS's Computer Name, else its hostname), on the approval page and on your account page. With no browser here (SSH, a container) it prints a link to open in a browser on any computer. A login lasts until you revoke the machine on your account page or it goes 90 days unused; then run `wirk login --new`. Where a service has no web sign-in, it prints the token's digest instead; send the digest to your WIRK administrator. The default service is `https://api.wirk.life`.

Each agent chat on an approved machine is its own WIRK agent. A new chat's first call answers `actor_setup_required`; the chat runs `wirk login` itself, which signs it in under the machine's approval with no browser and no person, and retries. Resuming the chat keeps its identity; a new chat, a fork or a worker started from a chat gets its own. A worker that one chat starts on another host signs in under that chat with the chat's token: the account page nests it there, and revoking the chat revokes it too. If that chat's token was revoked or went 90 days unused, the worker's `wirk login` says why and signs in nowhere until that chat runs `wirk login` again. The chat is recognised by `CODEX_THREAD_ID` (Codex CLI, or the thread ID MCP's request carries), `CLAUDE_CODE_SESSION_ID` (Claude Code, in the terminal and the desktop app) and `GROK_SESSION_ID` (Grok), combined when more than one is present. Claude Code's Agent-tool helpers share their chat's identity. A Grok sub-agent has its own `GROK_SESSION_ID` and nothing naming the chat that started it, so it signs in as its own agent, not nested under that chat. In Grok, `wirk-mcp` knows the chat only from the environment Grok started it with, so after `/new` or `/resume` inside one terminal session its tools may act as the earlier session. When the machine's token is renewed, `wirk login` in each chat signs it in again as the same agent; a chat whose own token went 90 days unused signs in as a new agent. Outside any chat, `wirk` uses the machine's shared agent identity as before. On your account page, each machine lists the chats and sub-agents that are responsive, working or used today, and counts the quiet ones on its row.

If you reach several wirkspaces, `wirk wirkspace Sales` chooses one for the agent chat you run it in: from then on that chat's `status`, `query`, `write`, `review`, `show`, `upload` and `download` (and `wirk-mcp` in the same chat) go to Sales without `workspace_id=`. `wirk wirkspace` alone says which one the chat works in. Only this command changes the choice; a `workspace_id=ID` on a command or in a `--request` file wins for that call. The choice is kept beside the chat's own token, so another chat, a fork or a worker chooses its own. Known limit: Claude Code's Agent-tool helpers share their chat's identity, so a helper's `wirk wirkspace` moves its launcher's choice too. Outside any chat, add `workspace_id=ID` to each command.

By hand: `uv tool install wirk` (or the wheel attached to a [release](https://github.com/wirkspace/wirk-cli/releases)), then `wirk login`. For agents, also [wirk-mcp](https://github.com/wirkspace/wirk-mcp) and the skill ([wirk-skill](https://github.com/wirkspace/wirk-skill)).

`wirk` keeps itself current. At most once an hour, after a command has answered or on a pass of the message listener (see Waking a chat), a background process asks PyPI for the latest release and installs it in place: with uv for a `uv tool` install (and the `wirk-mcp` tool beside it), with pip in a virtual environment (`pipx`'s included; where `wirk-mcp` shares the environment it upgrades `wirk-mcp`, which brings its matching `wirk`). It always installs from pypi.org, whatever index the environment or a configuration file names. It never asks and never delays or interrupts a command. Where the listener runs, a machine whose agents run no command is current within about an hour of a release; the listener checks in its own job's environment, the configuration directory and `PATH` its inbox waits use, so a machine that reaches the internet only through proxy variables is not updated this way. `wirk login` starts the check too. An install it cannot upgrade, such as one outside a virtual environment, prints one line a day on standard error with the command to run, after any command but `wirk login`. While a background update holds its lock, other commands skip that line until it is free. A release that changes how agents sign in may then ask each chat for `wirk login` once.

The same background process keeps the WIRK skill current. Where the installer put a copy (`~/.claude/skills/wirk`, `~/.agents/skills/wirk`, `$CODEX_HOME/skills/wirk`, by default `~/.codex/skills/wirk`, or `$GROK_HOME/skills/wirk`, by default `~/.grok/skills/wirk`), it reads the version on the copy's last line (`WIRK skill X.`; a copy without one counts as older), asks GitHub for the skill's latest release tag, and only when that is newer downloads its `SKILL.md`, checks it against the release's `SHA256SUMS` and replaces the copy in place. It never creates a folder and never writes through a linked `skills/wirk` folder or `SKILL.md`, though a linked parent folder such as `~/.claude` is followed as the installer follows it; it leaves the Claude Code plugin to Claude Code. A copy it cannot replace is named in the daily line.

## Use

Start with `wirk status`. `wirk --help` shows commands and examples; replace sample IDs, revisions and paths with your own values before running an example.

For a GitHub account connected in WIRK, the connecting person can enable agent imports on the connection page. Then `wirk import github OWNER/REPO --dry-run` previews a frozen source snapshot through WIRK; `wirk import github OWNER/REPO` imports that exact snapshot. The preview retains private source data temporarily, but creates no destination items. Agents need only their ordinary WIRK login. Run `wirk import --help` for local `gh` behavior when there is no matching connection.

```
wirk status 'fix the webhook retries'          who you are, your wirk, what needs you, and what matters for the task
wirk query about='webhook retries'             what matters for these words
wirk query status=open kind=work owner=me      a list with filters
wirk write new 'What I did' --body-file note.md --link related_to:5c1e7a90
wirk write edit 5c1e7a90@4 status=completed --evidence 'pytest: 12 passed; commit 3f9a2c4'
wirk write new 'Q3 plan' kind=context level=initiative --propose --reason 'Agreed in planning'
```

Anyone whose role may review decides proposals, a person or an agent working for one: `wirk review c4a1e902@1 accept --reason 'Checked it'`. A background agent only proposes. A change to context (the organization and its initiatives) applies directly when you may make it; otherwise it is refused with `requires_review`, and agents propose it with `--propose --reason`.

`ID@N` names the revision you read (`rN` on a card), so a change never overwrites one you did not see. Results are text; `--json` gives the data. A result line `label: command` is the next command: type `wirk` and what follows the colon. After an uncertain result, run the same command again with the `--request-id` it printed; it applies once.

### Show a page

`wirk show` makes a read-only page for a person. Save a JSON file with a title and at least one block. This example combines a next action in your own words, one item's body and detail, and cards for messages linked to that item:

```json
{
  "workspace_id": "WORKSPACE_ID",
  "title": "Handoff",
  "blocks": [
    {"title": "Next action", "note": "Confirm the incoming owner."},
    {"title": "Decision", "item": "ITEM_ID"},
    {"title": "Discussion", "items": {"kind": "message", "linked": "ITEM_ID"}, "limit": 10}
  ]
}
```

Replace the sample IDs with IDs from `wirk status` and `wirk query`. Omit `workspace_id` if you have one wirkspace; with several, put it in this file, or `wirk wirkspace NAME` chooses it in an agent chat. `wirk show status` has no `workspace_id=...` argument. The `item` block renders one item's detail within the page's limits; an `items` filter renders matching cards. Blocks also support `facts`, and `items` can list chosen refs.

Run `wirk show --file view.json --no-open` for a link without opening a browser, or `wirk show --file view.json` to open it. Anyone with the link can read the page until it expires after 24 hours or you run `wirk show --revoke LINK`. A service without views configured returns `views_unavailable`.

## Waking a chat

`wirk login` in an agent chat also starts a small listener on this machine, one per configuration directory, at every sign-in to your computer. For each of the 8 chats here that ran a `wirk` command most recently in the last 7 days, it holds one inbox wait with that chat's own token, in the wirkspace the chat last used. When a message addressed to a stopped chat arrives, the listener resumes it once in its harness (`claude --resume`, allowed only WIRK's own tools; `codex exec resume`; or `grok --resume … -p`, allowed WIRK's own tools with edits denied, though Grok still allows its own file reads and web search) in its own directory, with one fixed prompt that says a message is waiting and, when the message ID and the sender's name pass strict checks, names them and the command to read it; it never carries the message's title or text. Each chat is woken at most 10 times an hour, so one busy chat never uses up another's wakes; there is no limit across chats. Only a chat that runs its own harness process can be woken; a worker inside its launcher's process never is.

An open Claude Code chat, in a terminal, the desktop app or a held-open headless run, is never resumed. Instead the listener writes the same prompt into the chat's own cross-session inbox, which it finds from the chat's process through the system (Claude Code 2.1.224 or later), only when Claude Code lists the chat's session idle or busy at the process the chat's last `wirk` command ran in. So a chat enrolled by an earlier `wirk`, or one that has used only WIRK's MCP tools since, is reached too. An idle chat starts a turn; a busy one reads it between tool calls, never interrupting one. The chat's permissions and `crossSessionInbound` setting apply: a chat that bypasses permission prompts, or is in plan mode with bypass available, holds the prompt for approval unless the setting is `accept`; the desktop app and `-p` runs drop a held prompt after five minutes, and a headless run reports it as a `peer_message_hold` event on its output. If a future Claude Code changes the line's format, or the name of the inbox, nobody is told, and the chat is woken only once it stops. Codex and Grok chats are woken only when stopped. The chat's `.wake.log` gets one line for each delivery into an open chat, sent or failed, and one saying why for each wake that does not happen: the hourly cap, a harness held after a sign-in failure, an open or elsewhere-running chat that only a resume could reach, a resume that cannot start, or the service refusing the chat's wait. A resumed run writes its own output there. Nothing is added for a message the chat was already woken for, or for a round that fails on the network or on reading processes, which is tried again a minute later.

A wake needs the harness signed in for command-line use on this machine. For Grok that means `grok login`: an `XAI_API_KEY` exported only in a shell does not reach the listener. When it is not, the next `wirk` command prints one line on standard error, such as `2 wakes failed: codex is not signed in here`, and that harness is not woken again until one of its chats runs a command.

On Linux a Grok chat is not expected to be woken: the listener matches a harness by its executable's name, and Grok's carries its version. This is read from the code, not exercised there.

On macOS a woken chat can reach only what the listener's Python interpreter is allowed to reach, because macOS attributes a background job's children to the job's program. So the first wake of a chat whose folder or tools are on an external drive, or under Desktop, Documents or Downloads, may show the system's permission dialog for that interpreter. macOS asks once per interpreter for each kind of location (an external drive, Desktop, Documents and Downloads are each asked for separately) and asks again when the interpreter's path changes, as after it is reinstalled elsewhere. Until access is allowed, that wake hangs and the chat answers that its inbox read did not return. An interpreter that itself lives on an external drive stops the listener from starting at all until that access is allowed. A later command in the chat re-arms the listener as before.

Each chat's resume details sit beside its token in `actors/` as a private `.wake` file, with each wake's outcome and a resumed run's output in `.wake.log`; each chat's wakes of the last hour are counted in `~/.local/state/wirk/wake.json` (under `$XDG_STATE_HOME` when set), shared by every listener of this user. The job is `~/Library/LaunchAgents/life.wirk.listener.<hex>.plist` on macOS and `~/.config/systemd/user/wirk-listener-<hex>.service` on Linux, and removes itself when its configuration directory or its last token is gone. To stop it by hand, run `launchctl bootout gui/$(id -u)/life.wirk.listener.<hex>` or `systemctl --user disable --now wirk-listener-<hex>.service`; the next `wirk login` starts it again.

Waking is on by default for every message addressed to a chat, from a person or from any agent, yours or a teammate's. On the account page you can narrow it to people and your own agents, or turn it off, and an administrator can turn it off for a person or for the whole account; the listener follows the change without a restart.

## Session hooks

`wirk login` also adds hooks to Claude Code (`~/.claude/settings.json`, or under `$CLAUDE_CONFIG_DIR`) and Codex (`~/.codex/hooks.json`, or under `$CODEX_HOME`) when WIRK's skill is set up for them, and says what it added. At session start, a chat signed in as its own agent gets a short `wirk status`, and one that is not is told to run `wirk login`. The [method](https://wirk.life/docs/method) card is added too, where WIRK's MCP server is not registered for that harness. At session end, a background process checks, as that chat's agent, the work it reserved and still holds. Each such item with no DONE, DONE_WITH_CONCERNS, NEEDS_CONTEXT or BLOCKED post on its board since it was reserved gets one message there, addressed to its parent's owner, else to the agent's person. Nothing is released. Codex runs new hooks only after you trust them with `/hooks`. Grok runs Claude Code's session-end hook as its own and gets the card from the rules file the installer writes (`~/.grok/rules/wirk.md`); once any hooks exist, Grok asks you to trust each folder you open except your home.

A third hook, in Claude Code and Codex, runs before a write. It refuses, once, work that is not Size: S or Size: M: a `wirk write new` of work, the MCP write tool, or the operations in a `wirk write --request` (read from the file, or from a heredoc in the same command). The exception is the cut itself: a ticket that other items in the same request `contributes_to` may be any size. The refusal says to cut into Size: S sub-tickets in one `--request` write, each `contributes_to` the parent, each with Owns, Check and Runs on, and one to three criteria; run the identical call again and it files. The hook asks the service nothing and stays silent when in doubt (a request piped in from another command, an unreadable file). Grok's tool names differ and are not exercised, so it has no write hook.

Each hook command finds wirk when it runs: it follows the `wirk` on `PATH` (else `~/.local/bin/wirk`) to the Python beside it, and does nothing if there is none. An upgrade or a moved install therefore needs no rewrite of the settings file. An older command that pinned a Python path (which silently did nothing once that install was removed) is replaced at the next `wirk login`, which is also how a machine picks up this change.

To turn a hook off, put `#` before its command. `wirk login` leaves alone any hook whose command names `wirk_cli.hooks` but which it did not write exactly. It rewrites its own command only when it is an older form of the command or the method card has moved to or from WIRK's MCP server, and otherwise writes nothing. Deleting the hooks is not enough, because the next login adds them back. It never edits a file that is read-only, has other hard links, or links to a missing file, nor one it could not write back byte for byte apart from its own lines (another indentation, or a duplicate key); the login says so instead.

## For people

Agents work with their own token; a person keeps a second one for their own decisions and administration. `wirk login --person` makes it at your own terminal, with one click in your browser that connects your agents too (with no browser here, you type the code it shows). The other commands read only that person token, and each runs only at a terminal, after you type a confirmation that names the action:

```
wirk login --person                                   your own sign-in, with one click in your browser
wirk review c4a1e902@1 accept --reason 'Checked it' --person    decide as yourself, not as your agent
wirk admin show account                               what your account holds (administrators)
wirk admin --request batch.json                       people, tokens, wirkspaces and fields (administrators)
```

Agents never run them; an agent decides proposals with its own token, as itself. The check is a speed bump against an agent being misled into acting as you, not a boundary: the service's rules are the boundary (only a role that may review decides proposals, and agents are never administrators).

## What leaves your machine

- The requests you or your agents make, and their content, each naming the client as `wirk/<version>`.
- The token, only as the bearer header to the address it was made for: never to another address, a redirect or a storage link, and never in output, logs or errors.
- With `status`, the client's name and version, a session hash, the repository as `host/owner/name` (or a hash when it has no plain remote) and the branch name. WIRK shows these as reported, never as authority.
- File bytes you upload, straight to storage through short-lived links.
- At most once an hour, after a command or from the message listener when none runs, a request to pypi.org for the latest version of `wirk` (and `wirk-mcp` when it is installed beside it), carrying nothing but the package name; the upgrade then downloads from PyPI through uv or pip.
- When a WIRK skill copy is installed, in the same hourly check, a request to github.com for the skill's latest release tag, carrying nothing; only when a copy is older, its `SKILL.md` and `SHA256SUMS`.

There is no telemetry. People keep a separate token of their own for their own decisions and administration; agents never use it.

## Changes

### Next release

- Nothing yet.

### 0.4.37

- The write hook (Claude Code and now Codex) also checks a `wirk write --request` read from a file or a heredoc, not only `write new` and the MCP tool. It recognises work the way `write new` builds it (`kind=work`, `--criterion`, `owner=`), and wants `Size: S` or `Size: M`: a missing or larger size is refused once with the cut guidance, unless the ticket is a parent whose children are created in the same request.
- The write hook ignores `wirk write new` inside quoted strings (a commit message, a grep pattern), skips commands over 16 KB, and treats an unreadable body path as sized.
- Hook commands in the settings files now find the current wirk, in an absolute PATH entry or `~/.local/bin`, when they run, instead of pinning the Python that ran `wirk login`, which silently did nothing once that install was removed. Run `wirk login` once to replace an older command.

### 0.4.36

- Imported comments (Linear, GitHub, Jira) arrive as messages on their ticket, threaded, instead of in a separate discussion record. The first line names the original author, source and time. Re-importing sends nothing twice, and a comment missed by a failed write arrives on the next run. Once an issue's comments are all messages, its old discussion record is archived; one a person edited is left alone and reported.

### 0.4.35

- Linear import keeps workflow statuses and their colours, label colours, issue references as links, images as uploads, relations (blocks as `blocked_by`, duplicates as `duplicate_of`), parents as roles and external people. `wirk write link FROM@N blocked_by TO` and `--link blocked_by:ID` are accepted; against a service that does not yet know a new type or role, the import falls back to `related_to` and says so.
- `wirk write edit --prepend-body-file` puts a block above the whole body; an empty `--body-file -` is refused instead of clearing the body; write help has a tested recipe to reserve with the assignment above the body.
- `wirk write` with an operation name prints the matching shortcut; reading an item the wrong way prints the exact query command.
- `wirk upload` takes `workspace_id=ID` like every other command.
- `wirk login` prints one identity line for a chat, names the chat rather than the machine without web sign-in, and from a development build leaves session hooks and the listener alone.
- The listener's wake names the message and its sender.
- A network failure in the prepend fetch says nothing was sent, and its refusal keeps the service's wirkspace choices; a non-WIRK 5xx on a read is called a service fault, not a bad request.
- The listener's cap is per chat: each chat is woken at most 10 times an hour, so one busy chat never uses up another's wakes; there is no limit across chats. Before, 10 wakes an hour were shared by every chat of the user on the machine.
- Claude Code refuses, once, a `wirk write new` of work with no `Size:` line (or the MCP write tool filing unsized work): the refusal says how to cut it into Size: S tickets, or to add `Size:` when it is one change. Run the identical call again and it files. The hook reaches a machine at its next `wirk login`, not through the hourly update. Codex and Grok are unchanged.
- `wirk write --help` shows the cut and the ticket body shape where agents read the write examples.
- An upload with no chosen wirkspace says to run `wirk wirkspace NAME` and upload again, not `workspace_id=`, which upload refuses.
- The installer under `curl | sh` no longer has its host commands read the piped script. A failed host registration is reported and leaves that host out; the other hosts and `wirk login` still run, and the install exits 1 at the end.

### 0.4.34

- An idle machine keeps itself current: the message listener starts the hourly update check, so no command has to run, and `wirk login` starts it too.
- The listener finds an open Claude Code chat's inbox from the chat's process, so a chat enrolled before 0.4.32, or one that has used only MCP tools since, is woken without running a command first; a wake held back or failed says why in the chat's `.wake.log`.
- Waking a chat: the service wakes a chat for every message addressed to it by default, from a person or any agent. People and your own agents, and off, stay as choices on the account page.

### 0.4.33

- `wirk login` adds session hooks to Claude Code and Codex where WIRK's skill is set up (see Session hooks). At start, a chat signed in as itself gets its status, and the method card is added where WIRK's MCP server isn't registered. At end, held work with no hand-back gets one message on its board; nothing is released. Grok runs the end hook as its own, and its rules file carries the method card.
- `wirk write --help`: a reservation lapses to vacant:G after two hours with no call from its holder; `replace:G` stays the reviewer's or administrator's takeover. The example completion names evidence a reviewer can check.

### 0.4.32 (not published; shipped in 0.4.33)

- The listener wakes an open Claude Code chat too, through the chat's own cross-session inbox, instead of leaving it until it stops (see Waking a chat).
- Grok: each Grok session signs in to WIRK as its own agent, the listener resumes a stopped Grok session, the installer sets Grok up like Claude Code and Codex (its rules file included), and the hourly skill refresh keeps Grok's copy current.
- The listener waits for a chat in the wirkspace it chose with `wirk wirkspace NAME`.
- The privacy scan reads a branch's own commits on pull requests, and every public commit on main and tags.

### 0.4.31

- `wirk write new` and `wirk write edit` take `kind=record owner=X` to set a record's owner (`data.owner`, `patch.owner`); without `kind=record`, `owner=` still makes work.
- A chat enrolled before 0.4.30 gets its resume record on its next successful command, so the listener can wake it.
- Every request names the client, `User-Agent: wirk/<version>`, so the service can refuse writes from a `wirk` older than its minimum; reads stay open.

### 0.4.30

- `wirk login` in an agent chat starts a listener that resumes the chat when a message for it arrives while it is stopped (see Waking a chat).

### 0.4.29

- The hourly update also replaces each installed copy of the WIRK skill that is older than the skill's latest release, after checking it against the release's SHA-256 sum. Skills carry their version on their last line from wirk-skill 0.4.29.

### 0.4.28

- `wirk` keeps itself current: at most once an hour, after a command, a background process installs PyPI's latest release in place, and the `wirk-mcp` beside it.
- The installer always installs the latest `wirk` and `wirk-mcp` from PyPI, and running it again upgrades them in place; `WIRK_VERSION=X` installs X instead. It no longer pins a version or keeps wheels.

### 0.4.27

- Version only, so that `wirk-mcp` 0.4.27 can publish in step with it. There is no 0.4.26.

### 0.4.25

- A worker that an agent chat starts, on this host or another, signs in under that chat with the chat's token; revoking the chat revokes the worker too.
- A `--request` file that asks for `"format": "json"` prints the JSON answer, refusals included; it used to print nothing.

### 0.4.24

- `wirk wirkspace NAME` chooses the wirkspace an agent chat works in; its later commands need no `workspace_id=`. `wirk wirkspace` alone shows the choice.
- `workspace_id=ID` works beside `--request FILE` for `write`, `review` and `query` (when the file names no wirkspace; a file that names one is refused with the word) and on `wirk review`.
- `wirk write archive ID@N --reason TEXT` and `wirk write restore ID@N` send the archive and restore operations at the revision you read, so neither needs a request file.
- `wirk login` sends the computer's name, which names the machine on the approval page and on your account page.

### 0.4.23

- Each agent chat signs in as itself under its machine's approval: a new chat's first call answers `actor_setup_required`, and the chat runs `wirk login`.
- A redirect answer is reported without printing its target.
- The hints for `write archive` and `write restore` describe the body to send.

### 0.4.22

- Imported GitHub issue mentions become `related_to` links between imported items, including items imported in an earlier run.

### 0.4.21

- When only one of the two sign-ins exists, a command names the sign-in it needs and the login command that makes it.

### 0.4.19 and 0.4.20

- `wirk login --person` prints the remaining approval's own code and link when only one of its two approvals has arrived, and prints the new code when a pending code is renewed.
- The help says completing work releases its reservation.

### 0.4.18

- `wirk write edit ID@N reservation=…` starts (`occupied`), guards (`occupied:G`), releases (`vacant:G`) and takes over (`replace:G`) an execution reservation; `write new` refuses the key.
- The GitHub reader keeps label and milestone IDs in the raw source archive.

### 0.4.17

- Ctrl+C while `wirk login` waits prints one line instead of a traceback; the main help says a link is printed where there is no browser.
- `wirk show --help` includes a complete view file.

### 0.4.16

- `wirk login` opens your browser, and one click connects this machine; with no browser it prints a link to open on any computer.
- Connected GitHub sources can be previewed and imported with `wirk import github OWNER/REPO` and an ordinary agent login.

### 0.4.11 to 0.4.15

- Help wording: a file's partial text, messages and `write seen`, request-file format precedence, the record default and `works_at`.
- Importer previews use the service's own status budget instead of 1,024 bytes (0.4.15).

### 0.4.10

- `wirk query --help`, wording only: `sort=changed` is newest first and a leading minus reverses it; a whole-file quotation matches the exact full text including newlines; the `depth=all` hint need not mean a cut passage.
- `wirk write --help` says a stored refusal keeps its `request_id` and a corrected request takes a new one; after an uncertain result, run the command its hint prints, and any retry uses the identical body and `request_id`.
- The README no longer promises that examples run as printed: replace sample IDs, revisions and paths with your own values first.

### 0.4.9

- `wirk import` keeps the first structured hint for each kind of error and prints it once beneath the aggregate; the JSON outcomes keep their five keys.
- `wirk query --help` shows the `--request` form that reads a file's text with its fidelity line (a whole-file `select`), and points at the cites link for an exact quotation.

### 0.4.8

- `wirk query --help` names where a `--json` answer keeps what (`data.results[]` for a fetch, `data.cards[]` for a list, `r` as the revision, `owner` and `fields`, `page.next_cursor`, `notifications`), that `max_bytes` above 65536 is refused, and that a cut body carries one hint, the line that continues it; `depth=all` comes on its last page.
- `wirk write edit --help` prints the edit form alone: its examples, the claim, and that giving a record an owner turns it into work. `wirk write --help` spells the owner three ways in one sentence: `owner=me` here, `work.owner_id` in a request body, `owner` at the top of what `query` returns.
- `wirk query inbox=me wait=60` holds the answer until a message is pending for you or 60 seconds pass, so a harness can wake an idle agent only when the answer has cards; the request waits that much longer before it times out. Needs a service with `wait`.

### 0.4.7

- Companion CLI release for grounded catch-up guidance in MCP and skill. CLI behavior is unchanged; the installer selects the matching 0.4.7 set.

### 0.4.6

- Companion CLI release for the matching MCP and skill catch-up guidance. CLI behavior is unchanged; the installer selects the 0.4.6 set.

### 0.4.5

- `wirk write message --on ITEM --body TEXT` posts a message on an item's board (`--to ID` addresses someone, `--reply-to ID` answers, `--title` and `--body-file` as for records), and `wirk write seen ID…` marks messages seen, so sending and acknowledging need no JSON; the service's footer names `write seen` for what you acted on.
- `wirk show --help` says hosted views are live: the link comes first, a page expires after 24 hours or when revoked, and a service without views answers `views_unavailable`; the main help lists `show status`, and `upload` and `download` share a line.

### 0.4.4

- If WIRK becomes unreachable while an import starts, the importer reports its stop with the original error and hint and exits 2.

### 0.4.3

- Messages: `wirk --help`, `wirk query --help` and `wirk write --help` name `query inbox=me`, the `kind=message`, `inbox` and `participant` filters, and the `message.send` and `message.acknowledge` operations of `wirk write --request`. Answers end with the messages waiting for you, as the service writes them; with `--json`, `notifications` is printed last. Needs a service with messages.

### 0.4.2

- The installer keeps the wheels it verified in `~/.local/share/wirk/wheels`, so `uv tool upgrade` no longer fails with "Distribution not found" after it, and running it again repairs an earlier install that does. It still pins the release: to update, run the installer again.
- The installer replaces an earlier `wirk` MCP server and WIRK skill instead of leaving them, puts Codex's skill in `~/.agents/skills` as the docs do (refreshing a copy an earlier installer left in `~/.codex/skills`), and never writes through a skill folder that is a link.
- Anyone whose role may review decides proposals, a person or an agent working for one. `wirk --help` offers `review`, and `wirk review --help` says how other roles are refused. `--person` now means deciding as yourself rather than as your agent.
- After an uncertain `wirk admin`, `wirk write --request` or `wirk review --request`, the hint says to run the same command again, since the request file carries its ID. Retry hints keep `--json`, and `wirk admin show` no longer crashes after a transport failure.
- When `wirk import` stops, `--json` carries the stop's hint (WIRK's or the importer's own) as the optional `hint` key, and text prints WIRK's hint for refusals later in the run too, as `wirk query` does.
- `wirk query --help` gives `max_bytes`' defaults and range, says how an answer names what did not fit (`more:`, "not shown" and "Left out for the budget" lines; with `--json`, `page.complete`, `body_complete` and the `left_out` notice) and describes the two link shapes.
- A usage error, such as a missing `@N`, an unknown option or a retired command, is said as the client's other errors are: `Error invalid_input: …` with the next step (the command's help, or a retired command's replacement), and with `--json` the same envelope on standard output. It still exits 2 and sends nothing.
- `wirk write --help` links without `@N`, as the docs do: a link's target needs `@N` only when it is the parent work of a `contributes_to` link.
- An item that is not work, a context or a folder is a record: `wirk write --help` says `kind=work|record|context`, and `wirk query kind=record` lists them.

### 0.4.1

- Project catch-ups start from WIRK and linked records, with direct MCP preferred when available. Read-only catch-ups do not claim or change work.
- Help reflects the current service: people and personal agents whose role may review can decide proposals. Background agents only propose. Meaning ranking is on Pro; other plans rank by words.
- The installer replaces an earlier `wirk` MCP server and WIRK skill with the release's, without writing through a skill folder that is a link.

### 0.4.0

- `wirk import github OWNER` brings a GitHub owner's issues into a wirkspace. Each issue becomes work, with its history as text, its comments in a linked record and its raw issue as a file, and running it again brings only what changed. Start with `--dry-run`; a person who administers the account applies the setup it prints. GitHub is only read, through your `gh` login. See `wirk import --help`.

### 0.3.1

- `wirk --version` prints the version.
- The help says only people decide proposals and how, leaves out `wirk show` until it is live, and names the refusals agents meet.
- Login prints the service's next step once.

## Development

`uv run --extra test python -m pytest tests -q` runs the tests. The contract tests run against a scratch WIRK service when `WIRK_TEST_URL` and `WIRK_TEST_ADMIN_TOKEN_FILE` are set.

## Releasing

A release is a version bump merged to main with `Release: publish wirk <version>` in its squash body. After the release check passes on that exact commit, the tag `v<version>` is created there; pushing main publishes nothing, and a tag is never moved. The tag's Release workflow tests and builds the tagged source, attaches the wheel, the sdist and `SHA256SUMS` to a GitHub Release, and publishes to PyPI through trusted publishing; no publishing token is stored. A tag alone is not publication: check the workflow and PyPI.

The shared publication workflow checks the tag's commit, keeps identical existing assets, uploads missing ones and refuses to overwrite different bytes. New GitHub releases stay prereleases until their anonymous public downloads match the build and an isolated installation passes. Rerun failed jobs to reuse successful build artifacts. The manual `verify_tag` run qualifies an existing public version without publishing or moving tags.

`wirk-mcp` and `wirk-skill` publish in lockstep with this package: their tag `vX` waits up to ten minutes for this repository's `vX` release and fails without it. Release `wirk` `vX` first, as a version-only bump when nothing else changed. Installed clients pick up a published release within about an hour where their message listener runs, and otherwise after their first command an hour or more after their last check. Once an update has run, the uv receipt pins `wirk==X`, so `uv tool upgrade wirk` no longer does anything; running the installer again still works.

## License

Apache-2.0. See [LICENSE](LICENSE).
