feat(cli): move workflow consumers to Relayflows v2

Merged
AG
4d ago
+488-979

Summary

  • remove Relay's final production dependency on the v1 @relayflows/cli / @relayflows/core runner
  • route agent-relay node workflow run and fresh Cloud worker assignments through the existing v2 agent-relay flows run product surface
  • re-enter compiled Bun executables without their virtual /$bunfs script, and use Node for standalone JavaScript workflow/monitor scripts
  • supply explicit empty input for TypeScript through one shared v2 argv builder
  • reject state-bearing worker assignments before any filesystem, download, credential, or child-process side effect

Stack / release boundary

  • stacked on chore/retire-broker-v2; this remains separate from the broker-retirement change
  • @relayflows/sdk stays at the currently published exact pin (2.0.65) while flows#707 is a draft; update the pin to its released version before this PR leaves draft
  • no npm publish, deploy, merge, or feature-flag change is included

Verification

  • repository-pinned npm 10.5.1 npm ci succeeds and installs neither node_modules/@relayflows/cli nor node_modules/@relayflows/core
  • monorepo npm run typecheck passes
  • focused changed-surface CLI suite: 123/123 tests pass
  • npm run build:cli passes
  • CLI npm pack --dry-run passes
  • Prettier and git diff --check pass on changed files

Coordination

  • Khaliq approved dropping v1 and moving both consumers to the v2 SDK surface
  • Cloud owner confirmation is requested before merge for the fail-closed state-selector boundary; current Cloud accepts only v2, rejects startFrom / previousRunId, and keeps resume state in its hosted runner
  • the change is marked SemVer-major with explicit migration guidance
  • the repository's existing 38-day active Trail trajectory belongs to another task, so this work deliberately did not overwrite or complete it