Unclassified

Round 2 — Connector Bindings and Storage Audit

Date: 2026-07-29
Status: Code-level bindings exist; Cloudflare binding provisioning needed


Gateway Bindings

File: services/gateway/src/index.ts → Env interface

BindingTypeRequiredProvisionedNotes
DBD1Database✅ Required⚠️ UnknownAuth + tenant resolution
CONNECTORFetcher✅ Required⚠️ UnknownDownstream connector service
MCP_CONNECTORFetcher✅ Required⚠️ Unknown19-tool MCP boundary
PIPELINEFetcher✅ Required⚠️ UnknownPipeline service
INTELLIGENCEFetcher✅ Required⚠️ UnknownIntelligence service
KNOWLEDGEFetcher✅ Required⚠️ UnknownKnowledge service
BFFFetcher✅ Required⚠️ UnknownBackend-for-frontend
AGENT_RUNTIMEFetcher✅ Required⚠️ UnknownAgent runtime
SPINEFetcher⚠️ Optional⚠️ UnknownNeon Workbench boundary
MCP_POOLFetcher⚠️ Optional⚠️ UnknownMCP pool (internal)
WEBHOOK_INGRESSFetcher⚠️ Optional⚠️ UnknownWebhook ingestion
HUB_CONTROLLERFetcher✅ Required⚠️ UnknownHub controller
ADMINFetcher✅ Required⚠️ UnknownAdmin service
BILLINGFetcher✅ Required⚠️ UnknownBilling service
TENANTSFetcher✅ Required⚠️ UnknownTenants service
FOLDER_WATCHERFetcher⚠️ Optional⚠️ UnknownFolder watcher
RATE_LIMITSKVNamespace✅ Required⚠️ UnknownRate limiting
SESSIONSKVNamespace✅ Required⚠️ UnknownSession storage
CONNECTOR_STATUSKVNamespace⚠️ Optional⚠️ UnknownConnector status cache
SIGNAL_CACHEKVNamespace⚠️ Optional⚠️ UnknownSignal cache
METRICSKVNamespace⚠️ Optional⚠️ UnknownMetrics cache
OAUTH_STATE_KVKVNamespace⚠️ Optional⚠️ UnknownOAuth state
TENANT0_ENDPOINTSDurableObjectNamespace⚠️ Optional⚠️ UnknownTenant endpoints

MCP Connector Bindings

File: services/mcp-connector/src/index.ts

BindingTypeRequiredNotes
DBD1Database✅ RequiredOAuth clients, tokens
SESSIONSKVNamespace✅ RequiredSession storage
GATEWAY_CONNECTOR_AUTH_SECRETSecret✅ RequiredGateway→Connector auth

Connector Service Bindings

File: services/connector/src/index.ts

BindingTypeRequiredNotes
PIPELINE_QUEUEQueue✅ RequiredPipeline processing
KNOWLEDGE_QUEUEQueue✅ RequiredKnowledge processing
MCP_IDEMPOTENCYKVNamespace✅ RequiredIdempotency checks
CONNECTOR_STATUSKVNamespace✅ RequiredStatus cache
EDGE_DBD1Database✅ RequiredEdge database
FILESR2Bucket✅ RequiredFile storage

Connector Sync Bindings

File: services/connector-sync/src/index.ts

BindingTypeRequiredNotes
SYNC_QUEUEQueue✅ RequiredSync job processing
CONNECTOR_STATUSKVNamespace✅ RequiredStatus cache
DBD1Database✅ RequiredSync state
SYNC_SCHEDULERDurableObjectNamespace⚠️ OptionalSync scheduling

Continuity Service Bindings

File: services/continuity/src/index.ts

BindingTypeRequiredNotes
TASKS_QUEUEQueue⚠️ OptionalTask processing
DBD1Database✅ RequiredContinuity state

Billing Service Bindings

File: services/billing/src/index.ts

BindingTypeRequiredNotes
DBD1Database✅ RequiredBilling state
WEBHOOK_REPLAYKVNamespace⚠️ OptionalWebhook replay

Storage Summary

Storage TypeCountServices Using
D1Database7+Gateway, MCP Connector, Connector, Connector Sync, Continuity, Billing, Agent Registry
KVNamespace8+Gateway (6), MCP Connector (1), Connector (2), Billing (1)
Queue4+Connector (2), Connector Sync (1), Continuity (1)
R2Bucket1Connector (FILES)
DurableObjectNamespace2+Gateway (TENANT0), Connector Sync (SYNC_SCHEDULER)
Vectorize0Not yet used

What's Missing (Cloudflare Provisioning)

Required for Customer Zero

BindingActionPriority
D1 DatabaseCreate integratewise-prod D1 databaseP0
KV NamespacesCreate RATE_LIMITS, SESSIONS, CONNECTOR_STATUS, SIGNAL_CACHE, METRICS, OAUTH_STATE_KVP0
QueuesCreate pipeline-process, intelligence-events, connector-sync, knowledge-queueP0
R2 BucketCreate integratewise-files bucketP0
Service BindingsBind all downstream Workers to GatewayP0
Durable ObjectsEnable TENANT0_ENDPOINTS, SYNC_SCHEDULERP1

Required for External Product

BindingActionPriority
RLS PoliciesApply migration 042 tenant_rls policies to D1P0
Tenant Secret NamespacingConfigure TENANT_<slug>_* secrets in Secret StoreP0
Shared D1Verify all queries include tenant_id filterP0

Not Yet Needed

BindingStatusWhen
VectorizeNot usedWhen semantic search is implemented
AI GatewayNot usedWhen AI routing is implemented
Additional R2Not usedWhen file storage scales

Binding Provisioning Checklist

# 1. Create D1 database
wrangler d1 create integratewise-prod

# 2. Create KV namespaces
wrangler kv namespace create RATE_LIMITS
wrangler kv namespace create SESSIONS
wrangler kv namespace create CONNECTOR_STATUS
wrangler kv namespace create SIGNAL_CACHE
wrangler kv namespace create METRICS
wrangler kv namespace create OAUTH_STATE_KV

# 3. Create Queues
wrangler queues create pipeline-process
wrangler queues create intelligence-events
wrangler queues create connector-sync
wrangler queues create knowledge-queue

# 4. Create R2 bucket
wrangler r2 bucket create integratewise-files

# 5. Apply migrations to D1
wrangler d1 execute integratewise-prod --file migrations/035_canonical_spine_schema_fortress.sql
wrangler d1 execute integratewise-prod --file migrations/042_real_tenant_rls_and_runtime_scope.sql

# 6. Bind services in wrangler.toml
# (Add binding declarations to each service's wrangler.toml)

Verification

After provisioning:

# Verify D1
wrangler d1 execute integratewise-prod --command "SELECT count(*) FROM information_schema.tables;"

# Verify KV
wrangler kv namespace list

# Verify Queues
wrangler queues list

# Verify R2
wrangler r2 bucket list