clawvault 2.6.0 → 3.0.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/bin/command-registration.test.js +1 -3
- package/bin/register-core-commands.js +10 -23
- package/bin/register-maintenance-commands.js +3 -20
- package/bin/register-query-commands.js +23 -0
- package/bin/register-task-commands.js +1 -18
- package/bin/register-task-commands.test.js +0 -16
- package/bin/register-vault-operations-commands.js +1 -29
- package/dist/{chunk-QVMXF7FY.js → chunk-3D6BCTP6.js} +39 -1
- package/dist/{chunk-R2MIW5G7.js → chunk-3DHXQHYG.js} +1 -1
- package/dist/{chunk-Q2J5YTUF.js → chunk-3NSBOUT3.js} +73 -36
- package/dist/chunk-3RG5ZIWI.js +10 -0
- package/dist/{chunk-AZYOKJYC.js → chunk-62YTUT6J.js} +2 -2
- package/dist/chunk-6U6MK36V.js +205 -0
- package/dist/{chunk-4QYGFWRM.js → chunk-7R7O6STJ.js} +4 -4
- package/dist/{chunk-VXEOHTSL.js → chunk-C7OK5WKP.js} +4 -4
- package/dist/chunk-CMB7UL7C.js +327 -0
- package/dist/chunk-DEFFDRVP.js +938 -0
- package/dist/{chunk-K3CDT7IH.js → chunk-E7MFQB6D.js} +61 -20
- package/dist/{chunk-ME37YNW3.js → chunk-F2JEUD4J.js} +6 -4
- package/dist/chunk-GAJV4IGR.js +82 -0
- package/dist/chunk-GQSLDZTS.js +560 -0
- package/dist/{chunk-4OXMU5S2.js → chunk-GUKMRGM7.js} +1 -1
- package/dist/{chunk-YOSEUUNB.js → chunk-H34S76MB.js} +6 -6
- package/dist/{chunk-4TE4JMLA.js → chunk-JY6FYXIT.js} +10 -5
- package/dist/chunk-K234IDRJ.js +1073 -0
- package/dist/{chunk-IEVLHNLU.js → chunk-LNJA2UGL.js} +86 -9
- package/dist/{chunk-MFAWT5O5.js → chunk-LYHGEHXG.js} +1 -0
- package/dist/chunk-MFM6K7PU.js +374 -0
- package/dist/{chunk-QWQ3TIKS.js → chunk-N2AXRYLC.js} +1 -1
- package/dist/chunk-PAH27GSN.js +108 -0
- package/dist/{chunk-OIWVQYQF.js → chunk-QBLMXKF2.js} +1 -1
- package/dist/{chunk-FHFUXL6G.js → chunk-QK3UCXWL.js} +2 -2
- package/dist/{chunk-2YDBJS7M.js → chunk-SJSFRIYS.js} +1 -1
- package/dist/{chunk-GSD4ALSI.js → chunk-U55BGUAU.js} +2 -2
- package/dist/{chunk-PBEE567J.js → chunk-VGLOTGAS.js} +1 -1
- package/dist/{chunk-F55HGNU4.js → chunk-WAZ3NLWL.js} +47 -0
- package/dist/{chunk-KL4NAOMO.js → chunk-WGRQ6HDV.js} +1 -1
- package/dist/{chunk-UEOUADMO.js → chunk-YKTA5JOJ.js} +13 -10
- package/dist/{chunk-XAVB4GB4.js → chunk-ZVVFWOLW.js} +4 -4
- package/dist/cli/index.cjs +10033 -0
- package/dist/cli/index.d.cts +5 -0
- package/dist/cli/index.js +20 -18
- package/dist/commands/archive.cjs +287 -0
- package/dist/commands/archive.d.cts +11 -0
- package/dist/commands/archive.js +1 -0
- package/dist/commands/backlog.cjs +721 -0
- package/dist/commands/backlog.d.cts +53 -0
- package/dist/commands/backlog.js +3 -2
- package/dist/commands/blocked.cjs +204 -0
- package/dist/commands/blocked.d.cts +26 -0
- package/dist/commands/blocked.js +3 -2
- package/dist/commands/checkpoint.cjs +244 -0
- package/dist/commands/checkpoint.d.cts +41 -0
- package/dist/commands/checkpoint.js +2 -1
- package/dist/commands/compat.cjs +369 -0
- package/dist/commands/compat.d.cts +28 -0
- package/dist/commands/compat.js +2 -1
- package/dist/commands/context.cjs +2989 -0
- package/dist/commands/context.d.cts +2 -0
- package/dist/commands/context.js +5 -4
- package/dist/commands/doctor.cjs +3062 -0
- package/dist/commands/doctor.d.cts +21 -0
- package/dist/commands/doctor.d.ts +6 -1
- package/dist/commands/doctor.js +13 -11
- package/dist/commands/embed.cjs +232 -0
- package/dist/commands/embed.d.cts +17 -0
- package/dist/commands/embed.js +5 -2
- package/dist/commands/entities.cjs +141 -0
- package/dist/commands/entities.d.cts +7 -0
- package/dist/commands/entities.js +1 -0
- package/dist/commands/graph.cjs +501 -0
- package/dist/commands/graph.d.cts +21 -0
- package/dist/commands/graph.js +1 -0
- package/dist/commands/inject.cjs +1636 -0
- package/dist/commands/inject.d.cts +2 -0
- package/dist/commands/inject.d.ts +1 -1
- package/dist/commands/inject.js +4 -2
- package/dist/commands/kanban.cjs +884 -0
- package/dist/commands/kanban.d.cts +63 -0
- package/dist/commands/kanban.js +4 -3
- package/dist/commands/link.cjs +965 -0
- package/dist/commands/link.d.cts +11 -0
- package/dist/commands/link.js +1 -0
- package/dist/commands/migrate-observations.cjs +362 -0
- package/dist/commands/migrate-observations.d.cts +19 -0
- package/dist/commands/migrate-observations.js +3 -2
- package/dist/commands/observe.cjs +4099 -0
- package/dist/commands/observe.d.cts +23 -0
- package/dist/commands/observe.d.ts +1 -0
- package/dist/commands/observe.js +11 -9
- package/dist/commands/project.cjs +1341 -0
- package/dist/commands/project.d.cts +85 -0
- package/dist/commands/project.js +5 -4
- package/dist/commands/rebuild.cjs +3136 -0
- package/dist/commands/rebuild.d.cts +11 -0
- package/dist/commands/rebuild.js +10 -8
- package/dist/commands/recover.cjs +361 -0
- package/dist/commands/recover.d.cts +38 -0
- package/dist/commands/recover.js +3 -2
- package/dist/commands/reflect.cjs +1008 -0
- package/dist/commands/reflect.d.cts +11 -0
- package/dist/commands/reflect.js +6 -4
- package/dist/commands/repair-session.cjs +457 -0
- package/dist/commands/repair-session.d.cts +38 -0
- package/dist/commands/repair-session.js +1 -0
- package/dist/commands/replay.cjs +4103 -0
- package/dist/commands/replay.d.cts +16 -0
- package/dist/commands/replay.js +12 -10
- package/dist/commands/session-recap.cjs +353 -0
- package/dist/commands/session-recap.d.cts +27 -0
- package/dist/commands/session-recap.js +1 -0
- package/dist/commands/setup.cjs +1345 -0
- package/dist/commands/setup.d.cts +100 -0
- package/dist/commands/setup.d.ts +90 -2
- package/dist/commands/setup.js +21 -2
- package/dist/commands/shell-init.cjs +75 -0
- package/dist/commands/shell-init.d.cts +7 -0
- package/dist/commands/shell-init.js +2 -0
- package/dist/commands/sleep.cjs +6028 -0
- package/dist/commands/sleep.d.cts +36 -0
- package/dist/commands/sleep.d.ts +1 -1
- package/dist/commands/sleep.js +17 -15
- package/dist/commands/status.cjs +2736 -0
- package/dist/commands/status.d.cts +52 -0
- package/dist/commands/status.js +12 -10
- package/dist/commands/tailscale.cjs +1532 -0
- package/dist/commands/tailscale.d.cts +52 -0
- package/dist/commands/tailscale.js +1 -0
- package/dist/commands/task.cjs +1236 -0
- package/dist/commands/task.d.cts +97 -0
- package/dist/commands/task.js +4 -3
- package/dist/commands/template.cjs +457 -0
- package/dist/commands/template.d.cts +36 -0
- package/dist/commands/template.js +2 -1
- package/dist/commands/wake.cjs +2626 -0
- package/dist/commands/wake.d.cts +22 -0
- package/dist/commands/wake.d.ts +1 -1
- package/dist/commands/wake.js +12 -11
- package/dist/context-BUGaWpyL.d.cts +46 -0
- package/dist/index.cjs +14526 -0
- package/dist/index.d.cts +858 -0
- package/dist/index.d.ts +192 -7
- package/dist/index.js +101 -75
- package/dist/{inject-x65KXWPk.d.ts → inject-Bzi5E-By.d.cts} +1 -1
- package/dist/inject-Bzi5E-By.d.ts +137 -0
- package/dist/lib/auto-linker.cjs +176 -0
- package/dist/lib/auto-linker.d.cts +26 -0
- package/dist/lib/auto-linker.js +1 -0
- package/dist/lib/canvas-layout.cjs +136 -0
- package/dist/lib/canvas-layout.d.cts +31 -0
- package/dist/lib/canvas-layout.d.ts +16 -100
- package/dist/lib/canvas-layout.js +78 -20
- package/dist/lib/config.cjs +78 -0
- package/dist/lib/config.d.cts +11 -0
- package/dist/lib/config.js +1 -0
- package/dist/lib/entity-index.cjs +84 -0
- package/dist/lib/entity-index.d.cts +26 -0
- package/dist/lib/entity-index.js +1 -0
- package/dist/lib/project-utils.cjs +864 -0
- package/dist/lib/project-utils.d.cts +97 -0
- package/dist/lib/project-utils.js +4 -3
- package/dist/lib/session-repair.cjs +239 -0
- package/dist/lib/session-repair.d.cts +110 -0
- package/dist/lib/session-repair.js +1 -0
- package/dist/lib/session-utils.cjs +209 -0
- package/dist/lib/session-utils.d.cts +63 -0
- package/dist/lib/session-utils.js +1 -0
- package/dist/lib/tailscale.cjs +1183 -0
- package/dist/lib/tailscale.d.cts +225 -0
- package/dist/lib/tailscale.js +1 -0
- package/dist/lib/task-utils.cjs +1137 -0
- package/dist/lib/task-utils.d.cts +208 -0
- package/dist/lib/task-utils.js +3 -2
- package/dist/lib/template-engine.cjs +47 -0
- package/dist/lib/template-engine.d.cts +11 -0
- package/dist/lib/template-engine.js +1 -0
- package/dist/lib/webdav.cjs +568 -0
- package/dist/lib/webdav.d.cts +109 -0
- package/dist/lib/webdav.js +1 -0
- package/dist/plugin/index.cjs +1907 -0
- package/dist/plugin/index.d.cts +36 -0
- package/dist/plugin/index.d.ts +36 -0
- package/dist/plugin/index.js +572 -0
- package/dist/plugin/inject.cjs +356 -0
- package/dist/plugin/inject.d.cts +54 -0
- package/dist/plugin/inject.d.ts +54 -0
- package/dist/plugin/inject.js +17 -0
- package/dist/plugin/observe.cjs +631 -0
- package/dist/plugin/observe.d.cts +39 -0
- package/dist/plugin/observe.d.ts +39 -0
- package/dist/plugin/observe.js +18 -0
- package/dist/plugin/templates.cjs +593 -0
- package/dist/plugin/templates.d.cts +52 -0
- package/dist/plugin/templates.d.ts +52 -0
- package/dist/plugin/templates.js +25 -0
- package/dist/plugin/types.cjs +18 -0
- package/dist/plugin/types.d.cts +209 -0
- package/dist/plugin/types.d.ts +209 -0
- package/dist/plugin/types.js +0 -0
- package/dist/plugin/vault.cjs +927 -0
- package/dist/plugin/vault.d.cts +68 -0
- package/dist/plugin/vault.d.ts +68 -0
- package/dist/plugin/vault.js +22 -0
- package/dist/{types-C74wgGL1.d.ts → types-Y2_Um2Ls.d.cts} +44 -1
- package/dist/types-Y2_Um2Ls.d.ts +205 -0
- package/hooks/clawvault/handler.js +70 -7
- package/hooks/clawvault/handler.test.js +91 -0
- package/openclaw.plugin.json +56 -0
- package/package.json +17 -7
- package/templates/memory-event.md +67 -0
- package/templates/party.md +63 -0
- package/templates/primitive-registry.yaml +551 -0
- package/templates/run.md +68 -0
- package/templates/trigger.md +68 -0
- package/templates/workspace.md +50 -0
- package/dashboard/lib/graph-diff.js +0 -104
- package/dashboard/lib/graph-diff.test.js +0 -75
- package/dashboard/lib/vault-parser.js +0 -556
- package/dashboard/lib/vault-parser.test.js +0 -254
- package/dashboard/public/app.js +0 -796
- package/dashboard/public/index.html +0 -52
- package/dashboard/public/styles.css +0 -221
- package/dashboard/server.js +0 -374
- package/dist/chunk-HA5M6KJB.js +0 -33
- package/dist/chunk-MAKNAHAW.js +0 -375
- package/dist/chunk-MDIH26GC.js +0 -183
- package/dist/chunk-MGDEINGP.js +0 -99
- package/dist/chunk-RVYA52PY.js +0 -363
- package/dist/commands/canvas.d.ts +0 -15
- package/dist/commands/canvas.js +0 -199
- package/dist/commands/sync-bd.d.ts +0 -10
- package/dist/commands/sync-bd.js +0 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
|
-
import { V as VaultConfig, S as StoreOptions, D as Document, a as SearchOptions, b as SearchResult, c as SyncOptions, d as SyncResult, C as Category, M as MemoryType, H as HandoffDocument, e as SessionRecap } from './types-
|
|
3
|
-
export {
|
|
2
|
+
import { V as VaultConfig, S as StoreOptions, D as Document, a as SearchOptions, b as SearchResult, c as SyncOptions, d as SyncResult, C as Category, M as MemoryType, H as HandoffDocument, e as SessionRecap, E as ExtractedDate, f as ExtractedPreference } from './types-Y2_Um2Ls.js';
|
|
3
|
+
export { g as DEFAULT_CATEGORIES, h as DEFAULT_CONFIG, i as MEMORY_TYPES, T as TYPE_TO_CATEGORY, j as VaultMeta } from './types-Y2_Um2Ls.js';
|
|
4
4
|
export { setupCommand } from './commands/setup.js';
|
|
5
5
|
export { CompatCheck, CompatCommandOptions, CompatReport, CompatStatus, checkOpenClawCompatibility, compatCommand, compatibilityExitCode } from './commands/compat.js';
|
|
6
6
|
export { GraphSummary, graphCommand, graphSummary } from './commands/graph.js';
|
|
7
7
|
export { KanbanGroupBy, KanbanImportChange, KanbanImportOptions, KanbanImportResult, KanbanLane, KanbanSyncOptions, KanbanSyncResult, ParsedKanbanBoard, ParsedKanbanLane, buildKanbanLanes, extractCardSlug, formatKanbanCard, generateKanbanMarkdown, importKanbanBoard, kanbanCommand, parseKanbanMarkdown, syncKanbanBoard } from './commands/kanban.js';
|
|
8
8
|
export { C as ContextEntry, a as ContextFormat, b as ContextOptions, c as ContextProfile, d as ContextProfileInput, e as ContextProfileOption, f as ContextResult, R as ResolvedContextProfile, g as buildContext, h as contextCommand, i as formatContextMarkdown, j as inferContextProfile, n as normalizeContextProfileInput, r as registerContextCommand, k as resolveContextProfile } from './context-BUGaWpyL.js';
|
|
9
|
-
export { I as InjectCommandOptions, a as InjectFormat, b as InjectMatch, c as InjectMatchReason, d as InjectMatchSource, e as InjectResult, f as InjectRuntimeOptions, g as InjectSourceCategory, h as InjectableItem, L as LlmCompletionOptions, i as LlmProvider, M as MEMORY_GRAPH_SCHEMA_VERSION, j as MemoryGraph, k as MemoryGraphEdge, l as MemoryGraphEdgeType, m as MemoryGraphIndex, n as MemoryGraphNode, o as MemoryGraphNodeType, p as MemoryGraphStats, q as buildInjectionResult, r as buildOrUpdateMemoryGraphIndex, s as deterministicInjectMatches, t as getMemoryGraph, u as indexInjectableItems, v as injectCommand, w as loadMemoryGraphIndex, x as registerInjectCommand, y as requestLlmCompletion, z as resolveLlmProvider, A as runPromptInjection } from './inject-
|
|
9
|
+
export { I as InjectCommandOptions, a as InjectFormat, b as InjectMatch, c as InjectMatchReason, d as InjectMatchSource, e as InjectResult, f as InjectRuntimeOptions, g as InjectSourceCategory, h as InjectableItem, L as LlmCompletionOptions, i as LlmProvider, M as MEMORY_GRAPH_SCHEMA_VERSION, j as MemoryGraph, k as MemoryGraphEdge, l as MemoryGraphEdgeType, m as MemoryGraphIndex, n as MemoryGraphNode, o as MemoryGraphNodeType, p as MemoryGraphStats, q as buildInjectionResult, r as buildOrUpdateMemoryGraphIndex, s as deterministicInjectMatches, t as getMemoryGraph, u as indexInjectableItems, v as injectCommand, w as loadMemoryGraphIndex, x as registerInjectCommand, y as requestLlmCompletion, z as resolveLlmProvider, A as runPromptInjection } from './inject-Bzi5E-By.js';
|
|
10
10
|
export { ObserveCommandOptions, observeCommand, registerObserveCommand } from './commands/observe.js';
|
|
11
11
|
export { ReflectCommandOptions, reflectCommand, registerReflectCommand } from './commands/reflect.js';
|
|
12
12
|
export { ArchiveCommandOptions, archiveCommand, registerArchiveCommand } from './commands/archive.js';
|
|
@@ -15,7 +15,6 @@ export { DoctorCheck, DoctorReport, DoctorStatus, doctor } from './commands/doct
|
|
|
15
15
|
export { EmbedCommandOptions, EmbedCommandResult, embedCommand, registerEmbedCommand } from './commands/embed.js';
|
|
16
16
|
export { ReplayCommandOptions, registerReplayCommand, replayCommand } from './commands/replay.js';
|
|
17
17
|
export { MigrateObservationsOptions, MigrateObservationsResult, migrateObservations, migrateObservationsCommand, registerMigrateObservationsCommand } from './commands/migrate-observations.js';
|
|
18
|
-
export { SyncBdCommandOptions, registerSyncBdCommand, syncBdCommand } from './commands/sync-bd.js';
|
|
19
18
|
export { SessionRecapFormat, SessionRecapOptions, SessionRecapResult, SessionTurn, buildSessionRecap, formatSessionRecapMarkdown, sessionRecapCommand } from './commands/session-recap.js';
|
|
20
19
|
export { findNearestVaultPath, getVaultPath, resolveVaultPath } from './lib/config.js';
|
|
21
20
|
export { registerCliCommands } from './cli/index.js';
|
|
@@ -179,9 +178,131 @@ declare function createVault(vaultPath: string, options?: Partial<VaultConfig>,
|
|
|
179
178
|
skipGraph?: boolean;
|
|
180
179
|
}): Promise<ClawVault>;
|
|
181
180
|
|
|
181
|
+
interface ReweaveCommandOptions {
|
|
182
|
+
vaultPath?: string;
|
|
183
|
+
since?: string;
|
|
184
|
+
dryRun?: boolean;
|
|
185
|
+
threshold?: number;
|
|
186
|
+
}
|
|
187
|
+
declare function reweaveCommand(options: ReweaveCommandOptions): Promise<void>;
|
|
188
|
+
declare function registerReweaveCommand(program: Command): void;
|
|
189
|
+
|
|
190
|
+
declare const OBSERVATION_TYPES: readonly ["decision", "preference", "fact", "commitment", "task", "todo", "commitment-unresolved", "milestone", "lesson", "relationship", "project"];
|
|
191
|
+
type ObservationType = typeof OBSERVATION_TYPES[number];
|
|
192
|
+
type LegacyObservationPriority = '🔴' | '🟡' | '🟢';
|
|
193
|
+
type ObservationLineKind = 'scored' | 'emoji';
|
|
194
|
+
interface ParsedObservationRecord {
|
|
195
|
+
date: string;
|
|
196
|
+
type: ObservationType;
|
|
197
|
+
confidence: number;
|
|
198
|
+
importance: number;
|
|
199
|
+
content: string;
|
|
200
|
+
format: ObservationLineKind;
|
|
201
|
+
priority?: LegacyObservationPriority;
|
|
202
|
+
time?: string;
|
|
203
|
+
rawLine: string;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Reweave — Backward memory consolidation for ClawVault
|
|
208
|
+
*
|
|
209
|
+
* When new observations are written, reweave performs a backward pass over
|
|
210
|
+
* existing observations to detect knowledge updates (same entity, new value).
|
|
211
|
+
* Older observations are marked as superseded so search always returns the
|
|
212
|
+
* latest version of a fact.
|
|
213
|
+
*
|
|
214
|
+
* Design inspired by Ars Contexta's "notes are hypotheses" philosophy —
|
|
215
|
+
* every observation is a claim that can be superseded by newer evidence.
|
|
216
|
+
*/
|
|
217
|
+
|
|
218
|
+
interface SupersessionRecord {
|
|
219
|
+
/** The older observation that was superseded */
|
|
220
|
+
oldObservation: ParsedObservationRecord;
|
|
221
|
+
/** The newer observation that supersedes it */
|
|
222
|
+
newObservation: ParsedObservationRecord;
|
|
223
|
+
/** File path of the older observation */
|
|
224
|
+
oldFile: string;
|
|
225
|
+
/** File path of the newer observation */
|
|
226
|
+
newFile: string;
|
|
227
|
+
/** Reason for supersession */
|
|
228
|
+
reason: string;
|
|
229
|
+
/** Timestamp of detection */
|
|
230
|
+
detectedAt: string;
|
|
231
|
+
}
|
|
232
|
+
interface ReweaveResult {
|
|
233
|
+
/** Number of observation files scanned */
|
|
234
|
+
filesScanned: number;
|
|
235
|
+
/** Number of individual observations checked */
|
|
236
|
+
observationsChecked: number;
|
|
237
|
+
/** Supersession records found/applied */
|
|
238
|
+
supersessions: SupersessionRecord[];
|
|
239
|
+
/** Whether this was a dry run */
|
|
240
|
+
dryRun: boolean;
|
|
241
|
+
}
|
|
242
|
+
interface ReweaveOptions {
|
|
243
|
+
vaultPath: string;
|
|
244
|
+
/** Only process observations since this date (YYYY-MM-DD) */
|
|
245
|
+
since?: string;
|
|
246
|
+
/** Dry run — report but don't write */
|
|
247
|
+
dryRun?: boolean;
|
|
248
|
+
/** Similarity threshold for entity matching (0-1). Default 0.6 */
|
|
249
|
+
similarityThreshold?: number;
|
|
250
|
+
}
|
|
251
|
+
declare function isSuperseded(line: string): boolean;
|
|
252
|
+
declare function getSupersessionInfo(line: string): {
|
|
253
|
+
supersededBy: string;
|
|
254
|
+
detectedAt: string;
|
|
255
|
+
} | null;
|
|
256
|
+
/**
|
|
257
|
+
* Extract key entities/subjects from an observation for matching.
|
|
258
|
+
* Returns normalized tokens that represent the "what" of the observation.
|
|
259
|
+
*/
|
|
260
|
+
declare function extractEntities(content: string): string[];
|
|
261
|
+
/**
|
|
262
|
+
* Compute similarity between two observations based on entity overlap.
|
|
263
|
+
* Returns 0-1 where 1 = identical entities.
|
|
264
|
+
*/
|
|
265
|
+
declare function entitySimilarity(a: string[], b: string[]): number;
|
|
266
|
+
/**
|
|
267
|
+
* Check if two observations represent a knowledge update.
|
|
268
|
+
* Both must be about the same entity/subject but with different values.
|
|
269
|
+
*
|
|
270
|
+
* Heuristic: high entity overlap + different observation content = update.
|
|
271
|
+
* Same content = duplicate, not update.
|
|
272
|
+
*/
|
|
273
|
+
declare function isKnowledgeUpdate(older: ParsedObservationRecord, newer: ParsedObservationRecord, threshold?: number): {
|
|
274
|
+
isUpdate: boolean;
|
|
275
|
+
reason: string;
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* Run backward consolidation across observations.
|
|
279
|
+
*
|
|
280
|
+
* For each newer observation, check all older observations for knowledge updates.
|
|
281
|
+
* When found, mark the older one as superseded.
|
|
282
|
+
*/
|
|
283
|
+
declare function reweave(options: ReweaveOptions): ReweaveResult;
|
|
284
|
+
/**
|
|
285
|
+
* Filter search results to prefer latest versions of superseded observations.
|
|
286
|
+
* When multiple observations cover the same entity, only keep the newest.
|
|
287
|
+
*
|
|
288
|
+
* This is called from the search pipeline to boost knowledge update accuracy.
|
|
289
|
+
*/
|
|
290
|
+
declare function filterSuperseded(lines: string[]): string[];
|
|
291
|
+
/**
|
|
292
|
+
* Given observation markdown content, return only non-superseded lines.
|
|
293
|
+
* Preserves date headings and structure.
|
|
294
|
+
*/
|
|
295
|
+
declare function stripSupersededObservations(markdown: string): string;
|
|
296
|
+
|
|
182
297
|
/**
|
|
183
298
|
* ClawVault Search Engine - qmd Backend
|
|
184
299
|
* Uses qmd CLI for BM25 and vector search
|
|
300
|
+
*
|
|
301
|
+
* v2.7.0 enhancements:
|
|
302
|
+
* 1. Chunk-level BM25 pre-filtering (from eval v4 adapter)
|
|
303
|
+
* 2. Exhaustive threshold-based retrieval (from eval v6 adapter)
|
|
304
|
+
* 3. Preference extraction pipeline (from eval v3 adapter)
|
|
305
|
+
* 4. Temporal date indexing at ingest time (from eval v8 design)
|
|
185
306
|
*/
|
|
186
307
|
|
|
187
308
|
declare const QMD_INSTALL_URL = "https://github.com/tobi/qmd";
|
|
@@ -201,6 +322,31 @@ declare function qmdUpdate(collection?: string, indexName?: string): void;
|
|
|
201
322
|
* Trigger qmd embed (create/update vector embeddings)
|
|
202
323
|
*/
|
|
203
324
|
declare function qmdEmbed(collection?: string, indexName?: string): void;
|
|
325
|
+
/**
|
|
326
|
+
* Split text into ~maxChars sentence-aligned chunks with overlap.
|
|
327
|
+
*/
|
|
328
|
+
declare function sentenceChunk(text: string, maxChars?: number, overlapSentences?: number): string[];
|
|
329
|
+
/**
|
|
330
|
+
* BM25-rank chunks within a document by keyword overlap.
|
|
331
|
+
* Returns the top `max` chunks sorted by relevance, always including the
|
|
332
|
+
* first chunk (session context) when available.
|
|
333
|
+
*/
|
|
334
|
+
declare function bm25RankChunks(chunks: string[], terms: string[], max?: number): {
|
|
335
|
+
text: string;
|
|
336
|
+
score: number;
|
|
337
|
+
}[];
|
|
338
|
+
/**
|
|
339
|
+
* Extract all date references from text content. Designed to run at ingest
|
|
340
|
+
* time so temporal queries can use structured dates + JS arithmetic instead
|
|
341
|
+
* of relying on LLM date math at query time.
|
|
342
|
+
*/
|
|
343
|
+
declare function extractDates(text: string, sessionDateStr?: string): ExtractedDate[];
|
|
344
|
+
/**
|
|
345
|
+
* Extract user preferences from conversation text. Runs at ingest time to
|
|
346
|
+
* build a structured preference index for personalised recommendations.
|
|
347
|
+
*/
|
|
348
|
+
declare function extractPreferences(text: string, documentId?: string): ExtractedPreference[];
|
|
349
|
+
declare function classifyQuestion(q: string): 'preference' | 'temporal' | 'aggregation' | 'default';
|
|
204
350
|
/**
|
|
205
351
|
* QMD Search Engine - wraps qmd CLI
|
|
206
352
|
*/
|
|
@@ -210,6 +356,12 @@ declare class SearchEngine {
|
|
|
210
356
|
private vaultPath;
|
|
211
357
|
private collectionRoot;
|
|
212
358
|
private qmdIndexName?;
|
|
359
|
+
/** v2.7 — Per-document date index built at ingest time */
|
|
360
|
+
private dateIndex;
|
|
361
|
+
/** v2.7 — Per-document preference index built at ingest time */
|
|
362
|
+
private preferenceIndex;
|
|
363
|
+
/** v2.7 — Per-document chunk cache for BM25 pre-filtering */
|
|
364
|
+
private chunkCache;
|
|
213
365
|
/**
|
|
214
366
|
* Set the collection name (usually vault name)
|
|
215
367
|
*/
|
|
@@ -227,7 +379,8 @@ declare class SearchEngine {
|
|
|
227
379
|
*/
|
|
228
380
|
setIndexName(indexName?: string): void;
|
|
229
381
|
/**
|
|
230
|
-
* Add or update a document in the local cache
|
|
382
|
+
* Add or update a document in the local cache.
|
|
383
|
+
* v2.7: also extracts dates, preferences, and chunks at ingest time.
|
|
231
384
|
* Note: qmd indexing happens via qmd update command
|
|
232
385
|
*/
|
|
233
386
|
addDocument(doc: Document): void;
|
|
@@ -252,6 +405,32 @@ declare class SearchEngine {
|
|
|
252
405
|
*/
|
|
253
406
|
query(query: string, options?: SearchOptions): SearchResult[];
|
|
254
407
|
private runQmdQuery;
|
|
408
|
+
/**
|
|
409
|
+
* v2.7 — Chunk-level BM25 pre-filtered search. Ranks chunks within each
|
|
410
|
+
* document by keyword relevance before semantic ranking, so relevant
|
|
411
|
+
* content deep in long documents isn't missed.
|
|
412
|
+
*
|
|
413
|
+
* Returns results with snippets from the best-matching chunks.
|
|
414
|
+
*/
|
|
415
|
+
chunkPrefilterSearch(query: string, options?: SearchOptions): SearchResult[];
|
|
416
|
+
/**
|
|
417
|
+
* v2.7 — Exhaustive threshold-based search for aggregation queries.
|
|
418
|
+
* Keeps pulling results until relevance drops below threshold.
|
|
419
|
+
*/
|
|
420
|
+
exhaustiveSearch(query: string, threshold?: number, maxResults?: number): SearchResult[];
|
|
421
|
+
/**
|
|
422
|
+
* v2.7 — Get all extracted dates, optionally filtered by document ids.
|
|
423
|
+
*/
|
|
424
|
+
getDates(documentIds?: string[]): ExtractedDate[];
|
|
425
|
+
/**
|
|
426
|
+
* v2.7 — Get all extracted preferences, optionally filtered by document ids.
|
|
427
|
+
*/
|
|
428
|
+
getPreferences(documentIds?: string[]): ExtractedPreference[];
|
|
429
|
+
/**
|
|
430
|
+
* v2.7 — Search with automatic strategy selection based on question type.
|
|
431
|
+
* Classifies the query and routes to the appropriate pipeline.
|
|
432
|
+
*/
|
|
433
|
+
smartQuery(query: string, options?: SearchOptions): SearchResult[];
|
|
255
434
|
/**
|
|
256
435
|
* Convert qmd results to ClawVault SearchResult format
|
|
257
436
|
*/
|
|
@@ -262,6 +441,11 @@ declare class SearchEngine {
|
|
|
262
441
|
* Convert qmd:// URI to file path
|
|
263
442
|
*/
|
|
264
443
|
private qmdUriToPath;
|
|
444
|
+
/**
|
|
445
|
+
* v2.8 — Filter superseded observation lines from snippet text.
|
|
446
|
+
* Ensures search results prefer the latest version of knowledge.
|
|
447
|
+
*/
|
|
448
|
+
private stripSupersededFromSnippet;
|
|
265
449
|
/**
|
|
266
450
|
* Clean up qmd snippet format
|
|
267
451
|
*/
|
|
@@ -275,7 +459,7 @@ declare class SearchEngine {
|
|
|
275
459
|
*/
|
|
276
460
|
get size(): number;
|
|
277
461
|
/**
|
|
278
|
-
* Clear the local document cache
|
|
462
|
+
* Clear the local document cache and all v2.7 indices
|
|
279
463
|
*/
|
|
280
464
|
clear(): void;
|
|
281
465
|
/**
|
|
@@ -516,6 +700,7 @@ interface ActiveObserveOptions {
|
|
|
516
700
|
reflectThreshold?: number;
|
|
517
701
|
model?: string;
|
|
518
702
|
extractTasks?: boolean;
|
|
703
|
+
maxSessions?: number;
|
|
519
704
|
}
|
|
520
705
|
interface ActiveObservationCandidate {
|
|
521
706
|
sessionId: string;
|
|
@@ -670,4 +855,4 @@ declare function runReflection(options: ReflectOptions): Promise<ReflectResult>;
|
|
|
670
855
|
declare const VERSION: string;
|
|
671
856
|
declare function registerCommanderCommands(program: Command): Command;
|
|
672
857
|
|
|
673
|
-
export { type ActiveObservationCandidate, type ActiveObservationFailure, type ActiveObserveOptions, type ActiveObserveResult, type ArchiveObservationsOptions, type ArchiveObservationsResult, Category, ClawVault, type CompressionProvider, Compressor, type CompressorOptions, type ContextProfile as ConfigDefaultProfile, Document, HandoffDocument, type ManagedConfigKey, MemoryType, type ObserveCursorEntry, type ObserveCursorStore, type ObserveProvider, Observer, type ObserverCompressionProvider, type ObserverCompressor, type ObserverOptions, type ObserverReflector, type ObserverStalenessResult, QMD_INSTALL_COMMAND, QMD_INSTALL_URL, QmdUnavailableError, type ReflectOptions, type ReflectResult, Reflector, type ReflectorOptions, type RouteRule, SUPPORTED_CONFIG_KEYS, SearchEngine, SearchOptions, SearchResult, SessionRecap, SessionWatcher, type SessionWatcherOptions, StoreOptions, SyncOptions, SyncResult, type Theme, type TransitionEvent, VERSION, VaultConfig, addRouteRule, appendTransition, archiveObservations, buildTransitionEvent, countBlockedTransitions, createVault, extractTags, extractWikiLinks, findVault, formatTransitionsTable, getConfig, getConfigValue, getObserverStaleness, getScaledObservationThresholdBytes, hasQmd, isRegression, listConfig, listRouteRules, matchRouteRule, observeActiveSessions, parseSessionFile, parseSessionSourceLabel, qmdEmbed, qmdUpdate, queryTransitions, readAllTransitions, registerCommanderCommands, removeRouteRule, resetConfig, runReflection, setConfigValue, testRouteRule };
|
|
858
|
+
export { type ActiveObservationCandidate, type ActiveObservationFailure, type ActiveObserveOptions, type ActiveObserveResult, type ArchiveObservationsOptions, type ArchiveObservationsResult, Category, ClawVault, type CompressionProvider, Compressor, type CompressorOptions, type ContextProfile as ConfigDefaultProfile, Document, ExtractedDate, ExtractedPreference, HandoffDocument, type ManagedConfigKey, MemoryType, type ObserveCursorEntry, type ObserveCursorStore, type ObserveProvider, Observer, type ObserverCompressionProvider, type ObserverCompressor, type ObserverOptions, type ObserverReflector, type ObserverStalenessResult, QMD_INSTALL_COMMAND, QMD_INSTALL_URL, QmdUnavailableError, type ReflectOptions, type ReflectResult, Reflector, type ReflectorOptions, type ReweaveOptions, type ReweaveResult, type RouteRule, SUPPORTED_CONFIG_KEYS, SearchEngine, SearchOptions, SearchResult, SessionRecap, SessionWatcher, type SessionWatcherOptions, StoreOptions, type SupersessionRecord, SyncOptions, SyncResult, type Theme, type TransitionEvent, VERSION, VaultConfig, addRouteRule, appendTransition, archiveObservations, bm25RankChunks, buildTransitionEvent, classifyQuestion, countBlockedTransitions, createVault, entitySimilarity, extractDates, extractEntities, extractPreferences, extractTags, extractWikiLinks, filterSuperseded, findVault, formatTransitionsTable, getConfig, getConfigValue, getObserverStaleness, getScaledObservationThresholdBytes, getSupersessionInfo, hasQmd, isKnowledgeUpdate, isRegression, isSuperseded, listConfig, listRouteRules, matchRouteRule, observeActiveSessions, parseSessionFile, parseSessionSourceLabel, qmdEmbed, qmdUpdate, queryTransitions, readAllTransitions, registerCommanderCommands, registerReweaveCommand, removeRouteRule, resetConfig, reweave, reweaveCommand, runReflection, sentenceChunk, setConfigValue, stripSupersededObservations, testRouteRule };
|
package/dist/index.js
CHANGED
|
@@ -1,31 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildSessionRecap,
|
|
3
|
-
formatSessionRecapMarkdown,
|
|
4
|
-
sessionRecapCommand
|
|
5
|
-
} from "./chunk-ZKGY7WTT.js";
|
|
6
1
|
import {
|
|
7
2
|
setupCommand
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import {
|
|
10
|
-
registerSyncBdCommand,
|
|
11
|
-
syncBdCommand
|
|
12
|
-
} from "./chunk-MGDEINGP.js";
|
|
13
|
-
import {
|
|
14
|
-
migrateObservations,
|
|
15
|
-
migrateObservationsCommand,
|
|
16
|
-
registerMigrateObservationsCommand
|
|
17
|
-
} from "./chunk-VXEOHTSL.js";
|
|
3
|
+
} from "./chunk-DEFFDRVP.js";
|
|
18
4
|
import {
|
|
19
5
|
rebuildCommand,
|
|
20
6
|
registerRebuildCommand
|
|
21
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VGLOTGAS.js";
|
|
22
8
|
import {
|
|
23
9
|
registerReplayCommand,
|
|
24
10
|
replayCommand
|
|
25
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JY6FYXIT.js";
|
|
12
|
+
import {
|
|
13
|
+
buildSessionRecap,
|
|
14
|
+
formatSessionRecapMarkdown,
|
|
15
|
+
sessionRecapCommand
|
|
16
|
+
} from "./chunk-ZKGY7WTT.js";
|
|
26
17
|
import {
|
|
27
18
|
doctor
|
|
28
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YKTA5JOJ.js";
|
|
29
20
|
import "./chunk-7ZRP733D.js";
|
|
30
21
|
import {
|
|
31
22
|
graphCommand,
|
|
@@ -40,12 +31,19 @@ import {
|
|
|
40
31
|
kanbanCommand,
|
|
41
32
|
parseKanbanMarkdown,
|
|
42
33
|
syncKanbanBoard
|
|
43
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-GUKMRGM7.js";
|
|
44
35
|
import "./chunk-4VQTUVH7.js";
|
|
45
36
|
import "./chunk-J7ZWCI2C.js";
|
|
46
37
|
import {
|
|
47
|
-
|
|
48
|
-
|
|
38
|
+
migrateObservations,
|
|
39
|
+
migrateObservationsCommand,
|
|
40
|
+
registerMigrateObservationsCommand
|
|
41
|
+
} from "./chunk-C7OK5WKP.js";
|
|
42
|
+
import {
|
|
43
|
+
registerCliCommands,
|
|
44
|
+
registerReweaveCommand,
|
|
45
|
+
reweaveCommand
|
|
46
|
+
} from "./chunk-GAJV4IGR.js";
|
|
49
47
|
import {
|
|
50
48
|
registerTailscaleCommands,
|
|
51
49
|
registerTailscaleDiscoverCommand,
|
|
@@ -83,38 +81,28 @@ import {
|
|
|
83
81
|
SessionWatcher,
|
|
84
82
|
observeCommand,
|
|
85
83
|
registerObserveCommand
|
|
86
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-F2JEUD4J.js";
|
|
87
85
|
import {
|
|
88
86
|
parseSessionFile
|
|
89
87
|
} from "./chunk-P5EPF6MB.js";
|
|
90
88
|
import {
|
|
91
89
|
reflectCommand,
|
|
92
90
|
registerReflectCommand
|
|
93
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-SJSFRIYS.js";
|
|
94
92
|
import {
|
|
95
93
|
runReflection
|
|
96
|
-
} from "./chunk-
|
|
97
|
-
import {
|
|
98
|
-
buildContext,
|
|
99
|
-
contextCommand,
|
|
100
|
-
formatContextMarkdown,
|
|
101
|
-
inferContextProfile,
|
|
102
|
-
normalizeContextProfileInput,
|
|
103
|
-
registerContextCommand,
|
|
104
|
-
resolveContextProfile
|
|
105
|
-
} from "./chunk-XAVB4GB4.js";
|
|
94
|
+
} from "./chunk-H34S76MB.js";
|
|
106
95
|
import {
|
|
107
96
|
getObserverStaleness,
|
|
108
97
|
getScaledObservationThresholdBytes,
|
|
109
98
|
observeActiveSessions,
|
|
110
99
|
parseSessionSourceLabel
|
|
111
|
-
} from "./chunk-
|
|
112
|
-
import "./chunk-HRLWZGMA.js";
|
|
100
|
+
} from "./chunk-LNJA2UGL.js";
|
|
113
101
|
import {
|
|
114
102
|
Compressor,
|
|
115
103
|
Observer,
|
|
116
104
|
Reflector
|
|
117
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-3NSBOUT3.js";
|
|
118
106
|
import {
|
|
119
107
|
archiveProject,
|
|
120
108
|
createProject,
|
|
@@ -123,28 +111,12 @@ import {
|
|
|
123
111
|
listProjects,
|
|
124
112
|
readProject,
|
|
125
113
|
updateProject
|
|
126
|
-
} from "./chunk-
|
|
127
|
-
import
|
|
128
|
-
ClawVault,
|
|
129
|
-
createVault,
|
|
130
|
-
findVault
|
|
131
|
-
} from "./chunk-KL4NAOMO.js";
|
|
132
|
-
import "./chunk-FHFUXL6G.js";
|
|
114
|
+
} from "./chunk-62YTUT6J.js";
|
|
115
|
+
import "./chunk-HRLWZGMA.js";
|
|
133
116
|
import {
|
|
134
117
|
embedCommand,
|
|
135
118
|
registerEmbedCommand
|
|
136
|
-
} from "./chunk-
|
|
137
|
-
import {
|
|
138
|
-
QMD_INSTALL_COMMAND,
|
|
139
|
-
QMD_INSTALL_URL,
|
|
140
|
-
QmdUnavailableError,
|
|
141
|
-
SearchEngine,
|
|
142
|
-
extractTags,
|
|
143
|
-
extractWikiLinks,
|
|
144
|
-
hasQmd,
|
|
145
|
-
qmdEmbed,
|
|
146
|
-
qmdUpdate
|
|
147
|
-
} from "./chunk-MAKNAHAW.js";
|
|
119
|
+
} from "./chunk-7R7O6STJ.js";
|
|
148
120
|
import {
|
|
149
121
|
buildInjectionResult,
|
|
150
122
|
deterministicInjectMatches,
|
|
@@ -152,11 +124,11 @@ import {
|
|
|
152
124
|
injectCommand,
|
|
153
125
|
registerInjectCommand,
|
|
154
126
|
runPromptInjection
|
|
155
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-U55BGUAU.js";
|
|
156
128
|
import {
|
|
157
129
|
requestLlmCompletion,
|
|
158
130
|
resolveLlmProvider
|
|
159
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-E7MFQB6D.js";
|
|
160
132
|
import {
|
|
161
133
|
SUPPORTED_CONFIG_KEYS,
|
|
162
134
|
addRouteRule,
|
|
@@ -170,12 +142,7 @@ import {
|
|
|
170
142
|
setConfigValue,
|
|
171
143
|
testRouteRule
|
|
172
144
|
} from "./chunk-ITPEXLHA.js";
|
|
173
|
-
import
|
|
174
|
-
DEFAULT_CATEGORIES,
|
|
175
|
-
DEFAULT_CONFIG,
|
|
176
|
-
MEMORY_TYPES,
|
|
177
|
-
TYPE_TO_CATEGORY
|
|
178
|
-
} from "./chunk-2CDEETQN.js";
|
|
145
|
+
import "./chunk-PAH27GSN.js";
|
|
179
146
|
import {
|
|
180
147
|
archiveCommand,
|
|
181
148
|
registerArchiveCommand
|
|
@@ -188,13 +155,6 @@ import {
|
|
|
188
155
|
getVaultPath,
|
|
189
156
|
resolveVaultPath
|
|
190
157
|
} from "./chunk-MXSSG3QU.js";
|
|
191
|
-
import {
|
|
192
|
-
MEMORY_GRAPH_SCHEMA_VERSION,
|
|
193
|
-
buildOrUpdateMemoryGraphIndex,
|
|
194
|
-
getMemoryGraph,
|
|
195
|
-
loadMemoryGraphIndex
|
|
196
|
-
} from "./chunk-ZZA73MFY.js";
|
|
197
|
-
import "./chunk-Z2XBWN7A.js";
|
|
198
158
|
import {
|
|
199
159
|
appendTransition,
|
|
200
160
|
buildTransitionEvent,
|
|
@@ -207,8 +167,8 @@ import {
|
|
|
207
167
|
queryTransitions,
|
|
208
168
|
readAllTransitions,
|
|
209
169
|
updateTask
|
|
210
|
-
} from "./chunk-
|
|
211
|
-
import "./chunk-
|
|
170
|
+
} from "./chunk-N2AXRYLC.js";
|
|
171
|
+
import "./chunk-LYHGEHXG.js";
|
|
212
172
|
import {
|
|
213
173
|
buildTemplateVariables,
|
|
214
174
|
renderTemplate
|
|
@@ -217,7 +177,60 @@ import {
|
|
|
217
177
|
checkOpenClawCompatibility,
|
|
218
178
|
compatCommand,
|
|
219
179
|
compatibilityExitCode
|
|
220
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-3D6BCTP6.js";
|
|
181
|
+
import {
|
|
182
|
+
buildContext,
|
|
183
|
+
contextCommand,
|
|
184
|
+
formatContextMarkdown,
|
|
185
|
+
inferContextProfile,
|
|
186
|
+
normalizeContextProfileInput,
|
|
187
|
+
registerContextCommand,
|
|
188
|
+
resolveContextProfile
|
|
189
|
+
} from "./chunk-ZVVFWOLW.js";
|
|
190
|
+
import {
|
|
191
|
+
ClawVault,
|
|
192
|
+
createVault,
|
|
193
|
+
findVault
|
|
194
|
+
} from "./chunk-WGRQ6HDV.js";
|
|
195
|
+
import {
|
|
196
|
+
QMD_INSTALL_COMMAND,
|
|
197
|
+
QMD_INSTALL_URL,
|
|
198
|
+
QmdUnavailableError,
|
|
199
|
+
SearchEngine,
|
|
200
|
+
bm25RankChunks,
|
|
201
|
+
classifyQuestion,
|
|
202
|
+
entitySimilarity,
|
|
203
|
+
extractDates,
|
|
204
|
+
extractEntities,
|
|
205
|
+
extractPreferences,
|
|
206
|
+
extractTags,
|
|
207
|
+
extractWikiLinks,
|
|
208
|
+
filterSuperseded,
|
|
209
|
+
getSupersessionInfo,
|
|
210
|
+
hasQmd,
|
|
211
|
+
isKnowledgeUpdate,
|
|
212
|
+
isSuperseded,
|
|
213
|
+
qmdEmbed,
|
|
214
|
+
qmdUpdate,
|
|
215
|
+
reweave,
|
|
216
|
+
sentenceChunk,
|
|
217
|
+
stripSupersededObservations
|
|
218
|
+
} from "./chunk-K234IDRJ.js";
|
|
219
|
+
import {
|
|
220
|
+
DEFAULT_CATEGORIES,
|
|
221
|
+
DEFAULT_CONFIG,
|
|
222
|
+
MEMORY_TYPES,
|
|
223
|
+
TYPE_TO_CATEGORY
|
|
224
|
+
} from "./chunk-2CDEETQN.js";
|
|
225
|
+
import {
|
|
226
|
+
MEMORY_GRAPH_SCHEMA_VERSION,
|
|
227
|
+
buildOrUpdateMemoryGraphIndex,
|
|
228
|
+
getMemoryGraph,
|
|
229
|
+
loadMemoryGraphIndex
|
|
230
|
+
} from "./chunk-ZZA73MFY.js";
|
|
231
|
+
import "./chunk-QK3UCXWL.js";
|
|
232
|
+
import "./chunk-Z2XBWN7A.js";
|
|
233
|
+
import "./chunk-3RG5ZIWI.js";
|
|
221
234
|
|
|
222
235
|
// src/index.ts
|
|
223
236
|
import * as fs from "fs";
|
|
@@ -258,6 +271,7 @@ export {
|
|
|
258
271
|
archiveCommand,
|
|
259
272
|
archiveObservations,
|
|
260
273
|
archiveProject,
|
|
274
|
+
bm25RankChunks,
|
|
261
275
|
buildContext,
|
|
262
276
|
buildInjectionResult,
|
|
263
277
|
buildKanbanLanes,
|
|
@@ -267,6 +281,7 @@ export {
|
|
|
267
281
|
buildTransitionEvent,
|
|
268
282
|
checkOpenClawCompatibility,
|
|
269
283
|
checkPeerClawVault,
|
|
284
|
+
classifyQuestion,
|
|
270
285
|
compareManifests,
|
|
271
286
|
compatCommand,
|
|
272
287
|
compatibilityExitCode,
|
|
@@ -280,11 +295,16 @@ export {
|
|
|
280
295
|
discoverClawVaultPeers,
|
|
281
296
|
doctor,
|
|
282
297
|
embedCommand,
|
|
298
|
+
entitySimilarity,
|
|
283
299
|
extractCardSlug,
|
|
300
|
+
extractDates,
|
|
301
|
+
extractEntities,
|
|
302
|
+
extractPreferences,
|
|
284
303
|
extractTags,
|
|
285
304
|
extractWikiLinks,
|
|
286
305
|
fetchRemoteFile,
|
|
287
306
|
fetchRemoteManifest,
|
|
307
|
+
filterSuperseded,
|
|
288
308
|
findNearestVaultPath,
|
|
289
309
|
findPeer,
|
|
290
310
|
findVault,
|
|
@@ -302,6 +322,7 @@ export {
|
|
|
302
322
|
getProjectActivity,
|
|
303
323
|
getProjectTasks,
|
|
304
324
|
getScaledObservationThresholdBytes,
|
|
325
|
+
getSupersessionInfo,
|
|
305
326
|
getTailscaleStatus,
|
|
306
327
|
getTailscaleVersion,
|
|
307
328
|
getVaultPath,
|
|
@@ -313,7 +334,9 @@ export {
|
|
|
313
334
|
indexInjectableItems,
|
|
314
335
|
inferContextProfile,
|
|
315
336
|
injectCommand,
|
|
337
|
+
isKnowledgeUpdate,
|
|
316
338
|
isRegression,
|
|
339
|
+
isSuperseded,
|
|
317
340
|
kanbanCommand,
|
|
318
341
|
listConfig,
|
|
319
342
|
listDependentTasks,
|
|
@@ -349,7 +372,7 @@ export {
|
|
|
349
372
|
registerRebuildCommand,
|
|
350
373
|
registerReflectCommand,
|
|
351
374
|
registerReplayCommand,
|
|
352
|
-
|
|
375
|
+
registerReweaveCommand,
|
|
353
376
|
registerTailscaleCommands,
|
|
354
377
|
registerTailscaleDiscoverCommand,
|
|
355
378
|
registerTailscaleServeCommand,
|
|
@@ -364,14 +387,17 @@ export {
|
|
|
364
387
|
resolveLlmProvider,
|
|
365
388
|
resolvePeerIP,
|
|
366
389
|
resolveVaultPath,
|
|
390
|
+
reweave,
|
|
391
|
+
reweaveCommand,
|
|
367
392
|
runPromptInjection,
|
|
368
393
|
runReflection,
|
|
394
|
+
sentenceChunk,
|
|
369
395
|
serveVault,
|
|
370
396
|
sessionRecapCommand,
|
|
371
397
|
setConfigValue,
|
|
372
398
|
setupCommand,
|
|
373
399
|
stopTailscaleServe,
|
|
374
|
-
|
|
400
|
+
stripSupersededObservations,
|
|
375
401
|
syncKanbanBoard,
|
|
376
402
|
syncWithPeer,
|
|
377
403
|
tailscaleDiscoverCommand,
|
|
@@ -67,7 +67,7 @@ interface LlmCompletionOptions {
|
|
|
67
67
|
maxTokens?: number;
|
|
68
68
|
fetchImpl?: typeof fetch;
|
|
69
69
|
}
|
|
70
|
-
declare function resolveLlmProvider(): LlmProvider | null
|
|
70
|
+
declare function resolveLlmProvider(fetchImpl?: typeof fetch): Promise<LlmProvider | null>;
|
|
71
71
|
declare function requestLlmCompletion(options: LlmCompletionOptions): Promise<string>;
|
|
72
72
|
|
|
73
73
|
declare const INJECTABLE_CATEGORIES: readonly ["rules", "decisions", "preferences"];
|