Tags: codebahn/codebahn-cli
Tags
feat: add Destructive and ReadOnly annotation fields to ToolDef (#16) ToolDef gains two booleans and an IsReadOnly() method. Destructive marks tools that irreversibly destroy resources (8 tools: 7 DELETEs plus cancel_build). ReadOnly is an explicit flag for composite tools (step 4); for endpoint tools, IsReadOnly() derives from Method == GET. Three new tests enforce the invariants: every GET is read-only, every DELETE is destructive, and the destructive set matches a hard-coded list of 8 names.
fix: normalize version prefix in update check comparison (#13) GoReleaser sets the version without a "v" prefix (e.g. "0.2.0"), but semver.Compare treats strings without "v" as invalid, and invalid is always less than valid. This caused the update notice to show even when already on the latest version. Prepend "v" to currentVersion when missing before comparing.
fix: update action pins to latest versions (#3) The goreleaser-action SHA was invalid (nonexistent commit). Updated all three actions to their latest releases: - actions/checkout v4.2.2 -> v7.0.1 - actions/setup-go v5.5.0 -> v7.0.0 - goreleaser/goreleaser-action v6.2.1 (bad SHA) -> v7.2.3
feat: CLI binary with auth, generated commands, and ported internals Working codebahn binary with: - 54 generated tool commands across 6 groups (user, repo, issue, pr, search, ci) - Hand-written auth commands (login via OAuth2 PKCE, logout, status) - Global flags: --instance, --token, --no-color - PersistentPreRunE wires client into context for all commands Ported internal packages from the old CLI: - internal/config: config file (~/.config/codebahn/config.json), auth resolution - internal/context_detect: repo context detection from git remotes - internal/oauth: OAuth2 Authorization Code + PKCE flow - internal/output: Printer (table/JSON), color, TTY detection