zhi ceb17f375b fix: correct path construction in install script
- Fix duplicate .openclaw in env file path
- Use consistent installDir variable throughout
- Fix skills path in OpenClaw config update
- Fix fallback path in uninstall function
2026-03-05 11:13:49 +00:00

PaddedCell

OpenClaw plugin for secure password management, safe command execution, and coordinated agent restart.

Features

1. pass_mgr - Password Manager Binary (Go)

AES-256-GCM encryption, per-agent key-based encryption/decryption.

# Initialize
pass_mgr admin init [--key-path <path>]

# Get password
pass_mgr get <key> [--username]

# Generate password (agent can use)
pass_mgr generate <key> [--username <user>]

# Set password (human only)
pass_mgr set <key> <password> [--username <user>]

# Delete password
pass_mgr unset <key>

# Rotate password
pass_mgr rotate <key>

Security Features:

  • Agents cannot execute set (detected via environment variables)
  • All operations fail before initialization
  • Admin password leak detection (monitors messages/tool calls)

2. pcexec - Safe Execution Tool (TypeScript)

Compatible with OpenClaw native exec interface, automatically handles pass_mgr get and sanitizes output.

import { pcexec } from 'pcexec';

const result = await pcexec('echo $(pass_mgr get mypassword)', {
  cwd: '/workspace',
  timeout: 30000,
});
// Passwords in result.stdout will be replaced with ######

3. safe-restart - Safe Restart Module (TypeScript)

Provides agent state management and coordinated restart.

Agent States:

  • idle - Idle
  • busy - Processing messages
  • focus - Focus mode (workflow)
  • freeze - Frozen (not accepting new messages)
  • pre-freeze - Preparing to freeze
  • pre-freeze-focus - Preparing to freeze (focus mode)

APIs:

  • POST /query-restart - Query restart readiness
  • POST /restart-result - Report restart result
  • GET /status - Get all statuses

Slash Commands:

/padded-cell-ctrl status
/padded-cell-ctrl enable pass-mgr|safe-restart
/padded-cell-ctrl disable pass-mgr|safe-restart

Project Structure

PaddedCell/
├── pass_mgr/           # Go password manager binary
│   ├── src/
│   │   └── main.go
│   └── go.mod
├── pcexec/            # TypeScript safe execution tool
│   ├── src/
│   │   └── index.ts
│   ├── package.json
│   └── tsconfig.json
├── safe-restart/      # TypeScript safe restart module
│   ├── src/
│   │   ├── index.ts
│   │   ├── status-manager.ts
│   │   ├── api.ts
│   │   ├── safe-restart.ts
│   │   └── slash-commands.ts
│   ├── package.json
│   └── tsconfig.json
├── docs/              # Documentation
├── PROJECT_PLAN.md    # Project plan
├── AGENT_TASKS.md     # Task list
├── README.md          # This file (English)
└── README.zh-CN.md    # Chinese version

Development

# Clone
git clone https://git.hangman-lab.top/nav/PaddedCell.git
cd PaddedCell

# Build pass_mgr (requires Go)
cd pass_mgr
go build -o pass_mgr src/main.go

# Build pcexec (requires Node.js)
cd ../pcexec
npm install
npm run build

# Build safe-restart (requires Node.js)
cd ../safe-restart
npm install
npm run build

Branches

  • main - Main branch
  • dev/zhi - Development branch

License

MIT

Description
No description provided
Readme 543 KiB
Languages
TypeScript 48.4%
Go 36.1%
JavaScript 15.5%