@volter/supercode-terminal 0.2.50 → 0.2.52

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/index.mjs CHANGED
@@ -1739,7 +1739,7 @@ export function composerText(kind, screen) {
1739
1739
  const lines = String(screen ?? '').split('\n').map(styledCells);
1740
1740
  const plain = lines.map((cells) => cells.map((cell) => cell.char).join(''));
1741
1741
  const rule = /^\s*[─━]{4,}\s*$/u;
1742
- const footer = /^\s*(?:\? for shortcuts\b|[^\n]+ · (?:~(?:[\\/]|(?=\s|$))|[\\/]|[A-Z]:[\\/])[^\n]*$|.*← for agents\s*$|.*\bcontext(?:\s+\d+%)?\s+left\b)/iu;
1742
+ const footer = /^\s*(?:\? for shortcuts\b|⚠\s+\d+\s+warnings?\s+·\s+f2 to view\s*$|[^\n]+ · (?:~(?:[\\/]|(?=\s|$))|[\\/]|[A-Z]:[\\/])[^\n]*$|.*← for agents\s*$|.*\bcontext(?:\s+\d+%)?\s+left\b)/iu;
1743
1743
  const caret = kind === 'codex' ? /^\s*›(?:\s|$)/u : /^\s*[❯>](?:\s|$)/u;
1744
1744
  for (let row = plain.length - 1; row >= 0; row -= 1) {
1745
1745
  if (!caret.test(plain[row])) continue;
@@ -1748,8 +1748,9 @@ export function composerText(kind, screen) {
1748
1748
  // Claude encloses the editor in rules; Codex ends it at its shortcut/context footer.
1749
1749
  if (end === plain.length) return null;
1750
1750
  // Startup can draw a caret before loading finishes or a modal opens. A rule
1751
- // alone is not Codex's ready editor; require its footer at the live bottom.
1752
- if (kind === 'codex' && (plain.slice(end + 1).some((line) => line.trim()) ||
1751
+ // alone is not Codex's ready editor; require only recognized footer rows at
1752
+ // the live bottom (model/cwd and shortcuts can occupy separate rows).
1753
+ if (kind === 'codex' && (plain.slice(end + 1).some((line) => line.trim() && !footer.test(line)) ||
1753
1754
  /\bmodel:\s+loading\b/iu.test(plain.findLast((line) => /\bmodel:/iu.test(line)) ?? ''))) return null;
1754
1755
  if (kind === 'claude-code' && (row === 0 || !rule.test(plain[row - 1]))) return null;
1755
1756
  const first = plain[row].match(caret)[0].length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-terminal",
3
- "version": "0.2.50",
3
+ "version": "0.2.52",
4
4
  "type": "module",
5
5
  "description": "Optional leak-safe terminal and tmux host adapter for Volter Harness frontends",
6
6
  "exports": {
package/substrate/tmux.js CHANGED
@@ -62,8 +62,13 @@ export async function createSession({ command, cwd, env, name, owner, ownerOptio
62
62
  const bootstrapDirectories = [];
63
63
  const paneBootstrapArgs = (pane) => {
64
64
  const commandArgs = command === undefined ? [] : [command.program, ...(command.arguments ?? [])];
65
- if (Object.keys(sessionEnv).length === 0)
66
- return commandArgs;
65
+ // With neither command nor overrides, retain tmux's default-shell and
66
+ // default-command behavior rather than choosing a shell for it.
67
+ if (command === undefined && Object.keys(sessionEnv).length === 0)
68
+ return [];
69
+ // The complete command rides the private bootstrap file as well as its
70
+ // environment. tmux's command message is bounded (roughly 16 KiB), much
71
+ // smaller than a native CLI's legal initial prompt.
67
72
  const directory = mkdtempSync(join(tmpdir(), "tmux-session-env-"));
68
73
  bootstrapDirectories.push(directory);
69
74
  const shell = process.env.SHELL ?? "/bin/sh";
@@ -408,10 +413,10 @@ function writeSessionEnvironmentBootstrap(directory, pane, environment, command)
408
413
  "set +a",
409
414
  'rm -f -- "$environment_path" "$0"',
410
415
  'rmdir -- "$(dirname -- "$0")" 2>/dev/null || true',
411
- 'exec "$@"',
416
+ `exec ${command.map(shellQuote).join(" ")}`,
412
417
  ""
413
418
  ].join("\n"), { flag: "wx", mode: 0o700 });
414
- return [wrapperPath, environmentPath, ...command];
419
+ return [wrapperPath, environmentPath];
415
420
  }
416
421
  function shellQuote(value) {
417
422
  return `'${value.replaceAll("'", `'"'"'`)}'`;