Files
agents_and_robots/agents/agent-wsl-lucas/agent.go
T
egutierrez 63f9bc3e9e feat: provision agent-wsl-lucas para flow 0009
Agent LLM mode=user para wsl-lucas (10.42.0.10:7474). Matrix user
@agent-wsl-lucas:matrix-af2f3d.organic-machine.com. Tools allowed: exec
+ shell.eval + fs.read/write/list/stat + git + docker + proc + pkg.search.
Delegacion sudo pendiente (futuro agent-wsl-lucas-sudo).
2026-05-24 14:07:13 +02:00

42 lines
1.4 KiB
Go

// Package agentwsllucas defines pure decision rules for the agent-wsl-lucas bot.
// Provisioned by dev-scripts/agent/provision-agent-user.sh (issue 0144b).
//
// Mode: user. Operates on wsl-lucas with operator's uid (no sudo).
// Tool registry is built by the runtime from cfg.DeviceMesh.ToolsAllowed
// (issue 0144a wires the LLM action to invoke devicemesh tools).
package agentwsllucas
import (
"github.com/enmanuel/agents/devagents"
"github.com/enmanuel/agents/pkg/decision"
)
func init() {
devagents.Register("agent-wsl-lucas", Rules)
}
// Rules returns the decision rules for agent-wsl-lucas.
//
// Strategy: any DM or @mention triggers the LLM with tool_use. The LLM
// decides which devicemesh tool to invoke (exec, fs.*, project.create,
// delegate_sudo, ...). Tools are registered automatically by the runtime
// from the cfg.DeviceMesh.ToolsAllowed slice — we do NOT enumerate them
// here. See devagents/registry_build.go and pkg/tools/devicemesh/.
//
// Pure: zero I/O, zero side effects. The action emits []decision.Action,
// the shell layer consumes it.
func Rules() []decision.Rule {
return []decision.Rule{
{
Name: "llm-conversational",
Match: func(ctx decision.MessageContext) bool {
return ctx.IsDirectMsg || ctx.IsMention
},
Actions: []decision.Action{{
Kind: decision.ActionKindLLM,
LLM: &decision.LLMAction{},
}},
},
}
}