Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: chittyid-mothership
projectName: chittyid
directory: dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
deployment-trigger: ${{ github.event_name }}
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Project Overview

This is the **ChittyID Mothership** - a Cloudflare Worker-based management system for ChittyIDs from the id.chitty.cc service. ChittyID is a universal identity system for people, places, things, and events, implemented as part of the broader ChittyOS ecosystem.
This is the **ChittyID** - a Cloudflare Worker-based management system for ChittyIDs from the id.chitty.cc service. ChittyID is a universal identity system for people, places, things, and events, implemented as part of the broader ChittyOS ecosystem.

### Key Architecture Components

Expand Down
4 changes: 2 additions & 2 deletions _worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
return new Response(`<!DOCTYPE html>
<html>
<head>
<title>ChittyID Mothership</title>
<title>ChittyID</title>
<meta charset="utf-8">
<style>
body { font-family: Arial, sans-serif; margin: 40px; background: #f5f5f5; }
Expand All @@ -48,7 +48,7 @@ export default {
</head>
<body>
<div class="container">
<h1>🚀 ChittyID Mothership</h1>
<h1>🚀 ChittyID</h1>
<div class="status">
<strong>Status:</strong> AI Agent System Active<br>
<strong>Version:</strong> 1.0.0<br>
Expand Down
6 changes: 3 additions & 3 deletions canon/api-routes-chittyid.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ async function handleGetChittyId(request, env, circuitBreaker, api) {
headers: {
...corsHeaders(),
"X-Pipeline-Completed": "true",
"X-ChittyOS-Service": "chittyid-mothership",
"X-ChittyOS-Service": "chittyid",
},
},
);
Expand Down Expand Up @@ -501,7 +501,7 @@ export async function onRequest(context) {
const html = `<!DOCTYPE html>
<html>
<head>
<title>ChittyID Mothership</title>
<title>ChittyID</title>
<meta charset="utf-8">
<style>
body { font-family: Arial, sans-serif; margin: 40px; background: #f5f5f5; }
Expand All @@ -514,7 +514,7 @@ export async function onRequest(context) {
</head>
<body>
<div class="container">
<h1>🚀 ChittyID Mothership</h1>
<h1>🚀 ChittyID</h1>
<div class="status">
<strong>Status:</strong> AI Agent System Active<br>
<strong>Version:</strong> 2.0.0<br>
Expand Down
4 changes: 2 additions & 2 deletions canon/worker-chittyid.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* ChittyID Mothership - Cloudflare Worker Entry Point
* ChittyID - Cloudflare Worker Entry Point
* Hardened Security Configuration with Pipeline Enforcement
* Enhanced with MCP Portal Integration and LangChain AI Routing
*/
Expand Down Expand Up @@ -215,7 +215,7 @@ export default {
"Content-Type": "application/json",
"X-Security-Error": "true",
"X-Pipeline-Required": "true",
"X-ChittyOS-Service": "chittyid-mothership",
"X-ChittyOS-Service": "chittyid",
"X-MCP-Portal": "enabled",
"X-LangChain-AI": "integrated",
},
Expand Down
2 changes: 1 addition & 1 deletion chitty-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ async function validate(id: string): Promise<void> {

if (!res.ok) {
// Fallback to worker validation
const workerRes = await fetch(`https://chittyid-mothership.chitty.workers.dev/api/validate`, {
const workerRes = await fetch(`https://chittyid.chitty.workers.dev/api/validate`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
Expand Down
2 changes: 1 addition & 1 deletion dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
{/* Footer */}
<div className="text-xs text-gray-600 flex items-center gap-3">
<Save /> Auto-saves to localStorage. Drag headers to move. Resize from corners.
<span className="ml-auto">ChittyID Mothership • id.chitty.cc • Powered by ChittyRouter AI Gateway</span>
<span className="ml-auto">ChittyID • id.chitty.cc • Powered by ChittyRouter AI Gateway</span>
</div>
</div>
);
Expand Down
6 changes: 3 additions & 3 deletions functions/api/[[route]].js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ async function handleGetChittyId(request, env, circuitBreaker, api) {
headers: {
...corsHeaders(),
"X-Pipeline-Completed": "true",
"X-ChittyOS-Service": "chittyid-mothership",
"X-ChittyOS-Service": "chittyid",
},
},
);
Expand Down Expand Up @@ -632,7 +632,7 @@ export async function onRequest(context) {
const html = `<!DOCTYPE html>
<html>
<head>
<title>ChittyID Mothership</title>
<title>ChittyID</title>
<meta charset="utf-8">
<style>
body { font-family: Arial, sans-serif; margin: 40px; background: #f5f5f5; }
Expand All @@ -645,7 +645,7 @@ export async function onRequest(context) {
</head>
<body>
<div class="container">
<h1>🚀 ChittyID Mothership</h1>
<h1>🚀 ChittyID</h1>
<div class="status">
<strong>Status:</strong> AI Agent System Active<br>
<strong>Version:</strong> 2.0.0<br>
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
},
"metadata": {
"chittyos": {
"service": "chittyid-mothership",
"service": "chittyid",
"enforcement_level": "MAXIMUM",
"pipeline_required": true,
"bypassable": false
Expand Down
2 changes: 1 addition & 1 deletion monitoring/dashboards/grafana-chittyid.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dashboard": {
"id": null,
"title": "ChittyID Mothership - Production Dashboard",
"title": "ChittyID - Production Dashboard",
"tags": ["chittyos", "identity", "production"],
"timezone": "UTC",
"refresh": "30s",
Expand Down
4 changes: 2 additions & 2 deletions monitoring/metrics/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ alerting:
- alertmanager:9093

scrape_configs:
# ChittyID Mothership - Main Service
- job_name: 'chittyid-mothership'
# ChittyID - Main Service
- job_name: 'chittyid'
static_configs:
- targets: ['id.chitty.cc:443']
scheme: https
Expand Down
10 changes: 5 additions & 5 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
BUILD_DIR="$PROJECT_ROOT/dist"
LOG_FILE="$PROJECT_ROOT/deployment.log"
CLOUDFLARE_ACCOUNT_ID="${CLOUDFLARE_ACCOUNT_ID:-84f0f32886f1d6196380fe6cbe9656a8}"
PROJECT_NAME="chittyid-mothership"
PROJECT_NAME="chittyid"

# Colors for output
RED='\033[0;31m'
Expand Down Expand Up @@ -169,7 +169,7 @@ deploy_worker() {

# Deploy worker
log "Deploying worker..."
if ! wrangler deploy --name chittyid-mothership; then
if ! wrangler deploy --name chittyid; then
error "Worker deployment failed"
fi

Expand All @@ -184,7 +184,7 @@ deploy_pages() {

# Deploy to Pages
log "Deploying to Pages..."
if ! wrangler pages deploy dist --project-name=chittyid-mothership --compatibility-date=2025-01-16; then
if ! wrangler pages deploy dist --project-name=chittyid --compatibility-date=2025-01-16; then
error "Pages deployment failed"
fi

Expand Down Expand Up @@ -232,7 +232,7 @@ setup_monitoring() {
# Create basic monitoring configuration
cat > "$PROJECT_ROOT/monitoring-config.json" << EOF
{
"service": "chittyid-mothership",
"service": "chittyid",
"version": "2.0.0",
"endpoints": {
"health": "/api/health",
Expand Down Expand Up @@ -358,7 +358,7 @@ generate_report() {
## Rollback Plan

If issues arise:
1. \`wrangler rollback chittyid-mothership\` - Rollback worker
1. \`wrangler rollback chittyid\` - Rollback worker
2. \`git revert <commit>\` - Revert code changes
3. Deploy previous version with \`npm run deploy\`

Expand Down
2 changes: 1 addition & 1 deletion scripts/monitor-notion-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Monitors sync health and alerts on failures
*/

const WORKER_URL = process.env.NOTION_SYNC_WORKER_URL || 'https://notion-sync.chittyid-mothership.workers.dev';
const WORKER_URL = process.env.NOTION_SYNC_WORKER_URL || 'https://notion-sync.chittyid.workers.dev';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the NotionSync workers.dev subdomain unchanged

When NOTION_SYNC_WORKER_URL is not set, the monitor now probes notion-sync.chittyid.workers.dev; in a workers.dev URL the segment after the worker name is the Cloudflare account subdomain, so renaming the ChittyID service label does not move the separate notion-sync worker from the existing chittyid-mothership subdomain. This default will make the health checks report the NotionSync worker as unreachable unless every environment overrides it.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #22 (commit 8236bb6): NOTION_SYNC_WORKER_URL is now required; script fails fast with a clear error otherwise. No wrangler config in this repo deploys notion-sync, so guessing a canonical URL would be wrong (the worker may be dead code worth removing separately).

const ALERT_THRESHOLD = {
schema_mismatch: 0,
rate_limit_percentage: 2,
Expand Down
4 changes: 2 additions & 2 deletions scripts/setup-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ create_wrangler_config() {
warn "wrangler.toml not found. Creating basic configuration..."

cat > wrangler.toml << 'EOF'
name = "chittyid-mothership"
name = "chittyid"
compatibility_date = "2025-01-16"
pages_build_output_dir = "dist"

Expand Down Expand Up @@ -270,7 +270,7 @@ create_monitoring_config() {
{
"dashboard": {
"id": null,
"title": "ChittyID Mothership",
"title": "ChittyID",
"tags": ["chittyos", "identity"],
"timezone": "browser",
"panels": [
Expand Down
2 changes: 1 addition & 1 deletion src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class ChittyAPI {
method: 'GET',
handler: async () => {
return {
name: 'ChittyID Mothership API',
name: 'ChittyID API',
version: '2.0.0',
description: 'ChittyID management system for IDs from id.chitty.cc',
endpoints: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ChittyDashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export default function ChittyDashboard() {
{/* Footer */}
<div className="text-xs text-black/60 flex items-center gap-3">
<Save className="h-4 w-4" /> Layout auto-saves to localStorage. Drag to reorder. Resize corners. Import/Export JSON to version.
<span className="ml-auto">ChittyID Mothership • id.chitty.cc • Powered by ChittyRouter AI Gateway</span>
<span className="ml-auto">ChittyID • id.chitty.cc • Powered by ChittyRouter AI Gateway</span>
</div>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const ChittyConfig = {
// API Configuration
api: {
version: '2.0.0',
name: 'ChittyID Mothership',
name: 'ChittyID',
description: 'Identity management system for ChittyIDs from id.chitty.cc service',
baseUrl: 'https://id.chitty.cc',
timeout: 30000, // 30 seconds
Expand Down
8 changes: 4 additions & 4 deletions src/middleware/pipeline-enforcer.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class PipelineEnforcer {
headers: {
'Content-Type': 'application/json',
'X-Pipeline-Required': 'true',
'X-ChittyOS-Service': 'chittyid-mothership'
'X-ChittyOS-Service': 'chittyid'
}
}
);
Expand Down Expand Up @@ -347,7 +347,7 @@ export class PipelineEnforcer {
'Content-Type': 'application/json',
'X-Pipeline-Required': 'true',
'X-Pipeline-Enforcement': 'MANDATORY',
'X-ChittyOS-Service': 'chittyid-mothership',
'X-ChittyOS-Service': 'chittyid',
'Access-Control-Allow-Origin': '*',
'Access-Control-Expose-Headers': 'X-Pipeline-Required,X-Pipeline-Enforcement'
}
Expand All @@ -361,7 +361,7 @@ export class PipelineEnforcer {
addEnforcementHeaders(response) {
const headers = new Headers(response.headers);
headers.set('X-Pipeline-Enforcement', 'ACTIVE');
headers.set('X-ChittyOS-Service', 'chittyid-mothership');
headers.set('X-ChittyOS-Service', 'chittyid');
headers.set('X-Pipeline-Info', 'Generation requires pipeline completion');

return new Response(response.body, {
Expand All @@ -379,7 +379,7 @@ export class PipelineEnforcer {
headers.set('X-Pipeline-Completed', 'true');
headers.set('X-Pipeline-Stages', pipelineContext.stages.join(','));
headers.set('X-Pipeline-Trust-Level', pipelineContext.trustLevel.toString());
headers.set('X-ChittyOS-Service', 'chittyid-mothership');
headers.set('X-ChittyOS-Service', 'chittyid');

return new Response(response.body, {
status: response.status,
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/request-interceptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ export class RequestInterceptor {
"X-Security-Block": "true",
"X-Block-Reason": reason,
"X-Pipeline-Required": "true",
"X-ChittyOS-Service": "chittyid-mothership",
"X-ChittyOS-Service": "chittyid",
},
},
);
Expand Down
16 changes: 8 additions & 8 deletions src/services/registry-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export class RegistryClient {
*/
buildServiceInfo() {
return {
service: 'chittyid-mothership',
name: 'ChittyID Mothership',
service: 'chittyid',
name: 'ChittyID',
version: '2.0.0',
description: 'Identity management system with hardened security pipeline',
endpoint: 'https://chittyid-mothership.chitty.workers.dev',
endpoint: 'https://chittyid.chitty.workers.dev',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Advertise only a configured service endpoint

With the current worker config (wrangler.jsonc:9 sets workers_dev: false and the only route is id.chitty.cc/*), the renamed https://chittyid.chitty.workers.dev host is not served by this deployment. Registering that URL as the service endpoint makes registry consumers and later health updates probe an unreachable host after the rename; use the routed https://id.chitty.cc endpoint or enable workers.dev before advertising it.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #22 (commit 8236bb6): endpoint now reads from env.CHITTYID_SERVICE_URL / SERVICE_PUBLIC_URL, falling back to https://id.chitty.cc. No hardcoded workers.dev URL.

domain: 'https://id.chitty.cc',
health: '/api/health',
priority: 1,
Expand All @@ -50,7 +50,7 @@ export class RegistryClient {
]
},
registeredAt: new Date().toISOString(),
registeredBy: 'chittyid-mothership-deployment'
registeredBy: 'chittyid-deployment'
};
}

Expand Down Expand Up @@ -104,7 +104,7 @@ export class RegistryClient {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-ChittyOS-Service': 'chittyid-mothership',
'X-ChittyOS-Service': 'chittyid',
'X-ChittyOS-Version': '2.0.0'
},
body: JSON.stringify(this.serviceInfo)
Expand Down Expand Up @@ -166,7 +166,7 @@ export class RegistryClient {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'X-ChittyOS-Service': 'chittyid-mothership'
'X-ChittyOS-Service': 'chittyid'
},
body: JSON.stringify({
status,
Expand Down Expand Up @@ -198,7 +198,7 @@ export class RegistryClient {
*/
async getHealthStatus() {
try {
const response = await fetch('https://chittyid-mothership.chitty.workers.dev/api/health');
const response = await fetch('https://chittyid.chitty.workers.dev/api/health');
if (response.ok) {
return await response.json();
}
Expand Down Expand Up @@ -239,7 +239,7 @@ export class RegistryClient {
const response = await fetch(`${registration.registry}/api/services/${registration.registrationId}`, {
method: 'DELETE',
headers: {
'X-ChittyOS-Service': 'chittyid-mothership'
'X-ChittyOS-Service': 'chittyid'
}
});

Expand Down
4 changes: 2 additions & 2 deletions src/services/topic-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class TopicSync {
},

metadata: {
createdBy: "chittyid-mothership",
createdBy: "chittyid",
version: "1.0.0",
embedding: null,
keywords: [],
Expand Down Expand Up @@ -262,7 +262,7 @@ export class TopicSync {
sender: {
type: message.senderType || "user",
id: message.senderId,
service: message.service || "chittyid-mothership",
service: message.service || "chittyid",
},
content: {
text: message.text,
Expand Down
2 changes: 1 addition & 1 deletion src/workers/notion-sync-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ export class NotionSyncWorker {
this.metrics.upsert_skipped,
this.metrics.dlq_pushed
],
indexes: ['chittyid-mothership']
indexes: ['chittyid']
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion test-advanced.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ echo "🔐 ADVANCED SECURITY TESTING"
echo "============================"
echo ""

ENDPOINT="https://chittyid-mothership.chitty.workers.dev"
ENDPOINT="https://chittyid.chitty.workers.dev"

# Test Rate Limiting
echo "⚡ Testing Rate Limiting..."
Expand Down
Loading
Loading