mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-12 23:02:41 +00:00
commit
5b54b7c509
2 changed files with 577 additions and 0 deletions
37
graph.fabro
Normal file
37
graph.fabro
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
digraph ImplementPlan {
|
||||
graph [
|
||||
goal="Implement and simplify",
|
||||
model_stylesheet="
|
||||
* { model: claude-opus-4-7; }
|
||||
"
|
||||
]
|
||||
rankdir=LR
|
||||
|
||||
start [shape=Mdiamond, label="Start"]
|
||||
exit [shape=Msquare, label="Exit"]
|
||||
|
||||
toolchain [label="Toolchain", shape=parallelogram, script="command -v cargo >/dev/null || { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && sudo ln -sf $HOME/.cargo/bin/* /usr/local/bin/; }; cargo --version 2>&1", max_retries=0]
|
||||
preflight_compile [label="Preflight Compile", shape=parallelogram, script="cargo check -q --workspace 2>&1", max_retries=0]
|
||||
preflight_lint [label="Preflight Lint", shape=parallelogram, script="cargo +nightly-2026-04-14 clippy -q --workspace --all-targets -- -D warnings 2>&1", max_retries=0]
|
||||
fix_lints [label="Fix Lints", prompt="The preflight lint step failed. Read the build output from context and fix all clippy lint warnings.", max_visits=3]
|
||||
implement [label="Implement", prompt="Read the plan file referenced in the goal and implement every step. Make all the code changes described in the plan. Use red/green TDD."]
|
||||
simplify_opus [label="Simplify (Opus)", prompt="@prompts/simplify.md"]
|
||||
simplify_gpt [label="Simplify (GPT-55)", prompt="@prompts/simplify.md", model="gpt-55"]
|
||||
verify [label="Verify", shape=parallelogram, script="cargo +nightly-2026-04-14 clippy -q --workspace --all-targets -- -D warnings 2>&1 && cargo nextest run --cargo-quiet --workspace --status-level fail 2>&1 && cargo dev docs refresh 2>&1 && cargo dev docs check 2>&1", goal_gate=true, retry_target="fixup"]
|
||||
fixup [label="Fixup", prompt="The verify step failed. Read the build output from context and fix all clippy lint warnings, test failures, and generated docs errors.", max_visits=3]
|
||||
fmt [label="Format", shape=parallelogram, script="cargo +nightly-2026-04-14 fmt --all 2>&1", max_retries=0]
|
||||
|
||||
start -> toolchain
|
||||
toolchain -> preflight_compile [condition="outcome=succeeded"]
|
||||
toolchain -> exit
|
||||
preflight_compile -> preflight_lint [condition="outcome=succeeded"]
|
||||
preflight_compile -> exit
|
||||
preflight_lint -> implement [condition="outcome=succeeded"]
|
||||
preflight_lint -> fix_lints
|
||||
fix_lints -> preflight_lint
|
||||
implement -> simplify_opus -> simplify_gpt -> verify
|
||||
verify -> fmt [condition="outcome=succeeded"]
|
||||
verify -> fixup
|
||||
fixup -> verify
|
||||
fmt -> exit
|
||||
}
|
||||
540
run.json
Normal file
540
run.json
Normal file
|
|
@ -0,0 +1,540 @@
|
|||
{
|
||||
"title": "Implement this inline plan:",
|
||||
"spec": {
|
||||
"run_id": "01KS8JHBKEC0JBH6J6MYN37TR5",
|
||||
"settings": {
|
||||
"project": {
|
||||
"name": null,
|
||||
"description": null,
|
||||
"metadata": {}
|
||||
},
|
||||
"workflow": {
|
||||
"name": null,
|
||||
"description": null,
|
||||
"graph": "workflow.fabro",
|
||||
"metadata": {}
|
||||
},
|
||||
"run": {
|
||||
"goal": {
|
||||
"type": "inline",
|
||||
"value": "Implement this inline plan:\n\n# Add `fabro_run_get` for Read-Only Run Inspection\n\n## Summary\nAdd a new MCP/Fabro agent tool, `fabro_run_get`, that is safe to expose in read-only contexts. It will return the current run summary, projection, and pending questions without any mutation capability. Keep `fabro_run_interact` as the operational/human-loop tool, including `get_questions` for agents that are allowed to answer gates, but stop exposing it to Ask Fabro.\n\n## Key Changes\n- Add `fabro_run_get` to `fabro-tool` with input `{ \"run_id\": \"<selector>\" }`.\n- Return a rich read-only payload: resolved `run_id`, run `summary`, run `projection`, and `questions`.\n- Register `fabro_run_get` in the shared Fabro run tool definitions, MCP stdio server, and LLM tool dispatch.\n- Update Ask Fabro to register and allow only `fabro_run_get` plus `fabro_run_events` for run inspection.\n- Keep `fabro_run_interact` backward compatible, including existing `get`, `get_questions`, and mutating actions, but do not expose it in read-only Ask Fabro sessions.\n- Update public MCP docs to list `fabro_run_get` and describe `fabro_run_interact` as control/interaction oriented rather than read-only inspection.\n\n## Implementation Notes\n- Implement the read-only tool in `lib/crates/fabro-tool/src/get.rs`, following the same validation/result style as existing run tools.\n- Wire constants, exports, and tool schema registration through `lib/crates/fabro-tool/src/common.rs` and `lib/crates/fabro-tool/src/lib.rs`.\n- Add MCP and agent dispatch branches in `lib/crates/fabro-mcp-server/src/server.rs` and `lib/crates/fabro-workflow/src/handler/llm/api.rs`.\n- Change `lib/crates/fabro-server/src/server/handler/sessions.rs` so Ask Fabro’s tool registry and access policy use `FABRO_RUN_GET_TOOL_NAME` instead of `FABRO_RUN_INTERACT_TOOL_NAME`.\n\n## Test Plan\n- Add `fabro_run_get` schema/tool-list coverage in `lib/crates/fabro-cli/tests/it/cmd/mcp.rs`; update expected tool counts.\n- Add an MCP integration test showing `fabro_run_get` resolves a selector and returns summary, projection, and questions.\n- Add Ask Fabro tests showing exposed tool names include `fabro_run_get` and exclude `fabro_run_interact`.\n- Add policy coverage showing Ask Fabro denies `fabro_run_interact`.\n- Run focused tests for `fabro-tool`, MCP CLI tests, and Ask Fabro session tests; then run formatting/clippy if implementation touches Rust style broadly.\n\n## Assumptions\n- `fabro_run_interact.get` stays for compatibility in this change.\n- `get_questions` stays in `fabro_run_interact` because answering gates is still part of operational interaction.\n- Read-only safety is enforced primarily by tool exposure: Ask Fabro should not receive mixed read/write tools."
|
||||
},
|
||||
"working_dir": null,
|
||||
"metadata": {},
|
||||
"inputs": {},
|
||||
"model": {
|
||||
"provider": "anthropic",
|
||||
"name": "claude-sonnet-4-6",
|
||||
"fallbacks": [],
|
||||
"controls": {
|
||||
"reasoning_effort": null,
|
||||
"speed": null
|
||||
}
|
||||
},
|
||||
"git": {
|
||||
"author": null
|
||||
},
|
||||
"prepare": {
|
||||
"commands": [],
|
||||
"timeout_ms": 300000
|
||||
},
|
||||
"execution": {
|
||||
"mode": "normal",
|
||||
"approval": "prompt"
|
||||
},
|
||||
"checkpoint": {
|
||||
"exclude_globs": []
|
||||
},
|
||||
"clone": {
|
||||
"enabled": true
|
||||
},
|
||||
"run_branch": {
|
||||
"enabled": true,
|
||||
"push": true
|
||||
},
|
||||
"meta_branch": {
|
||||
"enabled": true,
|
||||
"push": true
|
||||
},
|
||||
"sandbox": {
|
||||
"provider": "daytona",
|
||||
"preserve": false,
|
||||
"stop_on_terminal": true,
|
||||
"devcontainer": false,
|
||||
"env": {},
|
||||
"docker": {
|
||||
"image": "buildpack-deps:noble",
|
||||
"network_mode": null,
|
||||
"memory_limit": 4000000000,
|
||||
"cpu_quota": 200000,
|
||||
"env_vars": {}
|
||||
},
|
||||
"daytona": {
|
||||
"auto_stop_interval": 30,
|
||||
"labels": {
|
||||
"repo": "fabro-sh/fabro"
|
||||
},
|
||||
"volumes": [],
|
||||
"snapshot": {
|
||||
"name": "fabro-v11",
|
||||
"cpu": 8,
|
||||
"memory_gb": 16,
|
||||
"disk_gb": 20,
|
||||
"dockerfile": {
|
||||
"type": "inline",
|
||||
"value": "FROM ubuntu:24.04\n\nRUN apt-get update && apt-get install -y --no-install-recommends \\\n curl git ca-certificates build-essential pkg-config libssl-dev unzip python3 \\\n xvfb xfce4 xfce4-terminal x11vnc novnc dbus-x11 \\\n libx11-6 libxrandr2 libxext6 libxrender1 libxfixes3 libxss1 libxtst6 libxi6 \\\n && rm -rf /var/lib/apt/lists/*\n\n# Install real Chromium (not the snap stub) via xtradeb PPA\nRUN apt-get update && apt-get install -y --no-install-recommends \\\n software-properties-common curl gnupg \\\n && add-apt-repository -y ppa:xtradeb/apps \\\n && apt-get update \\\n && apt-get install -y --no-install-recommends chromium \\\n && rm -rf /var/lib/apt/lists/*\n\n# Wrapper: Chromium needs --no-sandbox when running as root in a container,\n# and --disable-dev-shm-usage avoids crashes from small /dev/shm\nRUN printf '#!/bin/bash\\nexec /usr/bin/chromium --no-sandbox --disable-dev-shm-usage \"$@\"\\n' \\\n > /usr/local/bin/chromium-wrapper \\\n && chmod +x /usr/local/bin/chromium-wrapper\n\n# Make the wrapper the default in the system .desktop file and via alternatives\nRUN sed -i 's|^Exec=.*|Exec=/usr/local/bin/chromium-wrapper %U|' \\\n /usr/share/applications/chromium.desktop \\\n && update-alternatives --install /usr/bin/x-www-browser x-www-browser \\\n /usr/local/bin/chromium-wrapper 100\n\n# Tell XFCE's exo-open that Chromium is the WebBrowser helper (system-wide)\nRUN mkdir -p /etc/xdg/xfce4 /usr/share/xfce4/helpers \\\n && printf 'WebBrowser=custom-WebBrowser\\n' > /etc/xdg/xfce4/helpers.rc \\\n && printf '[Desktop Entry]\\n\\\nVersion=1.0\\n\\\nType=X-XFCE-Helper\\n\\\nName=Chromium\\n\\\nIcon=chromium\\n\\\nX-XFCE-Category=WebBrowser\\n\\\nX-XFCE-CommandsWithParameter=/usr/local/bin/chromium-wrapper \"%%s\"\\n\\\nX-XFCE-Commands=/usr/local/bin/chromium-wrapper\\n' \\\n > /usr/share/xfce4/helpers/custom-WebBrowser.desktop\n\n# GitHub CLI\nRUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \\\n | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \\\n && echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\" \\\n | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \\\n && apt-get update && apt-get install -y --no-install-recommends gh \\\n && rm -rf /var/lib/apt/lists/*\n\n# Rust\nRUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y\nENV PATH=\"/root/.cargo/bin:${PATH}\"\nRUN rustup toolchain install nightly-2026-04-14 --profile minimal --component clippy,rustfmt\nRUN cargo install cargo-nextest --locked\nENV CARGO_INCREMENTAL=0\n\n# Bun\nRUN curl -fsSL https://bun.sh/install | bash\nENV PATH=\"/root/.bun/bin:${PATH}\"\n\nWORKDIR /root\n"
|
||||
}
|
||||
},
|
||||
"network": null
|
||||
}
|
||||
},
|
||||
"notifications": {},
|
||||
"interviews": {
|
||||
"provider": null,
|
||||
"slack": null
|
||||
},
|
||||
"agent": {
|
||||
"fabro_tools": false,
|
||||
"permissions": null,
|
||||
"mcps": {}
|
||||
},
|
||||
"hooks": [],
|
||||
"scm": {
|
||||
"provider": null,
|
||||
"owner": null,
|
||||
"repository": null,
|
||||
"github": null
|
||||
},
|
||||
"pull_request": {
|
||||
"enabled": true,
|
||||
"draft": false,
|
||||
"auto_merge": false,
|
||||
"merge_strategy": "squash"
|
||||
},
|
||||
"artifacts": {
|
||||
"include": []
|
||||
},
|
||||
"integrations": {
|
||||
"github": {
|
||||
"permissions": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"graph": {
|
||||
"name": "ImplementPlan",
|
||||
"nodes": {
|
||||
"simplify_gpt": {
|
||||
"id": "simplify_gpt",
|
||||
"attrs": {
|
||||
"label": {
|
||||
"String": "Simplify (GPT-55)"
|
||||
},
|
||||
"prompt": {
|
||||
"String": "Review the recent code changes and simplify the implementation without changing behavior.\n\nPrefer removing unnecessary abstraction, duplication, and indirection. Keep the code clear, idiomatic, and focused on the requested behavior.\n"
|
||||
},
|
||||
"model": {
|
||||
"String": "gpt-5.5"
|
||||
},
|
||||
"provider": {
|
||||
"String": "openai"
|
||||
}
|
||||
}
|
||||
},
|
||||
"fixup": {
|
||||
"id": "fixup",
|
||||
"attrs": {
|
||||
"label": {
|
||||
"String": "Fixup"
|
||||
},
|
||||
"provider": {
|
||||
"String": "anthropic"
|
||||
},
|
||||
"max_visits": {
|
||||
"Integer": 3
|
||||
},
|
||||
"model": {
|
||||
"String": "claude-opus-4-7"
|
||||
},
|
||||
"prompt": {
|
||||
"String": "The verify step failed. Read the build output from context and fix all clippy lint warnings, test failures, and generated docs errors."
|
||||
}
|
||||
}
|
||||
},
|
||||
"fix_lints": {
|
||||
"id": "fix_lints",
|
||||
"attrs": {
|
||||
"label": {
|
||||
"String": "Fix Lints"
|
||||
},
|
||||
"provider": {
|
||||
"String": "anthropic"
|
||||
},
|
||||
"model": {
|
||||
"String": "claude-opus-4-7"
|
||||
},
|
||||
"prompt": {
|
||||
"String": "The preflight lint step failed. Read the build output from context and fix all clippy lint warnings."
|
||||
},
|
||||
"max_visits": {
|
||||
"Integer": 3
|
||||
}
|
||||
}
|
||||
},
|
||||
"verify": {
|
||||
"id": "verify",
|
||||
"attrs": {
|
||||
"retry_target": {
|
||||
"String": "fixup"
|
||||
},
|
||||
"shape": {
|
||||
"String": "parallelogram"
|
||||
},
|
||||
"script": {
|
||||
"String": "cargo +nightly-2026-04-14 clippy -q --workspace --all-targets -- -D warnings 2>&1 && cargo nextest run --cargo-quiet --workspace --status-level fail 2>&1 && cargo dev docs refresh 2>&1 && cargo dev docs check 2>&1"
|
||||
},
|
||||
"goal_gate": {
|
||||
"Boolean": true
|
||||
},
|
||||
"label": {
|
||||
"String": "Verify"
|
||||
},
|
||||
"model": {
|
||||
"String": "claude-opus-4-7"
|
||||
},
|
||||
"provider": {
|
||||
"String": "anthropic"
|
||||
}
|
||||
}
|
||||
},
|
||||
"preflight_compile": {
|
||||
"id": "preflight_compile",
|
||||
"attrs": {
|
||||
"provider": {
|
||||
"String": "anthropic"
|
||||
},
|
||||
"shape": {
|
||||
"String": "parallelogram"
|
||||
},
|
||||
"model": {
|
||||
"String": "claude-opus-4-7"
|
||||
},
|
||||
"script": {
|
||||
"String": "cargo check -q --workspace 2>&1"
|
||||
},
|
||||
"label": {
|
||||
"String": "Preflight Compile"
|
||||
},
|
||||
"max_retries": {
|
||||
"Integer": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"simplify_opus": {
|
||||
"id": "simplify_opus",
|
||||
"attrs": {
|
||||
"label": {
|
||||
"String": "Simplify (Opus)"
|
||||
},
|
||||
"provider": {
|
||||
"String": "anthropic"
|
||||
},
|
||||
"model": {
|
||||
"String": "claude-opus-4-7"
|
||||
},
|
||||
"prompt": {
|
||||
"String": "Review the recent code changes and simplify the implementation without changing behavior.\n\nPrefer removing unnecessary abstraction, duplication, and indirection. Keep the code clear, idiomatic, and focused on the requested behavior.\n"
|
||||
}
|
||||
}
|
||||
},
|
||||
"toolchain": {
|
||||
"id": "toolchain",
|
||||
"attrs": {
|
||||
"provider": {
|
||||
"String": "anthropic"
|
||||
},
|
||||
"max_retries": {
|
||||
"Integer": 0
|
||||
},
|
||||
"script": {
|
||||
"String": "command -v cargo >/dev/null || { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && sudo ln -sf $HOME/.cargo/bin/* /usr/local/bin/; }; cargo --version 2>&1"
|
||||
},
|
||||
"label": {
|
||||
"String": "Toolchain"
|
||||
},
|
||||
"model": {
|
||||
"String": "claude-opus-4-7"
|
||||
},
|
||||
"shape": {
|
||||
"String": "parallelogram"
|
||||
}
|
||||
}
|
||||
},
|
||||
"preflight_lint": {
|
||||
"id": "preflight_lint",
|
||||
"attrs": {
|
||||
"model": {
|
||||
"String": "claude-opus-4-7"
|
||||
},
|
||||
"max_retries": {
|
||||
"Integer": 0
|
||||
},
|
||||
"label": {
|
||||
"String": "Preflight Lint"
|
||||
},
|
||||
"provider": {
|
||||
"String": "anthropic"
|
||||
},
|
||||
"script": {
|
||||
"String": "cargo +nightly-2026-04-14 clippy -q --workspace --all-targets -- -D warnings 2>&1"
|
||||
},
|
||||
"shape": {
|
||||
"String": "parallelogram"
|
||||
}
|
||||
}
|
||||
},
|
||||
"implement": {
|
||||
"id": "implement",
|
||||
"attrs": {
|
||||
"label": {
|
||||
"String": "Implement"
|
||||
},
|
||||
"model": {
|
||||
"String": "claude-opus-4-7"
|
||||
},
|
||||
"prompt": {
|
||||
"String": "Read the plan file referenced in the goal and implement every step. Make all the code changes described in the plan. Use red/green TDD."
|
||||
},
|
||||
"provider": {
|
||||
"String": "anthropic"
|
||||
}
|
||||
}
|
||||
},
|
||||
"fmt": {
|
||||
"id": "fmt",
|
||||
"attrs": {
|
||||
"provider": {
|
||||
"String": "anthropic"
|
||||
},
|
||||
"label": {
|
||||
"String": "Format"
|
||||
},
|
||||
"shape": {
|
||||
"String": "parallelogram"
|
||||
},
|
||||
"max_retries": {
|
||||
"Integer": 0
|
||||
},
|
||||
"model": {
|
||||
"String": "claude-opus-4-7"
|
||||
},
|
||||
"script": {
|
||||
"String": "cargo +nightly-2026-04-14 fmt --all 2>&1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"start": {
|
||||
"id": "start",
|
||||
"attrs": {
|
||||
"shape": {
|
||||
"String": "Mdiamond"
|
||||
},
|
||||
"label": {
|
||||
"String": "Start"
|
||||
},
|
||||
"model": {
|
||||
"String": "claude-opus-4-7"
|
||||
},
|
||||
"provider": {
|
||||
"String": "anthropic"
|
||||
}
|
||||
}
|
||||
},
|
||||
"exit": {
|
||||
"id": "exit",
|
||||
"attrs": {
|
||||
"shape": {
|
||||
"String": "Msquare"
|
||||
},
|
||||
"model": {
|
||||
"String": "claude-opus-4-7"
|
||||
},
|
||||
"label": {
|
||||
"String": "Exit"
|
||||
},
|
||||
"provider": {
|
||||
"String": "anthropic"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"edges": [
|
||||
{
|
||||
"from": "start",
|
||||
"to": "toolchain",
|
||||
"attrs": {}
|
||||
},
|
||||
{
|
||||
"from": "toolchain",
|
||||
"to": "preflight_compile",
|
||||
"attrs": {
|
||||
"condition": {
|
||||
"String": "outcome=succeeded"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": "toolchain",
|
||||
"to": "exit",
|
||||
"attrs": {}
|
||||
},
|
||||
{
|
||||
"from": "preflight_compile",
|
||||
"to": "preflight_lint",
|
||||
"attrs": {
|
||||
"condition": {
|
||||
"String": "outcome=succeeded"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": "preflight_compile",
|
||||
"to": "exit",
|
||||
"attrs": {}
|
||||
},
|
||||
{
|
||||
"from": "preflight_lint",
|
||||
"to": "implement",
|
||||
"attrs": {
|
||||
"condition": {
|
||||
"String": "outcome=succeeded"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": "preflight_lint",
|
||||
"to": "fix_lints",
|
||||
"attrs": {}
|
||||
},
|
||||
{
|
||||
"from": "fix_lints",
|
||||
"to": "preflight_lint",
|
||||
"attrs": {}
|
||||
},
|
||||
{
|
||||
"from": "implement",
|
||||
"to": "simplify_opus",
|
||||
"attrs": {}
|
||||
},
|
||||
{
|
||||
"from": "simplify_opus",
|
||||
"to": "simplify_gpt",
|
||||
"attrs": {}
|
||||
},
|
||||
{
|
||||
"from": "simplify_gpt",
|
||||
"to": "verify",
|
||||
"attrs": {}
|
||||
},
|
||||
{
|
||||
"from": "verify",
|
||||
"to": "fmt",
|
||||
"attrs": {
|
||||
"condition": {
|
||||
"String": "outcome=succeeded"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": "verify",
|
||||
"to": "fixup",
|
||||
"attrs": {}
|
||||
},
|
||||
{
|
||||
"from": "fixup",
|
||||
"to": "verify",
|
||||
"attrs": {}
|
||||
},
|
||||
{
|
||||
"from": "fmt",
|
||||
"to": "exit",
|
||||
"attrs": {}
|
||||
}
|
||||
],
|
||||
"attrs": {
|
||||
"rankdir": {
|
||||
"String": "LR"
|
||||
},
|
||||
"model_stylesheet": {
|
||||
"String": "\n * { model: claude-opus-4-7; }\n "
|
||||
},
|
||||
"goal": {
|
||||
"String": "Implement this inline plan:\n\n# Add `fabro_run_get` for Read-Only Run Inspection\n\n## Summary\nAdd a new MCP/Fabro agent tool, `fabro_run_get`, that is safe to expose in read-only contexts. It will return the current run summary, projection, and pending questions without any mutation capability. Keep `fabro_run_interact` as the operational/human-loop tool, including `get_questions` for agents that are allowed to answer gates, but stop exposing it to Ask Fabro.\n\n## Key Changes\n- Add `fabro_run_get` to `fabro-tool` with input `{ \"run_id\": \"<selector>\" }`.\n- Return a rich read-only payload: resolved `run_id`, run `summary`, run `projection`, and `questions`.\n- Register `fabro_run_get` in the shared Fabro run tool definitions, MCP stdio server, and LLM tool dispatch.\n- Update Ask Fabro to register and allow only `fabro_run_get` plus `fabro_run_events` for run inspection.\n- Keep `fabro_run_interact` backward compatible, including existing `get`, `get_questions`, and mutating actions, but do not expose it in read-only Ask Fabro sessions.\n- Update public MCP docs to list `fabro_run_get` and describe `fabro_run_interact` as control/interaction oriented rather than read-only inspection.\n\n## Implementation Notes\n- Implement the read-only tool in `lib/crates/fabro-tool/src/get.rs`, following the same validation/result style as existing run tools.\n- Wire constants, exports, and tool schema registration through `lib/crates/fabro-tool/src/common.rs` and `lib/crates/fabro-tool/src/lib.rs`.\n- Add MCP and agent dispatch branches in `lib/crates/fabro-mcp-server/src/server.rs` and `lib/crates/fabro-workflow/src/handler/llm/api.rs`.\n- Change `lib/crates/fabro-server/src/server/handler/sessions.rs` so Ask Fabro’s tool registry and access policy use `FABRO_RUN_GET_TOOL_NAME` instead of `FABRO_RUN_INTERACT_TOOL_NAME`.\n\n## Test Plan\n- Add `fabro_run_get` schema/tool-list coverage in `lib/crates/fabro-cli/tests/it/cmd/mcp.rs`; update expected tool counts.\n- Add an MCP integration test showing `fabro_run_get` resolves a selector and returns summary, projection, and questions.\n- Add Ask Fabro tests showing exposed tool names include `fabro_run_get` and exclude `fabro_run_interact`.\n- Add policy coverage showing Ask Fabro denies `fabro_run_interact`.\n- Run focused tests for `fabro-tool`, MCP CLI tests, and Ask Fabro session tests; then run formatting/clippy if implementation touches Rust style broadly.\n\n## Assumptions\n- `fabro_run_interact.get` stays for compatibility in this change.\n- `get_questions` stays in `fabro_run_interact` because answering gates is still part of operational interaction.\n- Read-only safety is enforced primarily by tool exposure: Ask Fabro should not receive mixed read/write tools."
|
||||
}
|
||||
}
|
||||
},
|
||||
"graph_source": "digraph ImplementPlan {\n graph [\n goal=\"Implement and simplify\",\n model_stylesheet=\"\n * { model: claude-opus-4-7; }\n \"\n ]\n rankdir=LR\n\n start [shape=Mdiamond, label=\"Start\"]\n exit [shape=Msquare, label=\"Exit\"]\n\n toolchain [label=\"Toolchain\", shape=parallelogram, script=\"command -v cargo >/dev/null || { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && sudo ln -sf $HOME/.cargo/bin/* /usr/local/bin/; }; cargo --version 2>&1\", max_retries=0]\n preflight_compile [label=\"Preflight Compile\", shape=parallelogram, script=\"cargo check -q --workspace 2>&1\", max_retries=0]\n preflight_lint [label=\"Preflight Lint\", shape=parallelogram, script=\"cargo +nightly-2026-04-14 clippy -q --workspace --all-targets -- -D warnings 2>&1\", max_retries=0]\n fix_lints [label=\"Fix Lints\", prompt=\"The preflight lint step failed. Read the build output from context and fix all clippy lint warnings.\", max_visits=3]\n implement [label=\"Implement\", prompt=\"Read the plan file referenced in the goal and implement every step. Make all the code changes described in the plan. Use red/green TDD.\"]\n simplify_opus [label=\"Simplify (Opus)\", prompt=\"@prompts/simplify.md\"]\n simplify_gpt [label=\"Simplify (GPT-55)\", prompt=\"@prompts/simplify.md\", model=\"gpt-55\"]\n verify [label=\"Verify\", shape=parallelogram, script=\"cargo +nightly-2026-04-14 clippy -q --workspace --all-targets -- -D warnings 2>&1 && cargo nextest run --cargo-quiet --workspace --status-level fail 2>&1 && cargo dev docs refresh 2>&1 && cargo dev docs check 2>&1\", goal_gate=true, retry_target=\"fixup\"]\n fixup [label=\"Fixup\", prompt=\"The verify step failed. Read the build output from context and fix all clippy lint warnings, test failures, and generated docs errors.\", max_visits=3]\n fmt [label=\"Format\", shape=parallelogram, script=\"cargo +nightly-2026-04-14 fmt --all 2>&1\", max_retries=0]\n\n start -> toolchain\n toolchain -> preflight_compile [condition=\"outcome=succeeded\"]\n toolchain -> exit\n preflight_compile -> preflight_lint [condition=\"outcome=succeeded\"]\n preflight_compile -> exit\n preflight_lint -> implement [condition=\"outcome=succeeded\"]\n preflight_lint -> fix_lints\n fix_lints -> preflight_lint\n implement -> simplify_opus -> simplify_gpt -> verify\n verify -> fmt [condition=\"outcome=succeeded\"]\n verify -> fixup\n fixup -> verify\n fmt -> exit\n}\n",
|
||||
"workflow_slug": "implement-plan",
|
||||
"source_directory": "/Users/bhelmkamp/p/fabro-sh/fabro-3",
|
||||
"provenance": {
|
||||
"server": {
|
||||
"version": "0.241.0-nightly.0"
|
||||
},
|
||||
"client": {
|
||||
"user_agent": "fabro-cli/0.241.0-nightly.0",
|
||||
"name": "fabro-cli",
|
||||
"version": "0.241.0-nightly.0"
|
||||
},
|
||||
"subject": {
|
||||
"kind": "user",
|
||||
"identity": {
|
||||
"issuer": "https://github.com",
|
||||
"subject": "19"
|
||||
},
|
||||
"login": "brynary",
|
||||
"auth_method": "github"
|
||||
}
|
||||
},
|
||||
"manifest_blob": "31e902a17850d3929de6e1d56fd34a738340fd8845de1d3277a6f364f758de0b",
|
||||
"definition_blob": "f60327d92b7966cf5dfabc25c270b64b82e9b777f12071e8cc93897c20ceacab",
|
||||
"git": {
|
||||
"origin_url": "https://github.com/fabro-sh/fabro",
|
||||
"branch": "main",
|
||||
"sha": "fa474e36f78a411d55a363d34a775d5465c31428",
|
||||
"dirty": "dirty",
|
||||
"push_outcome": {
|
||||
"type": "not_attempted"
|
||||
}
|
||||
}
|
||||
},
|
||||
"web_url": "http://127.0.0.1:32276/runs/01KS8JHBKEC0JBH6J6MYN37TR5",
|
||||
"start": null,
|
||||
"status": {
|
||||
"kind": "starting"
|
||||
},
|
||||
"status_updated_at": "2026-05-22T19:28:01.176706Z",
|
||||
"last_event_at": "2026-05-22T19:28:19.516752Z",
|
||||
"pending_control": null,
|
||||
"checkpoints": [],
|
||||
"conclusion": null,
|
||||
"sandbox": {
|
||||
"provider": "daytona",
|
||||
"image": "buildpack-deps:noble",
|
||||
"snapshot": "fabro-v11",
|
||||
"runtime": {
|
||||
"id": "fabro-01KS8JHBKEC0JBH6J6MYN37TR5",
|
||||
"working_directory": "/home/daytona/workspace/fabro",
|
||||
"repo_cloned": true,
|
||||
"clone_origin_url": "https://github.com/fabro-sh/fabro",
|
||||
"clone_branch": "main",
|
||||
"workspace_root": "/home/daytona/workspace",
|
||||
"repos_root": "/home/daytona/repos",
|
||||
"primary_repo_path": "/home/daytona/repos/fabro-sh/fabro",
|
||||
"primary_repo_link": "/home/daytona/workspace/fabro"
|
||||
}
|
||||
},
|
||||
"pull_request": null,
|
||||
"superseded_by": null,
|
||||
"pending_interviews": {},
|
||||
"stages": {}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue