paseo-follow-up 2.0.1-beta.7 → 2.0.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 +147 -0
- package/package.json +1 -1
- package/server/daemon.ts +24 -13
- package/server/engine.ts +24 -4
- package/shared/changelog.ts +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,153 @@
|
|
|
2
2
|
|
|
3
3
|
What changed in each version of Follow-up, newest first. Follow-up shows the curated part of a major release in "What's new" after the update, and every version's notes from Home's version line.
|
|
4
4
|
|
|
5
|
+
## 2.0.1 (2026-11-14)
|
|
6
|
+
|
|
7
|
+
Follow-up 2.0.1 turns fixes into plain tasks you can see and steer, makes merging one click, and runs much lighter on your machine.
|
|
8
|
+
|
|
9
|
+
### Tasks you can see and steer
|
|
10
|
+
|
|
11
|
+
- What Follow-up finds on your PRs (conflicts, review comments, failing checks, restacks) is now a task in the workspace's Tasks, with one plain state: Queued, Sent, Needs you or Done.
|
|
12
|
+
- The top of Tasks says who the next message goes to, when it goes and why it waits, with Preview and Send now. Turn Auto-send off on a task to keep it for yourself.
|
|
13
|
+
- Follow-up checks GitHub instead of asking you to Retry: what's cleared is done, and what's still open goes in the next message. It asks you only when a task went out twice with no change.
|
|
14
|
+
- Home's "Follow-up is fixing" is now "Sending": each message on its way, with when and why it goes out.
|
|
15
|
+
|
|
16
|
+
### Merging and review
|
|
17
|
+
|
|
18
|
+
- One click on Merge merges, and the button names everything it merges first ("Merge 3 PRs"). A blocker found at click time merges nothing and says why.
|
|
19
|
+
- Set a repository to No review in Settings → Shipping PRs, or with "Let the agent merge in" on a no-reviewers row: agents merge their own PRs once checks pass, and Follow-up never asks you for reviewers there.
|
|
20
|
+
- A PR without reviewers asks once in Needs you, naming the suggested reviewer.
|
|
21
|
+
- Every Needs you row about a PR opens it in one click.
|
|
22
|
+
|
|
23
|
+
### Answering agents
|
|
24
|
+
|
|
25
|
+
- "Add note" on a decision card sends your pick with a note ("A, but keep the BOM off").
|
|
26
|
+
- On Paseo 0.16, Put in chat adds your answer to the end of the agent's message box. An answer you copied or put in the chat reads "not sent yet" everywhere until it reaches the agent.
|
|
27
|
+
- An open question shows once, under one name, in the panel and on Home.
|
|
28
|
+
|
|
29
|
+
### New
|
|
30
|
+
|
|
31
|
+
- Rename with AI from a workspace's menu or ⌘K: Follow-up suggests a short name, and Undo puts the old one back.
|
|
32
|
+
- Report a bug, an idea or feedback from Settings, ⌘K or any error message. Your agent writes it up, removes private names and shows you the issue before it goes to GitHub.
|
|
33
|
+
- When an agent creates another agent or a workspace, the chat shows a card for it with its live status.
|
|
34
|
+
- Search results look like your list's rows, with your words highlighted. The sidebar view has a filter and Home's sort, the same on every device, and right-click opens a workspace's menu.
|
|
35
|
+
- Home remembers which groups you folded (Needs you always opens), and the phone keeps your settings category and folded sections.
|
|
36
|
+
|
|
37
|
+
### Lighter and faster
|
|
38
|
+
|
|
39
|
+
- On Paseo 0.16, Home, the sidebar and the pills update the moment something changes instead of checking every 15 to 60 seconds, and an open Follow-up sends almost nothing while you aren't using it.
|
|
40
|
+
- Follow-up uses about half the CPU and much less memory, reads about 50 times less from disk, keeps one connection to Paseo and uses far less of your GitHub API limit.
|
|
41
|
+
- Pull requests keep their last known status when GitHub is unreachable or out of API budget, instead of turning Unknown.
|
|
42
|
+
|
|
43
|
+
### Settings and fixes
|
|
44
|
+
|
|
45
|
+
- The deploy check is a per-repository setting on your machine: Settings → Following → PR workflow shows it for each repository, or Not set up.
|
|
46
|
+
- With Follow every workspace off, only the projects you switch on are followed.
|
|
47
|
+
- Follow-up pauses only when you stop the main agent, not after a compaction, a replaced turn or a reload.
|
|
48
|
+
- A merged PR reads "Merged", not "PR closed", and a PR merged long ago no longer comes back to Needs you.
|
|
49
|
+
- "No ask stated" and "Nothing needed" no longer linger in Needs you above real work.
|
|
50
|
+
|
|
51
|
+
<details><summary>Full changelog since 2.0.0</summary>
|
|
52
|
+
|
|
53
|
+
### Home and Needs you
|
|
54
|
+
|
|
55
|
+
- Rename with AI: pick it from a workspace's menu (Home, the sidebar view, the panel's new More button) or ⌘K, and Follow-up suggests a short name from the Summary, PRs and linked items. Edit it or accept it; Undo puts the old name back.
|
|
56
|
+
- What Follow-up finds on your PRs (conflicts, review feedback, failing checks, restacks) are now ordinary tasks in the workspace's Tasks, each with its PR and one plain state: Queued, Sent, Needs you or Done.
|
|
57
|
+
- Needs you, Home and the chat pill say "tasks" everywhere, and the Send in Needs you names the agent and doesn't repeat the task list.
|
|
58
|
+
- Home remembers which groups you folded. Needs you always opens, so nothing waiting on you hides behind a fold.
|
|
59
|
+
- A pull request without reviewers asks once in Needs you, naming the suggested reviewer ("Add reviewers to … : Ravi"), instead of a second reviewers card beside it.
|
|
60
|
+
- Home's "Follow-up is fixing" is now "Sending": messages on their way to an agent, with when and why each goes out, and Send now where it would go through. A send that waits on you stays in Needs you.
|
|
61
|
+
- Every Needs you row about a PR opens it in one click: an Open #N link beside its action, and each #N it names is a link.
|
|
62
|
+
- Agents get each inbox row's PR links from inbox_list.
|
|
63
|
+
- A copied answer, or one put in the chat, stays in Needs you as "Your Q1 answer isn't sent yet" until it reaches the agent. Sending it from the chat, Send on that row (one click) or Sign off clears it. Before, Copy cleared it at once.
|
|
64
|
+
- On Paseo 0.16, the recovery agent runs in the background: no tab, no notification and no sidebar row. Its progress shows in the workspace panel.
|
|
65
|
+
- The "has no reviewers" row has a "Let the agent merge in" link that switches its repository to No review, with Undo.
|
|
66
|
+
- Switching a repository to No review clears its "Add reviewers" asks everywhere at once (Needs you, the header, the pill and Home); Undo brings them back.
|
|
67
|
+
- Search results look like the rows of your list, with the words you typed highlighted where they appear. A match in a branch, PR or linked issue shows on the second line.
|
|
68
|
+
- The Follow-up sidebar view has a filter and Home's sort. The sort is one setting for Home and the sidebar, the same on every device, and agents can change it when you ask.
|
|
69
|
+
- A task names the agent working on it and whether it is working, idle or closed, instead of a stale "Agent working", with Open agent. The status line and Home spin only while that agent really runs.
|
|
70
|
+
- An answer you copied or put in the agent's message box now reads "not sent yet" on the chat's card, in the question and in Activity, like Needs you, instead of "Answered" with a check. It reads Answered once it reaches the agent.
|
|
71
|
+
- In menus on a phone, the check beside the chosen sort and the action icons now sit centred beside their item, sized to match the text.
|
|
72
|
+
- An open question shows once in the panel and on Home, under one name: the agent's ask and its question are one card in Needs you, with other questions as headers below. Blocked tasks say what they wait on.
|
|
73
|
+
- Right-click a workspace in the sidebar view to open its menu.
|
|
74
|
+
- A task an agent marks blocked only asks you something when it is blocked on you, with a real question. Tasks waiting on a pull request or another agent show as Blocked in Tasks instead of in Needs you.
|
|
75
|
+
- On Paseo 0.16, Home, the sidebar and the pills update the moment something changes, on every device, instead of checking every 15 to 60 seconds. An open Follow-up now sends almost nothing while you aren't using it.
|
|
76
|
+
- Follow-up's worker makes less short-lived garbage under load: the workspace list re-serializes only the workspaces that changed, and the Needs-you inbox is saved at most once every 2 seconds.
|
|
77
|
+
- Needs you, the usage meters and a workspace's Summary answer at once instead of waiting on Paseo; what's new arrives on the next refresh.
|
|
78
|
+
|
|
79
|
+
### Questions and answers
|
|
80
|
+
|
|
81
|
+
- Decision cards: "Add note" under the options lets you send a pick with a note ("A, but keep the BOM off"). One tap still sends; with a note typed, each option reads "Send A with note".
|
|
82
|
+
- A note sent with a picked option on a decision card (by an agent's brief_action today) now reaches the agent and shows on the chat's answer card. Before, only Something else kept its words.
|
|
83
|
+
- You're asked only when the same problem was sent twice with no change, and the card says which one.
|
|
84
|
+
- When an agent creates another agent or a workspace, the chat shows a card for it: its name, model, live status and what Follow-up knows (an open question, PR state). Tap it to open the agent or workspace.
|
|
85
|
+
- Paseo 0.16: **Put in chat** on a question adds your answer to the end of the agent's message box to edit before sending. It never replaces a draft; if the chat can't open, the answer is copied. Copy becomes an icon (0.15 keeps its label).
|
|
86
|
+
- Follow-up stays quick on workspaces with hundreds of PRs or questions.
|
|
87
|
+
- A multi-decision card is titled with the agent's ask, not Q1.
|
|
88
|
+
|
|
89
|
+
### Repairs and PRs
|
|
90
|
+
|
|
91
|
+
- After a reload mid-send, Follow-up checks the agent's chat and sends the message again only if it never arrived.
|
|
92
|
+
- The top of Tasks says who the next message goes to, when it goes and why it waits, with Preview and Send now. You can keep any single task for yourself by turning its Auto-send off.
|
|
93
|
+
- A task that went out twice with no change on GitHub, even if the agent said it was done, asks you on its own, and everything else keeps going. This replaces the old rule that stopped a PR's messages after three tries.
|
|
94
|
+
- When the machine is short on memory, one line at the top of Sending says auto-sends are paused and why.
|
|
95
|
+
- What Follow-up sends the agent is called tasks everywhere, never repairs.
|
|
96
|
+
- The deploy check is now a per-repository setting on your machine, set by an agent. Settings → Following → PR workflow shows it for each repository, or Not set up.
|
|
97
|
+
- One click on Merge merges: no second "Merge this PR?". The button names everything it merges first ("Merge 3 PRs"), and a blocker found at click time merges nothing and says why.
|
|
98
|
+
- You can set a repository to No review in Settings → Shipping PRs. There, Follow-up never asks you to add reviewers or merge, and agents merge their own PRs once checks pass. Team review stays the default.
|
|
99
|
+
- Report a bug, an idea or feedback from Settings → General, Command-K or any error message. Your agent writes it up with versions and recent errors, removes private names, and shows you the issue before it goes to GitHub.
|
|
100
|
+
- When GitHub's API limit for your account runs out, pull requests keep their last known status instead of turning Unknown, and Follow-up waits for the limit to reset before asking again.
|
|
101
|
+
- An Add reviewers row says only what is new: "Suggested: Ravi" under its title, not the ask again. No headline repeats its label or the PR number its chip already shows.
|
|
102
|
+
- A merged PR reads by its title, not "#240 merged" beside its chip.
|
|
103
|
+
- Follow-up uses far less of your GitHub API limit: an agent finishing a turn rechecks only its own workspace's pull requests, and agents finishing together share one check.
|
|
104
|
+
- Follow-up's worker does less work when an agent's turn ends: it checks only that workspace, and a PR the agent just opened still shows right away.
|
|
105
|
+
|
|
106
|
+
### Providers and helper agents
|
|
107
|
+
|
|
108
|
+
- After a failed recovery, the Recovery block offers one action, Retry recovery, instead of both Run recovery and Retry recovery.
|
|
109
|
+
|
|
110
|
+
### Setup, Settings and updates
|
|
111
|
+
|
|
112
|
+
- On the phone, Follow-up now keeps your settings category and folded sections after you reopen the app.
|
|
113
|
+
|
|
114
|
+
### Performance
|
|
115
|
+
|
|
116
|
+
- Follow-up uses about half the CPU it did, reads about 50 times less from disk and opens one daemon connection at a time instead of one per workspace.
|
|
117
|
+
- Follow-up writes its state files only when something really changed, about 8 times less often.
|
|
118
|
+
|
|
119
|
+
### More
|
|
120
|
+
|
|
121
|
+
- An agent whose session Paseo closed (after an hour idle or a plugin reload) keeps its link as "Open chat" on task rows and cards. Only archived agents show words alone.
|
|
122
|
+
- No repository tracks by default from Follow-up itself anymore: with Follow every workspace off, only the projects you switch on are followed.
|
|
123
|
+
- Ask any agent to "report a bug about Follow-up" and it files a detailed issue only after you say yes. Screenshots are uploaded only if you agree for that report.
|
|
124
|
+
- Follow-up keeps one connection to Paseo instead of opening a new one for each read, and asks for usage meters only when Smart Session is installed.
|
|
125
|
+
- Follow-up reads each agent turn once, picking up where its last read stopped, instead of re-reading the newest part of the chat at the start of the turn, at its end and again for discovery.
|
|
126
|
+
|
|
127
|
+
### Fixes
|
|
128
|
+
|
|
129
|
+
- Fixes no longer ask you to Retry when the agent's turn ends without reporting back. Follow-up checks GitHub instead: what's cleared is done, and what's still open goes in the next message.
|
|
130
|
+
- Sending is lighter: each send writes only its own workspace and reuses the agent list, so a few sends no longer leave the worker ~110 MB larger, and it stays quiet afterwards (it used to keep making ~16 Paseo requests a minute).
|
|
131
|
+
- The line under queued fixes now says exactly why they haven't gone out, such as a PR Follow-up couldn't read or a send that was refused, and only says "sending now" when one is really going out.
|
|
132
|
+
- Fixes that keep changing no longer push their send back: they go out a minute after the first one was queued.
|
|
133
|
+
- A task whose agent Paseo no longer knows reads "Agent unavailable" instead of "In progress", and archived agents keep reading "archived" after Follow-up re-reads Paseo's list.
|
|
134
|
+
- A "No ask stated" card no longer sits above a Needs-you item that says what to do.
|
|
135
|
+
- A PR the agent merges itself no longer reads "No reviewers" in the Pull requests card or the PR sheet.
|
|
136
|
+
- Follow-up pauses only when you stop the main agent. A turn replaced by a new message, a compaction or a session reload no longer leaves it paused, and any pause lifts once the agent runs again.
|
|
137
|
+
- Follow-up reads GitHub inside its own process, so starting up or finishing a deploy no longer launches dozens of `gh` processes.
|
|
138
|
+
- A "Nothing needed" turn end no longer shows in Needs you or counts there when the workspace is flagged for something else, like a merged PR. The pill and rows read that reason instead.
|
|
139
|
+
- Follow-up uses much less memory while your agents are busy, and no longer reconnects to Paseo every few seconds.
|
|
140
|
+
- Needs you: a merged PR reads "Merged", not "PR closed", which now means closed without merging. A PR the agent merged itself no longer flags you; a Later "until this PR merges" still wakes.
|
|
141
|
+
- An agent that says nothing is needed no longer stays in Needs you with an older "No ask stated" card.
|
|
142
|
+
- A PR that merged long ago no longer shows up in Needs you again as "Merged" in workspaces with many PRs.
|
|
143
|
+
- The popup no longer repeats its ask or to-do count.
|
|
144
|
+
- A row never says "No ask stated" above work to do.
|
|
145
|
+
- Merged pull requests no longer show Unknown after GitHub was briefly unreachable or out of API budget. Every pull request keeps its last known status, and its details say when it was last checked.
|
|
146
|
+
- Tracking a workspace right after creating its agent no longer fails with "This workspace has no available main agent".
|
|
147
|
+
- Follow-up uses much less memory and CPU with many workspaces, and no longer spikes when it starts.
|
|
148
|
+
- Signing off, Later and Undo no longer wait for Paseo to clear the unread dot.
|
|
149
|
+
|
|
150
|
+
</details>
|
|
151
|
+
|
|
5
152
|
## 2.0.0 (2026-11-11)
|
|
6
153
|
|
|
7
154
|
Follow-up keeps track of every workspace your coding agents work in, until the work is merged and done. It shows you in one place which agents are waiting on you and why, sends failed checks and review comments back to the right agent by itself, and lets you answer an agent's question without opening its chat.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paseo-follow-up",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.0.1
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"description": "A Paseo plugin that follows every workspace until the work is done: one Home for what needs you, questions you answer anywhere, and repairs that send themselves.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
package/server/daemon.ts
CHANGED
|
@@ -339,9 +339,12 @@ export class PaseoGateway implements Gateway {
|
|
|
339
339
|
/**
|
|
340
340
|
* Which workspaces Follow-up follows, from the shared directory: no daemon request unless the directory is due, a
|
|
341
341
|
* parent agent is missing from it, or a loaded agent's history needs reading. `workspaceId` (Track, session start)
|
|
342
|
-
* places one workspace and never reads history.
|
|
342
|
+
* places one workspace and never reads history. `scope` (a nudge, a-nudge-costs-its-workspace) places only those
|
|
343
|
+
* workspaces and rescans only their dirty agents: from the turn read still kept (TurnTimeline.since, no daemon read),
|
|
344
|
+
* or, when there is none (the next turn already started, or no turn cursor yet), with its own read of that agent, so
|
|
345
|
+
* nothing a nudge saw is left for the timer's tick to read later.
|
|
343
346
|
*/
|
|
344
|
-
async discover(state: State, workspaceId?: string): Promise<DiscoveredWorkspace[]> {
|
|
347
|
+
async discover(state: State, workspaceId?: string, scope?: { workspaces: ReadonlySet<string> }): Promise<DiscoveredWorkspace[]> {
|
|
345
348
|
await this.histories.load();
|
|
346
349
|
const now = this.now();
|
|
347
350
|
const windowMs = this.windowMs = activeWindowMs(state);
|
|
@@ -367,9 +370,9 @@ export class PaseoGateway implements Gateway {
|
|
|
367
370
|
return this.unknownParents.get(id);
|
|
368
371
|
};
|
|
369
372
|
const discovered: DiscoveredWorkspace[] = [];
|
|
370
|
-
const scans: { row: DiscoveredWorkspace; agent: Agent; repo: string | null }[] = [];
|
|
373
|
+
const scans: { row: DiscoveredWorkspace; agent: Agent; repo: string | null; kept?: Read }[] = [];
|
|
371
374
|
const defaults = new Set(projects.filter(p => defaultTracking(p, state.projectDefaults, followsEvery(state))).map(p => p.projectId));
|
|
372
|
-
for (const workspace of workspaces.filter(w => !w.archivingAt && (workspaceId ? w.id === workspaceId : (defaults.has(w.projectId ?? "") && !optedOut(state, w.id)) || state.workspaces.some(saved => saved.id === w.id && saved.enable_tracking && !saved.archived)))) {
|
|
375
|
+
for (const workspace of workspaces.filter(w => !w.archivingAt && (!scope || scope.workspaces.has(w.id)) && (workspaceId ? w.id === workspaceId : (defaults.has(w.projectId ?? "") && !optedOut(state, w.id)) || state.workspaces.some(saved => saved.id === w.id && saved.enable_tracking && !saved.archived)))) {
|
|
373
376
|
const existing = state.workspaces.find(w => w.id === workspace.id);
|
|
374
377
|
if (existing?.archived) continue;
|
|
375
378
|
// The Overseer's own workspace is Follow-up's, never tracked or repaired (1.4.0-beta.0).
|
|
@@ -397,6 +400,12 @@ export class PaseoGateway implements Gateway {
|
|
|
397
400
|
if (row.active) for (const agent of roots) {
|
|
398
401
|
if (!isLoaded(agent)) continue;
|
|
399
402
|
const cached = this.histories.get(agent.id);
|
|
403
|
+
if (scope) {
|
|
404
|
+
if (!this.dirty.has(agent.id)) continue;
|
|
405
|
+
const kept = cached?.cursor && cached.history.complete && !cached.history.error ? this.turnTimeline?.since(agent.id, cached.cursor, OVERLAP) : null;
|
|
406
|
+
scans.push({ row, agent, repo, ...(kept ? { kept } : {}) });
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
400
409
|
if (!cached || cached.messageAt !== agent.lastUserMessageAt || this.dirty.has(agent.id) || (cached.history.error && now >= cached.retryAt) || (["running", "initializing"].includes(agent.status) && now - cached.at >= 15_000)) scans.push({ row, agent, repo });
|
|
401
410
|
}
|
|
402
411
|
discovered.push(row);
|
|
@@ -404,19 +413,19 @@ export class PaseoGateway implements Gateway {
|
|
|
404
413
|
// Oldest scan first prevents busy workspaces from starving later sessions.
|
|
405
414
|
scans.sort((a, b) => (this.histories.get(a.agent.id)?.at ?? 0) - (this.histories.get(b.agent.id)?.at ?? 0) || (b.agent.lastUserMessageAt ?? "").localeCompare(a.agent.lastUserMessageAt ?? ""));
|
|
406
415
|
// Session opening and Track need only ownership metadata. Read transcripts in the poll.
|
|
407
|
-
|
|
416
|
+
// A scoped pass takes all its scans: they are its workspaces' dirty agents only, most of them kept reads.
|
|
417
|
+
const due = scope ? scans : scans.slice(0, workspaceId ? 0 : 4);
|
|
408
418
|
const refs = new Map<string, LinkRef[]>();
|
|
409
|
-
|
|
410
|
-
for (const { row: dueRow, agent: listed, repo } of due) {
|
|
419
|
+
const rescan = async (client: Daemon | null, { row: dueRow, agent: listed, repo, kept }: typeof scans[number]) => {
|
|
411
420
|
// The directory may predate the daemon unloading this agent: confirm it is still loaded before reading,
|
|
412
|
-
// since a timeline read would wake it.
|
|
413
|
-
const agent = await this.directory.confirmLoaded(client
|
|
414
|
-
if (!agent)
|
|
421
|
+
// since a timeline read would wake it. A kept read is already in hand and wakes nothing.
|
|
422
|
+
const agent = kept ? listed : await this.directory.confirmLoaded(client!, listed).catch(() => null);
|
|
423
|
+
if (!agent) return;
|
|
415
424
|
let history: History; let submissions: Submission[] = []; let artifacts: Artifact[] = []; let end: { epoch: string; seq: number } | null = null;
|
|
416
425
|
this.timelineReads++;
|
|
417
426
|
const cached = this.histories.get(agent.id);
|
|
418
427
|
try {
|
|
419
|
-
const read = (cached?.cursor && cached.history.complete && !cached.history.error ? this.turnTimeline?.since(agent.id, cached.cursor, OVERLAP) ?? await readSince(client
|
|
428
|
+
const read = kept ?? (cached?.cursor && cached.history.complete && !cached.history.error ? this.turnTimeline?.since(agent.id, cached.cursor, OVERLAP) ?? await readSince(client!, agent.id, cached.cursor) : null) ?? await readAll(client!, agent.id);
|
|
420
429
|
end = read.end;
|
|
421
430
|
const items = read.entries.map(e => e.item);
|
|
422
431
|
// Linked items ride this read. Best-effort: a throw here must never mark the history unreadable.
|
|
@@ -441,8 +450,10 @@ export class PaseoGateway implements Gateway {
|
|
|
441
450
|
const at = this.now();
|
|
442
451
|
this.histories.set(agent.id, { messageAt: agent.lastUserMessageAt, at, failures, retryAt: at + historyRetryDelay(failures), history, submissions, artifacts, cursor: history.error ? null : end });
|
|
443
452
|
this.dirty.delete(agent.id);
|
|
444
|
-
|
|
445
|
-
|
|
453
|
+
};
|
|
454
|
+
for (const s of due.filter(s => s.kept)) await rescan(null, s);
|
|
455
|
+
const reads = due.filter(s => !s.kept);
|
|
456
|
+
if (reads.length) await this.connect(async client => { for (const s of reads) await rescan(client, s); });
|
|
446
457
|
if (refs.size) try { this.linkRefs?.(refs); } catch { /* linked items are best-effort */ }
|
|
447
458
|
for (const row of discovered) {
|
|
448
459
|
const ids = [row.mainAgentId, ...(row.contributorAgentIds ?? [])];
|
package/server/engine.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { answerRecipients, developerAnswer, syncTaskQuestions, type AnswerAction
|
|
|
9
9
|
import { answerMessage, isOpen as isOpenQuestion, type Question } from "../shared/questions";
|
|
10
10
|
import { reconcileSubmittedStacks } from "./submissions";
|
|
11
11
|
import { applyDiscovery, interruptionHold, startsWithAutoSend, type DiscoveredWorkspace } from "./discovery";
|
|
12
|
-
import { followsByDefault, migrateActiveScope } from "../shared/settings";
|
|
12
|
+
import { ACTIVE_SCOPE_MIGRATION, followsByDefault, migrateActiveScope } from "../shared/settings";
|
|
13
13
|
import { replyRecorded } from "../shared/communication";
|
|
14
14
|
import { DeliveryDeferred, ConversationGone, realTimers, withDeadline, type Timers } from "./delivery";
|
|
15
15
|
import { recordSnapshot } from "./deployment-anchor";
|
|
@@ -39,7 +39,8 @@ const GONE_REASON = "The main agent's conversation no longer exists, so Follow-u
|
|
|
39
39
|
/** A batch that asks the agent to verify it's finished and declare Done. These never go out on their own. */
|
|
40
40
|
export { interruptionHold };
|
|
41
41
|
export interface Gateway {
|
|
42
|
-
|
|
42
|
+
/** `scope`: a nudge's pass, only those workspaces and only reads already in hand (a-nudge-costs-its-workspace). */
|
|
43
|
+
discover?(state: State, workspaceId?: string, scope?: { workspaces: ReadonlySet<string> }): Promise<DiscoveredWorkspace[]>;
|
|
43
44
|
observe(w: Workspace, fresh?: boolean): Promise<Runtime>;
|
|
44
45
|
send(w: Workspace, batch: Batch, text: string): Promise<void>;
|
|
45
46
|
prepareRecovery(w: Workspace, batch: Batch): Promise<{ agentId: string; contextPath: string }>;
|
|
@@ -210,7 +211,7 @@ export class Engine {
|
|
|
210
211
|
this.gateway.tickStarted?.();
|
|
211
212
|
const saved = await this.store.snapshot();
|
|
212
213
|
if (this.stopped) return;
|
|
213
|
-
if (this.gateway.discover) {
|
|
214
|
+
if (this.gateway.discover && !(o.affected && await this.discoverScoped(saved, o.affected))) {
|
|
214
215
|
const discovered = await this.gateway.discover(saved);
|
|
215
216
|
// Discovery's write copies the whole state; skip it when the rows and the state are what the last one left
|
|
216
217
|
// (a-tick-copies-the-state-at-most-once), at most OBSERVE_FULL_MS (its time-based rules run then). The rows are
|
|
@@ -237,7 +238,8 @@ export class Engine {
|
|
|
237
238
|
const hot = keys(active.filter(isHot));
|
|
238
239
|
const read = o.affected ? active.filter(w => o.affected!.has(w.id)) : active;
|
|
239
240
|
const observations = await this.github.observe(read.flatMap(w => w.prs), o.background || o.workspaceId ? { background: true, hot, fresh: keys(active.filter(w => w.id === o.workspaceId)) } : {});
|
|
240
|
-
|
|
241
|
+
// A nudge observes only its workspaces (a-nudge-costs-its-workspace); the timer's tick observes every active one.
|
|
242
|
+
for (const original of o.affected ? read : active) {
|
|
241
243
|
if (this.stopped) return;
|
|
242
244
|
const runtime = await this.gateway.observe(original).catch((): Runtime => ({ busy: false, reason: "Agent state unavailable; refresh will retry", archived: false }));
|
|
243
245
|
const pruned: Batch[] = [];
|
|
@@ -343,6 +345,24 @@ export class Engine {
|
|
|
343
345
|
}
|
|
344
346
|
this.error = null;
|
|
345
347
|
}
|
|
348
|
+
/**
|
|
349
|
+
* A nudge's discovery (a-nudge-costs-its-workspace): only the nudged workspaces and their dirty agents (the kept turn
|
|
350
|
+
* read, else a read of that agent), each applied with a one-workspace mutation. 2026-11-13 (run Y, the CI live shape): every turn end's nudge ran
|
|
351
|
+
* discovery over all 140 workspaces and a whole-state copy, and the burst grew V8's committed pages from 87 to 165 MB.
|
|
352
|
+
* False when a nudged workspace needs the whole state (not yet saved, parked by the active-scope migration, or the
|
|
353
|
+
* migration not yet run): the full discovery runs instead.
|
|
354
|
+
*/
|
|
355
|
+
private async discoverScoped(saved: State, affected: ReadonlySet<string>): Promise<boolean> {
|
|
356
|
+
if (!saved.migrations?.includes(ACTIVE_SCOPE_MIGRATION)) return false;
|
|
357
|
+
if ([...affected].some(id => !saved.workspaces.some(w => w.id === id) || saved.autoSendsParked?.includes(id))) return false;
|
|
358
|
+
const rows = await this.gateway.discover!(saved, undefined, { workspaces: affected });
|
|
359
|
+
for (const row of rows) {
|
|
360
|
+
const current = await this.store.snapshot();
|
|
361
|
+
if (!followsByDefault(current, row) && !current.workspaces.some(w => w.id === row.id && w.enable_tracking && !w.archived)) continue;
|
|
362
|
+
await this.store.mutateWorkspace(row.id, w => applyDiscovery({ ...current, workspaces: current.workspaces.map(x => x.id === w.id ? w : x) }, [row], this.now()));
|
|
363
|
+
}
|
|
364
|
+
return true;
|
|
365
|
+
}
|
|
346
366
|
async activate(workspaceId: string): Promise<Workspace> {
|
|
347
367
|
if (this.stopped || !this.gateway.discover) throw new Error("Workspace tracking is unavailable");
|
|
348
368
|
const rows = await this.gateway.discover(await this.store.snapshot(), workspaceId);
|
package/shared/changelog.ts
CHANGED
|
@@ -57,8 +57,12 @@ export function parseChangelog(text: string): ReleaseNote[] {
|
|
|
57
57
|
let current: ReleaseNote | null = null;
|
|
58
58
|
/** The block a continuation line joins: the last bullet, or a paragraph still open (no blank line since). */
|
|
59
59
|
let open: NoteBlock | null = null;
|
|
60
|
+
/** Inside a <details> list (a section's "Full changelog", the 1.x archive): never shown, headings in it included. */
|
|
61
|
+
let folded = false;
|
|
60
62
|
for (const line of text.replace(/\r\n?/g, "\n").split("\n")) {
|
|
61
|
-
|
|
63
|
+
// A <details> list ends at its </details>, not the file: each stable section carries one (2.0.1, 2026-11-14).
|
|
64
|
+
if (folded) { if (/<\/details>/i.test(line)) folded = false; continue; }
|
|
65
|
+
if (/^\s*<details/i.test(line)) { folded = !/<\/details>/i.test(line); open = null; continue; }
|
|
62
66
|
const heading = HEADING.exec(line);
|
|
63
67
|
if (heading) {
|
|
64
68
|
current = parseVersion(heading[1]!) ? { version: heading[1]!, date: heading[2] ?? null, items: [], blocks: [] } : null;
|