paseo-follow-up 2.4.0-beta.9 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/CHANGELOG.md +159 -0
  2. package/OVERVIEW.md +1 -1
  3. package/README.md +81 -22
  4. package/client/agents.tsx +8 -26
  5. package/client/brief-since.tsx +4 -3
  6. package/client/compass-settings.tsx +156 -87
  7. package/client/display.tsx +2 -1
  8. package/client/header.tsx +2 -2
  9. package/client/home-chrome.tsx +24 -13
  10. package/client/home-data.ts +1 -1
  11. package/client/home-list.tsx +2 -1
  12. package/client/home-view.ts +7 -9
  13. package/client/home.tsx +9 -4
  14. package/client/job-rows.tsx +56 -7
  15. package/client/list-keys.ts +2 -1
  16. package/client/morning-brief-settings.tsx +11 -1
  17. package/client/new-entry.tsx +42 -2
  18. package/client/new-settings.tsx +29 -13
  19. package/client/new.tsx +89 -43
  20. package/client/onboarding.tsx +75 -29
  21. package/client/release-notes.tsx +11 -7
  22. package/client/reviewers.tsx +1 -1
  23. package/client/row-badges.tsx +37 -0
  24. package/client/search-focus.ts +85 -0
  25. package/client/search-key.ts +6 -12
  26. package/client/stacks.tsx +9 -2
  27. package/docs/screenshots/follow-up-slide-1-cover.png +0 -0
  28. package/docs/screenshots/follow-up-slide-2-decision.png +0 -0
  29. package/docs/screenshots/follow-up-slide-3-overseer.png +0 -0
  30. package/docs/screenshots/follow-up-slide-4-repairs.png +0 -0
  31. package/docs/screenshots/follow-up-slide-5-deploy.png +0 -0
  32. package/docs/screenshots/follow-up-slide-6-catch-up.png +0 -0
  33. package/index.client.tsx +12 -6
  34. package/index.server.ts +89 -25
  35. package/package.json +4 -3
  36. package/paseo-plugin.json +7 -9
  37. package/server/about.ts +4 -1
  38. package/server/agent-hook.mjs +12 -4
  39. package/server/agent-settings.ts +19 -3
  40. package/server/brief-sources.ts +4 -2
  41. package/server/compass.ts +310 -41
  42. package/server/daemon.ts +11 -3
  43. package/server/dispatch.ts +3 -2
  44. package/server/engine.ts +19 -6
  45. package/server/github-api.ts +17 -6
  46. package/server/github-setup.ts +126 -0
  47. package/server/github.ts +28 -0
  48. package/server/hook-source.ts +12 -4
  49. package/server/host-features.ts +21 -1
  50. package/server/linear-issues.ts +4 -3
  51. package/server/linear-queue.ts +3 -0
  52. package/server/mcp-source.ts +5 -3
  53. package/server/mcp.mjs +5 -3
  54. package/server/memory.ts +47 -19
  55. package/server/onboarding.ts +3 -2
  56. package/server/pr-actions.ts +12 -1
  57. package/server/pr-stats-sync.ts +4 -2
  58. package/server/pr-stats.ts +4 -0
  59. package/server/ranker.ts +4 -2
  60. package/server/reviewer-config.ts +3 -1
  61. package/server/session-mcp.ts +3 -2
  62. package/server/session-prompt.ts +34 -8
  63. package/server/wait-for-checks.ts +9 -0
  64. package/shared/agent-settings.ts +17 -9
  65. package/shared/attention.ts +4 -0
  66. package/shared/brief-sources.ts +23 -8
  67. package/shared/changelog.ts +32 -8
  68. package/shared/compass.ts +155 -25
  69. package/shared/contracts.ts +2 -2
  70. package/shared/dispatch.ts +61 -6
  71. package/shared/display.ts +4 -1
  72. package/shared/github-setup.ts +46 -0
  73. package/shared/job-rows.ts +40 -6
  74. package/shared/list-entries.ts +3 -2
  75. package/shared/model.ts +6 -0
  76. package/shared/new-name.ts +27 -0
  77. package/shared/new-view.ts +11 -8
  78. package/shared/onboarding.ts +77 -15
  79. package/shared/provider-support.ts +70 -0
  80. package/shared/recommend.ts +3 -2
  81. package/shared/row-badges.ts +24 -0
  82. package/shared/search-focus.ts +76 -0
  83. package/shared/search-key.ts +3 -2
  84. package/shared/settings-nav.ts +2 -1
  85. package/docs/screenshots/follow-up-home.png +0 -0
  86. package/docs/screenshots/follow-up-linked-items.png +0 -0
  87. package/docs/screenshots/follow-up-notes-home.png +0 -0
  88. package/docs/screenshots/follow-up-notes-panel.png +0 -0
  89. package/docs/screenshots/follow-up-panel.png +0 -0
  90. package/docs/screenshots/follow-up-phone.png +0 -0
  91. package/docs/screenshots/follow-up-pill.png +0 -0
  92. package/docs/screenshots/follow-up-pr-sheet.png +0 -0
  93. package/docs/screenshots/follow-up-questions.png +0 -0
  94. package/docs/screenshots/follow-up-send-to-paseo-dark.png +0 -0
  95. package/docs/screenshots/follow-up-send-to-paseo-light.png +0 -0
  96. package/docs/screenshots/follow-up-setup.png +0 -0
  97. package/docs/screenshots/follow-up-sidebar.png +0 -0
@@ -127,7 +127,7 @@ export function ReviewerSettings({ theme, compact = false }: { theme: Theme; com
127
127
  const fallback = data.config.defaults.length ? `Uses the default: ${data.config.defaults.map(reviewerLabel).join(", ")}` : null;
128
128
  return <View style={{ gap: 8 }}>
129
129
  <View style={{ borderRadius: 10, borderWidth: 1, borderColor: c.border, backgroundColor: c.surface1, overflow: "hidden" }}>
130
- <ReviewerList first repo={null} list={data.config.defaults} theme={theme} compact={compact} fallback="Nobody. Repositories without their own list open the picker." />
130
+ <ReviewerList first repo={null} list={data.config.defaults} theme={theme} compact={compact} fallback="Nobody yet. Without a list, Add reviewers asks you who each time." />
131
131
  </View>
132
132
  {data.repos.length > 0 ? <Disclosure id="reviewers.repos" title="Repositories" summary={reposSummary(data.repos, data.config)}
133
133
  defaultOpen={!reviewersConfigured(data.config)} theme={theme} compact={compact}>
@@ -0,0 +1,37 @@
1
+ import type { PluginClientContext } from "@getpaseo/plugin/client";
2
+ import * as uiApi from "@getpaseo/plugin/client/ui";
3
+ import { useCallback, useSyncExternalStore, type ComponentType } from "react";
4
+ import { DONE_BADGE, doneBadge, type RowBadge } from "../shared/row-badges";
5
+ import { subscribeClock } from "./home-data";
6
+ import type { LiveStore } from "./live";
7
+
8
+ /**
9
+ * Paseo 0.17.1's sidebar workspace-row badges (shared/row-badges.ts). Each row reads the live store Home, the pill and
10
+ * the header dots already share (the worker's feed on 0.16+), so a badge adds no poll and no request. Each row
11
+ * re-renders only when its own answer changes. Hiding one is the Show menu's toggle (the item's title).
12
+ */
13
+ type RowBadgeItemProps = { workspaceId: string };
14
+ type RowBadgeHost = { addWorkspaceRowBadgeItem(c: { id: string; title: string; icon: string; Component: ComponentType<RowBadgeItemProps> }): (() => void) | void };
15
+
16
+ /** Whether this host draws workspace-row badges (Paseo 0.17.1 and later). */
17
+ export function supportsRowBadges(client: PluginClientContext): boolean {
18
+ return typeof (client as unknown as Partial<RowBadgeHost>).addWorkspaceRowBadgeItem === "function"
19
+ && typeof (uiApi as unknown as { WorkspaceRowBadge?: unknown }).WorkspaceRowBadge !== "undefined";
20
+ }
21
+
22
+ /** Registers Follow-up's row badges on a host that has them; on older hosts nothing registers (the worker keeps the Done label). */
23
+ export function contributeRowBadges(client: PluginClientContext, store: LiveStore): () => void {
24
+ if (!supportsRowBadges(client)) return () => undefined;
25
+ const Badge = (uiApi as unknown as { WorkspaceRowBadge: ComponentType<RowBadge> }).WorkspaceRowBadge;
26
+ // The store and the shared minute clock (Done can clear when a deploy window ends), as one subscription.
27
+ const subscribe = (listener: () => void) => { const a = store.subscribe(listener), b = subscribeClock(listener); return () => { a(); b(); }; };
28
+
29
+ function DoneRowBadge({ workspaceId }: RowBadgeItemProps) {
30
+ const done = useSyncExternalStore(subscribe, useCallback(() => !!doneBadge(store.get(workspaceId), Date.now()), [workspaceId]));
31
+ const badge = done ? doneBadge(store.get(workspaceId), Date.now()) : null;
32
+ return badge ? <Badge {...badge} /> : null;
33
+ }
34
+
35
+ const remove = (client as unknown as RowBadgeHost).addWorkspaceRowBadgeItem({ ...DONE_BADGE, Component: DoneRowBadge });
36
+ return () => { if (typeof remove === "function") remove(); };
37
+ }
@@ -0,0 +1,85 @@
1
+ import { useEffect } from "react";
2
+ import { Platform } from "react-native";
3
+ import { overlayOver, surfaceVisible } from "../shared/list-keys";
4
+ import { OVERLAYS } from "./list-keys";
5
+ import { createSearchFocus, type SearchFocus } from "../shared/search-focus";
6
+
7
+ /**
8
+ * The web side of every-search-request-lands-in-the-visible-search (shared/search-focus.ts). A request is held until
9
+ * the developer acts: a key, a pointer, a click (voice control and a screen reader's activate send a click with no
10
+ * pointer), a wheel or typed input, heard on the window in the capture phase so it runs before the request's own key
11
+ * handler (that key makes the request after this runs). While it holds, focus moving without the developer tries again
12
+ * (`focusMoved`), except on a touch screen, where a focus() nobody tapped for would pop the keyboard up unasked. Native
13
+ * hears none of those events, so there the request ends with the first field that mounts or lays out after it.
14
+ */
15
+ type Listen = (type: string, listener: (e: { target?: unknown }) => void, capture?: boolean) => void;
16
+ type Doc = { activeElement?: unknown; visibilityState?: string; querySelectorAll?(selector: string): Iterable<unknown> };
17
+ type Win = { addEventListener?: Listen; removeEventListener?: Listen; document?: Doc; matchMedia?(q: string): { matches: boolean } };
18
+ type El = { closest?(selector: string): unknown };
19
+
20
+ /** Where focus went: into a dialog or menu (the request waits for it), or onto a Home search. */
21
+ const DIALOG = '[role="dialog"],[role="alertdialog"],[aria-modal="true"],[role="menu"]';
22
+ export const SEARCH_FIELD_ATTR = "data-follow-up-search";
23
+ const CANCEL_EVENTS = ["keydown", "pointerdown", "click", "wheel", "touchstart", "input"] as const;
24
+
25
+ export function createWebSearchFocus(): SearchFocus & { install(): () => void } {
26
+ const focus = createSearchFocus();
27
+ const win = globalThis as Win;
28
+ const web = Platform.OS === "web" && typeof win.addEventListener === "function";
29
+ // Native: the first field that mounts or lays out after a request ends it, whether it took the caret or not.
30
+ const native = <T,>(out: T) => { if (!web) focus.cancel(); return out; };
31
+ return {
32
+ ...focus,
33
+ request: () => { const took = focus.request(); if (took) native(0); return took; },
34
+ changed: () => native(focus.changed()),
35
+ register: field => native(focus.register(field)),
36
+ install() {
37
+ if (!web) return () => undefined;
38
+ const cancel = () => focus.cancel();
39
+ const coarse = !!win.matchMedia?.("(pointer: coarse)").matches;
40
+ const moved = (e: { target?: unknown }) => {
41
+ if (!focus.wanted()) return;
42
+ if (coarse) { focus.cancel(); return; }
43
+ const el = e.target as El | null;
44
+ focus.focusMoved({ dialog: !!el?.closest?.(DIALOG), search: !!el?.closest?.(`[${SEARCH_FIELD_ATTR}]`) });
45
+ };
46
+ for (const t of CANCEL_EVENTS) win.addEventListener!(t, cancel, true);
47
+ win.addEventListener!("focusin", moved, true);
48
+ return () => { for (const t of CANCEL_EVENTS) win.removeEventListener?.(t, cancel, true); win.removeEventListener?.("focusin", moved, true); };
49
+ },
50
+ };
51
+ }
52
+
53
+ type Input = { focus(): void; select?(): void; checkVisibility?(): boolean; getClientRects?(): { length: number } };
54
+
55
+ /**
56
+ * Registers Home's search field with the one owner of search focus while it is mounted. Shown means laid out on the
57
+ * visible page (`surfaceVisible`): a Home Paseo keeps mounted behind another screen never takes the caret. Covered: a
58
+ * menu or modal dialog is drawn over it (`overlayOver`), so the request waits instead of fighting the dialog. Landing
59
+ * selects the query, so typing replaces it, as in a command palette. Returns the field's onLayout, which tries a
60
+ * waiting request again when the field comes on screen. The field carries SEARCH_FIELD_ATTR (QueryField's `dataSet`).
61
+ */
62
+ export function useSearchFocusField(owner: SearchFocus, ref: { current: unknown }): () => void {
63
+ useEffect(() => {
64
+ const doc = (globalThis as Win).document;
65
+ const web = Platform.OS === "web" && !!doc;
66
+ return owner.register({
67
+ shown: () => { const el = ref.current as Input | null; return !!el && (!web || surfaceVisible(el, doc!)); },
68
+ covered: () => web && overlayOver((doc!.querySelectorAll?.(OVERLAYS) ?? []) as never, ref.current),
69
+ focused: () => web ? !!ref.current && doc!.activeElement === ref.current : !!(ref.current as { isFocused?(): boolean } | null)?.isFocused?.(),
70
+ focus: () => { const el = ref.current as Input | null; el?.focus(); if (web) el?.select?.(); },
71
+ });
72
+ }, [owner, ref]);
73
+ return () => { if (owner.wanted()) owner.changed(); };
74
+ }
75
+
76
+ /**
77
+ * The one way to ask for Home's search (the search key and ⌘K "Follow-up: Search"): the request is held by the
78
+ * owner, and Home's list opens unless a Home search is already on screen. The route alone never decides: Catch up, PR
79
+ * stats, the queue and the log share Home's route, and on a phone Home's route can show a row's detail, none of them
80
+ * with the search drawn. Whichever search field then comes on screen takes the caret.
81
+ */
82
+ export function requestSearch(owner: SearchFocus, open: () => void): void {
83
+ owner.request();
84
+ if (!owner.shown()) open();
85
+ }
@@ -3,6 +3,8 @@ import type { PluginClientContext } from "@getpaseo/plugin/client";
3
3
  import { displayPreferences, displayRpc } from "../shared/display";
4
4
  import { isDesktopApp, isMac, matchesShortcut, newShortcutPreset, searchShortcutOf, shortcutLabel, type KeyEventLike, type NewShortcut, type SearchShortcut } from "../shared/search-key";
5
5
  import { subscribeDisplay } from "./display";
6
+ import { requestSearch } from "./search-focus";
7
+ import type { SearchFocus } from "../shared/search-focus";
6
8
 
7
9
  type DomKey = KeyEventLike & { target?: { closest?(selector: string): unknown } | null; preventDefault(): void; stopPropagation(): void };
8
10
 
@@ -13,15 +15,9 @@ type DomKey = KeyEventLike & { target?: { closest?(selector: string): unknown }
13
15
  export const EDITOR_SELECTOR = ".cm-editor, .monaco-editor";
14
16
  type Win = {
15
17
  navigator?: { platform?: string; userAgent?: string };
16
- location?: { pathname?: string };
17
18
  document?: { addEventListener(t: "keydown", f: (e: DomKey) => void, capture?: boolean): void; removeEventListener(t: "keydown", f: (e: DomKey) => void, capture?: boolean): void };
18
19
  };
19
20
 
20
- /** Home's route in Paseo's web app (scripts/ui-home.mjs `homeUrl`): the shortcut there only moves the cursor. */
21
- export function onHomeRoute(pathname: string | undefined, screenId: string): boolean {
22
- return !!pathname && pathname.includes(`/surface/${screenId}`);
23
- }
24
-
25
21
  /** The current key and its label, kept in step with the Display setting; listeners hear every change. */
26
22
  export function createSearchKey() {
27
23
  let preset: SearchShortcut = searchShortcutOf(undefined);
@@ -61,7 +57,7 @@ export type NewKey = ReturnType<typeof createNewKey>;
61
57
  * Display setting `search_shortcut`, read once at start and then from the Display feed or poll. Inside a code editor
62
58
  * the key stays the editor's (EDITOR_SELECTOR). New from anywhere (`extra`) is matched by the same listener.
63
59
  */
64
- export function installSearchShortcut(client: PluginClientContext, key: SearchKey, open: { screenId: string; focus: () => void }, extra?: { key: NewKey; open: () => void }): () => void {
60
+ export function installSearchShortcut(client: PluginClientContext, key: SearchKey, open: { screenId: string; focus: SearchFocus }, extra?: { key: NewKey; open: () => void }): () => void {
65
61
  const win = globalThis as Win;
66
62
  const doc = win.document;
67
63
  if (Platform.OS !== "web" || !doc) return () => undefined;
@@ -78,11 +74,9 @@ export function installSearchShortcut(client: PluginClientContext, key: SearchKe
78
74
  if (extra && matchesShortcut(e, extra.key.preset(), mac) && !e.target?.closest?.(EDITOR_SELECTOR)) { e.preventDefault(); e.stopPropagation(); extra.open(); return; }
79
75
  if (!matchesShortcut(e, key.preset(), mac) || e.target?.closest?.(EDITOR_SELECTOR)) return;
80
76
  e.preventDefault(); e.stopPropagation();
81
- if (onHomeRoute(win.location?.pathname, open.screenId)) { open.focus(); return; }
82
- client.openScreen({ screenId: open.screenId });
83
- // A Home that mounts now takes the request on mount; one kept mounted behind takes it once it's on screen.
84
- const raf = typeof requestAnimationFrame === "function" ? requestAnimationFrame : (f: () => void) => setTimeout(f, 16);
85
- raf(() => raf(() => open.focus()));
77
+ // every-search-request-lands-in-the-visible-search: one request, held until the developer acts; Home opens unless
78
+ // its search is on screen, and the search field that comes on screen takes the caret.
79
+ requestSearch(open.focus, () => client.openScreen({ screenId: open.screenId }));
86
80
  };
87
81
  doc.addEventListener("keydown", onKey, true);
88
82
  return () => { live = false; offDisplay(); doc.removeEventListener("keydown", onKey, true); };
package/client/stacks.tsx CHANGED
@@ -1,8 +1,10 @@
1
1
  import { View } from "react-native";
2
2
  import { Pressable, Text } from "./text";
3
+ import { openExternalUrl } from "@getpaseo/plugin/client";
3
4
  import { Icon } from "@getpaseo/plugin/client/ui";
4
5
  import type { Pr, Workspace } from "../shared/model";
5
6
  import { compactPrStatus, githubWaitLine, orderedStacks, settledForDisplay } from "../shared/presentation";
7
+ import { githubOffLine } from "../shared/github-setup";
6
8
  import { mergeQueued, prTone, quietFold, stackOrder, type StackItem } from "../shared/attention";
7
9
  import { reviewersMissing } from "../shared/pr-workflow";
8
10
  import { isGithubFlow } from "../shared/pr-actions";
@@ -145,7 +147,9 @@ export function StacksCard({ workspace: w, theme, compact, open, toggle, onOpen,
145
147
  const showRepo = new Set(w.prs.map(p => p.repo)).size > 1;
146
148
  const openCount = w.prs.filter(p => p.snapshot?.state === "OPEN").length;
147
149
  const inFlight = w.prActions.filter(a => a.state === "sending");
148
- const wait = githubWaitLine(w, Date.now());
150
+ // One slot for why the statuses below may be missing or behind: GitHub off (works-without-github), else the budget.
151
+ const off = githubOffLine(w.githubOff);
152
+ const wait = off ?? githubWaitLine(w, Date.now());
149
153
  const settledOpen = open("settled");
150
154
  const settledPrs = settled.reduce((n, s) => n + s.prs.length, 0);
151
155
  // Every PR in the order the card draws them, settled stacks included: the search's "n of N" and its filter.
@@ -159,10 +163,13 @@ export function StacksCard({ workspace: w, theme, compact, open, toggle, onOpen,
159
163
  <RichText style={[t.meta, { flex: 1, color: c.foreground }]}>{a.result || (isGithubFlow(w.prs.find(p => p.key === a.prs[0])?.snapshot) ? "Sending to GitHub…" : "Submitting to Graphite…")}</RichText>
160
164
  </View>)}
161
165
  {!hits && wait && <View accessible accessibilityLabel={wait.label} style={{ flexDirection: "row", gap: 8, paddingHorizontal: 12, paddingVertical: 8, borderTopWidth: 1, borderTopColor: c.border }}>
162
- <View style={{ paddingTop: 2 }}><Icon name="CirclePause" size={13} color={c.foregroundMuted} /></View>
166
+ <View style={{ paddingTop: 2 }}><Icon name={off ? "CircleMinus" : "CirclePause"} size={13} color={c.foregroundMuted} /></View>
163
167
  <View style={{ flex: 1, gap: 2 }}>
164
168
  <Text style={[t.meta, { color: c.foreground, fontVariant: ["tabular-nums"] }]}>{wait.title}</Text>
165
169
  <Text style={t.meta}>{wait.detail}</Text>
170
+ {off?.url && <Pressable accessibilityRole="link" accessibilityLabel="Get the GitHub CLI (opens cli.github.com)" onPress={() => void openExternalUrl(off.url!).catch(() => undefined)} hitSlop={compact ? 10 : 6} style={{ alignSelf: "flex-start", minHeight: compact ? 44 : undefined, justifyContent: "center" }}>
171
+ <Text style={[t.meta, { color: c.accent }]}>Get the GitHub CLI</Text>
172
+ </Pressable>}
166
173
  </View>
167
174
  </View>}
168
175
  {!hits && <HeldMerges workspace={w} theme={theme} compact={compact} framed />}
package/index.client.tsx CHANGED
@@ -1,7 +1,9 @@
1
1
  import { LEGACY_SETTINGS_SCREEN } from "./shared/legacy";
2
2
  import { contributeDisplay } from "./client/display";
3
3
  import { createNewKey, createSearchKey, installSearchShortcut } from "./client/search-key";
4
- import { NewSidebarRow } from "./client/new-entry";
4
+ import { requestSearch } from "./client/search-focus";
5
+ import { contributeNewRow } from "./client/new-entry";
6
+ import { NEW_NAME, OLD_NAMES } from "./shared/new-name";
5
7
  import { closeNew, newShowing, openNew, setNewFallback, type NewRequest } from "./client/new";
6
8
  import { withButtonVisibility } from "./client/button-visibility";
7
9
  import { openExternalUrl, type PluginClientContext, type PluginButtonRegistration, type PluginScreenProps, type PluginSurfaceProps, type PluginWorkspacePanelProps } from "@getpaseo/plugin/client";
@@ -21,6 +23,7 @@ import { hasFeeds } from "./client/feeds";
21
23
  import { createLiveStore, headerIcon, sidebarItem } from "./client/live";
22
24
  import { FOLLOW_UP_ICON } from "./client/follow-up-icon";
23
25
  import { contributeFollowUpPill } from "./client/pill";
26
+ import { contributeRowBadges } from "./client/row-badges";
24
27
  import { FollowLarge, LARGE_SCREEN } from "./client/large";
25
28
  import { bindDismissInbox } from "./client/dismiss";
26
29
  import { createInboxStore } from "./client/inbox-store";
@@ -157,6 +160,8 @@ export default function contribute(host: PluginClientContext) {
157
160
  // Agents and workspaces an agent creates: a card that opens them, relayed through Home (timeline items get no navigation).
158
161
  contributeCreated(client, { watchAgent: hasFeeds(client) ? extras.watchAgent : null, openAgent: briefDeps.openAgent, openWorkspace: workspaceId => client.openScreen({ screenId: OVERVIEW, params: { next: String(++nextToken), openWorkspace: workspaceId } }) }),
159
162
  contributeFollowUpPill(client, { inbox, live: store, openPanel, openNext }),
163
+ // Paseo 0.17.1+: Done on sidebar workspace rows, in place of the worker's Done label (client/row-badges.tsx).
164
+ contributeRowBadges(host, store),
160
165
  contributeInboxCommands(client, inbox, openNext),
161
166
  contributeBrief(client, briefDeps),
162
167
  ];
@@ -176,7 +181,7 @@ export default function contribute(host: PluginClientContext) {
176
181
  void removeSearch?.();
177
182
  const label = searchKey.label();
178
183
  removeSearch = client.addCommandCenterItem({ id: "follow-up-search", title: label ? `Follow-up: Search (${label})` : "Follow-up: Search", icon: "Search", keywords: ["search", "find", "workspace", "branch", "PR", "omnibox", "shortcut"], context: "global",
179
- onSelect({ openScreen }) { openScreen({ screenId: OVERVIEW }); extras.focusSearch(); } });
184
+ onSelect({ openScreen }) { requestSearch(extras.searchFocus, () => openScreen({ screenId: OVERVIEW })); } });
180
185
  };
181
186
  syncSearch();
182
187
  // ⌘K "Follow-up: New…" names New's key the same way, re-listed when it changes.
@@ -184,14 +189,15 @@ export default function contribute(host: PluginClientContext) {
184
189
  const syncNew = () => {
185
190
  void removeNew?.();
186
191
  const label = newKey.label();
187
- removeNew = client.addCommandCenterItem({ id: "follow-up-new", title: label ? `Follow-up: New… (${label})` : "Follow-up: New…", icon: "Plus", keywords: ["new", "dispatch", "start", "workspace", "issue", "linear", "task", "create"], context: "global",
192
+ removeNew = client.addCommandCenterItem({ id: "follow-up-new", title: label ? `Follow-up: ${NEW_NAME}… (${label})` : `Follow-up: ${NEW_NAME}…`, icon: "Plus", keywords: [...OLD_NAMES, "dispatch", "start", "workspace", "issue", "linear", "task", "create"], context: "global",
188
193
  onSelect({ openScreen }) { enterNew(openScreen); } });
189
194
  };
190
195
  syncNew();
191
196
  removers.push(newKey.subscribe(syncNew), () => removeNew?.());
192
- // The sidebar's New row (Paseo lists it as "New" in Settings → Sidebar → Header, beside its own "New workspace").
193
- removers.push(client.addSidebarHeaderItem({ id: "new", title: "New", Component: NewSidebarRow(newKey, enterNew) }));
194
- removers.push(searchKey.subscribe(syncSearch), () => removeSearch?.(), installSearchShortcut(client, searchKey, { screenId: OVERVIEW, focus: () => extras.focusSearch() }, { key: newKey, open: openNewAnywhere }));
197
+ // The sidebar's New row, optional (its Display switch, new-row-is-optional). Paseo also lists it under its title in Settings →
198
+ // Sidebar → Header, beside its own "New workspace".
199
+ removers.push(contributeNewRow(client, newKey, enterNew));
200
+ removers.push(searchKey.subscribe(syncSearch), () => removeSearch?.(), installSearchShortcut(client, searchKey, { screenId: OVERVIEW, focus: extras.searchFocus }, { key: newKey, open: openNewAnywhere }));
195
201
  // Phase 2: only on hosts with the sidebar-view API (Paseo main after 2026-11-07).
196
202
  const views = sidebarViewHost(host);
197
203
  if (views) removers.push(views.addSidebarView({ id: "needs-you", title: "Follow-up: Needs you", description: "Agents that need you until you sign them off, then your workspaces.", Component: inboxSidebarView(sources, () => client.openScreen({ screenId: OVERVIEW, params: { item: OVERSEER_KEY, at: String(Date.now()) } })) }));
package/index.server.ts CHANGED
@@ -32,6 +32,8 @@ import * as rpc from "./shared/contracts";
32
32
  import { LogRing } from "./server/report-issue/diagnostics";
33
33
  import { followUpReporter } from "./server/report-issue-adapter";
34
34
  import { githubApi } from "./server/github-api";
35
+ import { githubSetup } from "./server/github-setup";
36
+ import { GithubOffError, githubOffText } from "./shared/github-setup";
35
37
  import { browserRepositories, browserWorkspaces, prClaims, prOwner } from "./server/pr-owner";
36
38
  import { type Workspace } from "./shared/model";
37
39
  import { createdItems } from "./server/created-items";
@@ -100,13 +102,14 @@ import { teamOf } from "./shared/linked";
100
102
  import { holderOf, issueWorkspaces } from "./shared/issue-workspace";
101
103
  import { currentSummary } from "./shared/about";
102
104
  import { RpcTiming } from "./server/rpc-timing";
103
- import { hostFeature, type ServerInfo } from "./server/host-features";
105
+ import { hostAtLeast, hostFeature, ROW_BADGES_SINCE, type ServerInfo } from "./server/host-features";
104
106
  import { CODEX_PROMPT_MIN, atLeast, codexVersion, withSystemPrompt, type BridgeTexts, type PromptDeps } from "./server/session-prompt";
107
+ import { isAcp } from "./shared/provider-support";
105
108
  import { newWorkspaceTarget, sendReport, type ReportSendDeps } from "./server/report-send";
106
109
  type ServerInfoClient = { getLastServerInfoMessage?: () => ServerInfo };
107
110
  import { inboxAnswer } from "./server/etag";
108
111
  import { CheckWatches } from "./server/check-watches";
109
- import { waitForChecksAnswer } from "./server/wait-for-checks";
112
+ import { githubOffChecksAnswer, waitForChecksAnswer } from "./server/wait-for-checks";
110
113
  import { jobAgentRunner, type JobPaseo } from "./server/job-agent";
111
114
  import { AiJobs } from "./server/ai-jobs";
112
115
  import { liveRankSources, Ranker, RANKER_ROLE_DEFAULT } from "./server/ranker";
@@ -126,9 +129,9 @@ import { AgentSettingsStore, ProviderCatalog, type CatalogSource } from "./serve
126
129
  import { labelsFor, providerName, resolveRole, roleSummary, type AgentSettingsView } from "./shared/agent-settings";
127
130
  import type { LoadSignals } from "./shared/agent-load";
128
131
  import { OnboardingStore, ReadinessChecks, nativeAgentCount } from "./server/onboarding";
129
- import { updatesConsent } from "./shared/onboarding";
132
+ import { updatesConsent, type GhResult } from "./shared/onboarding";
130
133
  import { execFile, spawn } from "node:child_process";
131
- import { compactHeap, watchMemory } from "./server/memory";
134
+ import { compactHeap, watchMemory, writeHeartbeat } from "./server/memory";
132
135
  import { UpdatesStore } from "./server/updates";
133
136
  import { Updater } from "./server/updater";
134
137
  import { RegistryChecker, registryUrl, type RegistrySnapshot } from "./server/update-registry";
@@ -281,7 +284,7 @@ export default function contribute(server: PluginServerContext) {
281
284
  const listCache = new ListCache();
282
285
  engine.paused = () => !governor.allowsBackground();
283
286
  // PR statistics (docs/pr-stats.md): every request through the stats gate, which reads and feeds the PR poller's budget.
284
- const prStats = new PrStats({ directory, api: githubApi(), clientTimeZone: () => clientTimeZone, graphite: repo => prWorkflow.cachedWorkflow(repo) === "graphite",
287
+ const prStats = new PrStats({ directory, api: githubApi(), githubOff: () => github.off(), clientTimeZone: () => clientTimeZone, graphite: repo => prWorkflow.cachedWorkflow(repo) === "graphite",
285
288
  gate: { budget: owner => github.budget(owner), noteRateLimit: (owner, rate) => github.noteRateLimit(owner, rate), noteLimited: (owner, at) => github.noteLimited(owner, at), allowsBackground: () => governor.allowsBackground() } });
286
289
  engine.autoSendsHeld = () => onboarding.holdsAutoSends();
287
290
  const archive = batchArchive(directory);
@@ -298,8 +301,12 @@ export default function contribute(server: PluginServerContext) {
298
301
  if (!api) { unsent.set(`${agentId}|${brief.id}`, { agentId, brief }); return; }
299
302
  await api.agents.ref(agentId).timeline.append({ type: "plugin", id: brief.id, kind: BRIEF_KIND, version: BRIEF_VERSION, data: brief });
300
303
  };
304
+ let catalogKicked = false;
301
305
  const seen = (paseo: PaseoApi) => {
302
306
  api = paseo;
307
+ // The first Paseo handle: read the provider catalog once in the background, so a helper left on its default runs
308
+ // on a provider Paseo has from its first job (runnableRole), without any RPC waiting on it.
309
+ if (!catalogKicked) { catalogKicked = true; queueMicrotask(() => void providerCatalog.read().catch(() => undefined)); }
303
310
  for (const [key, row] of unsent) { unsent.delete(key); void append(row.agentId, row.brief).catch(() => undefined); }
304
311
  };
305
312
  const needsYouPath = (agentId: string) => join(directory, "hook-state", `needs-you-${agentId}.json`);
@@ -605,6 +612,8 @@ export default function contribute(server: PluginServerContext) {
605
612
  // Paseo's features.workspaceMultiplicity: more than one workspace on one folder, which a report's new (directory) workspace needs.
606
613
  const hostMultiplicity = hostFeature("workspaceMultiplicity", () => withDaemon(async client => (client as ServerInfoClient).getLastServerInfoMessage?.()));
607
614
  gateway.backgroundAgents = hostFeature("backgroundAgents", () => withDaemon(async client => (client as ServerInfoClient).getLastServerInfoMessage?.()));
615
+ // Paseo 0.17.1+: the client draws Done as a sidebar row badge, so the engine writes no Done label (docs/workspaces.md).
616
+ gateway.rowBadges = hostAtLeast(ROW_BADGES_SINCE, () => withDaemon(async client => (client as ServerInfoClient).getLastServerInfoMessage?.()));
608
617
  const wait = new Wait(join(directory, "wait"), { enabled: () => agentSettings.waitEnabled(), config: async () => await paseoConfig() as WaitPaseoConfig | null, hostBackgroundWork, legacyDirectory: existsSync(dataDirs(paseoHome).legacy) ? join(dataDirs(paseoHome).legacy, "wait") : null });
609
618
  const currentWait = async () => waitStatus(await agentSettings.waitEnabled(), await paseoConfig() as WaitPaseoConfig | null, await hostBackgroundWork());
610
619
  const live = async (agentId: string): Promise<Live> => ({ role: scopes(await store.snapshot())[agentId]?.role ?? null, inbox: (await inboxSettings()).enable_inbox });
@@ -614,8 +623,10 @@ export default function contribute(server: PluginServerContext) {
614
623
  };
615
624
  const withTools = async <R extends Parameters<typeof withSessionMcp>[0]>(request: R, recovery: boolean, brief: string | null, root: boolean, overseer = false): Promise<R> => {
616
625
  // FOLLOW_UP_TOOL_PROVIDERS / FOLLOW_UP_FORCE_STDIO exist for the isolated harness (scripts/check-native-tools.mjs).
617
- const providers = (process.env.FOLLOW_UP_TOOL_PROVIDERS ?? "claude,codex").split(",");
618
- if (request.purpose !== "interactive" || !providers.includes(request.provider) || request.labels["plugin-tools/enabled"] === "false") return request;
626
+ // Every provider gets the tools (an-agent-on-any-provider-gets-follow-up): Paseo serves them through its agent MCP to
627
+ // any provider that takes MCP servers. FOLLOW_UP_TOOL_PROVIDERS narrows it for the isolated harness only.
628
+ const providers = process.env.FOLLOW_UP_TOOL_PROVIDERS ? process.env.FOLLOW_UP_TOOL_PROVIDERS.split(",") : null;
629
+ if (request.purpose !== "interactive" || (providers && !providers.includes(request.provider)) || request.labels["plugin-tools/enabled"] === "false") return request;
619
630
  if (process.env.FOLLOW_UP_FORCE_STDIO !== "1" && nativeToolsAvailable(request, await paseoConfig())) {
620
631
  toolTransport = "native (Paseo's agent MCP)";
621
632
  const flags = { recovery, brief: !!brief && !recovery, root: root && !recovery, overseer: overseer && !recovery };
@@ -639,6 +650,8 @@ export default function contribute(server: PluginServerContext) {
639
650
  if (!stopped) timer = setTimeout(() => void loop(), TICK_MS);
640
651
  };
641
652
  void loop();
653
+ // works-without-github: learn whether GitHub is on once the worker is up, so GitHub actions answer from a known state.
654
+ void (async () => { await ready; if (!stopped && !loadError) void githubSetup().current().catch(() => undefined); })();
642
655
  void (async () => { await ready; if (stopped || loadError) return; void inbox.refreshDirectory().catch(() => undefined); if (governor.allowsExtras()) void usage.refresh(); await inbox.start().catch(error => { inboxError = error instanceof Error ? error.message : String(error); }); void inboxLoop(); })();
643
656
  const changed = (w: Workspace) => { w.completion = null; w.declaration = null; w.updatedAt = new Date().toISOString(); };
644
657
 
@@ -947,7 +960,13 @@ export default function contribute(server: PluginServerContext) {
947
960
  await requireReady();
948
961
  return store.mutate(state => controlWorkspace(state, input, Date.now(), clientTimeZone));
949
962
  });
950
- handle(rpc.refreshRpc, async ({ workspaceId }) => { await requireReady(); void engine.tick({ workspaceId }); return { ok: true }; });
963
+ handle(rpc.refreshRpc, async ({ workspaceId }) => {
964
+ await requireReady();
965
+ // While GitHub is off, Refresh checks it again first (one gh check, on the click), so turning it on shows at once.
966
+ const recheck = githubSetup().off() ? githubSetup().check().then(() => undefined, () => undefined) : Promise.resolve();
967
+ void recheck.then(() => engine.tick({ workspaceId }));
968
+ return { ok: true };
969
+ });
951
970
  handle(rpc.refineTasksRpc, async ({ workspaceId, tasks }) => {
952
971
  await requireReady();
953
972
  const result = await store.mutate(state => {
@@ -980,10 +999,17 @@ export default function contribute(server: PluginServerContext) {
980
999
  handle(rpc.browserStatusRpc, async () => { await requireReady(); return browser.status(); });
981
1000
  handle(rpc.browserExchangeRpc, async ({ clientId, ready: browserReady, acceptJobs, results, repositories }) => { await requireReady(); return { ...browser.exchange(clientId, browserReady, results, acceptJobs, repositories), repositories: browserRepositories(await store.snapshot()) }; });
982
1001
  handle(rpc.prControlStatusRpc, async ({ workspaceId, prKey }) => { await requireReady(); return actions.status(workspaceId, prKey); });
983
- handle(rpc.preparePrActionRpc, async ({ workspaceId, prKey, kind }) => { await requireReady(); return actions.prepare(workspaceId, prKey, kind); });
984
- handle(rpc.confirmPrActionRpc, async ({ planId, scope }) => { await requireReady(); const result = await actions.confirm(planId, scope); void engine.nudge(); return result; });
1002
+ // GitHub off (works-without-github): GitHub's own actions answer in one line at once, without waiting on the worker.
1003
+ // works-without-github: a GitHub action answers from the last known state and never waits on a gh check before it
1004
+ // replies (an-ack-never-waits-on-the-disk); an unknown state goes on, and the action's own gate decides later.
1005
+ const githubOffNow = () => github.offNow();
1006
+ const githubFirst = async (what: string) => { const off = githubOffNow(); if (off) throw new GithubOffError(off, what); };
1007
+ handle(rpc.preparePrActionRpc, async ({ workspaceId, prKey, kind }) => { await githubFirst(kind === "merge" ? "Merging" : "Merge when ready"); await requireReady(); return actions.prepare(workspaceId, prKey, kind); });
1008
+ handle(rpc.confirmPrActionRpc, async ({ planId, scope }) => { await githubFirst("Merging"); await requireReady(); const result = await actions.confirm(planId, scope); void engine.nudge(); return result; });
985
1009
  handle(rpc.checkPrActionRpc, async ({ workspaceId, actionId }) => { await requireReady(); return actions.check(workspaceId, actionId); });
986
1010
  handle(rpc.requestReviewersRpc, async ({ workspaceId, prKey, reviewers, remember }) => {
1011
+ // Remember still saves while GitHub is off: the developer's choice, for when it's on.
1012
+ if (githubOffNow()) { if (reviewers && remember) await reviewerStore.save(prKey.split("#")[0], reviewers); await githubFirst("Adding reviewers"); }
987
1013
  await requireReady();
988
1014
  // "Remember for <repo>" saves first: it's the developer's choice whatever GitHub answers.
989
1015
  if (reviewers && remember) await reviewerStore.save(prKey.split("#")[0], reviewers);
@@ -1054,7 +1080,7 @@ export default function contribute(server: PluginServerContext) {
1054
1080
  });
1055
1081
  handle(rpc.reviewerSettingsRpc, async () => { await requireReady(); return reviewerSettings(); });
1056
1082
  handle(rpc.saveReviewersRpc, async ({ repo, reviewers }) => { await requireReady(); await reviewerStore.save(repo, reviewers); return reviewerSettings(); });
1057
- handle(rpc.reviewerSuggestionsRpc, async ({ repo }) => { await requireReady(); return reviewerSuggestions.suggest(repo); });
1083
+ handle(rpc.reviewerSuggestionsRpc, async ({ repo }) => { const off = githubOffNow(); if (off) return { suggestions: [], error: `${githubOffText(off, "Suggesting reviewers")} Until then, type a login or org/team.` }; await requireReady(); return reviewerSuggestions.suggest(repo); });
1058
1084
 
1059
1085
  const priorityStore = new PriorityStore(directory);
1060
1086
  // Paseo's workspace descriptors for the Overseer (name, project, branch), from the shared directory.
@@ -1157,9 +1183,10 @@ export default function contribute(server: PluginServerContext) {
1157
1183
  // it's there; server_info's version does, read from the connection's last hello (no request).
1158
1184
  const hostVersion = async () => { try { return String(((await withDaemon(async client => (client as ServerInfoClient).getLastServerInfoMessage?.())) as { version?: unknown } | null)?.version ?? ""); } catch { return ""; } };
1159
1185
  handle(rpc.waitForChecksRpc, async (input, { paseo }) => {
1186
+ if (!input.cancel) { const off = githubOffNow(); if (off) return githubOffChecksAnswer(off, input.prs); }
1160
1187
  await requireReady();
1161
1188
  return waitForChecksAnswer(input, {
1162
- state: () => store.snapshot(), watches: checkWatches, nudge: id => engine.nudge(id), hostVersion,
1189
+ state: () => store.snapshot(), watches: checkWatches, nudge: id => engine.nudge(id), hostVersion, githubOff: () => github.off(),
1163
1190
  register: (repo, number) => handlers.get(rpc.registerPrRpc.name)!.run({ agentId: input.agentId, repo, number, stack: `${repo}#${number}` }, { paseo } as PluginHandlerContext) as Promise<unknown>,
1164
1191
  });
1165
1192
  });
@@ -1178,10 +1205,18 @@ export default function contribute(server: PluginServerContext) {
1178
1205
  if (!snapshot.entries?.some(e => e.status === "loading")) return snapshot as Awaited<ReturnType<CatalogSource>>;
1179
1206
  return await paseo.providers.waitForReady({ timeoutMs: 8000 }).catch(() => snapshot) as unknown as Awaited<ReturnType<CatalogSource>>;
1180
1207
  });
1208
+ // A helper left on its default runs on a provider Paseo has (shared/job-rows.ts runnableRole): the last catalog read.
1209
+ // Reading a role never waits on Paseo (an-ack-never-waits-on-the-disk's rule for RPCs: overseer-status, Compass): with
1210
+ // no catalog yet it starts one read in the background (cached ten minutes) and keeps the default meanwhile. Never polled.
1211
+ agentSettings.catalog = async () => { const last = providerCatalog.peek(); if (!last && api) void providerCatalog.read().catch(() => undefined); return last; };
1181
1212
  const agentSettingsView = async (catalog: boolean, fresh = false): Promise<AgentSettingsView> => {
1182
- const [{ invalid }, roles] = await Promise.all([agentSettings.load(), agentSettings.all()]);
1213
+ // The catalog first, so the roles show what runs (a default on a provider Paseo lacks moves: runnableRole).
1183
1214
  const cat = catalog ? await providerCatalog.read(fresh) : null;
1184
- return { roles: Object.values(roles).map(r => ({ ...r, summary: roleSummary(r, labelsFor(r, cat)) })), invalid, catalog: cat, wait: await currentWait() };
1215
+ const [{ invalid }, roles] = await Promise.all([agentSettings.load(), agentSettings.all()]);
1216
+ // Which providers are ACP comes from Paseo's config (a generic ACP agent has the developer's own id): Settings' line.
1217
+ const config = cat ? await paseoConfig() as Parameters<typeof isAcp>[1] : null;
1218
+ const shown = cat ? { ...cat, providers: cat.providers.map(p => ({ ...p, acp: isAcp(p.id, config) })) } : null;
1219
+ return { roles: Object.values(roles).map(r => ({ ...r, summary: roleSummary(r, labelsFor(r, cat)) })), invalid, catalog: shown, wait: await currentWait() };
1185
1220
  };
1186
1221
  // What's new and Settings → General. Follow-up's own install comes from Paseo's plugin list, read once per worker.
1187
1222
  const versions = new VersionsStore(directory);
@@ -1274,8 +1309,9 @@ export default function contribute(server: PluginServerContext) {
1274
1309
  // The new worker reports in for the installer's probation once it is ready, with the reason if it couldn't start.
1275
1310
  void ready.then(async () => {
1276
1311
  const me = await selfInstall();
1277
- const beat = JSON.stringify({ version: me.version, at: Date.now(), error: loadError ? String(loadError).slice(0, 300) : null });
1278
- await writeFile(join(directory, "heartbeat.json"), beat, { mode: 0o600 });
1312
+ const fields = { version: me.version, at: Date.now(), error: loadError ? String(loadError).slice(0, 300) : null };
1313
+ const beat = JSON.stringify(fields);
1314
+ await writeHeartbeat(join(directory, "heartbeat.json"), fields);
1279
1315
  // A 1.x installer on probation reads the old directory's heartbeat; can go in the release after 2.0.0.
1280
1316
  try { writeLegacyHeartbeat(paseoHome, beat); } catch { /* no 1.x directory, or not writable: nothing watches it */ }
1281
1317
  if (!stopped) await updater.start();
@@ -1527,6 +1563,7 @@ export default function contribute(server: PluginServerContext) {
1527
1563
  if (id === "github") { await rankSources.github(); return; }
1528
1564
  if (id === "chat") { await rankSources.slack(Date.now() - 3_600_000); return; }
1529
1565
  if (id === "mail") { const now = Date.now(); await rankSources.mail!(now - 86_400_000, now); return; }
1566
+ if (id === "doc") { const r = await compass?.read("manual"); if (r && !r.ok) throw new Error(r.error ?? "The last read failed."); return; }
1530
1567
  const now = Date.now();
1531
1568
  await rankSources.calendar!({ start: new Date(now).toISOString(), end: new Date(now + 86_400_000).toISOString(), timeZone: (await briefClock()).timeZone });
1532
1569
  },
@@ -1551,8 +1588,18 @@ export default function contribute(server: PluginServerContext) {
1551
1588
  issueWorkspace: key => holders.get(key.toUpperCase())?.workspaceId ?? null,
1552
1589
  };
1553
1590
  },
1554
- allowed: chatAllowed, tight: () => !governor.allowsBackground(), appOpen: () => appOpen(),
1591
+ // Each reader honours its input's switch in Settings → Compass (a chat, docs or calendar server turned off isn't read).
1592
+ allowed: async recipeId => {
1593
+ if (recipeId === "chat") return chatAllowed();
1594
+ const g = await briefSources!.gate(recipeId);
1595
+ if (!g.on) throw new Error(`${recipeId === "doc" ? "Your docs are" : "Your calendar is"} off in Settings → Compass.`);
1596
+ return g.allowed;
1597
+ },
1598
+ tight: () => !governor.allowsBackground(), appOpen: () => appOpen(),
1555
1599
  issues: async () => (await linearQueue?.needs())?.issues ?? new Map(),
1600
+ // A Linear tracker place reads the sweep's own snapshot; a GitHub one, Follow-up's in-process GitHub reads.
1601
+ queue: async () => (await linearQueue?.snapshotIssues()) ?? [],
1602
+ github: { rest: (repo, path) => githubApi().rest(repo, path) },
1556
1603
  // Tell the agent (compass-reaches-an-agent-only-by-a-click): one queued message to the workspace's main agent.
1557
1604
  tell: async (workspaceId, text, by) => {
1558
1605
  const w = (await store.snapshot()).workspaces.find(x => x.id === workspaceId && !x.archived);
@@ -1991,7 +2038,14 @@ export default function contribute(server: PluginServerContext) {
1991
2038
  });
1992
2039
  // Readiness checks for the setup flow: gh, the helper providers and whether tools attach. On demand only, cached.
1993
2040
  const readiness = new ReadinessChecks({
1994
- gh: () => new Promise((resolve, reject) => execFile("gh", ["api", "user", "--jq", ".login"], { timeout: 10_000 }, (error, stdout, stderr) => error ? reject(Object.assign(error, { stderr })) : resolve(stdout))),
2041
+ // GitHub is optional (works-without-github): the setup's own check, then the signed-in login over the same
2042
+ // in-process client every read uses. Check again re-checks, so a gh installed meanwhile is picked up.
2043
+ gh: async (): Promise<GhResult> => {
2044
+ const state = await githubSetup().check();
2045
+ if (!state.on) return { error: state.off, message: "" };
2046
+ const user = await githubApi().restAs(null, "user") as { login?: unknown } | null;
2047
+ return { login: typeof user?.login === "string" ? user.login : "" };
2048
+ },
1995
2049
  catalog: () => providerCatalog.read(),
1996
2050
  use: async () => {
1997
2051
  const on = await inboxSettings();
@@ -2021,9 +2075,19 @@ export default function contribute(server: PluginServerContext) {
2021
2075
  const hostPrompt = hostFeature("checkoutWorktreeList", () => withDaemon(async client => (client as ServerInfoClient).getLastServerInfoMessage?.()));
2022
2076
  let codexPrompt: Promise<boolean> | null = null;
2023
2077
  const promptDeps: PromptDeps = {
2078
+ acp: async provider => isAcp(provider, await paseoConfig() as Parameters<typeof isAcp>[1]),
2024
2079
  hostSupports: hostPrompt,
2025
2080
  providerSupports: async provider => provider === "claude" || provider === "codex" && await (codexPrompt ??= codexVersion().then(v => atLeast(v, CODEX_PROMPT_MIN))),
2026
2081
  bridge: async () => await import(pathToFileURL(join(directory, "mcp.mjs")).href) as BridgeTexts,
2082
+ // A provider without Follow-up's hook gets the tracked workspace's instructions in its system prompt: the hook's own
2083
+ // text (agent-hook.mjs workspaceInstructions), for this agent's role in the store as it is now.
2084
+ workspace: async (agentId, native) => {
2085
+ const entry = scopes(await store.snapshot(), w => prWorkflow.agentWorkflow(workspaceRepo(w), touchedRepos(w)))[agentId];
2086
+ if (!entry || entry.role === "recovery") return null;
2087
+ (globalThis as { followUpHookLibrary?: boolean }).followUpHookLibrary = true;
2088
+ const hook = await import(pathToFileURL(join(directory, "agent-hook.mjs")).href) as { workspaceInstructions?: (o: Record<string, unknown>) => string };
2089
+ return hook.workspaceInstructions?.({ contributor: entry.role === "contributor", workflow: entry.workflow, native, clientEntry: clientEntry() }) ?? null;
2090
+ },
2027
2091
  };
2028
2092
  const withWait = (handler: SessionOpen): SessionOpen => async (input, context) => {
2029
2093
  const background = await isBackground(input.request.agentId, context.paseo);
@@ -2080,7 +2144,7 @@ export default function contribute(server: PluginServerContext) {
2080
2144
  // background recovery agent loses its tools on its second session (resume, reload, plugin update).
2081
2145
  if (await isBackground(request.agentId, paseo) && !recordedRecoveryAgent(await store.snapshot(), request.agentId)) return request;
2082
2146
  // The Overseer: needs_you (no Stop-hook nudge), the action tools and its routing tools. Never tracked.
2083
- if (request.labels[OVERSEER_LABEL] === "1" && ["claude", "codex"].includes(request.provider)) {
2147
+ if (request.labels[OVERSEER_LABEL] === "1") {
2084
2148
  const env = { ...request.env, FOLLOW_UP_OVERSEER: "1", FOLLOW_UP_BRIEF: request.provider };
2085
2149
  return withTools({ ...request, env }, false, request.provider, true, true);
2086
2150
  }
@@ -2089,17 +2153,17 @@ export default function contribute(server: PluginServerContext) {
2089
2153
  if (!w && request.workspaceId && !saved.workspaces.some(w => w.id === request.workspaceId && (w.archived || w.mainAgentId !== request.agentId))) {
2090
2154
  const project = await gateway.projectForWorkspace(saved, request.workspaceId).catch(() => null);
2091
2155
  if (project?.enable_default_tracking && !optedOut(saved, request.workspaceId)) {
2092
- const rows = await gateway.discover(saved, request.workspaceId).catch(() => []);
2156
+ // an-agent-s-first-session-gets-its-tools: Paseo doesn't list this agent until its first session is open, so
2157
+ // discovery counts it from the request. A first session then gets what any later one would.
2158
+ const opening = { id: request.agentId, workspaceId: request.workspaceId, provider: request.provider, cwd: request.cwd, title: request.title, labels: request.labels };
2159
+ const rows = await gateway.discover(saved, request.workspaceId, undefined, opening).catch(() => []);
2093
2160
  await store.mutate(state => applyDiscovery(state, rows.filter(row => followsByDefault(state, row)), Date.now()));
2094
- const current = await store.snapshot();
2095
- w = current.workspaces.find(w => w.enable_tracking && w.mainAgentId === request.agentId);
2096
- if (!current.workspaces.some(w => w.id === request.workspaceId) && current.projectDefaults?.[project.id] !== false)
2097
- return { ...request, env: { ...request.env, FOLLOW_UP_CLI: bridge, FOLLOW_UP_CLIENT_ENTRY: clientEntry() } };
2161
+ w = (await store.snapshot()).workspaces.find(w => w.enable_tracking && w.mainAgentId === request.agentId);
2098
2162
  }
2099
2163
  }
2100
2164
  const root = !!request.workspaceId && !isRecovery(request.labels) && await isWorkspaceRoot({ id: request.agentId, workspaceId: request.workspaceId, labels: request.labels }, async id => (await paseo.agents.ref(id).refresh())?.agent);
2101
2165
  // F2: needs_you and the Stop-hook nudge reach every root agent while the inbox is on, tracked or not.
2102
- const brief = (await inboxSettings()).enable_inbox && ["claude", "codex"].includes(request.provider) ? request.provider : null;
2166
+ const brief = (await inboxSettings()).enable_inbox ? request.provider : null;
2103
2167
  if (!w && root) {
2104
2168
  w = await store.mutate(state => {
2105
2169
  const workspace = state.workspaces.find(w => w.id === request.workspaceId && w.enable_tracking && !w.archived);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "paseo-follow-up",
3
3
  "private": false,
4
- "version": "2.4.0-beta.9",
4
+ "version": "2.4.0",
5
5
  "description": "Follows every workspace your coding agents work in until it's done: one list of what needs you.",
6
6
  "type": "module",
7
7
  "files": [
@@ -19,8 +19,7 @@
19
19
  "CHANGELOG.md",
20
20
  "README.md",
21
21
  "THIRD_PARTY_NOTICES.md",
22
- "docs/screenshots/",
23
- "!docs/screenshots/follow-up-demo*",
22
+ "docs/screenshots/follow-up-slide-*.png",
24
23
  "scripts/build.mjs"
25
24
  ],
26
25
  "scripts": {
@@ -33,6 +32,7 @@
33
32
  "test:move": "tsx scripts/check-move.mjs",
34
33
  "test:move:registry": "tsx scripts/check-move.mjs --registry",
35
34
  "test:github-mode": "node scripts/check-github-mode.mjs",
35
+ "test:no-gh": "node scripts/check-no-gh.mjs && node scripts/check-no-gh.mjs --signed-out",
36
36
  "test:native": "node scripts/check-native-tools.mjs --agents 10",
37
37
  "prepare": "node scripts/build.mjs",
38
38
  "test:scale": "node scripts/scale-check.mjs --workspaces 140 --awake 5 --idle 90 --realistic --rss-budget realistic --idle-rss-budget realistic --cpu-budget 3 --request-budget 2",
@@ -46,6 +46,7 @@
46
46
  "test:wait-live": "node scripts/check-wait.mjs --live",
47
47
  "shots": "node scripts/screenshots.mjs",
48
48
  "shots:readme": "sh scripts/readme-shots.sh",
49
+ "shots:gallery": "sh scripts/gallery-shots.sh",
49
50
  "video": "node scripts/demo-video.mjs",
50
51
  "video:v2:take": "node scripts/demo-video-v2.mjs",
51
52
  "check:paseo-keys": "tsx scripts/check-paseo-keys.ts"