Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/flashcatcloud/flashduty-cli
go 1.25.1

require (
github.com/flashcatcloud/go-flashduty v0.5.13
github.com/flashcatcloud/go-flashduty v0.6.0
github.com/mattn/go-runewidth v0.0.24
github.com/spf13/cobra v1.10.2
github.com/spf13/pflag v1.0.10
Expand Down
4 changes: 2 additions & 2 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.13 h1:4z75ojq3bTpWUD1uGulljhY2tmyA5Zk86sVNDA02vKY=
github.com/flashcatcloud/go-flashduty v0.5.13/go.mod h1:aA0RtZEs0AYOwwdNKdtVeD8YMOdnmVY1zAlVD+9Ovx8=
github.com/flashcatcloud/go-flashduty v0.6.0 h1:N4nFJ7+ROBRJRUYkN5KPUcheKqyTwcuYhbi2svNJ0oY=
github.com/flashcatcloud/go-flashduty v0.6.0/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 Down
4 changes: 2 additions & 2 deletions internal/cli/zz_generated_automations.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/cli/zz_generated_channels.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/cli/zz_generated_data_sources.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

130 changes: 124 additions & 6 deletions internal/cli/zz_generated_status_pages.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions skills/flashduty/reference/monit.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ Invoke target tools
## Gotchas

- **Datasource name is not guessable.** A `can not find datasource` 400 means the name is wrong — re-run `datasource-list` and copy the exact `Name`. Never invent variants.
- **`datasource-info` (and the `datasource-create`/`datasource-update` responses) return credentials exactly as configured — nothing is masked.** The `payload` object includes whatever passwords, API keys, tokens, and similar fields were set, in the clear. Treat the response as sensitive: don't dump it into logs or chat, don't echo it back beyond what the task needs, and don't pass it on to another tool.
- **`query-rows` has no time flags.** There is no `--time-start` / `--time-end` / `--operation`. Embed all time range and bucketing inside `--expr`. Passing those flags is a silent no-op or error.
- **`query-diagnose` time window via `--data`**, not flags. Pass `{"time_range":{"start":<unix>,"end":<unix>},...}`. Window wider than 6 hours is rejected server-side. Omitting `time_range` defaults to the last 15 minutes.
- **`rule_configs` and nested arrays require `--data`.** The queries, thresholds, enabled_times, and labels objects cannot be expressed as flat flags — pass them as inline JSON via `--data '{"rule_configs":{...}}'`. Typed scalar flags (`--name`, `--enabled`, `--cron-pattern`, `--ds-type`) override matching `--data` keys.
Expand Down
2 changes: 1 addition & 1 deletion skills/flashduty/reference/safari.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Create Automation rule
- `--prompt` string (required) — Task prompt sent to the AI SRE agent on each run. (≥1 chars)
- `--schedule-trigger-enabled` bool — Whether the schedule trigger is enabled. Defaults to true when omitted; HTTP-POST-only rules should send false.
- `--team-id` int64 — Scope team ID. 0 or omitted means a personal rule; >0 means a team in the account. Immutable after creation. (min 0)
- `--timezone` string — IANA timezone 'cron_expr' is evaluated in, e.g. 'Asia/Shanghai'. Must be a timezone name loadable by the server; an invalid value is rejected. Defaults to the caller's member timezone, then the account timezone, then UTC when omitted.
- `--timezone` string — IANA timezone 'cron_expr' is evaluated in, e.g. 'Asia/Shanghai'. Must be a timezone name loadable by the server; an invalid value is rejected. Defaults to the caller's member timezone, then the account timezone, then the server default (Asia/Shanghai) when omitted.
- response: single object (`data` unwrapped to the top level) — fields: account_id (integer); can_edit (boolean); created_at (integer); cron_expr (string); enabled (boolean); environment_id (string); environment_kind (string); http_post_token (string); http_post_trigger_enabled (boolean); http_post_trigger_id (string); http_post_trigger_url (string); name (string); oncall_incident_channel_ids (array<integer>); oncall_incident_severities (array<string>); oncall_incident_trigger_enabled (boolean); oncall_incident_trigger_id (string); owner_id (integer); prompt (string); rule_id (string); run_scope (string); schedule_next_fire_at_ms (integer); schedule_trigger_enabled (boolean); schedule_trigger_id (string); team_id (integer); timezone (string); updated_at (integer)

### automation-rule-delete <rule-id>
Expand Down
21 changes: 19 additions & 2 deletions skills/flashduty/reference/status-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ Create status page
- body-only (`--data`): custom_links (array<object>); subscription (object)
- response: single object (`data` unwrapped to the top level) — fields: page_id (integer); page_name (string); page_url_name (string)

### delete
### delete <page-id>
Delete status page
- `<page-id>` (positional, required) int64 — Status page ID.

### info <page-id>
Get status page detail
Expand Down Expand Up @@ -230,8 +231,24 @@ Upsert status page template
- body-only (`--data`): template (object) (required)
- response: single object (`data` unwrapped to the top level) — fields: template_id (string)

### update
### update <page-id>
Update status page
- `--contact-info` string — Get-in-touch contact, such as a mailto or website URL. Omit to keep the existing value.
- `--custom-domain` string — Custom domain for a public status page. Omit to keep the existing value. (≤255 chars)
- `--dark-logo` string — Dark-mode logo image of the status page. Omit to keep the existing value.
- `--date-view` string — How event dates are displayed. Omit to keep the existing value. · enum: calendar | list
- `--display-uptime-mode` string — How uptime is displayed. Omit to keep the existing value. · enum: chart_and_percentage | chart | none
- `--favicon` string — Favicon of the status page. Omit to keep the existing value.
- `--logo` string — Logo image of the status page. Omit to keep the existing value.
- `--logo-url` string — URL opened when the logo is clicked. Omit to keep the existing value.
- `--name` string — Display name of the status page. Omit to keep the existing value. (≤255 chars)
- `--page-footer` string — Footer content shown on the status page. Omit to keep the existing value.
- `--page-header` string — Header content shown on the status page. Omit to keep the existing value.
- `<page-id>` (positional, required) int64 — Status page ID.
- `--page-title` string — Browser title shown for the status page. Omit to keep the existing value.
- `--template-preference` string — Preferred change-event template type. Omit to keep the existing value.
- `--url-name` string — URL-safe slug, unique per account and page type. Omit to keep the existing value. (≤255 chars)
- body-only (`--data`): custom_links (array<object>); subscription (object)

<!-- GENERATED:status-page END -->

Expand Down