dev/zhi #1

Merged
hzhang merged 28 commits from dev/zhi into main 2026-03-05 19:08:00 +00:00
Showing only changes of commit ceb17f375b - Show all commits

View File

@@ -440,16 +440,17 @@ async function configure(env) {
// Create environment config
log(' Creating environment configuration...', 'blue');
const installDir = env.openclawDir || join(homedir(), '.openclaw');
const envConfig = [
'# PaddedCell Environment Configuration',
`export PATH="${dirname(passMgrPath)}:$PATH"`,
'export PASS_MGR_PATH="pass_mgr"',
'',
'# PaddedCell skills',
`export PADDEDCELL_SKILLS_DIR="${join(env.openclawDir || homedir(), '.openclaw', 'skills', 'paddedcell')}"`,
`export PADDEDCELL_SKILLS_DIR="${join(installDir, 'skills', 'paddedcell')}"`,
].join('\n');
const envFile = join(env.openclawDir || homedir(), '.openclaw', 'paddedcell.env');
const envFile = join(installDir, 'paddedcell.env');
writeFileSync(envFile, envConfig);
logSuccess(`Environment config written to ${envFile}`);
@@ -458,7 +459,7 @@ async function configure(env) {
// Update OpenClaw plugins.load.paths configuration
log('\n Updating OpenClaw plugin configuration...', 'blue');
const openclawConfigPath = join(env.openclawDir || homedir(), '.openclaw', 'config.json');
const openclawConfigPath = join(installDir, 'config.json');
if (existsSync(openclawConfigPath)) {
try {
@@ -477,7 +478,7 @@ async function configure(env) {
}
// Add paddedcell skills path if not already present
const skillsPath = join(env.openclawDir || homedir(), '.openclaw', 'skills', 'paddedcell');
const skillsPath = join(installDir, 'skills', 'paddedcell');
if (!config.plugins.load.paths.includes(skillsPath)) {
config.plugins.load.paths.push(skillsPath);
writeFileSync(openclawConfigPath, JSON.stringify(config, null, 2));
@@ -491,7 +492,7 @@ async function configure(env) {
} else {
logWarning(`OpenClaw config not found at ${openclawConfigPath}`);
log(' Please manually add the following to your OpenClaw config:', 'yellow');
log(` plugins.load.paths: ["${join(env.openclawDir || homedir(), '.openclaw', 'skills', 'paddedcell')}"]`, 'cyan');
log(` plugins.load.paths: ["${join(installDir, 'skills', 'paddedcell')}"]`, 'cyan');
}
}
@@ -613,7 +614,7 @@ function printSummary(env) {
async function uninstall(env) {
logStep(1, 'Uninstalling PaddedCell...');
const installDir = options.prefix || env.openclawDir;
const installDir = options.prefix || env.openclawDir || join(homedir(), '.openclaw');
const binDir = join(installDir, 'bin');
const skillsDir = join(installDir, 'skills', 'paddedcell');
const envFile = join(installDir, 'paddedcell.env');