@north-light/crouter 0.3.222 → 0.3.224
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/builtin-memory/internal/memory-loading.md +4 -4
- package/dist/clients/attach/viewer.js +391 -391
- package/dist/clients/inbox/page-adapter.js +2 -1
- package/dist/clients/inbox/tui/panel.js +23 -4
- package/dist/clients/inbox/tui/render.js +6 -0
- package/dist/clients/inbox/tui/types.d.ts +8 -0
- package/dist/commands/memory/shared.d.ts +2 -2
- package/dist/commands/memory/shared.js +11 -6
- package/dist/commands/pkg/browse/doc-view.js +2 -0
- package/dist/core/__tests__/preview-mirror-cap.test.d.ts +1 -0
- package/dist/core/__tests__/preview-mirror-cap.test.js +37 -0
- package/dist/core/__tests__/profile-project-memory-delivery.test.js +69 -2
- package/dist/core/io.d.ts +9 -0
- package/dist/core/io.js +13 -1
- package/dist/core/substrate/frontmatter-validation.d.ts +2 -5
- package/dist/core/substrate/frontmatter-validation.js +8 -4
- package/dist/core/substrate/gate.d.ts +4 -1
- package/dist/core/substrate/gate.js +5 -0
- package/dist/core/substrate/on-read.js +4 -4
- package/dist/core/substrate/render.js +13 -18
- package/dist/core/substrate/schema.d.ts +12 -7
- package/dist/core/substrate/schema.js +10 -6
- package/dist/core/substrate/surface-match.d.ts +8 -7
- package/dist/core/substrate/surface-match.js +15 -14
- package/package.json +1 -1
- package/runtime.lock.json +2 -2
|
@@ -9,11 +9,11 @@ surfaces:
|
|
|
9
9
|
|
|
10
10
|
# How memory loads
|
|
11
11
|
|
|
12
|
-
Every memory doc declares its own delivery in frontmatter `surfaces` entries; the runtime never guesses. Delivery is five events, one rung per entry,
|
|
12
|
+
Every memory doc declares its own delivery in frontmatter `surfaces` entries; the runtime never guesses. Delivery is five events, one rung per entry, document and entry gates, and structural ordering. The authoring contract (flags, routing-line craft) is `crtr memory write -h`; which scope to write to is `internal/agent-shaping`; physical paths are `internal/storage-tiers`. This doc is the mechanics between those: what actually fires, when, and in what order.
|
|
13
13
|
|
|
14
14
|
## Surfaces entries
|
|
15
15
|
|
|
16
|
-
A doc with no `surfaces` does exactly one thing: appears in its directory's listing. Everything beyond that is an explicit entry — `{on: <event>, match?, match-frontmatter?, at: <rung>}`.
|
|
16
|
+
A doc with no `surfaces` does exactly one thing: appears in its directory's listing. Everything beyond that is an explicit entry — `{on: <event>, match?, match-frontmatter?, gate?, at: <rung>}`. An entry's event constraints and optional node-config `gate` must both match; participating entries OR across and fold to their highest rung (`content` > `preview` > `name`), with no cross-entry deny precedence. Multiple entries per event are legal. The events:
|
|
17
17
|
|
|
18
18
|
- **boot** — the catalog assembled into every node's system prompt at revive. No match; the entry's presence is the match.
|
|
19
19
|
- **workspace-open** — first-message context when cwd/profile mounts the doc's project store. Project stores only.
|
|
@@ -35,7 +35,7 @@ Silence is the absence of an entry; there is no `none` rung. `short-form` is **n
|
|
|
35
35
|
|
|
36
36
|
## Gates
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
A document-level `gate` is the hard eligibility predicate over the node's own config — kind, mode, orchestration depth, scope, cwd — using the standard matcher vocabulary (`crtr memory write -h`). When it fails, no automatic surface delivers the document. An optional `gate` on an individual surface entry applies the same predicate language only to that entry, so one document can choose a different rung by node kind. No gate means always eligible. Persona prose is just gated boot-content docs (`gate: {kind: developer, mode: base}`); guidance that should scale with effort is one predicate (`orchestration.depth: {gte: 2}`), not a mechanism.
|
|
39
39
|
|
|
40
40
|
## Listings and dedup
|
|
41
41
|
|
|
@@ -49,7 +49,7 @@ At boot/first-message assembly the runtime mounts: builtin docs, the user store
|
|
|
49
49
|
|
|
50
50
|
Each project the selected profile has a relationship with carries a `memory` value — `none`, `name`, `preview`, or `content` — and that value is the maximum rung anything in that project's stores delivers at boot and workspace-open, whatever directory the node is working in. It only lowers: an entry authored below the maximum delivers at its authored rung. `none` contributes nothing to either automatic event, so a `none` project cannot shadow a same-named doc from a wider scope — that wider doc becomes the winner. A project store the selected profile has no relationship with delivers exactly what it authored.
|
|
51
51
|
|
|
52
|
-
The maximum reaches those two events and nothing else. Read, memory-read, and command entries fire at their authored rungs; directory listings, `crtr memory read`, `crtr memory find`, config resolution, and plugin discovery all see the full corpus. An explicit `crtr memory read` is itself a content delivery, so reading a capped doc returns its whole body and records content — the upgrade path for a doc the automatic events disclosed only by name or preview.
|
|
52
|
+
The maximum reaches those two events and nothing else. Read, memory-read, and command entries fire at their authored rungs; directory listings, `crtr memory read`, `crtr memory find`, config resolution, and plugin discovery all see the full corpus. An explicit `crtr memory read` is itself a content delivery, so reading a capped or document-gated doc returns its whole body and records content — the upgrade path for a doc the automatic events disclosed only by name or preview. Entry gates apply to companion docs routed by the `memory-read` event, not to the deliberate read or its listings.
|
|
53
53
|
|
|
54
54
|
A workspace's front door is an ordinary doc carrying the entry pair `{on: workspace-open, at: content}` + `{on: read, match: "./**", at: content}` — the operating guide loads when that workspace mounts or its files are read, not in every boot catalog. `crtr memory lint` requires exactly one workspace-open content doc per profile-managed project store. Multiple mounted roots render broad-to-specific.
|
|
55
55
|
|