agent installation; OLLIE_DEFAULT_AGENT

This commit is contained in:
Levi Neely 2026-04-04 12:01:57 +02:00
parent 40abd7a096
commit f201a0a737
5 changed files with 42 additions and 19 deletions

17
agents/anvillm-agent.conf Normal file
View File

@ -0,0 +1,17 @@
{
"prompt": "",
"mcpServers": {
"superpowers-mcp-server": {
"command": "superpowers-mcp-server",
"args": [],
"env": {
"SUPERPOWERD_SESSION_TOKEN": "${SUPERPOWERD_SESSION_TOKEN}"
}
}
},
"hooks": {
"agentSpawn": "anvillm-hook agentSpawn",
"userPromptSubmit": "anvillm-hook userPromptSubmit",
"stop": "anvillm-hook stop"
}
}

17
agents/default.json Normal file
View File

@ -0,0 +1,17 @@
{
"prompt": "",
"mcpServers": {
"superpowers-mcp-server": {
"command": "superpowers-mcp-server",
"args": [],
"env": {
"SUPERPOWERD_SESSION_TOKEN": "${SUPERPOWERD_SESSION_TOKEN}"
}
}
},
"hooks": {
"agentSpawn": "true",
"userPromptSubmit": "true",
"stop": "true"
}
}

View File

@ -1,17 +0,0 @@
{
"globalShortcut": "Ctrl+Space",
"mcpServers": {
"superpowers-mcp-server": {
"command": "superpowers-mcp-server",
"args": [],
"env": {
"SUPERPOWERD_SESSION_TOKEN": "${SUPERPOWERD_SESSION_TOKEN}"
}
}
},
"hooks": {
"agentSpawn": "anvillm-hook agentSpawn",
"userPromptSubmit": "anvillm-hook userPromptSubmit",
"stop": "anvillm-hook stop"
}
}

View File

@ -274,7 +274,10 @@ func main() {
)
// Load the default agent config.
agentName := "default"
agentName := os.Getenv("OLLIE_AGENT")
if agentName == "" {
agentName = "default"
}
if len(os.Args) > 2 {
agentName = os.Args[2]
}
@ -539,7 +542,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case "ctrl+c":
now := time.Now()
// Handle double-press to quit
if m.quitPending && now.Sub(m.lastCtrlC) <= 1*time.Second {
// Double Ctrl+C within 1 second: quit

3
mkfile
View File

@ -4,8 +4,11 @@ all:V: install
build:V:
go build -o $INSTALL_PATH/ollie
mkdir -p $HOME/.config/ollie
cp -rf agents $HOME/.config/ollie
install:V: build
clean:V:
rm -f $INSTALL_PATH/ollie