Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e8fb8fa
Add bundled OpenCode status wrapper
austinywang May 26, 2026
971a35a
Merge remote-tracking branch 'origin/main' into issue-1425-add-built-…
austinywang May 26, 2026
80e584f
Fix OpenCode prompt status notifications
austinywang May 26, 2026
0087bf8
Handle OpenCode status edge cases
austinywang May 26, 2026
d55134d
Harden OpenCode event notifications
austinywang May 26, 2026
25a221b
Track OpenCode idle transitions by state
austinywang May 26, 2026
55126ff
Localize OpenCode runtime status hooks
austinywang May 26, 2026
9559053
Fix OpenCode runtime hook session state
austinywang May 26, 2026
667bb4b
merge: resolve conflicts with main
austinywang Jun 6, 2026
0aa984f
fix: normalize project file after merge
austinywang Jun 6, 2026
f9c892d
fix: stabilize opencode runtime lifecycle hooks
austinywang Jun 6, 2026
a76c681
fix: bound opencode lifecycle state
austinywang Jun 6, 2026
753054e
fix: protect opencode prompt lifecycle
austinywang Jun 6, 2026
b93f159
fix: handle opencode run lifecycle
austinywang Jun 6, 2026
2e9d693
fix: resolve opencode prompt status
austinywang Jun 6, 2026
1a8f60b
fix: harden opencode lifecycle followups
austinywang Jun 6, 2026
61b6526
fix: respect opencode primary status fields
austinywang Jun 6, 2026
a8a2411
fix: protect opencode blocking lifecycle states
austinywang Jun 6, 2026
57bf740
fix: keep opencode lifecycle cache bounded
austinywang Jun 6, 2026
ac9a1a5
fix: preserve blocking opencode session updates
austinywang Jun 6, 2026
ac28cf1
Merge remote-tracking branch 'origin/main' into issue-1425-add-built-…
austinywang Jun 14, 2026
4968947
fix: regenerate Swift length budget
austinywang Jun 14, 2026
dda1d7d
Merge remote-tracking branch 'origin/main' into issue-1425-add-built-…
austinywang Jun 14, 2026
048ca9c
fix: address opencode PR review findings
austinywang Jun 14, 2026
1585506
fix: avoid checked-in opencode provider path
austinywang Jun 14, 2026
5e95211
fix: preserve opencode prompt lifecycle on updates
austinywang Jun 14, 2026
0965bdb
fix: keep opencode runtime status on shared guard paths
austinywang Jun 14, 2026
bce0a18
merge: sync with origin/main
austinywang Jun 14, 2026
c03082b
merge: resolve conflicts with main
austinywang Jun 18, 2026
e6fadb4
fix: address opencode hook review feedback
austinywang Jun 18, 2026
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
12 changes: 6 additions & 6 deletions .github/swift-file-length-budget.tsv
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# cmux-owned Swift file length budget.
# Format: max_lines<TAB>relative path
# Reduce counts as files shrink. CI fails if tracked files exceed this budget.
34475 CLI/cmux.swift
17604 Sources/AppDelegate.swift
35033 CLI/cmux.swift
17602 Sources/AppDelegate.swift
15933 Sources/ContentView.swift
14104 Sources/TerminalController.swift
12658 Sources/Workspace.swift
14179 Sources/TerminalController.swift
12659 Sources/Workspace.swift
12115 cmuxTests/AppDelegateShortcutRoutingTests.swift
11833 Sources/GhosttyTerminalView.swift
11413 Sources/Panels/BrowserPanel.swift
Expand Down Expand Up @@ -79,8 +79,8 @@
1197 cmuxTests/CodexAppServerSessionTests.swift
1161 cmuxTests/SidebarOrderingTests.swift
1144 cmuxTests/PiVaultAgentPersistenceTests.swift
1134 cmuxTests/AgentHibernationTests.swift
1126 cmuxTests/FileExplorerStoreTests.swift
1120 cmuxTests/AgentHibernationTests.swift
1107 Sources/AppDelegate+CmuxSSHURL.swift
1093 cmuxUITests/BonsplitTabDragUITests.swift
1087 Packages/macOS/CmuxCommandPalette/Sources/CmuxCommandPalette/Search/CommandPaletteFuzzyMatcher.swift
Expand Down Expand Up @@ -130,7 +130,7 @@
716 Sources/TaskManagerSnapshot.swift
715 Sources/AppleScriptSupport.swift
710 Sources/TerminalSSHSessionDetector.swift
707 CLI/CMUXCLI+AgentHookDefinitions.swift
709 CLI/CMUXCLI+AgentHookDefinitions.swift
706 CLI/CMUXCLI+Config.swift
699 cmuxTests/TerminalNotificationClearAllTests.swift
696 cmuxTests/UpdatePillReleaseVisibilityTests.swift
Expand Down
4 changes: 3 additions & 1 deletion CLI/CMUXCLI+AgentHookDefinitions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ extension CMUXCLI {
}

enum AgentHookAction {
case sessionStart, promptSubmit, stop, notification, approvalResponse, sessionEnd, sessionFinalize, noop
case sessionStart, promptSubmit, stop, notification, approvalResponse, sessionEnd, sessionFinalize, runtimeStatus, runtimeNotification, noop
}

static let subcommandActions: [String: AgentHookAction] = [
Expand All @@ -143,6 +143,8 @@ extension CMUXCLI {
"stop": .stop,
"notification": .notification,
"notify": .notification,
"runtime-status": .runtimeStatus,
"runtime-notification": .runtimeNotification,
"agent-response": .stop,
"approval-response": .approvalResponse,
"shell-exec": .promptSubmit,
Expand Down
15 changes: 15 additions & 0 deletions CLI/CMUXCLI+ExecutableResolution.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ extension CMUXCLI {
return prefix.contains("cmux claude wrapper - injects hooks and session tracking")
}

func isCmuxOpenCodeWrapper(at path: String) -> Bool {
guard let data = FileManager.default.contents(atPath: path) else { return false }
let prefixData = data.prefix(512)
guard let prefix = String(data: prefixData, encoding: .utf8) else { return false }
return prefix.contains("cmux opencode wrapper - installs cmux plugins")
}

func isCmuxClaudeCommandShim(at path: String) -> Bool {
let candidate = URL(fileURLWithPath: path, isDirectory: false)
.standardizedFileURL
Expand Down Expand Up @@ -112,6 +119,14 @@ extension CMUXCLI {
resolveExecutableInSearchPath("codex", searchPath: searchPath)
}

func resolveOpenCodeExecutable(searchPath: String?) -> String? {
resolveExecutableInSearchPath(
"opencode",
searchPath: searchPath,
skip: { self.isCmuxOpenCodeWrapper(at: $0) }
)
}

func providerExecutableSearchPath(searchPath: String?, includingExecutableAt executablePath: String? = nil) -> String {
var directories = providerExecutableSearchDirectories(searchPath: searchPath)
if let executablePath {
Expand Down
Loading
Loading