Phase 11, part 1: agents and their keys
Agents are users of kind agent, each given modules to read, or to read and act on, and the CRM scope. Admins make them under Settings → Agents, on every edition; keys (sm_…) are shown once and kept as hashes, can expire, be rotated (the old one works a day) or revoked, and record their last use. /mcp takes agent keys and offers each agent only the tools its scopes allow. On the local edition, mcp-token is the key of a built-in Hermes agent with the CRM and the Market. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -323,12 +323,19 @@ func run(log *slog.Logger) error {
|
||||
Version: version,
|
||||
MCPToken: token,
|
||||
MCPSocket: filepath.Join(hostData, filepath.Base(mcpSocket)),
|
||||
MCP: mcpserver.Handler(database, token, version),
|
||||
Mail: appMail(cfg),
|
||||
Log: log,
|
||||
ImportStatus: status,
|
||||
ImportErr: importErr,
|
||||
}
|
||||
// Agents reach /mcp with their keys. On the local edition, mcp-token is
|
||||
// the key of the built-in Hermes agent.
|
||||
srv.MCP = mcpserver.Handler(database, version, srv.AgentAuth)
|
||||
if local {
|
||||
if err := srv.EnsureHermes(token); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
handler, err := srv.Handler()
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user