@staff0rd/assist 0.824.0 → 0.824.2

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
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.824.0",
9
+ version: "0.824.2",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -43451,6 +43451,24 @@ function ensureSpawnHelperExecutable() {
43451
43451
  if ((mode & 73) === 0) chmodSync(helper, mode | 493);
43452
43452
  }
43453
43453
 
43454
+ // src/commands/sessions/daemon/resolvePtyCommand.ts
43455
+ function resolvePtyCommand(args) {
43456
+ if (process.platform !== "win32")
43457
+ return {
43458
+ file: process.env.SHELL ?? "bash",
43459
+ args: ["-l", "-c", `exec ${args.map(shellEscape).join(" ")}`]
43460
+ };
43461
+ if (args[0] === "assist" && process.argv[1])
43462
+ return {
43463
+ file: process.execPath,
43464
+ args: [process.argv[1], ...args.slice(1)]
43465
+ };
43466
+ return { file: "cmd.exe", args: ["/c", ...args] };
43467
+ }
43468
+ function shellEscape(s) {
43469
+ return `'${s.replace(/'/g, String.raw`'\''`)}'`;
43470
+ }
43471
+
43454
43472
  // src/commands/sessions/daemon/spawnPty.ts
43455
43473
  var MissingCwdError = class extends Error {
43456
43474
  constructor(cwd) {
@@ -43462,14 +43480,13 @@ var MissingCwdError = class extends Error {
43462
43480
  function spawnPty(args, cwd, sessionId, extraEnv) {
43463
43481
  refuseMissingCwd(cwd, sessionId);
43464
43482
  ensureSpawnHelperExecutable();
43465
- const shell = process.platform === "win32" ? "cmd.exe" : process.env.SHELL ?? "bash";
43466
- const shellArgs = process.platform === "win32" ? ["/c", ...args] : ["-l", "-c", `exec ${args.map(shellEscape).join(" ")}`];
43483
+ const command = resolvePtyCommand(args);
43467
43484
  const {
43468
43485
  CLAUDE_CODE_CHILD_SESSION: _childSession,
43469
43486
  CLAUDECODE: _claudeCode,
43470
43487
  ...parentEnv
43471
43488
  } = process.env;
43472
- return pty.spawn(shell, shellArgs, {
43489
+ return pty.spawn(command.file, command.args, {
43473
43490
  name: "xterm-256color",
43474
43491
  cols: 120,
43475
43492
  rows: 30,
@@ -43492,9 +43509,6 @@ function refuseMissingCwd(cwd, sessionId) {
43492
43509
  );
43493
43510
  throw new MissingCwdError(cwd);
43494
43511
  }
43495
- function shellEscape(s) {
43496
- return `'${s.replace(/'/g, String.raw`'\''`)}'`;
43497
- }
43498
43512
 
43499
43513
  // src/commands/sessions/daemon/spawnCodex.ts
43500
43514
  function spawnCodex2(opts = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.824.0",
3
+ "version": "0.824.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {