Overview
Thecompliance sub-client provides tools for regulatory compliance: organization-wide summaries, bulk exports of grants and audit entries, and full evidence packs with chain integrity verification.
compliance.getSummary()
Get an organization-wide compliance summary with aggregate counts for agents, grants, audit entries, and policies.Parameters
ISO 8601 start date for the summary window.
ISO 8601 end date for the summary window.
Response: ComplianceSummary
ISO 8601 timestamp when the summary was generated.
Agent counts:
{ total, active, suspended, revoked }.Grant counts:
{ total, active, revoked, expired }.Audit entry counts:
{ total, success, failure, blocked }.Policy counts:
{ total }.The organization’s current plan.
compliance.exportGrants()
Export all grants, optionally filtered by status and date range.Parameters
ISO 8601 start date filter.
ISO 8601 end date filter.
Filter by grant status.
Response: ComplianceGrantsExport
ISO 8601 timestamp when the export was generated.
Total number of exported grants.
Array of grant objects.
compliance.exportAudit()
Export all audit entries, optionally filtered by date range, agent, or status.Parameters
ISO 8601 start date filter.
ISO 8601 end date filter.
Filter by agent ID.
Filter by action status.
Response: ComplianceAuditExport
ISO 8601 timestamp when the export was generated.
Total number of exported entries.
Array of audit entry objects.
compliance.evidencePack()
Generate a full evidence pack for compliance frameworks (SOC 2, GDPR, or both). Includes a summary, all grants, audit entries, policies, and chain integrity verification.Parameters
The compliance framework to generate evidence for. Defaults to
'all'.ISO 8601 start date for the evidence window.
ISO 8601 end date for the evidence window.
Response: EvidencePack
Metadata:
{ schemaVersion, generatedAt, since?, until?, framework }.Aggregate counts for agents, grants, audit entries, policies, and plan.
All grants in the evidence window.
All audit entries in the evidence window.
All active policies.
Chain integrity verification result.
ChainIntegrity
Whether the hash chain is intact.
Number of entries verified.
ISO 8601 timestamp of the first broken link, or
null if the chain is intact.