diff --git a/CONSOLIDATION_SUMMARY.md b/.archive-2026-05-27/CONSOLIDATION_SUMMARY.md similarity index 100% rename from CONSOLIDATION_SUMMARY.md rename to .archive-2026-05-27/CONSOLIDATION_SUMMARY.md diff --git a/CRITICAL-FIXES-APPLIED.md b/.archive-2026-05-27/CRITICAL-FIXES-APPLIED.md similarity index 100% rename from CRITICAL-FIXES-APPLIED.md rename to .archive-2026-05-27/CRITICAL-FIXES-APPLIED.md diff --git a/DEPLOYMENT-COMPLETE.md b/.archive-2026-05-27/DEPLOYMENT-COMPLETE.md similarity index 100% rename from DEPLOYMENT-COMPLETE.md rename to .archive-2026-05-27/DEPLOYMENT-COMPLETE.md diff --git a/DEPLOYMENT-READINESS.md b/.archive-2026-05-27/DEPLOYMENT-READINESS.md similarity index 100% rename from DEPLOYMENT-READINESS.md rename to .archive-2026-05-27/DEPLOYMENT-READINESS.md diff --git a/DEPLOYMENT_STATUS.md b/.archive-2026-05-27/DEPLOYMENT_STATUS.md similarity index 100% rename from DEPLOYMENT_STATUS.md rename to .archive-2026-05-27/DEPLOYMENT_STATUS.md diff --git a/GITHUB-ACTIONS-SETUP.md b/.archive-2026-05-27/GITHUB-ACTIONS-SETUP.md similarity index 100% rename from GITHUB-ACTIONS-SETUP.md rename to .archive-2026-05-27/GITHUB-ACTIONS-SETUP.md diff --git a/INTEGRATION_COMPLETE.md b/.archive-2026-05-27/INTEGRATION_COMPLETE.md similarity index 100% rename from INTEGRATION_COMPLETE.md rename to .archive-2026-05-27/INTEGRATION_COMPLETE.md diff --git a/PR_REVIEW_6.md b/.archive-2026-05-27/PR_REVIEW_6.md similarity index 100% rename from PR_REVIEW_6.md rename to .archive-2026-05-27/PR_REVIEW_6.md diff --git a/QUICK-START.md b/.archive-2026-05-27/QUICK-START.md similarity index 100% rename from QUICK-START.md rename to .archive-2026-05-27/QUICK-START.md diff --git a/REVIEW_SUMMARY.md b/.archive-2026-05-27/REVIEW_SUMMARY.md similarity index 100% rename from REVIEW_SUMMARY.md rename to .archive-2026-05-27/REVIEW_SUMMARY.md diff --git a/ROUTE_MIGRATION_GUIDE.md b/.archive-2026-05-27/ROUTE_MIGRATION_GUIDE.md similarity index 100% rename from ROUTE_MIGRATION_GUIDE.md rename to .archive-2026-05-27/ROUTE_MIGRATION_GUIDE.md diff --git a/SECURITY_ENFORCEMENT.md b/.archive-2026-05-27/SECURITY_ENFORCEMENT.md similarity index 100% rename from SECURITY_ENFORCEMENT.md rename to .archive-2026-05-27/SECURITY_ENFORCEMENT.md diff --git a/SESSION_SYNC_SUMMARY.md b/.archive-2026-05-27/SESSION_SYNC_SUMMARY.md similarity index 100% rename from SESSION_SYNC_SUMMARY.md rename to .archive-2026-05-27/SESSION_SYNC_SUMMARY.md diff --git a/TECHNICAL-SPEC.md b/.archive-2026-05-27/TECHNICAL-SPEC.md similarity index 100% rename from TECHNICAL-SPEC.md rename to .archive-2026-05-27/TECHNICAL-SPEC.md diff --git a/chitty-cli.js b/.archive-2026-05-27/chitty-cli.js similarity index 100% rename from chitty-cli.js rename to .archive-2026-05-27/chitty-cli.js diff --git a/demo-mcp-config.json b/.archive-2026-05-27/demo-mcp-config.json similarity index 100% rename from demo-mcp-config.json rename to .archive-2026-05-27/demo-mcp-config.json diff --git a/demo-mcp-sync.js b/.archive-2026-05-27/demo-mcp-sync.js similarity index 100% rename from demo-mcp-sync.js rename to .archive-2026-05-27/demo-mcp-sync.js diff --git a/mcp-handler.js b/.archive-2026-05-27/mcp-handler.js similarity index 100% rename from mcp-handler.js rename to .archive-2026-05-27/mcp-handler.js diff --git a/mcp-project-sync.js b/.archive-2026-05-27/mcp-project-sync.js similarity index 100% rename from mcp-project-sync.js rename to .archive-2026-05-27/mcp-project-sync.js diff --git a/mcp-sync-config.json b/.archive-2026-05-27/mcp-sync-config.json similarity index 100% rename from mcp-sync-config.json rename to .archive-2026-05-27/mcp-sync-config.json diff --git a/test-mcp-langchain.js b/.archive-2026-05-27/test-mcp-langchain.js similarity index 100% rename from test-mcp-langchain.js rename to .archive-2026-05-27/test-mcp-langchain.js diff --git a/CHARTER.md b/CHARTER.md index 478e5c4..d5c1c59 100644 --- a/CHARTER.md +++ b/CHARTER.md @@ -62,13 +62,20 @@ ChittyID is the **authoritative identity management foundation** for the ChittyO ### Core Endpoints | Endpoint | Method | Purpose | |----------|--------|---------| -| `/api/v2/chittyid/mint` | POST | Generate new ChittyID | -| `/api/v2/chittyid/verify` | POST | Verify ChittyID validity | -| `/api/v2/chittyid/audit` | POST | Get audit trail | -| `/api/v2/chittyid/mint/batch` | POST | Batch generation | -| `/api/v2/fallback/request` | POST | Fallback service | +| `/mint` | POST | **Canonical** — generate a new ChittyID (body: `{entityType:"P"\|"L"\|"T"\|"E"\|"A"}`) | +| `/api/validate` | POST | Verify ChittyID validity (body: `{id}`) | +| `/api/spec` | GET | OpenAPI specification | | `/health` | GET | Service health | +### Deprecated Aliases (sunset 2027-05-27) +These remain for backward compatibility and 308-redirect / proxy to the canonical `POST /mint`. Do not build new integrations against them. + +| Endpoint | Method | Replacement | +|----------|--------|-------------| +| `/v1/mint` | POST | `POST /mint` | +| `/generate` | GET | `POST /mint` with `{entityType:"P"}` | +| `/api/get-chittyid` | GET | `POST /mint` | + ### ChittyID Format ``` VV-G-LLL-SSSS-T-YYMM-C-XX @@ -131,4 +138,4 @@ This charter is part of a synchronized documentation triad. Changes to shared fi **Related docs**: [CHITTY.md](CHITTY.md) (badge/one-pager) | [CLAUDE.md](CLAUDE.md) (developer guide) --- -*Charter Version: 1.0.0 | Last Updated: 2026-02-23* +*Charter Version: 1.0.1 | Last Updated: 2026-05-28* diff --git a/CHITTY.md b/CHITTY.md index 0c7031d..407338d 100644 --- a/CHITTY.md +++ b/CHITTY.md @@ -64,11 +64,10 @@ Version, Geographic region, Jurisdiction, Sequential ID, Entity Type (P/L/T/E/A) | Path | Method | Auth | Purpose | |------|--------|------|---------| | `/health` | GET | No | Health check | -| `/api/v2/chittyid/mint` | POST | Yes | Generate new ChittyID | -| `/api/v2/chittyid/verify` | POST | Yes | Verify ChittyID validity | -| `/api/v2/chittyid/audit` | POST | Yes | Get audit trail | -| `/api/v2/chittyid/mint/batch` | POST | Yes | Batch generation | -| `/api/v2/fallback/request` | POST | Yes | Fallback service | +| `/mint` | POST | Yes | **Canonical** — generate a new ChittyID | +| `/api/validate` | POST | Yes | Verify ChittyID validity | +| `/api/spec` | GET | No | OpenAPI specification | +| `/v1/mint`, `/generate`, `/api/get-chittyid` | — | — | Deprecated aliases → `POST /mint` (sunset 2027-05-27) | ## Document Triad diff --git a/README.md b/README.md index 63bc219..6416abc 100644 --- a/README.md +++ b/README.md @@ -27,12 +27,16 @@ This is the **authoritative ChittyID Foundation service** that defines HOW Chitt ## 🚀 API Endpoints -### v2 API (Current) -- `POST /api/v2/chittyid/mint` - Generate new ChittyID -- `POST /api/v2/chittyid/verify` - Verify ChittyID validity -- `POST /api/v2/chittyid/audit` - Get audit trail -- `POST /api/v2/chittyid/mint/batch` - Batch generation -- `POST /api/v2/fallback/request` - Fallback service +### Canonical API +- `POST /mint` - Generate a new ChittyID (body: `{entityType:"P"|"L"|"T"|"E"|"A"}`) +- `POST /api/validate` - Verify ChittyID validity +- `GET /api/spec` - OpenAPI specification +- `GET /health` - Service health + +### Deprecated Aliases (sunset 2027-05-27) +- `POST /v1/mint` → use `POST /mint` +- `GET /generate` → use `POST /mint` with `{entityType:"P"}` +- `GET /api/get-chittyid` → use `POST /mint` ### Authentication All endpoints require Bearer token authentication: @@ -44,17 +48,13 @@ Authorization: Bearer your_chitty_id_token ### Request a ChittyID ```javascript -const response = await fetch('https://id.chitty.cc/api/v2/chittyid/mint', { +const response = await fetch('https://id.chitty.cc/mint', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer your_chitty_id_token' }, - body: JSON.stringify({ - entity: 'PERSON', - name: 'John Doe', - format: 'official' - }) + body: JSON.stringify({ entityType: 'P' }) }); const result = await response.json(); @@ -63,15 +63,13 @@ console.log(result.chitty_id); // CP-A-001-1234-P-2509-I-82 ### Verify a ChittyID ```javascript -const response = await fetch('https://id.chitty.cc/api/v2/chittyid/verify', { +const response = await fetch('https://id.chitty.cc/api/validate', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer your_chitty_id_token' }, - body: JSON.stringify({ - chittyId: 'CP-A-001-1234-P-2509-I-82' - }) + body: JSON.stringify({ id: 'CP-A-001-1234-P-2509-I-82' }) }); const result = await response.json(); diff --git a/chittyid.js b/chittyid.js index 7297cf9..b12e9f7 100644 --- a/chittyid.js +++ b/chittyid.js @@ -47,7 +47,7 @@ class ChittyIDClient { } try { - const response = await fetch(`${this.serverUrl}/api/v2/chittyid/mint`, { + const response = await fetch(`${this.serverUrl}/mint`, { method: "POST", headers: { "Content-Type": "application/json", @@ -55,11 +55,10 @@ class ChittyIDClient { "X-ChittyOS-Pipeline": "Router→Intake→Trust→Authorization→Generation", }, body: JSON.stringify({ + entityType, region, jurisdiction, - entity: entityType, trustLevel, - format: "official", }), }); @@ -94,13 +93,13 @@ class ChittyIDClient { } try { - const response = await fetch(`${this.serverUrl}/api/v2/chittyid/verify`, { + const response = await fetch(`${this.serverUrl}/api/validate`, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${this.apiKey}`, }, - body: JSON.stringify({ chittyId }), + body: JSON.stringify({ id: chittyId }), }); if (!response.ok) { diff --git a/eslint.config.js b/eslint.config.js index 13c7e24..d040175 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -9,7 +9,7 @@ export default [ "_worker.js", "node_modules/**", "research/**", - "chitty-cli.js", + ".archive-2026-05-27/**", "coverage/**", ".nyc_output/**", ], diff --git a/package.json b/package.json index ecf1623..3e7911f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@chittyfoundation/chittyid", "version": "2.0.0", "description": "Official ChittyID Foundation Service - Authoritative identity management for ChittyOS ecosystem", - "main": "chittyid-service-worker.js", + "main": "worker.js", "type": "module", "repository": { "type": "git",