@code-yeongyu/senpi-codemode 2026.11.9 → 2026.11.10-1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # Changelog
2
2
 
3
+ ## [2026.11.10-1] - 2026-11-10
4
+
5
+ ### Breaking Changes
6
+
7
+ ### Added
8
+
9
+ ### Changed
10
+
11
+ ### Fixed
12
+
13
+ - `agent()`, `output()` and the eval prompt's spawn helpers keep working when the task tools are eval-only (`exposure: "eval"`, withheld from the model while eval exists), and an eval-only tool's kernel prelude stays loaded ([#6276](https://github.com/code-yeongyu/senpi/pull/6276))
14
+
15
+ ### Removed
16
+
17
+ ## [2026.11.10] - 2026-11-10
18
+
19
+ ### Breaking Changes
20
+
21
+ ### Added
22
+
23
+ ### Changed
24
+
25
+ ### Fixed
26
+
27
+ - The bundled Bun skill no longer tells agents to re-spawn Bun as `process.execPath` unconditionally: inside a compiled host that path is the host binary, so the skill now limits it to standalone Bun and directs compiled hosts to resolve `bun` through PATH ([code-yeongyu/oh-my-openagent#12569](https://github.com/code-yeongyu/oh-my-openagent/issues/12569), [#6232](https://github.com/code-yeongyu/senpi/pull/6232))
28
+ - Hide the console window for installer and kernel subprocess spawns on Windows ([#3965](https://github.com/code-yeongyu/senpi/issues/3965))
29
+
30
+ ### Removed
31
+
32
+ ## [2026.11.9-2] - 2026-11-09
33
+
34
+ ### Breaking Changes
35
+
36
+ ### Added
37
+
38
+ ### Changed
39
+
40
+ ### Fixed
41
+
42
+ - A nested tool's streamed lines no longer vanish from a running eval cell's live update for one frame when the tool finishes; they stay until the cell's own output or its completion replaces them ([#6259](https://github.com/code-yeongyu/senpi/pull/6259)).
43
+
44
+ ### Removed
45
+
3
46
  ## [2026.11.9] - 2026-11-09
4
47
 
5
48
  ### Breaking Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/senpi-codemode",
3
- "version": "2026.11.9",
3
+ "version": "2026.11.10-1",
4
4
  "description": "Source-only senpi extension package for codemode evaluation tools",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -33,15 +33,15 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@babel/parser": "8.0.4",
36
- "@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@2026.11.9",
36
+ "@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@2026.11.10-1",
37
37
  "quickjs-wasi": "3.6.2",
38
38
  "typebox": "1.3.34"
39
39
  },
40
40
  "peerDependencies": {
41
- "@code-yeongyu/senpi": "2026.11.9"
41
+ "@code-yeongyu/senpi": "2026.11.10-1"
42
42
  },
43
43
  "devDependencies": {
44
- "@code-yeongyu/senpi": "2026.11.9"
44
+ "@code-yeongyu/senpi": "2026.11.10-1"
45
45
  },
46
46
  "keywords": [
47
47
  "senpi",
@@ -13,6 +13,7 @@ type SchemaArgs = Static<typeof schemaArgsSchema>;
13
13
  export interface EvalSchemaToolInfo {
14
14
  readonly name: string;
15
15
  readonly description?: string | undefined;
16
+ readonly exposure?: string | undefined;
16
17
  readonly parameters?: unknown;
17
18
  readonly kernelPrelude?: KernelPreludeContribution | undefined;
18
19
  }
@@ -163,6 +163,8 @@ export function runJsInstall(input: {
163
163
  const child = spawn(input.command, argv, {
164
164
  cwd: input.cwd,
165
165
  stdio: ["ignore", "pipe", "pipe"],
166
+ // senpi#3965: npm/pnpm is a console-subsystem exe on Windows.
167
+ windowsHide: true,
166
168
  // npm reads `global`/`location` from any .npmrc and the env; a global install would land where the import never looks.
167
169
  env: {
168
170
  ...input.env,
@@ -217,6 +217,8 @@ export async function runPipInstall(input: {
217
217
  const child = spawn(input.interpreter, argv, {
218
218
  cwd: input.cwd,
219
219
  stdio: ["ignore", "pipe", "pipe"],
220
+ // senpi#3965: python/pip is a console-subsystem exe on Windows.
221
+ windowsHide: true,
220
222
  env: { ...isolatedPipEnv(), TMPDIR: scratch, TEMP: scratch, TMP: scratch },
221
223
  });
222
224
  let termination: Promise<void> | undefined;
@@ -1,14 +1,16 @@
1
1
  import type { KernelPreludeContribution } from "@code-yeongyu/senpi";
2
2
  import type { CodemodeRuntimeAPI } from "./runtime-factory.ts";
3
+ import { reachableToolNames } from "./reachable-tools.ts";
3
4
 
4
5
  type ToolRegistry = Pick<CodemodeRuntimeAPI, "getActiveTools" | "getAllTools">;
5
6
 
6
7
  /**
7
- * Kernel globals of the tools active right now. Read per cell, so a tool activated by `tool_search`, a by-name
8
- * call, or a command shows up in the next cell and a deactivated one disappears, whatever the registration order.
8
+ * Kernel globals of the tools a cell can reach right now (active, or eval-exposed and withheld from the model).
9
+ * Read per cell, so a tool activated by `tool_search`, a by-name call, or a command shows up in the next cell
10
+ * and a deactivated one disappears, whatever the registration order.
9
11
  */
10
12
  export function activeKernelPreludes(pi: ToolRegistry): readonly KernelPreludeContribution[] {
11
- const active = new Set(pi.getActiveTools());
13
+ const active = reachableToolNames(pi);
12
14
  return pi.getAllTools().flatMap((tool) => (tool.kernelPrelude && active.has(tool.name) ? [tool.kernelPrelude] : []));
13
15
  }
14
16
 
@@ -0,0 +1,31 @@
1
+ import type { EvalSchemaToolInfo } from "../bridges/schema-bridge.ts";
2
+
3
+ export interface ReachableToolRegistry {
4
+ getActiveTools(): string[];
5
+ getAllTools(): readonly EvalSchemaToolInfo[];
6
+ }
7
+
8
+ /**
9
+ * The tools a cell can call: the model-visible active tools plus every registered tool whose declared
10
+ * exposure is `eval`. The session withholds an eval-exposed tool from the model whenever eval itself is
11
+ * registered (bash, grep, glob, generate_image, a plugin's thread_* or task_* family), so it is absent
12
+ * from `getActiveTools()` while `executeTool` still reaches it; reading only the active list made
13
+ * `agent()`/`output()` report the task tool unavailable and dropped its kernel prelude the moment it
14
+ * became eval-only (senpi#6269 follow-up).
15
+ */
16
+ export function reachableToolNames(pi: ReachableToolRegistry): Set<string> {
17
+ const names = new Set(pi.getActiveTools());
18
+ for (const tool of registeredTools(pi)) if (tool.exposure === "eval") names.add(tool.name);
19
+ return names;
20
+ }
21
+
22
+ // The loader's registry methods throw until the runtime binds (the dedupe probe in
23
+ // coding-agent's codemode-builtin-dedupe.test.ts registers eval before that point); an
24
+ // unreadable registry adds nothing, like promptKernelPreludes.
25
+ function registeredTools(pi: ReachableToolRegistry): readonly EvalSchemaToolInfo[] {
26
+ try {
27
+ return pi.getAllTools();
28
+ } catch {
29
+ return [];
30
+ }
31
+ }
@@ -27,6 +27,7 @@ import { processRuntimeInfo } from "../kernels/js/process-worker.ts";
27
27
  import { sessionEnvironmentFrom } from "../kernels/session-env.ts";
28
28
  import { resolveSessionArtifactsDir } from "../output/streaming-output.ts";
29
29
  import type { EnabledEvalLanguages, EvalLanguage, EvalRuntimes } from "../tool/types.ts";
30
+ import { reachableToolNames } from "./reachable-tools.ts";
30
31
  import { jsRuntimeInfo, runtimesFromAvailability } from "./runtime-info.ts";
31
32
  import {
32
33
  type CodemodeSessionManager,
@@ -90,7 +91,7 @@ export async function createRuntime(
90
91
  const enabledLanguages = enabledLanguagesFrom(settings, availability);
91
92
  const jsProcessIsolation = resolveJsIsolation(settings) === "process";
92
93
  const artifacts = resolveSessionArtifactsDir(ctx.sessionManager.getSessionFile());
93
- const activeTools = new Set(pi.getActiveTools());
94
+ const activeTools = reachableToolNames(pi);
94
95
  const executeTool = createExecuteTool(pi, activeTools);
95
96
  const create = options.createSessionManager ?? createCodemodeSessionManager;
96
97
  const sessionId = sessionIdFrom(event);
@@ -166,7 +167,7 @@ export function createExecuteTool(pi: CodemodeRuntimeAPI, activeTools?: Readonly
166
167
  const executeTool: AgentExecuteTool = (toolName, params, executeOptions) =>
167
168
  pi.executeTool(toolName, params, { ...executeOptions, activateInactiveTool: true });
168
169
  return Object.assign(executeTool, {
169
- isToolAvailable: (name: string): boolean => activeTools?.has(name) ?? pi.getActiveTools().includes(name),
170
+ isToolAvailable: (name: string): boolean => (activeTools ?? reachableToolNames(pi)).has(name),
170
171
  });
171
172
  }
172
173
 
@@ -204,6 +204,8 @@ export function spawnSubprocess(spawn: SubprocessSpawn | undefined, request: Sub
204
204
  detached: true,
205
205
  env: request.env,
206
206
  stdio: ["pipe", "pipe", "pipe"],
207
+ // senpi#3965: kernel children can be console-subsystem exes on Windows.
208
+ windowsHide: true,
207
209
  });
208
210
  globalThis.__senpiCodemodeGateObserveResource?.("processes", child, "close");
209
211
  return child;
@@ -45,7 +45,7 @@ Free wins (no code change): 2x lower CPU, 13-48% less server memory, 2-2.5x fast
45
45
  1. **Eval-first, builtin-first.** The `eval` js kernel runs on Bun (that is why this skill is present): call `Bun.*` APIs directly inside js cells and reach for `bash` or a spawned `bun` only for CLI surfaces (`bun test`, `bun build`, `bun pm`) or work that needs a separate process. The Replaces column above is a ban list for new dependencies in production code, test helpers and one-off scripts alike.
46
46
  2. **Anything that must outlive a cell starts outside it.** The kernel SIGKILLs every `Bun.spawn` child when its cell settles, so browsers, daemons, dev servers, remote `ssh` jobs and slow git hooks start through `tool.monitor({ command })` or `tool.bash({ run_in_background: true })`; a stopped long `Bun.$` cell restarts the kernel and loses every global, so helpers live in an importable file.
47
47
  3. **`Bun.$` runs one command with array-interpolated args; real shell syntax goes to bash.** `${"a b"}` is ONE argument, `$?`/`$VAR` are literal, `for`/`until`/heredocs are parse errors or silent `command not found` with rc 0, and `VAR=x cmd` is not applied to a binary — each of these produced a false-green gate. Use `` $`cmd ${[args]}`.nothrow().quiet() `` for a command and `Bun.spawn(["bash", "-c", script], { env: process.env, stdin: "ignore" })` for a script.
48
- 4. **Every `Bun.spawn` passes `env: process.env`, and re-spawns Bun as `process.execPath`.** An env-less child gets the environment the process STARTED with (runtime HOME/TMPDIR edits never arrive), and `"bun"` from PATH has resolved to three different shims on our machines. Give a child that reads stdin `stdin: "ignore"` or an explicit end, or it waits for EOF forever.
48
+ 4. **Every `Bun.spawn` passes `env: process.env`, and re-spawns Bun as `process.execPath` — but only when this runtime IS standalone Bun.** An env-less child gets the environment the process STARTED with (runtime HOME/TMPDIR edits never arrive), and `"bun"` from PATH has resolved to three different shims on our machines. Inside a compiled host (the OmO engine, any `--compile` binary) `process.execPath` is the host binary itself, not Bun: spawning it with a script path starts another agent instead of running the script (omo#12569). There, resolve `bun` through PATH — senpi appends a real Bun shim to PATH — and never hand a script path to an unverified `process.execPath`. Give a child that reads stdin `stdin: "ignore"` or an explicit end, or it waits for EOF forever.
49
49
  5. **`bun test` gets its timeout on the command line and exact paths with `./`.** `--timeout N` is the only budget that reaches every file (a preload's `setDefaultTimeout` covers the first file, bunfig's is ignored); a timeout SIGTERMs every child the test spawned, so a database started in `beforeAll` dies with it; `bun test path.ts` without `./` is a substring filter. The full table is in [test](references/test.md) — read it before writing or debugging a suite.
50
50
  6. **Measure with the Bun the work targets.** The kernel's `Bun.version`, the shell's `bun --version` and a repo's pinned Bun (CI `bun-version`, `devDependencies.bun`) differ on one machine and 1.4.2 vs 1.4.3 changed test outcomes, so evidence runs use the pin; probe a feature in an empty directory, because `bun check`/`bun fmt`/`bun lint` otherwise run a same-named package.json script. Installs: `CI=1`, visible output, and after `--ignore-scripts` run `node node_modules/bun/install.js` — [install](references/install.md) lists why.
51
51
  7. **Read the matching reference before using an unfamiliar API** — signatures and caveats (`Bun.markdown` HTML is unsanitized, HTTP/3 is experimental, `writer({ append: true })` truncated a results file) live there, not here; [session-recipes](references/session-recipes.md) holds the rest of the session-learned traps.
@@ -40,10 +40,10 @@ proc.resourceUsage(); // { maxRSS, cpuTime: { user, system } } — measure, do n
40
40
  ```
41
41
 
42
42
  - `stdin: "ignore"` (or write then `.end()` the `FileSink`) for any child that may read stdin: a `bun -e` program reading stdin, or `promisify(execFile)` with `input` (Bun ignores it), waits for EOF forever; under ssh it orphans and blocks later jobs (2026-08-31, 2026-10-30).
43
- - Re-spawning Bun: use `process.execPath`, never `"bun"` from PATH — a mise shim refused a temp HOME, a stray 1.4.0 shim in `~/.bun/install/global/node_modules/.bin` hung rpc tests, and after a reboot PATH resolved `bun` to a vite-plus shim with shim recursion; the `bun test vX.Y.Z` header line is the tell (2026-09-28, 10-26, 10-29). Inside a compiled binary `bun` can be the binary itself — see [build](build.md).
43
+ - Re-spawning Bun: use `process.execPath` only when this runtime is standalone Bun — `"bun"` from PATH has resolved to three different shims on our machines (a mise shim refused a temp HOME, a stray 1.4.0 shim in `~/.bun/install/global/node_modules/.bin` hung rpc tests, and after a reboot PATH resolved `bun` to a vite-plus shim with shim recursion; the `bun test vX.Y.Z` header line is the tell, 2026-09-28, 10-26, 10-29). Inside a compiled binary `process.execPath` IS the host binary, so spawning it with a script path starts another agent instead of running the script (omo#12569): resolve `bun` through PATH there — senpi appends a real Bun shim to PATH — and never hand a script path to an unverified `process.execPath`. See [build](build.md).
44
44
  - `proc.signalCode` is set when a signal is SENT, not when the child exits: a child ignoring SIGTERM keeps running while `signalCode === "SIGTERM"`; await `proc.exited` with a deadline, then `proc.kill("SIGKILL")` (2026-10-02).
45
45
  - **The js eval kernel SIGKILLs every `Bun.spawn` child when its cell settles** — four Chromium launches in a row died 0.05-9 s after the launching cell completed, and a child parked in `globalThis` does not survive (2026-09-16/10-17). Anything that must outlive a cell (browser, daemon, dev server, `ssh` running a remote job, a `git commit` with slow hooks) starts through `tool.monitor({ command })` or `tool.bash({ run_in_background: true })`; keep only its id/pid in `globalThis`. Conversely `bun --no-orphans script.ts` makes a script exit when its parent dies and SIGKILL every descendant on exit. A stopped long `Bun.$` cell restarts the whole kernel and loses every global; keep helpers in an importable file and restore with `Object.assign(globalThis, await import(path))` (2026-10-02).
46
- - IPC with a Bun child: `Bun.spawn([process.execPath, "child.ts"], { env: process.env, ipc(message, child) {} })`, then `child.send(value)`; the child uses `process.send(value)` and `process.on("message", fn)` (structured-clone values; measured on 1.4.4).
46
+ - IPC with a Bun child: `Bun.spawn([process.execPath, "child.ts"], { env: process.env, ipc(message, child) {} })` (standalone Bun only — in a compiled host resolve `bun` through PATH, see above), then `child.send(value)`; the child uses `process.send(value)` and `process.on("message", fn)` (structured-clone values; measured on 1.4.4).
47
47
  - PTY: `Bun.spawn(["bash"], { terminal: { cols, rows, data(term, chunk) {} } })` then `proc.terminal.write()/resize()` — replaces node-pty and the macOS `script -q /dev/null` trick.
48
48
  - `Bun.spawnSync` blocks the kernel thread and cannot be interrupted: never in an eval cell. `maxBuffer` kills a chatty sync child.
49
49
  - `signal: AbortSignal.timeout(ms)` works for `fetch` and `spawn` alike (`killSignal` picks the signal).
@@ -19,7 +19,7 @@ bun test --check # type-check test file
19
19
  | `expect(p).rejects` hangs after a Worker reply | `await expect(p).rejects…` reached from the continuation of an awaited Worker message deadlocks (oven-sh/bun#37189, still on 1.4.3) | `const err = await p.then(() => undefined, (e) => e)` then assert on `err` |
20
20
  | `mock.module()` reaches every importer | mocking a re-exporting entry replaces the function for modules importing it by relative path too; one file's `mock.module` of a shared logger breaks another file's `spyOn` in the same run (2026-10-26/27) | copy the real namespace first (`{ ...(await import(x)) }`), keep such tests in their own process (`bun test ./x.isolated.test.ts`) or run `--isolate` |
21
21
  | Preload patch of a builtin is invisible | a preload's `require("node:os").x = …` reaches product `import * as os` only if nothing ESM-imported that builtin before the patch; Bun snapshots the namespace at first ESM import and `module.syncBuiltinESMExports()` does not help (2026-10-29) | patch before any ESM import of the builtin, or use the product's env seam |
22
- | Respawned `"bun"` is not this Bun | PATH can resolve to a mise shim or a stray older `bun` in a global `.bin`; the test's `calls.log` ENOENT hid a `--version` exit 1 (2026-09-28, 10-29) | spawn `process.execPath`; surface the child's stderr when a stub log is missing |
22
+ | Respawned `"bun"` is not this Bun | PATH can resolve to a mise shim or a stray older `bun` in a global `.bin`; the test's `calls.log` ENOENT hid a `--version` exit 1 (2026-09-28, 10-29) | spawn `process.execPath` — standalone Bun only (in a compiled host it is the host binary; resolve `bun` through PATH there, omo#12569); surface the child's stderr when a stub log is missing |
23
23
  | Env-less child misses runtime env | `Bun.spawn` without `env` gives the child the STARTUP environment | `env: process.env` — see [session-recipes](session-recipes.md) |
24
24
  | Timed-out test keeps running | the per-test timeout marks the test failed but its body keeps executing; a body awaiting a never-settling promise is not ended at all, and `onTestFinished` runs while it is still awaiting (2026-10-12/16) | own async work in a hook registered before fixture removal; wrap a never-settles RED in an outer `timeout -k 5 <s>` |
25
25
  | Shared-helper hooks bind once | an `afterEach`/`afterAll` at module scope of a helper several files import binds only to the FIRST importer; 16 files skipped cleanup and left 106 temp dirs (2026-10-10) | register per call with `onTestFinished(() => …)` inside the helper |
@@ -73,6 +73,7 @@ export class CellResultBuilder implements CellToolUpdateSink {
73
73
  ...(options.artifactPath === undefined ? {} : { artifactPath: options.artifactPath }),
74
74
  ...(options.imageResizer === undefined ? {} : { imageResizer: options.imageResizer }),
75
75
  onChunk: (chunk) => {
76
+ this.#nestedTools.releaseSettled();
76
77
  this.#liveLines.append(chunk);
77
78
  this.#scheduleOutputUpdate();
78
79
  },
@@ -127,11 +128,15 @@ export class CellResultBuilder implements CellToolUpdateSink {
127
128
  this.#scheduleOutputUpdate();
128
129
  }
129
130
 
131
+ /** Settling changes nothing on screen (the call's lines stay until the cell replaces them), so it emits nothing. */
130
132
  nestedToolSettled(callId: string): void {
131
- if (this.dropNestedTool(callId)) this.#scheduleOutputUpdate();
133
+ this.dropNestedTool(callId);
132
134
  }
133
135
 
134
- /** Removes a settled call's partial from the live view without emitting; the caller's next update shows it gone. */
136
+ /**
137
+ * Marks a call settled without emitting: its lines stay in the live view until the cell's own next output or its
138
+ * completion replaces them (#6257).
139
+ */
135
140
  dropNestedTool(callId: string): boolean {
136
141
  if (!this.#nestedTools.drop(callId)) return false;
137
142
  this.#state.output = this.#liveCellOutput();
@@ -13,27 +13,51 @@ export interface CellToolUpdateSink {
13
13
  */
14
14
  export class NestedToolOutput {
15
15
  readonly #byCall = new Map<string, string>();
16
+ /**
17
+ * The newest settled call's last text, still on screen until something replaces it: the cell's own output, a
18
+ * live call's next text, a later settled call, or the cell's completion (#6257). Only one is held, so a cell
19
+ * that settles many calls without printing keeps one call's tail, not all of them.
20
+ */
21
+ #held: string | undefined;
16
22
 
17
23
  /** Keeps the call's newest partial; false when it adds no new text. */
18
24
  update(callId: string, partial: AgentToolResult<unknown>): boolean {
19
25
  const text = partial.content.flatMap((part) => (part.type === "text" ? [part.text] : [])).join("\n");
20
26
  if (text.length === 0 || this.#byCall.get(callId) === text) return false;
21
27
  this.#byCall.set(callId, text);
28
+ this.#held = undefined;
22
29
  return true;
23
30
  }
24
31
 
25
- /** Forgets a settled call; false when it never showed output. */
32
+ /**
33
+ * Marks a call settled; false when it never showed output. Its last text becomes the held text (replacing any
34
+ * earlier one) and stays in the live view until
35
+ * `releaseSettled` (the cell's own next output) or `clear` (the cell finished), so the user never sees the
36
+ * running cell with those lines gone and nothing in their place (#6257).
37
+ */
26
38
  drop(callId: string): boolean {
27
- return this.#byCall.delete(callId);
39
+ const text = this.#byCall.get(callId);
40
+ if (text === undefined) return false;
41
+ this.#byCall.delete(callId);
42
+ this.#held = text;
43
+ return true;
44
+ }
45
+
46
+ /** Removes the held settled text; false when none was held. */
47
+ releaseSettled(): boolean {
48
+ if (this.#held === undefined) return false;
49
+ this.#held = undefined;
50
+ return true;
28
51
  }
29
52
 
30
53
  clear(): void {
31
54
  this.#byCall.clear();
55
+ this.#held = undefined;
32
56
  }
33
57
 
34
58
  appendTo(output: string): string {
35
59
  let combined = output;
36
- for (const text of this.#byCall.values()) {
60
+ for (const text of this.#held === undefined ? this.#byCall.values() : [this.#held, ...this.#byCall.values()]) {
37
61
  const tail = truncateTailBytes(text, DEFAULT_MAX_BYTES).text;
38
62
  combined = combined.length === 0 || combined.endsWith("\n") ? `${combined}${tail}` : `${combined}\n${tail}`;
39
63
  }
@@ -42,7 +66,7 @@ export class NestedToolOutput {
42
66
 
43
67
  /** Like `appendTo`, kept to the last `maxLines` lines; `output` is returned untouched while no call shows output. */
44
68
  appendLines(output: string, maxLines: number): string {
45
- if (this.#byCall.size === 0) return output;
69
+ if (this.#byCall.size === 0 && this.#held === undefined) return output;
46
70
  const combined = this.appendTo(output);
47
71
  const hasTrailingNewline = combined.endsWith("\n");
48
72
  const lines = combined.split("\n");