Skip to content

Bump 961853266hyt/prompt-suggestions to 0.2.4 - #1190

Merged
paseo-bot[bot] merged 1 commit into
mainfrom
bump/961853266hyt/prompt-suggestions-0.2.4
Oct 25, 2026
Merged

paseo-bot[bot] merged 1 commit into
mainfrom
bump/961853266hyt/prompt-suggestions-0.2.4

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

961853266hyt/prompt-suggestions: 0.2.3 → 0.2.4

@961853266hyt, this update is ready for review. The published version stays unchanged until approval.

Artifact and validation details

Package: paseo-prompt-suggestions.

{
  "previous": {
    "kind": "npm",
    "package": "paseo-prompt-suggestions",
    "version": "0.2.3",
    "resolved": "https://registry.npmjs.org/paseo-prompt-suggestions/-/paseo-prompt-suggestions-0.2.3.tgz",
    "integrity": "sha512-w2pbRf5BwM2yWF8ooWyq6gNP3KKQBoNMsiEGC2Ca2S/ak+sdIC05zHAVxXCPMcUMSKzaOMbA30d5+TYgbAgLaA=="
  },
  "proposed": {
    "kind": "npm",
    "package": "paseo-prompt-suggestions",
    "version": "0.2.4",
    "resolved": "https://registry.npmjs.org/paseo-prompt-suggestions/-/paseo-prompt-suggestions-0.2.4.tgz",
    "integrity": "sha512-D9hFNxt6MqdIZbK+tP6XcvSPfs1mNxJ9+Z888atn7vIuxyv2RCeFUeOKw2Mnqx/WpZQRbQ9IFmL1UDqWGxE7PQ=="
  }
}

Inline validation passed: tests and artifact checks. Run node scripts/validate.ts --online --changed on the completed listing before merging. The default GITHUB_TOKEN does not trigger the PR validation workflow.

Artifact diff
diff -ruN a/package/CHANGELOG.md b/package/CHANGELOG.md
--- a/package/CHANGELOG.md	1985-10-26 08:15:00.000000000 +0000
+++ b/package/CHANGELOG.md	1985-10-26 08:15:00.000000000 +0000
@@ -1,5 +1,11 @@
 # Changelog
 
+## 0.2.4
+
+- Suggestions work again on Paseo 0.13. Since that release the turn-ended event no longer carries
+  the conversation, so the plugin saw every turn as the first one and stayed silent. It now reads
+  the agent's recent messages from Paseo after each turn, which works on every supported version.
+
 ## 0.2.3
 
 - Copy on the suggestion card now confirms with a brief check mark on the button instead of a
diff -ruN a/package/index.server.ts b/package/index.server.ts
--- a/package/index.server.ts	1985-10-26 08:15:00.000000000 +0000
+++ b/package/index.server.ts	1985-10-26 08:15:00.000000000 +0000
@@ -6,7 +6,11 @@
 import { randomUUID } from "node:crypto";
 import { setFlagsFromString } from "node:v8";
 import { generateSuggestion } from "./server/generate";
-import { createSuggestionCoordinator, type RowWriter } from "./server/suggestions";
+import {
+  createSuggestionCoordinator,
+  type RecentTimeline,
+  type RowWriter,
+} from "./server/suggestions";
 import { type SuggestionSettings, suggestionSettings } from "./shared/settings";
 import { SUGGESTION_ROW_KIND, SUGGESTION_ROW_VERSION } from "./shared/suggestion-row";
 
@@ -39,6 +43,19 @@
   };
 }
 
+/** Timeline entries read after a turn: enough for the transcript's 6,000 characters. */
+const RECENT_ENTRIES = 60;
+
+async function readRecentTimeline(
+  agentId: string,
+  { paseo }: PluginHookContext,
+): Promise<RecentTimeline> {
+  const page = await paseo.agents
+    .ref(agentId)
+    .timeline.refetch({ direction: "tail", limit: RECENT_ENTRIES });
+  return { items: page.entries.map((entry) => entry.item), hasOlder: page.hasOlder };
+}
+
 export default function contribute(server: PluginServerContext) {
   const settings = server.registerSettings(suggestionSettings);
   // Null until the first read and while the stored settings are invalid.
@@ -74,8 +91,12 @@
   });
 
   const removers = [
-    server.on("agent.turn_ended", (event, context) =>
-      coordinator.turnEnded(event, rowWriter(event.agent.id, context), context.signal),
+    server.on("agent.turn_ended", ({ agent, turnId, outcome }, context) =>
+      coordinator.turnEnded(
+        { agent, turnId, outcome, readTimeline: () => readRecentTimeline(agent.id, context) },
+        rowWriter(agent.id, context),
+        context.signal,
+      ),
     ),
     server.on("agent.turn_started", (event, context) =>
       coordinator.invalidate(event.agent.id, rowWriter(event.agent.id, context)),
diff -ruN a/package/package.json b/package/package.json
--- a/package/package.json	1985-10-26 08:15:00.000000000 +0000
+++ b/package/package.json	1985-10-26 08:15:00.000000000 +0000
@@ -1,6 +1,6 @@
 {
   "name": "paseo-prompt-suggestions",
-  "version": "0.2.3",
+  "version": "0.2.4",
   "files": [
     "paseo-plugin.json",
     "OVERVIEW.md",
diff -ruN a/package/server/suggestions.ts b/package/server/suggestions.ts
--- a/package/server/suggestions.ts	1985-10-26 08:15:00.000000000 +0000
+++ b/package/server/suggestions.ts	1985-10-26 08:15:00.000000000 +0000
@@ -3,9 +3,25 @@
 import type { SuggestionRow } from "../shared/suggestion-row";
 import { normalizeSuggestion } from "./filter";
 import { GENERATION_TIMEOUT_MS } from "./generate";
-import { buildTranscript, countUserMessages } from "./transcript";
+import { buildTranscript, countUserMessages, type TimelineItem } from "./transcript";
 
-type TurnEndedEvent = PluginLifecycleEvents["agent.turn_ended"];
+/** The newest part of an agent's conversation, oldest item first. */
+export interface RecentTimeline {
+  items: readonly TimelineItem[];
+  /** Earlier items exist that were not read. */
+  hasOlder: boolean;
+}
+
+/**
+ * A completed turn, with its conversation read on demand. The hook's own `timeline` field is
+ * always empty since Paseo 0.13, so history comes from the daemon's timeline instead.
+ */
+export type TurnEndedEvent = Pick<
+  PluginLifecycleEvents["agent.turn_ended"],
+  "agent" | "turnId" | "outcome"
+> & {
+  readTimeline(): Promise<RecentTimeline>;
+};
 
 /** Generations running at once across all agents; each one is a `claude` process. */
 export const MAX_CONCURRENT_GENERATIONS = 2;
@@ -127,13 +143,21 @@
 
       const isTopLevel = event.agent.parentAgentId === null;
       const isCompleted = event.outcome.kind === "completed";
-      // Like Claude Code, the first exchange gets no suggestion.
-      const hasHistory = countUserMessages(event.timeline) >= 2;
-      if (!isTopLevel || !isCompleted || !hasHistory) return;
+      if (!isTopLevel || !isCompleted) return;
       const settings = deps.settings();
       if (!settings || !suggestsFor(settings, event.agent.provider)) return;
 
-      const transcript = buildTranscript(event.timeline);
+      let timeline: RecentTimeline;
+      try {
+        timeline = await event.readTimeline();
+      } catch (error) {
+        deps.logError(`Could not read the conversation of agent ${event.agent.id}`, error);
+        return;
+      }
+      // Like Claude Code, the first exchange gets no suggestion.
+      const hasHistory = timeline.hasOlder || countUserMessages(timeline.items) >= 2;
+      if (!hasHistory) return;
+      const transcript = buildTranscript(timeline.items);
       if (transcript.length === 0) return;
       // Cancelled while the dismissal was written: a listener added now would never hear the abort.
       if (hookSignal.aborted) return;

@github-actions github-actions Bot added the bump Pinned artifact update label Oct 25, 2026

@paseo-bot paseo-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prompt suggestions 0.2.4 is approved, @961853266hyt. Registry checks passed. Your overview and screenshots are retained; no listing edits or action from you are needed.

Review data
  • Reviewed PR head: b95a8749fc852192536efc27e73e2d0b96925c27. Policy: main REVIEW.md blob 8da1286fd8870c87ff53767e8644858627b7371f.
  • Independently downloaded and compared paseo-prompt-suggestions 0.2.3 and 0.2.4 from npm. Both tarball URLs, package versions and SHA-512 integrity match the records and npm metadata. New integrity: sha512-D9hFNxt6MqdIZbK+tP6XcvSPfs1mNxJ9+Z888atn7vIuxyv2RCeFUeOKw2Mnqx/WpZQRbQ9IFmL1UDqWGxE7PQ==.
  • Inspected archive paths before extraction; reviewed the complete four-file diff, manifest/package metadata, server entry, suggestion coordinator, transcript/filter/generator and the affected client display/send path. Runtime entries and local imports are present. No production dependencies, preparation command or install lifecycle script; host libraries and development tools do not need an installation lock.
  • Completed top-level turns now fetch the last 60 timeline entries through Paseo. Provider settings still gate generation; the transcript remains bounded to about 6,000 characters. Existing Claude execution uses argv and stdin, a disposable working directory, disabled tools/hooks/MCP and no saved session; the overview discloses sending conversations to Anthropic, including other providers by default. Send remains a user action. No new download, credential destination, shell construction or destructive filesystem operation was introduced.
  • Reviewed the English overview, description and packaged interface images; no translations or registry fallback page to update. Trusted registry validation: 386 records well formed, one pinned artifact matched. The validation workflow was approved to run.
  • Static artifact inspection only. No plugin code/dependencies were installed, built, imported or run; no live Claude or UI behavior was exercised.

@paseo-bot
paseo-bot Bot merged commit 96e2258 into main Oct 25, 2026
1 check passed
@paseo-bot paseo-bot Bot mentioned this pull request Oct 25, 2026
1 of 9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bump Pinned artifact update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants