Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
e7d4dae
Merge pull request #44 from flashcatcloud/feat/ai-sre
ysyneu Jun 15, 2026
baa80f7
Merge feat/ai-sre: #46 table renderer, #47 relative-time, #48 drop pu…
ysyneu Jun 15, 2026
e64526a
Merge pull request #53 from flashcatcloud/feat/ai-sre
ysyneu Jun 16, 2026
63a8e76
feat/ai-sre → main: CLI insight discovery + team get positional ID (v…
ysyneu Jun 17, 2026
144472f
Merge remote-tracking branch 'origin/main'
ysyneu Jun 17, 2026
6a9294e
feat/ai-sre → main: flashduty skill — generated cards + withdraw from…
ysyneu Jun 21, 2026
93ed444
feat/ai-sre → main: add --fields projection to incident/alert list (v…
ysyneu Jun 23, 2026
0f5d999
chore(deps): bump actions/checkout from 6 to 7
dependabot[bot] Jun 25, 2026
5b710df
chore: update go-flashduty SDK
ysyneu Jun 26, 2026
50abf12
chore: update go-flashduty SDK
ysyneu Jun 26, 2026
baf2677
Merge pull request #64 from flashcatcloud/feat/api-review-auto-fix
ysyneu Jun 26, 2026
6ea4ab8
Merge pull request #62 from flashcatcloud/dependabot/github_actions/a…
ysyneu Jun 26, 2026
4c90239
chore: update go-flashduty SDK
ysyneu Jun 26, 2026
188fdb5
Merge pull request #65 from flashcatcloud/codex/update-go-flashduty-a…
ysyneu Jun 26, 2026
78c3898
feat: add automation cli commands
debidong Jun 29, 2026
592bcb8
feat: add automation cli commands (#70)
debidong Jun 29, 2026
80051e2
fix: document automation schedules as UTC
debidong Jul 2, 2026
81d5149
Merge pull request #72 from flashcatcloud/codex/automation-utc-help
debidong Jul 2, 2026
bb9ce01
fix(skill): resolve person_id via `person infos`, not member-list pag…
ysyneu Jun 26, 2026
d32d4f9
fix(skill): enumerate configured rules via `rule-list-basic --folder-…
ysyneu Jun 26, 2026
ddf6366
fix(skill): correct rule enumeration — folder-0 400s; no account-wide…
ysyneu Jun 26, 2026
b5c1efe
perf(skill): slim incident-summary output and serialize same-host mon…
ysyneu Jun 26, 2026
715d38f
fix: compact incident list structured output
ysyneu Jul 2, 2026
c853af3
fix: render mcp server create details
ysyneu Jul 2, 2026
3babdda
fix: point oauth notice to plugins mcp
ysyneu Jul 2, 2026
f646fbc
fix: align skill id guidance
ysyneu Jul 2, 2026
e12be19
fix: clarify credential and member id guidance
ysyneu Jul 2, 2026
8400d8b
fix: sync generated incident skill card
ysyneu Jul 2, 2026
3d6dafc
Merge pull request #75 from flashcatcloud/codex/release-2026-07-02-main
ysyneu Jul 2, 2026
2f600cd
chore: sync CLI with latest API spec
ysyneu Jul 2, 2026
926d6db
chore: trim skill card whitespace
ysyneu Jul 2, 2026
8763144
Merge pull request #76 from flashcatcloud/codex/sdk-cli-release-20260702
ysyneu Jul 2, 2026
97033e2
chore: sync go-flashduty sdk
ysyneu Jul 3, 2026
2aa7b8a
Merge pull request #77 from flashcatcloud/codex/sdk-cli-release-20260703
ysyneu Jul 3, 2026
b8814d0
docs(skill): disambiguate Flashcat workspace spaces
ysyneu Jul 6, 2026
e1fe612
Merge pull request #79 from flashcatcloud/audit-fix/audit-2026-07-06-…
ysyneu Jul 6, 2026
f160a5d
chore(deps): bump golang.org/x/term from 0.44.0 to 0.45.0
dependabot[bot] Jul 9, 2026
e003669
feat(cli): surface monit diagnose evidence
ysyneu Jul 14, 2026
df7a322
fix(cli): remove ignored automation dedup key
ysyneu Jul 14, 2026
c3af496
Merge pull request #83 from flashcatcloud/codex/monit-query-evidence-cli
ysyneu Jul 14, 2026
d1e052f
Merge pull request #81 from flashcatcloud/dependabot/go_modules/golan…
ysyneu Jul 15, 2026
4544a33
fix: prevent runner-managed CLI self-updates
ysyneu Jul 15, 2026
b69ed3f
Merge tag 'v1.3.26' into codex/sync-v1-3-26-main
ysyneu Jul 15, 2026
e3e5272
Merge pull request #88 from flashcatcloud/codex/sync-v1-3-26-main
ysyneu Jul 15, 2026
41b36fd
chore(deps): bump actions/setup-go from 6 to 7
dependabot[bot] Jul 16, 2026
7053d7b
fix(skills): monit cards invoked four nonexistent tools
ysyneu Jul 20, 2026
5268648
Merge pull request #91 from flashcatcloud/fix/monit-skill-cards
ysyneu Jul 20, 2026
c1cc8b7
chore(sdk): bump go-flashduty and regenerate CLI surface
ysyneu Jul 20, 2026
5020cfd
Merge pull request #92 from flashcatcloud/fix/monit-contract-sync
ysyneu Jul 20, 2026
054f36a
Merge pull request #93 from flashcatcloud/feat/api-review-auto-fix
ysyneu Jul 20, 2026
b8cb347
chore: bump go-flashduty to v0.5.7 for clearer gateway-timeout errors
ysyneu Jul 21, 2026
9f015bb
Merge pull request #89 from flashcatcloud/dependabot/github_actions/a…
ysyneu Jul 21, 2026
05e1330
Merge pull request #94 from flashcatcloud/chore/bump-go-flashduty-gat…
ysyneu Jul 21, 2026
79d656f
chore: sync main into feat/ai-sre
ysyneu Jul 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v6
uses: actions/setup-go@v7
with:
go-version-file: "go.mod"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
build-mode: autobuild
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
Expand All @@ -36,7 +36,7 @@ jobs:
build-mode: ${{ matrix.build-mode }}

- name: Setup Go
uses: actions/setup-go@v6
uses: actions/setup-go@v7
if: matrix.language == 'go'
with:
go-version-file: "go.mod"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v6
uses: actions/setup-go@v7
with:
go-version-file: "go.mod"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/install-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
name: shellcheck + parse
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: shellcheck
run: shellcheck -s sh install.sh
- name: sh parse
Expand All @@ -40,7 +40,7 @@ jobs:
needs: lint
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Upload install scripts to S3-compatible storage
env:
AWS_ACCESS_KEY_ID: ${{ secrets.MIRROR_S3_ACCESS_KEY_ID }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: stable
- name: golangci-lint
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v6
uses: actions/setup-go@v7
with:
go-version-file: "go.mod"

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ bin/
*.out
.DS_Store
docs/
.worktrees/
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Build configuration
BINARY_NAME ?= flashduty
BUILD_DIR := bin
GOLANGCI_LINT_VERSION := v2.2.1
GOLANGCI_LINT_VERSION := v2.11.4
GOLANGCI_LINT := $(BUILD_DIR)/golangci-lint
GCI_VERSION := v0.13.5
GCI := $(BUILD_DIR)/gci
Expand Down Expand Up @@ -52,11 +52,11 @@ gci: $(GCI) ## Sort imports using gci

.PHONY: lint
lint: $(GOLANGCI_LINT) ## Run golangci-lint
$(GOLANGCI_LINT) run
$(GOLANGCI_LINT) run --allow-serial-runners

.PHONY: lint-fix
lint-fix: $(GOLANGCI_LINT) ## Run golangci-lint with auto-fix
$(GOLANGCI_LINT) run --fix
$(GOLANGCI_LINT) run --fix --allow-serial-runners

.PHONY: test
test: ## Run unit tests
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ module github.com/flashcatcloud/flashduty-cli
go 1.25.1

require (
github.com/flashcatcloud/go-flashduty v0.5.4-0.20260629091912-04a0bfaf665d
github.com/flashcatcloud/go-flashduty v0.5.7
github.com/mattn/go-runewidth v0.0.24
github.com/spf13/cobra v1.10.2
github.com/spf13/pflag v1.0.10
github.com/toon-format/toon-go v0.0.0-20251202084852-7ca0e27c4e8c
golang.org/x/term v0.44.0
golang.org/x/term v0.45.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/clipperhouse/uax29/v2 v2.2.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
golang.org/x/sys v0.46.0 // indirect
golang.org/x/sys v0.47.0 // indirect
)
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
github.com/clipperhouse/uax29/v2 v2.2.0 h1:ChwIKnQN3kcZteTXMgb1wztSgaU+ZemkgWdohwgs8tY=
github.com/clipperhouse/uax29/v2 v2.2.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/flashcatcloud/go-flashduty v0.5.4-0.20260629091912-04a0bfaf665d h1:jWzPzsWn46dCWC/PL5nncOTL1Zid4UMynbPsbL1mGdU=
github.com/flashcatcloud/go-flashduty v0.5.4-0.20260629091912-04a0bfaf665d/go.mod h1:aA0RtZEs0AYOwwdNKdtVeD8YMOdnmVY1zAlVD+9Ovx8=
github.com/flashcatcloud/go-flashduty v0.5.7 h1:bTgs4wN2mLMaVi8tuPDdR+8ZA6Dd4y6SKeZD+KhL4w8=
github.com/flashcatcloud/go-flashduty v0.5.7/go.mod h1:aA0RtZEs0AYOwwdNKdtVeD8YMOdnmVY1zAlVD+9Ovx8=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/mattn/go-runewidth v0.0.24 h1:cpokDiIn0MGnhdHwuWnJBITySJ20QyNGnY2kR/ay2DU=
Expand All @@ -16,10 +16,10 @@ github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3A
github.com/toon-format/toon-go v0.0.0-20251202084852-7ca0e27c4e8c h1:D8lDFovBMZywze1eh9iwMLcYor5f11mHBocLhO7cBe8=
github.com/toon-format/toon-go v0.0.0-20251202084852-7ca0e27c4e8c/go.mod h1:j/BOnpF2ihnz4lELs99h9mwGJBx/zdleOUCnLLRPCsc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc=
golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y=
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0=
golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
34 changes: 34 additions & 0 deletions internal/cli/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,40 @@ func requireExactArg(name string) cobra.PositionalArgs {
}
}

// requireBodyFieldOrArgs validates a required variadic positional that folds
// into a request-body field. The same field can also come from --data or from
// its typed flag, so zero positional args are valid when either source is set.
func requireBodyFieldOrArgs(name, flagName string) cobra.PositionalArgs {
return func(cmd *cobra.Command, args []string) error {
if len(args) > 0 || bodyFieldSourceSet(cmd, flagName) {
return nil
}
return fmt.Errorf("missing %s. Usage: %s", name, cmd.UseLine())
}
}

// requireBodyFieldOrExactArg validates a required scalar positional that folds
// into a request-body field. The value may instead come from --data or from the
// typed flag, but extra positionals are still rejected.
func requireBodyFieldOrExactArg(name, flagName string) cobra.PositionalArgs {
return func(cmd *cobra.Command, args []string) error {
switch {
case len(args) == 1:
return nil
case len(args) > 1:
return fmt.Errorf("expects exactly one %s. Usage: %s", name, cmd.UseLine())
case bodyFieldSourceSet(cmd, flagName):
return nil
default:
return fmt.Errorf("missing %s. Usage: %s", name, cmd.UseLine())
}
}
}

func bodyFieldSourceSet(cmd *cobra.Command, flagName string) bool {
return cmd.Flags().Changed("data") || cmd.Flags().Changed(flagName)
}

// optionalArg returns a positional argument validator that accepts zero or one
// argument named name. It backs generated commands whose positional folds into
// an OPTIONAL body field because the operation also accepts an alternative
Expand Down
Loading