Mastra Deployment
In checkouts that include the Mastra app source, the app is developed under:
apps/mastra-orchestrator/
Some X4 checkouts contain only the docs, mirror workflow, and integration contracts. In that case, use the mirrored or deployed Mastra checkout for the build commands below.
The running service may be deployed from a mirrored path such as:
/srv/x4/mastra-orchestrator/app
Build And Validate
cd apps/mastra-orchestrator
npm run typecheck
npm test -- tests/shared/unit/code-assist
npm run build
Service Runtime
The deployed service uses systemd and an external env file. Typical runtime variables include:
| Variable | Purpose |
|---|---|
PORT / MASTRA_PORT | HTTP port. |
CODE_ASSIST_APP_ROOT | App root for schemas and state paths. |
CODE_ASSIST_REPO_ROOT | Local repo root for configured repos. |
CODE_ASSIST_DB_PATH | SQLite state path. |
CODE_ASSIST_CODEX_BIN | Codex executable path. |
CODE_ASSIST_CODEX_SANDBOX | Codex sandbox mode. |
CODE_ASSIST_GITHUB_APP_ID | GitHub App ID. |
CODE_ASSIST_GITHUB_APP_INSTALLATION_ID | GitHub App installation. |
CODE_ASSIST_GITHUB_APP_PRIVATE_KEY_PATH | Private key path. |
Do not commit real env files or private keys.
Health Check
curl -sS http://127.0.0.1:4112/code-assist/health
Expected shape:
{
"status": "healthy",
"configured": true,
"timestamp": "..."
}
Workflow Listing
curl -sS http://127.0.0.1:4112/api/workflows | jq -r 'keys[]'
The Code Assist workflows should appear in the output.
Canonical Repository
X4Org/Mastra-Agent-Framework is the canonical Mastra repository. The former
Machenta/Mastra-Agent-Framework source is deprecated and no synchronization
job is allowed to force-push or prune X4Org branches from it.