Agents pane: project-scoped runs with selection, roster cursor, editable settings
This commit is contained in:
@@ -441,3 +441,20 @@ func (c *Client) WakeAgent(agentID string) error {
|
||||
return c.do("POST", "/api/agents/"+agentID+"/wakeup",
|
||||
map[string]any{"source": "on_demand", "triggerDetail": "manual", "forceFreshSession": false}, nil)
|
||||
}
|
||||
|
||||
// UpdateAgent changes an agent's own record. Paperclip owns it, so this is a
|
||||
// PATCH with only the fields that changed; a field left out is not touched.
|
||||
func (c *Client) UpdateAgent(agentID string, body map[string]any) error {
|
||||
if !c.UsingUserKey() {
|
||||
return errors.New("refusing to write with the agent key: set PAPERCLIP_BOARD_KEY")
|
||||
}
|
||||
return c.do("PATCH", "/api/agents/"+agentID, body, nil)
|
||||
}
|
||||
|
||||
// AgentRaw reads one agent's full record, including the configuration blocks,
|
||||
// so an edit can change one field and leave the rest exactly as it was.
|
||||
func (c *Client) AgentRaw(agentID string) (map[string]any, error) {
|
||||
var out map[string]any
|
||||
err := c.do("GET", "/api/agents/"+agentID, nil, &out)
|
||||
return out, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user