Skip to content

Tags: yermakoffivan/bb

Tags

desktop-nightly

Toggle desktop-nightly's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Clear the traffic lights when a panel tab goes full screen (get-bb#1054)

Full-screening a tab leaves the tab strip sitting under the macOS
traffic lights — but only on a thread that is **not** in a split. In a
split, the same action clears the lights correctly.

## Root cause

Collapsing the conversation produces the same layout on both thread
surfaces:

- **Split host** sets its group layout to `[0,
MAIN_PANEL_OPEN_SIZE_PERCENT]`
(`SplitWorkspaceSecondaryPanelHost.tsx:129`).
- **Inline thread detail** sizes the timeline panel to
`COLLAPSED_TIMELINE_PANEL_SIZE_PERCENT = 0`.

Either way the conversation column goes to zero width, and the thread
header rides inside that column, so the panel's toolbar is left alone on
the title-bar row on both surfaces.

Only the reserve differed.
`resolveCollapsedPanelTrafficLightReserveClassName` gated it on
`isInSplitHost`, justified in its own doc comment: inline thread detail
"keeps a full-width header on the traffic-light row above the panel, so
it needs no reserve here." That is not true once the conversation is
collapsed — inline renders `{header}` inside the wrapper that collapsing
makes `opacity-0` and `inert` (`ThreadDetailSecondaryContent.tsx:400`),
and the comment there says as much: "`inert` removes the hidden
conversation (header, timeline, composer)".

So the split host cleared the lights because it passed the host gate,
and inline thread detail — laid out identically — did not. That
asymmetry is exactly the reported symptom.

## Fix

Drop `isInSplitHost`. The reserve is about the collapse, not the host.
The parameter is removed rather than left accepted-and-ignored.

## Verification

Measured the working reference — `AppPageHeader`'s reserve — in the
running app under real macOS chrome, driving Chrome for Testing over
CDP:

```
sidebar hidden, panel docked right:
  header:        left 16,   padding-left 104px,  content at 120   <- reference
  panel toolbar: left 1517, padding-left 0px                      <- correct while docked
```

120px is the shared target: `px-4` (16) +
`MACOS_COLLAPSED_TOP_LEFT_RESERVE_CLASS` (104), which clears the lights
and the pinned sidebar trigger. After this change the panel lands its
leading controls on that same 120px when it owns the top-left, on both
surfaces.

`turbo run typecheck --filter=@bb/app` clean;
`ThreadSecondaryPanel.test.ts` (13) + `AppPageHeader.test.tsx` +
`bb-desktop.test.ts` — 17 passed. The test that encoded the wrong
premise now asserts the opposite, with the reason recorded.

**Verification gap, stated plainly:** I could not drive BB's own Full
Screen toggle headlessly — it does not flip `isConversationCollapsed`
under a stubbed desktop API — so the collapsed state is verified by code
reading, the split/non-split asymmetry reported from the real app, and
unit tests, rather than by a screenshot of the fixed window. Capturing
the real lights needs OS-level screen capture, which is not permitted
for the host process here. Worth an eyeball on a desktop build before
merge.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

desktop-v0.35.1

Toggle desktop-v0.35.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Prepare bb-app 0.35.1 (get-bb#988)

Version bump only: `bb-app` and `@bb/desktop` to 0.35.1, kept in
lockstep.

0.35.0 published to npm but its desktop build failed on the packaged
smoke test (fixed in get-bb#987). This ships npm and desktop together from one
commit so the two artifacts match.

`node .github/workflows/check-version-lockstep.mjs` passes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

desktop-latest

Toggle desktop-latest's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Prepare bb-app 0.35.1 (get-bb#988)

Version bump only: `bb-app` and `@bb/desktop` to 0.35.1, kept in
lockstep.

0.35.0 published to npm but its desktop build failed on the packaged
smoke test (fixed in get-bb#987). This ships npm and desktop together from one
commit so the two artifacts match.

`node .github/workflows/check-version-lockstep.mjs` passes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

desktop-v0.34.0

Toggle desktop-v0.34.0's commit message
Prepare bb-app 0.34.0

desktop-v0.33.0

Toggle desktop-v0.33.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Prepare bb-app 0.33.0 (get-bb#837)

## Summary

- release bb-app and the macOS desktop app as 0.33.0
- add concise end-user release notes and landing-page metadata
- highlight quieter updates, safer approval presets, reliability fixes,
and beta experiments

## Validation

- `node .github/workflows/check-version-lockstep.mjs`
- `umask 0022 && pnpm exec turbo run typecheck test --filter=@bb/config
--filter=@bb/server --filter=bb-app --force` (1,196 server tests passed)
- `pnpm exec turbo run smoke:tarball --filter=bb-app --force`
- packaged arm64 desktop RC built, smoke-tested, and manually approved
on Sawyer's MacBook Pro
- `git diff --check`

## Release plan

After merge to `main`, publish `bb-app@0.33.0` to npm `latest` and
publish the matching signed/notarized stable desktop release.

desktop-v0.0.32

Toggle desktop-v0.0.32's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Prepare bb-app 0.0.32 (get-bb#796)

## Summary

- bump `bb-app` and the desktop app from `0.0.31` to `0.0.32` in
lockstep
- leave the changelog and web release metadata unchanged for this hotfix

## Validation

- `node .github/workflows/check-version-lockstep.mjs`
- `pnpm exec turbo run typecheck test --filter=@bb/config
--filter=@bb/server --filter=bb-app`
- `pnpm exec turbo run smoke:tarball --filter=bb-app --force`
- `git diff --check`

desktop-v0.0.31

Toggle desktop-v0.0.31's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Prepare bb-app 0.0.31 (get-bb#792)

## Summary
- bump `bb-app` and `@bb/desktop` to 0.0.31 in lockstep
- add the 0.0.31 changelog entry (Features / Improvements / Experiments
/ Fixes) and its website release meta

## Validation
- `node .github/workflows/check-version-lockstep.mjs`
- `pnpm exec turbo run typecheck test --filter=@bb/config
--filter=@bb/server --filter=bb-app` (one env-dependent install-script
test fails only when a global bb-app is on PATH; passes with it removed)
- `pnpm exec turbo run smoke:tarball --filter=bb-app --force`
- `pnpm exec turbo run test typecheck --filter=@bb/web`
- packaged, signed, and installed the 0.0.31 desktop app locally
- `git diff --check`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

plugin-memory-v0.2.0

Toggle plugin-memory-v0.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Plugin SDK 0.3: consolidated API and SDK change (get-bb#716)

## Summary

This is the single consolidated Plugin SDK 0.3 API/SDK review and
landing PR. It preserves the 18 reviewed component histories as ancestry
while presenting one combined diff against `main`.

- exact `main` base: `1449fbbbe56dcb738c88bb1fc5a6a3ae04ac1c44`
- reviewed aggregate parent: `64da9a9e8efa4480fbf1ec6bd05bc9fc22bf8e03`
- integration merge commit: `14c53c277f9298b0a56c1a6b823136b5c348ead6`
- current PR head: `249b50ba0a2a3c269ef2c96e00797e595363fb87`

## What changed and why

| Area | Change | Why |
| --- | --- | --- |
| SDK contracts | Plugins keep the same complete SDK used by the
product. Public results now use readable names such as
`ThreadSpawnResult`, `FileReadResult`, and `ProjectGetResult`, and every
supported SDK entrypoint exports the same contract. | External plugins
can typecheck without BB's private HTTP route definitions, and
compatibility changes have public names humans can review. |
| Manifest identity and branding | Required `bb.name`, `bb.description`,
and explicit `bb.branding`; separated package identity from human-facing
identity; defined compact icon versus roomy light/dark logo behavior. |
Remove ambiguous legacy fields and implicit logo discovery before
compatibility freezes. |
| Backend naming and lifecycle | Added `bb.ui.requestInput`,
`bb.events.on`, and `storage.database()`; kept KV and relational storage
separate; renamed SDK realtime observation to `subscribe`; rejected
duplicate keyed registrations; made reload atomic while listeners remain
additive. | Give concepts distinct names and predictable
registration/reload behavior without collapsing storage models with
different semantics. |
| Frontend panels and JSON | Removed `navPanel.chrome`; retained the
shared title bar and `headerContent`; made panel bodies full-bleed;
introduced recursive `JsonValue` for persisted/transmitted params. | One
consistent panel layout and an explicit serialization boundary. |
| Composer | Added `text`, `setText`, `updateText`, and `clear` while
preserving attachments and reconciling mentions. | Plugins need
arbitrary composer editing, not only quote/mention insertion. |
| RPC | Added `defineRpcContract` with Standard Schema/Zod-compatible
input and output schemas, inferred backend handlers/frontend clients,
strict JSON handling, and stable validation errors. | Make RPC type-safe
and runtime-safe from one method-specific schema instead of parallel
handwritten types. |
| Agent configuration | Added per-thread/session `bb.agents.configure`
selection of registered tools, skills, and instructions with
machine/provider/side-chat context. | Plugins need conditional access
without dynamically rebuilding registrations or weakening built-in
permission policy. |
| Multi-machine providers/projects | Added explicit host/environment
routing for provider discovery, project workspace/files/content, cache
keys, and project creation `--machine`/`--host` selectors with
documented primary fallback. | Different machines can have different
providers and files; implicit server-local behavior was incorrect. |
| Terminals | Added canonical top-level `bb.terminals` and `bb terminal`
across global/project/thread scopes, including get, rename, restart, and
ID-based mutations; removed the nested compatibility shim. | Terminal
capability should be one discoverable SDK/CLI area with consistent
routing. |
| Plugin administration | Added typed SDK/CLI coverage for plugin and
marketplace list/install/update/source/config/token/reload/remove
operations while keeping the frontend's restricted boundary. | Plugin
management is part of the product and therefore part of the supported
SDK/CLI parity target. |
| Project attachments | Added typed multipart client upload, existing
attachment DTO/read/download surfaces, remote proxying,
binary/MIME/size-limit coverage, and explicit `--client-file` CLI
semantics. | CLI clients and plugins may run on a different machine from
the selected project host. |
| Appearance | Added complete theme selection plus favicon set/reset
parity and preserved compatible theme IDs. | The SDK/CLI should
represent the complete appearance state available in the app. |
| Environment CLI | Added status, PR, branch, path, diff, file, and
patch inspection for arbitrary environments. | Agents and users need the
same environment inspection outside the UI. |
| External testing | Published runtime JS and declarations for
`@bb/plugin-sdk/testing` and `/testing/app`; added fake host/SDK,
fixtures, frontend slot runtime, behavior/inspection/lifecycle views,
pack/install tests, and strict external scaffold typechecks. | Plugin
authors need supported tests outside the BB monorepo. |
| Official/example migrations | Migrated builtins, marketplace plugins,
examples, manifests, RPC contracts, and test imports to the settled
public package surfaces; audited stale names. | The repository must
prove the contract through real consumers and not retain private source
aliases. |
| Documentation | Added the exhaustive
manifest/backend/frontend/testing/SDK reference, routing/fallback
tables, compatibility policy, authoring skill, guides, and
CLI-discoverable help. | Plugin 1.0 cannot freeze an undocumented or
internally contradictory surface. |

HTTP routes remain alongside RPC because webhooks and external callers
need them. `storage.kv` remains alongside `storage.database()` because
small JSON state and relational datasets have different limits and
lifecycle needs. No `1.0.0` version bump is included.

## Diff-size accounting

The current PR has **26,127 additions**, down from 36,473 after removing
duplicated testing declarations.

| Category | Additions | Explanation |
| --- | ---: | --- |
| Generated declarations/templates | 9,205 | Primarily the one complete
portable root SDK declaration. |
| Implementation source | 7,479 | Runtime, SDK, CLI, server, app, and
plugin migrations across the areas above. |
| Tests and fixtures | 7,336 | Contract snapshots, routing, wire
validation, fake hosts, CLI, and external package/scaffold coverage. |
| Docs, guides, and examples | 1,846 | Exhaustive reference plus
discoverable authoring/CLI surfaces. |
| Manifest/package metadata | 217 | Required identities, exports,
dependencies, and example manifests. |
| Lockfile | 44 | Workspace importer changes only. |

The cleanup commit changes the testing declaration strategy from
independently flattening the whole SDK to reusing the already-portable
public `@bb/plugin-sdk` root. The two testing declarations fell from
10,860 to 470 lines and by 421,015 bytes. They still contain no
dependency on unpublished `@bb/sdk` or `@bb/server-contract` packages.

## Component PRs and review

All 18 reviewed component heads are ancestors of the current head and
are now closed as superseded, without merging their individual PRs or
deleting their branches:

[get-bb#690](get-bb#690),
[get-bb#691](get-bb#691),
[get-bb#693](get-bb#693),
[get-bb#694](get-bb#694),
[get-bb#695](get-bb#695),
[get-bb#696](get-bb#696),
[get-bb#697](get-bb#697),
[get-bb#698](get-bb#698),
[get-bb#699](get-bb#699),
[get-bb#700](get-bb#700),
[get-bb#702](get-bb#702),
[get-bb#703](get-bb#703),
[get-bb#704](get-bb#704),
[get-bb#707](get-bb#707),
[get-bb#708](get-bb#708),
[get-bb#709](get-bb#709),
[get-bb#712](get-bb#712), and
[get-bb#715](get-bb#715).

The [exhaustive API/SDK
reference](https://github.com/ymichael/bb/blob/7fc0fdce67239c69a4636a1d64f65097a76e3250/docs/plugin-api-and-sdk-reference.md)
is included. The one permitted [final
review](https://sawyer-air.getbb.app/threads/thr_3954cdkxke) returned
`REQUEST CHANGES`; all four documentation findings were accepted and
fixed in aggregate head `64da9a9e8`, with no second review pass.

## Current-main integration

- Preserves get-bb#711's bounded timeline projection/pagination and bounded
project-thread query for compose worktree reuse.
- Preserves get-bb#713's complete popout-chat removal across app, desktop,
contracts, persistence, and runtime configuration.
- Preserves get-bb#714's project-switch attachment copying while retaining the
Plugin 1.0 attachment SDK/CLI/server APIs.
- Resolved the only source conflict in `RootComposeView.tsx` by keeping
one bounded query in the aggregate's earlier location and removing the
duplicate declaration found by focused testing.
- Generated SDK declarations first, then regenerated template/registry
artifacts canonically; no generated declaration blob was hand-merged.

## Validation

Initial consolidation validation:

- 376 focused tests across timeline bounds, attachments/project
switching, popout removal, database/desktop integration, public Plugin
SDK surfaces, templates, and docs.
- 13 affected Turbo typechecks and 7 package builds / 8 Turbo tasks.
- All 18 component heads verified as ancestors; stale-name, version,
generated-diff, docs-correction, and `git diff --check` audits passed.
- Full GitHub matrix passed before the declaration cleanup.

Declaration cleanup validation:

- Canonical SDK declaration and template generator checks.
- Forced Plugin SDK/Templates typechecks and builds.
- Plugin SDK tests and the Templates suite, including packed
backend/frontend runtimes, `skipLibCheck: false`, scaffold-vendored root
resolution, and installed-package self-reference resolution.
- Focused authoring-doc test, package dry run, declaration import audit,
formatting, and `git diff --check`.
- Refreshed GitHub CI passed all 9 executed jobs; the configured Node
compatibility placeholder was skipped.

## SDK 0.3 release coordination

- `@bb/plugin-sdk` advances from `0.2.0` to `0.3.0`.
- GitHub, Docs, and Memory advance to `0.2.0` and require SDK `^0.3.0`.
- Examples, scaffolds, generated guides, and authoring documentation
target `^0.3.0`.
- The public marketplace remains on the published plugin `0.1.x`/SDK
`0.2.x` line until the new release artifacts exist.

## Landing policy

**There is no Plugin SDK or API `1.0.0` version bump in this PR.
`@bb/plugin-sdk` advances to the pre-1.0 `0.3.0` compatibility line.**

**Sawyer approved merging after the final CI matrix passes.**

plugin-github-v0.2.0

Toggle plugin-github-v0.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Plugin SDK 0.3: consolidated API and SDK change (get-bb#716)

## Summary

This is the single consolidated Plugin SDK 0.3 API/SDK review and
landing PR. It preserves the 18 reviewed component histories as ancestry
while presenting one combined diff against `main`.

- exact `main` base: `1449fbbbe56dcb738c88bb1fc5a6a3ae04ac1c44`
- reviewed aggregate parent: `64da9a9e8efa4480fbf1ec6bd05bc9fc22bf8e03`
- integration merge commit: `14c53c277f9298b0a56c1a6b823136b5c348ead6`
- current PR head: `249b50ba0a2a3c269ef2c96e00797e595363fb87`

## What changed and why

| Area | Change | Why |
| --- | --- | --- |
| SDK contracts | Plugins keep the same complete SDK used by the
product. Public results now use readable names such as
`ThreadSpawnResult`, `FileReadResult`, and `ProjectGetResult`, and every
supported SDK entrypoint exports the same contract. | External plugins
can typecheck without BB's private HTTP route definitions, and
compatibility changes have public names humans can review. |
| Manifest identity and branding | Required `bb.name`, `bb.description`,
and explicit `bb.branding`; separated package identity from human-facing
identity; defined compact icon versus roomy light/dark logo behavior. |
Remove ambiguous legacy fields and implicit logo discovery before
compatibility freezes. |
| Backend naming and lifecycle | Added `bb.ui.requestInput`,
`bb.events.on`, and `storage.database()`; kept KV and relational storage
separate; renamed SDK realtime observation to `subscribe`; rejected
duplicate keyed registrations; made reload atomic while listeners remain
additive. | Give concepts distinct names and predictable
registration/reload behavior without collapsing storage models with
different semantics. |
| Frontend panels and JSON | Removed `navPanel.chrome`; retained the
shared title bar and `headerContent`; made panel bodies full-bleed;
introduced recursive `JsonValue` for persisted/transmitted params. | One
consistent panel layout and an explicit serialization boundary. |
| Composer | Added `text`, `setText`, `updateText`, and `clear` while
preserving attachments and reconciling mentions. | Plugins need
arbitrary composer editing, not only quote/mention insertion. |
| RPC | Added `defineRpcContract` with Standard Schema/Zod-compatible
input and output schemas, inferred backend handlers/frontend clients,
strict JSON handling, and stable validation errors. | Make RPC type-safe
and runtime-safe from one method-specific schema instead of parallel
handwritten types. |
| Agent configuration | Added per-thread/session `bb.agents.configure`
selection of registered tools, skills, and instructions with
machine/provider/side-chat context. | Plugins need conditional access
without dynamically rebuilding registrations or weakening built-in
permission policy. |
| Multi-machine providers/projects | Added explicit host/environment
routing for provider discovery, project workspace/files/content, cache
keys, and project creation `--machine`/`--host` selectors with
documented primary fallback. | Different machines can have different
providers and files; implicit server-local behavior was incorrect. |
| Terminals | Added canonical top-level `bb.terminals` and `bb terminal`
across global/project/thread scopes, including get, rename, restart, and
ID-based mutations; removed the nested compatibility shim. | Terminal
capability should be one discoverable SDK/CLI area with consistent
routing. |
| Plugin administration | Added typed SDK/CLI coverage for plugin and
marketplace list/install/update/source/config/token/reload/remove
operations while keeping the frontend's restricted boundary. | Plugin
management is part of the product and therefore part of the supported
SDK/CLI parity target. |
| Project attachments | Added typed multipart client upload, existing
attachment DTO/read/download surfaces, remote proxying,
binary/MIME/size-limit coverage, and explicit `--client-file` CLI
semantics. | CLI clients and plugins may run on a different machine from
the selected project host. |
| Appearance | Added complete theme selection plus favicon set/reset
parity and preserved compatible theme IDs. | The SDK/CLI should
represent the complete appearance state available in the app. |
| Environment CLI | Added status, PR, branch, path, diff, file, and
patch inspection for arbitrary environments. | Agents and users need the
same environment inspection outside the UI. |
| External testing | Published runtime JS and declarations for
`@bb/plugin-sdk/testing` and `/testing/app`; added fake host/SDK,
fixtures, frontend slot runtime, behavior/inspection/lifecycle views,
pack/install tests, and strict external scaffold typechecks. | Plugin
authors need supported tests outside the BB monorepo. |
| Official/example migrations | Migrated builtins, marketplace plugins,
examples, manifests, RPC contracts, and test imports to the settled
public package surfaces; audited stale names. | The repository must
prove the contract through real consumers and not retain private source
aliases. |
| Documentation | Added the exhaustive
manifest/backend/frontend/testing/SDK reference, routing/fallback
tables, compatibility policy, authoring skill, guides, and
CLI-discoverable help. | Plugin 1.0 cannot freeze an undocumented or
internally contradictory surface. |

HTTP routes remain alongside RPC because webhooks and external callers
need them. `storage.kv` remains alongside `storage.database()` because
small JSON state and relational datasets have different limits and
lifecycle needs. No `1.0.0` version bump is included.

## Diff-size accounting

The current PR has **26,127 additions**, down from 36,473 after removing
duplicated testing declarations.

| Category | Additions | Explanation |
| --- | ---: | --- |
| Generated declarations/templates | 9,205 | Primarily the one complete
portable root SDK declaration. |
| Implementation source | 7,479 | Runtime, SDK, CLI, server, app, and
plugin migrations across the areas above. |
| Tests and fixtures | 7,336 | Contract snapshots, routing, wire
validation, fake hosts, CLI, and external package/scaffold coverage. |
| Docs, guides, and examples | 1,846 | Exhaustive reference plus
discoverable authoring/CLI surfaces. |
| Manifest/package metadata | 217 | Required identities, exports,
dependencies, and example manifests. |
| Lockfile | 44 | Workspace importer changes only. |

The cleanup commit changes the testing declaration strategy from
independently flattening the whole SDK to reusing the already-portable
public `@bb/plugin-sdk` root. The two testing declarations fell from
10,860 to 470 lines and by 421,015 bytes. They still contain no
dependency on unpublished `@bb/sdk` or `@bb/server-contract` packages.

## Component PRs and review

All 18 reviewed component heads are ancestors of the current head and
are now closed as superseded, without merging their individual PRs or
deleting their branches:

[get-bb#690](get-bb#690),
[get-bb#691](get-bb#691),
[get-bb#693](get-bb#693),
[get-bb#694](get-bb#694),
[get-bb#695](get-bb#695),
[get-bb#696](get-bb#696),
[get-bb#697](get-bb#697),
[get-bb#698](get-bb#698),
[get-bb#699](get-bb#699),
[get-bb#700](get-bb#700),
[get-bb#702](get-bb#702),
[get-bb#703](get-bb#703),
[get-bb#704](get-bb#704),
[get-bb#707](get-bb#707),
[get-bb#708](get-bb#708),
[get-bb#709](get-bb#709),
[get-bb#712](get-bb#712), and
[get-bb#715](get-bb#715).

The [exhaustive API/SDK
reference](https://github.com/ymichael/bb/blob/7fc0fdce67239c69a4636a1d64f65097a76e3250/docs/plugin-api-and-sdk-reference.md)
is included. The one permitted [final
review](https://sawyer-air.getbb.app/threads/thr_3954cdkxke) returned
`REQUEST CHANGES`; all four documentation findings were accepted and
fixed in aggregate head `64da9a9e8`, with no second review pass.

## Current-main integration

- Preserves get-bb#711's bounded timeline projection/pagination and bounded
project-thread query for compose worktree reuse.
- Preserves get-bb#713's complete popout-chat removal across app, desktop,
contracts, persistence, and runtime configuration.
- Preserves get-bb#714's project-switch attachment copying while retaining the
Plugin 1.0 attachment SDK/CLI/server APIs.
- Resolved the only source conflict in `RootComposeView.tsx` by keeping
one bounded query in the aggregate's earlier location and removing the
duplicate declaration found by focused testing.
- Generated SDK declarations first, then regenerated template/registry
artifacts canonically; no generated declaration blob was hand-merged.

## Validation

Initial consolidation validation:

- 376 focused tests across timeline bounds, attachments/project
switching, popout removal, database/desktop integration, public Plugin
SDK surfaces, templates, and docs.
- 13 affected Turbo typechecks and 7 package builds / 8 Turbo tasks.
- All 18 component heads verified as ancestors; stale-name, version,
generated-diff, docs-correction, and `git diff --check` audits passed.
- Full GitHub matrix passed before the declaration cleanup.

Declaration cleanup validation:

- Canonical SDK declaration and template generator checks.
- Forced Plugin SDK/Templates typechecks and builds.
- Plugin SDK tests and the Templates suite, including packed
backend/frontend runtimes, `skipLibCheck: false`, scaffold-vendored root
resolution, and installed-package self-reference resolution.
- Focused authoring-doc test, package dry run, declaration import audit,
formatting, and `git diff --check`.
- Refreshed GitHub CI passed all 9 executed jobs; the configured Node
compatibility placeholder was skipped.

## SDK 0.3 release coordination

- `@bb/plugin-sdk` advances from `0.2.0` to `0.3.0`.
- GitHub, Docs, and Memory advance to `0.2.0` and require SDK `^0.3.0`.
- Examples, scaffolds, generated guides, and authoring documentation
target `^0.3.0`.
- The public marketplace remains on the published plugin `0.1.x`/SDK
`0.2.x` line until the new release artifacts exist.

## Landing policy

**There is no Plugin SDK or API `1.0.0` version bump in this PR.
`@bb/plugin-sdk` advances to the pre-1.0 `0.3.0` compatibility line.**

**Sawyer approved merging after the final CI matrix passes.**

plugin-docs-v0.2.0

Toggle plugin-docs-v0.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Plugin SDK 0.3: consolidated API and SDK change (get-bb#716)

## Summary

This is the single consolidated Plugin SDK 0.3 API/SDK review and
landing PR. It preserves the 18 reviewed component histories as ancestry
while presenting one combined diff against `main`.

- exact `main` base: `1449fbbbe56dcb738c88bb1fc5a6a3ae04ac1c44`
- reviewed aggregate parent: `64da9a9e8efa4480fbf1ec6bd05bc9fc22bf8e03`
- integration merge commit: `14c53c277f9298b0a56c1a6b823136b5c348ead6`
- current PR head: `249b50ba0a2a3c269ef2c96e00797e595363fb87`

## What changed and why

| Area | Change | Why |
| --- | --- | --- |
| SDK contracts | Plugins keep the same complete SDK used by the
product. Public results now use readable names such as
`ThreadSpawnResult`, `FileReadResult`, and `ProjectGetResult`, and every
supported SDK entrypoint exports the same contract. | External plugins
can typecheck without BB's private HTTP route definitions, and
compatibility changes have public names humans can review. |
| Manifest identity and branding | Required `bb.name`, `bb.description`,
and explicit `bb.branding`; separated package identity from human-facing
identity; defined compact icon versus roomy light/dark logo behavior. |
Remove ambiguous legacy fields and implicit logo discovery before
compatibility freezes. |
| Backend naming and lifecycle | Added `bb.ui.requestInput`,
`bb.events.on`, and `storage.database()`; kept KV and relational storage
separate; renamed SDK realtime observation to `subscribe`; rejected
duplicate keyed registrations; made reload atomic while listeners remain
additive. | Give concepts distinct names and predictable
registration/reload behavior without collapsing storage models with
different semantics. |
| Frontend panels and JSON | Removed `navPanel.chrome`; retained the
shared title bar and `headerContent`; made panel bodies full-bleed;
introduced recursive `JsonValue` for persisted/transmitted params. | One
consistent panel layout and an explicit serialization boundary. |
| Composer | Added `text`, `setText`, `updateText`, and `clear` while
preserving attachments and reconciling mentions. | Plugins need
arbitrary composer editing, not only quote/mention insertion. |
| RPC | Added `defineRpcContract` with Standard Schema/Zod-compatible
input and output schemas, inferred backend handlers/frontend clients,
strict JSON handling, and stable validation errors. | Make RPC type-safe
and runtime-safe from one method-specific schema instead of parallel
handwritten types. |
| Agent configuration | Added per-thread/session `bb.agents.configure`
selection of registered tools, skills, and instructions with
machine/provider/side-chat context. | Plugins need conditional access
without dynamically rebuilding registrations or weakening built-in
permission policy. |
| Multi-machine providers/projects | Added explicit host/environment
routing for provider discovery, project workspace/files/content, cache
keys, and project creation `--machine`/`--host` selectors with
documented primary fallback. | Different machines can have different
providers and files; implicit server-local behavior was incorrect. |
| Terminals | Added canonical top-level `bb.terminals` and `bb terminal`
across global/project/thread scopes, including get, rename, restart, and
ID-based mutations; removed the nested compatibility shim. | Terminal
capability should be one discoverable SDK/CLI area with consistent
routing. |
| Plugin administration | Added typed SDK/CLI coverage for plugin and
marketplace list/install/update/source/config/token/reload/remove
operations while keeping the frontend's restricted boundary. | Plugin
management is part of the product and therefore part of the supported
SDK/CLI parity target. |
| Project attachments | Added typed multipart client upload, existing
attachment DTO/read/download surfaces, remote proxying,
binary/MIME/size-limit coverage, and explicit `--client-file` CLI
semantics. | CLI clients and plugins may run on a different machine from
the selected project host. |
| Appearance | Added complete theme selection plus favicon set/reset
parity and preserved compatible theme IDs. | The SDK/CLI should
represent the complete appearance state available in the app. |
| Environment CLI | Added status, PR, branch, path, diff, file, and
patch inspection for arbitrary environments. | Agents and users need the
same environment inspection outside the UI. |
| External testing | Published runtime JS and declarations for
`@bb/plugin-sdk/testing` and `/testing/app`; added fake host/SDK,
fixtures, frontend slot runtime, behavior/inspection/lifecycle views,
pack/install tests, and strict external scaffold typechecks. | Plugin
authors need supported tests outside the BB monorepo. |
| Official/example migrations | Migrated builtins, marketplace plugins,
examples, manifests, RPC contracts, and test imports to the settled
public package surfaces; audited stale names. | The repository must
prove the contract through real consumers and not retain private source
aliases. |
| Documentation | Added the exhaustive
manifest/backend/frontend/testing/SDK reference, routing/fallback
tables, compatibility policy, authoring skill, guides, and
CLI-discoverable help. | Plugin 1.0 cannot freeze an undocumented or
internally contradictory surface. |

HTTP routes remain alongside RPC because webhooks and external callers
need them. `storage.kv` remains alongside `storage.database()` because
small JSON state and relational datasets have different limits and
lifecycle needs. No `1.0.0` version bump is included.

## Diff-size accounting

The current PR has **26,127 additions**, down from 36,473 after removing
duplicated testing declarations.

| Category | Additions | Explanation |
| --- | ---: | --- |
| Generated declarations/templates | 9,205 | Primarily the one complete
portable root SDK declaration. |
| Implementation source | 7,479 | Runtime, SDK, CLI, server, app, and
plugin migrations across the areas above. |
| Tests and fixtures | 7,336 | Contract snapshots, routing, wire
validation, fake hosts, CLI, and external package/scaffold coverage. |
| Docs, guides, and examples | 1,846 | Exhaustive reference plus
discoverable authoring/CLI surfaces. |
| Manifest/package metadata | 217 | Required identities, exports,
dependencies, and example manifests. |
| Lockfile | 44 | Workspace importer changes only. |

The cleanup commit changes the testing declaration strategy from
independently flattening the whole SDK to reusing the already-portable
public `@bb/plugin-sdk` root. The two testing declarations fell from
10,860 to 470 lines and by 421,015 bytes. They still contain no
dependency on unpublished `@bb/sdk` or `@bb/server-contract` packages.

## Component PRs and review

All 18 reviewed component heads are ancestors of the current head and
are now closed as superseded, without merging their individual PRs or
deleting their branches:

[get-bb#690](get-bb#690),
[get-bb#691](get-bb#691),
[get-bb#693](get-bb#693),
[get-bb#694](get-bb#694),
[get-bb#695](get-bb#695),
[get-bb#696](get-bb#696),
[get-bb#697](get-bb#697),
[get-bb#698](get-bb#698),
[get-bb#699](get-bb#699),
[get-bb#700](get-bb#700),
[get-bb#702](get-bb#702),
[get-bb#703](get-bb#703),
[get-bb#704](get-bb#704),
[get-bb#707](get-bb#707),
[get-bb#708](get-bb#708),
[get-bb#709](get-bb#709),
[get-bb#712](get-bb#712), and
[get-bb#715](get-bb#715).

The [exhaustive API/SDK
reference](https://github.com/ymichael/bb/blob/7fc0fdce67239c69a4636a1d64f65097a76e3250/docs/plugin-api-and-sdk-reference.md)
is included. The one permitted [final
review](https://sawyer-air.getbb.app/threads/thr_3954cdkxke) returned
`REQUEST CHANGES`; all four documentation findings were accepted and
fixed in aggregate head `64da9a9e8`, with no second review pass.

## Current-main integration

- Preserves get-bb#711's bounded timeline projection/pagination and bounded
project-thread query for compose worktree reuse.
- Preserves get-bb#713's complete popout-chat removal across app, desktop,
contracts, persistence, and runtime configuration.
- Preserves get-bb#714's project-switch attachment copying while retaining the
Plugin 1.0 attachment SDK/CLI/server APIs.
- Resolved the only source conflict in `RootComposeView.tsx` by keeping
one bounded query in the aggregate's earlier location and removing the
duplicate declaration found by focused testing.
- Generated SDK declarations first, then regenerated template/registry
artifacts canonically; no generated declaration blob was hand-merged.

## Validation

Initial consolidation validation:

- 376 focused tests across timeline bounds, attachments/project
switching, popout removal, database/desktop integration, public Plugin
SDK surfaces, templates, and docs.
- 13 affected Turbo typechecks and 7 package builds / 8 Turbo tasks.
- All 18 component heads verified as ancestors; stale-name, version,
generated-diff, docs-correction, and `git diff --check` audits passed.
- Full GitHub matrix passed before the declaration cleanup.

Declaration cleanup validation:

- Canonical SDK declaration and template generator checks.
- Forced Plugin SDK/Templates typechecks and builds.
- Plugin SDK tests and the Templates suite, including packed
backend/frontend runtimes, `skipLibCheck: false`, scaffold-vendored root
resolution, and installed-package self-reference resolution.
- Focused authoring-doc test, package dry run, declaration import audit,
formatting, and `git diff --check`.
- Refreshed GitHub CI passed all 9 executed jobs; the configured Node
compatibility placeholder was skipped.

## SDK 0.3 release coordination

- `@bb/plugin-sdk` advances from `0.2.0` to `0.3.0`.
- GitHub, Docs, and Memory advance to `0.2.0` and require SDK `^0.3.0`.
- Examples, scaffolds, generated guides, and authoring documentation
target `^0.3.0`.
- The public marketplace remains on the published plugin `0.1.x`/SDK
`0.2.x` line until the new release artifacts exist.

## Landing policy

**There is no Plugin SDK or API `1.0.0` version bump in this PR.
`@bb/plugin-sdk` advances to the pre-1.0 `0.3.0` compatibility line.**

**Sawyer approved merging after the final CI matrix passes.**