@gamaze/hicortex 0.27.1 → 0.27.3
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 +2 -2
- package/assets/dashboard.html +19 -19
- package/dist/calibration.d.ts +2 -2
- package/dist/calibration.js +2 -2
- package/dist/capture.d.ts +19 -1
- package/dist/capture.js +57 -16
- package/dist/classification.d.ts +9 -9
- package/dist/classification.js +11 -11
- package/dist/cluster.d.ts +1 -1
- package/dist/confidential-marker.d.ts +1 -1
- package/dist/consolidate.d.ts +6 -5
- package/dist/consolidate.js +6 -5
- package/dist/dashboard.d.ts +5 -5
- package/dist/dashboard.js +2 -2
- package/dist/db.js +1 -1
- package/dist/graph.d.ts +1 -2
- package/dist/graph.js +4 -6
- package/dist/learnings-identity.d.ts +26 -3
- package/dist/learnings-identity.js +54 -17
- package/dist/marker-key-api.d.ts +7 -7
- package/dist/marker-key-api.js +7 -7
- package/dist/mcp-server.js +16 -16
- package/dist/prompts.d.ts +10 -12
- package/dist/prompts.js +10 -12
- package/dist/quality-scoreboard.js +15 -3
- package/dist/recall-hook-cli.d.ts +3 -0
- package/dist/recall-hook-cli.js +14 -1
- package/dist/recall-precision.d.ts +2 -2
- package/dist/recall-precision.js +2 -2
- package/dist/redact.js +1 -1
- package/dist/transcript-reader.d.ts +10 -0
- package/dist/transcript-reader.js +8 -0
- package/dist/types.d.ts +4 -4
- package/opencode-plugin/hicortex/index.ts +146 -11
- package/package.json +1 -1
- package/pi-extension/hicortex/index.ts +114 -11
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -278,8 +278,8 @@ Config at `~/.hicortex/config.json`. Created by `init`. Key options:
|
|
|
278
278
|
| `lessonsLimit` | Max lessons injected into an agent's session-start context (default: 10). Lessons are ranked per session by project/domain affinity + recency + strength + access, so each session sees its most-relevant slice. Lower = leaner system prompts. |
|
|
279
279
|
| `identityClients` | Which harnesses inject the [identity layer](#identity-layer) at session start (default `["cc"]`; `"all"` or any subset of `cc`/`hermes`/`oc`/`pi`/`opencode`) |
|
|
280
280
|
| `identityAgents` | Per-agent identity modes (0.13): `{ "<id>": "override" \| "global" \| "off" }`. Absent + no `agents/<id>/` dir → every agent gets the global set. Boot-time (restart to apply) — see [Per-agent identity](#per-agent-identity-013) |
|
|
281
|
-
| `agentName` | This install's
|
|
282
|
-
| `confidentialAgents` | The **confidential circle** roster (#332): agent ids (same sanitized namespace as `identityAgents`/`?agent=`; `"finance-bot"`, not `"hermes/finance-bot"` — the first `<harness>/` segment is stripped when matching captures). Captures from rostered agents are stamped `confidential` at intake, server-derived (client-declared privacy is ignored); only rostered agents — sending their id as the optional `agent` param on `/recall-index`, `/search`, `/recent`, `/memory`, `/learnings`, `/graph` — see those memories (absent/unknown agent = omitted, single fetch 404). Members see both pools. **Empty by default = no circle, zero change.** Boot-time (restart to apply); `hicortex backfill-privacy` (dry run by default) stamps history by source agent |
|
|
281
|
+
| `agentName` | This install's configured identity name, reported by `hicortex status` (#600: no longer sent on the wire — the hooks identify by the workspace folder basename instead; see `confidentialAgents`). **Unset by default** (CC shares the global identity). Explicit opt-in via `init --agent-name <name>`; `init --agent-name ""` clears it. An empty/whitespace value equals unset |
|
|
282
|
+
| `confidentialAgents` | The **confidential circle** roster (#332): agent ids (same sanitized namespace as `identityAgents`/`?agent=`; `"finance-bot"`, not `"hermes/finance-bot"` — the first `<harness>/` segment is stripped when matching captures). Captures from rostered agents are stamped `confidential` at intake, server-derived (client-declared privacy is ignored); only rostered agents — sending their id as the optional `agent` param on `/recall-index`, `/search`, `/recent`, `/memory`, `/learnings`, `/graph` — see those memories (absent/unknown agent = omitted, single fetch 404). Members see both pools. **Reads need an identifying client:** Hermes plugin 0.7.11+ sends its profile id (plugin installs are pinned at install — update if older); CC/Pi/opencode identify by the workspace folder NAME — roster the folder's basename (sessions under `~/Agents/nano/` are the agent `nano`; npx clients auto-update, the copied Pi/opencode extension files need a re-`init` or manual copy); OpenClaw sends no id (non-member reads). Older client versions are safe — fail-closed, standard pool only — they simply appear anonymous. **Empty by default = no circle, zero change.** Boot-time (restart to apply); `hicortex backfill-privacy` (dry run by default) stamps history by source agent |
|
|
283
283
|
| `confidentialPaths` | Workspace-path patterns for the confidential circle (#609) — the **advanced** arm for the two jobs a local marker cannot do: retroactive backfill (with `hicortex backfill-privacy`) and central fleet management (one config edit covers every machine, no command to run). A capture made in a matching folder is stamped `confidential` at intake **regardless of agent id** (Claude Code agent ids are folder-derived generics — the roster alone misses a sensitive folder captured by an unrostered id). Entries are absolute paths in three forms — exact (`/home/me/finance`), `*` as a full segment (`/home/*/finance`), trailing `/**` subtree *including* the prefix itself (`/home/me/**`) — plus a leading `~/` that matches any user's home structurally (`/home/<user>/…` or `/Users/<user>/…`, so one entry covers a multi-OS fleet). Separators normalize to `/` and comparison is case-insensitive (over-match is the safe direction); invalid entries (relative, `**` mid-path) are dropped at boot with a warning naming them. Every nightly delivery carries the session's workspace path (`workspace_path`) plus the relayed workspace-marker content (`client_marker`, see `confidentialMarkerKey` below), and the path is stored on the row — so `hicortex backfill-privacy` reports and stamps history **per pattern** too (rows stored before the column exists have no path and are never path-matched). Prefer marking a folder right where you are? `hicortex confidential` (optionally `[path]`, `--off` to unmark) writes a local `.hicortex-confidential` marker carrying the server's `confidentialMarkerKey` — and provisions that key itself (see the next row); the nightly relays the marker's content and the server validates it. Add the folder here to backfill its history. **Empty by default = zero change.** Boot-time (restart to apply) |
|
|
284
284
|
| `confidentialMarkerKey` | The owner-set key a workspace marker must carry (#614): `hicortex confidential` writes it into the `.hicortex-confidential` marker file (single line), the nightly relays that content as `client_marker`, and the server stamps `confidential` only when the content **matches this key** — compared timing-safe, server-side, at intake. This closes the client-writable classification channel: the pre-#614 empty marker (and the `client_confidential` boolean) let any capture client mark its own deliveries confidential, and a client sending `client_confidential: true` without valid marker content is now ignored. **Provisioned by that very command (#616) — no manual key mirroring**: on a machine with no local key the command fetches the server's existing key, or generates one and registers it there (`GET`/`PUT /confidential/marker-key`, token-gated), then caches it in this machine's `~/.hicortex/config.json` for offline reuse; `confidential --key <value>` rotates (the server applies the new key to the next delivery, no restart; markers carrying a previous key then stamp standard). An env or config key already on the machine is used as-is, no server contact; the command refuses when no key exists AND no server is reachable. **Absent/blank (default) = markers are INERT, fail-closed both directions** — marker-carrying deliveries stamp standard, and a boot note names the key when the circle is otherwise active. Operators can still set it by hand: config (restart to apply) or the env mirror `HICORTEX_CONFIDENTIAL_MARKER_KEY`, which overrides config — and while that env is set on the server, rotation PUTs answer `409` instead of shadow-writing |
|
|
285
285
|
| `llmConfidentialBaseUrl` | The confidential model's endpoint (#332). With `llmConfidentialApiKey` (both required; `llmConfidentialModel` optional; `llmConfidentialProvider` selects the dialect like `llmProvider`), a second model handles **every** LLM touch of confidential text — distillation, importance scoring, reflection, contradiction checks, domain classification, reconsolidation verdicts. Env mirrors: `HICORTEX_LLM_CONFIDENTIAL_BASE_URL`/`_API_KEY`/`_MODEL` |
|
package/assets/dashboard.html
CHANGED
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
within ~2–2.5× (owner: no huge green balls, nothing barely visible);
|
|
99
99
|
stage colors untouched.
|
|
100
100
|
|
|
101
|
-
FIX ROUND 6 (
|
|
102
|
-
|
|
101
|
+
FIX ROUND 6 (the approved mockup, variant 3 + copy A): ENTRY LOADING
|
|
102
|
+
SCREEN. Pure inline
|
|
103
103
|
HTML+CSS at the very top of the body, BEFORE the app markup and the
|
|
104
104
|
engine script — it paints on URL entry with ZERO script (the real
|
|
105
105
|
page is black for seconds while the engine parses/boots; the splash
|
|
@@ -457,7 +457,7 @@
|
|
|
457
457
|
right. The value is the hero (≥2x the label size — tests pin the
|
|
458
458
|
ratio), neutral --text; the chips are the ONLY colored element on the
|
|
459
459
|
face (green improving / red worsening / gray flat or no baseline).
|
|
460
|
-
Rows breathe — the card may grow taller
|
|
460
|
+
Rows breathe — the card may grow taller. Theme
|
|
461
461
|
tokens only, both themes. */
|
|
462
462
|
.rec-l1{ display:flex; flex-direction:column; gap:8px; min-width:0; }
|
|
463
463
|
.rec-l1[hidden]{ display:none; } /* author display beats the UA's [hidden] — the #billing-banner idiom; without it the flex rule un-hides the container */
|
|
@@ -1177,9 +1177,9 @@
|
|
|
1177
1177
|
</script>
|
|
1178
1178
|
</head>
|
|
1179
1179
|
<body class="booting">
|
|
1180
|
-
<!-- ============ entry loading screen (#409 fix round 6 — the
|
|
1181
|
-
|
|
1182
|
-
|
|
1180
|
+
<!-- ============ entry loading screen (#409 fix round 6 — the approved
|
|
1181
|
+
mockup, variant 3 + copy A). Sits at the very top of the body with
|
|
1182
|
+
its OWN style block: it paints
|
|
1183
1183
|
on URL entry with ZERO script, fully opaque black in both themes, and
|
|
1184
1184
|
the engine only ever fades it away (entrySplashDismiss at the boot
|
|
1185
1185
|
reveal). On failure the copy line swaps to an honest error — never an
|
|
@@ -1297,24 +1297,24 @@
|
|
|
1297
1297
|
<div class="csub" id="tok-sub"> </div>
|
|
1298
1298
|
<div id="tok-nights" aria-label="LLM tokens per nightly run this billing period"></div>
|
|
1299
1299
|
</div>
|
|
1300
|
-
<!-- Memory Precision (#476
|
|
1300
|
+
<!-- Memory Precision (#476 retitle; #578 quality audit; #591
|
|
1301
1301
|
presentation pass; #593 stat-table round 2) — ONE card, two
|
|
1302
1302
|
context levels + the quality instrument. Level 2 (recall depth)
|
|
1303
1303
|
keeps the #426 U-band + zone word + provisional-hover semantics;
|
|
1304
1304
|
the marker/tooltip read the WINDOW ratio off
|
|
1305
1305
|
D.memory_precision.level2 (a pre-#476 server has no block → the
|
|
1306
|
-
headline ratio — today's rendering exactly). The #578 audit
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1306
|
+
headline ratio — today's rendering exactly). The #578 audit:
|
|
1307
|
+
mean similarity and redundant share are TOOLTIP-ONLY (high cosine
|
|
1308
|
+
was the noise's camouflage — not actionable), and the FACE
|
|
1309
|
+
carries what answers
|
|
1310
1310
|
"is recall quality improving": uses-per-showing (the big word),
|
|
1311
1311
|
pushes/lines volume, and the Tier-1 rows with per-change deltas
|
|
1312
1312
|
off the server's change-registry entries while the raw window
|
|
1313
|
-
covers them. The #591 pass (
|
|
1313
|
+
covers them. The #591 pass (the card must
|
|
1314
1314
|
SELF-INTERPRET) made every row read in plain words (MP_NAME) with
|
|
1315
1315
|
deltas valenced by the explicit per-metric map (MP_GOOD) and the
|
|
1316
1316
|
technical layer demoted behind per-row tooltips. The #593 round 2
|
|
1317
|
-
(
|
|
1317
|
+
(the card reads as a STAT TABLE)
|
|
1318
1318
|
reshapes that face: EXACTLY 4 stat rows (clutter / foreign
|
|
1319
1319
|
content / weak matches / churn), ONE stat per row in a fixed
|
|
1320
1320
|
value/label/chip grid that can never wrap — the value is the
|
|
@@ -1323,7 +1323,7 @@
|
|
|
1323
1323
|
tooltips, the headline is ONE neutral line (direction · caveat)
|
|
1324
1324
|
and the zone word's tooltip carries the plain meaning +
|
|
1325
1325
|
uses-per-showing. The divergence drawer is GONE from the card
|
|
1326
|
-
(
|
|
1326
|
+
(the row double-counted the gauge's own reason; the data
|
|
1327
1327
|
still flows into the nightly snapshots — the page just never
|
|
1328
1328
|
renders it), and the contested row is presence-gated: hidden
|
|
1329
1329
|
unless the grading lane ran AND something is contested (no
|
|
@@ -3419,7 +3419,7 @@ const RECALL_ZONE_PLAIN={low:'shown memories are rarely picked up',normal:'shown
|
|
|
3419
3419
|
assumption on the card; a metric whose good direction flips changes
|
|
3420
3420
|
here and nowhere else. Plain names beside it: the reader-facing
|
|
3421
3421
|
vocabulary (the internal metric keys stay in the payload; #593 renamed
|
|
3422
|
-
cross_share's face label to
|
|
3422
|
+
cross_share's face label to "Foreign content"). */
|
|
3423
3423
|
const MP_GOOD={block_size:'down',cross_share:'down',sub_bar_share:'down',recycling:'down'};
|
|
3424
3424
|
const MP_NAME={block_size:'Clutter per prompt',cross_share:'Foreign content',sub_bar_share:'Weak matches',recycling:'Memory churn'};
|
|
3425
3425
|
/* #593 plain headline — pure composer (the recallUsesZone convention):
|
|
@@ -3549,7 +3549,7 @@ function renderRecBand(ups){
|
|
|
3549
3549
|
}
|
|
3550
3550
|
|
|
3551
3551
|
/* ---------- Memory Precision — Level 1, the pushed index (#476) + the #578
|
|
3552
|
-
quality audit
|
|
3552
|
+
quality audit + the #591
|
|
3553
3553
|
presentation pass + the #593 stat-table reshape. The FACE is EXACTLY 4
|
|
3554
3554
|
stat rows (MP_NAME labels) + the denominators foot line (.l1vol): ONE
|
|
3555
3555
|
stat per row in the fixed value/label/chip grid — the hero value
|
|
@@ -3560,7 +3560,7 @@ function renderRecBand(ups){
|
|
|
3560
3560
|
MP_GOOD valence, no covered entry → the gray no-baseline dash. Row
|
|
3561
3561
|
meanings ("fewer is better", attribution coverage, the bar value) live
|
|
3562
3562
|
in PER-ROW titles; mean similarity + repeated-known stay card-level
|
|
3563
|
-
TOOLTIP-ONLY (
|
|
3563
|
+
TOOLTIP-ONLY (high cosine was the noise's camouflage).
|
|
3564
3564
|
Absent tier1 (a pre-#578 server) → the stat rows hide and the card
|
|
3565
3565
|
keeps the #476 shape; absent block entirely → the whole row hides and
|
|
3566
3566
|
the sub keeps the old label (the capture card's block-absence guard). */
|
|
@@ -4042,7 +4042,7 @@ function agoLabel(iso){
|
|
|
4042
4042
|
/* ---------- #601: the confidential circle — fleet.circle rides the same
|
|
4043
4043
|
/dashboard/data payload (ALWAYS present; roster [] when nothing is
|
|
4044
4044
|
configured). VISIBILITY ONLY: the dashboard stays ungated (confidential
|
|
4045
|
-
content remains visible here —
|
|
4045
|
+
content remains visible here — by design); standard agents
|
|
4046
4046
|
render NO badge (honest absence — red would read as error, amber reads as
|
|
4047
4047
|
restricted). D.fleet.circle is ABSENT on a pre-#601 server → every helper
|
|
4048
4048
|
degrades to the exact prior rendering. members is keyed by the OBSERVED
|
|
@@ -4064,7 +4064,7 @@ function circleCount(agentId){
|
|
|
4064
4064
|
function circlePill(agentId){
|
|
4065
4065
|
const n=circleCount(agentId);
|
|
4066
4066
|
if(n===null) return '';
|
|
4067
|
-
return '<span class="conf-pill" title="
|
|
4067
|
+
return '<span class="conf-pill" title="Confidential circle — this agent\'s captures are confidential, hidden from other agents\' recall · '+n+' confidential '+(n===1?'memory':'memories')+'">confidential</span>';
|
|
4068
4068
|
}
|
|
4069
4069
|
/** Bundle-level pill (rail card header / capture rows) — the tooltip names
|
|
4070
4070
|
every member agent + its count; '' when none of the ids are members. */
|
package/dist/calibration.d.ts
CHANGED
|
@@ -203,8 +203,8 @@ export declare const QUALITY_CHANGES: readonly QualityChange[];
|
|
|
203
203
|
export declare const QUALITY_GRADE_WEEKLY_CALL_CAP = 60;
|
|
204
204
|
/**
|
|
205
205
|
* Auto-grader confidence below which a graded line lands in the CONTESTED
|
|
206
|
-
* slice for
|
|
207
|
-
*
|
|
206
|
+
* slice for manual review (#578). PROVISIONAL first anchor: 0.70, expected
|
|
207
|
+
* to move as real-world data accumulates. Applied at RENDER only
|
|
208
208
|
* (raw score + confidence are stored threshold-free; a recalibration never
|
|
209
209
|
* rewrites history).
|
|
210
210
|
*/
|
package/dist/calibration.js
CHANGED
|
@@ -222,8 +222,8 @@ exports.QUALITY_CHANGES = Object.freeze([
|
|
|
222
222
|
exports.QUALITY_GRADE_WEEKLY_CALL_CAP = 60;
|
|
223
223
|
/**
|
|
224
224
|
* Auto-grader confidence below which a graded line lands in the CONTESTED
|
|
225
|
-
* slice for
|
|
226
|
-
*
|
|
225
|
+
* slice for manual review (#578). PROVISIONAL first anchor: 0.70, expected
|
|
226
|
+
* to move as real-world data accumulates. Applied at RENDER only
|
|
227
227
|
* (raw score + confidence are stored threshold-free; a recalibration never
|
|
228
228
|
* rewrites history).
|
|
229
229
|
*/
|
package/dist/capture.d.ts
CHANGED
|
@@ -48,6 +48,14 @@ export interface Segment {
|
|
|
48
48
|
* memories collide on the UNIQUE index.
|
|
49
49
|
*/
|
|
50
50
|
idSuffix: string;
|
|
51
|
+
/**
|
|
52
|
+
* #619: the running per-entry workspace this segment's entries ran in (the
|
|
53
|
+
* packer splits at every workspace CHANGE). Null when the caller passed no
|
|
54
|
+
* `entryWorkspaces` (the whole-batch fallback applies) or the group's
|
|
55
|
+
* entries carried none — the POST layer resolves `seg.workspacePath ??
|
|
56
|
+
* batch.workspacePath ?? null`.
|
|
57
|
+
*/
|
|
58
|
+
workspacePath: string | null;
|
|
51
59
|
}
|
|
52
60
|
/** The wire body for POST /distill. */
|
|
53
61
|
export interface DistillBody {
|
|
@@ -241,8 +249,18 @@ export declare function hardSplitText(text: string, maxChars?: number): string[]
|
|
|
241
249
|
* the grouped entries (extractConversationText) so cleaning/redaction stay
|
|
242
250
|
* coherent. A single entry larger than maxChars is emitted as its own run of
|
|
243
251
|
* hard-split pieces (A2).
|
|
252
|
+
*
|
|
253
|
+
* #619: with `entryWorkspaces` (CC's per-entry `cwd`, aligned with `entries`)
|
|
254
|
+
* the packer ALSO breaks the group at every workspace change, and each flushed
|
|
255
|
+
* segment (and each hard-split piece of an oversized entry) carries the
|
|
256
|
+
* running workspace as `workspacePath`. The splits only ADD boundaries —
|
|
257
|
+
* segStart/segEnd stay exact entry-cursor boundaries and the segments remain a
|
|
258
|
+
* contiguous partition of the delta, so the cursor discipline is unchanged.
|
|
259
|
+
* Without `entryWorkspaces` every segment gets `workspacePath: null` and the
|
|
260
|
+
* caller falls back to the batch-level workspace — byte-identical to the
|
|
261
|
+
* pre-#619 behavior for Hermes/Pi/OC/opencode.
|
|
244
262
|
*/
|
|
245
|
-
export declare function packSegments(entries: unknown[], startCursor: number, entryCursors: number[], maxChars?: number): Segment[];
|
|
263
|
+
export declare function packSegments(entries: unknown[], startCursor: number, entryCursors: number[], maxChars?: number, entryWorkspaces?: Array<string | null>): Segment[];
|
|
246
264
|
/** True when a 429 result is the tenant token-budget gate (terminal). */
|
|
247
265
|
export declare function isTokenBudget429(result: PostResult): boolean;
|
|
248
266
|
/** In-run retries for a rate-limit 429 before giving up as transient. */
|
package/dist/capture.js
CHANGED
|
@@ -145,13 +145,28 @@ function hardSplitText(text, maxChars = exports.SEGMENT_MAX_CHARS) {
|
|
|
145
145
|
* the grouped entries (extractConversationText) so cleaning/redaction stay
|
|
146
146
|
* coherent. A single entry larger than maxChars is emitted as its own run of
|
|
147
147
|
* hard-split pieces (A2).
|
|
148
|
+
*
|
|
149
|
+
* #619: with `entryWorkspaces` (CC's per-entry `cwd`, aligned with `entries`)
|
|
150
|
+
* the packer ALSO breaks the group at every workspace change, and each flushed
|
|
151
|
+
* segment (and each hard-split piece of an oversized entry) carries the
|
|
152
|
+
* running workspace as `workspacePath`. The splits only ADD boundaries —
|
|
153
|
+
* segStart/segEnd stay exact entry-cursor boundaries and the segments remain a
|
|
154
|
+
* contiguous partition of the delta, so the cursor discipline is unchanged.
|
|
155
|
+
* Without `entryWorkspaces` every segment gets `workspacePath: null` and the
|
|
156
|
+
* caller falls back to the batch-level workspace — byte-identical to the
|
|
157
|
+
* pre-#619 behavior for Hermes/Pi/OC/opencode.
|
|
148
158
|
*/
|
|
149
|
-
function packSegments(entries, startCursor, entryCursors, maxChars = exports.SEGMENT_MAX_CHARS) {
|
|
159
|
+
function packSegments(entries, startCursor, entryCursors, maxChars = exports.SEGMENT_MAX_CHARS, entryWorkspaces) {
|
|
150
160
|
const segments = [];
|
|
151
161
|
// Boundary cursor before entry i (startCursor for i=0, else entryCursors[i-1]).
|
|
152
162
|
const boundaryBefore = (i) => (i === 0 ? startCursor : entryCursors[i - 1]);
|
|
153
163
|
let groupStartIdx = -1;
|
|
154
164
|
let groupSize = 0;
|
|
165
|
+
// #619: the running workspace of the OPEN group. Starts null; a non-empty
|
|
166
|
+
// per-entry value that DIFFERS flushes the open group first (the group
|
|
167
|
+
// belongs to the old workspace) and then becomes the running value. null
|
|
168
|
+
// entries (no cwd of their own) never split — they inherit the run.
|
|
169
|
+
let groupWorkspace = null;
|
|
155
170
|
const flushGroup = (endIdxExclusive) => {
|
|
156
171
|
if (groupStartIdx < 0)
|
|
157
172
|
return;
|
|
@@ -161,11 +176,22 @@ function packSegments(entries, startCursor, entryCursors, maxChars = exports.SEG
|
|
|
161
176
|
segStart: boundaryBefore(groupStartIdx),
|
|
162
177
|
segEnd: entryCursors[endIdxExclusive - 1],
|
|
163
178
|
idSuffix: "",
|
|
179
|
+
workspacePath: groupWorkspace,
|
|
164
180
|
});
|
|
165
181
|
groupStartIdx = -1;
|
|
166
182
|
groupSize = 0;
|
|
167
183
|
};
|
|
168
184
|
for (let i = 0; i < entries.length; i++) {
|
|
185
|
+
// #619: a mid-session workspace change is a HARD boundary — the open
|
|
186
|
+
// group must not absorb entries from the new workspace (a confidential
|
|
187
|
+
// workspace's entries would silently take the previous birthplace).
|
|
188
|
+
if (entryWorkspaces) {
|
|
189
|
+
const ws = entryWorkspaces[i];
|
|
190
|
+
if (typeof ws === "string" && ws && ws !== groupWorkspace) {
|
|
191
|
+
flushGroup(i);
|
|
192
|
+
groupWorkspace = ws;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
169
195
|
const entryText = (0, distiller_js_1.extractConversationText)([entries[i]]);
|
|
170
196
|
const entryLen = entryText.length;
|
|
171
197
|
if (entryLen > maxChars) {
|
|
@@ -182,6 +208,7 @@ function packSegments(entries, startCursor, entryCursors, maxChars = exports.SEG
|
|
|
182
208
|
segStart: boundaryBefore(i),
|
|
183
209
|
segEnd: entryCursors[i],
|
|
184
210
|
idSuffix: `.p${p}`,
|
|
211
|
+
workspacePath: groupWorkspace,
|
|
185
212
|
});
|
|
186
213
|
});
|
|
187
214
|
continue;
|
|
@@ -290,7 +317,7 @@ async function captureBatches(batches, opts) {
|
|
|
290
317
|
const distillUsage = { prompt: 0, completion: 0, total: 0 };
|
|
291
318
|
for (const [batchIdx, batch] of batches.entries()) {
|
|
292
319
|
const short = batch.sessionId.slice(0, 8);
|
|
293
|
-
const segments = packSegments(batch.entries, batch.startCursor, batch.entryCursors, segmentMaxChars);
|
|
320
|
+
const segments = packSegments(batch.entries, batch.startCursor, batch.entryCursors, segmentMaxChars, batch.entryWorkspaces);
|
|
294
321
|
if (segments.length === 0)
|
|
295
322
|
continue;
|
|
296
323
|
// Fresh whole-session degenerate floor (fix 5): only a startCursor-0 capture
|
|
@@ -313,16 +340,26 @@ async function captureBatches(batches, opts) {
|
|
|
313
340
|
// has no prefix — keeps ids byte-identical to first-cut and to any already
|
|
314
341
|
// stored on an older server.
|
|
315
342
|
const genPrefix = batch.generation > 0 ? `g${batch.generation}.` : "";
|
|
316
|
-
// #609/#614: the workspace birthplace signals,
|
|
317
|
-
//
|
|
318
|
-
//
|
|
319
|
-
//
|
|
320
|
-
//
|
|
321
|
-
//
|
|
322
|
-
//
|
|
323
|
-
//
|
|
324
|
-
|
|
325
|
-
|
|
343
|
+
// #609/#614/#619: the workspace birthplace signals, resolved PER SEGMENT
|
|
344
|
+
// below. The packer splits the delta at every per-entry workspace change
|
|
345
|
+
// (CC writes cwd on every entry), so each segment carries the workspace
|
|
346
|
+
// its OWN entries ran in — a mid-session cd must not silently re-
|
|
347
|
+
// birthplace later entries under the session's first workspace (#619:
|
|
348
|
+
// that mis-stamp lost confidential-workspace content its classification).
|
|
349
|
+
// Batches without per-entry workspaces (Pi/OC/opencode session cwd,
|
|
350
|
+
// Hermes null) pack null and fall back to `batch.workspacePath` —
|
|
351
|
+
// byte-identical to the pre-#619 single-stamp behavior. null workspace
|
|
352
|
+
// sends a null path and a null marker — never invented. #614: the client
|
|
353
|
+
// RELAYS marker content (client_marker); it no longer asserts a
|
|
354
|
+
// confidentiality boolean — validation is server-side. The walk is
|
|
355
|
+
// memoized per resolved path so the same workspace across segments never
|
|
356
|
+
// re-reads the filesystem (readConfidentialMarker semantics unchanged).
|
|
357
|
+
const markerCache = new Map();
|
|
358
|
+
const markerFor = (ws) => {
|
|
359
|
+
if (!markerCache.has(ws))
|
|
360
|
+
markerCache.set(ws, readConfidentialMarker(ws));
|
|
361
|
+
return markerCache.get(ws);
|
|
362
|
+
};
|
|
326
363
|
// Cursor value the last confirmed boundary reached — advanced once, at
|
|
327
364
|
// session end (A4), so per-session file writes stay bounded.
|
|
328
365
|
let lastConfirmedEnd = batch.startCursor;
|
|
@@ -351,6 +388,10 @@ async function captureBatches(batches, opts) {
|
|
|
351
388
|
lastConfirmedEnd = seg.segEnd;
|
|
352
389
|
continue;
|
|
353
390
|
}
|
|
391
|
+
// #619: this segment's own workspace — the per-entry value the packer
|
|
392
|
+
// stamped, falling back to the batch-level one when the reader had no
|
|
393
|
+
// per-entry cwds (the pre-#619 single-stamp shape).
|
|
394
|
+
const segWorkspace = seg.workspacePath ?? batch.workspacePath ?? null;
|
|
354
395
|
const body = {
|
|
355
396
|
text: seg.text,
|
|
356
397
|
source_agent: batch.sourceAgent ?? `claude-code/${batch.projectName}`,
|
|
@@ -361,15 +402,15 @@ async function captureBatches(batches, opts) {
|
|
|
361
402
|
session_id: batch.sessionId,
|
|
362
403
|
segment_id: `${genPrefix}${seg.segStart}-${seg.segEnd}${seg.idSuffix}`,
|
|
363
404
|
session_date: batch.date,
|
|
364
|
-
// #609/#614: both workspace signals on every segment (see the
|
|
365
|
-
// per-
|
|
405
|
+
// #609/#614/#619: both workspace signals on every segment (see the
|
|
406
|
+
// per-segment derivation above) — the path verbatim, the marker's
|
|
366
407
|
// relayed CONTENT. Old servers never read unknown fields; the
|
|
367
408
|
// pre-#614 client_confidential boolean is deliberately NOT sent
|
|
368
409
|
// (DistillBody keeps the field documented as legacy for the skew
|
|
369
410
|
// window — a #609 server reading only the boolean sees standard,
|
|
370
411
|
// fail-closed, intended).
|
|
371
|
-
workspace_path:
|
|
372
|
-
client_marker:
|
|
412
|
+
workspace_path: segWorkspace,
|
|
413
|
+
client_marker: markerFor(segWorkspace),
|
|
373
414
|
};
|
|
374
415
|
let result;
|
|
375
416
|
try {
|
package/dist/classification.d.ts
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* memory classification (`standard` | `confidential`, carried by
|
|
4
4
|
* `memories.privacy`; see MemoryPrivacy in types.ts).
|
|
5
5
|
*
|
|
6
|
-
* The model, in one paragraph: an operator lists
|
|
6
|
+
* The model, in one paragraph: an operator lists confidential-circle agents in
|
|
7
7
|
* config (`confidentialAgents`, the same agent-id namespace as
|
|
8
8
|
* `identityAgents` / `?agent=`). Captures whose `source_agent` is rostered
|
|
9
9
|
* are stamped `confidential` at intake — server-derived, deterministic, by
|
|
10
10
|
* birthplace; never a content judgment (content classification was rejected,
|
|
11
11
|
* #197) and never client-declared. The workspace marker (#609/#614) is
|
|
12
|
-
* client-RELAYED but server-VALIDATED: the marker file carries the
|
|
12
|
+
* client-RELAYED but server-VALIDATED: the marker file carries the operator-set
|
|
13
13
|
* `confidentialMarkerKey` as its content, compared timing-safe at intake —
|
|
14
14
|
* marker content without the key never stamps (the client-writable
|
|
15
15
|
* classification channel #614 closes; an unkeyed install ignores markers
|
|
@@ -46,11 +46,11 @@ export declare function resolveConfidentialAgents(config: Record<string, unknown
|
|
|
46
46
|
};
|
|
47
47
|
/**
|
|
48
48
|
* Normalize a capture-side `source_agent` for roster matching. Capture stamps
|
|
49
|
-
* harness-qualified ids (`hermes/
|
|
49
|
+
* harness-qualified ids (`hermes/atlas`, `claude-code/myproject`), while the
|
|
50
50
|
* roster carries bare agent ids (the same ids the read side receives as
|
|
51
51
|
* `agent`) — ONE config list, no read-ids/capture-ids sync hazard. The match
|
|
52
|
-
* is exact, or exact after stripping the FIRST path segment (so `hermes/
|
|
53
|
-
* matches roster `
|
|
52
|
+
* is exact, or exact after stripping the FIRST path segment (so `hermes/atlas`
|
|
53
|
+
* matches roster `atlas`, and a future `anything/atlas` matches too — generic
|
|
54
54
|
* prefix, not a per-harness table). Case-insensitive on the id half via the
|
|
55
55
|
* roster's sanitized (lowercased) form.
|
|
56
56
|
*/
|
|
@@ -115,7 +115,7 @@ export declare function matchesConfidentialPath(workspacePath: string | null | u
|
|
|
115
115
|
*/
|
|
116
116
|
export declare function safeMarkerKeyEqual(markerContent: string, key: string): boolean;
|
|
117
117
|
/**
|
|
118
|
-
* Resolve the `confidentialMarkerKey` (#614) — the
|
|
118
|
+
* Resolve the `confidentialMarkerKey` (#614) — the operator-set secret a
|
|
119
119
|
* workspace marker must carry for its folder to stamp confidential at
|
|
120
120
|
* intake. Precedence: env `HICORTEX_CONFIDENTIAL_MARKER_KEY` OVERRIDES the
|
|
121
121
|
* config value (the env-last-word ops override, so a restart-free rotation
|
|
@@ -142,7 +142,7 @@ export declare function resolveConfidentialMarkerKey(config: Record<string, unkn
|
|
|
142
142
|
* inert (the empty-marker client-writable channel is closed), and a
|
|
143
143
|
* present-but-refused marker never reduces a server rule (markers only add,
|
|
144
144
|
* never subtract — safe because a token holder can already POST arbitrary
|
|
145
|
-
* content
|
|
145
|
+
* content). The optional third argument
|
|
146
146
|
* keeps every existing caller byte-identical (no signals = the #332
|
|
147
147
|
* agent-only rule).
|
|
148
148
|
*/
|
|
@@ -180,8 +180,8 @@ export interface IntakeWorkspaceSignals {
|
|
|
180
180
|
* blank, or unknown `agent` → false (fail-closed: an unknown id can never
|
|
181
181
|
* widen visibility, exactly like the identity layer's mode resolution). The
|
|
182
182
|
* `agent` value is sanitized first so a wire id arrives in the roster's
|
|
183
|
-
* namespace (`
|
|
184
|
-
* separators, so `hermes/
|
|
183
|
+
* namespace (`Atlas` → `atlas`); note sanitizeAgentId also collapses inner
|
|
184
|
+
* separators, so `hermes/atlas` sent as a requester id reads as `hermes-atlas`
|
|
185
185
|
* — the read side intentionally matches BARE ids only (plugins send their
|
|
186
186
|
* resolved profile name, not their capture-side qualified stamp).
|
|
187
187
|
*/
|
package/dist/classification.js
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* memory classification (`standard` | `confidential`, carried by
|
|
5
5
|
* `memories.privacy`; see MemoryPrivacy in types.ts).
|
|
6
6
|
*
|
|
7
|
-
* The model, in one paragraph: an operator lists
|
|
7
|
+
* The model, in one paragraph: an operator lists confidential-circle agents in
|
|
8
8
|
* config (`confidentialAgents`, the same agent-id namespace as
|
|
9
9
|
* `identityAgents` / `?agent=`). Captures whose `source_agent` is rostered
|
|
10
10
|
* are stamped `confidential` at intake — server-derived, deterministic, by
|
|
11
11
|
* birthplace; never a content judgment (content classification was rejected,
|
|
12
12
|
* #197) and never client-declared. The workspace marker (#609/#614) is
|
|
13
|
-
* client-RELAYED but server-VALIDATED: the marker file carries the
|
|
13
|
+
* client-RELAYED but server-VALIDATED: the marker file carries the operator-set
|
|
14
14
|
* `confidentialMarkerKey` as its content, compared timing-safe at intake —
|
|
15
15
|
* marker content without the key never stamps (the client-writable
|
|
16
16
|
* classification channel #614 closes; an unkeyed install ignores markers
|
|
@@ -84,11 +84,11 @@ function resolveConfidentialAgents(config) {
|
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
86
|
* Normalize a capture-side `source_agent` for roster matching. Capture stamps
|
|
87
|
-
* harness-qualified ids (`hermes/
|
|
87
|
+
* harness-qualified ids (`hermes/atlas`, `claude-code/myproject`), while the
|
|
88
88
|
* roster carries bare agent ids (the same ids the read side receives as
|
|
89
89
|
* `agent`) — ONE config list, no read-ids/capture-ids sync hazard. The match
|
|
90
|
-
* is exact, or exact after stripping the FIRST path segment (so `hermes/
|
|
91
|
-
* matches roster `
|
|
90
|
+
* is exact, or exact after stripping the FIRST path segment (so `hermes/atlas`
|
|
91
|
+
* matches roster `atlas`, and a future `anything/atlas` matches too — generic
|
|
92
92
|
* prefix, not a per-harness table). Case-insensitive on the id half via the
|
|
93
93
|
* roster's sanitized (lowercased) form.
|
|
94
94
|
*/
|
|
@@ -103,8 +103,8 @@ function isConfidentialSourceAgent(sourceAgent, roster) {
|
|
|
103
103
|
return false;
|
|
104
104
|
const bare = agent.slice(slash + 1);
|
|
105
105
|
const rest = bare.indexOf("/");
|
|
106
|
-
// Strip only the FIRST segment — `hermes/
|
|
107
|
-
// `a/b/
|
|
106
|
+
// Strip only the FIRST segment — `hermes/atlas` → `atlas`, but
|
|
107
|
+
// `a/b/atlas` → `b/atlas` (never a deep-suffix match; capture ids are
|
|
108
108
|
// single-qualified by construction).
|
|
109
109
|
return rest < 0 && roster.includes(bare);
|
|
110
110
|
}
|
|
@@ -247,7 +247,7 @@ function safeMarkerKeyEqual(markerContent, key) {
|
|
|
247
247
|
return a.length === b.length && (0, node_crypto_1.timingSafeEqual)(a, b);
|
|
248
248
|
}
|
|
249
249
|
/**
|
|
250
|
-
* Resolve the `confidentialMarkerKey` (#614) — the
|
|
250
|
+
* Resolve the `confidentialMarkerKey` (#614) — the operator-set secret a
|
|
251
251
|
* workspace marker must carry for its folder to stamp confidential at
|
|
252
252
|
* intake. Precedence: env `HICORTEX_CONFIDENTIAL_MARKER_KEY` OVERRIDES the
|
|
253
253
|
* config value (the env-last-word ops override, so a restart-free rotation
|
|
@@ -279,7 +279,7 @@ function resolveConfidentialMarkerKey(config) {
|
|
|
279
279
|
* inert (the empty-marker client-writable channel is closed), and a
|
|
280
280
|
* present-but-refused marker never reduces a server rule (markers only add,
|
|
281
281
|
* never subtract — safe because a token holder can already POST arbitrary
|
|
282
|
-
* content
|
|
282
|
+
* content). The optional third argument
|
|
283
283
|
* keeps every existing caller byte-identical (no signals = the #332
|
|
284
284
|
* agent-only rule).
|
|
285
285
|
*/
|
|
@@ -302,8 +302,8 @@ function deriveIntakePrivacy(sourceAgent, roster, signals) {
|
|
|
302
302
|
* blank, or unknown `agent` → false (fail-closed: an unknown id can never
|
|
303
303
|
* widen visibility, exactly like the identity layer's mode resolution). The
|
|
304
304
|
* `agent` value is sanitized first so a wire id arrives in the roster's
|
|
305
|
-
* namespace (`
|
|
306
|
-
* separators, so `hermes/
|
|
305
|
+
* namespace (`Atlas` → `atlas`); note sanitizeAgentId also collapses inner
|
|
306
|
+
* separators, so `hermes/atlas` sent as a requester id reads as `hermes-atlas`
|
|
307
307
|
* — the read side intentionally matches BARE ids only (plugins send their
|
|
308
308
|
* resolved profile name, not their capture-side qualified stamp).
|
|
309
309
|
*/
|
package/dist/cluster.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export declare function clusterEdges(edges: Edge[], threshold: number): string[]
|
|
|
27
27
|
export declare function clusterExcess(clusters: string[][]): number;
|
|
28
28
|
/** Metadata row shape for the merge-safety check. `source_agent` is on the
|
|
29
29
|
* row (the column still exists) but is NOT a merge-safety field: the agent
|
|
30
|
-
* rail was REMOVED
|
|
30
|
+
* rail was REMOVED (#206 decision 2) —
|
|
31
31
|
* cross-agent clusters merge, because attribution survives on the retained
|
|
32
32
|
* absorbed-loser row and no recall path filters by source_agent. Project is
|
|
33
33
|
* one rail; `privacy` (the #332 classification, standard | confidential) is
|
|
@@ -65,7 +65,7 @@ export interface ConfidentialMarkerOptions {
|
|
|
65
65
|
/**
|
|
66
66
|
* Explicit marker key (#616 ROTATION, the CLI `--key` flag): PUT the chosen
|
|
67
67
|
* value to the server, persist it locally, then write the marker. Checked
|
|
68
|
-
* BEFORE env and config — an
|
|
68
|
+
* BEFORE env and config — an operator rotating deliberately pushes the new
|
|
69
69
|
* value, not the locally-cached old one.
|
|
70
70
|
*/
|
|
71
71
|
key?: string;
|
package/dist/consolidate.d.ts
CHANGED
|
@@ -248,11 +248,12 @@ export interface LinkCandidate {
|
|
|
248
248
|
*
|
|
249
249
|
* #602 — ADAPTIVE CLASS-SCOPED FETCH. The pre-#602 code fetched a fixed
|
|
250
250
|
* top-10 UNFILTERED window and then dropped cross-class neighbors in the
|
|
251
|
-
* loop — the #192 filtered-over-fetch defect class. Starvation math:
|
|
252
|
-
*
|
|
253
|
-
* neighbors are usually ALL standard (the classes are
|
|
254
|
-
* the majority class is
|
|
255
|
-
* under-linked — its same-class neighbors
|
|
251
|
+
* loop — the #192 filtered-over-fetch defect class. Starvation math: when
|
|
252
|
+
* the standard pool heavily outnumbers the confidential pool, a confidential
|
|
253
|
+
* memory's 10 nearest neighbors are usually ALL standard (the classes are
|
|
254
|
+
* topically distinct but the majority class is much larger), so the
|
|
255
|
+
* confidential pool systematically under-linked — its same-class neighbors
|
|
256
|
+
* never made the window. The fix
|
|
256
257
|
* escalates the window (k × 4 per step, capped at CONSOLIDATE_LINK_FETCH_MAX_K
|
|
257
258
|
* = the #192 over-fetch cap) until the window holds CONSOLIDATE_LINK_TOP_K
|
|
258
259
|
* same-class neighbors, comes back short (no more rows may exist), or hits
|
package/dist/consolidate.js
CHANGED
|
@@ -1083,11 +1083,12 @@ async function stageDomainCuration(db, llm, budget, dryRun, stateDir) {
|
|
|
1083
1083
|
*
|
|
1084
1084
|
* #602 — ADAPTIVE CLASS-SCOPED FETCH. The pre-#602 code fetched a fixed
|
|
1085
1085
|
* top-10 UNFILTERED window and then dropped cross-class neighbors in the
|
|
1086
|
-
* loop — the #192 filtered-over-fetch defect class. Starvation math:
|
|
1087
|
-
*
|
|
1088
|
-
* neighbors are usually ALL standard (the classes are
|
|
1089
|
-
* the majority class is
|
|
1090
|
-
* under-linked — its same-class neighbors
|
|
1086
|
+
* loop — the #192 filtered-over-fetch defect class. Starvation math: when
|
|
1087
|
+
* the standard pool heavily outnumbers the confidential pool, a confidential
|
|
1088
|
+
* memory's 10 nearest neighbors are usually ALL standard (the classes are
|
|
1089
|
+
* topically distinct but the majority class is much larger), so the
|
|
1090
|
+
* confidential pool systematically under-linked — its same-class neighbors
|
|
1091
|
+
* never made the window. The fix
|
|
1091
1092
|
* escalates the window (k × 4 per step, capped at CONSOLIDATE_LINK_FETCH_MAX_K
|
|
1092
1093
|
* = the #192 over-fetch cap) until the window holds CONSOLIDATE_LINK_TOP_K
|
|
1093
1094
|
* same-class neighbors, comes back short (no more rows may exist), or hits
|
package/dist/dashboard.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* /dashboard/data, GET /dashboard/field and GET /dashboard/events. The
|
|
10
10
|
* mutation surface is deliberately narrow: PUT /dashboard/model (#422),
|
|
11
11
|
* PUT /dashboard/capture-pause (#423), and PUT /dashboard/quality/verdict
|
|
12
|
-
* (#578 — the contested thumbs) — each an
|
|
12
|
+
* (#578 — the contested thumbs) — each an explicitly scoped writer, never
|
|
13
13
|
* a general write path.
|
|
14
14
|
*
|
|
15
15
|
* Layering (mirrors how recall-index.ts holds pure logic and viz.ts holds
|
|
@@ -179,16 +179,16 @@ export interface DashboardSnapshot {
|
|
|
179
179
|
}
|
|
180
180
|
/**
|
|
181
181
|
* #601 — the confidential circle's VISIBILITY block: which agents are
|
|
182
|
-
*
|
|
183
|
-
* they carry. Purely informational (the dashboard is NOT gated —
|
|
184
|
-
* content stays visible on the console by
|
|
182
|
+
* confidential-circle and, for the observed ones, how many confidential
|
|
183
|
+
* memories they carry. Purely informational (the dashboard is NOT gated —
|
|
184
|
+
* confidential content stays visible on the console by design); the page
|
|
185
185
|
* renders amber pills on circle agents, nothing on standard ones.
|
|
186
186
|
*/
|
|
187
187
|
export interface AgentCircle {
|
|
188
188
|
/** The sanitized roster (resolveConfidentialAgents — the one agent-id
|
|
189
189
|
* namespace shared with `?agent=` and identityAgents). */
|
|
190
190
|
roster: string[];
|
|
191
|
-
/** OBSERVED source_agent values (e.g. "hermes/
|
|
191
|
+
/** OBSERVED source_agent values (e.g. "hermes/atlas") that match the
|
|
192
192
|
* roster, each mapped to that agent's confidential memory count.
|
|
193
193
|
* Membership is KEY PRESENCE (a rostered agent observed with 0
|
|
194
194
|
* confidential rows is a member at 0); NULL source_agent never matches. */
|
package/dist/dashboard.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* /dashboard/data, GET /dashboard/field and GET /dashboard/events. The
|
|
11
11
|
* mutation surface is deliberately narrow: PUT /dashboard/model (#422),
|
|
12
12
|
* PUT /dashboard/capture-pause (#423), and PUT /dashboard/quality/verdict
|
|
13
|
-
* (#578 — the contested thumbs) — each an
|
|
13
|
+
* (#578 — the contested thumbs) — each an explicitly scoped writer, never
|
|
14
14
|
* a general write path.
|
|
15
15
|
*
|
|
16
16
|
* Layering (mirrors how recall-index.ts holds pure logic and viz.ts holds
|
|
@@ -1327,7 +1327,7 @@ function dashboardCapturePausePutHandler(getDb) {
|
|
|
1327
1327
|
// (the recall-precision layering law); these are the thin express adapters
|
|
1328
1328
|
// (the dashboardDataHandler convention). The GET is lazy + paginated so the
|
|
1329
1329
|
// graded data stays out of the ≤ 2 KB memory_precision block; the PUT is the
|
|
1330
|
-
// dashboard's THIRD scoped writer (
|
|
1330
|
+
// dashboard's THIRD scoped writer (manual thumbs — the calibration
|
|
1331
1331
|
// reference), after /dashboard/model and /dashboard/capture-pause.
|
|
1332
1332
|
// ---------------------------------------------------------------------------
|
|
1333
1333
|
/**
|
package/dist/db.js
CHANGED
|
@@ -860,7 +860,7 @@ const MIGRATIONS = [
|
|
|
860
860
|
// (shown-then-fetched, marked useful with zero grading calls). score +
|
|
861
861
|
// confidence are stored RAW and THRESHOLD-FREE (the #476 law —
|
|
862
862
|
// "useful" and "contested" are derived at render), verdict carries the
|
|
863
|
-
//
|
|
863
|
+
// reviewer's ±1 thumb (NULL for the 'auto' grader, derived at render). Pruned with
|
|
864
864
|
// the 90-day horizon EXCEPT grader='owner' rows.
|
|
865
865
|
//
|
|
866
866
|
// Idempotent: hasColumn-guarded ALTER (v15 pattern) + IF NOT EXISTS.
|
package/dist/graph.d.ts
CHANGED
|
@@ -51,8 +51,7 @@ export declare function confidentialNodeIds(db: Database.Database): Set<string>;
|
|
|
51
51
|
* #332: `includeConfidential` defaults to FALSE — the agent-facing surfaces
|
|
52
52
|
* (REST /graph?op=hubs without a member agent, the MCP graph tool) hard-omit
|
|
53
53
|
* confidential hubs (their content snippets ARE content-bearing). The /viz
|
|
54
|
-
* export (
|
|
55
|
-
* passes true.
|
|
54
|
+
* export (deliberately ungated, #332) passes true.
|
|
56
55
|
*/
|
|
57
56
|
export declare function detectHubs(db: Database.Database, thresholdMultiplier?: number, minLinks?: number, opts?: {
|
|
58
57
|
includeConfidential?: boolean;
|