agentapprove 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/cli.js +22 -12
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2332,7 +2332,7 @@ import { homedir, hostname, platform } from "os";
|
|
|
2332
2332
|
import { join, dirname, basename } from "path";
|
|
2333
2333
|
import { execSync, spawnSync } from "child_process";
|
|
2334
2334
|
import { randomBytes, createHash } from "crypto";
|
|
2335
|
-
var VERSION = "0.1.
|
|
2335
|
+
var VERSION = "0.1.10";
|
|
2336
2336
|
function getApiUrl() {
|
|
2337
2337
|
return process.env.AGENTAPPROVE_API || "https://api.agentapprove.com";
|
|
2338
2338
|
}
|
|
@@ -2381,7 +2381,7 @@ function getCommand() {
|
|
|
2381
2381
|
return filtered[0] || "install";
|
|
2382
2382
|
}
|
|
2383
2383
|
var OPENCODE_PLUGIN_VERSION = "0.1.6";
|
|
2384
|
-
var OPENCLAW_PLUGIN_VERSION = "0.2.
|
|
2384
|
+
var OPENCLAW_PLUGIN_VERSION = "0.2.5";
|
|
2385
2385
|
var OPENCLAW_PLUGIN_SPEC = `@agentapprove/openclaw@${OPENCLAW_PLUGIN_VERSION}`;
|
|
2386
2386
|
var AGENTS = {
|
|
2387
2387
|
"claude-code": {
|
|
@@ -3178,10 +3178,11 @@ async function installHooksForAgent(agentId, hooksDir, mode = "approval") {
|
|
|
3178
3178
|
plugins.entries = {};
|
|
3179
3179
|
}
|
|
3180
3180
|
const entries = plugins.entries;
|
|
3181
|
-
entries.
|
|
3181
|
+
entries.openclaw = {
|
|
3182
3182
|
enabled: mode === "approval",
|
|
3183
3183
|
config: {
|
|
3184
3184
|
apiUrl: API_URL,
|
|
3185
|
+
apiVersion: "v001",
|
|
3185
3186
|
timeout: 300,
|
|
3186
3187
|
failBehavior: "ask",
|
|
3187
3188
|
privacyTier: "full"
|
|
@@ -3196,7 +3197,7 @@ async function installHooksForAgent(agentId, hooksDir, mode = "approval") {
|
|
|
3196
3197
|
}
|
|
3197
3198
|
hooks.internal.enabled = true;
|
|
3198
3199
|
writeJsonConfig(agent.configPath, config);
|
|
3199
|
-
installedHooks.push("
|
|
3200
|
+
installedHooks.push("openclaw");
|
|
3200
3201
|
return { success: true, backupPath, hooks: installedHooks };
|
|
3201
3202
|
}
|
|
3202
3203
|
if (agentId === "opencode") {
|
|
@@ -3477,8 +3478,8 @@ async function installHooksForAgent(agentId, hooksDir, mode = "approval") {
|
|
|
3477
3478
|
} else if (agentId === "openclaw") {
|
|
3478
3479
|
const pluginsObj = hooksConfig;
|
|
3479
3480
|
const entries = pluginsObj?.entries;
|
|
3480
|
-
if (entries?.
|
|
3481
|
-
entries.
|
|
3481
|
+
if (entries?.openclaw && typeof entries.openclaw === "object") {
|
|
3482
|
+
entries.openclaw.enabled = false;
|
|
3482
3483
|
}
|
|
3483
3484
|
}
|
|
3484
3485
|
}
|
|
@@ -3602,10 +3603,11 @@ codex_hooks = true`;
|
|
|
3602
3603
|
const configJson = JSON.stringify({
|
|
3603
3604
|
plugins: {
|
|
3604
3605
|
entries: {
|
|
3605
|
-
|
|
3606
|
+
openclaw: {
|
|
3606
3607
|
enabled: true,
|
|
3607
3608
|
config: {
|
|
3608
3609
|
apiUrl: API_URL,
|
|
3610
|
+
apiVersion: "v001",
|
|
3609
3611
|
timeout: 300,
|
|
3610
3612
|
failBehavior: "ask",
|
|
3611
3613
|
privacyTier: "full"
|
|
@@ -3626,6 +3628,8 @@ codex_hooks = true`;
|
|
|
3626
3628
|
"",
|
|
3627
3629
|
configJson,
|
|
3628
3630
|
"",
|
|
3631
|
+
'Hosted installs can also set config.token/config.apiUrl/etc. with OpenClaw env substitution such as "${AGENTAPPROVE_TOKEN}".',
|
|
3632
|
+
"",
|
|
3629
3633
|
"Restart the OpenClaw gateway to activate."
|
|
3630
3634
|
].join(`
|
|
3631
3635
|
`);
|
|
@@ -4404,8 +4408,8 @@ async function statusCommand() {
|
|
|
4404
4408
|
}
|
|
4405
4409
|
if (agentId === "openclaw") {
|
|
4406
4410
|
const entries = config.plugins?.entries;
|
|
4407
|
-
if (entries?.
|
|
4408
|
-
console.log(` ${source_default.green("✓")} ${agent.name}:
|
|
4411
|
+
if (entries?.openclaw) {
|
|
4412
|
+
console.log(` ${source_default.green("✓")} ${agent.name}: openclaw plugin`);
|
|
4409
4413
|
}
|
|
4410
4414
|
continue;
|
|
4411
4415
|
}
|
|
@@ -4501,9 +4505,15 @@ async function uninstallCommand() {
|
|
|
4501
4505
|
}
|
|
4502
4506
|
} catch {}
|
|
4503
4507
|
} else if (agentId === "openclaw") {
|
|
4504
|
-
const
|
|
4505
|
-
|
|
4506
|
-
|
|
4508
|
+
const pluginsConfig = hooksConfig;
|
|
4509
|
+
const entries = pluginsConfig.entries;
|
|
4510
|
+
const installs = pluginsConfig.installs;
|
|
4511
|
+
if (entries && entries.openclaw) {
|
|
4512
|
+
delete entries.openclaw;
|
|
4513
|
+
modified = true;
|
|
4514
|
+
}
|
|
4515
|
+
if (installs && installs.openclaw) {
|
|
4516
|
+
delete installs.openclaw;
|
|
4507
4517
|
modified = true;
|
|
4508
4518
|
}
|
|
4509
4519
|
} else {
|