Skip to content

Align SDK and CLI with OCP Zero Trust and Architectural Pillars#18

Open
dcplatforms wants to merge 1 commit into
mainfrom
mandate-compliance-audit-16394330935408505649
Open

Align SDK and CLI with OCP Zero Trust and Architectural Pillars#18
dcplatforms wants to merge 1 commit into
mainfrom
mandate-compliance-audit-16394330935408505649

Conversation

@dcplatforms
Copy link
Copy Markdown
Owner

Mandate Compliance Audit and Alignment

This PR aligns the OCP SDK, CLI, and Documentation with the foundational "Five Pillars of OCP," focusing on Architectural Integrity, Zero Trust Security, and Developer-First Excellence.

Key Changes:

  1. Zero Trust Error Consistency:

    • Updated A2AService._validateAgentPolicy and AgentService.performA2ATransfer to prefix all policy validation failures with Zero Trust Validation Failed: .
    • Refactored TokenizationService.signWithToken to avoid double-prefixing errors caught from the MandateService.
  2. CLI Architectural Integrity:

    • Refactored the ocp-cli x402:settle command to instantiate and utilize TokenizationService and Web3Service directly. This ensures the CLI follows the same "Last Line of Defense" cryptographic validation as the core SDK.
  3. Documentation DevEx & Structure:

    • Migrated documentation routes from [slug] to [...slug] to support nested content hierarchies (e.g., /docs/api/wallet).
    • Updated lib/docs.ts with recursive file discovery to automatically capture all Markdown files in docs/product-hub/content.
    • Expanded the hardcoded sidebar in the Next.js app to include "API Reference" and "Integrations" categories.
    • Implemented cross-platform path normalization (handling Windows backslashes) in documentation slug generation.
  4. Verification:

    • All core unit and integration tests passing (npm test).
    • Manual verification of ocp-cli settlement rails with both valid and budget-exceeding mandates.
    • Playwright-based visual verification of the updated documentation navigation and nested routing.

This alignment ensures that OCP remains a professional-grade framework where every transaction is backed by a verifiable "Chain of Evidence."


PR created automatically by Jules for task 16394330935408505649 started by @dcplatforms

- Standardize 'Zero Trust Validation Failed:' error prefix across A2A, Agent, and Tokenization services.
- Refactor ocp-cli to use core services (Web3/Tokenization) for x402 settlements, ensuring unified cryptographic validation.
- Implement nested documentation support in Next.js app via [...slug] and recursive file discovery.
- Update documentation sidebar with API Reference and Integrations categories.
- Enhance cross-platform path handling in documentation utilities.

Co-authored-by: dcplatforms <10982057+dcplatforms@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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