Skip to content

refactor(stream): move stream contracts out of adapters#1083

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/layer-stream-boundary
Jun 5, 2026
Merged

refactor(stream): move stream contracts out of adapters#1083
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/layer-stream-boundary

Conversation

@limityan
Copy link
Copy Markdown
Collaborator

@limityan limityan commented Jun 5, 2026

Summary

  • Move provider-neutral stream DTOs and tool-call accumulation ownership into bitfun-agent-stream.
  • Keep bitfun-ai-adapters compatibility re-exports and add GeminiUsage / UnifiedTokenUsage conversions.
  • Move provider stream fixtures to ai-adapters and sync concise layer ownership docs.

Risk / impact

  • No product behavior change intended; provider wire parsing remains in ai-adapters, while replay and tool-call accumulation are owned by agent-stream.
  • Existing bitfun_ai_adapters::{UnifiedResponse, UnifiedTokenUsage, UnifiedToolCall} and tool_call_accumulator paths remain available through re-exports.
  • The change removes the execution -> adapters reverse dependency and keeps tests with the provider parsing owner.

Verification

  • git diff --cached --check
  • node --test scripts/check-core-boundaries.test.mjs
  • node scripts/check-core-boundaries.mjs
  • layer dependency metadata check: 38 workspace layer edges, 0 reverse-layer dependency violations
  • cargo test -p bitfun-agent-stream
  • cargo test -p bitfun-ai-adapters
  • cargo check -p bitfun-core --no-default-features
  • cargo check -p bitfun-core --features product-full
  • cargo check --workspace
  • pnpm --dir src/web-ui run test:run src/shared/services/reviewTargetClassifier.test.ts src/shared/services/review-team/pathMetadata.test.ts src/shared/services/review-team/risk.test.ts src/shared/services/reviewTeamService.test.ts
  • pnpm run check:repo-hygiene

@limityan limityan merged commit 6dc44c4 into GCWing:main Jun 5, 2026
4 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