feat(flows): serve the generated Software Garden from the catalog (2/2 for #174)

Merged
KH
2mo ago
+105-44

Part 2 of 2 for #174 (option a: the generator is the single source of Software Garden). Closes #174 together with #175.

What

  • Catalog pin. web/data/recommended-flow-catalog.v1.json flows.0 (software-factory, "Software Garden") now pins AgentWorkforce/agentrelay.com@e3f5442652edd7651225fd1f5435f0e65378ec4b → web/public/flows/software-garden/v1.flow.ts, release software-garden-v1, sha256 b89a36e2cf9054036a7fc53fba20011a42ef0275ffbaaa907b080738ab46ad27. That is #175's squash commit on main. It previously pinned flows examples/software-factory v2.0.42 (4339c0c4…).
  • Versions. catalogVersion goes 4 → 5, and so does the entry's own version. The catalog schema gate (in Cloud) requires the bump: upgradeRecommendedFlowActivation in cloud's flow-activations.ts refuses to move an activation onto a different source at the catalogVersion it was deployed from ("The catalog changed an artifact without advancing its version"). Every existing Garden activation is stamped 4, so repointing at 4 would strand them. A new test records each served source against its catalogVersion, so a later pin move (v2 after #178) cannot skip the bump. Cloud already accepts a live catalog newer than 4: its babysitter floor is >= 4.
  • verify-recommended-flow-catalog.mjs. An AgentWorkforce/agentrelay.com source has no git release tag. Instead, its release must name a manifest version (software-garden-v<N>) whose recorded digest and local file both equal the pin. The raw file at the pinned commit is still fetched and hashed. Flows-hosted sources keep the tag check.
  • recommended-flow-contract.mjs. The ticket-title / exact-Fixes #N guard now matches the generated code that implements it. It had to move in the same commit as the pin: changing it in #175 would have failed verification of the source the catalog served then.
  • Tests. The artifact satisfies the contract, and the catalog pins a published version by path, release and digest.
  • Docs. docs/relayflows/recommended describes the new source.

Cloud

The /cloud/flows/deploy prebuilt-Garden path needs no Cloud change. Its contract takes any public kind: "github" source. Running Cloud's own parseFlowSourceUrl on the new blob URL yields exactly this rawUrl (owner AgentWorkforce, repo agentrelay.com), so the browser fetch and the sha256 check succeed.

Cloud's server-side bundled fallback (used only when the catalog or GitHub is unreachable) still carries the old flows bytes. A separate Cloud PR re-pins it to this artifact.

Verified

  • npm run verify:recommended-flows prints software-factory: verified software-garden-v1 (e3f5442…) sha256:b89a36e2….
  • 45 files / 527 tests plus the router's 133 pass, and tsc --noEmit is clean.
  • Red first: before the pin, the two new tests failed (contract, catalog pin).

Ordering with #178

#178 changes generator output. Once it publishes v2 (see the comment there), a one-line follow-up moves this pin to v2 at #178's merge commit.

🤖 Generated with Claude Code


[!NOTE]
Medium Risk
Changes which bytes Cloud and CLI deploy for Software Garden activations and upgrade semantics via catalogVersion; mitigated by digest checks, manifest pinning, and explicit version-bump tests.

Overview
The recommended-flow catalog Software Garden (software-factory) no longer points at AgentWorkforce/flows example source; it pins catalogVersion / entry version 5 to the SHA-256–pinned web/public/flows/software-garden/v1.flow.ts on AgentWorkforce/agentrelay.com (software-garden-v1), matching what /flows onboarding publishes.

Verification and gates now treat agentrelay.com catalog sources as manifest-versioned (digest + local file) instead of semver git tags, while still fetching and hashing the pinned raw URL. The ticket-derived PR title / single Fixes closing-reference contract snippets were updated to match the generated flow, with tests ensuring the pinned artifact, generator output, and catalog stay aligned and that any future source change must bump catalogVersion.

Docs under Recommended flows describe the new canonical source and catalog version 5.

Reviewed by Cursor Bugbot for commit 6fff97b1e488477d660aa69dc885a564b21260b2. Bugbot is set up for automated code reviews on this repo. Configure here.


Agent Relay sessions

  • claude session eae07e25 · opened via gh pr create · last active 2026-10-08
  • claude session 1e2adfbe · contributor · ran gh pr commands · last active 2026-10-08