GeezerVison is showing github.com — chore: merge main into creator/443-internal-whitespace (pick up #447/… · developing-today-forks/opencode@f09361b
File treeExpand file treeCollapse file tree Open diff view settings client/src/promise/generated
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: ROADMAP.md +8Lines changed: 8 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -75,6 +75,14 @@ No open items. The daily Jules sync issue (#41) closed as transient on 2026-10-2 | 75 | 75 |
| 76 | 76 | | Title | Date | Result | | 77 | 77 | | ---------------------------------------------------------------- | ---------- | -------- | | | 78 | +| ROADMAP Done records the #442, #447 and #450 completions | 2026-10-25 | #455 | | | 79 | +| Generated client regenerated for ConfigEntry aliases | 2026-10-25 | #451 | | | 80 | +| TUI footer test fixture gains label and description | 2026-10-25 | #449 | | | 81 | +| Node build drops Bun globals from ACP and CPU-profile paths | 2026-10-25 | #448 | | | 82 | +| ROADMAP Done records the #435-#438 completions | 2026-10-25 | #446 | | | 83 | +| Import handlers read files with node fs, not Bun.file | 2026-10-25 | #441 | | | 84 | +| ModelAlias rejects padded and empty reference segments | 2026-10-25 | #440 | | | 85 | +| ROADMAP Done records the #432 completion | 2026-10-25 | #439 | | 78 | 86 | | ROADMAP Done records the #432 completion | 2026-10-25 | #433 | | 79 | 87 | | ROADMAP Done records the #429 completion | 2026-10-25 | #430 | | 80 | 88 | | ROADMAP Done records the #426 completion | 2026-10-25 | #427 | | |
Collapse file Copy file name to clipboardExpand all lines: packages/cli/src/acp/permission.ts +4-3Lines changed: 4 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -5,6 +5,7 @@ import type { Permission } from "@opencode/schema/permission" | 5 | 5 | import { Patch } from "@opencode/util/patch" | 6 | 6 | import { applyPatch, parsePatch, reversePatch, structuredPatch, type StructuredPatch } from "diff" | 7 | 7 | import { Effect, Option, Schema } from "effect" | | 8 | +import { readFile } from "node:fs/promises" | 8 | 9 | import { ACPChild } from "./child" | 9 | 10 | import { ACPClient } from "./client" | 10 | 11 | import type { ACPConnection } from "./connection" | @@ -93,7 +94,7 @@ export const withCompletedDiffs = Effect.fnUntraced(function* ( | 93 | 94 | (file) => | 94 | 95 | Effect.gen(function* () { | 95 | 96 | const path = absolutePath(file.file, cwd) | 96 | | - const newText = file.status === "deleted" ? "" : yield* Effect.tryPromise(() => Bun.file(path).text()) | | 97 | + const newText = file.status === "deleted" ? "" : yield* Effect.tryPromise(() => readFile(path, "utf8")) | 97 | 98 | if (file.status === "added") return [diff(path, null, newText)] | 98 | 99 | const recorded = parsePatch(file.patch)[0] | 99 | 100 | if (!recorded) return [] | @@ -134,7 +135,7 @@ const permissionPreviews = Effect.fnUntraced(function* ( | 134 | 135 | (file) => | 135 | 136 | Effect.gen(function* () { | 136 | 137 | const path = absolutePath(file.file, cwd) | 137 | | - const oldText = file.status === "added" ? null : yield* Effect.tryPromise(() => Bun.file(path).text()) | | 138 | + const oldText = file.status === "added" ? null : yield* Effect.tryPromise(() => readFile(path, "utf8")) | 138 | 139 | const newText = yield* Effect.try(() => applyPatch(oldText ?? "", file.patch)) | 139 | 140 | return newText === false ? [] : [diff(path, oldText, newText)] | 140 | 141 | }), | @@ -153,7 +154,7 @@ function patchPreviews(input: ToolInput, cwd: string) { | 153 | 154 | const newText = hunk.contents.endsWith("\n") || hunk.contents === "" ? hunk.contents : `${hunk.contents}\n` | 154 | 155 | return diff(path, null, newText) | 155 | 156 | } | 156 | | - const oldText = yield* Effect.tryPromise(() => Bun.file(path).text()) | | 157 | + const oldText = yield* Effect.tryPromise(() => readFile(path, "utf8")) | 157 | 158 | if (hunk.type === "delete") return diff(path, oldText, "") | 158 | 159 | const derived = yield* Effect.try(() => Patch.derive(hunk.path, hunk.chunks, oldText)) | 159 | 160 | return diff(hunk.movePath ? absolutePath(hunk.movePath, cwd) : path, oldText, derived.content) | |
Collapse file Copy file name to clipboardExpand all lines: packages/cli/src/commands/handlers/acp.ts +4-2Lines changed: 4 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ import { Service } from "@opencode/client/effect/service" | 4 | 4 | import { CrossSpawnSpawner } from "@opencode/util/cross-spawn-spawner" | 5 | 5 | import { Effect, Option } from "effect" | 6 | 6 | import { FetchHttpClient, HttpClient, HttpClientRequest } from "effect/http" | 7 | | -import { Writable } from "node:stream" | | 7 | +import { Readable, Writable } from "node:stream" | 8 | 8 | import { ACP } from "../../acp/agent" | 9 | 9 | import { Commands } from "../commands" | 10 | 10 | import { Runtime } from "../../framework/runtime" | @@ -34,7 +34,9 @@ export default Runtime.handler( | 34 | 34 | ), | 35 | 35 | Effect.provide(FetchHttpClient.layer), | 36 | 36 | ) | 37 | | - const connection = yield* ACP.connect(client, ndJsonStream(Writable.toWeb(process.stdout), Bun.stdin.stream())) | | 37 | + // Node types `Readable.toWeb` as `ReadableStream<any>`; stdin is a byte stream, as `ndJsonStream` expects. | | 38 | + const stdin = Readable.toWeb(process.stdin) as unknown as ReadableStream<Uint8Array> | | 39 | + const connection = yield* ACP.connect(client, ndJsonStream(Writable.toWeb(process.stdout), stdin)) | 38 | 40 | const failure = yield* Effect.raceFirst( | 39 | 41 | Effect.promise(() => connection.closed).pipe( | 40 | 42 | Effect.map(() => | |
Collapse file Copy file name to clipboardExpand all lines: packages/cli/src/cpu-profile.ts +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -2,6 +2,7 @@ export * as CpuProfile from "./cpu-profile" | 2 | 2 |
| 3 | 3 | import { Global } from "@opencode/util/global" | 4 | 4 | import { Effect, FileSystem, Queue } from "effect" | | 5 | +import { writeFile } from "node:fs/promises" | 5 | 6 | import { Session } from "node:inspector" | 6 | 7 | import path from "node:path" | 7 | 8 |
| @@ -51,7 +52,7 @@ function run<A, E, R>(file: string, effect: Effect.Effect<A, E, R>) { | 51 | 52 | session.post("Profiler.stop", (error, result) => { | 52 | 53 | session.disconnect() | 53 | 54 | if (error) return reject(error) | 54 | | - Bun.write(target, JSON.stringify(result.profile)).then(() => resolve(), reject) | | 55 | + writeFile(target, JSON.stringify(result.profile)).then(() => resolve(), reject) | 55 | 56 | }) | 56 | 57 | }), | 57 | 58 | ).pipe( | |
Collapse file Copy file name to clipboardExpand all lines: packages/cli/test/import-boundaries.test.ts +11Lines changed: 11 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -25,6 +25,17 @@ describe("CLI frontend import boundaries", () => { | 25 | 25 | expect(imports).toEqual([]) | 26 | 26 | }) | 27 | 27 |
| | 28 | + test("does not reference the Bun global in CLI runtime code", async () => { | | 29 | + const glob = new Bun.Glob("src/**/*.{ts,tsx}") | | 30 | + const offenders: string[] = [] | | 31 | + for await (const file of glob.scan({ cwd: path.join(root, "packages/cli") })) { | | 32 | + if (/\.test\.(ts|tsx)$/.test(file)) continue | | 33 | + const source = await Bun.file(path.join(root, "packages/cli", file)).text() | | 34 | + if (/\bBun\./.test(source)) offenders.push(file) | | 35 | + } | | 36 | + expect(offenders).toEqual([]) | | 37 | + }) | | 38 | + | 28 | 39 | test("exposes only the intentional package entrypoints", async () => { | 29 | 40 | const run = await import("@opencode/cli/run") | 30 | 41 | const mini = await import("@opencode/tui/mini") | |
Collapse file Copy file name to clipboardExpand all lines: packages/client/src/promise/generated/types.ts +10Lines changed: 10 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -2637,7 +2637,17 @@ export type ConfigEntry = | 2637 | 2637 | } | 2638 | 2638 | } | 2639 | 2639 | } | | 2640 | + aliases?: { | | 2641 | + providers?: { [x: string]: string } | | 2642 | + models?: { [x: string]: string } | | 2643 | + variants?: { [x: string]: string } | | 2644 | + } | 2640 | 2645 | experimental?: { | | 2646 | + aliases?: { | | 2647 | + providers?: { [x: string]: string } | | 2648 | + models?: { [x: string]: string } | | 2649 | + variants?: { [x: string]: string } | | 2650 | + } | 2641 | 2651 | portable_shell_scanner?: boolean | 2642 | 2652 | subagent_depth?: number | 2643 | 2653 | shell_timeout?: number | |
Collapse file Copy file name to clipboardExpand all lines: packages/core/test/config/normalization.test.ts +15Lines changed: 15 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -55,6 +55,21 @@ function withoutEmptyCompatibilityContainers(input: Record<string, unknown>) { | 55 | 55 | if (!Object.keys(experimental).length) delete result.experimental | 56 | 56 | } | 57 | 57 | } | | 58 | + // Deprecated experimental aliases normalize into top-level aliases (a top-level | | 59 | + // aliases block wins when both are present, matching normalizeAliases). | | 60 | + if (typeof result.experimental === "object" && result.experimental !== null && !Array.isArray(result.experimental)) { | | 61 | + const experimental = result.experimental as Record<string, unknown> | | 62 | + if ( | | 63 | + typeof experimental.aliases === "object" && | | 64 | + experimental.aliases !== null && | | 65 | + !Array.isArray(experimental.aliases) | | 66 | + ) { | | 67 | + if (typeof result.aliases !== "object" || result.aliases === null || Array.isArray(result.aliases)) | | 68 | + result.aliases = experimental.aliases | | 69 | + delete experimental.aliases | | 70 | + if (!Object.keys(experimental).length) delete result.experimental | | 71 | + } | | 72 | + } | 58 | 73 | return result | 59 | 74 | } | 60 | 75 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/tui/test/mini/footer.view.test.tsx +10-1Lines changed: 10 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -585,7 +585,16 @@ test("direct footer preserves a partial multi-field form draft across permission | 585 | 585 | height: 16, | 586 | 586 | view: { type: "form", request }, | 587 | 587 | subagents: { | 588 | | - tabs: [{ sessionID: "ses_child", title: "My Subagent", status: "running", background: false }], | | 588 | + tabs: [ | | 589 | + { | | 590 | + sessionID: "ses_child", | | 591 | + title: "My Subagent", | | 592 | + label: "My Subagent", | | 593 | + description: "Deployment form", | | 594 | + status: "running", | | 595 | + background: false, | | 596 | + }, | | 597 | + ], | 589 | 598 | details: {}, permissions: [], forms: [] | 590 | 599 | } | 591 | 600 | }) | |
|