Repository navigation
feat: gflow capabilities and MCP capabilities://self (#1197) - #1206
Merged
Merged
Conversation
…//self (#1197) One source of truth in cli_capabilities.py: the CLI --json output and the MCP resource serialize the same function, and a test holds them to the same bytes. Values are yes/no/partial/unknown with a note on every partial. Offline: the only input is GFLOW_CLI_FLOW_HOST. A test fails when a CLI command is added without a COMMAND_CAPABILITY entry.
…s, host-neutral notes (#1197) labs.google: gflow's labs driver takes every mode, but whether Flow serves the account labs is not checkable offline, so generation is unknown, not yes. credits.balance is the Veo balance only, so partial. The auto note now says what gflow cannot drive yet instead of what flow.google.com cannot take.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 13 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 9, 2026
…ad, honest notes (#1197) Review fixes. A no-spend MCP server registers no generate tool, so the resource reports generate.image, generate.video and submit.no_wait as no (#495 rule). download is partial: recovery refuses image ids (#877). upload depends on the host: flow.google.com does not take an uploaded id as a video frame or reference. Partial generation notes now name what is not driven (exit 36), billing wording says may still be charged, and the tasks notes name the SEP-2663 Tasks extension. json_output.dumps is the one serializer. COMMAND_CAPABILITY moves into the test (with scene create and character create remapped), the Click walk is shared with the parity test, a guard fails when a not-yet-built lifecycle verb lands, a test keeps the docs JSON block true, and an e2e test runs the real command in a subprocess against the resource.
…ilities # Conflicts: # AGENTS.md # CHANGELOG.md # README.md
Owner
Author
|
@coderabbitai review |
Action not completed
|
…ilities # Conflicts: # AGENTS.md # CHANGELOG.md # docs/USAGE.md # website/docs/USAGE.md
Merging develop brought in #1204's `models list` and `models show`. Both read the local model catalog, outside the generation-lifecycle vocabulary, so they map to None like the bare `models` entry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1197
Part of #1191
Follow-up: #1212 (per-profile host resolution)
Summary
gflow capabilities [--json]and the MCP resourcecapabilities://selfreturn one document:schema,adapter(flow-browser),host(theGFLOW_CLI_FLOW_HOSTsetting),capabilities(one ofyes|no|partial|unknownper key) andnotes(always present forpartial, saying what is missing).src/gflow_cli/cli_capabilities.py::build_capabilities, serialized byjson_output.dumps(the one--jsonserializer, also used byemit). The one deliberate difference is a no-spend MCP server: it registers no generate tool, sogenerate.image,generate.videoandsubmit.no_waitarenothere (docs(mcp): remove false safety claims (credit budgets, pre-flight auth) — MCP doc-truth sweep #495: a resource names only registered tools).CliRunnerstdout with the in-memory MCPread_resource. The e2e testtests/e2e/test_capabilities_e2e.pyruns the realpython -m gflow_cli capabilities --jsonin a subprocess for each host setting and compares the parsed JSON with the resource.COMMAND_CAPABILITYintests/mcp/test_capabilities.pymaps every CLI leaf to a key orNone. The Click walk is shared withtest_cli_parity.py(tests/mcp/_cli_tree.py). It fails on a new command, on stale entries and on unknown keys, and a probe test proves it bites.status,wait,cancel,reconcile, a top-leveluploador a--no-waitoption appears, so the "not yet" notes cannot go stale silently when CLI: --no-wait, gflow status <id> and gflow wait <id> #1194/CLI: gflow cancel <id> (local abort; honest about server-side cancel) #1198/CLI: gflow reconcile <id> settles one unknown outcome #1199/CLI: gflow upload <file> returns a reusable media id #1200 land. Another test keeps the JSON block indocs/CAPABILITIES.mdequal to the code's default output.capabilitiessits in_MCP_EXEMPTwith the reason "twin is the MCP resource capabilities://self".CLI_TO_MCPrequires a registered tool.docs/CAPABILITIES.md(every key and its meaning), linked from INDEX and the website nav; USAGE, MCP, the skill (+ plugin copy), llms.txt, README, the AGENTS.md command surface and module list, CHANGELOG.Values today, and why
generate.imagepartial(auto, flow.google.com),unknown(labs.google),no(no-spend MCP)image4,image batch, Flow media UUIDs the catalog does not record in this--project(#913/#995), mixed refs and a character id without a name exit 36 (migrated_composer._unported_image_form,ui_automationimage_batch_unported); agent-only composer t2i only (#799). labs.google: whether Flow serves the account labs is not checkable offline.generate.video@Name, characters on t2v/i2v, a character id without a name, and extend chains/--scene/--seedexit 36 (_unported_form).submit.no_wait,status,waitpartialwait=false+tasks/get(needs a client with the SEP-2663 Tasks extension); the CLI verbs are #1194.downloadpartialdata download/gflow_download_mediarecover video only; an image id is refused (exit 11, #877).uploadpartial, host-dependent noteimage uploadis CLI-only (#1200). On flow.google.com an uploaded id is not taken as a video frame/reference (exit 36), and as an image ref only when the catalog records it in the same--project(#995).abort.localpartialtasks/cancel; nocancel <id>(#1198).cancel.server,idempotent_submitnoreconcilepartialdata sync --namesonly (#543); noreconcile <id>(#1199).credits.balancepartialReal CLI run (worktree install, one per host setting)
The e2e test does this run and compares each result with the resource:
Review
Two independent reviews (
/code-reviewxhigh, ponytail-review xhigh) came in on the first version.Fixed
generate.image,generate.videoandsubmit.no_waitasnoon a no-spend server and names no unregistered tool (test with monkeypatch; CLI unaffected, also tested). Docs say "same document, except on a no-spend server".downloadchanged fromyestopartial(video-only recovery, gflow data download accepts an image media id, waits 45s, then blames the project, the trash, and your prompt #877).uploadis host-dependent and says what flow.google.com does not take.generate.*notes now name what is not driven (exit 36), checked against_unported_image_form/_unported_form/ the image-batch refusal.gflow runis not listed as refused: it generates row by row through the single-image path, which flow.google.com serves; onlyimage batchraisesimage_batch_unported.--no-wait.COMMAND_CAPABILITYmoved into the test, the walker is shared with the parity test,scene create→None(credit-free composition),character create→generate.image, and the comment lists everyNonecategory.docs/CAPABILITIES.mdnotes the update check and telemetry upload the process may still run.to_jsonwas removed;json_output.dumpsis the one serializer.submit.no_wait/status/abort.localnotes name the SEP-2663 Tasks extension.reset_settings()try/finally was dropped from the host test (the autouse fixture isolates it).--probe, or a recorded served-host observation), linked here and fromdocs/CAPABILITIES.md, which also sayshostreports the setting.Closes #1197is kept: its Acceptance list is met.Hand-copied docs values: I chose the cheaper option, a test that the JSON block in
docs/CAPABILITIES.mdequalsbuild_capabilities("auto"). It already caught the staledownloadrow during this round. The prose in llms.txt and the skill names keys, not values, apart fromcancel.server/idempotent_submit=no.Not changed, and why
_MCP_EXEMPTplacement stays as asked. Open question: aCLI_TO_MCP_RESOURCEmap (with a "resource is registered" check) would record resource twins more precisely than an exemption. It is worth doing if a second resource twin appears.--probeand--profile: see capabilities: resolve the served host per profile (--probe or a recorded observation) #1212.Open questions
test_cli_parity.py(above).modelsintomodels list/models show. Whichever PR merges second updatesCOMMAND_CAPABILITY(stale-entry test) andtest_cli_parity.py.--help --jsoncoverage test; this PR's tests are self-contained.Gates (committed tree,
UV_LINK_MODE=copy PYTHONUTF8=1)-n 8 --dist worksteal --cov)tests/e2e/test_capabilities_e2e.py(-m e2e)TDD for this round: the rewritten tests ran red first (13 failed: missing
no_spend,downloadstillyes,uploadnot host-dependent, notes not naming what is missing, "is charged", no SEP-2663 mention, no-spend resource). After the implementation, the docs JSON-block guard went red on the staledownloadrow, and the docs update fixed it. All green afterwards.Step 1b (six mirror axes)
--json; no request is built and nothing is queued.docs/MCP.mdand the no-spend behaviour agree; the parity file records the decision.gflow models/gflow doctorunchanged.### Added.E2E scope
The command makes no call to Flow and opens no browser, so it touches no Flow surface. The Iron Law still wants an e2e test for a new command, so one was added:
tests/e2e/test_capabilities_e2e.py(e2e_auth, zero credits, no browser) runs the real binary path once per host setting and compares the result withcapabilities://self. Result:3 passed.