clawvault 3.2.1 → 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 +56 -16
- 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-U67V476Y.js → chunk-2ZDO52B4.js} +18 -1
- package/dist/{chunk-ZZA73MFY.js → chunk-33DOSHTA.js} +176 -36
- package/dist/{chunk-AZYOKJYC.js → chunk-4PY655YM.js} +13 -1
- package/dist/{chunk-2JQ3O2YL.js → chunk-5EFSWZO6.js} +3 -3
- package/dist/{chunk-Y3TIJEBP.js → chunk-7SWP5FKU.js} +34 -613
- package/dist/{chunk-4VQTUVH7.js → chunk-7YZWHM36.js} +52 -26
- package/dist/{chunk-URXDAUVH.js → chunk-AXSJIFOJ.js} +174 -1
- package/dist/{chunk-4ITRXIVT.js → chunk-BLQXXX7Q.js} +6 -6
- package/dist/chunk-CSHO3PJB.js +684 -0
- package/dist/{chunk-S5OJEGFG.js → chunk-DOIUYIXV.js} +2 -2
- package/dist/{chunk-YXQCA6B7.js → chunk-DVOUSOR3.js} +112 -7
- package/dist/{chunk-YDWHS4LJ.js → chunk-ECGJYWNA.js} +205 -33
- package/dist/{chunk-QMHPQYUV.js → chunk-EL6UBSX5.js} +7 -6
- package/dist/chunk-FZ5I2NF7.js +352 -0
- package/dist/{chunk-WJVWINEM.js → chunk-GFCHWMGD.js} +55 -6
- 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-UCQAOZHW.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-P5EPF6MB.js → chunk-MW5C6ZQA.js} +110 -13
- package/dist/{chunk-YNIPYN4F.js → chunk-OFOCU2V4.js} +6 -5
- package/dist/{chunk-42MXU7A6.js → chunk-P62WHA27.js} +58 -47
- package/dist/chunk-PTWPPVC7.js +972 -0
- package/dist/{chunk-FAKNOB7Y.js → chunk-QFWERBDP.js} +2 -2
- package/dist/{chunk-IIOU45CK.js → chunk-S7N7HI5E.js} +2 -2
- package/dist/{chunk-ECRZL5XR.js → chunk-T7E764W3.js} +23 -7
- package/dist/chunk-TDWFBDAQ.js +1016 -0
- package/dist/{chunk-MNPUYCHQ.js → chunk-TWMI3SNN.js} +6 -5
- package/dist/{chunk-2RAZ4ZFE.js → chunk-VBILES4B.js} +1 -1
- package/dist/{chunk-PI4WMLMG.js → chunk-VXAGOLDP.js} +1 -1
- 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 +27 -21
- package/dist/commands/archive.js +3 -3
- package/dist/commands/backlog.js +1 -1
- package/dist/commands/benchmark.d.ts +12 -0
- package/dist/commands/benchmark.js +12 -0
- package/dist/commands/blocked.js +1 -1
- package/dist/commands/canvas.js +2 -2
- package/dist/commands/checkpoint.js +1 -1
- package/dist/commands/compat.js +1 -1
- package/dist/commands/context.js +8 -7
- package/dist/commands/doctor.d.ts +8 -3
- package/dist/commands/doctor.js +8 -22
- package/dist/commands/embed.js +6 -5
- package/dist/commands/entities.js +2 -2
- package/dist/commands/graph.js +4 -4
- 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 +5 -5
- package/dist/commands/kanban.js +1 -1
- package/dist/commands/link.js +9 -9
- package/dist/commands/maintain.d.ts +32 -0
- package/dist/commands/maintain.js +12 -0
- package/dist/commands/migrate-observations.js +3 -3
- package/dist/commands/observe.js +11 -10
- package/dist/commands/project.js +2 -2
- package/dist/commands/rebuild-embeddings.js +48 -17
- package/dist/commands/rebuild.js +9 -8
- package/dist/commands/recover.js +1 -1
- package/dist/commands/reflect.js +6 -6
- package/dist/commands/repair-session.js +1 -1
- package/dist/commands/replay.js +10 -9
- package/dist/commands/session-recap.js +1 -1
- package/dist/commands/setup.js +4 -3
- package/dist/commands/shell-init.js +1 -1
- package/dist/commands/sleep.d.ts +1 -1
- package/dist/commands/sleep.js +20 -18
- package/dist/commands/status.js +40 -26
- package/dist/commands/sync-bd.js +3 -3
- package/dist/commands/tailscale.js +3 -3
- package/dist/commands/task.js +1 -1
- package/dist/commands/template.js +1 -1
- package/dist/commands/wake.d.ts +1 -1
- package/dist/commands/wake.js +10 -9
- package/dist/index.d.ts +175 -16
- package/dist/index.js +277 -108
- package/dist/{inject-DYUrDqQO.d.ts → inject-DEb_jpLi.d.ts} +3 -1
- package/dist/lib/auto-linker.js +2 -2
- package/dist/lib/canvas-layout.js +1 -1
- package/dist/lib/config.js +2 -2
- package/dist/lib/entity-index.js +1 -1
- package/dist/lib/project-utils.js +2 -2
- package/dist/lib/session-repair.js +1 -1
- package/dist/lib/session-utils.js +1 -1
- package/dist/lib/tailscale.js +1 -1
- package/dist/lib/task-utils.js +1 -1
- package/dist/lib/template-engine.js +1 -1
- package/dist/lib/webdav.js +1 -1
- 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/openclaw-plugin.d.ts +8 -0
- package/dist/openclaw-plugin.js +14 -0
- package/dist/transformers.node-A2ZRORSQ.js +46775 -0
- package/dist/{types-BbWJoC1c.d.ts → types-DslKvCaj.d.ts} +51 -1
- package/hooks/clawvault/HOOK.md +25 -8
- package/hooks/clawvault/handler.js +215 -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 +131 -203
- package/package.json +10 -7
- package/bin/register-workgraph-commands.js +0 -451
- package/dist/chunk-5PJ4STIC.js +0 -465
- package/dist/chunk-ERNE2FZ5.js +0 -189
- package/dist/chunk-HR4KN6S2.js +0 -152
- package/dist/chunk-IJBFGPCS.js +0 -33
- package/dist/chunk-K7PNYS45.js +0 -93
- package/dist/chunk-NTOPJI7W.js +0 -207
- package/dist/chunk-PG56HX5T.js +0 -154
- package/dist/chunk-QPDDIHXE.js +0 -501
- package/dist/chunk-WIOLLGAD.js +0 -190
- package/dist/chunk-WMGIIABP.js +0 -15
- package/dist/ledger-B7g7jhqG.d.ts +0 -44
- package/dist/plugin/index.d.ts +0 -352
- package/dist/plugin/index.js +0 -4264
- 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
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
benchmarkObserverCommand,
|
|
3
|
+
registerBenchmarkCommand
|
|
4
|
+
} from "../chunk-ZKWPCBYT.js";
|
|
5
|
+
import "../chunk-MW5C6ZQA.js";
|
|
6
|
+
import "../chunk-J3YUXVID.js";
|
|
7
|
+
import "../chunk-FHFUXL6G.js";
|
|
8
|
+
import "../chunk-2ZDO52B4.js";
|
|
9
|
+
export {
|
|
10
|
+
benchmarkObserverCommand,
|
|
11
|
+
registerBenchmarkCommand
|
|
12
|
+
};
|
package/dist/commands/blocked.js
CHANGED
package/dist/commands/canvas.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "../chunk-MDIH26GC.js";
|
|
10
10
|
import {
|
|
11
11
|
loadMemoryGraphIndex
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-33DOSHTA.js";
|
|
13
13
|
import {
|
|
14
14
|
listObservationFiles
|
|
15
15
|
} from "../chunk-Z2XBWN7A.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "../chunk-QWQ3TIKS.js";
|
|
19
19
|
import "../chunk-MFAWT5O5.js";
|
|
20
20
|
import "../chunk-7766SIJP.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-2ZDO52B4.js";
|
|
22
22
|
|
|
23
23
|
// src/commands/canvas.ts
|
|
24
24
|
import * as fs2 from "fs";
|
package/dist/commands/compat.js
CHANGED
package/dist/commands/context.js
CHANGED
|
@@ -3,16 +3,17 @@ import {
|
|
|
3
3
|
contextCommand,
|
|
4
4
|
formatContextMarkdown,
|
|
5
5
|
registerContextCommand
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-YDWHS4LJ.js";
|
|
6
|
+
} from "../chunk-GFCHWMGD.js";
|
|
8
7
|
import "../chunk-BSJ6RIT7.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-WIOLLGAD.js";
|
|
11
|
-
import "../chunk-5PJ4STIC.js";
|
|
8
|
+
import "../chunk-ECGJYWNA.js";
|
|
12
9
|
import "../chunk-2CDEETQN.js";
|
|
13
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-FZ5I2NF7.js";
|
|
11
|
+
import "../chunk-PTWPPVC7.js";
|
|
12
|
+
import "../chunk-H3JZIB5O.js";
|
|
13
|
+
import "../chunk-FHFUXL6G.js";
|
|
14
|
+
import "../chunk-33DOSHTA.js";
|
|
14
15
|
import "../chunk-Z2XBWN7A.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-2ZDO52B4.js";
|
|
16
17
|
export {
|
|
17
18
|
buildContext,
|
|
18
19
|
contextCommand,
|
|
@@ -4,9 +4,14 @@ interface DoctorCheck {
|
|
|
4
4
|
status: DoctorStatus;
|
|
5
5
|
detail?: string;
|
|
6
6
|
hint?: string;
|
|
7
|
-
category?: 'system' | '
|
|
7
|
+
category?: 'system' | 'vault' | 'config' | 'search' | 'integration' | 'storage' | 'migration';
|
|
8
|
+
}
|
|
9
|
+
interface DoctorOptions {
|
|
10
|
+
vaultPath?: string;
|
|
11
|
+
fix?: boolean;
|
|
8
12
|
}
|
|
9
13
|
interface DoctorReport {
|
|
14
|
+
generatedAt: string;
|
|
10
15
|
vaultPath?: string;
|
|
11
16
|
checks: DoctorCheck[];
|
|
12
17
|
warnings: number;
|
|
@@ -20,6 +25,6 @@ interface MigrationIssue {
|
|
|
20
25
|
details?: Record<string, unknown>;
|
|
21
26
|
}
|
|
22
27
|
type MigrationIssueType = 'stale_collection_name' | 'missing_qmd_collection' | 'wrong_vault_path' | 'orphaned_collection' | 'missing_qmd_config' | 'legacy_config_format';
|
|
23
|
-
declare function doctor(
|
|
28
|
+
declare function doctor(input?: string | DoctorOptions): Promise<DoctorReport>;
|
|
24
29
|
|
|
25
|
-
export { type DoctorCheck, type DoctorReport, type DoctorStatus, type MigrationIssue, type MigrationIssueType, doctor };
|
|
30
|
+
export { type DoctorCheck, type DoctorOptions, type DoctorReport, type DoctorStatus, type MigrationIssue, type MigrationIssueType, doctor };
|
package/dist/commands/doctor.js
CHANGED
|
@@ -1,28 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
doctor
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-4VQTUVH7.js";
|
|
6
|
-
import "../chunk-J7ZWCI2C.js";
|
|
7
|
-
import "../chunk-PI4WMLMG.js";
|
|
8
|
-
import "../chunk-Y3TIJEBP.js";
|
|
9
|
-
import "../chunk-AZYOKJYC.js";
|
|
10
|
-
import "../chunk-HRLWZGMA.js";
|
|
11
|
-
import "../chunk-YDWHS4LJ.js";
|
|
12
|
-
import "../chunk-BSJ6RIT7.js";
|
|
13
|
-
import "../chunk-FHFUXL6G.js";
|
|
14
|
-
import "../chunk-WIOLLGAD.js";
|
|
15
|
-
import "../chunk-5PJ4STIC.js";
|
|
16
|
-
import "../chunk-URXDAUVH.js";
|
|
17
|
-
import "../chunk-YXQCA6B7.js";
|
|
3
|
+
} from "../chunk-CSHO3PJB.js";
|
|
4
|
+
import "../chunk-ECGJYWNA.js";
|
|
18
5
|
import "../chunk-2CDEETQN.js";
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-U67V476Y.js";
|
|
6
|
+
import "../chunk-FZ5I2NF7.js";
|
|
7
|
+
import "../chunk-PTWPPVC7.js";
|
|
8
|
+
import "../chunk-H3JZIB5O.js";
|
|
9
|
+
import "../chunk-GJO3CFUN.js";
|
|
10
|
+
import "../chunk-33DOSHTA.js";
|
|
11
|
+
import "../chunk-2ZDO52B4.js";
|
|
26
12
|
export {
|
|
27
13
|
doctor
|
|
28
14
|
};
|
package/dist/commands/embed.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
embedCommand,
|
|
3
3
|
registerEmbedCommand
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-T7E764W3.js";
|
|
5
|
+
import "../chunk-FZ5I2NF7.js";
|
|
6
|
+
import "../chunk-PTWPPVC7.js";
|
|
7
|
+
import "../chunk-H3JZIB5O.js";
|
|
8
|
+
import "../chunk-GJO3CFUN.js";
|
|
9
|
+
import "../chunk-2ZDO52B4.js";
|
|
9
10
|
export {
|
|
10
11
|
embedCommand,
|
|
11
12
|
registerEmbedCommand
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
} from "../chunk-J7ZWCI2C.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveVaultPath
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-GJO3CFUN.js";
|
|
7
|
+
import "../chunk-2ZDO52B4.js";
|
|
8
8
|
|
|
9
9
|
// src/commands/entities.ts
|
|
10
10
|
async function entitiesCommand(options) {
|
package/dist/commands/graph.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
graphCommand,
|
|
3
3
|
graphSummary
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-S7N7HI5E.js";
|
|
5
|
+
import "../chunk-GJO3CFUN.js";
|
|
6
|
+
import "../chunk-33DOSHTA.js";
|
|
7
|
+
import "../chunk-2ZDO52B4.js";
|
|
8
8
|
export {
|
|
9
9
|
graphCommand,
|
|
10
10
|
graphSummary
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
|
|
3
|
+
interface AddInboxItemResult {
|
|
4
|
+
id: string;
|
|
5
|
+
hash: string;
|
|
6
|
+
title: string;
|
|
7
|
+
path: string;
|
|
8
|
+
relativePath: string;
|
|
9
|
+
source: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface InboxAddCommandOptions {
|
|
13
|
+
vaultPath?: string;
|
|
14
|
+
content?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
source?: string;
|
|
17
|
+
stdin?: boolean;
|
|
18
|
+
readStdin?: () => string;
|
|
19
|
+
}
|
|
20
|
+
declare function inboxAddCommand(options: InboxAddCommandOptions): Promise<AddInboxItemResult>;
|
|
21
|
+
declare function registerInboxCommand(program: Command): void;
|
|
22
|
+
|
|
23
|
+
export { type InboxAddCommandOptions, inboxAddCommand, registerInboxCommand };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import 'commander';
|
|
2
|
-
export { I as InjectCommandOptions,
|
|
2
|
+
export { I as InjectCommandOptions, b as InjectFormat, r as buildInjectionResult, w as injectCommand, y as registerInjectCommand } from '../inject-DEb_jpLi.js';
|
package/dist/commands/inject.js
CHANGED
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
buildInjectionResult,
|
|
3
3
|
injectCommand,
|
|
4
4
|
registerInjectCommand
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-OFOCU2V4.js";
|
|
6
|
+
import "../chunk-DVOUSOR3.js";
|
|
7
|
+
import "../chunk-AXSJIFOJ.js";
|
|
8
8
|
import "../chunk-2CDEETQN.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-33DOSHTA.js";
|
|
10
|
+
import "../chunk-2ZDO52B4.js";
|
|
11
11
|
export {
|
|
12
12
|
buildInjectionResult,
|
|
13
13
|
injectCommand,
|
package/dist/commands/kanban.js
CHANGED
package/dist/commands/link.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
autoLink,
|
|
3
|
-
dryRunLink,
|
|
4
|
-
findUnlinkedMentions
|
|
5
|
-
} from "../chunk-42MXU7A6.js";
|
|
6
1
|
import {
|
|
7
2
|
readBacklinksIndex,
|
|
8
3
|
rebuildBacklinksIndex,
|
|
9
4
|
scanVaultLinks
|
|
10
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-7YZWHM36.js";
|
|
6
|
+
import {
|
|
7
|
+
autoLink,
|
|
8
|
+
dryRunLink,
|
|
9
|
+
findUnlinkedMentions
|
|
10
|
+
} from "../chunk-P62WHA27.js";
|
|
11
11
|
import {
|
|
12
12
|
buildEntityIndex
|
|
13
13
|
} from "../chunk-J7ZWCI2C.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveVaultPath
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-GJO3CFUN.js";
|
|
17
17
|
import {
|
|
18
18
|
buildOrUpdateMemoryGraphIndex
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-33DOSHTA.js";
|
|
20
|
+
import "../chunk-2ZDO52B4.js";
|
|
21
21
|
|
|
22
22
|
// src/commands/link.ts
|
|
23
23
|
import * as fs from "fs";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
|
|
3
|
+
declare const MAINTENANCE_WORKERS: readonly ["curator", "janitor", "distiller", "surveyor"];
|
|
4
|
+
type MaintenanceWorkerName = (typeof MAINTENANCE_WORKERS)[number];
|
|
5
|
+
interface WorkerRunResult {
|
|
6
|
+
worker: MaintenanceWorkerName;
|
|
7
|
+
processed: number;
|
|
8
|
+
skipped: number;
|
|
9
|
+
actions: string[];
|
|
10
|
+
usedLlm: boolean;
|
|
11
|
+
degradedMode: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface MaintainRunResult {
|
|
14
|
+
runId: string;
|
|
15
|
+
vaultPath: string;
|
|
16
|
+
startedAt: string;
|
|
17
|
+
finishedAt: string;
|
|
18
|
+
logPath: string;
|
|
19
|
+
workers: WorkerRunResult[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface MaintainCommandOptions {
|
|
23
|
+
vaultPath?: string;
|
|
24
|
+
worker?: MaintenanceWorkerName;
|
|
25
|
+
dryRun?: boolean;
|
|
26
|
+
limit?: number;
|
|
27
|
+
quiet?: boolean;
|
|
28
|
+
}
|
|
29
|
+
declare function maintainCommand(options?: MaintainCommandOptions): Promise<MaintainRunResult>;
|
|
30
|
+
declare function registerMaintainCommand(program: Command): void;
|
|
31
|
+
|
|
32
|
+
export { type MaintainCommandOptions, maintainCommand, registerMaintainCommand };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
maintainCommand,
|
|
3
|
+
registerMaintainCommand
|
|
4
|
+
} from "../chunk-TDWFBDAQ.js";
|
|
5
|
+
import "../chunk-DVOUSOR3.js";
|
|
6
|
+
import "../chunk-2PKBIKDH.js";
|
|
7
|
+
import "../chunk-GJO3CFUN.js";
|
|
8
|
+
import "../chunk-2ZDO52B4.js";
|
|
9
|
+
export {
|
|
10
|
+
maintainCommand,
|
|
11
|
+
registerMaintainCommand
|
|
12
|
+
};
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
migrateObservations,
|
|
3
3
|
migrateObservationsCommand,
|
|
4
4
|
registerMigrateObservationsCommand
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-5EFSWZO6.js";
|
|
6
|
+
import "../chunk-GJO3CFUN.js";
|
|
6
7
|
import "../chunk-FHFUXL6G.js";
|
|
7
|
-
import "../chunk-GNJL4YGR.js";
|
|
8
8
|
import "../chunk-Z2XBWN7A.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-2ZDO52B4.js";
|
|
10
10
|
export {
|
|
11
11
|
migrateObservations,
|
|
12
12
|
migrateObservationsCommand,
|
package/dist/commands/observe.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
observeCommand,
|
|
3
3
|
registerObserveCommand
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-Y3TIJEBP.js";
|
|
8
|
-
import "../chunk-AZYOKJYC.js";
|
|
4
|
+
} from "../chunk-BLQXXX7Q.js";
|
|
5
|
+
import "../chunk-VXAGOLDP.js";
|
|
6
|
+
import "../chunk-7SWP5FKU.js";
|
|
9
7
|
import "../chunk-HRLWZGMA.js";
|
|
8
|
+
import "../chunk-DVOUSOR3.js";
|
|
9
|
+
import "../chunk-4PY655YM.js";
|
|
10
|
+
import "../chunk-AXSJIFOJ.js";
|
|
10
11
|
import "../chunk-BSJ6RIT7.js";
|
|
11
|
-
import "../chunk-FHFUXL6G.js";
|
|
12
|
-
import "../chunk-URXDAUVH.js";
|
|
13
|
-
import "../chunk-YXQCA6B7.js";
|
|
14
12
|
import "../chunk-2CDEETQN.js";
|
|
15
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-GJO3CFUN.js";
|
|
14
|
+
import "../chunk-MW5C6ZQA.js";
|
|
15
|
+
import "../chunk-J3YUXVID.js";
|
|
16
|
+
import "../chunk-FHFUXL6G.js";
|
|
16
17
|
import "../chunk-Z2XBWN7A.js";
|
|
17
18
|
import "../chunk-QWQ3TIKS.js";
|
|
18
19
|
import "../chunk-MFAWT5O5.js";
|
|
19
20
|
import "../chunk-7766SIJP.js";
|
|
20
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-2ZDO52B4.js";
|
|
21
22
|
export {
|
|
22
23
|
observeCommand,
|
|
23
24
|
registerObserveCommand
|
package/dist/commands/project.js
CHANGED
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
listProjects,
|
|
11
11
|
readProject,
|
|
12
12
|
updateProject
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-4PY655YM.js";
|
|
14
14
|
import "../chunk-QWQ3TIKS.js";
|
|
15
15
|
import "../chunk-MFAWT5O5.js";
|
|
16
16
|
import "../chunk-7766SIJP.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-2ZDO52B4.js";
|
|
18
18
|
|
|
19
19
|
// src/commands/project.ts
|
|
20
20
|
import * as fs from "fs";
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
listConfig
|
|
3
|
+
} from "../chunk-AXSJIFOJ.js";
|
|
4
|
+
import "../chunk-2CDEETQN.js";
|
|
5
|
+
import {
|
|
6
|
+
EmbeddingStore,
|
|
7
|
+
computeEmbeddingHash,
|
|
8
|
+
embedText,
|
|
9
|
+
resolveEmbeddingConfig
|
|
10
|
+
} from "../chunk-H3JZIB5O.js";
|
|
5
11
|
import {
|
|
6
12
|
resolveVaultPath
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
13
|
+
} from "../chunk-GJO3CFUN.js";
|
|
14
|
+
import "../chunk-2ZDO52B4.js";
|
|
9
15
|
|
|
10
16
|
// src/commands/rebuild-embeddings.ts
|
|
11
17
|
import * as fs from "fs";
|
|
@@ -27,25 +33,43 @@ function walkDir(dir, base) {
|
|
|
27
33
|
}
|
|
28
34
|
return files;
|
|
29
35
|
}
|
|
36
|
+
function resolveSearchConfig(vaultPath) {
|
|
37
|
+
try {
|
|
38
|
+
const config = listConfig(vaultPath);
|
|
39
|
+
const search = config.search;
|
|
40
|
+
if (search && typeof search === "object" && !Array.isArray(search)) {
|
|
41
|
+
return search;
|
|
42
|
+
}
|
|
43
|
+
return {};
|
|
44
|
+
} catch {
|
|
45
|
+
return {};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
30
48
|
async function rebuildEmbeddingsForVault(vaultPath, options = {}) {
|
|
31
49
|
const { force = false, onProgress } = options;
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
50
|
+
const searchConfig = resolveSearchConfig(vaultPath);
|
|
51
|
+
const embeddingConfig = resolveEmbeddingConfig(searchConfig);
|
|
52
|
+
if (!embeddingConfig) {
|
|
53
|
+
throw new Error(
|
|
54
|
+
"No hosted embedding provider configured. Set search.embeddings.provider to openai, gemini, or ollama."
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
const store = new EmbeddingStore(vaultPath);
|
|
58
|
+
store.load();
|
|
59
|
+
if (force || !store.isCompatible(embeddingConfig.provider, embeddingConfig.model)) {
|
|
60
|
+
store.clear();
|
|
35
61
|
}
|
|
62
|
+
store.setSignature(embeddingConfig.provider, embeddingConfig.model);
|
|
36
63
|
const mdFiles = walkDir(vaultPath, vaultPath).filter(
|
|
37
64
|
(f) => !f.startsWith("node_modules") && !f.startsWith(".")
|
|
38
65
|
);
|
|
66
|
+
const validDocIds = /* @__PURE__ */ new Set();
|
|
39
67
|
let added = 0;
|
|
40
68
|
let skipped = 0;
|
|
41
69
|
for (let i = 0; i < mdFiles.length; i++) {
|
|
42
70
|
const file = mdFiles[i];
|
|
43
71
|
const docId = file.replace(/\.md$/, "");
|
|
44
|
-
|
|
45
|
-
skipped++;
|
|
46
|
-
if (onProgress) onProgress(i + 1, mdFiles.length);
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
72
|
+
validDocIds.add(docId);
|
|
49
73
|
try {
|
|
50
74
|
const content = fs.readFileSync(path.join(vaultPath, file), "utf-8");
|
|
51
75
|
if (content.length < 20) {
|
|
@@ -53,17 +77,24 @@ async function rebuildEmbeddingsForVault(vaultPath, options = {}) {
|
|
|
53
77
|
if (onProgress) onProgress(i + 1, mdFiles.length);
|
|
54
78
|
continue;
|
|
55
79
|
}
|
|
56
|
-
const
|
|
57
|
-
|
|
80
|
+
const hash = computeEmbeddingHash(content.slice(0, 12e3));
|
|
81
|
+
if (!force && store.getHash(docId) === hash) {
|
|
82
|
+
skipped++;
|
|
83
|
+
if (onProgress) onProgress(i + 1, mdFiles.length);
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
const embedding = await embedText(content, embeddingConfig, { isQuery: false });
|
|
87
|
+
store.set(docId, hash, embedding);
|
|
58
88
|
added++;
|
|
59
89
|
} catch {
|
|
60
90
|
skipped++;
|
|
61
91
|
}
|
|
62
92
|
if (onProgress) onProgress(i + 1, mdFiles.length);
|
|
63
93
|
}
|
|
64
|
-
|
|
94
|
+
store.prune(validDocIds);
|
|
95
|
+
store.save();
|
|
65
96
|
return {
|
|
66
|
-
total:
|
|
97
|
+
total: store.size,
|
|
67
98
|
added,
|
|
68
99
|
skipped
|
|
69
100
|
};
|
package/dist/commands/rebuild.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rebuildCommand,
|
|
3
3
|
registerRebuildCommand
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-QFWERBDP.js";
|
|
5
|
+
import "../chunk-7SWP5FKU.js";
|
|
6
|
+
import "../chunk-DVOUSOR3.js";
|
|
7
|
+
import "../chunk-4PY655YM.js";
|
|
8
|
+
import "../chunk-AXSJIFOJ.js";
|
|
7
9
|
import "../chunk-BSJ6RIT7.js";
|
|
8
|
-
import "../chunk-FHFUXL6G.js";
|
|
9
|
-
import "../chunk-URXDAUVH.js";
|
|
10
|
-
import "../chunk-YXQCA6B7.js";
|
|
11
10
|
import "../chunk-2CDEETQN.js";
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-GJO3CFUN.js";
|
|
12
|
+
import "../chunk-J3YUXVID.js";
|
|
13
|
+
import "../chunk-FHFUXL6G.js";
|
|
13
14
|
import "../chunk-Z2XBWN7A.js";
|
|
14
15
|
import "../chunk-QWQ3TIKS.js";
|
|
15
16
|
import "../chunk-MFAWT5O5.js";
|
|
16
17
|
import "../chunk-7766SIJP.js";
|
|
17
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-2ZDO52B4.js";
|
|
18
19
|
export {
|
|
19
20
|
rebuildCommand,
|
|
20
21
|
registerRebuildCommand
|
package/dist/commands/recover.js
CHANGED
package/dist/commands/reflect.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
reflectCommand,
|
|
3
3
|
registerReflectCommand
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-YXQCA6B7.js";
|
|
4
|
+
} from "../chunk-DOIUYIXV.js";
|
|
5
|
+
import "../chunk-TWMI3SNN.js";
|
|
6
|
+
import "../chunk-DVOUSOR3.js";
|
|
8
7
|
import "../chunk-MQUJNOHK.js";
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-GJO3CFUN.js";
|
|
9
|
+
import "../chunk-FHFUXL6G.js";
|
|
10
10
|
import "../chunk-Z2XBWN7A.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-2ZDO52B4.js";
|
|
12
12
|
export {
|
|
13
13
|
reflectCommand,
|
|
14
14
|
registerReflectCommand
|
package/dist/commands/replay.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerReplayCommand,
|
|
3
3
|
replayCommand
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-HGDDW24U.js";
|
|
5
|
+
import "../chunk-TWMI3SNN.js";
|
|
6
|
+
import "../chunk-7SWP5FKU.js";
|
|
7
|
+
import "../chunk-DVOUSOR3.js";
|
|
8
|
+
import "../chunk-4PY655YM.js";
|
|
9
|
+
import "../chunk-AXSJIFOJ.js";
|
|
8
10
|
import "../chunk-BSJ6RIT7.js";
|
|
9
|
-
import "../chunk-FHFUXL6G.js";
|
|
10
|
-
import "../chunk-URXDAUVH.js";
|
|
11
|
-
import "../chunk-YXQCA6B7.js";
|
|
12
11
|
import "../chunk-2CDEETQN.js";
|
|
13
12
|
import "../chunk-MQUJNOHK.js";
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-GJO3CFUN.js";
|
|
14
|
+
import "../chunk-J3YUXVID.js";
|
|
15
|
+
import "../chunk-FHFUXL6G.js";
|
|
15
16
|
import "../chunk-Z2XBWN7A.js";
|
|
16
17
|
import "../chunk-QWQ3TIKS.js";
|
|
17
18
|
import "../chunk-MFAWT5O5.js";
|
|
18
19
|
import "../chunk-7766SIJP.js";
|
|
19
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-2ZDO52B4.js";
|
|
20
21
|
export {
|
|
21
22
|
registerReplayCommand,
|
|
22
23
|
replayCommand
|
package/dist/commands/setup.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
setupCommand
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-5PJ4STIC.js";
|
|
3
|
+
} from "../chunk-EL6UBSX5.js";
|
|
5
4
|
import "../chunk-2CDEETQN.js";
|
|
6
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-PTWPPVC7.js";
|
|
6
|
+
import "../chunk-H3JZIB5O.js";
|
|
7
|
+
import "../chunk-2ZDO52B4.js";
|
|
7
8
|
export {
|
|
8
9
|
setupCommand
|
|
9
10
|
};
|