Goal
Make interop between contextweaver's internal types and the canonical weaver_contracts types cheap and explicit. This ensures contextweaver can produce and consume spec-compliant data structures without manual translation.
Scope
A minimal mapping layer that converts between:
- contextweaver internal types ↔
weaver_contracts Core types:
SelectableItem
ChoiceCard
RoutingDecision
Frame
Acceptance Criteria
Why
Per weaver-spec, the contracts are the interfaces. Without explicit adapters, each integration will implement its own ad-hoc mapping, leading to inconsistencies and subtle bugs.
Context
Part of Milestone E0 — Connect + Align Boundaries.
Goal
Make interop between contextweaver's internal types and the canonical
weaver_contractstypes cheap and explicit. This ensures contextweaver can produce and consume spec-compliant data structures without manual translation.Scope
A minimal mapping layer that converts between:
weaver_contractsCore types:SelectableItemChoiceCardRoutingDecisionFrameAcceptance Criteria
contextweaver/adapters/weaver_contracts.py) providing:to_weaver(internal_type) → weaver_contracts typefrom_weaver(weaver_contracts type) → internal_typeinternal → weaver → internalis lossless for all four typesweaver_contractsadded as an optional dependency (not required for standalone usage)Why
Per weaver-spec, the contracts are the interfaces. Without explicit adapters, each integration will implement its own ad-hoc mapping, leading to inconsistencies and subtle bugs.
Context
Part of Milestone E0 — Connect + Align Boundaries.