@skylandnpm/octopus-proxy 0.1.32 → 0.1.33

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.
@@ -11664,6 +11664,10 @@ async function loadConfig(path, options = {}) {
11664
11664
  }
11665
11665
  }
11666
11666
 
11667
+ // src/version.ts
11668
+ import { readFileSync } from "node:fs";
11669
+ var proxyVersion = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
11670
+
11667
11671
  // src/host-identity.ts
11668
11672
  import { execFile } from "node:child_process";
11669
11673
  import { createHash, randomUUID, X509Certificate } from "node:crypto";
@@ -12683,7 +12687,11 @@ var SecureChat = class {
12683
12687
  if (this.stopping) return;
12684
12688
  const url = new URL("/ws/proxy-chat", this.config.hubUrl);
12685
12689
  url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
12686
- const socket = new WebSocket(url, { headers: { Authorization: `SecretKey ${this.config.secretKey}`, "X-Octopus-Bot-Id": this.config.botId }, maxPayload: 1024 * 1024 });
12690
+ const socket = new WebSocket(url, { headers: {
12691
+ Authorization: `SecretKey ${this.config.secretKey}`,
12692
+ "X-Octopus-Bot-Id": this.config.botId,
12693
+ "X-Octopus-Proxy-Version": proxyVersion
12694
+ }, maxPayload: 1024 * 1024 });
12687
12695
  this.outer = socket;
12688
12696
  let lastPong = Date.now();
12689
12697
  const heartbeat = setInterval(() => {
@@ -17351,6 +17359,7 @@ export {
17351
17359
  atomicJson,
17352
17360
  Uploads,
17353
17361
  ensureHostAuth,
17362
+ proxyVersion,
17354
17363
  ensureHostIdentity,
17355
17364
  createRuntime,
17356
17365
  createAdapter,
package/dist/cli.js CHANGED
@@ -19,11 +19,12 @@ import {
19
19
  launchdLogPath,
20
20
  launchdPlistPath,
21
21
  loadConfig,
22
+ proxyVersion,
22
23
  resolveConfigPath,
23
24
  runDaemon,
24
25
  supportedPlatform,
25
26
  systemdUnitPath
26
- } from "./chunk-CYJNEMLS.js";
27
+ } from "./chunk-2RX5VSBS.js";
27
28
 
28
29
  // src/cli.ts
29
30
  import { spawn } from "node:child_process";
@@ -699,10 +700,6 @@ async function manageProjects(configPath2, remove) {
699
700
  }
700
701
  }
701
702
 
702
- // src/version.ts
703
- import { readFileSync } from "node:fs";
704
- var proxyVersion = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
705
-
706
703
  // src/cli.ts
707
704
  var USAGE = `octopus-proxy \u2014 Octopus \u4E3B\u673A\u4EE3\u7406
708
705
 
package/dist/main.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ConfigError,
4
4
  runDaemon
5
- } from "./chunk-CYJNEMLS.js";
5
+ } from "./chunk-2RX5VSBS.js";
6
6
 
7
7
  // src/main.ts
8
8
  runDaemon(process.env.OCTOPUS_PROXY_CONFIG ?? "proxy.json").catch((error) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skylandnpm/octopus-proxy",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "type": "module",
5
5
  "description": "Octopus host proxy: OpenCode, Codex, ZCode and Pi adapters with service installer CLI",
6
6
  "bin": {