48 definitions stop naming /var/lib/mesh/<module>: the directory says `place: "mesh"`, the two
subdirectories beneath it (gitea's runtime state, anthropic-manager's output) state their path
beneath it, and every credential, binding, merged file and mount names it as ${dir:mesh-state}.
Resolved on the default root, every definition names exactly the paths it named before —
TestPlacedDirectoriesKeepTheirPaths in mesh-controller, run over both checkouts. Needs the
controller that knows the word (mesh-controller, same branch) one release ahead.
113 lines
2.5 KiB
JSON
113 lines
2.5 KiB
JSON
{
|
|
"module": "anthropic-consumer",
|
|
"version": "1",
|
|
"slug": "claude",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"requires": [
|
|
"model-access"
|
|
],
|
|
"binds": {
|
|
"model-access": "${dir:state}/model.json"
|
|
},
|
|
"secrets": {
|
|
"model-access": "${dir:state}/access-token"
|
|
},
|
|
"own-secrets": {
|
|
"broker": "${dir:mesh-state}/broker"
|
|
},
|
|
"emits": [
|
|
"usage.session"
|
|
],
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "mesh"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "."
|
|
},
|
|
{
|
|
"id": "claude-home",
|
|
"type": "directory",
|
|
"path": "/var/lib/anthropic-consumer/claude",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "out",
|
|
"type": "directory",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "apply",
|
|
"type": "container",
|
|
"name": "mesh-anthropic-consumer-apply",
|
|
"network": "host",
|
|
"schedule": "*/5 * * * *",
|
|
"args": [
|
|
"run",
|
|
"/app/modules/anthropic-consumer/dist/apply/index.js"
|
|
],
|
|
"volumes": [
|
|
"${dir:state}:/run/state"
|
|
],
|
|
"env": {
|
|
"MESH_MODEL_ACCESS_SECRET_FILE": "/run/state/access-token",
|
|
"MESH_MODEL_ACCESS_BIND_FILE": "/run/state/model.json",
|
|
"MESH_CLAUDE_CREDENTIALS_FILE": "/run/state/claude/.credentials.json",
|
|
"MESH_CLAUDE_IDENTITY_FILE": "/run/state/claude/.claude.json"
|
|
},
|
|
"artifact": "runtime"
|
|
},
|
|
{
|
|
"id": "usage",
|
|
"type": "container",
|
|
"name": "mesh-anthropic-consumer-usage",
|
|
"network": "host",
|
|
"schedule": "*/5 * * * *",
|
|
"args": [
|
|
"run",
|
|
"/app/modules/anthropic-consumer/dist/usage/index.js"
|
|
],
|
|
"volumes": [
|
|
"${dir:mesh-state}/broker:/run/secrets/broker:ro",
|
|
"${dir:state}:/run/state"
|
|
],
|
|
"env": {
|
|
"MESH_BROKER_FILE": "/run/secrets/broker",
|
|
"MESH_CLAUDE_PROJECTS_DIR": "/run/state/claude/projects",
|
|
"MESH_ANTHROPIC_USAGE_OUT": "/run/state/out/session-usage.json",
|
|
"MESH_TOOLS_MAIN": "/app/dist/main.js"
|
|
},
|
|
"artifact": "runtime"
|
|
}
|
|
],
|
|
"build": {
|
|
"on": [
|
|
{
|
|
"arg": "BUILD_BASE",
|
|
"module": "mesh-tools",
|
|
"artifact": "build"
|
|
},
|
|
{
|
|
"arg": "RUNTIME_BASE",
|
|
"module": "mesh-tools",
|
|
"artifact": "runtime"
|
|
}
|
|
],
|
|
"artifacts": [
|
|
{
|
|
"name": "runtime",
|
|
"kind": "image",
|
|
"from": "Dockerfile"
|
|
}
|
|
]
|
|
}
|
|
}
|