paseo-follow-up 1.4.0-beta.2 → 1.4.0-beta.20
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 +15 -4
- package/README.md +59 -6
- package/client/about.tsx +22 -12
- package/client/agents.tsx +132 -0
- package/client/brief.tsx +200 -72
- package/client/chat.tsx +12 -4
- package/client/display.tsx +62 -11
- package/client/header.tsx +40 -19
- package/client/home-chrome.tsx +135 -40
- package/client/home-list.tsx +90 -35
- package/client/home-view.ts +66 -8
- package/client/home.tsx +268 -77
- package/client/inbox-store.ts +15 -7
- package/client/keys.ts +3 -0
- package/client/kit.tsx +46 -15
- package/client/large.tsx +9 -10
- package/client/live.tsx +8 -6
- package/client/needs-you.tsx +36 -8
- package/client/onboarding.tsx +455 -0
- package/client/panel.tsx +98 -23
- package/client/pill.tsx +41 -21
- package/client/pr-controls.tsx +38 -14
- package/client/pr-sheet.tsx +8 -6
- package/client/questions.tsx +6 -4
- package/client/reviewers.tsx +63 -21
- package/client/settings-shell.tsx +77 -0
- package/client/settings.tsx +145 -49
- package/client/shipping.tsx +186 -0
- package/client/spec.tsx +1 -1
- package/client/stacks.tsx +4 -3
- package/client/tasks.tsx +1 -1
- package/client/theme.ts +21 -0
- package/client/visibility.ts +7 -0
- package/client/workspace-data.ts +37 -0
- package/docs/screenshots/decision-card-answered-phone-light.png +0 -0
- package/docs/screenshots/decision-card-expanded-chat-light.png +0 -0
- package/docs/screenshots/decision-card-partial-phone-dark.png +0 -0
- package/docs/screenshots/decision-card-unanswered-phone-dark.png +0 -0
- package/index.client.tsx +27 -8
- package/index.server.ts +242 -24
- package/package.json +5 -3
- package/server/about.ts +15 -4
- package/server/agent-actions.ts +23 -3
- package/server/agent-hook.mjs +54 -16
- package/server/agent-settings.ts +124 -0
- package/server/ai-jobs.ts +88 -23
- package/server/daemon.ts +165 -105
- package/server/directory.ts +165 -0
- package/server/discovery.ts +34 -6
- package/server/engine.ts +31 -9
- package/server/etag.ts +14 -0
- package/server/github.ts +66 -5
- package/server/hook-source.ts +1 -1
- package/server/inbox-directory.ts +14 -19
- package/server/inbox.ts +28 -1
- package/server/mcp-source.ts +1 -1
- package/server/mcp.d.mts +3 -1
- package/server/mcp.mjs +47 -10
- package/server/native-tools.ts +3 -2
- package/server/onboarding.ts +101 -0
- package/server/overseer-prompt-source.ts +1 -1
- package/server/overseer-prompt.md +1 -0
- package/server/overseer.ts +72 -8
- package/server/pr-actions.ts +91 -15
- package/server/pr-workflow.ts +188 -0
- package/server/questions.ts +1 -1
- package/server/ranker.ts +431 -0
- package/server/recovery-config.ts +17 -0
- package/server/scopes.ts +20 -8
- package/server/tasks.ts +9 -3
- package/server/trust-bypass.ts +125 -0
- package/shared/about.ts +8 -3
- package/shared/activity.ts +3 -1
- package/shared/agent-settings.ts +169 -0
- package/shared/attention.ts +8 -4
- package/shared/brief.ts +44 -0
- package/shared/chat.ts +3 -1
- package/shared/contracts.ts +42 -4
- package/shared/display.ts +16 -1
- package/shared/headline.ts +5 -0
- package/shared/home.ts +6 -0
- package/shared/model.ts +12 -1
- package/shared/onboarding.ts +243 -0
- package/shared/overseer.ts +10 -2
- package/shared/pr-actions.ts +26 -4
- package/shared/pr-workflow.ts +133 -0
- package/shared/questions.ts +17 -0
- package/shared/ranker.ts +237 -0
- package/shared/search.ts +25 -5
- package/shared/settings-nav.ts +97 -0
- package/skills/follow-through/SKILL.md +1 -1
package/OVERVIEW.md
CHANGED
|
@@ -5,21 +5,22 @@ 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
|
+
- AI priority (1.4 beta): Home's Priority sort ranked from your Linear issues, Slack DMs and mentions, GitHub review requests and the weekly plan, each row with a one-line reason that names its source. It runs hourly on workdays, only when something changed, and Re-rank now is in the sort menu.
|
|
9
10
|
- 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
11
|
- 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
12
|
- A Needs you card with one button per decision: Send repairs, Merge, Resume, Retry, or Answer.
|
|
12
13
|
- Questions from the main agent, each with a permanent ref (Q1, Q2…), lettered options, the agent's recommendation and what it does while it waits. Pick an option, add a note and Send it to the agent, or Copy it instead. Answered questions stay listed under their ref, and the question mode setting (Stop, Work around, Keep building) tells agents what to do until you answer.
|
|
13
14
|
- A Spec link in the header to the page that sums up the workspace, usually the Claude artifact the main agent keeps up to date.
|
|
14
15
|
- An Activity card: repairs sent and finished with how long they took, merges, PR actions and questions.
|
|
15
|
-
- Each stack drawn top to base
|
|
16
|
+
- Each stack drawn top to base, merged PRs folded away, and a sheet per PR with checks, reviewers and Merge.
|
|
16
17
|
- Tasks for work that outlives a merge, manual or scheduled after a merge or deploy, with an optional delay.
|
|
17
18
|
- A composer pill and a sidebar count that appear only when something needs you; the pill steps through open questions so you can answer without leaving the chat. Home lists every workspace by who is up next, and a larger view opens a workspace in two columns.
|
|
18
19
|
- Compact rows for Follow-up's own tool calls in agent chats, a card for each repair batch, and a card when the agent declares Done.
|
|
19
20
|
|
|
20
21
|
## Setup
|
|
21
22
|
|
|
22
|
-
Requires Paseo 0.14+, Node 22+ and an authenticated `gh` on the daemon host. Merge uses saved Graphite CLI authentication. Follow-up follows every workspace that has an agent; Settings has per-project and per-workspace exceptions. The optional Send to Paseo browser companion adds Graphite's Merge when ready switch through its existing pairing; it is not needed for anything else.
|
|
23
|
+
Requires Paseo 0.14+, Node 22+ and an authenticated `gh` on the daemon host. Works with plain GitHub; Graphite is optional and picked per repository (Auto chooses Graphite only where the `gt` CLI is installed, signed in and the repository was set up with `gt init`). In Graphite repositories Merge uses saved Graphite CLI authentication; elsewhere it runs `gh pr merge`, and When ready is GitHub auto-merge. Follow-up follows every workspace that has an agent; Settings has per-project and per-workspace exceptions. The optional Send to Paseo browser companion adds Graphite's Merge when ready switch through its existing pairing; it is not needed for anything else.
|
|
23
24
|
|
|
24
25
|
## What it does on its own, and what it never does
|
|
25
26
|
|
|
@@ -33,6 +34,10 @@ Every root agent Paseo launches (tracked or not) gets Follow-up's action tools:
|
|
|
33
34
|
|
|
34
35
|
This is a trusted, unsandboxed plugin. It reads workspace metadata, saved agent history and configuration, GitHub status and existing CLI authentication, and keeps its state in `plugin-data/follow-through` on the daemon host. It attaches scoped agent tools per session (served by Paseo's own MCP as `follow_*` on Paseo 0.15+, a per-launch stdio bridge otherwise; never a global MCP registration, and it removes the user-scope `follow-through` entry older versions wrote, keeping a `.follow-through-unregister.bak` of each file) and reversible provider hooks for tracked sessions and, while the Needs-you inbox is on, the `needs_you` tool and its Stop-hook nudge for root agents (see below). To find the spec link it reads completed Claude Artifact publish results in the workspace's root sessions, never page content, chat links or the repository; a link you set wins over the agent's, which wins over detection. Repair prompts go to your configured agent and provider. For the provider meters it calls the Smart Session plugin's `smart-session.subscriptions` and `smart-session.budget` RPCs at most once a minute, or reads the newest rows of its `plugin-data/smart-session/accounts-YYYY-MM.jsonl`; it never asks ZeroSub to refresh or switch. It has no Slack identity and no background channel scanning; replies to stakeholders need your authorization and a sent-message receipt from the agent.
|
|
35
36
|
|
|
37
|
+
Follow-up reads Paseo's agent, workspace and project lists into one in-memory directory shared by discovery, runtime checks, the Needs-you inbox, the Overseer and every client RPC. It reads the lists once at start, then patches the directory from lifecycle events: turn started or ended, permission requested or resolved, agent created, closed or archived, workspace created or archived. A change marks it dirty, and a dirty directory re-reads at most once a minute; a clean one re-reads every ten minutes. Before anything that would load an agent (a timeline or provider-subagent read), Follow-up re-reads that one agent, because the cached copy may predate Paseo unloading it. Provider subagents are asked about only when a send is due or waiting for acknowledgment, or completion is being checked. The Done label is sent only when it changes. In the app, the panel, the larger view and the pill draw from the client's shared workspace poll, which runs every 15 s plus a refresh shortly after Paseo reports an agent change. The inbox runs the same way and passes the tag of the list it holds, so an unchanged list comes back empty. Display preferences re-read once a minute. None of these poll while the app is hidden.
|
|
38
|
+
|
|
39
|
+
The PR workflow setting lives in `plugin-data/follow-through/pr-workflow.json` (owner-only): the default, per-repository overrides, merge methods and the review-fix instruction. Auto-detection reads only files: PATH for a `gt` executable, `~/.config/graphite/auth` for a sign-in token's presence (never sent anywhere by detection), and `<git dir>/.graphite_repo_config` in the checkout of the repository's Paseo project, then in the working directories of tracked workspaces with PRs in that repository (from the agent list Follow-up already has). It never runs `gt` and caches for ten minutes. Repositories that resolve to GitHub get no Graphite API calls; their readiness, merge method and auto-merge come from the same `gh api graphql` query that already reads each PR, so there is no extra polling. The first start with this setting seeds the review-fix instruction to `/fix-pr` when `~/.claude/commands/fix-pr.md` or `~/.claude/skills/fix-pr/SKILL.md` exists, once.
|
|
40
|
+
|
|
36
41
|
Reviewer lists live in `plugin-data/follow-through/reviewers.json` (owner-only), apart from `state.json`. Each list is per repository, plus a default for repositories without one, and each user keeps their own. Collaborator and team suggestions are read with `gh api` only when you open Add reviewer. They are cached for ten minutes, and never polled.
|
|
37
42
|
|
|
38
43
|
The Needs-you inbox (beta) keeps one flag per root agent in `plugin-data/follow-through/inbox.json`. When a turn starts it reads the newest user message from the agent's recent timeline to tell your messages from automation, and it reads, never writes, Defer's `plugin-data/defer/queue.json`, Smart Session's `plugin-data/smart-session/compactions.json`, Session Guard's `plugin-data/session-guard/state.json` and Paseo's schedule records. An unknown or unreadable format counts as your message, which clears a flag rather than adding one. Signing off also clears Paseo's own unread dot for that agent. The first-run import and the restart check read only Paseo's agent list: an agent's last activity is its unread time or your last message to it, never Paseo's `updatedAt` (which the daemon rewrites in bulk), and they don't fetch timelines, which would load every agent. Closed and archived agents are never imported. Turning the inbox off stops all of this.
|
|
@@ -40,4 +45,10 @@ The Needs-you inbox (beta) keeps one flag per root agent in `plugin-data/follow-
|
|
|
40
45
|
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
46
|
|
|
42
47
|
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`
|
|
48
|
+
"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.
|
|
49
|
+
|
|
50
|
+
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.
|
|
51
|
+
|
|
52
|
+
The ranker behind AI priority (beta) runs inside Follow-up's worker as bounded one-shot jobs (Claude or Codex, per the ranker role) through the shared job runner (`server/ai-jobs.ts`), one at a time and only while the resource governor allows background work. It reads Follow-up's own state, `mcpproxy call tool-read` for `linear:list_issues` (assigned to you) and `slack-user:slack_search_public_and_private` (DMs and mentions, last 48 hours), `gh search prs --review-requested=@me`, and the planning artifact through one Claude turn limited to the Artifact tool. It hashes those inputs and calls the model only when they changed. It writes only `plugin-data/follow-through/priorities.json` (its ranking, which replaces its previous one) and `ranker.json` (input hash, run count, source health, the day's plan summary, and Linear issues no workspace covers). It never stores raw artifact HTML or share keys. The provider, model, cadence and daily cap come from the ranker role in Settings → Agents; the plan reader always uses Claude, the only provider with the Artifact tool.
|
|
53
|
+
|
|
54
|
+
Getting started keeps only its own progress in `plugin-data/follow-through/onboarding.json`: whether this host was a fresh or existing install when this version first started (existing if `state.json`, `inbox.json`, `reviewers.json`, `agents.json` or `brief.json` was already there), the current step, and whether the existing-install offer was shown or dismissed. An unreadable file counts as finished, so setup is never forced. Its choices are written through the same RPCs and display settings the Settings screen uses. The readiness checks run only when setup asks for them, at most once a minute unless you press Check again: `gh api user` on the daemon host, Paseo's provider snapshot (the same cached read Settings → Agents uses), Paseo's `config.json`, and the count of `hook-state/native-*.json` files. They never read an agent's timeline.
|
package/README.md
CHANGED
|
@@ -20,7 +20,21 @@ Screenshots use synthetic workspaces and PRs.
|
|
|
20
20
|
paseo plugin install paseo-follow-up
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Needs Node 22+ and an authenticated GitHub CLI (`gh`) on the daemon host.
|
|
23
|
+
Needs Node 22+ and an authenticated GitHub CLI (`gh`) on the daemon host. The installed plugin ID stays `follow-through`, so existing settings and tracked work carry over.
|
|
24
|
+
|
|
25
|
+
## Getting started
|
|
26
|
+
|
|
27
|
+
The first time you open Follow-up from the sidebar, a short setup takes Home's place. It takes about two minutes, and **Skip setup** leaves it at any point.
|
|
28
|
+
|
|
29
|
+
<img alt="Follow-up's setup on a fresh install: an example PR going from failed checks to a repair to a merge only you can approve, the GitHub, Claude, Codex and agent tools checks, the three switches for what Follow-up does on its own, a default reviewer being added, the helpers and where things are, then Home" src="docs/media/follow-up-setup.gif" width="720">
|
|
30
|
+
|
|
31
|
+
1. **What it is.** A worked example of one PR going from failed checks, to a repair sent to its agent, to a merge only you can approve, and how many of your workspaces Follow-up already follows.
|
|
32
|
+
2. **Check your setup.** Whether the GitHub CLI is signed in (and as whom), whether Claude and Codex are available for the helper agents, and whether agents get Follow-up's tools. Anything missing shows the fix, with the command to copy. Checks run only while this step is open.
|
|
33
|
+
3. **What Follow-up does without asking.** Follow every workspace (or turn single ones off), Send repairs automatically, and Trust bypass agents. They are on by default and save as you change them.
|
|
34
|
+
4. **Reviewers.** Who **Add reviewers** asks: a default for every repository, and a list per repository Follow-up has seen. **Skip, set later** leaves it empty.
|
|
35
|
+
5. **Helpers.** The Overseer and AI priority switches, which models they use (change them under Settings → Agents), and where Home, the workspace panel, Needs you and What's this about? live.
|
|
36
|
+
|
|
37
|
+
Every switch in setup is the same one Settings shows, so nothing is applied twice and nothing is lost if you stop halfway. Setup remembers its step, so a reload or another device picks up where you left off. Run it again any time from **Set up Follow-up again** at the top of Follow-up's settings, or ⌘K → **Follow-up: Set up again**. If Follow-up was already installed before this version, it doesn't open on its own: Home shows one dismissible line offering it, for a day.
|
|
24
38
|
|
|
25
39
|
## Use
|
|
26
40
|
|
|
@@ -30,12 +44,20 @@ The panel shows this workspace only, top to bottom: a **Home** button, the main
|
|
|
30
44
|
|
|
31
45
|
- **Status.** How many PRs have merged, how many things need you, how many PRs need fixing, and a bar with one segment per PR in merge order. Below it, what the agent is doing right now.
|
|
32
46
|
- **Needs you.** One row per decision, each with its button: answer the agent's question, send repairs to the main agent, merge an approved PR, resume after you stopped the agent, or retry a batch that didn't finish.
|
|
33
|
-
- **Pull requests.** Each stack drawn top to base,
|
|
47
|
+
- **Pull requests.** Each stack drawn top to base, with merged PRs folded away.
|
|
34
48
|
- **Tasks.** Work that outlives a merge, such as a production check or a backfill. Tasks wait for you unless you schedule them for after a merge or deploy.
|
|
35
49
|
- **Activity.** What happened and how long it took: repairs sent and finished, merges, merge and reviewer actions, and every question under its ref.
|
|
36
50
|
|
|
37
51
|
The **Spec** chip in the header opens the page that sums up the workspace, usually the Claude artifact the main agent keeps up to date. The agent registers it with a tool call, Follow-up also picks up artifacts the workspace's sessions publish, and you can set, change or remove it under **Spec, agent and recovery**. Your link wins over the agent's, which wins over detection.
|
|
38
52
|
|
|
53
|
+
## Works with GitHub; Graphite optional
|
|
54
|
+
|
|
55
|
+
Follow-up works with plain GitHub out of the box: readiness comes from GitHub itself (its merge state, required checks, reviews, unresolved threads, branch protection and rulesets, and the merge queue if the repository has one), **Merge** runs `gh pr merge` with a merge method the repository allows, and **Auto-merge** is GitHub's own auto-merge. Stacks are chains of base branches: a PR whose base is another PR's branch sits on top of it, a stack merges bottom to top, and after a parent merges Follow-up retargets the child to trunk with `gh pr edit --base` if GitHub didn't already.
|
|
56
|
+
|
|
57
|
+
If you use [Graphite](https://graphite.dev), Follow-up picks it up per repository: **Auto** chooses Graphite where the `gt` CLI is on the daemon's PATH, signed in, and the repository was set up with `gt init`; everywhere else it's GitHub. Detection only looks at files (it never runs `gt`) and is cached for ten minutes. In Graphite repositories, Merge goes through Graphite with your saved CLI sign-in, and Merge when ready works through the Send to Paseo companion (below).
|
|
58
|
+
|
|
59
|
+
Auto is the default for every repository, and setup's **How do you ship PRs?** step shows what it picked. To change it later, open Follow-up's settings (the gear on Home or in a workspace's panel) → **Following** → **Shipping PRs**: a default for every repository (Auto, Graphite or GitHub), an override per repository showing what Auto picked and why, the merge method, and how agents should address review comments: Follow-up's built-in steps (read the unresolved threads with `gh`, fix, push, reply and resolve) or a skill or command of your own, such as `/fix-pr`. Agents get instructions for the workflow their workspace uses, so a GitHub workspace never hears about Graphite. An install that already had a `/fix-pr` command or skill in `~/.claude` keeps using it.
|
|
60
|
+
|
|
39
61
|

|
|
40
62
|
|
|
41
63
|
### Questions
|
|
@@ -139,6 +161,8 @@ An overview is written when you open the section and none exists, or when the in
|
|
|
139
161
|
|
|
140
162
|
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
163
|
|
|
164
|
+
**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.
|
|
165
|
+
|
|
142
166
|
- **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
167
|
- **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
168
|
- **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 +170,42 @@ One agent you talk to about all your workspaces. It sits pinned at the top of Ho
|
|
|
146
170
|
- **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
171
|
- **Archived it by accident?** Follow-up starts a new one with a handoff from the old one's last steps.
|
|
148
172
|
|
|
149
|
-
Turn it off under Settings → **Overseer (beta)**.
|
|
173
|
+
Turn it off under Settings → **Overseer (beta)**. While it's off, search has no ask row.
|
|
174
|
+
|
|
175
|
+
#### AI priority (1.4 beta)
|
|
176
|
+
|
|
177
|
+
Home's **Priority** sort can come from a ranker that reads what's happening outside Paseo: your assigned Linear issues (priority, due date, project and milestone), Slack DMs and mentions from the last 48 hours, open GitHub review requests, and the CPO's weekly planning artifact. Each row then shows a one-line reason that names its source, such as "HER-1312 · Urgent · due today" or "Slack: Dana asked twice". Needs you still comes first, whatever the score.
|
|
178
|
+
|
|
179
|
+
- **When it runs:** about once an hour, Sunday to Thursday from 08:00 to 20:00 Israel time. **Re-rank now** in the sort menu runs it at any time, and so does asking the Overseer what to work on first. The menu says when it last ranked and names any source it couldn't read ("Ranked 12m ago · Slack unavailable").
|
|
180
|
+
- **What it costs:** it calls the model only when its inputs changed since the last run, and at most 24 times a day (Re-rank now isn't capped). A run at about 100 workspaces is one Sonnet call of roughly 10k input tokens, about $0.06 and 20 s. The weekly plan is read at most once a day, for about $0.03. Each run's cost and duration go to `ai-jobs.jsonl`.
|
|
181
|
+
- **What it touches:** everything is read-only: Follow-up's own state, read-only Linear and Slack tools through mcpproxy, `gh search prs`, and one read of the planning artifact with Claude's Artifact tool and no other tools. It never posts, comments or publishes. The artifact's link comes from `FOLLOW_UP_PLAN_URL`, or else from the morning-brief skill's source list (link only, without any share key).
|
|
182
|
+
- Linear issues assigned to you that no workspace covers are kept for a later "Not started" group; they aren't shown yet.
|
|
183
|
+
|
|
184
|
+
Turn it off under Settings → **Overseer (beta)** → **AI priority**.
|
|
185
|
+
|
|
186
|
+

|
|
187
|
+
|
|
188
|
+

|
|
189
|
+
|
|
190
|
+
### Choosing models
|
|
191
|
+
|
|
192
|
+
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.
|
|
193
|
+
|
|
194
|
+
| Agent | Default | Notes |
|
|
195
|
+
|---|---|---|
|
|
196
|
+
| 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). |
|
|
197
|
+
| 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. |
|
|
198
|
+
| Recovery | Same as main agent | Or pick a provider and model. Switching provider keeps the main agent's tools and instructions. |
|
|
199
|
+
| Priority ranker | Claude · Sonnet, hourly, up to 24 a day | One call per run, no tools. Claude or Codex. |
|
|
200
|
+
|
|
201
|
+
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
202
|
|
|
151
203
|

|
|
152
204
|
|
|
153
205
|
Install the beta:
|
|
154
206
|
|
|
155
207
|
```sh
|
|
156
|
-
paseo plugin update follow-through --version 1.4.0-beta.
|
|
208
|
+
paseo plugin update follow-through --version 1.4.0-beta.20
|
|
157
209
|
# or, for a fresh install:
|
|
158
210
|
paseo plugin install npm:paseo-follow-up@beta
|
|
159
211
|
```
|
|
@@ -173,6 +225,7 @@ Betas publish to npm's `beta` dist-tag, so `paseo plugin update` without `--vers
|
|
|
173
225
|
- Follow-up never merges, turns on merge when ready, requests reviewers or archives on its own. **Merge** re-checks the stack, lists any PRs underneath that would merge first, and asks again.
|
|
174
226
|
- A merged PR is not the end: tasks such as production checks and open questions keep the workspace open until the main agent declares Done and everything has settled.
|
|
175
227
|
- Answers go out only when you click Send. Follow-up never answers for you.
|
|
228
|
+
- **It stays light on Paseo (1.4).** Follow-up keeps one shared view of Paseo's agents and workspaces. It reads the full list once at start, then updates it from Paseo's events: turns, permissions, archives and new agents or workspaces. It re-reads the list at most once a minute after a change, and every ten minutes otherwise. Home, the workspace panel, the pills and the Needs-you inbox all read that shared view, so opening them never makes Paseo list your workspaces again. In the app, the panel and pills draw from one shared poll that refreshes when an agent changes. The Needs-you list answers "unchanged" in a few bytes when nothing moved, and nothing polls while the app is in the background. At 120 workspaces and idle, Follow-up's worker makes about 1 request a minute to Paseo, down from about 60. With the app open it was about 140.
|
|
176
229
|
|
|
177
230
|
### Agents can do what you can click
|
|
178
231
|
|
|
@@ -191,11 +244,11 @@ Tools that act on a list, and merge, return a dry run first and act only when ca
|
|
|
191
244
|
|
|
192
245
|
## Send to Paseo and Graphite
|
|
193
246
|
|
|
194
|
-
With [Send to Paseo](https://github.com/tomgrin10/send-to-paseo) on the same daemon, its composer picks the agent that registered the PR.
|
|
247
|
+
With [Send to Paseo](https://github.com/tomgrin10/send-to-paseo) on the same daemon, its composer picks the agent that registered the PR. In Graphite repositories, with Send to Paseo 2.2+, Follow-up can also toggle Graphite's **Merge when ready** through your existing pairing, while Graphite is open and signed in. Each change is confirmed in Chrome, which can remember the permission per repository. With the next Send to Paseo release, its popover on a PR page also shows which tracked workspaces own the PR, with Follow-up's one line for each (for example "Needs you · Merge ready"), and opens the workspace's main agent in the Paseo app or web app. See the [integration and security contract](https://github.com/tomgrin10/send-to-paseo/blob/main/docs/follow-up-integration.md).
|
|
195
248
|
|
|
196
249
|
## Data and access
|
|
197
250
|
|
|
198
|
-
Paseo plugins run trusted, unsandboxed code on the daemon host. Follow-up reads workspace metadata, agent history and GitHub PR status with your existing credentials, and keeps its state in `$PASEO_HOME/plugin-data/follow-through`. It registers scoped MCP tools and reversible provider hooks only for tracked sessions, plus the action tools for root agents (above). GitHub and Graphite writes happen only after an explicit click, or a root agent's confirmed plan, and a fresh eligibility check.
|
|
251
|
+
Paseo plugins run trusted, unsandboxed code on the daemon host. Follow-up reads workspace metadata, agent history and GitHub PR status with your existing credentials, and keeps its state in `$PASEO_HOME/plugin-data/follow-through`. It registers scoped MCP tools and reversible provider hooks only for tracked sessions, plus the action tools for root agents (above). GitHub (and, in Graphite repositories, Graphite) writes happen only after an explicit click, or a root agent's confirmed plan, and a fresh eligibility check.
|
|
199
252
|
|
|
200
253
|
## Development
|
|
201
254
|
|
package/client/about.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { openExternalUrl, useRpc } from "@getpaseo/plugin/client";
|
|
|
4
4
|
import { Icon } from "@getpaseo/plugin/client/ui";
|
|
5
5
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
6
6
|
import { workspaceAboutRpc } from "../shared/contracts";
|
|
7
|
-
import { aboutDisplay, linkLine, SOURCE_LABEL, type AboutLink, type AboutView } from "../shared/about";
|
|
7
|
+
import { aboutDisplay, linkLine, shortFooter, SOURCE_LABEL, type AboutLink, type AboutView } from "../shared/about";
|
|
8
8
|
import { errorText } from "../shared/errors";
|
|
9
9
|
import { Button, text, type Theme } from "./kit";
|
|
10
10
|
import { Spinner } from "./motion";
|
|
@@ -30,8 +30,10 @@ export const aboutKey = (workspaceId: string) => ["follow-through", "about", wor
|
|
|
30
30
|
* is cached, the one-line gist. Open: the overview, what's linked, and when it was written with a Refresh.
|
|
31
31
|
*/
|
|
32
32
|
export function AboutSection({ workspaceId, theme, compact, flush = false }: { workspaceId: string; theme: Theme; compact: boolean; flush?: boolean }) {
|
|
33
|
-
const c = theme.colors; const t = text(c);
|
|
34
|
-
|
|
33
|
+
const c = theme.colors; const t = text(c, compact);
|
|
34
|
+
// Phones start every pane collapsed and keep the choice for this mount only: one tap mustn't push the ask below the
|
|
35
|
+
// fold in every workspace. Desktop keeps the per-device choice.
|
|
36
|
+
const [open, setOpenState] = useState(() => compact ? false : readOpen());
|
|
35
37
|
const [refreshing, setRefreshing] = useState(false);
|
|
36
38
|
const read = useRpc(workspaceAboutRpc);
|
|
37
39
|
const client = useQueryClient();
|
|
@@ -45,7 +47,7 @@ export function AboutSection({ workspaceId, theme, compact, flush = false }: { w
|
|
|
45
47
|
useTick(60_000);
|
|
46
48
|
const view = query.data ?? null;
|
|
47
49
|
const d = aboutDisplay(view, Date.now());
|
|
48
|
-
const toggle = () => { const next = !open; writeOpen(next); setOpenState(next); };
|
|
50
|
+
const toggle = () => { const next = !open; if (!compact) writeOpen(next); setOpenState(next); };
|
|
49
51
|
const refresh = async () => {
|
|
50
52
|
if (refreshing) return;
|
|
51
53
|
setRefreshing(true);
|
|
@@ -53,6 +55,7 @@ export function AboutSection({ workspaceId, theme, compact, flush = false }: { w
|
|
|
53
55
|
catch { /* the query's error shows */ } finally { setRefreshing(false); }
|
|
54
56
|
};
|
|
55
57
|
const busy = refreshing || view?.status === "pending";
|
|
58
|
+
const peek = compact && !open && !!d.gist;
|
|
56
59
|
|
|
57
60
|
const failedKinds = new Set(view?.record?.failed ?? []);
|
|
58
61
|
|
|
@@ -60,24 +63,31 @@ export function AboutSection({ workspaceId, theme, compact, flush = false }: { w
|
|
|
60
63
|
return <View style={{ borderRadius: 10, borderWidth: open ? 1 : 0, borderColor: c.border, marginHorizontal: flush ? 0 : compact ? 16 : 12, marginTop: flush ? 0 : 8 }}>
|
|
61
64
|
<Pressable accessibilityRole="button" aria-expanded={open} accessibilityState={{ expanded: open }} accessibilityLabel={`${open ? "Hide" : "Show"} what this workspace is about`}
|
|
62
65
|
accessibilityHint={d.gist && !open ? d.gist : undefined} onPress={toggle}
|
|
63
|
-
style={state => ({ flexDirection: "row", alignItems: "center", gap: 8, paddingHorizontal: open ? 12 : 8, marginHorizontal: open ? 0 : -8, minHeight: compact ?
|
|
66
|
+
style={state => ({ flexDirection: "row", alignItems: peek ? "flex-start" : "center", gap: 8, paddingHorizontal: open ? 12 : 8, marginHorizontal: open ? 0 : -8, minHeight: compact ? 48 : 32, paddingVertical: compact ? 8 : 6, borderRadius: 8,
|
|
64
67
|
backgroundColor: state.pressed ? c.surface2 : (state as { hovered?: boolean }).hovered ? c.surface1 : "transparent" })}>
|
|
65
|
-
<Icon name={open ? "ChevronDown" : "ChevronRight"} size={14} color={c.foregroundMuted}
|
|
66
|
-
|
|
67
|
-
{
|
|
68
|
+
<View style={peek ? { paddingTop: 3 } : undefined}><Icon name={open ? "ChevronDown" : "ChevronRight"} size={14} color={c.foregroundMuted} /></View>
|
|
69
|
+
{/* Phones: the gist wraps under the label (two lines) instead of being cut to a few words beside it. */}
|
|
70
|
+
{peek ? <View style={{ flex: 1, minWidth: 0, gap: 2 }}>
|
|
71
|
+
<Text style={t.label}>What's this about?</Text>
|
|
72
|
+
<Text numberOfLines={2} style={[t.meta, { fontSize: 13, lineHeight: 18 }]}>{d.gist}</Text>
|
|
73
|
+
</View> : <>
|
|
74
|
+
<Text style={[t.label, { flexShrink: 0 }]}>What's this about?</Text>
|
|
75
|
+
{!open && d.gist ? <Text numberOfLines={1} style={[t.meta, { flex: 1, minWidth: 0 }]}>{d.gist}</Text> : <View style={{ flex: 1 }} />}
|
|
76
|
+
</>}
|
|
68
77
|
{!open && view?.status === "pending" && !d.gist && <Spinner color={c.foregroundMuted} size={11} label="Summarizing" />}
|
|
69
78
|
</Pressable>
|
|
70
79
|
{open && <View style={{ paddingHorizontal: 12, paddingBottom: 10, gap: 12 }}>
|
|
71
80
|
<Overview d={d} view={view} c={c} compact={compact} loading={query.isPending} error={query.error ? errorText(query.error) : null} />
|
|
72
81
|
{/* Nothing is claimed about links until an overview exists: "none found" only after a finished write. */}
|
|
73
82
|
{d.body === "overview" && <View style={{ gap: 4 }}>
|
|
74
|
-
<Text accessibilityRole="header" style={[t.small, { fontWeight: "600", letterSpacing: 0.5, textTransform: "uppercase" }]}>Linked</Text>
|
|
83
|
+
<Text accessibilityRole="header" style={compact ? t.section : [t.small, { fontWeight: "600", letterSpacing: 0.5, textTransform: "uppercase" }]}>Linked</Text>
|
|
75
84
|
{d.links.length ? d.links.map(l => <LinkRow key={l.key} l={l} c={c} compact={compact} failed={failedKinds.has(SOURCE_LABEL[l.kind])} />)
|
|
76
85
|
: <Text style={t.meta}>{d.empty}</Text>}
|
|
77
86
|
</View>}
|
|
78
87
|
{view?.record && <View style={{ flexDirection: "row", alignItems: "center", gap: 8 }}>
|
|
79
|
-
|
|
80
|
-
<
|
|
88
|
+
{/* Phones: one meta line ("Haiku · 2m ago"); what it was built from goes to Refresh's hint. */}
|
|
89
|
+
<Text numberOfLines={compact ? 1 : undefined} style={[t.small, { flex: 1, minWidth: 0 }]}>{compact ? shortFooter(d.footer) : d.footer}</Text>
|
|
90
|
+
<Button theme={theme} compact={compact} kind="ghost" icon="RefreshCw" title={busy ? "Summarizing…" : "Refresh"} accessibilityLabel="Summarize again" accessibilityHint={compact ? d.footer ?? undefined : undefined} disabled={busy} onPress={() => void refresh()} />
|
|
81
91
|
</View>}
|
|
82
92
|
{!view?.record && view?.status === "failed" && <View style={{ flexDirection: "row" }}>
|
|
83
93
|
<Button theme={theme} compact={compact} kind="ghost" icon="RefreshCw" title={busy ? "Summarizing…" : "Try again"} disabled={busy} onPress={() => void refresh()} />
|
|
@@ -95,7 +105,7 @@ function Overview({ d, view, c, compact, loading, error }: { d: ReturnType<typeo
|
|
|
95
105
|
if (d.body === "overview") return <View style={{ gap: 4 }}>
|
|
96
106
|
<Text selectable numberOfLines={compact && !more ? 4 : undefined}
|
|
97
107
|
style={[t.body, { lineHeight: 19, color: c.foreground, opacity: 0.88 }]}>{d.overview}</Text>
|
|
98
|
-
{long && <Pressable accessibilityRole="button" onPress={() => setMore(m => !m)} hitSlop={12}><Text style={[t.small, { color: c.foreground }]}>{more ? "Less" : "More"}</Text></Pressable>}
|
|
108
|
+
{long && <Pressable accessibilityRole="button" onPress={() => setMore(m => !m)} hitSlop={compact ? { top: 14, bottom: 14, left: 12, right: 24 } : 12}><Text style={[t.small, { color: c.foreground, fontWeight: "600" }]}>{more ? "Less" : "More"}</Text></Pressable>}
|
|
99
109
|
{d.refreshing && <View style={{ flexDirection: "row", alignItems: "center", gap: 6 }}><Spinner color={c.foregroundMuted} size={10} label="Summarizing" /><Text style={t.small}>Updating…</Text></View>}
|
|
100
110
|
</View>;
|
|
101
111
|
if (d.body === "summarizing" || loading) return <View style={{ gap: 6 }}>
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { ActivityIndicator, Text, View } from "react-native";
|
|
3
|
+
import type { PluginSurfaceProps } from "@getpaseo/plugin/client";
|
|
4
|
+
import { useRpc } from "@getpaseo/plugin/client";
|
|
5
|
+
import { SettingsAction, SettingsCard, SettingsSection, SettingsSelect, useToast } from "@getpaseo/plugin/client/ui";
|
|
6
|
+
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
7
|
+
import { agentSettingsRpc, setAgentSettingRpc } from "../shared/contracts";
|
|
8
|
+
import { AGENT_ROLES, JOB_PROVIDERS, ROLE_DEFAULTS, ROLE_INFO, isJobRole, modelName, providerName, type AgentRole, type AgentSettingsView, type CatalogProvider, type SavedRole } from "../shared/agent-settings";
|
|
9
|
+
import { Button, errorText, text, type Theme } from "./kit";
|
|
10
|
+
|
|
11
|
+
export const agentSettingsKey = ["follow-through", "agent-settings"];
|
|
12
|
+
const key = agentSettingsKey;
|
|
13
|
+
const SAME = "__same";
|
|
14
|
+
const DEFAULT = "__default";
|
|
15
|
+
/** Each provider's "don't ask" mode, used when a Paseo agent role moves to it. */
|
|
16
|
+
const BYPASS: Record<string, string> = { claude: "bypassPermissions", codex: "full-access" };
|
|
17
|
+
|
|
18
|
+
type Role = AgentSettingsView["roles"][number];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Settings → Agents: one card per special role. What it does and what it uses now, then provider, model, effort,
|
|
22
|
+
* mode and limits. The provider catalog is read once when this screen opens (cached on the server), never polled.
|
|
23
|
+
*/
|
|
24
|
+
export function AgentSettings({ theme, compact, toggles = {} }: Pick<PluginSurfaceProps, "theme"> & { compact: boolean; toggles?: Partial<Record<AgentRole, ReactNode>> }) {
|
|
25
|
+
const c = theme.colors; const t = text(c);
|
|
26
|
+
const read = useRpc(agentSettingsRpc); const write = useRpc(setAgentSettingRpc); const cache = useQueryClient(); const toast = useToast();
|
|
27
|
+
const query = useQuery({ queryKey: key, queryFn: () => read({ catalog: true }), staleTime: 5 * 60_000,
|
|
28
|
+
// Only while Paseo is still discovering providers (right after it starts): ask again until they settle.
|
|
29
|
+
refetchInterval: q => (q.state.data as AgentSettingsView | undefined)?.catalog?.providers.some(p => p.reason === "Still loading") && q.state.dataUpdateCount < 10 ? 5000 : false });
|
|
30
|
+
const change = useMutation({
|
|
31
|
+
mutationFn: (input: { role: AgentRole; entry: SavedRole | null }) => write(input),
|
|
32
|
+
onSuccess: (value, input) => {
|
|
33
|
+
cache.setQueryData(key, value);
|
|
34
|
+
void cache.invalidateQueries({ queryKey: ["follow-through", "about"] });
|
|
35
|
+
const r = value.roles.find(x => x.role === input.role);
|
|
36
|
+
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" });
|
|
37
|
+
},
|
|
38
|
+
onError: error => toast.error(errorText(error)),
|
|
39
|
+
});
|
|
40
|
+
const data = query.data;
|
|
41
|
+
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.";
|
|
42
|
+
return <SettingsSection title="Models" info={info}>
|
|
43
|
+
{query.isPending && <ActivityIndicator accessibilityLabel="Loading agent settings" color={c.foregroundMuted} style={{ alignSelf: "flex-start", marginVertical: 8 }} />}
|
|
44
|
+
{query.error && <SettingsCard><SettingsAction label="Couldn't load agent settings" hint={errorText(query.error)} actionLabel="Retry" onPress={() => void query.refetch()} /></SettingsCard>}
|
|
45
|
+
{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>}
|
|
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} toggle={toggles[role]}
|
|
49
|
+
save={entry => change.mutate({ role, entry })} theme={theme} compact={compact} /> : null;
|
|
50
|
+
})}
|
|
51
|
+
{/* Once, after the cards: what can't be picked and why (the pickers only list what can). */}
|
|
52
|
+
{!!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>}
|
|
53
|
+
|
|
54
|
+
</SettingsSection>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function RoleCard({ r, invalid, catalog, busy, save, theme, compact, toggle }: { r: Role; invalid: boolean; catalog: CatalogProvider[]; busy: boolean; save: (entry: SavedRole | null) => void; theme: Theme; compact: boolean; toggle?: ReactNode }) {
|
|
58
|
+
const c = theme.colors; const t = text(c);
|
|
59
|
+
const role = r.role;
|
|
60
|
+
const jobs = isJobRole(role);
|
|
61
|
+
const usable = catalog.filter(p => p.available && (!jobs || (JOB_PROVIDERS as readonly string[]).includes(p.id)));
|
|
62
|
+
const current = catalog.find(p => p.id === r.provider);
|
|
63
|
+
const base: SavedRole = { provider: r.provider, model: r.model, thinking: r.thinking, ...(jobs ? {} : { mode: r.mode }), ...(role === "recovery" ? { same: r.same } : {}),
|
|
64
|
+
...(jobs ? { dailyCap: r.dailyCap ?? undefined, maxPromptChars: r.maxPromptChars ?? undefined } : {}), ...(role === "ranker" ? { cadenceMinutes: r.cadenceMinutes ?? undefined } : {}) };
|
|
65
|
+
const set = (patch: SavedRole) => save({ ...base, ...patch });
|
|
66
|
+
const providerLabel = providerName(r.provider, current?.label);
|
|
67
|
+
// Saved on a provider Paseo can't use right now: say so plainly, with what happens and the way out.
|
|
68
|
+
const blocked = !r.same && catalog.length > 0 && !usable.some(p => p.id === r.provider);
|
|
69
|
+
const blockedReason = !current ? "not in Paseo's provider list" : !current.available ? (current.reason ?? "unavailable").replace(/\.$/, "") : "can't run one-shot jobs";
|
|
70
|
+
|
|
71
|
+
const providerOptions = [
|
|
72
|
+
...(role === "recovery" ? [{ value: SAME, label: "Same as main agent" }] : []),
|
|
73
|
+
...usable.map(p => ({ value: p.id, label: p.label })),
|
|
74
|
+
...(!r.same && !usable.some(p => p.id === r.provider) ? [{ value: r.provider, label: `${providerLabel} · unavailable` }] : []),
|
|
75
|
+
];
|
|
76
|
+
const pickProvider = (value: string) => {
|
|
77
|
+
if (value === SAME) return set({ same: true });
|
|
78
|
+
const p = catalog.find(x => x.id === value);
|
|
79
|
+
const defaults = ROLE_DEFAULTS[role];
|
|
80
|
+
const same = value === defaults.provider;
|
|
81
|
+
set({ same: false, provider: value, model: same ? defaults.model : null, thinking: null, ...(jobs ? {} : { mode: same ? defaults.mode : BYPASS[value] ?? p?.defaultMode ?? null }) });
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const models = current?.models ?? [];
|
|
85
|
+
const model = r.model ? models.find(m => m.id === r.model) : null;
|
|
86
|
+
const providerDefault = models.find(m => m.isDefault);
|
|
87
|
+
const defaultModel = role === "overseer" && r.provider === "claude" ? "Default (newest Opus)" : providerDefault ? `Default (${providerDefault.label})` : "Default";
|
|
88
|
+
const modelOptions = [{ value: DEFAULT, label: defaultModel }, ...models.map(m => ({ value: m.id, label: m.label })),
|
|
89
|
+
...(r.model && !model ? [{ value: r.model, label: modelName(r.model) }] : [])];
|
|
90
|
+
const thinking = (model ?? providerDefault)?.thinking ?? [];
|
|
91
|
+
const thinkingDefault = thinking.find(o => o.isDefault);
|
|
92
|
+
const modes = current?.modes ?? [];
|
|
93
|
+
const modeDefault = modes.find(m => m.id === current?.defaultMode);
|
|
94
|
+
const modeLabel = (m: { id: string; label: string }) => BYPASS[r.provider] === m.id ? `${m.label} · no prompts` : m.label;
|
|
95
|
+
|
|
96
|
+
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)} />;
|
|
97
|
+
return <SettingsCard>
|
|
98
|
+
<View style={{ paddingHorizontal: 16, paddingTop: 14, paddingBottom: 10, gap: 2 }}>
|
|
99
|
+
<View style={{ flexDirection: "row", alignItems: "center", gap: 8 }}>
|
|
100
|
+
<Text accessibilityRole="header" style={[t.title, { flex: 1 }]}>{ROLE_INFO[role].title}</Text>
|
|
101
|
+
{!compact && reset}
|
|
102
|
+
</View>
|
|
103
|
+
<Text style={t.meta}>{ROLE_INFO[role].does}{role === "overseer" ? " A running Overseer keeps its model until you restart it from Home." : ""}</Text>
|
|
104
|
+
{invalid && <Text style={t.meta}>Part of the saved setting wasn't valid, so its default is used.</Text>}
|
|
105
|
+
{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>}
|
|
106
|
+
</View>
|
|
107
|
+
{/* The role's own on/off (Overseer, AI priority) leads its card; the model rows follow. */}
|
|
108
|
+
{toggle}
|
|
109
|
+
<SettingsSelect label="Provider" value={r.same ? SAME : r.provider} options={providerOptions} disabled={busy || !catalog.length} onValueChange={pickProvider} />
|
|
110
|
+
{!r.same && <SettingsSelect label="Model" value={r.model ?? DEFAULT} options={modelOptions} disabled={busy || !catalog.length}
|
|
111
|
+
onValueChange={value => set({ model: value === DEFAULT ? null : value, thinking: null })} />}
|
|
112
|
+
{!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}
|
|
113
|
+
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}
|
|
114
|
+
onValueChange={value => set({ thinking: value === DEFAULT ? null : value })} />}
|
|
115
|
+
{!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}
|
|
116
|
+
options={[{ value: DEFAULT, label: modeDefault ? `Default (${modeLabel(modeDefault)})` : "Default" }, ...modes.map(m => ({ value: m.id, label: modeLabel(m) }))]} disabled={busy}
|
|
117
|
+
onValueChange={value => set({ mode: value === DEFAULT ? null : value })} />}
|
|
118
|
+
{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."
|
|
119
|
+
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}
|
|
120
|
+
onValueChange={value => set({ dailyCap: Number(value) })} />}
|
|
121
|
+
{role === "ranker" && <SettingsSelect label="Ranks every" value={String(r.cadenceMinutes ?? 60)} disabled={busy}
|
|
122
|
+
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` }))}
|
|
123
|
+
onValueChange={value => set({ cadenceMinutes: Number(value) })} />}
|
|
124
|
+
{role === "ranker" && <SettingsSelect label="At most per day" value={String(r.dailyCap ?? 24)} disabled={busy}
|
|
125
|
+
options={withCurrent([6, 12, 24, 48, 96], r.dailyCap ?? 24).map(n => ({ value: String(n), label: String(n) }))}
|
|
126
|
+
onValueChange={value => set({ dailyCap: Number(value) })} />}
|
|
127
|
+
{compact && <View style={{ flexDirection: "row", paddingHorizontal: 8, paddingVertical: 6 }}>{reset}</View>}
|
|
128
|
+
</SettingsCard>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const roleDefaultText = (role: AgentRole) => role === "recovery" ? "the main agent's setup" : role === "overseer" ? "Claude, newest Opus" : role === "about" ? "Claude Haiku" : "Claude Sonnet, hourly";
|
|
132
|
+
const withCurrent = (list: number[], value: number) => [...new Set([...list, value])].sort((a, b) => a - b);
|