feat(mcp): expose action run logs as get_action_run_logs (FJ-61) #79
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/FJ-61-mcp-action-run-logs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes FJ-61.
The CLI has shipped
fj actions logssince FJ-22, but the MCP server exposed no way to read an action run's logs: a client could see a run failed vialist_action_tasksand never find out why.get_action_run_logs { owner, repo, run_number, job? }, delegating tofj_core::actions::action_run_logsso no REST logic is reimplemented in the MCP layer.JobLogderivesSerialize; the tool returns[{ name, status, log }], matchingfj actions logs --jsonfield names.with_instructions(...).jobnarrows the result to a single job, the escape hatch for unbounded log bodies landing whole in the caller's context.Sweep
Comparing every CLI actions read capability against the MCP surface: tasks (compliant), variables list/get repo+org (compliant), secrets list (compliant), logs (was violating, fixed here), artifacts list + artifact download (violating, out of scope, tracked in FJ-62). Dispatch is EDIT tier and already exposed.
just pre-commitpasses. The MCP-reuse contract grep (cargo tree -p fj-client -p fj-core -e normal | grep -E 'clap|crossterm|fluent') returns nothing.The CLI has shipped `fj actions logs` since FJ-22, but the MCP server exposed no way to read an action run's logs: a client could see that a run failed via list_action_tasks and never find out why. Add a READ-tier get_action_run_logs tool delegating to fj_core::actions::action_run_logs, so no REST logic is reimplemented in the MCP layer. JobLog now derives Serialize so the tool returns [{ name, status, log }], matching the field names of `fj actions logs --json`. The optional job parameter narrows the result to a single job, which is the escape hatch for unbounded log bodies landing whole in the caller's context. #FJ-61