@dev-anywhere/proxy 0.9.12 → 0.9.13

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/index.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  readSessionRuntimeIpcVersions,
10
10
  sessionRuntimeIpcVersionMatches,
11
11
  stripProxyProfileArgs
12
- } from "./chunk-ZHG3MO4C.js";
12
+ } from "./chunk-WLLKRNXA.js";
13
13
  import {
14
14
  getErrorMessage,
15
15
  probeProcess
@@ -30,8 +30,8 @@ import "./chunk-CFO5GU5U.js";
30
30
  import {
31
31
  TERMINAL_IPC_PROTOCOL_VERSION,
32
32
  WORKER_IPC_PROTOCOL_VERSION
33
- } from "./chunk-3ZDUDCEI.js";
34
- import "./chunk-5KXGIGKU.js";
33
+ } from "./chunk-U4CHGJJM.js";
34
+ import "./chunk-6I5YPQPN.js";
35
35
  import "./chunk-G4QN6LOR.js";
36
36
  import {
37
37
  PROXY_VERSION
@@ -253,7 +253,7 @@ var program = new Command("dev-anywhere").description("Dev Anywhere - transparen
253
253
  console.error(err instanceof Error ? err.message : String(err));
254
254
  process.exit(1);
255
255
  }
256
- const { startTerminal } = await import("./terminal-OOQQSN3D.js");
256
+ const { startTerminal } = await import("./terminal-TWEWE2PM.js");
257
257
  const { provider, args } = invocation;
258
258
  await startTerminal(args, provider);
259
259
  });
@@ -309,12 +309,12 @@ for (const [action, description] of [
309
309
  ["status", "Show automatic startup status"]
310
310
  ]) {
311
311
  autostart.command(action).description(description).option("--system", "Use a system service that runs without desktop login").option("--now", "Start the system service now and restart Proxy (enable --system only)").action(async (options) => {
312
- const { runAutostartCommand } = await import("./autostart-57FQUWHF.js");
312
+ const { runAutostartCommand } = await import("./autostart-FKSX4V6D.js");
313
313
  await runAutostartCommand(action, options);
314
314
  });
315
315
  }
316
316
  autostart.command("run", { hidden: true }).option("--daemon", "Detach after service readiness (systemd login trigger)").option("--system", "Run the persistent system service host").action(async (_options, command) => {
317
- const { startAutostartService } = await import("./autostart-57FQUWHF.js");
317
+ const { startAutostartService } = await import("./autostart-FKSX4V6D.js");
318
318
  const options = command.optsWithGlobals();
319
319
  await startAutostartService(Boolean(options.daemon), Boolean(options.system));
320
320
  });
@@ -15,7 +15,7 @@ import {
15
15
  isPreviewControlRequest,
16
16
  readPreviewWorkerMessages,
17
17
  writePreviewWorkerMessage
18
- } from "./chunk-QZNAESON.js";
18
+ } from "./chunk-J7XFB5AQ.js";
19
19
  import {
20
20
  acceptCurrentWorkerSocketMessage,
21
21
  readWorkerConnection,
@@ -45,7 +45,7 @@ import {
45
45
  encodeDevicePreviewFrame,
46
46
  encodeDevicePreviewH264ProxyPacket,
47
47
  serializeControl
48
- } from "./chunk-5KXGIGKU.js";
48
+ } from "./chunk-6I5YPQPN.js";
49
49
  import {
50
50
  prepareLocalIpcEndpoint,
51
51
  removeLocalIpcEndpoint,
package/dist/serve.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  sessionRuntimeIpcVersionMatches,
13
13
  stripProxyProfileArgs,
14
14
  writeSessionRuntimeIpcVersions
15
- } from "./chunk-ZHG3MO4C.js";
15
+ } from "./chunk-WLLKRNXA.js";
16
16
  import {
17
17
  processExistsOrIsInaccessible
18
18
  } from "./chunk-5OARBB2B.js";
@@ -21,7 +21,7 @@ import {
21
21
  isPreviewControlRequest,
22
22
  readPreviewWorkerMessages,
23
23
  writePreviewWorkerMessage
24
- } from "./chunk-QZNAESON.js";
24
+ } from "./chunk-J7XFB5AQ.js";
25
25
  import {
26
26
  ContentBlockDeltaSchema,
27
27
  IGNORED_EVENT_TYPES,
@@ -40,7 +40,7 @@ import {
40
40
  import {
41
41
  buildHostedPtyArgs,
42
42
  parseTerminalWorkerCliArgs
43
- } from "./chunk-NKYD7QX4.js";
43
+ } from "./chunk-4S6CPIHM.js";
44
44
  import {
45
45
  ReconnectSupervisor,
46
46
  TERMINAL_ADMISSION_FRAME_MAX_BYTES,
@@ -77,7 +77,7 @@ import {
77
77
  createWorkerReader,
78
78
  serializeIpc,
79
79
  serializeWorkerMsg
80
- } from "./chunk-3ZDUDCEI.js";
80
+ } from "./chunk-U4CHGJJM.js";
81
81
  import "./chunk-5RESCDN4.js";
82
82
  import {
83
83
  ControlErrorCode,
@@ -105,7 +105,7 @@ import {
105
105
  isProxyProtocolRejectDirection,
106
106
  serializeControl,
107
107
  summarizeToolActivity
108
- } from "./chunk-5KXGIGKU.js";
108
+ } from "./chunk-6I5YPQPN.js";
109
109
  import {
110
110
  localIpcEndpointMayExist,
111
111
  removeLocalIpcEndpoint,
@@ -594,7 +594,7 @@ var SessionManager = class {
594
594
  this.terminateManagedSession = options.terminateManagedSession ?? ((pid) => process.kill(pid, "SIGTERM"));
595
595
  this.load();
596
596
  }
597
- createSession(kind, mode, provider, cwd, pid, name, id, ptyOwner, nameLocked) {
597
+ createSession(kind, mode, provider, cwd, pid, name, id, ptyOwner, nameLocked, shellFamily) {
598
598
  if (mode === "pty" && ptyOwner === void 0) {
599
599
  throw new TypeError("PTY session owner is required");
600
600
  }
@@ -630,12 +630,14 @@ var SessionManager = class {
630
630
  };
631
631
  let info;
632
632
  if (kind === "terminal") {
633
+ const resolvedShellFamily = shellFamily ?? (pendingPtyMetadata?.kind === "terminal" ? pendingPtyMetadata.shellFamily : void 0);
633
634
  info = {
634
635
  ...common,
635
636
  kind: "terminal",
636
637
  mode: "pty",
637
638
  provider: "claude",
638
- ptyOwner: "proxy-hosted"
639
+ ptyOwner: "proxy-hosted",
640
+ ...resolvedShellFamily !== void 0 ? { shellFamily: resolvedShellFamily } : {}
639
641
  };
640
642
  } else if (mode === "json") {
641
643
  info = { ...common, kind: "agent", mode: "json", provider };
@@ -931,7 +933,8 @@ var SessionManager = class {
931
933
  kind: "terminal",
932
934
  mode: "pty",
933
935
  provider: "claude",
934
- ptyOwner: "proxy-hosted"
936
+ ptyOwner: "proxy-hosted",
937
+ ...s.shellFamily !== void 0 ? { shellFamily: s.shellFamily } : {}
935
938
  });
936
939
  }
937
940
  if (s.mode === "pty") {
@@ -2272,7 +2275,8 @@ function toSessionListPayload(s) {
2272
2275
  kind: "terminal",
2273
2276
  mode: "pty",
2274
2277
  provider: "claude",
2275
- ptyOwner: "proxy-hosted"
2278
+ ptyOwner: "proxy-hosted",
2279
+ ...s.shellFamily !== void 0 ? { shellFamily: s.shellFamily } : {}
2276
2280
  };
2277
2281
  }
2278
2282
  if (s.mode === "pty") {
@@ -2300,7 +2304,8 @@ function toSessionSyncEntry(s) {
2300
2304
  kind: "terminal",
2301
2305
  mode: "pty",
2302
2306
  provider: "claude",
2303
- ptyOwner: "proxy-hosted"
2307
+ ptyOwner: "proxy-hosted",
2308
+ ...s.shellFamily !== void 0 ? { shellFamily: s.shellFamily } : {}
2304
2309
  };
2305
2310
  }
2306
2311
  if (s.mode === "pty") {
@@ -5565,6 +5570,12 @@ import { isAbsolute as isAbsolute7 } from "path";
5565
5570
 
5566
5571
  // src/common/terminal-shell.ts
5567
5572
  import { win32 } from "path";
5573
+ function getTerminalShellFamily(command) {
5574
+ const name = command.split(/[\\/]/).at(-1)?.toLowerCase().replace(/\.exe$/, "");
5575
+ if (name === "pwsh" || name === "powershell") return "powershell";
5576
+ if (name === "bash" || name === "zsh" || name === "fish" || name === "cmd") return name;
5577
+ return void 0;
5578
+ }
5568
5579
  function windowsTerminalShells(env, options) {
5569
5580
  const probe = options.isExecutableFile ?? ((file) => isExecutableFile(file, "win32"));
5570
5581
  const systemRoot = environmentValue(env, "SystemRoot", "win32") || "C:\\Windows";
@@ -6395,6 +6406,7 @@ var RelaySessionCreateHandler = class {
6395
6406
  let startup;
6396
6407
  try {
6397
6408
  const shell = resolveTerminalShell(msg.shell, this.deps.getProviderEnv());
6409
+ const shellFamily = getTerminalShellFamily(shell.command);
6398
6410
  const name = requestedName ?? shell.label ?? tildify(cwd);
6399
6411
  startup = this.deps.terminalWorkerSpawner.start({
6400
6412
  sessionId: pendingId,
@@ -6414,7 +6426,8 @@ var RelaySessionCreateHandler = class {
6414
6426
  name,
6415
6427
  pendingId,
6416
6428
  "proxy-hosted",
6417
- nameLocked
6429
+ nameLocked,
6430
+ shellFamily
6418
6431
  );
6419
6432
  this.deps.relaySend(
6420
6433
  serializeControl({
@@ -6429,7 +6442,8 @@ var RelaySessionCreateHandler = class {
6429
6442
  kind: "terminal",
6430
6443
  mode: "pty",
6431
6444
  provider: "claude",
6432
- ptyOwner: "proxy-hosted"
6445
+ ptyOwner: "proxy-hosted",
6446
+ ...shellFamily !== void 0 ? { shellFamily } : {}
6433
6447
  })
6434
6448
  );
6435
6449
  this.deps.broadcastSessionSync();