Skip to content

Commit c6ae703

Browse files
hyperpolymathclaude
andcommitted
feat(opsm-mcp): add affinescript+rattlescript registries, Zig adapter, cartridge.json, mod.js
Three things in one pass: 1. **V-lang purge**: git rm opsm_adapter.v (banned 2026-04-10), replace with opsm_adapter.zig — same three-protocol layout (REST :9028, gRPC-compat :9029, GraphQL :9030), imports opsm_ffi directly via Zig module system, same slot state-machine enforcement. Sidelined adoc written. build.zig added. 2. **cartridge.json + mod.js**: opsm-mcp was the only cartridge in the repo without these files. Added both: 7 tools (search/install/resolve/info/list/ registries/status), mod.js delegates to OPSM Elixir backend (opsm_ex) via HTTP with registry alias normalisation for affinescript/rattlescript/eclexia and all 103 adapters. 3. **Registry count**: opsm-mcp description updated to 103 adapters (was 101) — AffineScript + RattleScript plugins committed to opsm_ex in same changeset. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 911271f commit c6ae703

6 files changed

Lines changed: 694 additions & 205 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
= SIDELINED: opsm_adapter.v
2+
:spdx: PMPL-1.0-or-later
3+
:date-removed: 2026-04-12
4+
5+
== Why This File Was Removed
6+
7+
`opsm_adapter.v` was a V-lang implementation of the three-protocol adapter
8+
for the `opsm-mcp` cartridge. V-lang was **banned estate-wide on 2026-04-10**
9+
(see `developer-ecosystem/v-ecosystem/TRANSFER.adoc` and memory
10+
`feedback_v_lang_banned.md`).
11+
12+
== Replacement
13+
14+
`opsm_adapter.zig` — same three-protocol layout (REST :9028, gRPC-compat :9029,
15+
GraphQL :9030), imports `opsm_ffi` directly via Zig module system, serial
16+
connection handling per thread.
17+
18+
The V-lang source offered to the V community under PMPL-1.0-or-later via
19+
Gmail draft to alex@vlang.io (sent 2026-04-11).
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
//
4+
// opsm-mcp/adapter/build.zig — build configuration for the unified adapter.
5+
6+
const std = @import("std");
7+
8+
pub fn build(b: *std.Build) void {
9+
const target = b.standardTargetOptions(.{});
10+
const optimize = b.standardOptimizeOption(.{});
11+
12+
// Import the FFI module directly (same build system — no shared-library linking)
13+
const ffi_mod = b.createModule(.{
14+
.root_source_file = b.path("../ffi/opsm_ffi.zig"),
15+
.target = target,
16+
.optimize = optimize,
17+
});
18+
19+
const adapter = b.addExecutable(.{
20+
.name = "opsm_adapter",
21+
.root_source_file = b.path("opsm_adapter.zig"),
22+
.target = target,
23+
.optimize = optimize,
24+
});
25+
adapter.root_module.addImport("opsm_ffi", ffi_mod);
26+
b.installArtifact(adapter);
27+
28+
const run_artifact = b.addRunArtifact(adapter);
29+
const run_step = b.step("run", "Run the opsm-mcp adapter");
30+
run_step.dependOn(&run_artifact.step);
31+
32+
// Unit tests
33+
const tests = b.addTest(.{
34+
.root_source_file = b.path("opsm_adapter.zig"),
35+
.target = target,
36+
.optimize = optimize,
37+
});
38+
tests.root_module.addImport("opsm_ffi", ffi_mod);
39+
const run_tests = b.addRunArtifact(tests);
40+
const test_step = b.step("test", "Run opsm-mcp adapter tests");
41+
test_step.dependOn(&run_tests.step);
42+
}

cartridges/opsm-mcp/adapter/opsm_adapter.v

Lines changed: 0 additions & 205 deletions
This file was deleted.

0 commit comments

Comments
 (0)