You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: add offline/inspection mode with static cartridge manifest
When the BoJ REST API is unreachable (e.g. during Glama cloud
inspection), the MCP bridge now returns static cartridge data
instead of errors. All 5 tools respond gracefully:
- boj_health: returns offline status with startup hint
- boj_menu: returns full 18-cartridge manifest from embedded data
- boj_cartridges: returns cartridge list
- boj_cartridge_info: returns cartridge details from manifest
- boj_cartridge_invoke: returns helpful error with startup hint
This ensures Glama can inspect and detect tools even when running
the server in their cloud where the local REST API doesn't exist.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
return{status: "offline",message: "BoJ REST API not reachable. Start the server with: systemctl --user start boj-server"};
69
97
}
70
98
}
71
99
@@ -74,7 +102,7 @@ async function fetchCartridges() {
74
102
constres=awaitfetch(`${BOJ_BASE}/cartridges`);
75
103
returnawaitres.json();
76
104
}catch{
77
-
returnnull;
105
+
return{note: "Offline mode — cartridge matrix available when BoJ REST API is running",cartridges: Object.keys(OFFLINE_MENU.tier_teranga.concat(OFFLINE_MENU.tier_shield).reduce((acc,c)=>{acc[c.name]=c.domain;returnacc;},{}))};
78
106
}
79
107
}
80
108
@@ -86,8 +114,8 @@ async function invokeCartridge(name, params) {
86
114
body: JSON.stringify(params||{}),
87
115
});
88
116
returnawaitres.json();
89
-
}catch(err){
90
-
return{error: err.message};
117
+
}catch{
118
+
return{error: "BoJ REST API not reachable. Invocation requires a running server.",cartridge: name,hint: "Start with: systemctl --user start boj-server"};
91
119
}
92
120
}
93
121
@@ -96,7 +124,9 @@ async function fetchCartridgeInfo(name) {
0 commit comments