dev/zhi #1
34
install.mjs
34
install.mjs
@@ -299,13 +299,43 @@ async function installComponents(env) {
|
|||||||
copyDir(join(__dirname, 'safe-restart'), join(DIST_DIR, 'safe-restart'));
|
copyDir(join(__dirname, 'safe-restart'), join(DIST_DIR, 'safe-restart'));
|
||||||
logSuccess('Copied safe-restart to dist/padded-cell/');
|
logSuccess('Copied safe-restart to dist/padded-cell/');
|
||||||
|
|
||||||
|
// Create root index.js entry point
|
||||||
|
const indexJs = `const { pcexec } = require('./pcexec/dist/index.js');
|
||||||
|
const {
|
||||||
|
safeRestart,
|
||||||
|
createSafeRestartTool,
|
||||||
|
StatusManager,
|
||||||
|
createApiServer,
|
||||||
|
startApiServer,
|
||||||
|
SlashCommandHandler
|
||||||
|
} = require('./safe-restart/dist/index.js');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
pcexec,
|
||||||
|
safeRestart,
|
||||||
|
createSafeRestartTool,
|
||||||
|
StatusManager,
|
||||||
|
createApiServer,
|
||||||
|
startApiServer,
|
||||||
|
SlashCommandHandler,
|
||||||
|
};
|
||||||
|
`;
|
||||||
|
writeFileSync(join(DIST_DIR, 'index.js'), indexJs);
|
||||||
|
logSuccess('Created index.js entry point');
|
||||||
|
|
||||||
// Create openclaw.plugin.json
|
// Create openclaw.plugin.json
|
||||||
const manifest = {
|
const manifest = {
|
||||||
id: PLUGIN_NAME,
|
id: PLUGIN_NAME,
|
||||||
name: 'PaddedCell',
|
name: 'PaddedCell',
|
||||||
version: '0.1.0',
|
version: '0.1.0',
|
||||||
description: 'Secure password management, safe execution, and coordinated restart',
|
description: 'Secure password management, safe execution, and coordinated restart',
|
||||||
entry: './safe-restart/dist/index.js',
|
entry: './index.js',
|
||||||
|
configSchema: {
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
enabled: { type: 'boolean', default: true }
|
||||||
|
}
|
||||||
|
},
|
||||||
tools: [
|
tools: [
|
||||||
{
|
{
|
||||||
name: 'pcexec',
|
name: 'pcexec',
|
||||||
@@ -320,7 +350,7 @@ async function installComponents(env) {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
writeFileSync(join(DIST_DIR, 'openclaw.plugin.json'), JSON.stringify(manifest, null, 2));
|
writeFileSync(join(DIST_DIR, 'openclaw.plugin.json'), JSON.stringify(manifest, null, 2));
|
||||||
logSuccess('Created openclaw.plugin.json in dist/padded-cell/');
|
logSuccess('Created openclaw.plugin.json');
|
||||||
|
|
||||||
// Create bin directory and install pass_mgr binary
|
// Create bin directory and install pass_mgr binary
|
||||||
mkdirSync(binDir, { recursive: true });
|
mkdirSync(binDir, { recursive: true });
|
||||||
|
|||||||
@@ -3,7 +3,13 @@
|
|||||||
"name": "PaddedCell",
|
"name": "PaddedCell",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "Secure password management, safe execution, and coordinated restart",
|
"description": "Secure password management, safe execution, and coordinated restart",
|
||||||
"entry": "./safe-restart/dist/index.js",
|
"entry": "./index.js",
|
||||||
|
"configSchema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"enabled": { "type": "boolean", "default": true }
|
||||||
|
}
|
||||||
|
},
|
||||||
"tools": [
|
"tools": [
|
||||||
{
|
{
|
||||||
"name": "pcexec",
|
"name": "pcexec",
|
||||||
|
|||||||
Reference in New Issue
Block a user