diff --git a/CHANGELOG.md b/CHANGELOG.md index e94a89f85..869fea3d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Published documentation now links to GitHub's default branch (`develop`) for repository + files and directories outside the site mirror. CI reports broken relative links with their page and line number (#1755). - On `flow.google.com`, a new project can keep its saved title when Flow's rename reply is missing and readback confirms the project. Generation uses that project and warns about the title: `image t2i`/`i2i --json` and the MCP image, diff --git a/KNOWN_ISSUES.md b/KNOWN_ISSUES.md index 8b113e77a..bb59f0117 100644 --- a/KNOWN_ISSUES.md +++ b/KNOWN_ISSUES.md @@ -794,8 +794,7 @@ endpoint, a different surface from the `labs.google` tRPC API. > because it sends cookies but not that token. The `gflow scene` groundwork now > fetches+caches the token and attaches the Bearer to the **`page.request` REST > path** (`_post_json` / `_patch_json`, host-scoped to `aisandbox-pa`) so -> `uploadImage` / `scenes` / `commit` authenticate — see -> [`docs/superpowers/plans/2026-05-31-l0-bearer-pivot.md`](docs/superpowers/plans/2026-05-31-l0-bearer-pivot.md). +> `uploadImage` / `scenes` / `commit` authenticate. > **Live-verified 2026-05-31:** REST `uploadImage` returns 200 > (`tests/e2e/test_aisandbox_auth_live.py`, credit-free). > **Liberating follow-up:** the same Bearer likely unlocks the `evaluate_fetch` diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index af64fe9b6..265b78c97 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -326,7 +326,7 @@ Process-boundary contextvars bind once: `correlation_id` (UUID4 per CLI invocati Format defaults to **human-readable on TTY**, **JSON when piped or `GFLOW_CLI_LOG_FORMAT=json`**. JSON exceptions use `structlog.tracebacks.ExceptionDictTransformer(show_locals=False)` so frame locals (which may contain auth cookies and signed URLs) are never serialized. TEXT exceptions are formatted by `ConsoleRenderer` with `structlog.dev.plain_traceback`, which omits frame locals; its default Rich formatter would print them. -Pipes cleanly into `jq` / Loki / Datadog without configuration. See [`docs/USER_GUIDE.md` § Journey 6](USER_GUIDE.md#journey-6--read-the-structured-logs) for `jq` recipes. +Pipes cleanly into `jq` / Loki / Datadog without configuration. See [`docs/USER_GUIDE.md` § Journey 6](USER_GUIDE.md#journey-6--reading-structured-logs-jq-recipes) for `jq` recipes. ## Incident diagnostics (shipped, v0.43.0) diff --git a/docs/CHARACTER.md b/docs/CHARACTER.md index 35daa65bf..ea35330d2 100644 --- a/docs/CHARACTER.md +++ b/docs/CHARACTER.md @@ -3,7 +3,7 @@ > **Status:** SHIPPED (live-verified 2026-06-02) · **Issue:** [#145](https://github.com/ffroliva/gflow-cli/issues/145) · **Branch:** `feature/character-creation` > **Living document.** Evolve this as the feature and Flow's API evolve. Raw capture provenance lives in > [`CHARACTER_RECON.md`](CHARACTER_RECON.md); the cross-feature decision lens is -> [the REST-path capability matrix](#capability--cost). +> [the REST-path capability matrix](#3-capability--cost). > **Credit:** pattern-references @kittinan's avatar PR #123 (attach-flow idiom + CLI scaffolding shape) — but > built **greenfield off `develop`, NOT stacked on #123** (that branch is CONFLICTING and likeness-specific; > see [Design decisions](#11-design-decisions-post-predict)). diff --git a/docs/DEBUGGING.md b/docs/DEBUGGING.md index 8fbd93ae2..9f9248f8a 100644 --- a/docs/DEBUGGING.md +++ b/docs/DEBUGGING.md @@ -45,7 +45,7 @@ Confirm by checking for `ui_automation.image_mode_entered` in the log; if it is missing, the mode switch did not run. If `image_mode_entered` is present but `batch_response_seen` is still missing, the remaining hypothesis is the historical UI-flake noted in -[`LIVE_VERIFICATION_v0.7.0.md`](LIVE_VERIFICATION_v0.7.0.md#open-follow-ups) +[`LIVE_VERIFICATION_v0.7.0.md`](LIVE_VERIFICATION_v0.7.0.md#open-follow-ups-not-blocking-v070) (transient overlay swallowed the arrow-forward click). **Two extra artifact file names worth searching for in the out dir** when the diff --git a/docs/USAGE.md b/docs/USAGE.md index 846f9c3a2..f61ff46eb 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -923,7 +923,7 @@ All prompts in a batch share one Flow project. The editor is opened once and sta - `MAX_BATCH_PROMPTS = 5` (defined in `src/gflow_cli/image_batch.py`). To raise, edit the constant. -### Exit codes +### Batch exit codes - `0` — all rows succeeded. - `1` — invalid manifest (file not found, parse error, unknown aspect/model). @@ -1142,7 +1142,7 @@ gflow video i2v ./hero.png "Slow camera arc, soft golden light" Local frame files follow the [`gflow image upload`](#gflow-image-upload) rules (header check, 20 MB cap), and a UUID must be catalogued in the same `--project` (exit 36 otherwise, see -[exit codes](#exit-codes-1)). Start+end submits were measured with Veo 3.1 Fast and Lite, and with +[exit codes](#exit-codes)). Start+end submits were measured with Veo 3.1 Fast and Lite, and with Omni 1.2 (which accepts at most 10 s with an end frame); Veo 3.1 Quality uses the same key family as Fast but was not run live (#1594). Whether the two frames must share an aspect ratio has not been measured (#1603). diff --git a/scripts/ci/generate_website_docs.py b/scripts/ci/generate_website_docs.py index c50581cb5..cc5138863 100644 --- a/scripts/ci/generate_website_docs.py +++ b/scripts/ci/generate_website_docs.py @@ -11,20 +11,32 @@ ``check_website_docs_pii.py``: this produces clean output, that proves it clean. Keep the two in sync. +Relative links are resolved against the canonical file: a link to a published page becomes +a site-relative path, and a link to any other repository file or directory becomes an absolute +GitHub URL on ``develop``, the default branch. ``--check`` reports, as ``UNRESOLVED-LINK``, any +published page that still holds a relative link resolving to no published file. + Usage: python scripts/ci/generate_website_docs.py # write the mirror - python scripts/ci/generate_website_docs.py --check # CI: fail on any drift + python scripts/ci/generate_website_docs.py --check # CI: check drift, orphans, links """ from __future__ import annotations +import bisect +import html +import os +import posixpath import re import sys +from collections.abc import Iterator from pathlib import Path +from urllib.parse import quote, unquote, urlsplit _REPO = Path(__file__).resolve().parents[2] _DOCS = _REPO / "docs" _WEB = _REPO / "website" / "docs" +_GITHUB_REPO = "https://github.com/ffroliva/gflow-cli" # Pages authored directly for the site (nav landing/onboarding) — NOT mirrors of # canonical, so never regenerated or diffed. `index.md` has a canonical namesake @@ -59,17 +71,6 @@ # maintainer's email in SECURITY's reporting table becomes actionable GitHub # private-reporting steps, not a placeholder address. FILE_OVERRIDES: dict[str, tuple[tuple[str, str], ...]] = { - # The RPC catalog is a contributor reference and is not mirrored; link it on GitHub. - "E2E_TESTING.md": ( - ( - "](FLOW_WIRE_RPCS.md)", - "](https://github.com/ffroliva/gflow-cli/blob/main/docs/FLOW_WIRE_RPCS.md)", - ), - ( - "](superpowers/spikes/", - "](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/", - ), - ), # The privacy notice must name its controller; the site names the public handle, not # the private name the token pass would otherwise mangle into "your.name Oliva". "TELEMETRY.md": ( @@ -114,51 +115,286 @@ def _source_for(dest_name: str) -> Path | None: return None -_GITHUB_DOCS_BLOB = "https://github.com/ffroliva/gflow-cli/blob/main/docs/" +_MD_UNESCAPE = re.compile( + r"\\([!\"#$%&'()*+,\-./:;<=>?@\[\\\]^_`{|}~])" + r"|(&(?:#[0-9]{1,7}|#[xX][0-9a-fA-F]{1,6}|[A-Za-z][A-Za-z0-9]{1,31});)" +) + + +def _unescape_md(value: str) -> str: + return _MD_UNESCAPE.sub( + lambda m: m[1] if m[1] is not None else html.unescape(m[2]), + value, + ) + + +_FENCE = re.compile(r"^[ \t>]*(`{3,}|~{3,})") +# A fence opens only on a header superfences accepts; a header it rejects is text, and reading +# one differently shifts how the fences after it pair. Its two passes, ported: the header shape +# (RE_NESTED_FENCE_START), a language and then {attrs} or options each ending at a space or the +# end of the line, and then each option read again (RE_OPTIONS) and checked against the three +# the site's highlighter accepts. Text between options that is not one is ignored. Like the +# superfences regex it ports, rejecting a header of many quoted options takes exponential time; +# the renderer takes as long, so the site build stalls on such a page before this check does. +_FENCE_INFO = re.compile( + r"[ \t]*(?:\.?[\w#.+-]+(?=[ \t]|$))?(?:[ \t]*\{[^\n]*\}|(?P(?:[ \t]*" + r"[a-zA-Z][a-zA-Z0-9_]*(?:=([\"']).*?\2)?(?=[ \t]|$))+))?[ \t]*" +) +_OPTION = re.compile(r"([a-zA-Z][a-zA-Z0-9_]*)(?:=([\"'])(.*?)\2)?") +# A bare option takes its own name as its value; title takes any value, linenums is checked by +# prefix only. +_OPTION_VALUE = { + "title": re.compile(""), + "hl_lines": re.compile(r"\d+(?:-\d+)?(?:[ \t]+\d+(?:-\d+)?)*$"), + "linenums": re.compile(r"\d"), +} +# A code span on one line, not opened by an escaped backtick: a stray backtick in a table row or +# a heading must not swallow the lines after it. A multi-line span is scanned as prose (loudly). +_CODE_SPAN = re.compile(r"(?\n]*)>"), + re.compile(r"\]\([ \t]*((?:[^\s()\\]|\\.|\((?:[^\s()]|\([^\s()]*\))*\))+)"), +) +_INLINE_CLOSE = re.compile(r"[ \t]*\)") +# Any whitespace before the title, but no blank line (spaces and tabs only): it ends the paragraph. +_TITLE_OPEN = re.compile(r"(?:[^\S\r\n]|(?:\r\n?|\n)(?![ \t]*(?:[\r\n]|$)))+([\"'])") +# A title ends at the first closing quote on its line followed by ")", so it may hold quotes and +# ")". Every such end is found once and bisected: a lazy title regex would rescan the rest of +# its line once per "](", which is quadratic on a line of unclosed titles. +_TITLE_END = re.compile(r"([\"'])[ \t]*\)") +# A definition ends at its optional title; text after the destination makes the line prose. +_REF_DEF = re.compile( + r"^[ \t>]*\[[^\]\n]+\]:[ \t]*(?:<([^<>\n]*)>|(\S+))" + # Titles are greedy, as Python-Markdown reads them: "a "b" c" and (see (x)) are one title. + r"(?:[ \t]+(?:\"[^\n]*\"|'[^\n]*'|\([^\n]*\)))?[ \t]*$", + re.MULTILINE, +) +_SCHEME = re.compile(r"[A-Za-z][A-Za-z0-9+.-]*:") +# Served with an image type from raw/; SVG is left out because GitHub serves it as plain text. +_RAW_IMAGES = frozenset({".png", ".jpg", ".jpeg", ".gif", ".webp"}) + +def _blank(m: re.Match[str]) -> str: + return " " * len(m[0]) -def _rewrite_root_doc_links(text: str) -> str: - """Repo-root canonical files (KNOWN_ISSUES.md) link sibling docs as - ``docs/X.md``; mirrored into ``website/docs/`` that resolves to a - nonexistent ``docs/docs/`` path (#507). Targets that are themselves - mirrored become sibling-relative links; everything else (release - evidence, recon specs, plans — deliberately unpublished) becomes an - absolute GitHub link so the published page never 404s.""" - def repl(match: re.Match[str]) -> str: - target = match.group(1) - path_part = target.split("#", 1)[0] - if "/" not in path_part and (_WEB / path_part).is_file(): - return f"]({target})" - return f"]({_GITHUB_DOCS_BLOB}{target})" +def _blank_comments(text: str) -> str: + # str.find, not a lazy regex: an unclosed "", start + 4)) != -1: + out += [text[i:start], " " * (end + 3 - start)] + i = end + 3 + return "".join(out) + text[i:] - return re.sub(r"\]\(docs/([^)]+)\)", repl, text) + +def _mask(text: str) -> str: + """Blank fenced code, HTML comments and code spans in place, so offsets still index ``text``. + + shortcut: matches what the docs use, not full Markdown. Indented code, admonition bodies, + multi-line code spans, a code span opened after an escaped backslash or holding another + backtick run, unused or malformed reference definitions, raw HTML blocks, an escaped ``\\[`` + and a ``](`` in prose with no link text are scanned as links, so a link-shaped example there + is rewritten or fails ``--check`` loudly. Missed without a warning: a link whose ``](`` and + destination sit on two lines, parentheses nested three deep, a destination with an + unbracketed space, a link between an inline ```` (an empty comment to the renderer) and + a later ``-->``, a link after a ```\n", ["FOO.md"]), + ("\n[L](FOO.md)\n", ["FOO.md"]), + # Text after a comment that closes mid-line is not a reference definition. + ("Text [r]: missing.md\n[s]: FOO.md\n", ["FOO.md"]), + ("> [r]: FOO.md\n", ["FOO.md"]), + ("[Abs](/site/page.md) [L](FOO.md)\n", ["FOO.md"]), + ("[Enc](/site/page.md) [L](FOO.md)\n", ["FOO.md"]), + ("[M](mailto:a@example.com) [L](FOO.md)\n", ["FOO.md"]), + # Two levels of balanced parentheses stay in the destination. + ("[L](a(b(c)).md)\n", ["a(b(c)).md"]), + # A link-shaped title of a reference definition is not a second link. + ('[g]: FOO.md "See [d](missing.md)"\n', ["FOO.md"]), + # Text after the destination makes the line prose, so its inline link is scanned. + ("Text\n[g]: FOO.md [d](bar.md)\n", ["bar.md"]), + ("[r]: FOO.md and [Broken](missing.md)\n", ["missing.md"]), + # Titles are greedy, as the renderer reads them: each line below is one definition. + ("[a]: A.md 'it's'\n", ["A.md"]), + ('[a]: A.md "a "b" c"\n', ["A.md"]), + ("[a]: A.md (see (x))\n", ["A.md"]), + ("[a]: A.md (see [d](B.md))\n", ["A.md"]), + ('[a]: A.md "t" \n', ["A.md"]), + # An inline title ends at the first quote followed by ")", as the renderer reads it. + ('x [l](A.md "a "b" c") y\n', ["A.md"]), + ('[l](A.md "a) b") [m](B.md)\n', ["A.md", "B.md"]), + ('[l](A.md "t") and [m](B.md "u")\n', ["A.md", "B.md"]), + # A title of any length is consumed whole, on its own line or the next. + ('[l](A.md "' + "a" * 300 + ' See [m](missing.md)")\n', ["A.md"]), + ('[l](A.md\n"t [m](missing.md)") x\n', ["A.md"]), + ("[l](A.md \"\") [m](B.md 'it's')\n", ["A.md", "B.md"]), + # A title ends only at its own quote on its own line. + ('[l](A.md "t\') [m](B.md) x")\n', ["A.md"]), + # The opening quote never closes its own title (an unterminated title; see _mask). + ('[l](A.md ") [m](B.md)\n', ["B.md"]), + ('[l](A.md "t\n\nu") [m](B.md)\n', ["B.md"]), + # A blank line before the title ends the paragraph, so the quoted text is prose. + ('[l](A.md\n\n"t [m](B.md)")\n', ["B.md"]), + ('[l](A.md\n \n"t [m](B.md)")\n', ["B.md"]), + ('[l](A.md \t\n\t"t [m](B.md)")\n', ["A.md"]), + ('[l](A.md\r\n\r\n"t [m](B.md)")\r\n', ["B.md"]), + # Any whitespace may precede the title, and a line of NBSP is not blank. + ('[l](A.md\xa0"t [m](B.md)")\n', ["A.md"]), + ('[l](A.md\x0c"t [m](B.md)")\n', ["A.md"]), + ('[l](A.md\n\xa0\n"t [m](B.md)")\n', ["A.md"]), + ], +) +def test_masking_keeps_links_outside_code_and_comments(source: str, expected: list[str]) -> None: + assert [t for _, _, t in _gen._relative_links(source)] == expected + + +def test_a_link_outside_the_repository_is_left_as_written( + tmp_path: Path, monkeypatch: pytest.MonkeyPatch +) -> None: + repo = tmp_path / "repo" + docs = repo / "docs" + web = repo / "website" / "docs" + docs.mkdir(parents=True) + web.mkdir(parents=True) + (tmp_path / "outside.md").touch() + monkeypatch.setattr(_gen, "_REPO", repo) + monkeypatch.setattr(_gen, "_DOCS", docs) + monkeypatch.setattr(_gen, "_WEB", web) + + assert _gen.render("SYNTHETIC.md", "[O](../../outside.md)\n") == "[O](../../outside.md)\n" + + +@pytest.mark.parametrize( + ("source", "expected"), + [ + # A backtick fence whose info string holds a backtick is a code span line, not a fence. + ("``` `x` [L](FOO.md)\n[M](BAR.md)\n", ["FOO.md", "BAR.md"]), + # A fence line with an info string does not close an open fence. + ("```\n```py\n[X](missing.md)\n```\n[L](FOO.md)\n", ["FOO.md"]), + # A tilde fence does not close a backtick fence. + ("```\n~~~\n[X](missing.md)\n```\n[L](FOO.md)\n", ["FOO.md"]), + # The renderer shows an unclosed fence as text, so it masks nothing. + ("```\n[L](FOO.md)\n", ["FOO.md"]), + ("\n[L](FOO.md)\n", ["FOO.md"]), + # Closed after the comment, superfences renders it as code, so the link inside is code. + ("\n[X](missing.md)\n```\n\n[L](FOO.md)\n", ["FOO.md"]), + ("```\n[X](missing.md)\n```\n```\n[L](FOO.md)\n", ["FOO.md"]), + ("```[L](FOO.md)\n", ["FOO.md"]), + # Measured on the site's renderer: a fence closes only on the same marker at the same + # length, and after one that never closes, no later line opens a fence. + ("```\n~~~\n[X](B.md)\n~~~\n[L](A.md)\n", ["B.md", "A.md"]), + ("```\n[X](B.md)\n````\n\n[L](A.md)\n", ["B.md", "A.md"]), + ("~~~~\n[X](B.md)\n~~~~~\n\n[L](A.md)\n", ["B.md", "A.md"]), + ("````\n[X](B.md)\n```\n````\n\n[L](A.md)\n", ["A.md"]), + ("``` `x` [L](A.md)\n\n```\n[M](B.md)\n```\n\n[N](C.md)\n", ["A.md", "C.md"]), + ("```\n[X](B.md)\n```\n\n```\n[Y](C.md)\n\n[L](A.md)\n", ["C.md", "A.md"]), + ("> ```\n> [X](B.md)\n> ```\n\n[L](A.md)\n", ["A.md"]), + # A closer sits no deeper in a blockquote than its opener. + ( + "```markdown\n> ```python\n> x\n> ```\n```\n\n[a](mid.md)\n\n" + "```bash\nls\n```\n[b](A.md)\n", + ["mid.md", "A.md"], + ), + ("```\n[X](B.md)\n> ```\n\n[L](A.md)\n", ["B.md", "A.md"]), + # A deeper quote abandons a fence; a shallower one continues it until a blank line, and a + # line holding only spaces after the prefix is content, not a blank line. + ("> ~~~\n>> [X](B.md)\n> ~~~\n\n[L](A.md)\n", ["B.md", "A.md"]), + (">> ~~~\n> [X](B.md)\n>> ~~~\n\n[L](A.md)\n", ["A.md"]), + (">> ~~~\n>\n> [X](B.md)\n>> ~~~\n\n[L](A.md)\n", ["B.md", "A.md"]), + (">> ~~~\n>> \n> [X](B.md)\n>> ~~~\n\n[L](A.md)\n", ["A.md"]), + (">> ~~~\n>\n>> y\n> [X](B.md)\n>> ~~~\n\n[L](A.md)\n", ["A.md"]), + # Python-Markdown empties a line of spaces before superfences runs, so it is a blank line. + (">> ~~~\n \n> [X](B.md)\n>> ~~~\n\n[L](A.md)\n", ["B.md", "A.md"]), + # Lines split at "\n", "\r\n" and a bare "\r", as Markdown splits them; a form feed is text. + ("~~~\nfoo\x0c~~~\n[x](B.md)\n~~~\n\n[r](A.md)\n", ["A.md"]), + ("~~~\nfoo\r~~~\n[x](B.md)\n~~~\n\n[r](A.md)\n", ["B.md", "A.md"]), + ("~~~\n[x](B.md)\r~~~\n\n[r](A.md)\n", ["A.md"]), + # Outside a quote, a line of other whitespace is blank, not a shorter prefix. + (" ~~~\n\x0b\n [x](B.md)\n ~~~\n\n[r](A.md)\n", ["A.md"]), + # Prefixes are measured in columns after tabs expand to stops of four, as Markdown does. + ("> ~~~\n>\t[x](B.md)\n> ~~~\n\n[L](A.md)\n", ["A.md"]), + (">\t~~~\n> [x](B.md)\n> ~~~\n\n[L](A.md)\n", ["A.md"]), + (" ~~~\n\t[x](B.md)\n ~~~\n\n[L](A.md)\n", ["A.md"]), + # A prefix one column shorter than the opener's abandons the fence, quoted or not. + ("> ~~~\n>[X](B.md)\n> ~~~\n\n[L](A.md)\n", ["B.md", "A.md"]), + (" ~~~\n[X](B.md)\n ~~~\n\n[L](A.md)\n", ["B.md", "A.md"]), + # A line with a shorter prefix abandons a quoted fence; it does not close it. + ("> ~~~\n> [X](B.md)\n~~~\n\n[L](A.md)\n", ["B.md", "A.md"]), + # A blank line ends a blockquote only when the next line is not quoted. + ("> ```\n> [in](B.md)\n\n> ```\n[y](A.md)\n", ["A.md"]), + ("> ```\n> [in](B.md)\n \n> ```\n[y](A.md)\n", ["A.md"]), + ("> ```\n> [in](B.md)\n\n\n> ```\n[y](A.md)\n", ["A.md"]), + ("> ```\n> [in](B.md)\n\n> ```\n> [real](A.md)\n> ```\n", ["A.md"]), + # After an unclosed fence, no fence opens in the rest of its quote. + ("> ```\n> ~~~\n> [B](B.md)\n> ~~~\n", ["B.md"]), + ("> ```\n> x\n>\n> ~~~\n> [B](B.md)\n> ~~~\n", ["B.md"]), + # The line that abandons a fence is consumed, never read as an opener. + ( + "> ```\n> ~~~\n> [B](B.md)\n> ~~~\n\n~~~\n[C](C.md)\n~~~\n[D](D.md)\n", + ["B.md", "C.md", "D.md"], + ), + ( + "> ```\n> ~~~\n> [B](B.md)\n> ~~~\n\n~~~\n[C](C.md)\n~~~\n[D](D.md)\n" + "~~~\n[E](E.md)\n~~~\n[F](F.md)\n", + ["B.md", "C.md", "E.md", "F.md"], + ), + # A blockquoted fence that does not close before the quote ends renders as text. + ( + "> ```\n> [X](B.md)\n\n[M](C.md)\n\n```\n[L](A.md)\n```\n[N](D.md)\n", + ["B.md", "C.md", "D.md"], + ), + # A header superfences rejects is text, so a later fence still opens. + ("``` invalid stuff\n\n~~~\n[c](B.md)\n~~~\n\n[r](A.md)\n", ["A.md"]), + ("```py x\n\n~~~\n[c](B.md)\n~~~\n\n[r](A.md)\n", ["A.md"]), + ('```py x="1"\n\n~~~\n[c](B.md)\n~~~\n\n[r](A.md)\n', ["A.md"]), + ("```py{.x}\n\n~~~\n[c](B.md)\n~~~\n\n[r](A.md)\n", ["A.md"]), + # A header it accepts opens a fence that never closes, so the rest renders as text. + ('```py title="a b"\n\n~~~\n[c](B.md)\n~~~\n\n[r](A.md)\n', ["B.md", "A.md"]), + ("```{.py}\n\n~~~\n[c](B.md)\n~~~\n\n[r](A.md)\n", ["B.md", "A.md"]), + ("```c++ hl_lines='1'\n\n~~~\n[c](B.md)\n~~~\n\n[r](A.md)\n", ["B.md", "A.md"]), + # Option values are checked too, and options need no space before them. + ('```py hl_lines="abc"\n\n~~~\n[c](B.md)\n~~~\n\n[r](A.md)\n', ["A.md"]), + ('```py linenums="abc"\n\n~~~\n[c](B.md)\n~~~\n\n[r](A.md)\n', ["A.md"]), + ('```py title="a" b"\n\n~~~\n[c](B.md)\n~~~\n\n[r](A.md)\n', ["A.md"]), + ('```py hl_lines="1 2-3"\n\n~~~\n[c](B.md)\n~~~\n\n[r](A.md)\n', ["B.md", "A.md"]), + ('```title="x"\n\n~~~\n[c](B.md)\n~~~\n\n[r](A.md)\n', ["B.md", "A.md"]), + ('```py title="a"linenums="1"\n\n~~~\n[c](B.md)\n~~~\n\n[r](A.md)\n', ["B.md", "A.md"]), + # Each option ends at a space or the end of the line; a value may run on to a later quote + # that does, and superfences then reads its options again and ignores what is not one. + ('~~~python hl_lines="1"title\n[x](B.md)\n~~~\n\n[r](A.md)\n', ["B.md", "A.md"]), + ("~~~python title=\"a\"title='b'\n[x](B.md)\n~~~\n\n[r](A.md)\n", ["B.md", "A.md"]), + ('~~~python linenums="1"title\n[x](B.md)\n~~~\n\n[r](A.md)\n', ["B.md", "A.md"]), + ('~~~python title="a" - "\n[x](B.md)\n~~~\n\n[r](A.md)\n', ["A.md"]), + ('~~~python title="a" "title"\n[x](B.md)\n~~~\n\n[r](A.md)\n', ["A.md"]), + ("~~~python title='b'\n[x](B.md)\n~~~\n\n[r](A.md)\n", ["A.md"]), + # hl_lines must be whole numbers and ranges, not only start with a digit. + ('~~~python hl_lines="1x"\n[x](B.md)\n~~~\n\n[r](A.md)\n', ["B.md", "A.md"]), + ('~~~python hl_lines="1-2-3"\n[x](B.md)\n~~~\n\n[r](A.md)\n', ["B.md", "A.md"]), + # A repeated option keeps its last value. + ('~~~python hl_lines hl_lines="1"\n[x](B.md)\n~~~\n\n[r](A.md)\n', ["A.md"]), + ('~~~python hl_lines="1" hl_lines\n[x](B.md)\n~~~\n\n[r](A.md)\n', ["B.md", "A.md"]), + # A closing fence may carry trailing spaces or tabs. + ("~~~\n[x](B.md)\n~~~ \n\n[r](A.md)\n", ["A.md"]), + # A bare title takes its own name as its value; bare linenums and hl_lines are refused. + ("~~~python title\n[x](B.md)\n~~~\n\n[r](A.md)\n", ["A.md"]), + ("~~~python linenums\n[x](B.md)\n~~~\n\n[r](A.md)\n", ["B.md", "A.md"]), + ("~~~python hl_lines\n[x](B.md)\n~~~\n\n[r](A.md)\n", ["B.md", "A.md"]), + # linenums is checked by prefix: any value that starts with a digit opens the fence. + ('~~~python linenums="2 "\n[x](B.md)\n~~~\n\n[r](A.md)\n', ["A.md"]), + ('~~~python linenums="2-3"\n[x](B.md)\n~~~\n\n[r](A.md)\n', ["A.md"]), + ('~~~python linenums=" 2"\n[x](B.md)\n~~~\n\n[r](A.md)\n', ["B.md", "A.md"]), + ], +) +def test_fence_opening_and_closing_rules(source: str, expected: list[str]) -> None: + assert [t for _, _, t in _gen._relative_links(source)] == expected + + +def test_many_unclosed_fences_do_not_exhaust_the_stack() -> None: + assert list(_gen._relative_links("```x\n" * 3000 + "[L](FOO.md)\n"))[0][2] == "FOO.md" + + +@pytest.mark.parametrize( + "source", + [ + # A lazy "" regex rescans to the end once per opener: about 10 s. + "\n[ok](MY%20PAGE.md)\n[bad](missing.md)\n", encoding="utf-8" + ) + assert list(_gen._unresolved_relative_links()) == [ + "UNRESOLVED-LINK: website/docs/GUIDE.md:5: missing.md" + ] diff --git a/website/docs/ACCOUNT_SAFETY.md b/website/docs/ACCOUNT_SAFETY.md index f13718d31..4fedabba3 100644 --- a/website/docs/ACCOUNT_SAFETY.md +++ b/website/docs/ACCOUNT_SAFETY.md @@ -10,7 +10,7 @@ > five files, so a reasonable person could not find it before deciding to install > ([#602](https://github.com/ffroliva/gflow-cli/issues/602)). -Read [DISCLAIMER.md](../DISCLAIMER.md) first — it is the legal statement. This +Read [DISCLAIMER.md](https://github.com/ffroliva/gflow-cli/blob/develop/DISCLAIMER.md) first — it is the legal statement. This page is the operational one. ## Two different things people mean by "will I get banned?" @@ -30,7 +30,7 @@ evidence of absence, and Google's terms are Google's to enforce. The cost model matters too: **credits are only spent on Veo video.** Images and composition operations bill against a per-model daily quota rather than credits, so most failure modes cost you nothing but time — see the cost note in the -[README](../README.md#why-gflow-cli). +[README](https://github.com/ffroliva/gflow-cli/blob/develop/README.md#why-gflow-cli). ## What gflow-cli does to stay unremarkable @@ -46,7 +46,7 @@ headed, except `video extend` on flow.google.com, the page fallback of `media tr `media restore`, the video download-menu upscales (4K unmeasured), image-to-image from one local `--ref` file in an existing project on an otherwise direct request, a credit-capped text-to-video of an explicit measured key, reference-to-video from one local image, and a `movie run` with no characters and no instruction cards, which run headless under `auto` (`GFLOW_CLI_TRANSPORT=ui_automation` keeps them headed); `GFLOW_CLI_BROWSER_VISIBILITY=headed` shows the window for every command. The per-command list is in [BROWSER_MODES](BROWSER_MODES.md). The headless mint was measured as accepted on two accounts on Windows -([spike](superpowers/spikes/2026-11-27-direct-video-and-headless-mint.md)); macOS, +([spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-11-27-direct-video-and-headless-mint.md)); macOS, Linux and accounts Flow serves on labs.google are unmeasured. **Except credit reads.** On Windows and Linux, `gflow credits` and `gflow_get_credits` send diff --git a/website/docs/ARCHITECTURE.md b/website/docs/ARCHITECTURE.md index 34c492dbd..eed204918 100644 --- a/website/docs/ARCHITECTURE.md +++ b/website/docs/ARCHITECTURE.md @@ -1,6 +1,6 @@ # Architecture -This document is the steady-state reference for how `gflow-cli` is organised. The intent and sequencing live in [PLAN.md](../PLAN.md) — this file describes the **shape** that PLAN converges on. +This document is the steady-state reference for how `gflow-cli` is organised. The intent and sequencing live in [PLAN.md](https://github.com/ffroliva/gflow-cli/blob/develop/PLAN.md) — this file describes the **shape** that PLAN converges on. ## Layers @@ -72,7 +72,7 @@ The hexagonal target above is the steady state. The **current** package — and **Phase 4 does NOT:** - Restructure existing modules beyond minimal dedup (shared CLI helpers were promoted to `gflow_cli._cli_helpers` at the package top level — kept flat to avoid a `cli.py` file / `cli/` package collision). -- Introduce dependency-injection containers, command/query buses, or any DDD/CQRS scaffolding (deferred per [PLAN ADR #2](../PLAN.md#5-decision-log-adrs-in-miniature)). +- Introduce dependency-injection containers, command/query buses, or any DDD/CQRS scaffolding (deferred per [PLAN ADR #2](https://github.com/ffroliva/gflow-cli/blob/develop/PLAN.md#5-decision-log-adrs-in-miniature)). **v0.6.0a2 module additions — auth strategy package:** @@ -120,8 +120,8 @@ When the project converges on the hexagonal target above, modules graduate to la ## Folder layout > **Note: this document describes the TARGET architecture, not the current -> package layout.** The current shape (per [PLAN.md § 2](../PLAN.md#2-architecture-steady-state) -> and [ADR #2](../PLAN.md#5-decision-log-adrs-in-miniature)) is the simpler +> package layout.** The current shape (per [PLAN.md § 2](https://github.com/ffroliva/gflow-cli/blob/develop/PLAN.md#2-architecture-steady-state) +> and [ADR #2](https://github.com/ffroliva/gflow-cli/blob/develop/PLAN.md#5-decision-log-adrs-in-miniature)) is the simpler > `src/gflow_cli/{_errors/, api/, auth/, data/, flow_selectors/, mcp/, services/, tools/, > ui/, worker/}` packages plus flat modules — the `cli*.py` adapters, `_cli_helpers.py`, > `_win_owner_only.py`, `browser_manager.py`, `chain*.py`, `composition.py`, `config.py`, @@ -326,7 +326,7 @@ Process-boundary contextvars bind once: `correlation_id` (UUID4 per CLI invocati Format defaults to **human-readable on TTY**, **JSON when piped or `GFLOW_CLI_LOG_FORMAT=json`**. JSON exceptions use `structlog.tracebacks.ExceptionDictTransformer(show_locals=False)` so frame locals (which may contain auth cookies and signed URLs) are never serialized. TEXT exceptions are formatted by `ConsoleRenderer` with `structlog.dev.plain_traceback`, which omits frame locals; its default Rich formatter would print them. -Pipes cleanly into `jq` / Loki / Datadog without configuration. See [`docs/USER_GUIDE.md` § Journey 6](USER_GUIDE.md#journey-6-read-the-structured-logs) for `jq` recipes. +Pipes cleanly into `jq` / Loki / Datadog without configuration. See [`docs/USER_GUIDE.md` § Journey 6](USER_GUIDE.md#journey-6-reading-structured-logs-jq-recipes) for `jq` recipes. ## Incident diagnostics (shipped, v0.43.0) @@ -421,8 +421,8 @@ The dependency direction is inviolate. Everything else is preference, not religi ## See also -- [PLAN.md](../PLAN.md) — phasing, exit criteria, ADRs -- [CONTRIBUTING.md](../CONTRIBUTING.md) — TDD discipline, test categories +- [PLAN.md](https://github.com/ffroliva/gflow-cli/blob/develop/PLAN.md) — phasing, exit criteria, ADRs +- [CONTRIBUTING.md](https://github.com/ffroliva/gflow-cli/blob/develop/CONTRIBUTING.md) — TDD discipline, test categories - [AUTHENTICATION.md](AUTHENTICATION.md) — full auth flow lifecycle --- @@ -454,7 +454,7 @@ The dependency direction is inviolate. Everything else is preference, not religi aisandbox-pa.googleapis.com (Google's private Flow API) ``` -The `Provider` interface keeps backends interchangeable. v0.1 shipped `FlowProvider`. Google's separately billed Gemini / Vertex AI generation APIs are out of scope ([ROADMAP](../ROADMAP.md#out-of-scope)). +The `Provider` interface keeps backends interchangeable. v0.1 shipped `FlowProvider`. Google's separately billed Gemini / Vertex AI generation APIs are out of scope ([ROADMAP](https://github.com/ffroliva/gflow-cli/blob/develop/ROADMAP.md#out-of-scope)). ## Auth strategy @@ -505,7 +505,7 @@ used only where it is strictly necessary. reCAPTCHA Enterprise token, and the request goes to Flow over direct HTTP. A refusal Flow reports as `PUBLIC_ERROR_UNUSUAL_ACTIVITY`, which is not billed, is retried once from a new headless browser process ([KNOWN_ISSUES](KNOWN_ISSUES.md)). The evidence is - [the direct video and headless mint spike](superpowers/spikes/2026-11-27-direct-video-and-headless-mint.md): + [the direct video and headless mint spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-11-27-direct-video-and-headless-mint.md): 15/15 headless cold mints accepted on two accounts (30/30 counting both visibilities), and headless and headed video submits accepted 6/6 each on fresh browsers. - **Video extend on flow.google.com drives Flow's page headless.** It is a UI surface, but a @@ -561,7 +561,7 @@ shell carries no `at`. Caveats and controls: Until v0.108.0 every generation drove Flow's page in a headed Chrome window: reCAPTCHA Enterprise rejected the earlier headless approaches, and the UI transport was the only path that produced a video. v0.108.0 measured a headless mint as accepted and moved the measured request -shapes to direct HTTP ([spike](superpowers/spikes/2026-11-27-direct-video-and-headless-mint.md), +shapes to direct HTTP ([spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-11-27-direct-video-and-headless-mint.md), [#1371](https://github.com/ffroliva/gflow-cli/issues/1371)). This section records the earlier design and why it was chosen; it does not describe the current product. diff --git a/website/docs/BROWSER_MODES.md b/website/docs/BROWSER_MODES.md index b8dd87133..bd07346a1 100644 --- a/website/docs/BROWSER_MODES.md +++ b/website/docs/BROWSER_MODES.md @@ -6,7 +6,7 @@ reCAPTCHA token. The request itself goes to Flow over direct HTTP. Surfaces that Flow's own interface open a **headed** (visible) Chrome window. Local commands open no browser. This page is the single source of the per-command list. The wire details of the direct path are -in [DIRECT_TRANSPORT](DIRECT_TRANSPORT.md); the settings are in +in [DIRECT_TRANSPORT](https://github.com/ffroliva/gflow-cli/blob/develop/docs/DIRECT_TRANSPORT.md); the settings are in [CONFIGURATION](CONFIGURATION.md#gflow_cli_browser_visibility). All rows below describe the default, `GFLOW_CLI_BROWSER_VISIBILITY=auto`. @@ -44,7 +44,7 @@ browser has been measured, so `auto` runs them headless. | `video upscale --scale 4k` | headless on `flow.google.com` (not measured) | Ultra only, so not measured: it follows the measured video download-menu path by an explicit decision ([#1554](https://github.com/ffroliva/gflow-cli/issues/1554)). It spends credits on the click, and a failure after the click is never retried. `--browser-visibility headed` shows the window | | `video t2v --max-credits` | headless when only the cap needs the UI | A capped text-to-video whose uncapped request is an explicit measured key (for example `--model omni-1.2-flash --duration 4 --resolution 360p`; with no `--model` the key is the account's selection and it stays headed) reads Flow's quote in a headless browser: it reached the submit 2/2 headless matching a headed control with the submit aborted, and billed headless runs of that key on one account completed at the quoted 4 credits (3/3), and the other measured keys follow it by decision; an account that refused it headless refused the headed control too ([#1554](https://github.com/ffroliva/gflow-cli/issues/1554)). A capped video of any other shape and a capped image-to-video stay headed; a capped reference-to-video follows the `video r2v --ref` row. `GFLOW_CLI_TRANSPORT=ui_automation` keeps it headed | | `video r2v --ref` | headless with one local image | A reference-to-video from exactly one local image (no saved asset, character, voice or `@` mention, one output) drives Flow's composer in a headless browser: it reached the submit 2/2 headless matching a headed control with the submit aborted, and a billed headless run (Omni 1.2 Flash, 4 s, 360p) completed at the quoted 4 credits; other models and durations follow it by decision, and a configured proxy is unmeasured ([#1554](https://github.com/ffroliva/gflow-cli/issues/1554)). An MCP reference given as a catalogued asset id resolves to its local file and counts as that file. An explicit `GFLOW_CLI_FLOW_HOST=labs.google` or `GFLOW_CLI_TRANSPORT=ui_automation` keeps it headed | -| `movie run` | headless for a plain movie | A manifest with no characters and no instruction cards drives each scene, on any model, through Flow's composer in a headless browser, and the retry loop's UI fallback keeps that browser: a billed one-scene headless run (Omni 1.2 Flash, 4 s) completed at 4 credits, and the e2e completed headless ([#1554](https://github.com/ffroliva/gflow-cli/issues/1554), [spike](superpowers/spikes/2026-11-30-headless-movie-and-agent-only.md)). Characters or instruction cards keep the whole run headed; an explicit `GFLOW_CLI_FLOW_HOST=labs.google` or `GFLOW_CLI_TRANSPORT=ui_automation` keeps it headed | +| `movie run` | headless for a plain movie | A manifest with no characters and no instruction cards drives each scene, on any model, through Flow's composer in a headless browser, and the retry loop's UI fallback keeps that browser: a billed one-scene headless run (Omni 1.2 Flash, 4 s) completed at 4 credits, and the e2e completed headless ([#1554](https://github.com/ffroliva/gflow-cli/issues/1554), [spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-11-30-headless-movie-and-agent-only.md)). Characters or instruction cards keep the whole run headed; an explicit `GFLOW_CLI_FLOW_HOST=labs.google` or `GFLOW_CLI_TRANSPORT=ui_automation` keeps it headed | ## Headed (Flow's UI) @@ -54,7 +54,7 @@ browser has been measured, so `auto` runs them headless. | `image batch` | headed | The stay-mounted UI batch drives the composer; on an account served flow.google.com, gflow cannot drive it yet in either mode (exit 36, [#639](https://github.com/ffroliva/gflow-cli/issues/639)), so headless is unmeasured | | `image upscale --scale 2k` | headed | Headless was refused on one of two accounts while headed passed: after a day of runs, `SPrCad` answered `PUBLIC_ERROR_UNUSUAL_ACTIVITY` to three headless 2K upscales and accepted the headed one (unbilled); the other account passed both ([#1554](https://github.com/ffroliva/gflow-cli/issues/1554)). `--scale 4k` (Ultra) follows the same path and stays headed | | `movie run` (with characters or instruction cards) | headed | Characters are created or attached and instruction cards are synced in Flow's UI, which is not measured headless; scene requests carry no resolution, so no scene goes direct | -| agent-only composer | the command's own launch (unmeasured) | gflow recognises the agent-only composer ([#799](https://github.com/ffroliva/gflow-cli/issues/799)) only after the page loads, so it runs in the browser the command launched: headed for most UI commands, headless for a measured headless surface such as a plain `movie run`. No account available was served it, so headless on it is unmeasured ([spike](superpowers/spikes/2026-11-30-headless-movie-and-agent-only.md)). `--browser-visibility headed` shows the window | +| agent-only composer | the command's own launch (unmeasured) | gflow recognises the agent-only composer ([#799](https://github.com/ffroliva/gflow-cli/issues/799)) only after the page loads, so it runs in the browser the command launched: headed for most UI commands, headless for a measured headless surface such as a plain `movie run`. No account available was served it, so headless on it is unmeasured ([spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-11-30-headless-movie-and-agent-only.md)). `--browser-visibility headed` shows the window | | `video r2v` (other shapes) | headed | Two or more references, a saved asset, a character, an `@` mention, more than one output or `--ui-mode agentic` is not measured headless; reference-to-video is not measured over direct HTTP | | `video edit` | headed | On an account served flow.google.com, editing an existing clip by media id exits 23 in either mode ([#1605](https://github.com/ffroliva/gflow-cli/issues/1605)); a local clip reached the checked `jIps6` request in a $0 e2e with the submit aborted (2026-12-01); headless is unmeasured | | `video i2v --end-frame` | headed | An end frame, or a start frame that is already in the project, is not a measured shape. A billed headless run was refused as unusual activity (unbilled) while the headed control completed ([#1554](https://github.com/ffroliva/gflow-cli/issues/1554)) | @@ -167,5 +167,5 @@ below (the in-flight count, the start history, the armed page) carries from one `GFLOW_CLI_HEADLESS=true`) also runs the other Flow UI shapes headless at the user's choice; this is unsupported, see [#1554](https://github.com/ffroliva/gflow-cli/issues/1554). -Evidence: [the direct video and headless mint spike](superpowers/spikes/2026-11-27-direct-video-and-headless-mint.md) +Evidence: [the direct video and headless mint spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-11-27-direct-video-and-headless-mint.md) ([#1371](https://github.com/ffroliva/gflow-cli/issues/1371)). diff --git a/website/docs/CHARACTER.md b/website/docs/CHARACTER.md index 91a1526c3..48c6173ab 100644 --- a/website/docs/CHARACTER.md +++ b/website/docs/CHARACTER.md @@ -2,15 +2,15 @@ > **Status:** SHIPPED (live-verified 2026-06-02) · **Issue:** [#145](https://github.com/ffroliva/gflow-cli/issues/145) · **Branch:** `feature/character-creation` > **Living document.** Evolve this as the feature and Flow's API evolve. Raw capture provenance lives in -> [`CHARACTER_RECON.md`](CHARACTER_RECON.md); the cross-feature decision lens is -> [the REST-path capability matrix](#capability-cost). +> [`CHARACTER_RECON.md`](https://github.com/ffroliva/gflow-cli/blob/develop/docs/CHARACTER_RECON.md); the cross-feature decision lens is +> [the REST-path capability matrix](#3-capability-cost). > **Credit:** pattern-references @kittinan's avatar PR #123 (attach-flow idiom + CLI scaffolding shape) — but > built **greenfield off `develop`, NOT stacked on #123** (that branch is CONFLICTING and likeness-specific; > see [Design decisions](#11-design-decisions-post-predict)). > **Shipped scope:** `gflow character create` + `list` + `show` + `voices` + `rm`. Name-based reuse via > `@Name` prompt mentions is **shipped** (v0.40.0, [#344](https://github.com/ffroliva/gflow-cli/issues/344)) -> for both `image` and `video` paths — see [REFERENCE_STRATEGIES](REFERENCE_STRATEGIES.md). An explicit +> for both `image` and `video` paths — see [REFERENCE_STRATEGIES](https://github.com/ffroliva/gflow-cli/blob/develop/docs/REFERENCE_STRATEGIES.md). An explicit > `--character ` **flag** on `gflow video` (a separate, repeatable-ref delivery mechanism) remains > **not yet implemented** — see [Backlog](#14-backlog-not-yet-implemented). @@ -310,7 +310,7 @@ is **shipped** (see the table below). | `gflow video … --character ` *(repeatable → multi-ref, explicit flag)* | **not yet implemented** (Phase 3) — `referenceEntities` on `video:batchAsyncGenerateVideoReferenceImages` | | `gflow character rm` (`--id`/`--name`) | On `flow.google.com`, moves the character to the project's Trash. Restore it from Trash in Flow. On `labs.google`, deletes the character through `flow:batchDeleteAssets`. Neither action spends credits. | | `gflow image … --character ` *(explicit flag)* | id-based reuse **shipped** as `gflow image t2i/i2i --reference-entity ` (wire captured 2026-06-08, `api/image.py`) | -| `@Name` in a t2i/i2i/video prompt | name-based mention resolution **shipped v0.40.0 (#344)** — resolves to the staged character entity, works on both image and video paths (on flow.google.com, video `@Name` works on `r2v` alongside a `--ref` or `--reference-entity`; other video modes on that host refuse character references before submit, exit 36); see [REFERENCE_STRATEGIES](REFERENCE_STRATEGIES.md) | +| `@Name` in a t2i/i2i/video prompt | name-based mention resolution **shipped v0.40.0 (#344)** — resolves to the staged character entity, works on both image and video paths (on flow.google.com, video `@Name` works on `r2v` alongside a `--ref` or `--reference-entity`; other video modes on that host refuse character references before submit, exit 36); see [REFERENCE_STRATEGIES](https://github.com/ffroliva/gflow-cli/blob/develop/docs/REFERENCE_STRATEGIES.md) | All commands take **`--project ` (required)** — every endpoint (`createEntity`, `projectInitialData`, reuse) is project-scoped; mirrors `gflow scene` / `gflow data` ergonomics. Use `--id`/`--name` flags, never a @@ -344,7 +344,7 @@ never hard-code wire names in user-facing help — see [[cli-model-aliases-verif - **Data layer.** Persist `entityId`, `workflowId`s, `primaryMediaId`s, voice, personality so a character is recoverable and reusable across sessions (mirrors the scene persistence + migration pattern). - **Docs are first-class.** This document is the living spec; update it in the same PR as any behavioural - change. Indexed in [`docs/INDEX.md`](INDEX.md). + change. Indexed in [`docs/INDEX.md`](https://github.com/ffroliva/gflow-cli/blob/develop/docs/INDEX.md). ## 10. Open items @@ -426,7 +426,7 @@ convenience later. > Two of three generative routes accept a `TokenMinter` token. Treat the wall as a **per-route measurement**, > never an inherited assumption — and re-measure before citing it. The `batchGenerateImages` 403 has not been > re-tested since 2026-06-02 and may itself be stale. -> Evidence: [superpowers/spikes/2026-08-31-veo-extend-route-recon.md](superpowers/spikes/2026-08-31-veo-extend-route-recon.md). +> Evidence: [superpowers/spikes/2026-08-31-veo-extend-route-recon.md](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-08-31-veo-extend-route-recon.md). - **✅ Decision = Option B (UI-driven generation; structural ops stay REST).** Generation (character image create AND video reuse) **must** ride Flow's native UI so Flow's JS issues the WAF-valid request, which gflow passive-captures — identical mechanism to the existing `generate_image`/`generate_video`. Revised @@ -573,7 +573,7 @@ The following are explicitly **out of the shipped scope** and tracked for future (`services/mentions.py`), on both image and video paths for character references. The image-path wire shape (`gflow image t2i/i2i --reference-entity `) shipped earlier (live capture 2026-06-08, `api/image.py`; asserted by `_assert_image_entities_attached`). See - [REFERENCE_STRATEGIES](REFERENCE_STRATEGIES.md) for the decision guide across all three mechanisms. + [REFERENCE_STRATEGIES](https://github.com/ffroliva/gflow-cli/blob/develop/docs/REFERENCE_STRATEGIES.md) for the decision guide across all three mechanisms. (`gflow character rm` is now shipped, #150.) - **Set the Flow editor title field** so the editor isn't "Untitled Character" (see [§13.1 Known issues](#131-known-issues)). Investigate either the UI title box (with a Ctrl+A merge-bug workaround) or finding the dedicated title diff --git a/website/docs/CONFIGURATION.md b/website/docs/CONFIGURATION.md index 7b8127ac8..c427f60fd 100644 --- a/website/docs/CONFIGURATION.md +++ b/website/docs/CONFIGURATION.md @@ -624,7 +624,7 @@ per-command `--proxy` flags (the setting covers one-off runs: ### `GFLOW_CLI_FLOW_HOST` -**What:** Which Flow frontend gflow drives. Google has moved Flow from `labs.google/fx/tools/flow` onto `flow.google.com` ([#639](https://github.com/ffroliva/gflow-cli/issues/639)) — measured 2026-09-14, the old labs URL answers **HTTP 308 Permanent Redirect** on every account we tested. The two are the same product (the new frontend's own root element is `aisandbox-root`) on different widget toolkits and different wire protocols, so each has its own driver. Which host you are served does **not** tell you which capabilities work — see [the survey](../docs/superpowers/spikes/2026-09-14-two-domain-protocol-survey.md). +**What:** Which Flow frontend gflow drives. Google has moved Flow from `labs.google/fx/tools/flow` onto `flow.google.com` ([#639](https://github.com/ffroliva/gflow-cli/issues/639)) — measured 2026-09-14, the old labs URL answers **HTTP 308 Permanent Redirect** on every account we tested. The two are the same product (the new frontend's own root element is `aisandbox-root`) on different widget toolkits and different wire protocols, so each has its own driver. Which host you are served does **not** tell you which capabilities work — see [the survey](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-09-14-two-domain-protocol-survey.md). **Values:** - `auto` (default) — **`flow.google.com` is the default host for every video request it can serve today** (`video t2v`, `video i2v` from local files or same-`--project` catalogued image UUIDs (#1542), and local-file `video r2v`; with no `--project` and no `GFLOW_CLI_PROJECT`, one is created first, #864). Image requests use the migrated composer for `image t2i` and local-file `image i2i` where `flow.google.com` is what Flow serves, and stay on labs where labs is. A request the new host cannot serve keeps the labs driver where labs is what Flow serves; where flow.google.com is, there is no labs fallback and unsupported forms exit 36/11 before submit. - `flow.google.com` — force the migrated composer for everything, including what it cannot serve yet (those requests then exit 36/11 instead of falling back). @@ -754,7 +754,7 @@ Variables already set in the actual environment always beat both `.env` files. A An invalid value stops every command except `gflow config` with exit 11 (`ConfigurationError`), on stderr, naming the key as written, its value (masked for a secret), the file or the environment that holds it, and the command that repairs it; `--json` prints one Problem Details object with `key` and `origin`. `gflow config` still runs so the value can be repaired. See [Troubleshooting](#troubleshooting). -Use [`.env.template`](../.env.template) as your starting point: +Use [`.env.template`](https://github.com/ffroliva/gflow-cli/blob/develop/.env.template) as your starting point: ```bash cp .env.template .env diff --git a/website/docs/DATA_LAYER.md b/website/docs/DATA_LAYER.md index 92a6a2750..c70eca451 100644 --- a/website/docs/DATA_LAYER.md +++ b/website/docs/DATA_LAYER.md @@ -38,7 +38,7 @@ The schema is adapter-shaped so a future Postgres backend can slot in without ch | `operation_assets` | Many-to-many between operations and assets, with role (`input`/`output`/`seed_start`/`seed_end`/`reference`) and ordered position | When the operation links its inputs/outputs | | `local_files` | One row per downloaded asset location — local path or cloud URI, sha256/byte count when local, media type, `superseded_at` once a later copy replaced it | After each download/upload completes | -Schema lives in [`src/gflow_cli/data/migrations/0001_initial.sql`](../src/gflow_cli/data/migrations/0001_initial.sql). +Schema lives in [`src/gflow_cli/data/migrations/0001_initial.sql`](https://github.com/ffroliva/gflow-cli/blob/develop/src/gflow_cli/data/migrations/0001_initial.sql). ### Operation `metadata_json` provenance @@ -277,7 +277,7 @@ The hash is always stored so you can correlate without the plaintext. ### Metadata redaction -[`redact_metadata`](../src/gflow_cli/data/redaction.py) is applied to every dict that lands in `assets.metadata_json`. It strips: +[`redact_metadata`](https://github.com/ffroliva/gflow-cli/blob/develop/src/gflow_cli/data/redaction.py) is applied to every dict that lands in `assets.metadata_json`. It strips: | Key (case-insensitive) | Replacement | |---|---| @@ -304,7 +304,7 @@ sharing the raw SQLite file if failed queue payloads must stay confidential. In the default `store` mode, failure rows persist a scrubbed, readable copy of the exception's Problem Details `detail` through -[`redact_error_detail`](../src/gflow_cli/data/redaction.py). Free-text +[`redact_error_detail`](https://github.com/ffroliva/gflow-cli/blob/develop/src/gflow_cli/data/redaction.py). Free-text `Bearer …` / `SAPISIDHASH …` tokens and auth-cookie pairs become ``, flow.google.com's bare `at` XSRF value and `0cAF…` reCAPTCHA tokens become ``, URLs carrying signed-query markers and @@ -505,7 +505,7 @@ Cloud-only assets have `LocalFileRecord.path is None` and carry their object location in `LocalFileRecord.cloud_uri`; path-based seed-image resolution is local-only. -The public read API is `DataRepository` ([`src/gflow_cli/data/repository.py`](../src/gflow_cli/data/repository.py)), whose methods live in the table-group modules `data/_repo_*.py`; all read methods return typed `SeedImage` / `AssetLookup` dataclasses, not raw SQLite rows. +The public read API is `DataRepository` ([`src/gflow_cli/data/repository.py`](https://github.com/ffroliva/gflow-cli/blob/develop/src/gflow_cli/data/repository.py)), whose methods live in the table-group modules `data/_repo_*.py`; all read methods return typed `SeedImage` / `AssetLookup` dataclasses, not raw SQLite rows. --- @@ -525,7 +525,7 @@ See [`CONFIGURATION.md`](CONFIGURATION.md) for the full env-var precedence chain ## Migrations -All schema changes are SQL files under [`src/gflow_cli/data/migrations/`](../src/gflow_cli/data/migrations/), named `NNNN_description.sql` with a 4+ digit zero-padded prefix. +All schema changes are SQL files under [`src/gflow_cli/data/migrations/`](https://github.com/ffroliva/gflow-cli/tree/develop/src/gflow_cli/data/migrations), named `NNNN_description.sql` with a 4+ digit zero-padded prefix. **How they're applied:** @@ -572,7 +572,7 @@ All three errors map to **exit code 16**: All three are subclasses of `GFlowError` and re-exported through `gflow_cli.exceptions`. They follow the project's RFC 9457 Problem Details pattern. -See [`errors.py::EXIT_CODE_MAP`](../src/gflow_cli/errors.py) for the complete exit-code mapping. +See [`errors.py::EXIT_CODE_MAP`](https://github.com/ffroliva/gflow-cli/blob/develop/src/gflow_cli/errors.py) for the complete exit-code mapping. Distinct from the above (which are errors OF the data layer), the `operations.error_type` column stores the taxonomy of RECORDED generation @@ -588,7 +588,7 @@ the transfer failed — recover it with `gflow data download`). Query them with ### Adding a new operation kind -1. Add the enum value to `OperationKind` in [`data/models.py`](../src/gflow_cli/data/models.py). +1. Add the enum value to `OperationKind` in [`data/models.py`](https://github.com/ffroliva/gflow-cli/blob/develop/src/gflow_cli/data/models.py). 2. Add a `record_(...)` method to `OperationRecorder` following the existing patterns (upsert profile → project → asset → insert operation → link → asset location rows). 3. Wire it into the CLI call site, mirroring the `_run_t2i` / `record_completed_video` patterns: open recorder BEFORE Flow, close in `finally`, wrap the `record_*` call in `try/except DataStoreError` calling `_warn_persistence_failed_after_success(...)`. @@ -641,7 +641,7 @@ Live tests (`@pytest.mark.live`) and E2E tests (`@pytest.mark.e2e`) are opt-in a - **Postgres / Supabase adapter** — for users running gflow on shared workers or wanting cross-machine sync. The repository surface is already designed for this swap. - **`gflow data export`** (full catalog → JSON / Parquet) — the failed-operation slice shipped as `gflow data errors export` (JSONL, #345); a full-catalog / Parquet dump for downstream analytics is still open. -These are tracked in [`PLAN.md`](../PLAN.md) under the data-layer phase backlog. +These are tracked in [`PLAN.md`](https://github.com/ffroliva/gflow-cli/blob/develop/PLAN.md) under the data-layer phase backlog. --- diff --git a/website/docs/DEBUGGING.md b/website/docs/DEBUGGING.md index 1553162ac..b6ba83319 100644 --- a/website/docs/DEBUGGING.md +++ b/website/docs/DEBUGGING.md @@ -2,7 +2,7 @@ > Where to look and which tool to reach for when something breaks. Per-release > evidence (e.g. live verification runs) lives in sibling docs like -> [`LIVE_VERIFICATION_v0.7.0.md`](LIVE_VERIFICATION_v0.7.0.md). This file is +> [`LIVE_VERIFICATION_v0.7.0.md`](https://github.com/ffroliva/gflow-cli/blob/develop/docs/LIVE_VERIFICATION_v0.7.0.md). This file is > evergreen. ## Quick reference @@ -45,7 +45,7 @@ Confirm by checking for `ui_automation.image_mode_entered` in the log; if it is missing, the mode switch did not run. If `image_mode_entered` is present but `batch_response_seen` is still missing, the remaining hypothesis is the historical UI-flake noted in -[`LIVE_VERIFICATION_v0.7.0.md`](LIVE_VERIFICATION_v0.7.0.md#open-follow-ups) +[`LIVE_VERIFICATION_v0.7.0.md`](https://github.com/ffroliva/gflow-cli/blob/develop/docs/LIVE_VERIFICATION_v0.7.0.md#open-follow-ups-not-blocking-v070) (transient overlay swallowed the arrow-forward click). **Two extra artifact file names worth searching for in the out dir** when the @@ -275,7 +275,7 @@ For health probes from a worker process, use ## Reproducing image gen end-to-end -See [`LIVE_VERIFICATION_v0.7.0.md`](LIVE_VERIFICATION_v0.7.0.md) for the +See [`LIVE_VERIFICATION_v0.7.0.md`](https://github.com/ffroliva/gflow-cli/blob/develop/docs/LIVE_VERIFICATION_v0.7.0.md) for the canonical example. Short form: ```bash @@ -372,7 +372,7 @@ remediations. The most-hit categories: - [`AUTHENTICATION.md`](AUTHENTICATION.md) — sign-in flow details - [`DEVELOPMENT.md`](DEVELOPMENT.md) — branching, PRs, quality gates - [`USAGE.md`](USAGE.md) — CLI surface -- [`LIVE_VERIFICATION_v0.7.0.md`](LIVE_VERIFICATION_v0.7.0.md) — +- [`LIVE_VERIFICATION_v0.7.0.md`](https://github.com/ffroliva/gflow-cli/blob/develop/docs/LIVE_VERIFICATION_v0.7.0.md) — per-release end-to-end evidence - `/gflow:known-issues` — surface open known issues from the CLI - `/gflow:check` — local quality gate (lint, format, types, tests) diff --git a/website/docs/DEVELOPMENT.md b/website/docs/DEVELOPMENT.md index a50d8e6d8..a89cce81e 100644 --- a/website/docs/DEVELOPMENT.md +++ b/website/docs/DEVELOPMENT.md @@ -1,9 +1,9 @@ # Development Workflow -> For _contributing_ (TDD, quality gates, commit style, how to add a route) see [CONTRIBUTING.md](../CONTRIBUTING.md). +> For _contributing_ (TDD, quality gates, commit style, how to add a route) see [CONTRIBUTING.md](https://github.com/ffroliva/gflow-cli/blob/develop/CONTRIBUTING.md). > This document covers the **internal development process**: branching model, PR protocol, e2e gate, and release pipeline. > For scenario-based GitHub PR triage, external fork handling, and SonarCloud -> decisions, see [docs/GITHUB.md](GITHUB.md). +> decisions, see [docs/GITHUB.md](https://github.com/ffroliva/gflow-cli/blob/develop/docs/GITHUB.md). --- @@ -91,7 +91,7 @@ new-code conditions only; overall coverage ≥ 90 % is enforced by CI's `sonar.qualitygate.wait=true`, so a failed gate turns the `SonarCloud analysis` check red rather than reporting silently on the dashboard. Browser-automation and live-auth transports are coverage-excluded (e2e-tested, not unit-tested). -See [docs/GITHUB.md § SonarCloud Quality Gate](GITHUB.md#sonarcloud-quality-gate). +See [docs/GITHUB.md § SonarCloud Quality Gate](https://github.com/ffroliva/gflow-cli/blob/develop/docs/GITHUB.md#sonarcloud-quality-gate). ### Mutation testing (mutmut) @@ -156,7 +156,7 @@ export GFLOW_CLI_E2E_PROFILE= uv run pytest -m e2e -v ``` -All `@pytest.mark.e2e` scenarios must pass. See [CONTRIBUTING § E2e tests](../CONTRIBUTING.md#test-categories) for the full marker reference. +All `@pytest.mark.e2e` scenarios must pass. See [CONTRIBUTING § E2e tests](https://github.com/ffroliva/gflow-cli/blob/develop/CONTRIBUTING.md#test-categories) for the full marker reference. --- @@ -177,7 +177,7 @@ Version bumps belong in the **`develop → main` release PR**, not in feature PR ## AI-assisted development (Claude Code) -This repo is actively developed with Claude Code (see [CLAUDE.md](../CLAUDE.md)). A few conventions that keep the workflow clean: +This repo is actively developed with Claude Code (see [CLAUDE.md](https://github.com/ffroliva/gflow-cli/blob/develop/CLAUDE.md)). A few conventions that keep the workflow clean: - Claude branches are renamed to the appropriate `feature/`, `fix/`, `docs/` prefix before the PR is opened. The `claude/` prefix is internal scaffolding. - Claude never bumps the version or cuts a release without explicit instruction — use `/release`. @@ -190,9 +190,9 @@ This repo is actively developed with Claude Code (see [CLAUDE.md](../CLAUDE.md)) ## See also -- [CONTRIBUTING.md](../CONTRIBUTING.md) — TDD, quality gates, how to add a route, commit style -- [docs/GOVERNANCE_BENCHMARK.md](GOVERNANCE_BENCHMARK.md) — calibrating the advisory materiality gate (false-positive / coverage backtest) -- [docs/GITHUB.md](GITHUB.md) — GitHub PR triage, external fork handling, SonarCloud scenarios -- [RELEASE.md](../RELEASE.md) — release checklist, PyPI/GitHub publishing, tag protocol -- [CHANGELOG.md](../CHANGELOG.md) — version history -- [CLAUDE.md](../CLAUDE.md) — project memory hub for AI agents +- [CONTRIBUTING.md](https://github.com/ffroliva/gflow-cli/blob/develop/CONTRIBUTING.md) — TDD, quality gates, how to add a route, commit style +- [docs/GOVERNANCE_BENCHMARK.md](https://github.com/ffroliva/gflow-cli/blob/develop/docs/GOVERNANCE_BENCHMARK.md) — calibrating the advisory materiality gate (false-positive / coverage backtest) +- [docs/GITHUB.md](https://github.com/ffroliva/gflow-cli/blob/develop/docs/GITHUB.md) — GitHub PR triage, external fork handling, SonarCloud scenarios +- [RELEASE.md](https://github.com/ffroliva/gflow-cli/blob/develop/RELEASE.md) — release checklist, PyPI/GitHub publishing, tag protocol +- [CHANGELOG.md](https://github.com/ffroliva/gflow-cli/blob/develop/CHANGELOG.md) — version history +- [CLAUDE.md](https://github.com/ffroliva/gflow-cli/blob/develop/CLAUDE.md) — project memory hub for AI agents diff --git a/website/docs/E2E_TESTING.md b/website/docs/E2E_TESTING.md index 7d4e21dea..dd27cc6cd 100644 --- a/website/docs/E2E_TESTING.md +++ b/website/docs/E2E_TESTING.md @@ -101,7 +101,7 @@ e2e ─┬─ e2e_auth (auth/session, health check — zero credits) A live test can be written as Gherkin. This is the required form for a bug whose scenario can only happen in a browser — see -[`skills/issue-resolve/SKILL.md`](../skills/issue-resolve/SKILL.md) § The Bug Lane, +[`skills/issue-resolve/SKILL.md`](https://github.com/ffroliva/gflow-cli/blob/develop/skills/issue-resolve/SKILL.md) § The Bug Lane, step 5. It needs **no new machinery**: pytest-bdd (already a dependency) converts every Gherkin tag into a pytest marker, so a tagged scenario is filtered by the same `addopts` and selected by the same `-m ` as a hand-written e2e test. @@ -389,7 +389,7 @@ prompts, URLs, or anything else from the served JavaScript. ## RPC drift check (#1218) Every canary comment ends with an `RPC-DRIFT` section. It checks that each id in -[FLOW_WIRE_RPCS.md](https://github.com/ffroliva/gflow-cli/blob/main/docs/FLOW_WIRE_RPCS.md) is still in the JavaScript flow.google.com serves. +[FLOW_WIRE_RPCS.md](https://github.com/ffroliva/gflow-cli/blob/develop/docs/FLOW_WIRE_RPCS.md) is still in the JavaScript flow.google.com serves. It fetches the public shell with **no cookies and no browser**, swaps the shell's `/_/js/` module list for the four feature modules, and looks for each id as a quoted literal. No RPC is sent, so billed submits are covered at $0. It needs no profile, so it @@ -401,7 +401,7 @@ title. | `OK` | every catalogued id is present. An id found only in the shell's base bundle is listed as "not in the feature modules", never as gone | none | | `ID-GONE` | the bundle parsed (it holds descriptors) and catalogued ids are missing from it, even if all of them are | the named ids are missing from the four modules. First load a project page (the spike's `--page` arm) to rule out an id that moved to another module; if it is still absent, it was renamed or removed: update its row | | `MODULES-CHANGED` | the feature-module bundle answered 404 | the feature module names moved; relearn them from a project page (the spike's `--page` arm). Says nothing about any single id | -| `PARSE-CHANGED` | the bundle answered 200 with no `{:"",…}` descriptor. The key is a minified name the check learns from where the catalogued ids sit (build `20261110.00_p0` renamed it `Xa` to `Wa`), so only a change of shape reads here: the 20260929 build held its ids in a constructor, `new _.Gx("",…)`, which this check does not parse | the bundle format changed; the descriptor pattern needs re-deriving ([#1223 spike](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-11-10-rpc-descriptor-churn.md)). Never reads as `OK` | +| `PARSE-CHANGED` | the bundle answered 200 with no `{:"",…}` descriptor. The key is a minified name the check learns from where the catalogued ids sit (build `20261110.00_p0` renamed it `Xa` to `Wa`), so only a change of shape reads here: the 20260929 build held its ids in a constructor, `new _.Gx("",…)`, which this check does not parse | the bundle format changed; the descriptor pattern needs re-deriving ([#1223 spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-11-10-rpc-descriptor-churn.md)). Never reads as `OK` | | `INCONCLUSIVE` | nothing was measured: offline, a shell or bundle HTTP error other than a bundle 404 (429, 5xx), a redirect to a page without the app, no build label, a catalog that lost rows or has no `live` row, or the 120 s budget ran out | none; says nothing about Flow | One renamed module cannot pass for a missing id. On 2026-11-10 the server answered the @@ -689,7 +689,7 @@ flow.google.com clip lands in that bucket (#1003). ## See also -- [CONTRIBUTING.md § Test categories](../CONTRIBUTING.md#test-categories) +- [CONTRIBUTING.md § Test categories](https://github.com/ffroliva/gflow-cli/blob/develop/CONTRIBUTING.md#test-categories) - [DEVELOPMENT.md § E2e gate](DEVELOPMENT.md#e2e-gate-before-merging-develop-main) - [docs/DATA_LAYER.md](DATA_LAYER.md) - [docs/ARCHITECTURE.md § Testing topology](ARCHITECTURE.md#testing-topology) diff --git a/website/docs/ERRORS.md b/website/docs/ERRORS.md index 0cf685767..b03e55235 100644 --- a/website/docs/ERRORS.md +++ b/website/docs/ERRORS.md @@ -171,7 +171,7 @@ place today: `PUBLIC_ERROR_UNUSUAL_ACTIVITY` is `WafRejectionError` (exit 10), never retryable, and its `charged` / `next_action` depend on the scale. The scales measured to spend no credits (1080p, 720p and the 270p GIF for video, 2K for image; - [spike](superpowers/spikes/2026-11-29-export-billing-720p-270p.md)) read `no` / `wait`; + [spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-11-29-export-billing-720p-270p.md)) read `no` / `wait`; 4K (a 4K video bills on click; 4K image billing is unmeasured and treated the same), and a refusal on the `jwpduf` status poll, which runs after Flow accepted the export, read `maybe` / `reconcile`. No `retry_after` is given: no diff --git a/website/docs/INSTRUCTIONS.md b/website/docs/INSTRUCTIONS.md index 391cfb535..a686a5d4b 100644 --- a/website/docs/INSTRUCTIONS.md +++ b/website/docs/INSTRUCTIONS.md @@ -164,6 +164,6 @@ title is ambiguous. - [USAGE.md](USAGE.md) — full command reference. - [MOVIE.md](MOVIE.md) — multi-scene movies (`[[…instructions.card]]` blocks). - [MCP.md](MCP.md) — the six `gflow_instructions_*` MCP tools mirroring this command group. -- [LIVE_VERIFICATION_v0.29.0.md](LIVE_VERIFICATION_v0.29.0.md) — live e2e evidence for the +- [LIVE_VERIFICATION_v0.29.0.md](https://github.com/ffroliva/gflow-cli/blob/develop/docs/LIVE_VERIFICATION_v0.29.0.md) — live e2e evidence for the CRUD surface (mechanism, H4 image-reference confirmation). The original plan + spike findings were consolidated and removed when the feature shipped (v0.29.0 release prep). diff --git a/website/docs/KNOWN_ISSUES.md b/website/docs/KNOWN_ISSUES.md index 770fe7088..b160aaea1 100644 --- a/website/docs/KNOWN_ISSUES.md +++ b/website/docs/KNOWN_ISSUES.md @@ -2,7 +2,7 @@ Living list of behaviour that's broken, surprising, or limited by design — alongside workarounds and a pointer to the issue / version where each is tracked or resolved. -> Pair with [CHANGELOG.md](CHANGELOG.md) (what shipped per version) and [DISCLAIMER.md](DISCLAIMER.md) (legal/scope limits). +> Pair with [CHANGELOG.md](https://github.com/ffroliva/gflow-cli/blob/develop/CHANGELOG.md) (what shipped per version) and [DISCLAIMER.md](https://github.com/ffroliva/gflow-cli/blob/develop/DISCLAIMER.md) (legal/scope limits). ## Conventions @@ -29,7 +29,7 @@ Living list of behaviour that's broken, surprising, or limited by design — alo - **Tracked:** [#1298](https://github.com/ffroliva/gflow-cli/issues/1298), fixed by [PR #1304](https://github.com/ffroliva/gflow-cli/pull/1304) - **Cause:** every running gflow process holds its own `gflow.exe` launcher open, and pip uninstalls the old files before it writes the new ones, so it fails halfway and never rolls back. From 0.100.0, `gflow update` renames the launchers aside first, but an older install still runs its old updater. - **Workaround:** upgrade once by hand. Close every gflow process (MCP servers, `gflow serve`), then run `\Scripts\python.exe -m pip install --upgrade gflow-cli` (with any extras you installed, e.g. `"gflow-cli[patchright]"`, or their pins stay behind), or for a `--user` install `py -3.X -m pip install --user --upgrade gflow-cli`, where `3.X` is the Python gflow was installed under (`py -0p` lists them). From then on `gflow update` works. Details: [USAGE § `gflow update`](USAGE.md#gflow-update). -- **Evidence:** `tests/e2e/test_update_installer_e2e.py` (`e2e_update`), 4/4 on the v0.100.0 release tree; [LIVE_VERIFICATION_v0.100.0](https://github.com/ffroliva/gflow-cli/blob/main/docs/LIVE_VERIFICATION_v0.100.0.md). +- **Evidence:** `tests/e2e/test_update_installer_e2e.py` (`e2e_update`), 4/4 on the v0.100.0 release tree; [LIVE_VERIFICATION_v0.100.0](https://github.com/ffroliva/gflow-cli/blob/develop/docs/LIVE_VERIFICATION_v0.100.0.md). ### The direct credits read uses the profile's saved Google session outside Chrome @@ -87,7 +87,7 @@ that profile and keeps the other balances. - **Status:** Open · **Severity:** High for the affected account (nothing runs) · **Affected:** measured on one account (`my-profile`, 2026-09-23). Other `/about` occurrences are not yet shown to share the cause. - **Tracked:** [#902](https://github.com/ffroliva/gflow-cli/issues/902) (`auth login` could not clear it before v0.80.0; it now waits on the check) · [#888](https://github.com/ffroliva/gflow-cli/issues/888) · [#756](https://github.com/ffroliva/gflow-cli/issues/756) -- **Evidence:** [spike](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-09-23-about-cta-leads-to-google-reauth.md) +- **Evidence:** [spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-09-23-about-cta-leads-to-google-reauth.md) Flow sends every visit to its public landing page `/about`, while every Google and Flow cookie gflow checks is present and unexpired. On the measured account, the page's "Create with Google @@ -119,9 +119,9 @@ close Chrome yourself. On the measured account, `/about` was gone on the next ru - **Status:** Open (partially resolved) · **Severity:** High for unported forms · **Affected:** on accounts the rollout has reached, `gflow video t2v`, `video i2v` (local start/end frames and captioned image UUIDs the local catalog records in the same `--project`, #1542), local-file `video r2v`, `gflow image t2i`, `gflow image i2i` (local files or same-`--project` catalogued image UUIDs, #995), and a **single-segment** `gflow video extend` (#882: Flow's own Extend control, driven from the clip editor) now run on the migrated host. Image mode supports Nano Banana 2.1 (`nano2`, which replaced Nano Banana 2 there, #958) / 2 Lite / Pro, all five aspect ratios its radiogroup renders (16:9, 4:3, 1:1, 3:4, 9:16 — 3:4 appeared by 2026-09-17, #864), and count 1–4. Image prompts can tag a **character** with `@Name` / `--reference-entity` + `--reference-entity-name` since #723 (attached through the composer's `@` picker; an id without a name exits 36). Local-file `video r2v` takes a character the same way, by `--reference-entity` + `--reference-entity-name` (#723). That matrix is the **classic** migrated composer's. On an **agent-only** composer ([#799](https://github.com/ffroliva/gflow-cli/issues/799)) gflow drives `image t2i` (all five aspects; count 1–4) and `video t2v` (one 9:16 or 16:9 clip) only — i2i, i2v, r2v and character references are refused there before anything is clicked. Cross-project or un-captioned UUID image refs / video frame refs, video `@Name` outside `r2v`, r2v UUID refs, `--reference-entity` on t2v/i2v, Agent instructions, Imagen 4, scenes, chained extend (`-n > 1`, `--scene`/`--resume-from`, `--seed`, an `--aspect` other than the source clip's), instructions and tools are not ported yet and fail before submit. **`character create` worked on the migrated host until its labs `createEntity` route was retired:** measured 2026-10-14 on a profile served flow.google.com, it exits 7 with "Flow RPCs have been deprecated" (404). Building a character from local images, `character create --image FILE [--body-image FILE]` (MCP `gflow_character_create`), drives the character editor on flow.google.com instead and generates nothing ([#639](https://github.com/ffroliva/gflow-cli/issues/639)); the prompt-generated create (`--face-prompt`) is not ported to that host yet. `character list` and `character show` (and MCP `gflow_character_list` / `gflow_character_show`) now read `flow.google.com`'s `Zzl0ze` project reply ([#875](https://github.com/ffroliva/gflow-cli/issues/875), [#987](https://github.com/ffroliva/gflow-cli/pull/987)). `scenes`, multi-segment `extend` (`-n > 1`, `--scene`/`--resume-from`, `--seed`), `instructions` and `tools` remain *unported by gflow*, never proven impossible on the host. - **Tracked:** [#639](https://github.com/ffroliva/gflow-cli/issues/639) · Reported 2026-09-02 against 0.59.0, 0.62.1, 0.63.0 and 0.65.0 -- **Confirmed live 2026-09-03 on a second, independent account** (`ffroliva`) — see [LIVE_VERIFICATION_v0.66.0](https://github.com/ffroliva/gflow-cli/blob/main/docs/LIVE_VERIFICATION_v0.66.0.md). A read-only probe of the migrated origin measured `i_total: 0`, reproducing the reporter's central measurement. +- **Confirmed live 2026-09-03 on a second, independent account** (`ffroliva`) — see [LIVE_VERIFICATION_v0.66.0](https://github.com/ffroliva/gflow-cli/blob/develop/docs/LIVE_VERIFICATION_v0.66.0.md). A read-only probe of the migrated origin measured `i_total: 0`, reproducing the reporter's central measurement. - **`--reference-entity` was refused on `r2v` but not on `t2v`** ([#716](https://github.com/ffroliva/gflow-cli/issues/716), fixed in v0.71.0): the "not ported, exit 36" refusal above sat inside the r2v branch of the routing gate, so a `t2v` request carrying a character entity returned from that gate without its entities ever being inspected — and nothing downstream attaches one on this host. The generation was **submitted and billed** with the entity silently dropped, returning a plausible clip of the wrong person. The check is now mode-independent and ahead of every early return. If you ran `gflow video t2v @Name …` or `--reference-entity` on a moved account before this fix, the identity in those clips was never bound. -- **The migrated composer image path is now driven** ([#692](https://github.com/ffroliva/gflow-cli/issues/692)): the first probe established a hit-testable Image mode; the 2026-09-08 follow-up captured real T2I and local-file I2I submissions on `ogiZ0b`, including page-owned reCAPTCHA, upload ids, response records and signed JPEG downloads. See [the submit-wire spike](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-09-08-migrated-image-submit-wire.md). +- **The migrated composer image path is now driven** ([#692](https://github.com/ffroliva/gflow-cli/issues/692)): the first probe established a hit-testable Image mode; the 2026-09-08 follow-up captured real T2I and local-file I2I submissions on `ogiZ0b`, including page-owned reCAPTCHA, upload ids, response records and signed JPEG downloads. See [the submit-wire spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-09-08-migrated-image-submit-wire.md). - **Image commands on a moved account** ([#673](https://github.com/ffroliva/gflow-cli/issues/673), fixed in v0.69.0): through v0.68.0 `image t2i` / `i2i` (and `upscale`, `extend`) died with exit 1 `RecaptchaError` within seconds, before any submit, instead of the exit 36 above, because the labs client minted the reCAPTCHA token on the `flow.google.com` project grid before any migration guard ran. The guard now runs at the mint; since v0.80.0 the browser transport no longer mints for images at all, and the flow.google.com composer itself refuses unported forms (#891). If you still see a `RecaptchaError` on a moved account right after `auth login`, that is the labs logged-out landing page from the [#644](https://github.com/ffroliva/gflow-cli/issues/644) cookie harvest, not this. - **A second image request on one client hit the same `RecaptchaError`** ([#891](https://github.com/ffroliva/gflow-cli/issues/891), fixed in v0.80.0): after a successful image on an account served flow.google.com, the page is parked on `about:blank`, and the client's pre-mint ran there, so an unported form (e.g. `--model imagen4`) failed with "the Flow editor page may have failed to load" instead of exit 36. The browser transport never used that token, so it no longer mints; the composer refuses the form by name. Reachable from `gflow run --config` with a per-prompt `"model": "imagen4"` after a successful prompt, where it also crashed the whole run (exit 1, results table lost); it now reports that prompt as exit 36 and the run completes. @@ -173,7 +173,7 @@ References by `@Name` and unpaired character entity ids stay on labs: the picker exposes no media id to anchor on (saved characters work on `r2v` when paired with `--reference-entity-name`, #723, and same-`--project` captioned `i2v` frame UUIDs now anchor on the grid tile's `/asb/`, #1542). Capture: -[2026-09-05-migrated-r2v-attach-surface](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-09-05-migrated-r2v-attach-surface.md). +[2026-09-05-migrated-r2v-attach-surface](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-09-05-migrated-r2v-attach-surface.md). **Images also run there (2026-09-08).** The driver selects Image mode, Nano Banana 2 (2.1 by 2026-10-08 — before v0.83.1 that made every `nano2` run exit 7, "does not carry @@ -260,7 +260,7 @@ serves the signed-out page, meaning the cookies were not accepted (#1221). A pag reader must treat that as an auth problem and fall back to the page. Cookie lifetime without a running browser is unmeasured. An account served `labs.google` could not be observed here. Full write-up: -[`docs/superpowers/spikes/2026-11-09-page-free-reads.md`](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-11-09-page-free-reads.md). +[`docs/superpowers/spikes/2026-11-09-page-free-reads.md`](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-11-09-page-free-reads.md). **Workaround:** none needed; the browser path works. It is the cost, not the correctness, that a page-free reader would change. @@ -387,7 +387,7 @@ still refuses to go is reported as `div.glue-cookie-notification-bar`. **Workaround on 0.73.0 and earlier:** open that profile once in Chrome and dismiss the bar by hand. Consent persists in the profile. -Evidence: [`docs/superpowers/spikes/2026-09-11-migrated-cookie-bar-blocks-the-composer.md`](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-09-11-migrated-cookie-bar-blocks-the-composer.md). +Evidence: [`docs/superpowers/spikes/2026-09-11-migrated-cookie-bar-blocks-the-composer.md`](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-09-11-migrated-cookie-bar-blocks-the-composer.md). ### One-time Flow banner/modal can cover the composer on first load @@ -596,7 +596,7 @@ accepted. Two corrections fixed it (verified end-to-end on macOS Apple Silicon): captured **pre-launch** via the working `--password-store=basic` reader. No-op on Windows and on runs where the context decrypts natively. -Evidence: [LIVE_VERIFICATION_v0.23.0](https://github.com/ffroliva/gflow-cli/blob/main/docs/LIVE_VERIFICATION_v0.23.0.md). +Evidence: [LIVE_VERIFICATION_v0.23.0](https://github.com/ffroliva/gflow-cli/blob/develop/docs/LIVE_VERIFICATION_v0.23.0.md). ### Expanded chat sidebar left the composer unrecoverable (exit 23) @@ -637,7 +637,7 @@ Verified by an A/B on a real editor: with the scoped selector neutered the fallback recovers; with both neutered it does not. Two earlier hypotheses were tested and refuted first (a `crop_free` sub-mode trigger, and a composer hydration race) — see -[the spike evidence](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-08-14-video-model-capability-matrix.md). +[the spike evidence](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-08-14-video-model-capability-matrix.md). If you still hit exit 23 after upgrading, the run writes a PII-safe DOM signature to `diag_mode_switch_miss.json` (structural allowlist: ligature names @@ -657,7 +657,7 @@ state genuinely different from the sidebar one. of v0.65.0 it **does** run — it never had before ([#615](https://github.com/ffroliva/gflow-cli/issues/615)), and the fix is A/B-verified live (see -[LIVE_VERIFICATION_reference_entity_guard](https://github.com/ffroliva/gflow-cli/blob/main/docs/LIVE_VERIFICATION_reference_entity_guard.md)). +[LIVE_VERIFICATION_reference_entity_guard](https://github.com/ffroliva/gflow-cli/blob/develop/docs/LIVE_VERIFICATION_reference_entity_guard.md)). But it guards by registering a Playwright route handler, so it can only ever observe **browser-initiated** traffic. Every direct-wire route goes through `client._post_json`, @@ -713,7 +713,7 @@ same day may simply work again. **Workaround:** none yet on affected accounts — the attach gesture for the new UI is being reverse-engineered (recon plan in -[docs/superpowers/plans/2026-06-12-issue-174-library-ui-attach/PLAN.md](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/plans/2026-06-12-issue-174-library-ui-attach/PLAN.md)). +[docs/superpowers/plans/2026-06-12-issue-174-library-ui-attach/PLAN.md](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/plans/2026-06-12-issue-174-library-ui-attach/PLAN.md)). If you have a second profile/account still on the old UI, entity attach works there. Follow [#174](https://github.com/ffroliva/gflow-cli/issues/174) for status; please report whether your account shows the dialog or the full-page @@ -734,7 +734,7 @@ account tier is enforced server-side. gflow cannot grant 4K locally. **Workaround:** use `--scale 2k` (available on all tiers), or upgrade the Flow account to Ultra. If you just upgraded, re-run `gflow auth login --profile ` to refresh the session before retrying 4K. Wire detail: -[docs/IMAGE_UPSCALE_RECON.md](https://github.com/ffroliva/gflow-cli/blob/main/docs/IMAGE_UPSCALE_RECON.md) (#171). +[docs/IMAGE_UPSCALE_RECON.md](https://github.com/ffroliva/gflow-cli/blob/develop/docs/IMAGE_UPSCALE_RECON.md) (#171). ### Image generation returns HTTP 401 — `aisandbox-pa` generation endpoint @@ -746,7 +746,7 @@ to refresh the session before retrying 4K. Wire detail: > full auth context — bypassing the 401 on the `aisandbox-pa` HTTP path > entirely. Live-verified end-to-end on the `ffroliva` profile across four > aspect ratios (`9:16`, `16:9`, `1:1`, `4:3`); see -> [`docs/LIVE_VERIFICATION_v0.7.0.md`](https://github.com/ffroliva/gflow-cli/blob/main/docs/LIVE_VERIFICATION_v0.7.0.md). The +> [`docs/LIVE_VERIFICATION_v0.7.0.md`](https://github.com/ffroliva/gflow-cli/blob/develop/docs/LIVE_VERIFICATION_v0.7.0.md). The > 401 still hits the experimental HTTP transports > (`evaluate_fetch` / `bearer` / `sapisidhash`) under > `src/gflow_cli/api/transports/experimental/` — those are not the @@ -794,8 +794,7 @@ endpoint, a different surface from the `labs.google` tRPC API. > because it sends cookies but not that token. The `gflow scene` groundwork now > fetches+caches the token and attaches the Bearer to the **`page.request` REST > path** (`_post_json` / `_patch_json`, host-scoped to `aisandbox-pa`) so -> `uploadImage` / `scenes` / `commit` authenticate — see -> [`docs/superpowers/plans/2026-05-31-l0-bearer-pivot.md`](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/plans/2026-05-31-l0-bearer-pivot.md). +> `uploadImage` / `scenes` / `commit` authenticate. > **Live-verified 2026-05-31:** REST `uploadImage` returns 200 > (`tests/e2e/test_aisandbox_auth_live.py`, credit-free). > **Liberating follow-up:** the same Bearer likely unlocks the `evaluate_fetch` @@ -922,7 +921,7 @@ MediaUploadRejectedError (exit 27): migrated host: no maseQ reply within 60s of the file — the upload never reached Flow or was dropped ``` -…and advised re-encoding the image to strip metadata. Neither the file nor the network was ever involved. Measured 2026-09-08 on three profiles, eight runs: the two accounts that had uploaded before never saw the dialog and uploaded fine; the account that never had failed 3/3. See [the spike](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-09-08-migrated-upload-fails-two-ways.md). +…and advised re-encoding the image to strip metadata. Neither the file nor the network was ever involved. Measured 2026-09-08 on three profiles, eight runs: the two accounts that had uploaded before never saw the dialog and uploaded fine; the account that never had failed 3/3. See [the spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-09-08-migrated-upload-fails-two-ways.md). > **This entry previously said the opposite.** It read *"Affects: the legacy in-tree Compiled Growth worker, NOT `gflow-cli` itself"*, because *"gflow-cli's API-driven path bypasses this dialog entirely (the REST endpoint already implies acceptance)"*, with *"Workaround in gflow-cli: none needed."* That was true of the REST path and became false when the migrated driver started using the editor's **own** upload — so the entry a user hitting #719 would find was reassuring them about the exact thing that was breaking their run. @@ -934,7 +933,7 @@ the file — the upload never reached Flow or was dropped > **Accepting does not make every upload succeed — there is a second, unrelated failure on this path.** See the next entry. If you have already accepted the dialog and an upload still times out, you are not looking at this issue and repeating the workaround will not help. -**Video uploads are different: the acceptance is per browser profile, not per account** ([#1540](https://github.com/ffroliva/gflow-cli/issues/1540)). As reported on #1540 (a contributor's observation, not re-measured by the maintainers; [spike record](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-12-01-video-upload-consent-storage.md)), Flow records the video-rights acceptance only in the page's `localStorage` (`flow-video-upload-consent-dismissed`); no request reaches the account. A local video source (`video edit`, `video extend`) on a gflow profile that has never accepted it therefore meets `` even when the same Google account accepted it in your everyday Chrome. Since #1540 the driver fails with exit 27 as soon as that dialog appears before the upload request leaves the page. To clear it, with no gflow command using the profile (a running `gflow serve` or `gflow mcp run` counts), start Chrome with `--user-data-dir=` (`gflow auth list --json` prints `profile_dir`), upload one video to a Flow project by hand, and accept. On macOS and Linux also pass `--password-store=basic`: without it Chrome cannot read the cookies gflow sealed with it (#222), and signing in again there breaks the next gflow run. Chrome ignores the flag on Windows. +**Video uploads are different: the acceptance is per browser profile, not per account** ([#1540](https://github.com/ffroliva/gflow-cli/issues/1540)). As reported on #1540 (a contributor's observation, not re-measured by the maintainers; [spike record](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-12-01-video-upload-consent-storage.md)), Flow records the video-rights acceptance only in the page's `localStorage` (`flow-video-upload-consent-dismissed`); no request reaches the account. A local video source (`video edit`, `video extend`) on a gflow profile that has never accepted it therefore meets `` even when the same Google account accepted it in your everyday Chrome. Since #1540 the driver fails with exit 27 as soon as that dialog appears before the upload request leaves the page. To clear it, with no gflow command using the profile (a running `gflow serve` or `gflow mcp run` counts), start Chrome with `--user-data-dir=` (`gflow auth list --json` prints `profile_dir`), upload one video to a Flow project by hand, and accept. On macOS and Linux also pass `--password-store=basic`: without it Chrome cannot read the cookies gflow sealed with it (#222), and signing in again there breaks the next gflow run. Chrome ignores the flag on Windows. **gflow does not accept it for you, by design.** The dialog affirms that *you* hold the rights to the content you upload; that is not a claim a tool may make on an account owner's behalf. It is also a 30-second step, once, on a path that already requires an interactive browser login (`gflow auth login`) — so automating it would buy nothing and assert something on your behalf. There is deliberately no config flag: a setting that can never safely default to on, on a once-per-account event, is a flag nobody sets. @@ -965,7 +964,7 @@ The contrasting message, **`no upload request ever left the page`**, means somet - **Status:** Mitigated · **Severity:** Medium (intermittent; the write usually saved) · **Affects:** the migrated `flow.google.com` host, local uploads (`--initial-frame`, `--ref`, `i2i` files), project create and rename, image submits, video submits · **Tracked:** [#1009](https://github.com/ffroliva/gflow-cli/issues/1009), [#1075](https://github.com/ffroliva/gflow-cli/issues/1075), [#1112](https://github.com/ffroliva/gflow-cli/issues/1112), [#1141](https://github.com/ffroliva/gflow-cli/issues/1141) -Distinct from #719 above, where no reply arrives at all. Here the reply arrives, but Chrome cannot hand its body over: `Network.getResponseBody: No data found for resource with given identifier`. Our spike saw it on 2 of 45 real `maseQ` uploads, and a fresh reload found both uploads saved ([spike](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-10-20-migrated-upload-reply-body-eviction.md)). Before the fix, gflow reported the upload as a refused file (exit 27). +Distinct from #719 above, where no reply arrives at all. Here the reply arrives, but Chrome cannot hand its body over: `Network.getResponseBody: No data found for resource with given identifier`. Our spike saw it on 2 of 45 real `maseQ` uploads, and a fresh reload found both uploads saved ([spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-10-20-migrated-upload-reply-body-eviction.md)). Before the fix, gflow reported the upload as a refused file (exit 27). A project create or rename whose reply is late, not lost, takes the same path: on a slow link a 40 s create used to end as a retryable exit 9 while Flow made the project, so a retry made a second one ([#1037](https://github.com/ffroliva/gflow-cli/issues/1037)). The reply wait is now 120 s, and past it gflow reads the new project's id from Flow's navigation to it. @@ -973,7 +972,7 @@ A project create or rename whose reply is late, not lost, takes the same path: o **Image submits (since v0.89.1, [#1075](https://github.com/ffroliva/gflow-cli/issues/1075)).** Flow had made the image every reported time. gflow now reads the run's new tile(s) off the project grid and downloads them, taking exactly the requested count once it holds still for a few seconds; an i2i reference is never counted. Any other count, or a grid it cannot read, still ends in exit **9** (`retryable: false`) naming the project page: check the project before re-running. -**Video submits ([#1112](https://github.com/ffroliva/gflow-cli/issues/1112)).** About 1 in 7 r2v submits lost this reply in a 21-clip run, and Flow made and billed every one. A video run that uploaded a file (`--ref`, `--initial-frame`, `--end-frame`) is now followed to its clip: Flow's own status replies name the clip by the id of that upload, and if none does within a minute, gflow reads the project listing in a second tab. The run then finishes and downloads as usual, with one `migrated.video_submit_reply_lost` warning and no second submit ([spike](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-10-27-lost-video-submit-recovery.md)). A one-clip text-to-video run uploads nothing, so since v0.93.0 it is found by its exact prompt and model, and the project listing must name exactly one such clip once it finishes ([#1141](https://github.com/ffroliva/gflow-cli/issues/1141), [spike](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-11-04-t2v-lost-submit-reply.md)). Text-to-video with `--count` above 1, an r2v run with characters only, or a clip the listing cannot name that way still ends in exit **9** (`retryable: false`) naming the project. So does a run where two clips carry the upload, or none appears in time. Check the project before re-running. +**Video submits ([#1112](https://github.com/ffroliva/gflow-cli/issues/1112)).** About 1 in 7 r2v submits lost this reply in a 21-clip run, and Flow made and billed every one. A video run that uploaded a file (`--ref`, `--initial-frame`, `--end-frame`) is now followed to its clip: Flow's own status replies name the clip by the id of that upload, and if none does within a minute, gflow reads the project listing in a second tab. The run then finishes and downloads as usual, with one `migrated.video_submit_reply_lost` warning and no second submit ([spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-10-27-lost-video-submit-recovery.md)). A one-clip text-to-video run uploads nothing, so since v0.93.0 it is found by its exact prompt and model, and the project listing must name exactly one such clip once it finishes ([#1141](https://github.com/ffroliva/gflow-cli/issues/1141), [spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-11-04-t2v-lost-submit-reply.md)). Text-to-video with `--count` above 1, an r2v run with characters only, or a clip the listing cannot name that way still ends in exit **9** (`retryable: false`) naming the project. So does a run where two clips carry the upload, or none appears in time. Check the project before re-running. **If it cannot confirm the outcome**, the command exits **7** with `RpcResponseUnavailableError` (`retryable: false`). The write may have saved. Open the project on flow.google.com and look for the title or the file name in the error before you re-run, or you may get a duplicate project or upload. `gflow run` does not re-upload a reference file after this error in the same run. @@ -1013,7 +1012,7 @@ A block that survives dismissal now aborts pre-submit with exit 23 (probe `overl **Fixed.** In v0.87.1 `gflow credits` began opening flow.google.com in the profile's browser and reading the balance from the app's own `nzlxg` reply, the number Flow's account menu shows (measured 5/5, including after a spend: -[spike](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-10-22-credits-balance-on-nzlxg.md)). It no longer needs a +[spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-10-22-credits-balance-on-nzlxg.md)). It no longer needs a labs.google token. It cost one browser launch per profile; since [#1229](https://github.com/ffroliva/gflow-cli/issues/1229) the same reply is first asked for directly, with the profile's saved cookies and no browser, and the browser read is the fallback @@ -1116,7 +1115,7 @@ Other ratios may be silently rejected or coerced server-side. We validate in the > **Resolution (2026-05-20, v0.7.0):** `UiAutomationTransport` drives the Flow > editor so Flow's own JS issues every generation request with full auth > context — image generation now succeeds end-to-end (see -> [`docs/LIVE_VERIFICATION_v0.7.0.md`](https://github.com/ffroliva/gflow-cli/blob/main/docs/LIVE_VERIFICATION_v0.7.0.md)). Video +> [`docs/LIVE_VERIFICATION_v0.7.0.md`](https://github.com/ffroliva/gflow-cli/blob/develop/docs/LIVE_VERIFICATION_v0.7.0.md)). Video > T2V works at the library level via the same transport (Phase A, PR #23); > CLI wiring (`gflow video t2v/i2v/batch`) is queued for Phase B. The HTTP > transports under `experimental/` remain blocked by this 401 by design — @@ -1170,7 +1169,7 @@ find "$HOME/Downloads/gflow-cli" -type f -mtime +30 -delete `batchexecute` error envelope (`[7,null,[["type.googleapis.com/google.rpc.ErrorInfo",["PUBLIC_ERROR_UNUSUAL_ACTIVITY"]]]]`) and surfaces as `WafRejectionError: … Flow refused the submit: PUBLIC_ERROR_UNUSUAL_ACTIVITY`. Flow's grid shows *"We noticed some unusual activity… You have not been charged"* - ([spike](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-09-27-migrated-refusal-is-on-the-wire.md)). + ([spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-09-27-migrated-refusal-is-on-the-wire.md)). - **structlog signature:** `ui_automation.batch_response_seen` with `status=403` followed by `ui_automation.batch_403_body` containing `'message': 'reCAPTCHA evaluation failed', 'status': 'PERMISSION_DENIED', 'reason': 'PUBLIC_ERROR_UNUSUAL_ACTIVITY'` Distinct from the historical `aisandbox-pa` 401 (resolved in v0.7.0). The 403 @@ -1183,7 +1182,7 @@ batch — so it is not a global incompatibility but a per-profile WAF state. **What gflow does about it (v0.108.0, #1371):** a refused submit is not billed, and gflow retries it **once**, from a new headless browser process. In the -[direct video and headless mint spike](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-11-27-direct-video-and-headless-mint.md), +[direct video and headless mint spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-11-27-direct-video-and-headless-mint.md), a page Flow had refused stayed refused for about 20 minutes, while fresh pages in new browser processes were accepted in both headless and headed mode: page freshness, not visibility, was the variable. Any refused page is discarded, so the next mint uses a new @@ -1615,7 +1614,7 @@ is ported to that build: it opens Agent settings through the gear, waits out the saves before it submits, and opens a closed agent panel first (submitted from the compact prompt box alone, a run saw no credit gate and timed out). That port was measured on a recoverable account held in agent mode, not on such an account -([spike](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-11-21-agent-settings-on-the-new-build.md)). +([spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-11-21-agent-settings-on-the-new-build.md)). The **negative** controls were measured live at $0 on 2026-09-13, which is what makes the discriminator more than a guess: a healthy migrated composer carries its Agent toggle @@ -1741,7 +1740,7 @@ change surfaces there as a failing test. Start any investigation of a sudden **Since 2026-10-22 that endpoint answers HTTP 410 Gone** for every account, with or without cookies ([#1023](https://github.com/ffroliva/gflow-cli/issues/1023), -[spike](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-10-22-labs-session-oracle-gone.md)). A 410 is now +[spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-10-22-labs-session-oracle-gone.md)). A 410 is now read as "no labs session": a profile without Google cookies is `NO_SESSION`, and one with them is checked by the server-attested migrated-host probe (#791), which needs the Google SSO and flow.google.com session cookies, then reads `myaccount.google.com` (or, only if that @@ -1831,8 +1830,8 @@ re-navigating and then failing loudly instead of generating on the wrong surface. The `parentEntityId` guard that surfaced this was correct throughout — it refused to report a portrait-less character as success. -Wire contract: [CHARACTER_RECON § entity binding](https://github.com/ffroliva/gflow-cli/blob/main/docs/CHARACTER_RECON.md#entity-binding-entitycontext-captured-live-2026-07-28). -Evidence: [LIVE_VERIFICATION_v0.45.0 §2](https://github.com/ffroliva/gflow-cli/blob/main/docs/LIVE_VERIFICATION_v0.45.0.md). +Wire contract: [CHARACTER_RECON § entity binding](https://github.com/ffroliva/gflow-cli/blob/develop/docs/CHARACTER_RECON.md#entity-binding-entitycontext-captured-live-2026-07-28). +Evidence: [LIVE_VERIFICATION_v0.45.0 §2](https://github.com/ffroliva/gflow-cli/blob/develop/docs/LIVE_VERIFICATION_v0.45.0.md). ### `gflow video`'s manifest-driven batch subcommand didn't skip already-completed entries — RESOLVED as obsolete @@ -1863,7 +1862,7 @@ Agent toggle's `aria-pressed` attribute (false = classic media, true = agent — locale-invariant), closes the expanded chat sidebar first, toggles off only when actually in agent mode, and re-verifies. Live-verified with a full classic→agent→classic round-trip and a real agentic→classic recovery in the v0.38.0 -release run ([evidence](https://github.com/ffroliva/gflow-cli/blob/main/docs/LIVE_VERIFICATION_v0.38.0.md)). +release run ([evidence](https://github.com/ffroliva/gflow-cli/blob/develop/docs/LIVE_VERIFICATION_v0.38.0.md)). ### Agentic image generation could silently attribute a pre-existing project asset as the "generated" image @@ -2023,7 +2022,7 @@ why; re-run on the next release (≥ v0.9.0). The two long Open-section entries above (*Image generation returns HTTP 401* and *REST API 401 — all `aisandbox-pa.googleapis.com` generation endpoints blocked*) were closed by the same architectural change: `UiAutomationTransport` drives the Flow web UI so Flow's own JavaScript issues every generation request with the full browser auth context (cookies, reCAPTCHA, `Origin`/`Referer` headers). The 401 had affected every direct HTTP call from `evaluate_fetch` / `bearer` / `sapisidhash`; those transports now live under `src/gflow_cli/api/transports/experimental/` and are not on the production path. -End-to-end live-verified on the `ffroliva` profile across `9:16`, `16:9`, `1:1`, and `4:3` aspect ratios; see [`docs/LIVE_VERIFICATION_v0.7.0.md`](https://github.com/ffroliva/gflow-cli/blob/main/docs/LIVE_VERIFICATION_v0.7.0.md) for timing, file sizes, and exact filenames. Video T2V uses the same approach (Phase A — PR #23 — merged 2026-05-19). +End-to-end live-verified on the `ffroliva` profile across `9:16`, `16:9`, `1:1`, and `4:3` aspect ratios; see [`docs/LIVE_VERIFICATION_v0.7.0.md`](https://github.com/ffroliva/gflow-cli/blob/develop/docs/LIVE_VERIFICATION_v0.7.0.md) for timing, file sizes, and exact filenames. Video T2V uses the same approach (Phase A — PR #23 — merged 2026-05-19). --- @@ -2069,7 +2068,7 @@ gflow auth login **The block is current Google behaviour — "Resolved" means the mitigation holds, not that Google stopped.** Re-measured 2026-09-08 across three throwaway *unauthenticated* profiles, each signed into by hand -([spike](https://github.com/ffroliva/gflow-cli/blob/main/docs/superpowers/spikes/2026-09-08-g12-blocks-webdriver-not-playwright.md)): a +([spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-09-08-g12-blocks-webdriver-not-playwright.md)): a browser advertising `navigator.webdriver === true` — real Chrome, no stealth flags — was rejected at `/v3/signin/rejected` **17.5 s** into the flow, while the same real Chrome *with* the flags reported `false`, never saw the rejection, and reached a Flow session diff --git a/website/docs/MCP.md b/website/docs/MCP.md index f19e71ba3..01a039338 100644 --- a/website/docs/MCP.md +++ b/website/docs/MCP.md @@ -130,8 +130,8 @@ completed result (blocking and queued alike) carries `route` (`direct` / `ui`), is [BROWSER_MODES](BROWSER_MODES.md). * `gflow_generate_image(prompt, model, aspect, count, reference_images, reference_entities, reference_entity_names, tools, profile, project, project_name, instructions, ui_mode, thinking_level, out_file, wait, browser_visibility)`: Triggers text-to-image / image-to-image (Imagen / Nano Banana). `thinking_level` (`low`/`medium`/`high`, matched case-insensitively, mirroring CLI `--thinking-level`) binds Flow's image thinking-level toggle in the settings pane (omitting leaves Flow's existing setting untouched). `out_file` sets an explicit destination file path (mirrors CLI `--out-file`; legacy `output` removed in #1158). There is no `seed` parameter: Flow picks the seed and the image request cannot carry one (removed in [#1013](https://github.com/ffroliva/gflow-cli/issues/1013), as the CLI's `--seed` was in v0.8.0). A completed result reports the catalogued seed under `seed`: the seed Flow chose on the classic image paths, `0` on the agentic / agent-only arms (which observe none), `null` if none was recorded — the MCP twin of `gflow image t2i --json`'s `images[].seed`. `instructions` is an optional list of ephemeral agent-instruction strings (agentic cohort only). `reference_images` switches to i2i and accepts **either a local file path or a generated image's Flow media UUID**. A UUID reference is attached by **selecting the already-existing asset in Flow's reference picker — no duplicate copy is uploaded** (locating the tile by the media id in its thumbnail URL, and searching the recorded display name to surface it when needed); gflow falls back to uploading the asset's on-disk local file only when it can't be located in place (e.g. it lives in a different project's picker). `project` generates into an existing Flow project id (mirrors CLI `--project`; when omitted, [`GFLOW_CLI_PROJECT`](CONFIGURATION.md#gflow_cli_project) is used unless `project_name` asks for a new project, #1039) — pass the reference's project to keep it selectable in place. `ui_mode` selects the Flow UI arm (`auto`/`classic`/`agentic`, mirroring CLI `--ui-mode`, matched case-insensitively). Since [#595](https://github.com/ffroliva/gflow-cli/issues/595) `auto` means "no arm was asked for" and **resolves to `classic`** — the arm that can satisfy an image request — so an account in Flow's agentic cohort aborts pre-submit (exit-28 equivalent envelope, zero credits) instead of failing mid-run with selector drift or video bytes; the agentic arm is bound only when named. Passing `instructions` forces `agentic` automatically, so `ui_mode="classic"` + `instructions` is a hard conflict rather than a silent drop. An unknown value returns a 400 problem-details envelope. See [CONFIGURATION § GFLOW_CLI_UI_MODE](CONFIGURATION.md#gflow_cli_ui_mode). - `model` is `nano2` (Nano Banana 2.1 on flow.google.com; `nano2.1` also accepted), `nano2-lite` (Nano Banana 2 Lite), `nano-pro` (Nano Banana Pro) or `image4` (Imagen 4, no longer in Flow's menu); other aliases are accepted too. On migrated `flow.google.com` accounts, T2I and local-file I2I are supported with Nano Banana 2.1 (`nano2`, #958) / 2 Lite / Pro, all five aspects (16:9, 4:3, 1:1, 3:4, 9:16) and count 1–4; the measured shapes are sent as a direct `ogiZ0b` request with a token from a headless browser, and the rest are submitted by Flow's own page ([DIRECT_TRANSPORT](DIRECT_TRANSPORT.md)). `@Name` character mentions in the prompt are attached through the composer's `@` picker and verified as character chips before submit (#723). each explicit `reference_entities` id needs its `reference_entity_names` entry or a matching `@Name` in the prompt (otherwise exit 36); a `reference_images` UUID is referenced in place when the catalog records it in the same `project` (#995), and a local `reference_images` file is uploaded into the project once and mentioned in place on later calls with the same file, like the CLI's `--ref` ([#772](https://github.com/ffroliva/gflow-cli/issues/772)); an output path gflow cannot write ends in the exit-11-equivalent envelope, with the image still in the Flow project ([#1091](https://github.com/ffroliva/gflow-cli/issues/1091)); other UUID references, instructions and Imagen 4 remain pre-submit refusals there. An agent-only composer (see below) takes T2I only. When Flow returns fewer images than `count`, the reply is still `completed`, `files` lists the images produced, and the `warnings` list includes the object `{"type": "images_missing", "requested": 4, "returned": 3}` (a `failed` reply carries it too when the images came back short before the failure) ([#1489](https://github.com/ffroliva/gflow-cli/issues/1489)). Each saved image is checked against the request at no cost, and a mismatch adds a `warnings` entry carrying its `media_name`: `aspect_mismatch` (decoded `width`/`height` more than 10 % off the `requested` aspect), `echoed_reference` (byte-identical to a local reference image) or `tiny_file` (under 8 KB, with `bytes` and `min_bytes`); the reply stays `completed` and the file is kept, and `wait=true` and `tasks/get` report the same entries ([#1534](https://github.com/ffroliva/gflow-cli/issues/1534)). A path that reads the images off the page (Agent mode, an agent-only composer, or a lost reply) fails instead when some are missing. The queued (`wait=false`) and blocking (`wait=true`) calls use the same typed payload and worker path. -* `gflow_generate_video(prompt, mode, aspect, initial_frame, end_frame, reference_images, reference_entities, reference_entity_names, model, duration, resolution, count, tools, profile, project, project_name, ui_mode, out_file, max_credits, wait, browser_visibility)`: Triggers vertical or landscape video generation (Veo). `out_file` sets an explicit destination file path (mirrors CLI `--out-file`; legacy `output` removed in #1158). `mode` is `t2v`/`i2v`/`r2v`; `model` (`veo_lite`/`veo_fast`/`veo_quality`/`omni_flash`/`omni_1_2_flash`, aliases accepted), `duration` (seconds — 4/6/8 for Veo 3.1, 4/6/8/10 for omni_flash, every integer 3–15 for omni_1_2_flash, at most 10 with an `end_frame`; with no `model`, 4/6/8/10), `resolution` ('360p' or '720p', supported on the Omni models; on any other model, or on the labs editor, the job fails pre-submit with the exit-11-equivalent envelope and no credits spent). **Whether Flow renders a duration control at all is account/cohort-dependent**: on an account that renders none, the job is accepted here and fails in the worker pre-submit (exit 23 equivalent on the labs driver, exit 11 equivalent on the migrated `flow.google.com` host — now the default t2v route, #650 — no credits spent either way) rather than being rejected up front — see [KNOWN_ISSUES](https://github.com/ffroliva/gflow-cli/blob/main/KNOWN_ISSUES.md) (#451/#288/#630), and `count` mirror the CLI `gflow video` flags — an omitted `model` lets the transport apply its i2v veo-lite default (issue #125), and every model — `omni_flash` included — accepts i2v with a start frame and with an end frame (wire-verified 2026-09-02, issue #626); `i2v` requires `initial_frame`, `r2v` requires `reference_images` **or** `reference_entities`; `project` generates into an existing Flow project id (mirrors CLI `--project`; when omitted, [`GFLOW_CLI_PROJECT`](CONFIGURATION.md#gflow_cli_project) is used unless `project_name` asks for a new project, #1039); on an account Google has moved to `flow.google.com` (`GFLOW_CLI_FLOW_HOST`, read from the server/daemon environment, not per call — see [CONFIGURATION § GFLOW_CLI_FLOW_HOST](CONFIGURATION.md#gflow_cli_flow_host)) omitting `project` creates one there first (#864); there, on the classic migrated composer (an agent-only one takes text-to-video only — see below), the ported modes are text-to-video; image-to-video with a **local** `initial_frame` (at the measured key, 9:16 with the default Veo 3.1 Lite and no `duration` / `resolution` / `end_frame`, the frame is uploaded and the request sent over direct HTTP with a headless browser; see [DIRECT_TRANSPORT](DIRECT_TRANSPORT.md)), optionally with a **local** `end_frame` (start+end interpolation, #639 — on the UI path local files are uploaded under a **run-unique** name like `hero-a1b2c3d4.png`, [#792](https://github.com/ffroliva/gflow-cli/issues/792)), **or** captioned image UUIDs the local catalog records in the same `project` ([#1542](https://github.com/ffroliva/gflow-cli/issues/1542), bound in place on the UI path via `/asb/` — the UUID frame skips upload, including Start+End and mixed local+UUID pairs where only the local frame uploads); and reference-to-video with local `reference_images` (each file is uploaded the same way — run-unique name included — and attached as an `@` mention of *that* name in the prompt; `duration` there accepts every integer from `3` through `15` with explicit `model="omni_1_2_flash"` (set through its duration slider; Google AI plans are required above `10`) and `4/6/8/10` with explicit `omni_flash`; Veo or an unspecified model accepts only `8`, because measured shorter Veo requests dropped the references and billed text-to-video, so any other value returns the exit-11-equivalent envelope. An omitted r2v duration still pins `8` to avoid inheriting the editor's previous setting). A cross-project Flow media UUID (or an un-captioned UUID with a verified local fallback) as `initial_frame`/`end_frame`, a character on `t2v` or `i2v`, and a character id missing its display name return the exit-36-equivalent envelope (an uncatalogued/unusable UUID or a non-path string such as `@Name` returns 400 before dispatch); `r2v` takes named characters with or without local `reference_images`. An explicit id's display name can come from its `reference_entity_names` entry or a matching `@Name` in the prompt ([#723](https://github.com/ffroliva/gflow-cli/issues/723)). `initial_frame`, `end_frame`, and `reference_images` each accept **either a local file path or the Flow image UUID of a generated asset** — pass a generated image's id straight in to chain image→video, and gflow attaches it for you. Since v0.58.0 (#529) the CLI and MCP surfaces are unified for i2v frames: the UUID keeps its identity and is enriched with the catalog's recorded display name plus an integrity-verified local fallback, so both transports prefer **selecting the exact asset in the project's media picker** (no duplicate upload). On `labs.google`, a missing tile falls back to re-uploading the recorded local file only if its byte count/SHA-256 still match; on `flow.google.com` (#1542), there is no local-file upload fallback — a missing or unrendered same-project tile reloads the grid up to ~90 s (plus at most one reload cycle) and fails with the exit-32-equivalent envelope. A UUID that isn't in your local asset catalog is rejected up front with a clear "Reference Not Found" error; a catalogued asset with neither a display name nor a verified local file gives a "Reference Not Usable" error (re-generate it or pass a local path). A video clip, or the media UUID of a catalogued clip, in `reference_images` returns a 400 naming `gflow_edit_video`, which edits a local clip with reference images ([#1540](https://github.com/ffroliva/gflow-cli/issues/1540)). For `r2v`, MCP resolves a catalogued image UUID to a verified local file before queuing the job. The flow.google.com driver receives the file for upload. A UUID without a local copy cannot be used this way. `ui_mode` selects the Flow UI arm (#299 PR-A, mirroring CLI `--ui-mode`) and **applies to every mode of this tool, including `r2v`** — unlike the CLI, where `video r2v`/`chain` have no flag and follow the env-only path. On labs and the classic migrated composer, video generation has **only a classic driver**, so `auto` ≡ `classic`: both verify the classic editor pre-submit and abort before spending credits if it is unreachable. `ui_mode="agentic"` is rejected with a 400 problem-details envelope, because no agentic video driver exists yet. (An agent-only migrated composer is routed before this check: text-to-video runs through its chat agent under `ui_mode` `auto` or `classic` — `"agentic"` is still rejected with the 400 above, before any browser work — and other video forms return the exit-36-equivalent envelope before anything is clicked.) Values are matched case-insensitively. (MCP tools return envelopes, never process exit codes — the CLI equivalents of these aborts are exit 28 and exit 2 respectively.) See [CONFIGURATION § GFLOW_CLI_UI_MODE](CONFIGURATION.md#gflow_cli_ui_mode). On a model Flow is retiring, the reply (the `wait=true` result and the queued task's `tasks/get` result alike) also carries `"warnings": [{"type": "model_retiring", "model": "", "retires_on": ""}]` ([#1375](https://github.com/ffroliva/gflow-cli/issues/1375)); the job still runs, and once Flow's menu stops offering the model it fails before submit, charged nothing. + `model` is `nano2` (Nano Banana 2.1 on flow.google.com; `nano2.1` also accepted), `nano2-lite` (Nano Banana 2 Lite), `nano-pro` (Nano Banana Pro) or `image4` (Imagen 4, no longer in Flow's menu); other aliases are accepted too. On migrated `flow.google.com` accounts, T2I and local-file I2I are supported with Nano Banana 2.1 (`nano2`, #958) / 2 Lite / Pro, all five aspects (16:9, 4:3, 1:1, 3:4, 9:16) and count 1–4; the measured shapes are sent as a direct `ogiZ0b` request with a token from a headless browser, and the rest are submitted by Flow's own page ([DIRECT_TRANSPORT](https://github.com/ffroliva/gflow-cli/blob/develop/docs/DIRECT_TRANSPORT.md)). `@Name` character mentions in the prompt are attached through the composer's `@` picker and verified as character chips before submit (#723). each explicit `reference_entities` id needs its `reference_entity_names` entry or a matching `@Name` in the prompt (otherwise exit 36); a `reference_images` UUID is referenced in place when the catalog records it in the same `project` (#995), and a local `reference_images` file is uploaded into the project once and mentioned in place on later calls with the same file, like the CLI's `--ref` ([#772](https://github.com/ffroliva/gflow-cli/issues/772)); an output path gflow cannot write ends in the exit-11-equivalent envelope, with the image still in the Flow project ([#1091](https://github.com/ffroliva/gflow-cli/issues/1091)); other UUID references, instructions and Imagen 4 remain pre-submit refusals there. An agent-only composer (see below) takes T2I only. When Flow returns fewer images than `count`, the reply is still `completed`, `files` lists the images produced, and the `warnings` list includes the object `{"type": "images_missing", "requested": 4, "returned": 3}` (a `failed` reply carries it too when the images came back short before the failure) ([#1489](https://github.com/ffroliva/gflow-cli/issues/1489)). Each saved image is checked against the request at no cost, and a mismatch adds a `warnings` entry carrying its `media_name`: `aspect_mismatch` (decoded `width`/`height` more than 10 % off the `requested` aspect), `echoed_reference` (byte-identical to a local reference image) or `tiny_file` (under 8 KB, with `bytes` and `min_bytes`); the reply stays `completed` and the file is kept, and `wait=true` and `tasks/get` report the same entries ([#1534](https://github.com/ffroliva/gflow-cli/issues/1534)). A path that reads the images off the page (Agent mode, an agent-only composer, or a lost reply) fails instead when some are missing. The queued (`wait=false`) and blocking (`wait=true`) calls use the same typed payload and worker path. +* `gflow_generate_video(prompt, mode, aspect, initial_frame, end_frame, reference_images, reference_entities, reference_entity_names, model, duration, resolution, count, tools, profile, project, project_name, ui_mode, out_file, max_credits, wait, browser_visibility)`: Triggers vertical or landscape video generation (Veo). `out_file` sets an explicit destination file path (mirrors CLI `--out-file`; legacy `output` removed in #1158). `mode` is `t2v`/`i2v`/`r2v`; `model` (`veo_lite`/`veo_fast`/`veo_quality`/`omni_flash`/`omni_1_2_flash`, aliases accepted), `duration` (seconds — 4/6/8 for Veo 3.1, 4/6/8/10 for omni_flash, every integer 3–15 for omni_1_2_flash, at most 10 with an `end_frame`; with no `model`, 4/6/8/10), `resolution` ('360p' or '720p', supported on the Omni models; on any other model, or on the labs editor, the job fails pre-submit with the exit-11-equivalent envelope and no credits spent). **Whether Flow renders a duration control at all is account/cohort-dependent**: on an account that renders none, the job is accepted here and fails in the worker pre-submit (exit 23 equivalent on the labs driver, exit 11 equivalent on the migrated `flow.google.com` host — now the default t2v route, #650 — no credits spent either way) rather than being rejected up front — see [KNOWN_ISSUES](https://github.com/ffroliva/gflow-cli/blob/main/KNOWN_ISSUES.md) (#451/#288/#630), and `count` mirror the CLI `gflow video` flags — an omitted `model` lets the transport apply its i2v veo-lite default (issue #125), and every model — `omni_flash` included — accepts i2v with a start frame and with an end frame (wire-verified 2026-09-02, issue #626); `i2v` requires `initial_frame`, `r2v` requires `reference_images` **or** `reference_entities`; `project` generates into an existing Flow project id (mirrors CLI `--project`; when omitted, [`GFLOW_CLI_PROJECT`](CONFIGURATION.md#gflow_cli_project) is used unless `project_name` asks for a new project, #1039); on an account Google has moved to `flow.google.com` (`GFLOW_CLI_FLOW_HOST`, read from the server/daemon environment, not per call — see [CONFIGURATION § GFLOW_CLI_FLOW_HOST](CONFIGURATION.md#gflow_cli_flow_host)) omitting `project` creates one there first (#864); there, on the classic migrated composer (an agent-only one takes text-to-video only — see below), the ported modes are text-to-video; image-to-video with a **local** `initial_frame` (at the measured key, 9:16 with the default Veo 3.1 Lite and no `duration` / `resolution` / `end_frame`, the frame is uploaded and the request sent over direct HTTP with a headless browser; see [DIRECT_TRANSPORT](https://github.com/ffroliva/gflow-cli/blob/develop/docs/DIRECT_TRANSPORT.md)), optionally with a **local** `end_frame` (start+end interpolation, #639 — on the UI path local files are uploaded under a **run-unique** name like `hero-a1b2c3d4.png`, [#792](https://github.com/ffroliva/gflow-cli/issues/792)), **or** captioned image UUIDs the local catalog records in the same `project` ([#1542](https://github.com/ffroliva/gflow-cli/issues/1542), bound in place on the UI path via `/asb/` — the UUID frame skips upload, including Start+End and mixed local+UUID pairs where only the local frame uploads); and reference-to-video with local `reference_images` (each file is uploaded the same way — run-unique name included — and attached as an `@` mention of *that* name in the prompt; `duration` there accepts every integer from `3` through `15` with explicit `model="omni_1_2_flash"` (set through its duration slider; Google AI plans are required above `10`) and `4/6/8/10` with explicit `omni_flash`; Veo or an unspecified model accepts only `8`, because measured shorter Veo requests dropped the references and billed text-to-video, so any other value returns the exit-11-equivalent envelope. An omitted r2v duration still pins `8` to avoid inheriting the editor's previous setting). A cross-project Flow media UUID (or an un-captioned UUID with a verified local fallback) as `initial_frame`/`end_frame`, a character on `t2v` or `i2v`, and a character id missing its display name return the exit-36-equivalent envelope (an uncatalogued/unusable UUID or a non-path string such as `@Name` returns 400 before dispatch); `r2v` takes named characters with or without local `reference_images`. An explicit id's display name can come from its `reference_entity_names` entry or a matching `@Name` in the prompt ([#723](https://github.com/ffroliva/gflow-cli/issues/723)). `initial_frame`, `end_frame`, and `reference_images` each accept **either a local file path or the Flow image UUID of a generated asset** — pass a generated image's id straight in to chain image→video, and gflow attaches it for you. Since v0.58.0 (#529) the CLI and MCP surfaces are unified for i2v frames: the UUID keeps its identity and is enriched with the catalog's recorded display name plus an integrity-verified local fallback, so both transports prefer **selecting the exact asset in the project's media picker** (no duplicate upload). On `labs.google`, a missing tile falls back to re-uploading the recorded local file only if its byte count/SHA-256 still match; on `flow.google.com` (#1542), there is no local-file upload fallback — a missing or unrendered same-project tile reloads the grid up to ~90 s (plus at most one reload cycle) and fails with the exit-32-equivalent envelope. A UUID that isn't in your local asset catalog is rejected up front with a clear "Reference Not Found" error; a catalogued asset with neither a display name nor a verified local file gives a "Reference Not Usable" error (re-generate it or pass a local path). A video clip, or the media UUID of a catalogued clip, in `reference_images` returns a 400 naming `gflow_edit_video`, which edits a local clip with reference images ([#1540](https://github.com/ffroliva/gflow-cli/issues/1540)). For `r2v`, MCP resolves a catalogued image UUID to a verified local file before queuing the job. The flow.google.com driver receives the file for upload. A UUID without a local copy cannot be used this way. `ui_mode` selects the Flow UI arm (#299 PR-A, mirroring CLI `--ui-mode`) and **applies to every mode of this tool, including `r2v`** — unlike the CLI, where `video r2v`/`chain` have no flag and follow the env-only path. On labs and the classic migrated composer, video generation has **only a classic driver**, so `auto` ≡ `classic`: both verify the classic editor pre-submit and abort before spending credits if it is unreachable. `ui_mode="agentic"` is rejected with a 400 problem-details envelope, because no agentic video driver exists yet. (An agent-only migrated composer is routed before this check: text-to-video runs through its chat agent under `ui_mode` `auto` or `classic` — `"agentic"` is still rejected with the 400 above, before any browser work — and other video forms return the exit-36-equivalent envelope before anything is clicked.) Values are matched case-insensitively. (MCP tools return envelopes, never process exit codes — the CLI equivalents of these aborts are exit 28 and exit 2 respectively.) See [CONFIGURATION § GFLOW_CLI_UI_MODE](CONFIGURATION.md#gflow_cli_ui_mode). On a model Flow is retiring, the reply (the `wait=true` result and the queued task's `tasks/get` result alike) also carries `"warnings": [{"type": "model_retiring", "model": "", "retires_on": ""}]` ([#1375](https://github.com/ffroliva/gflow-cli/issues/1375)); the job still runs, and once Flow's menu stops offering the model it fails before submit, charged nothing. * `gflow_edit_video(source, prompt, reference_images, model, aspect, resolution, max_credits, tools, profile, project, project_name, out_file, wait)`: Edits a local video file (`.mp4`/`.m4v`/`.mov`/`.3gp`/`.avi`, up to 1 GB) or an existing Flow clip media UUID on `flow.google.com` (`jIps6`, Omni models only, default `omni-1.2`, single-clip output) with `0–5` optional `reference_images` (local paths or catalog image UUIDs resolved to local files) for a local source file. With a media UUID source, `reference_images` are refused before the queue (exit 11, `charged: no`): references are not ported to editing an existing clip yet; download the clip with `gflow data download MEDIA_ID --out DIR` and pass the file. `max_credits` enforces Flow's pre-submit credit quote (refusing missing or over-cap quotes at zero spend). Local files support optional `aspect` (`16:9`/`9:16`) and `resolution` (`360p`/`720p`); existing Flow media UUIDs need a project (`project`, else the catalog's record, else `GFLOW_CLI_PROJECT`, the CLI's resolution) and keep source aspect at `720p`. The worker refuses a missing or unsupported file (exit 11), `GFLOW_CLI_FLOW_HOST=labs.google` (exit 36) and a mistyped queued payload (`QueueSchemaError`, exit 30) before it creates a project, all `charged: no`. `out_file` must stay inside the configured output directory. Gated by `--no-spend` with the other credit-spending tools. @@ -143,7 +143,7 @@ is [BROWSER_MODES](BROWSER_MODES.md). > different axis entirely: it buys a *look*, not an identity. For `r2v`, supply `reference_images` or `reference_entities` alongside a prompt mention. Use > `gflow_character_list` to discover ids and display names on `flow.google.com`. On that host, > each id needs its display name in `reference_entity_names` or a matching `@Name` in the prompt. -> An id with neither is exit 36. See [REFERENCE_STRATEGIES](REFERENCE_STRATEGIES.md). +> An id with neither is exit 36. See [REFERENCE_STRATEGIES](https://github.com/ffroliva/gflow-cli/blob/develop/docs/REFERENCE_STRATEGIES.md). > **`wait` and long generations ([#481](https://github.com/ffroliva/gflow-cli/issues/481), [#1097](https://github.com/ffroliva/gflow-cli/issues/1097)).** > Both generation tools take `wait` (default `true`), and its schema description in @@ -693,7 +693,7 @@ retried by the SDK. These requests are counted in telemetry under the client nam > surface are built as internal foundation but are **not yet wired into** > `gflow serve` — it currently runs the MCP server (Streamable HTTP or SSE) and the > OpenAI-compatible image route above. See the -> [CHANGELOG](../CHANGELOG.md) for the roadmap. +> [CHANGELOG](https://github.com/ffroliva/gflow-cli/blob/develop/CHANGELOG.md) for the roadmap. > **Settings reach the server through its environment, not your shell's `.env`.** An MCP > client starts `gflow mcp run` in a directory of its own choosing, so a `.env` beside your diff --git a/website/docs/MEDIA_LIBRARY.md b/website/docs/MEDIA_LIBRARY.md index 21f55b2d9..b1e355fe8 100644 --- a/website/docs/MEDIA_LIBRARY.md +++ b/website/docs/MEDIA_LIBRARY.md @@ -4,7 +4,7 @@ > gflow-cli has hit driving it. All claims here are reverse-engineered from > live recon (2026-08-15/16, evidence in [#529](https://github.com/ffroliva/gflow-cli/issues/529) > / [#543](https://github.com/ffroliva/gflow-cli/issues/543) and the -> [#529 picker spike](superpowers/spikes/2026-08-15-picker-tile-alt-text.md)); +> [#529 picker spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-08-15-picker-tile-alt-text.md)); > Google documents none of it publicly and may change any of it without notice. ## Why this doc exists @@ -106,7 +106,7 @@ Freshness is layered, cheapest-first: budget. This heals the run on every surface (CLI, MCP, `gflow run`); the catalog write still needs the CLI's resolver (`store` mode only). Reach is what the empty picker lists: 15 of 21 assets in the measured project - ([spike](superpowers/spikes/2026-11-12-migrated-listing-captions.md)). + ([spike](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-11-12-migrated-listing-captions.md)). 3. **Bulk reconciliation** — `gflow data sync --names` ([#543](https://github.com/ffroliva/gflow-cli/issues/543), shipped) for cold catalogs and ghost detection; `gflow doctor` @@ -189,7 +189,7 @@ surfaces that support character entities (the tab set varies by mode), and a - **Reference resolution** (v0.58.0, #529): `catalog UUID → display name → picker search → exact-UUID tile → attach`, falling back to a verified local upload, else a typed error. See - [REFERENCE_STRATEGIES.md](REFERENCE_STRATEGIES.md). + [REFERENCE_STRATEGIES.md](https://github.com/ffroliva/gflow-cli/blob/develop/docs/REFERENCE_STRATEGIES.md). - **Shipped**: `gflow doctor` ([#542](https://github.com/ffroliva/gflow-cli/issues/542)) reports nameless/ghost rows; `gflow data sync --names` ([#543](https://github.com/ffroliva/gflow-cli/issues/543)) reconciles the diff --git a/website/docs/MOVIE.md b/website/docs/MOVIE.md index 71ed385de..8fcd875f1 100644 --- a/website/docs/MOVIE.md +++ b/website/docs/MOVIE.md @@ -304,12 +304,12 @@ Scenes then name the costume state, and continuity is a lookup rather than a hop **The full identity resolution ladder** — entity, then the entity's own plate, then a plate cut from a take, then prose canon, with the rule that descending a rung is recorded next to the shot — lives in -[`skills/video-production/SKILL.md`](../skills/video-production/SKILL.md) step 4a. Read it +[`skills/video-production/SKILL.md`](https://github.com/ffroliva/gflow-cli/blob/develop/skills/video-production/SKILL.md) step 4a. Read it before planning a multi-shot piece; a manifest that silently lands on the bottom rung produces a different actor in every scene. See [CHARACTER.md](CHARACTER.md) for the underlying entity model and -[CHARACTER_RECON.md](CHARACTER_RECON.md) for the reverse-engineered wire +[CHARACTER_RECON.md](https://github.com/ffroliva/gflow-cli/blob/develop/docs/CHARACTER_RECON.md) for the reverse-engineered wire protocol. ## Scene instructions (project brief cards) diff --git a/website/docs/PROMPT_EXPANSION.md b/website/docs/PROMPT_EXPANSION.md index b6ad03d7a..08fcf2509 100644 --- a/website/docs/PROMPT_EXPANSION.md +++ b/website/docs/PROMPT_EXPANSION.md @@ -40,7 +40,7 @@ Without `GFLOW_CLI_LLM_API_KEY` (or `GFLOW_CLI_LLM_BASE_URL`) the tool leaves yo | **Expansion** | `ExpansionResult(original, expanded, was_expanded)` | The result; `expanded == original` when nothing changed. | | **Provenance** | `AppliedTool(name, version, model, config_hash, params)` | Recorded in history when a tool rewrote a prompt. | -The tool itself lives in [`src/gflow_cli/tools/`](../src/gflow_cli/tools/): `spec.py` (schema), +The tool itself lives in [`src/gflow_cli/tools/`](https://github.com/ffroliva/gflow-cli/tree/develop/src/gflow_cli/tools): `spec.py` (schema), `runtime.py` (`apply_tool`), `expander.py` (the provider-agnostic `PromptExpander`), `banned.py` (keyword stripping), `invocation.py` (provenance + MCP adapter). @@ -74,7 +74,7 @@ The instruction also carries "Critical Rules": name real cameras/brands, include use prestigious context anchors ("Vanity Fair editorial", "National Geographic cover"), use ALL CAPS for hard constraints, "prominently displayed" for products, and **never** emit banned keywords. The full text is the `system_template` in -[`creative-director.toml`](../src/gflow_cli/tools/builtin/creative-director.toml). +[`creative-director.toml`](https://github.com/ffroliva/gflow-cli/blob/develop/src/gflow_cli/tools/builtin/creative-director.toml). --- @@ -112,7 +112,7 @@ with different vocabularies. | `abstract` | Particle/fluid sims, smoke/ink textures, gradient-shift color, VJ aesthetic. | An **unknown** style is ignored with a `tool_unknown_style` warning — never an error. Full -vocabularies live in [`creative-director.toml`](../src/gflow_cli/tools/builtin/creative-director.toml); +vocabularies live in [`creative-director.toml`](https://github.com/ffroliva/gflow-cli/blob/develop/src/gflow_cli/tools/builtin/creative-director.toml); `gflow tools show creative-director` lists the current set. --- @@ -142,7 +142,7 @@ prompt the tool left unchanged is never altered. ## 6. Never-fatal contract -The `PromptExpander` ([`expander.py`](../src/gflow_cli/tools/expander.py)) is +The `PromptExpander` ([`expander.py`](https://github.com/ffroliva/gflow-cli/blob/develop/src/gflow_cli/tools/expander.py)) is stdlib-only (`urllib`) and bounded. `expand()` returns the original prompt with `was_expanded=False` in every degraded case. Generation `--tool` calls warn and continue; `gflow tools run` returns a typed error on this result: @@ -193,7 +193,7 @@ reference and worked examples (Google, OpenRouter, a local Docker proxy, keyless ## 8. Provenance — what history records When a tool rewrites a prompt, the generation is recorded with full provenance -([`data/_recorder_core.py`](../src/gflow_cli/data/_recorder_core.py), `_tool_metadata`): +([`data/_recorder_core.py`](https://github.com/ffroliva/gflow-cli/blob/develop/src/gflow_cli/data/_recorder_core.py), `_tool_metadata`): - **`prompt`** column = the user's **original** prompt. - **`expanded_prompt`** column = the **submitted** (rewritten) prompt. @@ -219,7 +219,7 @@ a recording failure warns and returns exit 0 — never a non-zero exit after a p ## 9. Relationship to the `expand_prompt` MCP prompt The MCP server also exposes an older, now-**deprecated** **prompt template** named `expand_prompt` -([`mcp/prompts.py`](../src/gflow_cli/mcp/prompts.py)). It predates the tools framework and overlaps +([`mcp/prompts.py`](https://github.com/ffroliva/gflow-cli/blob/develop/src/gflow_cli/mcp/prompts.py)). It predates the tools framework and overlaps functionally with `creative-director`, but they are **different surfaces**: | | `expand_prompt` (MCP prompt) | `creative-director` (tool) | diff --git a/website/docs/SECURITY.md b/website/docs/SECURITY.md index 79a42b900..aeb3edef4 100644 --- a/website/docs/SECURITY.md +++ b/website/docs/SECURITY.md @@ -259,7 +259,7 @@ If a profile dir or `.env` containing real secrets ever lands in a Git repo: ## `.gitignore` rules in this repo -The repository's [`.gitignore`](../.gitignore) excludes: +The repository's [`.gitignore`](https://github.com/ffroliva/gflow-cli/blob/develop/.gitignore) excludes: ``` auth/ # any project-local auth dir @@ -343,6 +343,6 @@ None to date. This section will list public CVEs, advisories, and patched versio ## See also -- [DISCLAIMER](../DISCLAIMER.md) — legal scope & takedown policy +- [DISCLAIMER](https://github.com/ffroliva/gflow-cli/blob/develop/DISCLAIMER.md) — legal scope & takedown policy - [AUTHENTICATION](AUTHENTICATION.md) — full auth lifecycle - [CONFIGURATION](CONFIGURATION.md) — secret-bearing env vars diff --git a/website/docs/TOOLS.md b/website/docs/TOOLS.md index d3c43c369..e0b2a5fa7 100644 --- a/website/docs/TOOLS.md +++ b/website/docs/TOOLS.md @@ -26,7 +26,7 @@ A tool is invoked uniformly in two ways: Tools are **pure prompt transforms** today: they read a prompt and return a (possibly rewritten) prompt. The richer `Tool.apply(ctx) → outcome` dispatch framework (workflow tools beyond prompt rewriting) is a deferred design — see -[the tool-abstraction evaluation](superpowers/research/2026-06-27-tool-abstraction-evaluation.md). +[the tool-abstraction evaluation](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/research/2026-06-27-tool-abstraction-evaluation.md). ### Lineage @@ -195,7 +195,7 @@ without collision — e.g. `creative-director` has both a `product` *image* styl ## 5. The TOML schema A tool is a single TOML file validated into a Pydantic `ToolSpec` -([`src/gflow_cli/tools/spec.py`](../src/gflow_cli/tools/spec.py)). All models are **frozen** +([`src/gflow_cli/tools/spec.py`](https://github.com/ffroliva/gflow-cli/blob/develop/src/gflow_cli/tools/spec.py)). All models are **frozen** (immutable after load). ### Top-level (`ToolSpec`) @@ -235,7 +235,7 @@ A tool is a single TOML file validated into a Pydantic `ToolSpec` ## 6. How a tool is applied (runtime contract) -[`src/gflow_cli/tools/runtime.py`](../src/gflow_cli/tools/runtime.py): +[`src/gflow_cli/tools/runtime.py`](https://github.com/ffroliva/gflow-cli/blob/develop/src/gflow_cli/tools/runtime.py): 1. **`build_instruction(config, style, category, *, panels=None)`** — starts from `config.system_template`, appends the bare label `Target medium: image.` or `Target medium: video.` when a category is @@ -264,8 +264,8 @@ generation. `gflow tools run` reports a typed error because expansion is its onl 1. Write `src/gflow_cli/tools/builtin/.toml` following the schema in §5. 2. That's it — the loader auto-discovers every `*.toml` in the `builtin/` package via `importlib.resources` at startup - ([`loader.py`](../src/gflow_cli/tools/loader.py)), validates it into a `ToolSpec`, and the - registry ([`registry.py`](../src/gflow_cli/tools/registry.py)) exposes it under `spec.name`. + ([`loader.py`](https://github.com/ffroliva/gflow-cli/blob/develop/src/gflow_cli/tools/loader.py)), validates it into a `ToolSpec`, and the + registry ([`registry.py`](https://github.com/ffroliva/gflow-cli/blob/develop/src/gflow_cli/tools/registry.py)) exposes it under `spec.name`. Invalid TOML or a schema violation **fails loud** (`ConfigurationError`) the first time any `tools` / `--tool` path runs. 3. Bump the tool's `version` whenever you change behavior; the `config_hash` (a SHA-256 of the @@ -296,7 +296,7 @@ analogue of Flow's Tools menu.) ## 8. MCP exposure Per AGENTS.md §61 (CLI ↔ MCP parity), the tools surface is mirrored on the MCP server -([`src/gflow_cli/mcp/`](../src/gflow_cli/mcp/)): +([`src/gflow_cli/mcp/`](https://github.com/ffroliva/gflow-cli/tree/develop/src/gflow_cli/mcp)): - **`gflow_list_tools`** — mirrors `gflow tools list`; returns `[{name, title, description, category}, …]`. @@ -330,5 +330,5 @@ for the full comparison and migration guidance. - [CONFIGURATION.md](CONFIGURATION.md) — `GFLOW_CLI_LLM_BASE_URL` / `_API_KEY` / `_MODEL`. - [DATA_LAYER.md](DATA_LAYER.md) — how `expanded_prompt` and `metadata_json.tool` are recorded. - [MCP.md](MCP.md) — the MCP server. -- [tool-abstraction evaluation](superpowers/research/2026-06-27-tool-abstraction-evaluation.md) — +- [tool-abstraction evaluation](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/research/2026-06-27-tool-abstraction-evaluation.md) — the deferred S3 dispatch-framework design. diff --git a/website/docs/USAGE.md b/website/docs/USAGE.md index 46d1fe66d..c868bced0 100644 --- a/website/docs/USAGE.md +++ b/website/docs/USAGE.md @@ -143,7 +143,7 @@ back. `--search "r2v duration"` narrows that to a handful with the host-specific at the top. Curated answers rank first: the `**"How do I …?"** →` rows in -[INDEX](INDEX.md#topic-shortcuts) were each written to *be* an answer, so they come above +[INDEX](https://github.com/ffroliva/gflow-cli/blob/develop/docs/INDEX.md#topic-shortcuts) were each written to *be* an answer, so they come above raw body-text matches for the same term. Piping works — the page is emitted as its own Markdown, not as rendered boxes: @@ -481,7 +481,7 @@ Notes: - **flow.google.com only.** There is no labs.google route; `GFLOW_CLI_FLOW_HOST=labs.google` refuses the command with exit 36. - **Cost:** the 1080p export was measured free (1 observation, 2026-10-07), as were the 720p - export and the 270p GIF ([2026-11-29](superpowers/spikes/2026-11-29-export-billing-720p-270p.md)); the 4K export on Flow Ultra spends credits (measured 50 credits on Omni 1.2 Flash, 2026-11-23). + export and the 270p GIF ([2026-11-29](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-11-29-export-billing-720p-270p.md)); the 4K export on Flow Ultra spends credits (measured 50 credits on Omni 1.2 Flash, 2026-11-23). - Saved as `/videos//_.` (`.mp4` or `.gif`). ## `gflow image generate` / `gflow video generate` @@ -872,7 +872,7 @@ entities (it carries start/end frames instead). `--ref` is different: it attaches an arbitrary **image** (`referenceImages`), not a saved identity, and can be combined with a `@Name` for "this identity, in this look". -See [REFERENCE_STRATEGIES.md](REFERENCE_STRATEGIES.md) for the full decision guide. +See [REFERENCE_STRATEGIES.md](https://github.com/ffroliva/gflow-cli/blob/develop/docs/REFERENCE_STRATEGIES.md) for the full decision guide. ## `gflow image batch` @@ -886,7 +886,7 @@ Tab-separated columns. Only `prompt` is required; remaining columns fall back to promptcountaspect_ratiomodel ``` -Lines starting with `#` and blank lines are skipped. Example: [`test_assets/sample_batch.tsv`](../test_assets/sample_batch.tsv). +Lines starting with `#` and blank lines are skipped. Example: [`test_assets/sample_batch.tsv`](https://github.com/ffroliva/gflow-cli/blob/develop/test_assets/sample_batch.tsv). ```tsv a small calico kitten sitting on a windowsill @@ -908,7 +908,7 @@ an isometric pixel-art bakery 1 1:1 nano2 ] ``` -Example: [`test_assets/sample_batch.json`](../test_assets/sample_batch.json). +Example: [`test_assets/sample_batch.json`](https://github.com/ffroliva/gflow-cli/blob/develop/test_assets/sample_batch.json). ### Session behaviour @@ -923,7 +923,7 @@ All prompts in a batch share one Flow project. The editor is opened once and sta - `MAX_BATCH_PROMPTS = 5` (defined in `src/gflow_cli/image_batch.py`). To raise, edit the constant. -### Exit codes +### Batch exit codes - `0` — all rows succeeded. - `1` — invalid manifest (file not found, parse error, unknown aspect/model). @@ -1049,7 +1049,7 @@ Options: > are not ported to the migrated composer yet; `r2v` takes a character with > `--reference-entity` paired with `--reference-entity-name` (#723). `image t2i` and local-file `image i2i` also run on a moved > account, and on images a character can be tagged with `@Name` or `--reference-entity` -> (see [REFERENCE_STRATEGIES § flow.google.com](REFERENCE_STRATEGIES.md#on-flowgooglecom-images-and-video-r2v-723)). An image `--ref ` is referenced in place, with no upload, when the +> (see [REFERENCE_STRATEGIES § flow.google.com](https://github.com/ffroliva/gflow-cli/blob/develop/docs/REFERENCE_STRATEGIES.md#on-flowgooglecom-images-and-video-r2v-723)). An image `--ref ` is referenced in place, with no upload, when the > local catalog records that image in the same `--project` and keeps its Flow caption > ([#995](https://github.com/ffroliva/gflow-cli/issues/995)); any other UUID, and instruction/Imagen-4 > image forms, still exit 36. `flow.google.com` forces the migrated composer, @@ -1085,7 +1085,7 @@ the editor's frame slot via the media dialog, then Flow fires > - **Default shape (direct HTTP, since v0.108.0):** a local `--initial-frame` at 9:16 with > the default Veo 3.1 Lite model and no `--duration`, `--resolution`, `--end-frame`, or > `--max-credits` uploads the frame and submits over direct HTTP with a headless browser -> ([DIRECT_TRANSPORT](DIRECT_TRANSPORT.md)). +> ([DIRECT_TRANSPORT](https://github.com/ffroliva/gflow-cli/blob/develop/docs/DIRECT_TRANSPORT.md)). > - **Local files (UI route):** other local start-frame shapes and local `--end-frame` > interpolation upload the file through the editor's own Upload entry (it stays in the > project's library like any upload — a second run uploads it again), find it in the Frames @@ -1142,7 +1142,7 @@ gflow video i2v ./hero.png "Slow camera arc, soft golden light" Local frame files follow the [`gflow image upload`](#gflow-image-upload) rules (header check, 20 MB cap), and a UUID must be catalogued in the same `--project` (exit 36 otherwise, see -[exit codes](#exit-codes-1)). Start+end submits were measured with Veo 3.1 Fast and Lite, and with +[exit codes](#exit-codes)). Start+end submits were measured with Veo 3.1 Fast and Lite, and with Omni 1.2 (which accepts at most 10 s with an end frame); Veo 3.1 Quality uses the same key family as Fast but was not run live (#1594). Whether the two frames must share an aspect ratio has not been measured (#1603). @@ -3175,7 +3175,7 @@ The table below is the default (legacy) set. `GFLOW_CLI_EXIT_CODES=2` opts in to | `28` | `UiModeUnavailableError` | The Flow UI arm this command required (`--ui-mode`/`GFLOW_CLI_UI_MODE`; `-i` forces agentic for images; **labs video always requires classic** — no agentic labs video driver exists; an agent-only `flow.google.com` composer ([#799](https://github.com/ffroliva/gflow-cli/issues/799)) is routed before this policy and never exits 28) couldn't be reached after a switch attempt; aborted before submitting — no credits spent (issue #299) | Retry (the cohort flaps per load); try another `--profile`; for images you can also relax `GFLOW_CLI_UI_MODE` — for video there is nothing to relax | | `29` | `MentionIndexUnavailableError` | An `@mention` was present but the catalog source needed to resolve it (character entities or media assets) failed to load — distinct from an empty index, which is not an error. Also raised on a page served labs for an image character known only by name (#723), since that picker attaches by entity id | Check network connectivity (character source) or `GFLOW_CLI_DB_PATH` / filesystem permissions (media source), then retry. For the by-name character on labs, pass `--reference-entity ` | | `30` | `QueueSchemaError` | A `gflow serve`/MCP worker-queue task payload has an unrecognized `schema_version` or fails validation against the typed request DTOs | Usually means gflow-cli was downgraded after a newer version enqueued the task, or the payload was hand-edited; re-enqueue with a compatible version | -| `31` | `FlowAppError` | Flow did not serve the page gflow asked for. Two shapes: its error-boundary page rendered instead of the editor (a transient client-side crash), or it redirected to `flow.google.com/about` instead of the project ([#756](https://github.com/ffroliva/gflow-cli/issues/756)) | Crash: retry shortly; if it persists, Flow itself is degraded. `/about`: run `gflow auth login --profile ` and finish Google's "Confirm it's you" if it asks; then open the project in a browser on that host and confirm this account can reach it. A retry is **measured** not to help — 5/5 consecutive attempts during a live occurrence landed on `/about` again ([2026-09-11](superpowers/spikes/2026-09-11-about-redirect-is-stable-for-an-account.md); the [2026-09-10 run](superpowers/spikes/2026-09-10-about-redirect-stability.md) got 0/5 only because the redirect had stopped reproducing) — so gflow does not flag it retryable. One cause is measured since: Google wanted the account to "Confirm it's you" while its cookies were healthy ([2026-09-23](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-09-23-about-cta-leads-to-google-reauth.md)); `gflow auth login` waits on that check ([#902](https://github.com/ffroliva/gflow-cli/issues/902)) | +| `31` | `FlowAppError` | Flow did not serve the page gflow asked for. Two shapes: its error-boundary page rendered instead of the editor (a transient client-side crash), or it redirected to `flow.google.com/about` instead of the project ([#756](https://github.com/ffroliva/gflow-cli/issues/756)) | Crash: retry shortly; if it persists, Flow itself is degraded. `/about`: run `gflow auth login --profile ` and finish Google's "Confirm it's you" if it asks; then open the project in a browser on that host and confirm this account can reach it. A retry is **measured** not to help — 5/5 consecutive attempts during a live occurrence landed on `/about` again ([2026-09-11](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-09-11-about-redirect-is-stable-for-an-account.md); the [2026-09-10 run](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-09-10-about-redirect-stability.md) got 0/5 only because the redirect had stopped reproducing) — so gflow does not flag it retryable. One cause is measured since: Google wanted the account to "Confirm it's you" while its cookies were healthy ([2026-09-23](https://github.com/ffroliva/gflow-cli/blob/develop/docs/superpowers/spikes/2026-09-23-about-cta-leads-to-google-reauth.md)); `gflow auth login` waits on that check ([#902](https://github.com/ffroliva/gflow-cli/issues/902)) | | `32` | `ReferenceNotFoundError` | A referenced media NAME is not in this project's picker. Flow indexes a short auto-caption, not the generation prompt, so a prompt used as a reference name never matches. On flow.google.com this includes an unmatched `@Name` when the catalog is available. For an image character (#723) it is also raised when no picker option is titled exactly the name, several are, or the match is media; after up to ~90 s of reloads, for a catalogued same-`--project` UUID ref (`image i2i --ref`, #995, or `video i2v` Start/End frame, #1542) whose image is no longer in the project grid (deleted in Flow); and when an `@` reference attaches out of order, landing before a chip already in the prompt (#997); and when a local `--ref` upload does not become the `@` picker's active row within 8 s, or the new chip is not that upload (`video extend`, `video r2v`, and the `image i2i` fallback, [#1581](https://github.com/ffroliva/gflow-cli/issues/1581)), before anything is submitted | Reference the asset by its media UUID (if Flow deleted it, regenerate it or pass its local file), pass a local file with `--ref`, or check what exists with `gflow data list images`. For a character the picker never offers (#1333), check the name with `gflow character list --project `; when several options or a media asset share the name, rename the colliding asset in Flow, or give the character a unique one-word name. Out of order: re-run; if it repeats, report it with the reference count and window size | | `33` | — (`gflow doctor` verdict) | Doctor found warn/fail findings — a successful diagnosis, not an error class | Review the report; see [`gflow doctor`](#gflow-doctor) | | `34` | `SyncPartialError` | `gflow data sync` failed on some projects but succeeded on others — completed writes stay committed | Retryable: re-run the same command; it resumes with what is still nameless (see [`gflow data sync`](#gflow-data-sync)) | @@ -3328,5 +3328,5 @@ async with FlowApiClient(profile_dir=profile_dir) as client: - [AUTHENTICATION](AUTHENTICATION.md) — auth flow + multi-account - [ARCHITECTURE](ARCHITECTURE.md) — internal structure (for contributors) - [TELEMETRY](TELEMETRY.md) — local weekly usage metrics, telemetry.db, and kill switches -- [PLAN](../PLAN.md) — what ships in which phase +- [PLAN](https://github.com/ffroliva/gflow-cli/blob/develop/PLAN.md) — what ships in which phase