feat: add /ego-mgr slash command and rename pcexec to pc-exec

Changes:
1. Add /ego-mgr slash command with subcommands:
   - get, set, list, delete, add-column, add-public-column, show
   - Uses pcExec to call ego-mgr binary with proper env vars

2. Rename pcexec → pc-exec throughout codebase:
   - Tool name: pcexec → pc-exec
   - Function exports: pcexec → pcExec, pcexecSync → pcExecSync
   - Updated all references in skills and plugin files

3. Translate all Chinese text to English:
   - ego-mgr-slash.ts responses
   - slash-commands.ts responses
   - SKILL.md files remain in English
This commit is contained in:
zhi
2026-03-24 10:21:35 +00:00
parent 7fd2819a04
commit a3a1081f22
7 changed files with 283 additions and 45 deletions

View File

@@ -1,6 +1,6 @@
---
name: secret-mgr
description: Manage OpenClaw agent credentials (usernames/secrets). Use when storing, retrieving, listing, generating, or removing credentials for an agent. Trigger on requests about saving or fetching usernames, passwords, tokens, API keys, or other secrets. MUST call secret-mgr via the pcexec tool.
description: Manage OpenClaw agent credentials (usernames/secrets). Use when storing, retrieving, listing, generating, or removing credentials for an agent. Trigger on requests about saving or fetching usernames, passwords, tokens, API keys, or other secrets. MUST call secret-mgr via the pc-exec tool.
---
# Secret Manager
@@ -9,9 +9,9 @@ description: Manage OpenClaw agent credentials (usernames/secrets). Use when sto
Use secret-mgr to store and retrieve agent-scoped credentials (username/secret pairs) and generate secrets.
## Mandatory safety rule
Always invoke secret-mgr through the `pcexec` tool. Do NOT run secret-mgr directly.
Always invoke secret-mgr through the `pc-exec` tool. Do NOT run secret-mgr directly.
## Commands (run via pcexec)
## Commands (run via pc-exec)
- List keys for current agent
- `secret-mgr list`
@@ -50,19 +50,19 @@ Always invoke secret-mgr through the `pcexec` tool. Do NOT run secret-mgr direct
- Storing can be explicit (user asks) or proactive after the agent successfully registers/creates an account.
- Secrets should be fetched and used immediately in a command, not displayed (e.g., `xxx_cli login --user $(secret-mgr get-username --key some_key) --pass $(secret-mgr get-secret --key some_key)`).
## Examples (pcexec)
## Examples (pc-exec)
- Store credentials
- pcexec: `secret-mgr set --key github --username alice --secret <secret>`
- pc-exec: `secret-mgr set --key github --username alice --secret <secret>`
- Retrieve username
- pcexec: `secret-mgr get-username --key github`
- pc-exec: `secret-mgr get-username --key github`
- Retrieve secret
- pcexec: `secret-mgr get-secret --key github`
- pc-exec: `secret-mgr get-secret --key github`
- Generate secret
- pcexec: `secret-mgr generate --key github`
- pc-exec: `secret-mgr generate --key github`
- Delete entry
- pcexec: `secret-mgr unset --key github`
- pc-exec: `secret-mgr unset --key github`