@lore-co/cli 0.2.27 → 0.2.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.
Files changed (45) hide show
  1. package/README.md +11 -9
  2. package/dist/capture-repair.d.ts +11 -0
  3. package/dist/capture-repair.d.ts.map +1 -0
  4. package/dist/capture-repair.js +94 -0
  5. package/dist/capture-repair.js.map +1 -0
  6. package/dist/cli.d.ts +54 -4
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +121 -37
  9. package/dist/cli.js.map +1 -1
  10. package/dist/command-help.d.ts +6 -2
  11. package/dist/command-help.d.ts.map +1 -1
  12. package/dist/command-help.js +39 -6
  13. package/dist/command-help.js.map +1 -1
  14. package/dist/drafts.d.ts +8 -0
  15. package/dist/drafts.d.ts.map +1 -0
  16. package/dist/drafts.js +173 -0
  17. package/dist/drafts.js.map +1 -0
  18. package/dist/generated-assets.d.ts +8 -8
  19. package/dist/generated-assets.d.ts.map +1 -1
  20. package/dist/generated-assets.js +8 -8
  21. package/dist/generated-assets.js.map +1 -1
  22. package/dist/github.d.ts.map +1 -1
  23. package/dist/github.js +8 -7
  24. package/dist/github.js.map +1 -1
  25. package/dist/lore-agent.d.ts +1 -1
  26. package/dist/lore-agent.d.ts.map +1 -1
  27. package/dist/lore-agent.js +3 -0
  28. package/dist/lore-agent.js.map +1 -1
  29. package/dist/recovery.d.ts +5 -2
  30. package/dist/recovery.d.ts.map +1 -1
  31. package/dist/recovery.js +7 -3
  32. package/dist/recovery.js.map +1 -1
  33. package/dist/remember.d.ts.map +1 -1
  34. package/dist/remember.js +30 -1
  35. package/dist/remember.js.map +1 -1
  36. package/dist/review.d.ts.map +1 -1
  37. package/dist/review.js +8 -6
  38. package/dist/review.js.map +1 -1
  39. package/dist/runtime.d.ts.map +1 -1
  40. package/dist/runtime.js +10 -7
  41. package/dist/runtime.js.map +1 -1
  42. package/dist/self-host.d.ts +1 -1
  43. package/dist/self-host.js +2 -2
  44. package/dist/update.js +3 -3
  45. package/package.json +4 -4
@@ -2,7 +2,7 @@
2
2
  export declare const COMMAND_GUIDES: {
3
3
  readonly connections: "List saved account/workspace connections. Folder rules select which one each project uses.";
4
4
  readonly config: "Open this machine's Lore config to edit folder rules or show its location.";
5
- readonly capture: "Choose whether this machine records agent turns automatically, or keeps only context, Guard, and manual saves.";
5
+ readonly capture: "Choose whether this machine records agent turns automatically, or keeps only context, Guard, and manual saves. Owners and admins also retry captures that died during a provider outage.";
6
6
  readonly scope: "Check where Lore runs using this machine’s folder rules and the workspace repository policy.";
7
7
  readonly telemetry: "Choose whether this machine sends optional command usage metadata to your connected Lore server.";
8
8
  readonly connect: "Connect this machine to a workspace and enable capture for your coding agents.";
@@ -11,6 +11,7 @@ export declare const COMMAND_GUIDES: {
11
11
  readonly learnings: "List or export every learning for a repository, for review in another tool or a script.";
12
12
  readonly review: "Approve or decline pending learning proposals without opening the dashboard (owners and admins, connected with --login).";
13
13
  readonly remember: "Save a reusable fact, convention, correction, or decision. Use --repo to limit where it applies.";
14
+ readonly drafts: "Keep rough learnings private until they are ready, then share them into a repository or the workspace.";
14
15
  readonly approach: "Make completed work repeatable, review the procedure, and reuse it for a new task.";
15
16
  readonly skill: "Find enabled skills, discover SKILL.md files locally, and propose reviewed skills for a repository.";
16
17
  readonly share: "Give a teammate a private link to a learning, session, or delivery record.";
@@ -33,7 +34,10 @@ export declare const COMMAND_GUIDES: {
33
34
  readonly host: "Integrate an agent host using explicit context delivery and conversation capture calls.";
34
35
  readonly demo: "Check a real Claude-to-Codex learning handoff. This runs agents and creates demo records in your connected workspace.";
35
36
  };
36
- export declare const ROOT_HELP = "lore \u2014 Shared knowledge and session context for coding agents\n\nUsage:\n lore <command> [options]\n lore help [command] [subcommand]\n\nEveryday work:\n connect Connect a workspace and enable agent integrations\n ask Find team knowledge and context from previous work\n chat Discuss shared knowledge in prose (read-only)\n learnings List or export a repository's learnings\n review Approve or decline pending learning proposals\n remember Save a reusable fact, convention, correction, or decision\n approach Save and reuse a reviewed approach\n skill Find and share repository skills\n share Create a private link for a teammate\n resume Pick up a saved session\n continue Hand work to another agent\n\nWorkspace and setup:\n connections List saved account/workspace connections\n config Open the local config or show its path\n capture Turn automatic turn recording on or off\n scope Check folder and workspace repository restrictions\n guard Configure context sharing and confirmation for rule conflicts\n status Check connected agents and integration activity\n doctor Diagnose missing capture, context, or connections\n embeddings Retry dead embedding jobs after fixing the provider\n update Install the latest CLI binary\n disconnect Remove this machine's integrations and credentials\n uninstall Disconnect this machine and remove the CLI\n self-host Start, inspect, or stop your own Lore server\n telemetry Manage optional command usage reporting\n\nAdditional workflows:\n run Start an agent with configured recovery\n recovery Manage fallback agents and recovery attempts\n attach Reconnect to a live session\n machines Find machines and their live sessions\n github Set up and run pull-request review workflows\n devin Manage local or cloud Devin sessions\n host Integrate another agent host\n demo Run a live learning demo in the connected workspace\n\nHelp:\n lore help List commands and their uses\n lore help remember Show options and examples\n lore help self-host up Explain a subcommand\n lore <command> --help Same as lore help <command>\n lore --version Show the installed version\n\nExamples:\n lore connect --login --agent codex --folder .\n lore ask \"What did the previous agent already try?\" --repo acme/app\n lore learnings --json\n lore review --repo acme/app\n lore remember \"Use pnpm for this repository.\" --repo acme/app\n lore continue --on claude\n lore doctor\n";
37
+ /** The everyday commands; `lore help --all` lists the rest. */
38
+ export declare const ROOT_HELP = "lore \u2014 Shared knowledge and session context for coding agents\n\nUsage:\n lore <command> [options]\n\nCommands:\n connect Connect this machine to your workspace\n ask Find what your team decided or tried before\n remember Save a fact, convention, correction, or decision\n review Approve or decline pending learnings\n learnings List a repository's learnings\n continue Hand work to another agent\n status Check which agents are connected\n update Install the latest version\n\nMore:\n lore help --all List every command\n lore help <command> Show options and examples\n lore --version Show the installed version\n\nExamples:\n lore connect --login --agent codex --folder .\n lore ask \"What did the previous agent already try?\" --repo acme/app\n lore remember \"Use pnpm for this repository.\" --repo acme/app\n lore continue --on claude\n";
39
+ /** Every public command, grouped. */
40
+ export declare const ALL_HELP = "lore \u2014 Shared knowledge and session context for coding agents\n\nUsage:\n lore <command> [options]\n lore help [command] [subcommand]\n\nEveryday work:\n connect Connect a workspace and enable agent integrations\n ask Find team knowledge and context from previous work\n chat Discuss shared knowledge in prose (read-only)\n learnings List or export a repository's learnings\n review Approve or decline pending learning proposals\n remember Save a reusable fact, convention, correction, or decision\n drafts List, share, or delete your private draft learnings\n approach Save and reuse a reviewed approach\n skill Find and share repository skills\n share Create a private link for a teammate\n resume Pick up a saved session\n continue Hand work to another agent\n\nWorkspace and setup:\n connections List saved account/workspace connections\n config Open the local config or show its path\n capture Turn automatic session recording on or off\n scope Check folder and workspace repository restrictions\n guard Configure context sharing and confirmation for rule conflicts\n status Check connected agents and integration activity\n update Install the latest CLI binary\n disconnect Remove this machine's integrations and credentials\n uninstall Disconnect this machine and remove the CLI\n self-host Start, inspect, or stop your own Lore server\n telemetry Manage optional command usage reporting\n\nAdditional workflows:\n run Start an agent with configured recovery\n recovery Manage fallback agents and recovery attempts\n attach Reconnect to a live session\n machines Find machines and their live sessions\n github Set up and run pull-request review workflows\n devin Manage local or cloud Devin sessions\n host Integrate another agent host\n demo Run a live learning demo in the connected workspace\n\nTroubleshooting:\n doctor Find why recording, context, or an agent isn't working\n embeddings Retry failed embedding jobs on a self-hosted server\n\nHelp:\n lore help List everyday commands\n lore help --all List every command\n lore help remember Show options and examples\n lore help self-host up Explain a subcommand\n lore <command> --help Same as lore help <command>\n lore --version Show the installed version\n\nExamples:\n lore connect --login --agent codex --folder .\n lore ask \"What did the previous agent already try?\" --repo acme/app\n lore learnings --json\n lore review --repo acme/app\n lore remember \"Use pnpm for this repository.\" --repo acme/app\n lore continue --on claude\n lore doctor\n";
37
41
  /** Help for commands that do not have a dedicated argument-parser help path. */
38
42
  export declare const HELP_OVERRIDES: Record<string, string>;
39
43
  export declare const HELP_SUBCOMMANDS: Record<string, readonly string[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../src/command-help.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UIDES = {
3
3
  connections: "List saved account/workspace connections. Folder rules select which one each project uses.",
4
4
  config: "Open this machine's Lore config to edit folder rules or show its location.",
5
- capture: "Choose whether this machine records agent turns automatically, or keeps only context, Guard, and manual saves.",
5
+ capture: "Choose whether this machine records agent turns automatically, or keeps only context, Guard, and manual saves. Owners and admins also retry captures that died during a provider outage.",
6
6
  scope: "Check where Lore runs using this machine’s folder rules and the workspace repository policy.",
7
7
  telemetry: "Choose whether this machine sends optional command usage metadata to your connected Lore server.",
8
8
  connect: "Connect this machine to a workspace and enable capture for your coding agents.",
@@ -11,6 +11,7 @@ export const COMMAND_GUIDES = {
11
11
  learnings: "List or export every learning for a repository, for review in another tool or a script.",
12
12
  review: "Approve or decline pending learning proposals without opening the dashboard (owners and admins, connected with --login).",
13
13
  remember: "Save a reusable fact, convention, correction, or decision. Use --repo to limit where it applies.",
14
+ drafts: "Keep rough learnings private until they are ready, then share them into a repository or the workspace.",
14
15
  approach: "Make completed work repeatable, review the procedure, and reuse it for a new task.",
15
16
  skill: "Find enabled skills, discover SKILL.md files locally, and propose reviewed skills for a repository.",
16
17
  share: "Give a teammate a private link to a learning, session, or delivery record.",
@@ -33,8 +34,36 @@ export const COMMAND_GUIDES = {
33
34
  host: "Integrate an agent host using explicit context delivery and conversation capture calls.",
34
35
  demo: "Check a real Claude-to-Codex learning handoff. This runs agents and creates demo records in your connected workspace.",
35
36
  };
37
+ /** The everyday commands; `lore help --all` lists the rest. */
36
38
  export const ROOT_HELP = `lore — Shared knowledge and session context for coding agents
37
39
 
40
+ Usage:
41
+ lore <command> [options]
42
+
43
+ Commands:
44
+ connect Connect this machine to your workspace
45
+ ask Find what your team decided or tried before
46
+ remember Save a fact, convention, correction, or decision
47
+ review Approve or decline pending learnings
48
+ learnings List a repository's learnings
49
+ continue Hand work to another agent
50
+ status Check which agents are connected
51
+ update Install the latest version
52
+
53
+ More:
54
+ lore help --all List every command
55
+ lore help <command> Show options and examples
56
+ lore --version Show the installed version
57
+
58
+ Examples:
59
+ lore connect --login --agent codex --folder .
60
+ lore ask "What did the previous agent already try?" --repo acme/app
61
+ lore remember "Use pnpm for this repository." --repo acme/app
62
+ lore continue --on claude
63
+ `;
64
+ /** Every public command, grouped. */
65
+ export const ALL_HELP = `lore — Shared knowledge and session context for coding agents
66
+
38
67
  Usage:
39
68
  lore <command> [options]
40
69
  lore help [command] [subcommand]
@@ -46,6 +75,7 @@ Everyday work:
46
75
  learnings List or export a repository's learnings
47
76
  review Approve or decline pending learning proposals
48
77
  remember Save a reusable fact, convention, correction, or decision
78
+ drafts List, share, or delete your private draft learnings
49
79
  approach Save and reuse a reviewed approach
50
80
  skill Find and share repository skills
51
81
  share Create a private link for a teammate
@@ -55,12 +85,10 @@ Everyday work:
55
85
  Workspace and setup:
56
86
  connections List saved account/workspace connections
57
87
  config Open the local config or show its path
58
- capture Turn automatic turn recording on or off
88
+ capture Turn automatic session recording on or off
59
89
  scope Check folder and workspace repository restrictions
60
90
  guard Configure context sharing and confirmation for rule conflicts
61
91
  status Check connected agents and integration activity
62
- doctor Diagnose missing capture, context, or connections
63
- embeddings Retry dead embedding jobs after fixing the provider
64
92
  update Install the latest CLI binary
65
93
  disconnect Remove this machine's integrations and credentials
66
94
  uninstall Disconnect this machine and remove the CLI
@@ -77,8 +105,13 @@ Additional workflows:
77
105
  host Integrate another agent host
78
106
  demo Run a live learning demo in the connected workspace
79
107
 
108
+ Troubleshooting:
109
+ doctor Find why recording, context, or an agent isn't working
110
+ embeddings Retry failed embedding jobs on a self-hosted server
111
+
80
112
  Help:
81
- lore help List commands and their uses
113
+ lore help List everyday commands
114
+ lore help --all List every command
82
115
  lore help remember Show options and examples
83
116
  lore help self-host up Explain a subcommand
84
117
  lore <command> --help Same as lore help <command>
@@ -274,7 +307,7 @@ export const HELP_SUBCOMMANDS = {
274
307
  skill: ["list", "show", "files", "discover", "import"],
275
308
  review: ["list", "show", "approve", "decline"],
276
309
  config: ["open", "path"],
277
- capture: ["status", "on", "off", "reminder"],
310
+ capture: ["status", "on", "off", "reminder", "repair"],
278
311
  scope: ["check"],
279
312
  connect: ["github"],
280
313
  embeddings: ["repair"],
@@ -1 +1 @@
1
- {"version":3,"file":"command-help.js","sourceRoot":"","sources":["../src/command-help.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,WAAW,EAAE,4FAA4F;IACzG,MAAM,EAAE,4EAA4E;IACpF,OAAO,EAAE,gHAAgH;IACzH,KAAK,EAAE,8FAA8F;IACrG,SAAS,EAAE,kGAAkG;IAC7G,OAAO,EAAE,gFAAgF;IACzF,GAAG,EAAE,+EAA+E;IACpF,IAAI,EAAE,uGAAuG;IAC7G,SAAS,EAAE,yFAAyF;IACpG,MAAM,EAAE,0HAA0H;IAClI,QAAQ,EAAE,kGAAkG;IAC5G,QAAQ,EAAE,oFAAoF;IAC9F,KAAK,EAAE,qGAAqG;IAC5G,KAAK,EAAE,4EAA4E;IACnF,MAAM,EAAE,6DAA6D;IACrE,QAAQ,EAAE,gEAAgE;IAC1E,KAAK,EAAE,uGAAuG;IAC9G,MAAM,EAAE,yEAAyE;IACjF,MAAM,EAAE,wFAAwF;IAChG,UAAU,EAAE,yHAAyH;IACrI,MAAM,EAAE,0CAA0C;IAClD,UAAU,EAAE,yEAAyE;IACrF,SAAS,EAAE,sGAAsG;IACjH,WAAW,EAAE,yFAAyF;IACtG,GAAG,EAAE,6EAA6E;IAClF,QAAQ,EAAE,4EAA4E;IACtF,MAAM,EAAE,sFAAsF;IAC9F,QAAQ,EAAE,2EAA2E;IACrF,MAAM,EAAE,yFAAyF;IACjG,KAAK,EAAE,kEAAkE;IACzE,IAAI,EAAE,yFAAyF;IAC/F,IAAI,EAAE,uHAAuH;CACrH,CAAC;AAEX,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DxB,CAAC;AAEF,MAAM,UAAU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,EAAE,CAAC,CAAC;IACtK,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,OAAO,IAAI,UAAU,KAAK,KAAK,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC,CAAC,IAAI,CAAC,OAAO,KAAK,UAAU,IAAI,UAAU,KAAK,OAAO,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IACjV,OAAO;QACL,OAAO,EAAE,OAAsC;QAC/C,UAAU;QACV,IAAI,EAAE,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,cAAc,CAAC,OAAO,CAAC;KAC9G,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type DraftLearning } from "@lore-co/core";
2
+ import type { ConnectorConfig } from "./cli.js";
3
+ export declare const DRAFTS_HELP = "lore drafts\nList, share, or delete your private draft learnings. Only you can see a draft,\nand only your own agents receive it, until you share it.\n\nUsage:\n lore drafts [list] [--repo <repo>] [--query <text>] [--json]\n lore drafts share <id> [--repo <repo> | --workspace-wide] [--json]\n lore drafts delete <id>\n\nOptions:\n --repo <repo> list: only drafts for this repository\n share: share into this repository (default: the\n repository saved with the draft)\n --workspace-wide share: make the learning available in every repository\n --query <text> list: only drafts whose text contains this phrase\n --json Print the machine-readable response\n --help Show this command's help\n\nSharing follows your workspace's review rules: the learning waits for review,\nor publishes when the workspace lets you publish. Workspace owners and admins\ncannot see your drafts before you share them.\n\nSave a draft with lore remember --draft. Drafts need a connection tied to you\n(lore connect --login).\n\nExamples:\n lore remember \"Try retrying token renewal with jitter.\" --draft\n lore drafts\n lore drafts share 7d1c2e44-0f0e-4a51-9d55-5f1f2b8f7a10 --repo acme/vault-enterprise\n lore drafts delete 7d1c2e44-0f0e-4a51-9d55-5f1f2b8f7a10\n";
4
+ export declare function formatDraft(draft: DraftLearning): string;
5
+ /** Failure text for every draft request, including lore remember --draft. */
6
+ export declare function draftRequestError(error: unknown, action: string): Error;
7
+ export declare function runDraftsCommand(args: readonly string[], config: ConnectorConfig | null): Promise<void>;
8
+ //# sourceMappingURL=drafts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drafts.d.ts","sourceRoot":"","sources":["../src/drafts.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,aAAa,EAEnB,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,eAAO,MAAM,WAAW,6zCA8BvB,CAAC;AAyDF,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CASxD;AAYD,6EAA6E;AAC7E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAgBvE;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B7G"}
package/dist/drafts.js ADDED
@@ -0,0 +1,173 @@
1
+ import { MemoryScopeSchema, showControlCharacters, } from "@lore-co/core";
2
+ import { LoreTransportError, SharedMemoryApiError, SharedMemoryClient } from "@lore-co/sdk";
3
+ import { ZodError } from "zod";
4
+ export const DRAFTS_HELP = `lore drafts
5
+ List, share, or delete your private draft learnings. Only you can see a draft,
6
+ and only your own agents receive it, until you share it.
7
+
8
+ Usage:
9
+ lore drafts [list] [--repo <repo>] [--query <text>] [--json]
10
+ lore drafts share <id> [--repo <repo> | --workspace-wide] [--json]
11
+ lore drafts delete <id>
12
+
13
+ Options:
14
+ --repo <repo> list: only drafts for this repository
15
+ share: share into this repository (default: the
16
+ repository saved with the draft)
17
+ --workspace-wide share: make the learning available in every repository
18
+ --query <text> list: only drafts whose text contains this phrase
19
+ --json Print the machine-readable response
20
+ --help Show this command's help
21
+
22
+ Sharing follows your workspace's review rules: the learning waits for review,
23
+ or publishes when the workspace lets you publish. Workspace owners and admins
24
+ cannot see your drafts before you share them.
25
+
26
+ Save a draft with lore remember --draft. Drafts need a connection tied to you
27
+ (lore connect --login).
28
+
29
+ Examples:
30
+ lore remember "Try retrying token renewal with jitter." --draft
31
+ lore drafts
32
+ lore drafts share 7d1c2e44-0f0e-4a51-9d55-5f1f2b8f7a10 --repo acme/vault-enterprise
33
+ lore drafts delete 7d1c2e44-0f0e-4a51-9d55-5f1f2b8f7a10
34
+ `;
35
+ function parseDraftsArguments(args) {
36
+ const positionals = [];
37
+ const parsed = { action: "list", workspaceWide: false, json: false };
38
+ for (let index = 0; index < args.length; index += 1) {
39
+ const argument = args[index];
40
+ if (argument === "--help" || argument === "-h") {
41
+ process.stdout.write(DRAFTS_HELP);
42
+ return null;
43
+ }
44
+ if (argument === "--json") {
45
+ parsed.json = true;
46
+ continue;
47
+ }
48
+ if (argument === "--workspace-wide") {
49
+ parsed.workspaceWide = true;
50
+ continue;
51
+ }
52
+ if (argument === "--repo" || argument === "--query") {
53
+ const value = args[index + 1]?.trim();
54
+ if (!value || value.startsWith("-"))
55
+ throw new Error(`Missing value for ${argument}`);
56
+ index += 1;
57
+ if (argument === "--repo") {
58
+ if (!MemoryScopeSchema.shape.repo.safeParse(value).success)
59
+ throw new Error("Invalid value for --repo");
60
+ parsed.repo = value;
61
+ }
62
+ else
63
+ parsed.query = value;
64
+ continue;
65
+ }
66
+ if (argument.startsWith("-"))
67
+ throw new Error(`Unknown drafts option: ${argument}`);
68
+ positionals.push(argument);
69
+ }
70
+ const [action, id, ...extra] = positionals;
71
+ if (action !== undefined) {
72
+ if (action !== "list" && action !== "share" && action !== "delete")
73
+ throw new Error(`Unknown drafts command: ${action}. Try: lore drafts --help`);
74
+ parsed.action = action;
75
+ }
76
+ if (parsed.action === "list") {
77
+ if (id !== undefined || parsed.workspaceWide)
78
+ throw new Error("Usage: lore drafts [list] [--repo <repo>] [--query <text>] [--json]");
79
+ }
80
+ else {
81
+ if (id === undefined || extra.length)
82
+ throw new Error(`Usage: lore drafts ${parsed.action} <id>`);
83
+ if (parsed.query !== undefined)
84
+ throw new Error("--query applies to lore drafts list.");
85
+ parsed.id = id;
86
+ }
87
+ if (parsed.action === "delete" && (parsed.repo !== undefined || parsed.workspaceWide))
88
+ throw new Error("Usage: lore drafts delete <id>");
89
+ if (parsed.workspaceWide && parsed.repo !== undefined)
90
+ throw new Error("Choose --repo or --workspace-wide, not both.");
91
+ return parsed;
92
+ }
93
+ function scopeLine(scope) {
94
+ const { organization: _organization, ...rest } = scope;
95
+ return Object.entries(rest).map(([key, value]) => `${key}: ${value}`).join(" · ");
96
+ }
97
+ export function formatDraft(draft) {
98
+ return [
99
+ `Draft: ${draft.id}`,
100
+ draft.content,
101
+ `Category: ${draft.category}`,
102
+ `Scope: ${scopeLine(draft.scope) || "repository not chosen yet"}`,
103
+ `Updated: ${draft.updatedAt}`,
104
+ "",
105
+ ].join("\n");
106
+ }
107
+ function formatShared(memory) {
108
+ return [
109
+ memory.status === "proposed" ? `Shared for review: ${memory.id}` : `Shared: ${memory.id}`,
110
+ memory.content,
111
+ `Scope: ${scopeLine(memory.scope) || "workspace-wide"}`,
112
+ `Status: ${memory.status}`,
113
+ "",
114
+ ].join("\n");
115
+ }
116
+ /** Failure text for every draft request, including lore remember --draft. */
117
+ export function draftRequestError(error, action) {
118
+ if (error instanceof SharedMemoryApiError) {
119
+ if (error.status === 401)
120
+ return new Error("Drafts need a connection tied to you. Reconnect with lore connect --login.");
121
+ if (error.status === 403)
122
+ return new Error("This workspace does not allow Lore in that repository.");
123
+ if (error.status === 404)
124
+ return new Error("Draft not found. It may have been shared or deleted, or this Lore server does not support drafts yet.");
125
+ if (error.status === 400) {
126
+ const details = error.details;
127
+ const message = Array.isArray(details?.message) ? details.message.join(" ") : typeof details?.message === "string" ? details.message : "";
128
+ return new Error(message.includes("Choose a repository") ? "This draft has no repository yet. Add --repo <repo> or --workspace-wide." : `Lore rejected the ${action} request.`);
129
+ }
130
+ return new Error(`Lore ${action} failed with HTTP ${error.status}.`);
131
+ }
132
+ if (error instanceof ZodError || error instanceof SyntaxError || (error instanceof LoreTransportError && error.code === "response_too_large")) {
133
+ return new Error(`Lore returned an incompatible ${action} response. Check Lore before retrying.`);
134
+ }
135
+ return new Error(`Could not reach Lore for ${action}. Run lore doctor to diagnose connectivity.`);
136
+ }
137
+ export async function runDraftsCommand(args, config) {
138
+ const parsed = parseDraftsArguments(args);
139
+ if (parsed === null)
140
+ return;
141
+ if (config === null)
142
+ throw new Error("Lore is not connected. Run: lore connect --login");
143
+ const client = new SharedMemoryClient({ baseUrl: config.apiUrl, headers: { authorization: `Bearer ${config.token}` } });
144
+ const write = (value, text) => process.stdout.write(parsed.json ? `${JSON.stringify(value, null, 2)}\n` : showControlCharacters(text));
145
+ try {
146
+ if (parsed.action === "list") {
147
+ const drafts = [];
148
+ let total = Infinity;
149
+ while (drafts.length < total) {
150
+ const page = await client.listDraftLearnings({ ...(parsed.repo ? { repo: parsed.repo } : {}), ...(parsed.query ? { query: parsed.query } : {}), limit: 100, offset: drafts.length });
151
+ drafts.push(...page.drafts);
152
+ total = page.total;
153
+ if (!page.drafts.length)
154
+ break;
155
+ }
156
+ write({ drafts, total: drafts.length }, drafts.length
157
+ ? `${drafts.length} private ${drafts.length === 1 ? "draft" : "drafts"} (only you can see these)\n\n${drafts.map(formatDraft).join("\n")}`
158
+ : "No private drafts. Save one with: lore remember \"<statement>\" --draft\n");
159
+ return;
160
+ }
161
+ if (parsed.action === "share") {
162
+ const response = await client.shareDraftLearning(parsed.id, parsed.workspaceWide ? { workspaceWide: true } : parsed.repo ? { scope: { repo: parsed.repo } } : {});
163
+ write(response, formatShared(response.memory));
164
+ return;
165
+ }
166
+ const response = await client.deleteDraftLearning(parsed.id);
167
+ write(response, `Deleted draft: ${parsed.id}\n`);
168
+ }
169
+ catch (error) {
170
+ throw draftRequestError(error, parsed.action === "list" ? "drafts" : `draft ${parsed.action}`);
171
+ }
172
+ }
173
+ //# sourceMappingURL=drafts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drafts.js","sourceRoot":"","sources":["../src/drafts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,qBAAqB,GAGtB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAG/B,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B1B,CAAC;AAWF,SAAS,oBAAoB,CAAC,IAAuB;IACnD,MAAM,WAAW,GAAa,EAAE,CAAC;IACjC,MAAM,MAAM,GAAoB,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACtF,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACpD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAE,CAAC;QAC9B,IAAI,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;YAC/C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YAClC,OAAO,IA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