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: ego-mgr
description: Manage agent personal information (name, email, timezone, etc.). Use when storing, retrieving, listing, or managing agent profile fields. Trigger on requests about agent identity, personal info, profile settings, or ego-mgr usage. MUST call ego-mgr via the pcexec tool.
description: Manage agent personal information (name, email, timezone, etc.). Use when storing, retrieving, listing, or managing agent profile fields. Trigger on requests about agent identity, personal info, profile settings, or ego-mgr usage. MUST call ego-mgr via the pc-exec tool.
---
# Ego Manager
@@ -9,7 +9,7 @@ description: Manage agent personal information (name, email, timezone, etc.). Us
Use ego-mgr to manage agent personal information fields. Supports per-agent fields (Agent Scope) and shared fields (Public Scope).
## Mandatory safety rule
Always invoke ego-mgr through the `pcexec` tool. Do NOT run ego-mgr directly.
Always invoke ego-mgr through the `pc-exec` tool. Do NOT run ego-mgr directly.
## Concepts
@@ -23,7 +23,7 @@ Always invoke ego-mgr through the `pcexec` tool. Do NOT run ego-mgr directly.
2. Then, set its value: `ego-mgr set <name> <value>`
3. Read it: `ego-mgr get <name>` or `ego-mgr show`
## Commands (run via pcexec)
## Commands (run via pc-exec)
### Add columns
```bash
@@ -72,7 +72,7 @@ Lists all column names (public first, then agent-scope).
| 1 | Usage error |
| 2 | Column not found |
| 3 | Column already exists |
| 4 | Permission error (not via pcexec) |
| 4 | Permission error (not via pc-exec) |
| 5 | File lock failed |
| 6 | JSON read/write error |

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`