@lore-co/cli 0.1.24 → 0.1.26
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 +76 -5
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +50 -4
- package/dist/cli.js.map +1 -1
- package/dist/codex-hook-approval.d.ts +13 -0
- package/dist/codex-hook-approval.d.ts.map +1 -0
- package/dist/codex-hook-approval.js +96 -0
- package/dist/codex-hook-approval.js.map +1 -0
- package/dist/devin-capture.d.ts +25 -0
- package/dist/devin-capture.d.ts.map +1 -0
- package/dist/devin-capture.js +177 -0
- package/dist/devin-capture.js.map +1 -0
- package/dist/devin-cli.d.ts +21 -0
- package/dist/devin-cli.d.ts.map +1 -0
- package/dist/devin-cli.js +432 -0
- package/dist/devin-cli.js.map +1 -0
- package/dist/devin.d.ts.map +1 -1
- package/dist/devin.js +15 -8
- package/dist/devin.js.map +1 -1
- package/dist/generated-assets.d.ts +4 -4
- package/dist/generated-assets.js +4 -4
- package/dist/image-capture.d.ts +62 -0
- package/dist/image-capture.d.ts.map +1 -0
- package/dist/image-capture.js +266 -0
- package/dist/image-capture.js.map +1 -0
- package/dist/invocation-health-writer.d.ts.map +1 -1
- package/dist/invocation-health-writer.js +5 -1
- package/dist/invocation-health-writer.js.map +1 -1
- package/dist/recovery-state.d.ts +1 -1
- package/dist/recovery.d.ts +2 -2
- package/dist/recovery.d.ts.map +1 -1
- package/dist/recovery.js +37 -22
- package/dist/recovery.js.map +1 -1
- package/dist/reliability-store.d.ts.map +1 -1
- package/dist/reliability-store.js +2 -1
- package/dist/reliability-store.js.map +1 -1
- package/dist/runtime.d.ts +4 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +34 -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/share.d.ts +3 -0
- package/dist/share.d.ts.map +1 -0
- package/dist/share.js +51 -0
- package/dist/share.js.map +1 -0
- package/dist/update.js +3 -3
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -164,7 +164,7 @@ content-free `guard_check` audit event.
|
|
|
164
164
|
|
|
165
165
|
```sh
|
|
166
166
|
lore update
|
|
167
|
-
lore update --version v0.1.
|
|
167
|
+
lore update --version v0.1.26
|
|
168
168
|
```
|
|
169
169
|
|
|
170
170
|
`update` resolves the latest release to an exact tag, or uses the exact
|
|
@@ -194,6 +194,14 @@ The three commands above also support `--json`. `doctor` checks public
|
|
|
194
194
|
unready, and unauthorized states remain distinct.
|
|
195
195
|
|
|
196
196
|
`status` and `doctor` report the durable outbox, oldest pending capture,
|
|
197
|
+
and the last observed invocation. `doctor` also asks Codex for its discovered
|
|
198
|
+
Lore hooks and approval state. New or changed Codex hooks need review in
|
|
199
|
+
`/hooks`; Lore never writes trust records or bypasses that review. Unsupported
|
|
200
|
+
or unreachable host diagnostics are reported as unverified, not approved.
|
|
201
|
+
After installation, restart the agent, complete a turn, and check for fresh
|
|
202
|
+
activity. API access and installed files alone do not establish recording.
|
|
203
|
+
|
|
204
|
+
The diagnostics also report
|
|
197
205
|
verified snapshots and their local age, trust keys, local Guard coverage and
|
|
198
206
|
latency, context fallback rate, declared agent capabilities, exact installation
|
|
199
207
|
state, and last invocation health. `doctor` also reads the authenticated
|
|
@@ -365,8 +373,53 @@ after model turns. `lore connect` cannot intercept an arbitrary external model
|
|
|
365
373
|
API or bot by itself. The Lore web/wiki service is optional; the bridge needs
|
|
366
374
|
only a reachable headless Lore API.
|
|
367
375
|
|
|
376
|
+
## Image attachments
|
|
377
|
+
|
|
378
|
+
Image storage is shared across agents. Codex and Claude Code native hooks read
|
|
379
|
+
embedded images from matching user messages in their local transcripts. OpenCode
|
|
380
|
+
captures structured user and completed-assistant image parts. Devin CLI captures
|
|
381
|
+
local image references in multimodal ATIF exports. Native hooks also accept image
|
|
382
|
+
parts or explicit file attachments supplied by a host.
|
|
383
|
+
|
|
384
|
+
Lore saves the supplied bytes separately from conversation text and shows private
|
|
385
|
+
thumbnails in sessions and learning-source evidence. Transcript images must match
|
|
386
|
+
the user message, session, and capture time. Paths in ordinary prose are never
|
|
387
|
+
read, and remote image URLs are not fetched automatically.
|
|
388
|
+
|
|
389
|
+
PNG, JPEG, WebP, and GIF are supported, up to 5 MiB and 40 megapixels per image,
|
|
390
|
+
with six images per event. Capture retries at Stop if the transcript was not
|
|
391
|
+
ready when the prompt hook ran. Uploads use the durable outbox and retry on later
|
|
392
|
+
hooks, draining up to six images within a bounded upload window. Integrations
|
|
393
|
+
without image data in their hooks use the shared SDK/API or MCP `attach_image`
|
|
394
|
+
tool. Cursor currently omits pasted images from its prompt-hook attachments;
|
|
395
|
+
text-only Copilot, Cowork, or cloud exports likewise need the source to explicitly
|
|
396
|
+
provide the image bytes. A filename alone is not a captured image.
|
|
397
|
+
|
|
398
|
+
The API and dashboard must include migration `0027_event_images`, and installed
|
|
399
|
+
hooks must be refreshed with the updated CLI. Existing text-only events are not
|
|
400
|
+
automatically backfilled; unavailable originals remain labeled in the session.
|
|
401
|
+
|
|
368
402
|
## Devin sessions
|
|
369
403
|
|
|
404
|
+
For local Devin CLI sessions, connect Lore first, then run:
|
|
405
|
+
|
|
406
|
+
```sh
|
|
407
|
+
lore devin cli setup
|
|
408
|
+
# Open a new terminal:
|
|
409
|
+
devin
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
The shell integration enables `--export` automatically and records completed
|
|
413
|
+
user/assistant turns, including resumed sessions. Lore supplies context through
|
|
414
|
+
the prompt hook and reads assistant replies from the export, so Stop payloads
|
|
415
|
+
without assistant text are supported. In scripts, use
|
|
416
|
+
`lore devin cli -- -p "Your task"`. Run `lore devin cli status` to check the last
|
|
417
|
+
capture, `lore devin cli sync` to retry uploads, and `lore devin cli off` to
|
|
418
|
+
remove the integration. Sign-in, workspace trust, and Devin permissions remain
|
|
419
|
+
under Devin's control. See [capture boundaries and storage](../../docs/guides/integrations.md#devin-cli).
|
|
420
|
+
|
|
421
|
+
### Devin Cloud
|
|
422
|
+
|
|
370
423
|
Create a Lore-enriched Devin session, then send later prompts through the same
|
|
371
424
|
audited context-delivery path:
|
|
372
425
|
|
|
@@ -385,9 +438,11 @@ DEVIN_API_KEY=... DEVIN_ORG_ID=... \
|
|
|
385
438
|
|
|
386
439
|
The Lore API must also have Devin polling enabled with the same
|
|
387
440
|
`DEVIN_API_KEY` and `DEVIN_ORG_ID`, and the repository must appear in
|
|
388
|
-
`DEVIN_REPOSITORY_ALLOWLIST`. `lore devin setup` checks Devin access and
|
|
389
|
-
|
|
390
|
-
|
|
441
|
+
`DEVIN_REPOSITORY_ALLOWLIST`. `lore devin setup` checks Devin API access and
|
|
442
|
+
authenticated Lore workspace access. It reports recording as unverified;
|
|
443
|
+
it does not check the server's polling configuration or register a session.
|
|
444
|
+
`start` performs authenticated delivery and poller-registration checks. Confirm
|
|
445
|
+
a captured Devin entry in **Sessions** after the session has messages to poll.
|
|
391
446
|
|
|
392
447
|
Both commands retrieve Lore context with a stable delivery event and receipt.
|
|
393
448
|
`devin start` registers the created session for transcript polling.
|
|
@@ -427,7 +482,7 @@ same-repository, non-draft pull requests bearing the corresponding
|
|
|
427
482
|
`lore:codex-review` or `lore:devin-review` label.
|
|
428
483
|
|
|
429
484
|
Generated jobs require a published standalone binary release and default to
|
|
430
|
-
`treadiehq/lore-releases` at `v0.1.
|
|
485
|
+
`treadiehq/lore-releases` at `v0.1.26`. Set `LORE_CLI_REPOSITORY` to the publicly
|
|
431
486
|
readable `owner/repository` and `LORE_CLI_VERSION` to an existing release tag
|
|
432
487
|
when using another release source.
|
|
433
488
|
|
|
@@ -461,3 +516,19 @@ The correction and current behavior go here.
|
|
|
461
516
|
|
|
462
517
|
For source builds, self-hosting, tests, and release internals, see the
|
|
463
518
|
[documentation index](../../docs/README.md).
|
|
519
|
+
|
|
520
|
+
## Private links
|
|
521
|
+
|
|
522
|
+
Use `lore share learning <id>`, `lore share session <id> --event <event-id>`,
|
|
523
|
+
or `lore share delivery <id> --learning <learning-id>` to return an existing
|
|
524
|
+
workspace link. The anchor flags are optional. Add `--json` for structured output.
|
|
525
|
+
IDs come from Lore results, such as `lore ask --json`.
|
|
526
|
+
|
|
527
|
+
MCP exposes the read-only `share_lore` tool with `kind`, `id`, and optional
|
|
528
|
+
`eventId` or `learningId`. The SDK offers `client.share(...)`. These resolve the
|
|
529
|
+
resource using the current credential before returning a link. They do not
|
|
530
|
+
publish content or grant access; recipients must sign in to the same workspace.
|
|
531
|
+
|
|
532
|
+
Hosted connections use `https://uselore.co`. For self-hosting, connect with
|
|
533
|
+
`--dashboard-url https://lore.example.com`, set `LORE_DASHBOARD_URL` for MCP,
|
|
534
|
+
or pass `dashboardUrl` to the SDK. The URL must be an HTTP(S) origin.
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAyBA,OAAO,EAwBL,KAAK,yBAAyB,EAC/B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,cAAc,CAAC;AAgCtB,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;AACxD,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,4BAA4B,uBAAuB,CAAC;AACjE,QAAA,MAAM,sBAAsB,kGAA4B,CAAC;AACzD,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC1E,MAAM,MAAM,gBAAgB,GACxB,mBAAmB,GACnB,SAAS,GACT,QAAQ,GACR,QAAQ,CAAC;AAiCb,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,OAA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AAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AA0xBD,wBAAsB,MAAM,CAC1B,IAAI,GAAE,SAAS,MAAM,EAA0B,GAC9C,OAAO,CAAC,IAAI,CAAC,CAgKf"}
|
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { runShareCommand } from "./share.js";
|
|
3
|
+
import { codexApprovalDetail, inspectCodexHookApproval } from "./codex-hook-approval.js";
|
|
4
|
+
import { claudeOnlyCommand, disableDevinCli, runDevinCliHook } from "./devin-cli.js";
|
|
2
5
|
import { access, chmod, copyFile, mkdir, open, readFile, readdir, rename, rm, stat, writeFile, } from "node:fs/promises";
|
|
3
6
|
import { constants as fsConstants, realpathSync } from "node:fs";
|
|
4
7
|
import { spawn } from "node:child_process";
|
|
@@ -83,6 +86,7 @@ Usage:
|
|
|
83
86
|
|
|
84
87
|
Commands:
|
|
85
88
|
connect Configure Lore and install native agent integrations
|
|
89
|
+
share Get a private workspace link to a learning, session, or delivery
|
|
86
90
|
ask Query shared knowledge and prior session context
|
|
87
91
|
remember Save a durable fact, convention, correction, or decision
|
|
88
92
|
guard Control Context Guard (off, assist, enforce)
|
|
@@ -249,9 +253,11 @@ function hookCommand(agent, paths, event) {
|
|
|
249
253
|
const loreHome = `LORE_HOME=${shellQuote(paths.home)}`;
|
|
250
254
|
const hookEvent = event === undefined ? "" : ` LORE_HOOK_EVENT=${shellQuote(event)}`;
|
|
251
255
|
if (IS_STANDALONE_BINARY) {
|
|
252
|
-
|
|
256
|
+
const command = `env -u BUN_OPTIONS -u BUN_BE_BUN ${loreHome}${hookEvent} ${shellQuote(process.execPath)} hook --agent ${agent} ${LORE_OWNER_ARGUMENT}`;
|
|
257
|
+
return agent === "claude" ? claudeOnlyCommand(command) : command;
|
|
253
258
|
}
|
|
254
|
-
|
|
259
|
+
const command = `env ${loreHome}${hookEvent} ${shellQuote(process.execPath)} ${shellQuote(paths.runtime)} --agent ${agent} ${LORE_OWNER_ARGUMENT}`;
|
|
260
|
+
return agent === "claude" ? claudeOnlyCommand(command) : command;
|
|
255
261
|
}
|
|
256
262
|
function isLoreHook(value) {
|
|
257
263
|
if (!isObject(value) || value.type !== "command") {
|
|
@@ -1440,6 +1446,8 @@ async function installRuntime(paths) {
|
|
|
1440
1446
|
rm(paths.runtimeSignedSnapshot, { force: true }),
|
|
1441
1447
|
rm(paths.runtimeCanonicalJson, { force: true }),
|
|
1442
1448
|
rm(resolve(dirname(paths.runtime), "guard-evaluation.js"), { force: true }),
|
|
1449
|
+
rm(resolve(dirname(paths.runtime), "image-bytes.js"), { force: true }),
|
|
1450
|
+
rm(resolve(dirname(paths.runtime), "image-capture.js"), { force: true }),
|
|
1443
1451
|
rm(paths.runtimeContextFallback, { force: true }),
|
|
1444
1452
|
rm(paths.runtimeInvocationHealthWriter, { force: true }),
|
|
1445
1453
|
rm(paths.runtimeVersion, { force: true }),
|
|
@@ -1450,6 +1458,8 @@ async function installRuntime(paths) {
|
|
|
1450
1458
|
const sourceDirectory = dirname(fileURLToPath(import.meta.url));
|
|
1451
1459
|
const canonicalJsonModule = fileURLToPath(import.meta.resolve("@lore-co/core/canonical-json"));
|
|
1452
1460
|
const guardEvaluation = await readFile(fileURLToPath(import.meta.resolve("@lore-co/core/guard-evaluation")), "utf8");
|
|
1461
|
+
const imageBytes = await readFile(fileURLToPath(import.meta.resolve("@lore-co/core/image-bytes")), "utf8");
|
|
1462
|
+
const imageCapture = (await readFile(resolve(sourceDirectory, "image-capture.js"), "utf8")).replaceAll("@lore-co/core/image-bytes", "./image-bytes.js");
|
|
1453
1463
|
const [runtime, repository, reliabilityStore, signedSnapshot, canonicalJson, contextFallback, invocationHealthWriter,] = await Promise.all([
|
|
1454
1464
|
readFile(resolve(sourceDirectory, "runtime.js"), "utf8"),
|
|
1455
1465
|
readFile(resolve(sourceDirectory, "repository.js"), "utf8"),
|
|
@@ -1467,6 +1477,8 @@ async function installRuntime(paths) {
|
|
|
1467
1477
|
const runtimeFiles = {
|
|
1468
1478
|
"lore-hook.mjs": runtime.replaceAll("@lore-co/core/guard-evaluation", "./guard-evaluation.js"),
|
|
1469
1479
|
"guard-evaluation.js": guardEvaluation,
|
|
1480
|
+
"image-bytes.js": imageBytes,
|
|
1481
|
+
"image-capture.js": imageCapture,
|
|
1470
1482
|
"repository.js": repository,
|
|
1471
1483
|
"reliability-store.js": reliabilityStore,
|
|
1472
1484
|
"signed-snapshot.js": standaloneSignedSnapshot,
|
|
@@ -1487,6 +1499,8 @@ async function installRuntime(paths) {
|
|
|
1487
1499
|
};
|
|
1488
1500
|
await Promise.all([
|
|
1489
1501
|
atomicWrite(resolve(dirname(paths.runtime), "guard-evaluation.js"), guardEvaluation, 0o600),
|
|
1502
|
+
atomicWrite(resolve(dirname(paths.runtime), "image-bytes.js"), imageBytes, 0o600),
|
|
1503
|
+
atomicWrite(resolve(dirname(paths.runtime), "image-capture.js"), imageCapture, 0o600),
|
|
1490
1504
|
atomicWrite(paths.runtimeRepository, repository, 0o600),
|
|
1491
1505
|
atomicWrite(paths.runtimeReliabilityStore, reliabilityStore, 0o600),
|
|
1492
1506
|
atomicWrite(paths.runtimeSignedSnapshot, standaloneSignedSnapshot, 0o600),
|
|
@@ -1738,7 +1752,9 @@ export async function connectWithCredential(options) {
|
|
|
1738
1752
|
config: paths.config,
|
|
1739
1753
|
changedHookFiles,
|
|
1740
1754
|
backups,
|
|
1741
|
-
warnings: requestedExpansion.warnings,
|
|
1755
|
+
warnings: [...requestedExpansion.warnings, ...(agents.includes("codex")
|
|
1756
|
+
? ["Codex requires hook approval. Open /hooks in Codex and review any new or changed Lore hooks, then start a fresh session. Run lore doctor to verify approval and the first invocation."]
|
|
1757
|
+
: [])],
|
|
1742
1758
|
...(recoveryNotice ? { recoveryNotice } : {}),
|
|
1743
1759
|
};
|
|
1744
1760
|
}
|
|
@@ -1879,7 +1895,7 @@ async function connectCommand(args) {
|
|
|
1879
1895
|
agents: parsed.agents,
|
|
1880
1896
|
...(parsed.timeoutMs === undefined ? {} : { timeoutMs: parsed.timeoutMs }),
|
|
1881
1897
|
});
|
|
1882
|
-
writeResult(result, parsed.json, `
|
|
1898
|
+
writeResult(result, parsed.json, `access authorized; integrations installed: ${result.agents.join(", ")}\napi_url: ${result.apiUrl}\nconfig: ${result.config}\nRestart your agent and complete a turn, then run lore doctor to verify recording.\n${result.recoveryNotice ? `${result.recoveryNotice}\n` : ""}${result.warnings.map((warning) => `warning: ${warning}\n`).join("")}`);
|
|
1883
1899
|
}
|
|
1884
1900
|
async function queueCount(paths) {
|
|
1885
1901
|
try {
|
|
@@ -1963,6 +1979,8 @@ async function inspectRuntimeInstallation(required, paths) {
|
|
|
1963
1979
|
const runtimeFiles = {
|
|
1964
1980
|
"lore-hook.mjs": paths.runtime,
|
|
1965
1981
|
"guard-evaluation.js": resolve(dirname(paths.runtime), "guard-evaluation.js"),
|
|
1982
|
+
"image-bytes.js": resolve(dirname(paths.runtime), "image-bytes.js"),
|
|
1983
|
+
"image-capture.js": resolve(dirname(paths.runtime), "image-capture.js"),
|
|
1966
1984
|
"repository.js": paths.runtimeRepository,
|
|
1967
1985
|
"reliability-store.js": paths.runtimeReliabilityStore,
|
|
1968
1986
|
"signed-snapshot.js": paths.runtimeSignedSnapshot,
|
|
@@ -2201,6 +2219,7 @@ async function disconnectCommand(args) {
|
|
|
2201
2219
|
}
|
|
2202
2220
|
const paths = getLorePaths();
|
|
2203
2221
|
await disableRecovery(paths.home);
|
|
2222
|
+
await disableDevinCli(paths.home);
|
|
2204
2223
|
const config = await readConnectorConfig(paths);
|
|
2205
2224
|
const now = new Date();
|
|
2206
2225
|
const changedHookFiles = [];
|
|
@@ -2243,6 +2262,8 @@ async function disconnectCommand(args) {
|
|
|
2243
2262
|
rm(paths.runtimeCanonicalJson, { force: true }),
|
|
2244
2263
|
rm(paths.runtimeContextFallback, { force: true }),
|
|
2245
2264
|
rm(resolve(dirname(paths.runtime), "guard-evaluation.js"), { force: true }),
|
|
2265
|
+
rm(resolve(dirname(paths.runtime), "image-bytes.js"), { force: true }),
|
|
2266
|
+
rm(resolve(dirname(paths.runtime), "image-capture.js"), { force: true }),
|
|
2246
2267
|
rm(paths.runtimeInvocationHealthWriter, { force: true }),
|
|
2247
2268
|
rm(paths.runtimeVersion, { force: true }),
|
|
2248
2269
|
rm(paths.runtimePackage, { force: true }),
|
|
@@ -2437,6 +2458,18 @@ async function doctorCommand(args) {
|
|
|
2437
2458
|
? "installed, but no invocation has been observed yet"
|
|
2438
2459
|
: "invocation health is unavailable",
|
|
2439
2460
|
});
|
|
2461
|
+
if (agent.agent === "codex" && agent.executable) {
|
|
2462
|
+
const approval = await inspectCodexHookApproval({
|
|
2463
|
+
home: paths.home,
|
|
2464
|
+
cwd: process.cwd(),
|
|
2465
|
+
configPaths: agent.configFiles ?? [agent.configFile],
|
|
2466
|
+
});
|
|
2467
|
+
checks.push({
|
|
2468
|
+
name: "codex-hook-approval",
|
|
2469
|
+
status: approval === "approved" ? "ok" : "warning",
|
|
2470
|
+
detail: codexApprovalDetail(approval),
|
|
2471
|
+
});
|
|
2472
|
+
}
|
|
2440
2473
|
}
|
|
2441
2474
|
for (const surface of status.externalSurfaces) {
|
|
2442
2475
|
checks.push({
|
|
@@ -2522,6 +2555,9 @@ export async function runCli(args = process.argv.slice(2)) {
|
|
|
2522
2555
|
}
|
|
2523
2556
|
await connectCommand(commandArgs);
|
|
2524
2557
|
return;
|
|
2558
|
+
case "share":
|
|
2559
|
+
await runShareCommand(commandArgs, await readConnectorConfig(getLorePaths()));
|
|
2560
|
+
return;
|
|
2525
2561
|
case "ask":
|
|
2526
2562
|
await runAskCommand(commandArgs, await readConnectorConfig(getLorePaths()));
|
|
2527
2563
|
return;
|
|
@@ -2602,6 +2638,16 @@ export async function runCli(args = process.argv.slice(2)) {
|
|
|
2602
2638
|
case "disconnect":
|
|
2603
2639
|
await disconnectCommand(commandArgs);
|
|
2604
2640
|
return;
|
|
2641
|
+
case "devin-cli-hook":
|
|
2642
|
+
try {
|
|
2643
|
+
const result = await runDevinCliHook(getLorePaths(process.env.LORE_HOME).home);
|
|
2644
|
+
if (result)
|
|
2645
|
+
process.stdout.write(`${JSON.stringify(result)}\n`);
|
|
2646
|
+
}
|
|
2647
|
+
catch {
|
|
2648
|
+
process.stderr.write("Lore context is unavailable for this Devin turn. Session export capture will continue.\n");
|
|
2649
|
+
}
|
|
2650
|
+
return;
|
|
2605
2651
|
case "hook":
|
|
2606
2652
|
await runHook(commandArgs);
|
|
2607
2653
|
return;
|