clawmarketbot 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +24 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -743,7 +743,8 @@ async function runCommand(command, args, options = {}) {
|
|
|
743
743
|
return new Promise((resolve, reject) => {
|
|
744
744
|
const child = spawn(command, args, {
|
|
745
745
|
cwd: options.cwd,
|
|
746
|
-
stdio: options.stdio === "inherit" ? "inherit" : "pipe"
|
|
746
|
+
stdio: options.stdio === "inherit" ? "inherit" : "pipe",
|
|
747
|
+
env: options.env
|
|
747
748
|
});
|
|
748
749
|
let stdout = "";
|
|
749
750
|
let stderr = "";
|
|
@@ -1371,13 +1372,27 @@ function registerConfigCommands(program2) {
|
|
|
1371
1372
|
await setupApiKeysFromConfig(botConfig, context.paths.configPath, context.paths.envPath);
|
|
1372
1373
|
const installerShPath = path4.join(sourceBase, "installer.sh");
|
|
1373
1374
|
if (await fileExists(installerShPath)) {
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1375
|
+
if (botConfig.agent?.id) {
|
|
1376
|
+
console.log("\nSkipping installer.sh \u2014 bot-config.json agent declaration handled by CLI.");
|
|
1377
|
+
} else {
|
|
1378
|
+
console.log("\nRunning post-install hook (installer.sh)...");
|
|
1379
|
+
const hookPath = path4.join(sourceRoot, "_clawmarket_installer.sh");
|
|
1380
|
+
await fs5.copyFile(installerShPath, hookPath);
|
|
1381
|
+
await runCommand("bash", [hookPath, context.paths.stateDir], {
|
|
1382
|
+
cwd: sourceRoot,
|
|
1383
|
+
stdio: "inherit",
|
|
1384
|
+
env: {
|
|
1385
|
+
...process.env,
|
|
1386
|
+
CLAWMARKET_CLI_INSTALL: "1",
|
|
1387
|
+
CLAWMARKET_AGENT_ID: agentId,
|
|
1388
|
+
CLAWMARKET_AGENT_NAME: agentName,
|
|
1389
|
+
CLAWMARKET_WORKSPACE: installPaths.targetWorkspace,
|
|
1390
|
+
CLAWMARKET_AGENT_ROOT: installPaths.targetAgentRoot,
|
|
1391
|
+
CLAWMARKET_CONFIG_PATH: context.paths.configPath,
|
|
1392
|
+
CLAWMARKET_STATE_DIR: context.paths.stateDir
|
|
1393
|
+
}
|
|
1394
|
+
});
|
|
1395
|
+
}
|
|
1381
1396
|
}
|
|
1382
1397
|
await validateInstalledWorkspace(installPaths.targetWorkspace, botConfig);
|
|
1383
1398
|
const refreshed = await loadOpenClawContext();
|
|
@@ -1539,7 +1554,7 @@ function registerConfigCommands(program2) {
|
|
|
1539
1554
|
|
|
1540
1555
|
// src/index.ts
|
|
1541
1556
|
var program = new Command();
|
|
1542
|
-
program.name("clawmarketbot").description("CLI tool for ClawMarket - discover, download, and install OpenClaw configs").version("0.1.
|
|
1557
|
+
program.name("clawmarketbot").description("CLI tool for ClawMarket - discover, download, and install OpenClaw configs").version("0.1.10");
|
|
1543
1558
|
registerAuthCommands(program);
|
|
1544
1559
|
registerConfigCommands(program);
|
|
1545
1560
|
program.parse();
|