even-keel 0.2.1 → 0.2.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 +27 -0
- package/README.md +77 -88
- package/dist/src/account/current.js +4 -4
- package/dist/src/account/model.js +1 -1
- package/dist/src/account/watcher.js +4 -1
- package/dist/src/agent/providers.js +2 -1
- package/dist/src/autostart.js +32 -2
- package/dist/src/chain/dispatcher.js +8 -2
- package/dist/src/chain/launches.js +1 -1
- package/dist/src/chain/log.js +2 -0
- package/dist/src/chain/maincheck.js +19 -0
- package/dist/src/chain/mainci.js +4 -0
- package/dist/src/chain/mainfix.js +30 -0
- package/dist/src/chain/prompts.js +2 -0
- package/dist/src/chain/unchanged.js +47 -19
- package/dist/src/ci/watcher.js +12 -1
- package/dist/src/claude/adapter.js +8 -2
- package/dist/src/claude/cli.js +11 -3
- package/dist/src/claude/sdk/release.js +1 -1
- package/dist/src/claude/trust.js +77 -4
- package/dist/src/codex/adapter.js +2 -2
- package/dist/src/codex/plugins.js +20 -5
- package/dist/src/codex/version.js +1 -1
- package/dist/src/copilot/adapter.js +2 -1
- package/dist/src/copilot/cli.js +10 -5
- package/dist/src/copilot/home.js +19 -5
- package/dist/src/copilot/machine.js +20 -3
- package/dist/src/git/setup.js +2 -2
- package/dist/src/gitlab/adapter.js +1 -0
- package/dist/src/gitlab/source.js +13 -1
- package/dist/src/jira/adapter.js +1 -0
- package/dist/src/jira/api.js +13 -5
- package/dist/src/jira/source.js +20 -2
- package/dist/src/notice/en.js +7 -2
- package/dist/src/opencode/adapter.js +1 -1
- package/dist/src/packages/service.js +2 -0
- package/dist/src/packages/store.js +2 -1
- package/dist/src/paths.js +35 -0
- package/dist/src/projects/check.js +15 -6
- package/dist/src/projects/folder.js +8 -0
- package/dist/src/projects/state.js +1 -0
- package/dist/src/service/accounts.js +19 -4
- package/dist/src/service/chain.js +2 -2
- package/dist/src/service/stats.js +3 -0
- package/dist/src/sessions/protection.js +9 -6
- package/dist/src/stats/tally.js +2 -2
- package/dist/src/storage/atomic.js +19 -3
- package/dist/src/storage/database.js +5 -0
- package/dist/src/storage/migrations.js +17 -1
- package/dist/src/storage/schema.js +1 -1
- package/dist/src/tracker/model.js +4 -0
- package/dist/src/tracker/trackers.js +7 -0
- package/dist/tally/src/collect-worker.js +2 -2
- package/dist/tally/src/collect.js +3 -2
- package/dist/tally/src/db.js +3 -0
- package/dist/tally/src/steps.js +7 -2
- package/dist/tally/src/tracker-times.js +47 -0
- package/dist/web/assets/Loader-CRe-GCoI.js +31 -0
- package/dist/web/assets/{TaskCard-CjyQeVqL.js → TaskCard-C2xeaHWD.js} +2 -2
- package/dist/web/assets/TranscriptWindow-B9zsSmIg.css +1 -0
- package/dist/web/assets/TranscriptWindow-COL_WTrF.js +4 -0
- package/dist/web/assets/{feedLine-CDr3S8u-.js → feedLine-D0lnFyBZ.js} +1 -1
- package/dist/web/assets/index-DQje9Nfo.js +25 -0
- package/dist/web/assets/index-mDBlgk2Y.css +1 -0
- package/dist/web/assets/{media-CZ0HLFuK.js → media-BlW-XXN0.js} +1 -1
- package/dist/web/assets/useModels-DRW63oka.js +15 -0
- package/dist/web/index.html +5 -5
- package/even-keel.config.example.json +1 -1
- package/package.json +3 -2
- package/dist/web/assets/Loader-CG5xzofh.js +0 -31
- package/dist/web/assets/TranscriptWindow-2afYjYo9.css +0 -1
- package/dist/web/assets/TranscriptWindow-z3VnB6bE.js +0 -4
- package/dist/web/assets/index-AeOeU4Dr.js +0 -25
- package/dist/web/assets/index-DMDSaLu7.css +0 -1
- package/dist/web/assets/useModels-DfXVnluv.js +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,33 @@ All notable changes to Even Keel are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.2.2] - 2026-11-06
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- A done task's time is written to GitLab and Jira as it is to Huly. Sometimes Jira refuses the worklog for a reason that is not about a field, for example when the project does not take time. That is now read as a refusal by the project.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- **Claude folder trust is written by Even Keel before every background session**, with the project's consent in the wizard, instead of a switch and a command to run by hand. If the write or the CLI still refuses, the pause shows one command to run, for the right CLI, account folder and user. On Windows under a service account it shows a `runas` line with a ready script.
|
|
16
|
+
- Checked CLI versions: Claude Code 2.1.319, codex-cli 0.167.0, OpenCode 1.19.5 and Copilot CLI 1.0.106.
|
|
17
|
+
- Pull request mode is no longer marked experimental.
|
|
18
|
+
- Setting up the Claude plugin marketplace by hand has moved to Accounts.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Claude trust is written under the path the CLI checks. That is a forward-slash key on Windows and the real path of a symlinked folder or a Windows junction, so such folders no longer pause on "Workspace not trusted". The write keeps the account's `.claude.json` permissions (600 stays 600).
|
|
23
|
+
- Copilot: sign-in is checked in the session's own account folder, an unknown sign-in is shown as unknown, and a terminal login's token is kept apart from the accounts' own. Protection also catches a Copilot force push to the main branch written as a refspec.
|
|
24
|
+
- A fix session that finds nothing to fix ends with `NO CHANGES`.
|
|
25
|
+
- A chat reply sent to a session no longer repeats the session's instructions.
|
|
26
|
+
- Windows: environment variables such as `%USERPROFILE%` in a project's folder are expanded.
|
|
27
|
+
- Windows: uninstalling and installing over a running tray host no longer fails while the quitting host still holds its exe.
|
|
28
|
+
- Session account pills show the account of the session's own agent.
|
|
29
|
+
- New rows in settings tables are kept when switching tabs.
|
|
30
|
+
- Tips close when the page scrolls or the window is resized.
|
|
31
|
+
- The answer card's caret points at the question's first line.
|
|
32
|
+
- Download size estimates of the checked CLI copies are up to date.
|
|
33
|
+
|
|
7
34
|
## [0.2.1] - 2026-11-04
|
|
8
35
|
|
|
9
36
|
### Fixed
|
package/README.md
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
**Already inside, so you don't glue five tools together:**
|
|
11
11
|
|
|
12
12
|
- **Usage limits.** A spent 5-hour or weekly limit is waited out: the session is resumed after the reset while its prompt cache is warm, or handed to a fresh one — no work lost, no 3 a.m. restart.
|
|
13
|
-
- **A full context, your way.** A session past its context threshold writes a handoff note and a fresh one takes over in the same worktree — or leaves it to Claude Code's auto-compact, per project or per task by a [label](docs/guide/reference.md#configuration). The statistics count both,
|
|
14
|
-
- **What each task cost.** Built-in statistics (optional): cost and time per task, where sessions got stuck, how full the context ran, and before/after every change to your rule files.
|
|
13
|
+
- **A full context, your way.** A session past its context threshold writes a handoff note and a fresh one takes over in the same worktree — or leaves it to Claude Code's auto-compact, per project or per task by a [label](docs/guide/reference.md#configuration). The statistics count both, so you can compare what each cost on your own tasks.
|
|
14
|
+
- **What each task cost.** Built-in statistics (optional): cost and time per task, where sessions got stuck, how full the context ran, and before/after every change to your rule files. A session audit skill reads them and proposes what to change in your rules.
|
|
15
15
|
- **Every account on one page.** Claude, Codex, OpenCode and Copilot — subscriptions and API keys — each with its limits or spend and what runs on it right now. You pick the account a project runs on.
|
|
16
16
|
- **`CLAUDE.md` or `AGENTS.md`.** One instruction file reaches every agent: Claude Code gets your `AGENTS.md`, Codex your `CLAUDE.md`.
|
|
17
17
|
|
|
@@ -28,26 +28,22 @@ Most agent orchestrators sell width: ten agents in parallel, each in its own wor
|
|
|
28
28
|
- **A worktree isolates the work, not the result.** Conflicts, especially semantic ones that git does not see, move to merge time, where they are more expensive.
|
|
29
29
|
- **The subscription limit is shared.** Parallel agents spend it sooner, not on more; and each of them reads the same area of the code again.
|
|
30
30
|
|
|
31
|
-
Even Keel wins in time, not in width: the agent keeps working while you are away, and the chain survives what usually stops it — the usage limit running out, a context grown too large. That steady going is what the name means.
|
|
31
|
+
Even Keel wins in time, not in width: the agent keeps working while you are away, and the chain survives what usually stops it — the usage limit running out, a context grown too large. That steady going is what the name means. One task at a time holds per folder, not per repository: different projects, or a second clone of the same repository on another branch, have chains of their own that run side by side.
|
|
32
32
|
|
|
33
33
|

|
|
34
34
|
|
|
35
35
|
## What it does
|
|
36
36
|
|
|
37
|
-
- **A chain per project
|
|
38
|
-
- **
|
|
39
|
-
- **
|
|
40
|
-
- **
|
|
41
|
-
- **
|
|
42
|
-
- **
|
|
43
|
-
- **
|
|
44
|
-
- **
|
|
45
|
-
- **
|
|
46
|
-
- **
|
|
47
|
-
- **Standards.** A document of the repository reaches a session the first time it touches the files it guards (`**/*.tsx`), and can hold the merge until screenshots and the document's check are done.
|
|
48
|
-
- **Accounts, one per project and provider.** OpenCode signs in with ChatGPT, GitHub Copilot, an API key or runs its free models; the Copilot CLI with your sign-in or a token each. Claude sessions on an API key run through the Agent SDK and outlive a restart of the service with their questions open; a subscription can switch to it too.
|
|
49
|
-
- **A session audit skill** reads the statistics and proposes what to change in your rules.
|
|
50
|
-
- **The page:** the chain, each session's stage, current action and context fill, task cards, changelog drafts; in English or Russian.
|
|
37
|
+
- **A chain per project**, ordered by blockers first, then the order you drag on the page, then milestone and priority. A task labelled `Manual` stays yours.
|
|
38
|
+
- **A session per task**, in its own git worktree. It does the task and merges; Even Keel closes the task and starts the next.
|
|
39
|
+
- **Several trackers in one chain**, say the GitHub issues others file next to your private Huly project; or **several chains on one tracker project**, say fixes of a released version beside the next one.
|
|
40
|
+
- **Unattended mode** for nights: a task that needs your answer is left on its branch with the question, and the chain moves on.
|
|
41
|
+
- **CI.** The next task waits for a green main branch, and a red one is fixed first.
|
|
42
|
+
- **Pull requests** instead of merging, on GitHub, Forgejo or GitLab; review feedback goes back to the session.
|
|
43
|
+
- **Plugins and MCP servers** per project, their keys kept away from the sessions.
|
|
44
|
+
- **Protection.** Destructive commands are refused for every agent by default.
|
|
45
|
+
- **Standards.** A guide of yours, say for the UI files, reaches a session when it touches them and can hold the merge until its checks are done.
|
|
46
|
+
- **The page:** the chain, each session's stage, current action and context fill; in English or Russian.
|
|
51
47
|
|
|
52
48
|
| A question in the page's chat | A spent limit, waited out with the cache warm | Statistics |
|
|
53
49
|
| --- | --- | --- |
|
|
@@ -58,18 +54,28 @@ Every feature in full: [docs/guide/features.md](docs/guide/features.md).
|
|
|
58
54
|
## Requirements
|
|
59
55
|
|
|
60
56
|
- **Node.js 24** or newer ([nodejs.org](https://nodejs.org/en/download); on Linux nvm needs no `sudo`).
|
|
61
|
-
- **git** ([git-scm.com](https://git-scm.com/downloads)) with your name and
|
|
62
|
-
- **
|
|
57
|
+
- **git** ([git-scm.com](https://git-scm.com/downloads)) with your name and e-mail set (`git config --global user.name` and `user.email`): sessions commit and merge under that name.
|
|
58
|
+
- **An agent and an account of it:** [Claude Code](https://docs.claude.com/en/docs/claude-code/setup), [Codex](https://github.com/openai/codex), [OpenCode](https://opencode.ai) (preview) or [GitHub Copilot CLI](https://github.com/github/copilot-cli) (preview), on a subscription or an API key; OpenCode also runs its free models. The setup can download the CLI for you.
|
|
63
59
|
- **A tracker:** a Huly workspace, GitHub or GitLab projects with Issues, a Linear workspace or a Jira Cloud site.
|
|
64
|
-
- **Windows, Linux or macOS.** Windows is where it runs every day; Linux and macOS (Apple silicon) were checked end to end.
|
|
60
|
+
- **Windows, Linux or macOS.** Windows is where it runs every day; Linux and macOS (Apple silicon) were checked end to end. The MSI installer of Node can sit on "Preparing to install…" for over 10 minutes: wait it out.
|
|
65
61
|
|
|
66
62
|
## Before you run it
|
|
67
63
|
|
|
68
|
-
- **Even Keel depends on undocumented behaviour of the agents' CLIs
|
|
69
|
-
- **Your subscription, the providers' terms.**
|
|
70
|
-
- **Sessions
|
|
71
|
-
- **Your sign-in stays with the CLIs.** Even Keel reads only
|
|
72
|
-
- **Some behaviour has never been checked live
|
|
64
|
+
- **Even Keel depends on undocumented behaviour of the agents' CLIs**, none of it a public API. Last checked against **Claude Code 2.1.319**, **codex-cli 0.167.0**, **OpenCode 1.19.5** and **Copilot CLI 1.0.106**; the page warns when yours is another version and can run sessions on the checked one instead. A CLI update may break a part of Even Keel until it is adapted — please open an issue when it does. Details: [setup](docs/guide/setup.md#the-clis-it-depends-on).
|
|
65
|
+
- **Your subscription, the providers' terms.** A project runs on one account per provider, and a spent limit is waited out, never got round by switching accounts. Even Keel does not share, pool or resell access. Each agent's sessions fall under its provider's terms, listed below.
|
|
66
|
+
- **Sessions don't ask you before each tool call** (Claude in auto mode, Codex with `--approve-for-me` or, if you choose, with no sandbox). Protection refuses destructive commands; set up any other permissions and hooks in your agents' settings before you start a chain.
|
|
67
|
+
- **Your sign-in stays with the CLIs.** Even Keel reads only expiry dates, the e-mail and the plan; tokens are never copied or sent anywhere. An API key you add goes only to its own provider.
|
|
68
|
+
- **Some behaviour has never been checked live**, such as long chains on Codex, OpenCode and Copilot. Read [What has not been verified](docs/unverified.md) before relying on it; every live check is logged in [What has been verified](docs/verified.md).
|
|
69
|
+
|
|
70
|
+
<details>
|
|
71
|
+
<summary>The providers' terms</summary>
|
|
72
|
+
|
|
73
|
+
- **Claude** sessions are governed by Anthropic's [Consumer Terms](https://www.anthropic.com/legal/consumer-terms) and [Usage Policy](https://www.anthropic.com/legal/aup) (the [Commercial Terms](https://www.anthropic.com/legal/commercial-terms) for Team, Enterprise and API keys). Anthropic asks products built on the Agent SDK to [use API key authentication](https://code.claude.com/docs/en/legal-and-compliance), so a subscription runs on the CLI's own background sessions unless you switch its card to the SDK yourself.
|
|
74
|
+
- **Codex** sessions are governed by OpenAI's [Terms of Use](https://openai.com/policies/terms-of-use/) and [Usage Policies](https://openai.com/policies/usage-policies/) when you sign in with ChatGPT (the [Services Agreement](https://openai.com/policies/services-agreement/) for Business, Enterprise, Edu and API keys), with the [Service Terms](https://openai.com/policies/service-terms/) on top. OpenAI's terms do not allow getting round its usage limits, so Even Keel refuses a second Codex account on the free plan.
|
|
75
|
+
- **OpenCode** sessions are governed by the terms of the provider you sign it in with; a Claude subscription is allowed only in Claude Code, so OpenCode reaches Claude only on an API key.
|
|
76
|
+
- **Copilot** sessions are governed by GitHub's [Terms of Service](https://docs.github.com/en/site-policy/github-terms/github-terms-of-service) and the [GitHub Copilot terms](https://github.com/customer-terms/github-copilot-product-specific-terms), which allow one free account per person.
|
|
77
|
+
|
|
78
|
+
</details>
|
|
73
79
|
|
|
74
80
|
## Quick start
|
|
75
81
|
|
|
@@ -77,35 +83,26 @@ Every feature in full: [docs/guide/features.md](docs/guide/features.md).
|
|
|
77
83
|
npx even-keel
|
|
78
84
|
```
|
|
79
85
|
|
|
80
|
-
This installs Even Keel globally with npm and sets it up as a service ([below](#as-a-service))
|
|
86
|
+
This installs Even Keel globally with npm and sets it up as a service ([below](#as-a-service)), no administrator needed. In PowerShell add `.cmd` to it and to every `even-keel` command, or run them from cmd ([why](docs/guide/setup.md#windows-powershell)):
|
|
87
|
+
|
|
88
|
+
```powershell
|
|
89
|
+
npx.cmd even-keel
|
|
90
|
+
```
|
|
81
91
|
|
|
82
|
-
|
|
92
|
+
To run it in a terminal instead of as a service:
|
|
83
93
|
|
|
84
94
|
```sh
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
npm install
|
|
88
|
-
npm run build
|
|
89
|
-
npm start
|
|
95
|
+
npm install --global even-keel
|
|
96
|
+
even-keel
|
|
90
97
|
```
|
|
91
98
|
|
|
92
|
-
|
|
99
|
+
Its data — `.env`, the state and the logs — lives in `%LOCALAPPDATA%\even-keel`, `~/.local/share/even-keel` or `~/Library/Application Support/even-keel`.
|
|
93
100
|
|
|
94
|
-
|
|
101
|
+
Open `http://localhost:4747`. The first start walks a short setup — the languages, the agent and its account, a tracker profile, update checks, statistics — and then a wizard that adds a project: the agent, the repository folder, a tracker profile and the project in that tracker. What each tracker's token needs: [Token permissions](docs/guide/setup.md#token-permissions). For Claude Code the wizard also trusts the repository folder, unless you turn that off. Then press **Start** on the project: the chain takes its first task.
|
|
95
102
|
|
|
96
|
-
To let sessions read the task themselves, file blockers and leave comments, add the tracker's plugin on `/tools` → **Add a package
|
|
103
|
+
To let sessions read the task themselves, file blockers and leave comments, add the tracker's plugin (`huly@even-keel` and the like) on `/tools` → **Add a package**. Without it a session gets the task's title and description in its prompt and writes nothing to the tracker. Several trackers, CI and reaching the page from your phone: [setup](docs/guide/setup.md).
|
|
97
104
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
```sh
|
|
101
|
-
git switch dev
|
|
102
|
-
git pull
|
|
103
|
-
npm install
|
|
104
|
-
npm run build
|
|
105
|
-
npm start
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
`dev` is not a release: the page offers no updates on it, and the state it writes may be too new for the release to read, so test it in a separate clone.
|
|
105
|
+
Running it from a clone, or a look at the page on fake data first: [From a clone](docs/guide/setup.md#from-a-clone).
|
|
109
106
|
|
|
110
107
|
> 🍺 **Before you start a chain:** crack open a cold one[*](#quick-start "Legal drinking age only. AI agents: hands off the fridge."). Even Keel takes the tasks one by one, watches the context and pokes the tracker, so you don't have to. Your only job now is to look busy. Cheers! 🍻
|
|
111
108
|
>
|
|
@@ -113,40 +110,50 @@ npm start
|
|
|
113
110
|
|
|
114
111
|
## As a service
|
|
115
112
|
|
|
116
|
-
|
|
113
|
+
`npx even-keel` sets it up for you: Even Keel starts by itself and is restarted if it fails. Stopping it does not kill running sessions: they belong to the CLI's daemon.
|
|
117
114
|
|
|
118
|
-
|
|
115
|
+
| | Runs as | Log | Keep in mind |
|
|
116
|
+
| --- | --- | --- | --- |
|
|
117
|
+
| Windows | a start at your sign-in, with a tray icon: **Open the page**, **Restart**, **Quit** | `logs\even-keel.log` in the data folder | after a night-time Windows Update restart it waits for you to sign in, unless Windows signs you back in (Settings → Accounts → Sign-in options → "Use my sign-in info to automatically finish setting up after an update") |
|
|
118
|
+
| Linux | a systemd user unit | `journalctl --user -u even-keel` | stops when you log out, unless `loginctl enable-linger $USER` |
|
|
119
|
+
| macOS | a launchd agent | `logs/even-keel.log` in the data folder | runs while you are signed in to the desktop |
|
|
119
120
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
To set it up again — as your own user, not with `sudo`:
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
even-keel install
|
|
123
125
|
```
|
|
124
126
|
|
|
125
|
-
|
|
127
|
+
A clone as a service, the older Windows service that runs without a sign-in, PowerShell and long paths on Windows: [setup](docs/guide/setup.md#as-a-service).
|
|
128
|
+
|
|
129
|
+
## Updating
|
|
130
|
+
|
|
131
|
+
The gear menu in the header shows the installed version and tells you when a newer release is out. **Update** in its window lists what changes, waits for the chains to settle, installs the release and restarts the service; if anything fails, the version you had comes back. **Revert** goes back to the previous version the same way, unless the update changed the stored state's format. This works as a service, installed with npm or on a clean clone. Running sessions survive the update.
|
|
126
132
|
|
|
127
|
-
|
|
133
|
+
By hand, installed with npm — it stops the service, installs the latest release and starts it (a given version: `npm install --global even-keel@<version>` with Even Keel stopped):
|
|
128
134
|
|
|
129
135
|
```sh
|
|
130
|
-
even-keel
|
|
131
|
-
service/install.sh # a clone
|
|
136
|
+
even-keel update
|
|
132
137
|
```
|
|
133
138
|
|
|
134
|
-
|
|
139
|
+
The latest release candidate, when there is one:
|
|
135
140
|
|
|
136
|
-
|
|
141
|
+
```sh
|
|
142
|
+
npx even-keel@next
|
|
143
|
+
```
|
|
137
144
|
|
|
138
|
-
|
|
145
|
+
Updating a clone, the `dev` branch, plugins, stored state and going back to an older version: [setup](docs/guide/setup.md#updating).
|
|
139
146
|
|
|
140
|
-
|
|
141
|
-
- **Installed with npm, by hand** — `even-keel update` (stops the service, installs the latest release, starts it), or `npm install --global even-keel@<version>` with Even Keel stopped.
|
|
142
|
-
- **A clone as a service, by hand** — `git pull`, then run its install again.
|
|
143
|
-
- **A clone from a terminal** — stop Even Keel, then `git pull`, `npm ci`, `npm run build` and `npm start`.
|
|
147
|
+
## Uninstall
|
|
144
148
|
|
|
145
|
-
|
|
149
|
+
Remove the service — it removes nothing else — then the package, and delete the data folder:
|
|
146
150
|
|
|
147
|
-
|
|
151
|
+
```sh
|
|
152
|
+
even-keel uninstall
|
|
153
|
+
npm uninstall --global even-keel
|
|
154
|
+
```
|
|
148
155
|
|
|
149
|
-
|
|
156
|
+
A clone, and what stays in your repositories and your Claude Code config: [setup](docs/guide/setup.md#uninstall).
|
|
150
157
|
|
|
151
158
|
## Configuration
|
|
152
159
|
|
|
@@ -154,21 +161,13 @@ The settings live in Even Keel's database and are edited on the page: a project'
|
|
|
154
161
|
|
|
155
162
|
## What comes next
|
|
156
163
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
Looked at, not promised: running in Docker, a cap on how much of the usage limit one task may spend.
|
|
164
|
+
Looked at, not promised: several machines taking the tasks of one project, each folder still one task at a time; running in Docker; a cap on how much of the usage limit one task may spend.
|
|
160
165
|
|
|
161
166
|
## Extending
|
|
162
167
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
The chain never talks to a tracker directly: it reads tasks through an adapter. The contract, with what each field means and what to return when your tracker lacks something, is the JSDoc of [src/tracker/source.ts](src/tracker/source.ts) (`TrackerAdapter`, `TaskSource`). `src/github/` is a compact example, `src/huly/` a fuller one. Register the adapter in [src/tracker/adapters.ts](src/tracker/adapters.ts) and pick it with `tracker` in the config. `brief` and `complete` are optional: without them, sessions must learn the task and close it some other way. So are `card` and `ready`, the task card on the page and its **Move to Todo** button; without them the page links to the task in the tracker.
|
|
166
|
-
|
|
167
|
-
### A plugin for it
|
|
168
|
-
|
|
169
|
-
A plugin gives sessions the tracker's MCP server and a skill for working a task. Use [plugins/huly](plugins/huly) as the pattern: `.claude-plugin/plugin.json`, `.mcp.json` with the server, `skills/task/SKILL.md`; add an entry to [.claude-plugin/marketplace.json](.claude-plugin/marketplace.json) and name the server in the adapter's `mcpServer`, so that Even Keel can check sessions see it. When the server's `${…}` placeholder names the adapter's key differently, declare it in the adapter's `mcpKeys` (`{ LINEAR_API_KEY: 'LINEAR_TOKEN' }`), so the gateway fills it from the project's profile; a value built from several keys, such as Jira's Basic header, goes in `mcpValues`. Raise the plugin's `version` on every change: installed copies are cached by version.
|
|
168
|
+
The chain reads a tracker only through an adapter, and sessions get its MCP server from a plugin, so a new tracker is an adapter and a plugin: how to write both is in [CONTRIBUTING.md](CONTRIBUTING.md#extending).
|
|
170
169
|
|
|
171
|
-
|
|
170
|
+
Where it could grow:
|
|
172
171
|
|
|
173
172
|
- Other trackers: YouTrack, Jira Data Center…
|
|
174
173
|
- Your own classifier for the statistics, or a different model behind it.
|
|
@@ -176,17 +175,7 @@ A plugin gives sessions the tracker's MCP server and a skill for working a task.
|
|
|
176
175
|
|
|
177
176
|
## Development
|
|
178
177
|
|
|
179
|
-
`main` is always the latest release. The next version is built on `dev`, fixes of the released one on `release/v<x.y>` ([docs/releases.md](docs/releases.md)). Pull requests are not accepted for now: bugs and ideas go to issues
|
|
180
|
-
|
|
181
|
-
```sh
|
|
182
|
-
npm test # vitest, without the end-to-end scenarios
|
|
183
|
-
npm run test:e2e # the end-to-end scenarios of src/e2e/
|
|
184
|
-
npm run typecheck
|
|
185
|
-
npm run dev # the server, restarting on changes
|
|
186
|
-
npm run dev:web # the page with hot reload, proxying /api to a running server
|
|
187
|
-
npm run dev:fake # the page on fake data
|
|
188
|
-
npm run shot -- '?chain=ask' .cards # a dark screenshot of an element on fake data, into .temp/shot/
|
|
189
|
-
```
|
|
178
|
+
`main` is always the latest release. The next version is built on `dev`, fixes of the released one on `release/v<x.y>` ([docs/releases.md](docs/releases.md)). Pull requests are not accepted for now: bugs and ideas go to issues. Both, and the commands for working on a clone: [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
190
179
|
|
|
191
180
|
## Security
|
|
192
181
|
|
|
@@ -194,7 +183,7 @@ A vulnerability is reported privately, not as an issue: [SECURITY.md](SECURITY.m
|
|
|
194
183
|
|
|
195
184
|
## Support
|
|
196
185
|
|
|
197
|
-
Even Keel is free. If it saves you time, [Patreon](https://www.patreon.com/Namerek)
|
|
186
|
+
Even Keel is free. If it saves you time, [GitHub Sponsors](https://github.com/sponsors/NamerekT) or [Patreon](https://www.patreon.com/Namerek) keep it going; patrons on Patreon also get the write-ups of how it is built and what each change to the rules cost, measured on its own statistics.
|
|
198
187
|
|
|
199
188
|
## License
|
|
200
189
|
|
|
@@ -2,11 +2,11 @@ import { accountId, launchBlock } from './model.js';
|
|
|
2
2
|
/** The account folder as the chain judges a launch in it. */
|
|
3
3
|
export function currentAccount(view, key = view.active) {
|
|
4
4
|
const entry = view.accounts.find((each) => each.key === key);
|
|
5
|
-
const
|
|
6
|
-
const email = loggedIn ? entry
|
|
5
|
+
const available = entry?.status != null && entry.status.loggedIn !== false;
|
|
6
|
+
const email = entry?.status?.loggedIn === true ? entry.status.email : null;
|
|
7
7
|
return {
|
|
8
|
-
id:
|
|
9
|
-
ready:
|
|
8
|
+
id: available ? accountId(key, email) : null,
|
|
9
|
+
ready: available && launchBlock(view, key) === undefined,
|
|
10
10
|
label: entry?.name ?? email ?? key,
|
|
11
11
|
provider: entry?.agent,
|
|
12
12
|
};
|
|
@@ -114,7 +114,7 @@ export function switchProblem(view, key) {
|
|
|
114
114
|
return notice('account.removing', { account: target.status?.email ?? key });
|
|
115
115
|
if (copilotOnly(target))
|
|
116
116
|
return copilotUnsupported();
|
|
117
|
-
if (target.needsLogin || target.status
|
|
117
|
+
if (target.needsLogin || target.status == null || target.status.loggedIn === false)
|
|
118
118
|
return notice('account.needsLogin', { account: target.status?.email ?? key });
|
|
119
119
|
return freeHeld(view.accounts, key);
|
|
120
120
|
}
|
|
@@ -40,6 +40,8 @@ export class AccountWatcher {
|
|
|
40
40
|
const times = this.options.homes.times(home);
|
|
41
41
|
const transport = this.options.transportOf(home, isApiKey(status));
|
|
42
42
|
const seen = this.options.signedInAs?.(home.key);
|
|
43
|
+
const signedOut = this.needsLogin(home.key);
|
|
44
|
+
const terminalLogin = signedOut && !isApiKey(status) ? this.options.agentOf(home).terminalLogin?.(home) : undefined;
|
|
43
45
|
return {
|
|
44
46
|
key: home.key,
|
|
45
47
|
name: this.options.nameOf(home.key),
|
|
@@ -50,7 +52,8 @@ export class AccountWatcher {
|
|
|
50
52
|
status,
|
|
51
53
|
error,
|
|
52
54
|
loginExpiresAt: times.loginExpiresAt === null || times.erased ? null : new Date(times.loginExpiresAt).toISOString(),
|
|
53
|
-
needsLogin:
|
|
55
|
+
needsLogin: signedOut,
|
|
56
|
+
...(terminalLogin !== undefined && { terminalLogin }),
|
|
54
57
|
sessions: this.options.sessionsIn(home.key),
|
|
55
58
|
working: this.options.workingIn?.(home.key) ?? false,
|
|
56
59
|
projects: this.options.projectsOn(home.key),
|
|
@@ -28,7 +28,8 @@ export const EXECUTION_MODES = { [CLAUDE]: ['auto', 'bg', 'sdk'], [CODEX]: ['san
|
|
|
28
28
|
/**
|
|
29
29
|
* Which CLI a provider's sessions run on (`cli`, BTN-250), the default first: `system` — the one installed on the
|
|
30
30
|
* machine, on whatever version it updated to, `checked` — Even Keel's own copy of the version it was last checked
|
|
31
|
-
* against,
|
|
31
|
+
* against, roughly 80–340 MB to download, depending on the provider and platform. The default was `checked` until
|
|
32
|
+
* BTN-603; installs from before keep it written.
|
|
32
33
|
*/
|
|
33
34
|
export const CLI_SOURCES = ['system', 'checked'];
|
|
34
35
|
/** The execution modes that run only on the checked CLI, by provider (BTN-610): the Agent SDK is bound to its version. */
|
package/dist/src/autostart.js
CHANGED
|
@@ -49,9 +49,38 @@ export function quitHost(exe) {
|
|
|
49
49
|
if (existsSync(exe))
|
|
50
50
|
attempt([exe, '--quit'], `${LAUNCHER_EXE} --quit`);
|
|
51
51
|
}
|
|
52
|
+
const HELD_CODES = ['EPERM', 'EACCES', 'EBUSY'];
|
|
53
|
+
const HELD_TIMEOUT_MS = 10_000;
|
|
54
|
+
const waitBuffer = new Int32Array(new SharedArrayBuffer(4));
|
|
55
|
+
/**
|
|
56
|
+
* Removes the host's exe, retried for up to ten seconds: `--quit` returns once the host lets its mutex go, while its
|
|
57
|
+
* process may still hold the exe's image (EKR-93). A missing exe is no error.
|
|
58
|
+
*/
|
|
59
|
+
export function removeHostExe(exe, remove = (file) => rmSync(file, { force: true }), wait = (ms) => void Atomics.wait(waitBuffer, 0, 0, ms)) {
|
|
60
|
+
let waited = 0;
|
|
61
|
+
let pause = 50;
|
|
62
|
+
for (;;) {
|
|
63
|
+
try {
|
|
64
|
+
remove(exe);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
const code = error.code ?? '';
|
|
69
|
+
if (!HELD_CODES.includes(code))
|
|
70
|
+
throw error;
|
|
71
|
+
if (waited >= HELD_TIMEOUT_MS) {
|
|
72
|
+
throw new Error(`${exe} is still in use after ${HELD_TIMEOUT_MS / 1000} s (${code}): quit Even Keel from its tray icon and run the command again`);
|
|
73
|
+
}
|
|
74
|
+
const step = Math.min(pause, HELD_TIMEOUT_MS - waited);
|
|
75
|
+
wait(step);
|
|
76
|
+
waited += step;
|
|
77
|
+
pause = Math.min(pause * 2, 500);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
52
81
|
/**
|
|
53
82
|
* Compiles the host with the `csc.exe` of .NET Framework into `dir`, writes the `Run` value and starts the host. A host
|
|
54
|
-
* already running is ended first
|
|
83
|
+
* already running is ended first, and its exe removed once its process lets go of it: the compiler writes the same file.
|
|
55
84
|
*/
|
|
56
85
|
export function installAutostart(root, node, data, dir) {
|
|
57
86
|
const autostart = { exe: win32.join(dir, LAUNCHER_EXE), root, node, data };
|
|
@@ -63,6 +92,7 @@ export function installAutostart(root, node, data, dir) {
|
|
|
63
92
|
if (!existsSync(csc))
|
|
64
93
|
throw new Error(`${csc} is missing: the host needs .NET Framework 4, which comes with Windows`);
|
|
65
94
|
mkdirSync(dir, { recursive: true });
|
|
95
|
+
removeHostExe(autostart.exe);
|
|
66
96
|
const sources = SOURCES.map((file) => win32.join(root, 'service', file));
|
|
67
97
|
attempt([csc, '-nologo', '-target:winexe', `-out:${autostart.exe}`, ...REFERENCES.map((dll) => `-reference:${dll}`), ...sources], 'csc');
|
|
68
98
|
attempt(['reg.exe', 'add', RUN_KEY, '/v', RUN_VALUE, '/t', 'REG_SZ', '/d', runCommandOf(autostart), '/f'], 'reg add', true);
|
|
@@ -73,7 +103,7 @@ export function installAutostart(root, node, data, dir) {
|
|
|
73
103
|
export function uninstallAutostart(autostart) {
|
|
74
104
|
quitHost(autostart.exe);
|
|
75
105
|
attempt(['reg.exe', 'delete', RUN_KEY, '/v', RUN_VALUE, '/f'], 'reg delete', true);
|
|
76
|
-
|
|
106
|
+
removeHostExe(autostart.exe);
|
|
77
107
|
const dir = win32.dirname(autostart.exe);
|
|
78
108
|
if (existsSync(dir) && readdirSync(dir).length === 0)
|
|
79
109
|
rmSync(dir, { recursive: true, force: true });
|
|
@@ -618,8 +618,14 @@ export class Dispatcher {
|
|
|
618
618
|
if (this.fixes === null)
|
|
619
619
|
chain.current = null;
|
|
620
620
|
else if (!(await this.fixes.follow(chain, chain.current))) {
|
|
621
|
-
|
|
622
|
-
|
|
621
|
+
// A fix session that found nothing to fix (EKR-88) is over once the red commit turns green, as after a rerun.
|
|
622
|
+
const mark = await this.unchanged.check(chain, chain.current);
|
|
623
|
+
if (mark === 'acted')
|
|
624
|
+
return;
|
|
625
|
+
if (mark === null || !(await this.fixes.unneeded(chain, chain.current))) {
|
|
626
|
+
await this.handovers.follow(chain, chain.current);
|
|
627
|
+
return;
|
|
628
|
+
}
|
|
623
629
|
}
|
|
624
630
|
continue;
|
|
625
631
|
}
|
|
@@ -185,7 +185,7 @@ function isRelease(entry) {
|
|
|
185
185
|
return entry.reason === 'postpone' || entry.reason === 'skip';
|
|
186
186
|
}
|
|
187
187
|
function isOutcome(entry) {
|
|
188
|
-
return entry.reason === 'landed' || entry.reason === 'dropped' || entry.reason === 'carried';
|
|
188
|
+
return entry.reason === 'landed' || entry.reason === 'dropped' || entry.reason === 'unneeded' || entry.reason === 'carried';
|
|
189
189
|
}
|
|
190
190
|
function localDay(date) {
|
|
191
191
|
const pad = (value) => String(value).padStart(2, '0');
|
package/dist/src/chain/log.js
CHANGED
|
@@ -12,6 +12,8 @@ export function launchLine(entry) {
|
|
|
12
12
|
return `chain: ${task} landed, main is at ${entry.commit === undefined ? 'unknown' : shortCommit(entry.commit)}`;
|
|
13
13
|
if (reason === 'dropped')
|
|
14
14
|
return `chain: ${task} dropped, main stays as it was`;
|
|
15
|
+
if (reason === 'unneeded')
|
|
16
|
+
return `chain: ${task} found nothing to fix, main is green at ${entry.commit === undefined ? 'unknown' : shortCommit(entry.commit)}`;
|
|
15
17
|
if (reason === 'carried')
|
|
16
18
|
return `chain: ${task} carried ${entry.commits ?? 'its'} commit(s) of the release`;
|
|
17
19
|
if (reason === 'answer')
|
|
@@ -148,6 +148,25 @@ export class MainCheck {
|
|
|
148
148
|
delete gate.fix;
|
|
149
149
|
return gate.check?.commit ?? gate.local?.commit ?? gate.green ?? null;
|
|
150
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* The verdict on the red commit the fix session is for, asked again once its session finds nothing to fix (EKR-88):
|
|
153
|
+
* `green` — a rerun passed, main counts as green and the fix is over; `red` — still red; `waiting` — no verdict yet.
|
|
154
|
+
*/
|
|
155
|
+
refixed(project) {
|
|
156
|
+
const gate = this.state.ci[project];
|
|
157
|
+
const fix = gate?.fix;
|
|
158
|
+
if (gate === undefined || fix?.report === undefined)
|
|
159
|
+
return 'waiting';
|
|
160
|
+
const verdict = this.deps.verdict(project, fix.commit, fix.at);
|
|
161
|
+
if (verdict.state !== 'green') {
|
|
162
|
+
// The runs of the commit are over: without a fresh look a rerun would never be seen.
|
|
163
|
+
this.deps.lookAgain(project);
|
|
164
|
+
return verdict.state === 'red' ? 'red' : 'waiting';
|
|
165
|
+
}
|
|
166
|
+
delete gate.fix;
|
|
167
|
+
this.passed(project, gate, { commit: fix.commit, at: fix.at, tasks: [] }, 'is green after all, the fix session found nothing to fix');
|
|
168
|
+
return 'green';
|
|
169
|
+
}
|
|
151
170
|
/** The user gave the fix session up: main stays as it is. */
|
|
152
171
|
dropFix(project) {
|
|
153
172
|
delete this.state.ci[project]?.fix;
|
package/dist/src/chain/mainci.js
CHANGED
|
@@ -35,6 +35,10 @@ export function mainCheckDeps(deps) {
|
|
|
35
35
|
const neighbours = deps.projects().flatMap((other) => deps.watches(other)?.map((watch) => watch.view) ?? []);
|
|
36
36
|
return verdictOf(watches.map((watch) => watch.view), commit, since, deps.now(), neighbours);
|
|
37
37
|
},
|
|
38
|
+
lookAgain(project) {
|
|
39
|
+
for (const watch of counted(project) ?? [])
|
|
40
|
+
watch.want();
|
|
41
|
+
},
|
|
38
42
|
remoteHeads() {
|
|
39
43
|
const heads = {};
|
|
40
44
|
for (const project of deps.projects()) {
|
|
@@ -12,6 +12,8 @@ export class MainFix {
|
|
|
12
12
|
deps;
|
|
13
13
|
main;
|
|
14
14
|
host;
|
|
15
|
+
/** The verdict last seen on the red commit of a fix session that found nothing to fix, for one log line per change. */
|
|
16
|
+
verdicts = new Map();
|
|
15
17
|
constructor(state, deps, main, host) {
|
|
16
18
|
this.state = state;
|
|
17
19
|
this.deps = deps;
|
|
@@ -76,6 +78,33 @@ export class MainFix {
|
|
|
76
78
|
this.deps.save(this.state);
|
|
77
79
|
return true;
|
|
78
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* The fix session marked `NO CHANGES:` with a clean branch (EKR-88): main was not broken — a runner failed, a flake —
|
|
83
|
+
* and the session may have rerun the failed jobs. `true` — the red commit is green now, the fix is over and cleaned up;
|
|
84
|
+
* `false` — the verdict is still awaited or still red, and the chain waits for the session as for any other turn.
|
|
85
|
+
*/
|
|
86
|
+
async unneeded(chain, current) {
|
|
87
|
+
const { project } = chain;
|
|
88
|
+
const fix = this.main.sessionFix(project);
|
|
89
|
+
if (fix === undefined || fix.task !== current.task)
|
|
90
|
+
return false;
|
|
91
|
+
const verdict = this.main.refixed(project);
|
|
92
|
+
if (this.verdicts.get(current.task) !== verdict) {
|
|
93
|
+
this.verdicts.set(current.task, verdict);
|
|
94
|
+
if (verdict !== 'green')
|
|
95
|
+
this.deps.log(`chain: ${project}: the fix session ${current.task} found nothing to fix, and ${shortCommit(fix.commit)} is ${verdict === 'red' ? 'still red; it waits for the user' : 'not judged again yet'}`);
|
|
96
|
+
}
|
|
97
|
+
if (verdict !== 'green')
|
|
98
|
+
return false;
|
|
99
|
+
await this.host.closeUp(project, fix.task);
|
|
100
|
+
forgetSkipped(this.state, project, fix.task);
|
|
101
|
+
if (chain.interrupted !== undefined)
|
|
102
|
+
chain.interrupted.fixed = fix.commit;
|
|
103
|
+
this.ended(chain, 'unneeded', fix.commit);
|
|
104
|
+
chain.current = null;
|
|
105
|
+
this.deps.save(this.state);
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
79
108
|
/** The stopped session goes on with what happened to main; `false` — not yet, or the chain is halted. */
|
|
80
109
|
async resume(chain, tasks) {
|
|
81
110
|
const held = chain.interrupted;
|
|
@@ -167,6 +196,7 @@ export class MainFix {
|
|
|
167
196
|
/** The launch log keeps how the fix ended, for its line in the chain's archive. */
|
|
168
197
|
ended(chain, how, commit) {
|
|
169
198
|
const current = chain.current;
|
|
199
|
+
this.verdicts.delete(current.task);
|
|
170
200
|
const entry = { at: this.deps.now().toISOString(), project: chain.project, task: current.task, sessionId: current.sessionId ?? '', reason: how };
|
|
171
201
|
if (commit !== null)
|
|
172
202
|
entry.commit = commit;
|
|
@@ -78,6 +78,7 @@ export const PROMPTS = {
|
|
|
78
78
|
fixRules: (main) => [
|
|
79
79
|
'- Задачи в трекере на эту починку нет: не заводи её и статусы не трогай, в сообщениях коммитов ID задач не пиши.',
|
|
80
80
|
fill `- Починку слей в ${main} основного чекаута (git merge --no-edit в основной рабочей копии). Worktree и ветку после этого не трогай и ${main} не пушь — уборку сделает Even Keel, он же проверит пуш.`,
|
|
81
|
+
fill `- Если код не сломан (сбой раннера или инфраструктуры, нестабильный тест) — чинить нечего: перезапусти упавшие прогоны, если CI это позволяет, оставь ветку без коммитов сверх ${main} и с пустым git status и закончи ход последней строкой \`NO CHANGES: <одна строка — почему>\`. Even Keel заново спросит вердикт по красному коммиту: зелёный — починка закрыта и цепочка идёт дальше, красный — цепочка ждёт пользователя.`,
|
|
81
82
|
'- Перед концом хода останови свои фоновые команды (циклы ожидания, наблюдение за логом CI): пока они работают, Even Keel считает тебя занятым.',
|
|
82
83
|
].join('\n'),
|
|
83
84
|
mainFixed: (red, fixed, main) => fixed === null
|
|
@@ -175,6 +176,7 @@ export const PROMPTS = {
|
|
|
175
176
|
fixRules: (main) => [
|
|
176
177
|
'- There is no tracker task for this fix: do not create one or move statuses, and put no task id into commit messages.',
|
|
177
178
|
fill `- Merge the fix into ${main} of the main checkout (git merge --no-edit in the main working copy). After that leave the worktree and the branch alone and do not push ${main} — Even Keel cleans up and checks the push.`,
|
|
179
|
+
fill `- If the code is not broken (a runner or infrastructure failure, a flaky test), there is nothing to fix: rerun the failed runs if the CI allows it, leave the branch with no commits beyond ${main} and git status clean, and end the turn with the last line \`NO CHANGES: <one line — why>\`. Even Keel asks for the verdict on the red commit again: green — the fix is closed and the chain goes on; red — the chain waits for the user.`,
|
|
178
180
|
'- Before you end the turn, stop your background commands (wait loops, watching a CI log): while they run, Even Keel takes you for busy.',
|
|
179
181
|
].join('\n'),
|
|
180
182
|
mainFixed: (red, fixed, main) => fixed === null
|