Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

Wire Qwen installer into CLI dispatch, --all list, and repair order

Cursor Agent3e9b3ed3e7ac
diff --git a/cli/beacon/cmd/endpoint_diagnostics.go b/cli/beacon/cmd/endpoint_diagnostics.go
index 9afb1932..b9cde9c5 100644
--- a/cli/beacon/cmd/endpoint_diagnostics.go
+++ b/cli/beacon/cmd/endpoint_diagnostics.go
@@ -869,7 +869,7 @@ func hookTargets() ([]string, error) {
}
func allHookTargetsForLevel() []string {
- all := []string{"cursor", "codex", "vscode", "factory", "opencode", "cline", "pi", "grok", "hermes", "devin-cli", "devin-desktop", "antigravity"}
+ all := []string{"cursor", "codex", "vscode", "factory", "opencode", "cline", "pi", "grok", "qwen", "hermes", "devin-cli", "devin-desktop", "antigravity"}
if endpointOpts.hookLevel != "project" {
return all
}
@@ -926,6 +926,9 @@ func hookStatusesWithConfig(targets []string, cfg endpointconfig.Config) map[str
case "grok":
status := endpointhooks.GrokHookStatus(endpointhooks.GrokOptions{Level: endpointhooks.Level(endpointOpts.hookLevel), LogPath: cfg.LogPath, UserMode: cfg.UserMode})
statuses[name] = hookTargetResult{Target: name, Status: targetStatus(status.Installed), Installed: status.Installed, Message: status.Message, Path: status.HooksPath, Raw: status}
+ case "qwen":
+ status := endpointhooks.QwenHookStatus(endpointhooks.QwenOptions{Level: endpointhooks.Level(endpointOpts.hookLevel), LogPath: cfg.LogPath, UserMode: cfg.UserMode})
+ statuses[name] = hookTargetResult{Target: name, Status: targetStatus(status.Installed), Installed: status.Installed, Message: status.Message, Path: status.SettingsPath, Raw: status}
case "hermes":
status := endpointhooks.HermesHookStatus(endpointhooks.HermesOptions{Level: endpointhooks.Level(endpointOpts.hookLevel), LogPath: cfg.LogPath, UserMode: cfg.UserMode})
statuses[name] = hookTargetResult{Target: name, Status: targetStatus(status.Installed), Installed: status.Installed, Message: status.Message, Path: status.ConfigPath, Raw: status}
diff --git a/cli/beacon/cmd/endpoint_hooks.go b/cli/beacon/cmd/endpoint_hooks.go
index f5bccab5..2e489701 100644
--- a/cli/beacon/cmd/endpoint_hooks.go
+++ b/cli/beacon/cmd/endpoint_hooks.go
@@ -166,6 +166,19 @@ func installEndpointHookTarget(name string, cfg endpointconfig.Config) error {
if strings.Contains(status.Message, "/hooks-trust") {
fmt.Println(status.Message)
}
+ case "qwen":
+ status, err := endpointhooks.InstallQwen(endpointhooks.QwenOptions{
+ Level: endpointhooks.Level(endpointOpts.hookLevel),
+ LogPath: cfg.LogPath,
+ UserMode: cfg.UserMode,
+ })
+ if err != nil {
+ return err
+ }
+ fmt.Printf("Qwen Code hooks installed: %s\n", status.SettingsPath)
+ if strings.Contains(status.Message, "trusted") {
+ fmt.Println(status.Message)
+ }
case "hermes":
status, err := endpointhooks.InstallHermes(endpointhooks.HermesOptions{
Level: endpointhooks.Level(endpointOpts.hookLevel),
@@ -328,6 +341,16 @@ func uninstallEndpointHookTarget(name string, cfg endpointconfig.Config) error {
return err
}
fmt.Println(status.Message)
+ case "qwen":
+ status, err := endpointhooks.UninstallQwen(endpointhooks.QwenOptions{
+ Level: endpointhooks.Level(endpointOpts.hookLevel),
+ LogPath: cfg.LogPath,
+ UserMode: cfg.UserMode,
+ })
+ if err != nil {
+ return err
+ }
+ fmt.Println(status.Message)
case "hermes":
status, err := endpointhooks.UninstallHermes(endpointhooks.HermesOptions{
Level: endpointhooks.Level(endpointOpts.hookLevel),
@@ -434,6 +457,12 @@ func runEndpointHooksStatus(cmd *cobra.Command, args []string) error {
LogPath: cfg.LogPath,
UserMode: cfg.UserMode,
})
+ case "qwen":
+ statuses["qwen"] = endpointhooks.QwenHookStatus(endpointhooks.QwenOptions{
+ Level: endpointhooks.Level(endpointOpts.hookLevel),
+ LogPath: cfg.LogPath,
+ UserMode: cfg.UserMode,
+ })
case "hermes":
statuses["hermes"] = endpointhooks.HermesHookStatus(endpointhooks.HermesOptions{
Level: endpointhooks.Level(endpointOpts.hookLevel),
@@ -498,6 +527,10 @@ func runEndpointHooksStatus(cmd *cobra.Command, args []string) error {
status := statuses["grok"].(endpointhooks.GrokStatus)
fmt.Printf("Grok hooks: installed=%t path=%s\n", status.Installed, status.HooksPath)
fmt.Println(status.Message)
+ case "qwen":
+ status := statuses["qwen"].(endpointhooks.QwenStatus)
+ fmt.Printf("Qwen Code hooks: installed=%t path=%s\n", status.Installed, status.SettingsPath)
+ fmt.Println(status.Message)
case "hermes":
status := statuses["hermes"].(endpointhooks.HermesStatus)
fmt.Printf("Hermes Agent hooks: installed=%t path=%s\n", status.Installed, status.ConfigPath)
diff --git a/cli/beacon/cmd/endpoint_hooks_repair.go b/cli/beacon/cmd/endpoint_hooks_repair.go
index 1f195e99..8fe56d36 100644
--- a/cli/beacon/cmd/endpoint_hooks_repair.go
+++ b/cli/beacon/cmd/endpoint_hooks_repair.go
@@ -148,7 +148,7 @@ func installedHookTargetsForUser(homeDir, logPath string) ([]string, error) {
}
func repairTargetOrder() []string {
- return []string{"claude", "codex", "cursor", "vscode", "factory", "opencode", "cline", "pi", "grok", "hermes", "devin-cli", "devin-desktop", "antigravity"}
+ return []string{"claude", "codex", "cursor", "vscode", "factory", "opencode", "cline", "pi", "grok", "qwen", "hermes", "devin-cli", "devin-desktop", "antigravity"}
}
// withUserHome runs fn as if it were executing inside another user's profile.
diff --git a/cli/beacon/cmd/endpoint_targets.go b/cli/beacon/cmd/endpoint_targets.go
index b32bdfd2..33e7e25e 100644
--- a/cli/beacon/cmd/endpoint_targets.go
+++ b/cli/beacon/cmd/endpoint_targets.go
@@ -51,6 +51,7 @@ var harnessTargets = []harnessTarget{
// flag gets the runtime they are looking at rather than an "unsupported harness" error.
{name: "pi", endpointKind: endpointTargetHook, endpointAliases: []string{"pi", "pi-cli", "pi_cli"}, hookAliases: []string{"pi", "pi-cli", "pi_cli"}},
{name: "grok", endpointKind: endpointTargetHook, endpointAliases: []string{"grok"}, hookAliases: []string{"grok"}},
+ {name: "qwen", endpointKind: endpointTargetHook, endpointAliases: []string{"qwen", "qwen-code", "qwen_code"}, hookAliases: []string{"qwen", "qwen-code", "qwen_code"}},
{name: "hermes", endpointKind: endpointTargetHook, endpointAliases: []string{"hermes", "hermes-agent"}, hookAliases: []string{"hermes", "hermes-agent"}},
{name: "antigravity", endpointKind: endpointTargetHook, endpointAliases: []string{"antigravity", "antigravity-cli"}, hookAliases: []string{"antigravity", "antigravity-cli"}},
{name: "devin-cli", endpointKind: endpointTargetHook, endpointAliases: []string{"devin", "devin-cli"}, hookAliases: []string{"devin", "devin-cli"}},
diff --git a/cli/beacon/cmd/endpoint_targets_characterization_test.go b/cli/beacon/cmd/endpoint_targets_characterization_test.go
index 1a320102..8a8fe1d0 100644
--- a/cli/beacon/cmd/endpoint_targets_characterization_test.go
+++ b/cli/beacon/cmd/endpoint_targets_characterization_test.go
@@ -34,6 +34,9 @@ func TestNormalizeEndpointTargetCharacterization(t *testing.T) {
"opencode": {"opencode", endpointTargetHook, true},
"cline": {"cline", endpointTargetHook, true},
"grok": {"grok", endpointTargetHook, true},
+ "qwen": {"qwen", endpointTargetHook, true},
+ "qwen-code": {"qwen", endpointTargetHook, true},
+ "qwen_code": {"qwen", endpointTargetHook, true},
"hermes": {"hermes", endpointTargetHook, true},
"hermes-agent": {"hermes", endpointTargetHook, true},
"antigravity": {"antigravity", endpointTargetHook, true},
@@ -85,6 +88,9 @@ func TestNormalizeHookTargetCharacterization(t *testing.T) {
"opencode": {"opencode", true},
"cline": {"cline", true},
"grok": {"grok", true},
+ "qwen": {"qwen", true},
+ "qwen-code": {"qwen", true},
+ "qwen_code": {"qwen", true},
"hermes": {"hermes", true},
"hermes-agent": {"hermes", true},
"devin": {"devin-cli", true},