@ganglion/xacpx 0.21.0 → 0.22.0

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.
@@ -7297,7 +7297,9 @@ var LOCAL_AGENT_BINS;
7297
7297
  var init_local_agent_bin = __esm(() => {
7298
7298
  LOCAL_AGENT_BINS = {
7299
7299
  opencode: { bin: "opencode", args: ["acp"] },
7300
- kilocode: { bin: "kilocode", args: ["acp"] }
7300
+ kilocode: { bin: "kilocode", args: ["acp"] },
7301
+ reasonix: { bin: "reasonix", args: ["acp"] },
7302
+ omp: { bin: "omp", args: ["acp"] }
7301
7303
  };
7302
7304
  });
7303
7305
 
package/dist/cli.js CHANGED
@@ -4692,7 +4692,9 @@ var LOCAL_AGENT_BINS;
4692
4692
  var init_local_agent_bin = __esm(() => {
4693
4693
  LOCAL_AGENT_BINS = {
4694
4694
  opencode: { bin: "opencode", args: ["acp"] },
4695
- kilocode: { bin: "kilocode", args: ["acp"] }
4695
+ kilocode: { bin: "kilocode", args: ["acp"] },
4696
+ reasonix: { bin: "reasonix", args: ["acp"] },
4697
+ omp: { bin: "omp", args: ["acp"] }
4696
4698
  };
4697
4699
  });
4698
4700
 
@@ -6723,6 +6725,9 @@ var init_agent_templates = __esm(() => {
6723
6725
  mux: {
6724
6726
  driver: "mux"
6725
6727
  },
6728
+ omp: {
6729
+ driver: "omp"
6730
+ },
6726
6731
  opencode: {
6727
6732
  driver: "opencode"
6728
6733
  },
@@ -6735,6 +6740,9 @@ var init_agent_templates = __esm(() => {
6735
6740
  qwen: {
6736
6741
  driver: "qwen"
6737
6742
  },
6743
+ reasonix: {
6744
+ driver: "reasonix"
6745
+ },
6738
6746
  trae: {
6739
6747
  driver: "trae"
6740
6748
  },
@@ -30441,6 +30449,27 @@ var init_plugin_home = __esm(() => {
30441
30449
  import { spawn as spawn8 } from "node:child_process";
30442
30450
  import { rm as rm6 } from "node:fs/promises";
30443
30451
  import { join as join15 } from "node:path";
30452
+ function pluginRegistryInstallArgs(registry2 = effectivePluginRegistry()) {
30453
+ return [
30454
+ `--registry=${registry2}`,
30455
+ `--@ganglion:registry=${registry2}`
30456
+ ];
30457
+ }
30458
+ function effectivePluginRegistry(env = process.env) {
30459
+ const raw = coreEnv("PLUGIN_REGISTRY", env)?.trim();
30460
+ if (!raw)
30461
+ return DEFAULT_PLUGIN_REGISTRY;
30462
+ let url;
30463
+ try {
30464
+ url = new URL(raw);
30465
+ } catch {
30466
+ throw new Error("XACPX_PLUGIN_REGISTRY must be a valid http(s) URL");
30467
+ }
30468
+ if (url.protocol !== "https:" && url.protocol !== "http:" || !url.hostname) {
30469
+ throw new Error("XACPX_PLUGIN_REGISTRY must be a valid http(s) URL");
30470
+ }
30471
+ return url.toString().replace(/\/+$/, "");
30472
+ }
30444
30473
  function shellSpawnPlan(args) {
30445
30474
  const shell = process.platform === "win32";
30446
30475
  return { shell, args: shell ? args.map((arg) => `"${arg}"`) : args };
@@ -30491,11 +30520,12 @@ async function installPluginPackage(input) {
30491
30520
  await rm6(join15(input.pluginHome, "bun.lock"), { force: true }).catch(() => {});
30492
30521
  }
30493
30522
  const spec = input.version ? `${input.packageName}@${input.version}` : input.packageName;
30523
+ const registryArgs = pluginRegistryInstallArgs();
30494
30524
  if (packageManager === "bun") {
30495
- await runCommand("bun", ["add", spec], { cwd: input.pluginHome });
30525
+ await runCommand("bun", ["add", spec, ...registryArgs], { cwd: input.pluginHome });
30496
30526
  return;
30497
30527
  }
30498
- await runCommand("npm", ["install", spec], { cwd: input.pluginHome });
30528
+ await runCommand("npm", ["install", spec, ...registryArgs], { cwd: input.pluginHome });
30499
30529
  }
30500
30530
  async function updatePluginPackage(input) {
30501
30531
  await installPluginPackage(input);
@@ -30509,6 +30539,7 @@ async function removePluginPackage(input) {
30509
30539
  }
30510
30540
  await runCommand("npm", ["uninstall", input.packageName], { cwd: input.pluginHome });
30511
30541
  }
30542
+ var DEFAULT_PLUGIN_REGISTRY = "https://registry.npmjs.org";
30512
30543
  var init_package_manager = __esm(() => {
30513
30544
  init_plugin_home();
30514
30545
  });
@@ -8,6 +8,12 @@ export declare function executableExtensions(platform: NodeJS.Platform, env: Nod
8
8
  * `opencode` matches `opencode.cmd`/`.exe`. `env`/`isExecutableFile` are injectable for tests.
9
9
  */
10
10
  export declare function isExecutableOnPath(name: string, env?: NodeJS.ProcessEnv, isExecutableFile?: (p: string) => boolean): boolean;
11
+ /**
12
+ * Is `driver` listed as a local-fallback agent in LOCAL_AGENT_BINS? Use this — not a
13
+ * hand-copied allow-list — for drift guards that need to exempt drivers xacpx itself
14
+ * supplies at runtime (e.g. `agent-catalog.test.ts`'s acpx-registry drift guard).
15
+ */
16
+ export declare function isLocalAgentBinDriver(driver: string): boolean;
11
17
  /**
12
18
  * If `driver` is a known npx-fallback agent AND its native CLI is on PATH, return the
13
19
  * structured argv (e.g. `["opencode", "acp"]`); otherwise undefined (let acpx fall back
@@ -31,7 +31,7 @@ export interface ResolveAgentLaunchOptions {
31
31
  * 2. user `argv`: content-addressed overlay alias + canonical identity.
32
32
  * 3. managed codex/claude: structured pinned npx argv (alias launch).
33
33
  * 4. hermes: ACP shim argv (alias launch).
34
- * 5. local fallback (opencode/kilocode on PATH): structured argv (alias launch).
34
+ * 5. local fallback (opencode/kilocode/reasonix/omp on PATH): structured argv (alias launch).
35
35
  * 6. anything else: bare built-in driver positional.
36
36
  */
37
37
  export declare function resolveConfiguredAgentLaunch(agent: Pick<AgentConfig, "driver" | "command" | "argv">, transport?: Pick<TransportConfig, "preferLocalAgents" | "adapterVersions" | "adapterRegistry">, options?: ResolveAgentLaunchOptions): AgentLaunchSpec;
@@ -37,10 +37,12 @@ export interface TransportConfig {
37
37
  queueOwnerTtlSeconds?: number;
38
38
  /**
39
39
  * Prefer a locally-installed native agent CLI over acpx's `npx -y <pkg>` fallback
40
- * when one is on PATH (currently the unpinned-npx drivers: opencode, kilocode). This
41
- * avoids a per-cold-start npm-registry fetch faster and immune to network blips
42
- * (e.g. ECONNRESET during agent init). Defaults to `true`; set `false` to always use
43
- * acpx's default resolution. A per-agent `command` override still takes precedence.
40
+ * when one is on PATH (currently opencode, kilocode, plus the local-fallback drivers
41
+ * reasonix and omp that aren't in acpx's registry but speak ACP via `<bin> acp`).
42
+ * This avoids a per-cold-start npm-registry fetch faster and immune to network
43
+ * blips (e.g. ECONNRESET during agent init). Defaults to `true`; set `false` to
44
+ * always use acpx's default resolution. A per-agent `command` override still takes
45
+ * precedence.
44
46
  */
45
47
  preferLocalAgents?: boolean;
46
48
  /** Exact local overrides for xacpx-managed ACP adapter versions. Omitted entries
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ganglion/xacpx",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "随时随地通过聊天频道(微信 / 飞书 / 元宝等)远程控制 `acpx` 上的 Claude Code、Codex 等 Agents。",
5
5
  "keywords": [
6
6
  "acpx",