Skip to content

Standardize trust-verification action schemas and fix MCP compatibility#6

Merged
GsCommand merged 1 commit into
mainfrom
claude/audit-commandlayer-protocol-7kpEB
May 14, 2026
Merged

Standardize trust-verification action schemas and fix MCP compatibility#6
GsCommand merged 1 commit into
mainfrom
claude/audit-commandlayer-protocol-7kpEB

Conversation

@GsCommand
Copy link
Copy Markdown
Contributor

Summary

This PR standardizes the naming and structure of trust-verification action schemas, deprecates the legacy "signing" schema in favor of "sign", and fixes MCP schema compatibility for the validate_receipt_schema tool.

Key Changes

  • Schema Standardization: Created new canonical schema files for sign and endorse actions under schemas/trust-verification/{sign,endorse}/ directories
  • Deprecated Legacy Schema: Marked schemas/trust-verification/signing/schema.v1.json as deprecated with a note directing users to the new sign schema, while retaining it for backwards-compatibility discovery
  • Updated Action Registry: Updated src/registry/actions.js to reference the new canonical schema paths for both sign and endorse actions
  • Fixed MCP Compatibility: Changed validate_receipt_schema tool input schema from z.unknown() to z.record(z.string(), z.unknown()) to comply with MCP requirements, with a comment explaining that the handler re-parses internally with the proper receiptSchema

Implementation Details

The schema changes align the action naming convention to use the singular form ("sign" instead of "signing", "endorse" instead of "endorsing"), which is reflected in both the schema files and the action registry. The deprecated signing schema is retained to avoid breaking existing discovery mechanisms while guiding users toward the canonical sign schema.

The MCP schema fix ensures that object types are properly represented using z.record() rather than z.unknown(), which is required for MCP tool schema validation while maintaining internal validation flexibility.

https://claude.ai/code/session_016igMwkFir2FkLQCHL6a34z

- src/index.js: replace z.unknown() with z.record(z.string(), z.unknown()) for
  validate_receipt_schema input — z.unknown() is not a valid MCP inputSchema
  shape (MCP requires an object schema at the input boundary)
- src/registry/actions.js: fix endorse schema_path from non-existent
  'schemas/trust-verification/endorsing/schema.v1.json' to correct
  'schemas/trust-verification/endorse/schema.v1.json'; fix sign schema_path
  from 'schemas/trust-verification/signing/schema.v1.json' to
  'schemas/trust-verification/sign/schema.v1.json'
- src/registry/schemas.js: add missing 'endorse' entry to TRUST_SCHEMAS;
  fix 'sign' entry so clas/action/namespace are canonical (sign, clas.sign.v1,
  signagent.eth) not the filesystem-derived 'signing' values
- schemas/trust-verification/signing/schema.v1.json: correct clas to
  clas.sign.v1, action to sign, namespace to signagent.eth to match registry
- schemas/trust-verification/endorse/schema.v1.json: create missing schema file
  for the endorse action (referenced by registry but no file existed)

CRITICAL (flagged for approval, not auto-fixed):
  Missing all 11 verify.* tool schemas (verify.credential, verify.identity,
  verify.authorization, verify.capability, verify.signature, verify.receipt,
  verify.attestation, verify.provenance, verify.integrity, verify.compliance,
  verify.delegation). These require product/protocol decision on input/output
  contracts before schema files can be authored.
@GsCommand GsCommand merged commit 42e9f03 into main May 14, 2026
1 check failed
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