paseo-follow-up 1.4.0-beta.2 → 1.4.0-beta.4

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/OVERVIEW.md CHANGED
@@ -5,7 +5,7 @@ Follow-up watches every pull request a Paseo workspace opens until the work is a
5
5
  ## What you see
6
6
 
7
7
  - Home: every workspace grouped by what it needs from you (Needs you, Follow-up is fixing, Running, Waiting on others, Quiet), with the selected one beside the list so you can allow a permission, answer, merge, reply or sign off in place, and a brief with what Follow-up did while you were away. Above the list: the status counts, provider limits from Smart Session when it's installed, a search over names, branches, PRs, agents and asks, and a sort menu (Priority, Recent, Oldest waiting, Name, By project).
8
- - The Overseer (1.4 beta), pinned on Home: one agent you talk to about all your workspaces. It forwards your asks to the agent that owns them, asks you when it isn't sure, and starts a new workspace only when you say so.
8
+ - The Overseer (1.4 beta), pinned on Home: one agent you talk to about all your workspaces. It forwards your asks to the agent that owns them, asks you when it isn't sure, and starts a new workspace only when you say so. You can ask it from Home's search box (the last row, "Ask the Overseer: …") or with ⌘K → Follow-up: Ask the Overseer.
9
9
  - What's this about?, a collapsible section at the top of Home's detail pane and the workspace panel: a one-line gist, a short AI overview of what the workspace is for and where it stands, and its linked Linear issues, PRs, Slack threads and docs.
10
10
  - A workspace panel for the open workspace only, with a Home button: PRs merged, what needs you, what needs fixing, a bar with one segment per PR, and what the agent is doing now. "Open full" on Home docks it beside the agent's chat.
11
11
  - A Needs you card with one button per decision: Send repairs, Merge, Resume, Retry, or Answer.
@@ -40,4 +40,6 @@ The Needs-you inbox (beta) keeps one flag per root agent in `plugin-data/follow-
40
40
  The brief (beta) is stored on the agent's inbox entry and appended to its timeline as a Follow-up row; re-appending replaces that row, and the restart check ignores the `updatedAt` change the append causes because it never reads `updatedAt`. To build a brief Follow-up reads only what it already has: the agent's `needs_you` call, the permission request's title, the failed turn's error message, Session Guard's note and reset time for a paused agent, and its own PR state. It does not read or quote the agent's reply. While the inbox is on, every root Paseo agent on Claude Code or Codex gets Follow-up's MCP bridge with the `needs_you` tool only (tracked main agents keep their full set), and `plugin-data/follow-through/brief.json` records whether the inbox and the nudge are on and which agents have a permission prompt showing. Clicking an option or Retry sends one message as you; it is logged in the delivery ledger as yours, so it clears the flag. The Stop hook, part of the same reversible provider hooks Follow-up already installs, now also runs for those root Claude Code sessions: if the turn ended without `needs_you`, it blocks the stop once with a one-line request to call it, records that it did in `hook-state`, and never blocks the same turn again. It reads `brief.json`, its own per-turn marker and the time of the agent's last `needs_you` call, and nothing else. Turn it off with *Ask agents to state what they need*; turning the inbox off stops it too.
41
41
 
42
42
  The Overseer (beta) is one Claude agent in a Follow-up workspace under `plugin-data/follow-through/overseer-home`, labelled `follow-up.overseer=1` and created only when you click Start. Its id is kept in `plugin-data/follow-through/overseer.json`. Discovery, tracking, auto-send and Needs you skip its workspace. At the start of each of its turns, the provider hook adds a digest from `plugin-data/follow-through/overseer-digest.json` and records what it showed in `hook-state/overseer-seen-<agent>.json`. The worker builds that file from Paseo's workspace list (metadata only, at most once a minute) and Follow-up's own state. It rewrites the file only when the content changes, and skips it while the resource governor pauses background work. Its tools are `workstreams`, `agent_digest`, `route_candidates`, `send_to_agent` and `start_workspace`. For an agent that isn't loaded, `agent_digest` reads the provider's transcript on disk, read-only (Claude Code's `projects/<cwd>/<session>.jsonl`, Codex's `sessions/**/rollout-*-<thread>.jsonl`; only the last 512 KB, and never the credentials in Paseo's agent record). Without a transcript it uses Follow-up's goal and PR titles. It never reads that agent's timeline. `send_to_agent` writes your words to the delivery ledger first: as yours only when they answer that agent's open ask, otherwise as Follow-up's. It wakes a resting agent only because you asked for it. `start_workspace` runs only after your approval, through a dry run and confirm. The Overseer can't merge, archive or post anywhere.
43
- "What's this about?" keeps its overviews in `plugin-data/follow-through/about.json` (gist, overview, linked rows, when and from what; never raw history) and logs each model call's duration and cost to `ai-jobs.jsonl`. To write one it reads the root agent's latest steps from its live timeline only when Paseo already has the agent loaded; otherwise it reads the first and last part of the agent's provider transcript on disk (Claude Code's `~/.claude/projects`, Codex's `~/.codex/sessions`), read-only, and never wakes the agent. It reads subagent titles from Paseo's agent list, PR titles and bodies with `gh pr view`, and only the Linear issues and Slack threads the workspace itself links, through `mcpproxy call tool-read` (`linear:get_issue`, `slack-user:slack_read_thread`); there are no searches. The model is a headless `claude -p` (Haiku) with no tools, no MCP servers, no settings and no saved session, one turn, a 90-second timeout, one call at a time. Overviews are written ahead of time only for non-dormant workspaces in Needs you, at most 60 a day, and not while a Claude account is above 85% of a limit or the resource governor has paused background work; above its higher threshold, opening the section shows the cached overview and writes none.
43
+ "What's this about?" keeps its overviews in `plugin-data/follow-through/about.json` (gist, overview, linked rows, when and from what; never raw history) and logs each model call's duration and cost to `ai-jobs.jsonl`. To write one it reads the root agent's latest steps from its live timeline only when Paseo already has the agent loaded; otherwise it reads the first and last part of the agent's provider transcript on disk (Claude Code's `~/.claude/projects`, Codex's `~/.codex/sessions`), read-only, and never wakes the agent. It reads subagent titles from Paseo's agent list, PR titles and bodies with `gh pr view`, and only the Linear issues and Slack threads the workspace itself links, through `mcpproxy call tool-read` (`linear:get_issue`, `slack-user:slack_read_thread`); there are no searches. The model is set under Settings → Agents (default Haiku). With Claude it runs as a headless `claude -p` with no tools, no MCP servers, no settings and no saved session. With Codex it runs as `codex exec --ephemeral` with no user config or rules, no shell tool and a read-only sandbox in an empty temporary folder. Either way it gets one turn, a 90-second timeout, and runs one call at a time; on timeout the whole process group is killed. Overviews are written ahead of time only for non-dormant workspaces in Needs you, at most 60 a day by default (Settings → Agents), and not while a Claude account is above 85% of a limit or the resource governor has paused background work; above its higher threshold, opening the section shows the cached overview and writes none.
44
+
45
+ Settings → Agents (`plugin-data/follow-through/agents.json`, its own file) chooses the provider, model, effort and mode for What's this about?, the Overseer, recovery agents and the priority ranker. Missing or invalid entries use the defaults. The provider and model list comes from Paseo's provider snapshot. It is read only when that settings screen opens, and cached for ten minutes. A changed Overseer setting is never applied mid-conversation: Home offers a restart, and the new Overseer is handed the old one's last steps (read from its transcript on disk when it isn't loaded). The old agent is left as it is. A recovery agent on a different provider than the main agent keeps the main agent's system prompt, MCP servers and tool policy, and drops its provider-specific model, mode and options. `FOLLOW_UP_OVERSEER_PROVIDER` ("provider/model") overrides the Overseer's setting; it exists only for isolated test daemons.
package/README.md CHANGED
@@ -139,6 +139,8 @@ An overview is written when you open the section and none exists, or when the in
139
139
 
140
140
  One agent you talk to about all your workspaces. It sits pinned at the top of Home's list, under the morning brief. Click **Start the Overseer** once, and Follow-up creates it in its own workspace, which is never tracked, never shown under Needs you, and never sent repairs. Its row shows whether it is idle, working, or asking you something. Selecting it opens the conversation in the right pane with a reply box, and **Open full** opens its chat.
141
141
 
142
+ **Ask from anywhere.** Type in Home's search box and the last row is always **Ask the Overseer: <what you typed>**. Arrow down to it and press Enter (or tap it), and it goes to the Overseer as you wrote it. The search clears and its conversation opens. If no workspace matches, it is the only row, so Enter sends it straight away; a single word that matches nothing waits for ↓ or a tap, so a typo never reaches an agent. The first ask starts the Overseer, so you don't have to click Start first. While the Overseer is on, ⌘K → **Follow-up: Ask the Overseer** opens it from any screen with the reply box focused. Both work on the phone too.
143
+
142
144
  - **It routes your asks; it doesn't do the work.** "Tell the HER-1312 agent to use option A" goes to the agent that owns HER-1312, and the Overseer answers in one line: "Sent to Okta SCIM sync (key HER-1312)". It scores candidates by Linear key, PR number, branch, workspace name, open asks and recent activity. When no candidate stands out, it asks you with a decision (the top two or three plus **New workspace**) instead of guessing.
143
145
  - **What it forwards keeps your voice.** A forwarded message starts "From Tom via Overseer:". It clears that agent's Needs-you flag only when it answers the agent's open ask. A new task leaves the ask standing.
144
146
  - **New workspaces only on your word.** It starts one, branched off main and named from the task, only after you asked or picked **New workspace**, and only through a dry run and confirm.
@@ -146,14 +148,29 @@ One agent you talk to about all your workspaces. It sits pinned at the top of Ho
146
148
  - **It is cheap to keep.** Each turn begins with a digest of what changed since the last one, built from Paseo's workspace metadata and Follow-up's own state. That's about 800 tokens at 100 workspaces, with resting workspaces in one line. The digest file is rewritten only when its content changes, and not at all while the resource governor pauses background work. The Overseer never reads the timeline of an agent that isn't loaded, because that would load the agent for an hour. Instead it reads the agent's transcript from disk, or Follow-up's cached goal and PRs. Sending to a resting agent wakes it, so that happens only when you ask for it, and the reply says "woke …".
147
149
  - **Archived it by accident?** Follow-up starts a new one with a handoff from the old one's last steps.
148
150
 
149
- Turn it off under Settings → **Overseer (beta)**.
151
+ Turn it off under Settings → **Overseer (beta)**. While it's off, search has no ask row.
152
+
153
+ ![Home's search with "scim" typed: the matching workspace, then the active row "Ask the Overseer: scim" with an Enter hint](docs/media/overseer/omnibox-ask-dark.png)
154
+
155
+ ### Choosing models
156
+
157
+ Settings → **Agents** has one card for each agent Follow-up runs for you. Each card says what the agent does and what it uses now ("Claude · Haiku"). It lets you pick the provider, model, effort and, for full agents, the permission mode, and each card has **Reset to default**. The list comes from the providers and models Paseo knows about, read when you open the screen. Providers that aren't installed or are turned off are listed with the reason.
158
+
159
+ | Agent | Default | Notes |
160
+ |---|---|---|
161
+ | What's this about? | Claude · Haiku | One small call per overview, no tools. Claude (`claude -p`) or Codex (`codex exec`). Also sets how many overviews are written ahead per day (60). |
162
+ | Overseer | Claude · newest Opus, Bypass | A change applies when you restart it. Its pane on Home offers **Restart with …**, and the new Overseer gets the old one's last steps. |
163
+ | Recovery | Same as main agent | Or pick a provider and model. Switching provider keeps the main agent's tools and instructions. |
164
+ | Priority ranker | Claude · Sonnet, hourly, up to 24 a day | One call per run, no tools. Claude or Codex. |
165
+
166
+ The choices live in `agents.json` in Follow-up's data folder. Anything missing or invalid there falls back to the default. Agents can read the choices with the read-only `agent_settings` tool. The About footer names the model that wrote each overview ("Summarized by Haiku · 2h ago").
150
167
 
151
168
  ![Home with the Overseer selected: the pinned row asks which agent should take a broken export, and the pane shows the conversation, the routed task and the decision with two candidates plus New workspace](docs/media/overseer/overseer-dark.png)
152
169
 
153
170
  Install the beta:
154
171
 
155
172
  ```sh
156
- paseo plugin update follow-through --version 1.4.0-beta.2
173
+ paseo plugin update follow-through --version 1.4.0-beta.4
157
174
  # or, for a fresh install:
158
175
  paseo plugin install npm:paseo-follow-up@beta
159
176
  ```
@@ -0,0 +1,127 @@
1
+ import { ActivityIndicator, Text, View } from "react-native";
2
+ import type { PluginSurfaceProps } from "@getpaseo/plugin/client";
3
+ import { useRpc } from "@getpaseo/plugin/client";
4
+ import { SettingsAction, SettingsCard, SettingsSection, SettingsSelect, useToast } from "@getpaseo/plugin/client/ui";
5
+ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
6
+ import { agentSettingsRpc, setAgentSettingRpc } from "../shared/contracts";
7
+ import { AGENT_ROLES, JOB_PROVIDERS, ROLE_DEFAULTS, ROLE_INFO, isJobRole, modelName, providerName, type AgentRole, type AgentSettingsView, type CatalogProvider, type SavedRole } from "../shared/agent-settings";
8
+ import { Button, errorText, text, type Theme } from "./kit";
9
+
10
+ const key = ["follow-through", "agent-settings"];
11
+ const SAME = "__same";
12
+ const DEFAULT = "__default";
13
+ /** Each provider's "don't ask" mode, used when a Paseo agent role moves to it. */
14
+ const BYPASS: Record<string, string> = { claude: "bypassPermissions", codex: "full-access" };
15
+
16
+ type Role = AgentSettingsView["roles"][number];
17
+
18
+ /**
19
+ * Settings → Agents: one card per special role. What it does and what it uses now, then provider, model, effort,
20
+ * mode and limits. The provider catalog is read once when this screen opens (cached on the server), never polled.
21
+ */
22
+ export function AgentSettings({ theme, compact }: Pick<PluginSurfaceProps, "theme"> & { compact: boolean }) {
23
+ const c = theme.colors; const t = text(c);
24
+ const read = useRpc(agentSettingsRpc); const write = useRpc(setAgentSettingRpc); const cache = useQueryClient(); const toast = useToast();
25
+ const query = useQuery({ queryKey: key, queryFn: () => read({ catalog: true }), staleTime: 5 * 60_000,
26
+ // Only while Paseo is still discovering providers (right after it starts): ask again until they settle.
27
+ refetchInterval: q => (q.state.data as AgentSettingsView | undefined)?.catalog?.providers.some(p => p.reason === "Still loading") && q.state.dataUpdateCount < 10 ? 5000 : false });
28
+ const change = useMutation({
29
+ mutationFn: (input: { role: AgentRole; entry: SavedRole | null }) => write(input),
30
+ onSuccess: (value, input) => {
31
+ cache.setQueryData(key, value);
32
+ void cache.invalidateQueries({ queryKey: ["follow-through", "about"] });
33
+ const r = value.roles.find(x => x.role === input.role);
34
+ if (r) toast.show(input.role === "overseer" ? `Overseer: ${r.summary}. Restart it from Home to switch.` : `${ROLE_INFO[input.role].title}: ${r.summary}`, { variant: "success" });
35
+ },
36
+ onError: error => toast.error(errorText(error)),
37
+ });
38
+ const data = query.data;
39
+ const info = "Which agent Follow-up uses for each of its own jobs. Defaults: Claude Haiku for overviews, Claude Opus for the Overseer, the main agent's own setup for recovery, Claude Sonnet for priority ranking. What's this about? and the ranker are one-shot jobs, so they run on Claude or Codex only; the Overseer and recovery can use any provider Paseo has. Changes apply from the next call; the Overseer switches when you restart it.";
40
+ return <SettingsSection title="Agents" info={info}>
41
+ {query.isPending && <ActivityIndicator accessibilityLabel="Loading agent settings" color={c.foregroundMuted} style={{ alignSelf: "flex-start", marginVertical: 8 }} />}
42
+ {query.error && <SettingsCard><SettingsAction label="Couldn't load agent settings" hint={errorText(query.error)} actionLabel="Retry" onPress={() => void query.refetch()} /></SettingsCard>}
43
+ {data?.catalog?.error && <SettingsCard><SettingsAction label="Couldn't read Paseo's providers" hint={`${data.catalog.error} The current choices still work; pickers show only what's saved.`} actionLabel="Retry" onPress={() => void read({ catalog: true, fresh: true }).then(v => cache.setQueryData(key, v), e => toast.error(errorText(e)))} /></SettingsCard>}
44
+ {/* Once for the section, not per card: what can't be picked and why. */}
45
+ {!!data?.catalog?.providers.some(p => !p.available) && <Text style={[t.meta, { paddingHorizontal: 4 }]}>{`Not available in Paseo: ${data.catalog.providers.filter(p => !p.available).map(p => `${p.label} (${(p.reason ?? "unavailable").replace(/\.$/, "")})`).join(", ")}.`}</Text>}
46
+ {data && AGENT_ROLES.map(role => {
47
+ const r = data.roles.find(x => x.role === role);
48
+ return r ? <RoleCard key={role} r={r} invalid={data.invalid.includes(role)} catalog={data.catalog?.providers ?? []} busy={change.isPending}
49
+ save={entry => change.mutate({ role, entry })} theme={theme} compact={compact} /> : null;
50
+ })}
51
+ </SettingsSection>;
52
+ }
53
+
54
+ function RoleCard({ r, invalid, catalog, busy, save, theme, compact }: { r: Role; invalid: boolean; catalog: CatalogProvider[]; busy: boolean; save: (entry: SavedRole | null) => void; theme: Theme; compact: boolean }) {
55
+ const c = theme.colors; const t = text(c);
56
+ const role = r.role;
57
+ const jobs = isJobRole(role);
58
+ const usable = catalog.filter(p => p.available && (!jobs || (JOB_PROVIDERS as readonly string[]).includes(p.id)));
59
+ const current = catalog.find(p => p.id === r.provider);
60
+ const base: SavedRole = { provider: r.provider, model: r.model, thinking: r.thinking, ...(jobs ? {} : { mode: r.mode }), ...(role === "recovery" ? { same: r.same } : {}),
61
+ ...(jobs ? { dailyCap: r.dailyCap ?? undefined, maxPromptChars: r.maxPromptChars ?? undefined } : {}), ...(role === "ranker" ? { cadenceMinutes: r.cadenceMinutes ?? undefined } : {}) };
62
+ const set = (patch: SavedRole) => save({ ...base, ...patch });
63
+ const providerLabel = providerName(r.provider, current?.label);
64
+ // Saved on a provider Paseo can't use right now: say so plainly, with what happens and the way out.
65
+ const blocked = !r.same && catalog.length > 0 && !usable.some(p => p.id === r.provider);
66
+ const blockedReason = !current ? "not in Paseo's provider list" : !current.available ? (current.reason ?? "unavailable").replace(/\.$/, "") : "can't run one-shot jobs";
67
+
68
+ const providerOptions = [
69
+ ...(role === "recovery" ? [{ value: SAME, label: "Same as main agent" }] : []),
70
+ ...usable.map(p => ({ value: p.id, label: p.label })),
71
+ ...(!r.same && !usable.some(p => p.id === r.provider) ? [{ value: r.provider, label: `${providerLabel} · unavailable` }] : []),
72
+ ];
73
+ const pickProvider = (value: string) => {
74
+ if (value === SAME) return set({ same: true });
75
+ const p = catalog.find(x => x.id === value);
76
+ const defaults = ROLE_DEFAULTS[role];
77
+ const same = value === defaults.provider;
78
+ set({ same: false, provider: value, model: same ? defaults.model : null, thinking: null, ...(jobs ? {} : { mode: same ? defaults.mode : BYPASS[value] ?? p?.defaultMode ?? null }) });
79
+ };
80
+
81
+ const models = current?.models ?? [];
82
+ const model = r.model ? models.find(m => m.id === r.model) : null;
83
+ const providerDefault = models.find(m => m.isDefault);
84
+ const defaultModel = role === "overseer" && r.provider === "claude" ? "Default (newest Opus)" : providerDefault ? `Default (${providerDefault.label})` : "Default";
85
+ const modelOptions = [{ value: DEFAULT, label: defaultModel }, ...models.map(m => ({ value: m.id, label: m.label })),
86
+ ...(r.model && !model ? [{ value: r.model, label: modelName(r.model) }] : [])];
87
+ const thinking = (model ?? providerDefault)?.thinking ?? [];
88
+ const thinkingDefault = thinking.find(o => o.isDefault);
89
+ const modes = current?.modes ?? [];
90
+ const modeDefault = modes.find(m => m.id === current?.defaultMode);
91
+ const modeLabel = (m: { id: string; label: string }) => BYPASS[r.provider] === m.id ? `${m.label} · no prompts` : m.label;
92
+
93
+ const reset = <Button theme={theme} compact={compact} kind="ghost" icon="RotateCcw" title="Reset to default" accessibilityHint={`Back to ${roleDefaultText(role)}`} disabled={busy || (r.isDefault && !invalid)} onPress={() => save(null)} />;
94
+ return <SettingsCard>
95
+ <View style={{ paddingHorizontal: 16, paddingTop: 14, paddingBottom: 10, gap: 2 }}>
96
+ <View style={{ flexDirection: "row", alignItems: "center", gap: 8 }}>
97
+ <Text accessibilityRole="header" style={[t.title, { flex: 1 }]}>{ROLE_INFO[role].title}</Text>
98
+ {!compact && reset}
99
+ </View>
100
+ <Text style={t.meta}>{ROLE_INFO[role].does}{role === "overseer" ? " A running Overseer keeps its model until you restart it from Home." : ""}</Text>
101
+ {invalid && <Text style={t.meta}>Part of the saved setting wasn't valid, so its default is used.</Text>}
102
+ {blocked && <Text accessibilityRole="alert" style={[t.meta, { color: c.statusWarning }]}>{`${providerLabel} isn't available (${blockedReason}). ${role === "about" ? "Overviews will fail" : role === "ranker" ? "Ranking will fail" : role === "overseer" ? "Starting or restarting the Overseer will fail" : "Recovery agents won't start"} until you pick another provider or reset.`}</Text>}
103
+ </View>
104
+ <SettingsSelect label="Provider" value={r.same ? SAME : r.provider} options={providerOptions} disabled={busy || !catalog.length} onValueChange={pickProvider} />
105
+ {!r.same && <SettingsSelect label="Model" value={r.model ?? DEFAULT} options={modelOptions} disabled={busy || !catalog.length}
106
+ onValueChange={value => set({ model: value === DEFAULT ? null : value, thinking: null })} />}
107
+ {!r.same && (thinking.length > 0 || !!r.thinking) && <SettingsSelect label="Effort" hint={!thinking.length && !blocked && model ? "This model lists no effort levels in Paseo; the saved one is still passed on." : undefined} value={r.thinking ?? DEFAULT}
108
+ options={[{ value: DEFAULT, label: thinkingDefault ? `Default (${thinkingDefault.label})` : "Default" }, ...thinking.map(o => ({ value: o.id, label: o.label })), ...(r.thinking && !thinking.some(o => o.id === r.thinking) ? [{ value: r.thinking, label: r.thinking }] : [])]} disabled={busy}
109
+ onValueChange={value => set({ thinking: value === DEFAULT ? null : value })} />}
110
+ {!jobs && !r.same && modes.length > 0 && <SettingsSelect label="Permissions" hint="It runs unattended, so pick a mode that doesn't prompt." value={r.mode ?? DEFAULT}
111
+ options={[{ value: DEFAULT, label: modeDefault ? `Default (${modeLabel(modeDefault)})` : "Default" }, ...modes.map(m => ({ value: m.id, label: modeLabel(m) }))]} disabled={busy}
112
+ onValueChange={value => set({ mode: value === DEFAULT ? null : value })} />}
113
+ {role === "about" && <SettingsSelect label="Written ahead per day" hint="Overviews written in the background for workspaces in Needs you. Opening a workspace always writes one when needed."
114
+ value={String(r.dailyCap ?? 60)} options={withCurrent([0, 20, 60, 120, 200], r.dailyCap ?? 60).map(n => ({ value: String(n), label: n === 0 ? "None" : String(n) }))} disabled={busy}
115
+ onValueChange={value => set({ dailyCap: Number(value) })} />}
116
+ {role === "ranker" && <SettingsSelect label="Ranks every" value={String(r.cadenceMinutes ?? 60)} disabled={busy}
117
+ options={withCurrent([15, 30, 60, 120, 240], r.cadenceMinutes ?? 60).map(n => ({ value: String(n), label: n < 60 ? `${n} minutes` : n === 60 ? "Hour" : `${n / 60} hours` }))}
118
+ onValueChange={value => set({ cadenceMinutes: Number(value) })} />}
119
+ {role === "ranker" && <SettingsSelect label="At most per day" value={String(r.dailyCap ?? 24)} disabled={busy}
120
+ options={withCurrent([6, 12, 24, 48, 96], r.dailyCap ?? 24).map(n => ({ value: String(n), label: String(n) }))}
121
+ onValueChange={value => set({ dailyCap: Number(value) })} />}
122
+ {compact && <View style={{ flexDirection: "row", paddingHorizontal: 8, paddingVertical: 6 }}>{reset}</View>}
123
+ </SettingsCard>;
124
+ }
125
+
126
+ const roleDefaultText = (role: AgentRole) => role === "recovery" ? "the main agent's setup" : role === "overseer" ? "Claude, newest Opus" : role === "about" ? "Claude Haiku" : "Claude Sonnet, hourly";
127
+ const withCurrent = (list: number[], value: number) => [...new Set([...list, value])].sort((a, b) => a - b);
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore
2
2
  import { Platform, Pressable, Text, TextInput, View } from "react-native";
3
3
  import { Icon } from "@getpaseo/plugin/client/ui";
4
4
  import { GROUP_TITLE, homeCounts, type HomeGroupId, type HomeModel } from "../shared/home";
5
- import { FIELD_LABEL, excerpt, highlightRuns, homeSearchDocs, indexDocs, omniboxResults, workspaceProvider, type OmniboxItem, type OmniboxProvider, type Range } from "../shared/search";
5
+ import { FIELD_LABEL, excerpt, highlightRuns, homeSearchDocs, indexDocs, defaultActive, omniboxResults, overseerProvider, workspaceProvider, type OmniboxItem, type OmniboxProvider, type Range, type WorkspaceItem } from "../shared/search";
6
6
  import { SORT_HINT, SORT_LABEL, SORT_MODES, type SortMode } from "../shared/sort";
7
7
  import { priorityNote, PRIORITY_SOURCE_LABEL } from "../shared/priorities";
8
8
  import { meters, meterText, type Meter } from "../shared/usage";
@@ -11,6 +11,7 @@ import type { HomeSources } from "./home-data";
11
11
  import type { Workstream } from "../shared/home";
12
12
  import { Age, PrChipView } from "./home-list";
13
13
  import { useMinute } from "./home-data";
14
+ import { Spinner } from "./motion";
14
15
  import { withAlpha, type Colors } from "./theme";
15
16
  import type { Theme } from "./kit";
16
17
 
@@ -29,33 +30,40 @@ export type Omnibox = {
29
30
  active: number;
30
31
  move(delta: number): void;
31
32
  inputRef: React.RefObject<TextInput | null>;
33
+ /** The Overseer is on, so a query can also be an ask. */
34
+ askOn: boolean;
32
35
  };
33
36
 
34
37
  /**
35
38
  * The search state for one list. The index is rebuilt only when Home's sources change, never per keystroke.
36
- * `extraProviders` is the seam for the next build's "Ask the Overseer" row, listed after the workspace results.
39
+ * The Overseer's "Ask the Overseer: <query>" row comes last while the Overseer is on; `extraProviders` go between.
37
40
  */
38
41
  export function useOmnibox(model: HomeModel, sources: HomeSources, extraProviders: readonly OmniboxProvider[] = []): Omnibox {
39
42
  const [query, setQueryState] = useState("");
40
- const [active, setActive] = useState(0);
43
+ // null: the default row. -1: none, so Enter does nothing.
44
+ const [active, setActive] = useState<number | null>(null);
41
45
  const inputRef = useRef<TextInput | null>(null);
42
46
  const live = useSyncExternalStore(sources.live.subscribe, sources.live.version, sources.live.version);
43
47
  const paseo = useSyncExternalStore(sources.paseo.subscribe, sources.paseo.version, sources.paseo.version);
44
48
  const extras = useSyncExternalStore(sources.extras.subscribe, sources.extras.version, sources.extras.version);
45
49
  const searching = query.trim().length > 0;
50
+ const overseer = useSyncExternalStore(sources.extras.subscribe, sources.extras.overseer, sources.extras.overseer);
51
+ const askOn = !!overseer?.enabled;
46
52
  // Built lazily: nothing is indexed until the developer types.
47
53
  const index = useMemo(() => searching ? indexDocs(homeSearchDocs({ model, paseo: sources.paseo.all(), tracked: sources.live.all(), archived: sources.live.archived(), agents: sources.extras.agents() })) : null,
48
54
  // eslint-disable-next-line react-hooks/exhaustive-deps
49
55
  [searching, model, live, paseo, extras]);
50
- const providers = useMemo(() => index ? [workspaceProvider(index), ...extraProviders] : [], [index, extraProviders]);
56
+ const providers = useMemo(() => index ? [workspaceProvider(index), ...extraProviders, overseerProvider(askOn)] : [], [index, extraProviders, askOn]);
51
57
  const results = useMemo(() => searching ? omniboxResults(providers, query) : null, [providers, query, searching]);
52
- const setQuery = useCallback((q: string) => { setQueryState(q); setActive(0); }, []);
53
- const move = useCallback((delta: number) => setActive(a => Math.max(0, Math.min((results?.length ?? 1) - 1, a + delta))), [results]);
58
+ const setQuery = useCallback((q: string) => { setQueryState(q); setActive(null); }, []);
59
+ const fallback = defaultActive(results);
60
+ const current = active ?? fallback;
61
+ const move = useCallback((delta: number) => setActive(a => Math.max(0, Math.min((results?.length ?? 1) - 1, (a ?? fallback) + delta))), [results, fallback]);
54
62
  // ⌘K "Follow-up: Search".
55
63
  const token = useSyncExternalStore(sources.extras.subscribe, sources.extras.focusToken, sources.extras.focusToken);
56
64
  const first = useRef(token);
57
65
  useEffect(() => { if (token !== first.current) inputRef.current?.focus(); }, [token]);
58
- return { query, setQuery, results, active: Math.min(active, Math.max(0, (results?.length ?? 1) - 1)), move, inputRef };
66
+ return { query, setQuery, results, active: Math.min(current, Math.max(0, (results?.length ?? 1) - 1)), move, inputRef, askOn };
59
67
  }
60
68
 
61
69
  type DomKey = { key: string; metaKey: boolean; ctrlKey: boolean; altKey: boolean; target: unknown; preventDefault(): void };
@@ -79,12 +87,13 @@ export function useSlashToFocus(omnibox: Omnibox, enabled = true) {
79
87
  export function SearchField({ theme, omnibox, dense, onEnter }: { theme: Theme; omnibox: Omnibox; dense: boolean; onEnter: (item: OmniboxItem) => void }) {
80
88
  const c = theme.colors;
81
89
  const [focused, setFocused] = useState(false);
82
- const { query, setQuery, results, active, move, inputRef } = omnibox;
90
+ const { query, setQuery, results, active, move, inputRef, askOn } = omnibox;
91
+ const placeholder = askOn ? "Search, or ask the Overseer" : "Search workspaces, branches, PRs";
83
92
  return <View style={{ flex: 1, minWidth: 0, flexDirection: "row", alignItems: "center", gap: 6, height: dense ? 30 : 32, paddingHorizontal: 8, borderRadius: 6,
84
93
  borderWidth: 1, borderColor: focused ? withAlpha(c.foreground, 0.35) : c.border, backgroundColor: c.surface1 }}>
85
94
  <Icon name="Search" size={13} color={c.foregroundMuted} />
86
- <TextInput ref={inputRef} value={query} onChangeText={setQuery} placeholder="Search workspaces, branches, PRs" placeholderTextColor={c.foregroundMuted}
87
- accessibilityLabel="Search workspaces, branches, PRs" autoCorrect={false} autoCapitalize="none" spellCheck={false} returnKeyType="go"
95
+ <TextInput ref={inputRef} value={query} onChangeText={setQuery} placeholder={placeholder} placeholderTextColor={c.foregroundMuted}
96
+ accessibilityLabel={placeholder} autoCorrect={false} autoCapitalize="none" spellCheck={false} returnKeyType="go"
88
97
  onFocus={() => setFocused(true)} onBlur={() => setFocused(false)}
89
98
  onSubmitEditing={() => { const item = results?.[active]; if (item) onEnter(item); }}
90
99
  onKeyPress={e => {
@@ -232,7 +241,7 @@ export function GroupChip({ group, c }: { group: HomeGroupId | "archived"; c: Co
232
241
  </View>;
233
242
  }
234
243
 
235
- export function ResultRow({ item, theme, active, dense, touch, onPress, s: row }: { item: OmniboxItem; theme: Theme; active: boolean; dense: boolean; touch: boolean; onPress: () => void; s?: Workstream }) {
244
+ export function ResultRow({ item, theme, active, dense, touch, onPress, s: row }: { item: WorkspaceItem; theme: Theme; active: boolean; dense: boolean; touch: boolean; onPress: () => void; s?: Workstream }) {
236
245
  const c = theme.colors;
237
246
  const { hit } = item;
238
247
  const via = hit.via ? excerpt(hit.via.text, hit.via.ranges, dense ? 56 : 90) : null;
@@ -255,6 +264,26 @@ export function ResultRow({ item, theme, active, dense, touch, onPress, s: row }
255
264
  </Pressable>;
256
265
  }
257
266
 
267
+ /**
268
+ * The omnibox's last row: the query as an ask for the Overseer. Enter (or a tap) sends it as typed; the Overseer
269
+ * finds the agent that owns it. Quiet until it's the active row, so it never competes with real matches.
270
+ */
271
+ export function AskRow({ ask, theme, active, dense, touch, sending, onPress }: { ask: string; theme: Theme; active: boolean; dense: boolean; touch: boolean; sending: boolean; onPress: () => void }) {
272
+ const c = theme.colors;
273
+ return <Pressable accessibilityRole="button" accessibilityState={{ selected: active, busy: sending }} accessibilityLabel={`Ask the Overseer: ${ask}`} accessibilityHint="Sends this to the Overseer, which passes it to the agent that owns it" disabled={sending} onPress={onPress}
274
+ style={state => ({ flexDirection: "row", alignItems: "center", gap: 10, minHeight: touch ? 56 : dense ? 40 : 44, paddingHorizontal: dense ? 8 : 16, paddingVertical: 4,
275
+ borderLeftWidth: 2, borderLeftColor: active ? withAlpha(c.foreground, 0.5) : "transparent",
276
+ backgroundColor: active ? c.surface2 : (state as { hovered?: boolean }).hovered ? c.surface1 : "transparent" })}>
277
+ <Text numberOfLines={dense ? 2 : 1} style={{ flex: 1, minWidth: 0, fontSize: 13, lineHeight: 18 }}>
278
+ <Text style={{ color: c.foregroundMuted }}>Ask the Overseer: </Text>
279
+ <Text style={{ color: c.foreground, fontWeight: "500" }}>{ask}</Text>
280
+ </Text>
281
+ {sending ? <Spinner color={c.foregroundMuted} size={12} label="Sending to the Overseer" />
282
+ : active && Platform.OS === "web" && !touch ? <Text style={{ color: c.foregroundMuted, fontSize: 11, paddingHorizontal: 4, borderRadius: 3, borderWidth: 1, borderColor: withAlpha(c.foreground, 0.2) }}>↵</Text> : null}
283
+ <Icon name="MessagesSquare" size={14} color={active ? c.foreground : c.foregroundMuted} />
284
+ </Pressable>;
285
+ }
286
+
258
287
  /** The muted reason and source chip a fresh external priority adds to a row. */
259
288
  export function PriorityLine({ reason, source, c, size = 12 }: { reason: string; source: { kind: keyof typeof PRIORITY_SOURCE_LABEL; label: string } | null; c: Colors; size?: number }) {
260
289
  return <View style={{ flexDirection: "row", alignItems: "center", gap: 6, minWidth: 0 }}>
@@ -2,8 +2,8 @@ import { memo, useCallback, useEffect, useMemo, useRef, useState, type ReactNode
2
2
  import { FlatList, Pressable, Text, View } from "react-native";
3
3
  import { Icon } from "@getpaseo/plugin/client/ui";
4
4
  import { GROUP_TITLE, quietFolds, type Badge, type HomeGroupId, type HomeModel, type Workstream } from "../shared/home";
5
- import type { OmniboxItem } from "../shared/search";
6
- import { PriorityLine, ResultRow } from "./home-chrome";
5
+ import { ASK_KEY, type OmniboxItem, type WorkspaceItem } from "../shared/search";
6
+ import { AskRow, PriorityLine, ResultRow } from "./home-chrome";
7
7
  import { age } from "../shared/inbox";
8
8
  import { headlineColor, mergedColor, runningColor, tint, toneColor, withAlpha, type Colors } from "./theme";
9
9
  import { useMinute } from "./home-data";
@@ -29,7 +29,8 @@ type Entry =
29
29
  | { type: "row"; key: string; s: Workstream }
30
30
  | { type: "fold"; key: string; project: string; count: number; archivable: number; open: boolean }
31
31
  | { type: "more"; key: string; project: string; left: number }
32
- | { type: "result"; key: string; item: OmniboxItem; index: number }
32
+ | { type: "result"; key: string; item: WorkspaceItem; index: number }
33
+ | { type: "ask"; key: string; ask: string; index: number }
33
34
  | { type: "label"; key: string; text: string };
34
35
 
35
36
  export type HomeListProps = {
@@ -56,9 +57,11 @@ export type HomeListProps = {
56
57
  filter?: HomeGroupId | null;
57
58
  /** The pinned Overseer row under the brief. Absent: the Overseer is off (or this surface has none). */
58
59
  overseer?: OverseerRowState | null;
60
+ /** An omnibox ask is on its way to the Overseer. */
61
+ asking?: boolean;
59
62
  };
60
63
 
61
- export function HomeList({ model, theme, dense = false, touch, selectedKey, onSelect, briefLine, renderExpanded, header, footer, top, results, activeResult = 0, onResult, filter = null, overseer = null }: HomeListProps) {
64
+ export function HomeList({ model, theme, dense = false, touch, selectedKey, onSelect, briefLine, renderExpanded, header, footer, top, results, activeResult = 0, onResult, filter = null, overseer = null, asking = false }: HomeListProps) {
62
65
  const c = theme.colors;
63
66
  const [closed, setClosed] = useState<Set<string>>(new Set(["quiet"]));
64
67
  const [openProjects, setOpenProjects] = useState<Set<string>>(new Set());
@@ -72,6 +75,12 @@ export function HomeList({ model, theme, dense = false, touch, selectedKey, onSe
72
75
  // Search ignores the sort and the groups: ranked by match, archived ones last under their own label.
73
76
  let archivedShown = false;
74
77
  results.forEach((item, index) => {
78
+ if (item.ask !== undefined) {
79
+ // The ask row closes the list; with no match it follows the "no match" line.
80
+ if (index === 0) out.push({ type: "label", key: "l:none", text: "No workspace, branch or PR matches." });
81
+ out.push({ type: "ask", key: item.key, ask: item.ask, index });
82
+ return;
83
+ }
75
84
  if (item.hit.group === "archived" && !archivedShown) { archivedShown = true; out.push({ type: "label", key: "l:archived", text: "Archived" }); }
76
85
  out.push({ type: "result", key: `r:${item.provider}:${item.key}`, item, index });
77
86
  });
@@ -105,6 +114,7 @@ export function HomeList({ model, theme, dense = false, touch, selectedKey, onSe
105
114
  case "label": return <Text accessibilityRole={item.key === "l:archived" ? "header" : undefined} style={{ color: c.foregroundMuted, fontSize: item.key === "l:archived" ? 11 : 13, fontWeight: item.key === "l:archived" ? "600" : "400",
106
115
  letterSpacing: item.key === "l:archived" ? 0.6 : 0, textTransform: item.key === "l:archived" ? "uppercase" : "none", paddingHorizontal: dense ? 8 : 16, paddingTop: 12, paddingBottom: 4 }}>{item.text}</Text>;
107
116
  case "result": return <ResultRow item={item.item} s={model.byKey.get(item.item.key)} theme={theme} active={item.index === activeResult} dense={dense} touch={touch} onPress={() => onResult?.(item.item)} />;
117
+ 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 })} />;
108
118
  case "brief": return <BriefRow theme={theme} line={briefLine ?? ""} selected={selectedKey === null || selectedKey === BRIEF_KEY} touch={touch} onSelect={onSelect} />;
109
119
  case "overseer": return overseer ? <OverseerRow theme={theme} o={overseer} selected={selectedKey === OVERSEER_KEY} touch={touch} onSelect={onSelect} /> : null;
110
120
  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)} />;
@@ -127,16 +137,16 @@ export function HomeList({ model, theme, dense = false, touch, selectedKey, onSe
127
137
  </View>;
128
138
  }
129
139
  }
130
- }, [theme, c, dense, touch, selectedKey, onSelect, briefLine, renderExpanded, toggle, toggleProject, activeResult, onResult, model, overseer?.state, overseer?.line]);
140
+ }, [theme, c, dense, touch, selectedKey, onSelect, briefLine, renderExpanded, toggle, toggleProject, activeResult, onResult, model, overseer?.state, overseer?.line, asking]);
131
141
 
132
142
  const listRef = useRef<FlatList<Entry>>(null);
133
143
  // Keep the keyboard-active result in view.
134
144
  useEffect(() => {
135
145
  if (!results?.length) return;
136
- const at = data.findIndex(e => e.type === "result" && e.index === activeResult);
146
+ const at = data.findIndex(e => (e.type === "result" || e.type === "ask") && e.index === activeResult);
137
147
  if (at >= 0) listRef.current?.scrollToIndex({ index: at, viewPosition: 0.5, animated: false });
138
148
  }, [activeResult, results, data]);
139
- const list = <FlatList ref={listRef} data={data} keyExtractor={e => e.key} renderItem={render} extraData={`${selectedKey}:${activeResult}`} onScrollToIndexFailed={() => undefined}
149
+ const list = <FlatList ref={listRef} data={data} keyExtractor={e => e.key} renderItem={render} extraData={`${selectedKey}:${activeResult}:${asking}`} onScrollToIndexFailed={() => undefined}
140
150
  initialNumToRender={30} maxToRenderPerBatch={30} windowSize={9} removeClippedSubviews={false}
141
151
  ListHeaderComponent={header ? <>{header}</> : null} ListFooterComponent={footer ? <>{footer}</> : <View style={{ height: 32 }} />}
142
152
  style={{ flex: 1 }} contentContainerStyle={{ paddingBottom: 8 }} keyboardShouldPersistTaps="handled" />;
@@ -1,5 +1,5 @@
1
1
  import type { PluginClientContext } from "@getpaseo/plugin/client";
2
- import { overseerStartRpc, overseerStatusRpc, prioritiesRpc, usageRpc } from "../shared/contracts";
2
+ import { overseerAskRpc, overseerRestartRpc, overseerStartRpc, overseerStatusRpc, prioritiesRpc, usageRpc } from "../shared/contracts";
3
3
  import type { RpcOutput } from "@getpaseo/plugin";
4
4
  import type { Priority } from "../shared/priorities";
5
5
  import { DEFAULT_SORT, isSortMode, type SortMode } from "../shared/sort";
@@ -97,6 +97,10 @@ export function createHomeExtras(client: PluginClientContext) {
97
97
  /** The Overseer: off, not started yet, or its agent and workspace. */
98
98
  overseer: () => overseer,
99
99
  async startOverseer() { overseer = await client.rpc(overseerStartRpc, {}); emit(); return overseer; },
100
+ /** Sends the omnibox's ask to the Overseer, starting it on first use. */
101
+ async askOverseer(text: string) { overseer = await client.rpc(overseerAskRpc, { text }); emit(); return overseer; },
102
+ /** Settings → Agents changed: a new Overseer on the configured agent, handed the old one's last steps. */
103
+ async restartOverseer() { overseer = await client.rpc(overseerRestartRpc, {}); emit(); return overseer; },
100
104
  agents: () => [...agents.values()],
101
105
  /** Bumped by ⌘K "Follow-up: Search"; the visible search field focuses when it changes. */
102
106
  focusToken: () => focusToken,
package/client/home.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { useCallback, useEffect, useMemo, useState, useSyncExternalStore } from "react";
1
+ import { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
2
2
  import { Platform, Pressable, ScrollView, Text, TextInput, View } from "react-native";
3
3
  import { usePaseo, useRpc, type PluginScreenProps } from "@getpaseo/plugin/client";
4
4
  import { Icon, useToast } from "@getpaseo/plugin/client/ui";
@@ -17,6 +17,7 @@ import { PrSheet } from "./pr-sheet";
17
17
  import { QuestionSheet } from "./questions";
18
18
  import { Age, BadgeView, BRIEF_KEY, glyphColor, HomeList, OVERSEER_KEY, PrChipView, type OverseerRowState } from "./home-list";
19
19
  import { answerLine, overseerRowState } from "../shared/overseer";
20
+ import type { OmniboxItem } from "../shared/search";
20
21
  import { ListTop, SearchField, SortMenu, StatusStrip, UsageMeters, useOmnibox, useSlashToFocus } from "./home-chrome";
21
22
  import { useHomeModel, useTick, type HomeSources } from "./home-data";
22
23
  import { useInbox, UndoBar, useNextRelay } from "./inbox";
@@ -61,6 +62,27 @@ export function FollowHome(props: PluginScreenProps & { deps: HomeDeps }) {
61
62
  const overseerStatus = useSyncExternalStore(deps.sources.extras.subscribe, deps.sources.extras.overseer, deps.sources.extras.overseer);
62
63
  const overseerInbox = useInbox(inbox, () => inbox.overseer());
63
64
  const overseer = overseerRowState(overseerStatus, overseerInbox);
65
+ const toast = useToast();
66
+ // The omnibox's "Ask the Overseer" row: send, then show the conversation it lands in.
67
+ const [asking, setAsking] = useState(false);
68
+ const [pendingAsk, setPendingAsk] = useState<string | null>(null);
69
+ const pick = useCallback(async (item: OmniboxItem) => {
70
+ if (item.ask === undefined) { setSelected(item.key); return; }
71
+ if (asking) return;
72
+ setAsking(true);
73
+ // No toast: the conversation opens on the sent words, which says it more plainly.
74
+ try { await deps.sources.extras.askOverseer(item.ask); omnibox.setQuery(""); omnibox.inputRef.current?.blur(); setPendingAsk(item.ask); setSelected(OVERSEER_KEY); inbox.refresh(); }
75
+ catch (e) { toast.error(errorText(e)); } finally { setAsking(false); }
76
+ }, [asking, deps.sources.extras, omnibox, inbox, toast]);
77
+ // ⌘K "Follow-up: Ask the Overseer" opens Home with `?ask=<nonce>`: select it and focus its reply box. A param, not
78
+ // shared state, so it works whether Home was already open or mounts fresh.
79
+ const [replyFocus, setReplyFocus] = useState(0);
80
+ useEffect(() => {
81
+ if (!params.ask) return;
82
+ if (overseerStatus && !overseerStatus.enabled) { toast.show("The Overseer is off. Turn it on in Follow-up settings."); return; }
83
+ setSelected(OVERSEER_KEY); setReplyFocus(n => n + 1);
84
+ // eslint-disable-next-line react-hooks/exhaustive-deps
85
+ }, [params.ask]);
64
86
  const briefLine = [pane.counts.needs ? `${pane.counts.needs} need you` : "Nothing needs you", pane.counts.fixing ? `${pane.counts.fixing} being fixed` : "", pane.away.count ? `${pane.away.count} done while away` : ""].filter(Boolean).join(" · ");
65
87
 
66
88
  const openFull = useCallback((s: Workstream) => {
@@ -78,17 +100,17 @@ export function FollowHome(props: PluginScreenProps & { deps: HomeDeps }) {
78
100
  if (params.view === "log") return <LogView theme={theme} compact={compact} sources={deps.sources} onHome={deps.openHome} onOpen={key => { setSelected(key); deps.openHome(); }} />;
79
101
 
80
102
  const detail = selected === OVERSEER_KEY && overseer
81
- ? <OverseerPane theme={theme} compact={compact} o={overseer} agentId={overseerStatus?.agentId ?? null} deps={deps} navigation={navigation} onBack={compact ? () => setSelected(null) : undefined} />
103
+ ? <OverseerPane theme={theme} compact={compact} o={overseer} focus={replyFocus} pending={pendingAsk} agentId={overseerStatus?.agentId ?? null} model={overseerStatus?.model ?? null} restartWith={overseerStatus?.restartWith ?? null} configured={overseerStatus?.configured ?? null} deps={deps} navigation={navigation} onBack={compact ? () => setSelected(null) : undefined} />
82
104
  : current
83
105
  ? <DetailPane key={current.key} s={current} model={model} theme={theme} compact={compact} deps={deps} openFull={openFull} signOffNext={signOffNext} onBack={compact ? () => setSelected(null) : undefined} />
84
106
  : <BriefPane theme={theme} compact={compact} pane={pane} onSelect={key => setSelected(key)} openLog={deps.openLog} sources={deps.sources} />;
85
107
  const list = <HomeList model={model} theme={theme} dense={compact} touch={compact} selectedKey={selected} onSelect={onSelect} briefLine={briefLine}
86
- results={omnibox.results} activeResult={omnibox.active} onResult={item => setSelected(item.key)} filter={filter} overseer={overseer}
108
+ results={omnibox.results} activeResult={omnibox.active} onResult={item => void pick(item)} filter={filter} overseer={overseer} asking={asking}
87
109
  top={<ListTop theme={theme} dense={compact} title={<ListHeader theme={theme} compact={compact} onSettings={deps.openSettings} />}>
88
110
  {/* zIndex: on web every View is its own stacking context, so the sort menu only paints and hit-tests above the
89
111
  strip and meters below if this row sits above them. */}
90
112
  <View style={{ zIndex: 2, flexDirection: "row", alignItems: "center", gap: 6, paddingHorizontal: compact ? 12 : 16 }}>
91
- <SearchField theme={theme} omnibox={omnibox} dense={compact} onEnter={item => setSelected(item.key)} />
113
+ <SearchField theme={theme} omnibox={omnibox} dense={compact} onEnter={item => void pick(item)} />
92
114
  <SortMenu theme={theme} mode={model.sort} onChange={deps.sources.extras.setSort} rankedAt={model.rankedAt} touch={compact} />
93
115
  </View>
94
116
  {!omnibox.results && <StatusStrip theme={theme} model={model} filter={filter} onFilter={setFilter} touch={compact} dense={compact} />}
@@ -274,7 +296,7 @@ function DetailPane({ s, model, theme, compact, deps, openFull, signOffNext, onB
274
296
  * The Overseer's conversation on Home (1.4.0-beta.0): the tail and a reply box, like any agent's detail pane, plus its
275
297
  * decision card when it asks which agent should get a task. Before the first start, one Start button.
276
298
  */
277
- function OverseerPane({ theme, compact, o, agentId, deps, navigation, onBack }: { theme: Theme; compact: boolean; o: OverseerRowState; agentId: string | null; deps: HomeDeps; navigation: PluginScreenProps["navigation"]; onBack?: () => void }) {
299
+ function OverseerPane({ theme, compact, o, focus = 0, pending = null, agentId, model, restartWith, configured, deps, navigation, onBack }: { theme: Theme; compact: boolean; o: OverseerRowState; focus?: number; pending?: string | null; agentId: string | null; model: string | null; restartWith: string | null; configured: string | null; deps: HomeDeps; navigation: PluginScreenProps["navigation"]; onBack?: () => void }) {
278
300
  const c = theme.colors; const t = text(c);
279
301
  const toast = useToast();
280
302
  const { inbox, extras } = deps.sources;
@@ -285,6 +307,11 @@ function OverseerPane({ theme, compact, o, agentId, deps, navigation, onBack }:
285
307
  const brief = useQuery({ queryKey: ["follow-through", "overseer-brief", agentId, row?.seq ?? 0], queryFn: () => readBrief({ agentId: agentId! }), enabled: !!agentId && !!row?.brief });
286
308
  const b = brief.data?.brief?.state === "open" ? brief.data.brief : null;
287
309
  const [starting, setStarting] = useState(false);
310
+ const [restarting, setRestarting] = useState(false);
311
+ const restart = async () => {
312
+ if (restarting) return; setRestarting(true);
313
+ try { const next = await extras.restartOverseer(); toast.show(`The Overseer now runs on ${next?.model ?? restartWith}; its recent conversation was handed over`, { variant: "success" }); } catch (e) { toast.error(errorText(e)); } finally { setRestarting(false); }
314
+ };
288
315
  const start = async () => {
289
316
  if (starting) return; setStarting(true);
290
317
  try { await extras.startOverseer(); toast.show("The Overseer is ready", { variant: "success" }); } catch (e) { toast.error(errorText(e)); } finally { setStarting(false); }
@@ -293,17 +320,23 @@ function OverseerPane({ theme, compact, o, agentId, deps, navigation, onBack }:
293
320
  <View style={{ flexDirection: "row", alignItems: "center", gap: 8 }}>
294
321
  {onBack && <IconButton theme={theme} compact icon="ChevronLeft" label="Back to Home" onPress={onBack} />}
295
322
  <Icon name="MessagesSquare" size={16} color={c.foreground} />
296
- <Text accessibilityRole="header" style={[t.title, { flex: 1, fontSize: 16 }]}>Overseer</Text>
323
+ <Text accessibilityRole="header" style={[t.title, { fontSize: 16 }]}>Overseer</Text>
324
+ <Text numberOfLines={1} style={[t.meta, { flex: 1, minWidth: 0 }]}>{model ?? ""}</Text>
297
325
  {agentId && navigation && (compact
298
326
  ? <IconButton theme={theme} compact icon="PanelRightOpen" label="Open full" onPress={() => navigation.openAgent({ agentId })} />
299
327
  : <Button theme={theme} icon="PanelRightOpen" title="Open full" accessibilityHint="Opens the Overseer's whole chat" onPress={() => navigation.openAgent({ agentId })} />)}
300
328
  </View>
329
+ {/* Settings → Agents changed: offered, never done mid-conversation on its own. */}
330
+ {agentId && restartWith && <View style={{ flexDirection: "row", alignItems: "center", gap: 8, flexWrap: "wrap", paddingTop: 6 }}>
331
+ <Text style={[t.meta, { flex: 1, minWidth: 180 }]}>{`Running ${model ?? "its first model"} · Settings say ${restartWith}`}</Text>
332
+ <Button theme={theme} compact={compact} icon="RefreshCw" title={`Restart with ${short(restartWith)}`} accessibilityHint={`Starts a new Overseer on ${restartWith} and hands it the recent conversation`} loading={restarting} onPress={() => void restart()} />
333
+ </View>}
301
334
  </View>;
302
335
  if (o.state === "start") return <View style={{ flex: 1, backgroundColor: c.surface0 }}>
303
336
  {header}
304
337
  <ScrollView contentContainerStyle={{ padding: compact ? 16 : 20, gap: 12 }}>
305
- <Text style={[t.body, { fontSize: 15, lineHeight: 22 }]}>One Claude agent that knows every workspace's state. Tell it "the PRs look good, assign reviewers on all" or "tell the SCIM agent to use option B", and it finds the right agent and passes it on.</Text>
306
- <Text style={t.meta}>It never merges, posts to people or archives. It starts a new workspace only when you say so. It runs on Opus in its own workspace, which stays off your lists.</Text>
338
+ <Text style={[t.body, { fontSize: 15, lineHeight: 22 }]}>One agent that knows every workspace's state. Tell it "the PRs look good, assign reviewers on all" or "tell the SCIM agent to use option B", and it finds the right agent and passes it on.</Text>
339
+ <Text style={t.meta}>It never merges, posts to people or archives. It starts a new workspace only when you say so. It runs on {configured ?? "Claude · Newest Opus"} in its own workspace, which stays off your lists. Change the model in Follow-up settings → Agents.</Text>
307
340
  <View style={{ flexDirection: "row" }}><Button theme={theme} compact={compact} kind="primary" icon="Play" title="Start the Overseer" loading={starting} onPress={() => void start()} /></View>
308
341
  </ScrollView>
309
342
  </View>;
@@ -314,15 +347,20 @@ function OverseerPane({ theme, compact, o, agentId, deps, navigation, onBack }:
314
347
  {tail.steps === null ? <Spinner color={c.foregroundMuted} size={12} label="Loading the conversation" />
315
348
  : tail.steps.length === 0 ? <Text style={t.meta}>{tail.error ? `Couldn't load the conversation: ${tail.error}` : "Nothing yet. Ask it what needs you, or give it a task for one of your agents."}</Text>
316
349
  : tail.steps.map((step, i) => <Step key={i} step={step} c={c} last={i === tail.steps!.length - 1} />)}
317
- {o.state === "running" && <Spinner color={c.foregroundMuted} size={12} label="The Overseer is working" />}
350
+ {/* An ask just sent from the omnibox, until the conversation shows it. */}
351
+ {pending && tail.steps && !tail.steps.some(x => x.kind === "you" && x.text.trim() === pending) && <Step step={{ kind: "you", text: pending }} c={c} last={false} />}
352
+ {(o.state === "running" || pending && tail.steps && !tail.steps.some(x => x.kind === "you" && x.text.trim() === pending)) && <Spinner color={c.foregroundMuted} size={12} label="The Overseer is working" />}
318
353
  {/* Its open ask, after the conversation that led to it. Only something Tom can act on; never "No ask stated". */}
319
354
  {b && agentId && (b.kind === "decision" && b.decisions.some(d => d.options.length) || b.kind === "action") ? <BriefCard {...({ embedded: true, item: { data: b }, theme, layout: { compact }, agentId, deps: deps.briefDeps } as unknown as Parameters<typeof BriefCard>[0])} /> : null}
320
355
  </ScrollView>
321
- {agentId && <ReplyBox theme={theme} compact={compact} agentName="the Overseer" placeholder="Ask or give a task: “assign reviewers on all ready PRs”" hint={null}
356
+ {agentId && <ReplyBox theme={theme} compact={compact} agentName="the Overseer" placeholder="Ask or give a task: “assign reviewers on all ready PRs”" hint={null} focus={focus}
322
357
  onSend={async message => { await agent.handle!.send(message); inbox.refresh(); }} />}
323
358
  </View>;
324
359
  }
325
360
 
361
+ /** "Codex · GPT-6-Luna · low" → "GPT-6-Luna · low": the button already says it's the Overseer's provider change. */
362
+ const short = (summary: string) => summary.split(" · ").slice(1).join(" · ") || summary;
363
+
326
364
  function Step({ step, c, last }: { step: TailStep; c: Colors; last: boolean }) {
327
365
  const t = text(c);
328
366
  if (step.kind === "tool") return <View style={{ flexDirection: "row", alignItems: "center", gap: 8 }}>
@@ -363,8 +401,20 @@ function PermissionBlock({ p, theme, compact, busy, primary, onRespond }: { p: P
363
401
  }
364
402
 
365
403
  /** The reply box. Sending is the developer writing to the agent, which clears Needs you (binding rule). */
366
- function ReplyBox({ theme, compact, agentName, onSend, placeholder = "Answer in your own words", hint = "Sending clears Needs you. Sign off & next moves on without a reply." }: { theme: Theme; compact: boolean; agentName: string; onSend: (text: string) => Promise<void>; placeholder?: string; hint?: string | null }) {
404
+ function ReplyBox({ theme, compact, agentName, onSend, placeholder = "Answer in your own words", hint = "Sending clears Needs you. Sign off & next moves on without a reply.", focus = 0 }: { theme: Theme; compact: boolean; agentName: string; onSend: (text: string) => Promise<void>; placeholder?: string; hint?: string | null; focus?: number }) {
367
405
  const c = theme.colors;
406
+ const inputRef = useRef<TextInput | null>(null);
407
+ // Focus when asked to (⌘K), never on a plain mount. The closing command palette hands focus back to where it was,
408
+ // after us, so keep claiming it for a moment until it sticks.
409
+ useEffect(() => {
410
+ if (!focus) return;
411
+ const timers = [0, 150, 400, 800, 1400].map(ms => setTimeout(() => {
412
+ const doc = (globalThis as { document?: { activeElement?: unknown } }).document;
413
+ const input = inputRef.current as unknown;
414
+ if (!doc || doc.activeElement !== input) inputRef.current?.focus();
415
+ }, ms));
416
+ return () => timers.forEach(clearTimeout);
417
+ }, [focus]);
368
418
  const toast = useToast();
369
419
  const [value, setValue] = useState("");
370
420
  const [sending, setSending] = useState(false);
@@ -377,7 +427,7 @@ function ReplyBox({ theme, compact, agentName, onSend, placeholder = "Answer in
377
427
  };
378
428
  return <View style={{ padding: compact ? 12 : 14, borderTopWidth: 1, borderTopColor: c.border, gap: 6 }}>
379
429
  <View style={{ flexDirection: "row", alignItems: "flex-end", gap: 8, borderRadius: 10, borderWidth: 1, borderColor: c.border, backgroundColor: c.surface1, paddingLeft: 12, paddingRight: 6, paddingVertical: 6 }}>
380
- <TextInput accessibilityLabel={`Reply to ${agentName}`} value={value} onChangeText={setValue} placeholder={placeholder} placeholderTextColor={c.foregroundMuted} multiline
430
+ <TextInput ref={inputRef} accessibilityLabel={`Reply to ${agentName}`} value={value} onChangeText={setValue} placeholder={placeholder} placeholderTextColor={c.foregroundMuted} multiline
381
431
  onKeyPress={e => { const k = e.nativeEvent as unknown as { key: string; metaKey?: boolean; ctrlKey?: boolean }; if (k.key === "Enter" && (k.metaKey || k.ctrlKey)) void send(); }}
382
432
  style={{ flex: 1, minHeight: compact ? 44 : 36, maxHeight: 140, color: c.foreground, fontSize: 14, lineHeight: 20, paddingVertical: 6, ...(Platform.OS === "web" ? { outlineStyle: "none" } as object : {}) }} />
383
433
  <IconButton theme={theme} compact={compact} icon="ArrowUp" label="Send" disabled={!value.trim() || sending} spinning={sending} onPress={() => void send()} color={value.trim() ? c.foreground : undefined} />