@openape/apes 1.31.2 → 1.31.4

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
@@ -148,11 +148,6 @@ async function resolveLoginInputs(flags) {
148
148
  consola.info(`Using email from ${keyPath}.pub comment: ${email}`);
149
149
  }
150
150
  }
151
- if (process.env.APES_IDP && process.env.GRAPES_IDP) {
152
- consola.warn(
153
- "Both APES_IDP and GRAPES_IDP are set \u2014 using APES_IDP. GRAPES_IDP is deprecated and will be removed in a future release."
154
- );
155
- }
156
151
  let idp;
157
152
  let idpSource;
158
153
  if (flags.idp) {
@@ -161,12 +156,6 @@ async function resolveLoginInputs(flags) {
161
156
  } else if (process.env.APES_IDP) {
162
157
  idp = process.env.APES_IDP;
163
158
  idpSource = "env";
164
- } else if (process.env.GRAPES_IDP) {
165
- idp = process.env.GRAPES_IDP;
166
- idpSource = "env";
167
- consola.warn(
168
- "GRAPES_IDP is deprecated, use APES_IDP instead. GRAPES_IDP support will be removed in a future release."
169
- );
170
159
  } else if (config.defaults?.idp) {
171
160
  idp = config.defaults.idp;
172
161
  idpSource = "config";
@@ -2701,6 +2690,9 @@ import consola23 from "consola";
2701
2690
  import { existsSync as existsSync6, mkdirSync, readFileSync as readFileSync5, writeFileSync as writeFileSync3 } from "fs";
2702
2691
  import { homedir as homedir5 } from "os";
2703
2692
  import { join as join4 } from "path";
2693
+ function isRuntimeType(value) {
2694
+ return value === "bridge" || value === "openclaw";
2695
+ }
2704
2696
  function resolveRegistryPath() {
2705
2697
  if (process.env.OPENAPE_NEST_REGISTRY_PATH) return process.env.OPENAPE_NEST_REGISTRY_PATH;
2706
2698
  if (existsSync6("/var/openape/nest/agents.json")) return "/var/openape/nest/agents.json";
@@ -3430,6 +3422,10 @@ var spawnAgentCommand = defineCommand31({
3430
3422
  "poll-interval": {
3431
3423
  type: "string",
3432
3424
  description: "For --kind service: idle poll interval in ms (default 2000)."
3425
+ },
3426
+ "type": {
3427
+ type: "string",
3428
+ description: `Runtime type: "bridge" (default, our @openape/ape-agent loop, pm2-supervised) or "openclaw" (foreign one-shot runtime the nest exec's per message). Orthogonal to --kind.`
3433
3429
  }
3434
3430
  },
3435
3431
  async run({ args }) {
@@ -3446,6 +3442,9 @@ var spawnAgentCommand = defineCommand31({
3446
3442
  if (isService && !servesUrl)
3447
3443
  throw new CliError("--kind service requires --serves <SP base URL> (e.g. https://zaz.delta-mind.at).");
3448
3444
  const pollMs = typeof args["poll-interval"] === "string" ? Number.parseInt(args["poll-interval"], 10) : void 0;
3445
+ const runtimeType = typeof args.type === "string" ? args.type : void 0;
3446
+ if (runtimeType != null && !isRuntimeType(runtimeType))
3447
+ throw new CliError(`Invalid --type "${runtimeType}". Must be "bridge" or "openclaw".`);
3449
3448
  const auth = loadAuth();
3450
3449
  if (!auth) {
3451
3450
  throw new CliError("Not authenticated. Run `apes login` first.");
@@ -3517,6 +3516,7 @@ var spawnAgentCommand = defineCommand31({
3517
3516
  email: registration.email,
3518
3517
  registeredAt: Math.floor(Date.now() / 1e3),
3519
3518
  kind: isService ? "service" : void 0,
3519
+ runtimeType,
3520
3520
  service: isService && servesUrl ? { spBaseUrl: servesUrl, pollIntervalMs: pollMs != null && Number.isFinite(pollMs) && pollMs > 0 ? pollMs : void 0 } : void 0,
3521
3521
  // Service agents also carry bridge config — it's the LLM endpoint the
3522
3522
  // worker forwards to (baseUrl/key/model from --bridge-*).
@@ -4793,6 +4793,7 @@ function resolveRunAsTarget(runAs) {
4793
4793
  if (!runAs) return runAs;
4794
4794
  if (!AGENT_NAME_REGEX.test(runAs)) return runAs;
4795
4795
  if (runAs.startsWith("openape-agent-")) return runAs;
4796
+ if (!isLinux()) return runAs;
4796
4797
  const platform = getHostPlatform();
4797
4798
  const prefixed = platform.agentUsername(runAs);
4798
4799
  if (platform.readAgentUser(prefixed)) return prefixed;
@@ -5852,7 +5853,7 @@ var mcpCommand = defineCommand53({
5852
5853
  if (transport !== "stdio" && transport !== "sse") {
5853
5854
  throw new Error('Transport must be "stdio" or "sse"');
5854
5855
  }
5855
- const { startMcpServer } = await import("./server-OSX5LE4W.js");
5856
+ const { startMcpServer } = await import("./server-MTGGI6UE.js");
5856
5857
  await startMcpServer(transport, port);
5857
5858
  }
5858
5859
  });
@@ -6490,7 +6491,7 @@ async function bestEffortGrantCount(idp) {
6490
6491
  }
6491
6492
  }
6492
6493
  async function runHealth(args) {
6493
- const version = true ? "1.31.2" : "0.0.0";
6494
+ const version = true ? "1.31.4" : "0.0.0";
6494
6495
  const auth = loadAuth();
6495
6496
  if (!auth) {
6496
6497
  throw new CliError("Not logged in. Run `apes login` first.", 1);
@@ -6763,10 +6764,10 @@ if (shellRewrite) {
6763
6764
  if (shellRewrite.action === "rewrite") {
6764
6765
  process.argv = shellRewrite.argv;
6765
6766
  } else if (shellRewrite.action === "version") {
6766
- console.log(`ape-shell ${"1.31.2"} (OpenApe DDISA shell wrapper)`);
6767
+ console.log(`ape-shell ${"1.31.4"} (OpenApe DDISA shell wrapper)`);
6767
6768
  process.exit(0);
6768
6769
  } else if (shellRewrite.action === "help") {
6769
- console.log(`ape-shell ${"1.31.2"} \u2014 OpenApe DDISA shell wrapper`);
6770
+ console.log(`ape-shell ${"1.31.4"} \u2014 OpenApe DDISA shell wrapper`);
6770
6771
  console.log("");
6771
6772
  console.log("Usage:");
6772
6773
  console.log(" ape-shell Start interactive grant-mediated REPL");
@@ -6825,7 +6826,7 @@ var configCommand = defineCommand65({
6825
6826
  var main = defineCommand65({
6826
6827
  meta: {
6827
6828
  name: "apes",
6828
- version: "1.31.2",
6829
+ version: "1.31.4",
6829
6830
  description: "Unified CLI for OpenApe"
6830
6831
  },
6831
6832
  subCommands: {
@@ -6883,7 +6884,7 @@ async function maybeRefreshAuth() {
6883
6884
  }
6884
6885
  }
6885
6886
  await maybeRefreshAuth();
6886
- await maybeWarnStaleVersion("1.31.2").catch(() => {
6887
+ await maybeWarnStaleVersion("1.31.4").catch(() => {
6887
6888
  });
6888
6889
  runMain(main).catch((err) => {
6889
6890
  if (err instanceof CliExit) {