Commit bd91aff
committed
feat(v3-ref-seller): sync_accounts/list_accounts via AccountStore (closes #377)
Moves the sync_accounts / list_accounts implementations off the platform
class (where they were dead code — the framework never dispatched there)
onto the AccountStore returned by _make_account_store. The framework's
tool-advertising layer probes platform.accounts.upsert and
platform.accounts.list as callables; without them every sales-* agent
silently dropped both tools and the AdCP 3.0.9 §accounts/overview probe
failed.
upsert(refs, ctx) persists the buyer's AccountReference (full
billing_entity, bank and all) and returns SyncAccountsResultRow per
account. The framework projects through to_wire_sync_accounts_row,
applying the billing_entity.bank write-only strip on emit.
list(filter, ctx) returns Account[TMeta] with the billing_entity
populated from Postgres; framework's to_wire_account strips bank on
emit. Per-principal scoping by buyer-agent agent_url is enforced —
unauthenticated callers see an empty list.
Tests cover both projections end-to-end (bank persists on write, never
appears on the wire) plus a surface-check that AccountStore exposes
upsert/list callables.
Drops account_discovery from the storyboard allowlist; allowlist now
covers only the refine_products feature gap.1 parent edc897b commit bd91aff
3 files changed
Lines changed: 335 additions & 249 deletions
File tree
- .github/workflows
- examples/v3_reference_seller
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
693 | 691 | | |
694 | 692 | | |
695 | 693 | | |
696 | 694 | | |
697 | 695 | | |
698 | | - | |
699 | 696 | | |
700 | 697 | | |
701 | 698 | | |
| |||
0 commit comments