clawvault 3.2.0 → 3.3.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/README.md +54 -14
- package/bin/clawvault.js +0 -2
- package/bin/command-registration.test.js +13 -1
- package/bin/help-contract.test.js +14 -0
- package/bin/register-core-commands.js +88 -0
- package/bin/register-core-commands.test.js +80 -0
- package/bin/register-maintenance-commands.js +57 -6
- package/bin/register-query-commands.js +10 -28
- package/bin/test-helpers/cli-command-fixtures.js +1 -0
- package/dist/chunk-2PKBIKDH.js +130 -0
- package/dist/{chunk-2JQ3O2YL.js → chunk-5EFSWZO6.js} +3 -3
- package/dist/{chunk-77Q5CSPJ.js → chunk-7SWP5FKU.js} +33 -701
- package/dist/{chunk-URXDAUVH.js → chunk-AXSJIFOJ.js} +174 -1
- package/dist/{chunk-23YDQ3QU.js → chunk-BLQXXX7Q.js} +6 -6
- package/dist/chunk-CSHO3PJB.js +684 -0
- package/dist/{chunk-SLXOR3CC.js → chunk-DOIUYIXV.js} +2 -2
- package/dist/{chunk-NCKFNBHJ.js → chunk-DVOUSOR3.js} +79 -5
- package/dist/{chunk-CLJTREDS.js → chunk-ECGJYWNA.js} +193 -41
- package/dist/{chunk-BUEW6IIK.js → chunk-EL6UBSX5.js} +5 -5
- package/dist/{chunk-6FH3IULF.js → chunk-FZ5I2NF7.js} +1 -1
- package/dist/{chunk-ZN54U2OZ.js → chunk-GFCHWMGD.js} +3 -3
- package/dist/{chunk-GNJL4YGR.js → chunk-GJO3CFUN.js} +30 -6
- package/dist/chunk-H3JZIB5O.js +322 -0
- package/dist/chunk-HEHO7SMV.js +51 -0
- package/dist/{chunk-STCQGCEQ.js → chunk-HGDDW24U.js} +3 -3
- package/dist/chunk-J3YUXVID.js +907 -0
- package/dist/{chunk-Y6VJKXGL.js → chunk-KCYWJDDW.js} +1 -1
- package/dist/{chunk-W4SPAEE7.js → chunk-OFOCU2V4.js} +5 -4
- package/dist/chunk-PTWPPVC7.js +972 -0
- package/dist/{chunk-QSHD36LH.js → chunk-QFWERBDP.js} +2 -2
- package/dist/{chunk-QSRRMEYM.js → chunk-S7N7HI5E.js} +1 -1
- package/dist/{chunk-PBACDKKP.js → chunk-T7E764W3.js} +3 -3
- package/dist/chunk-TDWFBDAQ.js +1016 -0
- package/dist/{chunk-ESVS6K2B.js → chunk-TWMI3SNN.js} +6 -5
- package/dist/{chunk-2RAZ4ZFE.js → chunk-VBILES4B.js} +1 -1
- package/dist/{chunk-ESFLMDRB.js → chunk-VXAGOLDP.js} +3 -3
- package/dist/chunk-YCUVAOFC.js +158 -0
- package/dist/{chunk-SS4B7P7V.js → chunk-YIDV4VV2.js} +1 -1
- package/dist/chunk-ZKWPCBYT.js +600 -0
- package/dist/cli/index.js +24 -24
- package/dist/commands/archive.js +2 -2
- package/dist/commands/benchmark.d.ts +12 -0
- package/dist/commands/benchmark.js +12 -0
- package/dist/commands/context.js +6 -5
- package/dist/commands/doctor.d.ts +8 -3
- package/dist/commands/doctor.js +6 -20
- package/dist/commands/embed.js +5 -4
- package/dist/commands/entities.js +1 -1
- package/dist/commands/graph.js +2 -2
- package/dist/commands/inbox.d.ts +23 -0
- package/dist/commands/inbox.js +11 -0
- package/dist/commands/inject.d.ts +1 -1
- package/dist/commands/inject.js +3 -3
- package/dist/commands/link.js +6 -6
- package/dist/commands/maintain.d.ts +32 -0
- package/dist/commands/maintain.js +12 -0
- package/dist/commands/migrate-observations.js +2 -2
- package/dist/commands/observe.js +9 -8
- package/dist/commands/rebuild-embeddings.js +47 -16
- package/dist/commands/rebuild.js +7 -6
- package/dist/commands/reflect.js +5 -5
- package/dist/commands/replay.js +8 -7
- package/dist/commands/setup.js +3 -2
- package/dist/commands/sleep.d.ts +1 -1
- package/dist/commands/sleep.js +17 -15
- package/dist/commands/status.js +26 -24
- package/dist/commands/sync-bd.js +2 -2
- package/dist/commands/tailscale.js +2 -2
- package/dist/commands/wake.d.ts +1 -1
- package/dist/commands/wake.js +8 -7
- package/dist/index.d.ts +168 -16
- package/dist/index.js +271 -108
- package/dist/{inject-DYUrDqQO.d.ts → inject-DEb_jpLi.d.ts} +3 -1
- package/dist/lib/config.js +1 -1
- package/dist/{types-BbWJoC1c.d.ts → types-DslKvCaj.d.ts} +51 -1
- package/hooks/clawvault/HOOK.md +22 -5
- package/hooks/clawvault/handler.js +213 -78
- package/hooks/clawvault/handler.test.js +109 -43
- package/hooks/clawvault/integrity.js +112 -0
- package/hooks/clawvault/integrity.test.js +32 -0
- package/hooks/clawvault/openclaw.plugin.json +133 -15
- package/openclaw.plugin.json +126 -20
- package/package.json +2 -2
- package/bin/register-workgraph-commands.js +0 -1368
- package/dist/chunk-33VSQP4J.js +0 -37
- package/dist/chunk-4BQTQMJP.js +0 -93
- package/dist/chunk-EK6S23ZB.js +0 -469
- package/dist/chunk-GAOWA7GR.js +0 -501
- package/dist/chunk-GGA32J2R.js +0 -784
- package/dist/chunk-MM6QGW3P.js +0 -207
- package/dist/chunk-QVEERJSP.js +0 -152
- package/dist/chunk-U4O6C46S.js +0 -154
- package/dist/chunk-VSL7KY3M.js +0 -189
- package/dist/chunk-WMGIIABP.js +0 -15
- package/dist/commands/workgraph.d.ts +0 -124
- package/dist/commands/workgraph.js +0 -38
- package/dist/ledger-B7g7jhqG.d.ts +0 -44
- package/dist/registry-BR4326o0.d.ts +0 -30
- package/dist/store-CA-6sKCJ.d.ts +0 -34
- package/dist/thread-B9LhXNU0.d.ts +0 -41
- package/dist/workgraph/index.d.ts +0 -5
- package/dist/workgraph/index.js +0 -23
- package/dist/workgraph/ledger.d.ts +0 -2
- package/dist/workgraph/ledger.js +0 -25
- package/dist/workgraph/registry.d.ts +0 -2
- package/dist/workgraph/registry.js +0 -19
- package/dist/workgraph/store.d.ts +0 -2
- package/dist/workgraph/store.js +0 -25
- package/dist/workgraph/thread.d.ts +0 -2
- package/dist/workgraph/thread.js +0 -25
- package/dist/workgraph/types.d.ts +0 -54
- package/dist/workgraph/types.js +0 -7
package/dist/commands/wake.js
CHANGED
|
@@ -2,22 +2,23 @@ import {
|
|
|
2
2
|
recover
|
|
3
3
|
} from "../chunk-OIWVQYQF.js";
|
|
4
4
|
import "../chunk-7ZRP733D.js";
|
|
5
|
+
import {
|
|
6
|
+
clearDirtyFlag
|
|
7
|
+
} from "../chunk-F55HGNU4.js";
|
|
5
8
|
import {
|
|
6
9
|
ClawVault
|
|
7
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-ECGJYWNA.js";
|
|
11
|
+
import "../chunk-2CDEETQN.js";
|
|
12
|
+
import "../chunk-FZ5I2NF7.js";
|
|
13
|
+
import "../chunk-PTWPPVC7.js";
|
|
14
|
+
import "../chunk-H3JZIB5O.js";
|
|
8
15
|
import {
|
|
9
16
|
parseObservationMarkdown
|
|
10
17
|
} from "../chunk-FHFUXL6G.js";
|
|
11
|
-
import "../chunk-6FH3IULF.js";
|
|
12
|
-
import "../chunk-EK6S23ZB.js";
|
|
13
|
-
import "../chunk-2CDEETQN.js";
|
|
14
18
|
import "../chunk-33DOSHTA.js";
|
|
15
19
|
import {
|
|
16
20
|
listObservationFiles
|
|
17
21
|
} from "../chunk-Z2XBWN7A.js";
|
|
18
|
-
import {
|
|
19
|
-
clearDirtyFlag
|
|
20
|
-
} from "../chunk-F55HGNU4.js";
|
|
21
22
|
import "../chunk-2ZDO52B4.js";
|
|
22
23
|
|
|
23
24
|
// src/commands/wake.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
|
-
import { V as VaultConfig,
|
|
3
|
-
export {
|
|
2
|
+
import { V as VaultConfig, S as StoreOptions, D as Document, P as PatchOptions, a as SearchOptions, b as SearchResult, c as SyncOptions, d as SyncResult, C as Category, M as MemoryType, H as HandoffDocument, e as SessionRecap, f as VaultSearchConfig } from './types-DslKvCaj.js';
|
|
3
|
+
export { g as DEFAULT_CATEGORIES, h as DEFAULT_CONFIG, E as EmbeddingProvider, i as MEMORY_TYPES, j as PatchMode, R as RerankProvider, k as SearchBackend, T as TYPE_TO_CATEGORY, l as VaultMeta } from './types-DslKvCaj.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
|
+
export { BenchmarkObserverCommandOptions, benchmarkObserverCommand, registerBenchmarkCommand } from './commands/benchmark.js';
|
|
8
9
|
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
|
-
import { L as LlmProvider } from './inject-
|
|
10
|
-
export { I as InjectCommandOptions,
|
|
10
|
+
import { L as LlmProvider, a as LlmModelTier } from './inject-DEb_jpLi.js';
|
|
11
|
+
export { I as InjectCommandOptions, b as InjectFormat, c as InjectMatch, d as InjectMatchReason, e as InjectMatchSource, f as InjectResult, g as InjectRuntimeOptions, h as InjectSourceCategory, i as InjectableItem, j as LlmCompletionOptions, M as MEMORY_GRAPH_SCHEMA_VERSION, k as MemoryGraph, l as MemoryGraphEdge, m as MemoryGraphEdgeType, n as MemoryGraphIndex, o as MemoryGraphNode, p as MemoryGraphNodeType, q as MemoryGraphStats, r as buildInjectionResult, s as buildOrUpdateMemoryGraphIndex, t as deterministicInjectMatches, u as getMemoryGraph, v as indexInjectableItems, w as injectCommand, x as loadMemoryGraphIndex, y as registerInjectCommand, z as requestLlmCompletion, A as resolveLlmProvider, B as runPromptInjection } from './inject-DEb_jpLi.js';
|
|
11
12
|
export { ObserveCommandOptions, observeCommand, registerObserveCommand } from './commands/observe.js';
|
|
12
13
|
export { ReflectCommandOptions, reflectCommand, registerReflectCommand } from './commands/reflect.js';
|
|
13
14
|
export { ArchiveCommandOptions, archiveCommand, registerArchiveCommand } from './commands/archive.js';
|
|
14
15
|
export { RebuildCommandOptions, rebuildCommand, registerRebuildCommand } from './commands/rebuild.js';
|
|
15
16
|
import { MigrationIssueType } from './commands/doctor.js';
|
|
16
|
-
export { DoctorCheck, DoctorReport, DoctorStatus, MigrationIssue, doctor } from './commands/doctor.js';
|
|
17
|
+
export { DoctorCheck, DoctorOptions, DoctorReport, DoctorStatus, MigrationIssue, doctor } from './commands/doctor.js';
|
|
17
18
|
export { EmbedCommandOptions, EmbedCommandResult, embedCommand, registerEmbedCommand } from './commands/embed.js';
|
|
19
|
+
export { InboxAddCommandOptions, inboxAddCommand, registerInboxCommand } from './commands/inbox.js';
|
|
20
|
+
export { MaintainCommandOptions, maintainCommand, registerMaintainCommand } from './commands/maintain.js';
|
|
18
21
|
export { ReplayCommandOptions, registerReplayCommand, replayCommand } from './commands/replay.js';
|
|
19
22
|
export { MigrateObservationsOptions, MigrateObservationsResult, migrateObservations, migrateObservationsCommand, registerMigrateObservationsCommand } from './commands/migrate-observations.js';
|
|
20
23
|
export { SyncBdCommandOptions, registerSyncBdCommand, syncBdCommand } from './commands/sync-bd.js';
|
|
@@ -64,20 +67,24 @@ declare class ClawVault {
|
|
|
64
67
|
* Store a new document
|
|
65
68
|
*/
|
|
66
69
|
store(options: StoreOptions): Promise<Document>;
|
|
70
|
+
/**
|
|
71
|
+
* Patch an existing document and incrementally refresh index state for that file only.
|
|
72
|
+
*/
|
|
73
|
+
patch(options: PatchOptions): Promise<Document>;
|
|
67
74
|
/**
|
|
68
75
|
* Quick store to inbox
|
|
69
76
|
*/
|
|
70
77
|
capture(note: string, title?: string): Promise<Document>;
|
|
71
78
|
/**
|
|
72
|
-
* Search the vault (
|
|
79
|
+
* Search the vault (in-process hybrid by default, qmd fallback optional)
|
|
73
80
|
*/
|
|
74
81
|
find(query: string, options?: SearchOptions): Promise<SearchResult[]>;
|
|
75
82
|
/**
|
|
76
|
-
* Semantic/vector search (
|
|
83
|
+
* Semantic/vector search (hosted embeddings, qmd fallback optional)
|
|
77
84
|
*/
|
|
78
85
|
vsearch(query: string, options?: SearchOptions): Promise<SearchResult[]>;
|
|
79
86
|
/**
|
|
80
|
-
* Combined search
|
|
87
|
+
* Combined search entrypoint (currently aliases hybrid search)
|
|
81
88
|
*/
|
|
82
89
|
query(query: string, options?: SearchOptions): Promise<SearchResult[]>;
|
|
83
90
|
/**
|
|
@@ -164,6 +171,13 @@ declare class ClawVault {
|
|
|
164
171
|
* Handles Date objects, strings, and undefined values.
|
|
165
172
|
*/
|
|
166
173
|
private toDateString;
|
|
174
|
+
private reindexDocument;
|
|
175
|
+
private resolveDocumentRelativePath;
|
|
176
|
+
private splitFrontmatter;
|
|
177
|
+
private applyPatchToBody;
|
|
178
|
+
private appendText;
|
|
179
|
+
private replaceAllOccurrences;
|
|
180
|
+
private patchMarkdownSection;
|
|
167
181
|
/**
|
|
168
182
|
* Extract the date portion (YYYY-MM-DD) from an ISO date string or Date object.
|
|
169
183
|
* Provides safe handling for various date formats.
|
|
@@ -215,8 +229,8 @@ declare function migrateCommand(options?: MigrateCommandOptions): Promise<Migrat
|
|
|
215
229
|
declare function registerMigrateCommand(program: Command): void;
|
|
216
230
|
|
|
217
231
|
/**
|
|
218
|
-
* ClawVault Search Engine
|
|
219
|
-
*
|
|
232
|
+
* ClawVault Search Engine
|
|
233
|
+
* In-process hybrid retrieval is default; qmd remains optional fallback.
|
|
220
234
|
*/
|
|
221
235
|
|
|
222
236
|
declare const QMD_INSTALL_URL = "https://github.com/tobi/qmd";
|
|
@@ -254,11 +268,13 @@ declare function qmdEmbed(collection?: string, indexName?: string): void;
|
|
|
254
268
|
* QMD Search Engine - wraps qmd CLI
|
|
255
269
|
*/
|
|
256
270
|
declare class SearchEngine {
|
|
257
|
-
private
|
|
271
|
+
private readonly inProcess;
|
|
258
272
|
private collection;
|
|
259
273
|
private vaultPath;
|
|
260
274
|
private collectionRoot;
|
|
261
275
|
private qmdIndexName?;
|
|
276
|
+
private searchConfig;
|
|
277
|
+
setSearchConfig(config?: VaultSearchConfig): void;
|
|
262
278
|
/**
|
|
263
279
|
* Set the collection name (usually vault name)
|
|
264
280
|
*/
|
|
@@ -295,15 +311,17 @@ declare class SearchEngine {
|
|
|
295
311
|
/**
|
|
296
312
|
* BM25 search via qmd
|
|
297
313
|
*/
|
|
298
|
-
search(query: string, options?: SearchOptions): SearchResult[]
|
|
314
|
+
search(query: string, options?: SearchOptions): Promise<SearchResult[]>;
|
|
299
315
|
/**
|
|
300
316
|
* Vector/semantic search via qmd vsearch
|
|
301
317
|
*/
|
|
302
|
-
vsearch(query: string, options?: SearchOptions): SearchResult[]
|
|
318
|
+
vsearch(query: string, options?: SearchOptions): Promise<SearchResult[]>;
|
|
303
319
|
/**
|
|
304
320
|
* Combined search with query expansion (qmd query command)
|
|
305
321
|
*/
|
|
306
|
-
query(query: string, options?: SearchOptions): SearchResult[]
|
|
322
|
+
query(query: string, options?: SearchOptions): Promise<SearchResult[]>;
|
|
323
|
+
private runSearchWithFallback;
|
|
324
|
+
private runInProcessQuery;
|
|
307
325
|
private runQmdQuery;
|
|
308
326
|
/**
|
|
309
327
|
* Convert qmd results to ClawVault SearchResult format
|
|
@@ -434,12 +452,18 @@ declare const OBSERVER_COMPRESSION_PROVIDERS: readonly ["anthropic", "openai", "
|
|
|
434
452
|
declare const THEMES: readonly ["neural", "minimal", "none"];
|
|
435
453
|
declare const CONTEXT_PROFILES: readonly ["default", "planning", "incident", "handoff", "auto"];
|
|
436
454
|
declare const FACT_EXTRACTION_MODES: readonly ["off", "rule", "llm", "hybrid"];
|
|
455
|
+
declare const SEARCH_BACKENDS: readonly ["in-process", "qmd"];
|
|
456
|
+
declare const SEARCH_EMBEDDING_PROVIDERS: readonly ["none", "openai", "gemini", "ollama"];
|
|
457
|
+
declare const SEARCH_RERANK_PROVIDERS: readonly ["none", "jina", "voyage", "siliconflow", "pinecone"];
|
|
437
458
|
type ObserveProvider = (typeof OBSERVE_PROVIDERS)[number];
|
|
438
459
|
type ObserverCompressionProvider = (typeof OBSERVER_COMPRESSION_PROVIDERS)[number];
|
|
439
460
|
type Theme = (typeof THEMES)[number];
|
|
440
461
|
type ContextProfile = (typeof CONTEXT_PROFILES)[number];
|
|
441
462
|
type FactExtractionMode$1 = (typeof FACT_EXTRACTION_MODES)[number];
|
|
442
|
-
type
|
|
463
|
+
type SearchBackend = (typeof SEARCH_BACKENDS)[number];
|
|
464
|
+
type SearchEmbeddingProvider = (typeof SEARCH_EMBEDDING_PROVIDERS)[number];
|
|
465
|
+
type SearchRerankProvider = (typeof SEARCH_RERANK_PROVIDERS)[number];
|
|
466
|
+
type ManagedConfigKey = 'name' | 'categories' | 'theme' | 'models.background' | 'models.default' | 'models.complex' | 'observe.model' | 'observe.provider' | 'observer.compression.provider' | 'observer.compression.model' | 'observer.compression.baseUrl' | 'observer.compression.apiKey' | 'observer.factExtractionMode' | 'context.maxResults' | 'context.defaultProfile' | 'graph.maxHops' | 'inject.maxResults' | 'inject.useLlm' | 'inject.scope' | 'search.backend' | 'search.qmdFallback' | 'search.chunkSize' | 'search.chunkOverlap' | 'search.embeddings.provider' | 'search.embeddings.model' | 'search.embeddings.baseUrl' | 'search.embeddings.apiKey' | 'search.rerank.provider' | 'search.rerank.model' | 'search.rerank.endpoint' | 'search.rerank.apiKey' | 'search.rerank.weight';
|
|
443
467
|
interface RouteRule {
|
|
444
468
|
pattern: string;
|
|
445
469
|
target: string;
|
|
@@ -472,6 +496,7 @@ type FactExtractionMode = 'off' | 'rule' | 'llm' | 'hybrid';
|
|
|
472
496
|
interface LlmAdapterOptions {
|
|
473
497
|
provider?: LlmProvider | null;
|
|
474
498
|
model?: string;
|
|
499
|
+
tier?: LlmModelTier;
|
|
475
500
|
temperature?: number;
|
|
476
501
|
maxTokens?: number;
|
|
477
502
|
fetchImpl?: typeof fetch;
|
|
@@ -751,9 +776,18 @@ declare class Compressor {
|
|
|
751
776
|
* Also fixes trailing word fragments fused after closing brackets.
|
|
752
777
|
*/
|
|
753
778
|
private sanitizeWikiLinks;
|
|
779
|
+
private static readonly SCENE_SETTER_RE;
|
|
780
|
+
private static readonly ACK_NOISE_RE;
|
|
781
|
+
private isNoiseObservation;
|
|
754
782
|
private enforceImportanceRules;
|
|
755
783
|
private enforceImportanceForRecord;
|
|
756
784
|
private fallbackCompression;
|
|
785
|
+
private toFallbackCandidate;
|
|
786
|
+
private shouldDropLowSignalCandidate;
|
|
787
|
+
private stripConversationLeadIn;
|
|
788
|
+
private stripTimePrefix;
|
|
789
|
+
private calibrateFallbackCandidate;
|
|
790
|
+
private buildRoutineMaintenanceSummary;
|
|
757
791
|
private mergeObservations;
|
|
758
792
|
private mergeRecord;
|
|
759
793
|
private renderSections;
|
|
@@ -943,6 +977,124 @@ declare class SessionWatcher {
|
|
|
943
977
|
|
|
944
978
|
declare function parseSessionFile(filePath: string): string[];
|
|
945
979
|
|
|
980
|
+
declare const OBSERVATION_TYPES: readonly ["decision", "preference", "fact", "commitment", "task", "todo", "commitment-unresolved", "milestone", "lesson", "relationship", "project"];
|
|
981
|
+
type ObservationType = typeof OBSERVATION_TYPES[number];
|
|
982
|
+
type LegacyObservationPriority = '🔴' | '🟡' | '🟢';
|
|
983
|
+
type ObservationLineKind = 'scored' | 'emoji';
|
|
984
|
+
interface ParsedObservationRecord {
|
|
985
|
+
date: string;
|
|
986
|
+
type: ObservationType;
|
|
987
|
+
confidence: number;
|
|
988
|
+
importance: number;
|
|
989
|
+
content: string;
|
|
990
|
+
format: ObservationLineKind;
|
|
991
|
+
priority?: LegacyObservationPriority;
|
|
992
|
+
time?: string;
|
|
993
|
+
rawLine: string;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
type ObserverBenchmarkProvider = CompressionProvider | 'mock';
|
|
997
|
+
type ObserverBenchmarkReportFormat = 'json' | 'text';
|
|
998
|
+
interface ObserverBenchmarkFixtureConfig {
|
|
999
|
+
now?: string;
|
|
1000
|
+
existingObservations?: string;
|
|
1001
|
+
compression?: {
|
|
1002
|
+
provider?: ObserverBenchmarkProvider;
|
|
1003
|
+
model?: string;
|
|
1004
|
+
baseUrl?: string;
|
|
1005
|
+
apiKey?: string;
|
|
1006
|
+
};
|
|
1007
|
+
scoring?: {
|
|
1008
|
+
matchThreshold?: number;
|
|
1009
|
+
minimumImportanceForRecall?: number;
|
|
1010
|
+
keywordHints?: string[];
|
|
1011
|
+
};
|
|
1012
|
+
}
|
|
1013
|
+
interface ObserverBenchmarkFixture {
|
|
1014
|
+
id: string;
|
|
1015
|
+
dir: string;
|
|
1016
|
+
transcriptPath: string;
|
|
1017
|
+
expectedPath: string;
|
|
1018
|
+
transcript: string;
|
|
1019
|
+
expected: string;
|
|
1020
|
+
config: ObserverBenchmarkFixtureConfig;
|
|
1021
|
+
}
|
|
1022
|
+
interface ObservationMatch {
|
|
1023
|
+
expectedIndex: number;
|
|
1024
|
+
actualIndex: number;
|
|
1025
|
+
similarity: number;
|
|
1026
|
+
}
|
|
1027
|
+
interface KeywordRewriteFlag {
|
|
1028
|
+
expected: string;
|
|
1029
|
+
actual: string;
|
|
1030
|
+
missingTerms: string[];
|
|
1031
|
+
}
|
|
1032
|
+
interface FixtureScoringMetrics {
|
|
1033
|
+
precision: number;
|
|
1034
|
+
noiseRatio: number;
|
|
1035
|
+
recall: number;
|
|
1036
|
+
typeAccuracy: number;
|
|
1037
|
+
keywordPreservation: number;
|
|
1038
|
+
overall: number;
|
|
1039
|
+
}
|
|
1040
|
+
interface FixtureScoringResult {
|
|
1041
|
+
metrics: FixtureScoringMetrics;
|
|
1042
|
+
matches: ObservationMatch[];
|
|
1043
|
+
missedImportant: ParsedObservationRecord[];
|
|
1044
|
+
noiseObservations: ParsedObservationRecord[];
|
|
1045
|
+
keywordSet: string[];
|
|
1046
|
+
missingKeywords: string[];
|
|
1047
|
+
keywordRewriteFlags: KeywordRewriteFlag[];
|
|
1048
|
+
}
|
|
1049
|
+
interface BenchmarkFixtureResult {
|
|
1050
|
+
fixtureId: string;
|
|
1051
|
+
transcriptPath: string;
|
|
1052
|
+
expectedPath: string;
|
|
1053
|
+
provider: ObserverBenchmarkProvider;
|
|
1054
|
+
model?: string;
|
|
1055
|
+
outputObservations: string;
|
|
1056
|
+
expectedCount: number;
|
|
1057
|
+
actualCount: number;
|
|
1058
|
+
expectedTypes: ObservationType[];
|
|
1059
|
+
actualTypes: ObservationType[];
|
|
1060
|
+
scoring: FixtureScoringResult;
|
|
1061
|
+
}
|
|
1062
|
+
interface ObserverBenchmarkReport {
|
|
1063
|
+
generatedAt: string;
|
|
1064
|
+
fixturesDir: string;
|
|
1065
|
+
provider: ObserverBenchmarkProvider;
|
|
1066
|
+
model?: string;
|
|
1067
|
+
fixtureCount: number;
|
|
1068
|
+
aggregate: FixtureScoringMetrics;
|
|
1069
|
+
fixtures: BenchmarkFixtureResult[];
|
|
1070
|
+
}
|
|
1071
|
+
interface ObserverBenchmarkRunOptions {
|
|
1072
|
+
fixturesDir: string;
|
|
1073
|
+
provider?: ObserverBenchmarkProvider;
|
|
1074
|
+
model?: string;
|
|
1075
|
+
}
|
|
1076
|
+
interface ScoreFixtureOptions {
|
|
1077
|
+
minimumImportanceForRecall?: number;
|
|
1078
|
+
matchThreshold?: number;
|
|
1079
|
+
keywordHints?: string[];
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
declare function loadObserverBenchmarkFixtures(fixturesDir: string): ObserverBenchmarkFixture[];
|
|
1083
|
+
|
|
1084
|
+
declare function runObserverBenchmark(options: ObserverBenchmarkRunOptions): Promise<ObserverBenchmarkReport>;
|
|
1085
|
+
|
|
1086
|
+
declare function extractKeywordSetFromTranscript(transcript: string, hints?: string[]): string[];
|
|
1087
|
+
declare function matchObservationRecords(expected: ParsedObservationRecord[], actual: ParsedObservationRecord[], threshold?: number): ObservationMatch[];
|
|
1088
|
+
declare function scoreFixtureObservations(input: {
|
|
1089
|
+
transcript: string;
|
|
1090
|
+
expectedMarkdown: string;
|
|
1091
|
+
actualMarkdown: string;
|
|
1092
|
+
options?: ScoreFixtureOptions;
|
|
1093
|
+
}): FixtureScoringResult;
|
|
1094
|
+
declare function compareObservationText(left: string, right: string): boolean;
|
|
1095
|
+
|
|
1096
|
+
declare function formatObserverBenchmarkSummary(report: ObserverBenchmarkReport): string;
|
|
1097
|
+
|
|
946
1098
|
interface ArchiveObservationsOptions {
|
|
947
1099
|
olderThanDays?: number;
|
|
948
1100
|
dryRun?: boolean;
|
|
@@ -1001,4 +1153,4 @@ declare function runReflection(options: ReflectOptions): Promise<ReflectResult>;
|
|
|
1001
1153
|
declare const VERSION: string;
|
|
1002
1154
|
declare function registerCommanderCommands(program: Command): Command;
|
|
1003
1155
|
|
|
1004
|
-
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, EmbeddingCache, type ExtractedFact, type ExtractionResult, type FactExtractionMode$1 as FactExtractionMode, FactStore, type FactStoreStats, HandoffDocument, type LlmAdapter, type LlmAdapterOptions, LlmProvider, type ManagedConfigKey, MemoryType, type MigrateCommandOptions, type MigrateResult, type MigrationAction, MigrationIssueType, type ObserveCursorEntry, type ObserveCursorStore, type ObserveProvider, Observer, type ObserverCompressionProvider, type ObserverCompressor, type ObserverOptions, type ObserverReflector, type ObserverStalenessResult, QMD_INSTALL_COMMAND, QMD_INSTALL_URL, QmdConfigurationError, type QmdErrorCode, type QmdErrorDetails, 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, cosineSimilarity, countBlockedTransitions, createDefaultAdapter, createFactExtractionAdapter, createGeminiFlashAdapter, createLlmFunction, createVault, embed, embedBatch, extractFactsLlm, extractFactsRuleBased, extractTags, extractWikiLinks, factId, findVault, formatTransitionsTable, getConfig, getConfigValue, getObserverStaleness, getQmdErrorDetails, getScaledObservationThresholdBytes, hasQmd, hybridSearch, isRegression, listConfig, listRouteRules, matchRouteRule, migrate, migrateCommand, normalizeEntity, observeActiveSessions, parseSessionFile, parseSessionSourceLabel, qmdEmbed, qmdUpdate, queryTransitions, readAllTransitions, reciprocalRankFusion, registerCommanderCommands, registerMigrateCommand, removeRouteRule, resetConfig, resolveFactExtractionMode, runReflection, semanticSearch, setConfigValue, testRouteRule };
|
|
1156
|
+
export { type ActiveObservationCandidate, type ActiveObservationFailure, type ActiveObserveOptions, type ActiveObserveResult, type ArchiveObservationsOptions, type ArchiveObservationsResult, type BenchmarkFixtureResult, Category, ClawVault, type CompressionProvider, Compressor, type CompressorOptions, type ContextProfile as ConfigDefaultProfile, type SearchBackend as ConfigSearchBackend, type SearchEmbeddingProvider as ConfigSearchEmbeddingProvider, type SearchRerankProvider as ConfigSearchRerankProvider, Document, EmbeddingCache, type ExtractedFact, type ExtractionResult, type FactExtractionMode$1 as FactExtractionMode, FactStore, type FactStoreStats, type FixtureScoringMetrics, type FixtureScoringResult, HandoffDocument, type KeywordRewriteFlag, type LlmAdapter, type LlmAdapterOptions, LlmProvider, type ManagedConfigKey, MemoryType, type MigrateCommandOptions, type MigrateResult, type MigrationAction, MigrationIssueType, type ObservationMatch, type ObserveCursorEntry, type ObserveCursorStore, type ObserveProvider, Observer, type ObserverBenchmarkFixture, type ObserverBenchmarkFixtureConfig, type ObserverBenchmarkProvider, type ObserverBenchmarkReport, type ObserverBenchmarkReportFormat, type ObserverBenchmarkRunOptions, type ObserverCompressionProvider, type ObserverCompressor, type ObserverOptions, type ObserverReflector, type ObserverStalenessResult, PatchOptions, QMD_INSTALL_COMMAND, QMD_INSTALL_URL, QmdConfigurationError, type QmdErrorCode, type QmdErrorDetails, QmdUnavailableError, type ReflectOptions, type ReflectResult, Reflector, type ReflectorOptions, type RouteRule, SUPPORTED_CONFIG_KEYS, type ScoreFixtureOptions, SearchEngine, SearchOptions, SearchResult, SessionRecap, SessionWatcher, type SessionWatcherOptions, StoreOptions, SyncOptions, SyncResult, type Theme, type TransitionEvent, VERSION, VaultConfig, VaultSearchConfig, addRouteRule, appendTransition, archiveObservations, buildTransitionEvent, compareObservationText, cosineSimilarity, countBlockedTransitions, createDefaultAdapter, createFactExtractionAdapter, createGeminiFlashAdapter, createLlmFunction, createVault, embed, embedBatch, extractFactsLlm, extractFactsRuleBased, extractKeywordSetFromTranscript, extractTags, extractWikiLinks, factId, findVault, formatObserverBenchmarkSummary, formatTransitionsTable, getConfig, getConfigValue, getObserverStaleness, getQmdErrorDetails, getScaledObservationThresholdBytes, hasQmd, hybridSearch, isRegression, listConfig, listRouteRules, loadObserverBenchmarkFixtures, matchObservationRecords, matchRouteRule, migrate, migrateCommand, normalizeEntity, observeActiveSessions, parseSessionFile, parseSessionSourceLabel, qmdEmbed, qmdUpdate, queryTransitions, readAllTransitions, reciprocalRankFusion, registerCommanderCommands, registerMigrateCommand, removeRouteRule, resetConfig, resolveFactExtractionMode, runObserverBenchmark, runReflection, scoreFixtureObservations, semanticSearch, setConfigValue, testRouteRule };
|