feat: vk create --engine agent|pipeline for 0.5.0#3
Merged
Conversation
Apply findings from /simplify review: - client/figlens/engine.go: replace if-chains in Wire() and StreamPath() with switches (clearer when a third engine is added); remove the no-op `case "agent"` identity arm in RemapEngineForDisplay — the default arm produces identical output. - cmd/video/list.go: emit `engine` field in `--output json` for each work, remapped via RemapEngineForDisplay. Closes a gap where agents using `vk video list --output json` got no engine info even though the backend returns it. - cmd/create.go: trim two over-narrated comments (validateEngineModeCombo doc + node.progress inline rationale) — keep WHY, drop WHAT. - internal/video/snapshot/snapshot.go: move Engine field above Title in the struct/JSON ordering so provenance/identity fields cluster before display content. - tests/integration/create_engine_test.go: replace the vacuous "skip strict format check" comment block with a pointer to the unit-level engine remap coverage in snapshot_test.go (RenderText intentionally omits engine from human output, so the integration test's text-mode path can't usefully assert on it). No behavior changes for end users; JSON shapes for `vk video list` gain an additive `engine` field (omitempty), and the snapshot field-order is purely cosmetic.
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.
Summary
Unlocks the v=2 agent engine on
vk create(the v=3 pipeline engine has been the CLI's only option until now). Both engines are actively maintained on go-figlens and the web frontend exposes engine selection as a user toggle.vk create --engine pipeline(default) — current behavior, byte-identical wire body to 0.4.2vk create --engine agent— routes to/v1/agent2forVideo/streamwithv=2on initnode.progressSSE event surfaces v=2's empty-step_id messages as[agent] <message>in text mode (previously silently filtered)--engine agent --mode replicarejected at CLI boundary with exit 2 (replica is v=3-only; verified against go-figlens source)enginefield, remapped DB-enum"suite"→ user-vocabulary"pipeline"Spec:
docs/superpowers/specs/2026-05-14-engine-selection-design.mdPlan:
docs/superpowers/plans/2026-05-14-engine-selection.mdWhat's in the diff
13 commits, all green:
client/figlens/engine.go(new):Engineenum withWire()/StreamPath()methods +RemapEngineForDisplay(). Zero value =EnginePipeline(preserves 0.4.2 defaults)client/figlens/{task,stream,work}.go: threadEnginethroughInitTask(sets wirev),StreamChat(picks endpoint path), and decodeWork.Enginefrom backendclient/figlens/stream.go: emit newnode.progressevent for empty step_id (v=2 shape) — load-bearing for visibility on agent enginecmd/create.go:--engineflag,resolveEngine+validateEngineModeCombohelpers,node.progressrendering with[agent]prefixcmd/video/list.go:enginefield in JSON output for parity with snapshotinternal/video/snapshot/snapshot.go:Enginein Snapshot struct, populated via remap helperinternal/i18n/strings.go: 3 new keys en+zhtests/integration/create_engine_test.go(new): end-to-end with the actual binary against a mock figlens — assertsv=2on init body, hits/agent2forVideo/stream(NOT agent3),[agent]prefix in stderrTest plan
go test ./...passes (incl. integration test for--engine agent)go build ./...cleanvk create --helpshows--enginealongside--mode/--aspect/--bgmvk versionreflects 0.5.0 (via package.json + SKILL.md; the make-build ldflags use git-describe)--engine) wire body unchanged (covered byTestInitTask_OmitsEmptyFields+ Engine zero-value = pipeline)--engine agent --mode replicaexits 2 with clear error--engine bogusexits 2 listing allowed valuesTestStreamChat_ProcessEvents,TestStreamChat_*) still pass — empty step_id branch added BEFORE the existing IsKnownNode filtervk create --engine agentend-to-end +--mode scriptpreflight rejection +vk video {list,status} --output jsonengine field on real beta backend