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
106 lines
2.6 KiB
Markdown
106 lines
2.6 KiB
Markdown
---
|
|
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 pc-exec tool.
|
|
---
|
|
|
|
# Ego Manager
|
|
|
|
## Purpose
|
|
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 `pc-exec` tool. Do NOT run ego-mgr directly.
|
|
|
|
## Concepts
|
|
|
|
- **Agent Scope columns**: Each agent stores its own value independently
|
|
- **Public Scope columns**: All agents share the same value
|
|
- Column names are globally unique — a name cannot be both agent-scope and public-scope
|
|
|
|
## Workflow
|
|
|
|
1. First, create a column: `ego-mgr add column <name>` or `ego-mgr add public-column <name>`
|
|
2. Then, set its value: `ego-mgr set <name> <value>`
|
|
3. Read it: `ego-mgr get <name>` or `ego-mgr show`
|
|
|
|
## Commands (run via pc-exec)
|
|
|
|
### Add columns
|
|
```bash
|
|
# Agent-scope column (per-agent values)
|
|
ego-mgr add column <column-name> [--default <default-value>]
|
|
|
|
# Public-scope column (shared by all agents)
|
|
ego-mgr add public-column <column-name> [--default <default-value>]
|
|
```
|
|
|
|
### Delete a column
|
|
```bash
|
|
ego-mgr delete <column-name>
|
|
```
|
|
Removes the column and all its values across all scopes.
|
|
|
|
### Set a value
|
|
```bash
|
|
ego-mgr set <column-name> <value>
|
|
```
|
|
Automatically writes to the correct scope (agent or public) based on column type.
|
|
|
|
### Get a value
|
|
```bash
|
|
ego-mgr get <column-name>
|
|
```
|
|
Outputs just the value (no label).
|
|
|
|
### Show all fields
|
|
```bash
|
|
ego-mgr show
|
|
```
|
|
Lists all fields with values (public first, then agent-scope).
|
|
|
|
### List column names
|
|
```bash
|
|
ego-mgr list columns
|
|
```
|
|
Lists all column names (public first, then agent-scope).
|
|
|
|
## Error exit codes
|
|
|
|
| Code | Meaning |
|
|
|------|---------|
|
|
| 0 | Success |
|
|
| 1 | Usage error |
|
|
| 2 | Column not found |
|
|
| 3 | Column already exists |
|
|
| 4 | Permission error (not via pc-exec) |
|
|
| 5 | File lock failed |
|
|
| 6 | JSON read/write error |
|
|
|
|
## Common use cases
|
|
|
|
### Set up agent identity
|
|
```bash
|
|
ego-mgr add column name
|
|
ego-mgr set name "小智"
|
|
ego-mgr add column email
|
|
ego-mgr set email "zhi@example.com"
|
|
```
|
|
|
|
### Set shared config
|
|
```bash
|
|
ego-mgr add public-column timezone --default UTC
|
|
ego-mgr add public-column language --default zh-CN
|
|
```
|
|
|
|
### Check current profile
|
|
```bash
|
|
ego-mgr show
|
|
```
|
|
|
|
## Usage notes
|
|
|
|
- Always create columns before setting values
|
|
- Column names are case-sensitive
|
|
- Public scope values are readable and writable by all agents
|
|
- Agent scope values are isolated per-agent
|