mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-15 08:17:09 +00:00
feat(cli-credentials): add agent-scoped git credentials
This commit is contained in:
1 parent
e6242dbbbc
commit
994acfe3a4
47 files changed
+2152
-113
No files matched your search
@@ -1173,8 +1173,45 @@ CLI authentication credentials for secure command execution. Requires **admin ro
|
||||
| `DELETE` | `/v1/cli-credentials/{id}` | Delete credential |
|
||||
| `POST` | `/v1/cli-credentials/{id}/test` | Test credential connection (dry-run) |
|
||||
|
||||
### Agent Credentials
|
||||
|
||||
Agent credentials store PAT/SSH/env material for one CLI credential and one
|
||||
agent. They are the default git setup path; agent access controls who can cause
|
||||
the credential to be used. Responses return metadata only and never include raw
|
||||
typed token/key blobs.
|
||||
|
||||
| Method | Path | Description |
|
||||
|--------|------|-------------|
|
||||
| `GET` | `/v1/cli-credentials/{id}/agent-credentials` | List agent credentials for CLI cred |
|
||||
| `GET` | `/v1/cli-credentials/{id}/agent-credentials/{agentId}` | Get agent credential metadata |
|
||||
| `PUT` | `/v1/cli-credentials/{id}/agent-credentials/{agentId}` | Set agent credential |
|
||||
| `DELETE` | `/v1/cli-credentials/{id}/agent-credentials/{agentId}` | Delete agent credential |
|
||||
|
||||
Typed git request body:
|
||||
|
||||
```json
|
||||
{
|
||||
"credential_type": "pat",
|
||||
"host_scope": "github.com",
|
||||
"blob": { "token": "ghp_..." }
|
||||
}
|
||||
```
|
||||
|
||||
Env request body:
|
||||
|
||||
```json
|
||||
{
|
||||
"env": {
|
||||
"GH_TOKEN": { "kind": "sensitive", "value": "..." }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Per-User Credentials
|
||||
|
||||
Advanced personal overrides. These remain for backward compatibility and have
|
||||
higher runtime precedence than channel/context and agent credentials.
|
||||
|
||||
| Method | Path | Description |
|
||||
|--------|------|-------------|
|
||||
| `GET` | `/v1/cli-credentials/{id}/user-credentials` | List user credentials for CLI cred |
|
||||
|
||||
Reference in new issue
Block a user