Skip to content

Questions: adopt bb 0.43.1 metadata, events, and host icons (WP0 + WP2) - #62

Merged
erwinkn merged 9 commits into
mainfrom
bb/questions-0.43-thr_57hw49rk6d
Sep 13, 2026
Merged

erwinkn merged 9 commits into
mainfrom
bb/questions-0.43-thr_57hw49rk6d

Conversation

@erwinkn

@erwinkn erwinkn commented Sep 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

WP0 baseline + WP2 package for plugins/questions on bb 0.43.1 / SDK 0.4.87 (plan "Adopt bb 0.43.x capabilities across the plugins").

  • SDK 0.4.87 bump and engines.bb >= 0.43.1 (metadata API required).
  • Icons render through experimental_Icon; icon names are typed against lib/host-icon-names.ts, generated from desktop-v0.43.1 by scripts/host-icon-names.mjs.
  • Summary → thread plugin metadata. questions.summary = { markdown, updatedAt, version: 1 }, validated to the 8,000-char bound on every read; malformed or foreign values count as no summary. Dual-read with the legacy summaries table, write-through on set, bb questions summary backfill [--dry-run] migrates the rest once. Rounds, answers, versions, attachments, and submission receipts stay in the database.
  • Summary via tool retrieval. questions_summary now reads (no arguments), sets, or clears the summary — the agent's own earlier note that survives compaction. Deliberately not injected into per-turn instructions: the payload would cost context on every turn and only reaches Codex at thread/start anyway (see upstream finding below).
  • message.cancelled. Queued submissions record queued_message_id; on the event the matching submission becomes cancelled with its frozen snapshot recoverable and a panel Resubmit action. Never auto-resent.
  • thread.unarchived. An open_holds table records which round's prompt is open (written on wait/hold, cleared on delivery or user dismissal, kept through stops/reloads/archive interruption). On unarchive only that round's prompt reopens — never every historical unanswered round.

Test plan

  • npm run typecheck, npm test (115), npm run build on the branch
  • Live (bb 0.43.1, commit a6b2670+README): bb questions summary set wrote thread_plugin_metadata {summary:{markdown,updatedAt,version:1}} with no legacy row; summary show reads it back; backfill --dry-run and real run reported both pre-existing legacy rows failed (threads deleted upstream, HTTP 404) and correctly retained them.
  • Summary retrieval: questions_summary with no arguments returns the current markdown, or "No summary recorded" when absent — verified in unit tests (set → read → clear → read).
  • Live archive/unarchive: ask wrote an open_holds row and a pending round interaction; archiving the active thread interrupted it (Thread stopped by user request) with the marker kept; unarchive created exactly one new pending interaction for that same roundId — no historical rounds re-prompted; interactions respond dismissed it and cleared the marker.
  • Live message.cancelled: with the thread mid-turn, a panel-RPC submit returned delivery: "queued" and recorded queued_message_id; bb thread queue delete fired the event → submission cancelled (frozen snapshot kept, submitted_json cleared, draft restored, nothing auto-resent). A manual resubmit queued a fresh message. bb thread delete cascade-verified: pending interactions, open_holds, rounds all cleaned.
  • Live thread.deleted: deleting a test thread wiped its rounds/answers/open_holds and interrupted its pending interaction.
  • UI: icon rendering through the host registry is covered by component tests; not visually verified (remote session).
  • Notes: instruction injection was implemented and verified end-to-end on acp-devin, then removed in 547bf32 — Codex's thread/resume accepts but ignores updated developerInstructions, making injection provider-dependent while costing context every turn. A queue-if-active send racing a queue-drain turn start returned HTTP 500 (run.started on active); the outbox marked the submission uncertain with its frozen snapshot, as designed. Both upstream candidates recorded in README.

Generated with Devin

exedev and others added 7 commits September 13, 2026 08:43
Synced with bb plugin types against bb 0.43.1. Typecheck and the 106
existing tests pass unchanged.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Replace the copied HugeIcons core map and lazy extended registry with a
thin wrapper over experimental_Icon. Names are typed against
lib/host-icon-names.ts, generated from bb desktop-v0.43.1 by
scripts/host-icon-names.mjs, so an unknown name fails typecheck; every
use still passes a fallback. Drops both @hugeicons dependencies.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
The Summary tab text now lives in the thread's plugin metadata under
questions.summary as { markdown, updatedAt, version: 1 }, validated on
every read to the 8,000-character bound; malformed or foreign values
count as no summary. Reads try metadata first and fall back to the
pre-metadata summaries table; a write moves the thread over and drops
its legacy row; `bb questions summary backfill [--dry-run]` migrates
the rest once. Rounds, answers, versions, attachments, and submission
receipts stay in the database.

A bb.agents.configure provider keeps the four tools selected and, when
the metadata snapshot holds a summary, adds it to the agent's
instructions framed as the agent's own earlier note, escaped as data,
and clipped to bb's 4,096-character instruction limit. Forks and
handoffs carry no metadata, so they get nothing.

engines.bb moves to >=0.43.1, the first release with the metadata API.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…oved

Submissions record BB's queued-message row id when delivery is queued.
On message.cancelled the matching queued submission becomes cancelled
with its frozen snapshot kept, and its answers stop counting as
submitted unless a newer submission already re-sent them. The panel
shows the cancelled attempt with a Resubmit action that restores the
frozen answers as drafts and submits the round again; nothing is ever
re-sent automatically. Frozen attachments stay attachable afterwards.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
An open_holds table records which round's native prompt is open. The
marker is written when a wait or hold starts, kept through thread
stops, archive interruptions, aborts, and plugin reloads, and cleared
only when the round is delivered or the user dismisses the prompt.
Archiving an active thread interrupts the pending interaction; on
thread.unarchived the marked round's prompt is held open again — never
a fresh prompt for every historical round that still lacks answers. A
hold that is still alive, a submitted round, and a dismissed prompt all
reopen nothing.

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Found while live-verifying questions on 0.43.1: a queue-if-active send
that loses the race with a queue-drain turn start 500s, and codex
thread/resume accepts but never applies updated developerInstructions.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The summary rides thread_plugin_metadata for durable storage, but
injecting its payload into every turn costs context and only reaches
Codex at thread start. The agent can read, set, or clear it on demand
through questions_summary, which now returns the current summary when
called without arguments.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@erwinkn
erwinkn marked this pull request as ready for review September 13, 2026 11:33
exe.dev user and others added 2 commits September 13, 2026 12:52
#53 landed scripts/host-icon-names.mjs at the repo root; regenerate the
plugin's list so --check passes. Same commit, same names — only the
provenance label follows the checkout's tag.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@erwinkn
erwinkn merged commit ab60083 into main Sep 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant