@lore-co/cli 0.1.27 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -9
- package/dist/agents.d.ts +3 -1
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +31 -7
- package/dist/agents.js.map +1 -1
- package/dist/cli.d.ts +8 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +182 -71
- package/dist/cli.js.map +1 -1
- package/dist/command-help.d.ts +34 -0
- package/dist/command-help.d.ts.map +1 -0
- package/dist/command-help.js +227 -0
- package/dist/command-help.js.map +1 -0
- package/dist/demo.d.ts.map +1 -1
- package/dist/demo.js +15 -2
- package/dist/demo.js.map +1 -1
- package/dist/generated-assets.d.ts +9 -4
- package/dist/generated-assets.d.ts.map +1 -1
- package/dist/generated-assets.js +5 -4
- package/dist/generated-assets.js.map +1 -1
- package/dist/guard.d.ts.map +1 -1
- package/dist/guard.js +4 -3
- package/dist/guard.js.map +1 -1
- package/dist/recovery-cloud-workspace.d.ts +11 -0
- package/dist/recovery-cloud-workspace.d.ts.map +1 -0
- package/dist/recovery-cloud-workspace.js +113 -0
- package/dist/recovery-cloud-workspace.js.map +1 -0
- package/dist/recovery-cloud.d.ts +31 -0
- package/dist/recovery-cloud.d.ts.map +1 -0
- package/dist/recovery-cloud.js +242 -0
- package/dist/recovery-cloud.js.map +1 -0
- package/dist/recovery-codex.d.ts +5 -0
- package/dist/recovery-codex.d.ts.map +1 -0
- package/dist/recovery-codex.js +111 -0
- package/dist/recovery-codex.js.map +1 -0
- package/dist/recovery-copilot.d.ts +14 -0
- package/dist/recovery-copilot.d.ts.map +1 -0
- package/dist/recovery-copilot.js +120 -0
- package/dist/recovery-copilot.js.map +1 -0
- package/dist/recovery-desktop.d.ts +7 -0
- package/dist/recovery-desktop.d.ts.map +1 -0
- package/dist/recovery-desktop.js +179 -0
- package/dist/recovery-desktop.js.map +1 -0
- package/dist/recovery-external.d.ts +61 -0
- package/dist/recovery-external.d.ts.map +1 -0
- package/dist/recovery-external.js +98 -0
- package/dist/recovery-external.js.map +1 -0
- package/dist/recovery-hooks.d.ts +5 -0
- package/dist/recovery-hooks.d.ts.map +1 -0
- package/dist/recovery-hooks.js +115 -0
- package/dist/recovery-hooks.js.map +1 -0
- package/dist/recovery-hosts.d.ts +13 -0
- package/dist/recovery-hosts.d.ts.map +1 -0
- package/dist/recovery-hosts.js +263 -0
- package/dist/recovery-hosts.js.map +1 -0
- package/dist/recovery-polytoken.d.ts +14 -0
- package/dist/recovery-polytoken.d.ts.map +1 -0
- package/dist/recovery-polytoken.js +194 -0
- package/dist/recovery-polytoken.js.map +1 -0
- package/dist/recovery-remote.d.ts +8 -0
- package/dist/recovery-remote.d.ts.map +1 -0
- package/dist/recovery-remote.js +135 -0
- package/dist/recovery-remote.js.map +1 -0
- package/dist/recovery-state.d.ts +25 -1
- package/dist/recovery-state.d.ts.map +1 -1
- package/dist/recovery-state.js +69 -15
- package/dist/recovery-state.js.map +1 -1
- package/dist/recovery-t3.d.ts +17 -0
- package/dist/recovery-t3.d.ts.map +1 -0
- package/dist/recovery-t3.js +58 -0
- package/dist/recovery-t3.js.map +1 -0
- package/dist/recovery-transfer.d.ts +22 -0
- package/dist/recovery-transfer.d.ts.map +1 -0
- package/dist/recovery-transfer.js +228 -0
- package/dist/recovery-transfer.js.map +1 -0
- package/dist/recovery.d.ts +9 -1
- package/dist/recovery.d.ts.map +1 -1
- package/dist/recovery.js +187 -47
- package/dist/recovery.js.map +1 -1
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +1 -0
- package/dist/runtime.js.map +1 -1
- package/dist/self-host.d.ts +1 -1
- package/dist/self-host.js +2 -2
- package/dist/uninstall.d.ts +19 -0
- package/dist/uninstall.d.ts.map +1 -0
- package/dist/uninstall.js +128 -0
- package/dist/uninstall.js.map +1 -0
- package/dist/update.js +3 -3
- package/package.json +3 -3
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/** Public commands only. Internal hook entry points are not user workflows. */
|
|
2
|
+
export const COMMAND_GUIDES = {
|
|
3
|
+
connect: "Connect this machine to a workspace and enable capture for your coding agents.",
|
|
4
|
+
ask: "Find a team rule or recover context from earlier work before starting a task.",
|
|
5
|
+
remember: "Save a reusable fact, convention, correction, or decision. Use --repo to limit where it applies.",
|
|
6
|
+
share: "Give a teammate a private link to a learning, session, or delivery record.",
|
|
7
|
+
resume: "Pick up earlier work using a saved session and its context.",
|
|
8
|
+
continue: "Move work to another agent without repeating the task context.",
|
|
9
|
+
guard: "Choose whether supported agent actions receive relevant rules or pause for confirmation on conflicts.",
|
|
10
|
+
status: "See which agents are connected and whether their integrations have run.",
|
|
11
|
+
doctor: "Find the cause when capture, context delivery, or an agent integration is not working.",
|
|
12
|
+
update: "Install the latest published CLI binary.",
|
|
13
|
+
disconnect: "Stop this machine's Lore integrations and remove its local credentials.",
|
|
14
|
+
uninstall: "Disconnect this machine and remove the Lore CLI while keeping shared knowledge and local recordings.",
|
|
15
|
+
"self-host": "Run Lore on infrastructure you control, with persistent data managed by Docker Compose.",
|
|
16
|
+
run: "Start a local coding agent through Lore with any configured recovery route.",
|
|
17
|
+
recovery: "Choose a fallback agent and inspect or give feedback on recovery attempts.",
|
|
18
|
+
attach: "Reconnect to an existing live session on this machine or another registered machine.",
|
|
19
|
+
machines: "Find registered machines and the live sessions available to reconnect to.",
|
|
20
|
+
github: "Use Lore in a GitHub pull-request review workflow. Start with lore help connect github.",
|
|
21
|
+
devin: "Run local or cloud Devin sessions with Lore capture and context.",
|
|
22
|
+
host: "Integrate an agent host using explicit context delivery and conversation capture calls.",
|
|
23
|
+
demo: "Check a real Claude-to-Codex learning handoff. This runs agents and creates demo records in your connected workspace.",
|
|
24
|
+
};
|
|
25
|
+
export const ROOT_HELP = `lore — Shared knowledge and session context for coding agents
|
|
26
|
+
|
|
27
|
+
Usage:
|
|
28
|
+
lore <command> [options]
|
|
29
|
+
lore help [command] [subcommand]
|
|
30
|
+
|
|
31
|
+
Everyday work:
|
|
32
|
+
connect Connect a workspace and enable agent integrations
|
|
33
|
+
ask Find team knowledge and context from previous work
|
|
34
|
+
remember Save a reusable fact, convention, correction, or decision
|
|
35
|
+
share Create a private link for a teammate
|
|
36
|
+
resume Pick up a saved session
|
|
37
|
+
continue Hand work to another agent
|
|
38
|
+
|
|
39
|
+
Workspace and setup:
|
|
40
|
+
guard Configure context sharing and confirmation for rule conflicts
|
|
41
|
+
status Check connected agents and integration activity
|
|
42
|
+
doctor Diagnose missing capture, context, or connections
|
|
43
|
+
update Install the latest CLI binary
|
|
44
|
+
disconnect Remove this machine's integrations and credentials
|
|
45
|
+
uninstall Disconnect this machine and remove the CLI
|
|
46
|
+
self-host Start, inspect, or stop your own Lore server
|
|
47
|
+
|
|
48
|
+
Additional workflows:
|
|
49
|
+
run Start an agent with configured recovery
|
|
50
|
+
recovery Manage fallback agents and recovery attempts
|
|
51
|
+
attach Reconnect to a live session
|
|
52
|
+
machines Find machines and their live sessions
|
|
53
|
+
github Set up and run pull-request review workflows
|
|
54
|
+
devin Manage local or cloud Devin sessions
|
|
55
|
+
host Integrate another agent host
|
|
56
|
+
demo Run a live learning demo in the connected workspace
|
|
57
|
+
|
|
58
|
+
Help:
|
|
59
|
+
lore help List commands and their uses
|
|
60
|
+
lore help remember Show options and examples
|
|
61
|
+
lore help self-host up Explain a subcommand
|
|
62
|
+
lore <command> --help Same as lore help <command>
|
|
63
|
+
lore --version Show the installed version
|
|
64
|
+
|
|
65
|
+
Examples:
|
|
66
|
+
lore connect --login --agent codex
|
|
67
|
+
lore ask "What did the previous agent already try?" --repo acme/app
|
|
68
|
+
lore remember "Use pnpm for this repository." --repo acme/app
|
|
69
|
+
lore continue --on claude
|
|
70
|
+
lore doctor
|
|
71
|
+
`;
|
|
72
|
+
const githubHelp = `lore github
|
|
73
|
+
Use the generated GitHub Actions workflows to prepare a review, post its result,
|
|
74
|
+
and capture review corrections. These commands are also available for custom CI.
|
|
75
|
+
|
|
76
|
+
Commands:
|
|
77
|
+
prepare-review Write a prompt and metadata for the current pull request
|
|
78
|
+
post-review Post a completed review to GitHub
|
|
79
|
+
observe-correction Capture an eligible correction from a review comment
|
|
80
|
+
|
|
81
|
+
Usage:
|
|
82
|
+
lore github prepare-review --provider <codex|devin> --checkout <path> --prompt-out <path> --metadata-out <path> [--schema-out <path>] [--event <path>]
|
|
83
|
+
lore github post-review --metadata <path> --output <path>
|
|
84
|
+
lore github observe-correction [--event <path>]
|
|
85
|
+
|
|
86
|
+
The event defaults to GITHUB_EVENT_PATH. GitHub access uses GITHUB_TOKEN or GH_TOKEN.
|
|
87
|
+
Lore context and capture use your configured workspace connection.
|
|
88
|
+
post-review publishes a comment; observe-correction can create a learning.
|
|
89
|
+
|
|
90
|
+
Example setup:
|
|
91
|
+
lore connect github --repo acme/app
|
|
92
|
+
`;
|
|
93
|
+
const recoveryHelp = `lore recovery
|
|
94
|
+
Configure and inspect local and remote agent recovery.
|
|
95
|
+
|
|
96
|
+
Commands:
|
|
97
|
+
agents List supported and installed agents
|
|
98
|
+
enable --from <agent> --to <agent> Configure a fallback route
|
|
99
|
+
cloud runner --name <name> Pair a desktop or SSH receiver for hosted cloud offers
|
|
100
|
+
cloud status | off Inspect or disconnect cloud recovery
|
|
101
|
+
status Show routes and recovery metrics
|
|
102
|
+
brief <run-id> Print saved context for a recovery attempt
|
|
103
|
+
feedback <run-id> useful|not-useful Record whether an attempt helped
|
|
104
|
+
off Disable recovery integrations
|
|
105
|
+
|
|
106
|
+
Examples:
|
|
107
|
+
lore recovery agents
|
|
108
|
+
lore recovery enable --from claude --to codex
|
|
109
|
+
lore recovery enable --from cursor --to codex --ssh worker --directory /srv/repo
|
|
110
|
+
lore recovery status
|
|
111
|
+
lore recovery brief <run-id>
|
|
112
|
+
lore recovery off
|
|
113
|
+
|
|
114
|
+
Connect enables recovery when two supported clients are installed. Native Codex
|
|
115
|
+
hooks require review in /hooks. Remote destinations need SSH, Lore, an authenticated
|
|
116
|
+
agent, and a repository containing the source HEAD. Open a new terminal after
|
|
117
|
+
setup. Automatic recovery support varies by host; see docs/recovery.md.
|
|
118
|
+
`;
|
|
119
|
+
/** Help for commands that do not have a dedicated argument-parser help path. */
|
|
120
|
+
export const HELP_OVERRIDES = {
|
|
121
|
+
"recovery cloud": `lore recovery cloud
|
|
122
|
+
Connect hosted cloud recovery to a local or SSH destination.
|
|
123
|
+
|
|
124
|
+
Commands:
|
|
125
|
+
runner --name <name> [--agent <tool>] Pair the current GitHub checkout once
|
|
126
|
+
--ssh <user@host> --directory <path> Use an authenticated SSH worker
|
|
127
|
+
status Inspect local runner connectivity
|
|
128
|
+
off Unpair this machine's cloud runners
|
|
129
|
+
source --api-url <url> --job <id> Export a paired cloud workspace on failure
|
|
130
|
+
receive --api-url <url> --offer <id> Restore and verify an accepted snapshot
|
|
131
|
+
|
|
132
|
+
Configure Devin/Cursor provider connections and watched jobs in the hosted
|
|
133
|
+
Recovery page. A stopped job opens an offer; dashboard acceptance launches the
|
|
134
|
+
selected tool. Pair a source workspace in Recovery and run source inside its VM
|
|
135
|
+
with LORE_CLOUD_SOURCE_TOKEN set. Exports include Git history and eligible dirty
|
|
136
|
+
files, up to 8 MiB; receivers verify file hashes. Without an exporter, only the
|
|
137
|
+
pushed checkpoint is available and requires explicit acknowledgement.
|
|
138
|
+
Managed receivers need this CLI installed and use LORE_CLOUD_RECEIVE_TOKEN.
|
|
139
|
+
No paid destination starts during pairing.
|
|
140
|
+
`,
|
|
141
|
+
"connect github": `lore connect github
|
|
142
|
+
Install Lore's GitHub Actions review and correction workflows in a repository.
|
|
143
|
+
|
|
144
|
+
Usage:
|
|
145
|
+
lore connect github --repo <owner/repository> [--repo-root <path>] [--configure-secrets]
|
|
146
|
+
|
|
147
|
+
Options:
|
|
148
|
+
--repo <name> GitHub repository (or GITHUB_REPOSITORY)
|
|
149
|
+
--repo-root <path> Local checkout (default: current directory)
|
|
150
|
+
--configure-secrets Configure available credentials using the GitHub CLI
|
|
151
|
+
|
|
152
|
+
Example:
|
|
153
|
+
lore connect github --repo acme/app
|
|
154
|
+
|
|
155
|
+
Writes workflow files under .github. Review and commit them before enabling reviews.
|
|
156
|
+
`,
|
|
157
|
+
run: `lore run
|
|
158
|
+
Start a local agent with Lore's configured recovery support.
|
|
159
|
+
|
|
160
|
+
Usage:
|
|
161
|
+
lore run <agent> -- [agent arguments]
|
|
162
|
+
|
|
163
|
+
Examples:
|
|
164
|
+
lore run codex
|
|
165
|
+
lore run claude -- "Fix the failing tests"
|
|
166
|
+
lore run opencode
|
|
167
|
+
|
|
168
|
+
Use lore recovery agents to list supported agents. Configure a fallback with
|
|
169
|
+
lore recovery enable --from <agent> --to <agent>.
|
|
170
|
+
Arguments after -- go to the agent, including its own --help.
|
|
171
|
+
`,
|
|
172
|
+
recovery: recoveryHelp,
|
|
173
|
+
github: githubHelp,
|
|
174
|
+
"devin setup": `lore devin setup
|
|
175
|
+
Check Devin API access and access to the configured Lore workspace.
|
|
176
|
+
|
|
177
|
+
Usage:
|
|
178
|
+
lore devin setup
|
|
179
|
+
|
|
180
|
+
This checks credentials, not transcript capture. Use lore devin cli setup instead
|
|
181
|
+
to enable capture for the local Devin CLI.
|
|
182
|
+
`,
|
|
183
|
+
"devin status": `lore devin status
|
|
184
|
+
Inspect the current state of a Devin cloud session.
|
|
185
|
+
|
|
186
|
+
Usage:
|
|
187
|
+
lore devin status --session <devin-id>
|
|
188
|
+
`,
|
|
189
|
+
"devin terminate": `lore devin terminate
|
|
190
|
+
Archive a Devin cloud session when its work is finished.
|
|
191
|
+
|
|
192
|
+
Usage:
|
|
193
|
+
lore devin terminate --session <devin-id>
|
|
194
|
+
`,
|
|
195
|
+
"devin run-review": `lore devin run-review
|
|
196
|
+
Run a structured Devin review from files produced by lore github prepare-review.
|
|
197
|
+
|
|
198
|
+
Usage:
|
|
199
|
+
lore devin run-review --prompt <path> --metadata <path> --output <path>
|
|
200
|
+
|
|
201
|
+
Starts a cloud session, waits for its review, saves the result, and archives the session.
|
|
202
|
+
`,
|
|
203
|
+
};
|
|
204
|
+
export const HELP_SUBCOMMANDS = {
|
|
205
|
+
connect: ["github"],
|
|
206
|
+
guard: ["status", "off", "assist", "enforce", "approve", "break-glass", "clear-override"],
|
|
207
|
+
recovery: ["cloud", "agents", "enable", "status", "off", "brief", "feedback"],
|
|
208
|
+
github: ["prepare-review", "post-review", "observe-correction"],
|
|
209
|
+
devin: ["cli", "setup", "start", "prompt", "status", "run-review", "terminate"],
|
|
210
|
+
host: ["deliver", "observe", "turn"],
|
|
211
|
+
"self-host": ["up", "down", "status"],
|
|
212
|
+
};
|
|
213
|
+
export function helpTopic(args) {
|
|
214
|
+
const [command, subcommand] = args;
|
|
215
|
+
if (!command || !Object.hasOwn(COMMAND_GUIDES, command))
|
|
216
|
+
throw new Error(`Unknown help topic: ${command ?? ""}\nTry: lore help`);
|
|
217
|
+
if (subcommand !== undefined && !HELP_SUBCOMMANDS[command]?.includes(subcommand))
|
|
218
|
+
throw new Error(`Unknown help topic: ${args.join(" ")}\nTry: lore help ${command}`);
|
|
219
|
+
if (args.length > 2 && !(args.length === 3 && ((command === "devin" && subcommand === "cli" && ["setup", "status", "sync", "off"].includes(args[2])) || (command === "recovery" && subcommand === "cloud" && ["runner", "source", "receive", "status", "off"].includes(args[2])))))
|
|
220
|
+
throw new Error("Usage: lore help [command] [subcommand]");
|
|
221
|
+
return {
|
|
222
|
+
command: command,
|
|
223
|
+
subcommand,
|
|
224
|
+
text: HELP_OVERRIDES[args.join(" ")] ?? HELP_OVERRIDES[args.slice(0, 2).join(" ")] ?? HELP_OVERRIDES[command],
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
//# sourceMappingURL=command-help.js.map
|
|
@@ -0,0 +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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IAAI,GACjC,OAAO,CAAC,IAAI,CAAC,CAgQf"}
|
package/dist/demo.js
CHANGED
|
@@ -55,6 +55,11 @@ async function installIsolatedClaudeHooks(directory) {
|
|
|
55
55
|
const DEMO_HELP = `lore demo
|
|
56
56
|
Run the live Claude-to-Codex proof loop in a temporary repository.
|
|
57
57
|
|
|
58
|
+
Uses your connected workspace and runs real Claude and Codex sessions.
|
|
59
|
+
The demo learning is scoped to a temporary demo repository and removed when
|
|
60
|
+
the run ends. Sessions and delivery history remain available under Sessions →
|
|
61
|
+
Filters → Include Lore setup and test sessions. No sample data is added on install.
|
|
62
|
+
|
|
58
63
|
Usage:
|
|
59
64
|
lore demo [options]
|
|
60
65
|
|
|
@@ -304,8 +309,11 @@ export async function runDemoCommand(args, config) {
|
|
|
304
309
|
headers: { authorization: `Bearer ${config.token}` },
|
|
305
310
|
});
|
|
306
311
|
let learning;
|
|
312
|
+
let learningRemoved = false;
|
|
307
313
|
let loreOverheadMs = 0;
|
|
308
314
|
try {
|
|
315
|
+
if (!options.json)
|
|
316
|
+
process.stdout.write("Running the demo in your connected workspace. Demo sessions and delivery history will be retained; the temporary learning will be removed.\n");
|
|
309
317
|
await mkdir(sourceDirectory, { recursive: true });
|
|
310
318
|
await writeFile(targetPath, 'export const greeting = "legacy-greeting";\n', "utf8");
|
|
311
319
|
await writeFile(unrelatedPath, "export const unrelated = true;\n", "utf8");
|
|
@@ -401,6 +409,8 @@ export async function runDemoCommand(args, config) {
|
|
|
401
409
|
irrelevantActivity.receipt.memoryIds.length > 0) {
|
|
402
410
|
throw new Error("Lore injected context into an unrelated file task");
|
|
403
411
|
}
|
|
412
|
+
await client.forgetLearning(learning.id);
|
|
413
|
+
learningRemoved = true;
|
|
404
414
|
const result = {
|
|
405
415
|
ok: true,
|
|
406
416
|
repository,
|
|
@@ -433,8 +443,11 @@ export async function runDemoCommand(args, config) {
|
|
|
433
443
|
].join("\n"));
|
|
434
444
|
}
|
|
435
445
|
finally {
|
|
436
|
-
if (learning !== undefined) {
|
|
437
|
-
await client.forgetLearning(learning.id).catch(() =>
|
|
446
|
+
if (learning !== undefined && !learningRemoved) {
|
|
447
|
+
await client.forgetLearning(learning.id).catch(() => {
|
|
448
|
+
process.stderr.write(`Could not remove demo learning ${learning.id}. Remove it from Lore before reusing this demo repository.\n`);
|
|
449
|
+
process.exitCode = 1;
|
|
450
|
+
});
|
|
438
451
|
}
|
|
439
452
|
if (!options.keep) {
|
|
440
453
|
await rm(directory, { recursive: true, force: true });
|
package/dist/demo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"demo.js","sourceRoot":"","sources":["../src/demo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,KAAK,EACL,OAAO,EACP,QAAQ,EACR,EAAE,EACF,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAoC,MAAM,cAAc,CAAC;AAG5E,MAAM,kBAAkB,GAAG;IACzB,kBAAkB;IAClB,MAAM;IACN,YAAY;CACJ,CAAC;AAEX,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QAC1D,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,CACL,KAAK,CAAC,OAAO,CAAC,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I,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;YACvB,CAAC,CAAC,CAAC;QACL,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAClB,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export declare const GITHUB_TEMPLATE_ASSETS: {
|
|
2
|
-
readonly "lore-codex-review.yml": "name: Lore Codex review\nrun-name: \"Lore Codex review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:codex-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.
|
|
3
|
-
readonly "lore-devin-review.yml": "name: Lore Devin review\nrun-name: \"Lore Devin review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\nconcurrency:\n group: lore-devin-review-${{ github.repository }}-${{ github.event.pull_request.number }}\n cancel-in-progress: true\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:devin-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n pull-requests: write\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.
|
|
4
|
-
readonly "lore-observe-correction.yml": "name: Lore review correction\nrun-name: \"Lore review correction comment #${{ github.event.comment.id }}\"\n\non:\n issue_comment:\n types: [created]\n\njobs:\n observe:\n if: >-\n github.event.issue.pull_request &&\n startsWith(github.event.comment.body, '/lore correct ')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n issues: read\n pull-requests: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.
|
|
2
|
+
readonly "lore-codex-review.yml": "name: Lore Codex review\nrun-name: \"Lore Codex review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:codex-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.29' }}\n outputs:\n final-message: ${{ steps.codex.outputs.final-message }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n fetch-depth: 0\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - name: Prepare Lore review context\n env:\n LORE_API_URL: ${{ vars.LORE_API_URL }}\n LORE_WORKSPACE_TOKEN: ${{ secrets.LORE_WORKSPACE_TOKEN }}\n run: >-\n lore github prepare-review\n --provider codex\n --event \"$GITHUB_EVENT_PATH\"\n --checkout \"$GITHUB_WORKSPACE/review\"\n --prompt-out \"$GITHUB_WORKSPACE/.lore/codex-prompt.md\"\n --metadata-out \"$GITHUB_WORKSPACE/.lore/codex-metadata.json\"\n --schema-out \"$GITHUB_WORKSPACE/.lore/review-output.schema.json\"\n\n - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2\n with:\n name: lore-codex-metadata\n path: .lore/codex-metadata.json\n retention-days: 1\n\n - name: Run Codex\n id: codex\n uses: openai/codex-action@52fe01ec70a42f454c9d2ebd47598f9fd6893d56 # v1.11\n with:\n openai-api-key: ${{ secrets.OPENAI_API_KEY }}\n prompt-file: .lore/codex-prompt.md\n output-schema-file: .lore/review-output.schema.json\n working-directory: review\n permission-profile: \":read-only\"\n safety-strategy: drop-sudo\n\n post:\n needs: review\n if: needs.review.outputs.final-message != ''\n runs-on: ubuntu-latest\n permissions:\n contents: read\n pull-requests: write\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.29' }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0\n with:\n name: lore-codex-metadata\n path: .lore\n\n - name: Save review output\n env:\n CODEX_REVIEW: ${{ needs.review.outputs.final-message }}\n run: |\n mkdir -p .lore\n printf '%s' \"$CODEX_REVIEW\" > .lore/codex-output.json\n\n - name: Post or update Lore review\n env:\n GH_TOKEN: ${{ github.token }}\n run: >-\n lore github post-review\n --metadata .lore/codex-metadata.json\n --output .lore/codex-output.json\n";
|
|
3
|
+
readonly "lore-devin-review.yml": "name: Lore Devin review\nrun-name: \"Lore Devin review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\nconcurrency:\n group: lore-devin-review-${{ github.repository }}-${{ github.event.pull_request.number }}\n cancel-in-progress: true\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:devin-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n pull-requests: write\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.29' }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n fetch-depth: 0\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - name: Prepare Lore review context\n env:\n LORE_API_URL: ${{ vars.LORE_API_URL }}\n LORE_WORKSPACE_TOKEN: ${{ secrets.LORE_WORKSPACE_TOKEN }}\n run: >-\n lore github prepare-review\n --provider devin\n --event \"$GITHUB_EVENT_PATH\"\n --checkout \"$GITHUB_WORKSPACE/review\"\n --prompt-out \"$GITHUB_WORKSPACE/.lore/devin-prompt.md\"\n --metadata-out \"$GITHUB_WORKSPACE/.lore/devin-metadata.json\"\n\n - name: Run Lore-enriched Devin review\n env:\n DEVIN_API_KEY: ${{ secrets.DEVIN_API_KEY }}\n DEVIN_ORG_ID: ${{ vars.DEVIN_ORG_ID }}\n run: >-\n lore devin run-review\n --prompt .lore/devin-prompt.md\n --metadata .lore/devin-metadata.json\n --output .lore/devin-output.json\n\n - name: Post or update Lore review\n env:\n GH_TOKEN: ${{ github.token }}\n run: >-\n lore github post-review\n --metadata .lore/devin-metadata.json\n --output .lore/devin-output.json\n\n - name: Clean up Devin session\n if: always()\n continue-on-error: true\n env:\n DEVIN_API_KEY: ${{ secrets.DEVIN_API_KEY }}\n DEVIN_ORG_ID: ${{ vars.DEVIN_ORG_ID }}\n run: |\n SESSION_ID=\"$(jq -r '.sessionId // empty' .lore/devin-metadata.json 2>/dev/null || true)\"\n if [ -n \"$SESSION_ID\" ]; then\n lore devin terminate --session \"$SESSION_ID\"\n fi\n";
|
|
4
|
+
readonly "lore-observe-correction.yml": "name: Lore review correction\nrun-name: \"Lore review correction comment #${{ github.event.comment.id }}\"\n\non:\n issue_comment:\n types: [created]\n\njobs:\n observe:\n if: >-\n github.event.issue.pull_request &&\n startsWith(github.event.comment.body, '/lore correct ')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n issues: read\n pull-requests: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.29' }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - name: Teach Lore from an authorized correction\n env:\n GH_TOKEN: ${{ github.token }}\n LORE_API_URL: ${{ vars.LORE_API_URL }}\n LORE_WORKSPACE_TOKEN: ${{ secrets.LORE_WORKSPACE_TOKEN }}\n run: >-\n lore github observe-correction\n --event \"$GITHUB_EVENT_PATH\"\n";
|
|
5
5
|
readonly "review-output.schema.json": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"summary\", \"findings\"],\n \"properties\": {\n \"summary\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"findings\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"severity\", \"title\", \"body\", \"path\", \"line\"],\n \"properties\": {\n \"severity\": {\n \"enum\": [\"critical\", \"high\", \"medium\", \"low\"]\n },\n \"title\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"body\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"path\": {\n \"type\": [\"string\", \"null\"],\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"line\": {\n \"type\": [\"integer\", \"null\"],\n \"minimum\": 1\n }\n }\n }\n }\n }\n}\n";
|
|
6
6
|
};
|
|
7
|
-
export declare const SELF_HOST_COMPOSE_ASSET = "name: lore\n\nx-api-image: &api-image \"${LORE_API_IMAGE:-ghcr.io/treadiehq/lore-api}:${LORE_IMAGE_TAG:-0.1.
|
|
7
|
+
export declare const SELF_HOST_COMPOSE_ASSET = "name: lore\n\nx-api-image: &api-image \"${LORE_API_IMAGE:-ghcr.io/treadiehq/lore-api}:${LORE_IMAGE_TAG:-0.1.29}\"\nx-web-image: &web-image \"${LORE_WEB_IMAGE:-ghcr.io/treadiehq/lore-web}:${LORE_IMAGE_TAG:-0.1.29}\"\n\nservices:\n postgres:\n image: pgvector/pgvector:0.8.6-pg18\n environment:\n POSTGRES_DB: lore\n POSTGRES_USER: lore\n POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-}\n volumes:\n - postgres-data:/var/lib/postgresql\n healthcheck:\n test:\n [\n \"CMD-SHELL\",\n 'pg_isready -h 127.0.0.1 -U \"$${POSTGRES_USER}\" -d \"$${POSTGRES_DB}\"',\n ]\n interval: 5s\n timeout: 5s\n retries: 10\n start_period: 10s\n restart: unless-stopped\n\n api:\n image: *api-image\n environment:\n NODE_ENV: production\n DATABASE_URL: \"postgresql://lore:${POSTGRES_PASSWORD:-}@postgres:5432/lore\"\n API_HOST: 0.0.0.0\n API_PORT: 3001\n API_JSON_BODY_LIMIT: ${API_JSON_BODY_LIMIT:-1mb}\n API_RATE_LIMIT_PER_MINUTE: ${API_RATE_LIMIT_PER_MINUTE:-120}\n RATE_LIMIT_KEY_SECRET: ${RATE_LIMIT_KEY_SECRET:-}\n TRUSTED_PROXY_CIDRS: ${TRUSTED_PROXY_CIDRS:-10.0.0.0/8,172.16.0.0/12}\n NUXT_ORIGIN: ${NUXT_ORIGIN:-}\n LORE_SERVER_VERSION: ${LORE_IMAGE_TAG:-0.1.29}\n LORE_SERVER_REVISION: ${LORE_SERVER_REVISION:-}\n LORE_WORKSPACE_TOKEN: ${LORE_WORKSPACE_TOKEN:-}\n LORE_WORKSPACE_ORGANIZATION: ${LORE_WORKSPACE_ORGANIZATION:-}\n LORE_WORKSPACE_NAME: ${LORE_WORKSPACE_NAME:-}\n AUTH_MODE: ${AUTH_MODE:-magic_link}\n AUTH_EMAIL_MODE: ${AUTH_EMAIL_MODE:-resend}\n AUTH_WEB_ORIGIN: ${AUTH_WEB_ORIGIN:-}\n AUTH_OWNER_EMAIL: ${AUTH_OWNER_EMAIL:-}\n AUTH_EMAIL_FROM: ${AUTH_EMAIL_FROM:-}\n RESEND_API_KEY: ${RESEND_API_KEY:-}\n AUTH_MAGIC_LINK_TTL_MINUTES: ${AUTH_MAGIC_LINK_TTL_MINUTES:-15}\n AUTH_SESSION_TTL_DAYS: ${AUTH_SESSION_TTL_DAYS:-30}\n CLOUD_RECOVERY_ENCRYPTION_KEY: ${CLOUD_RECOVERY_ENCRYPTION_KEY:-}\n CLOUD_RECOVERY_PUBLIC_API_URL: ${CLOUD_RECOVERY_PUBLIC_API_URL:-}\n DEVIN_POLLING_ENABLED: ${DEVIN_POLLING_ENABLED:-false}\n DEVIN_API_KEY: ${DEVIN_API_KEY:-}\n DEVIN_ORG_ID: ${DEVIN_ORG_ID:-}\n DEVIN_REPOSITORY_ALLOWLIST: ${DEVIN_REPOSITORY_ALLOWLIST:-}\n DEVIN_POLL_INTERVAL_MS: ${DEVIN_POLL_INTERVAL_MS:-15000}\n DEVIN_REQUEST_TIMEOUT_MS: ${DEVIN_REQUEST_TIMEOUT_MS:-10000}\n DEVIN_POLL_BATCH_SIZE: ${DEVIN_POLL_BATCH_SIZE:-25}\n EXTRACTOR_PROVIDER: ${EXTRACTOR_PROVIDER:-heuristic}\n EXTRACTOR_MIN_CONFIDENCE: ${EXTRACTOR_MIN_CONFIDENCE:-0.8}\n EXTRACTOR_MODEL: ${EXTRACTOR_MODEL:-}\n EXTRACTOR_BASE_URL: ${EXTRACTOR_BASE_URL:-}\n EXTRACTOR_API_KEY: ${EXTRACTOR_API_KEY:-}\n RETRIEVAL_MODE: ${RETRIEVAL_MODE:-auto}\n EMBEDDING_MODEL: ${EMBEDDING_MODEL:-text-embedding-3-small}\n EMBEDDING_BASE_URL: ${EMBEDDING_BASE_URL:-https://api.openai.com/v1}\n EMBEDDING_API_KEY: ${EMBEDDING_API_KEY:-}\n EMBEDDING_DIMENSIONS: ${EMBEDDING_DIMENSIONS:-1536}\n EMBEDDING_TIMEOUT_MS: ${EMBEDDING_TIMEOUT_MS:-5000}\n EMBEDDING_SPACE_ID: ${EMBEDDING_SPACE_ID:-}\n EMBEDDING_RECONCILE_INTERVAL_MS: ${EMBEDDING_RECONCILE_INTERVAL_MS:-60000}\n EMBEDDING_RECONCILE_BATCH_SIZE: ${EMBEDDING_RECONCILE_BATCH_SIZE:-500}\n EMBEDDING_RECONCILE_PAGE_SIZE: ${EMBEDDING_RECONCILE_PAGE_SIZE:-100}\n CAPTURE_WORKER_POLL_INTERVAL_MS: ${CAPTURE_WORKER_POLL_INTERVAL_MS:-500}\n CAPTURE_WORKER_CONCURRENCY: ${CAPTURE_WORKER_CONCURRENCY:-2}\n CAPTURE_WORKER_LEASE_MS: ${CAPTURE_WORKER_LEASE_MS:-60000}\n CAPTURE_INLINE_TIMEOUT_MS: ${CAPTURE_INLINE_TIMEOUT_MS:-45000}\n SEMANTIC_MIN_SIMILARITY: ${SEMANTIC_MIN_SIMILARITY:-0.4}\n CONTEXT_MAX_ITEMS: ${CONTEXT_MAX_ITEMS:-10}\n CONTEXT_MAX_CHARACTERS: ${CONTEXT_MAX_CHARACTERS:-12000}\n CONTEXT_MAX_ESTIMATED_TOKENS: ${CONTEXT_MAX_ESTIMATED_TOKENS:-4000}\n ports:\n - \"${API_BIND_ADDRESS:-127.0.0.1}:${API_PORT:-3001}:3001\"\n depends_on:\n postgres:\n condition: service_healthy\n healthcheck:\n test:\n [\n \"CMD\",\n \"node\",\n \"-e\",\n \"fetch('http://127.0.0.1:3001/health/ready').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))\",\n ]\n interval: 5s\n timeout: 5s\n retries: 12\n start_period: 10s\n restart: unless-stopped\n\n web:\n image: *web-image\n environment:\n HOST: 0.0.0.0\n PORT: 3000\n NITRO_HOST: 0.0.0.0\n NITRO_PORT: 3000\n NUXT_LORE_API_URL: http://api:3001\n NUXT_AUTH_COOKIE_NAME: ${NUXT_AUTH_COOKIE_NAME:-lore_session}\n NUXT_AUTH_COOKIE_SECURE: ${NUXT_AUTH_COOKIE_SECURE:-true}\n TRUSTED_PROXY_CIDRS: ${TRUSTED_PROXY_CIDRS:-10.0.0.0/8,172.16.0.0/12}\n NUXT_PUBLIC_API_BASE_URL: /api/lore\n NUXT_PUBLIC_LORE_CONNECTOR_API_URL: ${NUXT_PUBLIC_LORE_CONNECTOR_API_URL:-http://localhost:3001}\n NUXT_PUBLIC_LORE_INSTALL_URL: ${NUXT_PUBLIC_LORE_INSTALL_URL:-https://uselore.co/install.sh}\n ports:\n - \"${NUXT_BIND_ADDRESS:-127.0.0.1}:${NUXT_PORT:-3000}:3000\"\n depends_on:\n api:\n condition: service_healthy\n healthcheck:\n test:\n [\n \"CMD\",\n \"node\",\n \"-e\",\n \"fetch('http://127.0.0.1:3000/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))\",\n ]\n interval: 10s\n timeout: 5s\n retries: 12\n start_period: 15s\n restart: unless-stopped\n\nvolumes:\n postgres-data:\n";
|
|
8
|
+
export declare const VSCODE_RECOVERY_ASSETS: {
|
|
9
|
+
readonly "package.json": "{\n \"name\": \"lore-recovery\",\n \"displayName\": \"Lore Recovery\",\n \"publisher\": \"lore-co\",\n \"version\": \"0.1.0\",\n \"description\": \"Continue a stopped Copilot job in another connected coding tool.\",\n \"engines\": { \"vscode\": \"^1.105.0\" },\n \"main\": \"./extension.cjs\",\n \"activationEvents\": [\"onStartupFinished\"],\n \"extensionKind\": [\"workspace\"],\n \"capabilities\": { \"untrustedWorkspaces\": { \"supported\": false }, \"virtualWorkspaces\": false },\n \"contributes\": { \"commands\": [{ \"command\": \"lore.recovery.status\", \"title\": \"Lore: Show Recovery Status\" }] }\n}\n";
|
|
10
|
+
readonly "extension.cjs": "const vscode = require('vscode');\nconst fs = require('node:fs/promises');\nconst { constants } = require('node:fs');\nconst path = require('node:path');\nconst { tmpdir } = require('node:os');\nconst { spawn } = require('node:child_process');\nconst { fileURLToPath } = require('node:url');\nconst { parseSession, checkpoint, bindActiveSession } = require('./session.cjs');\n\nasync function readActiveSession(saved) {\n if (!saved.length) return;\n const directory = await fs.mkdtemp(path.join(tmpdir(), 'lore-chat-'));\n try {\n await fs.chmod(directory, 0o700);\n const target = path.join(directory, 'active.json');\n await fs.writeFile(target, '', { mode: 0o600 });\n // This public command exports the in-memory chat without opening a dialog.\n await vscode.commands.executeCommand('workbench.action.chat.export', vscode.Uri.file(target));\n const file = await fs.open(target, constants.O_RDONLY | constants.O_NOFOLLOW);\n try {\n const stat = await file.stat();\n if (!stat.isFile() || stat.size > 8 * 1024 * 1024 || (process.getuid && stat.uid !== process.getuid())) return;\n return bindActiveSession(parseSession(await file.readFile('utf8')), saved);\n } finally { await file.close(); }\n } catch { /* Unsupported export commands keep the saved-session fallback. */ }\n finally { await fs.rm(directory, { recursive: true, force: true }); }\n}\n\nfunction activate(context) {\n const output = vscode.window.createOutputChannel('Lore Recovery'); context.subscriptions.push(output);\n let config = require('./connection.json'); // Written by lore connect, outside the repository.\n let busy = false, disposed = false, lastError = '', status = 'Waiting for a saved Copilot turn.';\n const offered = new Set();\n function call(args, input) {\n return new Promise((resolve, reject) => {\n const child = spawn(config.invocation[0], [...config.invocation.slice(1), 'recovery', ...args], {\n env: { ...process.env, PATH: config.path || process.env.PATH, LORE_HOME: config.home, BUN_OPTIONS: undefined, BUN_BE_BUN: undefined }, stdio: ['pipe','pipe','pipe'],\n });\n let body = '', error = ''; const timer = setTimeout(() => { child.kill(); reject(Error('Lore adapter timed out')); }, 10000);\n child.stdout.on('data', b => { body += b; if (body.length > 65536) child.kill(); });\n child.stderr.on('data', b => { error = (error + b).slice(-2000); });\n child.once('error', e => { clearTimeout(timer); reject(e); });\n child.once('exit', code => { clearTimeout(timer); if(code) reject(Error(error || 'Lore adapter failed')); else { try { resolve(JSON.parse(body)); } catch { reject(Error('Invalid Lore response')); } } });\n child.stdin.on('error', () => {}); child.stdin.end(JSON.stringify(input));\n });\n }\n async function poll() {\n if (busy || disposed || !vscode.workspace.isTrusted || !context.storageUri || context.storageUri.scheme !== 'file') return;\n busy = true;\n try {\n config = JSON.parse(await fs.readFile(path.join(__dirname, 'connection.json'), 'utf8'));\n if (config.disabled) { status = 'Lore recovery is disabled.'; return; }\n const folders = (vscode.workspace.workspaceFolders ?? []).filter(f => f.uri.scheme === 'file');\n const roots = await Promise.all(folders.map(f => fs.realpath(f.uri.fsPath)));\n const storage = path.dirname(context.storageUri.fsPath), chatDir = path.join(storage, 'chatSessions');\n // The extension context binds this storage directory to this VS Code workspace.\n const names = (await fs.readdir(chatDir).catch(e => { if(e.code === 'ENOENT') return []; throw e; })).filter(n => /^[a-zA-Z0-9-]+\\.jsonl?$/.test(n) && n !== 'index.json').slice(-400);\n const saved = [];\n for (const name of names) {\n const file = await fs.open(path.join(chatDir,name), constants.O_RDONLY | constants.O_NOFOLLOW);\n let session;\n try {\n const stat = await file.stat();\n if (!stat.isFile() || stat.size > 8*1024*1024 || (process.getuid && stat.uid !== process.getuid())) continue;\n session = parseSession(await file.readFile('utf8'), name.endsWith('.jsonl'));\n } catch (e) { if(e instanceof SyntaxError) continue; throw e; }\n finally { await file.close(); }\n let cwd;\n if (session?.workingDirectory) {\n try { cwd = await fs.realpath(fileURLToPath(session.workingDirectory)); } catch { continue; }\n if (!roots.some(r => cwd === r || cwd.startsWith(r + path.sep))) continue;\n // Recovery configuration registers exact workspaces. Do not guess another root.\n if (!config.roots.includes(cwd)) continue;\n } else if (roots.length === 1) cwd = roots[0]; else continue;\n if (!config.roots.includes(cwd)) continue;\n saved.push({ session, cwd });\n }\n const active = await readActiveSession(saved);\n // Replace the saved copy before processing it, so a live retry/cancellation\n // suppresses an obsolete failure even when disk storage is still behind.\n for (const entry of saved) {\n const { session, cwd } = active?.session.sessionId === entry.session?.sessionId ? active : entry;\n const event = checkpoint(session, cwd); if (!event) continue;\n const timestamp = session.requests?.at(-1)?.timestamp;\n if ((typeof timestamp === 'number' ? timestamp : Date.parse(timestamp)) < config.since || !timestamp) continue;\n const result = await call(['external-checkpoint'], event);\n status = active ? 'Observing active Copilot chat and saved sessions.' : 'Observing saved Copilot sessions; active chat identity is not yet available.';\n if (!result.failureId || offered.has(result.failureId)) continue;\n offered.add(result.failureId);\n const button = `Continue with ${result.target}`;\n void vscode.window.showWarningMessage(`Copilot stopped${event.reason === 'rate_limit' ? ' at a usage limit' : ' with an error'}. Lore can continue this job.`, button, 'Dismiss').then(choice => {\n if(choice !== button || disposed) return;\n const quote = s => `'${s.replaceAll(\"'\", \"'\\\\''\")}'`;\n const command = ['env','-u','BUN_OPTIONS','-u','BUN_BE_BUN',`PATH=${config.path || process.env.PATH}`,`LORE_HOME=${config.home}`, ...config.invocation, 'recovery', 'launch-accepted', result.id, result.failureId].map(quote).join(' ');\n const terminal = vscode.window.createTerminal({ name: 'Lore continuation', cwd }); terminal.show(); terminal.sendText(command, true);\n });\n }\n lastError = '';\n } catch(e) { status = e.message; if(lastError !== status) output.appendLine(status); lastError = status; }\n finally { busy = false; }\n }\n const timer = setInterval(() => { void poll(); }, 1500); void poll();\n context.subscriptions.push({ dispose() { disposed = true; clearInterval(timer); } });\n context.subscriptions.push(vscode.commands.registerCommand('lore.recovery.status', () => vscode.window.showInformationMessage(status)));\n}\nmodule.exports = { activate, readActiveSession };\n";
|
|
11
|
+
readonly "session.cjs": "// VS Code's version 3 chat model and numeric objectMutationLog format.\n// No terminal/answer text matching, proposed API, or Copilot monkey patching.\nconst forbidden = new Set(['__proto__', 'constructor', 'prototype']);\nfunction parseSession(text, jsonl = false) {\n if (Buffer.byteLength(text) > 8 * 1024 * 1024) throw Error('Chat exceeds the 8 MiB recovery read limit');\n if (!jsonl) return JSON.parse(text);\n let state;\n for (const line of text.trimEnd().split('\\n')) {\n if (!line) continue;\n const entry = JSON.parse(line);\n if (entry.kind === 0) { if (state !== undefined) throw Error('Repeated chat initial state'); state = entry.v; continue; }\n if (!state || !Array.isArray(entry.k) || !entry.k.length || entry.k.length > 30 || entry.k.some(k => !(typeof k === 'string' || Number.isSafeInteger(k)) || forbidden.has(k))) throw Error('Unsupported chat mutation');\n let parent = state;\n for (const k of entry.k.slice(0, -1)) {\n if (!parent || !Object.hasOwn(parent, k)) throw Error('Invalid chat mutation path');\n parent = parent[k];\n }\n const key = entry.k.at(-1);\n if (!parent || typeof parent !== 'object') throw Error('Invalid chat mutation target');\n if (entry.kind === 1) parent[key] = entry.v;\n else if (entry.kind === 3) delete parent[key];\n else if (entry.kind === 2) {\n const array = parent[key];\n if (!Array.isArray(array) || (entry.i !== undefined && (!Number.isSafeInteger(entry.i) || entry.i < 0 || entry.i > array.length)) || (entry.v !== undefined && !Array.isArray(entry.v))) throw Error('Invalid chat array mutation');\n if (entry.i !== undefined) array.splice(entry.i);\n if (entry.v) array.push(...entry.v);\n } else throw Error('Unknown chat mutation');\n }\n return state;\n}\nfunction checkpoint(session, cwd) {\n if (session?.version !== 3 || typeof session.sessionId !== 'string' || !Array.isArray(session.requests)) return;\n const requests = session.requests.filter(r => !r.isSystemInitiated && !r.hiddenFromTranscript);\n const last = requests.at(-1);\n if (!last || typeof last.requestId !== 'string' || typeof last.message?.text !== 'string') return;\n const extension = last.agent?.extensionId;\n if ((typeof extension === 'string' ? extension : extension?.value)?.toLowerCase() !== 'github.copilot-chat') return;\n const error = last.result?.errorDetails ?? last.responseErrorDetails;\n const canceled = last.isCanceled === true || error?.code === 'canceled' || last.modelState?.value === 2;\n const failed = !canceled && !!error && typeof error.message === 'string' && !error.responseIsFiltered && !error.responseIsRedacted;\n const messages = requests.slice(-10).flatMap(r => [\n { role: 'user', text: String(r.message?.text ?? '').slice(0,6000) },\n { role: 'assistant', text: (r.response ?? []).filter(p => typeof p?.value === 'string').map(p => p.value).join('\\n').slice(0,6000) },\n ]).filter(m => m.text);\n return { host: 'copilot-vscode', sourceAgent: 'copilot-cli', sessionId: session.sessionId, turnId: last.requestId, cwd,\n goal: String(requests[0]?.message?.text ?? '').slice(0,6000), messages,\n state: canceled ? 'cancelled' : failed ? 'failed' : last.result ? 'completed' : 'running',\n ...(failed ? { reason: error.isRateLimited === true || error.isQuotaExceeded === true || ['rateLimited','quotaExceeded'].includes(error.code) ? 'rate_limit' : 'agent_error' } : {}), observedAt: Date.now() };\n}\n// Live chat export omits sessionId/cwd. Bind only by the ordered stable request\n// IDs of exactly one saved session; never infer identity from a title or text.\nfunction bindActiveSession(exported, saved) {\n if (!Array.isArray(exported?.requests) || !exported.requests.length) return;\n const ids = exported.requests.map(r => r.requestId);\n if (ids.some(id => typeof id !== 'string' || !id) || new Set(ids).size !== ids.length) return;\n const matches = saved.filter(({ session }) => session?.version === 3 && typeof session.sessionId === 'string' &&\n Array.isArray(session.requests) && session.requests.length > 0 && session.requests.length <= ids.length &&\n session.requests.every((r, i) => r.requestId === ids[i]));\n if (matches.length !== 1) return;\n const match = matches[0];\n return { cwd: match.cwd, session: { ...match.session, requests: exported.requests } };\n}\nmodule.exports = { parseSession, checkpoint, bindActiveSession };\n";
|
|
12
|
+
};
|
|
8
13
|
//# sourceMappingURL=generated-assets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-assets.d.ts","sourceRoot":"","sources":["../src/generated-assets.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AACX,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"generated-assets.d.ts","sourceRoot":"","sources":["../src/generated-assets.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AACX,eAAO,MAAM,uBAAuB,y9KAAy9K,CAAC;AAC9/K,eAAO,MAAM,sBAAsB;;;;CAAohY,CAAC"}
|
package/dist/generated-assets.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// Generated by scripts/generate-cli-assets.mjs. Do not edit directly.
|
|
2
2
|
export const GITHUB_TEMPLATE_ASSETS = {
|
|
3
|
-
"lore-codex-review.yml": "name: Lore Codex review\nrun-name: \"Lore Codex review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:codex-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.
|
|
4
|
-
"lore-devin-review.yml": "name: Lore Devin review\nrun-name: \"Lore Devin review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\nconcurrency:\n group: lore-devin-review-${{ github.repository }}-${{ github.event.pull_request.number }}\n cancel-in-progress: true\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:devin-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n pull-requests: write\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.
|
|
5
|
-
"lore-observe-correction.yml": "name: Lore review correction\nrun-name: \"Lore review correction comment #${{ github.event.comment.id }}\"\n\non:\n issue_comment:\n types: [created]\n\njobs:\n observe:\n if: >-\n github.event.issue.pull_request &&\n startsWith(github.event.comment.body, '/lore correct ')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n issues: read\n pull-requests: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.
|
|
3
|
+
"lore-codex-review.yml": "name: Lore Codex review\nrun-name: \"Lore Codex review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:codex-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.29' }}\n outputs:\n final-message: ${{ steps.codex.outputs.final-message }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n fetch-depth: 0\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - name: Prepare Lore review context\n env:\n LORE_API_URL: ${{ vars.LORE_API_URL }}\n LORE_WORKSPACE_TOKEN: ${{ secrets.LORE_WORKSPACE_TOKEN }}\n run: >-\n lore github prepare-review\n --provider codex\n --event \"$GITHUB_EVENT_PATH\"\n --checkout \"$GITHUB_WORKSPACE/review\"\n --prompt-out \"$GITHUB_WORKSPACE/.lore/codex-prompt.md\"\n --metadata-out \"$GITHUB_WORKSPACE/.lore/codex-metadata.json\"\n --schema-out \"$GITHUB_WORKSPACE/.lore/review-output.schema.json\"\n\n - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2\n with:\n name: lore-codex-metadata\n path: .lore/codex-metadata.json\n retention-days: 1\n\n - name: Run Codex\n id: codex\n uses: openai/codex-action@52fe01ec70a42f454c9d2ebd47598f9fd6893d56 # v1.11\n with:\n openai-api-key: ${{ secrets.OPENAI_API_KEY }}\n prompt-file: .lore/codex-prompt.md\n output-schema-file: .lore/review-output.schema.json\n working-directory: review\n permission-profile: \":read-only\"\n safety-strategy: drop-sudo\n\n post:\n needs: review\n if: needs.review.outputs.final-message != ''\n runs-on: ubuntu-latest\n permissions:\n contents: read\n pull-requests: write\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.29' }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0\n with:\n name: lore-codex-metadata\n path: .lore\n\n - name: Save review output\n env:\n CODEX_REVIEW: ${{ needs.review.outputs.final-message }}\n run: |\n mkdir -p .lore\n printf '%s' \"$CODEX_REVIEW\" > .lore/codex-output.json\n\n - name: Post or update Lore review\n env:\n GH_TOKEN: ${{ github.token }}\n run: >-\n lore github post-review\n --metadata .lore/codex-metadata.json\n --output .lore/codex-output.json\n",
|
|
4
|
+
"lore-devin-review.yml": "name: Lore Devin review\nrun-name: \"Lore Devin review [${{ github.event.action }}] PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}\"\n\non:\n pull_request:\n types: [opened, synchronize, reopened, ready_for_review, labeled]\n\nconcurrency:\n group: lore-devin-review-${{ github.repository }}-${{ github.event.pull_request.number }}\n cancel-in-progress: true\n\njobs:\n review:\n if: >-\n !github.event.pull_request.draft &&\n github.event.pull_request.head.repo.full_name == github.repository &&\n contains(github.event.pull_request.labels.*.name, 'lore:devin-review')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n pull-requests: write\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.29' }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n fetch-depth: 0\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - name: Prepare Lore review context\n env:\n LORE_API_URL: ${{ vars.LORE_API_URL }}\n LORE_WORKSPACE_TOKEN: ${{ secrets.LORE_WORKSPACE_TOKEN }}\n run: >-\n lore github prepare-review\n --provider devin\n --event \"$GITHUB_EVENT_PATH\"\n --checkout \"$GITHUB_WORKSPACE/review\"\n --prompt-out \"$GITHUB_WORKSPACE/.lore/devin-prompt.md\"\n --metadata-out \"$GITHUB_WORKSPACE/.lore/devin-metadata.json\"\n\n - name: Run Lore-enriched Devin review\n env:\n DEVIN_API_KEY: ${{ secrets.DEVIN_API_KEY }}\n DEVIN_ORG_ID: ${{ vars.DEVIN_ORG_ID }}\n run: >-\n lore devin run-review\n --prompt .lore/devin-prompt.md\n --metadata .lore/devin-metadata.json\n --output .lore/devin-output.json\n\n - name: Post or update Lore review\n env:\n GH_TOKEN: ${{ github.token }}\n run: >-\n lore github post-review\n --metadata .lore/devin-metadata.json\n --output .lore/devin-output.json\n\n - name: Clean up Devin session\n if: always()\n continue-on-error: true\n env:\n DEVIN_API_KEY: ${{ secrets.DEVIN_API_KEY }}\n DEVIN_ORG_ID: ${{ vars.DEVIN_ORG_ID }}\n run: |\n SESSION_ID=\"$(jq -r '.sessionId // empty' .lore/devin-metadata.json 2>/dev/null || true)\"\n if [ -n \"$SESSION_ID\" ]; then\n lore devin terminate --session \"$SESSION_ID\"\n fi\n",
|
|
5
|
+
"lore-observe-correction.yml": "name: Lore review correction\nrun-name: \"Lore review correction comment #${{ github.event.comment.id }}\"\n\non:\n issue_comment:\n types: [created]\n\njobs:\n observe:\n if: >-\n github.event.issue.pull_request &&\n startsWith(github.event.comment.body, '/lore correct ')\n runs-on: ubuntu-latest\n permissions:\n contents: read\n issues: read\n pull-requests: read\n env:\n LORE_CLI_REPOSITORY: ${{ vars.LORE_CLI_REPOSITORY || 'treadiehq/lore-releases' }}\n LORE_CLI_VERSION: ${{ vars.LORE_CLI_VERSION || 'v0.1.29' }}\n steps:\n - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0\n with:\n persist-credentials: false\n path: review\n\n - name: Install Lore CLI\n run: |\n export LORE_REPO=\"$LORE_CLI_REPOSITORY\"\n export LORE_VERSION=\"$LORE_CLI_VERSION\"\n export LORE_BIN_DIR=\"$RUNNER_TEMP/lore/bin\"\n curl -fsSL \"https://github.com/$LORE_CLI_REPOSITORY/releases/download/$LORE_CLI_VERSION/install.sh\" | bash\n\n - name: Teach Lore from an authorized correction\n env:\n GH_TOKEN: ${{ github.token }}\n LORE_API_URL: ${{ vars.LORE_API_URL }}\n LORE_WORKSPACE_TOKEN: ${{ secrets.LORE_WORKSPACE_TOKEN }}\n run: >-\n lore github observe-correction\n --event \"$GITHUB_EVENT_PATH\"\n",
|
|
6
6
|
"review-output.schema.json": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"summary\", \"findings\"],\n \"properties\": {\n \"summary\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"findings\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"severity\", \"title\", \"body\", \"path\", \"line\"],\n \"properties\": {\n \"severity\": {\n \"enum\": [\"critical\", \"high\", \"medium\", \"low\"]\n },\n \"title\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"body\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"path\": {\n \"type\": [\"string\", \"null\"],\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n \"line\": {\n \"type\": [\"integer\", \"null\"],\n \"minimum\": 1\n }\n }\n }\n }\n }\n}\n"
|
|
7
7
|
};
|
|
8
|
-
export const SELF_HOST_COMPOSE_ASSET = "name: lore\n\nx-api-image: &api-image \"${LORE_API_IMAGE:-ghcr.io/treadiehq/lore-api}:${LORE_IMAGE_TAG:-0.1.
|
|
8
|
+
export const SELF_HOST_COMPOSE_ASSET = "name: lore\n\nx-api-image: &api-image \"${LORE_API_IMAGE:-ghcr.io/treadiehq/lore-api}:${LORE_IMAGE_TAG:-0.1.29}\"\nx-web-image: &web-image \"${LORE_WEB_IMAGE:-ghcr.io/treadiehq/lore-web}:${LORE_IMAGE_TAG:-0.1.29}\"\n\nservices:\n postgres:\n image: pgvector/pgvector:0.8.6-pg18\n environment:\n POSTGRES_DB: lore\n POSTGRES_USER: lore\n POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-}\n volumes:\n - postgres-data:/var/lib/postgresql\n healthcheck:\n test:\n [\n \"CMD-SHELL\",\n 'pg_isready -h 127.0.0.1 -U \"$${POSTGRES_USER}\" -d \"$${POSTGRES_DB}\"',\n ]\n interval: 5s\n timeout: 5s\n retries: 10\n start_period: 10s\n restart: unless-stopped\n\n api:\n image: *api-image\n environment:\n NODE_ENV: production\n DATABASE_URL: \"postgresql://lore:${POSTGRES_PASSWORD:-}@postgres:5432/lore\"\n API_HOST: 0.0.0.0\n API_PORT: 3001\n API_JSON_BODY_LIMIT: ${API_JSON_BODY_LIMIT:-1mb}\n API_RATE_LIMIT_PER_MINUTE: ${API_RATE_LIMIT_PER_MINUTE:-120}\n RATE_LIMIT_KEY_SECRET: ${RATE_LIMIT_KEY_SECRET:-}\n TRUSTED_PROXY_CIDRS: ${TRUSTED_PROXY_CIDRS:-10.0.0.0/8,172.16.0.0/12}\n NUXT_ORIGIN: ${NUXT_ORIGIN:-}\n LORE_SERVER_VERSION: ${LORE_IMAGE_TAG:-0.1.29}\n LORE_SERVER_REVISION: ${LORE_SERVER_REVISION:-}\n LORE_WORKSPACE_TOKEN: ${LORE_WORKSPACE_TOKEN:-}\n LORE_WORKSPACE_ORGANIZATION: ${LORE_WORKSPACE_ORGANIZATION:-}\n LORE_WORKSPACE_NAME: ${LORE_WORKSPACE_NAME:-}\n AUTH_MODE: ${AUTH_MODE:-magic_link}\n AUTH_EMAIL_MODE: ${AUTH_EMAIL_MODE:-resend}\n AUTH_WEB_ORIGIN: ${AUTH_WEB_ORIGIN:-}\n AUTH_OWNER_EMAIL: ${AUTH_OWNER_EMAIL:-}\n AUTH_EMAIL_FROM: ${AUTH_EMAIL_FROM:-}\n RESEND_API_KEY: ${RESEND_API_KEY:-}\n AUTH_MAGIC_LINK_TTL_MINUTES: ${AUTH_MAGIC_LINK_TTL_MINUTES:-15}\n AUTH_SESSION_TTL_DAYS: ${AUTH_SESSION_TTL_DAYS:-30}\n CLOUD_RECOVERY_ENCRYPTION_KEY: ${CLOUD_RECOVERY_ENCRYPTION_KEY:-}\n CLOUD_RECOVERY_PUBLIC_API_URL: ${CLOUD_RECOVERY_PUBLIC_API_URL:-}\n DEVIN_POLLING_ENABLED: ${DEVIN_POLLING_ENABLED:-false}\n DEVIN_API_KEY: ${DEVIN_API_KEY:-}\n DEVIN_ORG_ID: ${DEVIN_ORG_ID:-}\n DEVIN_REPOSITORY_ALLOWLIST: ${DEVIN_REPOSITORY_ALLOWLIST:-}\n DEVIN_POLL_INTERVAL_MS: ${DEVIN_POLL_INTERVAL_MS:-15000}\n DEVIN_REQUEST_TIMEOUT_MS: ${DEVIN_REQUEST_TIMEOUT_MS:-10000}\n DEVIN_POLL_BATCH_SIZE: ${DEVIN_POLL_BATCH_SIZE:-25}\n EXTRACTOR_PROVIDER: ${EXTRACTOR_PROVIDER:-heuristic}\n EXTRACTOR_MIN_CONFIDENCE: ${EXTRACTOR_MIN_CONFIDENCE:-0.8}\n EXTRACTOR_MODEL: ${EXTRACTOR_MODEL:-}\n EXTRACTOR_BASE_URL: ${EXTRACTOR_BASE_URL:-}\n EXTRACTOR_API_KEY: ${EXTRACTOR_API_KEY:-}\n RETRIEVAL_MODE: ${RETRIEVAL_MODE:-auto}\n EMBEDDING_MODEL: ${EMBEDDING_MODEL:-text-embedding-3-small}\n EMBEDDING_BASE_URL: ${EMBEDDING_BASE_URL:-https://api.openai.com/v1}\n EMBEDDING_API_KEY: ${EMBEDDING_API_KEY:-}\n EMBEDDING_DIMENSIONS: ${EMBEDDING_DIMENSIONS:-1536}\n EMBEDDING_TIMEOUT_MS: ${EMBEDDING_TIMEOUT_MS:-5000}\n EMBEDDING_SPACE_ID: ${EMBEDDING_SPACE_ID:-}\n EMBEDDING_RECONCILE_INTERVAL_MS: ${EMBEDDING_RECONCILE_INTERVAL_MS:-60000}\n EMBEDDING_RECONCILE_BATCH_SIZE: ${EMBEDDING_RECONCILE_BATCH_SIZE:-500}\n EMBEDDING_RECONCILE_PAGE_SIZE: ${EMBEDDING_RECONCILE_PAGE_SIZE:-100}\n CAPTURE_WORKER_POLL_INTERVAL_MS: ${CAPTURE_WORKER_POLL_INTERVAL_MS:-500}\n CAPTURE_WORKER_CONCURRENCY: ${CAPTURE_WORKER_CONCURRENCY:-2}\n CAPTURE_WORKER_LEASE_MS: ${CAPTURE_WORKER_LEASE_MS:-60000}\n CAPTURE_INLINE_TIMEOUT_MS: ${CAPTURE_INLINE_TIMEOUT_MS:-45000}\n SEMANTIC_MIN_SIMILARITY: ${SEMANTIC_MIN_SIMILARITY:-0.4}\n CONTEXT_MAX_ITEMS: ${CONTEXT_MAX_ITEMS:-10}\n CONTEXT_MAX_CHARACTERS: ${CONTEXT_MAX_CHARACTERS:-12000}\n CONTEXT_MAX_ESTIMATED_TOKENS: ${CONTEXT_MAX_ESTIMATED_TOKENS:-4000}\n ports:\n - \"${API_BIND_ADDRESS:-127.0.0.1}:${API_PORT:-3001}:3001\"\n depends_on:\n postgres:\n condition: service_healthy\n healthcheck:\n test:\n [\n \"CMD\",\n \"node\",\n \"-e\",\n \"fetch('http://127.0.0.1:3001/health/ready').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))\",\n ]\n interval: 5s\n timeout: 5s\n retries: 12\n start_period: 10s\n restart: unless-stopped\n\n web:\n image: *web-image\n environment:\n HOST: 0.0.0.0\n PORT: 3000\n NITRO_HOST: 0.0.0.0\n NITRO_PORT: 3000\n NUXT_LORE_API_URL: http://api:3001\n NUXT_AUTH_COOKIE_NAME: ${NUXT_AUTH_COOKIE_NAME:-lore_session}\n NUXT_AUTH_COOKIE_SECURE: ${NUXT_AUTH_COOKIE_SECURE:-true}\n TRUSTED_PROXY_CIDRS: ${TRUSTED_PROXY_CIDRS:-10.0.0.0/8,172.16.0.0/12}\n NUXT_PUBLIC_API_BASE_URL: /api/lore\n NUXT_PUBLIC_LORE_CONNECTOR_API_URL: ${NUXT_PUBLIC_LORE_CONNECTOR_API_URL:-http://localhost:3001}\n NUXT_PUBLIC_LORE_INSTALL_URL: ${NUXT_PUBLIC_LORE_INSTALL_URL:-https://uselore.co/install.sh}\n ports:\n - \"${NUXT_BIND_ADDRESS:-127.0.0.1}:${NUXT_PORT:-3000}:3000\"\n depends_on:\n api:\n condition: service_healthy\n healthcheck:\n test:\n [\n \"CMD\",\n \"node\",\n \"-e\",\n \"fetch('http://127.0.0.1:3000/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))\",\n ]\n interval: 10s\n timeout: 5s\n retries: 12\n start_period: 15s\n restart: unless-stopped\n\nvolumes:\n postgres-data:\n";
|
|
9
|
+
export const VSCODE_RECOVERY_ASSETS = { "package.json": "{\n \"name\": \"lore-recovery\",\n \"displayName\": \"Lore Recovery\",\n \"publisher\": \"lore-co\",\n \"version\": \"0.1.0\",\n \"description\": \"Continue a stopped Copilot job in another connected coding tool.\",\n \"engines\": { \"vscode\": \"^1.105.0\" },\n \"main\": \"./extension.cjs\",\n \"activationEvents\": [\"onStartupFinished\"],\n \"extensionKind\": [\"workspace\"],\n \"capabilities\": { \"untrustedWorkspaces\": { \"supported\": false }, \"virtualWorkspaces\": false },\n \"contributes\": { \"commands\": [{ \"command\": \"lore.recovery.status\", \"title\": \"Lore: Show Recovery Status\" }] }\n}\n", "extension.cjs": "const vscode = require('vscode');\nconst fs = require('node:fs/promises');\nconst { constants } = require('node:fs');\nconst path = require('node:path');\nconst { tmpdir } = require('node:os');\nconst { spawn } = require('node:child_process');\nconst { fileURLToPath } = require('node:url');\nconst { parseSession, checkpoint, bindActiveSession } = require('./session.cjs');\n\nasync function readActiveSession(saved) {\n if (!saved.length) return;\n const directory = await fs.mkdtemp(path.join(tmpdir(), 'lore-chat-'));\n try {\n await fs.chmod(directory, 0o700);\n const target = path.join(directory, 'active.json');\n await fs.writeFile(target, '', { mode: 0o600 });\n // This public command exports the in-memory chat without opening a dialog.\n await vscode.commands.executeCommand('workbench.action.chat.export', vscode.Uri.file(target));\n const file = await fs.open(target, constants.O_RDONLY | constants.O_NOFOLLOW);\n try {\n const stat = await file.stat();\n if (!stat.isFile() || stat.size > 8 * 1024 * 1024 || (process.getuid && stat.uid !== process.getuid())) return;\n return bindActiveSession(parseSession(await file.readFile('utf8')), saved);\n } finally { await file.close(); }\n } catch { /* Unsupported export commands keep the saved-session fallback. */ }\n finally { await fs.rm(directory, { recursive: true, force: true }); }\n}\n\nfunction activate(context) {\n const output = vscode.window.createOutputChannel('Lore Recovery'); context.subscriptions.push(output);\n let config = require('./connection.json'); // Written by lore connect, outside the repository.\n let busy = false, disposed = false, lastError = '', status = 'Waiting for a saved Copilot turn.';\n const offered = new Set();\n function call(args, input) {\n return new Promise((resolve, reject) => {\n const child = spawn(config.invocation[0], [...config.invocation.slice(1), 'recovery', ...args], {\n env: { ...process.env, PATH: config.path || process.env.PATH, LORE_HOME: config.home, BUN_OPTIONS: undefined, BUN_BE_BUN: undefined }, stdio: ['pipe','pipe','pipe'],\n });\n let body = '', error = ''; const timer = setTimeout(() => { child.kill(); reject(Error('Lore adapter timed out')); }, 10000);\n child.stdout.on('data', b => { body += b; if (body.length > 65536) child.kill(); });\n child.stderr.on('data', b => { error = (error + b).slice(-2000); });\n child.once('error', e => { clearTimeout(timer); reject(e); });\n child.once('exit', code => { clearTimeout(timer); if(code) reject(Error(error || 'Lore adapter failed')); else { try { resolve(JSON.parse(body)); } catch { reject(Error('Invalid Lore response')); } } });\n child.stdin.on('error', () => {}); child.stdin.end(JSON.stringify(input));\n });\n }\n async function poll() {\n if (busy || disposed || !vscode.workspace.isTrusted || !context.storageUri || context.storageUri.scheme !== 'file') return;\n busy = true;\n try {\n config = JSON.parse(await fs.readFile(path.join(__dirname, 'connection.json'), 'utf8'));\n if (config.disabled) { status = 'Lore recovery is disabled.'; return; }\n const folders = (vscode.workspace.workspaceFolders ?? []).filter(f => f.uri.scheme === 'file');\n const roots = await Promise.all(folders.map(f => fs.realpath(f.uri.fsPath)));\n const storage = path.dirname(context.storageUri.fsPath), chatDir = path.join(storage, 'chatSessions');\n // The extension context binds this storage directory to this VS Code workspace.\n const names = (await fs.readdir(chatDir).catch(e => { if(e.code === 'ENOENT') return []; throw e; })).filter(n => /^[a-zA-Z0-9-]+\\.jsonl?$/.test(n) && n !== 'index.json').slice(-400);\n const saved = [];\n for (const name of names) {\n const file = await fs.open(path.join(chatDir,name), constants.O_RDONLY | constants.O_NOFOLLOW);\n let session;\n try {\n const stat = await file.stat();\n if (!stat.isFile() || stat.size > 8*1024*1024 || (process.getuid && stat.uid !== process.getuid())) continue;\n session = parseSession(await file.readFile('utf8'), name.endsWith('.jsonl'));\n } catch (e) { if(e instanceof SyntaxError) continue; throw e; }\n finally { await file.close(); }\n let cwd;\n if (session?.workingDirectory) {\n try { cwd = await fs.realpath(fileURLToPath(session.workingDirectory)); } catch { continue; }\n if (!roots.some(r => cwd === r || cwd.startsWith(r + path.sep))) continue;\n // Recovery configuration registers exact workspaces. Do not guess another root.\n if (!config.roots.includes(cwd)) continue;\n } else if (roots.length === 1) cwd = roots[0]; else continue;\n if (!config.roots.includes(cwd)) continue;\n saved.push({ session, cwd });\n }\n const active = await readActiveSession(saved);\n // Replace the saved copy before processing it, so a live retry/cancellation\n // suppresses an obsolete failure even when disk storage is still behind.\n for (const entry of saved) {\n const { session, cwd } = active?.session.sessionId === entry.session?.sessionId ? active : entry;\n const event = checkpoint(session, cwd); if (!event) continue;\n const timestamp = session.requests?.at(-1)?.timestamp;\n if ((typeof timestamp === 'number' ? timestamp : Date.parse(timestamp)) < config.since || !timestamp) continue;\n const result = await call(['external-checkpoint'], event);\n status = active ? 'Observing active Copilot chat and saved sessions.' : 'Observing saved Copilot sessions; active chat identity is not yet available.';\n if (!result.failureId || offered.has(result.failureId)) continue;\n offered.add(result.failureId);\n const button = `Continue with ${result.target}`;\n void vscode.window.showWarningMessage(`Copilot stopped${event.reason === 'rate_limit' ? ' at a usage limit' : ' with an error'}. Lore can continue this job.`, button, 'Dismiss').then(choice => {\n if(choice !== button || disposed) return;\n const quote = s => `'${s.replaceAll(\"'\", \"'\\\\''\")}'`;\n const command = ['env','-u','BUN_OPTIONS','-u','BUN_BE_BUN',`PATH=${config.path || process.env.PATH}`,`LORE_HOME=${config.home}`, ...config.invocation, 'recovery', 'launch-accepted', result.id, result.failureId].map(quote).join(' ');\n const terminal = vscode.window.createTerminal({ name: 'Lore continuation', cwd }); terminal.show(); terminal.sendText(command, true);\n });\n }\n lastError = '';\n } catch(e) { status = e.message; if(lastError !== status) output.appendLine(status); lastError = status; }\n finally { busy = false; }\n }\n const timer = setInterval(() => { void poll(); }, 1500); void poll();\n context.subscriptions.push({ dispose() { disposed = true; clearInterval(timer); } });\n context.subscriptions.push(vscode.commands.registerCommand('lore.recovery.status', () => vscode.window.showInformationMessage(status)));\n}\nmodule.exports = { activate, readActiveSession };\n", "session.cjs": "// VS Code's version 3 chat model and numeric objectMutationLog format.\n// No terminal/answer text matching, proposed API, or Copilot monkey patching.\nconst forbidden = new Set(['__proto__', 'constructor', 'prototype']);\nfunction parseSession(text, jsonl = false) {\n if (Buffer.byteLength(text) > 8 * 1024 * 1024) throw Error('Chat exceeds the 8 MiB recovery read limit');\n if (!jsonl) return JSON.parse(text);\n let state;\n for (const line of text.trimEnd().split('\\n')) {\n if (!line) continue;\n const entry = JSON.parse(line);\n if (entry.kind === 0) { if (state !== undefined) throw Error('Repeated chat initial state'); state = entry.v; continue; }\n if (!state || !Array.isArray(entry.k) || !entry.k.length || entry.k.length > 30 || entry.k.some(k => !(typeof k === 'string' || Number.isSafeInteger(k)) || forbidden.has(k))) throw Error('Unsupported chat mutation');\n let parent = state;\n for (const k of entry.k.slice(0, -1)) {\n if (!parent || !Object.hasOwn(parent, k)) throw Error('Invalid chat mutation path');\n parent = parent[k];\n }\n const key = entry.k.at(-1);\n if (!parent || typeof parent !== 'object') throw Error('Invalid chat mutation target');\n if (entry.kind === 1) parent[key] = entry.v;\n else if (entry.kind === 3) delete parent[key];\n else if (entry.kind === 2) {\n const array = parent[key];\n if (!Array.isArray(array) || (entry.i !== undefined && (!Number.isSafeInteger(entry.i) || entry.i < 0 || entry.i > array.length)) || (entry.v !== undefined && !Array.isArray(entry.v))) throw Error('Invalid chat array mutation');\n if (entry.i !== undefined) array.splice(entry.i);\n if (entry.v) array.push(...entry.v);\n } else throw Error('Unknown chat mutation');\n }\n return state;\n}\nfunction checkpoint(session, cwd) {\n if (session?.version !== 3 || typeof session.sessionId !== 'string' || !Array.isArray(session.requests)) return;\n const requests = session.requests.filter(r => !r.isSystemInitiated && !r.hiddenFromTranscript);\n const last = requests.at(-1);\n if (!last || typeof last.requestId !== 'string' || typeof last.message?.text !== 'string') return;\n const extension = last.agent?.extensionId;\n if ((typeof extension === 'string' ? extension : extension?.value)?.toLowerCase() !== 'github.copilot-chat') return;\n const error = last.result?.errorDetails ?? last.responseErrorDetails;\n const canceled = last.isCanceled === true || error?.code === 'canceled' || last.modelState?.value === 2;\n const failed = !canceled && !!error && typeof error.message === 'string' && !error.responseIsFiltered && !error.responseIsRedacted;\n const messages = requests.slice(-10).flatMap(r => [\n { role: 'user', text: String(r.message?.text ?? '').slice(0,6000) },\n { role: 'assistant', text: (r.response ?? []).filter(p => typeof p?.value === 'string').map(p => p.value).join('\\n').slice(0,6000) },\n ]).filter(m => m.text);\n return { host: 'copilot-vscode', sourceAgent: 'copilot-cli', sessionId: session.sessionId, turnId: last.requestId, cwd,\n goal: String(requests[0]?.message?.text ?? '').slice(0,6000), messages,\n state: canceled ? 'cancelled' : failed ? 'failed' : last.result ? 'completed' : 'running',\n ...(failed ? { reason: error.isRateLimited === true || error.isQuotaExceeded === true || ['rateLimited','quotaExceeded'].includes(error.code) ? 'rate_limit' : 'agent_error' } : {}), observedAt: Date.now() };\n}\n// Live chat export omits sessionId/cwd. Bind only by the ordered stable request\n// IDs of exactly one saved session; never infer identity from a title or text.\nfunction bindActiveSession(exported, saved) {\n if (!Array.isArray(exported?.requests) || !exported.requests.length) return;\n const ids = exported.requests.map(r => r.requestId);\n if (ids.some(id => typeof id !== 'string' || !id) || new Set(ids).size !== ids.length) return;\n const matches = saved.filter(({ session }) => session?.version === 3 && typeof session.sessionId === 'string' &&\n Array.isArray(session.requests) && session.requests.length > 0 && session.requests.length <= ids.length &&\n session.requests.every((r, i) => r.requestId === ids[i]));\n if (matches.length !== 1) return;\n const match = matches[0];\n return { cwd: match.cwd, session: { ...match.session, requests: exported.requests } };\n}\nmodule.exports = { parseSession, checkpoint, bindActiveSession };\n" };
|
|
9
10
|
//# sourceMappingURL=generated-assets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-assets.js","sourceRoot":"","sources":["../src/generated-assets.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,uBAAuB,EAAE,+8HAA+8H;IACx+H,uBAAuB,EAAE,25FAA25F;IACp7F,6BAA6B,EAAE,q4CAAq4C;IACp6C,2BAA2B,EAAE,+tCAA+tC;CACpvC,CAAC;AACX,MAAM,CAAC,MAAM,uBAAuB,GAAG,
|
|
1
|
+
{"version":3,"file":"generated-assets.js","sourceRoot":"","sources":["../src/generated-assets.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,uBAAuB,EAAE,+8HAA+8H;IACx+H,uBAAuB,EAAE,25FAA25F;IACp7F,6BAA6B,EAAE,q4CAAq4C;IACp6C,2BAA2B,EAAE,+tCAA+tC;CACpvC,CAAC;AACX,MAAM,CAAC,MAAM,uBAAuB,GAAG,s9KAAs9K,CAAC;AAC9/K,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAC,cAAc,EAAC,mnBAAmnB,EAAC,eAAe,EAAC,ygOAAygO,EAAC,aAAa,EAAC,21IAA21I,EAAU,CAAC"}
|