1 import Base 2 3 # What the Bend hub has for one declared package. 4 type Hub is Data: 5 Unpublished{} 6 Same{} 7 Differs{file: String} 8 9 # What GitHub and the working tree say about the repository. 10 type Remote is Data: 11 Remote{origin: String, visibility: String, clean: Bool, pushed: Bool} 12 13 # What GitHub has for one declared plugin, next to a fresh build of it: whether its marketplace exists, 14 # whether it is tagged -v, the version the build declares ("" when it did not build), 15 # whether `claude plugin validate` accepts the build, and whether the build differs from what the tag 16 # holds. 17 type Tag is Data: 18 Tag{repository: Bool, tagged: Bool, built: String, valid: Bool, differs: Bool} 19 20 # What the world looks like now, as far as a release is concerned. 21 type Observed is Data: 22 Observed{files: List<&2, String>, reached: List<&2, String>, hubs: List<&2, Hub>, remote: Remote, tags: List<&2, Tag>} 23 24 # One step of a plan. Publish, Push, ReleasePlugin, Rebuild, ServePort and Launch change the world; Current and Change do not 25 # (a Change is what a Rebuild would change, shown by a dry run); Blocked stops the deploy. 26 # Rebuild: write a nix-darwin node's flake and darwin-rebuild switch it. ServePort: serve a tailnet 27 # HTTPS port from a local target, with the given Tailscale command. Launch: write a launch agent's plist and 28 # (re)load it in the user's launchd domain. 29 type Step is Data: 30 Current{what: String} 31 Publish{name: String, version: String, entry: String} 32 Push{repository: String} 33 ReleasePlugin{name: String, version: String, marketplace: String, create: Bool} 34 Rebuild{host: String, flake: String, mac: String} 35 ServePort{https: U32, target: String, tailscale: String} 36 Launch{label: String, path: String, plist: String, domain: String} 37 Install{from: String, to: String} 38 Change{what: String, now: String, want: String} 39 Blocked{what: String, why: String}