@lore-co/cli 0.1.28 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -9
- package/dist/agents.d.ts +3 -1
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +31 -7
- package/dist/agents.js.map +1 -1
- package/dist/cli.d.ts +8 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +97 -15
- package/dist/cli.js.map +1 -1
- package/dist/command-help.d.ts +2 -1
- package/dist/command-help.d.ts.map +1 -1
- package/dist/command-help.js +33 -6
- package/dist/command-help.js.map +1 -1
- package/dist/generated-assets.d.ts +9 -4
- package/dist/generated-assets.d.ts.map +1 -1
- package/dist/generated-assets.js +5 -4
- package/dist/generated-assets.js.map +1 -1
- package/dist/recovery-cloud-workspace.d.ts +11 -0
- package/dist/recovery-cloud-workspace.d.ts.map +1 -0
- package/dist/recovery-cloud-workspace.js +113 -0
- package/dist/recovery-cloud-workspace.js.map +1 -0
- package/dist/recovery-cloud.d.ts +31 -0
- package/dist/recovery-cloud.d.ts.map +1 -0
- package/dist/recovery-cloud.js +242 -0
- package/dist/recovery-cloud.js.map +1 -0
- package/dist/recovery-codex.d.ts +5 -0
- package/dist/recovery-codex.d.ts.map +1 -0
- package/dist/recovery-codex.js +111 -0
- package/dist/recovery-codex.js.map +1 -0
- package/dist/recovery-copilot.d.ts +14 -0
- package/dist/recovery-copilot.d.ts.map +1 -0
- package/dist/recovery-copilot.js +120 -0
- package/dist/recovery-copilot.js.map +1 -0
- package/dist/recovery-desktop.d.ts +7 -0
- package/dist/recovery-desktop.d.ts.map +1 -0
- package/dist/recovery-desktop.js +179 -0
- package/dist/recovery-desktop.js.map +1 -0
- package/dist/recovery-external.d.ts +61 -0
- package/dist/recovery-external.d.ts.map +1 -0
- package/dist/recovery-external.js +98 -0
- package/dist/recovery-external.js.map +1 -0
- package/dist/recovery-hooks.d.ts +5 -0
- package/dist/recovery-hooks.d.ts.map +1 -0
- package/dist/recovery-hooks.js +115 -0
- package/dist/recovery-hooks.js.map +1 -0
- package/dist/recovery-hosts.d.ts +13 -0
- package/dist/recovery-hosts.d.ts.map +1 -0
- package/dist/recovery-hosts.js +263 -0
- package/dist/recovery-hosts.js.map +1 -0
- package/dist/recovery-polytoken.d.ts +14 -0
- package/dist/recovery-polytoken.d.ts.map +1 -0
- package/dist/recovery-polytoken.js +194 -0
- package/dist/recovery-polytoken.js.map +1 -0
- package/dist/recovery-remote.d.ts +8 -0
- package/dist/recovery-remote.d.ts.map +1 -0
- package/dist/recovery-remote.js +135 -0
- package/dist/recovery-remote.js.map +1 -0
- package/dist/recovery-state.d.ts +25 -1
- package/dist/recovery-state.d.ts.map +1 -1
- package/dist/recovery-state.js +69 -15
- package/dist/recovery-state.js.map +1 -1
- package/dist/recovery-t3.d.ts +17 -0
- package/dist/recovery-t3.d.ts.map +1 -0
- package/dist/recovery-t3.js +58 -0
- package/dist/recovery-t3.js.map +1 -0
- package/dist/recovery-transfer.d.ts +22 -0
- package/dist/recovery-transfer.d.ts.map +1 -0
- package/dist/recovery-transfer.js +228 -0
- package/dist/recovery-transfer.js.map +1 -0
- package/dist/recovery.d.ts +9 -1
- package/dist/recovery.d.ts.map +1 -1
- package/dist/recovery.js +187 -47
- package/dist/recovery.js.map +1 -1
- package/dist/self-host.d.ts +1 -1
- package/dist/self-host.js +2 -2
- package/dist/uninstall.d.ts +19 -0
- package/dist/uninstall.d.ts.map +1 -0
- package/dist/uninstall.js +128 -0
- package/dist/uninstall.js.map +1 -0
- package/dist/update.js +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -59,6 +59,10 @@ installing lifecycle hooks.
|
|
|
59
59
|
Configuration is stored in `~/.lore/config.json` with mode `0600`.
|
|
60
60
|
`--login` opens a 10-minute dashboard approval and mints an attributed,
|
|
61
61
|
revocable 90-day credential without exposing it in terminal or agent output.
|
|
62
|
+
If the final login response is interrupted, the CLI retries within that window
|
|
63
|
+
and receives the same credential. After saving it locally, the CLI confirms
|
|
64
|
+
receipt so the approval can no longer be used. This requires an updated server;
|
|
65
|
+
older servers may require another approval after a lost response.
|
|
62
66
|
Use `--no-open` to print the approval URL without launching a browser.
|
|
63
67
|
Before writing the local config or any agent integration, `connect` calls the
|
|
64
68
|
authenticated workspace identity endpoint and validates the strict response
|
|
@@ -103,12 +107,21 @@ For a review-first OpenCode rollout, follow the
|
|
|
103
107
|
|
|
104
108
|
## Query shared context
|
|
105
109
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
`lore connect` enables recovery when two supported clients are installed. Use
|
|
111
|
+
`--fallback <agent>` to choose a destination or `--no-recovery` to opt out.
|
|
112
|
+
Independent routes use `lore recovery enable --from opencode --to devin`.
|
|
113
|
+
Claude, Codex, OpenCode, Devin CLI, Cursor Agent, Copilot CLI and Polytoken can
|
|
114
|
+
receive work locally or on a configured SSH worker. All support checkpointed
|
|
115
|
+
process-exit recovery and Ctrl+]; native failure coverage varies by host.
|
|
116
|
+
Setup adds reversible shell wrappers and checkpoint integrations. Open a fresh
|
|
117
|
+
terminal and approve Codex's new hooks in `/hooks` when prompted.
|
|
118
|
+
Explicit T3, Copilot VS Code, and Cowork connections also install their host
|
|
119
|
+
adapters. T3 observes local session failures. Copilot CLI observes terminal
|
|
120
|
+
session errors after retries. Copilot's editor integration reads active responses
|
|
121
|
+
before autosave when request IDs identify the session; new unsaved and background
|
|
122
|
+
chats retain the saved-session delay.
|
|
123
|
+
Cowork captures shared-folder checkpoints, with native cap delivery still
|
|
124
|
+
unverified. Polytoken observes its authenticated daemon's prompt-bound failures.
|
|
112
125
|
See the [recovery guide](../../docs/recovery.md) for exact coverage and evidence.
|
|
113
126
|
|
|
114
127
|
```sh
|
|
@@ -179,7 +192,7 @@ content-free `guard_check` audit event.
|
|
|
179
192
|
|
|
180
193
|
```sh
|
|
181
194
|
lore update
|
|
182
|
-
lore update --version v0.1.
|
|
195
|
+
lore update --version v0.1.29
|
|
183
196
|
```
|
|
184
197
|
|
|
185
198
|
`update` resolves the latest release to an exact tag, or uses the exact
|
|
@@ -202,9 +215,10 @@ rerunning `connect` does not duplicate entries or backups.
|
|
|
202
215
|
lore status
|
|
203
216
|
lore doctor
|
|
204
217
|
lore disconnect
|
|
218
|
+
lore uninstall
|
|
205
219
|
```
|
|
206
220
|
|
|
207
|
-
|
|
221
|
+
`status`, `doctor`, and `disconnect` also support `--json`. `doctor` checks public
|
|
208
222
|
`/health/ready` separately from authenticated workspace identity so unreachable,
|
|
209
223
|
unready, and unauthorized states remain distinct.
|
|
210
224
|
|
|
@@ -256,6 +270,18 @@ retained so acknowledged local work and visible dead letters are never silently
|
|
|
256
270
|
discarded. It does not remove the installed `lore` binary or restore a whole
|
|
257
271
|
backup over newer agent settings.
|
|
258
272
|
|
|
273
|
+
`lore uninstall` disconnects the machine and removes the CLI. It shows the
|
|
274
|
+
installation it will remove and asks for confirmation. Standalone installations
|
|
275
|
+
remove the running Lore binary; global npm installations use npm to remove the
|
|
276
|
+
package from its original prefix. Other installation types receive instructions
|
|
277
|
+
without changing anything. For scripts, use `lore uninstall --yes --json`.
|
|
278
|
+
|
|
279
|
+
Shared learnings, server data, local recordings, pending durable captures, and
|
|
280
|
+
backups are retained. Uninstall does not stop a self-hosted server or change
|
|
281
|
+
other machines. Restart your agents and open a new terminal afterward so any
|
|
282
|
+
loaded Lore integrations are cleared. Use `lore disconnect` when you want to
|
|
283
|
+
keep the CLI installed.
|
|
284
|
+
|
|
259
285
|
During a live retrieval outage, connected native hooks and OpenCode can use one
|
|
260
286
|
relevant, reverified workspace context snapshot when the current repository is
|
|
261
287
|
known. Repository and path scopes are reapplied before injection. Cached
|
|
@@ -497,7 +523,7 @@ same-repository, non-draft pull requests bearing the corresponding
|
|
|
497
523
|
`lore:codex-review` or `lore:devin-review` label.
|
|
498
524
|
|
|
499
525
|
Generated jobs require a published standalone binary release and default to
|
|
500
|
-
`treadiehq/lore-releases` at `v0.1.
|
|
526
|
+
`treadiehq/lore-releases` at `v0.1.29`. Set `LORE_CLI_REPOSITORY` to the publicly
|
|
501
527
|
readable `owner/repository` and `LORE_CLI_VERSION` to an existing release tag
|
|
502
528
|
when using another release source.
|
|
503
529
|
|
|
@@ -547,3 +573,12 @@ publish content or grant access; recipients must sign in to the same workspace.
|
|
|
547
573
|
Hosted connections use `https://uselore.co`. For self-hosting, connect with
|
|
548
574
|
`--dashboard-url https://lore.example.com`, set `LORE_DASHBOARD_URL` for MCP,
|
|
549
575
|
or pass `dashboardUrl` to the SDK. The URL must be an HTTP(S) origin.
|
|
576
|
+
|
|
577
|
+
Managed Devin and Cursor jobs can produce offers in the hosted **Recovery**
|
|
578
|
+
page, currently restricted to platform admins for testing. Customer workspaces
|
|
579
|
+
do not see the page or recovery notices. CLI runners need a token attributed to
|
|
580
|
+
an active platform admin. Pair a desktop checkout with `lore recovery cloud runner --name my-machine`
|
|
581
|
+
to launch an installed agent after dashboard acceptance. Provider setup, SSH
|
|
582
|
+
workers, managed destinations, paired workspace exports with verified restoration,
|
|
583
|
+
and the pushed-checkpoint fallback when no exporter is available
|
|
584
|
+
are documented in [recovery](../../docs/recovery.md#managed-cloud-recovery).
|
package/dist/agents.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Local terminal clients. Cloud and desktop surfaces need different transports. */
|
|
2
2
|
export declare const LAUNCHABLE_AGENTS: readonly ["claude", "codex", "opencode", "devin", "cursor", "copilot-cli", "polytoken"];
|
|
3
3
|
export type LaunchableAgent = (typeof LAUNCHABLE_AGENTS)[number];
|
|
4
|
-
export declare const RECOVERY_SOURCES: readonly ["claude", "codex", "opencode", "devin"];
|
|
4
|
+
export declare const RECOVERY_SOURCES: readonly ["claude", "codex", "opencode", "devin", "cursor", "copilot-cli", "polytoken"];
|
|
5
5
|
export type RecoverySource = (typeof RECOVERY_SOURCES)[number];
|
|
6
6
|
export declare const AGENTS: Record<LaunchableAgent, {
|
|
7
7
|
label: string;
|
|
@@ -12,5 +12,7 @@ export declare const isLaunchable: (value: string) => value is LaunchableAgent;
|
|
|
12
12
|
export declare const isRecoverySource: (value: string) => value is RecoverySource;
|
|
13
13
|
export declare function launchArguments(agent: LaunchableAgent, brief: string): string[];
|
|
14
14
|
export declare function findAgentExecutable(agent: LaunchableAgent, env?: NodeJS.ProcessEnv): Promise<string>;
|
|
15
|
+
/** Wrap only installed aliases of this executable; `agent` can belong to another product. */
|
|
16
|
+
export declare function agentShellCommands(agent: LaunchableAgent, env?: NodeJS.ProcessEnv): Promise<string[]>;
|
|
15
17
|
export declare function isInteractiveAgent(agent: RecoverySource, args: readonly string[], stdinIsTty: boolean, stdoutIsTty: boolean): boolean;
|
|
16
18
|
//# sourceMappingURL=agents.d.ts.map
|
package/dist/agents.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAIA,oFAAoF;AACpF,eAAO,MAAM,iBAAiB,yFAA0F,CAAC;AACzH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AACjE,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAIA,oFAAoF;AACpF,eAAO,MAAM,iBAAiB,yFAA0F,CAAC;AACzH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AACjE,eAAO,MAAM,gBAAgB,yFAAoB,CAAC;AAClD,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/D,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,eAAe,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAQpH,CAAC;AACF,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,KAAK,IAAI,eAA2E,CAAC;AAClI,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,KAAG,KAAK,IAAI,cAAyE,CAAC;AAEpI,wBAAgB,eAAe,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAM/E;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,oBAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CASpG;AAED,6FAA6F;AAC7F,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,oBAAc,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAarG;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,GAAG,OAAO,CAmCrI"}
|
package/dist/agents.js
CHANGED
|
@@ -3,15 +3,15 @@ import { access, realpath, stat } from "node:fs/promises";
|
|
|
3
3
|
import { delimiter, resolve } from "node:path";
|
|
4
4
|
/** Local terminal clients. Cloud and desktop surfaces need different transports. */
|
|
5
5
|
export const LAUNCHABLE_AGENTS = ["claude", "codex", "opencode", "devin", "cursor", "copilot-cli", "polytoken"];
|
|
6
|
-
export const RECOVERY_SOURCES =
|
|
6
|
+
export const RECOVERY_SOURCES = LAUNCHABLE_AGENTS;
|
|
7
7
|
export const AGENTS = {
|
|
8
8
|
claude: { label: "Claude", commands: ["claude"], automatic: "StopFailure: rate_limit" },
|
|
9
|
-
codex: { label: "Codex", commands: ["codex"], automatic:
|
|
9
|
+
codex: { label: "Codex", commands: ["codex"], automatic: "Structured failed turn; unsuccessful process exit" },
|
|
10
10
|
opencode: { label: "OpenCode", commands: ["opencode"], automatic: "APIError: HTTP 429, or 3 provider retries" },
|
|
11
|
-
devin: { label: "Devin CLI", commands: ["devin"], automatic:
|
|
12
|
-
cursor: { label: "Cursor Agent", commands: ["cursor-agent", "agent"], automatic:
|
|
13
|
-
"copilot-cli": { label: "Copilot CLI", commands: ["copilot"], automatic:
|
|
14
|
-
polytoken: { label: "Polytoken", commands: ["polytoken"], automatic:
|
|
11
|
+
devin: { label: "Devin CLI", commands: ["devin"], automatic: "Unsuccessful process exit during a checkpointed turn" },
|
|
12
|
+
cursor: { label: "Cursor Agent", commands: ["cursor-agent", "agent"], automatic: "stop: status=error; unsuccessful process exit" },
|
|
13
|
+
"copilot-cli": { label: "Copilot CLI", commands: ["copilot"], automatic: "Prompt-bound terminal session.error after retries; unrecoverable model/system hook; unsuccessful process exit" },
|
|
14
|
+
polytoken: { label: "Polytoken", commands: ["polytoken"], automatic: "Prompt-bound model_error from the authenticated local daemon; failed process exit" },
|
|
15
15
|
};
|
|
16
16
|
export const isLaunchable = (value) => LAUNCHABLE_AGENTS.includes(value);
|
|
17
17
|
export const isRecoverySource = (value) => RECOVERY_SOURCES.includes(value);
|
|
@@ -42,6 +42,24 @@ export async function findAgentExecutable(agent, env = process.env) {
|
|
|
42
42
|
}
|
|
43
43
|
throw new Error(`${AGENTS[agent].label} is not installed or is not on PATH (expected ${AGENTS[agent].commands.join(" or ")}).`);
|
|
44
44
|
}
|
|
45
|
+
/** Wrap only installed aliases of this executable; `agent` can belong to another product. */
|
|
46
|
+
export async function agentShellCommands(agent, env = process.env) {
|
|
47
|
+
const executable = await findAgentExecutable(agent, env);
|
|
48
|
+
const names = [];
|
|
49
|
+
for (const name of AGENTS[agent].commands) {
|
|
50
|
+
for (const directory of (env.PATH ?? "").split(delimiter).filter(Boolean)) {
|
|
51
|
+
try {
|
|
52
|
+
const path = resolve(directory, name);
|
|
53
|
+
await access(path, constants.X_OK);
|
|
54
|
+
if (await realpath(path) === executable)
|
|
55
|
+
names.push(name);
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
catch { /* Next PATH entry. */ }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return names;
|
|
62
|
+
}
|
|
45
63
|
export function isInteractiveAgent(agent, args, stdinIsTty, stdoutIsTty) {
|
|
46
64
|
if (!stdinIsTty || !stdoutIsTty)
|
|
47
65
|
return false;
|
|
@@ -51,15 +69,21 @@ export function isInteractiveAgent(agent, args, stdinIsTty, stdoutIsTty) {
|
|
|
51
69
|
codex: ["--cd", "-C", "--remote", "--remote-session"],
|
|
52
70
|
devin: ["--config"],
|
|
53
71
|
opencode: [],
|
|
72
|
+
cursor: ["--workspace", "--worktree", "-w", "--background", "--cloud"],
|
|
73
|
+
"copilot-cli": ["--cloud", "--autopilot"],
|
|
74
|
+
polytoken: [],
|
|
54
75
|
};
|
|
55
76
|
const beforeDelimiter = args.slice(0, args.indexOf("--") < 0 ? args.length : args.indexOf("--"));
|
|
56
77
|
if (beforeDelimiter.some((arg) => [...common, ...bypass[agent]].includes(arg.split("=")[0] ?? arg)))
|
|
57
78
|
return false;
|
|
58
79
|
const commands = {
|
|
59
80
|
claude: ["auth", "mcp", "plugin", "plugins", "install", "update", "upgrade", "doctor", "setup-token", "agents", "attach", "logs", "rm", "stop", "kill", "respawn", "gateway", "import", "project", "ultrareview"],
|
|
60
|
-
codex: ["exec", "e", "review", "login", "logout", "mcp", "mcp-server", "app-server", "app", "completion", "sandbox", "debug", "apply", "a", "resume", "fork", "cloud", "features", "help"],
|
|
81
|
+
codex: ["exec", "e", "review", "login", "logout", "mcp", "mcp-server", "app-server", "app", "completion", "sandbox", "debug", "apply", "a", "resume", "fork", "cloud", "features", "help", "agents", "remote-control", "update", "doctor", "queue", "archive", "delete", "migrate-rollouts", "unarchive", "exec-server", "plugin"],
|
|
61
82
|
devin: ["auth", "mcp", "models", "rules", "skills", "plugins", "cloud", "list", "ls", "update", "version", "migrate", "sandbox", "setup", "uninstall", "acp", "help"],
|
|
62
83
|
opencode: ["completion", "acp", "mcp", "attach", "run", "debug", "providers", "auth", "agent", "upgrade", "uninstall", "serve", "web", "models", "stats", "export", "import", "github", "pr", "session", "db"],
|
|
84
|
+
cursor: ["login", "logout", "status", "update", "upgrade", "mcp", "models", "ls", "help"],
|
|
85
|
+
"copilot-cli": ["help", "init", "login", "logout", "update", "version", "plugin", "mcp"],
|
|
86
|
+
polytoken: ["auth", "login", "logout", "update", "models", "config", "help", "list"],
|
|
63
87
|
};
|
|
64
88
|
if (commands[agent].includes(args[0] ?? ""))
|
|
65
89
|
return false;
|
package/dist/agents.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE/C,oFAAoF;AACpF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,CAAU,CAAC;AAEzH,MAAM,CAAC,MAAM,gBAAgB,GAAG,
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE/C,oFAAoF;AACpF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,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KAAK,CAAC;IAC1D,0EAA0E;IAC1E,uEAAuE;IACvE,IAAI,KAAK,KAAK,UAAU,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC;QAC7I,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAE,CAAC;YACrB,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;gBAAE,OAAO,KAAK,CAAC;YACvC,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC;gBAAE,CAAC,EAAE,CAAC;QAChC,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/cli.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export declare function countLorePolytokenHooks(input: unknown): number;
|
|
|
65
65
|
export declare function mergeLoreOpenCodePlugin(input: Record<string, unknown>): Record<string, unknown>;
|
|
66
66
|
export declare function removeLoreOpenCodePlugin(input: Record<string, unknown>): Record<string, unknown>;
|
|
67
67
|
export declare function countLoreOpenCodePlugins(input: Record<string, unknown>): number;
|
|
68
|
+
export declare function readConnectorConfig(paths: LorePaths): Promise<ConnectorConfig | null>;
|
|
68
69
|
export declare function resolveConnectEndpoints(options?: {
|
|
69
70
|
apiUrl?: string;
|
|
70
71
|
dashboardUrl?: string;
|
|
@@ -79,6 +80,8 @@ export interface AgentInstallation {
|
|
|
79
80
|
export declare function t3CodeProviderInstallations(settings: unknown, paths: LorePaths): AgentInstallation[];
|
|
80
81
|
export interface ConnectWithCredentialOptions {
|
|
81
82
|
fallback?: string;
|
|
83
|
+
/** CLI setup opts in automatically; embedded callers can choose explicitly. */
|
|
84
|
+
recovery?: boolean;
|
|
82
85
|
/** Explicit installation root for embedded callers and isolated acceptance tests. */
|
|
83
86
|
home?: string;
|
|
84
87
|
/** Repository root for project-local integrations such as VS Code. */
|
|
@@ -103,6 +106,11 @@ export interface ConnectResult {
|
|
|
103
106
|
export declare function connectWithCredential(options: ConnectWithCredentialOptions): Promise<ConnectResult>;
|
|
104
107
|
export declare function reliabilityWorkspaceKey(config: ConnectorConfig): string;
|
|
105
108
|
export declare function credentialReliabilityWorkspaceKey(apiUrl: string, token: string): string;
|
|
109
|
+
export declare function disconnectInstallation(paths?: LorePaths, preservePendingState?: boolean): Promise<{
|
|
110
|
+
connected: false;
|
|
111
|
+
changedHookFiles: string[];
|
|
112
|
+
backups: string[];
|
|
113
|
+
}>;
|
|
106
114
|
export declare function runCli(args?: readonly string[]): Promise<void>;
|
|
107
115
|
export {};
|
|
108
116
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AA0BA,OAAO,EAwBL,KAAK,yBAAyB,EAC/B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AA0BA,OAAO,EAwBL,KAAK,yBAAyB,EAC/B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,cAAc,CAAC;AAiCtB,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;AACxD,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,4BAA4B,uBAAuB,CAAC;AACjE,QAAA,MAAM,sBAAsB,kGAA4B,CAAC;AACzD,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB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C;IACpC,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,aAAa,CAAC,CAgKxB;AAkOD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAKvE;AAED,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AA0aD,wBAAsB,sBAAsB,CAAC,KAAK,GAAE,SAA0B,EAAE,oBAAoB,UAAQ,GAAG,OAAO,CAAC;IAAE,SAAS,EAAE,KAAK,CAAC;IAAC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CA6D1L;AAqVD,wBAAsB,MAAM,CAC1B,IAAI,GAAE,SAAS,MAAM,EAA0B,GAC9C,OAAO,CAAC,IAAI,CAAC,CAyLf"}
|
package/dist/cli.js
CHANGED
|
@@ -18,7 +18,7 @@ import { runAskCommand } from "./ask.js";
|
|
|
18
18
|
import { runRememberCommand } from "./remember.js";
|
|
19
19
|
import { runGuardCommand } from "./guard.js";
|
|
20
20
|
import { runContinueCommand, runResumeCommand } from "./handoff.js";
|
|
21
|
-
import { disableRecovery, prepareRecoveryInstallation, runRecoveryCommand, runRecoveryHook, runWrappedAgent } from "./recovery.js";
|
|
21
|
+
import { disableRecovery, prepareAutomaticRecovery, prepareRecoveryInstallation, runRecoveryCommand, runRecoveryHook, runWrappedAgent } from "./recovery.js";
|
|
22
22
|
import { LAUNCHABLE_AGENTS, isLaunchable, isRecoverySource } from "./agents.js";
|
|
23
23
|
import { runAttachCommand, runLiveHostCommand, runLiveRunCommand, } from "./live.js";
|
|
24
24
|
import { runMachinesCommand } from "./machine.js";
|
|
@@ -27,6 +27,7 @@ import { runDevinCommand } from "./devin.js";
|
|
|
27
27
|
import { runHostCommand } from "./host.js";
|
|
28
28
|
import { runDemoCommand } from "./demo.js";
|
|
29
29
|
import { updateCommand } from "./update.js";
|
|
30
|
+
import { UNINSTALL_HELP, uninstallCommand } from "./uninstall.js";
|
|
30
31
|
import { runSelfHostCommand } from "./self-host.js";
|
|
31
32
|
import { ReliabilityStore, ReliabilityStoreError, integrationInvocationStateKey, } from "./reliability-store.js";
|
|
32
33
|
import { IS_STANDALONE_BINARY, LORE_VERSION } from "./version.js";
|
|
@@ -95,6 +96,7 @@ Options:
|
|
|
95
96
|
--agent <name> claude, codex, copilot, copilot-cli, copilot-vscode, cowork, cursor, opencode, polytoken, or t3code
|
|
96
97
|
--timeout-ms <ms> Hook request timeout, 250-10000 (default: 2500)
|
|
97
98
|
--fallback <agent> claude, codex, opencode, devin, cursor, copilot-cli, polytoken
|
|
99
|
+
--no-recovery Disable automatic handoff setup (otherwise enabled with two installed clients)
|
|
98
100
|
--json Print machine-readable output
|
|
99
101
|
--help Show this command's help
|
|
100
102
|
|
|
@@ -935,7 +937,7 @@ function parseConnectorConfig(value) {
|
|
|
935
937
|
timeoutMs,
|
|
936
938
|
};
|
|
937
939
|
}
|
|
938
|
-
async function readConnectorConfig(paths) {
|
|
940
|
+
export async function readConnectorConfig(paths) {
|
|
939
941
|
try {
|
|
940
942
|
return parseConnectorConfig(JSON.parse(await readFile(paths.config, "utf8")));
|
|
941
943
|
}
|
|
@@ -1512,6 +1514,10 @@ function parseConnectArguments(args) {
|
|
|
1512
1514
|
parsed.openBrowser = false;
|
|
1513
1515
|
continue;
|
|
1514
1516
|
}
|
|
1517
|
+
if (argument === "--no-recovery") {
|
|
1518
|
+
parsed.recovery = false;
|
|
1519
|
+
continue;
|
|
1520
|
+
}
|
|
1515
1521
|
if (argument !== "--url" &&
|
|
1516
1522
|
argument !== "--dashboard-url" &&
|
|
1517
1523
|
argument !== "--token" &&
|
|
@@ -1583,8 +1589,8 @@ export async function connectWithCredential(options) {
|
|
|
1583
1589
|
throw new Error("Lore agent integrations currently support macOS and Linux");
|
|
1584
1590
|
}
|
|
1585
1591
|
const paths = getLorePaths(options.home, options.home === undefined ? process.env : {}, options.cwd);
|
|
1586
|
-
|
|
1587
|
-
|
|
1592
|
+
if (options.recovery === false && options.fallback)
|
|
1593
|
+
throw new Error("--no-recovery cannot be combined with --fallback.");
|
|
1588
1594
|
const existing = await readConnectorConfig(paths);
|
|
1589
1595
|
const apiUrl = normalizeApiUrl(options.apiUrl);
|
|
1590
1596
|
const dashboardUrl = options.dashboardUrl === undefined
|
|
@@ -1596,6 +1602,17 @@ export async function connectWithCredential(options) {
|
|
|
1596
1602
|
}
|
|
1597
1603
|
const timeoutMs = options.timeoutMs ?? existing?.timeoutMs ?? 2_500;
|
|
1598
1604
|
const identity = await authenticatedIdentity(apiUrl, token.trim(), timeoutMs);
|
|
1605
|
+
const recoveryEnv = options.home === undefined ? process.env : { ...process.env, ZDOTDIR: paths.home };
|
|
1606
|
+
let recoveryWarning;
|
|
1607
|
+
const externalRecoveryHost = options.agents.some(agent => ["t3code", "cowork", "copilot-vscode"].includes(agent));
|
|
1608
|
+
const installRecovery = options.fallback === undefined ? options.recovery === true ?
|
|
1609
|
+
await prepareAutomaticRecovery(paths, recoveryEnv).catch((error) => { recoveryWarning = `Automatic recovery setup: ${error.message}`; return undefined; }) : undefined :
|
|
1610
|
+
await prepareRecoveryInstallation(paths, options.fallback, recoveryEnv).catch((error) => {
|
|
1611
|
+
// A desktop host can be the source even when only its destination is on PATH.
|
|
1612
|
+
if (externalRecoveryHost && error.message.startsWith("No supported source client is installed."))
|
|
1613
|
+
return undefined;
|
|
1614
|
+
throw error;
|
|
1615
|
+
});
|
|
1599
1616
|
const recoveryAgents = installRecovery ? [...installRecovery.sources, installRecovery.fallback]
|
|
1600
1617
|
.filter((agent) => agent !== "devin") : [];
|
|
1601
1618
|
const requestedAgents = [...new Set([...options.agents, ...recoveryAgents])];
|
|
@@ -1688,7 +1705,12 @@ export async function connectWithCredential(options) {
|
|
|
1688
1705
|
await credentialStore.transferPendingTo(reliabilityStore);
|
|
1689
1706
|
}
|
|
1690
1707
|
await reliabilityStore.releaseAuthBlocked(now);
|
|
1691
|
-
const recoveryNotice = installRecovery ? await installRecovery() :
|
|
1708
|
+
const recoveryNotice = installRecovery ? await installRecovery() : recoveryWarning;
|
|
1709
|
+
const hostRecoveryWarnings = options.recovery === true || options.fallback
|
|
1710
|
+
? await (await import("./recovery-hosts.js")).installExternalRecovery(paths, options.agents, options.cwd ?? process.cwd(), options.fallback)
|
|
1711
|
+
.catch((error) => [`Host recovery setup: ${error.message}`]) : [];
|
|
1712
|
+
if (options.recovery === false)
|
|
1713
|
+
await disableRecovery(paths.home);
|
|
1692
1714
|
return {
|
|
1693
1715
|
connected: true,
|
|
1694
1716
|
apiUrl: config.apiUrl,
|
|
@@ -1697,7 +1719,7 @@ export async function connectWithCredential(options) {
|
|
|
1697
1719
|
config: paths.config,
|
|
1698
1720
|
changedHookFiles,
|
|
1699
1721
|
backups,
|
|
1700
|
-
warnings: [...requestedExpansion.warnings, ...(agents.includes("codex")
|
|
1722
|
+
warnings: [...requestedExpansion.warnings, ...hostRecoveryWarnings, ...(agents.includes("codex")
|
|
1701
1723
|
? ["Codex requires hook approval. Open /hooks in Codex and review any new or changed Lore hooks, then start a fresh session. Run lore doctor to verify approval and the first invocation."]
|
|
1702
1724
|
: [])],
|
|
1703
1725
|
...(recoveryNotice ? { recoveryNotice } : {}),
|
|
@@ -1752,6 +1774,8 @@ async function requestDeviceAuthorization(input) {
|
|
|
1752
1774
|
const intervalMs = authorization.data.intervalSeconds * 1_000;
|
|
1753
1775
|
while (Date.now() < expiresAt) {
|
|
1754
1776
|
await delay(intervalMs);
|
|
1777
|
+
if (Date.now() >= expiresAt)
|
|
1778
|
+
break;
|
|
1755
1779
|
let pollResponse;
|
|
1756
1780
|
try {
|
|
1757
1781
|
pollResponse = await fetch(`${input.apiUrl}/v1/device-authorizations/poll`, {
|
|
@@ -1776,10 +1800,23 @@ async function requestDeviceAuthorization(input) {
|
|
|
1776
1800
|
}
|
|
1777
1801
|
continue;
|
|
1778
1802
|
}
|
|
1803
|
+
if (pollResponse.status >= 500) {
|
|
1804
|
+
await pollResponse.body?.cancel().catch(() => { });
|
|
1805
|
+
continue;
|
|
1806
|
+
}
|
|
1779
1807
|
if (!pollResponse.ok) {
|
|
1780
1808
|
throw new Error("Lore browser approval failed. Run connect --login again.");
|
|
1781
1809
|
}
|
|
1782
|
-
|
|
1810
|
+
let body;
|
|
1811
|
+
try {
|
|
1812
|
+
body = await pollResponse.json();
|
|
1813
|
+
}
|
|
1814
|
+
catch (error) {
|
|
1815
|
+
if (!(error instanceof SyntaxError))
|
|
1816
|
+
continue;
|
|
1817
|
+
throw new Error("Lore returned an incompatible device authorization response.");
|
|
1818
|
+
}
|
|
1819
|
+
const result = PollDeviceAuthorizationResponseSchema.safeParse(body);
|
|
1783
1820
|
if (!result.success) {
|
|
1784
1821
|
throw new Error("Lore returned an incompatible device authorization response.");
|
|
1785
1822
|
}
|
|
@@ -1787,15 +1824,38 @@ async function requestDeviceAuthorization(input) {
|
|
|
1787
1824
|
continue;
|
|
1788
1825
|
}
|
|
1789
1826
|
if (result.data.status === "approved") {
|
|
1790
|
-
return result.data.token;
|
|
1827
|
+
return { token: result.data.token, deviceCode: authorization.data.deviceCode };
|
|
1791
1828
|
}
|
|
1792
1829
|
if (result.data.status === "denied") {
|
|
1793
1830
|
throw new Error("Lore access was denied in the dashboard.");
|
|
1794
1831
|
}
|
|
1832
|
+
if (result.data.status === "consumed") {
|
|
1833
|
+
throw new Error("Lore approval was already completed, but this login did not receive its credential. Run connect --login again.");
|
|
1834
|
+
}
|
|
1795
1835
|
throw new Error("Lore browser approval expired. Run connect --login again.");
|
|
1796
1836
|
}
|
|
1797
1837
|
throw new Error("Lore browser approval expired. Run connect --login again.");
|
|
1798
1838
|
}
|
|
1839
|
+
async function acknowledgeDeviceAuthorization(apiUrl, authorization) {
|
|
1840
|
+
// The credential is already saved. A lost acknowledgement must not undo
|
|
1841
|
+
// login; old servers may lack this endpoint, and unacknowledged grants expire.
|
|
1842
|
+
for (let attempt = 0; attempt < 3; attempt += 1) {
|
|
1843
|
+
try {
|
|
1844
|
+
const response = await fetch(`${apiUrl}/v1/device-authorizations/acknowledge`, {
|
|
1845
|
+
method: "POST",
|
|
1846
|
+
headers: { accept: "application/json", "content-type": "application/json" },
|
|
1847
|
+
body: JSON.stringify(authorization),
|
|
1848
|
+
signal: AbortSignal.timeout(2_000),
|
|
1849
|
+
});
|
|
1850
|
+
await response.body?.cancel();
|
|
1851
|
+
if (response.ok || (response.status >= 400 && response.status < 500))
|
|
1852
|
+
return;
|
|
1853
|
+
}
|
|
1854
|
+
catch {
|
|
1855
|
+
// Retry a lost response with the same secrets.
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1799
1859
|
async function connectCommand(args) {
|
|
1800
1860
|
const parsed = parseConnectArguments(args);
|
|
1801
1861
|
if (parsed === null) {
|
|
@@ -1821,25 +1881,29 @@ async function connectCommand(args) {
|
|
|
1821
1881
|
if (parsed.login && hasProvidedToken) {
|
|
1822
1882
|
throw new Error("--login cannot be combined with an explicit or environment workspace token. Unset it or use the token directly.");
|
|
1823
1883
|
}
|
|
1824
|
-
const
|
|
1884
|
+
const authorization = parsed.login
|
|
1825
1885
|
? await requestDeviceAuthorization({
|
|
1826
1886
|
apiUrl,
|
|
1827
1887
|
...(dashboardUrl === undefined ? {} : { dashboardUrl }),
|
|
1828
1888
|
agents: parsed.agents,
|
|
1829
1889
|
openBrowser: parsed.openBrowser,
|
|
1830
1890
|
})
|
|
1831
|
-
:
|
|
1891
|
+
: undefined;
|
|
1892
|
+
const token = authorization?.token ?? configured;
|
|
1832
1893
|
if (token === undefined || token.trim() === "") {
|
|
1833
1894
|
throw new Error("Workspace token is required. Use --login, --token <token>, LORE_WORKSPACE_TOKEN, or LORE_TOKEN.");
|
|
1834
1895
|
}
|
|
1835
1896
|
const result = await connectWithCredential({
|
|
1836
1897
|
...(parsed.fallback === undefined ? {} : { fallback: parsed.fallback }),
|
|
1898
|
+
recovery: parsed.recovery ?? true,
|
|
1837
1899
|
apiUrl,
|
|
1838
1900
|
...(dashboardUrl === undefined ? {} : { dashboardUrl }),
|
|
1839
1901
|
token,
|
|
1840
1902
|
agents: parsed.agents,
|
|
1841
1903
|
...(parsed.timeoutMs === undefined ? {} : { timeoutMs: parsed.timeoutMs }),
|
|
1842
1904
|
});
|
|
1905
|
+
if (authorization)
|
|
1906
|
+
await acknowledgeDeviceAuthorization(apiUrl, authorization);
|
|
1843
1907
|
writeResult(result, parsed.json, `access authorized; integrations installed: ${result.agents.join(", ")}\napi_url: ${result.apiUrl}\nconfig: ${result.config}\nRestart your agent and complete a turn, then run lore doctor to verify recording.\n${result.recoveryNotice ? `${result.recoveryNotice}\n` : ""}${result.warnings.map((warning) => `warning: ${warning}\n`).join("")}`);
|
|
1844
1908
|
}
|
|
1845
1909
|
async function queueCount(paths) {
|
|
@@ -2162,7 +2226,10 @@ async function disconnectCommand(args) {
|
|
|
2162
2226
|
if (parsed === null) {
|
|
2163
2227
|
return;
|
|
2164
2228
|
}
|
|
2165
|
-
const
|
|
2229
|
+
const result = await disconnectInstallation();
|
|
2230
|
+
writeResult(result, parsed.json, `disconnected: yes\nchanged_hook_files: ${result.changedHookFiles.length}\n`);
|
|
2231
|
+
}
|
|
2232
|
+
export async function disconnectInstallation(paths = getLorePaths(), preservePendingState = false) {
|
|
2166
2233
|
await disableRecovery(paths.home);
|
|
2167
2234
|
await disableDevinCli(paths.home);
|
|
2168
2235
|
const config = await readConnectorConfig(paths);
|
|
@@ -2212,11 +2279,12 @@ async function disconnectCommand(args) {
|
|
|
2212
2279
|
rm(paths.runtimeInvocationHealthWriter, { force: true }),
|
|
2213
2280
|
rm(paths.runtimeVersion, { force: true }),
|
|
2214
2281
|
rm(paths.runtimePackage, { force: true }),
|
|
2215
|
-
|
|
2216
|
-
|
|
2282
|
+
...(preservePendingState ? [] : [
|
|
2283
|
+
rm(paths.state, { recursive: true, force: true }),
|
|
2284
|
+
rm(paths.queue, { recursive: true, force: true }),
|
|
2285
|
+
]),
|
|
2217
2286
|
]);
|
|
2218
|
-
|
|
2219
|
-
writeResult(result, parsed.json, `disconnected: yes\nchanged_hook_files: ${changedHookFiles.length}\n`);
|
|
2287
|
+
return { connected: false, changedHookFiles, backups };
|
|
2220
2288
|
}
|
|
2221
2289
|
async function apiChecks(config) {
|
|
2222
2290
|
const readinessUrl = `${config.apiUrl}/health/ready`;
|
|
@@ -2503,6 +2571,9 @@ async function printCommandHelp(path) {
|
|
|
2503
2571
|
case "disconnect":
|
|
2504
2572
|
process.stdout.write(DISCONNECT_HELP);
|
|
2505
2573
|
return;
|
|
2574
|
+
case "uninstall":
|
|
2575
|
+
process.stdout.write(UNINSTALL_HELP);
|
|
2576
|
+
return;
|
|
2506
2577
|
case "share":
|
|
2507
2578
|
await runShareCommand(args, null);
|
|
2508
2579
|
return;
|
|
@@ -2606,6 +2677,11 @@ export async function runCli(args = process.argv.slice(2)) {
|
|
|
2606
2677
|
await runWrappedAgent(commandArgs, getLorePaths(process.env.LORE_HOME));
|
|
2607
2678
|
return;
|
|
2608
2679
|
case "recovery":
|
|
2680
|
+
if (commandArgs[0] === "cloud") {
|
|
2681
|
+
const paths = getLorePaths(process.env.LORE_HOME);
|
|
2682
|
+
await (await import("./recovery-cloud.js")).runCloudRecoveryCommand(commandArgs.slice(1), paths, await readConnectorConfig(paths));
|
|
2683
|
+
return;
|
|
2684
|
+
}
|
|
2609
2685
|
await runRecoveryCommand(commandArgs, getLorePaths(process.env.LORE_HOME));
|
|
2610
2686
|
return;
|
|
2611
2687
|
case "recovery-hook":
|
|
@@ -2667,6 +2743,12 @@ export async function runCli(args = process.argv.slice(2)) {
|
|
|
2667
2743
|
case "disconnect":
|
|
2668
2744
|
await disconnectCommand(commandArgs);
|
|
2669
2745
|
return;
|
|
2746
|
+
case "uninstall":
|
|
2747
|
+
await uninstallCommand(commandArgs, {
|
|
2748
|
+
disconnect: () => disconnectInstallation(getLorePaths(), true),
|
|
2749
|
+
retainedDirectory: getLorePaths().loreDirectory,
|
|
2750
|
+
});
|
|
2751
|
+
return;
|
|
2670
2752
|
case "devin-cli-hook":
|
|
2671
2753
|
try {
|
|
2672
2754
|
const result = await runDevinCliHook(getLorePaths(process.env.LORE_HOME).home);
|