feat: complete the agent action contract + precise Seedance dry-run cost#219
Open
kiyeonjeon21 wants to merge 2 commits into
Open
feat: complete the agent action contract + precise Seedance dry-run cost#219kiyeonjeon21 wants to merge 2 commits into
kiyeonjeon21 wants to merge 2 commits into
Conversation
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)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two related changes that harden VibeFrame's agent-facing recovery/cost contract.
1.
nextActionsfor every workflow state (4f8a760)vibe status projectpreviously derivednextActionsonly from a reviewreport, so non-review states (
empty/failed/running/ready/needs-author)forced an agent to fall back to parsing
retryWith.inspectProjectStatusnowconverts the workflow/build state commands into classified
ReviewActions(reusing
reviewActionsFromRetryWith+normalizeReviewActions), with the richreview actions kept first so they win the dedup.
review.retryWithis excluded(already covered by
review.nextActions).nextActionspopulated for all states; CLI +status_projectMCPtool surface it unchanged.
context.ts,host-integration.ts) now leads withnextActions,retryWithas the compatibility fallback.2. Token-accurate Seedance cost in video dry-run (
bfcfe8e)generate video --dry-runreported a flat cost-tier upper bound ($5) forSeedance, ignoring resolution/ratio/duration/tier. Added
estimateSeedanceVideoCostUsd()in the fal provider using fal's token billing(
(w*h*24/1024)/1000 * $0.014, fast0.8xup to 720p, reference-video0.6x)and wired it into the dry-run path. Other providers keep the tier-bound fallback.
Verification
pnpm -F @vibeframe/cli test(full suite) +@vibeframe/ai-providersFalProvider tests — greenpnpm lint0 errors (both packages)pnpm gen:reference:checkup-to-datescripts/pre-push-validate.shexit 0