Skip to content

Commit 933ffb5

Browse files
fix(cloud-mcp): add CloudflareResource + VercelResource enums to Zig FFI (standards#150) (#125)
Class C ABI gap. `CloudflareResource` (7 variants) + `VercelResource` (5 variants) were Idris2-only. Multi-cap Idris2 names follow the current iseriser converter output (e.g. `CfKVNamespace → cf_kvnamespace`); when iseriser#18 (multi-cap normaliser) lands these may be canonicalised. Noted inline. `iseriser abi-verify` → exit 0 (4 enums, 6 transitions); `zig build test` → 28/28 green. Closes hyperpolymath/standards#150 Refs hyperpolymath/standards#92, #89, hyperpolymath/iseriser#18 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d2612bb commit 933ffb5

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

cartridges/cloud-mcp/ffi/cloud_ffi.zig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,34 @@ pub const CloudProvider = enum(c_int) {
3131
custom = 99,
3232
};
3333

34+
/// Cloudflare resource types — mirrors `CloudMcp.SafeCloud.CloudflareResource`
35+
/// + `cfResourceToInt` encoding. Declared here so `iseriser abi-verify` can
36+
/// structurally check the encoding against the Idris2 source.
37+
///
38+
/// Note: the snake_case variants follow the iseriser converter's current
39+
/// output for multi-cap Idris2 names (e.g. `CfKVNamespace → cf_kvnamespace`,
40+
/// `CfDNSZone → cf_dnszone`). When iseriser#18 lands a smarter multi-cap
41+
/// normaliser, these names may be canonicalised to e.g. `cf_kv_namespace`.
42+
pub const CloudflareResource = enum(c_int) {
43+
cf_worker = 1,
44+
cf_d1_database = 2,
45+
cf_kvnamespace = 3,
46+
cf_r2_bucket = 4,
47+
cf_dnszone = 5,
48+
cf_dnsrecord = 6,
49+
cf_pages_project = 7,
50+
};
51+
52+
/// Vercel resource types — mirrors `CloudMcp.SafeCloud.VercelResource`
53+
/// + `vclResourceToInt` encoding.
54+
pub const VercelResource = enum(c_int) {
55+
vcl_project = 1,
56+
vcl_deployment = 2,
57+
vcl_domain = 3,
58+
vcl_env_var = 4,
59+
vcl_serverless_function = 5,
60+
};
61+
3462
// ═══════════════════════════════════════════════════════════════════════
3563
// Session State Machine
3664
// ═══════════════════════════════════════════════════════════════════════

0 commit comments

Comments
 (0)