chore: graduate aibridge cli out of experimental (#20524)

<!--

If you have used AI to produce some or all of this PR, please ensure you have read our [AI Contribution guidelines](https://coder.com/docs/about/contributing/AI_CONTRIBUTING) before submitting.

-->
This commit is contained in:
Danny Kopping
2025-10-29 07:36:08 -06:00
committed by GitHub
parent b20fd6f2c1
commit dcfd6d6f73
12 changed files with 183 additions and 9 deletions
+15
View File
@@ -1180,6 +1180,21 @@
"path": "./reference/cli/index.md",
"icon_path": "./images/icons/terminal.svg",
"children": [
{
"title": "aibridge",
"description": "Manage AIBridge.",
"path": "reference/cli/aibridge.md"
},
{
"title": "aibridge interceptions",
"description": "Manage AIBridge interceptions.",
"path": "reference/cli/aibridge_interceptions.md"
},
{
"title": "aibridge interceptions list",
"description": "List AIBridge interceptions as JSON.",
"path": "reference/cli/aibridge_interceptions_list.md"
},
{
"title": "autoupdate",
"description": "Toggle auto-update policy for a workspace",
+16
View File
@@ -0,0 +1,16 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# aibridge
Manage AIBridge.
## Usage
```console
coder aibridge
```
## Subcommands
| Name | Purpose |
|-----------------------------------------------------------|--------------------------------|
| [<code>interceptions</code>](./aibridge_interceptions.md) | Manage AIBridge interceptions. |
+16
View File
@@ -0,0 +1,16 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# aibridge interceptions
Manage AIBridge interceptions.
## Usage
```console
coder aibridge interceptions
```
## Subcommands
| Name | Purpose |
|-------------------------------------------------------|--------------------------------------|
| [<code>list</code>](./aibridge_interceptions_list.md) | List AIBridge interceptions as JSON. |
+69
View File
@@ -0,0 +1,69 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# aibridge interceptions list
List AIBridge interceptions as JSON.
## Usage
```console
coder aibridge interceptions list [flags]
```
## Options
### --initiator
| | |
|------|---------------------|
| Type | <code>string</code> |
Only return interceptions initiated by this user. Accepts a user ID, username, or "me".
### --started-before
| | |
|------|---------------------|
| Type | <code>string</code> |
Only return interceptions started before this time. Must be after 'started-after' if set. Accepts a time in the RFC 3339 format, e.g. "2006-01-02T15:04:05Z07:00".
### --started-after
| | |
|------|---------------------|
| Type | <code>string</code> |
Only return interceptions started after this time. Must be before 'started-before' if set. Accepts a time in the RFC 3339 format, e.g. "2006-01-02T15:04:05Z07:00".
### --provider
| | |
|------|---------------------|
| Type | <code>string</code> |
Only return interceptions from this provider.
### --model
| | |
|------|---------------------|
| Type | <code>string</code> |
Only return interceptions from this model.
### --after-id
| | |
|------|---------------------|
| Type | <code>string</code> |
The ID of the last result on the previous page to use as a pagination cursor.
### --limit
| | |
|---------|------------------|
| Type | <code>int</code> |
| Default | <code>100</code> |
The limit of results to return. Must be between 1 and 1000.
+1
View File
@@ -68,6 +68,7 @@ Coder — A tool for provisioning self-hosted development environments with Terr
| [<code>groups</code>](./groups.md) | Manage groups |
| [<code>prebuilds</code>](./prebuilds.md) | Manage Coder prebuilds |
| [<code>external-workspaces</code>](./external-workspaces.md) | Create or manage external workspaces |
| [<code>aibridge</code>](./aibridge.md) | Manage AIBridge. |
## Options
@@ -134,8 +134,7 @@ func (r *RootCmd) aibridgeInterceptionsList() *serpent.Command {
return xerrors.Errorf("limit value must be between 1 and %d", maxInterceptionsLimit)
}
expCli := codersdk.NewExperimentalClient(client)
resp, err := expCli.AIBridgeListInterceptions(inv.Context(), codersdk.AIBridgeListInterceptionsFilter{
resp, err := client.AIBridgeListInterceptions(inv.Context(), codersdk.AIBridgeListInterceptionsFilter{
Pagination: codersdk.Pagination{
AfterID: afterID,
// #nosec G115 - Checked above.
@@ -54,7 +54,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
}, nil)
args := []string{
"exp",
"aibridge",
"interceptions",
"list",
@@ -135,7 +134,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
}, nil)
args := []string{
"exp",
"aibridge",
"interceptions",
"list",
@@ -189,7 +187,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
}, nil)
args := []string{
"exp",
"aibridge",
"interceptions",
"list",
+3 -4
View File
@@ -25,13 +25,12 @@ func (r *RootCmd) enterpriseOnly() []*serpent.Command {
r.prebuilds(),
r.provisionerd(),
r.externalWorkspaces(),
r.aibridge(),
}
}
func (r *RootCmd) enterpriseExperimental() []*serpent.Command {
return []*serpent.Command{
r.aibridge(),
}
func (*RootCmd) enterpriseExperimental() []*serpent.Command {
return []*serpent.Command{}
}
func (r *RootCmd) EnterpriseSubcommands() []*serpent.Command {
+1
View File
@@ -14,6 +14,7 @@ USAGE:
$ coder templates init
SUBCOMMANDS:
aibridge Manage AIBridge.
external-workspaces Create or manage external workspaces
features List Enterprise features
groups Manage groups
+12
View File
@@ -0,0 +1,12 @@
coder v0.0.0-devel
USAGE:
coder aibridge
Manage AIBridge.
SUBCOMMANDS:
interceptions Manage AIBridge interceptions.
———
Run `coder --help` for a list of global options.
@@ -0,0 +1,12 @@
coder v0.0.0-devel
USAGE:
coder aibridge interceptions
Manage AIBridge interceptions.
SUBCOMMANDS:
list List AIBridge interceptions as JSON.
———
Run `coder --help` for a list of global options.
@@ -0,0 +1,37 @@
coder v0.0.0-devel
USAGE:
coder aibridge interceptions list [flags]
List AIBridge interceptions as JSON.
OPTIONS:
--after-id string
The ID of the last result on the previous page to use as a pagination
cursor.
--initiator string
Only return interceptions initiated by this user. Accepts a user ID,
username, or "me".
--limit int (default: 100)
The limit of results to return. Must be between 1 and 1000.
--model string
Only return interceptions from this model.
--provider string
Only return interceptions from this provider.
--started-after string
Only return interceptions started after this time. Must be before
'started-before' if set. Accepts a time in the RFC 3339 format, e.g.
"====[timestamp]=====07:00".
--started-before string
Only return interceptions started before this time. Must be after
'started-after' if set. Accepts a time in the RFC 3339 format, e.g.
"====[timestamp]=====07:00".
———
Run `coder --help` for a list of global options.