@remnic/cli 10.0.48 → 10.0.50
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/dist/index.js +34 -29
- package/package.json +32 -32
package/dist/index.js
CHANGED
|
@@ -531,6 +531,7 @@ import {
|
|
|
531
531
|
migrateFromEngram,
|
|
532
532
|
rollbackFromEngramMigration,
|
|
533
533
|
buildBriefing,
|
|
534
|
+
withBriefingDeadline,
|
|
534
535
|
parseBriefingWindow,
|
|
535
536
|
parseBriefingFocus,
|
|
536
537
|
validateBriefingFormat,
|
|
@@ -597,7 +598,7 @@ import {
|
|
|
597
598
|
offlineSyncStateFromSnapshot,
|
|
598
599
|
readOfflineSyncFileContentChunk,
|
|
599
600
|
readOfflineSyncState,
|
|
600
|
-
embeddingGenerationMembership as
|
|
601
|
+
embeddingGenerationMembership as embeddingGenerationMembership3,
|
|
601
602
|
divergedEmbeddingGenerationDeferrals,
|
|
602
603
|
shouldPreferIncomingOfflineRuntimeFile,
|
|
603
604
|
summarizeOfflineSyncPendingChanges,
|
|
@@ -4537,12 +4538,24 @@ function resolveCredentialChannel(input, env, hooks) {
|
|
|
4537
4538
|
}
|
|
4538
4539
|
|
|
4539
4540
|
// src/converge-capture-lock.ts
|
|
4540
|
-
import { resolveConvergeCaptureWriteLockBackoff } from "@remnic/core";
|
|
4541
|
+
import { advanceEmbeddingGenerationMarker, embeddingGenerationMembership, resolveConvergeCaptureWriteLockBackoff } from "@remnic/core";
|
|
4541
4542
|
import { isTombstoneBlockedCaptureWriteLockBusy } from "@remnic/core/capture-write-lock-backoff.js";
|
|
4542
4543
|
function createConvergeStorageIoOpener(convergeConfig, signal) {
|
|
4543
4544
|
const backoff = resolveConvergeCaptureWriteLockBackoff(convergeConfig);
|
|
4544
4545
|
return (rootDir) => createOfflineStorageIo(rootDir, void 0, void 0, backoff, signal);
|
|
4545
4546
|
}
|
|
4547
|
+
async function deleteConvergeFile(io, target, expectedSha256) {
|
|
4548
|
+
await advanceEmbeddingGenerationMarker(
|
|
4549
|
+
target.root,
|
|
4550
|
+
embeddingGenerationMembership(target.path),
|
|
4551
|
+
() => io.deleteFile(target),
|
|
4552
|
+
async () => {
|
|
4553
|
+
if ((await io.readFileDigest(target)).sha256 !== expectedSha256) {
|
|
4554
|
+
throw new Error(`converge file changed before deletion: ${target.path}`);
|
|
4555
|
+
}
|
|
4556
|
+
}
|
|
4557
|
+
);
|
|
4558
|
+
}
|
|
4546
4559
|
function handleConvergeTransferResults(results, batch, onFailed) {
|
|
4547
4560
|
for (let index = 0; index < results.length; index += 1) {
|
|
4548
4561
|
const result = results[index];
|
|
@@ -5155,11 +5168,8 @@ async function executeConvergeApply(options = {}) {
|
|
|
5155
5168
|
try {
|
|
5156
5169
|
const io = await openStorageIo(rootDir);
|
|
5157
5170
|
const filePath = path7.join(rootDir, localPath);
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
await io.deleteFile({ root: rootDir, path: localPath, filePath });
|
|
5161
|
-
deleted = true;
|
|
5162
|
-
}
|
|
5171
|
+
await deleteConvergeFile(io, { root: rootDir, path: localPath, filePath }, entry.localSha256);
|
|
5172
|
+
deleted = true;
|
|
5163
5173
|
} catch {
|
|
5164
5174
|
deleted = false;
|
|
5165
5175
|
}
|
|
@@ -5210,11 +5220,8 @@ async function executeConvergeApply(options = {}) {
|
|
|
5210
5220
|
try {
|
|
5211
5221
|
const io = await openStorageIo(rootDir);
|
|
5212
5222
|
const filePath = path7.join(rootDir, localPath);
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
await io.deleteFile({ root: rootDir, path: localPath, filePath });
|
|
5216
|
-
deletedLocal = true;
|
|
5217
|
-
}
|
|
5223
|
+
await deleteConvergeFile(io, { root: rootDir, path: localPath, filePath }, entry.localSha256);
|
|
5224
|
+
deletedLocal = true;
|
|
5218
5225
|
} catch {
|
|
5219
5226
|
deletedLocal = false;
|
|
5220
5227
|
}
|
|
@@ -5805,13 +5812,13 @@ async function drainOfflineSyncImpressions(memoryDir, rotation) {
|
|
|
5805
5812
|
import { lstat as lstat3, mkdir as mkdir2, mkdtemp as mkdtemp2, readFile as readFile2, readdir as readdir3, rm as rm3, writeFile as writeFile2 } from "fs/promises";
|
|
5806
5813
|
import path8 from "path";
|
|
5807
5814
|
import { hostname } from "os";
|
|
5808
|
-
import { StorageManager as StorageManager4, embeddingGenerationMembership } from "@remnic/core";
|
|
5815
|
+
import { StorageManager as StorageManager4, embeddingGenerationMembership as embeddingGenerationMembership2 } from "@remnic/core";
|
|
5809
5816
|
var GENERATION_STAGING_PREFIX = "generation-incoming-";
|
|
5810
5817
|
function generationMembersForStagedTransport(options) {
|
|
5811
5818
|
const currentByPath = new Map((options.currentFiles ?? []).map((file) => [file.path, file]));
|
|
5812
5819
|
const deferred = new Set(options.deferredPaths ?? []);
|
|
5813
5820
|
return options.incomingFiles.filter(
|
|
5814
|
-
(file) => file.bytes >= options.minBytes && !deferred.has(file.path) && currentByPath.get(file.path)?.sha256 !== file.sha256 &&
|
|
5821
|
+
(file) => file.bytes >= options.minBytes && !deferred.has(file.path) && currentByPath.get(file.path)?.sha256 !== file.sha256 && embeddingGenerationMembership2(file.path) !== null
|
|
5815
5822
|
).sort((left, right) => right.bytes - left.bytes || left.path.localeCompare(right.path));
|
|
5816
5823
|
}
|
|
5817
5824
|
async function assertPrivateOfflineDir(offlineDir) {
|
|
@@ -14985,7 +14992,7 @@ Root: ${root}`);
|
|
|
14985
14992
|
break;
|
|
14986
14993
|
}
|
|
14987
14994
|
}
|
|
14988
|
-
async function cmdBriefing(rest) {
|
|
14995
|
+
async function cmdBriefing(rest, abortSignal) {
|
|
14989
14996
|
initLogger5();
|
|
14990
14997
|
const configPath = resolveConfigPath();
|
|
14991
14998
|
const raw = fs32.existsSync(configPath) ? JSON.parse(fs32.readFileSync(configPath, "utf8")) : {};
|
|
@@ -15046,10 +15053,13 @@ async function cmdBriefing(rest) {
|
|
|
15046
15053
|
const format = effectiveFormatFlag === "json" ? "json" : effectiveFormatFlag === "markdown" ? "markdown" : config.briefing.defaultFormat;
|
|
15047
15054
|
const orchestrator = new Orchestrator11(config);
|
|
15048
15055
|
await orchestrator.initialize();
|
|
15056
|
+
abortSignal.throwIfAborted();
|
|
15049
15057
|
const storage = await orchestrator.getStorage(config.defaultNamespace);
|
|
15050
15058
|
const calendarSource = config.briefing.calendarSource ? new FileCalendarSource(config.briefing.calendarSource) : void 0;
|
|
15059
|
+
const locationSection = includeLocation && locationTaggingEnabled(config.location) ? await briefingLocationSection(storage.dir, window.from.toISOString(), config.location) : void 0;
|
|
15051
15060
|
const result = await buildBriefing({
|
|
15052
15061
|
storage,
|
|
15062
|
+
abortSignal,
|
|
15053
15063
|
window,
|
|
15054
15064
|
focus,
|
|
15055
15065
|
namespace: config.defaultNamespace,
|
|
@@ -15064,20 +15074,15 @@ async function cmdBriefing(rest) {
|
|
|
15064
15074
|
// service so CLI and server briefings behave identically.
|
|
15065
15075
|
followupGenerator: config.openaiApiKey ? void 0 : orchestrator.briefingChainFollowupGenerator
|
|
15066
15076
|
});
|
|
15067
|
-
|
|
15068
|
-
|
|
15069
|
-
|
|
15070
|
-
window.from.toISOString(),
|
|
15071
|
-
config.location
|
|
15072
|
-
);
|
|
15073
|
-
if (section) {
|
|
15074
|
-
result.markdown += `
|
|
15077
|
+
abortSignal.throwIfAborted();
|
|
15078
|
+
if (locationSection) {
|
|
15079
|
+
result.markdown += `
|
|
15075
15080
|
|
|
15076
|
-
${
|
|
15081
|
+
${locationSection}
|
|
15077
15082
|
`;
|
|
15078
|
-
|
|
15079
|
-
}
|
|
15083
|
+
result.json = { ...result.json, locationContext: locationSection };
|
|
15080
15084
|
}
|
|
15085
|
+
abortSignal.throwIfAborted();
|
|
15081
15086
|
const payload = format === "json" ? JSON.stringify(result.json, null, 2) : result.markdown;
|
|
15082
15087
|
console.log(payload);
|
|
15083
15088
|
if (save) {
|
|
@@ -16188,7 +16193,7 @@ function offlineSnapshotContentFilesForApply(options) {
|
|
|
16188
16193
|
function shouldDirectHydrateOfflineFile(options) {
|
|
16189
16194
|
if (options.incoming.bytes < OFFLINE_SYNC_DIRECT_HYDRATE_MIN_BYTES) return false;
|
|
16190
16195
|
if (options.current?.sha256 === options.incoming.sha256) return false;
|
|
16191
|
-
if (
|
|
16196
|
+
if (embeddingGenerationMembership3(options.incoming.path)) return false;
|
|
16192
16197
|
if (shouldPreferIncomingOfflineRuntimeFile(options.incoming.path)) return true;
|
|
16193
16198
|
if (options.current && options.base && options.current.sha256 === options.base.sha256) {
|
|
16194
16199
|
return true;
|
|
@@ -16633,7 +16638,7 @@ function chunkOfflineChangesetApplyBatches(changeset, namespace, maxRequestBytes
|
|
|
16633
16638
|
const items = [];
|
|
16634
16639
|
const itemIndexByDir = /* @__PURE__ */ new Map();
|
|
16635
16640
|
for (const change of changeset.changes) {
|
|
16636
|
-
const membership =
|
|
16641
|
+
const membership = embeddingGenerationMembership3(change.path);
|
|
16637
16642
|
if (!membership) {
|
|
16638
16643
|
items.push({ changes: [change], shardDir: null });
|
|
16639
16644
|
continue;
|
|
@@ -20584,7 +20589,7 @@ Options:
|
|
|
20584
20589
|
break;
|
|
20585
20590
|
}
|
|
20586
20591
|
case "briefing": {
|
|
20587
|
-
await cmdBriefing(rest);
|
|
20592
|
+
await withBriefingDeadline((signal) => cmdBriefing(rest, signal));
|
|
20588
20593
|
break;
|
|
20589
20594
|
}
|
|
20590
20595
|
case "versions": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/cli",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.50",
|
|
4
4
|
"description": "CLI for Remnic memory — init, query, doctor, daemon management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,26 +26,26 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"yaml": "^2.4.2",
|
|
29
|
-
"@remnic/plugin-pi": "^10.0.
|
|
30
|
-
"@remnic/server": "^10.0.
|
|
31
|
-
"@remnic/core": "^10.0.
|
|
29
|
+
"@remnic/plugin-pi": "^10.0.50",
|
|
30
|
+
"@remnic/server": "^10.0.50",
|
|
31
|
+
"@remnic/core": "^10.0.50"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@remnic/bench": "^10.0.
|
|
35
|
-
"@remnic/plugin-openclaw": "^10.0.
|
|
36
|
-
"@remnic/export-weclone": "^10.0.
|
|
37
|
-
"@remnic/import-weclone": "^10.0.
|
|
38
|
-
"@remnic/import-chatgpt": "^10.0.
|
|
39
|
-
"@remnic/import-claude": "^10.0.
|
|
40
|
-
"@remnic/import-gemini": "^10.0.
|
|
41
|
-
"@remnic/import-lossless-claw": "^10.0.
|
|
42
|
-
"@remnic/import-mem0": "^10.0.
|
|
43
|
-
"@remnic/import-supermemory": "^10.0.
|
|
44
|
-
"@remnic/import-okf": "^10.0.
|
|
45
|
-
"@remnic/connector-limitless": "^10.0.
|
|
46
|
-
"@remnic/connector-bee": "^10.0.
|
|
47
|
-
"@remnic/connector-omi": "^10.0.
|
|
48
|
-
"@remnic/capture-audio": "^10.0.
|
|
34
|
+
"@remnic/bench": "^10.0.50",
|
|
35
|
+
"@remnic/plugin-openclaw": "^10.0.50",
|
|
36
|
+
"@remnic/export-weclone": "^10.0.50",
|
|
37
|
+
"@remnic/import-weclone": "^10.0.50",
|
|
38
|
+
"@remnic/import-chatgpt": "^10.0.50",
|
|
39
|
+
"@remnic/import-claude": "^10.0.50",
|
|
40
|
+
"@remnic/import-gemini": "^10.0.50",
|
|
41
|
+
"@remnic/import-lossless-claw": "^10.0.50",
|
|
42
|
+
"@remnic/import-mem0": "^10.0.50",
|
|
43
|
+
"@remnic/import-supermemory": "^10.0.50",
|
|
44
|
+
"@remnic/import-okf": "^10.0.50",
|
|
45
|
+
"@remnic/connector-limitless": "^10.0.50",
|
|
46
|
+
"@remnic/connector-bee": "^10.0.50",
|
|
47
|
+
"@remnic/connector-omi": "^10.0.50",
|
|
48
|
+
"@remnic/capture-audio": "^10.0.50"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
51
51
|
"@remnic/bench": {
|
|
@@ -97,19 +97,19 @@
|
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"tsup": "^8.5.1",
|
|
99
99
|
"typescript": "^5.9.3",
|
|
100
|
-
"@remnic/bench": "10.0.
|
|
101
|
-
"@remnic/plugin-openclaw": "10.0.
|
|
102
|
-
"@remnic/
|
|
103
|
-
"@remnic/import-
|
|
104
|
-
"@remnic/import-
|
|
105
|
-
"@remnic/
|
|
106
|
-
"@remnic/import-gemini": "10.0.
|
|
107
|
-
"@remnic/import-lossless-claw": "10.0.
|
|
108
|
-
"@remnic/import-mem0": "10.0.
|
|
109
|
-
"@remnic/
|
|
110
|
-
"@remnic/
|
|
111
|
-
"@remnic/connector-
|
|
112
|
-
"@remnic/connector-
|
|
100
|
+
"@remnic/bench": "10.0.50",
|
|
101
|
+
"@remnic/plugin-openclaw": "10.0.50",
|
|
102
|
+
"@remnic/import-weclone": "10.0.50",
|
|
103
|
+
"@remnic/import-chatgpt": "10.0.50",
|
|
104
|
+
"@remnic/import-claude": "10.0.50",
|
|
105
|
+
"@remnic/export-weclone": "10.0.50",
|
|
106
|
+
"@remnic/import-gemini": "10.0.50",
|
|
107
|
+
"@remnic/import-lossless-claw": "10.0.50",
|
|
108
|
+
"@remnic/import-mem0": "10.0.50",
|
|
109
|
+
"@remnic/connector-limitless": "10.0.50",
|
|
110
|
+
"@remnic/import-supermemory": "10.0.50",
|
|
111
|
+
"@remnic/connector-omi": "10.0.50",
|
|
112
|
+
"@remnic/connector-bee": "10.0.50"
|
|
113
113
|
},
|
|
114
114
|
"license": "MIT",
|
|
115
115
|
"repository": {
|