Skip to content

[stacked on #2193] Export the canonical event types by name from the provider-bridge testing kit - #2194

Closed
SawyerHood wants to merge 1 commit into
provider-gaps-parity-publicfrom
provider-gaps-thread-event-types
Closed

[stacked on #2193] Export the canonical event types by name from the provider-bridge testing kit#2194
SawyerHood wants to merge 1 commit into
provider-gaps-parity-publicfrom
provider-gaps-thread-event-types

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #2193 (publish the parity harness). Layer 2 of 3 of the provider-gaps stack (#2193#2194#2195). Closes gap G-B from #2189.

What was wrong

A bridge's tests assert on what the runtime's assembler built from the bridge's thread/delta stream, but @get-bb/plugin-sdk/provider-bridge/testing exported no name for that event. The echo canary spelled it as ReturnType<BridgeDeltaEventCollector["assembleMessage"]>[number] and narrowed item events from that. The @get-bb/plugin-sdk/provider-bridge entry deliberately does not re-export the event vocabulary (a bridge never constructs a ThreadEvent), which is right for the authoring surface and wrong for the testing one.

What changed

packages/plugin-sdk/src/provider-bridge-testing.ts re-exports, as types, from @bb/domain: ThreadEvent, ThreadEventItem, ThreadEventItemPresentation (+ ThreadEventItemPresentationLabel / Icon / Tint), and the named item kinds ThreadEventDelegationItem, ThreadEventExtensionItem, ThreadEventFileReadItem, ThreadEventSearchItem, ThreadEventPlanStepsItem, ThreadEventWebSearchItem, ThreadEventWebFetchItem, ThreadEventBackgroundTaskItem. rollup-plugin-dts inlines them into bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts, the same way the root entry ships PromptInput.

Types only, no experimental_ value (AGENTS.md prefixes values; types in this entry are unprefixed by convention). docs/api_to_audit.md gets audit item 7 on the testing-kit entry: the persisted vocabulary now has a second public home, and the kit may want to pin a grammar version before stabilizing.

packages/plugin-sdk/src/__tests__/bundled-types.test.ts pins that the names arrive inlined (no from '@bb/…', each name declared and in the export type {} list). examples/plugins/echo-provider/provider-bridge.stream.test.ts uses ThreadEvent and drops the ReturnType workaround.

No wire change; HOST_DAEMON_PROTOCOL_VERSION untouched.

How you verified

  • pnpm exec turbo run typecheck test --filter=@get-bb/plugin-sdk: 16 files, 128 tests pass (the new bundled-types assertion included; it fails on the previous commit because the names are absent from the .d.ts).
  • pnpm exec turbo run typecheck test --filter=bb-plugin-echo-provider: 5 files, 21 tests pass with the named type.

AGENT GENERATED: by Claude Opus 5

…ting kit

A bridge's tests assert on what the assembler built, but the kit exported
no name for it: the echo canary spelled the event type as
ReturnType<BridgeDeltaEventCollector["assembleMessage"]>[number] and
narrowed item events from that.

@get-bb/plugin-sdk/provider-bridge/testing now re-exports ThreadEvent,
ThreadEventItem, ThreadEventItemPresentation (with its label, icon and
tint parts) and the named item kinds from @bb/domain as types, inlined into
the bundled declarations like PromptInput on the root entry. Types only: a
bridge never constructs an event, so no experimental_ value ships with
them; docs/api_to_audit.md gets the audit entry. The bundled-types test
pins that the names arrive inlined, and the echo stream test uses them.

Co-Authored-By: Claude <noreply@anthropic.com>
@SawyerHood SawyerHood changed the title Export the canonical event types by name from the provider-bridge testing kit [stacked on #2193] Export the canonical event types by name from the provider-bridge testing kit Aug 21, 2026
@SawyerHood SawyerHood closed this Aug 21, 2026
@SawyerHood
SawyerHood deleted the provider-gaps-thread-event-types branch August 21, 2026 21:40
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