paseo-follow-up 1.4.0-beta.26 → 1.4.0-beta.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  What changed in each version of Follow-up, newest first. Follow-up shows these in "What's new" after an update, and in full from Home's last line.
4
4
 
5
+ ## 1.4.0-beta.27 (2026-11-10)
6
+
7
+ - Follow-up's routine bookkeeping now sits inside Paseo's grouped tool calls instead of breaking them into loose rows.
8
+ - Only the moments that matter stand out in the chat: a question asked and the Workspace done card, which now shows once even when the agent declares done twice.
9
+
5
10
  ## 1.4.0-beta.26 (2026-11-10)
6
11
 
7
12
  - A finished workspace no longer stalls short of Done when Follow-up can't check what production serves. Done goes through with a "Deploy not confirmed by Follow-up" note.
package/README.md CHANGED
@@ -221,7 +221,7 @@ This replaces the separate **Wait** plugin (`paseo-wait`). While that plugin is
221
221
  Install the beta:
222
222
 
223
223
  ```sh
224
- paseo plugin update follow-through --version 1.4.0-beta.26
224
+ paseo plugin update follow-through --version 1.4.0-beta.27
225
225
  # or, for a fresh install:
226
226
  paseo plugin install npm:paseo-follow-up@beta
227
227
  ```
package/client/chat.tsx CHANGED
@@ -2,7 +2,7 @@ import { useState } from "react";
2
2
  import { Platform, Pressable, Text, View } from "react-native";
3
3
  import type { PluginClientContext, PluginTimelineItemProps } from "@getpaseo/plugin/client";
4
4
  import { Icon, ScrollView } from "@getpaseo/plugin/client/ui";
5
- import { answerCardSchema, batchCardSchema, followShellCall, followToolName, parseBatchPrompt, readText, toolRow, toolRowSchema, type AnswerCard, type BatchCard, type ToolRow } from "../shared/chat";
5
+ import { answerCardSchema, batchCardSchema, createMomentLedger, followTimelineItem, parseBatchPrompt, toolRowSchema, type AnswerCard, type BatchCard, type ToolRow } from "../shared/chat";
6
6
  import { parseAnswerMessage, parseAnswersMessage } from "../shared/questions";
7
7
  import { Reveal } from "./motion";
8
8
  import { tint, withAlpha } from "./theme";
@@ -11,9 +11,7 @@ const mono = () => (Platform.OS === "ios" ? "Menlo" : "monospace");
11
11
  const TOOL_KIND = "tool-row";
12
12
  const BATCH_KIND = "batch-card";
13
13
  const ANSWER_KIND = "answer-card";
14
- const TOOL_ICON: Partial<Record<ToolRow["tool"], string>> = { ask_question: "MessageCircleQuestion", record_answer: "MessageCircleReply", withdraw_question: "MessageCircleOff", set_spec: "FileText" };
15
-
16
- function record(value: unknown): value is Record<string, unknown> { return typeof value === "object" && value !== null && !Array.isArray(value); }
14
+ const TOOL_ICON: Partial<Record<ToolRow["tool"], string>> = { ask_question: "MessageCircleQuestion" };
17
15
 
18
16
  /** Expandable full text below a row, scrolling on its own so long output never moves the chat. */
19
17
  function Expanded({ text, color, border }: { text: string; color: string; border: string }) {
@@ -132,26 +130,15 @@ function AnswerCardView({ item, theme }: PluginTimelineItemProps<AnswerCard>) {
132
130
  }
133
131
 
134
132
  export function contributeChat(client: PluginClientContext) {
133
+ const moments = createMomentLedger();
135
134
  const removers = [
135
+ // Routine bookkeeping stays Paseo's own tool call so it groups with the turn's other calls (a plugin item always
136
+ // seals Paseo's group); only the Done card and a question asked leave the group. See TOOL_PRESENTATION.
136
137
  client.addTimelineTransformer({
137
138
  id: "follow-tool-calls", query: { itemType: "tool_call" },
138
139
  transform({ item }) {
139
- const detail: unknown = item.detail;
140
- let tool = followToolName(item.name);
141
- let input: Record<string, unknown> = {};
142
- let output: string | undefined;
143
- if (tool) {
144
- if (record(detail) && record(detail.input)) input = detail.input;
145
- output = record(detail) && "output" in detail ? readText(detail.output) : undefined;
146
- } else if (record(detail) && detail.type === "shell" && typeof detail.command === "string") {
147
- const call = followShellCall(detail.command);
148
- if (!call) return undefined;
149
- tool = call.tool; input = call.input; output = typeof detail.output === "string" ? detail.output : undefined;
150
- } else return undefined;
151
- const error = item.status === "failed" ? readText(item.error) ?? "" : undefined;
152
- if (item.status === "completed" && record(detail) && record(detail.output) && detail.output.isError === true)
153
- return { items: [{ type: "plugin" as const, kind: TOOL_KIND, version: 1, data: toolRow(tool, "failed", input, undefined, output) }] };
154
- return { items: [{ type: "plugin" as const, kind: TOOL_KIND, version: 1, data: toolRow(tool, item.status, input, output, error) }] };
140
+ const row = followTimelineItem(item, moments);
141
+ return row ? { items: [{ type: "plugin" as const, kind: TOOL_KIND, version: 1, data: row }] } : undefined;
155
142
  },
156
143
  }),
157
144
  client.addTimelineTransformer({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "paseo-follow-up",
3
3
  "private": false,
4
- "version": "1.4.0-beta.26",
4
+ "version": "1.4.0-beta.27",
5
5
  "description": "Follow every workspace PR stack in Paseo, answer agent questions, batch repairs for the main agent, and see what needs you.",
6
6
  "type": "module",
7
7
  "files": [
package/shared/chat.ts CHANGED
@@ -137,6 +137,71 @@ export function toolRow(tool: FollowTool, status: "running" | "completed" | "fai
137
137
  }
138
138
  }
139
139
 
140
+ /**
141
+ * How each of Follow-up's agent tools (and Wait's) shows in a chat. Paseo 0.15.2 groups a run only from tool_call and
142
+ * thought items, and a timeline transform can only return plugin items, so a transformed call always leaves Paseo's
143
+ * group and sits loose. Routine bookkeeping therefore stays an ordinary tool call; only a moment the developer should
144
+ * see on its own becomes a row or card. A new tool must be added here (tests/chat-grouping.test.ts fails otherwise).
145
+ */
146
+ export const TOOL_PRESENTATION: Record<string, "routine" | "moment"> = {
147
+ workspace_status: "routine", sync_workspace: "routine", enroll_workspace: "routine", register_pr: "routine", exclude_stack: "routine",
148
+ update_obligation: "routine", acknowledge_batch: "routine", record_answer: "routine", withdraw_question: "routine", set_spec: "routine",
149
+ workspace_about: "routine", agent_settings: "routine", needs_you: "routine", list_prs: "routine", add_reviewers: "routine",
150
+ enable_merge_when_ready: "routine", disable_merge_when_ready: "routine", send_repairs: "routine", set_auto_send: "routine", clear_hold: "routine",
151
+ retry_batch: "routine", inbox_list: "routine", sign_off: "routine", set_finish_flags: "routine", set_priorities: "routine", agent_digest: "routine",
152
+ route_candidates: "routine", send_to_agent: "routine", start_workspace: "routine", display_settings: "routine", set_display: "routine",
153
+ follow_settings: "routine", set_follow_settings: "routine", project_settings: "routine", set_project_tracking: "routine", pr_workflow: "routine",
154
+ set_pr_workflow: "routine", reviewer_settings: "routine", reviewer_suggestions: "routine", save_reviewers: "routine", set_agent_setting: "routine",
155
+ set_wait_for_jobs: "routine", onboarding_status: "routine", onboarding_checks: "routine", set_onboarding: "routine", rank_status: "routine",
156
+ rerank_priorities: "routine", overseer_status: "routine", overseer_start: "routine", overseer_restart: "routine", overseer_ask: "routine",
157
+ inbox_brief: "routine", brief_action: "routine", inbox_act: "routine", answer_question: "routine", run_recovery: "routine",
158
+ set_workspace_spec: "routine", set_task_trigger: "routine", pr_controls: "routine", browser_status: "routine", trust_bypass_status: "routine",
159
+ release_notes: "routine", make_main_agent: "routine", wait_prepare_job: "routine", wait_for_job: "routine", wait_get_job: "routine",
160
+ // The developer's moments: the workspace is done, or the agent asked them something. needs_you runs every turn, so a
161
+ // card there would be noise; the inbox already carries it.
162
+ declare_done: "moment", ask_question: "moment",
163
+ };
164
+ export const MOMENT_TOOLS = Object.keys(TOOL_PRESENTATION).filter(t => TOOL_PRESENTATION[t] === "moment") as FollowTool[];
165
+
166
+ /** The fields of Paseo's tool_call timeline item that the transform reads. */
167
+ export type TimelineToolCall = { type: "tool_call"; callId: string; name: string; status: "running" | "completed" | "failed" | "canceled"; error: unknown; detail: unknown };
168
+
169
+ /** Done cards already shown, by workspace and summary, so a repeated declare_done doesn't draw a second card. */
170
+ export type MomentLedger = Map<string, string>;
171
+ export const createMomentLedger = (): MomentLedger => new Map();
172
+ const LEDGER_LIMIT = 500;
173
+
174
+ /**
175
+ * The plugin row for a Follow-up tool call, or undefined to leave it as Paseo's own grouped tool call. Pure apart from
176
+ * the ledger, which keeps the first call that drew each Done card.
177
+ */
178
+ export function followTimelineItem(item: TimelineToolCall, ledger: MomentLedger): ToolRow | undefined {
179
+ const detail = item.detail;
180
+ let tool = followToolName(item.name);
181
+ let input: Record<string, unknown> = {};
182
+ let output: string | undefined;
183
+ if (tool) {
184
+ if (record(detail) && record(detail.input)) input = detail.input;
185
+ output = record(detail) && "output" in detail ? readText(detail.output) : undefined;
186
+ } else if (record(detail) && detail.type === "shell" && typeof detail.command === "string") {
187
+ const call = followShellCall(detail.command);
188
+ if (!call) return undefined;
189
+ tool = call.tool; input = call.input; output = typeof detail.output === "string" ? detail.output : undefined;
190
+ } else return undefined;
191
+ if (TOOL_PRESENTATION[tool] !== "moment" || item.status !== "completed") return undefined;
192
+ if (record(detail) && record(detail.output) && detail.output.isError === true) return undefined;
193
+ const row = toolRow(tool, "completed", input, output);
194
+ if (tool !== "declare_done") return row;
195
+ if (!row.done) return undefined;
196
+ const result = json(output);
197
+ const workspace = record(result?.workspace) && typeof result!.workspace.id === "string" ? result!.workspace.id : str(result?.workspaceId);
198
+ const key = `${workspace}\0${row.done.summary}`;
199
+ const first = ledger.get(key);
200
+ if (first !== undefined && first !== item.callId) return undefined;
201
+ if (first === undefined) { if (ledger.size >= LEDGER_LIMIT) ledger.delete(ledger.keys().next().value!); ledger.set(key, item.callId); }
202
+ return row;
203
+ }
204
+
140
205
  export const answerCardSchema = z.object({ id: z.string(), title: z.string(), choice: z.string(), label: z.string().nullable(), words: z.string().nullable(), text: z.string(),
141
206
  /** 1.4.0: a multi-decision answer, one entry per decision with its question; `choice: null` was skipped. */
142
207
  answers: z.array(z.object({ id: z.string(), question: z.string(), choice: z.string().nullable(), label: z.string().nullable() })).optional() });