Skip to content

Commit 997b748

Browse files
feat(cli): rename hidden daemon entrypoint to "serve"
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent e363e29 commit 997b748

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

autocomplete/fish_autocomplete

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,21 +186,21 @@ complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcomma
186186
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from console; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command'
187187
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console daemon simulate help h' -a 'daemon' -d 'Drive a single local agent session in text mode (start/say/stop)'
188188
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon' -f -l help -s h -d 'show help'
189-
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and not __fish_seen_subcommand_from start say stop run help h' -a 'start' -d 'Start a detached agent session daemon'
189+
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and not __fish_seen_subcommand_from start say stop serve help h' -a 'start' -d 'Start a detached agent session daemon'
190190
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and __fish_seen_subcommand_from start' -f -l port -r -d 'Fixed loopback port shared by the agent and control connections'
191191
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and __fish_seen_subcommand_from start' -f -l help -s h -d 'show help'
192192
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and __fish_seen_subcommand_from start; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command'
193-
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and not __fish_seen_subcommand_from start say stop run help h' -a 'say' -d 'Send a text turn to the running session and print the reply'
193+
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and not __fish_seen_subcommand_from start say stop serve help h' -a 'say' -d 'Send a text turn to the running session and print the reply'
194194
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and __fish_seen_subcommand_from say' -f -l port -r -d 'Fixed loopback port shared by the agent and control connections'
195195
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and __fish_seen_subcommand_from say' -f -l help -s h -d 'show help'
196196
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and __fish_seen_subcommand_from say; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command'
197-
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and not __fish_seen_subcommand_from start say stop run help h' -a 'stop' -d 'Stop the running session and its agent'
197+
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and not __fish_seen_subcommand_from start say stop serve help h' -a 'stop' -d 'Stop the running session and its agent'
198198
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and __fish_seen_subcommand_from stop' -f -l port -r -d 'Fixed loopback port shared by the agent and control connections'
199199
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and __fish_seen_subcommand_from stop' -f -l help -s h -d 'show help'
200200
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and __fish_seen_subcommand_from stop; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command'
201-
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and __fish_seen_subcommand_from run' -f -l help -s h -d 'show help'
202-
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and __fish_seen_subcommand_from run; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command'
203-
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and not __fish_seen_subcommand_from start say stop run help h' -a 'help' -d 'Shows a list of commands or help for one command'
201+
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and __fish_seen_subcommand_from serve' -f -l help -s h -d 'show help'
202+
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and __fish_seen_subcommand_from serve; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command'
203+
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from daemon; and not __fish_seen_subcommand_from start say stop serve help h' -a 'help' -d 'Shows a list of commands or help for one command'
204204
complete -x -c lk -n '__fish_seen_subcommand_from agent a; and not __fish_seen_subcommand_from init create dockerfile config deploy status update restart rollback logs tail delete destroy versions list secrets update-secrets private-link start dev console daemon simulate help h' -a 'simulate' -d 'Run agent simulations against LiveKit Cloud'
205205
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l num-simulations -s n -r -d 'Number of scenarios to generate'
206206
complete -c lk -n '__fish_seen_subcommand_from agent a; and __fish_seen_subcommand_from simulate' -f -l concurrency -r -d 'Max simulations running in parallel (default: server-side limit)'

cmd/lk/session.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const (
4545
envSessionReadyFile = "LK_SESSION_READY_FILE" // path the daemon writes its status to
4646

4747
// sessionDaemonSubcommand is the hidden entrypoint `start` re-execs into.
48-
sessionDaemonSubcommand = "run"
48+
sessionDaemonSubcommand = "serve"
4949
)
5050

5151
var sessionPortFlag = &cli.IntFlag{
@@ -93,7 +93,7 @@ var agentDaemonCommand = &cli.Command{
9393
Hidden: true,
9494
Action: func(ctx context.Context, cmd *cli.Command) error {
9595
if os.Getenv(envSessionReadyFile) == "" {
96-
return fmt.Errorf("`lk agent daemon run` is an internal entrypoint; run `lk agent daemon start <entrypoint>` instead")
96+
return fmt.Errorf("`lk agent daemon serve` is an internal entrypoint; run `lk agent daemon start <entrypoint>` instead")
9797
}
9898
runSessionDaemon()
9999
return nil

cmd/lk/session_daemon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
agent "github.com/livekit/protocol/livekit/agent"
3232
)
3333

34-
// runSessionDaemon is the entry point for the hidden `lk agent daemon run`
34+
// runSessionDaemon is the entry point for the hidden `lk agent daemon serve`
3535
// subcommand that `lk agent daemon start` re-execs. It runs the detached
3636
// daemon to completion (until the agent exits or `stop` is received).
3737
func runSessionDaemon() {

0 commit comments

Comments
 (0)