Skip to content

Conversation

@nastassiafulconis
Copy link
Collaborator

Summary

This PR replaces the SimpleMediaAgent with a new OutcomeAgent implementation based on the Scope3 Outcome Agent Protocol specification.

Changes

✅ Implemented

  • OutcomeAgent class with MCP protocol integration (src/outcome-agent.ts)
  • get_proposals tool: Generates proposals with product filtering and budget optimization
    • Filters products by channels, countries, and budget constraints
    • Groups products by channel for diversification
    • Uses 15% revshare pricing model
    • Returns budget capacity and execution strategies
  • accept_proposal tool: Accepts or declines proposal assignments
    • Validates required fields and budget
    • Defaults to accepting all valid assignments
    • Returns rejection reasons when validation fails
  • Comprehensive test coverage: 32 tests (15 for get-proposals, 17 for accept-proposal)
  • New binary: outcome-agent (replaces simple-media-agent)
  • New npm script: npm run start:outcome-agent

🗑️ Removed

  • All SimpleMediaAgent files and implementation
  • simple-media-agent binary

📦 Updated

  • Package.json: Changed binary from simple-media-agent to outcome-agent
  • Exports: Added OutcomeAgent and related types to main index

Breaking Changes

⚠️ BREAKING CHANGE: SimpleMediaAgent has been removed. Use OutcomeAgent instead.

  • The binary name has changed from simple-media-agent to outcome-agent
  • The API is different (MCP tools: get_proposals, accept_proposal)

Testing

npm test

All tests passing: ✅ 32 tests (17 accept-proposal, 15 get-proposals)

How to Run

SCOPE3_API_KEY=your-api-key npm run start:outcome-agent

Implementation Notes

  • Using console.error for logging because stdout is reserved for MCP protocol communication
  • Temporary: Returns empty proposals if no products provided (will add simple mirror agent feature later)
  • Business logic: Simple "dumb" budget optimization strategy as requested

Checklist

  • Tests added and passing
  • Build passing
  • Types checked
  • Changeset added
  • Code reviewed for production readiness (no TODOs, commented code removed)
  • Branch up to date with main

🤖 Generated with Claude Code

- Implement OutcomeAgent with MCP protocol integration
- Add get_proposals tool for proposal generation with product filtering and budget optimization
- Add accept_proposal tool for assignment acceptance with validation
- Replace simple-media-agent binary with outcome-agent binary
- Add comprehensive test coverage (32 tests: 15 for get-proposals, 17 for accept-proposal)
- Add npm script: start:outcome-agent
- Update exports to include OutcomeAgent and related types

BREAKING CHANGE: SimpleMediaAgent has been removed. Use OutcomeAgent instead.
The binary name has changed from simple-media-agent to outcome-agent.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@nastassiafulconis nastassiafulconis requested a review from a team November 6, 2025 22:49
nastassiafulconis and others added 3 commits November 6, 2025 14:54
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Resolved conflicts:
- package.json: Kept both outcome-agent and scope3 CLI binaries
- package-lock.json: Regenerated after merge

Merged changes from main:
- Added CLI tool (scope3 binary)
- Updated README and documentation
- Added test scripts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@nastassiafulconis nastassiafulconis force-pushed the outcomes-agent-implementation branch from 49da498 to cdf4e3c Compare November 10, 2025 18:00
@nastassiafulconis nastassiafulconis marked this pull request as draft November 10, 2025 22:08
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