agentapprove 0.1.37 → 0.1.38
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 +42 -6
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2839,7 +2839,7 @@ function resolvePairingApiBaseUrl(options) {
|
|
|
2839
2839
|
}
|
|
2840
2840
|
|
|
2841
2841
|
// src/cli.ts
|
|
2842
|
-
var VERSION = "0.1.
|
|
2842
|
+
var VERSION = "0.1.38";
|
|
2843
2843
|
function getApiUrl() {
|
|
2844
2844
|
return process.env.AGENTAPPROVE_API || "https://api.agentapprove.com";
|
|
2845
2845
|
}
|
|
@@ -2911,14 +2911,14 @@ function getCommand() {
|
|
|
2911
2911
|
}
|
|
2912
2912
|
return filtered[0] || "install";
|
|
2913
2913
|
}
|
|
2914
|
-
var OPENCODE_PLUGIN_VERSION = "0.1.
|
|
2914
|
+
var OPENCODE_PLUGIN_VERSION = "0.1.23";
|
|
2915
2915
|
var OPENCODE_PLUGIN_SPEC = `@agentapprove/opencode@${OPENCODE_PLUGIN_VERSION}`;
|
|
2916
|
-
var OPENCLAW_PLUGIN_VERSION = "0.2.
|
|
2916
|
+
var OPENCLAW_PLUGIN_VERSION = "0.2.16";
|
|
2917
2917
|
var OPENCLAW_PLUGIN_SPEC = `@agentapprove/openclaw@${OPENCLAW_PLUGIN_VERSION}`;
|
|
2918
|
-
var PI_PLUGIN_VERSION = "0.1.
|
|
2918
|
+
var PI_PLUGIN_VERSION = "0.1.12";
|
|
2919
2919
|
var PI_PLUGIN_SPEC = `npm:@agentapprove/pi@${PI_PLUGIN_VERSION}`;
|
|
2920
2920
|
var PI_STATUS_TIMEOUT_MS = 5000;
|
|
2921
|
-
var HERMES_PLUGIN_VERSION = "0.1.
|
|
2921
|
+
var HERMES_PLUGIN_VERSION = "0.1.9";
|
|
2922
2922
|
var HERMES_PIP_DEPS = ["cryptography>=44.0,<46", "httpx>=0.27,<0.29"];
|
|
2923
2923
|
var AGENTS = {
|
|
2924
2924
|
"claude-code": {
|
|
@@ -5203,9 +5203,45 @@ function installOpenCodePluginViaCli() {
|
|
|
5203
5203
|
};
|
|
5204
5204
|
}
|
|
5205
5205
|
}
|
|
5206
|
+
function readPiPinnedSpec() {
|
|
5207
|
+
try {
|
|
5208
|
+
const settingsPath = join(homedir(), ".pi", "agent", "settings.json");
|
|
5209
|
+
if (!existsSync2(settingsPath))
|
|
5210
|
+
return null;
|
|
5211
|
+
const settings = JSON.parse(readFileSync(settingsPath, "utf8"));
|
|
5212
|
+
if (!Array.isArray(settings.packages))
|
|
5213
|
+
return null;
|
|
5214
|
+
const spec = settings.packages.find((entry) => typeof entry === "string" && entry.startsWith("npm:@agentapprove/pi"));
|
|
5215
|
+
return spec ?? null;
|
|
5216
|
+
} catch {
|
|
5217
|
+
return null;
|
|
5218
|
+
}
|
|
5219
|
+
}
|
|
5206
5220
|
function installPiPluginViaCli() {
|
|
5207
5221
|
try {
|
|
5208
5222
|
execSync(`pi install ${PI_PLUGIN_SPEC}`, { stdio: "pipe" });
|
|
5223
|
+
const pinnedSpec = readPiPinnedSpec();
|
|
5224
|
+
if (pinnedSpec !== null && pinnedSpec !== PI_PLUGIN_SPEC) {
|
|
5225
|
+
const manualFix = `Fix manually with: pi remove npm:@agentapprove/pi && pi install ${PI_PLUGIN_SPEC}`;
|
|
5226
|
+
try {
|
|
5227
|
+
execSync("pi remove npm:@agentapprove/pi", { stdio: "pipe" });
|
|
5228
|
+
execSync(`pi install ${PI_PLUGIN_SPEC}`, { stdio: "pipe" });
|
|
5229
|
+
} catch (err) {
|
|
5230
|
+
return {
|
|
5231
|
+
success: false,
|
|
5232
|
+
label: "Agent Approve extension",
|
|
5233
|
+
error: `Failed while replacing stale pin ${pinnedSpec} (the extension may currently be uninstalled): ` + `${err instanceof Error ? err.message : String(err)}. ${manualFix}`
|
|
5234
|
+
};
|
|
5235
|
+
}
|
|
5236
|
+
const currentSpec = readPiPinnedSpec();
|
|
5237
|
+
if (currentSpec !== PI_PLUGIN_SPEC) {
|
|
5238
|
+
return {
|
|
5239
|
+
success: false,
|
|
5240
|
+
label: "Agent Approve extension",
|
|
5241
|
+
error: `Pi pins ${currentSpec ?? "no @agentapprove/pi package"} after reinstall, expected ${PI_PLUGIN_SPEC}. ` + manualFix
|
|
5242
|
+
};
|
|
5243
|
+
}
|
|
5244
|
+
}
|
|
5209
5245
|
return { success: true, label: `Agent Approve extension ${PI_PLUGIN_VERSION}` };
|
|
5210
5246
|
} catch (err) {
|
|
5211
5247
|
return {
|
|
@@ -5226,7 +5262,7 @@ function removePiPluginViaCli() {
|
|
|
5226
5262
|
};
|
|
5227
5263
|
}
|
|
5228
5264
|
}
|
|
5229
|
-
var HERMES_BUNDLE_SHA256 = "
|
|
5265
|
+
var HERMES_BUNDLE_SHA256 = "8a6b5853b45c918d7731bd11d3cb55e699cfc6c5c615baff947cedc20f60d83c";
|
|
5230
5266
|
var HERMES_BUNDLE_FILENAME = `agentapprove-hermes-${HERMES_PLUGIN_VERSION}.tar.gz`;
|
|
5231
5267
|
var HERMES_PLUGIN_DIR = join(homedir(), ".hermes", "plugins", "agentapprove");
|
|
5232
5268
|
function findPython() {
|