Skip to content

createDerivedAccountStore: factory + docs only cover single-tenant; multi-tenant derived needs a path to list_accounts #1628

@bokelley

Description

@bokelley

Problem

`createDerivedAccountStore` is documented as the canonical Shape D for `accounts.resolution: 'derived'` agents, but its current shape only fits single-tenant derived adopters (audiostack, flashtalking — one literal account, no roster).

The more common derived case is multi-tenant: the agent fronts an upstream decisioning platform that owns its own account roster. Buyers transacting against that agent expect `list_accounts` to enumerate the upstream roster — same wire experience as an `'explicit'` agent, just with the roster sourced from upstream rather than maintained locally.

Today:

  • `createDerivedAccountStore` deliberately omits `.list` and `.upsert` (`src/lib/adapters/derived-account-store.ts:79-95`).
  • Multi-tenant derived adopters have no factory shaped for them — they either misuse Shape B (`createOAuthPassthroughResolver`) or hand-roll an `AccountStore`.
  • Docs (`docs/guides/account-resolution.md`, `derived-account-store.ts:1-25`) describe Shape D as "single-tenant by definition" without flagging that derived-mode itself isn't single-tenant — only this factory is.

Proposal

Two pieces, can land independently:

  1. Doc fix (small): redirect multi-tenant derived adopters explicitly. Either point them at a different shape, or document the bare-`AccountStore` recipe with `resolution: 'derived'` + custom `.list`.
  2. Factory option (larger): grow `createDerivedAccountStore` with an optional `.list` callback for multi-tenant derived (or ship a sibling `createMultiTenantDerivedAccountStore`). Auto-wires `list_accounts` when present, matches the existing `if (accounts.list)` pattern in `from-platform.ts:4576`.

Why now

Surfaces in the storyboard conformance work for #1624: the upstream spec is moving toward "every seller MUST expose `list_accounts` OR `sync_accounts`, regardless of resolution mode." Shape D adopters who took the docs at face value will be out of compliance under the clarified spec.

Related: #1624 (storyboard rubric), upstream spec amendment in `adcontextprotocol/adcp`.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions