Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.
fix(computer): point CLI identity-conflict guidance to doctor --prune
Dongdong Chen080cbcf95dd2
diff --git a/apps/computer/local-daemon/internal/computercli/cli.go b/apps/computer/local-daemon/internal/computercli/cli.goindex 701bc133..c105d4d7 100644--- a/apps/computer/local-daemon/internal/computercli/cli.go+++ b/apps/computer/local-daemon/internal/computercli/cli.go@@ -743,7 +743,7 @@ func (c *cli) connectionFailure(state string) (string, bool) {case "authentication-failed":return "Rejected by the server. Run " + c.command + " login to authorize again.", truecase "identity-conflict":- return "This computer's identity is already bound to another Computer registration. Run " + c.command + " login to reconnect it.", true+ return "This computer's identity is already bound to another Computer registration. Run " + c.command + " doctor --prune to reset local state.", truecase "upgrade-required":return "The server requires a newer Linger Computer. Rerun the installer.", true}diff --git a/apps/computer/local-daemon/internal/computercli/cli_test.go b/apps/computer/local-daemon/internal/computercli/cli_test.goindex c92f2455..57fd0ff2 100644--- a/apps/computer/local-daemon/internal/computercli/cli_test.go+++ b/apps/computer/local-daemon/internal/computercli/cli_test.go@@ -289,7 +289,7 @@ func TestDaemonStartShowsProcessConnectionAndRuntimes(t *testing.T) {if code := f.run("daemon", "start", "--config", f.configPath); code != 11 {t.Fatalf("exit=%d", code)}- contains(t, f.stdout.String(), "Connection This computer's identity is already bound to another Computer registration. Run linger-computer login to reconnect it.\n")+ contains(t, f.stdout.String(), "Connection This computer's identity is already bound to another Computer registration. Run linger-computer doctor --prune to reset local state.\n")}func TestDefaultConfigLocations(t *testing.T) {@@ -691,7 +691,10 @@ func TestDoctorFailures(t *testing.T) {if code := f.run("doctor", "--json", "--config", f.configPath); code != 11 {t.Fatalf("identity-conflict doctor exit=%d", code)}- contains(t, f.stdout.String(), "already bound to another Computer registration")+ contains(t, f.stdout.String(), "Run linger-computer doctor --prune to reset local state")+ if strings.Contains(f.stdout.String(), "login to reconnect") {+ t.Fatalf("unexpected login reconnect hint: %s", f.stdout.String())+ }}func TestDoctorPrune(t *testing.T) {diff --git a/apps/computer/local-daemon/internal/computercli/doctor.go b/apps/computer/local-daemon/internal/computercli/doctor.goindex 10710623..4134b185 100644--- a/apps/computer/local-daemon/internal/computercli/doctor.go+++ b/apps/computer/local-daemon/internal/computercli/doctor.go@@ -180,7 +180,7 @@ func inspectDaemonHealth(ctx context.Context, client controlClient, commandNamecase "identity-conflict":return doctorCheck{Name: "daemon", Category: categoryCredential, Status: "fail",- Detail: fmt.Sprintf("This computer's Daemon Identity is already bound to another Computer registration. Run %s login to reconnect, or %s doctor --prune to reset local state", commandName, commandName),+ Detail: fmt.Sprintf("This computer's Daemon Identity is already bound to another Computer registration. Run %s doctor --prune to reset local state", commandName),}case "upgrade-required":return doctorCheck{