Skip to content

Conversation

@EmmaLouise2018
Copy link
Collaborator

@EmmaLouise2018 EmmaLouise2018 commented Feb 11, 2026

CLI demo: https://www.loom.com/share/2d81ef722e71484d978de208f08bffd5

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
EmmaLouise2018 and others added 11 commits February 12, 2026 09:42
Remove old platform/partner workflow scripts and update-schemas.sh.
Add new test scripts for buyer, brand, partner personas and a
TypeScript SDK integration test. Update scripts README for v2.
Examples were using non-existent PlatformClient and outdated methods.
Updated to use Scope3Client with persona-based configuration and
correct resource methods.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add `scope3 commands` to list all available commands at once
- Add documentation link to main help output
- Fix cli-reference.md to match actual CLI syntax (positional args, kebab-case)
- Add Quick Start section to docs
- Add YAML output format documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The build script now runs chmod +x on dist/cli/index.js so users
can run ./dist/cli/index.js directly during development.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Group commands in `scope3 commands` by persona (buyer, brand, partner)
with descriptions for each persona type and visual separators.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove Commander default values so config file settings take precedence
- CLI flags still override config when explicitly passed
- Add Quick Start section to help output
- Show helpful hint when options passed without a command
- Improve option descriptions to show defaults in help text

Fixes issue where `scope3 config set environment staging` was ignored
because Commander's default 'production' always took precedence.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix table output to properly parse API response structure
- Handle { data: [...], meta: { pagination } } responses
- Handle nested responses { data: { campaigns: [...], total } }
- Show item columns (id, name, status, etc.) instead of raw JSON

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Handle API responses like { data: {...}, error } from create/update
operations by extracting and displaying the data object fields.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace outdated changesets (referencing PlatformClient/PartnerClient)
with accurate changeset describing the actual v2.0.0 architecture:
- Unified Scope3Client with persona parameter
- CLI with config, commands, and persona support
- Migration guide from v1 Scope3AgenticClient

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rewrite TESTING.md to match v2.0.0 architecture (removed stale
  Simple Media Agent references)
- Fix brand-guide.md pagination example to use take/skip instead
  of non-existent cursor API

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

2 participants