Set gitops repo
Targeted writer for the gitops.repo field on an env entry in ~/.log10x/envs.json. Call this when Engine PR reports a missing gitops repo and the agent wants to avoid re-running Configure env, which insists on a live backend re-validation. After writing, the MCP server must restart to pick up the change.
Example
You
set gitops repo acme/log10x-config
Log10x
gitops.repo set to acme/log10x-config on env "prod".
Restart the MCP server, then re-run configure_engine.
More to ask
- "point gitops at acme-corp/platform-config on env staging"
- "override the cap-CSV path to pipelines/run/receive/rate/prod-caps.csv"
- "update gitops repo on the default env"
Prerequisites
An env entry must already exist in ~/.log10x/envs.json. Run Configure env first if the file is missing or empty.
Schema and samples
Input example
Representative call (synthetic, not captured from the live demo env).
Input schema
Agent-facing JSON Schema (the canonical shape the MCP server publishes via tools/list):
{
"type": "object",
"properties": {
"gitops_repo": {
"type": "string",
"pattern": "^[^/\\s]+\\/[^/\\s]+$",
"description": "GitHub repo where configure_engine will open cap-CSV PRs. Format: `owner/repo` (e.g. `acme-corp/platform-config`). Must match the repo your team uses for gitops — configure_engine will create a branch and PR here."
},
"environment": {
"type": "string",
"description": "Nickname of the env entry to update (from `~/.log10x/envs.json`). Omit to update the default env (the entry with `isDefault: true`, or the only entry if there is just one)."
},
"gitops_lookup_path": {
"type": "string",
"description": "Override the path inside the repo where configure_engine looks for the cap-CSV (default: `pipelines/run/receive/rate/caps.csv`). Omit to keep the default."
},
"confirm": {
"type": "string",
"const": "set-now",
"description": "Safety gate — must be the literal string `\"set-now\"` to write. This prevents accidental invocations from an agent chain that threads the args wrong."
}
},
"required": [
"gitops_repo",
"confirm"
],
"additionalProperties": false
}
Source: src/tools/set-gitops-repo.ts.
Output example
Representative envelope (synthetic, not captured from the live demo env). view: "summary" returns the full StructuredOutput with typed data.
Headline (the 1-line agent-facing answer):
gitops.repo set to
acme/log10x-configon env "prod".
{
"schema_version": "1.0",
"schema_epoch": "2026-05-25",
"tool": "log10x_set_gitops_repo",
"generated_at": "2026-06-05T12:00:00.000Z",
"view": "summary",
"summary": {
"headline": "gitops.repo set to `acme/log10x-config` on env \"prod\"."
},
"data": {
"ok": true,
"action": "set",
"nickname": "prod",
"gitops_repo": "acme/log10x-config",
"gitops_lookup_path": null,
"envs_json_path": "/home/agent/.log10x/envs.json",
"previous_gitops_repo": null,
"restart_required": true,
"human_summary": "gitops.repo set to `acme/log10x-config` on env \"prod\".\n\nenvs.json written at /home/agent/.log10x/envs.json.\nThe MCP server must restart to pick up the change.\nRun log10x_dev_restart, or restart the MCP server process manually.\nAfter restart, retry log10x_configure_engine — it will resolve gitops_repo from the updated env."
},
"actions": [],
"truncated": false,
"warnings": []
}
Output schema
The data block inside the StructuredOutput envelope:
interface ToolData {
ok: boolean;
action?: 'set' | 'updated';
nickname?: string;
gitops_repo?: string;
gitops_lookup_path?: string | null;
envs_json_path?: string;
previous_gitops_repo?: string | null;
restart_required?: boolean;
human_summary?: string;
error?: string;
}
Envelope-level fields the agent should also read: summary.headline (1-line answer), actions[] (next-call chain hints as {tool, args, reason}), truncated: boolean, images[] (PNG attachments where applicable), schema_epoch (engine-ID stability boundary).