8000 [pull] main from can1357:main by pull[bot] · Pull Request #134 · ericrihm/oh-my-pi · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,22 @@ build --@rules_rust//rust/settings:error_format=human
# Generated toolchains carry target_settings requiring the nightly channel.
build --@rules_rust//rust/toolchain/channel=nightly

# Pin the macOS deployment target for target and exec links. Unset, the
# autodetected cc toolchain uses the selected SDK version: 10.11 under Command
# Line Tools but 27.0 under full Xcode 27 (xcode-27 runners), which would lock
# the addon to macOS 27+. 12.0 matches the Foundation Models bridge's Swift
# target.
build:macos --macos_minimum_os=12.0
build:macos --host_macos_minimum_os=12.0
# rustc strips Apple binaries with its bundled rust-objcopy, which leaves
# minos >= 12.0 dylibs with a LINKEDIT string pool dyld rejects ("mis-aligned
# LINKEDIT string pool"); rustc reports that for every proc-macro as E0463
# "can't find crate". Strip at link time instead (-S drops debug info, the
# opt-mode `strip=debuginfo` equivalent). Exec links (proc-macros, build
# scripts) are covered here; the shipped addon in bazel/defs.bzl.
build:macos --@rules_rust//rust/settings:extra_exec_rustc_flag=-Cstrip=none
build:macos --@rules_rust//rust/settings:extra_exec_rustc_flag=-Clink-arg=-Wl,-S


# --- Rust validation (replaces cargo clippy/nextest in CI) --------------------
# Mirrors cargo semantics: crates with `[lints] workspace = true` (pi-ast,
Expand Down
15 changes: 10 additions & 5 deletions bazel/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ always release-grade regardless of -c, and every addon shares one cache entry
per (platform, source) pair.
"""

_ADDON_RUSTC_FLAGS = [
"-Ccodegen-units=16",
"-Cstrip=symbols",
]
_ADDON_RUSTC_FLAGS = ["-Ccodegen-units=16"]

# Darwin strips at link time (-x: non-global symbols, -S: debug info) because
# rustc's rust-objcopy strip corrupts minos >= 12.0 dylibs; see .bazelrc.
# -Cstrip=none also overrides the opt-mode toolchain `strip=debuginfo`.
_DARWIN_STRIP_FLAGS = ["-Cstrip=none", "-Clink-arg=-Wl,-x,-S"]
_STRIP_FLAGS = ["-Cstrip=symbols"]

def _addon_transition_impl(settings, attr):
# Statically link the MSVC CRT for the shipped win32 addon: rustc gets
Expand All @@ -32,7 +35,9 @@ def _addon_transition_impl(settings, attr):
"//command_line_option:compilation_mode": "opt",
"//command_line_option:features": features,
"@rules_rust//rust/settings:lto": "thin",
"@rules_rust//rust/settings:extra_rustc_flags": _ADDON_RUSTC_FLAGS,
"@rules_rust//rust/settings:extra_rustc_flags": _ADDON_RUSTC_FLAGS + (
_DARWIN_STRIP_FLAGS if "darwin" in str(attr.platform) else _STRIP_FLAGS
),
}

_addon_transition = transition(
Expand Down
4 changes: 2 additions & 2 deletions packages/ai/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

## [Unreleased]

## [18.4.3] - 2026-09-28

### Added

- Added Command Code usage limits (5-hour, weekly, and credit balance) to /usage and the status line ([#13666](https://github.com/can1357/oh-my-pi/pull/13666) by [@riicodespretty](https://github.com/riicodespretty))

## [18.4.3] - 2026-09-28

< 10000 /td> ### Changed

- Reduced per-token CPU and allocations while streaming: the leaked-thinking scanner used for OpenAI-compatible and custom endpoints no longer allocates per character, chat-completions and Bedrock look up a delta's content block in constant time, Google, Gemini CLI, Codex, and chat-completions streams skip raw SSE line capture unless an `onSseEvent` listener is attached, and event streams drain backlogs without `Array#shift` ([#13650](https://github.com/can1357/oh-my-pi/pull/13650) by [@H4vC](https://github.com/H4vC)).
Expand Down
18 changes: 6 additions & 12 deletions packages/catalog/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@

## [Unreleased]

## [18.4.3] - 2026-09-28

### Added

- Added Command Code's typesafe/jev decision model for the judge role ([#13666](https://github.com/can1357/oh-my-pi/pull/13666) by [@riicodespretty](https://github.com/riicodespretty))
- Added Command Code's DeepSeek V4.1 Flash Fast model ([#13666](https://github.com/can1357/oh-my-pi/pull/13666) by [@riicodespretty](https://github.com/riicodespretty))
- Added Command Code's Claude Sonnet 5.5 model ([#13666](https://github.com/can1357/oh-my-pi/pull/13666) by [@riicodespretty](https://github.com/riicodespretty))
- Added `trust-forbidden=#true` for optional login `validate` checks, so a key check that answers 403 keeps the pasted key instead of rejecting it ([#13666](https://github.com/can1357/oh-my-pi/pull/13666) by [@riicodespretty](https://github.com/riicodespretty))
- `hosted-image #false` and `image-model #false` now remove a hosted image flag or image model that a class rule grants ([#13666](https://github.com/can1357/oh-my-pi/pull/13666) by [@riicodespretty](https://github.com/riicodespretty))
- Added support for Claude Sonnet 5.5 model with image and text inputs
- Added new compatibility rules for Anthropic Sonnet family enabling mid‑conversation system features and disabling forced tool choice
- Added the `web-search-model`, `hosted-image`, and `image-model` catalog axes (`Model.webSearchModel`, `hostedImage`, `imageModel`). `web-search` now comes from the model's lineage and API (GPT-5+ Responses, Claude 4+ Messages, Gemini 2+), so proxies and gateways that expose these models inherit it.

### Changed

- Renamed the Codex image model `openai-codex/gpt-image-1` to `openai-codex/gpt-image-2` to match what the Codex backend runs (`gpt-image-2-codex`); saved `openai-codex/gpt-image-1` selectors resolve to the new id.
- Routed Command Code's 10 GPT models through the OpenAI Responses API ([#13666](https://github.com/can1357/oh-my-pi/pull/13666) by [@riicodespretty](https://github.com/riicodespretty))
- Command Code login now rejects a key that Command Code answers with 401; a 403 or an unreachable check keeps the pasted key, as the Command Code CLI does ([#13666](https://github.com/can1357/oh-my-pi/pull/13666) by [@riicodespretty](https://github.com/riicodespretty))
- Command Code GPT models no longer advertise hosted image generation or the `gpt-image-2` image model, which Command Code does not serve ([#13666](https://github.com/can1357/oh-my-pi/pull/13666) by [@riicodespretty](https://github.com/riicodespretty))
Expand All @@ -22,18 +28,6 @@

- Fixed missing thinking levels, image input, and prices for Command Code models ([#13666](https://github.com/can1357/oh-my-pi/pull/13666) by [@riicodespretty](https://github.com/riicodespretty))

## [18.4.3] - 2026-09-28

### Added

- Added support for Claude Sonnet 5.5 model with image and text inputs
- Added new compatibility rules for Anthropic Sonnet family enabling mid‑conversation system features and disabling forced tool choice
- Added the `web-search-model`, `hosted-image`, and `image-model` catalog axes (`Model.webSearchModel`, `hostedImage`, `imageModel`). `web-search` now comes from the model's lineage and API (GPT-5+ Responses, Claude 4+ Messages, Gemini 2+), so proxies and gateways that expose these models inherit it.

### Changed

- Renamed the Codex image model `openai-codex/gpt-image-1` to `openai-codex/gpt-image-2` to match what the Codex backend runs (`gpt-image-2-codex`); saved `openai-codex/gpt-image-1` selectors resolve to the new id.

## [18.4.2] - 2026-09-28

### Changed
Expand Down
5 changes: 1 addition & 4 deletions packages/coding-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

## [Unreleased]

### Fixed

- Fixed hosted OpenAI web search on hosts that accept only string tool_choice values, such as Command Code ([#13666](https://github.com/can1357/oh-my-pi/pull/13666) by [@riicodespretty](https://github.com/riicodespretty))

## [18.4.3] - 2026-09-28

### Added
Expand Down Expand Up @@ -35,6 +31,7 @@
- Fixed a mistyped `--model` in print mode telling you to set an API key; it now suggests the closest available models ([#13623](https://github.com/can1357/oh-my-pi/pull/13623) by [@H4vC](https://github.com/H4vC))
- Fixed the alt+p / `/switch` model picker taking seconds to appear: it rebuilt the whole model catalog on every open before painting, and now re-reads it only when startup discovery is still landing or models.yml changed
- Fixed `tool_call` `additionalContext` being delivered more than once when several extension or hook handlers on the same call returned identical text ([#13633](https://github.com/can1357/oh-my-pi/pull/13633) by [@andrebrait](https://github.com/andrebrait))
- Fixed hosted OpenAI web search on hosts that accept only string tool_choice values, such as Command Code ([#13666](https://github.com/can1357/oh-my-pi/pull/13666) by [@riicodespretty](https://github.com/riicodespretty))

### Removed

Expand Down
30 changes: 18 additions & 12 deletions packages/coding-agent/test/blob-exposure-tunnels.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,13 @@ function prepareFake(output: string, options: { exitCode?: number; restartOnce?:
fs.writeFileSync(
target,
`#!/bin/sh\n` +
`: > ${shellLiteral(argsFile)}\n` +
`for arg do printf '%s\\n' "$arg" >> ${shellLiteral(argsFile)}; done\n` +
// Publish argv atomically: adapters with a configured publicBaseUrl
// resolve before the tunnel prints anything, so tests may read the
// file while a (re)started process is still writing it.
`tmp=${shellLiteral(argsFile)}.$$\n` +
`: > "$tmp"\n` +
`for arg do printf '%s\\n' "$arg" >> "$tmp"; done\n` +
`/bin/mv "$tmp" ${shellLiteral(argsFile)}\n` +
`printf 'run\\n' >> ${shellLiteral(runsFile)}\n` +
`trap 'printf "SIGINT\\n" >> ${shellLiteral(signalsFile)}; exit 0' INT\n` +
`trap 'printf "SIGTERM\\n" >> ${shellLiteral(signalsFile)}; exit 0' TERM\n` +
Expand Down Expand Up @@ -101,7 +106,8 @@ async function waitForRestart(marker: string): Promise<void> {
await waitForFileContent(marker, text => text.includes("restarted"));
}

function recordedArgs(invocation: FakeInvocation): string[] {
async function recordedArgs(invocation: FakeInvocation): Promise<string[]> {
await waitForFileContent(invocation.argsFile, () => true);
const text = fs.readFileSync(invocation.argsFile, "utf8");
return text === "" ? [] : text.replace(/\n$/, "").split("\n");
}
Expand Down Expand Up @@ -174,7 +180,7 @@ describe("startExposure tunnel adapters", () => {
const active = await startExposure(exposure("localhost-run"), PORT);
activeExposures.push(active);
expect(active.baseUrl).toBe("https://quiet-owl.lhr.life");
expect(recordedArgs(invocation)).toEqual([
expect(await recordedArgs(invocation)).toEqual([
"-o",
"BatchMode=yes",
"-o",
Expand All @@ -200,7 +206,7 @@ describe("startExposure tunnel adapters", () => {
const active = await startExposure(exposure("pinggy"), PORT);
activeExposures.push(active);
expect(active.baseUrl).toBe("https://random-one.a.pinggy.link");
expect(recordedArgs(invocation)).toEqual([
expect(await recordedArgs(invocation)).toEqual([
"-p",
"443",
"-o",
Expand Down Expand Up @@ -234,7 +240,7 @@ describe("startExposure tunnel adapters", () => {
);
activeExposures.push(active);
expect(active.baseUrl).toBe("https://stable.example.test");
expect(recordedArgs(invocation)).toContain("fake-pinggy-token@pro.pinggy.io");
expect(await recordedArgs(invocation)).toContain("fake-pinggy-token@pro.pinggy.io");
await waitForRestart(invocation.restartMarker!);
expect(fs.readFileSync(invocation.runsFile, "utf8")).toBe("run\nrun\n");
expect(active.baseUrl).toBe("https://stable.example.test");
Expand All @@ -246,7 +252,7 @@ describe("startExposure tunnel adapters", () => {
const dev = await startExposure(exposure("devtunnel"), PORT);
activeExposures.push(dev);
expect(dev.baseUrl).toBe(`https://blue-${PORT}.use2.devtunnels.ms`);
expect(recordedArgs(devInvocation)).toEqual([
expect(await recordedArgs(devInvocation)).toEqual([
"host",
"-p",
String(PORT),
Expand All @@ -260,7 +266,7 @@ describe("startExposure tunnel adapters", () => {
const zrok = await startExposure(exposure("zrok"), PORT);
activeExposures.push(zrok);
expect(zrok.baseUrl).toBe("https://violet.share.zrok.io");
expect(recordedArgs(zrokInvocation)).toEqual([
expect(await recordedArgs(zrokInvocation)).toEqual([
"share",
"public",
`http://127.0.0.1:${PORT}`,
Expand All @@ -282,7 +288,7 @@ describe("startExposure tunnel adapters", () => {
);
activeExposures.push(active);
expect(active.baseUrl).toBe("http://tunnel.example.test:38912");
expect(recordedArgs(invocation)).toEqual([
expect(await recordedArgs(invocation)).toEqual([
"local",
String(PORT),
"--to",
Expand All @@ -304,7 +310,7 @@ describe("startExposure tunnel adapters", () => {
);
activeExposures.push(token);
expect(token.baseUrl).toBe("https://blobs.example.test");
expect(recordedArgs(tokenInvocation)).toEqual([
expect(await recordedArgs(tokenInvocation)).toEqual([
"tunnel",
"--no-autoupdate",
"run",
Expand All @@ -323,7 +329,7 @@ describe("startExposure tunnel adapters", () => {
);
activeExposures.push(configured);
expect(configured.baseUrl).toBe("https://config.example.test");
expect(recordedArgs(configInvocation)).toEqual([
expect(await recordedArgs(configInvocation)).toEqual([
"tunnel",
"--no-autoupdate",
"--config",
Expand Down Expand Up @@ -368,7 +374,7 @@ describe("startExposure tunnel adapters", () => {
}
expect(failure).toContain("exited with code 19");
expect(failure).not.toContain(secret);
expect(recordedArgs(invocation)).toContain(secret);
expect(await recordedArgs(invocation)).toContain(secret);
});

it("reports absent adapter binaries without invoking the network", async () => {
Expand Down
1 change: 1 addition & 0 deletions packages/natives/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

### Changed

- Lowered the macOS native addons' minimum supported macOS version to 12.0 (previously 15.5)
- Reduced snapshot cost on every hashline read and grep: file-hash tagging no longer builds a normalized copy of the file, and the seen-line prefix regex is compiled once ([#13650](https://github.com/can1357/oh-my-pi/pull/13650) by [@H4vC](https://github.com/H4vC)).

### Fixed
Expand Down
Loading
0