clawvault 2.5.1 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +159 -199
- package/bin/clawvault.js +111 -111
- package/bin/command-registration.test.js +166 -165
- package/bin/command-runtime.js +93 -77
- package/bin/command-runtime.test.js +154 -102
- package/bin/help-contract.test.js +39 -28
- package/bin/register-config-commands.js +153 -153
- package/bin/register-config-route-commands.test.js +121 -121
- package/bin/register-core-commands.js +237 -237
- package/bin/register-kanban-commands.js +56 -56
- package/bin/register-kanban-commands.test.js +83 -83
- package/bin/register-maintenance-commands.js +282 -248
- package/bin/register-project-commands.js +209 -209
- package/bin/register-project-commands.test.js +206 -201
- package/bin/register-query-commands.js +317 -312
- package/bin/register-query-commands.test.js +65 -0
- package/bin/register-resilience-commands.js +182 -182
- package/bin/register-resilience-commands.test.js +81 -81
- package/bin/register-route-commands.js +114 -114
- package/bin/register-session-lifecycle-commands.js +206 -206
- package/bin/register-tailscale-commands.js +106 -106
- package/bin/register-task-commands.js +348 -348
- package/bin/register-task-commands.test.js +69 -69
- package/bin/register-template-commands.js +72 -72
- package/bin/register-vault-operations-commands.js +300 -300
- package/bin/test-helpers/cli-command-fixtures.js +119 -119
- package/dashboard/lib/graph-diff.js +104 -104
- package/dashboard/lib/graph-diff.test.js +75 -75
- package/dashboard/lib/vault-parser.js +556 -556
- package/dashboard/lib/vault-parser.test.js +254 -254
- package/dashboard/public/app.js +796 -796
- package/dashboard/public/index.html +52 -52
- package/dashboard/public/styles.css +221 -221
- package/dashboard/server.js +374 -374
- package/dist/{chunk-G3OQJ2NQ.js → chunk-2YDBJS7M.js} +1 -1
- package/dist/chunk-3FP5BJ42.js +88 -0
- package/dist/{chunk-C3PF7WBA.js → chunk-4IV3R2F5.js} +2 -2
- package/dist/{chunk-7OHQFMJK.js → chunk-AY4PGUVL.js} +5 -4
- package/dist/chunk-FG6RJMCN.js +33 -0
- package/dist/{chunk-WIICLBNF.js → chunk-GFJ3LIIB.js} +1 -1
- package/dist/chunk-IZEY5S74.js +541 -0
- package/dist/chunk-LMEMZGUV.js +332 -0
- package/dist/{chunk-6RQPD7X6.js → chunk-M25QVSJM.js} +4 -3
- package/dist/{chunk-6B3JWM7J.js → chunk-O7XHXF7F.js} +34 -7
- package/dist/chunk-OSMS7QIG.js +406 -0
- package/dist/{chunk-PAYUH64O.js → chunk-QVMXF7FY.js} +11 -1
- package/dist/{chunk-TMZMN7OS.js → chunk-S2IG7VNM.js} +24 -12
- package/dist/{chunk-LMCC5OC7.js → chunk-TPDH3JPP.js} +1 -1
- package/dist/cli/index.d.ts +5 -0
- package/dist/cli/index.js +31 -0
- package/dist/commands/canvas.js +3 -3
- package/dist/commands/compat.js +1 -1
- package/dist/commands/context.js +4 -4
- package/dist/commands/doctor.js +16 -309
- package/dist/commands/embed.d.ts +17 -0
- package/dist/commands/embed.js +10 -0
- package/dist/commands/migrate-observations.js +2 -2
- package/dist/commands/observe.d.ts +1 -0
- package/dist/commands/observe.js +7 -6
- package/dist/commands/rebuild.js +5 -5
- package/dist/commands/reflect.js +3 -3
- package/dist/commands/replay.js +7 -7
- package/dist/commands/setup.d.ts +1 -0
- package/dist/commands/setup.js +2 -2
- package/dist/commands/sleep.d.ts +2 -1
- package/dist/commands/sleep.js +15 -15
- package/dist/commands/status.d.ts +9 -1
- package/dist/commands/status.js +33 -8
- package/dist/commands/wake.d.ts +1 -1
- package/dist/commands/wake.js +6 -6
- package/dist/index.d.ts +82 -5
- package/dist/index.js +127 -105
- package/dist/{types-jjuYN2Xn.d.ts → types-C74wgGL1.d.ts} +2 -0
- package/hooks/clawvault/HOOK.md +83 -74
- package/hooks/clawvault/handler.js +816 -812
- package/hooks/clawvault/handler.test.js +263 -263
- package/package.json +94 -125
- package/templates/checkpoint.md +19 -19
- package/templates/daily-note.md +19 -19
- package/templates/daily.md +19 -19
- package/templates/decision.md +17 -17
- package/templates/handoff.md +19 -19
- package/templates/lesson.md +16 -16
- package/templates/person.md +19 -19
- package/templates/project.md +23 -23
- package/dist/chunk-2RK2AG32.js +0 -743
- package/dist/{chunk-FW465EEA.js → chunk-VXEOHTSL.js} +3 -3
- package/dist/{chunk-KCCHROBR.js → chunk-YOSEUUNB.js} +4 -4
package/dist/commands/status.js
CHANGED
|
@@ -5,17 +5,28 @@ import {
|
|
|
5
5
|
scanVaultLinks
|
|
6
6
|
} from "../chunk-4VQTUVH7.js";
|
|
7
7
|
import "../chunk-J7ZWCI2C.js";
|
|
8
|
+
import {
|
|
9
|
+
getObserverStaleness
|
|
10
|
+
} from "../chunk-IZEY5S74.js";
|
|
11
|
+
import "../chunk-HRLWZGMA.js";
|
|
12
|
+
import "../chunk-S2IG7VNM.js";
|
|
13
|
+
import "../chunk-5GZFTAL7.js";
|
|
8
14
|
import {
|
|
9
15
|
ClawVault
|
|
10
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-AY4PGUVL.js";
|
|
17
|
+
import "../chunk-FHFUXL6G.js";
|
|
11
18
|
import {
|
|
12
19
|
QmdUnavailableError,
|
|
13
|
-
hasQmd
|
|
14
|
-
|
|
20
|
+
hasQmd,
|
|
21
|
+
withQmdIndexArgs
|
|
22
|
+
} from "../chunk-O7XHXF7F.js";
|
|
23
|
+
import "../chunk-ITPEXLHA.js";
|
|
15
24
|
import "../chunk-2CDEETQN.js";
|
|
16
25
|
import {
|
|
17
26
|
loadMemoryGraphIndex
|
|
18
27
|
} from "../chunk-ZZA73MFY.js";
|
|
28
|
+
import "../chunk-Z2XBWN7A.js";
|
|
29
|
+
import "../chunk-IOALNTAN.js";
|
|
19
30
|
|
|
20
31
|
// src/commands/status.ts
|
|
21
32
|
import * as fs from "fs";
|
|
@@ -76,8 +87,8 @@ function parseQmdCollectionsText(raw) {
|
|
|
76
87
|
}
|
|
77
88
|
return names;
|
|
78
89
|
}
|
|
79
|
-
function getQmdIndexStatus(collection, root) {
|
|
80
|
-
const output = execFileSync("qmd", ["collection", "list"], { encoding: "utf-8" });
|
|
90
|
+
function getQmdIndexStatus(collection, root, indexName) {
|
|
91
|
+
const output = execFileSync("qmd", withQmdIndexArgs(["collection", "list"], indexName), { encoding: "utf-8" });
|
|
81
92
|
const names = parseQmdCollectionsText(output);
|
|
82
93
|
if (names.includes(collection)) {
|
|
83
94
|
return "present";
|
|
@@ -96,7 +107,7 @@ function loadCheckpoint(vaultPath) {
|
|
|
96
107
|
return { data: null, error: err?.message || "Failed to parse checkpoint" };
|
|
97
108
|
}
|
|
98
109
|
}
|
|
99
|
-
async function getStatus(vaultPath) {
|
|
110
|
+
async function getStatus(vaultPath, options = {}) {
|
|
100
111
|
if (!hasQmd()) {
|
|
101
112
|
throw new QmdUnavailableError();
|
|
102
113
|
}
|
|
@@ -130,7 +141,7 @@ async function getStatus(vaultPath) {
|
|
|
130
141
|
let qmdIndexStatus = "missing";
|
|
131
142
|
let qmdError;
|
|
132
143
|
try {
|
|
133
|
-
qmdIndexStatus = getQmdIndexStatus(qmdCollection, qmdRoot);
|
|
144
|
+
qmdIndexStatus = getQmdIndexStatus(qmdCollection, qmdRoot, options.qmdIndexName);
|
|
134
145
|
if (qmdIndexStatus !== "present") {
|
|
135
146
|
issues.push(`qmd collection ${qmdIndexStatus.replace("-", " ")}`);
|
|
136
147
|
}
|
|
@@ -171,6 +182,10 @@ async function getStatus(vaultPath) {
|
|
|
171
182
|
issues.push("Memory graph index stale");
|
|
172
183
|
}
|
|
173
184
|
}
|
|
185
|
+
const observerStaleness = getObserverStaleness(vault.getPath());
|
|
186
|
+
if (observerStaleness.staleCount > 0) {
|
|
187
|
+
issues.push(`Observer stale sessions: ${observerStaleness.staleCount}`);
|
|
188
|
+
}
|
|
174
189
|
return {
|
|
175
190
|
vaultName: vault.getName(),
|
|
176
191
|
vaultPath: vault.getPath(),
|
|
@@ -184,6 +199,7 @@ async function getStatus(vaultPath) {
|
|
|
184
199
|
error: qmdError
|
|
185
200
|
},
|
|
186
201
|
graph: graphStatus,
|
|
202
|
+
observer: observerStaleness,
|
|
187
203
|
git: gitStatus,
|
|
188
204
|
links: {
|
|
189
205
|
total: linkScan.linkCount,
|
|
@@ -258,6 +274,15 @@ function formatStatus(status) {
|
|
|
258
274
|
}
|
|
259
275
|
if (status.graph.nodeCount !== void 0 && status.graph.edgeCount !== void 0) {
|
|
260
276
|
output += ` - Size: ${status.graph.nodeCount} nodes, ${status.graph.edgeCount} edges
|
|
277
|
+
`;
|
|
278
|
+
}
|
|
279
|
+
output += "\nObserver:\n";
|
|
280
|
+
output += ` - Stale sessions: ${status.observer.staleCount}
|
|
281
|
+
`;
|
|
282
|
+
if (status.observer.staleCount > 0) {
|
|
283
|
+
output += ` - Oldest stale age: ${formatAge(status.observer.oldestMs)}
|
|
284
|
+
`;
|
|
285
|
+
output += ` - Newest stale age: ${formatAge(status.observer.newestMs)}
|
|
261
286
|
`;
|
|
262
287
|
}
|
|
263
288
|
output += "\nLinks:\n";
|
|
@@ -279,7 +304,7 @@ function formatStatus(status) {
|
|
|
279
304
|
return output;
|
|
280
305
|
}
|
|
281
306
|
async function statusCommand(vaultPath, options = {}) {
|
|
282
|
-
const status = await getStatus(vaultPath);
|
|
307
|
+
const status = await getStatus(vaultPath, { qmdIndexName: options.qmdIndexName });
|
|
283
308
|
if (options.json) {
|
|
284
309
|
console.log(JSON.stringify(status, null, 2));
|
|
285
310
|
return;
|
package/dist/commands/wake.d.ts
CHANGED
package/dist/commands/wake.js
CHANGED
|
@@ -2,21 +2,21 @@ 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";
|
|
8
5
|
import {
|
|
9
6
|
ClawVault
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-6B3JWM7J.js";
|
|
12
|
-
import "../chunk-2CDEETQN.js";
|
|
7
|
+
} from "../chunk-AY4PGUVL.js";
|
|
13
8
|
import {
|
|
14
9
|
parseObservationMarkdown
|
|
15
10
|
} from "../chunk-FHFUXL6G.js";
|
|
11
|
+
import "../chunk-O7XHXF7F.js";
|
|
12
|
+
import "../chunk-2CDEETQN.js";
|
|
16
13
|
import "../chunk-ZZA73MFY.js";
|
|
17
14
|
import {
|
|
18
15
|
listObservationFiles
|
|
19
16
|
} from "../chunk-Z2XBWN7A.js";
|
|
17
|
+
import {
|
|
18
|
+
clearDirtyFlag
|
|
19
|
+
} from "../chunk-F55HGNU4.js";
|
|
20
20
|
|
|
21
21
|
// src/commands/wake.ts
|
|
22
22
|
import * as fs from "fs";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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 { f as DEFAULT_CATEGORIES, g as DEFAULT_CONFIG, h as MEMORY_TYPES, T as TYPE_TO_CATEGORY, i as VaultMeta } from './types-
|
|
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-C74wgGL1.js';
|
|
3
|
+
export { f as DEFAULT_CATEGORIES, g as DEFAULT_CONFIG, h as MEMORY_TYPES, T as TYPE_TO_CATEGORY, i as VaultMeta } from './types-C74wgGL1.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';
|
|
@@ -11,11 +11,14 @@ export { ObserveCommandOptions, observeCommand, registerObserveCommand } from '.
|
|
|
11
11
|
export { ReflectCommandOptions, reflectCommand, registerReflectCommand } from './commands/reflect.js';
|
|
12
12
|
export { ArchiveCommandOptions, archiveCommand, registerArchiveCommand } from './commands/archive.js';
|
|
13
13
|
export { RebuildCommandOptions, rebuildCommand, registerRebuildCommand } from './commands/rebuild.js';
|
|
14
|
+
export { DoctorCheck, DoctorReport, DoctorStatus, doctor } from './commands/doctor.js';
|
|
15
|
+
export { EmbedCommandOptions, EmbedCommandResult, embedCommand, registerEmbedCommand } from './commands/embed.js';
|
|
14
16
|
export { ReplayCommandOptions, registerReplayCommand, replayCommand } from './commands/replay.js';
|
|
15
17
|
export { MigrateObservationsOptions, MigrateObservationsResult, migrateObservations, migrateObservationsCommand, registerMigrateObservationsCommand } from './commands/migrate-observations.js';
|
|
16
18
|
export { SyncBdCommandOptions, registerSyncBdCommand, syncBdCommand } from './commands/sync-bd.js';
|
|
17
19
|
export { SessionRecapFormat, SessionRecapOptions, SessionRecapResult, SessionTurn, buildSessionRecap, formatSessionRecapMarkdown, sessionRecapCommand } from './commands/session-recap.js';
|
|
18
20
|
export { findNearestVaultPath, getVaultPath, resolveVaultPath } from './lib/config.js';
|
|
21
|
+
export { registerCliCommands } from './cli/index.js';
|
|
19
22
|
import { TaskStatus } from './lib/task-utils.js';
|
|
20
23
|
export { completeTask, listDependentTasks, listSubtasks, updateTask } from './lib/task-utils.js';
|
|
21
24
|
export { CLAWVAULT_SERVE_PATH, DEFAULT_SERVE_PORT, ServeInstance, TailscalePeer, TailscaleServeConfig, TailscaleStatus, TailscaleSyncOptions, TailscaleSyncResult, VaultFileEntry, VaultManifest, checkPeerClawVault, compareManifests, configureTailscaleServe, discoverClawVaultPeers, fetchRemoteFile, fetchRemoteManifest, findPeer, generateVaultManifest, getOnlinePeers, getTailscaleStatus, getTailscaleVersion, hasTailscale, pushFileToRemote, resolvePeerIP, serveVault, stopTailscaleServe, syncWithPeer } from './lib/tailscale.js';
|
|
@@ -193,11 +196,11 @@ declare function hasQmd(): boolean;
|
|
|
193
196
|
/**
|
|
194
197
|
* Trigger qmd update (reindex)
|
|
195
198
|
*/
|
|
196
|
-
declare function qmdUpdate(collection?: string): void;
|
|
199
|
+
declare function qmdUpdate(collection?: string, indexName?: string): void;
|
|
197
200
|
/**
|
|
198
201
|
* Trigger qmd embed (create/update vector embeddings)
|
|
199
202
|
*/
|
|
200
|
-
declare function qmdEmbed(collection?: string): void;
|
|
203
|
+
declare function qmdEmbed(collection?: string, indexName?: string): void;
|
|
201
204
|
/**
|
|
202
205
|
* QMD Search Engine - wraps qmd CLI
|
|
203
206
|
*/
|
|
@@ -206,6 +209,7 @@ declare class SearchEngine {
|
|
|
206
209
|
private collection;
|
|
207
210
|
private vaultPath;
|
|
208
211
|
private collectionRoot;
|
|
212
|
+
private qmdIndexName?;
|
|
209
213
|
/**
|
|
210
214
|
* Set the collection name (usually vault name)
|
|
211
215
|
*/
|
|
@@ -218,6 +222,10 @@ declare class SearchEngine {
|
|
|
218
222
|
* Set the collection root for qmd:// URI resolution
|
|
219
223
|
*/
|
|
220
224
|
setCollectionRoot(root: string): void;
|
|
225
|
+
/**
|
|
226
|
+
* Set qmd index name (defaults to qmd global default when omitted)
|
|
227
|
+
*/
|
|
228
|
+
setIndexName(indexName?: string): void;
|
|
221
229
|
/**
|
|
222
230
|
* Add or update a document in the local cache
|
|
223
231
|
* Note: qmd indexing happens via qmd update command
|
|
@@ -491,6 +499,75 @@ declare class Observer {
|
|
|
491
499
|
private mergeRouteContext;
|
|
492
500
|
}
|
|
493
501
|
|
|
502
|
+
interface ObserveCursorEntry {
|
|
503
|
+
lastObservedOffset: number;
|
|
504
|
+
lastObservedAt: string;
|
|
505
|
+
sessionKey: string;
|
|
506
|
+
lastFileSize: number;
|
|
507
|
+
}
|
|
508
|
+
type ObserveCursorStore = Record<string, ObserveCursorEntry>;
|
|
509
|
+
interface ActiveObserveOptions {
|
|
510
|
+
vaultPath: string;
|
|
511
|
+
agentId?: string;
|
|
512
|
+
minNewBytes?: number;
|
|
513
|
+
sessionsDir?: string;
|
|
514
|
+
dryRun?: boolean;
|
|
515
|
+
threshold?: number;
|
|
516
|
+
reflectThreshold?: number;
|
|
517
|
+
model?: string;
|
|
518
|
+
extractTasks?: boolean;
|
|
519
|
+
}
|
|
520
|
+
interface ActiveObservationCandidate {
|
|
521
|
+
sessionId: string;
|
|
522
|
+
sessionKey: string;
|
|
523
|
+
sourceLabel: string;
|
|
524
|
+
filePath: string;
|
|
525
|
+
fileSize: number;
|
|
526
|
+
startOffset: number;
|
|
527
|
+
newBytes: number;
|
|
528
|
+
thresholdBytes: number;
|
|
529
|
+
}
|
|
530
|
+
interface ActiveObservationFailure {
|
|
531
|
+
sessionId: string;
|
|
532
|
+
sessionKey: string;
|
|
533
|
+
sourceLabel: string;
|
|
534
|
+
error: string;
|
|
535
|
+
}
|
|
536
|
+
interface ActiveObserveResult {
|
|
537
|
+
agentId: string;
|
|
538
|
+
sessionsDir: string;
|
|
539
|
+
checkedSessions: number;
|
|
540
|
+
candidateSessions: number;
|
|
541
|
+
observedSessions: number;
|
|
542
|
+
cursorUpdates: number;
|
|
543
|
+
dryRun: boolean;
|
|
544
|
+
totalNewBytes: number;
|
|
545
|
+
observedNewBytes: number;
|
|
546
|
+
routedCounts: Record<string, number>;
|
|
547
|
+
failedSessionCount: number;
|
|
548
|
+
failedSessions: ActiveObservationFailure[];
|
|
549
|
+
candidates: ActiveObservationCandidate[];
|
|
550
|
+
}
|
|
551
|
+
interface ObserverStalenessResult {
|
|
552
|
+
staleCount: number;
|
|
553
|
+
oldestMs: number;
|
|
554
|
+
newestMs: number;
|
|
555
|
+
}
|
|
556
|
+
type MinimalObserver = Pick<Observer, 'processMessages' | 'flush'>;
|
|
557
|
+
type ObserverFactory = (vaultPath: string, options: ObserverOptions) => MinimalObserver;
|
|
558
|
+
interface ActiveObserveDependencies {
|
|
559
|
+
createObserver?: ObserverFactory;
|
|
560
|
+
now?: () => Date;
|
|
561
|
+
}
|
|
562
|
+
interface ObserverStalenessOptions {
|
|
563
|
+
sessionsDir?: string;
|
|
564
|
+
now?: () => Date;
|
|
565
|
+
}
|
|
566
|
+
declare function getScaledObservationThresholdBytes(fileSizeBytes: number): number;
|
|
567
|
+
declare function getObserverStaleness(vaultPath: string, options?: ObserverStalenessOptions): ObserverStalenessResult;
|
|
568
|
+
declare function parseSessionSourceLabel(sessionKey: string): string;
|
|
569
|
+
declare function observeActiveSessions(options: ActiveObserveOptions, dependencies?: ActiveObserveDependencies): Promise<ActiveObserveResult>;
|
|
570
|
+
|
|
494
571
|
interface ReflectorOptions {
|
|
495
572
|
now?: () => Date;
|
|
496
573
|
}
|
|
@@ -593,4 +670,4 @@ declare function runReflection(options: ReflectOptions): Promise<ReflectResult>;
|
|
|
593
670
|
declare const VERSION: string;
|
|
594
671
|
declare function registerCommanderCommands(program: Command): Command;
|
|
595
672
|
|
|
596
|
-
export { type ArchiveObservationsOptions, type ArchiveObservationsResult, Category, ClawVault, type CompressionProvider, Compressor, type CompressorOptions, type ContextProfile as ConfigDefaultProfile, Document, HandoffDocument, type ManagedConfigKey, MemoryType, type ObserveProvider, Observer, type ObserverCompressionProvider, type ObserverCompressor, type ObserverOptions, type ObserverReflector, 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, hasQmd, isRegression, listConfig, listRouteRules, matchRouteRule, parseSessionFile, qmdEmbed, qmdUpdate, queryTransitions, readAllTransitions, registerCommanderCommands, removeRouteRule, resetConfig, runReflection, setConfigValue, testRouteRule };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,55 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildTemplateVariables,
|
|
3
|
+
renderTemplate
|
|
4
|
+
} from "./chunk-7766SIJP.js";
|
|
5
|
+
import {
|
|
6
|
+
buildSessionRecap,
|
|
7
|
+
formatSessionRecapMarkdown,
|
|
8
|
+
sessionRecapCommand
|
|
9
|
+
} from "./chunk-ZKGY7WTT.js";
|
|
10
|
+
import {
|
|
11
|
+
setupCommand
|
|
12
|
+
} from "./chunk-M25QVSJM.js";
|
|
1
13
|
import {
|
|
2
14
|
registerSyncBdCommand,
|
|
3
15
|
syncBdCommand
|
|
4
16
|
} from "./chunk-MGDEINGP.js";
|
|
17
|
+
import {
|
|
18
|
+
migrateObservations,
|
|
19
|
+
migrateObservationsCommand,
|
|
20
|
+
registerMigrateObservationsCommand
|
|
21
|
+
} from "./chunk-VXEOHTSL.js";
|
|
22
|
+
import {
|
|
23
|
+
rebuildCommand,
|
|
24
|
+
registerRebuildCommand
|
|
25
|
+
} from "./chunk-TPDH3JPP.js";
|
|
26
|
+
import {
|
|
27
|
+
registerReplayCommand,
|
|
28
|
+
replayCommand
|
|
29
|
+
} from "./chunk-4IV3R2F5.js";
|
|
30
|
+
import {
|
|
31
|
+
doctor
|
|
32
|
+
} from "./chunk-LMEMZGUV.js";
|
|
33
|
+
import "./chunk-7ZRP733D.js";
|
|
34
|
+
import {
|
|
35
|
+
graphCommand,
|
|
36
|
+
graphSummary
|
|
37
|
+
} from "./chunk-OZ7RIXTO.js";
|
|
38
|
+
import {
|
|
39
|
+
buildKanbanLanes,
|
|
40
|
+
extractCardSlug,
|
|
41
|
+
formatKanbanCard,
|
|
42
|
+
generateKanbanMarkdown,
|
|
43
|
+
importKanbanBoard,
|
|
44
|
+
kanbanCommand,
|
|
45
|
+
parseKanbanMarkdown,
|
|
46
|
+
syncKanbanBoard
|
|
47
|
+
} from "./chunk-J5EMBUPK.js";
|
|
48
|
+
import "./chunk-4VQTUVH7.js";
|
|
49
|
+
import "./chunk-J7ZWCI2C.js";
|
|
50
|
+
import {
|
|
51
|
+
registerCliCommands
|
|
52
|
+
} from "./chunk-FG6RJMCN.js";
|
|
5
53
|
import {
|
|
6
54
|
registerTailscaleCommands,
|
|
7
55
|
registerTailscaleDiscoverCommand,
|
|
@@ -36,76 +84,41 @@ import {
|
|
|
36
84
|
} from "./chunk-4GBPTBFJ.js";
|
|
37
85
|
import "./chunk-CLE2HHNT.js";
|
|
38
86
|
import {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
87
|
+
SessionWatcher,
|
|
88
|
+
observeCommand,
|
|
89
|
+
registerObserveCommand
|
|
90
|
+
} from "./chunk-OSMS7QIG.js";
|
|
42
91
|
import {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
} from "./chunk-LMCC5OC7.js";
|
|
92
|
+
parseSessionFile
|
|
93
|
+
} from "./chunk-P5EPF6MB.js";
|
|
46
94
|
import {
|
|
47
95
|
reflectCommand,
|
|
48
96
|
registerReflectCommand
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import {
|
|
51
|
-
registerReplayCommand,
|
|
52
|
-
replayCommand
|
|
53
|
-
} from "./chunk-C3PF7WBA.js";
|
|
97
|
+
} from "./chunk-2YDBJS7M.js";
|
|
54
98
|
import {
|
|
55
99
|
runReflection
|
|
56
|
-
} from "./chunk-
|
|
57
|
-
import {
|
|
58
|
-
buildSessionRecap,
|
|
59
|
-
formatSessionRecapMarkdown,
|
|
60
|
-
sessionRecapCommand
|
|
61
|
-
} from "./chunk-ZKGY7WTT.js";
|
|
62
|
-
import {
|
|
63
|
-
setupCommand
|
|
64
|
-
} from "./chunk-6RQPD7X6.js";
|
|
65
|
-
import {
|
|
66
|
-
graphCommand,
|
|
67
|
-
graphSummary
|
|
68
|
-
} from "./chunk-OZ7RIXTO.js";
|
|
69
|
-
import {
|
|
70
|
-
buildInjectionResult,
|
|
71
|
-
deterministicInjectMatches,
|
|
72
|
-
indexInjectableItems,
|
|
73
|
-
injectCommand,
|
|
74
|
-
registerInjectCommand,
|
|
75
|
-
runPromptInjection
|
|
76
|
-
} from "./chunk-GSD4ALSI.js";
|
|
77
|
-
import {
|
|
78
|
-
requestLlmCompletion,
|
|
79
|
-
resolveLlmProvider
|
|
80
|
-
} from "./chunk-K3CDT7IH.js";
|
|
81
|
-
import {
|
|
82
|
-
buildKanbanLanes,
|
|
83
|
-
extractCardSlug,
|
|
84
|
-
formatKanbanCard,
|
|
85
|
-
generateKanbanMarkdown,
|
|
86
|
-
importKanbanBoard,
|
|
87
|
-
kanbanCommand,
|
|
88
|
-
parseKanbanMarkdown,
|
|
89
|
-
syncKanbanBoard
|
|
90
|
-
} from "./chunk-J5EMBUPK.js";
|
|
100
|
+
} from "./chunk-YOSEUUNB.js";
|
|
91
101
|
import {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
} from "./chunk-2RK2AG32.js";
|
|
102
|
+
buildContext,
|
|
103
|
+
contextCommand,
|
|
104
|
+
formatContextMarkdown,
|
|
105
|
+
inferContextProfile,
|
|
106
|
+
normalizeContextProfileInput,
|
|
107
|
+
registerContextCommand,
|
|
108
|
+
resolveContextProfile
|
|
109
|
+
} from "./chunk-GFJ3LIIB.js";
|
|
101
110
|
import {
|
|
102
|
-
|
|
103
|
-
|
|
111
|
+
getObserverStaleness,
|
|
112
|
+
getScaledObservationThresholdBytes,
|
|
113
|
+
observeActiveSessions,
|
|
114
|
+
parseSessionSourceLabel
|
|
115
|
+
} from "./chunk-IZEY5S74.js";
|
|
116
|
+
import "./chunk-HRLWZGMA.js";
|
|
104
117
|
import {
|
|
105
118
|
Compressor,
|
|
106
119
|
Observer,
|
|
107
120
|
Reflector
|
|
108
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-S2IG7VNM.js";
|
|
109
122
|
import {
|
|
110
123
|
archiveProject,
|
|
111
124
|
createProject,
|
|
@@ -115,7 +128,39 @@ import {
|
|
|
115
128
|
readProject,
|
|
116
129
|
updateProject
|
|
117
130
|
} from "./chunk-5GZFTAL7.js";
|
|
118
|
-
import
|
|
131
|
+
import {
|
|
132
|
+
ClawVault,
|
|
133
|
+
createVault,
|
|
134
|
+
findVault
|
|
135
|
+
} from "./chunk-AY4PGUVL.js";
|
|
136
|
+
import "./chunk-FHFUXL6G.js";
|
|
137
|
+
import {
|
|
138
|
+
embedCommand,
|
|
139
|
+
registerEmbedCommand
|
|
140
|
+
} from "./chunk-3FP5BJ42.js";
|
|
141
|
+
import {
|
|
142
|
+
QMD_INSTALL_COMMAND,
|
|
143
|
+
QMD_INSTALL_URL,
|
|
144
|
+
QmdUnavailableError,
|
|
145
|
+
SearchEngine,
|
|
146
|
+
extractTags,
|
|
147
|
+
extractWikiLinks,
|
|
148
|
+
hasQmd,
|
|
149
|
+
qmdEmbed,
|
|
150
|
+
qmdUpdate
|
|
151
|
+
} from "./chunk-O7XHXF7F.js";
|
|
152
|
+
import {
|
|
153
|
+
buildInjectionResult,
|
|
154
|
+
deterministicInjectMatches,
|
|
155
|
+
indexInjectableItems,
|
|
156
|
+
injectCommand,
|
|
157
|
+
registerInjectCommand,
|
|
158
|
+
runPromptInjection
|
|
159
|
+
} from "./chunk-GSD4ALSI.js";
|
|
160
|
+
import {
|
|
161
|
+
requestLlmCompletion,
|
|
162
|
+
resolveLlmProvider
|
|
163
|
+
} from "./chunk-K3CDT7IH.js";
|
|
119
164
|
import {
|
|
120
165
|
SUPPORTED_CONFIG_KEYS,
|
|
121
166
|
addRouteRule,
|
|
@@ -129,6 +174,12 @@ import {
|
|
|
129
174
|
setConfigValue,
|
|
130
175
|
testRouteRule
|
|
131
176
|
} from "./chunk-ITPEXLHA.js";
|
|
177
|
+
import {
|
|
178
|
+
DEFAULT_CATEGORIES,
|
|
179
|
+
DEFAULT_CONFIG,
|
|
180
|
+
MEMORY_TYPES,
|
|
181
|
+
TYPE_TO_CATEGORY
|
|
182
|
+
} from "./chunk-2CDEETQN.js";
|
|
132
183
|
import {
|
|
133
184
|
archiveCommand,
|
|
134
185
|
registerArchiveCommand
|
|
@@ -141,6 +192,13 @@ import {
|
|
|
141
192
|
getVaultPath,
|
|
142
193
|
resolveVaultPath
|
|
143
194
|
} from "./chunk-MXSSG3QU.js";
|
|
195
|
+
import {
|
|
196
|
+
MEMORY_GRAPH_SCHEMA_VERSION,
|
|
197
|
+
buildOrUpdateMemoryGraphIndex,
|
|
198
|
+
getMemoryGraph,
|
|
199
|
+
loadMemoryGraphIndex
|
|
200
|
+
} from "./chunk-ZZA73MFY.js";
|
|
201
|
+
import "./chunk-Z2XBWN7A.js";
|
|
144
202
|
import {
|
|
145
203
|
appendTransition,
|
|
146
204
|
buildTransitionEvent,
|
|
@@ -158,46 +216,7 @@ import {
|
|
|
158
216
|
checkOpenClawCompatibility,
|
|
159
217
|
compatCommand,
|
|
160
218
|
compatibilityExitCode
|
|
161
|
-
} from "./chunk-
|
|
162
|
-
import {
|
|
163
|
-
buildContext,
|
|
164
|
-
contextCommand,
|
|
165
|
-
formatContextMarkdown,
|
|
166
|
-
inferContextProfile,
|
|
167
|
-
normalizeContextProfileInput,
|
|
168
|
-
registerContextCommand,
|
|
169
|
-
resolveContextProfile
|
|
170
|
-
} from "./chunk-WIICLBNF.js";
|
|
171
|
-
import {
|
|
172
|
-
ClawVault,
|
|
173
|
-
createVault,
|
|
174
|
-
findVault
|
|
175
|
-
} from "./chunk-7OHQFMJK.js";
|
|
176
|
-
import {
|
|
177
|
-
QMD_INSTALL_COMMAND,
|
|
178
|
-
QMD_INSTALL_URL,
|
|
179
|
-
QmdUnavailableError,
|
|
180
|
-
SearchEngine,
|
|
181
|
-
extractTags,
|
|
182
|
-
extractWikiLinks,
|
|
183
|
-
hasQmd,
|
|
184
|
-
qmdEmbed,
|
|
185
|
-
qmdUpdate
|
|
186
|
-
} from "./chunk-6B3JWM7J.js";
|
|
187
|
-
import {
|
|
188
|
-
DEFAULT_CATEGORIES,
|
|
189
|
-
DEFAULT_CONFIG,
|
|
190
|
-
MEMORY_TYPES,
|
|
191
|
-
TYPE_TO_CATEGORY
|
|
192
|
-
} from "./chunk-2CDEETQN.js";
|
|
193
|
-
import "./chunk-FHFUXL6G.js";
|
|
194
|
-
import {
|
|
195
|
-
MEMORY_GRAPH_SCHEMA_VERSION,
|
|
196
|
-
buildOrUpdateMemoryGraphIndex,
|
|
197
|
-
getMemoryGraph,
|
|
198
|
-
loadMemoryGraphIndex
|
|
199
|
-
} from "./chunk-ZZA73MFY.js";
|
|
200
|
-
import "./chunk-Z2XBWN7A.js";
|
|
219
|
+
} from "./chunk-QVMXF7FY.js";
|
|
201
220
|
|
|
202
221
|
// src/index.ts
|
|
203
222
|
import * as fs from "fs";
|
|
@@ -212,12 +231,7 @@ function readPackageVersion() {
|
|
|
212
231
|
}
|
|
213
232
|
var VERSION = readPackageVersion();
|
|
214
233
|
function registerCommanderCommands(program) {
|
|
215
|
-
|
|
216
|
-
registerInjectCommand(program);
|
|
217
|
-
registerObserveCommand(program);
|
|
218
|
-
registerReflectCommand(program);
|
|
219
|
-
registerTailscaleCommands(program);
|
|
220
|
-
return program;
|
|
234
|
+
return registerCliCommands(program);
|
|
221
235
|
}
|
|
222
236
|
export {
|
|
223
237
|
CLAWVAULT_SERVE_PATH,
|
|
@@ -263,6 +277,8 @@ export {
|
|
|
263
277
|
createVault,
|
|
264
278
|
deterministicInjectMatches,
|
|
265
279
|
discoverClawVaultPeers,
|
|
280
|
+
doctor,
|
|
281
|
+
embedCommand,
|
|
266
282
|
extractCardSlug,
|
|
267
283
|
extractTags,
|
|
268
284
|
extractWikiLinks,
|
|
@@ -280,9 +296,11 @@ export {
|
|
|
280
296
|
getConfig,
|
|
281
297
|
getConfigValue,
|
|
282
298
|
getMemoryGraph,
|
|
299
|
+
getObserverStaleness,
|
|
283
300
|
getOnlinePeers,
|
|
284
301
|
getProjectActivity,
|
|
285
302
|
getProjectTasks,
|
|
303
|
+
getScaledObservationThresholdBytes,
|
|
286
304
|
getTailscaleStatus,
|
|
287
305
|
getTailscaleVersion,
|
|
288
306
|
getVaultPath,
|
|
@@ -306,9 +324,11 @@ export {
|
|
|
306
324
|
migrateObservations,
|
|
307
325
|
migrateObservationsCommand,
|
|
308
326
|
normalizeContextProfileInput,
|
|
327
|
+
observeActiveSessions,
|
|
309
328
|
observeCommand,
|
|
310
329
|
parseKanbanMarkdown,
|
|
311
330
|
parseSessionFile,
|
|
331
|
+
parseSessionSourceLabel,
|
|
312
332
|
pushFileToRemote,
|
|
313
333
|
qmdEmbed,
|
|
314
334
|
qmdUpdate,
|
|
@@ -318,8 +338,10 @@ export {
|
|
|
318
338
|
rebuildCommand,
|
|
319
339
|
reflectCommand,
|
|
320
340
|
registerArchiveCommand,
|
|
341
|
+
registerCliCommands,
|
|
321
342
|
registerCommanderCommands,
|
|
322
343
|
registerContextCommand,
|
|
344
|
+
registerEmbedCommand,
|
|
323
345
|
registerInjectCommand,
|
|
324
346
|
registerMigrateObservationsCommand,
|
|
325
347
|
registerObserveCommand,
|
|
@@ -86,6 +86,8 @@ interface StoreOptions {
|
|
|
86
86
|
qmdUpdate?: boolean;
|
|
87
87
|
/** Trigger qmd embed after storing (implies qmdUpdate) */
|
|
88
88
|
qmdEmbed?: boolean;
|
|
89
|
+
/** Optional qmd index name override (defaults to configured/global index) */
|
|
90
|
+
qmdIndexName?: string;
|
|
89
91
|
}
|
|
90
92
|
interface SyncOptions {
|
|
91
93
|
/** Target directory to sync to */
|