Skip to content

Commit f0825db

Browse files
hyperpolymathclaude
andcommitted
feat(cartridges): add provider framework + 3 new cartridges (18→21)
Cloud-mcp gains provider dispatch with Verpex (cPanel UAPI), Cloudflare (Workers/D1/KV/R2/DNS), and Vercel (projects/deployments/domains/functions) as Grade D Alpha stubs with full ABI+FFI+Adapter layers. Three new cartridges created following the same proven pattern: - comms-mcp: Gmail + Google Calendar (OAuth2 session management) - ml-mcp: Hugging Face (model search, inference, spaces, datasets) - research-mcp: Scholar Gateway + Semantic Scholar + OpenAlex MCP bridge updated to v0.3.0 with 7 new provider-specific tools. 55 new tests, all passing. 4 .so files built. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 308618b commit f0825db

19 files changed

Lines changed: 4940 additions & 2 deletions

File tree

cartridges/cloud-mcp/abi/CloudMcp/SafeCloud.idr

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ data CloudProvider
6868
| GCloud -- Google Cloud Platform
6969
| Azure -- Microsoft Azure
7070
| DigitalOcean -- DigitalOcean
71+
| Verpex -- Verpex hosting
72+
| Cloudflare -- Cloudflare
73+
| Vercel -- Vercel platform
7174
| Custom String -- User-defined provider
7275

7376
||| C-ABI encoding.
@@ -77,8 +80,84 @@ providerToInt AWS = 1
7780
providerToInt GCloud = 2
7881
providerToInt Azure = 3
7982
providerToInt DigitalOcean = 4
83+
providerToInt Verpex = 5
84+
providerToInt Cloudflare = 6
85+
providerToInt Vercel = 7
8086
providerToInt (Custom _) = 99
8187

88+
-- ═══════════════════════════════════════════════════════════════════════════
89+
-- Provider Capabilities
90+
-- ═══════════════════════════════════════════════════════════════════════════
91+
92+
||| Capabilities a cloud provider may support.
93+
public export
94+
data ProviderCapability
95+
= Workers -- Serverless workers / functions
96+
| KV -- Key-value storage
97+
| R2 -- Object storage (R2-style)
98+
| DNS -- DNS zone and record management
99+
| Deployments -- Site / project deployments
100+
| D1 -- Serverless SQL databases
101+
| Pages -- Static site hosting / Pages projects
102+
103+
-- ═══════════════════════════════════════════════════════════════════════════
104+
-- Cloudflare Resource Types
105+
-- ═══════════════════════════════════════════════════════════════════════════
106+
107+
||| Resource types available on the Cloudflare provider.
108+
public export
109+
data CloudflareResource
110+
= CfWorker -- Workers script
111+
| CfD1Database -- D1 serverless SQL database
112+
| CfKVNamespace -- KV namespace
113+
| CfR2Bucket -- R2 object storage bucket
114+
| CfDNSZone -- DNS zone
115+
| CfDNSRecord -- DNS record within a zone
116+
| CfPagesProject -- Pages deployment project
117+
118+
||| C-ABI encoding for Cloudflare resource types.
119+
public export
120+
cfResourceToInt : CloudflareResource -> Int
121+
cfResourceToInt CfWorker = 1
122+
cfResourceToInt CfD1Database = 2
123+
cfResourceToInt CfKVNamespace = 3
124+
cfResourceToInt CfR2Bucket = 4
125+
cfResourceToInt CfDNSZone = 5
126+
cfResourceToInt CfDNSRecord = 6
127+
cfResourceToInt CfPagesProject = 7
128+
129+
||| Map Cloudflare to its supported capabilities.
130+
public export
131+
cloudflareCapabilities : List ProviderCapability
132+
cloudflareCapabilities = [Workers, KV, R2, DNS, Deployments, D1, Pages]
133+
134+
-- ═══════════════════════════════════════════════════════════════════════════
135+
-- Vercel Resource Types
136+
-- ═══════════════════════════════════════════════════════════════════════════
137+
138+
||| Resource types available on the Vercel provider.
139+
public export
140+
data VercelResource
141+
= VclProject -- Vercel project
142+
| VclDeployment -- Deployment instance
143+
| VclDomain -- Custom domain
144+
| VclEnvVar -- Environment variable
145+
| VclServerlessFunction -- Serverless function (lambda)
146+
147+
||| C-ABI encoding for Vercel resource types.
148+
public export
149+
vclResourceToInt : VercelResource -> Int
150+
vclResourceToInt VclProject = 1
151+
vclResourceToInt VclDeployment = 2
152+
vclResourceToInt VclDomain = 3
153+
vclResourceToInt VclEnvVar = 4
154+
vclResourceToInt VclServerlessFunction = 5
155+
156+
||| Map Vercel to its supported capabilities.
157+
public export
158+
vercelCapabilities : List ProviderCapability
159+
vercelCapabilities = [Deployments, DNS, Workers]
160+
82161
-- ═══════════════════════════════════════════════════════════════════════════
83162
-- Session Record
84163
-- ═══════════════════════════════════════════════════════════════════════════

0 commit comments

Comments
 (0)