@skylandnpm/octopus-proxy 0.1.31 → 0.1.32

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.
@@ -12509,6 +12509,7 @@ var Artifacts = class {
12509
12509
  import WebSocket from "ws";
12510
12510
  import { Duplex } from "node:stream";
12511
12511
  import { createPublicKey, randomUUID as randomUUID7, verify } from "node:crypto";
12512
+ import { userInfo as userInfo2 } from "node:os";
12512
12513
  import { TLSSocket, createSecureContext } from "node:tls";
12513
12514
 
12514
12515
  // src/host-auth.ts
@@ -12646,6 +12647,7 @@ var SecureChat = class {
12646
12647
  eventBytes = 0;
12647
12648
  stopping = false;
12648
12649
  context;
12650
+ serviceAccount = userInfo2().username;
12649
12651
  timer;
12650
12652
  start() {
12651
12653
  this.connect();
@@ -12736,7 +12738,7 @@ var SecureChat = class {
12736
12738
  return;
12737
12739
  }
12738
12740
  const exporter = tls.exportKeyingMaterial(32, "EXPORTER-octopus-device-v1", Buffer.from(this.config.botId));
12739
- sendJson(tls, { type: "auth.challenge", botId: this.config.botId, tunnelId: id, exporter: exporter.toString("base64") });
12741
+ sendJson(tls, { type: "auth.challenge", botId: this.config.botId, tunnelId: id, exporter: exporter.toString("base64"), serviceAccount: this.serviceAccount });
12740
12742
  });
12741
12743
  tls.on("data", (chunk) => this.receivePlaintext(id, Buffer.from(chunk)));
12742
12744
  tls.on("error", () => this.closeSession(id));
@@ -12785,7 +12787,7 @@ var SecureChat = class {
12785
12787
  const exporter = session.tls.exportKeyingMaterial(32, "EXPORTER-octopus-device-v1", Buffer.from(this.config.botId)).toString("base64");
12786
12788
  const proof = Buffer.from(`${this.config.botId}\0${id}\0${exporter}`);
12787
12789
  if (!verify(null, proof, createPublicKey({ key: Buffer.concat([ED25519_SPKI, key]), format: "der", type: "spki" }), signature)) throw new Error("Invalid device proof");
12788
- const valid = await this.authenticate(this.config.stateDirectory, String(message.username ?? ""), String(message.password ?? ""));
12790
+ const valid = await this.authenticate(this.config.stateDirectory, this.serviceAccount, String(message.password ?? ""));
12789
12791
  if (!valid) throw new Error("Host authentication failed");
12790
12792
  if (this.sessions.get(id) !== session) return;
12791
12793
  session.authenticated = true;
@@ -17147,7 +17149,7 @@ var ProjectRegistry = class {
17147
17149
  import { randomUUID as randomUUID15 } from "node:crypto";
17148
17150
  import { access } from "node:fs/promises";
17149
17151
  import { constants as constants4 } from "node:fs";
17150
- import { platform as platform3, userInfo as userInfo2 } from "node:os";
17152
+ import { platform as platform3, userInfo as userInfo3 } from "node:os";
17151
17153
  import * as pty from "node-pty";
17152
17154
  var TerminalManager = class {
17153
17155
  constructor(workspace, emit) {
@@ -17178,7 +17180,7 @@ var TerminalManager = class {
17178
17180
  cols: 80,
17179
17181
  rows: 24,
17180
17182
  cwd,
17181
- env: { PATH: process.env.PATH || "/usr/bin:/bin", HOME: userInfo2().homedir, TERM: "xterm-256color", USER: userInfo2().username }
17183
+ env: { PATH: process.env.PATH || "/usr/bin:/bin", HOME: userInfo3().homedir, TERM: "xterm-256color", USER: userInfo3().username }
17182
17184
  });
17183
17185
  const terminal2 = { id, project, owner, process: terminalProcess, history: "" };
17184
17186
  this.terminals.set(id, terminal2);
package/dist/cli.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  runDaemon,
24
24
  supportedPlatform,
25
25
  systemdUnitPath
26
- } from "./chunk-KDOXN43O.js";
26
+ } from "./chunk-CYJNEMLS.js";
27
27
 
28
28
  // src/cli.ts
29
29
  import { spawn } from "node:child_process";
package/dist/main.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ConfigError,
4
4
  runDaemon
5
- } from "./chunk-KDOXN43O.js";
5
+ } from "./chunk-CYJNEMLS.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.31",
3
+ "version": "0.1.32",
4
4
  "type": "module",
5
5
  "description": "Octopus host proxy: OpenCode, Codex, ZCode and Pi adapters with service installer CLI",
6
6
  "bin": {