Skip to content

Latest commit

 

History

History
115 lines (101 loc) · 10.1 KB

CAPABILITIES.md

File metadata and controls

115 lines (101 loc) · 10.1 KB

Capabilities

gflow capabilities declares what this gflow can drive, so an agent or a pipeline can plan instead of learning by trying and failing (#1197). gflow drives Flow through a browser and Flow's private API, so some operations that API-based generation services offer have no equivalent here, and some depend on the Flow frontend gflow drives.

gflow capabilities                      # table
gflow capabilities --json               # the document below
gflow capabilities --profile NAME --json # include profile NAME's last observed host

MCP clients read the same JSON document from the resource capabilities://self (for the server's active or default profile) or capabilities://self/{profile} (for a named profile, mirroring --profile NAME), except on a no-spend server (gflow mcp run --no-spend, GFLOW_MCP_NO_SPEND=1): it registers no generate tool, so generate.image, generate.video and submit.no_wait are no there, with a note saying why. Both surfaces serialize one function (gflow_cli.cli_capabilities.build_capabilities) through one serializer (gflow_cli.json_output.dumps). A unit test compares the two, and an e2e test runs the real gflow capabilities --json in a subprocess and compares the parsed document with the resource's.

Document

The default setting (GFLOW_CLI_FLOW_HOST=auto). A test keeps this block equal to the code's output.

{
  "schema": 1,
  "adapter": "flow-browser",
  "host": "auto",
  "host_observed": null,
  "capabilities": {
    "generate.image": "partial",
    "generate.video": "partial",
    "submit.no_wait": "partial",
    "status": "partial",
    "wait": "partial",
    "download": "partial",
    "upload": "partial",
    "abort.local": "partial",
    "cancel.server": "no",
    "idempotent_submit": "no",
    "reconcile": "partial",
    "credits.balance": "partial"
  },
  "notes": { "generate.image": "...", "...": "..." }
}
Field Meaning
schema Document version. Bumped only on a breaking shape change.
adapter How gflow reaches Flow. Always flow-browser today: a real browser session plus Flow's private API.
host The GFLOW_CLI_FLOW_HOST setting (auto, flow.google.com or labs.google), not the host Flow serves a profile. Under auto the host is chosen per request from what Flow serves, and the document does not check which (see No call to Flow).
host_observed The last Flow host observed serving the resolved profile during an earlier command ({"host": "flow.google.com" | "labs.google", "observed_at": "<UTC ISO-8601>", "age_seconds": <int>}), or null when no observation is recorded (#1212). This is a recorded observation with an age, not a guarantee of what Flow will serve next, and capability values are never inferred from it.
capabilities One value per key: yes, no, partial or unknown.
notes One sentence or two per key. A partial always has one, saying what is missing.

Keys

Key Meaning Today
generate.image Text-to-image and image-to-image generation (image t2i/i2i/generate/batch, run, character create --face-prompt; MCP gflow_generate_image). character create --image generates nothing and is not a generation capability (USAGE § gflow character create). unknown with labs.google (gflow's labs driver takes every mode, but whether Flow serves this account labs is not checked offline; exit 36 if it serves flow.google.com). Otherwise partial: on flow.google.com gflow drives t2i and i2i from local files and from images the catalog records in this --project (#913, #995); Agent instructions, image4, image batch, other Flow media UUIDs, mixed refs and a character id without a name exit 36. The agent-only composer (#799) takes t2i only.
generate.video Video generation (video t2v/i2v/r2v/generate/chain/extend, movie run; MCP gflow_generate_video, gflow_movie_run). unknown with labs.google (as above). Otherwise partial: on flow.google.com gflow drives t2v, i2v from local start/end frames or image UUIDs the catalog records in this --project (#1542), r2v from local refs or a named character, and a single-segment extend. MCP resolves catalogued r2v image UUIDs to verified local files before dispatch. Cross-project or un-captioned frame UUIDs, r2v references passed to the composer as Flow media UUIDs, characters on t2v/i2v, and extend chains, --scene and --seed exit 36. The agent-only composer takes t2v only. Billed video commands accept --max-credits / MCP max_credits; a missing or over-limit Flow quote refuses with exit 45.
submit.no_wait Submit and return an id without waiting for the result. partial: MCP wait=false only, polled with tasks/get (needs a client with the SEP-2663 Tasks extension); no CLI --no-wait yet (#1194). no on a no-spend server.
status Ask how a submitted generation is doing, by id. partial: MCP tasks/get only (SEP-2663 client); no CLI status <id> yet (#1194).
wait Block until a submitted generation finishes, by id. partial: CLI generation commands block until done and MCP tasks/get carries a finished result; no CLI wait <id> yet (#1194).
download Fetch a finished asset to a local file. partial: generation commands download on completion; data download (MCP gflow_download_media) recovers a failed video download only, and refuses an image id (exit 11, #877).
upload Upload a local file to Flow for reuse. partial: image upload (CLI only) uploads one image into a --project and prints its media id (--json: media_id, mime, bytes), on flow.google.com as on labs.google (#1200); the MCP generate tools upload local reference paths themselves; there is no top-level upload and no video upload. On flow.google.com the r2v composer refuses media UUIDs (exit 36). MCP can use a catalogued r2v image UUID when it can verify a local file for upload. An uploaded id works as an image reference or video i2v frame when the catalog records it in the same --project (#995, #1542).
abort.local Stop gflow's own wait or job. Does not stop Flow. partial: Ctrl-C stops a CLI run; gflow cancel <id> and MCP tasks/cancel (SEP-2663 client) abort a queued wait=false job (#1198); a generation Flow already accepted may still be charged.
cancel.server Stop a generation Flow has already accepted, so it is not charged. no: once Flow accepts a generation it runs and may still be charged.
idempotent_submit Retry a submit safely: the same request id never starts a second generation. no: a retried submit is a new generation and may be charged again.
reconcile Bring the local catalog back in line with what Flow holds. partial: data sync --names refreshes names and presence (CLI only); no reconcile <id> yet (#1199).
credits.balance Read the account's credit balance. partial: the Veo video-credit balance only (credits user/list, MCP gflow_get_credits); image models use separate per-model daily quotas gflow does not read, and tier fields are null.

The notes in the document are the authoritative wording; this table summarizes them. On the flow.google.com rows, "gflow drives" is a statement about gflow's port, not about the host: a request gflow cannot drive there is not ported yet.

No call to Flow

The command makes no call to Flow and opens no browser. (Like every gflow command, the process may still run its once-a-day update check and the weekly telemetry upload; see CONFIGURATION and TELEMETRY.) Its inputs are GFLOW_CLI_FLOW_HOST and any host observation previously recorded on disk for the profile (.gflow_observed_host inside the profile directory, updated whenever a command such as generation, credits, auth renew, auth status, doctor, or media trash/restore observes Flow serving flow.google.com or labs.google, #1212). An offline run never claims an unobserved host (host_observed is null), keeps host equal to the setting, and does not infer capability values from host_observed. The value is the host of the last successful observation: a browser landing on a Flow app page, or a read over the direct wire, which always requests flow.google.com and follows no redirect. Under GFLOW_CLI_FLOW_HOST=labs.google the wire records nothing, so it never overwrites what the browser saw. Pass --profile NAME (or read capabilities://self/{profile} over MCP) to inspect a specific profile; a name with no profile directory is refused like any other profile command (CLI exit 2, MCP resource not found) rather than reported as unobserved. Omitting it uses the active/default profile when one resolves, else host_observed is null.

Keeping it true

  • tests/mcp/test_capabilities.py maps every CLI command to the key it exercises, or to None when it sits outside this vocabulary (sessions, the local catalog, configuration, docs, the servers, prompt tooling, credit-free composition such as scene create, and post-processing such as upscale). It fails when a command is added without an entry, so a new command forces the question.
  • The same file fails when status, wait, reconcile, a top-level upload or a --no-wait option appears, so the notes above that say "not yet" cannot go stale silently when #1194 or #1199 land.