@remnic/core 9.66.12 → 9.67.0
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/access-admin-ops-surface.d.ts +1 -1
- package/dist/access-authorization-probe.d.ts +1 -1
- package/dist/access-boundary.d.ts +1 -1
- package/dist/access-cli.js +1 -1
- package/dist/access-extraction-force-flush.d.ts +1 -1
- package/dist/access-http-lcm-compaction.d.ts +1 -1
- package/dist/access-http-lifecycle-flush.d.ts +1 -1
- package/dist/access-http-offline-stream.d.ts +1 -1
- package/dist/access-http.d.ts +2 -2
- package/dist/access-lcm-surface.d.ts +1 -1
- package/dist/access-mcp.d.ts +1 -1
- package/dist/access-observe-write-surface.d.ts +1 -1
- package/dist/access-operations.d.ts +6 -6
- package/dist/access-recall-concurrency.d.ts +1 -1
- package/dist/access-recall-response.d.ts +1 -1
- package/dist/access-recall-surface.d.ts +1 -1
- package/dist/access-schema.d.ts +89 -89
- package/dist/access-service-helpers.d.ts +1 -1
- package/dist/access-service.d.ts +1 -1
- package/dist/access-surface-catalog.d.ts +1 -1
- package/dist/{chunk-GHSJBVVQ.js → chunk-QJLTAH5X.js} +114 -7
- package/dist/chunk-QJLTAH5X.js.map +1 -0
- package/dist/{cli-Bvy4jdBu.d.ts → cli-CFpMhqz5.d.ts} +1 -1
- package/dist/cli.d.ts +2 -2
- package/dist/external-wiki-access.d.ts +1 -1
- package/dist/external-wiki-mcp-tools.d.ts +1 -1
- package/dist/index.d.ts +694 -685
- package/dist/index.js +1 -1
- package/dist/mcp-memory-inspector-app.d.ts +1 -1
- package/dist/memory-subject-cli.d.ts +1 -1
- package/dist/memory-subject.d.ts +1 -1
- package/dist/orchestrator.js +1 -1
- package/dist/{public-http-2MyshWxl.d.ts → public-http-C9-CHc40.d.ts} +1 -1
- package/dist/schemas.d.ts +176 -176
- package/dist/shared-context/manager.d.ts +6 -6
- package/dist/support-passport/index.d.ts +4 -4
- package/dist/transfer/types.d.ts +78 -78
- package/dist/who-knows-cli.d.ts +1 -1
- package/dist/who-knows.d.ts +1 -1
- package/package.json +2 -2
- package/src/activity/index.ts +1 -0
- package/src/activity/journal-section.ts +1 -1
- package/src/activity/journal-strip.test.ts +126 -0
- package/src/activity/journal-strip.ts +115 -0
- package/dist/chunk-GHSJBVVQ.js.map +0 -1
- package/dist/{access-service-LbwWl05g.d.ts → access-service-DcfM0Vf0.d.ts} +64 -64
|
@@ -27530,6 +27530,113 @@ function trimNewlines(text) {
|
|
|
27530
27530
|
return text.slice(start, end);
|
|
27531
27531
|
}
|
|
27532
27532
|
|
|
27533
|
+
// src/activity/journal-section.ts
|
|
27534
|
+
function parseAtxHeading2(line) {
|
|
27535
|
+
let level = 0;
|
|
27536
|
+
while (level < line.length && level < 6 && line[level] === "#") level++;
|
|
27537
|
+
if (level === 0) return null;
|
|
27538
|
+
const after = line[level];
|
|
27539
|
+
if (after !== " " && after !== " ") return null;
|
|
27540
|
+
let start = level + 1;
|
|
27541
|
+
let end = line.length;
|
|
27542
|
+
while (start < end && (line[start] === " " || line[start] === " ")) start++;
|
|
27543
|
+
while (end > start && (line[end - 1] === " " || line[end - 1] === " ")) end--;
|
|
27544
|
+
let hashEnd = end;
|
|
27545
|
+
while (hashEnd > start && line[hashEnd - 1] === "#") hashEnd--;
|
|
27546
|
+
if (hashEnd < end && hashEnd > start && (line[hashEnd - 1] === " " || line[hashEnd - 1] === " ")) {
|
|
27547
|
+
end = hashEnd;
|
|
27548
|
+
while (end > start && (line[end - 1] === " " || line[end - 1] === " ")) end--;
|
|
27549
|
+
}
|
|
27550
|
+
return { level, text: line.slice(start, end) };
|
|
27551
|
+
}
|
|
27552
|
+
|
|
27553
|
+
// src/activity/journal-strip.ts
|
|
27554
|
+
var MARKER_OPEN = "<!-- remnic:";
|
|
27555
|
+
var MARKER_CLOSE = "-->";
|
|
27556
|
+
var START_SUFFIX = ":start";
|
|
27557
|
+
var END_SUFFIX = ":end";
|
|
27558
|
+
function stripRemnicOwnedRegions2(sectionText, ownedHeadings) {
|
|
27559
|
+
return stripOwnedHeadings(stripMarkerRegions(sectionText), ownedHeadings);
|
|
27560
|
+
}
|
|
27561
|
+
function stripMarkerRegions(text) {
|
|
27562
|
+
const lines = text.split("\n");
|
|
27563
|
+
const keep = lines.map(() => true);
|
|
27564
|
+
let openName = null;
|
|
27565
|
+
for (let i = 0; i < lines.length; i++) {
|
|
27566
|
+
const marker = parseRegionMarker(lines[i]);
|
|
27567
|
+
if (openName !== null) {
|
|
27568
|
+
keep[i] = false;
|
|
27569
|
+
if (marker && marker.kind === "end" && marker.name === openName) openName = null;
|
|
27570
|
+
continue;
|
|
27571
|
+
}
|
|
27572
|
+
if (marker) {
|
|
27573
|
+
keep[i] = false;
|
|
27574
|
+
if (marker.kind === "start") openName = marker.name;
|
|
27575
|
+
}
|
|
27576
|
+
}
|
|
27577
|
+
return emitKeptLines(lines, keep);
|
|
27578
|
+
}
|
|
27579
|
+
function stripOwnedHeadings(text, ownedHeadings) {
|
|
27580
|
+
const wanted = ownedHeadingSet(ownedHeadings);
|
|
27581
|
+
if (wanted.size === 0 || text.length === 0) return text;
|
|
27582
|
+
const lines = text.split("\n");
|
|
27583
|
+
const keep = lines.map(() => true);
|
|
27584
|
+
for (let i = 0; i < lines.length; i++) {
|
|
27585
|
+
if (!keep[i]) continue;
|
|
27586
|
+
const heading = parseAtxHeading2(lines[i]);
|
|
27587
|
+
if (!heading || !wanted.has(heading.text)) continue;
|
|
27588
|
+
keep[i] = false;
|
|
27589
|
+
for (let j = i + 1; j < lines.length; j++) {
|
|
27590
|
+
const next = parseAtxHeading2(lines[j]);
|
|
27591
|
+
if (next && next.level <= heading.level) break;
|
|
27592
|
+
keep[j] = false;
|
|
27593
|
+
}
|
|
27594
|
+
}
|
|
27595
|
+
return emitKeptLines(lines, keep);
|
|
27596
|
+
}
|
|
27597
|
+
function emitKeptLines(lines, keep) {
|
|
27598
|
+
const out = [];
|
|
27599
|
+
let dropped = false;
|
|
27600
|
+
for (let i = 0; i < lines.length; i++) {
|
|
27601
|
+
if (!keep[i]) {
|
|
27602
|
+
dropped = true;
|
|
27603
|
+
continue;
|
|
27604
|
+
}
|
|
27605
|
+
const line = lines[i];
|
|
27606
|
+
const previous = out.length > 0 ? out[out.length - 1] : null;
|
|
27607
|
+
if (dropped && previous !== null && previous.trim().length === 0 && line.trim().length === 0) {
|
|
27608
|
+
dropped = false;
|
|
27609
|
+
continue;
|
|
27610
|
+
}
|
|
27611
|
+
out.push(line);
|
|
27612
|
+
dropped = false;
|
|
27613
|
+
}
|
|
27614
|
+
return out.join("\n");
|
|
27615
|
+
}
|
|
27616
|
+
function parseRegionMarker(line) {
|
|
27617
|
+
const trimmed = line.trim();
|
|
27618
|
+
if (!trimmed.startsWith(MARKER_OPEN) || !trimmed.endsWith(MARKER_CLOSE)) return null;
|
|
27619
|
+
const inner = trimmed.slice(MARKER_OPEN.length, trimmed.length - MARKER_CLOSE.length).trim();
|
|
27620
|
+
if (inner.endsWith(START_SUFFIX)) {
|
|
27621
|
+
const name = inner.slice(0, -START_SUFFIX.length);
|
|
27622
|
+
return name.length > 0 ? { kind: "start", name } : null;
|
|
27623
|
+
}
|
|
27624
|
+
if (inner.endsWith(END_SUFFIX)) {
|
|
27625
|
+
const name = inner.slice(0, -END_SUFFIX.length);
|
|
27626
|
+
return name.length > 0 ? { kind: "end", name } : null;
|
|
27627
|
+
}
|
|
27628
|
+
return null;
|
|
27629
|
+
}
|
|
27630
|
+
function ownedHeadingSet(ownedHeadings) {
|
|
27631
|
+
const wanted = /* @__PURE__ */ new Set();
|
|
27632
|
+
for (const entry of ownedHeadings) {
|
|
27633
|
+
if (typeof entry !== "string") continue;
|
|
27634
|
+
const trimmed = entry.trim();
|
|
27635
|
+
if (trimmed.length > 0) wanted.add(trimmed);
|
|
27636
|
+
}
|
|
27637
|
+
return wanted;
|
|
27638
|
+
}
|
|
27639
|
+
|
|
27533
27640
|
// src/activity/memory-gen.ts
|
|
27534
27641
|
var ACTIVITY_ALLOWED_CATEGORIES = {
|
|
27535
27642
|
decision: true,
|
|
@@ -27948,7 +28055,7 @@ function applyHeadingRegion(fileText, name, content) {
|
|
|
27948
28055
|
const wanted = name.trim();
|
|
27949
28056
|
const hits = [];
|
|
27950
28057
|
for (const row of fileLines(fileText)) {
|
|
27951
|
-
const heading =
|
|
28058
|
+
const heading = parseAtxHeading3(row.line);
|
|
27952
28059
|
if (heading && heading.text === wanted) {
|
|
27953
28060
|
hits.push({ line: row.number, level: heading.level, next: row.next });
|
|
27954
28061
|
}
|
|
@@ -27961,7 +28068,7 @@ function applyHeadingRegion(fileText, name, content) {
|
|
|
27961
28068
|
let sectionEnd = fileText.length;
|
|
27962
28069
|
for (const row of fileLines(fileText)) {
|
|
27963
28070
|
if (row.start < hit.next) continue;
|
|
27964
|
-
const heading =
|
|
28071
|
+
const heading = parseAtxHeading3(row.line);
|
|
27965
28072
|
if (heading && heading.level <= hit.level) {
|
|
27966
28073
|
sectionEnd = row.start;
|
|
27967
28074
|
break;
|
|
@@ -27995,7 +28102,7 @@ function fileLines(fileText) {
|
|
|
27995
28102
|
}
|
|
27996
28103
|
return rows;
|
|
27997
28104
|
}
|
|
27998
|
-
function
|
|
28105
|
+
function parseAtxHeading3(line) {
|
|
27999
28106
|
let level = 0;
|
|
28000
28107
|
while (level < line.length && level < 6 && line[level] === "#") level++;
|
|
28001
28108
|
if (level === 0) return null;
|
|
@@ -28076,7 +28183,7 @@ function insertMarkersUnderHeading(fileText, opts) {
|
|
|
28076
28183
|
const rows = fileLines2(fileText);
|
|
28077
28184
|
const hits = [];
|
|
28078
28185
|
for (const row of rows) {
|
|
28079
|
-
const heading =
|
|
28186
|
+
const heading = parseAtxHeading4(row.line);
|
|
28080
28187
|
if (heading && heading.text === opts.heading) {
|
|
28081
28188
|
hits.push({ row, level: heading.level });
|
|
28082
28189
|
}
|
|
@@ -28111,7 +28218,7 @@ function fileLines2(fileText) {
|
|
|
28111
28218
|
}
|
|
28112
28219
|
return rows;
|
|
28113
28220
|
}
|
|
28114
|
-
function
|
|
28221
|
+
function parseAtxHeading4(line) {
|
|
28115
28222
|
let level = 0;
|
|
28116
28223
|
while (level < line.length && level < 6 && line[level] === "#") level++;
|
|
28117
28224
|
if (level === 0 || line[level] !== " ") return null;
|
|
@@ -29297,7 +29404,7 @@ export {
|
|
|
29297
29404
|
isAnalysisFailureKind,
|
|
29298
29405
|
classifyAnalysisFailure,
|
|
29299
29406
|
readVaultJournal,
|
|
29300
|
-
stripRemnicOwnedRegions,
|
|
29407
|
+
stripRemnicOwnedRegions2 as stripRemnicOwnedRegions,
|
|
29301
29408
|
isEligibleActivityFact,
|
|
29302
29409
|
generateActivityMemories,
|
|
29303
29410
|
MS_PER_DAY2 as MS_PER_DAY,
|
|
@@ -29349,4 +29456,4 @@ export {
|
|
|
29349
29456
|
blendGraphExpandedRecallScore,
|
|
29350
29457
|
Orchestrator
|
|
29351
29458
|
};
|
|
29352
|
-
//# sourceMappingURL=chunk-
|
|
29459
|
+
//# sourceMappingURL=chunk-QJLTAH5X.js.map
|