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:
@@ -146,6 +146,7 @@
|
||||
<a href="/settings/profile" {{if eq .Nav "settings/profile"}}aria-current="page"{{end}}>{{template "icon" "profile"}}Profile</a>
|
||||
<div class="nav-label">Connections</div>
|
||||
<a href="/settings/connections" {{if eq .Nav "settings/connections"}}aria-current="page"{{end}}>{{template "icon" "core"}}All connections</a>
|
||||
<a href="/settings/agents" {{if eq .Nav "settings/agents"}}aria-current="page"{{end}}>{{template "icon" "ai"}}Agents</a>
|
||||
<a href="/settings/posting" {{if eq .Nav "settings/posting"}}aria-current="page"{{end}}>{{template "icon" "accounts"}}Posting accounts</a>
|
||||
<a href="/settings/accounts" {{if eq .Nav "settings/accounts"}}aria-current="page"{{end}}>{{template "icon" "accounts"}}Social accounts</a>
|
||||
<a href="/settings/core" {{if eq .Nav "settings/core"}}aria-current="page"{{end}}>{{template "icon" "core"}}Core & Hermes</a>
|
||||
@@ -278,6 +279,22 @@
|
||||
</section>
|
||||
{{end}}
|
||||
|
||||
{{/* An agent's scopes: {{template "agent-scopes" (dict "Scopes" … "Grants" …)}} */}}
|
||||
{{define "agent-scopes"}}{{$sc := .Scopes}}
|
||||
<fieldset class="access">
|
||||
<legend>May</legend>
|
||||
<table class="list access-grid"><tbody>
|
||||
{{range .Grants}}{{$a := print (index $sc .ID)}}<tr>
|
||||
<td>{{.Name}}</td>
|
||||
<td><label class="check"><input type="radio" name="scope:{{.ID}}" value="" {{if eq $a ""}}checked{{end}}> Nothing</label></td>
|
||||
<td><label class="check"><input type="radio" name="scope:{{.ID}}" value="read" {{if eq $a "view"}}checked{{end}}> Read</label></td>
|
||||
<td><label class="check"><input type="radio" name="scope:{{.ID}}" value="act" {{if eq $a "edit"}}checked{{end}}> Read and act</label></td>
|
||||
</tr>{{end}}
|
||||
</tbody></table>
|
||||
<p class="help"><em>Read and act</em> lets it change things, such as writing drafts. Anything that leaves Supermarket (a post, an email, a site push) waits for a person's approval (Phase 11, part 3).</p>
|
||||
</fieldset>
|
||||
{{end}}
|
||||
|
||||
{{/* Users (Settings → Users, and one user's page). */}}
|
||||
{{define "user-status"}}{{if eq .Status "invited"}}{{if .InviteEnd.IsZero}}<span class="pill warn">Invitation expired</span>{{else}}<span class="pill">Invited</span> <span class="muted small">until {{.InviteEnd.Local.Format "2 Jan"}}</span>{{end}}{{else if eq .Status "disabled"}}<span class="pill">Turned off</span>{{else if .Locked}}<span class="pill warn">Locked</span>{{else}}<span class="pill ok">Active</span>{{if .TwoFactor}} <span class="muted small">two-factor</span>{{end}}{{end}}{{end}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user