Skip to content

Rename package to scope3 and fix changeset publishing#23

Merged
bokelley merged 9 commits into
mainfrom
update-readme-scope3
Nov 8, 2025
Merged

Rename package to scope3 and fix changeset publishing#23
bokelley merged 9 commits into
mainfrom
update-readme-scope3

Conversation

@bokelley
Copy link
Copy Markdown
Collaborator

@bokelley bokelley commented Nov 8, 2025

Summary

  • Renamed package from @scope3/agentic-client to scope3 for better UX
  • Fixed changeset publishing by removing workspace configuration
  • Removed unnecessary packages/scope3-cli/ wrapper package

Why the rename?

Better Developer Experience:

  • Shorter CLI command: npx scope3 vs npx @scope3/agentic-client
  • Easier to remember and type
  • Follows CLI tool conventions: aws, gh, docker, npm

Simpler Maintenance:

  • Single package to maintain and publish
  • No need for wrapper packages
  • Cleaner release process

Changes

  1. Package rename: @scope3/agentic-clientscope3
  2. Removed workspace config that was causing changeset errors
  3. Removed packages/scope3-cli/ wrapper (no longer needed)
  4. Updated README with new package name
  5. Updated changeset to reference scope3

Testing

  • ✅ All 84 tests passing
  • ✅ Build successful
  • ✅ CLI tested and working with real API
  • ✅ Changesets should now work properly

Migration

After this is published as scope3@1.0.6:

  • New users: npm install scope3
  • Existing users can continue using @scope3/agentic-client@1.0.4 or upgrade to scope3@1.0.6
  • We can deprecate @scope3/agentic-client on npm pointing users to scope3

🤖 Generated with Claude Code

bokelley and others added 6 commits November 8, 2025 10:41
Highlights the recommended scope3 package for shorter npx commands.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Makes the client fail loudly when the API doesn't return structuredContent,
helping catch API specification violations that need upstream fixes.

Changes:
- Remove fallback JSON parsing from text content
- Throw descriptive error when structuredContent is missing
- Include debug details (tool name, content type, preview) in error
- Update tests to verify strict validation

This ensures we catch and report any API endpoints that aren't following
the Scope3 MCP specification correctly.

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

Co-Authored-By: Claude <noreply@anthropic.com>
When the MCP API returns both content.text (human message) and structuredContent
(structured data), the CLI now displays both:
1. Human-readable message in cyan
2. Blank line
3. Structured data in table/list format

In JSON mode, includes _message field with the text.

Changes:
- Client extracts text message from content and includes as _message
- CLI detects _message and displays it before structured data
- Updated tests to verify message handling
- 84 tests passing

Example output:
  Found 1 agent:

  1. Yahoo Staging Sales Agent
     [table with structured data follows]

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

Co-Authored-By: Claude <noreply@anthropic.com>
The workspace setup was causing changesets to fail because it expected
@scope3/agentic-client to be in packages/* but it's in the root directory.

Changes:
- Removed workspaces from package.json
- Updated scope3 package to depend on @scope3/agentic-client@^1.0.5
- Updated changeset to only version the main package
- The scope3 wrapper will be published separately after the main package

This allows changesets to properly version and publish the main package.

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

Co-Authored-By: Claude <noreply@anthropic.com>
@bokelley bokelley requested a review from a team November 8, 2025 16:01
@bokelley bokelley enabled auto-merge (squash) November 8, 2025 16:01
Consolidate to a single package with a shorter, more memorable name.

Changes:
- Renamed package from @scope3/agentic-client to scope3
- Removed packages/scope3-cli/ wrapper (no longer needed)
- Updated README with new package name and simpler installation
- Updated changeset to reference scope3 instead of @scope3/agentic-client
- All 84 tests passing

Benefits:
- Shorter CLI command: npx scope3 (vs npx @scope3/agentic-client)
- Single package to maintain and publish
- Better developer experience
- Follows CLI tool naming conventions (aws, gh, docker, etc.)

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

Co-Authored-By: Claude <noreply@anthropic.com>
@bokelley bokelley changed the title fix: Remove workspace config to fix changeset publishing Rename package to scope3 and fix changeset publishing Nov 8, 2025
bokelley and others added 2 commits November 8, 2025 15:44
Users can now configure separate API keys for production and staging
environments, making it easier to work with both simultaneously.

Changes:
- Added productionApiKey and stagingApiKey to config
- CLI automatically selects correct key based on --environment flag
- Falls back to legacy single apiKey for backwards compatibility
- Updated config commands to support new keys
- Updated loadConfig to properly load all config fields

Usage:
  scope3 config set productionApiKey <key>
  scope3 config set stagingApiKey <key>
  scope3 --environment staging brand-agent list
  scope3 --environment production brand-agent list

Benefits:
- No need to swap API keys when switching environments
- Can set default environment in config
- Legacy single apiKey still works for backwards compatibility

Testing:
- Verified staging key works and caught API bug (no structuredContent)
- Verified production key works correctly

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

Co-Authored-By: Claude <noreply@anthropic.com>
Made error messages clearer and less verbose when the API doesn't
return structured data as required by the specification.

Changes:
- Simplified error message to be user-friendly
- Removed redundant JSON logger output (only shows in --debug mode)
- Only show stack trace when --debug flag is used
- Updated all tests to match new error messages

Before:
  {"message":"MCP API VIOLATION: Missing structuredContent",...}
  {"message":"Tool execution failed",...}
  Error: MCP API returned response without structuredContent...

After:
  Error: API Error: Missing structured data for "brand_agent_list"
  API returned text: "No brand agents found for BOK'a Cola."

  The API should return structured JSON data but returned only text.
  This is an API bug that needs to be fixed upstream.

With --debug flag:
  Shows full JSON logs + stack trace for debugging

Benefits:
- Much easier to understand what went wrong
- Clear indication it's an API bug, not a CLI issue
- Less cluttered output in normal mode
- Debug mode still provides full details when needed

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

Co-Authored-By: Claude <noreply@anthropic.com>
@bokelley bokelley merged commit 9cc9b74 into main Nov 8, 2025
6 checks passed
@bokelley bokelley deleted the update-readme-scope3 branch November 8, 2025 22:12
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