mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 06:23:17 -10:00
Every list of the coding agents now derives from internal/agents' registry, one Def each, and Cursor's CLI (cursor-agent) is a fifth agent. The registry: - each agent's login command, login formats and capture on its Def; one message for every agent where each had its own - the agents' table, the README's list and the docs' history lists are generated from the registry (cli.DocBlocks, TestDocBlocks); scripts and Go tests take their lists from it too - each agent's own code lives in a file named for it; the structure test lets only an agent's own files choose by its name, following constants named after an agent - a VM remade by clone on/off keeps no agent's login files (agents.LoginFiles from every Def.Logins; Claude Code's .claude.json stays, as it is also history) Cursor's CLI: - `devvm --agents cursor`, `devvm agent login cursor`, history import and export of ~/.cursor/chats - the proxy captures its login at a GET endpoint, guards a shared host by path, and puts the login in only where the CLI sends it, bound to the CLI's 57 methods - account changes and the agent store are refused in a VM; Cursor's headers and trailers are scanned for tokens - e2e: Cursor's CLI in the network section, its poll behind the fake company proxy Docs: the agents' pages lead with commands, with a How it works page for the agents. Co-authored-by: JB <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
82 lines
2.2 KiB
Plaintext
82 lines
2.2 KiB
Plaintext
# devvm completion prints a script for bash, zsh and fish, and nothing else.
|
|
exec devvm completion bash
|
|
stdout '__devvm'
|
|
! stderr .
|
|
exec devvm completion zsh
|
|
stdout '^#compdef devvm$'
|
|
exec devvm completion fish
|
|
stdout 'complete -c devvm'
|
|
! exec devvm completion powershell
|
|
stderr '^devvm: arg_not_choice choices=bash, zsh, fish command=devvm completion given=powershell$'
|
|
stderr '^usage_help command=devvm completion$'
|
|
! stdout .
|
|
|
|
# The commands users run, not the hidden ones; devvm takes no image.
|
|
exec devvm __complete ''
|
|
stdout '^build\t'
|
|
stdout '^completion\t'
|
|
! stdout '^base$'
|
|
! stdout '^claude$'
|
|
! stdout '^_'
|
|
! stdout '^version'
|
|
stdout '^:4$'
|
|
|
|
# Your layers are image names, and shared tools aren't; the layers given
|
|
# are left out.
|
|
mkdir $XDG_CONFIG_HOME/devvm/layers
|
|
cp foo.sh $XDG_CONFIG_HOME/devvm/layers/foo.sh
|
|
exec devvm __complete build docker+
|
|
stdout '^docker\+foo$'
|
|
stdout '^docker\+nix$'
|
|
! stdout '^docker\+docker$'
|
|
! stdout 'claude|node'
|
|
|
|
# --tools, --agents and --layers: comma-separated lists of their part's
|
|
# names, and none.
|
|
exec devvm __complete --agents claude,c
|
|
stdout '^claude,codex$'
|
|
cp stdout agents-c.txt
|
|
# Exactly every other agent whose name starts with c, in the registry's
|
|
# order, from the runner's list.
|
|
exec sh -c 'for a in $(printf %s "$AGENT_CHOICES" | tr -d ,); do case $a in claude) ;; c*) echo "claude,$a" ;; esac; done; echo :4'
|
|
cmp stdout agents-c.txt
|
|
exec devvm __complete --layers ''
|
|
stdout '^foo$'
|
|
stdout '^none$'
|
|
! stdout '^base$'
|
|
exec devvm __complete --tools n
|
|
stdout '^node$'
|
|
stdout '^none$'
|
|
exec devvm __complete setup --agents ''
|
|
stdout '^opencode$'
|
|
|
|
# tools add and rm take shared tools only, each a word of its own, those
|
|
# given left out.
|
|
exec devvm __complete tools add ''
|
|
stdout '^python$'
|
|
! stdout '^foo$'
|
|
! stdout '^base$'
|
|
exec devvm __complete tools rm python c
|
|
stdout '^claude$'
|
|
stdout '^codex$'
|
|
! stdout python
|
|
exec devvm __complete tools add python ''
|
|
! stdout '^python$'
|
|
stdout '^claude$'
|
|
|
|
# Flags: features, the ports keywords; never file names.
|
|
exec devvm __complete setup --features fzf,
|
|
stdout '^fzf,omb$'
|
|
! stdout '^fzf,fzf$'
|
|
exec devvm __complete --ports ''
|
|
stdout '^all$'
|
|
stdout '^none$'
|
|
exec devvm __complete rm ''
|
|
stdout '^:4$'
|
|
exec devvm __complete completion ''
|
|
stdout '^fish$'
|
|
! stub_calls
|
|
|
|
-- foo.sh --
|
|
#!/bin/bash
|