clawvault 2.6.1 → 2.6.4
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 +352 -20
- package/bin/clawvault.js +8 -2
- package/bin/command-runtime.js +9 -1
- package/bin/register-maintenance-commands.js +19 -0
- package/bin/register-query-commands.js +58 -6
- package/bin/register-workgraph-commands.js +451 -0
- package/dist/{chunk-VXEOHTSL.js → chunk-2JQ3O2YL.js} +1 -1
- package/dist/{chunk-VR5NE7PZ.js → chunk-2RAZ4ZFE.js} +1 -1
- package/dist/chunk-2ZDO52B4.js +52 -0
- package/dist/chunk-4BQTQMJP.js +93 -0
- package/dist/{chunk-MAKNAHAW.js → chunk-5PJ4STIC.js} +98 -8
- package/dist/{chunk-IEVLHNLU.js → chunk-627Q3QWK.js} +3 -3
- package/dist/{chunk-R6SXNSFD.js → chunk-6NYYDNNG.js} +3 -3
- package/dist/chunk-ECRZL5XR.js +50 -0
- package/dist/chunk-GNJL4YGR.js +79 -0
- package/dist/{chunk-OZ7RIXTO.js → chunk-IIOU45CK.js} +1 -1
- package/dist/chunk-L4HSSQ6T.js +152 -0
- package/dist/{chunk-XAVB4GB4.js → chunk-LIGHWOH6.js} +1 -1
- package/dist/{chunk-PBEE567J.js → chunk-LUBZXECN.js} +2 -2
- package/dist/{chunk-UEOUADMO.js → chunk-MFL6EEPF.js} +204 -35
- package/dist/chunk-MM6QGW3P.js +207 -0
- package/dist/{chunk-T76H47ZS.js → chunk-MNPUYCHQ.js} +1 -1
- package/dist/{chunk-TLGBDTYT.js → chunk-MPOSMDMU.js} +6 -6
- package/dist/{chunk-RVYA52PY.js → chunk-NJYJL5AA.js} +1 -1
- package/dist/{chunk-Q2J5YTUF.js → chunk-OQGYFZ4A.js} +669 -33
- package/dist/{chunk-ME37YNW3.js → chunk-P7SY3D4E.js} +3 -3
- package/dist/chunk-RHISK3SZ.js +189 -0
- package/dist/{chunk-3BTHWPMB.js → chunk-S5OJEGFG.js} +2 -2
- package/dist/{chunk-MGDEINGP.js → chunk-SS4B7P7V.js} +1 -1
- package/dist/chunk-U4O6C46S.js +154 -0
- package/dist/{chunk-ITPEXLHA.js → chunk-URXDAUVH.js} +24 -5
- package/dist/chunk-WIOLLGAD.js +190 -0
- package/dist/chunk-WMGIIABP.js +15 -0
- package/dist/{chunk-QVMXF7FY.js → chunk-X3SPPUFG.js} +50 -0
- package/dist/{chunk-THRJVD4L.js → chunk-Y6VJKXGL.js} +1 -1
- package/dist/{chunk-KL4NAOMO.js → chunk-YDWHS4LJ.js} +49 -9
- package/dist/{chunk-4VRIMU4O.js → chunk-YNIPYN4F.js} +4 -4
- package/dist/{chunk-HIHOUSXS.js → chunk-YXQCA6B7.js} +105 -1
- package/dist/cli/index.js +18 -16
- package/dist/commands/archive.js +3 -2
- package/dist/commands/backlog.js +1 -0
- package/dist/commands/blocked.js +1 -0
- package/dist/commands/canvas.js +1 -0
- package/dist/commands/checkpoint.js +1 -0
- package/dist/commands/compat.js +2 -1
- package/dist/commands/context.js +5 -3
- package/dist/commands/doctor.d.ts +10 -1
- package/dist/commands/doctor.js +11 -8
- package/dist/commands/embed.js +5 -3
- package/dist/commands/entities.js +2 -1
- package/dist/commands/graph.js +3 -2
- package/dist/commands/inject.d.ts +1 -1
- package/dist/commands/inject.js +4 -3
- package/dist/commands/kanban.js +1 -0
- package/dist/commands/link.js +2 -1
- package/dist/commands/migrate-observations.js +3 -2
- package/dist/commands/observe.js +8 -6
- package/dist/commands/project.js +1 -0
- package/dist/commands/rebuild-embeddings.d.ts +21 -0
- package/dist/commands/rebuild-embeddings.js +91 -0
- package/dist/commands/rebuild.js +6 -4
- package/dist/commands/recover.js +1 -0
- package/dist/commands/reflect.js +5 -4
- package/dist/commands/repair-session.js +1 -0
- package/dist/commands/replay.js +7 -6
- package/dist/commands/session-recap.js +1 -0
- package/dist/commands/setup.js +3 -2
- package/dist/commands/shell-init.js +2 -0
- package/dist/commands/sleep.d.ts +1 -1
- package/dist/commands/sleep.js +8 -6
- package/dist/commands/status.d.ts +2 -0
- package/dist/commands/status.js +35 -24
- package/dist/commands/sync-bd.js +3 -2
- package/dist/commands/tailscale.js +3 -2
- package/dist/commands/task.js +1 -0
- package/dist/commands/template.js +1 -0
- package/dist/commands/wake.d.ts +1 -1
- package/dist/commands/wake.js +4 -2
- package/dist/index.d.ts +333 -10
- package/dist/index.js +320 -33
- package/dist/{inject-x65KXWPk.d.ts → inject-DYUrDqQO.d.ts} +2 -2
- package/dist/ledger-B7g7jhqG.d.ts +44 -0
- package/dist/lib/auto-linker.js +1 -0
- package/dist/lib/canvas-layout.js +1 -0
- package/dist/lib/config.d.ts +27 -3
- package/dist/lib/config.js +4 -1
- package/dist/lib/entity-index.js +1 -0
- package/dist/lib/project-utils.js +1 -0
- package/dist/lib/session-repair.js +1 -0
- package/dist/lib/session-utils.js +1 -0
- package/dist/lib/tailscale.js +1 -0
- package/dist/lib/task-utils.js +1 -0
- package/dist/lib/template-engine.js +1 -0
- package/dist/lib/webdav.js +1 -0
- package/dist/onnxruntime_binding-5QEF3SUC.node +0 -0
- package/dist/onnxruntime_binding-BKPKNEGC.node +0 -0
- package/dist/onnxruntime_binding-FMOXGIUT.node +0 -0
- package/dist/onnxruntime_binding-OI2KMXC5.node +0 -0
- package/dist/onnxruntime_binding-UX44MLAZ.node +0 -0
- package/dist/onnxruntime_binding-Y2W7N7WY.node +0 -0
- package/dist/registry-BR4326o0.d.ts +30 -0
- package/dist/store-CA-6sKCJ.d.ts +34 -0
- package/dist/thread-B9LhXNU0.d.ts +41 -0
- package/dist/transformers.node-A2ZRORSQ.js +46775 -0
- package/dist/{types-C74wgGL1.d.ts → types-BbWJoC1c.d.ts} +1 -1
- package/dist/workgraph/index.d.ts +5 -0
- package/dist/workgraph/index.js +23 -0
- package/dist/workgraph/ledger.d.ts +2 -0
- package/dist/workgraph/ledger.js +25 -0
- package/dist/workgraph/registry.d.ts +2 -0
- package/dist/workgraph/registry.js +19 -0
- package/dist/workgraph/store.d.ts +2 -0
- package/dist/workgraph/store.js +25 -0
- package/dist/workgraph/thread.d.ts +2 -0
- package/dist/workgraph/thread.js +25 -0
- package/dist/workgraph/types.d.ts +54 -0
- package/dist/workgraph/types.js +7 -0
- package/hooks/clawvault/HOOK.md +34 -4
- package/hooks/clawvault/handler.js +751 -8
- package/hooks/clawvault/handler.test.js +247 -0
- package/hooks/clawvault/openclaw.plugin.json +72 -0
- package/openclaw.plugin.json +84 -0
- package/package.json +8 -4
- package/dist/chunk-4QYGFWRM.js +0 -88
- package/dist/chunk-MXSSG3QU.js +0 -42
package/dist/commands/observe.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
observeCommand,
|
|
3
3
|
registerObserveCommand
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-P7SY3D4E.js";
|
|
5
5
|
import "../chunk-P5EPF6MB.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-Q2J5YTUF.js";
|
|
6
|
+
import "../chunk-627Q3QWK.js";
|
|
7
|
+
import "../chunk-OQGYFZ4A.js";
|
|
9
8
|
import "../chunk-AZYOKJYC.js";
|
|
9
|
+
import "../chunk-HRLWZGMA.js";
|
|
10
10
|
import "../chunk-FHFUXL6G.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-URXDAUVH.js";
|
|
12
|
+
import "../chunk-YXQCA6B7.js";
|
|
12
13
|
import "../chunk-2CDEETQN.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-GNJL4YGR.js";
|
|
14
15
|
import "../chunk-Z2XBWN7A.js";
|
|
15
16
|
import "../chunk-QWQ3TIKS.js";
|
|
16
17
|
import "../chunk-MFAWT5O5.js";
|
|
17
18
|
import "../chunk-7766SIJP.js";
|
|
19
|
+
import "../chunk-2ZDO52B4.js";
|
|
18
20
|
export {
|
|
19
21
|
observeCommand,
|
|
20
22
|
registerObserveCommand
|
package/dist/commands/project.js
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface RebuildEmbeddingsOptions {
|
|
2
|
+
force?: boolean;
|
|
3
|
+
onProgress?: (current: number, total: number) => void;
|
|
4
|
+
}
|
|
5
|
+
interface RebuildEmbeddingsResult {
|
|
6
|
+
total: number;
|
|
7
|
+
added: number;
|
|
8
|
+
skipped: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Rebuild embeddings for all markdown files in a vault.
|
|
12
|
+
*/
|
|
13
|
+
declare function rebuildEmbeddingsForVault(vaultPath: string, options?: RebuildEmbeddingsOptions): Promise<RebuildEmbeddingsResult>;
|
|
14
|
+
interface RebuildEmbeddingsCommandOptions {
|
|
15
|
+
vaultPath?: string;
|
|
16
|
+
force?: boolean;
|
|
17
|
+
quiet?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare function rebuildEmbeddingsCommand(options?: RebuildEmbeddingsCommandOptions): Promise<RebuildEmbeddingsResult>;
|
|
20
|
+
|
|
21
|
+
export { type RebuildEmbeddingsCommandOptions, type RebuildEmbeddingsOptions, type RebuildEmbeddingsResult, rebuildEmbeddingsCommand, rebuildEmbeddingsForVault };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EmbeddingCache,
|
|
3
|
+
embed
|
|
4
|
+
} from "../chunk-U4O6C46S.js";
|
|
5
|
+
import {
|
|
6
|
+
resolveVaultPath
|
|
7
|
+
} from "../chunk-GNJL4YGR.js";
|
|
8
|
+
import "../chunk-2ZDO52B4.js";
|
|
9
|
+
|
|
10
|
+
// src/commands/rebuild-embeddings.ts
|
|
11
|
+
import * as fs from "fs";
|
|
12
|
+
import * as path from "path";
|
|
13
|
+
function walkDir(dir, base) {
|
|
14
|
+
const files = [];
|
|
15
|
+
try {
|
|
16
|
+
for (const entry of fs.readdirSync(dir)) {
|
|
17
|
+
if (entry.startsWith(".") || entry === "node_modules") continue;
|
|
18
|
+
const full = path.join(dir, entry);
|
|
19
|
+
const stat = fs.statSync(full);
|
|
20
|
+
if (stat.isDirectory()) {
|
|
21
|
+
files.push(...walkDir(full, base));
|
|
22
|
+
} else if (entry.endsWith(".md")) {
|
|
23
|
+
files.push(path.relative(base, full));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
} catch {
|
|
27
|
+
}
|
|
28
|
+
return files;
|
|
29
|
+
}
|
|
30
|
+
async function rebuildEmbeddingsForVault(vaultPath, options = {}) {
|
|
31
|
+
const { force = false, onProgress } = options;
|
|
32
|
+
const cache = new EmbeddingCache(vaultPath);
|
|
33
|
+
if (!force) {
|
|
34
|
+
cache.load();
|
|
35
|
+
}
|
|
36
|
+
const mdFiles = walkDir(vaultPath, vaultPath).filter(
|
|
37
|
+
(f) => !f.startsWith("node_modules") && !f.startsWith(".")
|
|
38
|
+
);
|
|
39
|
+
let added = 0;
|
|
40
|
+
let skipped = 0;
|
|
41
|
+
for (let i = 0; i < mdFiles.length; i++) {
|
|
42
|
+
const file = mdFiles[i];
|
|
43
|
+
const docId = file.replace(/\.md$/, "");
|
|
44
|
+
if (!force && cache.has(docId)) {
|
|
45
|
+
skipped++;
|
|
46
|
+
if (onProgress) onProgress(i + 1, mdFiles.length);
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
const content = fs.readFileSync(path.join(vaultPath, file), "utf-8");
|
|
51
|
+
if (content.length < 20) {
|
|
52
|
+
skipped++;
|
|
53
|
+
if (onProgress) onProgress(i + 1, mdFiles.length);
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
const embedding = await embed(content.slice(0, 8e3));
|
|
57
|
+
cache.set(docId, embedding);
|
|
58
|
+
added++;
|
|
59
|
+
} catch {
|
|
60
|
+
skipped++;
|
|
61
|
+
}
|
|
62
|
+
if (onProgress) onProgress(i + 1, mdFiles.length);
|
|
63
|
+
}
|
|
64
|
+
cache.save();
|
|
65
|
+
return {
|
|
66
|
+
total: cache.size,
|
|
67
|
+
added,
|
|
68
|
+
skipped
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
async function rebuildEmbeddingsCommand(options = {}) {
|
|
72
|
+
const vaultPath = resolveVaultPath({ explicitPath: options.vaultPath });
|
|
73
|
+
if (!options.quiet) {
|
|
74
|
+
console.log(`Rebuilding embedding cache for vault: ${vaultPath}`);
|
|
75
|
+
}
|
|
76
|
+
const result = await rebuildEmbeddingsForVault(vaultPath, {
|
|
77
|
+
force: options.force,
|
|
78
|
+
onProgress: options.quiet ? void 0 : (current, total) => {
|
|
79
|
+
process.stdout.write(`\r Embedding ${current}/${total} documents...`);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
if (!options.quiet) {
|
|
83
|
+
console.log(`
|
|
84
|
+
\u2713 Done. ${result.total} embeddings (${result.added} new, ${result.skipped} cached)`);
|
|
85
|
+
}
|
|
86
|
+
return result;
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
rebuildEmbeddingsCommand,
|
|
90
|
+
rebuildEmbeddingsForVault
|
|
91
|
+
};
|
package/dist/commands/rebuild.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rebuildCommand,
|
|
3
3
|
registerRebuildCommand
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-LUBZXECN.js";
|
|
5
|
+
import "../chunk-OQGYFZ4A.js";
|
|
6
6
|
import "../chunk-AZYOKJYC.js";
|
|
7
7
|
import "../chunk-FHFUXL6G.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-URXDAUVH.js";
|
|
9
|
+
import "../chunk-YXQCA6B7.js";
|
|
9
10
|
import "../chunk-2CDEETQN.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-GNJL4YGR.js";
|
|
11
12
|
import "../chunk-Z2XBWN7A.js";
|
|
12
13
|
import "../chunk-QWQ3TIKS.js";
|
|
13
14
|
import "../chunk-MFAWT5O5.js";
|
|
14
15
|
import "../chunk-7766SIJP.js";
|
|
16
|
+
import "../chunk-2ZDO52B4.js";
|
|
15
17
|
export {
|
|
16
18
|
rebuildCommand,
|
|
17
19
|
registerRebuildCommand
|
package/dist/commands/recover.js
CHANGED
package/dist/commands/reflect.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
reflectCommand,
|
|
3
3
|
registerReflectCommand
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-S5OJEGFG.js";
|
|
5
|
+
import "../chunk-MNPUYCHQ.js";
|
|
6
6
|
import "../chunk-FHFUXL6G.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-YXQCA6B7.js";
|
|
8
8
|
import "../chunk-MQUJNOHK.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-GNJL4YGR.js";
|
|
10
10
|
import "../chunk-Z2XBWN7A.js";
|
|
11
|
+
import "../chunk-2ZDO52B4.js";
|
|
11
12
|
export {
|
|
12
13
|
reflectCommand,
|
|
13
14
|
registerReflectCommand
|
package/dist/commands/replay.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerReplayCommand,
|
|
3
3
|
replayCommand
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-6NYYDNNG.js";
|
|
5
|
+
import "../chunk-MNPUYCHQ.js";
|
|
6
|
+
import "../chunk-OQGYFZ4A.js";
|
|
7
7
|
import "../chunk-AZYOKJYC.js";
|
|
8
8
|
import "../chunk-FHFUXL6G.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-URXDAUVH.js";
|
|
10
|
+
import "../chunk-YXQCA6B7.js";
|
|
11
11
|
import "../chunk-2CDEETQN.js";
|
|
12
12
|
import "../chunk-MQUJNOHK.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-GNJL4YGR.js";
|
|
14
14
|
import "../chunk-Z2XBWN7A.js";
|
|
15
15
|
import "../chunk-QWQ3TIKS.js";
|
|
16
16
|
import "../chunk-MFAWT5O5.js";
|
|
17
17
|
import "../chunk-7766SIJP.js";
|
|
18
|
+
import "../chunk-2ZDO52B4.js";
|
|
18
19
|
export {
|
|
19
20
|
registerReplayCommand,
|
|
20
21
|
replayCommand
|
package/dist/commands/setup.js
CHANGED
package/dist/commands/sleep.d.ts
CHANGED
package/dist/commands/sleep.js
CHANGED
|
@@ -3,20 +3,21 @@ import {
|
|
|
3
3
|
} from "../chunk-P5EPF6MB.js";
|
|
4
4
|
import {
|
|
5
5
|
runReflection
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-MNPUYCHQ.js";
|
|
7
7
|
import {
|
|
8
8
|
Observer
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-OQGYFZ4A.js";
|
|
10
10
|
import "../chunk-AZYOKJYC.js";
|
|
11
11
|
import {
|
|
12
12
|
ClawVault
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-YDWHS4LJ.js";
|
|
14
14
|
import "../chunk-FHFUXL6G.js";
|
|
15
|
+
import "../chunk-WIOLLGAD.js";
|
|
15
16
|
import {
|
|
16
17
|
qmdUpdate
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
18
|
+
} from "../chunk-5PJ4STIC.js";
|
|
19
|
+
import "../chunk-URXDAUVH.js";
|
|
20
|
+
import "../chunk-YXQCA6B7.js";
|
|
20
21
|
import "../chunk-2CDEETQN.js";
|
|
21
22
|
import "../chunk-MQUJNOHK.js";
|
|
22
23
|
import "../chunk-ZZA73MFY.js";
|
|
@@ -27,6 +28,7 @@ import "../chunk-7766SIJP.js";
|
|
|
27
28
|
import {
|
|
28
29
|
clearDirtyFlag
|
|
29
30
|
} from "../chunk-F55HGNU4.js";
|
|
31
|
+
import "../chunk-2ZDO52B4.js";
|
|
30
32
|
|
|
31
33
|
// src/commands/sleep.ts
|
|
32
34
|
import * as fs from "fs";
|
package/dist/commands/status.js
CHANGED
|
@@ -7,20 +7,24 @@ import {
|
|
|
7
7
|
import "../chunk-J7ZWCI2C.js";
|
|
8
8
|
import {
|
|
9
9
|
getObserverStaleness
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-Q2J5YTUF.js";
|
|
10
|
+
} from "../chunk-627Q3QWK.js";
|
|
11
|
+
import "../chunk-OQGYFZ4A.js";
|
|
13
12
|
import "../chunk-AZYOKJYC.js";
|
|
13
|
+
import "../chunk-HRLWZGMA.js";
|
|
14
14
|
import {
|
|
15
15
|
ClawVault
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-YDWHS4LJ.js";
|
|
17
17
|
import "../chunk-FHFUXL6G.js";
|
|
18
|
+
import {
|
|
19
|
+
parseQmdCollectionList
|
|
20
|
+
} from "../chunk-WIOLLGAD.js";
|
|
18
21
|
import {
|
|
19
22
|
QmdUnavailableError,
|
|
20
23
|
hasQmd,
|
|
21
24
|
withQmdIndexArgs
|
|
22
|
-
} from "../chunk-
|
|
23
|
-
import "../chunk-
|
|
25
|
+
} from "../chunk-5PJ4STIC.js";
|
|
26
|
+
import "../chunk-URXDAUVH.js";
|
|
27
|
+
import "../chunk-YXQCA6B7.js";
|
|
24
28
|
import "../chunk-2CDEETQN.js";
|
|
25
29
|
import {
|
|
26
30
|
loadMemoryGraphIndex
|
|
@@ -29,6 +33,7 @@ import "../chunk-Z2XBWN7A.js";
|
|
|
29
33
|
import "../chunk-QWQ3TIKS.js";
|
|
30
34
|
import "../chunk-MFAWT5O5.js";
|
|
31
35
|
import "../chunk-7766SIJP.js";
|
|
36
|
+
import "../chunk-2ZDO52B4.js";
|
|
32
37
|
|
|
33
38
|
// src/commands/status.ts
|
|
34
39
|
import * as fs from "fs";
|
|
@@ -80,22 +85,18 @@ function getLatestVaultMarkdownMtime(vaultPath) {
|
|
|
80
85
|
walk(vaultPath);
|
|
81
86
|
return latest;
|
|
82
87
|
}
|
|
83
|
-
function parseQmdCollectionsText(raw) {
|
|
84
|
-
const names = [];
|
|
85
|
-
const regex = /^(\S+)\s+\(qmd:\/\/\1\/\)/gm;
|
|
86
|
-
let match;
|
|
87
|
-
while ((match = regex.exec(raw)) !== null) {
|
|
88
|
-
names.push(match[1]);
|
|
89
|
-
}
|
|
90
|
-
return names;
|
|
91
|
-
}
|
|
92
88
|
function getQmdIndexStatus(collection, root, indexName) {
|
|
93
89
|
const output = execFileSync("qmd", withQmdIndexArgs(["collection", "list"], indexName), { encoding: "utf-8" });
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
90
|
+
const collections = parseQmdCollectionList(output);
|
|
91
|
+
const collectionInfo = collections.find((c) => c.name === collection);
|
|
92
|
+
if (collectionInfo) {
|
|
93
|
+
return {
|
|
94
|
+
status: "present",
|
|
95
|
+
files: collectionInfo.files,
|
|
96
|
+
vectors: collectionInfo.vectors
|
|
97
|
+
};
|
|
97
98
|
}
|
|
98
|
-
return "missing";
|
|
99
|
+
return { status: "missing" };
|
|
99
100
|
}
|
|
100
101
|
function loadCheckpoint(vaultPath) {
|
|
101
102
|
const checkpointPath = path.join(vaultPath, CLAWVAULT_DIR, CHECKPOINT_FILE);
|
|
@@ -140,12 +141,12 @@ async function getStatus(vaultPath, options = {}) {
|
|
|
140
141
|
}
|
|
141
142
|
const qmdCollection = vault.getQmdCollection();
|
|
142
143
|
const qmdRoot = vault.getQmdRoot();
|
|
143
|
-
let
|
|
144
|
+
let qmdIndexResult = { status: "missing" };
|
|
144
145
|
let qmdError;
|
|
145
146
|
try {
|
|
146
|
-
|
|
147
|
-
if (
|
|
148
|
-
issues.push(`qmd collection ${
|
|
147
|
+
qmdIndexResult = getQmdIndexStatus(qmdCollection, qmdRoot, options.qmdIndexName);
|
|
148
|
+
if (qmdIndexResult.status !== "present") {
|
|
149
|
+
issues.push(`qmd collection ${qmdIndexResult.status.replace("-", " ")}`);
|
|
149
150
|
}
|
|
150
151
|
} catch (err) {
|
|
151
152
|
qmdError = err?.message || "Failed to check qmd index";
|
|
@@ -197,7 +198,9 @@ async function getStatus(vaultPath, options = {}) {
|
|
|
197
198
|
qmd: {
|
|
198
199
|
collection: qmdCollection,
|
|
199
200
|
root: qmdRoot,
|
|
200
|
-
indexStatus:
|
|
201
|
+
indexStatus: qmdIndexResult.status,
|
|
202
|
+
files: qmdIndexResult.files,
|
|
203
|
+
vectors: qmdIndexResult.vectors,
|
|
201
204
|
error: qmdError
|
|
202
205
|
},
|
|
203
206
|
graph: graphStatus,
|
|
@@ -256,6 +259,14 @@ function formatStatus(status) {
|
|
|
256
259
|
`;
|
|
257
260
|
output += ` - Index: ${status.qmd.indexStatus}
|
|
258
261
|
`;
|
|
262
|
+
if (status.qmd.files !== void 0) {
|
|
263
|
+
output += ` - Files: ${status.qmd.files}
|
|
264
|
+
`;
|
|
265
|
+
}
|
|
266
|
+
if (status.qmd.vectors !== void 0) {
|
|
267
|
+
output += ` - Vectors: ${status.qmd.vectors}
|
|
268
|
+
`;
|
|
269
|
+
}
|
|
259
270
|
if (status.qmd.error) {
|
|
260
271
|
output += ` - Error: ${status.qmd.error}
|
|
261
272
|
`;
|
package/dist/commands/sync-bd.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerSyncBdCommand,
|
|
3
3
|
syncBdCommand
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-SS4B7P7V.js";
|
|
5
|
+
import "../chunk-GNJL4YGR.js";
|
|
6
|
+
import "../chunk-2ZDO52B4.js";
|
|
6
7
|
export {
|
|
7
8
|
registerSyncBdCommand,
|
|
8
9
|
syncBdCommand
|
|
@@ -8,10 +8,11 @@ import {
|
|
|
8
8
|
tailscaleServeCommand,
|
|
9
9
|
tailscaleStatusCommand,
|
|
10
10
|
tailscaleSyncCommand
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-Y6VJKXGL.js";
|
|
12
12
|
import "../chunk-TIGW564L.js";
|
|
13
13
|
import "../chunk-IVRIKYFE.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-GNJL4YGR.js";
|
|
15
|
+
import "../chunk-2ZDO52B4.js";
|
|
15
16
|
export {
|
|
16
17
|
registerTailscaleCommands,
|
|
17
18
|
registerTailscaleDiscoverCommand,
|
package/dist/commands/task.js
CHANGED
package/dist/commands/wake.d.ts
CHANGED
package/dist/commands/wake.js
CHANGED
|
@@ -4,11 +4,12 @@ import {
|
|
|
4
4
|
import "../chunk-7ZRP733D.js";
|
|
5
5
|
import {
|
|
6
6
|
ClawVault
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-YDWHS4LJ.js";
|
|
8
8
|
import {
|
|
9
9
|
parseObservationMarkdown
|
|
10
10
|
} from "../chunk-FHFUXL6G.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-WIOLLGAD.js";
|
|
12
|
+
import "../chunk-5PJ4STIC.js";
|
|
12
13
|
import "../chunk-2CDEETQN.js";
|
|
13
14
|
import "../chunk-ZZA73MFY.js";
|
|
14
15
|
import {
|
|
@@ -17,6 +18,7 @@ import {
|
|
|
17
18
|
import {
|
|
18
19
|
clearDirtyFlag
|
|
19
20
|
} from "../chunk-F55HGNU4.js";
|
|
21
|
+
import "../chunk-2ZDO52B4.js";
|
|
20
22
|
|
|
21
23
|
// src/commands/wake.ts
|
|
22
24
|
import * as fs from "fs";
|