@lore-co/cli 0.2.14 → 0.2.15

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.
Files changed (70) hide show
  1. package/README.md +78 -4
  2. package/dist/capture-scope.d.ts +12 -0
  3. package/dist/capture-scope.d.ts.map +1 -0
  4. package/dist/capture-scope.js +45 -0
  5. package/dist/capture-scope.js.map +1 -0
  6. package/dist/cli.d.ts +7 -1
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +118 -36
  9. package/dist/cli.js.map +1 -1
  10. package/dist/command-help.d.ts +2 -1
  11. package/dist/command-help.d.ts.map +1 -1
  12. package/dist/command-help.js +4 -1
  13. package/dist/command-help.js.map +1 -1
  14. package/dist/connect-project.d.ts +15 -0
  15. package/dist/connect-project.d.ts.map +1 -0
  16. package/dist/connect-project.js +87 -0
  17. package/dist/connect-project.js.map +1 -0
  18. package/dist/connections.d.ts +3 -1
  19. package/dist/connections.d.ts.map +1 -1
  20. package/dist/connections.js +6 -1
  21. package/dist/connections.js.map +1 -1
  22. package/dist/devin-cli.d.ts.map +1 -1
  23. package/dist/devin-cli.js +14 -6
  24. package/dist/devin-cli.js.map +1 -1
  25. package/dist/devin.d.ts.map +1 -1
  26. package/dist/devin.js +5 -2
  27. package/dist/devin.js.map +1 -1
  28. package/dist/generated-assets.d.ts +5 -4
  29. package/dist/generated-assets.d.ts.map +1 -1
  30. package/dist/generated-assets.js +5 -4
  31. package/dist/generated-assets.js.map +1 -1
  32. package/dist/host.d.ts.map +1 -1
  33. package/dist/host.js +5 -5
  34. package/dist/host.js.map +1 -1
  35. package/dist/remember.d.ts.map +1 -1
  36. package/dist/remember.js +8 -1
  37. package/dist/remember.js.map +1 -1
  38. package/dist/retrieval-task.d.ts +20 -0
  39. package/dist/retrieval-task.d.ts.map +1 -0
  40. package/dist/retrieval-task.js +78 -0
  41. package/dist/retrieval-task.js.map +1 -0
  42. package/dist/runtime-redaction.d.ts +2 -0
  43. package/dist/runtime-redaction.d.ts.map +1 -0
  44. package/dist/runtime-redaction.js +69 -0
  45. package/dist/runtime-redaction.js.map +1 -0
  46. package/dist/runtime.d.ts +2 -2
  47. package/dist/runtime.d.ts.map +1 -1
  48. package/dist/runtime.js +45 -70
  49. package/dist/runtime.js.map +1 -1
  50. package/dist/self-host.d.ts +2 -1
  51. package/dist/self-host.d.ts.map +1 -1
  52. package/dist/self-host.js +4 -3
  53. package/dist/self-host.js.map +1 -1
  54. package/dist/signed-snapshot.d.ts.map +1 -1
  55. package/dist/signed-snapshot.js +2 -0
  56. package/dist/signed-snapshot.js.map +1 -1
  57. package/dist/skill-command.d.ts +20 -0
  58. package/dist/skill-command.d.ts.map +1 -0
  59. package/dist/skill-command.js +215 -0
  60. package/dist/skill-command.js.map +1 -0
  61. package/dist/skill-guidance.d.ts +2 -0
  62. package/dist/skill-guidance.d.ts.map +1 -0
  63. package/dist/skill-guidance.js +7 -0
  64. package/dist/skill-guidance.js.map +1 -0
  65. package/dist/skills.d.ts +16 -0
  66. package/dist/skills.d.ts.map +1 -0
  67. package/dist/skills.js +126 -0
  68. package/dist/skills.js.map +1 -0
  69. package/dist/update.js +3 -3
  70. package/package.json +7 -3
package/README.md CHANGED
@@ -13,6 +13,7 @@ do not block the agent.
13
13
  pnpm install --global @lore-co/cli
14
14
 
15
15
  lore connect \
16
+ --folder . \
16
17
  --login \
17
18
  --agent claude \
18
19
  --agent codex \
@@ -25,6 +26,10 @@ lore doctor
25
26
 
26
27
  The package requires Node.js 22 or newer and installs the `lore` command.
27
28
 
29
+ In Connect, **This project** asks your agent to confirm the current folder. **Choose another project** offers a native folder picker, GitHub selection, and manual path entry. The CLI also supports `--current-project` (interactive confirmation), `--choose-folder` (a picker on this machine), and `--repository github.com/owner/repo` alongside a folder choice to verify its Git origin. Cancelling or choosing a mismatched checkout stops setup before recording. GitHub selection does not change workspace policy.
30
+
31
+ Run setup from the project you want to record: `--folder .` includes that folder and its subfolders. Repeat `--folder <path>` for additional folders, or choose `--all-projects` explicitly. New connections stay paused without a capture choice; reconnecting without one preserves your existing rules. Existing exclusions remain in effect. Use `lore scope check <folder>` to verify. Learning repository scope controls where knowledge applies and is separate from capture scope.
32
+
28
33
  ### Windows
29
34
 
30
35
  Native Windows support is available in Lore 0.2.0 and newer.
@@ -34,7 +39,7 @@ The npm package uses the same commands as macOS and Linux:
34
39
 
35
40
  ```powershell
36
41
  npm.cmd install --global @lore-co/cli
37
- lore.cmd connect --login --agent claude --agent codex
42
+ lore.cmd connect --login --agent claude --agent codex --folder .
38
43
  lore.cmd doctor
39
44
  ```
40
45
 
@@ -112,6 +117,7 @@ dashboard:
112
117
 
113
118
  ```sh
114
119
  lore connect \
120
+ --folder . \
115
121
  --token "your_workspace_token" \
116
122
  --agent claude
117
123
  ```
@@ -126,6 +132,7 @@ credential internal while connecting agents:
126
132
 
127
133
  ```sh
128
134
  lore self-host up --headless --connect --agent claude --agent codex
135
+ lore connect --folder .
129
136
  ```
130
137
 
131
138
  Dashboard self-hosting uses `lore self-host up`, human signup, then:
@@ -172,6 +179,34 @@ excerpts. `--repo` and
172
179
  response. Requires a connected workspace (`lore connect`) and a server that
173
180
  exposes `POST /v1/ask`.
174
181
 
182
+ ## Use Lore with your agent
183
+
184
+ Choose **lore** in your agent's skills to find shared knowledge or save what you
185
+ learned. For example:
186
+
187
+ - “Ask Lore what we decided about authentication.”
188
+ - “Remember this session for acme/app.”
189
+ - “Save only the design decisions in Lore.”
190
+
191
+ When asked to remember, the skill saves confirmed decisions and their reasoning,
192
+ checks existing learnings, and uses the current repository's connection. Saving
193
+ requires write access and may need workspace review; it does not make a learning
194
+ a Required rule.
195
+
196
+ After updating the CLI, run `lore connect` and restart your agent. Setup replaces
197
+ the previous `lore-remember` skill with `lore`, preserving customer-edited files.
198
+ Claude Code also supports `/lore`; Codex supports `$lore`.
199
+
200
+ The skill is installed in `~/.agents/skills/lore` for Codex, Cursor, Copilot and
201
+ OpenCode, and in the configured Claude directory's `skills/lore`. Cowork and
202
+ Copilot bundles include it too. Polytoken does not receive a skill installation.
203
+
204
+ Installation paths follow the official [Codex](https://developers.openai.com/codex/skills),
205
+ [Claude Code](https://code.claude.com/docs/en/skills),
206
+ [Copilot](https://docs.github.com/en/copilot/concepts/agents/about-agent-skills),
207
+ [Cursor](https://cursor.com/docs/skills), and [OpenCode](https://opencode.ai/docs/skills/)
208
+ skill conventions.
209
+
175
210
  ## Save knowledge manually
176
211
 
177
212
  ```sh
@@ -188,7 +223,8 @@ workspace-wide; the current repository is not inferred. The connected workspace
188
223
  determines the organization.
189
224
 
190
225
  `--category` defaults to `other`; run `lore remember --help` for the supported
191
- categories. `--agent` identifies the source and defaults to `human`. The command
226
+ categories. `--agent` identifies the source and defaults to `human`; `--session`
227
+ preserves its actual session ID when known. The command
192
228
  prints the saved learning's ID, content, scope, category, and status, and reports
193
229
  an existing learning when the server deduplicates it. `--json` returns the full
194
230
  `{ memory, inserted }` response for scripts. Use `--` before statement text that
@@ -207,8 +243,46 @@ an updated CLI and API. MCP hosts can use the equivalent tools with writes
207
243
  enabled. See [Make this repeatable](../../docs/guides/repeatable-work.md) for the
208
244
  workflow and its limits.
209
245
 
246
+ ## Repository skills
247
+
248
+ Use **Learnings → Skills** to add selected `SKILL.md` files and enable or disable
249
+ them for a repository. Product discipline is included for all repositories by default.
250
+
251
+ ```sh
252
+ lore skill list
253
+ lore skill show llm-product-discipline
254
+ lore skill discover --folder ./my-project
255
+ lore skill import --file .agents/skills/my-skill/SKILL.md
256
+ ```
257
+
258
+ Discovery is local. CLI imports propose skills for a workspace member to review
259
+ and enable. Use `--all-repositories` when importing to propose a workspace-wide
260
+ skill; an owner or admin must enable it. Skills guide agents under their existing permissions; supporting
261
+ scripts and assets stay in the source repository. See
262
+ [Repository skills](../../docs/guides/skills.md) for imports and MCP tools.
263
+
210
264
  ## Context Guard
211
265
 
266
+ In Learnings, select a rule template for pushes, edits to a file or folder,
267
+ deployments, commits, or terminal commands. Push rules can cover **selected
268
+ branches** (for example `main` and `release/v1`) or **all branches**. Settings
269
+ are saved separately from your explanation; changing the wording does not
270
+ silently change the check. An owner or admin enables **Ask before conflicting
271
+ actions**, and Enforce mode pauses conflicting actions for approval in supported
272
+ pre-action integrations.
273
+
274
+ Branch checks use the remote destination, including `HEAD:main`, multiple
275
+ refspecs and branch deletion. Native hooks can read local Git configuration to
276
+ resolve a simple implicit push or a source-only refspec. Unknown destinations,
277
+ wildcard pushes and broad operations such as `--mirror` require approval. A
278
+ known push to another branch is unaffected by this rule. This is a check of
279
+ reported agent actions, not a replacement for server-side branch protection;
280
+ arbitrary scripts and tools without pre-action support are not covered.
281
+
282
+ Update connected clients before enabling the new templates. An older client
283
+ cannot evaluate a structured saved policy offline and will pause until it can
284
+ verify enforcement again. Existing supported written rules remain valid.
285
+
212
286
  ```sh
213
287
  lore guard status # effective mode here, and why
214
288
  lore guard assist # set the workspace default
@@ -237,7 +311,7 @@ content-free `guard_check` audit event.
237
311
 
238
312
  ```sh
239
313
  lore update
240
- lore update --version v0.2.14
314
+ lore update --version v0.2.15
241
315
  ```
242
316
 
243
317
  `update` resolves the latest release to an exact tag, or uses the exact
@@ -582,7 +656,7 @@ same-repository, non-draft pull requests bearing the corresponding
582
656
  `lore:codex-review` or `lore:devin-review` label.
583
657
 
584
658
  Generated jobs require a published standalone binary release and default to
585
- `treadiehq/lore-releases` at `v0.2.14`. Set `LORE_CLI_REPOSITORY` to the publicly
659
+ `treadiehq/lore-releases` at `v0.2.15`. Set `LORE_CLI_REPOSITORY` to the publicly
586
660
  readable `owner/repository` and `LORE_CLI_VERSION` to an existing release tag
587
661
  when using another release source.
588
662
 
@@ -0,0 +1,12 @@
1
+ import type { DirectoryRules } from "./directory-policy.js";
2
+ export interface CaptureScopeOptions {
3
+ folders?: readonly string[];
4
+ allProjects?: boolean;
5
+ repository?: string;
6
+ }
7
+ /** Validate the choice on the recording machine before installing any hooks. */
8
+ export declare function captureDirectories(options: CaptureScopeOptions, home: string, cwd?: string): Promise<DirectoryRules | null | undefined>;
9
+ /** Ignore inherited Git location overrides: inspect the selected folder itself. */
10
+ export declare function captureGit(folder: string, args: string[]): Promise<string>;
11
+ export declare function verifyCaptureRepository(folder: string, repository: string): Promise<void>;
12
+ //# sourceMappingURL=capture-scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-scope.d.ts","sourceRoot":"","sources":["../src/capture-scope.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,WAAW,mBAAmB;IAAG,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE;AAEhH,gFAAgF;AAChF,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,SAAgB,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,GAAG,SAAS,CAAC,CAgBpJ;AAID,mFAAmF;AACnF,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAIhF;AAED,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI/F"}
@@ -0,0 +1,45 @@
1
+ import { realpath, stat } from "node:fs/promises";
2
+ import { resolve } from "node:path";
3
+ import { execFile } from "node:child_process";
4
+ import { promisify } from "node:util";
5
+ import { repositoryIdentity } from "@lore-co/core";
6
+ /** Validate the choice on the recording machine before installing any hooks. */
7
+ export async function captureDirectories(options, home, cwd = process.cwd()) {
8
+ if (options.repository !== undefined && (!/^github\.com\/[^/]+\/[^/]+$/u.test(repositoryIdentity(options.repository) ?? "") || options.allProjects || !options.folders?.length))
9
+ throw new Error("--repository needs a GitHub repository and a local --folder or --choose-folder selection.");
10
+ if (options.allProjects && options.folders !== undefined)
11
+ throw new Error("Use --folder or --all-projects, not both.");
12
+ if (options.allProjects)
13
+ return null;
14
+ if (options.folders === undefined)
15
+ return undefined;
16
+ if (!options.folders.length || options.folders.length > 100)
17
+ throw new Error("Choose between 1 and 100 folders with --folder.");
18
+ const include = [];
19
+ for (const folder of options.folders) {
20
+ if (!folder.trim() || folder.length > 2000 || /[\[\]{}!*?\x00-\x1f]/u.test(folder))
21
+ throw new Error("--folder needs a folder path, without wildcards or control characters.");
22
+ const expanded = folder.startsWith("~/") || folder.startsWith("~\\") ? resolve(home, folder.slice(2)) : resolve(cwd, folder);
23
+ const path = await realpath(expanded).catch(() => { throw new Error(`Folder does not exist: ${folder}`); });
24
+ if (!(await stat(path)).isDirectory())
25
+ throw new Error(`Not a folder: ${folder}`);
26
+ if (options.repository !== undefined)
27
+ await verifyCaptureRepository(path, options.repository);
28
+ include.push(path);
29
+ }
30
+ return { include: [...new Set(include)], exclude: [] };
31
+ }
32
+ const runGit = promisify(execFile);
33
+ /** Ignore inherited Git location overrides: inspect the selected folder itself. */
34
+ export async function captureGit(folder, args) {
35
+ const env = Object.fromEntries(Object.entries(process.env).filter(([key]) => !key.startsWith("GIT_")));
36
+ const { stdout } = await runGit("git", ["-C", folder, "-c", "core.fsmonitor=false", ...args], { env, encoding: "utf8", timeout: 5000, maxBuffer: 16_384, windowsHide: true });
37
+ return stdout.trim();
38
+ }
39
+ export async function verifyCaptureRepository(folder, repository) {
40
+ const expected = repositoryIdentity(repository);
41
+ const remote = await captureGit(folder, ["config", "--local", "--get", "remote.origin.url"]).catch(() => "");
42
+ if (!expected || repositoryIdentity(remote) !== expected)
43
+ throw new Error(`This folder does not match ${repository}. Choose its local checkout; capture settings were not changed.`);
44
+ }
45
+ //# sourceMappingURL=capture-scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-scope.js","sourceRoot":"","sources":["../src/capture-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EA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U,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACvG,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9K,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;AACvB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,MAAc,EAAE,UAAkB;IAC9E,MAAM,QAAQ,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAChD,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;IAC7G,IAAI,CAAC,QAAQ,IAAI,kBAAkB,CAAC,MAAM,CAAC,KAAK,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,8BAA8B,UAAU,iEAAiE,CAAC,CAAC;AACvL,CAAC"}
package/dist/cli.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { type DirectoryRules } from "./directory-policy.js";
3
+ import { type CaptureScopeOptions } from "./capture-scope.js";
3
4
  import { type ConnectionReference } from "./directory-policy.js";
4
5
  import { type WorkspaceIdentityResponse } from "@lore-co/core";
5
6
  import { type CommandHookAgentName } from "./runtime.js";
@@ -86,7 +87,7 @@ export interface AgentInstallation {
86
87
  configPath: string;
87
88
  }
88
89
  export declare function t3CodeProviderInstallations(settings: unknown, paths: LorePaths): AgentInstallation[];
89
- export interface ConnectWithCredentialOptions {
90
+ export interface ConnectWithCredentialOptions extends CaptureScopeOptions {
90
91
  connectionName?: string;
91
92
  fallback?: string;
92
93
  /** CLI setup opts in automatically; embedded callers can choose explicitly. */
@@ -102,6 +103,11 @@ export interface ConnectWithCredentialOptions {
102
103
  timeoutMs?: number;
103
104
  }
104
105
  export interface ConnectResult {
106
+ capture: {
107
+ folders: string[] | null;
108
+ excludedFolders: string[];
109
+ };
110
+ skillFiles: string[];
105
111
  recoveryNotice?: string;
106
112
  connected: true;
107
113
  apiUrl: string;
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
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;AAkCtB,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;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,uBAAuB,EAAE,MAAM,CAAC;IAChC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;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4,8 @@ import { reportCommand, runTelemetryCommand, telemetryEnabled, trackedCommand, T
4
4
  import { secureWindowsDirectory, windowsPermissionsArePrivate } from "./windows-permissions.js";
5
5
  import { COMMAND_GUIDES, ROOT_HELP, helpTopic } from "./command-help.js";
6
6
  import { runShareCommand } from "./share.js";
7
+ import { resolveConnectProject, validateConnectProjectOptions } from "./connect-project.js";
8
+ import { captureDirectories } from "./capture-scope.js";
7
9
  import { prepareConnection, persistConnection, listConnections } from "./connections.js";
8
10
  import { connectionReferences, resolveLocalConnection } from "./directory-policy.js";
9
11
  import { withDirectoryLock } from "./reliability-store.js";
@@ -23,7 +25,9 @@ import { runHook, } from "./runtime.js";
23
25
  import { readInvocationHealthWriteInput, runInvocationHealthWrite, } from "./invocation-health-writer.js";
24
26
  import { runAskCommand } from "./ask.js";
25
27
  import { runRememberCommand } from "./remember.js";
28
+ import { installLoreSkill, removeLoreSkill } from "./skills.js";
26
29
  import { runApproachCommand } from "./approach.js";
30
+ import { runSkillCommand } from "./skill-command.js";
27
31
  import { runGuardCommand } from "./guard.js";
28
32
  import { runContinueCommand, runResumeCommand } from "./handoff.js";
29
33
  import { disableRecovery, prepareAutomaticRecovery, prepareRecoveryInstallation, runRecoveryCommand, runRecoveryHook, runWrappedAgent } from "./recovery.js";
@@ -97,6 +101,11 @@ Usage:
97
101
 
98
102
  Options:
99
103
  --name <name> Name this account/workspace connection (e.g. work)
104
+ --current-project Confirm and record the current Git project
105
+ --choose-folder Open a folder picker on this machine
106
+ --repository <repo> Verify the selected folder matches this GitHub repository
107
+ --folder <path> Record only in this folder and subfolders (repeatable)
108
+ --all-projects Record in all projects allowed by your workspace
100
109
  --url <url> Lore API base URL (default: https://api.uselore.co)
101
110
  --dashboard-url <url> Lore dashboard URL (default: https://uselore.co for hosted Lore)
102
111
  --login Approve access securely in the Lore dashboard
@@ -109,8 +118,12 @@ Options:
109
118
  --json Print machine-readable output
110
119
  --help Show this command's help
111
120
 
121
+ New connections stay paused until you choose a project, a folder, or --all-projects.
122
+ Reconnecting without a capture option keeps your saved folder rules.
123
+ Folder choices control capture; learning scope controls where knowledge applies.
124
+
112
125
  Examples:
113
- lore connect --login --agent claude
126
+ lore connect --login --agent claude --folder .
114
127
  lore connect --login --agent cowork
115
128
  lore connect --token "$LORE_WORKSPACE_TOKEN" --agent claude
116
129
  lore connect --url http://localhost:3004 --token dev-token --agent codex
@@ -1421,7 +1434,11 @@ async function installRuntime(paths) {
1421
1434
  rm(resolve(dirname(paths.runtime), "image-bytes.js"), { force: true }),
1422
1435
  rm(resolve(dirname(paths.runtime), "image-capture.js"), { force: true }),
1423
1436
  rm(resolve(dirname(paths.runtime), "retained-context.js"), { force: true }),
1437
+ rm(resolve(dirname(paths.runtime), "retrieval-task.js"), { force: true }),
1438
+ rm(resolve(dirname(paths.runtime), "runtime-redaction.js"), { force: true }),
1439
+ rm(resolve(dirname(paths.runtime), "user-message.js"), { force: true }),
1424
1440
  rm(resolve(dirname(paths.runtime), "approach-guidance.js"), { force: true }),
1441
+ rm(resolve(dirname(paths.runtime), "skill-guidance.js"), { force: true }),
1425
1442
  rm(paths.runtimeContextFallback, { force: true }),
1426
1443
  rm(paths.runtimeInvocationHealthWriter, { force: true }),
1427
1444
  rm(paths.runtimeVersion, { force: true }),
@@ -1454,7 +1471,11 @@ async function installRuntime(paths) {
1454
1471
  "image-bytes.js": imageBytes,
1455
1472
  "image-capture.js": imageCapture,
1456
1473
  "retained-context.js": await readFile(resolve(sourceDirectory, "retained-context.js"), "utf8"),
1474
+ "retrieval-task.js": (await readFile(resolve(sourceDirectory, "retrieval-task.js"), "utf8")).replaceAll("@lore-co/core/user-message", "./user-message.js"),
1475
+ "runtime-redaction.js": await readFile(resolve(sourceDirectory, "runtime-redaction.js"), "utf8"),
1476
+ "user-message.js": await readFile(fileURLToPath(import.meta.resolve("@lore-co/core/user-message")), "utf8"),
1457
1477
  "approach-guidance.js": await readFile(resolve(sourceDirectory, "approach-guidance.js"), "utf8"),
1478
+ "skill-guidance.js": await readFile(resolve(sourceDirectory, "skill-guidance.js"), "utf8"),
1458
1479
  "repository.js": repository,
1459
1480
  "repository-address.js": await readFile(resolve(dirname(fileURLToPath(import.meta.resolve("@lore-co/core/repository-location"))), "repository-address.js"), "utf8"),
1460
1481
  "directory-policy.js": (await readFile(fileURLToPath(import.meta.resolve("@lore-co/core/local-scope")), "utf8")).replaceAll("./repository-location.js", "./repository.js"),
@@ -1481,7 +1502,11 @@ async function installRuntime(paths) {
1481
1502
  atomicWrite(resolve(dirname(paths.runtime), "image-bytes.js"), imageBytes, 0o600),
1482
1503
  atomicWrite(resolve(dirname(paths.runtime), "image-capture.js"), imageCapture, 0o600),
1483
1504
  atomicWrite(resolve(dirname(paths.runtime), "retained-context.js"), runtimeFiles["retained-context.js"], 0o600),
1505
+ atomicWrite(resolve(dirname(paths.runtime), "retrieval-task.js"), runtimeFiles["retrieval-task.js"], 0o600),
1506
+ atomicWrite(resolve(dirname(paths.runtime), "runtime-redaction.js"), runtimeFiles["runtime-redaction.js"], 0o600),
1507
+ atomicWrite(resolve(dirname(paths.runtime), "user-message.js"), runtimeFiles["user-message.js"], 0o600),
1484
1508
  atomicWrite(resolve(dirname(paths.runtime), "approach-guidance.js"), runtimeFiles["approach-guidance.js"], 0o600),
1509
+ atomicWrite(resolve(dirname(paths.runtime), "skill-guidance.js"), runtimeFiles["skill-guidance.js"], 0o600),
1485
1510
  atomicWrite(paths.runtimeRepository, repository, 0o600),
1486
1511
  atomicWrite(resolve(dirname(paths.runtime), "repository-address.js"), runtimeFiles["repository-address.js"], 0o600),
1487
1512
  atomicWrite(resolve(dirname(paths.runtime), "directory-policy.js"), runtimeFiles["directory-policy.js"], 0o600),
@@ -1555,7 +1580,21 @@ function parseConnectArguments(args) {
1555
1580
  parsed.recovery = false;
1556
1581
  continue;
1557
1582
  }
1558
- if (argument !== "--name" &&
1583
+ if (argument === "--current-project") {
1584
+ parsed.currentProject = true;
1585
+ continue;
1586
+ }
1587
+ if (argument === "--choose-folder") {
1588
+ parsed.chooseFolder = true;
1589
+ continue;
1590
+ }
1591
+ if (argument === "--all-projects") {
1592
+ parsed.allProjects = true;
1593
+ continue;
1594
+ }
1595
+ if (argument !== "--repository" &&
1596
+ argument !== "--folder" &&
1597
+ argument !== "--name" &&
1559
1598
  argument !== "--url" &&
1560
1599
  argument !== "--dashboard-url" &&
1561
1600
  argument !== "--token" &&
@@ -1566,7 +1605,13 @@ function parseConnectArguments(args) {
1566
1605
  }
1567
1606
  const [value, valueIndex] = valueAfter(args, index, argument);
1568
1607
  index = valueIndex;
1569
- if (argument === "--name") {
1608
+ if (argument === "--repository") {
1609
+ parsed.repository = value;
1610
+ }
1611
+ else if (argument === "--folder") {
1612
+ (parsed.folders ??= []).push(value);
1613
+ }
1614
+ else if (argument === "--name") {
1570
1615
  parsed.connectionName = value;
1571
1616
  }
1572
1617
  else if (argument === "--fallback") {
@@ -1597,6 +1642,7 @@ function parseConnectArguments(args) {
1597
1642
  throw new Error("--agent must be claude, codex, copilot, copilot-cli, copilot-vscode, cowork, cursor, opencode, polytoken, or t3code");
1598
1643
  }
1599
1644
  }
1645
+ validateConnectProjectOptions(parsed);
1600
1646
  if (parsed.login && parsed.token !== undefined) {
1601
1647
  throw new Error("--login and --token cannot be used together");
1602
1648
  }
@@ -1661,7 +1707,8 @@ async function connectWithCredentialLocked(options, identity) {
1661
1707
  ? existing.apiUrl === apiUrl && existing.token === token ? identity
1662
1708
  : await authenticatedIdentity(existing.apiUrl, existing.token, timeoutMs).catch(() => undefined)
1663
1709
  : undefined;
1664
- const connection = await prepareConnection(paths, identity, { apiUrl, token, ...(options.connectionName ? { connectionName: options.connectionName } : {}) }, previousIdentity);
1710
+ const directories = await captureDirectories(options, paths.home, options.cwd);
1711
+ const connection = await prepareConnection(paths, identity, { apiUrl, token, ...(directories === undefined ? {} : { directories }), ...(options.connectionName ? { connectionName: options.connectionName } : {}) }, previousIdentity);
1665
1712
  await secureWindowsDirectory(paths.loreDirectory);
1666
1713
  const recoveryEnv = options.home === undefined ? process.env : { ...process.env, ZDOTDIR: paths.home };
1667
1714
  let recoveryWarning;
@@ -1708,6 +1755,31 @@ async function connectWithCredentialLocked(options, identity) {
1708
1755
  cursorMcpDocuments.set(mcpPath, { document: mcp, merged: mergeLoreCursorMcp(mcp.exists ? mcp.value : {}, paths) });
1709
1756
  }
1710
1757
  }
1758
+ const agentConfigPaths = {};
1759
+ for (const agent of agents) {
1760
+ agentConfigPaths[agent] = installations
1761
+ .filter((installation) => installation.agent === agent)
1762
+ .map((installation) => installation.configPath);
1763
+ }
1764
+ const config = {
1765
+ ...connection.fields,
1766
+ version: 2,
1767
+ apiUrl,
1768
+ ...(dashboardUrl === undefined ? {} : { dashboardUrl }),
1769
+ workspaceId: identity.workspaceId,
1770
+ token: token.trim(),
1771
+ agents,
1772
+ agentConfigPaths,
1773
+ connectedAt: connection.profiles.find(value => value.connectionId === connection.fields.connectionId)?.connectedAt ?? now.toISOString(),
1774
+ timeoutMs,
1775
+ };
1776
+ const reliabilityStore = new ReliabilityStore(identity.workspaceId, {
1777
+ home: paths.home,
1778
+ connectionId: config.connectionId,
1779
+ });
1780
+ await reliabilityStore.initialize();
1781
+ // Folder restrictions must be durable before any new hook can run.
1782
+ await persistConnection(paths, config, connection.profiles);
1711
1783
  if (installations.some((installation) => targetFor(installation.agent).runtimeRequired)) {
1712
1784
  await installRuntime(paths);
1713
1785
  }
@@ -1735,30 +1807,6 @@ async function connectWithCredentialLocked(options, identity) {
1735
1807
  backups.push(result.backup);
1736
1808
  }
1737
1809
  }
1738
- const agentConfigPaths = {};
1739
- for (const agent of agents) {
1740
- agentConfigPaths[agent] = installations
1741
- .filter((installation) => installation.agent === agent)
1742
- .map((installation) => installation.configPath);
1743
- }
1744
- const config = {
1745
- ...connection.fields,
1746
- version: 2,
1747
- apiUrl,
1748
- ...(dashboardUrl === undefined ? {} : { dashboardUrl }),
1749
- workspaceId: identity.workspaceId,
1750
- token: token.trim(),
1751
- agents,
1752
- agentConfigPaths,
1753
- connectedAt: connection.profiles.find(value => value.connectionId === connection.fields.connectionId)?.connectedAt ?? now.toISOString(),
1754
- timeoutMs,
1755
- };
1756
- const reliabilityStore = new ReliabilityStore(identity.workspaceId, {
1757
- home: paths.home,
1758
- connectionId: config.connectionId,
1759
- });
1760
- await reliabilityStore.initialize();
1761
- await persistConnection(paths, config, connection.profiles);
1762
1810
  if (existing && !existing.connectionId && existing.apiUrl === apiUrl && existing.token === token) {
1763
1811
  await new ReliabilityStore(identity.workspaceId, { home: paths.home }).transferPendingTo(reliabilityStore);
1764
1812
  await reliabilityStore.migrateLegacyQueue(paths.queue);
@@ -1778,7 +1826,10 @@ async function connectWithCredentialLocked(options, identity) {
1778
1826
  .catch((error) => [`Host recovery setup: ${error.message}`]) : [];
1779
1827
  if (options.recovery === false)
1780
1828
  await disableRecovery(paths.home);
1829
+ const skills = await installLoreSkill(paths, installations);
1781
1830
  return {
1831
+ capture: { folders: config.directories?.include ?? null, excludedFolders: config.directories?.exclude ?? [] },
1832
+ skillFiles: skills.files,
1782
1833
  connected: true,
1783
1834
  apiUrl: config.apiUrl,
1784
1835
  identity,
@@ -1786,7 +1837,7 @@ async function connectWithCredentialLocked(options, identity) {
1786
1837
  config: paths.config,
1787
1838
  changedHookFiles,
1788
1839
  backups,
1789
- 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")
1840
+ warnings: [...skills.warnings, ...(connection.needsFolders ? [`Lore is off for ${config.connectionName} until you choose where to record. Reconnect with --folder <path> or --all-projects, or run lore config open --connection ${config.connectionName}.`] : []), ...requestedExpansion.warnings, ...hostRecoveryWarnings, ...(agents.includes("codex")
1790
1841
  ? ["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."]
1791
1842
  : [])],
1792
1843
  ...(recoveryNotice ? { recoveryNotice } : {}),
@@ -1940,6 +1991,7 @@ async function connectCommand(args) {
1940
1991
  if (parsed.login && hasProvidedToken) {
1941
1992
  throw new Error("--login cannot be combined with an explicit or environment workspace token. Unset it or use the token directly.");
1942
1993
  }
1994
+ const capture = await resolveConnectProject(parsed, paths.home);
1943
1995
  const authorization = parsed.login
1944
1996
  ? await requestDeviceAuthorization({
1945
1997
  apiUrl,
@@ -1953,6 +2005,7 @@ async function connectCommand(args) {
1953
2005
  throw new Error("Workspace token is required. Use --login, --token <token>, LORE_WORKSPACE_TOKEN, or LORE_TOKEN.");
1954
2006
  }
1955
2007
  const result = await connectWithCredential({
2008
+ ...capture,
1956
2009
  ...(parsed.connectionName === undefined ? {} : { connectionName: parsed.connectionName }),
1957
2010
  ...(parsed.fallback === undefined ? {} : { fallback: parsed.fallback }),
1958
2011
  recovery: parsed.recovery ?? true,
@@ -1964,7 +2017,9 @@ async function connectCommand(args) {
1964
2017
  });
1965
2018
  if (authorization)
1966
2019
  await acknowledgeDeviceAuthorization(apiUrl, authorization);
1967
- 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("")}`);
2020
+ const captureSummary = result.capture.folders === null ? "all projects allowed by the workspace"
2021
+ : result.capture.folders.length ? result.capture.folders.join(", ") : "paused — choose folders with --folder <path>";
2022
+ writeResult(result, parsed.json, `access authorized; integrations installed: ${result.agents.join(", ")}\napi_url: ${result.apiUrl}\nconfig: ${result.config}\ncapture: ${captureSummary}${result.capture.excludedFolders.length ? `; excluded: ${result.capture.excludedFolders.join(", ")}` : ""}\nRestart your agent and complete a turn, then run lore doctor to verify recording.\n${result.skillFiles.length ? 'Choose lore in your agent’s skills to find knowledge or remember this session.\n' : ''}${result.recoveryNotice ? `${result.recoveryNotice}\n` : ""}${result.warnings.map((warning) => `warning: ${warning}\n`).join("")}`);
1968
2023
  }
1969
2024
  async function queueCount(paths) {
1970
2025
  try {
@@ -2052,7 +2107,11 @@ async function inspectRuntimeInstallation(required, paths) {
2052
2107
  "image-bytes.js": resolve(dirname(paths.runtime), "image-bytes.js"),
2053
2108
  "image-capture.js": resolve(dirname(paths.runtime), "image-capture.js"),
2054
2109
  "retained-context.js": resolve(dirname(paths.runtime), "retained-context.js"),
2110
+ "retrieval-task.js": resolve(dirname(paths.runtime), "retrieval-task.js"),
2111
+ "runtime-redaction.js": resolve(dirname(paths.runtime), "runtime-redaction.js"),
2112
+ "user-message.js": resolve(dirname(paths.runtime), "user-message.js"),
2055
2113
  "approach-guidance.js": resolve(dirname(paths.runtime), "approach-guidance.js"),
2114
+ "skill-guidance.js": resolve(dirname(paths.runtime), "skill-guidance.js"),
2056
2115
  "repository.js": paths.runtimeRepository,
2057
2116
  "repository-address.js": resolve(dirname(paths.runtime), "repository-address.js"),
2058
2117
  "directory-policy.js": resolve(dirname(paths.runtime), "directory-policy.js"),
@@ -2238,8 +2297,18 @@ async function getAgentStatus(agent, config, paths, runtime) {
2238
2297
  invocationError: invocation.error,
2239
2298
  };
2240
2299
  }
2300
+ // Diagnostics remain available when the current folder has capture disabled.
2301
+ // A fallback reads only the last saved connection; it never enables capture.
2302
+ async function diagnosticConfig(paths, cwd) {
2303
+ try {
2304
+ return await readConnectorConfig(paths, cwd);
2305
+ }
2306
+ catch {
2307
+ return readConnectorConfig(paths);
2308
+ }
2309
+ }
2241
2310
  async function statusData(paths, cwd) {
2242
- const config = await readConnectorConfig(paths, cwd);
2311
+ const config = await diagnosticConfig(paths, cwd);
2243
2312
  let configMode = null;
2244
2313
  try {
2245
2314
  const metadata = await stat(paths.config);
@@ -2256,6 +2325,7 @@ async function statusData(paths, cwd) {
2256
2325
  Promise.all(CONFIGURED_AGENT_NAMES.map(async (agent) => getAgentStatus(agent, config, paths, runtime))),
2257
2326
  ]);
2258
2327
  return {
2328
+ folderAccess: await checkDirectory(cwd, paths.home, config ?? undefined),
2259
2329
  schemaVersion: "lore-cli-status-v1",
2260
2330
  integrationContractVersion: RELIABILITY_INTEGRATION_CONTRACT_VERSION,
2261
2331
  connected: config !== null,
@@ -2290,7 +2360,7 @@ async function statusCommand(args) {
2290
2360
  const metricRate = (value) => value === null || value === undefined
2291
2361
  ? "-"
2292
2362
  : `${(value * 100).toFixed(1)}%`;
2293
- writeResult(data, parsed.json, `connected: ${data.connected ? "yes" : "no"}\napi_url: ${data.apiUrl ?? "-"}\nconfig_mode: ${data.configMode ?? "-"}\nruntime: ${data.runtimeRequired ? (data.runtimeInstalled ? `installed (${data.runtimeVersion})` : data.runtimeVersion === null ? "missing" : `stale (${data.runtimeVersion})`) : "not required"}\ndurable_outbox: ${data.reliability?.outbox.total ?? 0} ready=${data.reliability?.outbox.ready ?? 0} auth_blocked=${data.reliability?.outbox.authBlocked ?? 0} dead=${data.reliability?.outbox.dead ?? 0}\noldest_capture: ${data.reliability?.outbox.oldestEnqueuedAt ?? "-"}\ncontext_snapshots: ${data.reliability?.cache.context ?? 0}\noldest_context_snapshot: ${data.reliability?.cache.oldestContextWrittenAt ?? "-"}\npolicy_snapshots: ${data.reliability?.cache.policy ?? 0}\nlocal_context_fallback_rate: ${metricRate(data.reliability?.operational.retrieval.fallbackRate)}\nlocal_guard_coverage: ${metricRate(data.reliability?.operational.guard.coverageRate)}\nlocal_guard_failures: ${data.reliability?.operational.guard.failures ?? 0}\nlocal_retrieval_failures: ${data.reliability?.operational.retrieval.failed ?? 0}\n${data.reliabilityError === null ? "" : `reliability_error: ${data.reliabilityError}\n`}${agentLines}\n${externalSurfaceLines}\n`);
2363
+ writeResult(data, parsed.json, `connected: ${data.connected ? "yes" : "no"}\ncurrent_folder: ${data.folderAccess.allowed ? "allowed" : "off"} (${data.folderAccess.reason})\napi_url: ${data.apiUrl ?? "-"}\nconfig_mode: ${data.configMode ?? "-"}\nruntime: ${data.runtimeRequired ? (data.runtimeInstalled ? `installed (${data.runtimeVersion})` : data.runtimeVersion === null ? "missing" : `stale (${data.runtimeVersion})`) : "not required"}\ndurable_outbox: ${data.reliability?.outbox.total ?? 0} ready=${data.reliability?.outbox.ready ?? 0} auth_blocked=${data.reliability?.outbox.authBlocked ?? 0} dead=${data.reliability?.outbox.dead ?? 0}\noldest_capture: ${data.reliability?.outbox.oldestEnqueuedAt ?? "-"}\ncontext_snapshots: ${data.reliability?.cache.context ?? 0}\noldest_context_snapshot: ${data.reliability?.cache.oldestContextWrittenAt ?? "-"}\npolicy_snapshots: ${data.reliability?.cache.policy ?? 0}\nlocal_context_fallback_rate: ${metricRate(data.reliability?.operational.retrieval.fallbackRate)}\nlocal_guard_coverage: ${metricRate(data.reliability?.operational.guard.coverageRate)}\nlocal_guard_failures: ${data.reliability?.operational.guard.failures ?? 0}\nlocal_retrieval_failures: ${data.reliability?.operational.retrieval.failed ?? 0}\n${data.reliabilityError === null ? "" : `reliability_error: ${data.reliabilityError}\n`}${agentLines}\n${externalSurfaceLines}\n`);
2294
2364
  }
2295
2365
  async function disconnectCommand(args) {
2296
2366
  const parsed = parseOutputArguments(args, DISCONNECT_HELP, "disconnect");
@@ -2336,6 +2406,7 @@ export async function disconnectInstallation(paths = getLorePaths(), preservePen
2336
2406
  backups.push(result.backup);
2337
2407
  }
2338
2408
  }
2409
+ await removeLoreSkill(paths, installations);
2339
2410
  await Promise.all([
2340
2411
  rm(paths.config, { force: true }),
2341
2412
  rm(resolve(paths.loreDirectory, "connections"), { recursive: true, force: true }),
@@ -2351,6 +2422,10 @@ export async function disconnectInstallation(paths = getLorePaths(), preservePen
2351
2422
  rm(resolve(dirname(paths.runtime), "image-bytes.js"), { force: true }),
2352
2423
  rm(resolve(dirname(paths.runtime), "image-capture.js"), { force: true }),
2353
2424
  rm(resolve(dirname(paths.runtime), "retained-context.js"), { force: true }),
2425
+ rm(resolve(dirname(paths.runtime), "retrieval-task.js"), { force: true }),
2426
+ rm(resolve(dirname(paths.runtime), "runtime-redaction.js"), { force: true }),
2427
+ rm(resolve(dirname(paths.runtime), "user-message.js"), { force: true }),
2428
+ rm(resolve(dirname(paths.runtime), "skill-guidance.js"), { force: true }),
2354
2429
  rm(paths.runtimeInvocationHealthWriter, { force: true }),
2355
2430
  rm(paths.runtimeVersion, { force: true }),
2356
2431
  rm(paths.runtimePackage, { force: true }),
@@ -2475,9 +2550,9 @@ async function doctorCommand(args) {
2475
2550
  return;
2476
2551
  }
2477
2552
  const paths = getLorePaths();
2478
- const config = await readConnectorConfig(paths, process.cwd());
2553
+ const config = await diagnosticConfig(paths, process.cwd());
2479
2554
  const status = await statusData(paths, process.cwd());
2480
- const checks = [];
2555
+ const checks = [{ name: "capture-folder", status: status.folderAccess.allowed ? "ok" : "warning", detail: status.folderAccess.allowed ? status.folderAccess.reason : `Recording is off here: ${status.folderAccess.reason}. Run lore scope check <folder> to verify a selected folder.` }];
2481
2556
  checks.push({
2482
2557
  name: "platform",
2483
2558
  status: platform() === "darwin" || platform() === "linux" || isWindows() ? "ok" : "error",
@@ -2664,6 +2739,9 @@ async function printCommandHelp(path) {
2664
2739
  case "approach":
2665
2740
  await runApproachCommand(args, null);
2666
2741
  return;
2742
+ case "skill":
2743
+ await runSkillCommand(args, null);
2744
+ return;
2667
2745
  case "guard":
2668
2746
  await runGuardCommand(args, null);
2669
2747
  return;
@@ -2752,8 +2830,8 @@ async function executeCli(args = process.argv.slice(2)) {
2752
2830
  return;
2753
2831
  }
2754
2832
  const commandArgs = args.slice(1);
2755
- if (["ask", "remember", "share", "resume", "continue", "approach"].includes(command)) {
2756
- const decision = await checkDirectory(process.cwd(), getLorePaths(command === "approach" ? process.env.LORE_HOME : undefined).home);
2833
+ if (["ask", "remember", "share", "resume", "continue", "approach", "skill"].includes(command) && !(command === "skill" && commandArgs[0] === "discover")) {
2834
+ const decision = await checkDirectory(process.cwd(), getLorePaths(["approach", "skill"].includes(command) ? process.env.LORE_HOME : undefined).home);
2757
2835
  if (!decision.allowed)
2758
2836
  throw new Error(`Lore is off in this folder. ${decision.reason}`);
2759
2837
  }
@@ -2798,6 +2876,9 @@ async function executeCli(args = process.argv.slice(2)) {
2798
2876
  case "approach":
2799
2877
  await runApproachCommand(commandArgs, await readConnectorConfig(getLorePaths(process.env.LORE_HOME), process.cwd()));
2800
2878
  return;
2879
+ case "skill":
2880
+ await runSkillCommand(commandArgs, commandArgs[0] === "discover" ? null : await readConnectorConfig(getLorePaths(process.env.LORE_HOME), process.cwd()));
2881
+ return;
2801
2882
  case "guard":
2802
2883
  await runGuardCommand(commandArgs, await readConnectorConfig(getLorePaths(), process.cwd()));
2803
2884
  return;
@@ -2863,6 +2944,7 @@ async function executeCli(args = process.argv.slice(2)) {
2863
2944
  });
2864
2945
  return {
2865
2946
  agents: connected.agents,
2947
+ warnings: connected.warnings,
2866
2948
  verified: await verifyConnectedInstallation(),
2867
2949
  };
2868
2950
  },