paseo-follow-up 1.4.0-beta.21 → 1.4.0-beta.23
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 +113 -0
- package/OVERVIEW.md +1 -1
- package/README.md +10 -2
- package/client/home.tsx +13 -1
- package/client/live.tsx +5 -3
- package/client/panel.tsx +34 -0
- package/client/release-notes.tsx +199 -0
- package/index.server.ts +30 -5
- package/package.json +6 -3
- package/server/agent-actions.ts +38 -3
- package/server/agent-hook.mjs +16 -5
- package/server/agent-parity.ts +5 -2
- package/server/daemon.ts +4 -2
- package/server/discovery.ts +63 -4
- package/server/hook-source.ts +1 -1
- package/server/mcp-source.ts +1 -1
- package/server/mcp.mjs +6 -3
- package/server/release-notes.ts +93 -0
- package/server/scopes.ts +6 -2
- package/shared/changelog.ts +121 -0
- package/shared/contracts.ts +5 -0
- package/shared/home.ts +12 -1
- package/shared/model.ts +4 -0
- package/shared/version.ts +73 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Release notes
|
|
2
|
+
|
|
3
|
+
What changed in each version of Follow-up, newest first. Follow-up shows these in "What's new" after an update, and in full from Home's last line.
|
|
4
|
+
|
|
5
|
+
## 1.4.0-beta.23 (2026-11-10)
|
|
6
|
+
|
|
7
|
+
- After an update, "What's new" shows the notes for every version since you last looked, once on each device.
|
|
8
|
+
- Home's last line shows your Follow-up version, with the full release notes one tap away.
|
|
9
|
+
|
|
10
|
+
## 1.4.0-beta.22 (2026-11-10)
|
|
11
|
+
|
|
12
|
+
- An agent can take over as a workspace's main agent when the main one is gone or idle, or when you ask it to. It can hand the role on too, within clear limits.
|
|
13
|
+
- When the main agent changes, the workspace panel shows who took over and why for a day, with Undo, and Home marks the workspace.
|
|
14
|
+
|
|
15
|
+
## 1.4.0-beta.21 (2026-11-10)
|
|
16
|
+
|
|
17
|
+
- Agents can do everything you can click in Follow-up: read and change its settings, setup, priorities and the Overseer. Changes show a dry run first.
|
|
18
|
+
|
|
19
|
+
## 1.4.0-beta.20 (2026-11-10)
|
|
20
|
+
|
|
21
|
+
- Follow-up is reworked for phones: Home, the decision card, the composer pill and Settings all fit a phone screen, with real tap targets.
|
|
22
|
+
- On the phone, only Home's search row stays pinned; the status chips and the setup offer scroll with the list.
|
|
23
|
+
- Home on the phone says when nothing is followed yet, and an open question now outranks "Finished".
|
|
24
|
+
|
|
25
|
+
## 1.4.0-beta.19 (2026-11-10)
|
|
26
|
+
|
|
27
|
+
- Settings → Following → Shipping PRs sets how each repository ships PRs, and setup asks "How do you ship PRs?".
|
|
28
|
+
|
|
29
|
+
## 1.4.0-beta.18 (2026-11-09)
|
|
30
|
+
|
|
31
|
+
- Graphite is optional: repositories that use plain GitHub PRs work fully, chosen per repository.
|
|
32
|
+
- On plain GitHub, the PR sheet follows GitHub's own review and check verdict.
|
|
33
|
+
|
|
34
|
+
## 1.4.0-beta.17 (2026-11-09)
|
|
35
|
+
|
|
36
|
+
- The workspace panel names the main agent, and swapping that role has an explicit Undo.
|
|
37
|
+
- A main agent that closes briefly keeps its role instead of handing it to another agent. Make main agent hands it back.
|
|
38
|
+
|
|
39
|
+
## 1.4.0-beta.16 (2026-11-09)
|
|
40
|
+
|
|
41
|
+
- Review requests are found reliably, and an account that fails to load no longer reads as "no review requests".
|
|
42
|
+
|
|
43
|
+
## 1.4.0-beta.15 (2026-11-09)
|
|
44
|
+
|
|
45
|
+
- On a fresh install, auto-send waits until you finish or skip setup.
|
|
46
|
+
|
|
47
|
+
## 1.4.0-beta.14 (2026-11-09)
|
|
48
|
+
|
|
49
|
+
- Getting started: a short first-run setup that checks GitHub, shows what Follow-up does on its own, and sets your defaults.
|
|
50
|
+
|
|
51
|
+
## 1.4.0-beta.13 (2026-11-09)
|
|
52
|
+
|
|
53
|
+
- Trusted agents no longer wait on permission prompts that were already showing when Follow-up started or updated.
|
|
54
|
+
|
|
55
|
+
## 1.4.0-beta.12 (2026-11-09)
|
|
56
|
+
|
|
57
|
+
- AI priority gives every ranked workspace a reason, and Re-rank now answers at once while ranking runs in the background.
|
|
58
|
+
- Rankings are steadier: a workspace whose inputs didn't change moves only a little between runs.
|
|
59
|
+
- Changing the ranker's model or effort in Settings re-ranks instead of keeping the old order.
|
|
60
|
+
|
|
61
|
+
## 1.4.0-beta.11 (2026-11-09)
|
|
62
|
+
|
|
63
|
+
- Settings is split into four categories: Following, Reviewers, Agents, and Inbox & display. Tabs on desktop, a list you tap into on the phone.
|
|
64
|
+
- Reviewers, Projects and Workspaces fold away, with a one-line summary when folded.
|
|
65
|
+
- Trust bypass moved to Following → Permissions, and the phone reopens the category you used last.
|
|
66
|
+
|
|
67
|
+
## 1.4.0-beta.10 (2026-11-09)
|
|
68
|
+
|
|
69
|
+
- Questions with several decisions let you pick every answer first, then send them all in one message.
|
|
70
|
+
- An answered question stays on the card, folded to what was asked and what you picked.
|
|
71
|
+
|
|
72
|
+
## 1.4.0-beta.9 (2026-11-09)
|
|
73
|
+
|
|
74
|
+
- Trust bypass: pick agents whose tool permission prompts Follow-up approves for you.
|
|
75
|
+
- Secrets are masked in what it approved, and the list says "None approved yet" until it has approved something.
|
|
76
|
+
|
|
77
|
+
## 1.4.0-beta.8 (2026-11-09)
|
|
78
|
+
|
|
79
|
+
- What's this about? sits at the top of Home's detail pane on the phone too.
|
|
80
|
+
|
|
81
|
+
## 1.4.0-beta.7 (2026-11-09)
|
|
82
|
+
|
|
83
|
+
- AI priority: Home's Priority sort can rank workspaces from your Linear issues, Slack DMs and mentions, GitHub review requests and the weekly plan, each with a one-line reason.
|
|
84
|
+
|
|
85
|
+
## 1.4.0-beta.6 (2026-11-09)
|
|
86
|
+
|
|
87
|
+
- Follow-up puts far less load on Paseo: it keeps one shared list of agents and workspaces instead of asking for them every few seconds.
|
|
88
|
+
|
|
89
|
+
## 1.4.0-beta.5 (2026-11-09)
|
|
90
|
+
|
|
91
|
+
- After Follow-up updates, agents in the middle of a turn can keep using its tools instead of hitting "tool not found".
|
|
92
|
+
|
|
93
|
+
## 1.4.0-beta.4 (2026-11-09)
|
|
94
|
+
|
|
95
|
+
- Settings → Agents: choose the provider, model and effort for What's this about?, the Overseer, recovery agents and the priority ranker.
|
|
96
|
+
|
|
97
|
+
## 1.4.0-beta.3 (2026-11-09)
|
|
98
|
+
|
|
99
|
+
- Ask the Overseer from Home's search box or from ⌘K.
|
|
100
|
+
|
|
101
|
+
## 1.4.0-beta.2 (2026-11-09)
|
|
102
|
+
|
|
103
|
+
- On Paseo 0.15 and later, agents get Follow-up's tools through Paseo itself, so no extra process starts for each agent.
|
|
104
|
+
- Older versions registered Follow-up for every Claude and Codex session on the machine. That registration is removed, with a backup of each file it touched.
|
|
105
|
+
|
|
106
|
+
## 1.4.0-beta.1 (2026-11-09)
|
|
107
|
+
|
|
108
|
+
- What's this about?: a short AI overview of each workspace, with its linked Linear issues, PRs, Slack threads and docs.
|
|
109
|
+
- Reviewers per repository, plus a default list, for Add reviewer.
|
|
110
|
+
|
|
111
|
+
## 1.4.0-beta.0 (2026-11-09)
|
|
112
|
+
|
|
113
|
+
- The Overseer: one agent you talk to about all your workspaces. It passes your asks to the agent that owns them.
|
package/OVERVIEW.md
CHANGED
|
@@ -28,7 +28,7 @@ Auto-send ("Send repairs automatically") is on by default for every followed wor
|
|
|
28
28
|
|
|
29
29
|
### What agents can do for you
|
|
30
30
|
|
|
31
|
-
Every root agent Paseo launches (tracked or not) gets Follow-up's action tools: `list_prs`, `add_reviewers`, `merge`, `enable_merge_when_ready`, `disable_merge_when_ready`, `send_repairs`, `set_auto_send`, `clear_hold`, `retry_batch`, `track`, `inbox_list`, `sign_off`, `snooze`, `set_finish_flags`, `set_priorities` and the read-only `workspace_about` (a workspace's overview and linked items) (external priorities for Home's Priority sort, kept in `plugin-data/follow-through/priorities.json`). Each runs the server path its button runs, with the same guards (tracked workspace, hold, PR eligibility, merge blockers), across every tracked workspace, so an orchestrating agent can act "on all" when you ask it to. Tools that act on a list, and merge, return a dry run and run only with `confirm: true` and that plan's id; merge is marked destructive and the list tools read-only. Inbox tools act on other agents only: an agent can't sign itself off. Recovery agents, contributors and subagents never get them, and the daemon re-checks the caller on each call. Each agent action is kept in the inbox's delivery ledger as `by: "agent:<id>"`; it never counts as you writing to an agent. A sign-off is still a sign-off made on your behalf, so it clears the flag. There is no tool to untrack or archive a workspace, or to put one on hold, because Follow-up has no button for those either.
|
|
31
|
+
Every root agent Paseo launches (tracked or not) gets Follow-up's action tools: `list_prs`, `add_reviewers`, `merge`, `enable_merge_when_ready`, `disable_merge_when_ready`, `send_repairs`, `set_auto_send`, `clear_hold`, `retry_batch`, `track`, `inbox_list`, `sign_off`, `snooze`, `set_finish_flags`, `set_priorities` and the read-only `workspace_about` (a workspace's overview and linked items) and `release_notes` (the installed version and its notes) (external priorities for Home's Priority sort, kept in `plugin-data/follow-through/priorities.json`). Each runs the server path its button runs, with the same guards (tracked workspace, hold, PR eligibility, merge blockers), across every tracked workspace, so an orchestrating agent can act "on all" when you ask it to. Tools that act on a list, and merge, return a dry run and run only with `confirm: true` and that plan's id; merge is marked destructive and the list tools read-only. Inbox tools act on other agents only: an agent can't sign itself off. Recovery agents, contributors and subagents never get them, and the daemon re-checks the caller on each call. Each agent action is kept in the inbox's delivery ledger as `by: "agent:<id>"`; it never counts as you writing to an agent. A sign-off is still a sign-off made on your behalf, so it clears the flag. There is no tool to untrack or archive a workspace, or to put one on hold, because Follow-up has no button for those either.
|
|
32
32
|
|
|
33
33
|
## Data and access
|
|
34
34
|
|
package/README.md
CHANGED
|
@@ -36,6 +36,10 @@ The first time you open Follow-up from the sidebar, a short setup takes Home's p
|
|
|
36
36
|
|
|
37
37
|
Every switch in setup is the same one Settings shows, so nothing is applied twice and nothing is lost if you stop halfway. Setup remembers its step, so a reload or another device picks up where you left off. Run it again any time from **Set up Follow-up again** at the top of Follow-up's settings, or ⌘K → **Follow-up: Set up again**. If Follow-up was already installed before this version, it doesn't open on its own: Home shows one dismissible line offering it, for a day.
|
|
38
38
|
|
|
39
|
+
## What's new
|
|
40
|
+
|
|
41
|
+
After Follow-up updates, the next time you open Paseo it shows **What's new**: the notes for every version since that device last looked, newest open, older ones folded. It shows once per device per version (once per host in the phone app), never on a fresh install and never over setup. Home's last line says which version you run, with **Release notes** for the full list; for three days after an update it reads **Updated to X · What's new** instead. The notes ship inside the package as [CHANGELOG.md](CHANGELOG.md), so they work offline and match the installed version.
|
|
42
|
+
|
|
39
43
|
## Use
|
|
40
44
|
|
|
41
45
|
Follow-up follows every workspace as soon as it has an agent; there is nothing to turn on. Open a workspace and click the Follow-up icon in its header (or press ⌘K / Ctrl+K and choose **Follow-up: open for this workspace**) to see that workspace's panel. Its **Home** button opens Home, the list of every workspace. To leave a workspace or a project out, open the settings (**Follow-up: settings** in ⌘K): **Following** has the global switches, **Workspace exceptions** the per-workspace ones.
|
|
@@ -205,7 +209,7 @@ The choices live in `agents.json` in Follow-up's data folder. Anything missing o
|
|
|
205
209
|
Install the beta:
|
|
206
210
|
|
|
207
211
|
```sh
|
|
208
|
-
paseo plugin update follow-through --version 1.4.0-beta.
|
|
212
|
+
paseo plugin update follow-through --version 1.4.0-beta.23
|
|
209
213
|
# or, for a fresh install:
|
|
210
214
|
paseo plugin install npm:paseo-follow-up@beta
|
|
211
215
|
```
|
|
@@ -259,7 +263,11 @@ npm run test:install
|
|
|
259
263
|
paseo plugin reload follow-through # after changes
|
|
260
264
|
```
|
|
261
265
|
|
|
262
|
-
Integration checks use a separate Paseo home with synthetic agents.
|
|
266
|
+
Integration checks use a separate Paseo home with synthetic agents.
|
|
267
|
+
|
|
268
|
+
Release notes: a PR that changes something users see adds `changes/<branch>.md` with one to three plain-language bullets ([rules](changes/README.md)). Before the version bump, `npm run release:notes <version>` moves them into CHANGELOG.md (`-- --allow-empty` for a release with nothing user-facing). `npm run verify` fails if the package version has no notes.
|
|
269
|
+
|
|
270
|
+
Version tags (`vX.Y.Z`) publish to npm through Trusted Publishing.
|
|
263
271
|
|
|
264
272
|
## License
|
|
265
273
|
|
package/client/home.tsx
CHANGED
|
@@ -26,6 +26,7 @@ import { Spinner } from "./motion";
|
|
|
26
26
|
import { Setup, SetupOffer, useOnboarding } from "./onboarding";
|
|
27
27
|
import type { OnboardingView } from "../shared/onboarding";
|
|
28
28
|
import { withAlpha, isLight, mergedColor, type Colors } from "./theme";
|
|
29
|
+
import { ReleaseNotesSheet, VersionLine, WhatsNewGate } from "./release-notes";
|
|
29
30
|
|
|
30
31
|
export const HOME_SCREEN = "follow-through";
|
|
31
32
|
|
|
@@ -118,6 +119,13 @@ function HomeBody(props: PluginScreenProps & { deps: HomeDeps; onboarding: Onboa
|
|
|
118
119
|
setSelected(next?.key ?? null);
|
|
119
120
|
}, [inbox, model]);
|
|
120
121
|
|
|
122
|
+
// null: closed; false: What's new since the previous version; true: every version.
|
|
123
|
+
const [notesOpen, setNotesOpen] = useState<boolean | null>(null);
|
|
124
|
+
const versionLine = <VersionLine theme={theme} compact={compact} onOpen={setNotesOpen} />;
|
|
125
|
+
const updateSheets = <>
|
|
126
|
+
<WhatsNewGate surface="home" theme={theme} compact={compact} />
|
|
127
|
+
{notesOpen != null && <ReleaseNotesSheet theme={theme} compact={compact} all={notesOpen} onClose={() => setNotesOpen(null)} />}
|
|
128
|
+
</>;
|
|
121
129
|
if (params.view === "log") return <LogView theme={theme} compact={compact} sources={deps.sources} onHome={deps.openHome} onOpen={key => { setSelected(key); deps.openHome(); }} />;
|
|
122
130
|
|
|
123
131
|
const detail = selected === OVERSEER_KEY && overseer
|
|
@@ -131,7 +139,9 @@ function HomeBody(props: PluginScreenProps & { deps: HomeDeps; onboarding: Onboa
|
|
|
131
139
|
results={omnibox.results} activeResult={omnibox.active} onResult={item => void pick(item)} filter={filter} overseer={overseer} asking={asking}
|
|
132
140
|
// Phones: the host header already says Follow-up, so no "Home" title row; search, sort and settings share one row and
|
|
133
141
|
// the meters move to the end of the list.
|
|
134
|
-
footer={
|
|
142
|
+
footer={omnibox.results ? undefined : compact
|
|
143
|
+
? <View style={{ paddingTop: 16, paddingBottom: 96, gap: 12 }}>{!nothing && <UsageMeters theme={theme} sources={deps.sources} dense />}{versionLine}</View>
|
|
144
|
+
: versionLine}
|
|
135
145
|
// Phones: the setup offer goes after the Needs-you group when there is one, so the first ask stays high.
|
|
136
146
|
afterNeeds={compact && model.needs > 0 ? <SetupOffer theme={theme} compact view={props.onboarding} /> : undefined}
|
|
137
147
|
emptyAction={compact ? <Button theme={theme} compact kind="secondary" icon="Settings" title="Project settings" onPress={deps.openSettings} /> : undefined}
|
|
@@ -156,11 +166,13 @@ function HomeBody(props: PluginScreenProps & { deps: HomeDeps; onboarding: Onboa
|
|
|
156
166
|
|
|
157
167
|
if (compact) return <View style={{ flex: 1, backgroundColor: c.surface0 }}>
|
|
158
168
|
{current || selected === OVERSEER_KEY && overseer || selected === BRIEF_KEY ? detail : list}
|
|
169
|
+
{updateSheets}
|
|
159
170
|
<View style={{ position: "absolute", left: 12, right: 12, bottom: bottomGap(true) + (current || selected === OVERSEER_KEY ? 132 : 0) }}><UndoBar store={inbox} theme={theme} touch /></View>
|
|
160
171
|
</View>;
|
|
161
172
|
return <View style={{ flex: 1, flexDirection: "row", backgroundColor: c.surface0 }}>
|
|
162
173
|
<View style={{ flex: 1, minWidth: 0, borderRightWidth: 1, borderRightColor: c.border }}>
|
|
163
174
|
{list}
|
|
175
|
+
{updateSheets}
|
|
164
176
|
<View style={{ position: "absolute", left: 12, right: 12, bottom: 12 }}><UndoBar store={inbox} theme={theme} touch={false} /></View>
|
|
165
177
|
</View>
|
|
166
178
|
<View style={{ width: "42%", minWidth: 380, maxWidth: 680 }}>{detail}</View>
|
package/client/live.tsx
CHANGED
|
@@ -9,6 +9,7 @@ import { useSidebarViewActive } from "./inbox";
|
|
|
9
9
|
import { homeCounts } from "../shared/home";
|
|
10
10
|
import { useHomeModel, type HomeSources } from "./home-data";
|
|
11
11
|
import { onVisible, whileVisible } from "./visibility";
|
|
12
|
+
import { WhatsNewGate } from "./release-notes";
|
|
12
13
|
|
|
13
14
|
/** The backstop poll; agent changes `nudge` it sooner (1.4.0). Nothing while the app is hidden. */
|
|
14
15
|
const POLL_MS = 15_000;
|
|
@@ -82,15 +83,16 @@ export function headerIcon(store: LiveStore) {
|
|
|
82
83
|
* way into the full screen.
|
|
83
84
|
*/
|
|
84
85
|
export function sidebarItem(sources: HomeSources, screenId: string) {
|
|
85
|
-
return function FollowSidebarItem({ currentScreen, openScreen, theme }: PluginSidebarItemProps) {
|
|
86
|
+
return function FollowSidebarItem({ currentScreen, openScreen, theme, layout }: PluginSidebarItemProps) {
|
|
86
87
|
// The same counts as Home's status strip and the brief headline.
|
|
87
88
|
const count = homeCounts(useHomeModel(sources)).needs;
|
|
88
89
|
const inSidebarView = useSidebarViewActive();
|
|
89
90
|
const c = theme.colors;
|
|
90
91
|
const shown = count > 0 && !inSidebarView;
|
|
91
|
-
|
|
92
|
+
// What's new mounts here too (the sidebar is always there), so it shows even if you live in agent chats.
|
|
93
|
+
return <><WhatsNewGate surface="sidebar" theme={theme} compact={layout.compact} /><SidebarRow icon="GitPullRequest" active={currentScreen?.screenId === screenId} onPress={() => openScreen({ screenId, params: { section: "needs" } })}
|
|
92
94
|
trailing={shown ? <View accessibilityLabel={`${count} need${count === 1 ? "s" : ""} you`} style={{ minWidth: 18, height: 18, paddingHorizontal: 5, borderRadius: 9, alignItems: "center", justifyContent: "center", backgroundColor: c.statusWarning }}>
|
|
93
95
|
<Text style={{ color: c.surface0, fontSize: 11, lineHeight: 14, fontWeight: "700", fontVariant: ["tabular-nums"] }}>{count}</Text>
|
|
94
|
-
</View> : undefined}
|
|
96
|
+
</View> : undefined} /></>;
|
|
95
97
|
};
|
|
96
98
|
}
|
package/client/panel.tsx
CHANGED
|
@@ -9,6 +9,7 @@ import { BriefCard, type BriefDeps } from "./brief";
|
|
|
9
9
|
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
|
10
10
|
import { controlRpc, refreshRpc, browserStatusRpc, recoverRpc, sendRpc, inboxBriefRpc } from "../shared/contracts";
|
|
11
11
|
import { summary, type Workspace } from "../shared/model";
|
|
12
|
+
import { recentMainChange } from "../shared/home";
|
|
12
13
|
import { followUpObligations, recoveryBatch } from "../shared/follow-up";
|
|
13
14
|
import { settledForDisplay } from "../shared/presentation";
|
|
14
15
|
import { ago, sendBlocker, shortRefs } from "../shared/attention";
|
|
@@ -26,6 +27,7 @@ import { ActivityCard, QuestionSheet } from "./questions";
|
|
|
26
27
|
import { SpecRow, SpecSheet } from "./spec";
|
|
27
28
|
import { mergedColor, tint } from "./theme";
|
|
28
29
|
import { AboutSection } from "./about";
|
|
30
|
+
import { WhatsNewGate } from "./release-notes";
|
|
29
31
|
|
|
30
32
|
export { overviewKey, workspaceKey };
|
|
31
33
|
|
|
@@ -38,6 +40,10 @@ type PanelProps = PluginWorkspacePanelProps & PanelLinks & { inbox?: InboxStore;
|
|
|
38
40
|
* tasks, questions, spec, activity and Details. What needs you elsewhere lives on Home.
|
|
39
41
|
*/
|
|
40
42
|
export function FollowPanel(props: PanelProps) {
|
|
43
|
+
return <><PanelBody {...props} /><WhatsNewGate surface="panel" theme={props.theme} compact={props.layout.compact} /></>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function PanelBody(props: PanelProps) {
|
|
41
47
|
// Paints from the client's live store; one small read of this workspace on open, no poll (1.4.0).
|
|
42
48
|
const query = useWorkspace(props.live, props.workspaceId);
|
|
43
49
|
const c = props.theme.colors;
|
|
@@ -221,6 +227,7 @@ function WorkspaceCard({ workspace: w, theme, compact, open, toggle, openAgent,
|
|
|
221
227
|
</View>
|
|
222
228
|
{openAgent && <Button theme={theme} compact={compact} icon="MessageSquare" title="Open" accessibilityLabel="Open main agent" onPress={() => openAgent(w.mainAgentId)} />}
|
|
223
229
|
</View>
|
|
230
|
+
<MainChangeNotice workspace={w} theme={theme} compact={compact} />
|
|
224
231
|
{(w.contributorAgentIds ?? []).map(id => <OtherRootAgent key={id} agentId={id} workspace={w} theme={theme} compact={compact} openAgent={openAgent} mainAgentId={w.mainAgentId} />)}
|
|
225
232
|
</CardRow>
|
|
226
233
|
<CardRow theme={theme} compact={compact}>
|
|
@@ -259,6 +266,33 @@ function useAgentTitle(agentId: string): string {
|
|
|
259
266
|
return useAgent(agentId, a => a.title) || `Agent ${agentId.slice(0, 8)}`;
|
|
260
267
|
}
|
|
261
268
|
|
|
269
|
+
/**
|
|
270
|
+
* "Took over from A · 5m ago · reason · Undo" under B's name, for a day after an agent or Follow-up moved the role
|
|
271
|
+
* (main-agent claim rule 5). Quiet: a meta line in this card, never a Needs-you item. Undo makes A main again
|
|
272
|
+
* through the same developer action as Make main agent, which no cooldown blocks.
|
|
273
|
+
*/
|
|
274
|
+
function MainChangeNotice({ workspace: w, theme, compact }: { workspace: Workspace; theme: Theme; compact: boolean }) {
|
|
275
|
+
const c = theme.colors; const t = text(c);
|
|
276
|
+
const now = useNow(60_000);
|
|
277
|
+
const change = recentMainChange(w, now);
|
|
278
|
+
const from = useAgentTitle(change?.from ?? ""); const to = useAgentTitle(change?.to ?? "");
|
|
279
|
+
const control = useRpc(controlRpc); const cache = useQueryClient(); const toast = useToast();
|
|
280
|
+
const undo = useMutation({
|
|
281
|
+
mutationFn: () => control({ workspaceId: w.id, mainAgentId: change!.from }),
|
|
282
|
+
onSuccess: () => { void cache.invalidateQueries({ queryKey: workspaceKey(w.id) }); void cache.invalidateQueries({ queryKey: overviewKey }); toast.show(`${from} is the main agent again`, { variant: "success" }); },
|
|
283
|
+
onError: (e: Error) => toast.error(errorText(e)),
|
|
284
|
+
});
|
|
285
|
+
if (!change) return null;
|
|
286
|
+
const canUndo = w.enable_tracking && !w.archived && (w.contributorAgentIds ?? []).includes(change.from);
|
|
287
|
+
return <View style={{ flexDirection: "row", alignItems: "center", gap: 8, flexWrap: "wrap", marginTop: 10 }}>
|
|
288
|
+
{/* The new main's name is the card's title right above, so the line names only who it took over from. */}
|
|
289
|
+
<Text numberOfLines={3} accessibilityLabel={`${to} took over from ${from} ${ago(change.at, now)}${change.reason ? `. ${change.reason}` : ""}`} style={[t.meta, { flex: 1, minWidth: 200 }]}>
|
|
290
|
+
<Text style={{ color: c.foreground }}>Took over from {from}</Text> · {ago(change.at, now)}{change.reason ? ` · ${change.reason}` : ""}
|
|
291
|
+
</Text>
|
|
292
|
+
{canUndo && <Button theme={theme} compact={compact} kind="ghost" title="Undo" accessibilityLabel={`Undo: make ${from} the main agent again`} accessibilityHint={`Repairs, questions and Done move back to ${from}.`} loading={undo.isPending} disabled={undo.isPending} onPress={() => undo.mutate()} />}
|
|
293
|
+
</View>;
|
|
294
|
+
}
|
|
295
|
+
|
|
262
296
|
function MainAgentName({ agentId, theme }: { agentId: string; theme: Theme }) {
|
|
263
297
|
const t = text(theme.colors);
|
|
264
298
|
return <Text numberOfLines={1} style={[t.meta, { color: theme.colors.foreground }]}>{useAgentTitle(agentId)}</Text>;
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
|
2
|
+
import { Pressable, Text, View } from "react-native";
|
|
3
|
+
import { useRpc } from "@getpaseo/plugin/client";
|
|
4
|
+
import { Icon, Modal, ScrollView } from "@getpaseo/plugin/client/ui";
|
|
5
|
+
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
6
|
+
import { releaseNotesRpc, whatsNewSeenRpc } from "../shared/contracts";
|
|
7
|
+
import { LAST_SEEN_KEY, agoText, recentNotes, recentUpdate, whatsNew, type ReleaseNote, type ReleaseNotesView } from "../shared/changelog";
|
|
8
|
+
import { deviceStorage } from "../shared/settings-nav";
|
|
9
|
+
import { Button, text, useNow, type Theme } from "./kit";
|
|
10
|
+
import { useOnboarding } from "./onboarding";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Release notes on the client: What's new after an update, the full list, and Home's quiet version line. The notes
|
|
14
|
+
* come from the installed package's CHANGELOG.md through `follow.release-notes`, read once per app session.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export const releaseNotesKey = ["follow-through", "release-notes"];
|
|
18
|
+
export function useReleaseNotes() {
|
|
19
|
+
const read = useRpc(releaseNotesRpc);
|
|
20
|
+
return useQuery({ queryKey: releaseNotesKey, queryFn: () => read({}), staleTime: Infinity, retry: 1 });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const fmtDate = (iso: string | null) => iso ? new Date(`${iso}T12:00:00`).toLocaleDateString(undefined, { day: "numeric", month: "short" }) : null;
|
|
24
|
+
|
|
25
|
+
/** Hidden from screen readers: a visual separator only. */
|
|
26
|
+
const Dot = ({ style }: { style: object }) => <Text style={style} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" aria-hidden>·</Text>;
|
|
27
|
+
|
|
28
|
+
/** One version's bullets. Shared by What's new, the release notes and Settings. */
|
|
29
|
+
export function VersionNotes({ note, theme, compact = false, max = 8 }: { note: ReleaseNote; theme: Theme; compact?: boolean; max?: number }) {
|
|
30
|
+
const c = theme.colors; const t = text(c, compact);
|
|
31
|
+
const [all, setAll] = useState(false);
|
|
32
|
+
const items = all ? note.items : note.items.slice(0, max);
|
|
33
|
+
const dotTop = compact ? 8 : 7;
|
|
34
|
+
return <View style={{ gap: 6 }}>
|
|
35
|
+
{items.map((item, i) => <View key={i} style={{ flexDirection: "row", gap: 8 }}>
|
|
36
|
+
<View style={{ width: 4, height: 4, borderRadius: 2, marginTop: dotTop, backgroundColor: c.foregroundMuted }} />
|
|
37
|
+
<Text style={[t.body, { flex: 1 }]}>{item}</Text>
|
|
38
|
+
</View>)}
|
|
39
|
+
{!all && note.items.length > max && <Pressable accessibilityRole="button" onPress={() => setAll(true)} hitSlop={compact ? { top: 14, bottom: 14, left: 8, right: 8 } : 6}
|
|
40
|
+
style={{ minHeight: compact ? 44 : undefined, justifyContent: "center", alignSelf: "flex-start" }}>
|
|
41
|
+
<Text style={[t.label, { color: c.foreground, fontWeight: "600" }]}>{`Show all ${note.items.length}`}</Text>
|
|
42
|
+
</Pressable>}
|
|
43
|
+
</View>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** "1.4.0-beta.14 · Nov 10", a heading for screen readers. `dateOnly` when the title already names the version. */
|
|
47
|
+
function VersionHeader({ note, theme, compact, dateOnly = false }: { note: ReleaseNote; theme: Theme; compact: boolean; dateOnly?: boolean }) {
|
|
48
|
+
const c = theme.colors; const t = text(c, compact);
|
|
49
|
+
const date = fmtDate(note.date);
|
|
50
|
+
if (dateOnly) return date ? <Text style={t.meta}>{date}</Text> : null;
|
|
51
|
+
return <View accessibilityRole="header" accessibilityLabel={`${note.version}${date ? `, ${date}` : ""}`} style={{ flexDirection: "row", alignItems: "baseline", gap: 6 }}>
|
|
52
|
+
<Text style={[t.label, { fontVariant: ["tabular-nums"] }]}>{note.version}</Text>
|
|
53
|
+
{date && <><Dot style={t.meta} /><Text style={t.meta}>{date}</Text></>}
|
|
54
|
+
</View>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** An older version, folded to its first note; opens in place. */
|
|
58
|
+
function FoldedVersion({ note, theme, compact }: { note: ReleaseNote; theme: Theme; compact: boolean }) {
|
|
59
|
+
const c = theme.colors; const t = text(c, compact);
|
|
60
|
+
const [open, setOpen] = useState(false);
|
|
61
|
+
return <View style={{ borderTopWidth: 1, borderTopColor: c.border }}>
|
|
62
|
+
<Pressable accessibilityRole="button" accessibilityState={{ expanded: open }} aria-expanded={open} accessibilityLabel={`${note.version}${note.date ? `, ${fmtDate(note.date)}` : ""}`} onPress={() => setOpen(o => !o)}
|
|
63
|
+
// Hover fill only with a pointer; on touch a row would otherwise keep the last tap's fill.
|
|
64
|
+
style={state => ({ flexDirection: "row", alignItems: "center", gap: 8, minHeight: compact ? 48 : 36, paddingVertical: 6, marginHorizontal: -8, paddingHorizontal: 8, borderRadius: 6, backgroundColor: state.pressed ? c.surface2 : !compact && (state as { hovered?: boolean }).hovered ? c.surface1 : "transparent" })}>
|
|
65
|
+
<Icon name={open ? "ChevronDown" : "ChevronRight"} size={14} color={c.foregroundMuted} />
|
|
66
|
+
<Text accessibilityRole="header" style={[t.label, { fontVariant: ["tabular-nums"], flexShrink: 0 }]}>{note.version}</Text>
|
|
67
|
+
{note.date && <Text style={[t.meta, { flexShrink: 0 }]}>{fmtDate(note.date)}</Text>}
|
|
68
|
+
{!open && <Text numberOfLines={1} style={[t.meta, { flex: 1, minWidth: 0 }]}>{note.items[0] ?? ""}</Text>}
|
|
69
|
+
</Pressable>
|
|
70
|
+
{open && <View style={{ paddingLeft: 22, paddingBottom: 12 }}><VersionNotes note={note} theme={theme} compact={compact} /></View>}
|
|
71
|
+
</View>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Newest open, the next ones folded, then "and N older versions" past `cap` (a button only when `onMore` shows them).
|
|
76
|
+
* `titled`: the sheet's title already names the newest version, so its header shows just the date.
|
|
77
|
+
*/
|
|
78
|
+
export function NotesList({ notes, theme, compact, cap = 10, onMore, titled = false }: { notes: readonly ReleaseNote[]; theme: Theme; compact: boolean; cap?: number; onMore?: () => void; titled?: boolean }) {
|
|
79
|
+
const c = theme.colors; const t = text(c, compact);
|
|
80
|
+
const [first, ...rest] = notes;
|
|
81
|
+
if (!first) return null;
|
|
82
|
+
const shown = rest.slice(0, cap - 1);
|
|
83
|
+
const hidden = rest.length - shown.length;
|
|
84
|
+
const more = `and ${hidden} older version${hidden === 1 ? "" : "s"}`;
|
|
85
|
+
return <View style={{ gap: 0 }}>
|
|
86
|
+
<View style={{ gap: 8, paddingBottom: 14 }}><VersionHeader note={first} theme={theme} compact={compact} dateOnly={titled} /><VersionNotes note={first} theme={theme} compact={compact} /></View>
|
|
87
|
+
{shown.map(n => <FoldedVersion key={n.version} note={n} theme={theme} compact={compact} />)}
|
|
88
|
+
{hidden > 0 && (onMore
|
|
89
|
+
? <Pressable accessibilityRole="button" onPress={onMore} style={{ borderTopWidth: 1, borderTopColor: c.border, minHeight: compact ? 48 : 36, justifyContent: "center" }}>
|
|
90
|
+
<Text style={[t.meta, { color: c.foreground, fontWeight: "600" }]}>{more}</Text>
|
|
91
|
+
</Pressable>
|
|
92
|
+
: <View style={{ borderTopWidth: 1, borderTopColor: c.border, minHeight: compact ? 48 : 36, justifyContent: "center" }}><Text style={t.meta}>{more}</Text></View>)}
|
|
93
|
+
</View>;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** The host sheet's own inset on the phone, so our body lines up with its title. */
|
|
97
|
+
const SHEET_INSET = 24;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* "What's new in X": the host's dialog on desktop, its sheet on the phone. On the phone our own scroll body with a
|
|
101
|
+
* pinned footer, so Close stays in thumb reach however long the notes are. "See all release notes" switches the same
|
|
102
|
+
* sheet to every version, so nothing navigates away from under it.
|
|
103
|
+
*/
|
|
104
|
+
export function WhatsNewSheet({ open, notes, all, theme, compact, onClose, startAll = false }: { open: boolean; notes: readonly ReleaseNote[]; all: readonly ReleaseNote[]; theme: Theme; compact: boolean; onClose: () => void; startAll?: boolean }) {
|
|
105
|
+
const c = theme.colors; const t = text(c, compact);
|
|
106
|
+
const [full, setFull] = useState(startAll);
|
|
107
|
+
const list = full ? all : notes;
|
|
108
|
+
const newest = list[0];
|
|
109
|
+
if (!newest) return null;
|
|
110
|
+
const meta = !full && list.length > 1 ? `${list.length} versions since you last looked` : null;
|
|
111
|
+
const body = <>
|
|
112
|
+
{meta && <Text style={t.meta}>{meta}</Text>}
|
|
113
|
+
<NotesList notes={list} theme={theme} compact={compact} cap={full ? all.length : 10} onMore={full ? undefined : () => setFull(true)} titled={!full} />
|
|
114
|
+
</>;
|
|
115
|
+
const footer = (pinned: boolean) => <View style={{ borderTopWidth: 1, borderTopColor: c.border, flexDirection: compact ? "column" : "row", alignItems: compact ? "stretch" : "center", justifyContent: full ? "flex-end" : "space-between", gap: compact ? 4 : 8,
|
|
116
|
+
...(pinned ? { backgroundColor: c.surface1, paddingHorizontal: SHEET_INSET - 8, paddingTop: 8, paddingBottom: 12 } : { paddingTop: 12, marginTop: 4 }) }}>
|
|
117
|
+
{!full && all.length > list.length && <Button title="See all release notes" kind="ghost" theme={theme} compact={compact} grow={compact} onPress={() => setFull(true)} />}
|
|
118
|
+
<Button title="Close" kind="secondary" theme={theme} compact={compact} grow={compact} onPress={onClose} />
|
|
119
|
+
</View>;
|
|
120
|
+
return <Modal title={full ? "Release notes" : `What's new in ${newest.version}`} open={open} onOpenChange={next => { if (!next) onClose(); }}>
|
|
121
|
+
{compact
|
|
122
|
+
? <Modal.Content scrollable={false} contentContainerStyle={{ padding: 0, gap: 0 }} style={{ flex: 1 }}>
|
|
123
|
+
<ScrollView style={{ flex: 1 }} contentContainerStyle={{ paddingHorizontal: SHEET_INSET, paddingTop: 12, paddingBottom: 16, gap: 12 }}>{body}</ScrollView>
|
|
124
|
+
{footer(true)}
|
|
125
|
+
</Modal.Content>
|
|
126
|
+
// Desktop: the dialog sizes to its notes (up to the host's 85%); Esc and the X close it too.
|
|
127
|
+
: <Modal.Content contentContainerStyle={{ paddingHorizontal: 20, paddingTop: 4, paddingBottom: 16, gap: 12 }}>{body}{footer(false)}</Modal.Content>}
|
|
128
|
+
</Modal>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Where "seen" lives. Web and desktop keep it per device (localStorage). The native app has no localStorage, so it
|
|
133
|
+
* falls back to the host's record: What's new then shows once per host there, not on every launch.
|
|
134
|
+
*/
|
|
135
|
+
const persistent = () => { try { return typeof (globalThis as { localStorage?: Storage }).localStorage?.getItem === "function"; } catch { return false; } };
|
|
136
|
+
const seenOnDevice = (view: ReleaseNotesView) => persistent() ? deviceStorage.get(LAST_SEEN_KEY) : view.hostSeen;
|
|
137
|
+
|
|
138
|
+
// One What's new per app session: the first mounted Follow-up surface claims it, the rest render nothing.
|
|
139
|
+
let claimedBy: string | null = null;
|
|
140
|
+
const listeners = new Set<() => void>();
|
|
141
|
+
const claimVersion = () => claimedBy;
|
|
142
|
+
const subscribeClaim = (l: () => void) => { listeners.add(l); return () => { listeners.delete(l); }; };
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Shows "What's new" once per device per version, on whichever Follow-up surface mounts first (Home, the workspace
|
|
146
|
+
* panel or the sidebar item). Never on a first install and never while setup is showing or still loading.
|
|
147
|
+
*/
|
|
148
|
+
export function WhatsNewGate({ surface, theme, compact }: { surface: string; theme: Theme; compact: boolean }) {
|
|
149
|
+
const query = useReleaseNotes();
|
|
150
|
+
// Pending counts as showing, so What's new never flashes up before the setup flow takes the screen.
|
|
151
|
+
const ob = useOnboarding();
|
|
152
|
+
const onboarding = ob.isPending || !!ob.data?.show;
|
|
153
|
+
const owner = useSyncExternalStore(subscribeClaim, claimVersion, claimVersion);
|
|
154
|
+
const seen = useRpc(whatsNewSeenRpc); const cache = useQueryClient();
|
|
155
|
+
const [closed, setClosed] = useState(false);
|
|
156
|
+
const view = query.data;
|
|
157
|
+
const decision = useMemo(() => view ? whatsNew({ installed: view.version, deviceSeen: seenOnDevice(view), previous: view.previous, onboarding, notes: view.notes }) : null, [view, onboarding]);
|
|
158
|
+
useEffect(() => {
|
|
159
|
+
if (!decision || !view) return;
|
|
160
|
+
if (!decision.show) { if (decision.record && persistent()) deviceStorage.set(LAST_SEEN_KEY, decision.record); return; }
|
|
161
|
+
if (claimedBy == null) { claimedBy = surface; listeners.forEach(l => l()); }
|
|
162
|
+
}, [decision, view, surface]);
|
|
163
|
+
useEffect(() => () => { if (claimedBy === surface) { claimedBy = null; listeners.forEach(l => l()); } }, [surface]);
|
|
164
|
+
if (!view || !decision?.show || owner !== surface || closed) return null;
|
|
165
|
+
const close = () => {
|
|
166
|
+
deviceStorage.set(LAST_SEEN_KEY, view.version); setClosed(true);
|
|
167
|
+
void seen({ version: view.version }).then(v => cache.setQueryData(releaseNotesKey, v), () => undefined);
|
|
168
|
+
};
|
|
169
|
+
return <WhatsNewSheet open notes={decision.notes} all={view.notes} theme={theme} compact={compact} onClose={close} />;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** What's new opened by hand (Home's footer): since the previous version, or every version with `all`. */
|
|
173
|
+
export function ReleaseNotesSheet({ theme, compact, all = false, onClose }: { theme: Theme; compact: boolean; all?: boolean; onClose: () => void }) {
|
|
174
|
+
const view = useReleaseNotes().data;
|
|
175
|
+
if (!view) return null;
|
|
176
|
+
return <WhatsNewSheet open notes={recentNotes(view)} all={view.notes} startAll={all} theme={theme} compact={compact} onClose={onClose} />;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** Home's quiet footer: "Follow-up 1.4.0-beta.21 · Release notes", or "Updated to … 2h ago · What's new" for 3 days. */
|
|
180
|
+
export function VersionLine({ theme, compact, onOpen }: { theme: Theme; compact: boolean; onOpen: (all: boolean) => void }) {
|
|
181
|
+
const c = theme.colors; const t = text(c, compact);
|
|
182
|
+
const now = useNow(60_000);
|
|
183
|
+
const query = useReleaseNotes();
|
|
184
|
+
const view = query.data;
|
|
185
|
+
// Loading: hold the line's height. Failed: nothing, rather than dead space at the end of Home.
|
|
186
|
+
if (!view) return query.isError ? null : <View style={{ height: 32 }} />;
|
|
187
|
+
const recent = recentUpdate(view, now);
|
|
188
|
+
const label = recent ? `Updated to ${view.version} ${agoText(now - view.updatedAt!)}` : `Follow-up ${view.version}`;
|
|
189
|
+
const link = recent ? "What's new" : "Release notes";
|
|
190
|
+
// Phones: meta size (12) rather than 11, and a 44pt target.
|
|
191
|
+
const style = compact ? t.meta : t.small;
|
|
192
|
+
return <View style={{ flexDirection: "row", alignItems: "center", gap: 6, paddingHorizontal: 16, paddingTop: 12, paddingBottom: compact ? 0 : 48 }}>
|
|
193
|
+
<Text style={style}>{label}</Text>
|
|
194
|
+
<Dot style={style} />
|
|
195
|
+
<Pressable accessibilityRole="button" accessibilityLabel={recent ? `What's new in ${view.version}` : "Release notes"} hitSlop={compact ? { top: 15, bottom: 15, left: 8, right: 8 } : 6} onPress={() => onOpen(!recent)}>
|
|
196
|
+
{state => <Text style={[style, { color: c.foreground, textDecorationLine: (state as { hovered?: boolean }).hovered ? "underline" : "none" }]}>{link}</Text>}
|
|
197
|
+
</Pressable>
|
|
198
|
+
</View>;
|
|
199
|
+
}
|
package/index.server.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { askQuestion, recordAnswer, syncTaskQuestions, withdrawQuestion } from "
|
|
|
4
4
|
import { agentSetSpec, developerSetSpec } from "./server/spec";
|
|
5
5
|
import type { PluginServerContext, PluginHandlerContext } from "@getpaseo/plugin/server";
|
|
6
6
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
7
|
-
import { mkdirSync, renameSync, writeFileSync } from "node:fs";
|
|
7
|
+
import { existsSync, mkdirSync, renameSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { join } from "node:path";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
10
10
|
import * as rpc from "./shared/contracts";
|
|
@@ -25,7 +25,7 @@ import { AgentActions, AGENT_TOOLS, controlWorkspace, type AgentTool } from "./s
|
|
|
25
25
|
import { PaseoGateway, paseoHome, clientEntry, closeConnections, sessionGuardOwnsInterruption } from "./server/daemon";
|
|
26
26
|
import { mcpSource } from "./server/mcp-source";
|
|
27
27
|
import { excludeStack } from "./server/exclusions";
|
|
28
|
-
import { applyHistory, applyDiscovery, extractHistory, markMainWork } from "./server/discovery";
|
|
28
|
+
import { applyHistory, applyDiscovery, extractHistory, mainWorkDue, markMainWork } from "./server/discovery";
|
|
29
29
|
import { lifecycleOnly, recoveryBatch } from "./shared/follow-up";
|
|
30
30
|
import { Deployments } from "./server/deployments";
|
|
31
31
|
import { AgentHooks } from "./server/agent-hooks";
|
|
@@ -64,6 +64,8 @@ import { labelsFor, providerName, resolveRole, roleSummary, type AgentSettingsVi
|
|
|
64
64
|
import type { LoadSignals } from "./shared/agent-load";
|
|
65
65
|
import { OnboardingStore, ReadinessChecks, nativeAgentCount } from "./server/onboarding";
|
|
66
66
|
import { execFile } from "node:child_process";
|
|
67
|
+
import { VersionsStore, demoOverride, describeSelf, readPackage, type SelfInstall } from "./server/release-notes";
|
|
68
|
+
import { releaseNotesViewSchema, type ReleaseNote, type ReleaseNotesView } from "./shared/changelog";
|
|
67
69
|
import { BRIEF_KIND, BRIEF_VERSION, prState, validateNeedsYou, type Brief, type NeedsYouRecord } from "./shared/brief";
|
|
68
70
|
|
|
69
71
|
/** Agent calls that only the main agent makes: one of these from a successor means the handover is in use. */
|
|
@@ -97,7 +99,7 @@ export default function contribute(server: PluginServerContext) {
|
|
|
97
99
|
};
|
|
98
100
|
const noteMainWork = async (agentId: string) => {
|
|
99
101
|
// A cheap check on the snapshot first: almost every call has no open handover, so nothing is written.
|
|
100
|
-
if (!(await store.snapshot()).workspaces.some(w => w
|
|
102
|
+
if (!(await store.snapshot()).workspaces.some(w => mainWorkDue(w, agentId, Date.now()))) return;
|
|
101
103
|
await store.mutate(state => { markMainWork(state, agentId); });
|
|
102
104
|
};
|
|
103
105
|
const store = new Store(directory, 1_000);
|
|
@@ -686,6 +688,26 @@ export default function contribute(server: PluginServerContext) {
|
|
|
686
688
|
const cat = catalog ? await providerCatalog.read(fresh) : null;
|
|
687
689
|
return { roles: Object.values(roles).map(r => ({ ...r, summary: roleSummary(r, labelsFor(r, cat)) })), invalid, catalog: cat };
|
|
688
690
|
};
|
|
691
|
+
// What's new. Follow-up's own install comes from Paseo's plugin list, read once per worker.
|
|
692
|
+
const versions = new VersionsStore(directory);
|
|
693
|
+
let self: Promise<SelfInstall & { notes: ReleaseNote[] }> | null = null;
|
|
694
|
+
const selfInstall = () => self ??= withDaemon(async c => describeSelf(await c.listPlugins?.() ?? [])).then(async row => {
|
|
695
|
+
const pkg = row.path ? await readPackage(row.path) : { version: null, notes: [] };
|
|
696
|
+
const version = pkg.version ?? row.version;
|
|
697
|
+
if (!version) throw new Error("Paseo's plugin list doesn't show Follow-up's version yet.");
|
|
698
|
+
// Fresh or existing comes from setup's own record, decided once before anything else wrote state.
|
|
699
|
+
const existing = await onboarding.init().then(f => f.install === "existing", () => true);
|
|
700
|
+
await versions.started(version, existing).catch(() => undefined);
|
|
701
|
+
return { ...row, version, notes: pkg.notes };
|
|
702
|
+
}).catch(error => { self = null; throw error; });
|
|
703
|
+
// Record the version at start (in the background), so "Updated to X 2h ago" counts from the reload, not first view.
|
|
704
|
+
void ready.then(() => selfInstall()).catch(() => undefined);
|
|
705
|
+
const releaseNotesView = async (): Promise<ReleaseNotesView> => {
|
|
706
|
+
const me = await selfInstall(); const file = await versions.read();
|
|
707
|
+
return demoOverride(directory, "release-notes", releaseNotesViewSchema, { version: me.version, installKind: me.installKind, previous: file.previous ?? null, updatedAt: file.startedAt ?? null, hostSeen: file.hostSeen ?? null, notes: me.notes });
|
|
708
|
+
};
|
|
709
|
+
handle(rpc.releaseNotesRpc, async () => releaseNotesView());
|
|
710
|
+
handle(rpc.whatsNewSeenRpc, async ({ version }) => { await versions.seen(version); return releaseNotesView(); });
|
|
689
711
|
handle(rpc.agentSettingsRpc, async ({ catalog, fresh }, { paseo }) => { await requireReady(); seen(paseo); return agentSettingsView(!!catalog, !!fresh); });
|
|
690
712
|
handle(rpc.setAgentSettingRpc, async ({ role, entry }, { paseo }) => { await requireReady(); seen(paseo); await agentSettings.save(role, entry); return agentSettingsView(true); });
|
|
691
713
|
handle(rpc.overseerActRpc, async ({ agentId, tool, args }, { paseo }) => {
|
|
@@ -779,7 +801,9 @@ export default function contribute(server: PluginServerContext) {
|
|
|
779
801
|
return result;
|
|
780
802
|
},
|
|
781
803
|
};
|
|
782
|
-
const agentActions = new AgentActions({ store, prActions: actions, engine, inbox, priorities: priorityStore, about, agentSettings, prWorkflows: () => prWorkflowView(), rpc: rpcBridge, display: displayBridge
|
|
804
|
+
const agentActions = new AgentActions({ store, prActions: actions, engine, inbox, priorities: priorityStore, about, agentSettings, prWorkflows: () => prWorkflowView(), rpc: rpcBridge, display: displayBridge,
|
|
805
|
+
// The directory's agent list (metadata only): a claim never loads or refreshes the main agent.
|
|
806
|
+
agentInfo: async agentId => { const row = gateway.directory.cached(agentId) ?? (await gateway.directory.read()).agents.find(r => r.agent.id === agentId)?.agent; return row ? { status: row.status, activeTurn: row.activeTurn, pendingPermissions: row.pendingPermissions, archivedAt: row.archivedAt } : null; } });
|
|
783
807
|
handle(rpc.prioritiesRpc, async () => ({ items: await priorityStore.read() }));
|
|
784
808
|
// Provider limits are non-essential: at critical memory only the VM meter is served.
|
|
785
809
|
handle(rpc.usageRpc, async () => ({ ...(governor.allowsExtras() ? await usage.read() : NO_USAGE), resources: governor.current() }));
|
|
@@ -791,7 +815,8 @@ export default function contribute(server: PluginServerContext) {
|
|
|
791
815
|
const agent = (await paseo.agents.ref(agentId).refresh())?.agent;
|
|
792
816
|
if (!agent?.workspaceId || agent.archivedAt) throw new Error("Cannot locate the caller's workspace.");
|
|
793
817
|
if (agent.labels["follow-through.recovery"]) throw new Error("Recovery sessions can't act for the developer. Acknowledge your batch instead.");
|
|
794
|
-
|
|
818
|
+
// Contributors (the workspace's other root agents) get one tool: make_main_agent, with its claim rules.
|
|
819
|
+
if (tool !== "make_main_agent" && (await store.snapshot()).workspaces.some(w => w.enable_tracking && !w.archived && w.contributorAgentIds?.includes(agentId))) throw new Error("Contributor sessions can't act for the developer. Report to the main agent.");
|
|
795
820
|
if (!await isWorkspaceRoot(agent, async id => (await paseo.agents.ref(id).refresh())?.agent)) throw new Error("Follow-up's action tools are for root agents. Ask your parent agent.");
|
|
796
821
|
const result = await agentActions.run(agentId, tool as AgentTool, args);
|
|
797
822
|
void engine.tick();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paseo-follow-up",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.4.0-beta.
|
|
4
|
+
"version": "1.4.0-beta.23",
|
|
5
5
|
"description": "Follow every workspace PR stack in Paseo, answer agent questions, batch repairs for the main agent, and see what needs you.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"server/",
|
|
17
17
|
"shared/",
|
|
18
18
|
"skills/",
|
|
19
|
+
"CHANGELOG.md",
|
|
19
20
|
"README.md",
|
|
20
21
|
"THIRD_PARTY_NOTICES.md",
|
|
21
22
|
"docs/screenshots/",
|
|
@@ -24,14 +25,16 @@
|
|
|
24
25
|
"scripts": {
|
|
25
26
|
"typecheck": "tsc --noEmit",
|
|
26
27
|
"test": "tsx --test tests/*.test.ts",
|
|
27
|
-
"verify": "npm run typecheck && npm test && node --test button-visibility.test.mjs && npm run test:scale && npm run test:native && npm run test:trust",
|
|
28
|
+
"verify": "npm run typecheck && npm run check:notes && npm test && node --test button-visibility.test.mjs && npm run test:scale && npm run test:native && npm run test:trust",
|
|
28
29
|
"test:trust": "node scripts/check-trust-bypass.mjs",
|
|
29
30
|
"preview": "node scripts/check-install.mjs --keep",
|
|
30
31
|
"test:install": "node scripts/check-install.mjs",
|
|
31
32
|
"test:github-mode": "node scripts/check-github-mode.mjs",
|
|
32
33
|
"test:native": "node scripts/check-native-tools.mjs --agents 10",
|
|
33
34
|
"prepare": "node scripts/build.mjs",
|
|
34
|
-
"test:scale": "node scripts/scale-check.mjs --workspaces 120 --awake 5 --churn 35 --idle 60 --rss-budget 240 --cpu-budget 3 --request-budget 2"
|
|
35
|
+
"test:scale": "node scripts/scale-check.mjs --workspaces 120 --awake 5 --churn 35 --idle 60 --rss-budget 240 --cpu-budget 3 --request-budget 2",
|
|
36
|
+
"check:notes": "node scripts/release-notes.mjs --check",
|
|
37
|
+
"release:notes": "node scripts/release-notes.mjs"
|
|
35
38
|
},
|
|
36
39
|
"devDependencies": {
|
|
37
40
|
"@getpaseo/client": "0.14.0",
|