One key per registration in the module's servers bucket — all.<server> or <node>.<server> — watched by every node, so a node assigned after a registration takes it at start, which the mcp.registered event could not do. Also narrows apply()'s refusal by hand: the builder compiles without strict, where the discriminated union does not narrow and the build failed.
91 lines
2.0 KiB
JSON
91 lines
2.0 KiB
JSON
{
|
|
"module": "claude-code",
|
|
"version": "1",
|
|
"slug": "agent",
|
|
"capabilities": [
|
|
"package-manager"
|
|
],
|
|
"requires": [
|
|
"mcp-endpoint"
|
|
],
|
|
"binds": {
|
|
"mcp-endpoint": "${dir:state}/mcp-endpoint.json"
|
|
},
|
|
"consumes": [
|
|
"claude-licence-manager.licence.rotated",
|
|
"claude-licence-manager.licence.switched"
|
|
],
|
|
"state": [
|
|
"servers"
|
|
],
|
|
"tools": [
|
|
"claude_code_status",
|
|
"claude_code_render",
|
|
"claude_code_pull",
|
|
"claude_code_mcp_list",
|
|
"claude_code_mcp_register",
|
|
"claude_code_mcp_unregister"
|
|
],
|
|
"resources": [
|
|
{
|
|
"id": "package",
|
|
"type": "package",
|
|
"package": "claude-code"
|
|
},
|
|
{
|
|
"id": "managed",
|
|
"type": "directory",
|
|
"path": "/etc/claude-code",
|
|
"mode": "0755"
|
|
},
|
|
{
|
|
"id": "agent-home",
|
|
"type": "directory",
|
|
"path": "${machine:account-home}/.claude",
|
|
"mode": "0700",
|
|
"owner": "${machine:account}"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"owner": "${machine:account}",
|
|
"place": "."
|
|
},
|
|
{
|
|
"id": "facts",
|
|
"type": "file",
|
|
"path": "${dir:state}/facts.json",
|
|
"mode": "0600",
|
|
"owner": "${machine:account}",
|
|
"content": "{\n \"node\": \"${machine:name}\",\n \"console\": \"http://127.0.0.1:${bound:mcp-endpoint:port}/mcp\"\n}\n"
|
|
},
|
|
{
|
|
"id": "settings",
|
|
"type": "file",
|
|
"path": "${dir:state}/settings.json",
|
|
"mode": "0600",
|
|
"owner": "${machine:account}",
|
|
"merge": "json",
|
|
"content": "{\n \"role\": \"\",\n \"mcp_servers\": {}\n}\n"
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "tools",
|
|
"kind": "bundle",
|
|
"language": "typescript",
|
|
"entrypoints": [
|
|
"tools/index.js"
|
|
],
|
|
"env": {
|
|
"MESH_CLAUDE_CODE_STATE": "${dir:state}",
|
|
"MESH_CLAUDE_CODE_FACTS": "${dir:state}/facts.json",
|
|
"MESH_CLAUDE_CODE_SETTINGS": "${dir:state}/settings.json"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|