Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
15c82b1
fix(search): use the selected Codex pool account network route (#9129)
luvs01 Nov 27, 2026
580dd0e
fix(integrations): preserve numeric-looking YAML strings (#9158)
AaronZ345 Nov 27, 2026
ad4de2c
docs(cli): point operators to the next inspection (#9155)
oliver-mee Nov 27, 2026
fd8e6ed
chore(deps): update Hono to 4.13.23 and clear MCP transport advisorie…
lidge-jun Nov 27, 2026
a41e7ff
fix(responses): use body prompt_cache_key as session_id when no sessi…
shu-chen-dot-ca Nov 27, 2026
26aa2b0
fix(anthropic): keep the sidecar web_search prefix during routed comp…
muhammetalan Nov 27, 2026
cc139c0
fix(windows): recognize Traditional Chinese Task Scheduler states (#9…
chuenchen309 Nov 27, 2026
8df9b0b
fix(history): order per-key, conversation and profile indexes by time…
shu-chen-dot-ca Nov 27, 2026
21197ab
fix(quota): show non-zero DeepSeek balance wallets across currencies …
xdober Nov 27, 2026
6ed79a9
docs(es): sync adapter and reference updates (#9179)
lidge-jun Nov 27, 2026
865c04f
feat(desktop): add macOS menu bar-only mode (#9124)
clairernovotny Nov 27, 2026
83dfd69
feat(logs): show interrupted WebSocket response delivery (#9136)
luvs01 Nov 27, 2026
1de67a2
fix(responses): mask terminal diagnostics while preserving completion…
luvs01 Nov 27, 2026
c66beeb
fix(images): bound inline inputs on the xAI edit relay (#9116)
luvs01 Nov 27, 2026
f641077
fix(step-cli): require current user text to start a conversation (#9117)
luvs01 Nov 27, 2026
ec003c8
fix(link): complete restart recovery and retry scheduled disconnect h…
luvs01 Nov 27, 2026
ef63ed0
fix(clients): surface Codex Desktop env_key shim-bypass caveat for Hu…
lidge-jun Nov 27, 2026
8385455
fix(desktop): collapse macOS native tray popover on toggle click (#9183)
lidge-jun Nov 27, 2026
da106c7
fix(videos): hold active turn capacity through content delivery (#9156)
luvs01 Nov 27, 2026
eff399c
feat(agy-acp): expand seeded models and allow Claude models (#9192)
lidge-jun Nov 27, 2026
e5662cd
feat(agy-acp): relay Codex host tools and multimodal conversation his…
lidge-jun Nov 27, 2026
76be567
fix(codebuddy): refuse DeepSeek native tool-call markup printed as te…
lidge-jun Nov 27, 2026
400bc82
fix(service): do not bake Claude Desktop's picker egress proxy into t…
lidge-jun Nov 27, 2026
12eeebd
fix(integrations): patch Kimi's config.toml in place instead of rewri…
lidge-jun Nov 27, 2026
45db3ee
fix(codex): keep the main hard-lock refusal when a pool account refus…
lidge-jun Nov 27, 2026
d6dbc1d
fix(transports): opt-in classical TLS groups for hosts that reset on …
lidge-jun Nov 27, 2026
e5ba967
fix(retry-after): preserve leap-second HTTP dates (#9195)
lidge-jun Nov 27, 2026
977c185
fix(combos): check the stored revision on dashboard Combo saves (#9126)
lidge-jun Nov 27, 2026
f170198
fix(connections): bound Claude settings reads during status and previ…
luvs01 Nov 27, 2026
ab9e517
fix(link): show local-update guidance instead of Update for Windows n…
lidge-jun Nov 27, 2026
0eebc45
fix(anthropic): keep the checkpoint prefix during routed compaction (…
lidge-jun Nov 27, 2026
cca6d5f
fix(combo): advance on the undeclared-tool guard refusal without cool…
lidge-jun Nov 27, 2026
bee5c22
fix(service): warn on a foreground start when the managed service is …
lidge-jun Nov 27, 2026
3a52982
fix(clients): stop advertising native models the proxy cannot route (…
lidge-jun Nov 27, 2026
c691c4c
fix(usage): price native Ultrafast requests at the published Ultrafas…
lidge-jun Nov 27, 2026
d886a6d
feat(advisor): add external client MCP integration, stability fixes, …
lidge-jun Nov 28, 2026
5c350d0
Fix injected foreground advisory probes on Windows (#9201)
lidge-jun Nov 28, 2026
4ede11c
fix(responses): replay Codex agent_message and configuration_update h…
FredAmartey Nov 30, 2026
4d2560f
fix(windows): reuse spare bind time for scheduler install checks (#9232)
luvs01 Nov 30, 2026
0eaa7b2
fix(windows): require opt-in for UAC during fresh scheduler installs …
luvs01 Nov 30, 2026
3e3a547
fix(advisor): keep workers running after optional consultation failur…
luvs01 Nov 30, 2026
223088e
fix(agy-acp): bound forwarded host tool arguments (#9213)
luvs01 Nov 30, 2026
435e123
fix(advisor): scope MCP identifiers to consultation budgets (#9212)
luvs01 Nov 30, 2026
b493145
test(ocx-child): report libtest case names when Cargo exits unsuccess…
luvs01 Nov 30, 2026
8838e21
fix(gemini): honor provider routing on native generation (#9066)
luvs01 Nov 30, 2026
c17ddac
Fix historical framing of retained external tasks after compaction (#…
magnusvm34-png Nov 30, 2026
2cc95ca
fix(step-cli): reserve session capacity for other callers (carry #921…
lidge-jun Nov 30, 2026
0b7e335
fix(gemini): preserve retained keyless interactions at capacity (carr…
lidge-jun Nov 30, 2026
1baaf42
fix(retry): recognize Bun's closed-connection sentence as a reset (#9…
lcxhh521 Nov 30, 2026
71556b4
fix(codex): join a rollout first line once (#9222)
lcxhh521 Nov 30, 2026
282f8d5
fix(responses): replay client-owned shell, computer and patch history…
lidge-jun Nov 30, 2026
4ab022b
feat(logs): include provider, model, and account label in upstream fa…
lidge-jun Nov 30, 2026
0dfa864
fix(responses): set _admissionPrincipalId after _nativeReasoningReten…
lidge-jun Nov 30, 2026
f13b1a0
fix(responses): keep search replay inside shell and patch batches (#9…
lidge-jun Nov 30, 2026
fa6bd11
feat(sponsors): refresh RunAPI placement, referral link and runapi.ho…
lidge-jun Nov 30, 2026
34998c1
fix(cli): distinguish inconclusive startup ownership checks (carry #9…
lidge-jun Nov 30, 2026
e95735a
fix(xai): collapse repeated Responses text snapshots (carry #9224) (#…
lidge-jun Nov 30, 2026
ab2c72d
fix(responses): backfill reasoning ahead of bare shell calls (#9245)
lidge-jun Nov 30, 2026
4155cf4
fix(anthropic-pool): recover aggregate 429 cooldowns once the spent w…
lidge-jun Nov 30, 2026
1ceb076
fix(claude-desktop): tolerate __sealed__:v1 API keys in desktop-remot…
lidge-jun Nov 30, 2026
3766687
feat(config): opt in to a retryable replay-refusal status (carry #919…
lidge-jun Nov 30, 2026
7de9149
feat(agy-acp): named accounts, live ACP model discovery, and per-mode…
lidge-jun Nov 30, 2026
fe2b811
feat(quota): support Venice USD/DIEM balances and custom provider ali…
lidge-jun Nov 30, 2026
740109d
fix(responses): reject empty Vertex compaction summaries (#9251)
lidge-jun Nov 30, 2026
aa5f774
Merge stable OpenCodex v2.100.12
bcdonadio Dec 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ See [SPONSORS.md](./SPONSORS.md).
<td>Thanks to <a href="https://tokenlab.sh/r/OPENCODEX">TokenLab</a> for sponsoring this project! TokenLab gives coding agents one API key for leading models, supporting OpenAI Responses and Chat Completions, Anthropic Messages, and Gemini's native API formats, with streaming and tool calling. It also provides an MCP server and agent Skills for easy integration. Choose your delivery mode and pay as you go. Pick <code>TokenLab</code> in the Add provider picker or run <code>ocx provider add tokenlab</code>.<br><sub>TokenLab 为编程智能体提供统一的多模型 API,一枚 API Key 即可接入主流模型,支持 OpenAI Responses、Chat Completions、Anthropic Messages 和 Gemini 原生 API 格式,以及流式输出和工具调用。同时提供 MCP 服务器和 Agent Skills,方便接入现有工作流;交付模式可选,按量付费。</sub></td>
</tr>
<tr>
<td width="180"><a href="https://runapi.co"><img src="assets/sponsors/runapi.png" alt="RunAPI" width="64"></a></td>
<td>Thanks to <a href="https://runapi.co">RunAPI</a> for sponsoring this project! RunAPI is a unified AI API gateway: one API key opens a catalog of 200+ models from OpenAI, Anthropic, Google, xAI, DeepSeek, Alibaba, Moonshot and more, served over the OpenAI Chat Completions and Responses, Anthropic Messages, and Gemini native API formats, with the formats available varying by model. Smart routing sends each request to a fast, stable provider node with automatic failover, and pricing is pay-as-you-go, typically well below standard rates. Pick <code>RunAPI</code> in the Add provider picker or run <code>ocx provider add runapi</code>.</td>
<td width="180"><a href="https://runapi.host/register?aff=5RJC"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/sponsors/runapi-dark.svg"><img src="assets/sponsors/runapi-light.svg" alt="RunAPI" width="150"></picture></a></td>
<td>Thanks to <a href="https://runapi.host/register?aff=5RJC">RunAPI</a> for sponsoring this project! RunAPI is a unified AI API gateway: one API key opens a catalog of 200+ models from OpenAI, Anthropic, Google, xAI, DeepSeek, Alibaba, Moonshot and more. It supports OpenAI Chat Completions and Responses, Anthropic Messages, and Gemini native API formats, depending on the model. Smart routing ensures fast and stable access with automatic failover. Pricing is pay-as-you-go, with prices as low as 10% of official API rates. Pick <code>RunAPI</code> in the Add provider picker or run <code>ocx provider add runapi</code>.</td>
</tr>
</tbody>
</table>
Expand Down
41 changes: 38 additions & 3 deletions app/Sources/NativeTray/Panel.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
import AppKit

public enum NativeTrayHitTest {
public static func isNearButton(buttonFrame: NSRect, point: NSPoint, tolerance: CGFloat = 4) -> Bool {
buttonFrame.insetBy(dx: -tolerance, dy: -tolerance).contains(point)
}

/// Where a mouse event happened, in screen coordinates. Global-monitor events arrive after the
/// fact, so the live pointer (`NSEvent.mouseLocation`) may already have left the icon; the event
/// keeps its own position. A windowless event, which is what a global monitor delivers, already
/// reports `locationInWindow` in screen coordinates.
@MainActor
public static func screenLocation(of event: NSEvent) -> NSPoint {
guard let window = event.window else { return event.locationInWindow }
return window.convertPoint(toScreen: event.locationInWindow)
}
}

/// Adapted from the native companion's PopoverPanel in commit 38a5ab9fc4.
/// A key-capable panel avoids the accessory NSPopover keyboard failure measured
/// there on macOS 27, while leaving application/runtime ownership with Tauri.
@MainActor
final class NativeTrayPanel: NSPanel {
var onDismiss: (() -> Void)?
var buttonPress = NativeTrayButtonPress()
private var outsideMonitor: Any?
private weak var statusButton: NSStatusBarButton?

init() {
super.init(contentRect: NSRect(x: 0, y: 0, width: 420, height: 660),
Expand All @@ -28,6 +46,8 @@ final class NativeTrayPanel: NSPanel {
override var canBecomeMain: Bool { false }

func present(from button: NSStatusBarButton) {
buttonPress.clear()
statusButton = button
guard let buttonWindow = button.window else { return }
let visible = (buttonWindow.screen ?? NSScreen.main)?.visibleFrame
?? NSRect(x: 0, y: 0, width: 1024, height: 768)
Expand All @@ -40,8 +60,19 @@ final class NativeTrayPanel: NSPanel {
y: max(visible.minY + 8, anchor.minY - size.height - 6)))
makeKeyAndOrderFront(nil)
if outsideMonitor == nil {
outsideMonitor = NSEvent.addGlobalMonitorForEvents(matching: [.leftMouseDown, .rightMouseDown]) { [weak self] _ in
self?.dismiss()
outsideMonitor = NSEvent.addGlobalMonitorForEvents(matching: [.leftMouseDown, .rightMouseDown]) { [weak self] event in
guard let self else { return }
if event.type == .leftMouseDown, let button = self.statusButton, let buttonWindow = button.window {
let mouse = NativeTrayHitTest.screenLocation(of: event)
let buttonFrame = buttonWindow.convertToScreen(button.convert(button.bounds, to: nil))
if NativeTrayHitTest.isNearButton(buttonFrame: buttonFrame, point: mouse) {
self.buttonPress.record()
return
}
}
// An outside or right click is not the status button's toggle.
self.buttonPress.clear()
self.dismiss()
}
}
}
Expand All @@ -50,11 +81,15 @@ final class NativeTrayPanel: NSPanel {
guard isVisible else { return }
if let outsideMonitor { NSEvent.removeMonitor(outsideMonitor) }
outsideMonitor = nil
statusButton = nil
orderOut(nil)
onDismiss?()
}

override func cancelOperation(_ sender: Any?) { dismiss() }
override func cancelOperation(_ sender: Any?) {
buttonPress.clear()
dismiss()
}
override func resignKey() {
super.resignKey()
dismiss()
Expand Down
67 changes: 66 additions & 1 deletion app/Sources/NativeTray/Popover.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,61 @@
import AppKit
import SwiftUI

public enum NativeTrayToggleAction: Equatable {
case dismiss
case ignoreRecentDismissal
case present
}

public enum NativeTrayTogglePolicy {
public static let dismissGrace: TimeInterval = 0.35

public static func evaluate(
toggle: Bool,
isVisible: Bool,
unconsumedButtonMouseDown: Bool,
lastDismissedAt: Date?,
now: Date = Date()
) -> NativeTrayToggleAction {
if toggle && isVisible {
return .dismiss
}
if toggle && unconsumedButtonMouseDown, let lastDismissed = lastDismissedAt,
now.timeIntervalSince(lastDismissed) < dismissGrace {
return .ignoreRecentDismissal
}
return .present
}
}

/// A left press on the panel's own status button while the panel is open.
///
/// The panel's global outside-click monitor sees that press before Tauri delivers the matching
/// mouse-up toggle, so the press is recorded instead of dismissing; the toggle that follows then
/// closes the panel once instead of reopening it. Any other dismissal forgets the press, so a
/// stale press can never swallow a later, unrelated click on the icon.
public struct NativeTrayButtonPress: Equatable {
public private(set) var pressedAt: Date?

public init() {}

public mutating func record(at now: Date = Date()) { pressedAt = now }

public mutating func clear() { pressedAt = nil }

/// Decides one toggle and consumes the recorded press.
public mutating func toggle(isVisible: Bool, now: Date = Date()) -> NativeTrayToggleAction {
defer { pressedAt = nil }
return NativeTrayTogglePolicy.evaluate(
toggle: true,
isVisible: isVisible,
unconsumedButtonMouseDown: pressedAt != nil,
lastDismissedAt: pressedAt,
now: now
)
}
}

// All ABI calls run on Tauri's AppKit main thread. Swift copies the borrowed JSON
// synchronously and never retains a Rust buffer or owns an application/run loop.
@MainActor
Expand Down Expand Up @@ -31,7 +86,17 @@ private final class NativeTrayPopover: NSObject {

func show(_ pointer: UnsafeMutableRawPointer, toggle: Bool, callback: @escaping @convention(c) (Int32) -> Void) {
self.callback = callback
if toggle && panel.isVisible { panel.dismiss(); return }
if toggle {
switch panel.buttonPress.toggle(isVisible: panel.isVisible) {
case .dismiss:
panel.dismiss()
return
case .ignoreRecentDismissal:
return
case .present:
break
}
}
let item = Unmanaged<NSStatusItem>.fromOpaque(pointer).takeUnretainedValue()
guard let button = item.button, button.window != nil else { return }
if panel.isVisible { return }
Expand Down
82 changes: 82 additions & 0 deletions app/Sources/NativeTrayTests/main.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import AppKit
import Foundation
import NativeTray

Expand Down Expand Up @@ -142,4 +143,85 @@ let unrelatedError = try decode(["errors": ["Usage unavailable"], "providers": [
check(!NativeTraySwitch.settles(snapshot: unrelatedError, pendingRow: "pool-b:0"), "An unrelated error does not settle")
let failedSwitch = try decode(["errors": ["The runtime refused that account right now."], "switchFailed": true, "refreshing": false, "providers": []])
check(NativeTraySwitch.settles(snapshot: failedSwitch, pendingRow: "pool-b:0"), "The host's failure marker settles at once")

// Toggle policy and hit testing: ensure status bar icon toggle collapses rather than loops reopen
let testNow = Date()
check(
NativeTrayTogglePolicy.evaluate(toggle: false, isVisible: true, unconsumedButtonMouseDown: false, lastDismissedAt: nil, now: testNow) == .present,
"Show action without toggle always presents even when visible"
)
check(
NativeTrayTogglePolicy.evaluate(toggle: true, isVisible: true, unconsumedButtonMouseDown: false, lastDismissedAt: nil, now: testNow) == .dismiss,
"Toggle when panel is visible dismisses the panel"
)
check(
NativeTrayTogglePolicy.evaluate(
toggle: true,
isVisible: false,
unconsumedButtonMouseDown: true,
lastDismissedAt: testNow.addingTimeInterval(-0.1),
now: testNow
) == .ignoreRecentDismissal,
"Toggle right after status-button mouse-down dismissal stays dismissed"
)
check(
NativeTrayTogglePolicy.evaluate(
toggle: true,
isVisible: false,
unconsumedButtonMouseDown: true,
lastDismissedAt: testNow.addingTimeInterval(-0.5),
now: testNow
) == .present,
"Toggle after grace period presents the panel"
)
check(
NativeTrayTogglePolicy.evaluate(
toggle: true,
isVisible: false,
unconsumedButtonMouseDown: false,
lastDismissedAt: testNow.addingTimeInterval(-0.1),
now: testNow
) == .present,
"Toggle after dismissal without button mouse-down presents the panel"
)

let buttonRect = NSRect(x: 100, y: 100, width: 30, height: 22)
check(NativeTrayHitTest.isNearButton(buttonFrame: buttonRect, point: NSPoint(x: 110, y: 110)), "Inside button frame hits")
check(NativeTrayHitTest.isNearButton(buttonFrame: buttonRect, point: NSPoint(x: 98, y: 100)), "Within button margin hits")
check(!NativeTrayHitTest.isNearButton(buttonFrame: buttonRect, point: NSPoint(x: 50, y: 50)), "Outside button frame misses")

// A global monitor's press keeps the position it happened at, wherever the pointer is now.
let pressPoint = NSPoint(x: NSEvent.mouseLocation.x + 400, y: NSEvent.mouseLocation.y + 300)
let windowlessPress = NSEvent.mouseEvent(
with: .leftMouseDown, location: pressPoint, modifierFlags: [], timestamp: 0,
windowNumber: 0, context: nil, eventNumber: 0, clickCount: 1, pressure: 1)!
check(MainActor.assumeIsolated { NativeTrayHitTest.screenLocation(of: windowlessPress) } == pressPoint,
"A windowless press is hit-tested where it happened, not at the live pointer")

// Button-press sequences, in the order AppKit and Tauri deliver them.
var press = NativeTrayButtonPress()
press.record(at: testNow)
check(press.toggle(isVisible: true, now: testNow.addingTimeInterval(0.05)) == .dismiss,
"A press on the icon followed by its toggle closes the open panel")
check(press.toggle(isVisible: false, now: testNow.addingTimeInterval(0.1)) == .present,
"That toggle consumed the press, so the next click on the icon opens the panel")

press = NativeTrayButtonPress()
press.record(at: testNow)
press.clear()
check(press.toggle(isVisible: false, now: testNow.addingTimeInterval(0.1)) == .present,
"An outside or right click dismissal forgets an earlier press, so a quick click reopens")

press = NativeTrayButtonPress()
press.record(at: testNow)
check(press.toggle(isVisible: false, now: testNow.addingTimeInterval(0.1)) == .ignoreRecentDismissal,
"A panel hidden between the icon's press and its toggle stays closed")
check(press.toggle(isVisible: false, now: testNow.addingTimeInterval(0.15)) == .present,
"Only one toggle is absorbed per press")

press = NativeTrayButtonPress()
press.record(at: testNow)
check(press.toggle(isVisible: false, now: testNow.addingTimeInterval(1)) == .present,
"An expired press does not suppress a later click")

print("PASS: \(assertions) native tray contract/formatting assertions")
1 change: 1 addition & 0 deletions assets/sponsors/runapi-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/sponsors/runapi-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/sponsors/runapi.png
Binary file not shown.
12 changes: 6 additions & 6 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading