@monoes/monomindcli 2.16.12 → 2.16.13
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/.claude/agents/core/coder.md +1 -1
- package/.claude/agents/engineering/engineering-devops-automator.md +1 -1
- package/.claude/agents/github/repo-architect.md +1 -1
- package/.claude/agents/testing/production-validator.md +1 -1
- package/.claude/agents/testing/testing-tool-evaluator.md +1 -1
- package/.claude/commands/github/pr-manager.md +1 -1
- package/.claude/helpers/pick-rank.cjs +34 -4
- package/.claude/skills/monolean-audit/SKILL.md +1 -1
- package/dist/src/commands/cleanup-data.d.ts +30 -0
- package/dist/src/commands/cleanup-data.d.ts.map +1 -0
- package/dist/src/commands/cleanup-data.js +138 -0
- package/dist/src/commands/cleanup-data.js.map +1 -0
- package/dist/src/commands/cleanup-scratch.d.ts +43 -0
- package/dist/src/commands/cleanup-scratch.d.ts.map +1 -0
- package/dist/src/commands/cleanup-scratch.js +125 -0
- package/dist/src/commands/cleanup-scratch.js.map +1 -0
- package/dist/src/commands/cleanup.d.ts +2 -39
- package/dist/src/commands/cleanup.d.ts.map +1 -1
- package/dist/src/commands/cleanup.js +5 -247
- package/dist/src/commands/cleanup.js.map +1 -1
- package/dist/src/commands/doctor-gitignore-checks.d.ts +10 -0
- package/dist/src/commands/doctor-gitignore-checks.d.ts.map +1 -0
- package/dist/src/commands/doctor-gitignore-checks.js +141 -0
- package/dist/src/commands/doctor-gitignore-checks.js.map +1 -0
- package/dist/src/commands/doctor-helpers-checks.d.ts +10 -0
- package/dist/src/commands/doctor-helpers-checks.d.ts.map +1 -0
- package/dist/src/commands/doctor-helpers-checks.js +292 -0
- package/dist/src/commands/doctor-helpers-checks.js.map +1 -0
- package/dist/src/commands/doctor-memory-checks.d.ts +47 -0
- package/dist/src/commands/doctor-memory-checks.d.ts.map +1 -0
- package/dist/src/commands/doctor-memory-checks.js +298 -0
- package/dist/src/commands/doctor-memory-checks.js.map +1 -0
- package/dist/src/commands/doctor-monograph-checks.d.ts +9 -0
- package/dist/src/commands/doctor-monograph-checks.d.ts.map +1 -0
- package/dist/src/commands/doctor-monograph-checks.js +331 -0
- package/dist/src/commands/doctor-monograph-checks.js.map +1 -0
- package/dist/src/commands/doctor-project-checks.d.ts +7 -66
- package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor-project-checks.js +10 -1331
- package/dist/src/commands/doctor-project-checks.js.map +1 -1
- package/dist/src/commands/doctor-routing-checks.d.ts +10 -0
- package/dist/src/commands/doctor-routing-checks.d.ts.map +1 -0
- package/dist/src/commands/doctor-routing-checks.js +194 -0
- package/dist/src/commands/doctor-routing-checks.js.map +1 -0
- package/dist/src/commands/doctor-worker-checks.d.ts +17 -0
- package/dist/src/commands/doctor-worker-checks.d.ts.map +1 -0
- package/dist/src/commands/doctor-worker-checks.js +122 -0
- package/dist/src/commands/doctor-worker-checks.js.map +1 -0
- package/dist/src/commands/hooks-routing-commands.js +1 -1
- package/dist/src/commands/hooks-routing-commands.js.map +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +6 -15
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/index.js +2 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/init/never-commit.d.ts +3 -3
- package/dist/src/init/types.d.ts +1 -1
- package/dist/src/init/types.js +1 -1
- package/dist/src/knowledge/document-store.js +1 -1
- package/dist/src/knowledge/document-store.js.map +1 -1
- package/dist/src/mcp-tools/hooks-edit-command.d.ts +10 -0
- package/dist/src/mcp-tools/hooks-edit-command.d.ts.map +1 -0
- package/dist/src/mcp-tools/hooks-edit-command.js +247 -0
- package/dist/src/mcp-tools/hooks-edit-command.js.map +1 -0
- package/dist/src/mcp-tools/hooks-learning.d.ts +9 -0
- package/dist/src/mcp-tools/hooks-learning.d.ts.map +1 -0
- package/dist/src/mcp-tools/hooks-learning.js +408 -0
- package/dist/src/mcp-tools/hooks-learning.js.map +1 -0
- package/dist/src/mcp-tools/hooks-metrics-list.d.ts +8 -0
- package/dist/src/mcp-tools/hooks-metrics-list.d.ts.map +1 -0
- package/dist/src/mcp-tools/hooks-metrics-list.js +205 -0
- package/dist/src/mcp-tools/hooks-metrics-list.js.map +1 -0
- package/dist/src/mcp-tools/hooks-route.d.ts +12 -0
- package/dist/src/mcp-tools/hooks-route.d.ts.map +1 -0
- package/dist/src/mcp-tools/hooks-route.js +251 -0
- package/dist/src/mcp-tools/hooks-route.js.map +1 -0
- package/dist/src/mcp-tools/hooks-routing.d.ts +6 -27
- package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.js +6 -1727
- package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
- package/dist/src/mcp-tools/hooks-session.d.ts +9 -0
- package/dist/src/mcp-tools/hooks-session.d.ts.map +1 -0
- package/dist/src/mcp-tools/hooks-session.js +243 -0
- package/dist/src/mcp-tools/hooks-session.js.map +1 -0
- package/dist/src/mcp-tools/hooks-task.d.ts +17 -0
- package/dist/src/mcp-tools/hooks-task.d.ts.map +1 -0
- package/dist/src/mcp-tools/hooks-task.js +427 -0
- package/dist/src/mcp-tools/hooks-task.js.map +1 -0
- package/dist/src/mcp-tools/hooks-tools.d.ts +2 -1
- package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +2 -1
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +1 -1
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/memory/bm25-index.d.ts +2 -2
- package/dist/src/memory/bm25-index.js +2 -2
- package/dist/src/memory/embedding-operations.js +2 -2
- package/dist/src/memory/embedding-operations.js.map +1 -1
- package/dist/src/memory/entity-name-key.d.ts +1 -1
- package/dist/src/memory/entity-name-key.js +1 -1
- package/dist/src/memory/hnsw-operations.d.ts +1 -1
- package/dist/src/memory/hnsw-operations.js +1 -1
- package/dist/src/memory/memory-bridge-backend.d.ts +43 -0
- package/dist/src/memory/memory-bridge-backend.d.ts.map +1 -0
- package/dist/src/memory/memory-bridge-backend.js +363 -0
- package/dist/src/memory/memory-bridge-backend.js.map +1 -0
- package/dist/src/memory/memory-bridge-core.d.ts +42 -0
- package/dist/src/memory/memory-bridge-core.d.ts.map +1 -0
- package/dist/src/memory/memory-bridge-core.js +126 -0
- package/dist/src/memory/memory-bridge-core.js.map +1 -0
- package/dist/src/memory/memory-bridge-entries.d.ts +131 -0
- package/dist/src/memory/memory-bridge-entries.d.ts.map +1 -0
- package/dist/src/memory/memory-bridge-entries.js +227 -0
- package/dist/src/memory/memory-bridge-entries.js.map +1 -0
- package/dist/src/memory/memory-bridge-feedback.d.ts +60 -0
- package/dist/src/memory/memory-bridge-feedback.d.ts.map +1 -0
- package/dist/src/memory/memory-bridge-feedback.js +118 -0
- package/dist/src/memory/memory-bridge-feedback.js.map +1 -0
- package/dist/src/memory/memory-bridge-paths.d.ts +123 -0
- package/dist/src/memory/memory-bridge-paths.d.ts.map +1 -0
- package/dist/src/memory/memory-bridge-paths.js +335 -0
- package/dist/src/memory/memory-bridge-paths.js.map +1 -0
- package/dist/src/memory/memory-bridge-search.d.ts +48 -0
- package/dist/src/memory/memory-bridge-search.d.ts.map +1 -0
- package/dist/src/memory/memory-bridge-search.js +383 -0
- package/dist/src/memory/memory-bridge-search.js.map +1 -0
- package/dist/src/memory/memory-bridge-sessions.d.ts +38 -0
- package/dist/src/memory/memory-bridge-sessions.d.ts.map +1 -0
- package/dist/src/memory/memory-bridge-sessions.js +109 -0
- package/dist/src/memory/memory-bridge-sessions.js.map +1 -0
- package/dist/src/memory/memory-bridge-store.d.ts +58 -0
- package/dist/src/memory/memory-bridge-store.d.ts.map +1 -0
- package/dist/src/memory/memory-bridge-store.js +201 -0
- package/dist/src/memory/memory-bridge-store.js.map +1 -0
- package/dist/src/memory/memory-bridge.d.ts +10 -438
- package/dist/src/memory/memory-bridge.d.ts.map +1 -1
- package/dist/src/memory/memory-bridge.js +14 -1787
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/memory-kg-claims.d.ts +52 -0
- package/dist/src/memory/memory-kg-claims.d.ts.map +1 -0
- package/dist/src/memory/memory-kg-claims.js +99 -0
- package/dist/src/memory/memory-kg-claims.js.map +1 -0
- package/dist/src/memory/memory-kg-index.d.ts +86 -0
- package/dist/src/memory/memory-kg-index.d.ts.map +1 -0
- package/dist/src/memory/memory-kg-index.js +256 -0
- package/dist/src/memory/memory-kg-index.js.map +1 -0
- package/dist/src/memory/memory-kg-ingest.d.ts +44 -0
- package/dist/src/memory/memory-kg-ingest.d.ts.map +1 -0
- package/dist/src/memory/memory-kg-ingest.js +361 -0
- package/dist/src/memory/memory-kg-ingest.js.map +1 -0
- package/dist/src/memory/memory-kg-model.d.ts +168 -0
- package/dist/src/memory/memory-kg-model.d.ts.map +1 -0
- package/dist/src/memory/memory-kg-model.js +158 -0
- package/dist/src/memory/memory-kg-model.js.map +1 -0
- package/dist/src/memory/memory-kg-names.d.ts +64 -0
- package/dist/src/memory/memory-kg-names.d.ts.map +1 -0
- package/dist/src/memory/memory-kg-names.js +187 -0
- package/dist/src/memory/memory-kg-names.js.map +1 -0
- package/dist/src/memory/memory-kg-promote.d.ts +79 -0
- package/dist/src/memory/memory-kg-promote.d.ts.map +1 -0
- package/dist/src/memory/memory-kg-promote.js +248 -0
- package/dist/src/memory/memory-kg-promote.js.map +1 -0
- package/dist/src/memory/memory-kg-rebuild.d.ts +77 -0
- package/dist/src/memory/memory-kg-rebuild.d.ts.map +1 -0
- package/dist/src/memory/memory-kg-rebuild.js +299 -0
- package/dist/src/memory/memory-kg-rebuild.js.map +1 -0
- package/dist/src/memory/memory-kg-rollback.d.ts +47 -0
- package/dist/src/memory/memory-kg-rollback.d.ts.map +1 -0
- package/dist/src/memory/memory-kg-rollback.js +193 -0
- package/dist/src/memory/memory-kg-rollback.js.map +1 -0
- package/dist/src/memory/memory-kg-rules.d.ts +64 -0
- package/dist/src/memory/memory-kg-rules.d.ts.map +1 -0
- package/dist/src/memory/memory-kg-rules.js +251 -0
- package/dist/src/memory/memory-kg-rules.js.map +1 -0
- package/dist/src/memory/memory-kg-scan.d.ts +118 -0
- package/dist/src/memory/memory-kg-scan.d.ts.map +1 -0
- package/dist/src/memory/memory-kg-scan.js +209 -0
- package/dist/src/memory/memory-kg-scan.js.map +1 -0
- package/dist/src/memory/memory-kg-search.d.ts +80 -0
- package/dist/src/memory/memory-kg-search.d.ts.map +1 -0
- package/dist/src/memory/memory-kg-search.js +239 -0
- package/dist/src/memory/memory-kg-search.js.map +1 -0
- package/dist/src/memory/memory-kg.d.ts +19 -547
- package/dist/src/memory/memory-kg.d.ts.map +1 -1
- package/dist/src/memory/memory-kg.js +10 -2389
- package/dist/src/memory/memory-kg.js.map +1 -1
- package/dist/src/ui/org-hil.mjs +1 -1
- package/dist/src/ui/routes-org-agents.mjs +318 -0
- package/dist/src/ui/routes-org-approvals.mjs +133 -0
- package/dist/src/ui/routes-org-config.mjs +459 -0
- package/dist/src/ui/routes-org-control.mjs +300 -0
- package/dist/src/ui/routes-org-files.mjs +172 -0
- package/dist/src/ui/routes-org-helpers.mjs +84 -0
- package/dist/src/ui/routes-org-knowledge.mjs +262 -0
- package/dist/src/ui/routes-org-lifecycle.mjs +224 -0
- package/dist/src/ui/routes-org-live.mjs +278 -0
- package/dist/src/ui/routes-org-mastermind.mjs +346 -0
- package/dist/src/ui/routes-org-planning.mjs +398 -0
- package/dist/src/ui/routes-org-runs.mjs +430 -0
- package/dist/src/ui/routes-org-status.mjs +342 -0
- package/dist/src/ui/routes-org-workflows.mjs +212 -0
- package/dist/src/ui/routes-org.mjs +26 -3847
- package/dist/src/ui/server.mjs +1 -1
- package/dist/src/utils/native-error.d.ts +1 -1
- package/dist/src/utils/native-error.js +1 -1
- package/dist/src/utils/paths.d.ts +2 -1
- package/dist/src/utils/paths.d.ts.map +1 -1
- package/dist/src/utils/paths.js +2 -1
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/org-skills/adversarial-reviewer/SKILL.md +1 -1
- package/org-skills/board-deck-builder/SKILL.md +1 -1
- package/org-skills/code-reviewer/SKILL.md +1 -1
- package/org-skills/debugging-wizard/SKILL.md +1 -1
- package/org-skills/scientific-thinking-literature-review/SKILL.md +1 -1
- package/org-skills/scientific-thinking-scholar-evaluation/SKILL.md +1 -1
- package/package.json +8 -8
|
@@ -88,553 +88,25 @@
|
|
|
88
88
|
*
|
|
89
89
|
* @module v1/cli/memory/memory-kg
|
|
90
90
|
*/
|
|
91
|
-
|
|
92
|
-
export
|
|
93
|
-
export
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
export
|
|
98
|
-
|
|
99
|
-
export
|
|
100
|
-
|
|
101
|
-
export
|
|
102
|
-
|
|
103
|
-
export
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
* miss path rather than a migration.
|
|
111
|
-
*
|
|
112
|
-
* Version 1 was the name-only scheme (`n:<normalized-name>`, truncated to 200
|
|
113
|
-
* characters), under which `Person:Alex` and `Service:Alex` were one entity and
|
|
114
|
-
* two names first differing at character 250 were one entity.
|
|
115
|
-
*/
|
|
116
|
-
export declare const KG_ID_VERSION = 2;
|
|
117
|
-
/** Mint an entity id from the full identity tuple.
|
|
118
|
-
*
|
|
119
|
-
* This MINTS; it does not RESOLVE. A caller that computes an id and writes to
|
|
120
|
-
* it bypasses the name index and re-forks the entities the index exists to
|
|
121
|
-
* keep together — every ingest path goes through `resolveEntity` instead. */
|
|
122
|
-
export declare function nodeKey(type: string, name: string): string;
|
|
123
|
-
export interface KgNodeInput {
|
|
124
|
-
name: string;
|
|
125
|
-
/** Basic type, cognee-style ("Person", "Tool", "Service") — not over-specific. */
|
|
126
|
-
type?: string;
|
|
127
|
-
description?: string;
|
|
128
|
-
nodeSet?: string;
|
|
129
|
-
}
|
|
130
|
-
export interface KgEdgeInput {
|
|
131
|
-
source: string;
|
|
132
|
-
target: string;
|
|
133
|
-
/** snake_case relation name. */
|
|
134
|
-
relation: string;
|
|
135
|
-
/** One-sentence concrete fact using the endpoint names. */
|
|
136
|
-
description?: string;
|
|
137
|
-
sourceType?: string;
|
|
138
|
-
targetType?: string;
|
|
139
|
-
}
|
|
140
|
-
export interface KgIngestResult {
|
|
141
|
-
success: boolean;
|
|
142
|
-
nodesAdded: number;
|
|
143
|
-
nodesMerged: number;
|
|
144
|
-
edgesAdded: number;
|
|
145
|
-
edgesMerged: number;
|
|
146
|
-
/** Writes the bridge refused, one message each (capped at MAX_FAILURES).
|
|
147
|
-
* Non-empty ⇒ `success` is false and the counters describe only what
|
|
148
|
-
* actually persisted. */
|
|
149
|
-
failures?: string[];
|
|
150
|
-
error?: string;
|
|
151
|
-
/** Items the payload asked for that this call refused. Present only when
|
|
152
|
-
* non-zero, so a caller who sent a clean payload sees a clean result. */
|
|
153
|
-
nodesRejected?: number;
|
|
154
|
-
edgesRejected?: number;
|
|
155
|
-
/** Items dropped because the payload exceeded the per-call cap. The cap has
|
|
156
|
-
* not changed; what has changed is that it is now REPORTED instead of being
|
|
157
|
-
* a silent `.slice()`. */
|
|
158
|
-
nodesTruncated?: number;
|
|
159
|
-
edgesTruncated?: number;
|
|
160
|
-
/** Why items were rejected, one message each (capped at MAX_FAILURES). */
|
|
161
|
-
rejections?: string[];
|
|
162
|
-
/** Endpoint entities created because an edge named them and they did not
|
|
163
|
-
* exist. Edge-only ingestion used to succeed with zero nodes and one edge,
|
|
164
|
-
* leaving a fact unreachable through both of its own endpoints. */
|
|
165
|
-
placeholders?: number;
|
|
166
|
-
/** Same-name entities this call did NOT merge with, one message each. A
|
|
167
|
-
* same-name match is a CANDIDATE, not a merge. */
|
|
168
|
-
ambiguities?: string[];
|
|
169
|
-
/** Elements whose support ledger hit `MAX_CLAIMS` on this call, so their
|
|
170
|
-
* oldest provenance was dropped. Never silent. */
|
|
171
|
-
provenanceTruncated?: number;
|
|
172
|
-
}
|
|
173
|
-
/** cognee DataPoint normalization: lowercase, spaces→_, strip apostrophes. */
|
|
174
|
-
export declare function normalizeName(name: string): string;
|
|
175
|
-
/** Who owns a set of graph facts. `org` absent = project-shared knowledge. */
|
|
176
|
-
export interface KgScope {
|
|
177
|
-
org?: string;
|
|
178
|
-
}
|
|
179
|
-
export interface KgNamespaces {
|
|
180
|
-
nodes: string;
|
|
181
|
-
edges: string;
|
|
182
|
-
rules: string;
|
|
183
|
-
/** Name → entity index backing `resolveEntity`. Holds no claims. */
|
|
184
|
-
names: string;
|
|
185
|
-
/** Derived adjacency index: entity id -> edge keys touching it (K7). Holds
|
|
186
|
-
* no claims either — every entry is rebuildable from `edges`. */
|
|
187
|
-
adj: string;
|
|
188
|
-
/** Derived origin-support index: origin ref -> {ns,key} refs it supports,
|
|
189
|
-
* across nodes/edges/rules (K7). Rebuildable from all three. */
|
|
190
|
-
originIdx: string;
|
|
191
|
-
/** This scope's derived-index build/readiness state (K7). One row. */
|
|
192
|
-
indexStatus: string;
|
|
193
|
-
}
|
|
194
|
-
/** The namespaces a scope owns. Every read and write in this module resolves
|
|
195
|
-
* through here, which is what makes ownership enforced rather than advisory:
|
|
196
|
-
* there is no code path that reaches an org's facts without naming that org,
|
|
197
|
-
* and none that reaches every org at once. */
|
|
198
|
-
export declare function kgNamespaces(scope?: KgScope): KgNamespaces;
|
|
199
|
-
/** Stamp the asserting org onto a provenance ref, so a claim's origin says WHO
|
|
200
|
-
* asserted it and not merely which run id — `run:m4x2` alone is ambiguous
|
|
201
|
-
* across orgs, and a promoted claim in the shared graph would otherwise carry
|
|
202
|
-
* an origin no one owns.
|
|
203
|
-
*
|
|
204
|
-
* Applied by the ingest/rollback entry points rather than by callers: a
|
|
205
|
-
* caller that forgets is exactly how ownership stopped being enforced. */
|
|
206
|
-
export declare function kgQualifyOrigin(originRef: string, scope?: KgScope): string;
|
|
207
|
-
/** How a claim came to exist.
|
|
208
|
-
*
|
|
209
|
-
* `asserted` — someone stated it: an LLM distillation, an explicit
|
|
210
|
-
* `memory_kg_ingest`, an org's `org_learn`.
|
|
211
|
-
* `heuristic` — `heuristicExtract` inferred it from two names appearing in one
|
|
212
|
-
* sentence. Nobody asserted it, and the module header has always called it
|
|
213
|
-
* lower-trust; until now nothing downstream could tell the two apart. */
|
|
214
|
-
export type KgExtractionMethod = 'asserted' | 'heuristic';
|
|
215
|
-
/** One origin's assertion about an element. An origin re-asserting replaces its
|
|
216
|
-
* own contribution — a run stands behind its latest word, not its first. */
|
|
217
|
-
export interface KgClaim {
|
|
218
|
-
origin: string;
|
|
219
|
-
description: string;
|
|
220
|
-
/** Assertion time, and the ordering that decides which claim is current. */
|
|
221
|
-
at: number;
|
|
222
|
-
/** Absent on rows written before extraction method was recorded. Absent means
|
|
223
|
-
* UNKNOWN, never `asserted` — defaulting an unrecorded method to the higher
|
|
224
|
-
* trust would relabel every old co-occurrence guess as a stated fact. */
|
|
225
|
-
method?: KgExtractionMethod;
|
|
226
|
-
}
|
|
227
|
-
/** An entity the name index knows about. */
|
|
228
|
-
export interface KgNameCandidate {
|
|
229
|
-
id: string;
|
|
230
|
-
/** Identity-bearing type bucket; '' for an entity asserted without a type. */
|
|
231
|
-
type: string;
|
|
232
|
-
}
|
|
233
|
-
/** Merge extracted nodes/edges into the KG.
|
|
234
|
-
*
|
|
235
|
-
* Identity is the (type, name) tuple resolved through the name index, so an
|
|
236
|
-
* entity is idempotent under re-extraction but two different things sharing a
|
|
237
|
-
* name stay two things. Each write adds this origin's CONTRIBUTION to the
|
|
238
|
-
* element's claim ledger, from which the description and `origin_refs` are
|
|
239
|
-
* derived — which is what lets a later ingest correct an earlier one and lets
|
|
240
|
-
* rollback put the earlier one back.
|
|
241
|
-
*
|
|
242
|
-
* The COMPLETE payload is validated before anything is written, and every edge
|
|
243
|
-
* endpoint is made to exist (as a placeholder entity when the caller named one
|
|
244
|
-
* that does not) before the edge lands. An edge whose endpoint could not be
|
|
245
|
-
* created is rejected rather than written: retrieval is seeded from nodes, so
|
|
246
|
-
* an edge with a missing endpoint is a fact that cannot be found through
|
|
247
|
-
* either of the things it is about.
|
|
248
|
-
*
|
|
249
|
-
* NOT ATOMIC — the memory bridge has no transaction primitive, so a failure
|
|
250
|
-
* part-way through leaves earlier writes persisted. The counters therefore
|
|
251
|
-
* report only what actually landed, `failures` lists what did not, and
|
|
252
|
-
* `success` is false whenever anything was refused. A partial ingest is safe
|
|
253
|
-
* to retry: every write is a keyed upsert. */
|
|
254
|
-
export declare function kgIngest(options: {
|
|
255
|
-
nodes: KgNodeInput[];
|
|
256
|
-
edges?: KgEdgeInput[];
|
|
257
|
-
/** Provenance: run id, session id, or doc hash this extraction came from.
|
|
258
|
-
* Stored qualified by `scope` — see `kgQualifyOrigin`. */
|
|
259
|
-
originRef: string;
|
|
260
|
-
/** Owner of these facts. Omit for project-shared knowledge. */
|
|
261
|
-
scope?: KgScope;
|
|
262
|
-
/** How this payload was produced. Defaults to `asserted`; `heuristicExtract`
|
|
263
|
-
* callers must pass `heuristic` so a co-occurrence guess is not stored as a
|
|
264
|
-
* stated fact. Recorded per origin, so the same element can hold a heuristic
|
|
265
|
-
* claim from one run and an asserted one from another. */
|
|
266
|
-
method?: KgExtractionMethod;
|
|
267
|
-
dbPath?: string;
|
|
268
|
-
}): Promise<KgIngestResult>;
|
|
269
|
-
export interface RuleVerdict {
|
|
270
|
-
rule: string;
|
|
271
|
-
/** `failed` — the candidate was fine, but a write the caller was told about
|
|
272
|
-
* did not land. It is neither `invalid` (which blames the caller's input)
|
|
273
|
-
* nor `accepted`/`already_known` (which claim the graph now holds it). Both
|
|
274
|
-
* of those used to be reported unconditionally, so a caller reading verdicts
|
|
275
|
-
* saw every rule land while the aggregate `accepted` count said zero. */
|
|
276
|
-
verdict: 'accepted' | 'already_known' | 'invalid' | 'failed';
|
|
277
|
-
similarTo?: string;
|
|
278
|
-
}
|
|
279
|
-
/** Stage-2 of cognee's curator/writer distillation: the CALLER (an LLM agent)
|
|
280
|
-
* proposes candidate rules; this accepts each unless a semantically
|
|
281
|
-
* near-identical rule exists (embedding dedup — deterministic keys can't
|
|
282
|
-
* collapse paraphrases). Accepted rules are stored both as KG nodes
|
|
283
|
-
* (node_set=rules) and as plain `rules`-namespace entries so the existing
|
|
284
|
-
* injection/search surfaces pick them up with zero new plumbing.
|
|
285
|
-
*
|
|
286
|
-
* A candidate that dedups against an existing rule still ADDS its origin to
|
|
287
|
-
* that rule's support set: two independent runs asserting the same rule mean
|
|
288
|
-
* the rule survives either one being rolled back. Dropping the second origin
|
|
289
|
-
* (as this used to) made rollback of the FIRST run delete knowledge the
|
|
290
|
-
* second run independently vouched for.
|
|
291
|
-
*
|
|
292
|
-
* Like `kgIngest`, NOT atomic — see that function's note. */
|
|
293
|
-
export declare function kgIngestRules(options: {
|
|
294
|
-
rules: {
|
|
295
|
-
rule: string;
|
|
296
|
-
context?: string;
|
|
297
|
-
}[];
|
|
298
|
-
originRef: string;
|
|
299
|
-
/** Owner of these rules. Omit for project-shared knowledge. */
|
|
300
|
-
scope?: KgScope;
|
|
301
|
-
dbPath?: string;
|
|
302
|
-
/** Similarity above which a candidate is already_known (default 0.78 —
|
|
303
|
-
* MiniLM paraphrases of the same rule commonly land 0.78-0.9; cognee's
|
|
304
|
-
* equivalent control is prompt-injected LLM judgment, which we approximate). */
|
|
305
|
-
dedupThreshold?: number;
|
|
306
|
-
}): Promise<{
|
|
307
|
-
success: boolean;
|
|
308
|
-
verdicts: RuleVerdict[];
|
|
309
|
-
accepted: number;
|
|
310
|
-
failures?: string[];
|
|
311
|
-
error?: string;
|
|
312
|
-
/** Candidates dropped by the per-call cap, reported rather than sliced away
|
|
313
|
-
* in silence. */
|
|
314
|
-
rulesTruncated?: number;
|
|
315
|
-
}>;
|
|
316
|
-
/** List stored rules (for injection or review). */
|
|
317
|
-
export declare function kgListRules(options?: {
|
|
318
|
-
dbPath?: string;
|
|
319
|
-
limit?: number;
|
|
320
|
-
scope?: KgScope;
|
|
321
|
-
}): Promise<{
|
|
322
|
-
rule: string;
|
|
323
|
-
key: string;
|
|
324
|
-
}[]>;
|
|
325
|
-
export interface KgSearchResult {
|
|
326
|
-
success: boolean;
|
|
327
|
-
/** Rendered triplet lines, best first. */
|
|
328
|
-
context: string;
|
|
329
|
-
triplets: {
|
|
330
|
-
source: string;
|
|
331
|
-
relation: string;
|
|
332
|
-
target: string;
|
|
333
|
-
fact: string;
|
|
334
|
-
score: number;
|
|
335
|
-
/** How this edge came to exist. Absent means the edge predates method
|
|
336
|
-
* recording — not recorded, which is not the same as `asserted`. */
|
|
337
|
-
method?: KgExtractionMethod;
|
|
338
|
-
/** Live origins disagree about what this edge says. Present only when true. */
|
|
339
|
-
conflict?: boolean;
|
|
340
|
-
/** The edge's bridge entry id — feed this straight to `memory_feedback`
|
|
341
|
-
* (`bridgeApplyFeedback`/`bridgeRecordUsage`) to rate THIS relationship
|
|
342
|
-
* directly, rather than only the seed entity that surfaced it (K5). */
|
|
343
|
-
id: string;
|
|
344
|
-
/** The edge's stable graph key (`e:<hash>`, see `edgeKey`), for direct
|
|
345
|
-
* `bridgeGetEntry` lookup or diagnostics — distinct from `id` above. */
|
|
346
|
-
key: string;
|
|
347
|
-
}[];
|
|
348
|
-
seeds: {
|
|
349
|
-
name: string;
|
|
350
|
-
type: string;
|
|
351
|
-
description: string;
|
|
352
|
-
score: number;
|
|
353
|
-
id: string;
|
|
354
|
-
}[];
|
|
355
|
-
/** True when the edge scan did NOT cover the whole namespace — the scan hit
|
|
356
|
-
* `SEARCH_EDGE_SCAN_MAX`, or the backend became unreadable partway. A
|
|
357
|
-
* relationship that exists may be missing from `triplets`; absence here is
|
|
358
|
-
* not evidence of absence in the graph. */
|
|
359
|
-
truncated?: boolean;
|
|
360
|
-
/** Edge rows actually read, so a caller can see how close it ran to the cap. */
|
|
361
|
-
scannedEdges?: number;
|
|
362
|
-
/** What the seed retrieval ACTUALLY ran, straight from the bridge — never what
|
|
363
|
-
* was hoped for. `keyword-fallback` means the vector path was tried and did
|
|
364
|
-
* not serve these results. Absent only when the bridge reported nothing. */
|
|
365
|
-
method?: 'semantic' | 'keyword' | 'keyword-fallback';
|
|
366
|
-
/** Why the vector path did not serve the seeds (absent when it did). */
|
|
367
|
-
fallbackReason?: string;
|
|
368
|
-
error?: string;
|
|
369
|
-
}
|
|
370
|
-
/** Seeded retrieval → neighborhood → triplet ranking (cognee's brute-force
|
|
371
|
-
* triplet search, scaled down). Seed scores already carry the Phase 1 feedback
|
|
372
|
-
* blend, and the seed retrieval may be vector or keyword — `method` on the
|
|
373
|
-
* result says which actually ran.
|
|
374
|
-
*
|
|
375
|
-
* Ranking weighs exactly two evidence signals, both read off the claim ledger:
|
|
376
|
-
* extraction method and description conflict. It deliberately does NOT model
|
|
377
|
-
* source credibility, claim freshness, or whether the relation itself answers
|
|
378
|
-
* the query — those need an evaluation set to tune against, and guessing at
|
|
379
|
-
* them would be the same overclaim this weighting exists to correct. */
|
|
380
|
-
export declare function kgSearch(options: {
|
|
381
|
-
query: string;
|
|
382
|
-
dbPath?: string;
|
|
383
|
-
limit?: number;
|
|
384
|
-
nodeSet?: string;
|
|
385
|
-
/** Whose graph to search. Omit for project-shared knowledge; a scoped search
|
|
386
|
-
* never reaches another org's facts, and never the shared graph either. */
|
|
387
|
-
scope?: KgScope;
|
|
388
|
-
}): Promise<KgSearchResult>;
|
|
389
|
-
export declare function kgGlossary(options?: {
|
|
390
|
-
dbPath?: string;
|
|
391
|
-
limit?: number;
|
|
392
|
-
/** Whose entity names to offer. The coordinator glossary MUST be scoped:
|
|
393
|
-
* suggesting another org's entity names is how one org's claims get merged
|
|
394
|
-
* into another's graph under a shared name. */
|
|
395
|
-
scope?: KgScope;
|
|
396
|
-
}): Promise<string[]>;
|
|
397
|
-
/** Withdraw `originRef`'s support from the graph: remove it from every
|
|
398
|
-
* node/edge/rule it backs, and delete the element once no origin remains.
|
|
399
|
-
*
|
|
400
|
-
* The withdrawn ref is REWRITTEN out of the surviving elements' origin lists,
|
|
401
|
-
* not left behind. Retaining it (as this used to) meant a second rollback saw
|
|
402
|
-
* a two-entry list and retained again — so an element could outlive the
|
|
403
|
-
* withdrawal of every origin that ever supported it.
|
|
404
|
-
*
|
|
405
|
-
* The scan is EXHAUSTIVE: it pages each namespace to the end rather than
|
|
406
|
-
* reading one capped list. A capped scan let an element past the cap keep a
|
|
407
|
-
* withdrawn origin while the caller was told the rollback succeeded.
|
|
408
|
-
*
|
|
409
|
-
* Collect-then-mutate is deliberate: deleting a row pulls every later row back
|
|
410
|
-
* one position, so a delete inside the page loop would make an advancing
|
|
411
|
-
* offset skip whatever slid into the gap. (Rewrites are no longer a hazard —
|
|
412
|
-
* the bridge's upsert reuses the existing entry id and preserves `createdAt`
|
|
413
|
-
* rather than re-inserting at the head of the default ordering — but this
|
|
414
|
-
* function deletes as well as rewrites.) Only origin-carrying entries are
|
|
415
|
-
* retained during the scan, so memory tracks the rollback's own footprint, not
|
|
416
|
-
* the namespace size. */
|
|
417
|
-
export declare function kgRollback(options: {
|
|
418
|
-
originRef: string;
|
|
419
|
-
/** Whose knowledge to withdraw from. A rollback can only reach the named
|
|
420
|
-
* scope's namespaces — an org's rollback is an ownership boundary, not just
|
|
421
|
-
* a label on the output. */
|
|
422
|
-
scope?: KgScope;
|
|
423
|
-
dbPath?: string;
|
|
424
|
-
}): Promise<{
|
|
425
|
-
success: boolean;
|
|
426
|
-
deleted: number;
|
|
427
|
-
retained: number;
|
|
428
|
-
failures?: string[];
|
|
429
|
-
error?: string;
|
|
430
|
-
/** Edges deleted because this rollback removed an endpoint they name. A
|
|
431
|
-
* relation between two things is not a fact once one of them is gone, and
|
|
432
|
-
* retrieval is node-seeded, so leaving them behind left unreachable rows
|
|
433
|
-
* claiming a graph that no longer exists. */
|
|
434
|
-
danglingEdgesRemoved?: number;
|
|
435
|
-
}>;
|
|
436
|
-
export interface KgPromoteResult {
|
|
437
|
-
success: boolean;
|
|
438
|
-
nodes: number;
|
|
439
|
-
edges: number;
|
|
440
|
-
rules: number;
|
|
441
|
-
/** Origin the shared copy carries, so the promotion can be withdrawn on its
|
|
442
|
-
* own and the shared graph records who shared the claim. */
|
|
443
|
-
promotedAs: string;
|
|
444
|
-
failures?: string[];
|
|
445
|
-
error?: string;
|
|
446
|
-
}
|
|
447
|
-
/** Copy one origin's claims out of an org's scope into project-shared
|
|
448
|
-
* knowledge.
|
|
449
|
-
*
|
|
450
|
-
* Sharing is deliberate, never a side effect of learning: `kgIngest` under a
|
|
451
|
-
* scope only ever writes that org's namespaces, and this is the one path a
|
|
452
|
-
* claim takes across the boundary. The org keeps its own copy untouched — the
|
|
453
|
-
* shared copy is an INDEPENDENT assertion under `promoted:<org-ref>`, so
|
|
454
|
-
* rolling back either side leaves the other standing, and a shared claim
|
|
455
|
-
* always names the org that vouched for it.
|
|
456
|
-
*
|
|
457
|
-
* Like ingest, NOT atomic: the counters report what actually landed. */
|
|
458
|
-
export declare function kgPromote(options: {
|
|
459
|
-
/** The org-side ref to promote, unqualified (e.g. `run:m4x2`). */
|
|
460
|
-
originRef: string;
|
|
461
|
-
/** Owner the claims are promoted FROM. Promoting from the shared scope is a
|
|
462
|
-
* no-op and is refused rather than silently duplicating. */
|
|
463
|
-
from: KgScope;
|
|
464
|
-
dbPath?: string;
|
|
465
|
-
}): Promise<KgPromoteResult>;
|
|
466
|
-
export interface ConsolidationCandidate {
|
|
467
|
-
name: string;
|
|
468
|
-
type: string;
|
|
469
|
-
description: string;
|
|
470
|
-
edgeCount: number;
|
|
471
|
-
/** Neighborhood facts to merge into one canonical description. */
|
|
472
|
-
neighborhood: string[];
|
|
473
|
-
}
|
|
474
|
-
/** Entities whose descriptions are stale relative to their connectivity —
|
|
475
|
-
* the LLM half runs in the LIVE agent: it rewrites each candidate's
|
|
476
|
-
* description from the neighborhood facts and resubmits via memory_kg_ingest.
|
|
477
|
-
* A resubmission is a NEW contribution and therefore the current one, so a
|
|
478
|
-
* shorter but better-supported summary now wins; under "longest description
|
|
479
|
-
* wins" a consolidation that tightened the prose was silently discarded.
|
|
480
|
-
* No LLM here (fully local constraint). */
|
|
481
|
-
export declare function kgConsolidateCandidates(options?: {
|
|
482
|
-
dbPath?: string;
|
|
483
|
-
/** Minimum edges for a node to qualify (default 3). */
|
|
484
|
-
minEdges?: number;
|
|
485
|
-
limit?: number;
|
|
486
|
-
scope?: KgScope;
|
|
487
|
-
}): Promise<ConsolidationCandidate[]>;
|
|
488
|
-
/** Real counts, not page lengths. `bridgeListEntries.total` reports how many
|
|
489
|
-
* rows that one call returned, so the old capped list made a 10,001-node graph
|
|
490
|
-
* report exactly 10,000 forever.
|
|
491
|
-
*
|
|
492
|
-
* Tries a real indexed `SELECT COUNT(*) WHERE namespace = ?` first
|
|
493
|
-
* (`bridgeCountEntries`, K7) — cheap and exact, since every row in a KG
|
|
494
|
-
* namespace is exactly one node/edge/rule (the name index lives in its own
|
|
495
|
-
* namespace). Falls back to the paginated scan — one query per 1,000 rows,
|
|
496
|
-
* still exact — when the loaded bridge predates `bridgeCountEntries`, or a
|
|
497
|
-
* test double doesn't stub it. */
|
|
498
|
-
export declare function kgStats(options?: {
|
|
499
|
-
dbPath?: string;
|
|
500
|
-
/** Whose graph to measure. Counting every org's facts under one org's name
|
|
501
|
-
* is what made `org memory <name> stats` a fiction. */
|
|
502
|
-
scope?: KgScope;
|
|
503
|
-
}): Promise<{
|
|
504
|
-
nodes: number;
|
|
505
|
-
edges: number;
|
|
506
|
-
rules: number;
|
|
507
|
-
}>;
|
|
508
|
-
export interface KgReferenceEdge {
|
|
509
|
-
key: string;
|
|
510
|
-
src: string;
|
|
511
|
-
dst: string;
|
|
512
|
-
relation: string;
|
|
513
|
-
originRefs: string[];
|
|
514
|
-
}
|
|
515
|
-
/** Complete, uncapped read of every edge touching `endpointId` (as either
|
|
516
|
-
* src or dst) and/or asserted by `originRef` — at least one filter is
|
|
517
|
-
* required. This is the ground truth an indexed adjacency/origin lookup
|
|
518
|
-
* (K7) must agree with once one exists: an exhaustive paged scan, the same
|
|
519
|
-
* mechanism `kgRollback` already trusts for origin withdrawal, so it never
|
|
520
|
-
* depends on an index and never inherits the old first-page cap.
|
|
521
|
-
*
|
|
522
|
-
* `truncated: true` means the scan did not finish — an incomplete answer,
|
|
523
|
-
* never an empty one. Callers comparing this against a future index must
|
|
524
|
-
* treat a truncated reference read as "unknown", not as "no matches". */
|
|
525
|
-
export declare function kgReferenceEdges(options: {
|
|
526
|
-
endpointId?: string;
|
|
527
|
-
originRef?: string;
|
|
528
|
-
scope?: KgScope;
|
|
529
|
-
dbPath?: string;
|
|
530
|
-
}): Promise<{
|
|
531
|
-
success: boolean;
|
|
532
|
-
edges: KgReferenceEdge[];
|
|
533
|
-
truncated?: boolean;
|
|
534
|
-
error?: string;
|
|
535
|
-
}>;
|
|
536
|
-
export type KgIndexState = 'absent' | 'building' | 'validating' | 'ready' | 'failed';
|
|
537
|
-
export interface KgIndexStatus {
|
|
538
|
-
state: KgIndexState;
|
|
539
|
-
schemaVersion: number;
|
|
540
|
-
/** Resume point for an interrupted `kgRebuildIndex`. */
|
|
541
|
-
cursor?: {
|
|
542
|
-
phase: 'nodes' | 'edges' | 'rules';
|
|
543
|
-
offset: number;
|
|
544
|
-
};
|
|
545
|
-
counts?: {
|
|
546
|
-
nodes: number;
|
|
547
|
-
edges: number;
|
|
548
|
-
rules: number;
|
|
549
|
-
};
|
|
550
|
-
startedAt?: number;
|
|
551
|
-
updatedAt?: number;
|
|
552
|
-
error?: string;
|
|
553
|
-
/** Only meaningful when `state === 'failed'`. True for a build-phase
|
|
554
|
-
* failure (the backend went unavailable mid-scan, or a dual-write hook
|
|
555
|
-
* hit an error after `ready`): everything already written is still
|
|
556
|
-
* correct, just incomplete, so the next call RESUMES from `cursor`. False
|
|
557
|
-
* for a validation-phase failure (the built index disagreed with an
|
|
558
|
-
* independent reference read): something already written is wrong, not
|
|
559
|
-
* merely incomplete, so the next call restarts a fresh scan — resuming
|
|
560
|
-
* would re-derive the same mistake instead of correcting it. */
|
|
561
|
-
resumable?: boolean;
|
|
562
|
-
}
|
|
563
|
-
/** This scope's derived-index build/readiness state. `absent` means no one
|
|
564
|
-
* has ever called `kgRebuildIndex` for it — every read behaves exactly as
|
|
565
|
-
* it did before this index existed. */
|
|
566
|
-
export declare function kgIndexStatus(options?: {
|
|
567
|
-
scope?: KgScope;
|
|
568
|
-
dbPath?: string;
|
|
569
|
-
}): Promise<KgIndexStatus>;
|
|
570
|
-
export interface KgRebuildResult {
|
|
571
|
-
success: boolean;
|
|
572
|
-
status: KgIndexStatus;
|
|
573
|
-
validation?: {
|
|
574
|
-
sampledEntities: number;
|
|
575
|
-
sampledOrigins: number;
|
|
576
|
-
full: boolean;
|
|
577
|
-
};
|
|
578
|
-
error?: string;
|
|
579
|
-
}
|
|
580
|
-
/** (Re)build a scope's derived index from canonical data — nodes, then
|
|
581
|
-
* edges, then rules, that fixed order, resuming from the last checkpointed
|
|
582
|
-
* `{phase, offset}` rather than restarting when a prior call was
|
|
583
|
-
* interrupted mid-build. Every write here (`addToAdj`/`addToOriginIndex`)
|
|
584
|
-
* is idempotent, so a page reprocessed after an interruption cannot
|
|
585
|
-
* duplicate an entry.
|
|
586
|
-
*
|
|
587
|
-
* A concurrent ingest/rollback during the build is safe, not just tolerated:
|
|
588
|
-
* the dual-write hooks run whenever state is not `absent`/`failed`, so a
|
|
589
|
-
* write made mid-build is captured whether or not the scan has reached that
|
|
590
|
-
* row yet — at worst twice, which idempotency absorbs for free. The one
|
|
591
|
-
* residual race (a row deleted between the scan reading it and the scan's
|
|
592
|
-
* own write landing) can leave a dangling ref in the index; it is never
|
|
593
|
-
* observable as wrong data, because every indexed READ
|
|
594
|
-
* (`kgIndexedEdgesByEndpoint`/`kgIndexedByOrigin`) returns `null` — and the
|
|
595
|
-
* caller falls back to the exhaustive scan — the instant it cannot resolve
|
|
596
|
-
* a ref it holds. This is the backend's real capability (single-row CAS,
|
|
597
|
-
* no cross-row transaction), used honestly rather than claiming atomicity
|
|
598
|
-
* it cannot provide.
|
|
599
|
-
*
|
|
600
|
-
* Ends in `validating`: samples up to `VALIDATE_SAMPLE` of the entities and
|
|
601
|
-
* origins the scan actually saw, and re-reads them through the just-built
|
|
602
|
-
* index, comparing against a FRESH, independent reference read
|
|
603
|
-
* (`kgReferenceEdges`/`collectByOrigin`) — not the in-memory data the build
|
|
604
|
-
* itself computed, which would only prove the build agrees with itself. A
|
|
605
|
-
* write that silently failed, or a concurrent change the dual-write hooks
|
|
606
|
-
* missed, is exactly what this catches before the index is ever trusted. */
|
|
607
|
-
export declare function kgRebuildIndex(options?: {
|
|
608
|
-
scope?: KgScope;
|
|
609
|
-
dbPath?: string;
|
|
610
|
-
}): Promise<KgRebuildResult>;
|
|
611
|
-
export interface KgIntegrityResult {
|
|
612
|
-
success: boolean;
|
|
613
|
-
edges: number;
|
|
614
|
-
/** Edges naming an endpoint that does not exist. Retrieval is node-seeded,
|
|
615
|
-
* so such an edge is a fact unreachable through either of the things it is
|
|
616
|
-
* about — it can only be found by a check like this one. */
|
|
617
|
-
dangling: {
|
|
618
|
-
key: string;
|
|
619
|
-
missing: string[];
|
|
620
|
-
}[];
|
|
621
|
-
/** True when the edge scan did not cover the namespace: absence of a dangling
|
|
622
|
-
* edge here is then not evidence that there is none. */
|
|
623
|
-
truncated?: boolean;
|
|
624
|
-
error?: string;
|
|
625
|
-
}
|
|
626
|
-
/** Verify that every edge's endpoints exist.
|
|
627
|
-
*
|
|
628
|
-
* `kgIngest` now creates missing endpoints before writing an edge and
|
|
629
|
-
* `kgRollback` removes edges whose endpoints it deleted, so a healthy graph
|
|
630
|
-
* reports nothing. This exists for graphs written before either rule, and as
|
|
631
|
-
* the check that says so rather than assuming it. */
|
|
632
|
-
export declare function kgIntegrityCheck(options?: {
|
|
633
|
-
dbPath?: string;
|
|
634
|
-
scope?: KgScope;
|
|
635
|
-
/** Dangling edges to report before stopping (default 100). */
|
|
636
|
-
limit?: number;
|
|
637
|
-
}): Promise<KgIntegrityResult>;
|
|
91
|
+
import type { KgEdgeInput, KgNodeInput } from './memory-kg-model.js';
|
|
92
|
+
export type { KgClaim, KgExtractionMethod } from './memory-kg-claims.js';
|
|
93
|
+
export type { KgIndexState, KgIndexStatus } from './memory-kg-index.js';
|
|
94
|
+
export { kgIndexStatus } from './memory-kg-index.js';
|
|
95
|
+
export { kgIngest } from './memory-kg-ingest.js';
|
|
96
|
+
export type { KgEdgeInput, KgIngestResult, KgNamespaces, KgNodeInput, KgScope, } from './memory-kg-model.js';
|
|
97
|
+
export { KG_ADJ_NS, KG_EDGES_NS, KG_ID_VERSION, KG_INDEX_STATUS_NS, KG_NAMES_NS, KG_NODES_NS, KG_ORIGIN_IDX_NS, kgNamespaces, kgQualifyOrigin, nodeKey, normalizeName, RULES_NS, } from './memory-kg-model.js';
|
|
98
|
+
export type { KgNameCandidate } from './memory-kg-names.js';
|
|
99
|
+
export type { ConsolidationCandidate, KgPromoteResult } from './memory-kg-promote.js';
|
|
100
|
+
export { kgConsolidateCandidates, kgPromote, kgStats } from './memory-kg-promote.js';
|
|
101
|
+
export type { KgIntegrityResult, KgRebuildResult } from './memory-kg-rebuild.js';
|
|
102
|
+
export { kgIntegrityCheck, kgRebuildIndex } from './memory-kg-rebuild.js';
|
|
103
|
+
export { kgRollback } from './memory-kg-rollback.js';
|
|
104
|
+
export type { RuleVerdict } from './memory-kg-rules.js';
|
|
105
|
+
export { kgIngestRules, kgListRules } from './memory-kg-rules.js';
|
|
106
|
+
export type { KgReferenceEdge } from './memory-kg-scan.js';
|
|
107
|
+
export { kgReferenceEdges } from './memory-kg-scan.js';
|
|
108
|
+
export type { KgSearchResult } from './memory-kg-search.js';
|
|
109
|
+
export { kgGlossary, kgSearch } from './memory-kg-search.js';
|
|
638
110
|
/** Regex extraction for when no LLM is in the loop (memory-palace lineage):
|
|
639
111
|
* proper-noun phrases and `code identifiers` become entities, sentence
|
|
640
112
|
* co-occurrence becomes `mentioned_with` edges. Lower-trust by design — real
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-kg.d.ts","sourceRoot":"","sources":["../../../src/memory/memory-kg.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;
|
|
1
|
+
{"version":3,"file":"memory-kg.d.ts","sourceRoot":"","sources":["../../../src/memory/memory-kg.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGrE,YAAY,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACzE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,YAAY,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,EACX,OAAO,GACR,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,SAAS,EACT,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,OAAO,EACP,aAAa,EACb,QAAQ,GACT,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACrF,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAClE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI7D;;;;;;;;kEAQkE;AAClE,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAC7B;IAAE,KAAK,EAAE,WAAW,EAAE,CAAC;IAAC,KAAK,EAAE,WAAW,EAAE,CAAA;CAAE,CAoHhD"}
|