{ "schema_version": "1.0", "name": "mp-ai-module-controller", "description": "Rust CLI controller for llama.cpp-backed local action dispatch.", "project_type": "cli", "language": "rust", "package_manager": "cargo", "entrypoints": { "main": "src/main.rs", "action_registry": "src/registry.rs", "dictionary_generator": "src/dictionary.rs", "llm_client": "src/llm.rs", "dispatcher": "src/dispatcher.rs", "logger_script": "src/scripts/logger.rs" }, "commands": { "build": "cargo build", "test": "cargo test", "generate_dictionary": "cargo run -- dictionary generate", "serve": "cargo run -- serve", "query": "cargo run -- query \"log hello from codex\"", "run_logger": "cargo run -- run logger --payload '{\"message\":\"hello from codex\"}'", "codex_setup": "scripts/codex-setup.sh", "codex_logger_smoke": "scripts/codex-run-logger.sh", "precommit_check": "scripts/precommit-check.sh", "install_hooks": "git config core.hooksPath .githooks" }, "environment": { "example_file": ".env.example", "variables": [ { "name": "LLAMA_MODEL_PATH", "required": true, "secret": false, "description": "Absolute path to a local GGUF model used by llama-server." }, { "name": "LLAMA_HOST", "required": false, "secret": false, "default": "127.0.0.1", "description": "Host for the local llama.cpp server." }, { "name": "LLAMA_PORT", "required": false, "secret": false, "default": "8080", "description": "Port for the local llama.cpp server." }, { "name": "LLAMA_CONTEXT_SIZE", "required": false, "secret": false, "description": "Optional context size passed to llama-server as --ctx-size." }, { "name": "LLAMA_EXTRA_ARGS", "required": false, "secret": false, "description": "Optional shell-split extra arguments appended to llama-server." }, { "name": "CONTROLLER_LOG_LEVEL", "required": false, "secret": false, "default": "info", "description": "Tracing log level for the controller." } ] }, "llama_cpp": { "server_binary": "/opt/homebrew/bin/llama-server", "fallback_binary": "llama-server", "api": "OpenAI-compatible /v1/chat/completions", "response_contract": { "format": "compact JSON", "example": { "action_id": "logger", "payload": { "message": "hello" } } } }, "dictionary": { "source_of_truth": "src/registry.rs", "generated_jsonl": "dictionary/actions.jsonl", "generated_index": "dictionary/actions.index.json", "runtime_policy": "Only exact action_id matches from the generated index are executable." }, "actions": [ { "action_id": "logger", "script": "src/scripts/logger.rs", "description": "Proof-of-concept script that writes structured JSONL log records.", "payload_example": { "message": "hello from codex" }, "output": "logs/controller-actions.jsonl" } ], "generated_paths": [ "target/", "logs/", "runtime/", "dictionary/actions.jsonl", "dictionary/actions.index.json" ], "ci": { "gitea_actions": ".gitea/workflows/ci.yml", "woodpecker": ".woodpecker.yml", "precommit_hook": ".githooks/pre-commit", "shared_check": "scripts/precommit-check.sh", "checks": [ "cargo fmt --check", "cargo test", "cargo run -- dictionary generate", "test -s dictionary/actions.jsonl", "test -s dictionary/actions.index.json" ] }, "agent_guidance": "See AGENTS.md. Keep src/registry.rs as the source of truth, regenerate dictionary files after action changes, and reject non-exact LLM action outputs." }