Skip to content

Conversation

@EmmaLouise2018
Copy link
Collaborator

Summary

Complete rebuild of the Scope3 SDK to match the live v2 Agentic Platform API. Replaces the old OpenAPI-generated code with a hand-crafted, persona-based TypeScript client.

  • 3 persona-based APIs (buyer, brand, partner) via unified Scope3Client
  • REST and MCP adapters with Bearer token auth and api_call tool
  • 13 resource classes with full CRUD operations and input validation
  • 3 campaign types: bundle, performance, audience with separate create/update endpoints
  • Bundle-based product discovery workflow (create bundle → discover → add products → create campaign)
  • skill.md parser with bundled fallback for all 3 personas
  • CLI with --persona flag, config management, and all resource commands
  • Webhook server with timing-safe auth, body validation, and size limits
  • Security hardening: validateResourceId on all URL path params, sanitizeForLogging with depth limits and proto-key filtering, Promise caching for race conditions
  • 225 tests across 14 suites, all passing
  • Comprehensive docs: getting-started, buyer guide, brand guide, partner guide, CLI reference

Breaking Changes

  • Package now requires persona in client config
  • Auth uses Authorization: Bearer header (was x-scope3-api-key)
  • Response envelope: { data, pagination, error } (was flat)
  • Products are on bundles, not campaigns
  • MCP uses single api_call tool (was per-resource tools)

Test plan

  • npm run type-check — 0 errors
  • npm run lint — 0 errors
  • npm run build — clean
  • npm test — 14 suites, 225 tests, all passing
  • Two rounds of expert code review (code, security, TypeScript) with all critical/high/medium issues resolved
  • Manual smoke test against staging: scope3 --persona buyer advertisers list
  • Manual smoke test: scope3 --persona brand brands list
  • Manual smoke test: scope3 --persona partner health

Complete rewrite of the Scope3 SDK to match the live v2 Agentic Platform API.

- 3 persona-based APIs (buyer, brand, partner) with unified Scope3Client
- REST and MCP adapters with Bearer token auth
- 13 resource classes with full CRUD operations
- 3 campaign types (bundle, performance, audience)
- Bundle-based product discovery workflow
- skill.md parser with bundled fallback for all 3 personas
- CLI with --persona flag and commander.js
- Webhook server with timing-safe auth and body validation
- Input validation (validateResourceId) on all URL path parameters
- 225 tests across 14 suites, all passing
- Comprehensive docs (getting-started, buyer, brand, partner, CLI reference)
@EmmaLouise2018 EmmaLouise2018 requested a review from a team February 11, 2026 21:48
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