Skip to content

Commit 4d5d565

Browse files
fix(gitlab-api-mcp): add GitLabAction enum to Zig FFI (standards#154) (#120)
Class C ABI gap. `GitLabAction` (20 variants, `actionToInt` 0–19) was in Idris2 only. Adds the matching `pub const GitLabAction = enum(c_int)`. `iseriser abi-verify` → exit 0; `zig build test` → 19/19 green. Closes hyperpolymath/standards#154 Refs hyperpolymath/standards#92, #89 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5570f82 commit 4d5d565

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

cartridges/gitlab-api-mcp/ffi/gitlab_api_mcp_ffi.zig

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,38 @@ pub const HttpMethod = enum(c_int) {
5757
delete = 3,
5858
};
5959

60+
// ---------------------------------------------------------------------------
61+
// GitLab actions (matches Idris2 GitLabAction + actionToInt encoding)
62+
// ---------------------------------------------------------------------------
63+
64+
/// All GitLab REST/GraphQL actions exposed by this cartridge.
65+
/// Encoding mirrors `GitlabApiMcp.SafeGit.actionToInt` (0–19).
66+
/// Declared here so `iseriser abi-verify` can structurally check the
67+
/// encoding against the Idris2 source; dispatch wiring follows the
68+
/// same numbering when introduced.
69+
pub const GitLabAction = enum(c_int) {
70+
list_projects = 0,
71+
get_project = 1,
72+
create_issue = 2,
73+
list_issues = 3,
74+
get_issue = 4,
75+
comment_issue = 5,
76+
create_mr = 6,
77+
list_mrs = 7,
78+
get_mr = 8,
79+
merge_mr = 9,
80+
list_branches = 10,
81+
create_branch = 11,
82+
search_code = 12,
83+
list_pipelines = 13,
84+
get_pipeline = 14,
85+
trigger_pipeline = 15,
86+
list_releases = 16,
87+
create_release = 17,
88+
push_mirror = 18,
89+
get_file_contents = 19,
90+
};
91+
6092
// ---------------------------------------------------------------------------
6193
// Session slots (thread-safe, fixed-size pool)
6294
// ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)