agentapprove 0.1.27 → 0.1.28
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/README.md +3 -2
- package/dist/cli.js +52 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,8 +54,9 @@ agentapprove profiles
|
|
|
54
54
|
|
|
55
55
|
to see every profile and its current Agent Approve status, then check the
|
|
56
56
|
profiles it should govern (your current set is pre-selected). The command
|
|
57
|
-
installs into newly-checked profiles
|
|
58
|
-
|
|
57
|
+
installs into newly-checked profiles, **updates any selected profile that is on
|
|
58
|
+
an older version**, and removes it from unchecked ones. Run it again any time you
|
|
59
|
+
add a profile or upgrade the installer. `agentapprove uninstall` removes the
|
|
59
60
|
plugin from **all** profiles.
|
|
60
61
|
|
|
61
62
|
### Options
|
package/dist/cli.js
CHANGED
|
@@ -2831,7 +2831,7 @@ function resolvePairingApiBaseUrl(options) {
|
|
|
2831
2831
|
}
|
|
2832
2832
|
|
|
2833
2833
|
// src/cli.ts
|
|
2834
|
-
var VERSION = "0.1.
|
|
2834
|
+
var VERSION = "0.1.28";
|
|
2835
2835
|
function getApiUrl() {
|
|
2836
2836
|
return process.env.AGENTAPPROVE_API || "https://api.agentapprove.com";
|
|
2837
2837
|
}
|
|
@@ -2910,7 +2910,7 @@ var OPENCLAW_PLUGIN_SPEC = `@agentapprove/openclaw@${OPENCLAW_PLUGIN_VERSION}`;
|
|
|
2910
2910
|
var PI_PLUGIN_VERSION = "0.1.7";
|
|
2911
2911
|
var PI_PLUGIN_SPEC = `npm:@agentapprove/pi@${PI_PLUGIN_VERSION}`;
|
|
2912
2912
|
var PI_STATUS_TIMEOUT_MS = 5000;
|
|
2913
|
-
var HERMES_PLUGIN_VERSION = "0.1.
|
|
2913
|
+
var HERMES_PLUGIN_VERSION = "0.1.5";
|
|
2914
2914
|
var HERMES_PIP_DEPS = ["cryptography>=44.0,<46", "httpx>=0.27,<0.29"];
|
|
2915
2915
|
var AGENTS = {
|
|
2916
2916
|
"claude-code": {
|
|
@@ -5036,7 +5036,7 @@ function removePiPluginViaCli() {
|
|
|
5036
5036
|
};
|
|
5037
5037
|
}
|
|
5038
5038
|
}
|
|
5039
|
-
var HERMES_BUNDLE_SHA256 = "
|
|
5039
|
+
var HERMES_BUNDLE_SHA256 = "5af57a4607437912dbdd044d60971ffba6d4ffdd3dd86b0eea4c5ab220ecf308";
|
|
5040
5040
|
var HERMES_BUNDLE_FILENAME = `agentapprove-hermes-${HERMES_PLUGIN_VERSION}.tar.gz`;
|
|
5041
5041
|
var HERMES_PLUGIN_DIR = join(homedir(), ".hermes", "plugins", "agentapprove");
|
|
5042
5042
|
function findPython() {
|
|
@@ -6295,6 +6295,18 @@ Backups will be created with timestamp`, "Files to be modified");
|
|
|
6295
6295
|
v2.info(source_default.dim(` To use with GitHub Copilot CLI, copy to your repo:
|
|
6296
6296
|
` + ` cp ${agent.configPath} .github/hooks/agentapprove.json`));
|
|
6297
6297
|
}
|
|
6298
|
+
if (agentId === "hermes") {
|
|
6299
|
+
try {
|
|
6300
|
+
const others = listHermesProfiles().filter((pr) => !pr.isDefault);
|
|
6301
|
+
if (others.length > 0) {
|
|
6302
|
+
const lines = others.map((pr) => ` ${pr.name.padEnd(20)} ${pr.installed ? `installed v${pr.version ?? "?"}` : "not installed"}`).join(`
|
|
6303
|
+
`);
|
|
6304
|
+
v2.info(source_default.dim(` Installed in the default Hermes profile. Other profiles detected:
|
|
6305
|
+
` + `${lines}
|
|
6306
|
+
` + ` Manage them with: npx agentapprove profiles`));
|
|
6307
|
+
}
|
|
6308
|
+
} catch {}
|
|
6309
|
+
}
|
|
6298
6310
|
} else {
|
|
6299
6311
|
spinner.stop(`${agent.name} configuration failed`);
|
|
6300
6312
|
if (agentId === "openclaw") {
|
|
@@ -6337,6 +6349,7 @@ Backups will be created with timestamp`, "Files to be modified");
|
|
|
6337
6349
|
|
|
6338
6350
|
npx agentapprove pair Link a new iOS device
|
|
6339
6351
|
npx agentapprove status Show current configuration
|
|
6352
|
+
npx agentapprove profiles Manage Agent Approve across Hermes profiles
|
|
6340
6353
|
npx agentapprove disable Temporarily disable hooks
|
|
6341
6354
|
npx agentapprove uninstall Remove hooks/plugins and keep local state
|
|
6342
6355
|
npx agentapprove purge Remove hooks/plugins and delete local state
|
|
@@ -6361,10 +6374,18 @@ async function profilesCommand() {
|
|
|
6361
6374
|
}
|
|
6362
6375
|
const profiles = listHermesProfiles();
|
|
6363
6376
|
const currentlyInstalled = profiles.filter((pr) => pr.installed).map((pr) => pr.name);
|
|
6377
|
+
const outdated = new Set(profiles.filter((pr) => pr.installed && pr.version !== HERMES_PLUGIN_VERSION).map((pr) => pr.name));
|
|
6378
|
+
const rowState = (pr) => {
|
|
6379
|
+
if (!pr.installed)
|
|
6380
|
+
return "not installed";
|
|
6381
|
+
if (pr.version !== HERMES_PLUGIN_VERSION) {
|
|
6382
|
+
return `installed v${pr.version ?? "?"} → update available (v${HERMES_PLUGIN_VERSION})`;
|
|
6383
|
+
}
|
|
6384
|
+
return `installed v${pr.version ?? "?"} (current)`;
|
|
6385
|
+
};
|
|
6364
6386
|
me(profiles.map((pr) => {
|
|
6365
6387
|
const label = (pr.isDefault ? `${pr.name} (default)` : pr.name).padEnd(22);
|
|
6366
|
-
|
|
6367
|
-
return `${label} ${state}`;
|
|
6388
|
+
return `${label} ${rowState(pr)}`;
|
|
6368
6389
|
}).join(`
|
|
6369
6390
|
`), "Hermes profiles");
|
|
6370
6391
|
const picked = await $e({
|
|
@@ -6372,7 +6393,7 @@ async function profilesCommand() {
|
|
|
6372
6393
|
options: profiles.map((pr) => ({
|
|
6373
6394
|
value: pr.name,
|
|
6374
6395
|
label: pr.isDefault ? `${pr.name} (default)` : pr.name,
|
|
6375
|
-
hint: pr
|
|
6396
|
+
hint: rowState(pr)
|
|
6376
6397
|
})),
|
|
6377
6398
|
initialValues: currentlyInstalled,
|
|
6378
6399
|
required: false
|
|
@@ -6383,24 +6404,40 @@ async function profilesCommand() {
|
|
|
6383
6404
|
}
|
|
6384
6405
|
const target = picked;
|
|
6385
6406
|
const toInstall = target.filter((n) => !currentlyInstalled.includes(n));
|
|
6407
|
+
const toUpdate = target.filter((n) => currentlyInstalled.includes(n) && outdated.has(n));
|
|
6386
6408
|
const toRemove = currentlyInstalled.filter((n) => !target.includes(n));
|
|
6387
|
-
|
|
6388
|
-
|
|
6409
|
+
const toSync = [...toInstall, ...toUpdate];
|
|
6410
|
+
if (toSync.length === 0 && toRemove.length === 0) {
|
|
6411
|
+
ge(`No changes — every selected profile already has Agent Approve v${HERMES_PLUGIN_VERSION}.`);
|
|
6389
6412
|
return;
|
|
6390
6413
|
}
|
|
6391
|
-
|
|
6414
|
+
const planLines = [
|
|
6415
|
+
toInstall.length ? `Install into: ${toInstall.join(", ")}` : null,
|
|
6416
|
+
toUpdate.length ? `Update to v${HERMES_PLUGIN_VERSION}: ${toUpdate.join(", ")}` : null,
|
|
6417
|
+
toRemove.length ? `Remove from: ${toRemove.join(", ")}` : null
|
|
6418
|
+
].filter(Boolean);
|
|
6419
|
+
me(planLines.join(`
|
|
6420
|
+
`), "Planned changes");
|
|
6421
|
+
const confirm = await ce({ message: "Apply these changes?" });
|
|
6422
|
+
if (lD(confirm) || !confirm) {
|
|
6423
|
+
he("Cancelled — no changes made.");
|
|
6424
|
+
process.exit(0);
|
|
6425
|
+
}
|
|
6426
|
+
if (toSync.length > 0) {
|
|
6392
6427
|
const s = _2();
|
|
6393
|
-
|
|
6394
|
-
|
|
6428
|
+
const verb = toInstall.length && toUpdate.length ? "Installing/updating" : toUpdate.length ? "Updating" : "Installing";
|
|
6429
|
+
s.start(`${verb} Agent Approve in ${toSync.length} profile(s)…`);
|
|
6430
|
+
const sync = await syncHermesProfiles(toSync);
|
|
6395
6431
|
if (sync.results.length === 0) {
|
|
6396
|
-
s.stop(source_default.red(`
|
|
6432
|
+
s.stop(source_default.red(`Failed: ${sync.error ?? "unknown error"}`));
|
|
6397
6433
|
ge("No changes made.");
|
|
6398
6434
|
process.exit(1);
|
|
6399
6435
|
}
|
|
6400
|
-
s.stop(sync.ok ? "
|
|
6436
|
+
s.stop(sync.ok ? "Done" : "Done (some profiles failed)");
|
|
6401
6437
|
for (const r2 of sync.results) {
|
|
6438
|
+
const action = toUpdate.includes(r2.profile) ? "updated to" : "installed";
|
|
6402
6439
|
if (r2.success)
|
|
6403
|
-
v2.success(`${r2.profile}: Agent Approve ${HERMES_PLUGIN_VERSION}
|
|
6440
|
+
v2.success(`${r2.profile}: Agent Approve ${action} v${HERMES_PLUGIN_VERSION}`);
|
|
6404
6441
|
else
|
|
6405
6442
|
v2.error(`${r2.profile}: ${r2.error ?? "failed"}`);
|
|
6406
6443
|
}
|
|
@@ -6824,6 +6861,7 @@ ${source_default.yellow("Examples:")}
|
|
|
6824
6861
|
npx agentapprove pair # Link a new iOS device
|
|
6825
6862
|
npx agentapprove refresh # Get new token
|
|
6826
6863
|
npx agentapprove status # Check status
|
|
6864
|
+
npx agentapprove profiles # Manage Hermes profiles
|
|
6827
6865
|
|
|
6828
6866
|
${source_default.dim("Learn more at")} ${source_default.cyan("https://agentapprove.com")}
|
|
6829
6867
|
`);
|