@gamaze/hicortex 0.27.4 → 0.29.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/assets/dashboard.html +1898 -3211
- package/assets/viz.html +229 -2
- package/dist/backfill-privacy.d.ts +68 -45
- package/dist/backfill-privacy.js +236 -145
- package/dist/calibration.d.ts +67 -68
- package/dist/calibration.js +75 -78
- package/dist/capture-health.d.ts +2 -2
- package/dist/capture-health.js +2 -2
- package/dist/classification.d.ts +141 -12
- package/dist/classification.js +214 -27
- package/dist/classify-domains.d.ts +1 -1
- package/dist/classify-domains.js +2 -2
- package/dist/cli-args.d.ts +5 -3
- package/dist/cli-args.js +7 -3
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +64 -16
- package/dist/cluster.d.ts +12 -9
- package/dist/cluster.js +9 -6
- package/dist/consolidate.d.ts +93 -43
- package/dist/consolidate.js +255 -119
- package/dist/dashboard.d.ts +48 -5
- package/dist/dashboard.js +55 -3
- package/dist/db.js +27 -6
- package/dist/dedup.d.ts +2 -3
- package/dist/dedup.js +2 -3
- package/dist/distill-queue.d.ts +36 -4
- package/dist/distill-queue.js +80 -18
- package/dist/distiller.d.ts +1 -1
- package/dist/distiller.js +13 -12
- package/dist/domain-classify.d.ts +8 -9
- package/dist/domain-classify.js +6 -7
- package/dist/graph.d.ts +15 -5
- package/dist/graph.js +46 -13
- package/dist/hermes-transcript-reader.d.ts +1 -1
- package/dist/hermes-transcript-reader.js +1 -1
- package/dist/init.d.ts +30 -2
- package/dist/init.js +48 -3
- package/dist/llm.d.ts +1 -1
- package/dist/llm.js +5 -5
- package/dist/mcp-server.js +323 -59
- package/dist/memory-instructions.d.ts +2 -2
- package/dist/memory-instructions.js +2 -2
- package/dist/nightly.d.ts +1 -1
- package/dist/nightly.js +64 -5
- package/dist/nofit.d.ts +2 -2
- package/dist/nofit.js +2 -2
- package/dist/observed-agents.d.ts +54 -0
- package/dist/observed-agents.js +78 -0
- package/dist/project-canonicalize.d.ts +6 -5
- package/dist/project-canonicalize.js +6 -5
- package/dist/prompts.d.ts +29 -8
- package/dist/prompts.js +39 -16
- package/dist/quality-scoreboard.d.ts +1 -1
- package/dist/recall-hook-cli.d.ts +1 -1
- package/dist/recall-hook-cli.js +2 -2
- package/dist/recall-index.d.ts +28 -14
- package/dist/recall-index.js +22 -10
- package/dist/recall-precision.d.ts +3 -3
- package/dist/recall-precision.js +5 -4
- package/dist/reconcile-projects.d.ts +2 -2
- package/dist/reconcile-projects.js +2 -2
- package/dist/reconsolidation.d.ts +9 -2
- package/dist/reconsolidation.js +48 -31
- package/dist/relink.d.ts +2 -2
- package/dist/relink.js +4 -4
- package/dist/rescore-importance.d.ts +2 -2
- package/dist/rescore-importance.js +22 -3
- package/dist/retrieval.d.ts +14 -0
- package/dist/retrieval.js +11 -11
- package/dist/schema-prototypes.d.ts +1 -1
- package/dist/schema-prototypes.js +1 -1
- package/dist/seed-lesson.js +4 -2
- package/dist/spaces-api.d.ts +104 -0
- package/dist/spaces-api.js +193 -0
- package/dist/spaces-cli.d.ts +90 -0
- package/dist/spaces-cli.js +245 -0
- package/dist/spaces.d.ts +187 -0
- package/dist/spaces.js +360 -0
- package/dist/storage.d.ts +47 -10
- package/dist/storage.js +74 -17
- package/dist/sweep-volatile.d.ts +2 -2
- package/dist/sweep-volatile.js +2 -2
- package/dist/telemetry-cli.d.ts +1 -1
- package/dist/telemetry-cli.js +1 -1
- package/dist/type-classify.d.ts +1 -1
- package/dist/type-classify.js +1 -1
- package/dist/type-labels.d.ts +1 -1
- package/dist/type-labels.js +1 -1
- package/dist/types.d.ts +43 -20
- package/dist/wrapper-prompt.d.ts +2 -2
- package/dist/wrapper-prompt.js +2 -2
- package/opencode-plugin/hicortex/index.ts +562 -364
- package/package.json +2 -2
- package/server.json +2 -2
package/dist/type-labels.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* the old keys so a briefly-stale reader (e.g. a snapshot taken mid-migrate)
|
|
16
16
|
* renders correctly.
|
|
17
17
|
*
|
|
18
|
-
* Mapping (
|
|
18
|
+
* Mapping (the identity-reframe decision):
|
|
19
19
|
* fact → knowledge
|
|
20
20
|
* episode → experience
|
|
21
21
|
* decision → decisions
|
package/dist/types.d.ts
CHANGED
|
@@ -3,20 +3,27 @@
|
|
|
3
3
|
* Ported from the Python hicortex codebase.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
6
|
+
* The memory classification (#332), carried by `memories.privacy` and WIDENED
|
|
7
|
+
* IN PLACE by spaces (#642, no migration — values are data): the column now
|
|
8
|
+
* carries `'standard' | <configured space id>`, where the id of any space in
|
|
9
|
+
* the `spaces` config map is a legal value and 'confidential' is the
|
|
10
|
+
* LEGACY-MATERIALIZED space (confidentialAgents/confidentialPaths seed a
|
|
11
|
+
* pre-configured `confidential` space — an existing confidential-only install
|
|
12
|
+
* is the N=1 case of the same machinery, byte-for-byte). 'standard' (and
|
|
13
|
+
* NULL, the pre-v27 shape every NULL-safe predicate already reads as shared)
|
|
14
|
+
* is the FIXED shared pool, never a space id. Space ids are ONLY ever set by
|
|
15
|
+
* the server: derived at intake from per-space path patterns or member lists
|
|
16
|
+
* (deriveIntakeSpace, precedence paths → members → the confidential marker
|
|
17
|
+
* arm #614), or stamped by backfill; the client only RELAYS raw inputs, it
|
|
18
|
+
* never declares the class. The stamp is a hard gate on every agent-facing
|
|
19
|
+
* read path (absent/unknown requester sees shared only — other spaces' rows
|
|
20
|
+
* omitted, single fetch 404) and routes every LLM touch of non-shared text to
|
|
21
|
+
* the space's (or the confidential) model — never the main model. The
|
|
22
|
+
* `(string & {})` tail keeps the literal autocomplete while letting any
|
|
23
|
+
* configured id typecheck; write paths REFUSE unconfigured ids
|
|
24
|
+
* (normalizeStoredPrivacy, #642 AC-7).
|
|
18
25
|
*/
|
|
19
|
-
export type MemoryPrivacy = "standard" | "confidential";
|
|
26
|
+
export type MemoryPrivacy = "standard" | "confidential" | (string & {});
|
|
20
27
|
/** A stored memory record. */
|
|
21
28
|
export interface Memory {
|
|
22
29
|
id: string;
|
|
@@ -258,6 +265,13 @@ export interface ConsolidationReport {
|
|
|
258
265
|
* paid gain; the nightly re-settle leaves them alone.
|
|
259
266
|
*/
|
|
260
267
|
guard_skipped?: number;
|
|
268
|
+
/**
|
|
269
|
+
* #332: confidential rows held — no confidential client configured
|
|
270
|
+
* (retried next run, never the main model).
|
|
271
|
+
*/
|
|
272
|
+
skipped_confidential?: number;
|
|
273
|
+
/** #642: rows held per space id — no client for that space. */
|
|
274
|
+
skipped_spaces?: Record<string, number>;
|
|
261
275
|
};
|
|
262
276
|
reflection?: {
|
|
263
277
|
lessons_generated: number;
|
|
@@ -265,6 +279,10 @@ export interface ConsolidationReport {
|
|
|
265
279
|
failed?: boolean;
|
|
266
280
|
skipped?: boolean;
|
|
267
281
|
reason?: string;
|
|
282
|
+
/** #332: the confidential cohort held — no confidential client. */
|
|
283
|
+
confidential_skipped?: boolean;
|
|
284
|
+
/** #642: every non-shared cohort that held (space ids, incl. retired). */
|
|
285
|
+
held_spaces?: string[];
|
|
268
286
|
};
|
|
269
287
|
domain_curation?: {
|
|
270
288
|
curated: boolean;
|
|
@@ -288,6 +306,11 @@ export interface ConsolidationReport {
|
|
|
288
306
|
* base_strength halved (accelerated decay toward prune).
|
|
289
307
|
*/
|
|
290
308
|
no_association_decayed?: number;
|
|
309
|
+
/** #332: confidential rows held (no confidential client) — retried
|
|
310
|
+
* next run. */
|
|
311
|
+
held_confidential?: number;
|
|
312
|
+
/** #642: rows held per space id (no client for that space). */
|
|
313
|
+
held_spaces?: Record<string, number>;
|
|
291
314
|
reason?: string;
|
|
292
315
|
};
|
|
293
316
|
links?: {
|
|
@@ -301,7 +324,7 @@ export interface ConsolidationReport {
|
|
|
301
324
|
* Since #392 this is THE unified resolution stage: its verdict also carries
|
|
302
325
|
* a `merge` disposition, and the deterministic merge zone (pairs at/above
|
|
303
326
|
* the merge ceiling — release-managed since #408) runs inside it,
|
|
304
|
-
* LLM-free, before the scan. Since #206-B (
|
|
327
|
+
* LLM-free, before the scan. Since #206-B (decision 6) it is also
|
|
305
328
|
* the ONLY true-update detector — the standalone supersession stage
|
|
306
329
|
* (3.7, #191 Phase B) is retired into its `supersedes` verdict action,
|
|
307
330
|
* and its former `supersession` report slot no longer exists.
|
|
@@ -578,7 +601,7 @@ export interface HicortexConfig {
|
|
|
578
601
|
* example (a wider life-sphere set) ships as
|
|
579
602
|
* domains.example.json in the package root.
|
|
580
603
|
*
|
|
581
|
-
* NO fallback bucket is needed or special-cased (
|
|
604
|
+
* NO fallback bucket is needed or special-cased (spec 2026-07-07 amendment):
|
|
582
605
|
* a genuine no-fit memory gets a WEAK primary from prototype cosines when
|
|
583
606
|
* possible, else it decays toward pruning (see nofit.ts). A domain named
|
|
584
607
|
* "Unsorted" — if configured — is just a normal domain.
|
|
@@ -649,7 +672,7 @@ export interface HicortexConfig {
|
|
|
649
672
|
* path — applies to ALL phases (distill / reflect / classify / scoring) since one
|
|
650
673
|
* model serves all of them. Default false. A thinking model with thinking ON can
|
|
651
674
|
* burn the entire token budget on an unclosed <think> block and emit nothing
|
|
652
|
-
* (
|
|
675
|
+
* (observed live). When set (true or false), completeOpenAiCompat sends
|
|
653
676
|
* chat_template_kwargs:{enable_thinking}. LOCAL-ENDPOINT ONLY: this is meaningful
|
|
654
677
|
* only for a chat-template-aware server (ollama, mlx-lm). If the one model is a
|
|
655
678
|
* cloud OpenAI-compatible endpoint (OpenAI / OpenRouter / Groq / z.ai), LEAVE THIS
|
|
@@ -666,7 +689,7 @@ export interface HicortexConfig {
|
|
|
666
689
|
* with undici's hidden 5-minute header/body timers disabled, so this knob is
|
|
667
690
|
* the ONLY ceiling: a legitimate long generation is no longer abandoned
|
|
668
691
|
* client-side at 5 min while the server keeps generating for the dead
|
|
669
|
-
* client (
|
|
692
|
+
* client (a production incident's amplification mechanism). Before
|
|
670
693
|
* #337, scoring used a 600 s ceiling and the other phases 900 s; one knob
|
|
671
694
|
* now covers all four. No effect on the ollama path (already streams) or
|
|
672
695
|
* claude-cli (subprocess timeout).
|
|
@@ -768,7 +791,7 @@ export interface HicortexConfig {
|
|
|
768
791
|
memorySoftCap?: number;
|
|
769
792
|
/**
|
|
770
793
|
* The cross-project recall fence bar (#566; default 0.72 — fence ON when
|
|
771
|
-
* the key is absent
|
|
794
|
+
* the key is absent — #566 ruling). A memory from a different
|
|
772
795
|
* project than the request's must clear this bar on a measured cosine to be
|
|
773
796
|
* admitted into recall/search results; same-project and unscoped recall are
|
|
774
797
|
* unchanged. `0` or any value ≤ the recall floor (0.62) = fence off
|
|
@@ -852,8 +875,8 @@ export interface HicortexConfig {
|
|
|
852
875
|
* #332 — the confidential-circle roster: agent ids (the same sanitized id
|
|
853
876
|
* namespace as `identityAgents` / `?agent=`) whose captures are stamped
|
|
854
877
|
* `confidential` at intake (matched by `source_agent` with the first
|
|
855
|
-
* `<harness>/` segment stripped, so a Hermes profile `
|
|
856
|
-
* `hermes/
|
|
878
|
+
* `<harness>/` segment stripped, so a Hermes profile `nova` capturing as
|
|
879
|
+
* `hermes/nova` matches the roster entry `nova`) and whose read requests
|
|
857
880
|
* (the optional `agent` param on every agent-facing read path) see both
|
|
858
881
|
* pools. Absent/empty (the default) = no circle: every capture is
|
|
859
882
|
* standard, nothing is ever omitted, zero behavior change. Deploy-time
|
package/dist/wrapper-prompt.d.ts
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
* `<command-name>`/`<command-message>`/`<command-args>` (slash-command
|
|
13
13
|
* envelope), `<local-command-stdout>`, `<system-reminder>`, and
|
|
14
14
|
* `[Request interrupted…]` markers. These reach /recall-index verbatim today —
|
|
15
|
-
*
|
|
15
|
+
* a meaningful share of live pushes — inflating shown_count, burning hook latency, and
|
|
16
16
|
* polluting the Memory Precision denominator.
|
|
17
17
|
*
|
|
18
|
-
* The rule (
|
|
18
|
+
* The rule (decision 4, refinement A1 — skip ONLY pure plumbing):
|
|
19
19
|
* strip every known wrapper element, then measure PAYLOAD PROSE = the text
|
|
20
20
|
* left outside wrappers PLUS the bodies of `<result>` elements and
|
|
21
21
|
* `<agent-message>` elements (the payload channels — a subagent hand-back is
|
package/dist/wrapper-prompt.js
CHANGED
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
* `<command-name>`/`<command-message>`/`<command-args>` (slash-command
|
|
14
14
|
* envelope), `<local-command-stdout>`, `<system-reminder>`, and
|
|
15
15
|
* `[Request interrupted…]` markers. These reach /recall-index verbatim today —
|
|
16
|
-
*
|
|
16
|
+
* a meaningful share of live pushes — inflating shown_count, burning hook latency, and
|
|
17
17
|
* polluting the Memory Precision denominator.
|
|
18
18
|
*
|
|
19
|
-
* The rule (
|
|
19
|
+
* The rule (decision 4, refinement A1 — skip ONLY pure plumbing):
|
|
20
20
|
* strip every known wrapper element, then measure PAYLOAD PROSE = the text
|
|
21
21
|
* left outside wrappers PLUS the bodies of `<result>` elements and
|
|
22
22
|
* `<agent-message>` elements (the payload channels — a subagent hand-back is
|