| 5064 | } |
| 5065 | |
| 5066 | func (c *unixSocketClient) AgentSpawn( |
| 5067 | ctx context.Context, |
| 5068 | request AgentSpawnRequest, |
| 5069 | credentials agentidentity.Credentials, |
| 5070 | ) (AgentSpawnRecord, error) { |
| 5071 | var response contract.AgentSpawnResponse |
| 5072 | if err := c.doAgentJSON( |
| 5073 | ctx, |
| 5074 | http.MethodPost, |
| 5075 | "/api/agent/spawn", |
| 5076 | nil, |
| 5077 | request, |
| 5078 | credentials, |
| 5079 | &response, |
| 5080 | ); err != nil { |
| 5081 | return AgentSpawnRecord{}, err |
| 5082 | } |
| 5083 | return response.Spawn, nil |
| 5084 | } |
| 5085 | |
| 5086 | func (c *unixSocketClient) AgentChannels( |
| 5087 | ctx context.Context, |