@openape/apes 1.27.0 → 1.28.1
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
CHANGED
|
@@ -1845,10 +1845,22 @@ function parseKeyValues(pairs) {
|
|
|
1845
1845
|
function missingCapabilities(required, provided) {
|
|
1846
1846
|
return required.filter((env) => !(env in provided));
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1848
|
+
function collectFlag(rawArgs, name) {
|
|
1849
|
+
const out = [];
|
|
1850
|
+
const long = `--${name}`;
|
|
1851
|
+
for (let i = 0; i < rawArgs.length; i++) {
|
|
1852
|
+
const a = rawArgs[i];
|
|
1853
|
+
if (a === long) {
|
|
1854
|
+
const v = rawArgs[i + 1];
|
|
1855
|
+
if (v !== void 0 && !v.startsWith("--")) {
|
|
1856
|
+
out.push(v);
|
|
1857
|
+
i++;
|
|
1858
|
+
}
|
|
1859
|
+
} else if (a.startsWith(`${long}=`)) {
|
|
1860
|
+
out.push(a.slice(long.length + 1));
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
return out;
|
|
1852
1864
|
}
|
|
1853
1865
|
async function api(url, token, init) {
|
|
1854
1866
|
const res = await fetch(url, {
|
|
@@ -1871,11 +1883,11 @@ var deployAgentCommand = defineCommand20({
|
|
|
1871
1883
|
"host-id": { type: "string", description: "Target nest host_id (default: first connected)" },
|
|
1872
1884
|
json: { type: "boolean", description: "Machine-readable output, no prompts" }
|
|
1873
1885
|
},
|
|
1874
|
-
async run({ args }) {
|
|
1886
|
+
async run({ args, rawArgs }) {
|
|
1875
1887
|
const repoRef = args.repo;
|
|
1876
1888
|
if (!repoRef) throw new CliError("usage: apes agent deploy <repo>@<ref> [--param k=v] [--secret ENV=val]");
|
|
1877
|
-
const params = parseKeyValues(
|
|
1878
|
-
const secrets = parseKeyValues(
|
|
1889
|
+
const params = parseKeyValues(collectFlag(rawArgs, "param"));
|
|
1890
|
+
const secrets = parseKeyValues(collectFlag(rawArgs, "secret"));
|
|
1879
1891
|
const json = !!args.json;
|
|
1880
1892
|
const token = (await ensureFreshIdpAuth()).access_token;
|
|
1881
1893
|
const troop = resolveTroopUrl();
|
|
@@ -1902,7 +1914,7 @@ var deployAgentCommand = defineCommand20({
|
|
|
1902
1914
|
secrets[env] = val;
|
|
1903
1915
|
}
|
|
1904
1916
|
}
|
|
1905
|
-
if (
|
|
1917
|
+
if (Object.keys(secrets).length > 0) {
|
|
1906
1918
|
if (!json) consola18.start("Waiting for the agent to come online\u2026");
|
|
1907
1919
|
let online = false;
|
|
1908
1920
|
for (let i = 0; i < 90 && !online; i++) {
|
|
@@ -6690,7 +6702,7 @@ var mcpCommand = defineCommand52({
|
|
|
6690
6702
|
if (transport !== "stdio" && transport !== "sse") {
|
|
6691
6703
|
throw new Error('Transport must be "stdio" or "sse"');
|
|
6692
6704
|
}
|
|
6693
|
-
const { startMcpServer } = await import("./server-
|
|
6705
|
+
const { startMcpServer } = await import("./server-RPIK3EDU.js");
|
|
6694
6706
|
await startMcpServer(transport, port);
|
|
6695
6707
|
}
|
|
6696
6708
|
});
|
|
@@ -7328,7 +7340,7 @@ async function bestEffortGrantCount(idp) {
|
|
|
7328
7340
|
}
|
|
7329
7341
|
}
|
|
7330
7342
|
async function runHealth(args) {
|
|
7331
|
-
const version = true ? "1.
|
|
7343
|
+
const version = true ? "1.28.1" : "0.0.0";
|
|
7332
7344
|
const auth = loadAuth();
|
|
7333
7345
|
if (!auth) {
|
|
7334
7346
|
throw new CliError("Not logged in. Run `apes login` first.", 1);
|
|
@@ -7601,10 +7613,10 @@ if (shellRewrite) {
|
|
|
7601
7613
|
if (shellRewrite.action === "rewrite") {
|
|
7602
7614
|
process.argv = shellRewrite.argv;
|
|
7603
7615
|
} else if (shellRewrite.action === "version") {
|
|
7604
|
-
console.log(`ape-shell ${"1.
|
|
7616
|
+
console.log(`ape-shell ${"1.28.1"} (OpenApe DDISA shell wrapper)`);
|
|
7605
7617
|
process.exit(0);
|
|
7606
7618
|
} else if (shellRewrite.action === "help") {
|
|
7607
|
-
console.log(`ape-shell ${"1.
|
|
7619
|
+
console.log(`ape-shell ${"1.28.1"} \u2014 OpenApe DDISA shell wrapper`);
|
|
7608
7620
|
console.log("");
|
|
7609
7621
|
console.log("Usage:");
|
|
7610
7622
|
console.log(" ape-shell Start interactive grant-mediated REPL");
|
|
@@ -7662,7 +7674,7 @@ var configCommand = defineCommand64({
|
|
|
7662
7674
|
var main = defineCommand64({
|
|
7663
7675
|
meta: {
|
|
7664
7676
|
name: "apes",
|
|
7665
|
-
version: "1.
|
|
7677
|
+
version: "1.28.1",
|
|
7666
7678
|
description: "Unified CLI for OpenApe"
|
|
7667
7679
|
},
|
|
7668
7680
|
subCommands: {
|
|
@@ -7720,7 +7732,7 @@ async function maybeRefreshAuth() {
|
|
|
7720
7732
|
}
|
|
7721
7733
|
}
|
|
7722
7734
|
await maybeRefreshAuth();
|
|
7723
|
-
await maybeWarnStaleVersion("1.
|
|
7735
|
+
await maybeWarnStaleVersion("1.28.1").catch(() => {
|
|
7724
7736
|
});
|
|
7725
7737
|
runMain(main).catch((err) => {
|
|
7726
7738
|
if (err instanceof CliExit) {
|