paseo-follow-up 2.0.2-beta.3 → 2.1.0-beta.0
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/README.md +28 -0
- package/client/home-list.tsx +25 -10
- package/client/home.tsx +3 -0
- package/client/panel-menu.tsx +1 -1
- package/client/rename.tsx +2 -2
- package/client/row-actions.ts +1 -1
- package/client/sidebar-view.tsx +20 -6
- package/index.client.tsx +3 -2
- package/index.server.ts +1 -1
- package/package.json +1 -1
- package/server/agent-actions.ts +1 -1
- package/server/mcp-source.ts +1 -1
- package/server/mcp.mjs +1 -1
- package/server/rename.ts +20 -6
- package/shared/contracts.ts +1 -1
- package/shared/overseer.ts +32 -0
- package/shared/rename.ts +1 -1
- package/shared/row-menu.ts +1 -1
package/README.md
CHANGED
|
@@ -157,6 +157,34 @@ and GitHub PR status with your existing credentials, and keeps its state in `$PA
|
|
|
157
157
|
gives agents scoped tools and installs reversible hooks for Claude Code and Codex. [OVERVIEW.md](OVERVIEW.md) has the
|
|
158
158
|
full data-access statement.
|
|
159
159
|
|
|
160
|
+
## Memory on Linux
|
|
161
|
+
|
|
162
|
+
On Linux (glibc), a Follow-up that stays up for hours can slowly grow in memory: the allocator keeps memory Follow-up
|
|
163
|
+
already freed. macOS isn't affected. Three allocator settings in the Paseo daemon's environment stop the growth. Every
|
|
164
|
+
process Paseo starts inherits them.
|
|
165
|
+
|
|
166
|
+
If a systemd unit runs Paseo, add them to it (the unit name is your own; `paseo` here):
|
|
167
|
+
|
|
168
|
+
```sh
|
|
169
|
+
systemctl --user edit paseo
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
```ini
|
|
173
|
+
[Service]
|
|
174
|
+
Environment=MALLOC_ARENA_MAX=2 MALLOC_MMAP_THRESHOLD_=131072 MALLOC_TRIM_THRESHOLD_=131072
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Then `systemctl --user restart paseo`. If the unit already reads an `EnvironmentFile=` (say `~/.config/paseo/env`),
|
|
178
|
+
put the three `NAME=value` lines there instead. If you start the daemon from a shell, stop it and start it with them:
|
|
179
|
+
|
|
180
|
+
```sh
|
|
181
|
+
paseo daemon stop
|
|
182
|
+
MALLOC_ARENA_MAX=2 MALLOC_MMAP_THRESHOLD_=131072 MALLOC_TRIM_THRESHOLD_=131072 paseo daemon start
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
In our test harness (140 workspaces, 45 idle minutes) Follow-up grew about 20 MB without them and 3 to 6 MB with them,
|
|
186
|
+
at no measurable CPU cost. To undo it, remove the settings and restart Paseo.
|
|
187
|
+
|
|
160
188
|
## Docs
|
|
161
189
|
|
|
162
190
|
- [CHANGELOG.md](CHANGELOG.md): release notes.
|
package/client/home-list.tsx
CHANGED
|
@@ -25,7 +25,9 @@ const QUIET_PAGE = 20;
|
|
|
25
25
|
export const BRIEF_KEY = "brief";
|
|
26
26
|
export const OVERSEER_KEY = "overseer";
|
|
27
27
|
/** The pinned Overseer row: not started yet (a one-time Start), working, asking, idle, or failed to come back. */
|
|
28
|
-
export type OverseerRowState = { state: "start" | "idle" | "running" | "asks" | "error"; line: string
|
|
28
|
+
export type OverseerRowState = { state: "start" | "idle" | "running" | "asks" | "error"; line: string;
|
|
29
|
+
/** A list filter's match in `line`, highlighted like a row's (the sidebar view's "Filter workspaces"). */
|
|
30
|
+
ranges?: Range[] };
|
|
29
31
|
|
|
30
32
|
type Entry =
|
|
31
33
|
| { type: "brief"; key: string }
|
|
@@ -74,6 +76,8 @@ export type HomeListProps = {
|
|
|
74
76
|
filter?: HomeGroupId | null;
|
|
75
77
|
/** The pinned Overseer row under the brief. Absent: the Overseer is off (or this surface has none). */
|
|
76
78
|
overseer?: OverseerRowState | null;
|
|
79
|
+
/** A narrow list (Paseo's sidebar view): the Overseer row stacks like every row there, title then its line. */
|
|
80
|
+
stackOverseer?: boolean;
|
|
77
81
|
/** An omnibox ask is on its way to the Overseer. */
|
|
78
82
|
asking?: boolean;
|
|
79
83
|
/** Sending rows' Send now (only where the server would take it: Workstream.sendNow). Absent: the list offers none. */
|
|
@@ -88,7 +92,7 @@ export type HomeListProps = {
|
|
|
88
92
|
|
|
89
93
|
const noMenu: OpenRowMenu = () => undefined;
|
|
90
94
|
|
|
91
|
-
export function HomeList({ model, theme, dense = false, touch, selectedKey, onSelect, briefLine, renderExpanded, header, footer, top, afterNeeds, emptyAction, results, hits = null, activeResult = 0, onResult, filter = null, overseer = null, asking = false, menu, onSendNow }: HomeListProps) {
|
|
95
|
+
export function HomeList({ model, theme, dense = false, touch, selectedKey, onSelect, briefLine, renderExpanded, header, footer, top, afterNeeds, emptyAction, results, hits = null, activeResult = 0, onResult, filter = null, overseer = null, stackOverseer = false, asking = false, menu, onSendNow }: HomeListProps) {
|
|
92
96
|
const c = theme.colors;
|
|
93
97
|
const [openMenu, setOpenMenu] = useState<RowMenuOpen | null>(null);
|
|
94
98
|
const build = menu.build;
|
|
@@ -178,7 +182,7 @@ export function HomeList({ model, theme, dense = false, touch, selectedKey, onSe
|
|
|
178
182
|
onSelect={pickResult} onMenu={item.archived ? noMenu : onMenu} />;
|
|
179
183
|
case "ask": return <AskRow ask={item.ask} theme={theme} active={item.index === activeResult} dense={dense} touch={touch} sending={!!asking} onPress={() => onResult?.({ provider: "overseer", key: ASK_KEY, ask: item.ask })} />;
|
|
180
184
|
case "brief": return <BriefRow theme={theme} line={briefLine ?? ""} selected={!touch && (selectedKey === null || selectedKey === BRIEF_KEY)} touch={touch} onSelect={onSelect} />;
|
|
181
|
-
case "overseer": return overseer ? <OverseerRow theme={theme} o={overseer} selected={selectedKey === OVERSEER_KEY} touch={touch} onSelect={onSelect} /> : null;
|
|
185
|
+
case "overseer": return overseer ? <OverseerRow theme={theme} o={overseer} selected={selectedKey === OVERSEER_KEY} touch={touch} stacked={stackOverseer} onSelect={onSelect} /> : null;
|
|
182
186
|
case "header": return <GroupHeader theme={theme} title={item.title} count={item.count} open={item.open} tone={item.group === "needs" && item.count ? c.statusWarning : undefined} dense={dense} touch={touch} onPress={() => toggle(item.group)} />;
|
|
183
187
|
case "fold": return <Pressable accessibilityRole="button" aria-expanded={item.open} accessibilityState={{ expanded: item.open }} accessibilityLabel={`${item.project}, ${item.count}. ${item.open ? "Collapse" : "Expand"}`} onPress={() => toggleProject(item.project)}
|
|
184
188
|
style={state => ({ flexDirection: "row", alignItems: "center", gap: 8, minHeight: touch ? 44 : dense ? 28 : 34, paddingHorizontal: dense ? 8 : 16, backgroundColor: (state as { hovered?: boolean }).hovered ? c.surface1 : "transparent" })}>
|
|
@@ -199,7 +203,7 @@ export function HomeList({ model, theme, dense = false, touch, selectedKey, onSe
|
|
|
199
203
|
</View>;
|
|
200
204
|
}
|
|
201
205
|
}
|
|
202
|
-
}, [theme, c, dense, touch, selectedKey, onSelect, briefLine, renderExpanded, toggle, toggleProject, activeResult, onResult, pickResult, model, overseer?.state, overseer?.line, asking, afterNeeds, emptyAction, onMenu, menuKey, onSendNow]);
|
|
206
|
+
}, [theme, c, dense, touch, selectedKey, onSelect, briefLine, renderExpanded, toggle, toggleProject, activeResult, onResult, pickResult, model, overseer?.state, overseer?.line, overseer?.ranges, stackOverseer, asking, afterNeeds, emptyAction, onMenu, menuKey, onSendNow]);
|
|
203
207
|
|
|
204
208
|
const listRef = useRef<FlatList<Entry>>(null);
|
|
205
209
|
// Keep the keyboard-active result in view.
|
|
@@ -240,18 +244,29 @@ function BriefRow({ theme, line, selected, touch, onSelect }: { theme: Theme; li
|
|
|
240
244
|
</Pressable>;
|
|
241
245
|
}
|
|
242
246
|
|
|
243
|
-
function OverseerRow({ theme, o, selected, touch, onSelect }: { theme: Theme; o: OverseerRowState; selected: boolean; touch: boolean; onSelect: (key: string) => void }) {
|
|
247
|
+
function OverseerRow({ theme, o, selected, touch, stacked = false, onSelect }: { theme: Theme; o: OverseerRowState; selected: boolean; touch: boolean; stacked?: boolean; onSelect: (key: string) => void }) {
|
|
244
248
|
const c = theme.colors;
|
|
245
249
|
const tone = o.state === "asks" ? c.statusWarning : o.state === "error" ? c.statusDanger : o.state === "running" ? runningColor(c) : c.foregroundMuted;
|
|
250
|
+
const icon = o.state === "running" ? <Spinner color={tone} size={13} label="Overseer working" /> : <Icon name="MessagesSquare" size={touch ? 16 : 15} color={o.state === "idle" || o.state === "start" ? c.foregroundMuted : tone} />;
|
|
251
|
+
const lineColor = o.state === "asks" || o.state === "error" ? tone : c.foregroundMuted;
|
|
252
|
+
// Wide Home: one line, the phone's shorter start line. Stacked (the sidebar view): the whole line, wrapping to two.
|
|
253
|
+
const line = marks(!stacked && touch && o.state === "start" ? "Ask about any workspace" : o.line, stacked || !(touch && o.state === "start") ? o.ranges : null, c);
|
|
246
254
|
return <Pressable accessibilityRole="button" accessibilityState={{ selected }} accessibilityLabel={`Overseer. ${o.line}`} onPress={() => onSelect(OVERSEER_KEY)}
|
|
247
|
-
style={state => ({ flexDirection: "row", alignItems: "center", gap: 10, minHeight: touch ? 52 : 40, paddingLeft: 14, paddingRight: 16, borderBottomWidth: 1, borderBottomColor: c.border,
|
|
255
|
+
style={state => ({ flexDirection: "row", alignItems: stacked ? "flex-start" : "center", gap: 10, minHeight: touch ? 52 : 40, paddingLeft: 14, paddingRight: 16, paddingVertical: stacked ? (touch ? 12 : 8) : 0, borderBottomWidth: 1, borderBottomColor: c.border,
|
|
248
256
|
// Its ask isn't a Needs-you row (it's yours to route), so the edge marks it the way blocking rows are marked.
|
|
249
257
|
borderLeftWidth: 2, borderLeftColor: o.state === "asks" || o.state === "error" ? withAlpha(tone, 0.9) : "transparent",
|
|
250
258
|
backgroundColor: selected ? c.surface2 : (state as { hovered?: boolean }).hovered ? c.surface1 : "transparent" })}>
|
|
251
|
-
{
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
259
|
+
{stacked ? <View style={{ paddingTop: 2 }}>{icon}</View> : icon}
|
|
260
|
+
{stacked
|
|
261
|
+
? <View style={{ flex: 1, gap: 2 }}>
|
|
262
|
+
<Text style={{ color: c.foreground, fontSize: touch ? 14 : 13, fontWeight: "600" }}>Overseer</Text>
|
|
263
|
+
<Text numberOfLines={2} style={{ color: lineColor, fontSize: touch ? 13 : 12, lineHeight: touch ? 18 : 16 }}>{line}</Text>
|
|
264
|
+
</View>
|
|
265
|
+
: <>
|
|
266
|
+
<Text style={{ color: c.foreground, fontSize: touch ? 14 : 13, fontWeight: "600" }}>Overseer</Text>
|
|
267
|
+
<Text numberOfLines={1} style={{ flex: 1, color: lineColor, fontSize: touch ? 13 : 12 }}>{line}</Text>
|
|
268
|
+
{touch && <Icon name="ChevronRight" size={16} color={c.foregroundMuted} />}
|
|
269
|
+
</>}
|
|
255
270
|
</Pressable>;
|
|
256
271
|
}
|
|
257
272
|
|
package/client/home.tsx
CHANGED
|
@@ -93,6 +93,9 @@ function HomeBody(props: PluginScreenProps & { deps: HomeDeps; onboarding: Onboa
|
|
|
93
93
|
} : undefined, [navigation, compact, deps]);
|
|
94
94
|
useNextRelay(inbox, params, openAgentRow, openWorkspaceRelay);
|
|
95
95
|
useEffect(() => { if (params.select) setSelected(`agent:${params.select}`); }, [params.select]);
|
|
96
|
+
// An already-open Home asked to show an item (the sidebar view's Overseer row: Start and Restart live here). `at` makes
|
|
97
|
+
// the same item twice a second request.
|
|
98
|
+
useEffect(() => { if (params.item && params.at) setSelected(params.item); }, [params.item, params.at]);
|
|
96
99
|
// Phones show one thing at a time. A row opens its own screen (pushed by the host) instead of swapping in place, so the
|
|
97
100
|
// host's ← is the only back control and it lands on the list. Desktop selects in place beside the list.
|
|
98
101
|
const route = compact && deps.openItem ? deps.openItem : null;
|
package/client/panel-menu.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import { useRowMenu } from "./row-actions";
|
|
|
8
8
|
import type { HomeSources } from "./home-data";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* The panel header's More button: the same row menu Home and the sidebar show for this workspace (Rename with AI
|
|
11
|
+
* The panel header's More button: the same row menu Home and the sidebar show for this workspace (Rename title with AI
|
|
12
12
|
* among it), so there is one menu everywhere. A popover under the button on desktop, the sheet on phones.
|
|
13
13
|
*/
|
|
14
14
|
export function PanelMore({ w, sources, theme, compact, openAgent, openQuestion, showMenu }: {
|
package/client/rename.tsx
CHANGED
|
@@ -14,7 +14,7 @@ import { Spinner } from "./motion";
|
|
|
14
14
|
import { hasToastHost, pushToast, runAction } from "./toast-store";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* Rename with AI (docs/ai-roles.md#rename-with-ai): one dialog for every entry point (row menus, the panel's More
|
|
17
|
+
* Rename title with AI (docs/ai-roles.md#rename-title-with-ai): one dialog for every entry point (row menus, the panel's More
|
|
18
18
|
* menu, ⌘K). It asks for a suggestion as it opens, shows it in an editable field, and renames only on Rename. The
|
|
19
19
|
* toast after it carries Undo; for 24 hours the dialog also offers Undo last rename.
|
|
20
20
|
*/
|
|
@@ -106,7 +106,7 @@ export function RenameDialog({ request, theme, compact, onClose }: { request: Re
|
|
|
106
106
|
// Only near the limit: the reason text covers the rest (words, keys, branch names).
|
|
107
107
|
const showCounter = counter > NAME_MAX_CHARS - 15;
|
|
108
108
|
const waiting = phase === "suggesting" && !name;
|
|
109
|
-
return <Modal title="Rename with AI" icon={<Icon name="Sparkles" size={18} color={c.foregroundMuted} />} open onOpenChange={next => { if (!next) onClose(); }}>
|
|
109
|
+
return <Modal title="Rename title with AI" icon={<Icon name="Sparkles" size={18} color={c.foregroundMuted} />} open onOpenChange={next => { if (!next) onClose(); }}>
|
|
110
110
|
<Modal.Content contentContainerStyle={{ padding: compact ? 16 : 20 }}>
|
|
111
111
|
<SubmitScope enabled={canRename} onSubmit={apply} style={{ gap: compact ? 16 : 14, maxWidth: 520 }}>
|
|
112
112
|
<View style={{ gap: 2 }}>
|
package/client/row-actions.ts
CHANGED
|
@@ -85,7 +85,7 @@ export function useRowMenu(host: RowMenuHost) {
|
|
|
85
85
|
case "copy_branch": return runAction({ label: "Copy branch", run: () => copyText(arg), success: "Branch name copied", failure: "Couldn't copy here" });
|
|
86
86
|
case "copy_pr": return runAction({ label: "Copy PR link", run: () => copyText(arg), success: arg.includes("\n") ? "PR links copied" : "PR link copied", failure: "Couldn't copy here" });
|
|
87
87
|
case "rewrite_summary": return runAction({ label: "Rewrite summary", run: async () => cache.setQueryData(aboutKey(workspaceId), await about({ workspaceId, open: true, refresh: true })), success: "Summary rewritten" }, `about:${workspaceId}`);
|
|
88
|
-
case "rename_ai": return runAction({ label: "Rename with AI", run: async () => openRename({ workspaceId, title: s.title }), success: null });
|
|
88
|
+
case "rename_ai": return runAction({ label: "Rename title with AI", run: async () => openRename({ workspaceId, title: s.title }), success: null });
|
|
89
89
|
case "make_main": return runAction({ label: "Make main agent", run: async () => { await control({ workspaceId, mainAgentId: arg }); after(); }, success: `${s.agent ?? "That agent"} is now the main agent` }, `main:${workspaceId}`);
|
|
90
90
|
case "stop_following": return runAction({ label: "Stop following", run: async () => { await setFollow({ workspace: { workspaceId, follow: false } }); after(); }, success: `Stopped following ${s.title}` }, `follow:${workspaceId}`);
|
|
91
91
|
}
|
package/client/sidebar-view.tsx
CHANGED
|
@@ -3,13 +3,14 @@ import type { PluginClientContext, PluginHostProps } from "@getpaseo/plugin/clie
|
|
|
3
3
|
import { useCallback, useMemo, useSyncExternalStore, type ComponentType } from "react";
|
|
4
4
|
import { View } from "react-native";
|
|
5
5
|
import { Text } from "./text";
|
|
6
|
-
import { UndoBar, useSidebarViewMounted } from "./inbox";
|
|
7
|
-
import { HomeList } from "./home-list";
|
|
6
|
+
import { UndoBar, useInbox, useSidebarViewMounted } from "./inbox";
|
|
7
|
+
import { HomeList, OVERSEER_KEY, type OverseerRowState } from "./home-list";
|
|
8
8
|
import { FilterField, SortMenu, useListFilter } from "./home-chrome";
|
|
9
9
|
import { useHomeModel, type HomeSources } from "./home-data";
|
|
10
10
|
import { useRowMenu } from "./row-actions";
|
|
11
11
|
import { RenameHost } from "./rename";
|
|
12
12
|
import type { Workstream } from "../shared/home";
|
|
13
|
+
import { listOverseerRow, overseerRowTarget } from "../shared/overseer";
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Phase 2: Home's list as Paseo's sidebar (the same HomeList component Home uses). `addSidebarView` and the ref queries exist on Paseo main
|
|
@@ -38,7 +39,8 @@ export function sidebarViewHost(client: PluginClientContext): SidebarViewHost |
|
|
|
38
39
|
return typeof candidate.addSidebarView === "function" && typeof hooks.useAgents === "function" && typeof hooks.useWorkspaces === "function" ? candidate as SidebarViewHost : null;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
/** `openOverseerHome`: Follow-up Home with the Overseer selected, where Start and Restart live. */
|
|
43
|
+
export function inboxSidebarView(sources: HomeSources, openOverseerHome: () => void) {
|
|
42
44
|
return function NeedsYouSidebar(view: SidebarViewProps) {
|
|
43
45
|
const refs = sdk as unknown as RefSdk;
|
|
44
46
|
useSidebarViewMounted();
|
|
@@ -51,26 +53,38 @@ export function inboxSidebarView(sources: HomeSources) {
|
|
|
51
53
|
const workspaces = refs.useWorkspaces({});
|
|
52
54
|
const agentRef = useMemo(() => new Map(agents.map(r => [r.id, r])), [agents]);
|
|
53
55
|
const workspaceRef = useMemo(() => new Map(workspaces.map(r => [r.id, r])), [workspaces]);
|
|
56
|
+
// Home's pinned Overseer row, the same state (one-row-everywhere); a filter keeps it only when it's about it.
|
|
57
|
+
const overseerStatus = useSyncExternalStore(sources.extras.subscribe, sources.extras.overseer, sources.extras.overseer);
|
|
58
|
+
const overseerInbox = useInbox(sources.inbox, () => sources.inbox.overseer());
|
|
59
|
+
const overseer: OverseerRowState | null = listOverseerRow(overseerStatus, overseerInbox, filter.query);
|
|
60
|
+
const overseerAgent = overseerStatus?.agentId ?? null;
|
|
54
61
|
const touch = view.layout.compact;
|
|
55
62
|
const c = view.theme.colors;
|
|
56
63
|
const activeAgent = view.active.agent?.id ?? null;
|
|
57
64
|
const activeWorkspace = view.active.workspace?.id ?? null;
|
|
58
65
|
const selectedKey = useMemo(() => {
|
|
66
|
+
if (overseer && activeAgent && activeAgent === overseerAgent) return OVERSEER_KEY;
|
|
59
67
|
const all = [...full.byKey.values()];
|
|
60
68
|
return all.find(s => activeAgent && s.agentId === activeAgent)?.key ?? all.find(s => activeWorkspace && s.workspaceId === activeWorkspace)?.key ?? null;
|
|
61
|
-
}, [full, activeAgent, activeWorkspace]);
|
|
69
|
+
}, [full, activeAgent, activeWorkspace, overseer, overseerAgent]);
|
|
62
70
|
const onSelect = useCallback((key: string) => {
|
|
71
|
+
if (key === OVERSEER_KEY) {
|
|
72
|
+
// A live Overseer opens its chat like any row; Start and a failed restart need Home's Overseer pane.
|
|
73
|
+
const ref = overseerAgent ? agentRef.get(overseerAgent) : undefined;
|
|
74
|
+
if (overseer && overseerRowTarget(overseer.state) === "chat" && ref) view.navigation.openAgent(ref); else openOverseerHome();
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
63
77
|
const s = full.byKey.get(key);
|
|
64
78
|
const agent = s?.agentId ? agentRef.get(s.agentId) : undefined;
|
|
65
79
|
const workspace = s?.workspaceId ? workspaceRef.get(s.workspaceId) : undefined;
|
|
66
80
|
if (agent) view.navigation.openAgent(agent); else if (workspace) view.navigation.openWorkspace(workspace);
|
|
67
|
-
}, [full, agentRef, workspaceRef, view.navigation]);
|
|
81
|
+
}, [full, agentRef, workspaceRef, view.navigation, overseer, overseerAgent]);
|
|
68
82
|
// The row menu, as on Home (rename among it). No omnibox here, so no Ask; Open and Answer go to the chat.
|
|
69
83
|
const openKey = (s: Workstream) => onSelect(s.key);
|
|
70
84
|
const menu = useRowMenu({ sources, openFull: openKey, openQuestion: openKey, overseerOn: false });
|
|
71
85
|
if (!sources.inbox.enabled()) return <View style={{ padding: 12 }}><Text style={{ color: c.foregroundMuted, fontSize: 12 }}>The Needs-you inbox is off. Turn it on in Follow-up's display settings.</Text></View>;
|
|
72
86
|
return <View style={{ flex: 1 }}>
|
|
73
|
-
<HomeList model={model} hits={filter.hits} theme={view.theme} dense touch={touch} selectedKey={selectedKey} onSelect={onSelect} menu={menu}
|
|
87
|
+
<HomeList model={model} hits={filter.hits} theme={view.theme} dense touch={touch} selectedKey={selectedKey} onSelect={onSelect} menu={menu} overseer={overseer} stackOverseer
|
|
74
88
|
// One row, nothing else (invariant 8): the filter takes the width, the sort is an icon. zIndex keeps the
|
|
75
89
|
// sort menu above the list on web, where every View is its own stacking context.
|
|
76
90
|
top={<View style={{ zIndex: 10, flexDirection: "row", alignItems: "center", gap: touch ? 8 : 4, paddingHorizontal: touch ? 12 : 8, paddingVertical: touch ? 8 : 6, borderBottomWidth: 1, borderBottomColor: c.border }}>
|
package/index.client.tsx
CHANGED
|
@@ -18,6 +18,7 @@ import { createInboxStore } from "./client/inbox-store";
|
|
|
18
18
|
import { contributeInboxCommands } from "./client/inbox";
|
|
19
19
|
import type { BriefDeps } from "./client/brief";
|
|
20
20
|
import { inboxSidebarView, sidebarViewHost } from "./client/sidebar-view";
|
|
21
|
+
import { OVERSEER_KEY } from "./client/home-list";
|
|
21
22
|
import { contributeBrief } from "./client/brief";
|
|
22
23
|
import { clientTimeZoneRpc, setOnboardingRpc } from "./shared/contracts";
|
|
23
24
|
import { isCategory, writeCategory } from "./shared/settings-nav";
|
|
@@ -104,7 +105,7 @@ export default function contribute(host: PluginClientContext) {
|
|
|
104
105
|
// Without a link yet, open the panel, where the spec link can be added.
|
|
105
106
|
if (url) void openExternalUrl(url).catch(() => undefined); else openPanel(PANEL, { location: location() });
|
|
106
107
|
} }),
|
|
107
|
-
client.addCommandCenterItem({ id: "follow-up-rename", title: "Follow-up: Rename
|
|
108
|
+
client.addCommandCenterItem({ id: "follow-up-rename", title: "Follow-up: Rename title with AI", icon: "Sparkles", keywords: ["rename", "name", "title", "AI", "suggest"], context: "workspace", onSelect({ workspace, openPanel }) {
|
|
108
109
|
// The dialog lives in Follow-up's surfaces: open the panel, which mounts a host, then ask.
|
|
109
110
|
openPanel(PANEL, { location: location() }); setTimeout(() => openRename({ workspaceId: workspace.id }), 0); } }),
|
|
110
111
|
client.addCommandCenterItem({ id: "follow-up-overview", title: "Follow-up: Home", icon: "House", keywords: ["home", "workspaces", "needs you", "inbox", "attention", "brief", "overview"], context: "global", onSelect({ openScreen }) { openScreen({ screenId: OVERVIEW }); } }),
|
|
@@ -139,7 +140,7 @@ export default function contribute(host: PluginClientContext) {
|
|
|
139
140
|
removers.push(extras.subscribe(syncAsk), () => removeAsk?.());
|
|
140
141
|
// Phase 2: only on hosts with the sidebar-view API (Paseo main after 2026-11-07).
|
|
141
142
|
const views = sidebarViewHost(host);
|
|
142
|
-
if (views) removers.push(views.addSidebarView({ id: "needs-you", title: "Follow-up: Needs you", description: "Agents that need you until you sign them off, then your workspaces.", Component: inboxSidebarView(sources) }));
|
|
143
|
+
if (views) removers.push(views.addSidebarView({ id: "needs-you", title: "Follow-up: Needs you", description: "Agents that need you until you sign them off, then your workspaces.", Component: inboxSidebarView(sources, () => client.openScreen({ screenId: OVERVIEW, params: { item: OVERSEER_KEY, at: String(Date.now()) } })) }));
|
|
143
144
|
|
|
144
145
|
return async () => {
|
|
145
146
|
setReportFallback(null); setReportError(null);
|
package/index.server.ts
CHANGED
|
@@ -1061,7 +1061,7 @@ export default function contribute(server: PluginServerContext) {
|
|
|
1061
1061
|
firstMessage: async agentId => { await historyCache.load(); return historyCache.get(agentId)?.history.goal ?? null; }, roomForBackground: async () => governor.allowsBackground(), roomOnDemand: async () => governor.allowsExtras(),
|
|
1062
1062
|
});
|
|
1063
1063
|
handle(rpc.workspaceAboutRpc, async ({ workspaceId, open, refresh }, { paseo }) => { await requireReady(); seen(paseo); return about.view(workspaceId, { open, refresh }); });
|
|
1064
|
-
// Rename with AI (server/rename.ts): stored data only, Summaries' model, Paseo's own workspace title.
|
|
1064
|
+
// Rename title with AI (server/rename.ts): stored data only, Summaries' model, Paseo's own workspace title.
|
|
1065
1065
|
const renamer = new RenameService({
|
|
1066
1066
|
store: new RenameStore(directory), jobs: aiJobs, role: () => agentSettings.role("about"),
|
|
1067
1067
|
titles: renameDaemon(withDaemon as never, () => gateway.directory.markDirty()),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paseo-follow-up",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.0
|
|
4
|
+
"version": "2.1.0-beta.0",
|
|
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/agent-actions.ts
CHANGED
|
@@ -436,7 +436,7 @@ export class AgentActions {
|
|
|
436
436
|
|
|
437
437
|
/** Later and Bring back now on a workspace-only Needs-you row, planned like snooze. Same mutator as the row menu. */
|
|
438
438
|
/**
|
|
439
|
-
* Rename with AI (server/rename.ts): the dry run asks for a suggestion (or takes `title`, or plans Undo) and shows the
|
|
439
|
+
* Rename title with AI (server/rename.ts): the dry run asks for a suggestion (or takes `title`, or plans Undo) and shows the
|
|
440
440
|
* name now and the name after; confirm runs the dialog's Rename with that exact name.
|
|
441
441
|
*/
|
|
442
442
|
private async planRename(caller: string, args: { workspaceId?: string; title?: string; undo?: boolean }) {
|
package/server/mcp-source.ts
CHANGED
|
@@ -57,7 +57,7 @@ export const mcpSource: string = [
|
|
|
57
57
|
" [\"track\", \"Follow a workspace again after the developer opted it out in Settings. Follow-up follows every workspace by default. Only when the developer asked.\", \"follow.agent-act\", { workspace: string }, [\"workspace\"]],",
|
|
58
58
|
" [\"workspace_about\", \"Read a workspace's Summary: one sentence on what the workspace is for (a reminder, not a status), plus the Linear issues, PRs, Slack threads and docs found in its own text. Read-only unless refresh=true, which writes a new sentence like the panel's Rewrite; otherwise it writes one only when none is cached (up to ~90 s). workspaceId is a workspace id or exact title from list_prs.\", \"follow.agent-act\", { workspaceId: string, refresh: boolean }, [\"workspaceId\"]],",
|
|
59
59
|
" [\"link_items\", \"Read any workspace's linked items: Linear issues, Slack threads, docs, artifacts (the spec among them) and GitHub issues, each with its origin (registered, manual, spec, published, extracted), plus what was removed. workspaceId is a workspace id from list_prs.\" + read, \"follow.agent-act\", { workspaceId: string }, [\"workspaceId\"]],",
|
|
60
|
-
" [\"ai_rename\", \"Rename a workspace with a short AI-suggested name, like Rename with AI. title skips the model; undo=true restores the name before the last rename (24 h).\" + ask, \"follow.agent-act\", { workspaceId: string, title: string, undo: boolean, ...planned }, [\"workspaceId\"]],",
|
|
60
|
+
" [\"ai_rename\", \"Rename a workspace with a short AI-suggested name, like Rename title with AI. title skips the model; undo=true restores the name before the last rename (24 h).\" + ask, \"follow.agent-act\", { workspaceId: string, title: string, undo: boolean, ...planned }, [\"workspaceId\"]],",
|
|
61
61
|
" [\"set_linked_items\", \"Change a workspace's linked items for the developer, like the Linked items list: action add (ref: URL or Linear key), remove (ref) or undo (ref, a removal).\" + ask, \"follow.agent-act\", { workspaceId: string, action: { type: \"string\", enum: [\"add\", \"remove\", \"undo\"] }, ref: string, title: string, ...planned }, []],",
|
|
62
62
|
" [\"agent_settings\", \"Read which agent each of Follow-up's special roles uses (Summaries, Overseer, Recovery, AI priority): provider, model, effort, mode and limits, and whether Wait for background jobs is on. Read-only; the developer changes them in Follow-up settings → Agents.\", \"follow.agent-act\", {}, []],",
|
|
63
63
|
" [\"inbox_list\", \"Read the developer's Needs-you inbox: each root agent, whether it is flagged and why, snoozes and finish flags. Your own row has self=true; prs lists the PRs a row is about, each with the url its row opens.\", \"follow.agent-act\", { flagged_only: boolean }, []],",
|
package/server/mcp.mjs
CHANGED
|
@@ -55,7 +55,7 @@ const actionTools = [
|
|
|
55
55
|
["track", "Follow a workspace again after the developer opted it out in Settings. Follow-up follows every workspace by default. Only when the developer asked.", "follow.agent-act", { workspace: string }, ["workspace"]],
|
|
56
56
|
["workspace_about", "Read a workspace's Summary: one sentence on what the workspace is for (a reminder, not a status), plus the Linear issues, PRs, Slack threads and docs found in its own text. Read-only unless refresh=true, which writes a new sentence like the panel's Rewrite; otherwise it writes one only when none is cached (up to ~90 s). workspaceId is a workspace id or exact title from list_prs.", "follow.agent-act", { workspaceId: string, refresh: boolean }, ["workspaceId"]],
|
|
57
57
|
["link_items", "Read any workspace's linked items: Linear issues, Slack threads, docs, artifacts (the spec among them) and GitHub issues, each with its origin (registered, manual, spec, published, extracted), plus what was removed. workspaceId is a workspace id from list_prs." + read, "follow.agent-act", { workspaceId: string }, ["workspaceId"]],
|
|
58
|
-
["ai_rename", "Rename a workspace with a short AI-suggested name, like Rename with AI. title skips the model; undo=true restores the name before the last rename (24 h)." + ask, "follow.agent-act", { workspaceId: string, title: string, undo: boolean, ...planned }, ["workspaceId"]],
|
|
58
|
+
["ai_rename", "Rename a workspace with a short AI-suggested name, like Rename title with AI. title skips the model; undo=true restores the name before the last rename (24 h)." + ask, "follow.agent-act", { workspaceId: string, title: string, undo: boolean, ...planned }, ["workspaceId"]],
|
|
59
59
|
["set_linked_items", "Change a workspace's linked items for the developer, like the Linked items list: action add (ref: URL or Linear key), remove (ref) or undo (ref, a removal)." + ask, "follow.agent-act", { workspaceId: string, action: { type: "string", enum: ["add", "remove", "undo"] }, ref: string, title: string, ...planned }, []],
|
|
60
60
|
["agent_settings", "Read which agent each of Follow-up's special roles uses (Summaries, Overseer, Recovery, AI priority): provider, model, effort, mode and limits, and whether Wait for background jobs is on. Read-only; the developer changes them in Follow-up settings → Agents.", "follow.agent-act", {}, []],
|
|
61
61
|
["inbox_list", "Read the developer's Needs-you inbox: each root agent, whether it is flagged and why, snoozes and finish flags. Your own row has self=true; prs lists the PRs a row is about, each with the url its row opens.", "follow.agent-act", { flagged_only: boolean }, []],
|
package/server/rename.ts
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import type { AiJobs, JobResult } from "./ai-jobs";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Rename with AI (docs/ai-roles.md#rename-with-ai). The suggestion is one small job on Summaries' model, built from
|
|
14
|
+
* Rename title with AI (docs/ai-roles.md#rename-title-with-ai). The suggestion is one small job on Summaries' model, built from
|
|
15
15
|
* stored data only (state, the Summary record, linked items, the cached directory's agent titles), so it never reads
|
|
16
16
|
* a chat or loads an agent. The rename itself is Paseo's own workspace title, and every rename is kept in
|
|
17
17
|
* `rename.json` for 24 hours so it can be undone.
|
|
@@ -24,18 +24,32 @@ export type WorkspaceTitles = {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* The daemon side of WorkspaceTitles:
|
|
27
|
+
* The daemon side of WorkspaceTitles: workspace list reads paged until the exact id is found, and set_workspace_title. Nothing else is
|
|
28
28
|
* reachable from here: no agent fetch, no timeline (rename-never-wakes-an-agent, tests/rename.test.ts).
|
|
29
29
|
*/
|
|
30
|
+
type WorkspaceTitleRow = { id: string; name: string; title?: string | null };
|
|
30
31
|
type TitleDaemon = {
|
|
31
|
-
|
|
32
|
+
supportsBackgroundWorkspaces?(): boolean;
|
|
33
|
+
findWorkspace?(workspaceId: string): Promise<WorkspaceTitleRow | null>;
|
|
34
|
+
fetchWorkspaces(options?: unknown): Promise<{ entries: WorkspaceTitleRow[]; pageInfo: { hasMore: boolean; nextCursor: string | null } }>;
|
|
32
35
|
setWorkspaceTitle(workspaceId: string, title: string | null): Promise<unknown>;
|
|
33
36
|
};
|
|
34
37
|
export function renameDaemon(connect: <T>(work: (client: TitleDaemon) => Promise<T>) => Promise<T>, onChange?: () => void): WorkspaceTitles {
|
|
35
38
|
return {
|
|
36
39
|
get: id => connect(async client => {
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
// idPrefix is accepted on the wire but ignored by the server. Never treat a list as an id lookup.
|
|
41
|
+
let row: WorkspaceTitleRow | null = null;
|
|
42
|
+
if (typeof client.findWorkspace === "function") row = await client.findWorkspace(id);
|
|
43
|
+
else {
|
|
44
|
+
const filter = client.supportsBackgroundWorkspaces?.() === true ? { includeBackground: true } : {};
|
|
45
|
+
let cursor: string | undefined;
|
|
46
|
+
do {
|
|
47
|
+
const page = await client.fetchWorkspaces({ filter, page: { limit: 200, ...(cursor ? { cursor } : {}) } });
|
|
48
|
+
row = page.entries.find(e => e.id === id) ?? null;
|
|
49
|
+
if (row) break;
|
|
50
|
+
cursor = page.pageInfo.nextCursor ?? undefined;
|
|
51
|
+
} while (cursor);
|
|
52
|
+
}
|
|
39
53
|
return row ? { title: typeof row.title === "string" && row.title.trim() ? row.title : null, name: row.name } : null;
|
|
40
54
|
}),
|
|
41
55
|
set: async (id, title) => { await connect(client => client.setWorkspaceTitle(id, title)); onChange?.(); },
|
|
@@ -89,7 +103,7 @@ export class RenameService {
|
|
|
89
103
|
// One retry with the reason; never a bigger model or more effort.
|
|
90
104
|
for (let attempt = 0; attempt < 2; attempt++) {
|
|
91
105
|
const allowed = await this.d.store.mutate(file => { const b = dailyBudget(file.daily, this.now(), RENAME_DAILY_CAP); if (b.allowed) file.daily = b.next; return b.allowed; });
|
|
92
|
-
if (!allowed) throw new Error(`Rename with AI has made its ${RENAME_DAILY_CAP} suggestions for today. Type a name instead.`);
|
|
106
|
+
if (!allowed) throw new Error(`Rename title with AI has made its ${RENAME_DAILY_CAP} suggestions for today. Type a name instead.`);
|
|
93
107
|
const r: JobResult<{ name: string }> = await this.d.jobs.run({ name: "rename", prompt: renamePrompt(inputs, rejected), schema: renameReplySchema, system: RENAME_SYSTEM,
|
|
94
108
|
provider: role.provider, model: role.model ?? undefined, thinking: role.thinking, timeoutMs: 45_000, maxPromptChars: 8000, maxOutputChars: 600 });
|
|
95
109
|
if (!r.ok) { if (r.reason === "invalid-json" || r.reason === "invalid-shape") { rejected = { name: "", reason: "It wasn't the JSON object asked for." }; continue; } throw new Error(`Couldn't suggest a name: ${r.error}`); }
|
package/shared/contracts.ts
CHANGED
|
@@ -92,7 +92,7 @@ export const prioritiesRpc = defineRpc({ name: "follow.priorities", input: z.obj
|
|
|
92
92
|
/** Provider session limits from the Smart Session plugin, for Home's meters. Hidden when it isn't installed. */
|
|
93
93
|
/** Summary: collapsed reads the cache; open may start an overview; refresh always does. */
|
|
94
94
|
export const workspaceAboutRpc = defineRpc({ name: "follow.workspace-about", input: z.object({ workspaceId: idSchema, open: z.boolean().optional(), refresh: z.boolean().optional() }), output: aboutViewSchema });
|
|
95
|
-
// Rename with AI (shared/rename.ts): the dialog's state and one suggestion, and the rename or its Undo.
|
|
95
|
+
// Rename title with AI (shared/rename.ts): the dialog's state and one suggestion, and the rename or its Undo.
|
|
96
96
|
export const renameStatusRpc = defineRpc({ name: "follow.rename-status", input: z.object({ workspaceId: idSchema, suggest: z.boolean().optional() }), output: renameStatusSchema });
|
|
97
97
|
export const renameWorkspaceRpc = defineRpc({ name: "follow.rename-workspace", input: z.object({ workspaceId: idSchema, title: z.string().max(300).optional(), undo: z.boolean().optional() }), output: renameResultSchema });
|
|
98
98
|
export const usageRpc = defineRpc({ name: "follow.usage", input: z.object({}), output: usageSchema });
|
package/shared/overseer.ts
CHANGED
|
@@ -310,3 +310,35 @@ export function overseerRowState(status: { enabled: boolean; agentId: string | n
|
|
|
310
310
|
if (row?.brief?.state === "open" && row.brief.kind === "decision" && row.needs && !row.snooze) return { state: "asks", line: `Asks you · ${row.brief.ask}` };
|
|
311
311
|
return { state: "idle", line: "Ask about any workspace or agent" };
|
|
312
312
|
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* The pinned Overseer row on a surface with a list filter (Paseo's sidebar view; invariant one-row-everywhere): the
|
|
316
|
+
* same row Home pins, from overseerRowState. While "Filter workspaces" holds a query, the row stays only when the
|
|
317
|
+
* query is about it ("over", "asks", words of its line), the way Home's search keeps the Overseer reachable through
|
|
318
|
+
* its Ask row; anything else hides it, so a filtered list shows only what matches.
|
|
319
|
+
*/
|
|
320
|
+
export function listOverseerRow(status: Parameters<typeof overseerRowState>[0], row: Parameters<typeof overseerRowState>[1], query: string): (NonNullable<ReturnType<typeof overseerRowState>> & { ranges?: [number, number][] }) | null {
|
|
321
|
+
const o = overseerRowState(status, row);
|
|
322
|
+
if (!o || !overseerMatches(o, query)) return null;
|
|
323
|
+
const ranges = overseerLineRanges(o.line, query);
|
|
324
|
+
return ranges.length ? { ...o, ranges } : o;
|
|
325
|
+
}
|
|
326
|
+
/** Where the query sits in the row's line, for the filter's highlight (the same marks rows get). */
|
|
327
|
+
export function overseerLineRanges(line: string, query: string): [number, number][] {
|
|
328
|
+
const q = query.trim().toLowerCase();
|
|
329
|
+
if (!q) return [];
|
|
330
|
+
const out: [number, number][] = [];
|
|
331
|
+
const text = line.toLowerCase();
|
|
332
|
+
for (let i = text.indexOf(q); i >= 0; i = text.indexOf(q, i + q.length)) out.push([i, i + q.length]);
|
|
333
|
+
return out;
|
|
334
|
+
}
|
|
335
|
+
/** An empty query, or one found in "Overseer" plus the row's line. */
|
|
336
|
+
export function overseerMatches(o: { line: string }, query: string): boolean {
|
|
337
|
+
const q = query.trim().toLowerCase();
|
|
338
|
+
return !q || `overseer ${o.line}`.toLowerCase().includes(q);
|
|
339
|
+
}
|
|
340
|
+
/** What selecting the pinned row does where the list opens chats: a live Overseer opens its chat; Start and a
|
|
341
|
+
* failed restart open Home's Overseer pane, where those controls live. */
|
|
342
|
+
export function overseerRowTarget(state: NonNullable<ReturnType<typeof overseerRowState>>["state"]): "chat" | "home" {
|
|
343
|
+
return state === "start" || state === "error" ? "home" : "chat";
|
|
344
|
+
}
|
package/shared/rename.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Rename with AI (docs/ai-roles.md#rename-with-ai): a short workspace name from what Follow-up already stored.
|
|
4
|
+
* Rename title with AI (docs/ai-roles.md#rename-title-with-ai): a short workspace name from what Follow-up already stored.
|
|
5
5
|
* Pure: the name rules, the prompt and the ledger's Undo rules, shared by the worker, the dialog and the tests.
|
|
6
6
|
*/
|
|
7
7
|
|
package/shared/row-menu.ts
CHANGED
|
@@ -136,7 +136,7 @@ export function rowMenu(input: RowMenuInput): RowMenuSection[] {
|
|
|
136
136
|
add("tidy", [
|
|
137
137
|
!!branch && { key: "copy_branch", action: "copy_branch", label: "Copy branch name", icon: "GitBranch", arg: branch },
|
|
138
138
|
links.length > 0 && { key: "copy_pr", action: "copy_pr", label: links.length === 1 ? "Copy PR link" : `Copy ${links.length} PR links`, icon: "Link", arg: links.join("\n") },
|
|
139
|
-
!!s.workspaceId && { key: "rename_ai", action: "rename_ai", label: "Rename with AI…", icon: "Sparkles" },
|
|
139
|
+
!!s.workspaceId && { key: "rename_ai", action: "rename_ai", label: "Rename title with AI…", icon: "Sparkles" },
|
|
140
140
|
!!w && { key: "rewrite_summary", action: "rewrite_summary", label: "Rewrite summary", icon: "RefreshCw" },
|
|
141
141
|
multiRootOther && { key: "make_main", action: "make_main", label: `Make ${s.agent} the main agent…`, icon: "Crown", arg: s.agentId!,
|
|
142
142
|
confirm: `Make ${s.agent} the main agent of ${s.title}? It takes over the goal, tasks, questions and Done.` },
|