even-keel 0.3.0-rc.4 → 0.3.1
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 +103 -7
- package/README.md +2 -2
- package/dist/src/agent/scripted.js +32 -3
- package/dist/src/chain/conflict.js +41 -0
- package/dist/src/chain/forward.js +22 -5
- package/dist/src/chain/handover.js +1 -2
- package/dist/src/chain/maincheck.js +13 -9
- package/dist/src/changelog/drafts.js +4 -3
- package/dist/src/changelog/file.js +4 -0
- package/dist/src/changelog/limit.js +30 -0
- package/dist/src/ci/protection.js +8 -1
- package/dist/src/claude/adapter.js +4 -4
- package/dist/src/codex/version.js +1 -1
- package/dist/src/copilot/adapter.js +1 -1
- package/dist/src/copilot/errors.js +11 -6
- package/dist/src/gitlab/adapter.js +1 -0
- package/dist/src/limits/chatgpt-seat.js +49 -0
- package/dist/src/limits/chatgpt.js +37 -7
- package/dist/src/limits/copilot.js +12 -3
- package/dist/src/limits/model.js +3 -0
- package/dist/src/limits/overage.js +6 -2
- package/dist/src/limits/usage.js +42 -4
- package/dist/src/limits/watcher.js +1 -1
- package/dist/src/notice/en-advice.js +2 -1
- package/dist/src/notice/en-values.js +2 -0
- package/dist/src/notice/en.js +4 -1
- package/dist/src/opencode/adapter.js +1 -1
- package/dist/src/opencode/cli.js +10 -2
- package/dist/src/packages/service.js +37 -0
- package/dist/src/profiles/model.js +1 -0
- package/dist/src/profiles/service.js +1 -1
- package/dist/src/server.js +1 -0
- package/dist/src/service/chain-prompts.js +13 -1
- package/dist/src/service/chain.js +17 -12
- package/dist/src/service.js +1 -1
- package/dist/src/storage/migrations.js +2 -0
- package/dist/src/storage/schema.js +1 -1
- package/dist/src/tools/panel.js +7 -9
- package/dist/src/tools/projectSettings.js +60 -0
- package/dist/src/tools/sessionSettings.js +11 -4
- package/dist/web/assets/{BadgeDialog-B8RUL_Ow.js → BadgeDialog-D4hwGrta.js} +1 -1
- package/dist/web/assets/{DescriptionEditor-DUSwRGCZ.js → DescriptionEditor-ujHSJeis.js} +1 -1
- package/dist/web/assets/{ProjectPackages-BJEPijBV.js → ProjectPackages-DMk8vL5N.js} +1 -1
- package/dist/web/assets/{Select-NXi_Bsw-.js → Select-BMRSXvrD.js} +1 -1
- package/dist/web/assets/{TaskCard-DeP8bF9-.js → TaskCard-DeZtmpq4.js} +2 -2
- package/dist/web/assets/TranscriptWindow-DRGnlese.css +1 -0
- package/dist/web/assets/{TranscriptWindow-DVoHtE_o.js → TranscriptWindow-hQHw_CQ7.js} +1 -1
- package/dist/web/assets/{accountParts-CNUeXPYn.js → accountParts-B-b8vNCY.js} +1 -1
- package/dist/web/assets/blocks-BTQTnJ34.js +12 -0
- package/dist/web/assets/{cardDrafts-CyzO-ro7.js → cardDrafts-yo2X_Uq1.js} +1 -1
- package/dist/web/assets/{cardSide-CSmytank.js → cardSide-Y3dIjNVW.js} +1 -1
- package/dist/web/assets/feedLine-BJhjgpoe.js +1 -0
- package/dist/web/assets/{hooks-CgKVeUg8.js → hooks-CDqQcVnS.js} +1 -1
- package/dist/web/assets/index-B9H7kxbk.js +25 -0
- package/dist/web/assets/index-gsaRwWJo.css +1 -0
- package/dist/web/assets/{lib-DnFFmOv9.js → lib-DUH5hYcn.js} +1 -1
- package/dist/web/assets/overview-BdakxI-5.js +7 -0
- package/dist/web/assets/packageGroups-D15r6pKX.js +1 -0
- package/dist/web/assets/{react-dom-DiYkIXNS.js → react-dom-CDxcrI4x.js} +1 -1
- package/dist/web/assets/{rules-DLe7kZM5.js → rules-CVcjwHXa.js} +1 -1
- package/dist/web/assets/{useFileDrop-CEn6qZnh.js → useFileDrop-vzFQ_b-5.js} +1 -1
- package/dist/web/assets/{useHeightGlide-BPjzH9PL.js → useHeightGlide-DBfdeOiD.js} +1 -1
- package/dist/web/assets/useRowFocus-CMvgf7Aw.js +1 -0
- package/dist/web/index.html +15 -15
- package/even-keel.config.example.json +1 -1
- package/package.json +1 -1
- package/dist/web/assets/TranscriptWindow-BN6jSpev.css +0 -1
- package/dist/web/assets/blocks-CiOz7u_W.js +0 -12
- package/dist/web/assets/feedLine-txivfLQO.js +0 -1
- package/dist/web/assets/index-BT7ooY-T.js +0 -25
- package/dist/web/assets/index-hTYDOTAZ.css +0 -1
- package/dist/web/assets/overview-0NAogPYB.js +0 -7
- package/dist/web/assets/packageGroups-6mYiV3fk.js +0 -1
- package/dist/web/assets/useRowFocus-COI8llTH.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,30 +4,126 @@ 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
|
-
## [
|
|
7
|
+
## [0.3.1] - 2026-11-17
|
|
8
|
+
|
|
9
|
+
A patch of 0.3: the CI and limit fixes that cost a chain time, and a clearer carry panel.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **What a waiting carry brings.** The panel of a carry waiting for its turn shows the number of commits, the conflicted files with the conflict lines of each, and **Skip**.
|
|
14
|
+
- **Update all** in the package catalog, to the right of **Check all**.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **One CI poll that gets no answer no longer leaves the pushed commit unchecked.** Before, a single timed-out poll during a run dropped the commit, so a red main was never fixed. The push is now watched for up to an hour, and the CI's later result decides it: red means a rerun and then a fix session, green means it passed. Meanwhile the CI panel says the CI did not answer.
|
|
19
|
+
- A Claude chain on a subscription no longer treats a session's cache as warm for an hour when the session writes the five-minute cache.
|
|
20
|
+
- When a limit resets early, a task no longer stays held by "paid usage possible, not confirmed" until the announced reset with usage at 0%.
|
|
21
|
+
- More limits are read correctly:
|
|
22
|
+
- Claude's limit windows come from the CLI's usage report, so reading an Ultra account without a five-hour limit no longer depends on how the CLI words its lines.
|
|
23
|
+
- A ChatGPT seat in a workspace (Team, Business, Edu) gets its spending cap and monthly credits read.
|
|
24
|
+
- Copilot no longer shows "unlimited" for a Business seat whose allowance is used up.
|
|
25
|
+
- Copilot: a turn that fails on "Failed to load models" shows the error instead of waiting for an answer.
|
|
26
|
+
- OpenCode: a permission request refused by the task's rules, such as reading `.env`, no longer ends the turn silently and leaves the session waiting with no question.
|
|
27
|
+
- The launch card shown when a session continues after a limit no longer says that the old session stops and a new one starts with a handoff, since the same session continues.
|
|
28
|
+
- A private repository on a free GitHub plan no longer shows "Could not verify protection" after every launch, since its branch cannot be protected.
|
|
29
|
+
- A pause on a refused pull request description no longer tells you to press Resume. The pull request opens by itself from the session's next mark.
|
|
30
|
+
- The GitLab profile form no longer requires a server address for GitLab.com, where the hint says to leave it empty.
|
|
31
|
+
- "What sessions get" reads `.claude/settings.json` from the project's branch, not from the main checkout's disk.
|
|
32
|
+
- The changelog window:
|
|
33
|
+
- For a released milestone, it shows the released section of the file instead of an old draft under `[Unreleased]`.
|
|
34
|
+
- On an account whose limit is spent, it shows a clear notice instead of the CLI's raw JSON answer.
|
|
35
|
+
- A carry waiting for its turn no longer shows the session of an earlier carry with the same name.
|
|
36
|
+
- A row's **Install** or **Update** button in the package catalog no longer stays stuck after the action.
|
|
37
|
+
- On a phone, a long question in the chat window no longer covers the answer options, and the question switcher no longer wraps around the text.
|
|
38
|
+
- The demo:
|
|
39
|
+
- The session window opened from the task's sessions finds its transcript, and the card of a finished task shows what the session did.
|
|
40
|
+
- The answer to DEMO-3's question appears above the `TASK DONE` line and is still there when the chat is opened again.
|
|
41
|
+
- Without git, "The demo is over" no longer says the branches were merged into the main one.
|
|
42
|
+
|
|
43
|
+
## [0.3.0] - 2026-11-16
|
|
44
|
+
|
|
45
|
+
0.3 needs neither a tracker account nor git to start: a built-in tracker, projects without git, a demo on the first start and a project wizard that clones or creates the repository. Sessions get Even Keel's own tasks server for every tracker, Forgejo issues join the trackers, Claude Code runs on Amazon Bedrock, Google Vertex AI and Microsoft Foundry, and OpenCode on an OpenRouter key. The page gains an event log, a chat window per task and a README badge of the chain.
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
|
|
49
|
+
- **A built-in tracker.** Tasks are kept in Even Keel's own database, with no account or token; it is the first choice of the tracker in the setup and the project wizard. A task's card edits it in place: title, description (a Preview and a Markdown editor), status, labels, milestone, links, parent and subtasks, deletion. An edit is saved when you leave the field and kept as a browser draft until it lands; an edit that crossed another opens a window with the difference. Screenshots and files pasted or dropped into a description become attachments the session gets. The card's journal keeps the agents' reports with their model, the sessions' questions, your answers and your notes. A ghost row at the end of each chain group and on top of the backlog adds a task.
|
|
50
|
+
- **Moving a built-in project to a real tracker.** **Move to another tracker** in the project's Tracker settings says what the tracker cannot hold, copies the open tasks with their statuses, parents, links, attachments and journal, and goes on after a refusal or a restart. **Switch** then moves the project there in the same chain order; the old tasks are marked with the key they moved to, and `/stats` counts their sessions under the new keys.
|
|
51
|
+
- **Projects without git.** A project can be a plain folder: its tasks share it, write their files there and close when the session ends its answer with the `TASK DONE` mark. Sessions are refused git there, each task gets its own handoff note, and a session still idle in the folder is stopped before the next task starts. The setup's Git step first asks **Use git?**, and the answer is the default of new projects. **Turn on git** on the Repository tab makes the folder a repository with the work so far in its first commit; a folder that became a repository by itself gets a band offering it.
|
|
52
|
+
- **A demo on the first start.** With no project yet, **Watch the demo** takes a small project on the built-in tracker through three tasks in about two minutes: one waits for another, one asks you a question in the chat. The agent is a script, so no account is used and nothing is spent. It runs with or without git, as the setup's Git step answered and git is there, and stays out of the statistics; the project wizard's **Remove the demo** removes it once your project is added.
|
|
53
|
+
- **The project wizard clones or creates the repository.** One field, **Folder or repository address**, takes an address to clone (the remote is asked at once and its branches are offered), a checkout already on the machine, a folder without git to make a repository of, a path that is not there yet, or a bare name for a new folder in Even Keel's projects folder. **Add project** opens a window with each step's progress: the clone with its percent and Git LFS files, the first commit, the project, Claude Code's trust and the packages, with **Retry** and with **Cancel**, which removes only what Even Keel made. A refused sign-in, an unknown SSH host key or a cut network is one line saying what to do; a missing name and e-mail for commits gets **Set them**, which asks for both over the page.
|
|
54
|
+
- **Even Keel's own tasks server** (`tasks@even-keel`) for every tracker: Huly, GitHub, Linear, Jira, GitLab, Forgejo, the built-in one and a project's feeds. Its five tools read and write tasks with links, parents, labels, milestones, estimates, components and attachments; nothing can be deleted through them. `task_read` downloads a task's files into `.temp/task-files`, `task_update` changes several tasks in one call, and a create cut off by a crash is found again by its marker instead of filed twice. A project you add gets the package on; the page warns when the tracker's own MCP server is on beside it. A session you start by hand gets the same tools through the `tasks` plugin.
|
|
55
|
+
- **Forgejo, Gitea and Codeberg issues as a tracker**, with the `forgejo` plugin and its `forgejo:task` skill: labels, milestones and blocking links come from the repository. On an organization's repository a token without `read:organization` still reads the tasks, and the project page says what sessions lose and which scope to add; a token without the issue scope is named as such, not as revoked.
|
|
56
|
+
- **Claude Code on Amazon Bedrock, Google Vertex AI and Microsoft Foundry.** **Add account** → **Cloud** takes the cloud's credentials (a profile, a key, or the environment of the user Even Keel runs as); the account runs through the Agent SDK and shows its spend and region.
|
|
57
|
+
- **OpenCode on an OpenRouter key**, with any of OpenRouter's models in a task's run. The account row shows the key's real spend, what is left of the key's own limit and the account's balance; `/stats` counts a session's real spend, with the estimate by price in a tip.
|
|
58
|
+
- **More limits are read:** OpenCode Go's subscription limits and Copilot's AI credits on their account rows, and a model's own week (Fable on Max, Ultra and Team) beside the account's. When that week is spent, the next task on its model waits for it to open while a task on another model goes on.
|
|
59
|
+
- **The event log**, **Log** in the header: launches, stops, settings changes, questions, limits, a red main, carry conflicts, a paused chain, package problems and moves between trackers, kept for 3000 entries and filtered by level, category and project. A new event shows as a toast for 12 seconds in sight, with a bar of the time left and a pause under the pointer, and the header counts the unread ones.
|
|
60
|
+
- **A chat window per task.** It has the task's head, a status line with the context ring and the model and effort of the last answer, a slash button and a panel with the description, attachments and comments; it outlives a handoff and Done and keeps a draft per task. **Accept as answer** closes a task with its session's last message. A reply to a session whose cache went cold first asks whether to start a new session with it, send it anyway or cancel. A session whose turn has ended while its background command runs says so instead of "working".
|
|
61
|
+
- **A README badge of a project's chain**: an SVG of what runs, what is done and the milestone's progress, pushed to a Cloudflare Worker you deploy from the `even-keel-badge` package. The project's **README badge** dialog sets it up with a preview and a still PNG for sites that take no SVG. Task titles pass a filter of private data and can be translated into English through your LiteLLM endpoint, and sessions give the badge a short status line.
|
|
62
|
+
- **The CI panel by push:** a row per workflow with its median time, history by push, each run's event and who pushed, a busy runner, and what the chain waits for. A red main gets one automatic rerun of its failed jobs before a fix session (`ci.rerunFailed`, on by default), and a run failed only because no runner took its jobs leaves the commit unchecked, not red.
|
|
63
|
+
- **Milestone order by hand** in a project's tracker window. Without one, milestones go by the tracker's own position, then date, then version, and Jira's versions by release date, as on its Releases page.
|
|
64
|
+
- **An automatic copy of the state database**, daily and before every schema step. Each copy is checked by a trial restore and includes the attachments; the newest 14 are kept (**Settings** → **Backups**, `backup.dir`, `backup.keep`).
|
|
65
|
+
- **Hotkeys:** Ctrl+Enter runs the chain, a double click opens a card, and the **Hotkeys** window in the gear menu changes them.
|
|
66
|
+
- Codex and OpenCode get an auto-compaction window of their own, set in the Agent card.
|
|
67
|
+
- The backlog panel searches its tasks, shows them 50 at a time with each task's run beside its key, and orders them newest first, oldest first or by priority. The project feed has a parents view, and a task's card lists a parent's subtasks on any tracker and the replies of a comment's thread.
|
|
68
|
+
- Notices take **Got it** and **Don't show again**; Settings → **Notices** turns back on what was turned off.
|
|
69
|
+
- A Claude setting changed right in an account folder's `settings.json` is kept: a band asks whether to make it shared, keep it for that account only or discard it.
|
|
70
|
+
- The ⋯ menu of an account row offers **Replace key** for a working key too.
|
|
71
|
+
- **`even-keel install`, `even-keel update` and the first install from `npx` print the page's address** once the page answers, taken from `EVEN_KEEL_HOST`/`EVEN_KEEL_PORT` of the environment and the data folder's `.env`. If the page has not answered after 30 s, they say where the log is instead. The first install from `npx` then opens the page in the browser. On Linux it does that only on a desktop with a display, never over SSH.
|
|
8
72
|
|
|
9
73
|
### Changed
|
|
10
74
|
|
|
11
|
-
- **What a task runs on is set on its card, not by a tracker label.** A task's run — provider, model and effort — is kept by Even Keel: the card's **Runs on** picks it, and a session can set it through the tasks server's `run` field of `tasks_create` and `task_update`. The effort is new: Claude Code's `low` to `max
|
|
75
|
+
- **What a task runs on is set on its card, not by a tracker label.** A task's run — provider, model and effort — is kept by Even Keel: the card's **Runs on** picks it, and a session can set it through the tasks server's `run` field of `tasks_create` and `task_update`. The effort is new: Claude Code's `low` to `max`, Codex's `minimal` to `xhigh`, OpenCode's variant and Copilot's reasoning effort; empty passes none. Labels `<Provider> | <model>` are no longer read. The update moves the run label of each open task into its run once, in the projects that had run labels on; the labels stay in the tracker. The setting `modelLabels` is removed.
|
|
12
76
|
- **OpenCode keeps a model for each provider it signs in to.** Switching OpenCode's account to one on another sign-in (ChatGPT, an Anthropic key, OpenRouter, Copilot, Go, the free models) and back no longer loses the model you set: the model field shows the one of the account's sign-in and says which it is, in the settings of Even Keel and of a project. In the config `models.opencode` becomes `models.opencode/<provider>`; the update moves yours by its model's prefix. On a task's card, picking another provider and back brings back the model you typed for it.
|
|
13
|
-
|
|
14
77
|
- **No label is kept out of the chain by default.** `chain.excludedLabels` starts empty and the built-in tracker no longer offers `Manual`: name the label you mark your own tasks with in the chain rules. An installation that relied on the default keeps `Manual` in its shared list after the update, so the same tasks stay out.
|
|
15
78
|
- **The main branch field offers the repository's branches, and saving another branch switches the main checkout to it**, in a project's settings and in the wizard that adds one: a branch the repository lacks is created from where the checkout stands, one only on a remote is taken from there, and the line under the field says which before you save. The wizard fills in the checkout's current branch and no longer refuses a branch the repository lacks. A checkout switched by hand is shown in the settings and on the chain's card, with buttons to make its branch the main one or to put the folder back, instead of only when a task fails to start.
|
|
16
|
-
- **The `checkpoint` plugin is now `agent-bridge
|
|
79
|
+
- **The `checkpoint` plugin is now `agent-bridge`, always on, with no switches**: handoffs, chat messages mid-turn, the merge check and the badge's status line run on its hooks. The first start after the update replaces `checkpoint@even-keel` with `agent-bridge@even-keel` in every project; a task already running keeps the old plugin until it ends. Let running tasks reach Done before you update: a task carried across the update on the old plugin was not tried through a handoff or a second restart. If you installed `checkpoint` into your own Claude Code by hand, uninstall it as [setup](docs/guide/setup.md#plugins) says.
|
|
17
80
|
- **A page tab open over the update may need a reload.** Page commands now answer only `{ok:true}`. A tab opened before the update reloads itself once the new service answers, but one held by an open dialog or a field you are typing in waits, and a command sent from it before the reload leaves it broken: reload it by hand.
|
|
81
|
+
- **Packages leave the tools page.** Their catalog is in Settings → **Packages**, and a project's packages open from the first button of its **Sessions** tab; the chat of a working session points there with a button.
|
|
82
|
+
- **A tracker profile turned off reaches nothing of its host**, and **Start** goes only by tasks read since the tracker answered. A tracker that does not answer is named on the project page, the home card and over the archive, and the page's calls to it fail at once instead of after the whole timeout.
|
|
83
|
+
- **A paused chain's toast and band say what happened, then the cause and one advice**, and messages name paths from the project folder.
|
|
84
|
+
- A CLI on a version Even Keel was not checked against is an entry of the event log instead of a banner. A provider on **Checked** whose copy you downloaded once fetches each newer checked version by itself.
|
|
85
|
+
- At most one free ChatGPT account may be signed in across Codex and OpenCode: a different second free account is refused, and one added before is held. Paid plans have no limit.
|
|
86
|
+
- A waiting session whose question is open in the chat has its cache kept warm too.
|
|
87
|
+
- A permission question shows the agent's description of the call, a long call's head and tail, and several commands marked; its tracker comment shows the call.
|
|
88
|
+
- The theme is **System**, **Light** or **Dark**, kept per browser; **System**, the default, follows the device.
|
|
89
|
+
- The page is laid out anew: the header's account card and work block, the project's head with its chain status and buttons in one block, a state strip under the chain's icon buttons and a one-line head on a phone, row actions that slide out on hover, project cards whose bars stand level, one **Open in…** button for several trackers, the task card's side panel in three zones, dialog refusals beside their buttons and code blocks that wrap long lines.
|
|
90
|
+
- `/stats` hides test projects by default (**Show test projects**), prices a model the config does not price from the models.dev catalogue, and gives MiniMax models a family of their own.
|
|
91
|
+
- The service is lighter on an idle machine: the state database is vacuumed, only changed chain rows are rewritten, and the page's live state is compressed.
|
|
92
|
+
- The guide is a page per area with an index, and its setup follows a new user's path.
|
|
93
|
+
- Even Keel has a new mark: a sloop with a mast and a narrow green fin keel.
|
|
18
94
|
|
|
19
95
|
### Security
|
|
20
96
|
|
|
21
97
|
- **A chain session's request to Even Keel's own address is refused.** Even Keel lets a request from its own machine through without the page's token, so a session under someone else's text could change Protection, answer a question for you or create a task in another project with a plain `curl`. The new Protection group **Requests to Even Keel's address**, on by default, makes the `agent-bridge` plugin (1.2.0) refuse a shell command that sends such a request, on every agent. It is a pattern, not isolation: a script the session wrote gets past it. Turn it off for a project whose tasks work with Even Keel's API.
|
|
22
98
|
- **The page takes a request only from its own origin, port included.** Before, the `Origin` check compared only the name, so a page on another port of an allowed name — a project's dev server on `localhost`, another service on your tailnet name — could post commands to Even Keel: start a chain, answer a session, add an MCP server. Now `Origin` must match the request's `Host` with its port, and a `POST` to `/api/` must be `Content-Type: application/json` (415 otherwise). A script posting to the API without that header has to add it.
|
|
23
99
|
- **An MCP server's whole dependency tree is pinned, and npm runs no install scripts.** A server started as `npx -y <package>@<range>` keeps its npm lock file next to its install, so two installs of one version run the same code; an update that changes a dependency says how many in a notice and lists them in the log. Install scripts of the package and its dependencies no longer run as the service's user: a package that needs them gets the **Install scripts** switch in its details. A server started any other way (`uvx`, `docker run`, `npx` without `-y`) shows "version not pinned" in its row. The new installs happen at a package's next update or check; one already installed keeps running as it was.
|
|
100
|
+
- **An outsider's issue on a public GitHub, GitLab or Forgejo repository enters the chain only with an entry label**: one of your required labels or `even-keel: approved`, which **Into the chain** puts on. An issue an outsider changed after the label stays out until you label it again; outsiders' comments stay on the card without reaching the session, and the tasks server hides their unlabelled issues. A public repository without required labels, or an issue template that puts an entry label on, gets a warning band.
|
|
101
|
+
- **Sessions, task commands and MCP servers get nothing of Even Keel's `.env`**: not the page token, Tally's passwords or the badge's secret. A package setting that holds a credential never reaches the page either.
|
|
102
|
+
- **The page cannot be embedded in a frame**, sends no referrer and allows scripts and connections only from its own origin. A reverse proxy must keep these response headers.
|
|
103
|
+
- **In pull request mode the description is read only from a file inside the task's folder**, never `.env` or anything under `.git`, and up to 64 KiB; a refused note pauses the chain before the push.
|
|
104
|
+
- An MCP server's error no longer carries its keys or tokens into the gateway's answer and the log.
|
|
24
105
|
|
|
25
106
|
### Fixed
|
|
26
107
|
|
|
27
|
-
- **A project's lone `AGENTS.md`
|
|
28
|
-
- **
|
|
29
|
-
-
|
|
108
|
+
- **A project's lone `AGENTS.md` reaches a Claude session once, not twice.** Claude Code reads the file by itself, so Even Keel no longer appends it to the system prompt, except when a `CLAUDE.md` lies in a folder above the checkout (such as `~/.claude/CLAUDE.md` for a checkout in your home folder): Claude Code skips the file then.
|
|
109
|
+
- **Claude's Protection rules against deleting a remote branch with a colon refspec and against `rm -rf C:`/`D:` now match**: they are written `:**`, which Claude Code reads as a pattern, instead of `:*`.
|
|
110
|
+
- **Codex applies the project's Protection rules**: Even Keel marks the project's folder as trusted in the account's `config.toml` before each turn, since Codex reads the rules only in a trusted folder.
|
|
111
|
+
- **Pull request mode: a session that asks you a question no longer has its task closed unanswered.** It now ends that turn without the `PULL REQUEST` line, so the chain waits for your answer. Before, a session could put the line under its question, and the task closed on an empty branch.
|
|
30
112
|
- **`npx even-keel` on macOS and Linux says what to do when npm cannot write its global folder**, as with Node from the nodejs.org installer, whose folder under `/usr/local` belongs to root: it installs nothing and prints the commands that move the folder into your home, also after an `EACCES` of npm itself. It refuses to run as root, since the service would then be installed for root.
|
|
113
|
+
- A task closed by a merged pull request, a pull request with nothing to open, a `NO CHANGES` mark or **Accept as answer** goes to the done status you chose, as a merge does.
|
|
114
|
+
- A Huly reply with a file reaches the session with its file: a reply goes to the session once two polls read it alike, and the files of Huly comments and thread replies download.
|
|
115
|
+
- After Done the chat shows the last session to the end of its turn.
|
|
116
|
+
- A session no longer waits for its background command after a `CHECKPOINT:` or `PULL REQUEST:` mark.
|
|
117
|
+
- A task released while the tracker was being read is kept and cleaned up after Done, and a worktree folder still held after Done is tried again, also after a restart.
|
|
118
|
+
- A turn that outlives SIGTERM is killed with SIGKILL, and on Windows a stopped session's leftover processes are looked for again after it exits.
|
|
119
|
+
- Claude Code and OpenCode installed from npm are found even when their postinstall did not run.
|
|
120
|
+
- `install.sh` on Linux without systemd writes no unit: it says why and how to run Even Keel without a service.
|
|
121
|
+
- An update no longer waits for a chain held by a limit whose reset is more than a minute away.
|
|
122
|
+
- A start while another process still holds the state database waits for it instead of failing.
|
|
123
|
+
- A session's context window is kept over a restart.
|
|
124
|
+
- `/stats` waits under many reads at once instead of failing.
|
|
125
|
+
- An answer cut at the length limit closes the code block it was cut inside.
|
|
126
|
+
- A pause on a refused pull request note no longer tells you to fix access.
|
|
31
127
|
|
|
32
128
|
## [0.2.4] - 2026-11-11
|
|
33
129
|
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ On Windows: `npx.cmd even-keel`. It installs Even Keel and sets it up as a servi
|
|
|
23
23
|
|
|
24
24
|
Open `http://localhost:4747`: a short setup, a wizard that adds a project, then **Start** — the chain takes its first task.
|
|
25
25
|
|
|
26
|
-
**Needs** Node.js 24 and an agent's CLI with an account; git is recommended; a tracker is optional — without one the tasks live in the built-in one. In full: [What it needs](docs/guide/setup.md#what-it-needs).
|
|
26
|
+
**Needs** Node.js 24 or newer and an agent's CLI with an account; git is recommended; a tracker is optional — without one the tasks live in the built-in one. In full: [What it needs](docs/guide/setup.md#what-it-needs).
|
|
27
27
|
|
|
28
28
|
**Sessions don't ask you before each tool call:** read [Before you run it](#before-you-run-it) first.
|
|
29
29
|
|
|
@@ -71,7 +71,7 @@ Parallel agents decide on their own what an unfinished task will look like, hand
|
|
|
71
71
|
|
|
72
72
|
## Before you run it
|
|
73
73
|
|
|
74
|
-
- **Even Keel depends on undocumented behaviour of the agents' CLIs**, none of it a public API. Last checked against **Claude Code 2.1.
|
|
74
|
+
- **Even Keel depends on undocumented behaviour of the agents' CLIs**, none of it a public API. Last checked against **Claude Code 2.1.326**, **codex-cli 0.169.0**, **OpenCode 1.19.6** and **Copilot CLI 1.0.112**; 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).
|
|
75
75
|
- **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.
|
|
76
76
|
- **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. Whoever writes a task's text steers its session: read [whose text a session reads and what it may do](docs/guide/security.md) before a chain runs on a public repository.
|
|
77
77
|
- **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.
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { runGit } from '../git/run.js';
|
|
3
3
|
import { hungEntry } from '../sessions/silence.js';
|
|
4
|
-
import { TranscriptFold } from '../sessions/transcript.js';
|
|
4
|
+
import { TranscriptFold, userLine } from '../sessions/transcript.js';
|
|
5
5
|
export const SCRIPT_PID = 4242;
|
|
6
6
|
const FEED_SIZE = 30;
|
|
7
|
+
/** The lines a record keeps, as `readSessionRecord`'s fold does. */
|
|
8
|
+
const RECORD_FEED = 5_000;
|
|
7
9
|
/** Captured before a scenario fakes the timers: `settled` polls in real time. */
|
|
8
10
|
const realTimeout = globalThis.setTimeout;
|
|
9
11
|
/** What a parked turn waits for; the scenario opens it. */
|
|
@@ -85,6 +87,13 @@ export class ScriptedAgent {
|
|
|
85
87
|
if (known === undefined)
|
|
86
88
|
throw new Error(`script: no session ${session.sessionId}`);
|
|
87
89
|
known.mcp = start.mcp ?? [];
|
|
90
|
+
// The prompt goes into the transcript as a CLI writes it: an answer to the pending question, or the user's own words
|
|
91
|
+
// (EKR-116). The question outlives the stop that passes the answer on in the summary, as in a transcript's fold.
|
|
92
|
+
const line = userLine(new Date().toISOString(), start.prompt, known.summary.ask, (text) => text.trim());
|
|
93
|
+
if (line !== null) {
|
|
94
|
+
known.lines.push(line);
|
|
95
|
+
known.summary = { ...known.summary, feed: known.lines.slice(-FEED_SIZE) };
|
|
96
|
+
}
|
|
88
97
|
this.calls.push({ kind: 'resume', task: start.name, sessionId: session.sessionId, cwd: start.cwd, prompt: start.prompt, provider: home.agent, account: home.key, model: start.model, ...(start.effort !== undefined && { effort: start.effort }) });
|
|
89
98
|
this.play(session.sessionId, start.prompt);
|
|
90
99
|
return session.sessionId;
|
|
@@ -115,8 +124,28 @@ export class ScriptedAgent {
|
|
|
115
124
|
summary: () => session()?.summary ?? new TranscriptFold().summary(),
|
|
116
125
|
};
|
|
117
126
|
}
|
|
118
|
-
|
|
119
|
-
|
|
127
|
+
/** The session's record from what the script keeps of it, as an adapter's would be read from its transcript (EKR-114). */
|
|
128
|
+
async record(home, sessionId) {
|
|
129
|
+
const session = this.known.get(sessionId);
|
|
130
|
+
if (session === undefined || session.entry.account !== home.key)
|
|
131
|
+
return undefined;
|
|
132
|
+
const { summary } = session;
|
|
133
|
+
return {
|
|
134
|
+
sessionId,
|
|
135
|
+
startedAt: new Date(session.entry.startedAt).toISOString(),
|
|
136
|
+
lastActivityAt: summary.lastActivityAt,
|
|
137
|
+
model: summary.model,
|
|
138
|
+
effort: summary.effort ?? null,
|
|
139
|
+
contextTokens: summary.contextTokens,
|
|
140
|
+
contextWindow: summary.contextWindow,
|
|
141
|
+
tokens: summary.tokens,
|
|
142
|
+
stage: summary.stage,
|
|
143
|
+
feed: session.lines.slice(-RECORD_FEED),
|
|
144
|
+
workdir: summary.workdir,
|
|
145
|
+
branch: summary.gitBranch,
|
|
146
|
+
apiError: summary.apiError?.text ?? null,
|
|
147
|
+
account: null,
|
|
148
|
+
};
|
|
120
149
|
}
|
|
121
150
|
async feed(_home, _sessionId, _after) {
|
|
122
151
|
return undefined;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const MARKER = /^(<{7}|={7}|\|{7}|>{7})(?: |$)/;
|
|
2
|
+
/** The lines inside a file's conflict blocks, `<<<<<<<` to `>>>>>>>`, the marker lines left out. */
|
|
3
|
+
export function conflictLines(text) {
|
|
4
|
+
let inside = false;
|
|
5
|
+
let lines = 0;
|
|
6
|
+
for (const line of text.split(/\r?\n/)) {
|
|
7
|
+
const marker = MARKER.exec(line)?.[1];
|
|
8
|
+
if (marker === undefined) {
|
|
9
|
+
if (inside)
|
|
10
|
+
lines += 1;
|
|
11
|
+
}
|
|
12
|
+
else if (marker.startsWith('<'))
|
|
13
|
+
inside = true;
|
|
14
|
+
else if (marker.startsWith('>'))
|
|
15
|
+
inside = false;
|
|
16
|
+
}
|
|
17
|
+
return lines;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Each conflicted file of a failed merge with its conflict lines (EKR-134), read before `merge --abort`. A file deleted
|
|
21
|
+
* on one side has no markers and no lines: the index lacks its stage of that side.
|
|
22
|
+
*/
|
|
23
|
+
export async function readConflict(git, repo, files, read) {
|
|
24
|
+
const stages = new Map();
|
|
25
|
+
for (const entry of (await git(repo, ['ls-files', '--unmerged', '-z'])).out.split('\0')) {
|
|
26
|
+
const tab = entry.indexOf('\t');
|
|
27
|
+
if (tab < 0)
|
|
28
|
+
continue;
|
|
29
|
+
const stage = entry.slice(0, tab).split(' ')[2];
|
|
30
|
+
const path = entry.slice(tab + 1);
|
|
31
|
+
if (stage !== undefined)
|
|
32
|
+
stages.set(path, (stages.get(path) ?? new Set()).add(stage));
|
|
33
|
+
}
|
|
34
|
+
return Promise.all(files.map(async (path) => {
|
|
35
|
+
const seen = stages.get(path);
|
|
36
|
+
if (seen !== undefined && (!seen.has('2') || !seen.has('3')))
|
|
37
|
+
return { path, lines: null };
|
|
38
|
+
const text = await read(path);
|
|
39
|
+
return { path, lines: text === null ? 0 : conflictLines(text) };
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { englishOf, fail, notice } from '../notice/notice.js';
|
|
2
|
+
import { readConflict } from './conflict.js';
|
|
2
3
|
/**
|
|
3
4
|
* Whether the chain is quiet enough for the release branch to go into its project's branch: stopped, empty, or paused
|
|
4
5
|
* with its session not working, and neither cleaning up after a task nor waiting on a push of main.
|
|
@@ -16,7 +17,8 @@ export function chainQuiet(chain, busy) {
|
|
|
16
17
|
* Carries the branch of each release project into the branch of the project it merges into (BTN-172), in that
|
|
17
18
|
* project's main checkout: by `merge --no-edit` once its chain is quiet, or at once on "Carry now". A failed merge
|
|
18
19
|
* (a conflict, or git refusing with no conflicted file, BTN-314) is aborted, so the checkout stays clean and the chain goes on, and holds the carry until "Carry now", an agent's session or until the branch
|
|
19
|
-
* has the commits by a merge by hand. The hold lives in memory: after a restart the carry is tried once more
|
|
20
|
+
* has the commits by a merge by hand. The hold lives in memory: after a restart the carry is tried once more, unless a
|
|
21
|
+
* session resolves it; then the page shows the conflict that session was asked for (EKR-135).
|
|
20
22
|
* A held conflict may be resolved by an agent (BTN-369); while its session is asked for, nothing is merged here.
|
|
21
23
|
* With `auto` the session is asked for at the conflict itself (BTN-370), once per release commit: a held carry is then
|
|
22
24
|
* tried again once the release branch has moved, and a session that did not land it gets no successor before that.
|
|
@@ -34,8 +36,11 @@ export class ForwardMerger {
|
|
|
34
36
|
}
|
|
35
37
|
view() {
|
|
36
38
|
return Object.fromEntries([...this.views].map(([from, view]) => {
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
+
const carry = this.deps.carrying(from);
|
|
40
|
+
if (carry === null)
|
|
41
|
+
return [from, view];
|
|
42
|
+
const conflict = view.conflict ?? carry.conflict;
|
|
43
|
+
return [from, conflict === undefined ? { ...view, agent: carry.task } : { ...view, agent: carry.task, conflict }];
|
|
39
44
|
}));
|
|
40
45
|
}
|
|
41
46
|
tick() {
|
|
@@ -58,7 +63,7 @@ export class ForwardMerger {
|
|
|
58
63
|
return Promise.reject(fail('forward.notRelease', { project: from }));
|
|
59
64
|
const agent = this.deps.carrying(from);
|
|
60
65
|
if (agent !== null)
|
|
61
|
-
return Promise.reject(fail('forward.agent', { from, task: agent }));
|
|
66
|
+
return Promise.reject(fail('forward.agent', { from, task: agent.task }));
|
|
62
67
|
return this.queue(() => this.step(pair, true));
|
|
63
68
|
}
|
|
64
69
|
/** "Resolve with the agent": only a held conflict, told with the release commit it is to bring in. */
|
|
@@ -77,7 +82,10 @@ export class ForwardMerger {
|
|
|
77
82
|
}
|
|
78
83
|
ask(from, view, hold, commit) {
|
|
79
84
|
const files = hold.params.files;
|
|
80
|
-
|
|
85
|
+
const ask = { into: view.into, ref: refOf(from), commit, commits: view.behind ?? 0, files, output: hold.detail ?? '' };
|
|
86
|
+
if (view.conflict !== undefined)
|
|
87
|
+
ask.conflict = view.conflict;
|
|
88
|
+
return this.deps.resolve(from, ask);
|
|
81
89
|
}
|
|
82
90
|
/** The release commit fetched for the carry, or why it could not be read. */
|
|
83
91
|
async commitOf(into, from) {
|
|
@@ -95,7 +103,11 @@ export class ForwardMerger {
|
|
|
95
103
|
const view = { into, behind: before?.behind ?? null, hold: before?.hold ?? null, held: before?.held ?? false };
|
|
96
104
|
if (before?.last !== undefined)
|
|
97
105
|
view.last = before.last;
|
|
106
|
+
if (before?.conflict !== undefined)
|
|
107
|
+
view.conflict = before.conflict;
|
|
98
108
|
await this.carryInto(view, from, now);
|
|
109
|
+
if (!view.held)
|
|
110
|
+
delete view.conflict;
|
|
99
111
|
if (JSON.stringify(view) !== JSON.stringify(before)) {
|
|
100
112
|
this.views.set(from, view);
|
|
101
113
|
this.deps.changed();
|
|
@@ -142,7 +154,12 @@ export class ForwardMerger {
|
|
|
142
154
|
const merged = await git(repo, ['merge', '--no-edit', '-m', `Merge branch '${this.deps.branch(from)}' of ${this.deps.label(from)} into ${branch}`, ref]);
|
|
143
155
|
if (merged.code !== 0) {
|
|
144
156
|
const files = (await git(repo, ['diff', '--name-only', '--diff-filter=U'])).out.split(/\r?\n/).filter((line) => line.trim() !== '');
|
|
157
|
+
const conflict = files.length > 0 ? await readConflict(git, repo, files, (path) => this.deps.read(repo, path)) : undefined;
|
|
145
158
|
await git(repo, ['merge', '--abort']);
|
|
159
|
+
if (conflict === undefined)
|
|
160
|
+
delete view.conflict;
|
|
161
|
+
else
|
|
162
|
+
view.conflict = conflict;
|
|
146
163
|
const hold = files.length > 0 ? notice('forward.conflict', { from, into, files }, { detail: merged.out }) : notice('forward.failed', { from, into }, { detail: merged.out });
|
|
147
164
|
this.deps.log(`forward: ${files.length > 0 ? englishOf(hold) : `${englishOf(hold)}: ${merged.out.trim()}`}`);
|
|
148
165
|
Object.assign(view, { hold, held: true });
|
|
@@ -81,8 +81,7 @@ export class Handovers {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
const now = this.deps.now();
|
|
84
|
-
|
|
85
|
-
this.reopenEarly(chain.project, current, session, now);
|
|
84
|
+
this.reopenEarly(chain.project, current, session, now);
|
|
86
85
|
const hold = current.limit;
|
|
87
86
|
const spentUntil = overage === undefined ? null : this.deps.limitReset(chain.project, current.task);
|
|
88
87
|
if (spentUntil !== null && Date.parse(spentUntil) > now.getTime())
|
|
@@ -33,8 +33,9 @@ export class MainCheck {
|
|
|
33
33
|
/** The latest push of main the chain did not make, by project (BTN-707): awaited only for `commands.afterGreen`, it holds no launch. */
|
|
34
34
|
outside = new Map();
|
|
35
35
|
/**
|
|
36
|
-
* The chain's push that stayed unchecked because no runner took it in time
|
|
37
|
-
* but a
|
|
36
|
+
* The chain's push that stayed unchecked because no runner took it in time (BTN-719) or the CI did not answer
|
|
37
|
+
* (`unanswered`, EKR-136), by project: the launch went on, but a verdict said later still judges it, a red one as any
|
|
38
|
+
* red main. The next push of the chain or `LATE_MS` ends the watch.
|
|
38
39
|
*/
|
|
39
40
|
late = new Map();
|
|
40
41
|
/** Who pushed the latest commits of each project's main the service saw (BTN-829), oldest first. */
|
|
@@ -56,12 +57,13 @@ export class MainCheck {
|
|
|
56
57
|
/** What the CI panel shows of the project's main (BTN-829). */
|
|
57
58
|
view(project) {
|
|
58
59
|
const late = this.late.get(project);
|
|
59
|
-
const judging = this.state.ci[project]?.check?.commit ?? late?.commit;
|
|
60
|
+
const judging = this.state.ci[project]?.check?.commit ?? late?.push.commit;
|
|
60
61
|
const record = this.state.ci[project]?.afterGreenRun;
|
|
61
62
|
const after = record !== undefined && this.deps.afterGreen(project) ? { ...record, running: this.afterRuns.get(project)?.commit === record.commit } : undefined;
|
|
63
|
+
const until = late === undefined ? '' : new Date(Date.parse(late.push.at) + LATE_MS).toISOString();
|
|
62
64
|
return {
|
|
63
65
|
...(judging !== undefined && { judging }),
|
|
64
|
-
...(late !== undefined && { late: { commit: late.commit, until
|
|
66
|
+
...(late !== undefined && { late: { commit: late.push.commit, until, ...(late.unanswered && { unanswered: true }) } }),
|
|
65
67
|
...(after !== undefined && { afterGreen: after }),
|
|
66
68
|
pushes: Object.fromEntries(this.pushers.get(project) ?? []),
|
|
67
69
|
};
|
|
@@ -290,10 +292,10 @@ export class MainCheck {
|
|
|
290
292
|
changed = (await this.settleLate(open, stops, fixes)) || changed;
|
|
291
293
|
return { changed, stops, fixes };
|
|
292
294
|
}
|
|
293
|
-
/** A late verdict on a push left unchecked
|
|
295
|
+
/** A late verdict on a push left unchecked: green as any green, red files the fix as any red main. */
|
|
294
296
|
async settleLate(open, stops, fixes) {
|
|
295
297
|
let changed = false;
|
|
296
|
-
for (const [project, push] of [...this.late]) {
|
|
298
|
+
for (const [project, { push }] of [...this.late]) {
|
|
297
299
|
const gate = this.gate(project);
|
|
298
300
|
const rerunBefore = gate.rerun;
|
|
299
301
|
const { verdict, reran } = await this.judged(project, gate, push);
|
|
@@ -431,9 +433,11 @@ export class MainCheck {
|
|
|
431
433
|
delete gate.fix;
|
|
432
434
|
if (reasons.length > 0)
|
|
433
435
|
this.log(`ci: ${project}: ${commit} stays unchecked: ${why}`);
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
436
|
+
// One failed poll in the middle of a run must not drop the commit (EKR-136): what the CI says later still judges it.
|
|
437
|
+
if (reasons.length > 0) {
|
|
438
|
+
const unanswered = !reasons.some((reason) => reason.code === 'ci.notTaken');
|
|
439
|
+
this.late.set(project, { push, unanswered });
|
|
440
|
+
this.log(`ci: ${project}: ${commit} is still watched: ${unanswered ? 'the CI judges it once it answers' : 'a run taken later judges it'}`);
|
|
437
441
|
}
|
|
438
442
|
return;
|
|
439
443
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fail } from '../notice/notice.js';
|
|
2
2
|
import { changelogPrompt, materialOf } from './draft.js';
|
|
3
|
-
import { answerSection, changelogPlan, withSection } from './file.js';
|
|
3
|
+
import { answerSection, changelogPlan, newestReleased, withSection } from './file.js';
|
|
4
4
|
import { addVersion, latestVersion, markWritten, spentOn, writtenTasks } from './store.js';
|
|
5
5
|
const headingOf = (text) => text.split('\n')[0].trimEnd();
|
|
6
6
|
/** What every turn is told about the releases before its section. */
|
|
@@ -42,11 +42,14 @@ export class ChangelogDrafts {
|
|
|
42
42
|
const latest = await latestVersion(db, project, milestone);
|
|
43
43
|
const [file, tags] = await Promise.all([this.deps.file(project), this.deps.tags(project)]);
|
|
44
44
|
const plan = changelogPlan(file.text, milestone, tags);
|
|
45
|
+
// A written version whose section has since been released is frozen: only new tasks go on, into the next patch's section.
|
|
46
|
+
const frozen = latest !== null && latest.written !== null && plan.section === null && plan.tag !== null;
|
|
45
47
|
const view = async (version, start = null) => ({
|
|
46
48
|
project,
|
|
47
49
|
milestone,
|
|
48
50
|
file: file.path,
|
|
49
51
|
released: plan.tag,
|
|
52
|
+
frozen: frozen && version === latest ? { section: newestReleased(plan)?.text ?? null } : null,
|
|
50
53
|
version,
|
|
51
54
|
start,
|
|
52
55
|
spent: await spentOn(db, project, milestone),
|
|
@@ -66,8 +69,6 @@ export class ChangelogDrafts {
|
|
|
66
69
|
return view(await this.fresh(project, milestone, plan, file.path, tags, op.op === 'draft' ? 'draft' : 'again'));
|
|
67
70
|
if (latest === null)
|
|
68
71
|
throw fail('changelog.noDraft', { milestone });
|
|
69
|
-
// A written version whose section has since been released is frozen: only new tasks go on, into the next patch's section.
|
|
70
|
-
const frozen = latest.written !== null && plan.section === null && plan.tag !== null;
|
|
71
72
|
if (frozen && op.op !== 'add')
|
|
72
73
|
throw fail('changelog.released', { milestone, tag: plan.tag ?? '' });
|
|
73
74
|
if (op.op === 'write')
|
|
@@ -93,6 +93,10 @@ export function changelogPlan(text, milestone, tags) {
|
|
|
93
93
|
tag: newest?.tag ?? null,
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
|
+
/** The released section of the milestone's newest version in the file; `null` — the file has none. */
|
|
97
|
+
export function newestReleased(plan) {
|
|
98
|
+
return plan.released.reduce((newest, each) => (newest === null || byVersion(each.name, newest.name) > 0 ? each : newest), null);
|
|
99
|
+
}
|
|
96
100
|
/**
|
|
97
101
|
* The sections of the newest version line older than the milestone: as long as the milestone's version (`0.1` for `v0.2`),
|
|
98
102
|
* or the newest section's version without its last part for a milestone that is not a version.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const WINDOWS = ['fiveHour', 'sevenDay', 'month'];
|
|
2
|
+
/**
|
|
3
|
+
* The account's window used up as of its last known limits, so a paid draft turn is not sent only to be refused: the
|
|
4
|
+
* one that resets last, as the account waits for it. A window whose reset has already come counts as free.
|
|
5
|
+
*/
|
|
6
|
+
export function spentLimitOf(limits, now) {
|
|
7
|
+
if (limits === null)
|
|
8
|
+
return null;
|
|
9
|
+
const spent = WINDOWS.flatMap((window) => {
|
|
10
|
+
const each = limits[window];
|
|
11
|
+
return each !== null && each !== undefined && each.usedPercentage >= 100 && Date.parse(each.resetsAt) > now.getTime() ? [{ window, until: each.resetsAt }] : [];
|
|
12
|
+
});
|
|
13
|
+
return spent.sort((a, b) => Date.parse(a.until) - Date.parse(b.until)).at(-1) ?? null;
|
|
14
|
+
}
|
|
15
|
+
const REFUSAL = /usage_limit_reached|"api_error_status"\s*:\s*429|hit your [\w -]*limit|usage limit/i;
|
|
16
|
+
const WINDOW_WORDS = [
|
|
17
|
+
[/5-hour|five-hour/i, 'fiveHour'],
|
|
18
|
+
[/weekly|7-day|seven-day/i, 'sevenDay'],
|
|
19
|
+
[/monthly/i, 'month'],
|
|
20
|
+
];
|
|
21
|
+
/**
|
|
22
|
+
* Whether the error of a one-turn write is the CLI's refusal on a spent limit (a 429, `usage_limit_reached`, "hit your
|
|
23
|
+
* … limit"), with the window its text names; `null` — some other failure.
|
|
24
|
+
*/
|
|
25
|
+
export function limitRefusalIn(text) {
|
|
26
|
+
if (!REFUSAL.test(text))
|
|
27
|
+
return null;
|
|
28
|
+
const window = WINDOW_WORDS.find(([words]) => words.test(text))?.[1];
|
|
29
|
+
return window === undefined ? {} : { window };
|
|
30
|
+
}
|
|
@@ -6,8 +6,13 @@ export async function branchProtection(target, branch, token, fetcher = fetch) {
|
|
|
6
6
|
const base = { remote, branch, status: 'unknown', bypass: false, url: kind === 'gitlab' ? `${repository}/-/settings/repository` : `${repository}/settings/${kind === 'github' ? 'rules' : 'branches'}` };
|
|
7
7
|
const get = async (url) => {
|
|
8
8
|
const result = await fetcher(url, { headers: { accept: 'application/json', 'user-agent': 'even-keel', ...(token === null ? {} : { authorization: `${kind === 'forgejo' ? 'token' : 'Bearer'} ${token}` }) }, signal: AbortSignal.timeout(10_000), redirect: 'error' });
|
|
9
|
-
|
|
9
|
+
if (result.ok)
|
|
10
|
+
return { status: result.status, value: await result.json(), message: null };
|
|
11
|
+
const body = await result.json().catch(() => null);
|
|
12
|
+
return { status: result.status, value: null, message: typeof body?.message === 'string' ? body.message : null };
|
|
10
13
|
};
|
|
14
|
+
// GitHub's refusal of branch protection and rulesets for a private repository on the free plan.
|
|
15
|
+
const planRefused = (answer) => answer.status === 403 && answer.message !== null && /upgrade to github pro|make this repository public/i.test(answer.message);
|
|
11
16
|
const path = `/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}`;
|
|
12
17
|
try {
|
|
13
18
|
if (kind === 'github') {
|
|
@@ -39,6 +44,8 @@ export async function branchProtection(target, branch, token, fetcher = fetch) {
|
|
|
39
44
|
return { ...base, status: 'unprotected' };
|
|
40
45
|
if (classic.status === 200 && rules.status === 200)
|
|
41
46
|
return { ...base, status: 'unprotected' };
|
|
47
|
+
if (current.value?.protected === false && planRefused(classic) && planRefused(rules))
|
|
48
|
+
return { ...base, status: 'unavailable' };
|
|
42
49
|
return base;
|
|
43
50
|
}
|
|
44
51
|
if (kind !== 'forgejo' || token === null)
|
|
@@ -7,7 +7,7 @@ import { cliVersionOf } from '../agent/versions.js';
|
|
|
7
7
|
import { parseUsage } from '../limits/usage.js';
|
|
8
8
|
import { findBinary } from '../paths.js';
|
|
9
9
|
import { DEFAULT_LANGUAGE } from '../settings/defaults.js';
|
|
10
|
-
import {
|
|
10
|
+
import { warmCacheMs } from '../sessions/cache.js';
|
|
11
11
|
import { readSessionRecord, readTranscript, readTranscriptImage, transcriptFile } from '../sessions/history.js';
|
|
12
12
|
import { transcriptIds } from '../sessions/owners.js';
|
|
13
13
|
import { bridgeOfRecord, remoteAtStartup } from '../sessions/remote.js';
|
|
@@ -25,7 +25,7 @@ import { SDK_KIND } from './sdk/registry.js';
|
|
|
25
25
|
import { fetchSdk, sdkModuleIn, sdkVersionOf } from './sdk/release.js';
|
|
26
26
|
import { trustFolder } from './trust.js';
|
|
27
27
|
/** The version the README's "Before you run it" names; raised after the live run of each release (`docs/releases.md`). */
|
|
28
|
-
const CHECKED = '2.1.
|
|
28
|
+
const CHECKED = '2.1.326';
|
|
29
29
|
/** Even Keel's folder of SDK sessions in `state/` and of the SDK's copies in `state/cli/`. */
|
|
30
30
|
export const CLAUDE_SDK = 'claude-sdk';
|
|
31
31
|
const SDK_TRANSPORT = 'sdk';
|
|
@@ -175,8 +175,8 @@ export const claude = {
|
|
|
175
175
|
const { cwd, prompt, model, settings, mcp, plugins, effort } = start;
|
|
176
176
|
return cli.warm(home, sessionId, cwd, prompt, model, { settings, mcp, plugins, effort, instructions: agentsFallback(cwd) });
|
|
177
177
|
},
|
|
178
|
-
//
|
|
179
|
-
warmMs: (cache, apiKey) =>
|
|
178
|
+
// The lifetime the transcript last wrote (`cacheTtl`, a subscription's overage); before any write an hour on a subscription, five minutes on a key.
|
|
179
|
+
warmMs: (cache, apiKey) => warmCacheMs(cache?.ttl ?? (apiKey ? null : '1h')),
|
|
180
180
|
liveRecords,
|
|
181
181
|
remote: {
|
|
182
182
|
enabled: remoteAt,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Raised after the live run of each release (`docs/releases.md`). */
|
|
2
|
-
export const CODEX_CHECKED = '0.
|
|
2
|
+
export const CODEX_CHECKED = '0.169.0';
|
|
@@ -18,7 +18,7 @@ import { foldEvents } from './transcript.js';
|
|
|
18
18
|
import { withTurnError } from './errors.js';
|
|
19
19
|
const HISTORY_FEED = 5_000;
|
|
20
20
|
/** The version the README's "Before you run it" names; raised after the live run of each release (`docs/releases.md`). */
|
|
21
|
-
const CHECKED = '1.0.
|
|
21
|
+
const CHECKED = '1.0.112';
|
|
22
22
|
/**
|
|
23
23
|
* GitHub Copilot CLI through `copilot -p … --output-format json`: a turn is a detached process, as Codex's is; a session
|
|
24
24
|
* lives between turns in Even Keel's registry and the account folder's `session-state/<id>/events.jsonl`
|
|
@@ -2,9 +2,12 @@ import { notice } from '../notice/notice.js';
|
|
|
2
2
|
import { lastEvent } from '../codex/turns.js';
|
|
3
3
|
/** The first line of the plain text the CLI exits with when nothing signs it in; a list of the ways in follows it. */
|
|
4
4
|
const SIGN_IN_REFUSAL = 'Copilot can be authenticated with GitHub using ';
|
|
5
|
+
/** The first Error line the CLI exits with when it cannot fetch the model list from the Copilot API. */
|
|
6
|
+
const MODELS_REFUSAL = 'Error: Failed to load models';
|
|
5
7
|
/**
|
|
6
|
-
* stdout also contains JSON events and warnings;
|
|
7
|
-
*
|
|
8
|
+
* stdout also contains JSON events and warnings; a CLI refusal is the Error lines of the plain-text block after the
|
|
9
|
+
* last event, which may go on with advice (EKR-113), and the sign-in refusal, which has no Error line of its own, is
|
|
10
|
+
* told by its first line.
|
|
8
11
|
*/
|
|
9
12
|
export function outputError(output) {
|
|
10
13
|
if (lastEvent(output)?.exitCode === 0)
|
|
@@ -13,14 +16,16 @@ export function outputError(output) {
|
|
|
13
16
|
const signIn = lines.find((line) => line.startsWith(SIGN_IN_REFUSAL));
|
|
14
17
|
if (signIn !== undefined)
|
|
15
18
|
return signIn;
|
|
16
|
-
const
|
|
17
|
-
return
|
|
19
|
+
const errors = lines.slice(lines.findLastIndex((line) => line.startsWith('{')) + 1).filter((line) => line.startsWith('Error: '));
|
|
20
|
+
return errors.length === 0 ? undefined : errors.join('\n');
|
|
18
21
|
}
|
|
19
|
-
/** The notice of a refusal the page can fix: a model the account cannot use,
|
|
22
|
+
/** The notice of a refusal the page can fix: a model the account cannot use, no sign-in, or no way to the Copilot API. */
|
|
20
23
|
export function refusalNotice(text) {
|
|
21
24
|
if (text.startsWith(SIGN_IN_REFUSAL))
|
|
22
25
|
return notice('copilot.notSignedIn', {});
|
|
23
|
-
|
|
26
|
+
if (text.startsWith(MODELS_REFUSAL))
|
|
27
|
+
return notice('copilot.apiUnreachable', {});
|
|
28
|
+
const model = /^Error: Model "([^"\r\n]+)" from --model flag is not available\.$/m.exec(text)?.[1];
|
|
24
29
|
return model === undefined ? undefined : notice('copilot.modelUnavailable', { model });
|
|
25
30
|
}
|
|
26
31
|
/**
|