logicsrc/packages/schemas/schemas/logicsrc-credential-sync-run.schema.json
Anthony Ettinger cf73fe5af2 feat(credential-sharing): implement the Credential Sharing OpenSpec (M1-M3)
New @logicsrc/plugin-credential-sharing: a provider-neutral secret-sync engine
with env/.env, Doppler, Railway, and GitHub Secrets adapters behind one
CredentialProvider contract.

- engine: inspect -> diff -> plan -> approve -> sync -> rollback -> audit/export
- dry-run is the default for sync; --approve writes; destructive changes gated
- fingerprint-based diffs (salted SHA-256); raw values never printed or stored in
  plans/runs/audit; rollback pre-image kept in a 0600 .logicsrc vault (gitignored)
- github-secrets is write-only for values (sealed-box via libsodium), so it cannot
  be a sync source or value-restoring rollback target
- CLI: real `logicsrc credentials <providers|inspect|diff|plan|approve|sync|
  rollback|audit|export>` (replaces the prior stub)
- 4 JSON schemas registered in @logicsrc/validators
- flip logicsrc.com/credential-sharing band from coming-soon to available
- 37 tests pass; full env->env lifecycle verified; artifacts schema-validate

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 15:24:30 +00:00

35 lines
1.4 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.logicsrc.com/logicsrc-credential-sync-run.schema.json",
"title": "LogicSRC Credential Sync Run",
"type": "object",
"required": ["type", "id", "planId", "status", "dryRun", "results", "auditEventIds", "reversible", "startedAt", "finishedAt"],
"additionalProperties": false,
"properties": {
"type": { "const": "logicsrc.credential_sync_run" },
"id": { "type": "string", "minLength": 1 },
"planId": { "type": "string", "minLength": 1 },
"status": { "enum": ["planned", "dry_run", "applied", "partial", "failed", "rolled_back"] },
"dryRun": { "type": "boolean" },
"results": {
"type": "array",
"items": {
"type": "object",
"required": ["key", "op", "applied", "dryRun"],
"additionalProperties": false,
"properties": {
"key": { "type": "string", "minLength": 1 },
"op": { "enum": ["add", "update", "remove", "unchanged", "unknown"] },
"applied": { "type": "boolean" },
"dryRun": { "type": "boolean" },
"targetFingerprint": { "type": "string" },
"error": { "type": "string" }
}
}
},
"auditEventIds": { "type": "array", "items": { "type": "string" } },
"reversible": { "type": "boolean" },
"startedAt": { "type": "string", "format": "date-time" },
"finishedAt": { "type": "string", "format": "date-time" }
}
}