@tailglow/cli 0.9.6 → 0.9.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailglow/cli",
3
- "version": "0.9.6",
3
+ "version": "0.9.16",
4
4
  "type": "module",
5
5
  "description": "The Tailglow command line. Every command is generated from the Tailglow API reference, so the CLI and the documentation can never describe different APIs.",
6
6
  "bin": {
@@ -35,6 +35,6 @@
35
35
  "@clack/prompts": "^1.2.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@types/bun": "^1.4.3"
38
+ "@types/bun": "^1.4.4"
39
39
  }
40
40
  }
@@ -278,7 +278,7 @@ export const CLI_COMMANDS = [
278
278
  "name": "late_data_window_minutes",
279
279
  "type": "integer",
280
280
  "required": false,
281
- "description": "How many minutes behind the completeness watermark an event with an overridden timestamp may arrive and still be included automatically. Later data is recorded and surfaced for manual re-backfill instead of being included. 0 means the watermark is final as it advances. Only events with overridden timestamps can be late; data sent live is never affected. Maximum 129600 (90 days). Optional. Minimum: `0`. Maximum: `129600`.",
281
+ "description": "Late-arrival window for older metrics that have not been rebuilt. New and rebuilt metrics automatically include accepted late input at any age. For older metrics, events outside this window are kept for manual re-backfill; 0 holds all late arrivals. Maximum 129600 (90 days). Optional. Minimum: `0`. Maximum: `129600`.",
282
282
  "allowed_values": [],
283
283
  "deprecated": null
284
284
  },
@@ -2157,6 +2157,14 @@ export const CLI_COMMANDS = [
2157
2157
  }
2158
2158
  ]
2159
2159
  },
2160
+ {
2161
+ "name": "display_fields",
2162
+ "type": "object",
2163
+ "required": false,
2164
+ "description": "Which field labels which in charts: each key is a field of the view, its value the view field whose value names it, such as `{ \"user_id\": \"user_name\" }`. A key set to null is removed; on update, keys left out keep their value. Optional.",
2165
+ "allowed_values": [],
2166
+ "deprecated": null
2167
+ },
2160
2168
  {
2161
2169
  "name": "project_id",
2162
2170
  "type": "string",
@@ -2296,6 +2304,7 @@ export const CLI_COMMANDS = [
2296
2304
  "notes": [
2297
2305
  "Output schema changes are accepted only before a mapping or stored output exists. Changing an existing view's output schema requires a recovery transition that is not yet supported.",
2298
2306
  "Mapping policy changes on an existing mapping require reviewed coverage recovery. Hint changes preserve accepted mappings and retry undecided work with the new hint.",
2307
+ "`display_fields` changes only the keys it names: a key set to a field labels it, a key set to null is removed. Every field it names must be a field of the view; a stored entry whose field the view has since dropped is kept, labels nothing, and never blocks another change.",
2299
2308
  "What a view reads from is fixed at creation, so `collection_id` and `parent_view_id` are not accepted here. Create a new view to read from something else.",
2300
2309
  "`output_schema` field names must be unique by name, cannot conflict on type, and cannot collide with a reserved query key such as `limit` or `cursor`.",
2301
2310
  "Use `hint` for rules the generator cannot read off the field names: a formatting rule (\"display_name should be Name (Type)\"), a business threshold (\"classify as high above 500\"), or a disambiguation when a source field could map more than one way. Skip it for obvious mappings like renames and type conversions, which the generator already handles."
@@ -2419,6 +2428,14 @@ export const CLI_COMMANDS = [
2419
2428
  "allowed_values": [],
2420
2429
  "deprecated": null
2421
2430
  },
2431
+ {
2432
+ "name": "display_fields",
2433
+ "type": "object",
2434
+ "required": false,
2435
+ "description": "Which field labels which in charts: each key is a field of the view, its value the view field whose value names it, such as `{ \"user_id\": \"user_name\" }`. A key set to null is removed; on update, keys left out keep their value. Optional.",
2436
+ "allowed_values": [],
2437
+ "deprecated": null
2438
+ },
2422
2439
  {
2423
2440
  "name": "transform_mode",
2424
2441
  "type": "string",
@@ -2463,7 +2480,7 @@ export const CLI_COMMANDS = [
2463
2480
  "notes": [
2464
2481
  "Views derived from this one are deleted with it.",
2465
2482
  "The delete is refused while an active drain reads from this view or from any view that would cascade with it. Delete those drains first. Draft drains are removed silently.",
2466
- "Backfill and indexing work for the whole cascade is cancelled immediately, so a deleted view stops consuming capacity before its rows are removed."
2483
+ "Backfill work for the whole cascade is cancelled immediately, so a deleted view stops consuming capacity before its rows are removed."
2467
2484
  ],
2468
2485
  "path_params": [
2469
2486
  {
@@ -3225,6 +3242,71 @@ export const CLI_COMMANDS = [
3225
3242
  "query_params": [],
3226
3243
  "body_fields": []
3227
3244
  },
3245
+ {
3246
+ "resource": "views",
3247
+ "command": "update-version",
3248
+ "operation_id": "updateViewVersion",
3249
+ "summary": "Update View Version",
3250
+ "description": "Exclude one settled schema version from a view.",
3251
+ "method": "POST",
3252
+ "path": "/v1/projects/:project_id/views/:view_id/versions/:version_id",
3253
+ "alternate_paths": [],
3254
+ "scopes": [
3255
+ "views:write"
3256
+ ],
3257
+ "notes": [
3258
+ "`version_id` is the schema version NUMBER, the `version` a row carries, not a `vta_` id.",
3259
+ "An excluded version's records are left out of this view, those already ingested and those still to come, and the version no longer holds the view back from being ready for metrics. Other views reading the same collection are not affected.",
3260
+ "Only a version still waiting on a script can be excluded. A version whose transform holds a script, or is already excluded, answers 409.",
3261
+ "An exclusion is not undone here: `is_excluded: false` answers 400.",
3262
+ "Excluding a version requires `exclusion_reason`."
3263
+ ],
3264
+ "path_params": [
3265
+ {
3266
+ "name": "project_id",
3267
+ "type": "string",
3268
+ "required": true,
3269
+ "description": "Unique identifier of the project.",
3270
+ "allowed_values": [],
3271
+ "deprecated": null
3272
+ },
3273
+ {
3274
+ "name": "view_id",
3275
+ "type": "string",
3276
+ "required": true,
3277
+ "description": "Unique identifier of the view.",
3278
+ "allowed_values": [],
3279
+ "deprecated": null
3280
+ },
3281
+ {
3282
+ "name": "version_id",
3283
+ "type": "integer",
3284
+ "required": true,
3285
+ "description": "The schema version number: the `version` a view version carries.",
3286
+ "allowed_values": [],
3287
+ "deprecated": null
3288
+ }
3289
+ ],
3290
+ "query_params": [],
3291
+ "body_fields": [
3292
+ {
3293
+ "name": "is_excluded",
3294
+ "type": "boolean",
3295
+ "required": true,
3296
+ "description": "Set to true to exclude this schema version from the view: its records are left out of the view, now and in the future.",
3297
+ "allowed_values": [],
3298
+ "deprecated": null
3299
+ },
3300
+ {
3301
+ "name": "exclusion_reason",
3302
+ "type": "string",
3303
+ "required": false,
3304
+ "description": "Why the version is excluded, kept with the exclusion for whoever reads it later. Optional. Minimum length: `1`. Maximum length: `2000`.",
3305
+ "allowed_values": [],
3306
+ "deprecated": null
3307
+ }
3308
+ ]
3309
+ },
3228
3310
  {
3229
3311
  "resource": "views",
3230
3312
  "command": "create-transform",
@@ -3738,10 +3820,13 @@ export const CLI_COMMANDS = [
3738
3820
  "`complete_through_at` is the instant before which every number is final. Null means completeness is unknown, and then every bucket is incomplete.",
3739
3821
  "For complete buckets only, leave out every key at or after `first_incomplete_bucket_at`.",
3740
3822
  "`coverage_reasons` names unresolved view scopes; `excluded` is informational.",
3741
- "Series are ranked by their total over the range (the count for a `count` metric, the sum of Last readings for `last`, the sum otherwise), ties broken by series hash, and `limit` of them come back per page, the metric's `ui_chart_max_series` by default. Walk the pages with `pagination.next_cursor` and `pagination.prev_cursor`; `pagination.total` counts every series.",
3742
- "`__other__` folds in every series that is not on the current page, so the page plus Other always adds up to the range total and a share is right on every page.",
3743
- "When the metric has pinned series, they make up the whole first page and later pages walk the other series by rank.",
3744
- "`series` returns exactly the listed series on one page, unranked and without `__other__`.",
3823
+ "Series are ranked by their total over the range (the count for a `count` metric, the sum of Last readings for `last`, the sum otherwise), ties broken by series hash, and `limit` of them come back per page, the metric's `ui_chart_max_series` by default, in rank order. Walk the pages with `pagination.next_cursor` and `pagination.prev_cursor`; `pagination.total` counts every series with data in the range.",
3824
+ "Only series with data in the range come back. Without a `series` filter, when none has any, a metric whose `empty_bucket_handling` is `zero` returns one series of zeros labelled with the metric's name (hash `__default__`), unless `normalize` is false.",
3825
+ "Without `sort`, series rank smallest first when the metric's `ui_chart_order` is `lowest` and largest first otherwise.",
3826
+ "When the metric colors by series (`ui_chart_color_mode` is `by_series`), series that match one of its `ui_chart_series_rules` rank ahead of every other series, so they take the first page's places first, except on a `table` chart, which ranks all series together. Color a series by the first active rule it matches, and every other series gray once the metric has an active rule. In the other color modes rules color nothing and every series ranks together.",
3827
+ "A read that shows a series value no color rule covers, on a field in the metric's `ai_color_fields`, asks for new default rules and AI color suggestions (`ai_colors_next_run_at`), at most once a day.",
3828
+ "`__other__` folds in every series that is not on the current page, so the page plus Other always adds up to the range total and a share is right on every page. It comes last.",
3829
+ "`series` returns the listed series that have data in the range, on one page, unranked and without `__other__`.",
3745
3830
  "A metric with a `time_dimension` returns its range folded instead of as a timeline: every hour merges into its hour of the day, weekday or hour of the week. Record keys are then the category as a decimal string (`\"0\"` to `\"23\"`, `\"1\"` for Monday to `\"7\"` for Sunday, `\"0\"` to `\"167\"`), every category is present whatever `normalize` says, and `time_dimension` echoes it.",
3746
3831
  "Data is stored by UTC hour. A fold places each hour in its category in the request `timezone` (echoed as `timezone`), one hour at a time, so a daylight saving change moves only the hours after it.",
3747
3832
  "A fold reads hourly data whatever `interval` says, covers at most 400 days (a longer range is refused), and includes the current hour's data so far.",
@@ -3901,7 +3986,7 @@ export const CLI_COMMANDS = [
3901
3986
  "name": "sort",
3902
3987
  "type": "string",
3903
3988
  "required": false,
3904
- "description": "Ranking direction of the series. `desc` returns the largest first. Optional. Defaults to `\"desc\"`.",
3989
+ "description": "Ranking direction of the series. `desc` returns the largest first. Defaults to the metric's `ui_chart_order`: `asc` for `lowest`, `desc` otherwise. Optional.",
3905
3990
  "allowed_values": [
3906
3991
  "asc",
3907
3992
  "desc"
@@ -3927,15 +4012,16 @@ export const CLI_COMMANDS = [
3927
4012
  "`view_id` is required when creating a metric.",
3928
4013
  "Field references and filters must be compatible with the selected view.",
3929
4014
  "Custom chart ranges require both dates, with an interval of at least 30 minutes.",
3930
- "Color-mode configuration must match the selected chart color mode.",
4015
+ "`ui_chart_color_base` is required in `by_intensity` mode and refused in `by_value` mode. In `by_series` mode it is optional and colors a metric without `group_by`.",
4016
+ "`ui_chart_color_rules` needs at least one rule in `by_value` mode and is refused in the other modes.",
3931
4017
  "`ui_chart_color_mode` must be a mode the chart type supports. A metric created without a `ui_chart_type` is a `bar` chart and is checked as one.",
3932
4018
  "`time_dimension` must be one the chart type supports: `breakdown` takes `hour_of_day` or `weekday`, `heatmap` takes `hour_of_week`, `hour_of_day` or `weekday`, and every other chart type takes none.",
3933
4019
  "A `heatmap` chart requires a `time_dimension`.",
3934
4020
  "A `time_dimension` cannot be combined with a cumulative `ui_chart_value` (`cumulative_sum` or `cumulative_count`).",
3935
- "`ui_chart_order` is read by `breakdown` charts only; other chart types ignore it.",
3936
4021
  "`filters` must be a valid filter expression.",
3937
4022
  "`timestamp_field` cannot reference `__meta__` metadata.",
3938
- "`group_by_display_fields` is set at create and cannot be changed afterwards, because each series takes its label from the first record it sees. Map a `group_by` field to a view field that carries a readable value for the same record."
4023
+ "`ui_chart_series_rules` holds at most 20 rules that are not dismissed, and each rule's `field` must be a field of the view.",
4024
+ "A metric created with `group_by` and without `ui_chart_series_rules` gets default rules for the errors, warnings and successes its first series show, marked `is_default`, and then asks the AI for color rules, which arrive marked `is_suggested` and may replace the defaults of their field. A team with Tailglow AI off gets the defaults only."
3939
4025
  ],
3940
4026
  "path_params": [
3941
4027
  {
@@ -3973,14 +4059,6 @@ export const CLI_COMMANDS = [
3973
4059
  "allowed_values": [],
3974
4060
  "deprecated": null
3975
4061
  },
3976
- {
3977
- "name": "group_by_display_fields",
3978
- "type": "object | null",
3979
- "required": false,
3980
- "description": "Maps a field in `group_by` to another view field whose value labels the series, so a chart grouped on an opaque id reads as `api.example.com` instead of `chk_a1b2c3`. Each label is read from the first record of a series and kept from then on. Optional.",
3981
- "allowed_values": [],
3982
- "deprecated": null
3983
- },
3984
4062
  {
3985
4063
  "name": "filters",
3986
4064
  "type": "string",
@@ -4073,7 +4151,7 @@ export const CLI_COMMANDS = [
4073
4151
  "name": "ui_chart_color_base",
4074
4152
  "type": "ChartColor",
4075
4153
  "required": false,
4076
- "description": "Base color used by intensity mode. Optional.",
4154
+ "description": "Base color used by intensity mode. In series mode, the color of a metric without `group_by`, which draws one series; null draws it blue. Optional.",
4077
4155
  "allowed_values": [
4078
4156
  "blue",
4079
4157
  "red",
@@ -4093,6 +4171,14 @@ export const CLI_COMMANDS = [
4093
4171
  "allowed_values": [],
4094
4172
  "deprecated": null
4095
4173
  },
4174
+ {
4175
+ "name": "ui_chart_series_rules",
4176
+ "type": "object[] | null",
4177
+ "required": false,
4178
+ "description": "Colors for series by value, in order: a series takes the color of the first rule it matches, and once a rule is active every other series is gray. Rules color only a metric with `group_by`. Rules Tailglow adds from its default list (errors red, warnings amber, successes green) are marked `is_default`, and rules the AI suggests are marked `is_suggested`. Optional.",
4179
+ "allowed_values": [],
4180
+ "deprecated": null
4181
+ },
4096
4182
  {
4097
4183
  "name": "ui_chart_show_alerts",
4098
4184
  "type": "boolean",
@@ -4271,11 +4357,13 @@ export const CLI_COMMANDS = [
4271
4357
  },
4272
4358
  {
4273
4359
  "name": "ui_chart_order",
4274
- "type": "ChartOrder",
4360
+ "type": "string | null",
4275
4361
  "required": false,
4276
- "description": "Order a breakdown chart shows its groups in. Null keeps a time dimension in its natural order and ranks field groups by value. Optional.",
4362
+ "description": "Order the chart shows its series in: `highest` largest first, `lowest` smallest first, `natural` largest first with a time dimension kept in its own order (hour 0 to 23, Monday to Sunday). Null is `natural`, and `value` is read as `highest`. Optional.",
4277
4363
  "allowed_values": [
4278
4364
  "natural",
4365
+ "highest",
4366
+ "lowest",
4279
4367
  "value"
4280
4368
  ],
4281
4369
  "deprecated": null
@@ -4333,14 +4421,16 @@ export const CLI_COMMANDS = [
4333
4421
  "Field references and filters must be compatible with the selected view.",
4334
4422
  "Changing the metric's data feed rebuilds its historical rollups.",
4335
4423
  "Custom chart ranges require both dates, with an interval of at least 30 minutes.",
4336
- "Color-mode configuration must match the selected chart color mode.",
4424
+ "`ui_chart_color_base` is required in `by_intensity` mode and refused in `by_value` mode. In `by_series` mode it is optional and colors a metric without `group_by`.",
4425
+ "`ui_chart_color_rules` needs at least one rule in `by_value` mode and is refused in the other modes.",
4337
4426
  "`ui_chart_color_mode` must be a mode the chart type supports. Changing `ui_chart_type` keeps the current mode, so send a supported one with it.",
4338
4427
  "`time_dimension` must be one the chart type supports: `breakdown` takes `hour_of_day` or `weekday`, `heatmap` takes `hour_of_week`, `hour_of_day` or `weekday`, and every other chart type takes none. Send `time_dimension: null` when changing to a type that takes none.",
4339
4428
  "A `heatmap` chart requires a `time_dimension`.",
4340
4429
  "A `time_dimension` cannot be combined with a cumulative `ui_chart_value` (`cumulative_sum` or `cumulative_count`).",
4341
- "`ui_chart_order` is read by `breakdown` charts only; other chart types ignore it.",
4342
4430
  "`filters` must be a valid filter expression.",
4343
- "`timestamp_field` cannot reference `__meta__` metadata."
4431
+ "`timestamp_field` cannot reference `__meta__` metadata.",
4432
+ "`ui_chart_series_rules` holds at most 20 rules that are not dismissed. A rule you add must name a field of the view; a saved rule whose field the view has since dropped is kept and matches nothing.",
4433
+ "Saving `ui_chart_series_rules` replaces your own rules. A suggestion or default you leave out is dismissed, and never added again, only when you also send `seen_suggestions_at` no older than its `suggested_at`; one added after the rules you loaded stays. A suggestion or default you change becomes your own rule."
4344
4434
  ],
4345
4435
  "path_params": [
4346
4436
  {
@@ -4478,7 +4568,7 @@ export const CLI_COMMANDS = [
4478
4568
  "name": "ui_chart_color_base",
4479
4569
  "type": "ChartColor",
4480
4570
  "required": false,
4481
- "description": "Base color used by intensity mode. Optional.",
4571
+ "description": "Base color used by intensity mode. In series mode, the color of a metric without `group_by`, which draws one series; null draws it blue. Optional.",
4482
4572
  "allowed_values": [
4483
4573
  "blue",
4484
4574
  "red",
@@ -4498,6 +4588,22 @@ export const CLI_COMMANDS = [
4498
4588
  "allowed_values": [],
4499
4589
  "deprecated": null
4500
4590
  },
4591
+ {
4592
+ "name": "ui_chart_series_rules",
4593
+ "type": "object[] | null",
4594
+ "required": false,
4595
+ "description": "Colors for series by value, in order: a series takes the color of the first rule it matches, and once a rule is active every other series is gray. Rules color only a metric with `group_by`. Rules Tailglow adds from its default list (errors red, warnings amber, successes green) are marked `is_default`, and rules the AI suggests are marked `is_suggested`. Optional.",
4596
+ "allowed_values": [],
4597
+ "deprecated": null
4598
+ },
4599
+ {
4600
+ "name": "seen_suggestions_at",
4601
+ "type": "ISODateString",
4602
+ "required": false,
4603
+ "description": "The newest `suggested_at` among the rules you loaded. A suggestion or default left out of `ui_chart_series_rules` is dismissed only when it is no newer than this; without it, nothing is dismissed. Optional.",
4604
+ "allowed_values": [],
4605
+ "deprecated": null
4606
+ },
4501
4607
  {
4502
4608
  "name": "ui_chart_show_alerts",
4503
4609
  "type": "boolean",
@@ -4676,11 +4782,13 @@ export const CLI_COMMANDS = [
4676
4782
  },
4677
4783
  {
4678
4784
  "name": "ui_chart_order",
4679
- "type": "ChartOrder",
4785
+ "type": "string | null",
4680
4786
  "required": false,
4681
- "description": "Order a breakdown chart shows its groups in. Null keeps a time dimension in its natural order and ranks field groups by value. Optional.",
4787
+ "description": "Order the chart shows its series in: `highest` largest first, `lowest` smallest first, `natural` largest first with a time dimension kept in its own order (hour 0 to 23, Monday to Sunday). Null is `natural`, and `value` is read as `highest`. Optional.",
4682
4788
  "allowed_values": [
4683
4789
  "natural",
4790
+ "highest",
4791
+ "lowest",
4684
4792
  "value"
4685
4793
  ],
4686
4794
  "deprecated": null
@@ -4851,6 +4959,7 @@ export const CLI_COMMANDS = [
4851
4959
  "metrics:read"
4852
4960
  ],
4853
4961
  "notes": [
4962
+ "Each series is labeled by its view's `display_fields`: per field in `group_by`, the value the series carries for its display field, else the raw value.",
4854
4963
  "`after` and `before` are mutually exclusive."
4855
4964
  ],
4856
4965
  "path_params": [
@@ -4922,90 +5031,13 @@ export const CLI_COMMANDS = [
4922
5031
  "name": "search",
4923
5032
  "type": "string",
4924
5033
  "required": false,
4925
- "description": "Substring matched against labels, hashes, and dimension values. Optional. Minimum length: `1`. Maximum length: `128`.",
5034
+ "description": "Substring matched against hashes, dimension values and carried field values. Optional. Minimum length: `1`. Maximum length: `128`.",
4926
5035
  "allowed_values": [],
4927
5036
  "deprecated": null
4928
5037
  }
4929
5038
  ],
4930
5039
  "body_fields": []
4931
5040
  },
4932
- {
4933
- "resource": "metrics",
4934
- "command": "update-series",
4935
- "operation_id": "updateMetricSeries",
4936
- "summary": "Update Metric Series",
4937
- "description": "Update the appearance overrides for one metric series.",
4938
- "method": "POST",
4939
- "path": "/v1/projects/:project_id/metrics/:metric_id/series/:series_id",
4940
- "alternate_paths": [],
4941
- "scopes": [
4942
- "metrics:write"
4943
- ],
4944
- "notes": [
4945
- "At least one of `color`, `pinned`, or `display_label` must be provided."
4946
- ],
4947
- "path_params": [
4948
- {
4949
- "name": "project_id",
4950
- "type": "string",
4951
- "required": true,
4952
- "description": "Unique identifier of the project.",
4953
- "allowed_values": [],
4954
- "deprecated": null
4955
- },
4956
- {
4957
- "name": "metric_id",
4958
- "type": "string",
4959
- "required": true,
4960
- "description": "Unique identifier of the metric.",
4961
- "allowed_values": [],
4962
- "deprecated": null
4963
- },
4964
- {
4965
- "name": "series_id",
4966
- "type": "string",
4967
- "required": true,
4968
- "description": "Unique identifier of the sery.",
4969
- "allowed_values": [],
4970
- "deprecated": null
4971
- }
4972
- ],
4973
- "query_params": [],
4974
- "body_fields": [
4975
- {
4976
- "name": "color",
4977
- "type": "ChartColor",
4978
- "required": false,
4979
- "description": "Color override; null restores automatic color selection. Optional.",
4980
- "allowed_values": [
4981
- "blue",
4982
- "red",
4983
- "amber",
4984
- "green",
4985
- "teal",
4986
- "purple",
4987
- "pink"
4988
- ],
4989
- "deprecated": null
4990
- },
4991
- {
4992
- "name": "pinned",
4993
- "type": "boolean",
4994
- "required": false,
4995
- "description": "Whether the series is pinned ahead of ranked series. Optional.",
4996
- "allowed_values": [],
4997
- "deprecated": null
4998
- },
4999
- {
5000
- "name": "display_label",
5001
- "type": "string | null",
5002
- "required": false,
5003
- "description": "Display label override; null restores the derived label. Optional.",
5004
- "allowed_values": [],
5005
- "deprecated": null
5006
- }
5007
- ]
5008
- },
5009
5041
  {
5010
5042
  "resource": "monitors",
5011
5043
  "command": "list",
@@ -8257,7 +8289,7 @@ export const CLI_COMMANDS = [
8257
8289
  "deprecated": null
8258
8290
  },
8259
8291
  {
8260
- "name": "default_ai_model",
8292
+ "name": "ai_default_model",
8261
8293
  "type": "AiChatSelection",
8262
8294
  "required": false,
8263
8295
  "description": "Model a new chat opens on. Null clears the preference. An unavailable selection asks the member to choose again; it never changes who pays automatically. Optional.",
@@ -8276,7 +8308,7 @@ export const CLI_COMMANDS = [
8276
8308
  "deprecated": null
8277
8309
  },
8278
8310
  {
8279
- "name": "default_ai_effort",
8311
+ "name": "ai_default_effort",
8280
8312
  "type": "AiEffortLevel",
8281
8313
  "required": false,
8282
8314
  "description": "How hard the assistant is asked to work on each turn by default. Optional.",
@@ -8912,7 +8944,7 @@ export const CLI_COMMANDS = [
8912
8944
  "description": "Field used to order the domains. Optional. Defaults to `\"created_at\"`.",
8913
8945
  "allowed_values": [
8914
8946
  "created_at",
8915
- "domain",
8947
+ "hostname",
8916
8948
  "certificate_status"
8917
8949
  ],
8918
8950
  "deprecated": null
@@ -9021,17 +9053,17 @@ export const CLI_COMMANDS = [
9021
9053
  "The number of custom domains a team can add is limited by its billing plan.",
9022
9054
  "A hostname can only be registered once. Adding one that already exists returns a conflict.",
9023
9055
  "Some hostnames are reserved and cannot be added.",
9024
- "`domain` cannot contain a wildcard (`*`). Add each hostname you want to serve as its own domain.",
9025
- "`domain` must be a valid hostname such as `analytics.example.com`. Labels may contain letters, digits and hyphens, cannot start or end with a hyphen, and the top level domain must be at least two letters."
9056
+ "`hostname` cannot contain a wildcard (`*`). Add each hostname you want to serve as its own domain.",
9057
+ "`hostname` must be a valid hostname such as `analytics.example.com`. Labels may contain letters, digits and hyphens, cannot start or end with a hyphen, and the top level domain must be at least two letters."
9026
9058
  ],
9027
9059
  "path_params": [],
9028
9060
  "query_params": [],
9029
9061
  "body_fields": [
9030
9062
  {
9031
- "name": "domain",
9063
+ "name": "hostname",
9032
9064
  "type": "string",
9033
9065
  "required": true,
9034
- "description": "The custom domain to add, for example `analytics.example.com`. Stored in lowercase. Minimum length: `1`. Maximum length: `255`.",
9066
+ "description": "The hostname to add, for example `analytics.example.com`. Stored in lowercase. Minimum length: `1`. Maximum length: `255`.",
9035
9067
  "allowed_values": [],
9036
9068
  "deprecated": null
9037
9069
  },
@@ -9868,14 +9900,6 @@ export const CLI_COMMANDS = [
9868
9900
  "allowed_values": [],
9869
9901
  "deprecated": null
9870
9902
  },
9871
- {
9872
- "name": "block_on_failure",
9873
- "type": "boolean",
9874
- "required": false,
9875
- "description": "Wait for acknowledgement before sending later deliveries. Defaults to false. Check block_on_failure in the response for availability; null means the setting is unavailable. Optional.",
9876
- "allowed_values": [],
9877
- "deprecated": null
9878
- },
9879
9903
  {
9880
9904
  "name": "exclude_fields",
9881
9905
  "type": "string[]",
@@ -9963,14 +9987,6 @@ export const CLI_COMMANDS = [
9963
9987
  ],
9964
9988
  "deprecated": null
9965
9989
  },
9966
- {
9967
- "name": "block_on_failure",
9968
- "type": "boolean",
9969
- "required": false,
9970
- "description": "Wait for acknowledgement before sending later deliveries. Defaults to false. Check block_on_failure in the response for availability; null means the setting is unavailable. Optional.",
9971
- "allowed_values": [],
9972
- "deprecated": null
9973
- },
9974
9990
  {
9975
9991
  "name": "exclude_fields",
9976
9992
  "type": "string[]",
@@ -79,12 +79,14 @@ export async function runConfigCommand(words, flags) {
79
79
  // `config set project prj_x --jsoon` writes the setting and silently drops the typo, and a
80
80
  // trailing word is ignored rather than questioned.
81
81
  const unknown = Object.keys(flags).filter((flag) => !RESERVED_FLAGS.has(flag));
82
+
82
83
  if (unknown.length > 0) {
83
84
  return fail(
84
85
  `Unknown flag${unknown.length === 1 ? "" : "s"}: ${unknown.map((flag) => `--${flag}`).join(", ")}.`,
85
86
  flags
86
87
  );
87
88
  }
89
+
88
90
  if (rest.length > 0) {
89
91
  return fail(`Unexpected argument${rest.length === 1 ? "" : "s"}: ${rest.join(", ")}.`, flags);
90
92
  }
@@ -115,6 +117,7 @@ export async function runConfigCommand(words, flags) {
115
117
  }
116
118
 
117
119
  const width = Math.max(...entries.map(([name]) => name.length));
120
+
118
121
  return {
119
122
  output: entries.map(([name, shown]) => `${name.padEnd(width)} ${shown}`).join("\n"),
120
123
  code: 0
@@ -143,12 +146,15 @@ export async function runConfigCommand(words, flags) {
143
146
  }
144
147
 
145
148
  const current = (await loadConfig())[key];
149
+
146
150
  if (typeof current !== "string") return fail(`${key} is not set.`, flags);
151
+
147
152
  return succeed(current, { [key]: current }, flags);
148
153
  }
149
154
 
150
155
  if (action === "set") {
151
156
  if (!value) return fail(`Missing a value for ${key}.`, flags);
157
+
152
158
  const next = await updateConfig((stored) => ({ ...stored, [key]: value }));
153
159
 
154
160
  // A `tglow login` credential outranks a stored key, so setting one would otherwise look like it
@@ -157,6 +163,7 @@ export async function runConfigCommand(words, flags) {
157
163
  const note = outranked
158
164
  ? "\nYou are signed in with `tglow login`, which is used first. Run `tglow logout` to use this key."
159
165
  : "";
166
+
160
167
  return succeed(
161
168
  `Set ${key} to ${redactSetting(key, value)}.${note}`,
162
169
  { ok: true, key, value: redactSetting(key, value), outranked_by_login: outranked },