@north-light/crouter 0.3.209 → 0.3.211
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.
|
@@ -37,7 +37,7 @@ import { gatePasses } from './gate.js';
|
|
|
37
37
|
import { commandDeliveryRung, memoryReadDeliveryRung, owningRootOf, readDeliveryRung, workspaceOpenRung } from './surface-match.js';
|
|
38
38
|
import { deliveredAtOrAbove, recordDelivery } from './injected-store.js';
|
|
39
39
|
import { normalizeDocName, parseSubstrateDoc, parseSubstrateFrontmatter, previewLine, resolveDocName } from './schema.js';
|
|
40
|
-
import {
|
|
40
|
+
import { cachedSubstrateDocsInclusive } from './session-cache.js';
|
|
41
41
|
import { realpathOrSelf } from '../fs-utils.js';
|
|
42
42
|
const JUNK_DIRS = new Set(['node_modules', '.git', 'dist', 'build', '.next', '.cache', '.yalc']);
|
|
43
43
|
function attr(s) {
|
|
@@ -137,9 +137,14 @@ function enclosingProjectDocs(absReadFile) {
|
|
|
137
137
|
}
|
|
138
138
|
return docs;
|
|
139
139
|
}
|
|
140
|
+
// The event corpus INCLUDES node-scope docs: surfaces entries are explicit
|
|
141
|
+
// authored routing, so a node-local doc's read/memory-read/command entry
|
|
142
|
+
// fires like any other store's. Only boot excludes node scope (render.ts's
|
|
143
|
+
// nodeLocalDocs owns node-local boot rendering); the shared dedup set keeps
|
|
144
|
+
// a boot-rendered doc from re-delivering below its rung here.
|
|
140
145
|
function resolvedDocs() {
|
|
141
146
|
try {
|
|
142
|
-
return
|
|
147
|
+
return cachedSubstrateDocsInclusive(listAllMemoryDocs, parseSubstrateDoc);
|
|
143
148
|
}
|
|
144
149
|
catch {
|
|
145
150
|
return [];
|
|
@@ -27,12 +27,13 @@
|
|
|
27
27
|
// doc (e.g. the inline memory-reference inventory) use
|
|
28
28
|
// this pair.
|
|
29
29
|
// • allMemoryDocs — allMemoryDocsInclusive with node-scope docs excluded
|
|
30
|
-
// (
|
|
31
|
-
// cachedAllMemoryDocs).
|
|
32
|
-
// on-read.ts.
|
|
30
|
+
// (boot-only view — see the comment on
|
|
31
|
+
// cachedAllMemoryDocs). Consumed by render.ts.
|
|
33
32
|
// • substrateDocs — allMemoryDocs mapped through parseSubstrateDoc and
|
|
34
|
-
// null-filtered. Used by render.ts's
|
|
35
|
-
// on-read.ts
|
|
33
|
+
// null-filtered. Used by render.ts's resolver corpus.
|
|
34
|
+
// The event corpus (on-read.ts) uses the INCLUSIVE
|
|
35
|
+
// pair instead: node docs' surfaces entries fire on
|
|
36
|
+
// read/memory-read/command like any other store's.
|
|
36
37
|
// Node subjects are deliberately NOT cached: lifecycle, mode, kind, and other
|
|
37
38
|
// gate inputs can change while a resident broker/session remains live. Rendering
|
|
38
39
|
// must always gate against the current persisted node metadata.
|
|
@@ -77,14 +78,15 @@ export function cachedSubstrateDocsInclusive(listFn, parseFn) {
|
|
|
77
78
|
* `listFn` is injected by the caller to avoid circular imports at module init. */
|
|
78
79
|
export function cachedAllMemoryDocs(listFn) {
|
|
79
80
|
if (_cache.allMemoryDocs === null) {
|
|
80
|
-
// The
|
|
81
|
+
// The BOOT pipeline (render.ts) EXCLUDES node-scope docs: node-local
|
|
81
82
|
// memory surfaces at boot via render.ts's nodeLocalDocs (any kind, floored
|
|
82
83
|
// into the knowledge block), NOT through the resolver corpus, so a node doc
|
|
83
|
-
// must not also enter
|
|
84
|
-
// on-read)
|
|
85
|
-
//
|
|
86
|
-
//
|
|
87
|
-
//
|
|
84
|
+
// must not also enter there (it would double-surface at boot). The event
|
|
85
|
+
// corpus (on-read.ts) uses the inclusive view — node docs' surfaces
|
|
86
|
+
// entries fire on read/memory-read/command. The `node` scope reaches CLI
|
|
87
|
+
// read/list/find/delete through the uncached listAllMemoryDocs() path.
|
|
88
|
+
// Derived from the inclusive cache by filtering, so listFn() itself still
|
|
89
|
+
// runs at most once per session even though both views are consumed.
|
|
88
90
|
_cache.allMemoryDocs = cachedAllMemoryDocsInclusive(listFn).filter((d) => d.scope !== 'node');
|
|
89
91
|
}
|
|
90
92
|
return _cache.allMemoryDocs;
|
package/package.json
CHANGED
package/runtime.lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/crouter",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.211",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@north-light/crouter",
|
|
9
|
-
"version": "0.3.
|
|
9
|
+
"version": "0.3.211",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|