Repository navigation
feat(flows): author flows and create checkpoints from the CLI - #201
Draft
joshdholtz wants to merge 2 commits into
Draft
joshdholtz wants to merge 2 commits into
joshdholtz wants to merge 2 commits into
Conversation
2 tasks done
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.
Checklist
go build ./...,go test ./..., andgofmtpassMotivation
Let CLI clients author paywalls, web funnels, and general flows using the same draft and publishing lifecycle as the dashboard.
Description
Adds
flows show,export,update,create,duplicate,validate, andpublish. The existing experimental group stays hidden from help. Export produces an editable update file with its revision; saves preserve omitted steps and require explicit deletion. Publish requires a revision and confirmation. Addscheckpoints create --identifierand targeting-rule filters for checkpoint and flow IDs.Depends on the development API stack ending at khepri #27201. Existing targeting commands attach flows to checkpoints. MCP support is separate.
Implementation and testing
Uses typed API methods and the existing config reader, with a 5 MiB limit for flow content. Nested screen JSON and explicit null settings survive export/update without converting numbers to floats. A stale revision is returned to the caller without retrying the write.
Tests cover export/update, integer precision, localized screens, explicit nulls, overwrite refusal, strict config input, revision conflicts, validation exit status, unpublished create/duplicate, and publish confirmation. Build, vet, formatting, the full race-enabled test suite, and golangci-lint pass. Local terminal tests require
TERM=xterm-256color; the defaultTERM=dumbalso fails on the unchanged base branch.Checkpoint tests cover request serialization, human and JSON output, missing or blank identifiers before mutation, duplicate errors, and rule filters with pagination.
All CLI CI checks pass. Live
flowapi4testing on Catbone also passed checkpoint creation, inactive paywall assignment, rule readback/filtering, and duplicate-identifier rejection. Creation, editing, validation, and publishing also passed for new three-screen paywall/general flows and a four-screen web funnel with Test Store checkout. Both native flows have new inactive checkpoint rules. Stale revisions and incomplete funnel publishing were rejected. A published paywall was duplicated and the copy validated after assigning its offering. No rule was activated; this is API testing only.The overlay tracks the development endpoints and generates their path builders. Custom models preserve raw screen JSON.