@lore-co/cli 0.2.4 → 0.2.7
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 +10 -2
- package/dist/cli.d.ts +10 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +109 -27
- package/dist/cli.js.map +1 -1
- package/dist/command-help.d.ts +4 -1
- package/dist/command-help.d.ts.map +1 -1
- package/dist/command-help.js +43 -0
- package/dist/command-help.js.map +1 -1
- package/dist/config-command.d.ts +2 -0
- package/dist/config-command.d.ts.map +1 -0
- package/dist/config-command.js +46 -0
- package/dist/config-command.js.map +1 -0
- package/dist/connections.d.ts +28 -0
- package/dist/connections.d.ts.map +1 -0
- package/dist/connections.js +68 -0
- package/dist/connections.js.map +1 -0
- package/dist/devin-capture.d.ts +3 -1
- package/dist/devin-capture.d.ts.map +1 -1
- package/dist/devin-capture.js +17 -5
- package/dist/devin-capture.js.map +1 -1
- package/dist/devin-cli.d.ts.map +1 -1
- package/dist/devin-cli.js +12 -9
- package/dist/devin-cli.js.map +1 -1
- package/dist/directory-policy.d.ts +2 -0
- package/dist/directory-policy.d.ts.map +1 -0
- package/dist/directory-policy.js +2 -0
- package/dist/directory-policy.js.map +1 -0
- package/dist/generated-assets.d.ts +4 -4
- package/dist/generated-assets.d.ts.map +1 -1
- package/dist/generated-assets.js +4 -4
- package/dist/generated-assets.js.map +1 -1
- package/dist/guard.js +2 -2
- package/dist/guard.js.map +1 -1
- package/dist/host.d.ts +2 -1
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +17 -5
- package/dist/host.js.map +1 -1
- package/dist/image-capture.d.ts +8 -1
- package/dist/image-capture.d.ts.map +1 -1
- package/dist/image-capture.js +30 -19
- package/dist/image-capture.js.map +1 -1
- package/dist/invocation-health-writer.d.ts +1 -0
- package/dist/invocation-health-writer.d.ts.map +1 -1
- package/dist/invocation-health-writer.js +3 -0
- package/dist/invocation-health-writer.js.map +1 -1
- package/dist/live.d.ts.map +1 -1
- package/dist/live.js +45 -9
- package/dist/live.js.map +1 -1
- package/dist/recovery-cloud-receipt.d.ts.map +1 -1
- package/dist/recovery-cloud-receipt.js +36 -11
- package/dist/recovery-cloud-receipt.js.map +1 -1
- package/dist/recovery-cloud-workspace.d.ts.map +1 -1
- package/dist/recovery-cloud-workspace.js +4 -1
- package/dist/recovery-cloud-workspace.js.map +1 -1
- package/dist/recovery-cloud.d.ts +1 -0
- package/dist/recovery-cloud.d.ts.map +1 -1
- package/dist/recovery-cloud.js +45 -17
- package/dist/recovery-cloud.js.map +1 -1
- package/dist/recovery-codex.d.ts.map +1 -1
- package/dist/recovery-codex.js +2 -0
- package/dist/recovery-codex.js.map +1 -1
- package/dist/recovery-connection.d.ts +11 -0
- package/dist/recovery-connection.d.ts.map +1 -0
- package/dist/recovery-connection.js +35 -0
- package/dist/recovery-connection.js.map +1 -0
- package/dist/recovery-copilot.d.ts.map +1 -1
- package/dist/recovery-copilot.js +3 -0
- package/dist/recovery-copilot.js.map +1 -1
- package/dist/recovery-desktop.d.ts.map +1 -1
- package/dist/recovery-desktop.js +4 -0
- package/dist/recovery-desktop.js.map +1 -1
- package/dist/recovery-external.d.ts.map +1 -1
- package/dist/recovery-external.js +3 -0
- package/dist/recovery-external.js.map +1 -1
- package/dist/recovery-hosts.d.ts.map +1 -1
- package/dist/recovery-hosts.js +4 -6
- package/dist/recovery-hosts.js.map +1 -1
- package/dist/recovery-polytoken.d.ts.map +1 -1
- package/dist/recovery-polytoken.js +8 -8
- package/dist/recovery-polytoken.js.map +1 -1
- package/dist/recovery-remote.d.ts.map +1 -1
- package/dist/recovery-remote.js +22 -9
- package/dist/recovery-remote.js.map +1 -1
- package/dist/recovery-state.d.ts +2 -1
- package/dist/recovery-state.d.ts.map +1 -1
- package/dist/recovery-state.js +18 -3
- package/dist/recovery-state.js.map +1 -1
- package/dist/recovery-transfer.d.ts.map +1 -1
- package/dist/recovery-transfer.js +17 -9
- package/dist/recovery-transfer.js.map +1 -1
- package/dist/recovery.d.ts.map +1 -1
- package/dist/recovery.js +12 -18
- package/dist/recovery.js.map +1 -1
- package/dist/reliability-store.d.ts +5 -0
- package/dist/reliability-store.d.ts.map +1 -1
- package/dist/reliability-store.js +31 -3
- package/dist/reliability-store.js.map +1 -1
- package/dist/repository.d.ts +1 -3
- package/dist/repository.d.ts.map +1 -1
- package/dist/repository.js +1 -65
- package/dist/repository.js.map +1 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +104 -39
- package/dist/runtime.js.map +1 -1
- package/dist/self-host.d.ts +1 -1
- package/dist/self-host.js +2 -2
- package/dist/stdin.d.ts +3 -0
- package/dist/stdin.d.ts.map +1 -0
- package/dist/stdin.js +21 -0
- package/dist/stdin.js.map +1 -0
- package/dist/update.js +3 -3
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -224,7 +224,7 @@ content-free `guard_check` audit event.
|
|
|
224
224
|
|
|
225
225
|
```sh
|
|
226
226
|
lore update
|
|
227
|
-
lore update --version v0.2.
|
|
227
|
+
lore update --version v0.2.7
|
|
228
228
|
```
|
|
229
229
|
|
|
230
230
|
`update` resolves the latest release to an exact tag, or uses the exact
|
|
@@ -570,7 +570,7 @@ same-repository, non-draft pull requests bearing the corresponding
|
|
|
570
570
|
`lore:codex-review` or `lore:devin-review` label.
|
|
571
571
|
|
|
572
572
|
Generated jobs require a published standalone binary release and default to
|
|
573
|
-
`treadiehq/lore-releases` at `v0.2.
|
|
573
|
+
`treadiehq/lore-releases` at `v0.2.7`. Set `LORE_CLI_REPOSITORY` to the publicly
|
|
574
574
|
readable `owner/repository` and `LORE_CLI_VERSION` to an existing release tag
|
|
575
575
|
when using another release source.
|
|
576
576
|
|
|
@@ -629,3 +629,11 @@ to launch an installed agent after dashboard acceptance. Provider setup, SSH
|
|
|
629
629
|
workers, managed destinations, paired workspace exports with verified restoration,
|
|
630
630
|
and the pushed-checkpoint fallback when no exporter is available
|
|
631
631
|
are documented in [recovery](../../docs/recovery.md#managed-cloud-recovery).
|
|
632
|
+
|
|
633
|
+
## Limit where Lore runs
|
|
634
|
+
|
|
635
|
+
Owners and admins choose team repositories in **Settings → Repositories**. Members use `lore config open` to set their own folder rules. Both must allow the project.
|
|
636
|
+
|
|
637
|
+
For multiple accounts or workspaces, connect each with `lore connect --login --name <name>` and edit its folders with `lore config open --connection <name>`. Each folder must match exactly one connection. Run `lore connections` to list them and `lore scope check [folder]` to check a project.
|
|
638
|
+
|
|
639
|
+
See [folder and repository settings](../../docs/guides/repository-access.md) for setup and examples.
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { type DirectoryRules } from "./directory-policy.js";
|
|
3
|
+
import { type ConnectionReference } from "./directory-policy.js";
|
|
2
4
|
import { type WorkspaceIdentityResponse } from "@lore-co/core";
|
|
3
5
|
import { type CommandHookAgentName } from "./runtime.js";
|
|
4
6
|
export declare const LORE_OPENCODE_PLUGIN = "@lore-co/opencode";
|
|
@@ -34,6 +36,12 @@ export interface LorePaths {
|
|
|
34
36
|
t3Settings: string;
|
|
35
37
|
}
|
|
36
38
|
export interface ConnectorConfig {
|
|
39
|
+
connectionId?: string;
|
|
40
|
+
connectionName?: string;
|
|
41
|
+
accountId?: string;
|
|
42
|
+
workspaceName?: string;
|
|
43
|
+
savedConnections?: ConnectionReference[];
|
|
44
|
+
directories?: DirectoryRules;
|
|
37
45
|
version: 2;
|
|
38
46
|
apiUrl: string;
|
|
39
47
|
dashboardUrl?: string;
|
|
@@ -65,7 +73,7 @@ export declare function countLorePolytokenHooks(input: unknown): number;
|
|
|
65
73
|
export declare function mergeLoreOpenCodePlugin(input: Record<string, unknown>): Record<string, unknown>;
|
|
66
74
|
export declare function removeLoreOpenCodePlugin(input: Record<string, unknown>): Record<string, unknown>;
|
|
67
75
|
export declare function countLoreOpenCodePlugins(input: Record<string, unknown>): number;
|
|
68
|
-
export declare function readConnectorConfig(paths: LorePaths): Promise<ConnectorConfig | null>;
|
|
76
|
+
export declare function readConnectorConfig(paths: LorePaths, cwd?: string): Promise<ConnectorConfig | null>;
|
|
69
77
|
export declare function resolveConnectEndpoints(options?: {
|
|
70
78
|
apiUrl?: string;
|
|
71
79
|
dashboardUrl?: string;
|
|
@@ -79,6 +87,7 @@ export interface AgentInstallation {
|
|
|
79
87
|
}
|
|
80
88
|
export declare function t3CodeProviderInstallations(settings: unknown, paths: LorePaths): AgentInstallation[];
|
|
81
89
|
export interface ConnectWithCredentialOptions {
|
|
90
|
+
connectionName?: string;
|
|
82
91
|
fallback?: string;
|
|
83
92
|
/** CLI setup opts in automatically; embedded callers can choose explicitly. */
|
|
84
93
|
recovery?: boolean;
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAwD,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAMlH,OAAO,EAAgD,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA0B/G,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,CAAC,CAAC,MAAM,CAAC,CAAC;AAC1E,MAAM,MAAM,gBAAgB,GACxB,mBAAmB,GACnB,SAAS,GACT,QAAQ,GACR,QAAQ,CAAC;AAiCb,MAAM,WAAW,SAAS;IAC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;AAED,MAAM,WAAW,aAAa;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,IAAI,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,yBAAyB,CAAC;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,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,aAAa,CAAC,CAYzG;AA2YD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAKvE;AAED,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAkbD,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,CA+D1L;AAsVD,wBAAsB,MAAM,CAAC,IAAI,GAAE,SAAS,MAAM,EAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CAmB3F"}
|
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { parseDirectoryRules, checkDirectory, checkLoreAccess } from "./directory-policy.js";
|
|
2
3
|
import { reportCommand, runTelemetryCommand, telemetryEnabled, trackedCommand, TELEMETRY_HELP } from "./telemetry.js";
|
|
3
4
|
import { secureWindowsDirectory, windowsPermissionsArePrivate } from "./windows-permissions.js";
|
|
4
5
|
import { COMMAND_GUIDES, ROOT_HELP, helpTopic } from "./command-help.js";
|
|
5
6
|
import { runShareCommand } from "./share.js";
|
|
7
|
+
import { prepareConnection, persistConnection, listConnections } from "./connections.js";
|
|
8
|
+
import { connectionReferences, resolveLocalConnection } from "./directory-policy.js";
|
|
9
|
+
import { withDirectoryLock } from "./reliability-store.js";
|
|
10
|
+
import { runConfigCommand } from "./config-command.js";
|
|
6
11
|
import { codexApprovalDetail, inspectCodexHookApproval } from "./codex-hook-approval.js";
|
|
7
12
|
import { claudeOnlyCommand, disableDevinCli, runDevinCliHook } from "./devin-cli.js";
|
|
8
13
|
import { access, chmod, copyFile, mkdir, open, readFile, readdir, rename, rm, stat, writeFile, } from "node:fs/promises";
|
|
@@ -90,6 +95,7 @@ Usage:
|
|
|
90
95
|
lore connect --token <token> [options]
|
|
91
96
|
|
|
92
97
|
Options:
|
|
98
|
+
--name <name> Name this account/workspace connection (e.g. work)
|
|
93
99
|
--url <url> Lore API base URL (default: https://api.uselore.co)
|
|
94
100
|
--dashboard-url <url> Lore dashboard URL (default: https://uselore.co for hosted Lore)
|
|
95
101
|
--login Approve access securely in the Lore dashboard
|
|
@@ -936,7 +942,13 @@ function parseConnectorConfig(value) {
|
|
|
936
942
|
: undefined;
|
|
937
943
|
return {
|
|
938
944
|
version: 2,
|
|
945
|
+
...(typeof value.connectionId === "string" ? { connectionId: value.connectionId } : {}),
|
|
946
|
+
...(typeof value.connectionName === "string" ? { connectionName: value.connectionName } : {}),
|
|
947
|
+
...(typeof value.accountId === "string" ? { accountId: value.accountId } : {}),
|
|
948
|
+
...(typeof value.workspaceName === "string" ? { workspaceName: value.workspaceName } : {}),
|
|
949
|
+
...(value.savedConnections === undefined ? {} : { savedConnections: connectionReferences(value.savedConnections) }),
|
|
939
950
|
apiUrl: value.apiUrl,
|
|
951
|
+
...(value.directories === undefined ? {} : { directories: parseDirectoryRules(value.directories) }),
|
|
940
952
|
...(dashboardUrl === undefined ? {} : { dashboardUrl }),
|
|
941
953
|
...(workspaceId === undefined ? {} : { workspaceId }),
|
|
942
954
|
token: value.token,
|
|
@@ -949,7 +961,12 @@ function parseConnectorConfig(value) {
|
|
|
949
961
|
timeoutMs,
|
|
950
962
|
};
|
|
951
963
|
}
|
|
952
|
-
export async function readConnectorConfig(paths) {
|
|
964
|
+
export async function readConnectorConfig(paths, cwd) {
|
|
965
|
+
if (cwd !== undefined) {
|
|
966
|
+
if (await readConnectorConfig(paths) === null)
|
|
967
|
+
return null;
|
|
968
|
+
return parseConnectorConfig(await resolveLocalConnection(cwd, paths.home));
|
|
969
|
+
}
|
|
953
970
|
try {
|
|
954
971
|
return parseConnectorConfig(JSON.parse(await readFile(paths.config, "utf8")));
|
|
955
972
|
}
|
|
@@ -1039,6 +1056,7 @@ async function authenticatedIdentity(apiUrl, token, timeoutMs) {
|
|
|
1039
1056
|
headers: {
|
|
1040
1057
|
accept: "application/json",
|
|
1041
1058
|
authorization: `Bearer ${token}`,
|
|
1059
|
+
"x-lore-connection-identity": "1",
|
|
1042
1060
|
},
|
|
1043
1061
|
signal: AbortSignal.timeout(timeoutMs),
|
|
1044
1062
|
});
|
|
@@ -1392,6 +1410,7 @@ async function installRuntime(paths) {
|
|
|
1392
1410
|
await Promise.all([
|
|
1393
1411
|
rm(paths.runtime, { force: true }),
|
|
1394
1412
|
rm(paths.runtimeRepository, { force: true }),
|
|
1413
|
+
rm(resolve(dirname(paths.runtime), "directory-policy.js"), { force: true }),
|
|
1395
1414
|
rm(paths.runtimeReliabilityStore, { force: true }),
|
|
1396
1415
|
rm(resolve(dirname(paths.runtime), "windows-permissions.js"), { force: true }),
|
|
1397
1416
|
rm(paths.runtimeSignedSnapshot, { force: true }),
|
|
@@ -1413,7 +1432,7 @@ async function installRuntime(paths) {
|
|
|
1413
1432
|
const imageCapture = (await readFile(resolve(sourceDirectory, "image-capture.js"), "utf8")).replaceAll("@lore-co/core/image-bytes", "./image-bytes.js");
|
|
1414
1433
|
const [runtime, repository, reliabilityStore, signedSnapshot, canonicalJson, contextFallback, invocationHealthWriter,] = await Promise.all([
|
|
1415
1434
|
readFile(resolve(sourceDirectory, "runtime.js"), "utf8"),
|
|
1416
|
-
readFile(resolve(
|
|
1435
|
+
readFile(fileURLToPath(import.meta.resolve("@lore-co/core/repository-location")), "utf8"),
|
|
1417
1436
|
readFile(resolve(sourceDirectory, "reliability-store.js"), "utf8"),
|
|
1418
1437
|
readFile(resolve(sourceDirectory, "signed-snapshot.js"), "utf8"),
|
|
1419
1438
|
readFile(canonicalJsonModule, "utf8"),
|
|
@@ -1431,6 +1450,7 @@ async function installRuntime(paths) {
|
|
|
1431
1450
|
"image-bytes.js": imageBytes,
|
|
1432
1451
|
"image-capture.js": imageCapture,
|
|
1433
1452
|
"repository.js": repository,
|
|
1453
|
+
"directory-policy.js": (await readFile(fileURLToPath(import.meta.resolve("@lore-co/core/local-scope")), "utf8")).replaceAll("./repository-location.js", "./repository.js"),
|
|
1434
1454
|
"reliability-store.js": reliabilityStore,
|
|
1435
1455
|
"windows-permissions.js": await readFile(resolve(sourceDirectory, "windows-permissions.js"), "utf8"),
|
|
1436
1456
|
"signed-snapshot.js": standaloneSignedSnapshot,
|
|
@@ -1454,6 +1474,7 @@ async function installRuntime(paths) {
|
|
|
1454
1474
|
atomicWrite(resolve(dirname(paths.runtime), "image-bytes.js"), imageBytes, 0o600),
|
|
1455
1475
|
atomicWrite(resolve(dirname(paths.runtime), "image-capture.js"), imageCapture, 0o600),
|
|
1456
1476
|
atomicWrite(paths.runtimeRepository, repository, 0o600),
|
|
1477
|
+
atomicWrite(resolve(dirname(paths.runtime), "directory-policy.js"), runtimeFiles["directory-policy.js"], 0o600),
|
|
1457
1478
|
atomicWrite(paths.runtimeReliabilityStore, reliabilityStore, 0o600),
|
|
1458
1479
|
atomicWrite(resolve(dirname(paths.runtime), "windows-permissions.js"), runtimeFiles["windows-permissions.js"], 0o600),
|
|
1459
1480
|
atomicWrite(paths.runtimeSignedSnapshot, standaloneSignedSnapshot, 0o600),
|
|
@@ -1524,7 +1545,8 @@ function parseConnectArguments(args) {
|
|
|
1524
1545
|
parsed.recovery = false;
|
|
1525
1546
|
continue;
|
|
1526
1547
|
}
|
|
1527
|
-
if (argument !== "--
|
|
1548
|
+
if (argument !== "--name" &&
|
|
1549
|
+
argument !== "--url" &&
|
|
1528
1550
|
argument !== "--dashboard-url" &&
|
|
1529
1551
|
argument !== "--token" &&
|
|
1530
1552
|
argument !== "--agent" &&
|
|
@@ -1534,7 +1556,10 @@ function parseConnectArguments(args) {
|
|
|
1534
1556
|
}
|
|
1535
1557
|
const [value, valueIndex] = valueAfter(args, index, argument);
|
|
1536
1558
|
index = valueIndex;
|
|
1537
|
-
if (argument === "--
|
|
1559
|
+
if (argument === "--name") {
|
|
1560
|
+
parsed.connectionName = value;
|
|
1561
|
+
}
|
|
1562
|
+
else if (argument === "--fallback") {
|
|
1538
1563
|
if (!isLaunchable(value))
|
|
1539
1564
|
throw new Error(`--fallback must be ${LAUNCHABLE_AGENTS.join(", ")}`);
|
|
1540
1565
|
parsed.fallback = value;
|
|
@@ -1591,6 +1616,21 @@ function writeResult(value, json, text) {
|
|
|
1591
1616
|
process.stdout.write(json ? `${JSON.stringify(value, null, 2)}\n` : text);
|
|
1592
1617
|
}
|
|
1593
1618
|
export async function connectWithCredential(options) {
|
|
1619
|
+
if (platform() !== "darwin" && platform() !== "linux" && !isWindows()) {
|
|
1620
|
+
throw new Error("Lore agent integrations support macOS, Linux, and Windows");
|
|
1621
|
+
}
|
|
1622
|
+
if (options.recovery === false && options.fallback)
|
|
1623
|
+
throw new Error("--no-recovery cannot be combined with --fallback.");
|
|
1624
|
+
if (!options.token.trim())
|
|
1625
|
+
throw new Error("Workspace token cannot be empty");
|
|
1626
|
+
const paths = getLorePaths(options.home, options.home === undefined ? process.env : {}, options.cwd);
|
|
1627
|
+
const previous = await readConnectorConfig(paths);
|
|
1628
|
+
const verifiedIdentity = await authenticatedIdentity(normalizeApiUrl(options.apiUrl), options.token.trim(), options.timeoutMs ?? previous?.timeoutMs ?? 2500);
|
|
1629
|
+
await secureWindowsDirectory(paths.loreDirectory);
|
|
1630
|
+
await mkdir(paths.loreDirectory, { recursive: true, mode: 0o700 });
|
|
1631
|
+
return withDirectoryLock(resolve(paths.loreDirectory, "connections.lock"), () => connectWithCredentialLocked(options, verifiedIdentity));
|
|
1632
|
+
}
|
|
1633
|
+
async function connectWithCredentialLocked(options, identity) {
|
|
1594
1634
|
if (platform() !== "darwin" && platform() !== "linux" && !isWindows()) {
|
|
1595
1635
|
throw new Error("Lore agent integrations support macOS, Linux, and Windows");
|
|
1596
1636
|
}
|
|
@@ -1607,7 +1647,11 @@ export async function connectWithCredential(options) {
|
|
|
1607
1647
|
throw new Error("Workspace token cannot be empty");
|
|
1608
1648
|
}
|
|
1609
1649
|
const timeoutMs = options.timeoutMs ?? existing?.timeoutMs ?? 2_500;
|
|
1610
|
-
const
|
|
1650
|
+
const previousIdentity = existing && !existing.connectionId
|
|
1651
|
+
? existing.apiUrl === apiUrl && existing.token === token ? identity
|
|
1652
|
+
: await authenticatedIdentity(existing.apiUrl, existing.token, timeoutMs).catch(() => undefined)
|
|
1653
|
+
: undefined;
|
|
1654
|
+
const connection = await prepareConnection(paths, identity, { apiUrl, token, ...(options.connectionName ? { connectionName: options.connectionName } : {}) }, previousIdentity);
|
|
1611
1655
|
await secureWindowsDirectory(paths.loreDirectory);
|
|
1612
1656
|
const recoveryEnv = options.home === undefined ? process.env : { ...process.env, ZDOTDIR: paths.home };
|
|
1613
1657
|
let recoveryWarning;
|
|
@@ -1688,6 +1732,7 @@ export async function connectWithCredential(options) {
|
|
|
1688
1732
|
.map((installation) => installation.configPath);
|
|
1689
1733
|
}
|
|
1690
1734
|
const config = {
|
|
1735
|
+
...connection.fields,
|
|
1691
1736
|
version: 2,
|
|
1692
1737
|
apiUrl,
|
|
1693
1738
|
...(dashboardUrl === undefined ? {} : { dashboardUrl }),
|
|
@@ -1695,16 +1740,21 @@ export async function connectWithCredential(options) {
|
|
|
1695
1740
|
token: token.trim(),
|
|
1696
1741
|
agents,
|
|
1697
1742
|
agentConfigPaths,
|
|
1698
|
-
connectedAt:
|
|
1743
|
+
connectedAt: connection.profiles.find(value => value.connectionId === connection.fields.connectionId)?.connectedAt ?? now.toISOString(),
|
|
1699
1744
|
timeoutMs,
|
|
1700
1745
|
};
|
|
1701
1746
|
const reliabilityStore = new ReliabilityStore(identity.workspaceId, {
|
|
1702
1747
|
home: paths.home,
|
|
1748
|
+
connectionId: config.connectionId,
|
|
1703
1749
|
});
|
|
1704
1750
|
await reliabilityStore.initialize();
|
|
1705
|
-
await
|
|
1706
|
-
|
|
1751
|
+
await persistConnection(paths, config, connection.profiles);
|
|
1752
|
+
if (existing && !existing.connectionId && existing.apiUrl === apiUrl && existing.token === token) {
|
|
1753
|
+
await new ReliabilityStore(identity.workspaceId, { home: paths.home }).transferPendingTo(reliabilityStore);
|
|
1754
|
+
await reliabilityStore.migrateLegacyQueue(paths.queue);
|
|
1755
|
+
}
|
|
1707
1756
|
if (existing !== null &&
|
|
1757
|
+
!existing.connectionId &&
|
|
1708
1758
|
existing.workspaceId === undefined &&
|
|
1709
1759
|
existing.apiUrl === apiUrl &&
|
|
1710
1760
|
existing.token === token.trim()) {
|
|
@@ -1726,7 +1776,7 @@ export async function connectWithCredential(options) {
|
|
|
1726
1776
|
config: paths.config,
|
|
1727
1777
|
changedHookFiles,
|
|
1728
1778
|
backups,
|
|
1729
|
-
warnings: [...requestedExpansion.warnings, ...hostRecoveryWarnings, ...(agents.includes("codex")
|
|
1779
|
+
warnings: [...(connection.needsFolders ? [`Lore is off for ${config.connectionName} until you add folder rules. Run lore config open --connection ${config.connectionName}.`] : []), ...requestedExpansion.warnings, ...hostRecoveryWarnings, ...(agents.includes("codex")
|
|
1730
1780
|
? ["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."]
|
|
1731
1781
|
: [])],
|
|
1732
1782
|
...(recoveryNotice ? { recoveryNotice } : {}),
|
|
@@ -1893,6 +1943,7 @@ async function connectCommand(args) {
|
|
|
1893
1943
|
throw new Error("Workspace token is required. Use --login, --token <token>, LORE_WORKSPACE_TOKEN, or LORE_TOKEN.");
|
|
1894
1944
|
}
|
|
1895
1945
|
const result = await connectWithCredential({
|
|
1946
|
+
...(parsed.connectionName === undefined ? {} : { connectionName: parsed.connectionName }),
|
|
1896
1947
|
...(parsed.fallback === undefined ? {} : { fallback: parsed.fallback }),
|
|
1897
1948
|
recovery: parsed.recovery ?? true,
|
|
1898
1949
|
apiUrl,
|
|
@@ -1930,6 +1981,7 @@ async function inspectReliabilityStore(config, paths) {
|
|
|
1930
1981
|
try {
|
|
1931
1982
|
const store = new ReliabilityStore(reliabilityWorkspaceKey(config), {
|
|
1932
1983
|
home: paths.home,
|
|
1984
|
+
...(config.connectionId ? { connectionId: config.connectionId } : {}),
|
|
1933
1985
|
});
|
|
1934
1986
|
return { inspection: await store.inspectExisting(), error: null };
|
|
1935
1987
|
}
|
|
@@ -1990,6 +2042,7 @@ async function inspectRuntimeInstallation(required, paths) {
|
|
|
1990
2042
|
"image-bytes.js": resolve(dirname(paths.runtime), "image-bytes.js"),
|
|
1991
2043
|
"image-capture.js": resolve(dirname(paths.runtime), "image-capture.js"),
|
|
1992
2044
|
"repository.js": paths.runtimeRepository,
|
|
2045
|
+
"directory-policy.js": resolve(dirname(paths.runtime), "directory-policy.js"),
|
|
1993
2046
|
"reliability-store.js": paths.runtimeReliabilityStore,
|
|
1994
2047
|
"windows-permissions.js": resolve(dirname(paths.runtime), "windows-permissions.js"),
|
|
1995
2048
|
"signed-snapshot.js": paths.runtimeSignedSnapshot,
|
|
@@ -2054,6 +2107,7 @@ async function invocationHealth(config, paths, manifest) {
|
|
|
2054
2107
|
try {
|
|
2055
2108
|
const store = new ReliabilityStore(reliabilityWorkspaceKey(config), {
|
|
2056
2109
|
home: paths.home,
|
|
2110
|
+
...(config.connectionId ? { connectionId: config.connectionId } : {}),
|
|
2057
2111
|
});
|
|
2058
2112
|
const record = await store.readStateExisting(integrationInvocationStateKey(manifest.integrationId));
|
|
2059
2113
|
const parsed = ReliabilityInvocationRecordSchema.safeParse(record);
|
|
@@ -2171,8 +2225,8 @@ async function getAgentStatus(agent, config, paths, runtime) {
|
|
|
2171
2225
|
invocationError: invocation.error,
|
|
2172
2226
|
};
|
|
2173
2227
|
}
|
|
2174
|
-
async function statusData(paths) {
|
|
2175
|
-
const config = await readConnectorConfig(paths);
|
|
2228
|
+
async function statusData(paths, cwd) {
|
|
2229
|
+
const config = await readConnectorConfig(paths, cwd);
|
|
2176
2230
|
let configMode = null;
|
|
2177
2231
|
try {
|
|
2178
2232
|
const metadata = await stat(paths.config);
|
|
@@ -2192,6 +2246,7 @@ async function statusData(paths) {
|
|
|
2192
2246
|
schemaVersion: "lore-cli-status-v1",
|
|
2193
2247
|
integrationContractVersion: RELIABILITY_INTEGRATION_CONTRACT_VERSION,
|
|
2194
2248
|
connected: config !== null,
|
|
2249
|
+
connection: config?.connectionName ?? null,
|
|
2195
2250
|
apiUrl: config?.apiUrl ?? null,
|
|
2196
2251
|
config: paths.config,
|
|
2197
2252
|
configMode,
|
|
@@ -2210,7 +2265,9 @@ async function statusCommand(args) {
|
|
|
2210
2265
|
if (parsed === null) {
|
|
2211
2266
|
return;
|
|
2212
2267
|
}
|
|
2213
|
-
const data = await statusData(getLorePaths());
|
|
2268
|
+
const data = await statusData(getLorePaths(), process.cwd());
|
|
2269
|
+
if (!parsed.json && data.connection)
|
|
2270
|
+
process.stdout.write(`connection: ${data.connection}\n`);
|
|
2214
2271
|
const agentLines = data.agents
|
|
2215
2272
|
.map((agent) => `${agent.agent}: ${agent.configured ? "configured" : "not configured"}, installation ${agent.installation.state}, invocation ${agent.invocation.state}${agent.invocationError === null ? "" : ` (${agent.invocationError})`}, capture ${agent.capabilities.captureDurability}, guard ${agent.capabilities.guardBoundaryCoverage}/${agent.capabilities.enforcement}`)
|
|
2216
2273
|
.join("\n");
|
|
@@ -2268,8 +2325,10 @@ export async function disconnectInstallation(paths = getLorePaths(), preservePen
|
|
|
2268
2325
|
}
|
|
2269
2326
|
await Promise.all([
|
|
2270
2327
|
rm(paths.config, { force: true }),
|
|
2328
|
+
rm(resolve(paths.loreDirectory, "connections"), { recursive: true, force: true }),
|
|
2271
2329
|
rm(paths.runtime, { force: true }),
|
|
2272
2330
|
rm(paths.runtimeRepository, { force: true }),
|
|
2331
|
+
rm(resolve(dirname(paths.runtime), "directory-policy.js"), { force: true }),
|
|
2273
2332
|
rm(paths.runtimeReliabilityStore, { force: true }),
|
|
2274
2333
|
rm(paths.runtimeSignedSnapshot, { force: true }),
|
|
2275
2334
|
rm(paths.runtimeCanonicalJson, { force: true }),
|
|
@@ -2401,8 +2460,8 @@ async function doctorCommand(args) {
|
|
|
2401
2460
|
return;
|
|
2402
2461
|
}
|
|
2403
2462
|
const paths = getLorePaths();
|
|
2404
|
-
const config = await readConnectorConfig(paths);
|
|
2405
|
-
const status = await statusData(paths);
|
|
2463
|
+
const config = await readConnectorConfig(paths, process.cwd());
|
|
2464
|
+
const status = await statusData(paths, process.cwd());
|
|
2406
2465
|
const checks = [];
|
|
2407
2466
|
checks.push({
|
|
2408
2467
|
name: "platform",
|
|
@@ -2631,7 +2690,7 @@ export async function runCli(args = process.argv.slice(2)) {
|
|
|
2631
2690
|
const directory = getLorePaths().loreDirectory;
|
|
2632
2691
|
if (!await telemetryEnabled(directory))
|
|
2633
2692
|
return executeCli(args);
|
|
2634
|
-
const before = await readConnectorConfig(getLorePaths());
|
|
2693
|
+
const before = await readConnectorConfig(getLorePaths(), command === "connect" || command === "disconnect" ? undefined : process.cwd()).catch(() => null);
|
|
2635
2694
|
const started = performance.now();
|
|
2636
2695
|
let succeeded = false;
|
|
2637
2696
|
try {
|
|
@@ -2662,7 +2721,7 @@ async function executeCli(args = process.argv.slice(2)) {
|
|
|
2662
2721
|
const helpIndex = args.findIndex((value, index) => index > 0 && (separator < 0 || index < separator) && (value === "--help" || value === "-h"));
|
|
2663
2722
|
if (helpIndex > 0) {
|
|
2664
2723
|
const subcommand = args[1];
|
|
2665
|
-
const grouped = ["connect", "guard", "recovery", "github", "devin", "host", "self-host"].includes(command ?? "");
|
|
2724
|
+
const grouped = ["connect", "config", "guard", "recovery", "github", "devin", "host", "self-host", "scope"].includes(command ?? "");
|
|
2666
2725
|
await printCommandHelp([command, ...(grouped && subcommand && !subcommand.startsWith("-") ? [subcommand] : [])]);
|
|
2667
2726
|
return;
|
|
2668
2727
|
}
|
|
@@ -2675,7 +2734,30 @@ async function executeCli(args = process.argv.slice(2)) {
|
|
|
2675
2734
|
return;
|
|
2676
2735
|
}
|
|
2677
2736
|
const commandArgs = args.slice(1);
|
|
2737
|
+
if (["ask", "remember", "share", "resume", "continue"].includes(command)) {
|
|
2738
|
+
const decision = await checkDirectory(process.cwd(), getLorePaths().home);
|
|
2739
|
+
if (!decision.allowed)
|
|
2740
|
+
throw new Error(`Lore is off in this folder. ${decision.reason}`);
|
|
2741
|
+
}
|
|
2678
2742
|
switch (command) {
|
|
2743
|
+
case "connections":
|
|
2744
|
+
if (commandArgs.length)
|
|
2745
|
+
throw new Error("Usage: lore connections");
|
|
2746
|
+
await listConnections(getLorePaths().home);
|
|
2747
|
+
return;
|
|
2748
|
+
case "config":
|
|
2749
|
+
await runConfigCommand(commandArgs, getLorePaths().config);
|
|
2750
|
+
return;
|
|
2751
|
+
case "scope": {
|
|
2752
|
+
if (commandArgs[0] !== "check" || commandArgs.length > 2)
|
|
2753
|
+
throw new Error("Usage: lore scope check [folder]");
|
|
2754
|
+
const paths = getLorePaths();
|
|
2755
|
+
const cwd = resolve(commandArgs[1] ?? process.cwd());
|
|
2756
|
+
const config = await readConnectorConfig(paths, cwd);
|
|
2757
|
+
const decision = config ? await checkLoreAccess(cwd, paths.home, config) : await checkDirectory(cwd, paths.home);
|
|
2758
|
+
process.stdout.write(`Lore is ${decision.allowed ? "on" : "off"} in ${cwd}\n${config?.connectionName ? `Connection: ${config.connectionName}\n` : ""}${decision.reason}${decision.pattern ? `: ${decision.pattern}` : ""}\n`);
|
|
2759
|
+
return;
|
|
2760
|
+
}
|
|
2679
2761
|
case "telemetry":
|
|
2680
2762
|
await runTelemetryCommand(commandArgs, getLorePaths().loreDirectory);
|
|
2681
2763
|
return;
|
|
@@ -2687,22 +2769,22 @@ async function executeCli(args = process.argv.slice(2)) {
|
|
|
2687
2769
|
await connectCommand(commandArgs);
|
|
2688
2770
|
return;
|
|
2689
2771
|
case "share":
|
|
2690
|
-
await runShareCommand(commandArgs, await readConnectorConfig(getLorePaths()));
|
|
2772
|
+
await runShareCommand(commandArgs, await readConnectorConfig(getLorePaths(), process.cwd()));
|
|
2691
2773
|
return;
|
|
2692
2774
|
case "ask":
|
|
2693
|
-
await runAskCommand(commandArgs, await readConnectorConfig(getLorePaths()));
|
|
2775
|
+
await runAskCommand(commandArgs, await readConnectorConfig(getLorePaths(), process.cwd()));
|
|
2694
2776
|
return;
|
|
2695
2777
|
case "remember":
|
|
2696
|
-
await runRememberCommand(commandArgs, await readConnectorConfig(getLorePaths()));
|
|
2778
|
+
await runRememberCommand(commandArgs, await readConnectorConfig(getLorePaths(), process.cwd()));
|
|
2697
2779
|
return;
|
|
2698
2780
|
case "guard":
|
|
2699
|
-
await runGuardCommand(commandArgs, await readConnectorConfig(getLorePaths()));
|
|
2781
|
+
await runGuardCommand(commandArgs, await readConnectorConfig(getLorePaths(), process.cwd()));
|
|
2700
2782
|
return;
|
|
2701
2783
|
case "resume":
|
|
2702
|
-
await runResumeCommand(commandArgs, await readConnectorConfig(getLorePaths()), getLorePaths());
|
|
2784
|
+
await runResumeCommand(commandArgs, await readConnectorConfig(getLorePaths(), process.cwd()), getLorePaths());
|
|
2703
2785
|
return;
|
|
2704
2786
|
case "continue":
|
|
2705
|
-
await runContinueCommand(commandArgs, await readConnectorConfig(getLorePaths()), getLorePaths());
|
|
2787
|
+
await runContinueCommand(commandArgs, await readConnectorConfig(getLorePaths(), process.cwd()), getLorePaths());
|
|
2706
2788
|
return;
|
|
2707
2789
|
case "run":
|
|
2708
2790
|
await runWrappedAgent(commandArgs, getLorePaths(process.env.LORE_HOME));
|
|
@@ -2724,16 +2806,16 @@ async function executeCli(args = process.argv.slice(2)) {
|
|
|
2724
2806
|
}
|
|
2725
2807
|
return;
|
|
2726
2808
|
case "attach":
|
|
2727
|
-
await runAttachCommand(commandArgs, await readConnectorConfig(getLorePaths()), getLorePaths());
|
|
2809
|
+
await runAttachCommand(commandArgs, await readConnectorConfig(getLorePaths(), process.cwd()), getLorePaths());
|
|
2728
2810
|
return;
|
|
2729
2811
|
case "machines":
|
|
2730
|
-
await runMachinesCommand(commandArgs, await readConnectorConfig(getLorePaths()), getLorePaths());
|
|
2812
|
+
await runMachinesCommand(commandArgs, await readConnectorConfig(getLorePaths(), process.cwd()), getLorePaths());
|
|
2731
2813
|
return;
|
|
2732
2814
|
case "live-host":
|
|
2733
|
-
await runLiveHostCommand(commandArgs, await readConnectorConfig(getLorePaths()), getLorePaths());
|
|
2815
|
+
await runLiveHostCommand(commandArgs, await readConnectorConfig(getLorePaths(), process.cwd()), getLorePaths());
|
|
2734
2816
|
return;
|
|
2735
2817
|
case "live-run":
|
|
2736
|
-
await runLiveRunCommand(commandArgs, await readConnectorConfig(getLorePaths()), getLorePaths());
|
|
2818
|
+
await runLiveRunCommand(commandArgs, await readConnectorConfig(getLorePaths(), process.cwd()), getLorePaths());
|
|
2737
2819
|
return;
|
|
2738
2820
|
case "github":
|
|
2739
2821
|
await runGithubCommand(commandArgs);
|
|
@@ -2766,7 +2848,7 @@ async function executeCli(args = process.argv.slice(2)) {
|
|
|
2766
2848
|
});
|
|
2767
2849
|
return;
|
|
2768
2850
|
case "demo":
|
|
2769
|
-
await runDemoCommand(commandArgs, await readConnectorConfig(getLorePaths()));
|
|
2851
|
+
await runDemoCommand(commandArgs, await readConnectorConfig(getLorePaths(), process.cwd()));
|
|
2770
2852
|
return;
|
|
2771
2853
|
case "update":
|
|
2772
2854
|
await updateCommand(commandArgs);
|