Metadata-Version: 2.4
Name: repository-manager
Version: 3.5.0
Summary: Manage your git projects
Author-email: Project Maintainers <maintainers@users.noreply.github.com>
License: MIT
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: Public Domain
Classifier: Environment :: Console
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Requires-Python: <3.15,>=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.3.0
Requires-Dist: psutil>=7.2.2
Requires-Dist: requests>=2.34.2
Provides-Extra: mcp
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.3.0; extra == "mcp"
Provides-Extra: all
Requires-Dist: pre-commit>=4.7.0; extra == "all"
Requires-Dist: bump2version>=1.0.1; extra == "all"
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.3.0; extra == "all"
Provides-Extra: test
Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
Requires-Dist: pytest>=9.1.1; extra == "test"
Requires-Dist: pytest-asyncio>=1.4.0; extra == "test"
Requires-Dist: pytest-cov>=7.1.0; extra == "test"
Requires-Dist: pytest-timeout>=2.4.0; extra == "test"
Provides-Extra: remote
Requires-Dist: tunnel-manager<3.0.0,>=2.1.0; extra == "remote"
Dynamic: license-file

# Repository Manager
## CLI or API | MCP | Agent

![PyPI - Version](https://img.shields.io/pypi/v/repository-manager)
![MCP Server](https://badge.mcpx.dev?type=server 'MCP Server')
![PyPI - Downloads](https://img.shields.io/pypi/dd/repository-manager)
![GitHub Repo stars](https://img.shields.io/github/stars/Knuckles-Team/repository-manager)
![GitHub forks](https://img.shields.io/github/forks/Knuckles-Team/repository-manager)
![GitHub contributors](https://img.shields.io/github/contributors/Knuckles-Team/repository-manager)
![PyPI - License](https://img.shields.io/pypi/l/repository-manager)
![GitHub](https://img.shields.io/github/license/Knuckles-Team/repository-manager)
![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/Knuckles-Team/repository-manager)
![GitHub pull requests](https://img.shields.io/github/issues-pr/Knuckles-Team/repository-manager)
![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/Knuckles-Team/repository-manager)
![GitHub issues](https://img.shields.io/github/issues/Knuckles-Team/repository-manager)
![GitHub top language](https://img.shields.io/github/languages/top/Knuckles-Team/repository-manager)
![GitHub language count](https://img.shields.io/github/languages/count/Knuckles-Team/repository-manager)
![GitHub repo size](https://img.shields.io/github/repo-size/Knuckles-Team/repository-manager)
![GitHub repo file count (file type)](https://img.shields.io/github/directory-file-count/Knuckles-Team/repository-manager)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/repository-manager)
![PyPI - Implementation](https://img.shields.io/pypi/implementation/repository-manager)

*Version: 3.5.0*

> **Documentation** — Installation, deployment, usage across the CLI, API, MCP, and
> agent interfaces, and the phased multi-repository release workflows are maintained
> in the [official documentation](https://knuckles-team.github.io/repository-manager/).

---

## Overview

**Repository Manager** is a production-grade Agent and Model Context Protocol (MCP) server designed to interface directly with Manage the operator's git projects.

---

## Key Features

- **Consolidated Action-Routed MCP Tools:** Minimizes token overhead and eliminates tool bloat in LLM contexts by grouping methods into optimized, togglable tool modules.
- **Enterprise-Grade Security:** Complete support for Eunomia policies, OIDC token delegation, and granular execution context tracking.
- **Integrated Graph Agent:** Built-in Pydantic AI agent supporting the Agent Control Protocol (ACP) and standard Web interfaces (AG-UI).
- **Native Telemetry & Tracing:** Out-of-the-box OpenTelemetry exports and native Langfuse tracing.

---

## CLI or API

This agent wraps the Manage the operator's git projects API. The operator can interact with it programmatically or via its integrated execution entrypoints.

Detailed instructions on how to use the underlying API wrappers, extended schema bindings, and developer SDK references are maintained in [docs/index.md](docs/index.md).

---

## MCP

This server use dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.

### Available MCP Tools

This table is auto-generated from the live server — do not edit by hand.

<!-- MCP-TOOLS-TABLE:START -->

#### Condensed action-routed tools (`MCP_TOOL_MODE=condensed`)

| MCP Tool | Toggle Env Var | Description |
|----------|----------------|-------------|
| `repository_ingest_repositories` | `MISCTOOL` | Natively ingest git repositories into epistemic-graph as typed :GitRepository nodes. |
| `rm_build_*` | `PROJECT_MANAGEMENTTOOL` | Content-addressed build broker for ANY repository (CONCEPT:RM-TASK-LEDGER). |
| `rm_concepts_*` | `DEVELOPMENT_SURFACESTOOL` | Concept-id claim coordination against RMDD-16's central authority. |
| `rm_docs_readiness_*` | `PROJECT_MANAGEMENTTOOL` | Preview/apply/verify artifacts after per-repository readiness setup. |
| `rm_gates_*` | `PROJECT_MANAGEMENTTOOL` | Run and inspect the two-tier (fast/heavy) pre-commit gate across repos. |
| `rm_git_*` | `GIT_OPERATIONSTOOL` | Typed bulk Git operations; arbitrary host commands are prohibited. |
| `rm_lane_*` | `PROJECT_MANAGEMENTTOOL` | The lane lifecycle for concurrent agents and humans (CONCEPT:RM-LANE-DOCTOR). |
| `rm_merge_queue_*` | `PROJECT_MANAGEMENTTOOL` | Serialized merge queue for ANY git repository (CONCEPT:RM-MERGE-QUEUE). |
| `rm_projects_*` | `PROJECT_MANAGEMENTTOOL` | Bulk install, build, and validate Python projects. |
| `rm_remote_workers_*` | `DEVELOPMENT_SURFACESTOOL` | Remote worker registry, immutable source staging, and artifact transport. |
| `rm_workspace_*` | `WORKSPACE_MANAGEMENTTOOL` | Core workspace organization, configuration, and maintenance. |
| `rm_worktree_*` | `PROJECT_MANAGEMENTTOOL` | Manage git worktrees for concurrent multi-session development (CONCEPT:RM-WORKTREE). |

#### Verbose 1:1 API-mapped tools (`MCP_TOOL_MODE=verbose` or `both`)

<details>
<summary>51 per-operation tools — one per public API method (click to expand)</summary>

| MCP Tool | Toggle Env Var | Description |
|----------|----------------|-------------|
| `repository_manager_add_project` | `GITTOOL` | Stage all changes (git add -A) for a single Git project. |
| `repository_manager_add_projects` | `GITTOOL` | Stage all changes for multiple projects in parallel. |
| `repository_manager_build_projects` | `GITTOOL` | Build projects serially so compilation cannot exhaust the workstation. |
| `repository_manager_bulk_bump` | `GITTOOL` | Bumps the version for all projects in the workspace in parallel. |
| `repository_manager_bump_version` | `GITTOOL` | Bump the version of the project using bump2version. |
| `repository_manager_cleanup_artifacts` | `GITTOOL` | Removes test artifacts and temporary files from the specified directory. |
| `repository_manager_clone_projects` | `GITTOOL` | Clone all specified Git projects in parallel using multiple threads. |
| `repository_manager_clone_repository` | `GITTOOL` | Clone a single Git repository to a specific target path. |
| `repository_manager_commit_code_project` | `GITTOOL` | Stage ALL changes (git add -A), optionally gate on pre-commit, then commit. |
| `repository_manager_commit_code_projects` | `GITTOOL` | Concurrently stage + pre-commit + commit feature code across projects. |
| `repository_manager_commit_project` | `GITTOOL` | Commit staged changes (git commit -m "{message}") for a single Git project. |
| `repository_manager_commit_projects` | `GITTOOL` | Commit staged changes for multiple projects in parallel. |
| `repository_manager_create_project` | `GITTOOL` | Create a new project directory and initialize it as a git repository. |
| `repository_manager_discover_projects` | `GITTOOL` | Scan self.path for immediate subdirectories containing a .git folder. |
| `repository_manager_generate_markdown_summary` | `GITTOOL` | Generates a beautiful markdown summary of bulk operation results. |
| `repository_manager_generate_workspace_template` | `GITTOOL` | Generates a workspace.yml template at the specified path. |
| `repository_manager_get_consolidated_skill_paths` | `GITTOOL` | Returns absolute paths to the 15 specific building and documentation skills. |
| `repository_manager_get_project_map` | `GITTOOL` | Returns the mapping of repository URLs to their local project paths. |
| `repository_manager_get_readme` | `GITTOOL` | Get the content and path of the README.md file in the specified path. |
| `repository_manager_get_workspace_projects` | `GITTOOL` | Returns a list of project basenames (e.g. 'genius-agent') defined in the workspace. |
| `repository_manager_git_action` | `GITTOOL` | Execute a Git command in the specified directory. |
| `repository_manager_install_project` | `GITTOOL` | Install a Python project using pip install -e .[extra]. |
| `repository_manager_install_projects` | `GITTOOL` | Bulk installs Python and Node projects in the workspace. |
| `repository_manager_list_branches` | `GITTOOL` | Returns a dictionary mapping project basenames to their current active git branch. |
| `repository_manager_load_projects_from_yaml` | `GITTOOL` | Loads repository URLs from a YAML workspace file using Pydantic models. |
| `repository_manager_maintain_projects` | `GITTOOL` | Execute the phased bumpversion workflow: pre-commits + phased bumping. |
| `repository_manager_phased_bumpversion` | `GITTOOL` | Execute the phased bumpversion workflow: pre-commits + phased bumping. |
| `repository_manager_phased_push` | `GITTOOL` | Execute the phased git push workflow. |
| `repository_manager_pre_commit` | `GITTOOL` | Execute pre-commit commands in the specified path. |
| `repository_manager_pre_commit_projects` | `GITTOOL` | Execute pre-commit commands for all projects in parallel. |
| `repository_manager_pull_project` | `GITTOOL` | Pull updates for a single Git project and optionally checkout the default branch. |
| `repository_manager_pull_projects` | `GITTOOL` | Pull updates for multiple projects in parallel. |
| `repository_manager_push_project` | `GITTOOL` | Atomically publish a clean checkout's exact current branch and release tag. |
| `repository_manager_push_projects` | `GITTOOL` | Push updates for multiple projects in parallel. |
| `repository_manager_save_workspace_config` | `GITTOOL` | Saves the current or provided WorkspaceConfig to a YAML file. |
| `repository_manager_set_threads` | `GITTOOL` | Set the number of threads for parallel processing. |
| `repository_manager_setup_from_yaml` | `GITTOOL` | Sets up the workspace structure from a YAML file. |
| `repository_manager_test_projects` | `GITTOOL` | Execute pytests for the specified projects in parallel. |
| `repository_manager_update_dependency` | `GITTOOL` | Update a package's pinned version in a deps file (pyproject OR requirements). |
| `repository_manager_validate_and_release` | `GITTOOL` | Validate projects in parallel, optionally triggering a release if successful. |
| `repository_manager_validate_single_project` | `GITTOOL` | Validates a single repository by running its FAST-tier gates. |
| `repository_manager_worktree_hygiene` | `GITTOOL` | Audit (and optionally prune) session worktrees as a release-flow step. |
| `rm_worktree__add` | `PROJECT_MANAGEMENTTOOL` | Manage git worktrees for concurrent multi-session development (CONCEPT:RM-WORKTREE). |
| `rm_worktree__audit` | `PROJECT_MANAGEMENTTOOL` | Manage git worktrees for concurrent multi-session development (CONCEPT:RM-WORKTREE). |
| `rm_worktree__bulk_add` | `PROJECT_MANAGEMENTTOOL` | Manage git worktrees for concurrent multi-session development (CONCEPT:RM-WORKTREE). |
| `rm_worktree__list` | `PROJECT_MANAGEMENTTOOL` | Manage git worktrees for concurrent multi-session development (CONCEPT:RM-WORKTREE). |
| `rm_worktree__merge` | `PROJECT_MANAGEMENTTOOL` | Manage git worktrees for concurrent multi-session development (CONCEPT:RM-WORKTREE). |
| `rm_worktree__prune` | `PROJECT_MANAGEMENTTOOL` | Manage git worktrees for concurrent multi-session development (CONCEPT:RM-WORKTREE). |
| `rm_worktree__remove` | `PROJECT_MANAGEMENTTOOL` | Manage git worktrees for concurrent multi-session development (CONCEPT:RM-WORKTREE). |
| `rm_worktree__reset_branch` | `PROJECT_MANAGEMENTTOOL` | Manage git worktrees for concurrent multi-session development (CONCEPT:RM-WORKTREE). |
| `rm_worktree__sync` | `PROJECT_MANAGEMENTTOOL` | Manage git worktrees for concurrent multi-session development (CONCEPT:RM-WORKTREE). |

</details>

_12 action-routed tool(s) · 51 verbose 1:1 tool(s). Each is enabled unless its `<DOMAIN>TOOL` toggle is set false; `MCP_TOOL_MODE` selects the surface (**`intent` default** — the six verb-tools, granular set loaded on demand · `condensed` action-routed · `verbose` 1:1 · `both`). Auto-generated — do not edit._
<!-- MCP-TOOLS-TABLE:END -->

Detailed tool schemas, parameter shapes, and validation constraints are preserved in [docs/usage.md](docs/usage.md).

### Dynamic Tool Selection & Visibility

This MCP server supports dynamic toolset selection and visibility filtering at runtime. This allows the operator to restrict the set of exposed tools to prevent blowing up the LLM's context window.

The operator can configure tool filtering via multiple input channels:

- **CLI Arguments:** Pass `--tools` or `--toolsets` (or their disabled counterparts `--disabled-tools` and `--disabled-toolsets`) during startup.
- **Environment Variables:** Define standard environment variables:
  - `MCP_ENABLED_TOOLS` / `MCP_DISABLED_TOOLS`
  - `MCP_ENABLED_TAGS` / `MCP_DISABLED_TAGS`
- **HTTP SSE Request Headers:** Pass custom headers during transport initialization:
  - `x-mcp-enabled-tools` / `x-mcp-disabled-tools`
  - `x-mcp-enabled-tags` / `x-mcp-disabled-tags`
- **HTTP SSE Request Query Parameters:** Append query parameters directly to the operator's transport connection URL:
  - `?tools=tool1,tool2`
  - `?tags=tag1`

When query strings or parameters are provided, an LLM-free **Knowledge Graph resolution layer** (using `DynamicToolOrchestrator`) matches query intents against known tool tags, names, or descriptions, with safe fallback and automated 24-hour background cache refreshing.

---

### MCP Configuration Examples

<!-- MCP-CONFIG-EXAMPLES:START -->

> **Install the connector-focused `[mcp]` extra.** Examples use `repository-manager[mcp]` to add
> FastMCP / FastAPI through `agent-connector-sdk`; the required Agent Connector SDK core
> still carries `epistemic-graph[full]`. The `[agent-runtime]` extra additionally
> enables model orchestration.

#### stdio Transport (local IDEs — Cursor, Claude Desktop, VS Code)

```json
{
  "mcpServers": {
    "repository-manager-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "repository-manager[mcp]",
        "repository-manager-mcp"
      ],
      "env": {
        "MCP_TOOL_MODE": "intent",
        "BUILDTOOL": "True",
        "CONCEPTSTOOL": "True",
        "DEVELOPMENT_SURFACESTOOL": "True",
        "DOCS_READINESSTOOL": "True",
        "GATESTOOL": "True",
        "GH_TOKEN": "your_github_token_here",
        "GITHUB_TOKEN": "your_github_token_here",
        "GITLAB_HOST": "https://gitlab.com",
        "GITLAB_PRIVATE_TOKEN": "your_gitlab_token_here",
        "GITLAB_TOKEN": "your_gitlab_token_here",
        "GITLAB_URL": "https://gitlab.com",
        "GIT_OPERATIONSTOOL": "True",
        "LANETOOL": "True",
        "MERGE_QUEUETOOL": "True",
        "MERGE_QUEUE_DRAIN_DEADLINE_SECONDS": "180",
        "MERGE_QUEUE_GLOBAL_DEADLINE_SECONDS": "3600",
        "MERGE_QUEUE_HEAVY_DEADLINE_SECONDS": "18000",
        "MERGE_QUEUE_LEASE_TTL_SECONDS": "14400",
        "MERGE_QUEUE_MAX_AGE_SECONDS": "86400",
        "MISCTOOL": "True",
        "PROJECTTOOL": "True",
        "PROJECT_MANAGEMENTTOOL": "True",
        "REMOTE_WORKERSTOOL": "True",
        "REPOSITORY_MANAGER_DEFAULT_BRANCH": "main",
        "REPOSITORY_MANAGER_THREADS": "12",
        "RM_CPU_FRACTION": "0.20",
        "RM_GATE_BEFORE_PUSH": "true",
        "RM_GATE_TIMEOUT_SECONDS": "1800",
        "RM_JOB_STALE_SECONDS": "1800",
        "RM_MAX_WORKERS": "8",
        "RM_RAM_FRACTION": "0.20",
        "RM_WORKER_MEM_GB": "1.5",
        "WORKSPACE_MANAGEMENTTOOL": "True",
        "WORKSPACE_YML": "workspace.yml",
        "WORKTREETOOL": "True"
      }
    }
  }
}
```

Runtime references require an alias-aware launcher such as Arbora. Other
launchers must omit those entries and inject the resolved values through their
own runtime secret boundary.

#### Streamable-HTTP Transport (networked / production)

```json
{
  "mcpServers": {
    "repository-manager-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "repository-manager[mcp]",
        "repository-manager-mcp",
        "--transport",
        "streamable-http",
        "--port",
        "8000"
      ],
      "env": {
        "TRANSPORT": "streamable-http",
        "HOST": "127.0.0.1",
        "PORT": "8000",
        "MCP_TOOL_MODE": "intent",
        "BUILDTOOL": "True",
        "CONCEPTSTOOL": "True",
        "DEVELOPMENT_SURFACESTOOL": "True",
        "DOCS_READINESSTOOL": "True",
        "GATESTOOL": "True",
        "GH_TOKEN": "your_github_token_here",
        "GITHUB_TOKEN": "your_github_token_here",
        "GITLAB_HOST": "https://gitlab.com",
        "GITLAB_PRIVATE_TOKEN": "your_gitlab_token_here",
        "GITLAB_TOKEN": "your_gitlab_token_here",
        "GITLAB_URL": "https://gitlab.com",
        "GIT_OPERATIONSTOOL": "True",
        "LANETOOL": "True",
        "MERGE_QUEUETOOL": "True",
        "MERGE_QUEUE_DRAIN_DEADLINE_SECONDS": "180",
        "MERGE_QUEUE_GLOBAL_DEADLINE_SECONDS": "3600",
        "MERGE_QUEUE_HEAVY_DEADLINE_SECONDS": "18000",
        "MERGE_QUEUE_LEASE_TTL_SECONDS": "14400",
        "MERGE_QUEUE_MAX_AGE_SECONDS": "86400",
        "MISCTOOL": "True",
        "PROJECTTOOL": "True",
        "PROJECT_MANAGEMENTTOOL": "True",
        "REMOTE_WORKERSTOOL": "True",
        "REPOSITORY_MANAGER_DEFAULT_BRANCH": "main",
        "REPOSITORY_MANAGER_THREADS": "12",
        "RM_CPU_FRACTION": "0.20",
        "RM_GATE_BEFORE_PUSH": "true",
        "RM_GATE_TIMEOUT_SECONDS": "1800",
        "RM_JOB_STALE_SECONDS": "1800",
        "RM_MAX_WORKERS": "8",
        "RM_RAM_FRACTION": "0.20",
        "RM_WORKER_MEM_GB": "1.5",
        "WORKSPACE_MANAGEMENTTOOL": "True",
        "WORKSPACE_YML": "workspace.yml",
        "WORKTREETOOL": "True"
      }
    }
  }
}
```

Alternatively, connect to a pre-deployed Streamable-HTTP instance by `url`:

```json
{
  "mcpServers": {
    "repository-manager-mcp": {
      "url": "http://localhost:8000/repository-manager-mcp/mcp"
    }
  }
}
```

Run a reviewed container image as a least-privilege stdio child (no
listener or published port):

```bash
docker run -i --rm \
  --read-only \
  --cap-drop=ALL \
  --security-opt=no-new-privileges \
  --pids-limit=256 \
  --tmpfs /tmp:rw,noexec,nosuid,nodev,size=64m \
  -e TRANSPORT=stdio \
  -e MCP_TOOL_MODE=intent \
  -e BUILDTOOL=True \
  -e CONCEPTSTOOL=True \
  -e DEVELOPMENT_SURFACESTOOL=True \
  -e DOCS_READINESSTOOL=True \
  -e GATESTOOL=True \
  -e GH_TOKEN=your_github_token_here \
  -e GITHUB_TOKEN=your_github_token_here \
  -e GITLAB_HOST=https://gitlab.com \
  -e GITLAB_PRIVATE_TOKEN=your_gitlab_token_here \
  -e GITLAB_TOKEN=your_gitlab_token_here \
  -e GITLAB_URL=https://gitlab.com \
  -e GIT_OPERATIONSTOOL=True \
  -e LANETOOL=True \
  -e MERGE_QUEUETOOL=True \
  -e MERGE_QUEUE_DRAIN_DEADLINE_SECONDS=180 \
  -e MERGE_QUEUE_GLOBAL_DEADLINE_SECONDS=3600 \
  -e MERGE_QUEUE_HEAVY_DEADLINE_SECONDS=18000 \
  -e MERGE_QUEUE_LEASE_TTL_SECONDS=14400 \
  -e MERGE_QUEUE_MAX_AGE_SECONDS=86400 \
  -e MISCTOOL=True \
  -e PROJECTTOOL=True \
  -e PROJECT_MANAGEMENTTOOL=True \
  -e REMOTE_WORKERSTOOL=True \
  -e REPOSITORY_MANAGER_DEFAULT_BRANCH=main \
  -e REPOSITORY_MANAGER_THREADS=12 \
  -e RM_CPU_FRACTION=0.20 \
  -e RM_GATE_BEFORE_PUSH=true \
  -e RM_GATE_TIMEOUT_SECONDS=1800 \
  -e RM_JOB_STALE_SECONDS=1800 \
  -e RM_MAX_WORKERS=8 \
  -e RM_RAM_FRACTION=0.20 \
  -e RM_WORKER_MEM_GB=1.5 \
  -e WORKSPACE_MANAGEMENTTOOL=True \
  -e WORKSPACE_YML=workspace.yml \
  -e WORKTREETOOL=True \
  registry.example.invalid/repository-manager@sha256:<digest> repository-manager-mcp
```

For containerized network HTTP, supply an authenticated TLS ingress (or
direct server TLS), exact `MCP_ALLOWED_HOSTS`, and an exact trusted-proxy
CIDR policy through the operator-owned deployment profile. The generator
does not emit an unauthenticated non-loopback listener.

_Auto-generated from the code-read env surface (`MCP_TOOL_MODE` + package vars) — do not edit._
<!-- MCP-CONFIG-EXAMPLES:END -->

<!-- BEGIN GENERATED: additional-deployment-options -->
### Additional Deployment Options

`repository-manager` can run as a local stdio process or container, or behind a remote
network boundary. The
[Deployment guide](https://knuckles-team.github.io/repository-manager/deployment/) carries
the detailed transport contract.

- **Local container** — launch a reviewed immutable image as a least-privilege
  stdio child with no listener or published port.
- **Remote URL** — connect through an operator-supplied authenticated HTTPS
  ingress. Keep its URL, outbound identity references, trust profile, and exact
  `MCP_ALLOWED_HOSTS` in `AgentConfig`.
<!-- END GENERATED: additional-deployment-options -->

## Environment Variables

<!-- ENV-VARS-TABLE:START -->

#### Package environment variables

| Variable | Example | Description |
|----------|---------|-------------|
| `HOST` | `0.0.0.0` |  |
| `PORT` | `8000` |  |
| `TRANSPORT` | `stdio` | options: stdio, streamable-http, sse |
| `ENABLE_OTEL` | `True` |  |
| `OTEL_EXPORTER_OTLP_ENDPOINT` | `http://localhost:8080/api/public/otel` |  |
| `OTEL_EXPORTER_OTLP_PUBLIC_KEY_REF` | `secret://observability/otlp-public-key` |  |
| `OTEL_EXPORTER_OTLP_SECRET_KEY_REF` | `secret://observability/otlp-secret-key` |  |
| `OTEL_EXPORTER_OTLP_PROTOCOL` | `http/protobuf` |  |
| `EUNOMIA_TYPE` | `none` | options: none, embedded, remote |
| `EUNOMIA_POLICY_FILE` | `mcp_policies.json` |  |
| `EUNOMIA_REMOTE_URL` | `http://eunomia-server:8000` |  |
| `CONNECTOR_CONFIG_DIR` | — | override of ~/.config/agent-connector-sdk for the capacity-seed inventory.yaml lookup |
| `CONNECTOR_WORKSPACE_ROOT` | — | runtime-injected root; never persist a machine path |
| `REPOSITORY_MANAGER_WORKSPACE` | — | optional override of CONNECTOR_WORKSPACE_ROOT |
| `WORKSPACE_PATH` | — | compatibility workspace-root override |
| `WORKSPACE_YML` | `workspace.yml` | prefer the XDG agent-connector-sdk copy at runtime |
| `WORKSPACE_REPORTS` | — | optional report directory; defaults beneath the workspace root |
| `REPOSITORY_MANAGER_WORKTREE_ROOT` | — | optional worktree root; injected at runtime |
| `REPOSITORY_MANAGER_DEFAULT_BRANCH` | `main` | default branch name for git operations |
| `REPOSITORY_MANAGER_THREADS` | `12` | parallel threads for git operations |
| `RM_MAX_WORKERS` | `8` | explicit worker-count override (skips auto-sizing from CPU count) |
| `RM_JOB_STALE_SECONDS` | `1800` | seconds before an in-flight job is treated as stale by the watchdog |
| `RM_GATE_BEFORE_PUSH` | `true` | run the pre-commit gate before pushing (set false to bypass) |
| `RM_TASK_LEDGER_FLEET` | — | optional: caller identity (claude/codex/human/vllm) recorded against a task_queue reservation |
| `RM_TASK_LEDGER_SESSION` | — | optional: caller's lane/session id recorded against a task_queue reservation |
| `RM_DEPENDENCY_READINESS_OVERRIDE_REASON` | — | optional: non-empty human reason bypasses the dependency-readiness gate |
| `UV_INDEX_URL` | — | optional: package index consulted by the dependency-readiness artifact-availability check |
| `UV_EXTRA_INDEX_URL` | — | optional: space-separated extra package indexes for the dependency-readiness check |
| `PIP_INDEX_URL` | — | optional: pip fallback index consulted by the dependency-readiness artifact-availability check |
| `PIP_EXTRA_INDEX_URL` | — | optional: space-separated pip fallback extra indexes for the dependency-readiness check |
| `REPOSITORY_MANAGER_CLONE_FILTER` | — | optional git clone filter: blob:none or tree:0 |
| `CODE_ENHANCER_SCRIPTS_DIR` | — | optional code-enhancer helper scripts directory |
| `COMMIT_IDENTITY_ALLOWLIST` | — | path to the fleet commit-identity allowlist JSON (shared with pipelines_hooks' commit gate); read by `repository-manager-governance history-identity` |
| `GITLAB_URL` | `https://gitlab.com` | GitLab base URL (alias: GITLAB_HOST) |
| `GITLAB_HOST` | `https://gitlab.com` | legacy alias for GITLAB_URL |
| `GITLAB_TOKEN` | secret-injected | GitLab access token (alias: GITLAB_PRIVATE_TOKEN) |
| `GITLAB_PRIVATE_TOKEN` | secret-injected | legacy alias for GITLAB_TOKEN |
| `GITHUB_TOKEN` | secret-injected | GitHub access token (alias: GH_TOKEN) |
| `GH_TOKEN` | secret-injected | legacy alias for GITHUB_TOKEN |
| `GIT_OPERATIONSTOOL` | `True` | These names match the authoritative "Toggle Env Var" column in the README MCP tools table (condensed action-routed surface). |
| `PROJECT_MANAGEMENTTOOL` | `True` |  |
| `WORKSPACE_MANAGEMENTTOOL` | `True` |  |
| `MISCTOOL` | `True` |  |
| `DEVELOPMENT_SURFACESTOOL` | `True` |  |
| `LANETOOL` | `True` |  |
| `WORKTREETOOL` | `True` |  |
| `MERGE_QUEUETOOL` | `True` |  |
| `BUILDTOOL` | `True` |  |
| `PROJECTTOOL` | `True` |  |
| `GATESTOOL` | `True` |  |
| `CONCEPTSTOOL` | `True` |  |
| `REMOTE_WORKERSTOOL` | `True` |  |
| `AUTH_TYPE` | `bearer` | authentication type (e.g. bearer, none) |
| `MCP_URL` | `http://localhost:8000` |  |
| `DOCS_READINESSTOOL` | `True` |  |
| `RM_GATE_TIMEOUT_SECONDS` | `1800` | Wall-clock ceiling, in seconds, for one pre-commit gate stage (repository_manager/gates.py). Unset uses the per-stage built-in default. |
| `MERGE_QUEUE_DRAIN_DEADLINE_SECONDS` | `180` | per-repository fast queue drain wall-clock deadline |
| `MERGE_QUEUE_GLOBAL_DEADLINE_SECONDS` | `3600` | whole fast queue invocation wall-clock deadline |
| `MERGE_QUEUE_HEAVY_DEADLINE_SECONDS` | `18000` | heavy phased-push invocation wall-clock deadline |
| `MERGE_QUEUE_MAX_AGE_SECONDS` | `86400` | queued-record age limit before fail-closed omission |
| `MERGE_QUEUE_LEASE_TTL_SECONDS` | `14400` | repo-scoped queue lease; must exceed the drain deadline |
| `RM_CPU_FRACTION` | `0.20` | fraction of logical cores budgeted for validation workers |
| `RM_RAM_FRACTION` | `0.20` | fraction of host RAM budgeted for validation workers |
| `RM_WORKER_MEM_GB` | `1.5` | assumed RAM per validation worker for auto-sizing |
| `REPOSITORY_MANAGER_COMMAND` | — | optional executable used by the queue runner |
| `REPOSITORY_MANAGER_MCP_IMAGE` | — | Set to an image@sha256:<digest>. |
| `AGENT_UTILITIES_HOST_INVENTORY` | — | Canonical host identities and capability roles for cross-host lane/concept scoping, as a JSON document; unset uses no inventory (every host treated as unknown). See repository_manager/governance/lanes.py's _host_inventory(). |
| `AU_LANE_TEMP_ROOT` | — | Absolute override for the per-lane temp root (pytest basetemp / TMPDIR / pre-commit store / cargo target dir); unset uses the default $HOME/.al/<token> root. See lanes.py's _configured_lane_temp_root(). |
| `CARGO_TARGET_DIR` | — | Cargo's own target-dir override. lane_guard.py's cargo-target-override check reads this to refuse a shared/global CARGO_TARGET_DIR that would both serialize and corrupt concurrent lane builds; it is not set by this package. |

#### Inherited agent-connector-sdk variables (apply to every connector)

| Variable | Example | Description |
|----------|---------|-------------|
| `MCP_TOOL_MODE` | `intent` | Tool surface: `intent` \| `condensed` \| `verbose` \| `both` |
| `MCP_ENABLED_TOOLS` | — | Comma-separated tool allow-list |
| `MCP_DISABLED_TOOLS` | — | Comma-separated tool deny-list |
| `MCP_ENABLED_TAGS` | — | Comma-separated tag allow-list |
| `MCP_DISABLED_TAGS` | — | Comma-separated tag deny-list |
| `MCP_CLIENT_AUTH` | — | Outbound MCP child auth: `oidc-client-credentials` \| `basic` \| `none` |
| `OIDC_CLIENT_ID` | — | OIDC client id (service-account auth) |
| `OIDC_CLIENT_SECRET_REF` | `secret://identity/oidc-client-secret` | Runtime secret reference for the OIDC service account |
| `MCP_BASIC_AUTH_USERNAME` | — | HTTP Basic username (`MCP_CLIENT_AUTH=basic`) |
| `MCP_BASIC_AUTH_PASSWORD_REF` | `secret://identity/mcp-basic-password` | Runtime secret reference for HTTP Basic auth (`MCP_CLIENT_AUTH=basic`) |
| `DEBUG` | `False` | Verbose logging |
| `PYTHONUNBUFFERED` | `1` | Unbuffered stdout (recommended in containers) |
| `PROVIDER` | — | Operator-configured LLM provider for the agent |
| `MODEL_ID` | — | Operator-configured model id for the agent |
| `ENABLE_WEB_UI` | `True` | Serve the AG-UI web interface |

_69 package + 15 inherited variable(s). Auto-generated from `.env.example` + the shared agent-connector-sdk set — do not edit._
<!-- ENV-VARS-TABLE:END -->


Every variable the server and agent read, sourced from [`.env.example`](.env.example).

### MCP server / transport
| Variable | Description | Default |
|----------|-------------|---------|
| `TRANSPORT` | `stdio`, `streamable-http`, or `sse` | `stdio` |
| `HOST` | Bind host (HTTP transports) | `0.0.0.0` |
| `PORT` | Bind port (HTTP transports) | `8000` |
| `MCP_TOOL_MODE` | Tool surface: `condensed`, `verbose`, or `both` | `condensed` |
| `MCP_ENABLED_TOOLS` / `MCP_DISABLED_TOOLS` | Comma-separated tool allow/deny list | — |
| `MCP_ENABLED_TAGS` / `MCP_DISABLED_TAGS` | Comma-separated tag allow/deny list | — |
| `PYTHONUNBUFFERED` | Unbuffered stdout (recommended in containers) | `1` |

### Workspace & repository management
| Variable | Description | Default |
|----------|-------------|---------|
| `REPOSITORY_MANAGER_WORKSPACE` | Root directory of the git workspace to manage | deployment-provided |
| `WORKSPACE_PATH` | Fallback workspace root when `REPOSITORY_MANAGER_WORKSPACE` is unset | deployment-provided |
| `WORKSPACE_YML` | Workspace manifest filename (resolved under the workspace root) | `workspace.yml` |
| `WORKSPACE_REPORTS` | Directory where generated reports are written | — |
| `REPOSITORY_MANAGER_WORKTREE_ROOT` | Root directory for managed git worktrees | deployment-provided |
| `REPOSITORY_MANAGER_DEFAULT_BRANCH` | Default branch name for git operations | `main` |
| `REPOSITORY_MANAGER_THREADS` | Parallel threads for git operations | `12` |

### Operations & gating
| Variable | Description | Default |
|----------|-------------|---------|
| `RM_MAX_WORKERS` | Explicit worker-count override (skips auto-sizing from CPU count) | — |
| `RM_JOB_STALE_SECONDS` | Seconds before an in-flight job is treated as stale by the watchdog | `1800` |
| `RM_GATE_BEFORE_PUSH` | Run the pre-commit gate before pushing (set `false` to bypass) | `true` |

### Version-control provider credentials
| Variable | Description | Default |
|----------|-------------|---------|
| `GITLAB_URL` | GitLab base URL (alias: `GITLAB_HOST`) | — |
| `GITLAB_TOKEN` | GitLab access token (alias: `GITLAB_PRIVATE_TOKEN`) | — |
| `GITHUB_TOKEN` | GitHub access token (alias: `GH_TOKEN`) | — |

### Tool toggles
Each action-routed tool can be disabled individually via its toggle env var (set to `false`).
The full list is in the [Available MCP Tools](#available-mcp-tools) table above.

| Variable | Description | Default |
|----------|-------------|---------|
| `GIT_OPERATIONSTOOL` | Enable bulk Git operations (`rm_git`) | `True` |
| `PROJECT_MANAGEMENTTOOL` | Enable project + worktree management (`rm_projects` / `rm_worktree`) | `True` |
| `WORKSPACE_MANAGEMENTTOOL` | Enable workspace organization (`rm_workspace`) | `True` |

### Telemetry & governance
| Variable | Description | Default |
|----------|-------------|---------|
| `ENABLE_OTEL` | Enable OpenTelemetry export | `True` |
| `OTEL_EXPORTER_OTLP_ENDPOINT` | OTLP collector endpoint | — |
| `OTEL_EXPORTER_OTLP_PUBLIC_KEY` / `OTEL_EXPORTER_OTLP_SECRET_KEY` | OTLP auth keys | — |
| `OTEL_EXPORTER_OTLP_PROTOCOL` | OTLP protocol (e.g. `http/protobuf`) | — |
| `EUNOMIA_TYPE` | Authorization mode: `none`, `embedded`, `remote` | `none` |
| `EUNOMIA_POLICY_FILE` | Embedded policy file | `mcp_policies.json` |
| `EUNOMIA_REMOTE_URL` | Remote Eunomia server URL | — |

----------|-------------|---------|
| `MCP_URL` | URL of the MCP server the agent connects to | `http://localhost:8000/mcp` |
| `PROVIDER` | LLM provider (e.g. `openai`) | `openai` |
| `MODEL_ID` | Model id (e.g. `gpt-4o`) | `gpt-4o` |
| `ENABLE_WEB_UI` | Serve the AG-UI web interface | `True` |

---

## Security & Governance

Built directly upon the enterprise-ready [`agent-connector-sdk`](https://github.com/Knuckles-Team/agent-connector-sdk) core, standard security parameters are fully supported:

### Access Control & Policy Enforcement
- **Eunomia Policies:** Fine-grained, policy-driven tool authorization. Supports `none`, local `embedded` (`mcp_policies.json`), or centralized `remote` modes.
- **OIDC Token Delegation:** Compliant with RFC 8693 token exchange for flowing authenticating user credentials from Web UI / ACP → Agent → MCP.
- **Scoped Credentials:** Execution context runs restricted to the specific caller identity.

### Runtime Security Grid
| Feature | Feature | Enablement |
|---------|---------------|------------|
| **Tool Guard** | Sensitivity inspection with human-in-the-loop validation | Enabled by default |
| **Prompt Injection Defense** | Input scanning, repetition monitoring, and recursive loop blocks | Enabled by default |
| **Context Safety Guard** | Stuck-loop detectors and contextual overflow preemptive alerts | Enabled by default |

---

## Installation

Pick the extra that matches what the operator want to run:

| Extra | Installs | Use when |
|-------|----------|----------|
| `repository-manager[mcp]` | Connector-focused MCP server (`agent-connector-sdk` — FastMCP/FastAPI + `epistemic-graph[full]`) | The operator only run the **MCP server** (smallest install / image) |
| `repository-manager[all]` | `mcp` plus `pre-commit` / `bump2version` | Development |

```bash
# Connector-focused MCP server (includes the shared graph engine)
uv pip install "repository-manager[mcp]"

# Everything (development)
uv pip install "repository-manager[all]"      # or: python -m pip install "repository-manager[all]"
```

### Container image (`:mcp`)

`docker/Dockerfile` builds the MCP-server image (`--target mcp`):

| Image tag | Build target | Contents | Entrypoint |
|-----------|--------------|----------|------------|
| `example/repository-manager:mcp` | `--target mcp` | `repository-manager[mcp]` — **connector-focused**, includes `epistemic-graph[full]`; no model-orchestration stack | `repository-manager-mcp` |

```bash
docker build --target mcp   -t example/repository-manager:mcp    docker/   # connector-focused MCP server
```

`docker/mcp.compose.yml` runs the connector-focused `:mcp` server.

### Knowledge-graph database (`epistemic-graph`)

The `[mcp]` extra carries the **epistemic-graph** engine through the required
Agent Connector SDK core dependency (`epistemic-graph[full]`). The `[mcp]` extra keeps
the server connector-focused. Local
deployments can use the bundled engine. For production or shared state, run
**epistemic-graph as a dedicated database service** and configure the runtime to use it.
Deployment recipes (single-node + Raft HA), connection configuration, and architecture
diagrams are documented in the
[epistemic-graph deployment guide](https://knuckles-team.github.io/epistemic-graph/deployment/).

---

## Repository Owners

<img width="100%" height="180em" src="https://github-readme-stats.vercel.app/api?username=example&show_icons=true&hide_border=true&&count_private=true&include_all_commits=true" />

![GitHub followers](https://img.shields.io/github/followers/example)
![GitHub User's stars](https://img.shields.io/github/stars/example)

---

## Documentation

The complete documentation is published as the
[official documentation site](https://knuckles-team.github.io/repository-manager/) and
is the recommended reference for installation, deployment, and day-to-day operation.

| Page | Contents |
|---|---|
| [Installation](https://knuckles-team.github.io/repository-manager/installation/) | pip, source, extras, prebuilt Docker image |
| [Deployment](https://knuckles-team.github.io/repository-manager/deployment/) | run the MCP and agent servers, Compose, Caddy + Technitium, env config |
| [Usage](https://knuckles-team.github.io/repository-manager/usage/) | the MCP tools, the `Git` client, the CLI |
| [Overview](https://knuckles-team.github.io/repository-manager/overview/) | ecosystem role, enterprise readiness, architecture |
| [Phased Maintenance](https://knuckles-team.github.io/repository-manager/phased_maintenance/) | dependency-ordered workspace updates |
| [Phased Push](https://knuckles-team.github.io/repository-manager/phased_push/) | parallel, phase-gated multi-repository releases |
| [Concepts](https://knuckles-team.github.io/repository-manager/concepts/) | concept registry (`CONCEPT:RM-*`) |

`AGENTS.md` is the canonical contributor/agent guidance.

---

## Contribute

Contributions are welcome! Please ensure code quality by running local checks before submitting pull requests:
- Format code using `ruff format .`
- Lint code using `ruff check .`
- Validate type-safety with `mypy .`
- Ran test suites using `pytest`



<!-- GOVERNED-CAPABILITY:START -->
## Governed capability contract

This package ships a compact canonical skill surface with specialist procedures
kept as referenced workflows. The current MCP tools, skill metadata,
`connector_manifest.yml`, ontology, mappings, shapes, fixtures, migrations,
tool-schema fingerprints, and certification metadata form one versioned
capability contract. Validate them together; do not rely on stale tool names or
historical per-task skill wrappers.

Runtime endpoints, credentials, certificate trust, tenant identity, retention,
and observability policy are deployment inputs and are never packaged values.
See [Configuration, trust, and privacy](docs/configuration.md) before enabling a
network transport, connector ingestion, Arbora delegation, or trace export.
<!-- GOVERNED-CAPABILITY:END -->
