Skip to content

feat: complete the agent action contract + precise Seedance dry-run cost#219

Open
kiyeonjeon21 wants to merge 2 commits into
mainfrom
feat/report-actions
Open

feat: complete the agent action contract + precise Seedance dry-run cost#219
kiyeonjeon21 wants to merge 2 commits into
mainfrom
feat/report-actions

Conversation

@kiyeonjeon21

Copy link
Copy Markdown
Contributor

Two related changes that harden VibeFrame's agent-facing recovery/cost contract.

1. nextActions for every workflow state (4f8a760)

vibe status project previously derived nextActions only from a review
report, so non-review states (empty/failed/running/ready/needs-author)
forced an agent to fall back to parsing retryWith. inspectProjectStatus now
converts the workflow/build state commands into classified ReviewActions
(reusing reviewActionsFromRetryWith + normalizeReviewActions), with the rich
review actions kept first so they win the dedup. review.retryWith is excluded
(already covered by review.nextActions).

  • Top-level nextActions populated for all states; CLI + status_project MCP
    tool surface it unchanged.
  • Agent guidance (context.ts, host-integration.ts) now leads with
    nextActions, retryWith as the compatibility fallback.
  • Tests cover empty/running/needs-author/ready states.

2. Token-accurate Seedance cost in video dry-run (bfcfe8e)

generate video --dry-run reported a flat cost-tier upper bound ($5) for
Seedance, ignoring resolution/ratio/duration/tier. Added
estimateSeedanceVideoCostUsd() in the fal provider using fal's token billing
((w*h*24/1024)/1000 * $0.014, fast 0.8x up to 720p, reference-video 0.6x)
and wired it into the dry-run path. Other providers keep the tier-bound fallback.

case before after fal rate
fast 720p 16:9 5s $5 $1.21 $0.2419/s
std 720p 16:9 5s $5 $1.51 $0.3024/s
std 1080p 16:9 10s $5 $6.80 $0.682/s
runway (other provider) $5 $5 tier fallback

Verification

  • pnpm -F @vibeframe/cli test (full suite) + @vibeframe/ai-providers FalProvider tests — green
  • pnpm lint 0 errors (both packages)
  • pnpm gen:reference:check up-to-date
  • scripts/pre-push-validate.sh exit 0
  • Real end-to-end probe of the GPT-Image-2 → Seedance reference-to-video workflow validated the dry-run figure ($1.21 matched).

Project status previously derived nextActions only from a review report, so
in non-review states (empty/failed/running/ready/needs-author) an agent had to
fall back to parsing retryWith. inspectProjectStatus now converts the
workflow/build state commands into classified ReviewActions
(reviewActionsFromRetryWith + normalizeReviewActions), with the rich review
actions kept first so they win the dedup.

- status-jobs: populate top-level nextActions for all states
- context/host-integration: lead agent guidance with nextActions, retryWith
  as the compatibility fallback
- tests: assert nextActions for empty/running/needs-author/ready states
`generate video --dry-run` reported a flat cost-tier upper bound ($5) for
Seedance, ignoring resolution/ratio/duration/tier — too coarse for agent spend
gating. Add estimateSeedanceVideoCostUsd() in the fal provider (token billing:
(w*h*24/1024)/1000 * $0.014, fast 0.8x up to 720p, reference-video 0.6x) and
use it in the dry-run path; other providers keep the tier-bound fallback.

- fal: estimateSeedanceVideoCostUsd + unit tests (matches fal published rates)
- generate video --dry-run: precise costUsd for seedance (e.g. fast 720p 5s
  now $1.21 instead of $5)
@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vibeframe Ready Ready Preview, Comment Jun 17, 2026 4:26pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant