You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
simulate: list, view and export subcommands (#968)
* simulate: view and export are subcommands, not flags
--view ID and --export ID each replaced the whole run action from inside
a flag, and audio inherited both. A flag that takes an ID and swaps the
action is a subcommand, so they become `lk agent simulate view <run-id>`
and `lk agent simulate export <run-id>`, matching the noun/verb shape of
the rest of lk. The exit hints print the new forms.
* simulate: list a project's recent runs
`lk agent simulate list` prints the API's first page (newest first) with
ID, created time, status, mode and agent name, or the raw response with
--json, so a run ID can be found without the dashboard.
* simulate: --limit on list pages through runs
`lk agent simulate list` fetched only the API's first page (20 runs).
--limit walks next_page_token until that many runs are collected, the
same loop as `lk egress list`; unset keeps the single-page default.
--json now prints the collected runs wrapped in the List response so the
field formatting is unchanged.
* simulate: text subcommand names the default mode
`lk agent simulate text` runs the same text simulation as bare
`lk agent simulate`, so the mode can be spelled out the same way as
`simulate audio`. Bare `simulate` is unchanged.
* simulate: bare command prints help instead of running
`lk agent simulate` with no subcommand shows the subcommand list and
does nothing else; a run needs `text` or `audio`. The project is not
resolved for the help path.
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l scenarios -r -d 'Path to a scenarios `FILE` (yaml). If omitted, scenarios are generated from the agent\'s source'
226
226
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l yes -s y -d 'Skip the source-upload confirmation prompt (required for non-interactive runs that generate from source)'
227
-
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l view -r -d 'Open a pre-existing simulation'
228
-
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l export -r -d 'Print the run with run `ID` and its exact per-job chat contexts as JSON. Nothing is run or polled: the run must already be finished'
229
227
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l agent-name -r -d 'Run against an already-running agent instead of spawning one locally. Pass the registered `NAME`, or "" to target the project\'s default agent (the one that auto-joins every room). Requires --scenarios.'
230
228
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l help -s h -d 'show help'
231
-
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and not __fish_seen_subcommand_from audio' -a 'audio' -d 'Simulate speech-to-speech interactions using the agent\'s full audio pipeline'
229
+
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and not __fish_seen_subcommand_from text audio list view export' -a 'text' -d 'Simulate text-only interactions'
230
+
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and __fish_seen_subcommand_from text' -f -l help -s h -d 'show help'
231
+
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and not __fish_seen_subcommand_from text audio list view export' -a 'audio' -d 'Simulate speech-to-speech interactions using the agent\'s full audio pipeline'
232
232
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and __fish_seen_subcommand_from audio' -f -l background-noise -d 'Mix ambient noise into the simulated user\'s audio'
233
233
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and __fish_seen_subcommand_from audio' -f -l low-quality-microphone -d 'Publish the simulated user\'s audio as a low-quality microphone would capture it'
234
234
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and __fish_seen_subcommand_from audio' -f -l packet-loss -d 'Drop packets from the simulated user\'s audio track'
235
235
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and __fish_seen_subcommand_from audio' -f -l help -s h -d 'show help'
236
+
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and not __fish_seen_subcommand_from text audio list view export' -a 'list' -d 'List the project\'s most recent simulation runs'
237
+
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and __fish_seen_subcommand_from list' -f -l limit -r -d 'maximum number of runs to return. If unset, defaults to API page size'
238
+
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and __fish_seen_subcommand_from list' -f -l json -s j -d 'Output as JSON'
239
+
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and __fish_seen_subcommand_from list' -f -l help -s h -d 'show help'
240
+
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and not __fish_seen_subcommand_from text audio list view export' -a 'view' -d 'Open a pre-existing simulation run'
241
+
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and __fish_seen_subcommand_from view' -f -l help -s h -d 'show help'
242
+
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and not __fish_seen_subcommand_from text audio list view export' -a 'export' -d 'Print a finished run and its exact per-job chat contexts as JSON. Nothing is run or polled'
243
+
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate; and __fish_seen_subcommand_from export' -f -l help -s h -d 'show help'
236
244
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy promote status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console daemon simulate help h' -a 'help' -d 'Shows a list of commands or help for one command'
@@ -93,21 +96,24 @@ var simulateCommand = &cli.Command{
93
96
Aliases: []string{"y"},
94
97
Usage: "Skip the source-upload confirmation prompt (required for non-interactive runs that generate from source)",
95
98
},
96
-
&cli.StringFlag{
97
-
Name: "view",
98
-
Usage: "Open a pre-existing simulation",
99
-
},
100
-
&cli.StringFlag{
101
-
Name: "export",
102
-
Usage: "Print the run with run `ID` and its exact per-job chat contexts as JSON. Nothing is run or polled: the run must already be finished",
103
-
},
104
99
&cli.StringFlag{
105
100
Name: "agent-name",
106
101
Usage: "Run against an already-running agent instead of spawning one locally. Pass the registered `NAME`, or \"\" to target the project's default agent (the one that auto-joins every room). Requires --scenarios.",
107
102
},
108
103
},
109
104
}
110
105
106
+
varsimulateTextCommand=&cli.Command{
107
+
Name: "text",
108
+
Usage: "Simulate text-only interactions",
109
+
Description: "Options on lk agent simulate apply here too, e.g. --scenarios and --agent-name.",
0 commit comments