feat(forge-mcp): expose CI job logs and issue dependency graph #1159

Closed
opened 2026-05-14 21:27:47 +00:00 by claude-desktop · 0 comments
Collaborator

As a dev / code-lead / reviewer agent, I want to read CI job logs and query the issue dependency graph via forge-mcp, so that I can self-diagnose CI failures without operator intervention and check whether my assigned issue is blocked before starting work.

Acceptance criteria

get_job_logs

  • Tool get_job_logs(owner?, repo?, forge?, run_id, job_idx) added to SPECS in apps/forge-mcp/src/tools.ts
  • Delegates to port.getJobLogs(repo, runId, jobIdx) (already implemented on ForgePort)
  • run_id and job_idx are required integer args; owner/repo/forge use the standard repoFragment
  • Returns the raw log string; ok() wraps so a missing run emits an MCP error, not null
  • get_job_logs added to FORGE_TOOLS_ALLOWLIST in apps/server/src/domain/agent/mcp-config.ts

get_blockers / get_blocked

  • Tool get_blockers(owner?, repo?, forge?, index) — delegates to port.getBlockers(repo, index) — returns ForgeIssueRef[]
  • Tool get_blocked(owner?, repo?, forge?, index) — delegates to port.getBlocked(repo, index) — returns ForgeIssueRef[]
  • Both tools added to FORGE_TOOLS_ALLOWLIST

add_blocker

  • Tool add_blocker(owner?, repo?, forge?, index, blocker) — delegates to port.addBlocker(repo, index, blocker)blocker is an integer issue number
  • Added to FORGE_TOOLS_ALLOWLIST

Tests

  • TOOL_NAMES lockstep assertion in apps/forge-mcp/src/tools.test.ts includes all 4 new names
  • server.test.ts surface count updated (35 → 39)
  • mcp-config.test.ts lockstep set updated to require the 4 new names
  • just qa passes

Out of scope

  • Adapter parity for GitHub/GitLab getJobLogs — adapters that lack the API surface can throw; cross-forge parity is a separate story.
  • removeBlocker / dependency bulk-edit — not needed now.
  • repoHasWorkflows tool — utility guard, no agent use case yet.

References

  • apps/forge-mcp/src/tools.ts — extend SPECS array
  • apps/server/src/domain/agent/mcp-config.tsFORGE_TOOLS_ALLOWLIST
  • apps/server/src/infrastructure/forge/forgejo-port.ts lines 374–386 — getBlockers, getBlocked, addBlocker, getJobLogs
As a dev / code-lead / reviewer agent, I want to read CI job logs and query the issue dependency graph via `forge-mcp`, so that I can self-diagnose CI failures without operator intervention and check whether my assigned issue is blocked before starting work. ## Acceptance criteria ### `get_job_logs` - [ ] Tool `get_job_logs(owner?, repo?, forge?, run_id, job_idx)` added to `SPECS` in `apps/forge-mcp/src/tools.ts` - [ ] Delegates to `port.getJobLogs(repo, runId, jobIdx)` (already implemented on `ForgePort`) - [ ] `run_id` and `job_idx` are required integer args; `owner`/`repo`/`forge` use the standard `repoFragment` - [ ] Returns the raw log string; `ok()` wraps so a missing run emits an MCP error, not `null` - [ ] `get_job_logs` added to `FORGE_TOOLS_ALLOWLIST` in `apps/server/src/domain/agent/mcp-config.ts` ### `get_blockers` / `get_blocked` - [ ] Tool `get_blockers(owner?, repo?, forge?, index)` — delegates to `port.getBlockers(repo, index)` — returns `ForgeIssueRef[]` - [ ] Tool `get_blocked(owner?, repo?, forge?, index)` — delegates to `port.getBlocked(repo, index)` — returns `ForgeIssueRef[]` - [ ] Both tools added to `FORGE_TOOLS_ALLOWLIST` ### `add_blocker` - [ ] Tool `add_blocker(owner?, repo?, forge?, index, blocker)` — delegates to `port.addBlocker(repo, index, blocker)` — `blocker` is an integer issue number - [ ] Added to `FORGE_TOOLS_ALLOWLIST` ### Tests - [ ] `TOOL_NAMES` lockstep assertion in `apps/forge-mcp/src/tools.test.ts` includes all 4 new names - [ ] `server.test.ts` surface count updated (35 → 39) - [ ] `mcp-config.test.ts` lockstep set updated to require the 4 new names - [ ] `just qa` passes ## Out of scope - Adapter parity for GitHub/GitLab `getJobLogs` — adapters that lack the API surface can throw; cross-forge parity is a separate story. - `removeBlocker` / dependency bulk-edit — not needed now. - `repoHasWorkflows` tool — utility guard, no agent use case yet. ## References - `apps/forge-mcp/src/tools.ts` — extend `SPECS` array - `apps/server/src/domain/agent/mcp-config.ts` — `FORGE_TOOLS_ALLOWLIST` - `apps/server/src/infrastructure/forge/forgejo-port.ts` lines 374–386 — `getBlockers`, `getBlocked`, `addBlocker`, `getJobLogs`
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/agent-hooks#1159
No description provided.