Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c90b4f3
test: expose cmux hook setup discovery
austinywang Sep 25, 2026
7fd41e9
feat: surface agent hooks setup in cmux
austinywang Sep 25, 2026
1d2f8bc
Merge remote-tracking branch 'origin/main' into issue-4515-cmux-hooks…
austinywang Sep 25, 2026
06492e9
fix: complete hooks setup surface review fixes
austinywang Sep 25, 2026
e5f79f4
fix: address hooks surface review feedback
austinywang Sep 25, 2026
a58d7c4
fix: sanitize hook status output
austinywang Sep 25, 2026
64bd11c
fix: make hooks setup discoverable and actionable
austinywang Sep 26, 2026
be4a4f9
Merge remote-tracking branch 'origin/main' into issue-4515-cmux-hooks…
austinywang Sep 26, 2026
732c14a
fix: complete hooks setup localization and discovery
austinywang Sep 26, 2026
c7170cf
Merge remote-tracking branch 'origin/main' into issue-4515-cmux-hooks…
austinywang Sep 26, 2026
6ce5e54
fix: make hooks setup confirmation explicit
austinywang Sep 26, 2026
9dc2b74
fix: complete hooks setup review repairs
austinywang Sep 26, 2026
52c0d78
Merge remote-tracking branch 'origin/main' into issue-4515-cmux-hooks…
austinywang Sep 26, 2026
94623f4
test: cover fresh hooks setup and nudge paths
austinywang Sep 26, 2026
50d5f4f
fix: configure fresh detected agent hooks
austinywang Sep 26, 2026
729aa93
Merge remote-tracking branch 'origin/main' into issue-4515-cmux-hooks…
austinywang Sep 26, 2026
50d1103
fix: keep hooks guide locale JSON valid
austinywang Sep 26, 2026
3c19498
Merge remote-tracking branch 'origin/main' into issue-4515-cmux-hooks…
austinywang Sep 26, 2026
dc7f95b
test: register agent hooks settings anchor
austinywang Sep 26, 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
8 changes: 6 additions & 2 deletions CLI/CMUXCLI+AmpExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,13 @@ extension CMUXCLI {
.appendingPathComponent(Self.ampExtensionFilename, isDirectory: false)
}

func installAmpExtensionHooks(_ def: AgentHookDef) throws {
func installAmpExtensionHooks(
_ def: AgentHookDef,
skipConfirmation: Bool = false
) throws {
let extensionURL = ampExtensionURL(for: def)
let skipConfirm = ProcessInfo.processInfo.arguments.contains("--yes")
let skipConfirm = skipConfirmation
|| ProcessInfo.processInfo.arguments.contains("--yes")
|| ProcessInfo.processInfo.arguments.contains("-y")
let existing = (try? String(contentsOf: extensionURL, encoding: .utf8)) ?? ""
if existing == Self.ampExtensionSource {
Expand Down
8 changes: 6 additions & 2 deletions CLI/CMUXCLI+CampfireExtensionInstall.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ extension CMUXCLI {
}
}

func installCampfireExtensionHooks(_ _: AgentHookDef) throws {
func installCampfireExtensionHooks(
_ _: AgentHookDef,
skipConfirmation: Bool = false
) throws {
let extensionURL = campfireExtensionURL()
let fileManager = FileManager.default
let skipConfirm = ProcessInfo.processInfo.arguments.contains("--yes")
let skipConfirm = skipConfirmation
|| ProcessInfo.processInfo.arguments.contains("--yes")
|| ProcessInfo.processInfo.arguments.contains("-y")
let existing = try existingCampfireExtensionContents(at: extensionURL, fileManager: fileManager)
if existing == Self.campfireExtensionSource {
Expand Down
8 changes: 6 additions & 2 deletions CLI/CMUXCLI+HermesAgentHooks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,16 @@ extension CMUXCLI {
return events
}

func installHermesAgentHooks(_ def: AgentHookDef) throws {
func installHermesAgentHooks(
_ def: AgentHookDef,
skipConfirmation: Bool = false
) throws {
let fm = FileManager.default
let configDir = def.resolvedConfigDir()
let filePath = "\(configDir)/\(def.configFile)"
let allowlistPath = "\(configDir)/shell-hooks-allowlist.json"
let skipConfirm = ProcessInfo.processInfo.arguments.contains("--yes")
let skipConfirm = skipConfirmation
|| ProcessInfo.processInfo.arguments.contains("--yes")
|| ProcessInfo.processInfo.arguments.contains("-y")

let configDirectoryFileError = String.localizedStringWithFormat(
Expand Down
8 changes: 6 additions & 2 deletions CLI/CMUXCLI+KimiHooks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,18 @@ extension CMUXCLI {
return events
}

func installKimiHooks(_ def: AgentHookDef) throws {
func installKimiHooks(
_ def: AgentHookDef,
skipConfirmation: Bool = false
) throws {
let fm = FileManager.default
let locations = Self.kimiConfigLocations(for: def)
let activeConfigURL = locations.active
let configDir = activeConfigURL.deletingLastPathComponent().path
let filePath = activeConfigURL.path
let events = kimiCodeHookEvents(def: def)
let skipConfirm = ProcessInfo.processInfo.arguments.contains("--yes")
let skipConfirm = skipConfirmation
|| ProcessInfo.processInfo.arguments.contains("--yes")
|| ProcessInfo.processInfo.arguments.contains("-y")

let configDirectoryFileError = String.localizedStringWithFormat(
Expand Down
8 changes: 6 additions & 2 deletions CLI/CMUXCLI+OmpExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,14 @@ export default function cmuxOmpSessionExtension(api: ExtensionAPI) {
}
}

func installOmpExtensionHooks(_ _: AgentHookDef) throws {
func installOmpExtensionHooks(
_ _: AgentHookDef,
skipConfirmation: Bool = false
) throws {
let extensionURL = ompExtensionURL()
let fileManager = FileManager.default
let skipConfirm = ProcessInfo.processInfo.arguments.contains("--yes")
let skipConfirm = skipConfirmation
|| ProcessInfo.processInfo.arguments.contains("--yes")
|| ProcessInfo.processInfo.arguments.contains("-y")
let existing = try existingOmpExtensionContents(at: extensionURL, fileManager: fileManager)
if existing == Self.ompExtensionSource {
Expand Down
8 changes: 6 additions & 2 deletions CLI/CMUXCLI+PiExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,14 @@ extension CMUXCLI {
}
}

func installPiExtensionHooks(_ def: AgentHookDef) throws {
func installPiExtensionHooks(
_ def: AgentHookDef,
skipConfirmation: Bool = false
) throws {
let extensionURL = piExtensionURL(for: def)
let fileManager = FileManager.default
let skipConfirm = ProcessInfo.processInfo.arguments.contains("--yes")
let skipConfirm = skipConfirmation
|| ProcessInfo.processInfo.arguments.contains("--yes")
|| ProcessInfo.processInfo.arguments.contains("-y")
let existing = try existingPiExtensionContents(at: extensionURL, fileManager: fileManager)
if existing == Self.piExtensionSource {
Expand Down
8 changes: 6 additions & 2 deletions CLI/CMUXCLI+RovoDevHooks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ import CMUXAgentLaunch
import Foundation

extension CMUXCLI {
func installRovoDevHooks(_ def: AgentHookDef) throws {
func installRovoDevHooks(
_ def: AgentHookDef,
skipConfirmation: Bool = false
) throws {
let fm = FileManager.default
let configDir = def.resolvedConfigDir()
let filePath = "\(configDir)/\(def.configFile)"
let skipConfirm = ProcessInfo.processInfo.arguments.contains("--yes")
let skipConfirm = skipConfirmation
|| ProcessInfo.processInfo.arguments.contains("--yes")
|| ProcessInfo.processInfo.arguments.contains("-y")

var isDirectory = ObjCBool(false)
Expand Down
2 changes: 1 addition & 1 deletion CLI/CMUXCLI+TaskHelp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ extension CMUXCLI {
omo [opencode-args...]
omx [omx-args...]
omc [omc-args...]
hooks setup|uninstall [--agent <name>]
hooks setup|status|uninstall [--agent <name>]
hooks <agent> <install|uninstall|event> [options; opencode supports --project]
hooks feed --source <agent> [--event <event>]
\(localizedCoderouterAliases())
Expand Down
Loading
Loading