Repository navigation
feat(plugin-sdk): add thread plugin metadata with review fixes - #3555
Merged
SawyerHood merged 8 commits intoSep 12, 2026
Merged
Conversation
Co-authored-by: samanthar0se <[email protected]>
Co-authored-by: samanthar0se <[email protected]>
Co-authored-by: samanthar0se <[email protected]>
Co-authored-by: samanthar0se <[email protected]>
# Conflicts: # packages/db/drizzle/meta/0115_snapshot.json # packages/db/drizzle/meta/_journal.json # packages/db/test/migrate.test.ts Co-authored-by: samanthar0se <[email protected]>
Renumber the thread_plugin_metadata migration to 0118 after main's 0117_machine_providers, and rewind it with the machine providers migration in migrate.test.ts instead of dropping it at each rewind site. Co-Authored-By: Claude Code <[email protected]> Co-authored-by: samanthar0se <[email protected]>
Co-Authored-By: Claude Code <[email protected]> Co-authored-by: samanthar0se <[email protected]>
- Return 400 for an oversized `set` or malformed plugin id and 413 when a
merged namespace would exceed 256 KiB, instead of 500. Validate `pluginId`
with the plugin id schema.
- Read a corrupt namespace as `{}`, let a patch replace it, and log only the
thread and plugin ids. Store no row for an empty seed.
- Resolve the creation seed at the service boundary (no `""` namespace) and
drop the placeholder `pluginMetadata` from the configure boundary.
- Load and parse namespaces only for plugins with a configure callback, once
per pass, and freeze them with one shared helper.
- Make `getPluginMetadata`/`updatePluginMetadata` reject instead of throwing
synchronously. Keep `toJSON` as ordinary data.
- Type `context.pluginMetadata` as deep-readonly JSON. Align the fake SDK and
fake host with production attribution, rejections, and context handling.
- Trim unused db exports and duplicated validation. Fix Guide card symbols
and document attribution, limits, and untrusted metadata.
- Replace vacuous tests with end-to-end configure, route status, fail-closed,
and freeze tests.
Co-Authored-By: Claude Code <[email protected]>
Co-authored-by: samanthar0se <[email protected]>
SawyerHood
force-pushed
the
bb/review-pull-request-3508-codebase-thr_pp65mcbm5h
branch
from
September 12, 2026 01:38
87959e5 to
18a4344
Compare
SawyerHood
deleted the
bb/review-pull-request-3508-codebase-thr_pp65mcbm5h
branch
September 12, 2026 01:43
samantha-clanker Bot
pushed a commit
to samanthar0se/bb
that referenced
this pull request
Sep 19, 2026
Where upstream solved the same problem, take its version: - thread plugin metadata base (get-bb#3555) - provider-pi fresh session on thread start (get-bb#3677); take upstream's provider-pi files wholesale - keep upstream's optional-field allowlist groups; fold experimental_pluginMetadataByPlugin into the plugin metadata group Keep local composer APIs that upstream does not provide (experimental_selectedProviderId, draft plugin metadata, provider-owned metadata), alongside upstream's pluginSubmission, lifecycleOwnerThreadId, setSelection, removeMention and onSubmitted. Update test fixtures for upstream's triggers and mentionMenuPlacement props. Co-Authored-By: Claude Opus 5 <[email protected]>
samantha-clanker Bot
pushed a commit
to samanthar0se/bb
that referenced
this pull request
Sep 19, 2026
fork/main's only unique change is the pre-upstream draft of the thread plugin metadata API and its migrations (0115_talented_kulan_gath, 0116_smooth_masked_marvel). Upstream get-bb#3555 replaced it, so keep this tree and record the ancestry so fork/main fast-forwards. Co-Authored-By: Claude Opus 5 <[email protected]>
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
Plugins need persistent per-thread JSON metadata that is available during agent configuration without automatically entering model-facing payloads. This continues @samanthar0se's implementation in #3508 and includes the review fixes: migration conflicts, SDK versioning, validation and status codes, configure snapshots, and discrepancies between the published testing fakes and production.
What changed
Namespaces follow ordinary thread access rules and are not an authorization boundary. The unprefixed public API names and cross-namespace access were explicitly accepted during maintainer review. No server/daemon wire fields change.
Supersedes #3508, preserving the contributor's commits and adding the reviewed fixes.
How you verified
Verification recorded in the preceding review/fix thread on the unchanged final tip,
87959e5081001423da42c3cf7ec25d7a865ce9ae:Commit metadata was subsequently updated to credit @samanthar0se on every PR commit; the verified source tree is unchanged.
Publication checks:
git diff --check origin/main...HEADpassed. The clean-secret-models scanner reported zero hits in working-tree, tracked@HEAD, range-added-lines, and range-commit-messages fororigin/main..HEAD.Fixes #3438
Co-authored-by: samanthar0se [email protected]