clawvault 2.6.3 → 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.
Files changed (123) hide show
  1. package/README.md +351 -21
  2. package/bin/clawvault.js +8 -2
  3. package/bin/command-runtime.js +9 -1
  4. package/bin/register-maintenance-commands.js +19 -0
  5. package/bin/register-query-commands.js +58 -6
  6. package/bin/register-workgraph-commands.js +451 -0
  7. package/dist/{chunk-VXEOHTSL.js → chunk-2JQ3O2YL.js} +1 -1
  8. package/dist/{chunk-VR5NE7PZ.js → chunk-2RAZ4ZFE.js} +1 -1
  9. package/dist/chunk-2ZDO52B4.js +52 -0
  10. package/dist/chunk-4BQTQMJP.js +93 -0
  11. package/dist/{chunk-MAKNAHAW.js → chunk-5PJ4STIC.js} +98 -8
  12. package/dist/{chunk-IEVLHNLU.js → chunk-627Q3QWK.js} +3 -3
  13. package/dist/{chunk-R6SXNSFD.js → chunk-6NYYDNNG.js} +3 -3
  14. package/dist/chunk-ECRZL5XR.js +50 -0
  15. package/dist/chunk-GNJL4YGR.js +79 -0
  16. package/dist/{chunk-OZ7RIXTO.js → chunk-IIOU45CK.js} +1 -1
  17. package/dist/chunk-L4HSSQ6T.js +152 -0
  18. package/dist/{chunk-DTEHFAL7.js → chunk-LIGHWOH6.js} +1 -1
  19. package/dist/{chunk-PBEE567J.js → chunk-LUBZXECN.js} +2 -2
  20. package/dist/{chunk-PZ2AUU2W.js → chunk-MFL6EEPF.js} +204 -35
  21. package/dist/chunk-MM6QGW3P.js +207 -0
  22. package/dist/{chunk-T76H47ZS.js → chunk-MNPUYCHQ.js} +1 -1
  23. package/dist/{chunk-6546Q4OR.js → chunk-MPOSMDMU.js} +6 -6
  24. package/dist/{chunk-RVYA52PY.js → chunk-NJYJL5AA.js} +1 -1
  25. package/dist/{chunk-Q2J5YTUF.js → chunk-OQGYFZ4A.js} +669 -33
  26. package/dist/{chunk-ME37YNW3.js → chunk-P7SY3D4E.js} +3 -3
  27. package/dist/chunk-RHISK3SZ.js +189 -0
  28. package/dist/{chunk-3BTHWPMB.js → chunk-S5OJEGFG.js} +2 -2
  29. package/dist/{chunk-MGDEINGP.js → chunk-SS4B7P7V.js} +1 -1
  30. package/dist/chunk-U4O6C46S.js +154 -0
  31. package/dist/{chunk-ITPEXLHA.js → chunk-URXDAUVH.js} +24 -5
  32. package/dist/chunk-WIOLLGAD.js +190 -0
  33. package/dist/chunk-WMGIIABP.js +15 -0
  34. package/dist/{chunk-QVMXF7FY.js → chunk-X3SPPUFG.js} +50 -0
  35. package/dist/{chunk-THRJVD4L.js → chunk-Y6VJKXGL.js} +1 -1
  36. package/dist/{chunk-RCBMXTWS.js → chunk-YDWHS4LJ.js} +21 -6
  37. package/dist/{chunk-4VRIMU4O.js → chunk-YNIPYN4F.js} +4 -4
  38. package/dist/{chunk-HIHOUSXS.js → chunk-YXQCA6B7.js} +105 -1
  39. package/dist/cli/index.js +18 -16
  40. package/dist/commands/archive.js +3 -2
  41. package/dist/commands/backlog.js +1 -0
  42. package/dist/commands/blocked.js +1 -0
  43. package/dist/commands/canvas.js +1 -0
  44. package/dist/commands/checkpoint.js +1 -0
  45. package/dist/commands/compat.js +2 -1
  46. package/dist/commands/context.js +5 -3
  47. package/dist/commands/doctor.d.ts +10 -1
  48. package/dist/commands/doctor.js +11 -8
  49. package/dist/commands/embed.js +5 -3
  50. package/dist/commands/entities.js +2 -1
  51. package/dist/commands/graph.js +3 -2
  52. package/dist/commands/inject.d.ts +1 -1
  53. package/dist/commands/inject.js +4 -3
  54. package/dist/commands/kanban.js +1 -0
  55. package/dist/commands/link.js +2 -1
  56. package/dist/commands/migrate-observations.js +3 -2
  57. package/dist/commands/observe.js +8 -6
  58. package/dist/commands/project.js +1 -0
  59. package/dist/commands/rebuild-embeddings.d.ts +21 -0
  60. package/dist/commands/rebuild-embeddings.js +91 -0
  61. package/dist/commands/rebuild.js +6 -4
  62. package/dist/commands/recover.js +1 -0
  63. package/dist/commands/reflect.js +5 -4
  64. package/dist/commands/repair-session.js +1 -0
  65. package/dist/commands/replay.js +7 -6
  66. package/dist/commands/session-recap.js +1 -0
  67. package/dist/commands/setup.js +3 -2
  68. package/dist/commands/shell-init.js +2 -0
  69. package/dist/commands/sleep.d.ts +1 -1
  70. package/dist/commands/sleep.js +8 -6
  71. package/dist/commands/status.js +11 -80
  72. package/dist/commands/sync-bd.js +3 -2
  73. package/dist/commands/tailscale.js +3 -2
  74. package/dist/commands/task.js +1 -0
  75. package/dist/commands/template.js +1 -0
  76. package/dist/commands/wake.d.ts +1 -1
  77. package/dist/commands/wake.js +4 -2
  78. package/dist/index.d.ts +247 -10
  79. package/dist/index.js +285 -152
  80. package/dist/{inject-x65KXWPk.d.ts → inject-DYUrDqQO.d.ts} +2 -2
  81. package/dist/ledger-B7g7jhqG.d.ts +44 -0
  82. package/dist/lib/auto-linker.js +1 -0
  83. package/dist/lib/canvas-layout.js +1 -0
  84. package/dist/lib/config.d.ts +27 -3
  85. package/dist/lib/config.js +4 -1
  86. package/dist/lib/entity-index.js +1 -0
  87. package/dist/lib/project-utils.js +1 -0
  88. package/dist/lib/session-repair.js +1 -0
  89. package/dist/lib/session-utils.js +1 -0
  90. package/dist/lib/tailscale.js +1 -0
  91. package/dist/lib/task-utils.js +1 -0
  92. package/dist/lib/template-engine.js +1 -0
  93. package/dist/lib/webdav.js +1 -0
  94. package/dist/onnxruntime_binding-5QEF3SUC.node +0 -0
  95. package/dist/onnxruntime_binding-BKPKNEGC.node +0 -0
  96. package/dist/onnxruntime_binding-FMOXGIUT.node +0 -0
  97. package/dist/onnxruntime_binding-OI2KMXC5.node +0 -0
  98. package/dist/onnxruntime_binding-UX44MLAZ.node +0 -0
  99. package/dist/onnxruntime_binding-Y2W7N7WY.node +0 -0
  100. package/dist/registry-BR4326o0.d.ts +30 -0
  101. package/dist/store-CA-6sKCJ.d.ts +34 -0
  102. package/dist/thread-B9LhXNU0.d.ts +41 -0
  103. package/dist/transformers.node-A2ZRORSQ.js +46775 -0
  104. package/dist/{types-C74wgGL1.d.ts → types-BbWJoC1c.d.ts} +1 -1
  105. package/dist/workgraph/index.d.ts +5 -0
  106. package/dist/workgraph/index.js +23 -0
  107. package/dist/workgraph/ledger.d.ts +2 -0
  108. package/dist/workgraph/ledger.js +25 -0
  109. package/dist/workgraph/registry.d.ts +2 -0
  110. package/dist/workgraph/registry.js +19 -0
  111. package/dist/workgraph/store.d.ts +2 -0
  112. package/dist/workgraph/store.js +25 -0
  113. package/dist/workgraph/thread.d.ts +2 -0
  114. package/dist/workgraph/thread.js +25 -0
  115. package/dist/workgraph/types.d.ts +54 -0
  116. package/dist/workgraph/types.js +7 -0
  117. package/hooks/clawvault/handler.js +714 -2
  118. package/hooks/clawvault/handler.test.js +153 -0
  119. package/hooks/clawvault/openclaw.plugin.json +72 -0
  120. package/openclaw.plugin.json +14 -2
  121. package/package.json +5 -4
  122. package/dist/chunk-4QYGFWRM.js +0 -88
  123. package/dist/chunk-MXSSG3QU.js +0 -42
@@ -195,6 +195,55 @@ function checkHookHandlerSafety(options) {
195
195
  }
196
196
  return { label: "hook handler safety", status: "ok" };
197
197
  }
198
+ function checkPluginManifest(options) {
199
+ const manifestRaw = readOptionalFile(resolveProjectFile("hooks/clawvault/openclaw.plugin.json", options.baseDir));
200
+ if (!manifestRaw) {
201
+ return {
202
+ label: "plugin manifest",
203
+ status: "error",
204
+ detail: "hooks/clawvault/openclaw.plugin.json not found",
205
+ hint: "Add openclaw.plugin.json to hooks/clawvault/ for config schema registration."
206
+ };
207
+ }
208
+ try {
209
+ const parsed = JSON.parse(manifestRaw);
210
+ if (!parsed.id || parsed.id !== "clawvault") {
211
+ return {
212
+ label: "plugin manifest",
213
+ status: "error",
214
+ detail: `Invalid plugin id: expected "clawvault", got "${parsed.id || "(missing)"}"`
215
+ };
216
+ }
217
+ if (!parsed.configSchema || typeof parsed.configSchema !== "object") {
218
+ return {
219
+ label: "plugin manifest",
220
+ status: "error",
221
+ detail: "Missing configSchema in plugin manifest",
222
+ hint: "Add configSchema to openclaw.plugin.json for config validation."
223
+ };
224
+ }
225
+ const hasVaultPath = Boolean(parsed.configSchema.properties?.vaultPath);
226
+ if (!hasVaultPath) {
227
+ return {
228
+ label: "plugin manifest",
229
+ status: "warn",
230
+ detail: "configSchema missing vaultPath property",
231
+ hint: "Add vaultPath to configSchema.properties for vault path configuration."
232
+ };
233
+ }
234
+ return {
235
+ label: "plugin manifest",
236
+ status: "ok",
237
+ detail: `id: ${parsed.id}, configSchema defined`
238
+ };
239
+ } catch (err) {
240
+ return {
241
+ label: "plugin manifest",
242
+ status: "error",
243
+ detail: err?.message || "Unable to parse openclaw.plugin.json"
244
+ };
245
+ }
246
+ }
198
247
  function checkSkillMetadata(options) {
199
248
  const skillRaw = readOptionalFile(resolveProjectFile("SKILL.md", options.baseDir));
200
249
  if (!skillRaw) {
@@ -236,6 +285,7 @@ function checkOpenClawCompatibility(options = {}) {
236
285
  const checks = [
237
286
  checkOpenClawCli(),
238
287
  checkPackageHookRegistration(options),
288
+ checkPluginManifest(options),
239
289
  checkHookManifest(options),
240
290
  checkHookManifestRequirements(options),
241
291
  checkHookHandlerSafety(options),
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-TIGW564L.js";
13
13
  import {
14
14
  resolveVaultPath
15
- } from "./chunk-MXSSG3QU.js";
15
+ } from "./chunk-GNJL4YGR.js";
16
16
 
17
17
  // src/commands/tailscale.ts
18
18
  import * as path from "path";
@@ -1,3 +1,6 @@
1
+ import {
2
+ loadVaultQmdConfig
3
+ } from "./chunk-WIOLLGAD.js";
1
4
  import {
2
5
  QmdUnavailableError,
3
6
  SearchEngine,
@@ -6,7 +9,7 @@ import {
6
9
  hasQmd,
7
10
  qmdEmbed,
8
11
  qmdUpdate
9
- } from "./chunk-MAKNAHAW.js";
12
+ } from "./chunk-5PJ4STIC.js";
10
13
  import {
11
14
  DEFAULT_CATEGORIES,
12
15
  TYPE_TO_CATEGORY
@@ -29,7 +32,9 @@ var ClawVault = class {
29
32
  initialized = false;
30
33
  constructor(vaultPath) {
31
34
  if (!hasQmd()) {
32
- throw new QmdUnavailableError();
35
+ const error = new QmdUnavailableError("NOT_INSTALLED");
36
+ console.error(error.toUserMessage());
37
+ throw error;
33
38
  }
34
39
  this.config = {
35
40
  path: path.resolve(vaultPath),
@@ -46,7 +51,9 @@ var ClawVault = class {
46
51
  */
47
52
  async init(options = {}, initFlags) {
48
53
  if (!hasQmd()) {
49
- throw new QmdUnavailableError();
54
+ const error = new QmdUnavailableError("NOT_INSTALLED");
55
+ console.error(error.toUserMessage());
56
+ throw error;
50
57
  }
51
58
  const vaultPath = this.config.path;
52
59
  const flags = initFlags || {};
@@ -200,7 +207,9 @@ var ClawVault = class {
200
207
  */
201
208
  async load() {
202
209
  if (!hasQmd()) {
203
- throw new QmdUnavailableError();
210
+ const error = new QmdUnavailableError("NOT_INSTALLED");
211
+ console.error(error.toUserMessage());
212
+ throw error;
204
213
  }
205
214
  const vaultPath = this.config.path;
206
215
  const configPath = path.join(vaultPath, CONFIG_FILE);
@@ -726,8 +735,14 @@ var ClawVault = class {
726
735
  return dateStr.slice(0, 10);
727
736
  }
728
737
  applyQmdConfig(meta) {
729
- const collection = meta?.qmdCollection || this.config.qmdCollection || this.config.name;
730
- const root = meta?.qmdRoot || this.config.qmdRoot || this.config.path;
738
+ const explicitCollection = meta?.qmdCollection || this.config.qmdCollection;
739
+ const explicitRoot = meta?.qmdRoot || this.config.qmdRoot || this.config.path;
740
+ const qmdConfig = loadVaultQmdConfig(this.config.path);
741
+ const collection = explicitCollection || qmdConfig.qmdCollection || this.config.name;
742
+ const root = explicitRoot || qmdConfig.qmdRoot;
743
+ if (qmdConfig.autoDetected) {
744
+ console.warn(`[clawvault] Auto-detected qmd collection: ${collection}`);
745
+ }
731
746
  this.config.qmdCollection = collection;
732
747
  this.config.qmdRoot = root;
733
748
  this.search.setVaultPath(this.config.path);
@@ -1,10 +1,10 @@
1
+ import {
2
+ listConfig
3
+ } from "./chunk-URXDAUVH.js";
1
4
  import {
2
5
  requestLlmCompletion,
3
6
  resolveLlmProvider
4
- } from "./chunk-HIHOUSXS.js";
5
- import {
6
- listConfig
7
- } from "./chunk-ITPEXLHA.js";
7
+ } from "./chunk-YXQCA6B7.js";
8
8
  import {
9
9
  getMemoryGraph,
10
10
  loadMemoryGraphIndex
@@ -1,13 +1,48 @@
1
1
  // src/lib/llm-provider.ts
2
+ import * as fs from "fs";
3
+ import * as path from "path";
4
+ import * as os from "os";
2
5
  var DEFAULT_MODELS = {
3
6
  anthropic: "claude-3-5-haiku-latest",
4
7
  openai: "gpt-4o-mini",
5
- gemini: "gemini-2.0-flash"
8
+ gemini: "gemini-2.0-flash",
9
+ xai: "grok-2-latest",
10
+ openclaw: "gpt-4o-mini"
6
11
  };
12
+ var XAI_BASE_URL = "https://api.x.ai/v1";
13
+ function resolveOpenClawProvider() {
14
+ try {
15
+ const openclawHome = process.env.OPENCLAW_HOME?.trim() || path.join(os.homedir(), ".openclaw");
16
+ const modelsPath = path.join(openclawHome, "agents", "main", "agent", "models.json");
17
+ if (!fs.existsSync(modelsPath)) {
18
+ return null;
19
+ }
20
+ const raw = JSON.parse(fs.readFileSync(modelsPath, "utf-8"));
21
+ if (!raw.providers || typeof raw.providers !== "object") {
22
+ return null;
23
+ }
24
+ for (const [, provider] of Object.entries(raw.providers)) {
25
+ if (provider.baseUrl && provider.apiKey) {
26
+ const defaultModel = provider.models?.[0]?.id ?? "gpt-4o-mini";
27
+ return {
28
+ baseUrl: provider.baseUrl.replace(/\/+$/, ""),
29
+ apiKey: provider.apiKey,
30
+ api: provider.api ?? "openai-completions",
31
+ defaultModel
32
+ };
33
+ }
34
+ }
35
+ } catch {
36
+ }
37
+ return null;
38
+ }
7
39
  function resolveLlmProvider() {
8
40
  if (process.env.CLAWVAULT_NO_LLM) {
9
41
  return null;
10
42
  }
43
+ if (resolveOpenClawProvider()) {
44
+ return "openclaw";
45
+ }
11
46
  if (process.env.ANTHROPIC_API_KEY) {
12
47
  return "anthropic";
13
48
  }
@@ -17,6 +52,9 @@ function resolveLlmProvider() {
17
52
  if (process.env.GEMINI_API_KEY) {
18
53
  return "gemini";
19
54
  }
55
+ if (process.env.XAI_API_KEY) {
56
+ return "xai";
57
+ }
20
58
  return null;
21
59
  }
22
60
  async function requestLlmCompletion(options) {
@@ -24,12 +62,18 @@ async function requestLlmCompletion(options) {
24
62
  if (!provider) {
25
63
  return "";
26
64
  }
65
+ if (provider === "openclaw") {
66
+ return callOpenClaw(options);
67
+ }
27
68
  if (provider === "anthropic") {
28
69
  return callAnthropic(options, provider);
29
70
  }
30
71
  if (provider === "gemini") {
31
72
  return callGemini(options, provider);
32
73
  }
74
+ if (provider === "xai") {
75
+ return callXAI(options, provider);
76
+ }
33
77
  return callOpenAI(options, provider);
34
78
  }
35
79
  async function callAnthropic(options, provider) {
@@ -88,6 +132,36 @@ async function callOpenAI(options, provider) {
88
132
  const payload = await response.json();
89
133
  return payload.choices?.[0]?.message?.content?.trim() ?? "";
90
134
  }
135
+ async function callXAI(options, provider) {
136
+ const apiKey = process.env.XAI_API_KEY;
137
+ if (!apiKey) {
138
+ return "";
139
+ }
140
+ const fetchImpl = options.fetchImpl ?? fetch;
141
+ const messages = [];
142
+ if (options.systemPrompt?.trim()) {
143
+ messages.push({ role: "system", content: options.systemPrompt.trim() });
144
+ }
145
+ messages.push({ role: "user", content: options.prompt });
146
+ const response = await fetchImpl(`${XAI_BASE_URL}/chat/completions`, {
147
+ method: "POST",
148
+ headers: {
149
+ "content-type": "application/json",
150
+ authorization: `Bearer ${apiKey}`
151
+ },
152
+ body: JSON.stringify({
153
+ model: options.model ?? DEFAULT_MODELS[provider],
154
+ temperature: options.temperature ?? 0.1,
155
+ max_tokens: options.maxTokens ?? 1200,
156
+ messages
157
+ })
158
+ });
159
+ if (!response.ok) {
160
+ throw new Error(`xAI request failed (${response.status})`);
161
+ }
162
+ const payload = await response.json();
163
+ return payload.choices?.[0]?.message?.content?.trim() ?? "";
164
+ }
91
165
  async function callGemini(options, provider) {
92
166
  const apiKey = process.env.GEMINI_API_KEY;
93
167
  if (!apiKey) {
@@ -115,6 +189,36 @@ async function callGemini(options, provider) {
115
189
  const payload = await response.json();
116
190
  return payload.candidates?.[0]?.content?.parts?.[0]?.text?.trim() ?? "";
117
191
  }
192
+ async function callOpenClaw(options) {
193
+ const config = resolveOpenClawProvider();
194
+ if (!config) {
195
+ return "";
196
+ }
197
+ const fetchImpl = options.fetchImpl ?? fetch;
198
+ const messages = [];
199
+ if (options.systemPrompt?.trim()) {
200
+ messages.push({ role: "system", content: options.systemPrompt.trim() });
201
+ }
202
+ messages.push({ role: "user", content: options.prompt });
203
+ const response = await fetchImpl(`${config.baseUrl}/chat/completions`, {
204
+ method: "POST",
205
+ headers: {
206
+ "content-type": "application/json",
207
+ authorization: `Bearer ${config.apiKey}`
208
+ },
209
+ body: JSON.stringify({
210
+ model: options.model ?? config.defaultModel,
211
+ temperature: options.temperature ?? 0.1,
212
+ max_tokens: options.maxTokens ?? 1200,
213
+ messages
214
+ })
215
+ });
216
+ if (!response.ok) {
217
+ throw new Error(`OpenClaw provider request failed (${response.status})`);
218
+ }
219
+ const payload = await response.json();
220
+ return payload.choices?.[0]?.message?.content?.trim() ?? "";
221
+ }
118
222
 
119
223
  export {
120
224
  resolveLlmProvider,
package/dist/cli/index.js CHANGED
@@ -1,33 +1,35 @@
1
1
  import {
2
2
  registerCliCommands
3
- } from "../chunk-6546Q4OR.js";
4
- import "../chunk-THRJVD4L.js";
3
+ } from "../chunk-MPOSMDMU.js";
4
+ import "../chunk-Y6VJKXGL.js";
5
5
  import "../chunk-TIGW564L.js";
6
6
  import "../chunk-IVRIKYFE.js";
7
- import "../chunk-ME37YNW3.js";
7
+ import "../chunk-P7SY3D4E.js";
8
8
  import "../chunk-P5EPF6MB.js";
9
- import "../chunk-3BTHWPMB.js";
10
- import "../chunk-T76H47ZS.js";
11
- import "../chunk-DTEHFAL7.js";
12
- import "../chunk-IEVLHNLU.js";
13
- import "../chunk-HRLWZGMA.js";
14
- import "../chunk-Q2J5YTUF.js";
9
+ import "../chunk-S5OJEGFG.js";
10
+ import "../chunk-MNPUYCHQ.js";
11
+ import "../chunk-LIGHWOH6.js";
12
+ import "../chunk-627Q3QWK.js";
13
+ import "../chunk-OQGYFZ4A.js";
15
14
  import "../chunk-AZYOKJYC.js";
16
- import "../chunk-RCBMXTWS.js";
15
+ import "../chunk-HRLWZGMA.js";
16
+ import "../chunk-YDWHS4LJ.js";
17
17
  import "../chunk-FHFUXL6G.js";
18
- import "../chunk-4QYGFWRM.js";
19
- import "../chunk-MAKNAHAW.js";
20
- import "../chunk-4VRIMU4O.js";
21
- import "../chunk-HIHOUSXS.js";
22
- import "../chunk-ITPEXLHA.js";
18
+ import "../chunk-ECRZL5XR.js";
19
+ import "../chunk-WIOLLGAD.js";
20
+ import "../chunk-5PJ4STIC.js";
21
+ import "../chunk-YNIPYN4F.js";
22
+ import "../chunk-URXDAUVH.js";
23
+ import "../chunk-YXQCA6B7.js";
23
24
  import "../chunk-2CDEETQN.js";
24
25
  import "../chunk-MQUJNOHK.js";
25
- import "../chunk-MXSSG3QU.js";
26
+ import "../chunk-GNJL4YGR.js";
26
27
  import "../chunk-ZZA73MFY.js";
27
28
  import "../chunk-Z2XBWN7A.js";
28
29
  import "../chunk-QWQ3TIKS.js";
29
30
  import "../chunk-MFAWT5O5.js";
30
31
  import "../chunk-7766SIJP.js";
32
+ import "../chunk-2ZDO52B4.js";
31
33
  export {
32
34
  registerCliCommands
33
35
  };
@@ -1,10 +1,11 @@
1
1
  import {
2
2
  archiveCommand,
3
3
  registerArchiveCommand
4
- } from "../chunk-VR5NE7PZ.js";
4
+ } from "../chunk-2RAZ4ZFE.js";
5
5
  import "../chunk-MQUJNOHK.js";
6
- import "../chunk-MXSSG3QU.js";
6
+ import "../chunk-GNJL4YGR.js";
7
7
  import "../chunk-Z2XBWN7A.js";
8
+ import "../chunk-2ZDO52B4.js";
8
9
  export {
9
10
  archiveCommand,
10
11
  registerArchiveCommand
@@ -5,6 +5,7 @@ import {
5
5
  } from "../chunk-QWQ3TIKS.js";
6
6
  import "../chunk-MFAWT5O5.js";
7
7
  import "../chunk-7766SIJP.js";
8
+ import "../chunk-2ZDO52B4.js";
8
9
 
9
10
  // src/commands/backlog.ts
10
11
  function toDateStr(val) {
@@ -3,6 +3,7 @@ import {
3
3
  } from "../chunk-QWQ3TIKS.js";
4
4
  import "../chunk-MFAWT5O5.js";
5
5
  import "../chunk-7766SIJP.js";
6
+ import "../chunk-2ZDO52B4.js";
6
7
 
7
8
  // src/commands/blocked.ts
8
9
  function toDateStr(val) {
@@ -18,6 +18,7 @@ import {
18
18
  } from "../chunk-QWQ3TIKS.js";
19
19
  import "../chunk-MFAWT5O5.js";
20
20
  import "../chunk-7766SIJP.js";
21
+ import "../chunk-2ZDO52B4.js";
21
22
 
22
23
  // src/commands/canvas.ts
23
24
  import * as fs2 from "fs";
@@ -6,6 +6,7 @@ import {
6
6
  flush,
7
7
  setSessionState
8
8
  } from "../chunk-F55HGNU4.js";
9
+ import "../chunk-2ZDO52B4.js";
9
10
  export {
10
11
  checkDirtyDeath,
11
12
  checkpoint,
@@ -2,7 +2,8 @@ import {
2
2
  checkOpenClawCompatibility,
3
3
  compatCommand,
4
4
  compatibilityExitCode
5
- } from "../chunk-QVMXF7FY.js";
5
+ } from "../chunk-X3SPPUFG.js";
6
+ import "../chunk-2ZDO52B4.js";
6
7
  export {
7
8
  checkOpenClawCompatibility,
8
9
  compatCommand,
@@ -3,13 +3,15 @@ import {
3
3
  contextCommand,
4
4
  formatContextMarkdown,
5
5
  registerContextCommand
6
- } from "../chunk-DTEHFAL7.js";
7
- import "../chunk-RCBMXTWS.js";
6
+ } from "../chunk-LIGHWOH6.js";
7
+ import "../chunk-YDWHS4LJ.js";
8
8
  import "../chunk-FHFUXL6G.js";
9
- import "../chunk-MAKNAHAW.js";
9
+ import "../chunk-WIOLLGAD.js";
10
+ import "../chunk-5PJ4STIC.js";
10
11
  import "../chunk-2CDEETQN.js";
11
12
  import "../chunk-ZZA73MFY.js";
12
13
  import "../chunk-Z2XBWN7A.js";
14
+ import "../chunk-2ZDO52B4.js";
13
15
  export {
14
16
  buildContext,
15
17
  contextCommand,
@@ -4,13 +4,22 @@ interface DoctorCheck {
4
4
  status: DoctorStatus;
5
5
  detail?: string;
6
6
  hint?: string;
7
+ category?: 'system' | 'migration' | 'health';
7
8
  }
8
9
  interface DoctorReport {
9
10
  vaultPath?: string;
10
11
  checks: DoctorCheck[];
11
12
  warnings: number;
12
13
  errors: number;
14
+ migrationIssues: MigrationIssue[];
13
15
  }
16
+ interface MigrationIssue {
17
+ type: MigrationIssueType;
18
+ description: string;
19
+ autoFixable: boolean;
20
+ details?: Record<string, unknown>;
21
+ }
22
+ type MigrationIssueType = 'stale_collection_name' | 'missing_qmd_collection' | 'wrong_vault_path' | 'orphaned_collection' | 'missing_qmd_config' | 'legacy_config_format';
14
23
  declare function doctor(vaultPath?: string): Promise<DoctorReport>;
15
24
 
16
- export { type DoctorCheck, type DoctorReport, type DoctorStatus, doctor };
25
+ export { type DoctorCheck, type DoctorReport, type DoctorStatus, type MigrationIssue, type MigrationIssueType, doctor };
@@ -1,24 +1,27 @@
1
1
  import {
2
2
  doctor
3
- } from "../chunk-PZ2AUU2W.js";
3
+ } from "../chunk-MFL6EEPF.js";
4
4
  import "../chunk-7ZRP733D.js";
5
5
  import "../chunk-4VQTUVH7.js";
6
6
  import "../chunk-J7ZWCI2C.js";
7
- import "../chunk-IEVLHNLU.js";
8
- import "../chunk-HRLWZGMA.js";
9
- import "../chunk-Q2J5YTUF.js";
7
+ import "../chunk-627Q3QWK.js";
8
+ import "../chunk-OQGYFZ4A.js";
10
9
  import "../chunk-AZYOKJYC.js";
11
- import "../chunk-RCBMXTWS.js";
10
+ import "../chunk-HRLWZGMA.js";
11
+ import "../chunk-YDWHS4LJ.js";
12
12
  import "../chunk-FHFUXL6G.js";
13
- import "../chunk-MAKNAHAW.js";
14
- import "../chunk-ITPEXLHA.js";
13
+ import "../chunk-WIOLLGAD.js";
14
+ import "../chunk-5PJ4STIC.js";
15
+ import "../chunk-URXDAUVH.js";
16
+ import "../chunk-YXQCA6B7.js";
15
17
  import "../chunk-2CDEETQN.js";
16
18
  import "../chunk-ZZA73MFY.js";
17
19
  import "../chunk-Z2XBWN7A.js";
18
20
  import "../chunk-QWQ3TIKS.js";
19
21
  import "../chunk-MFAWT5O5.js";
20
22
  import "../chunk-7766SIJP.js";
21
- import "../chunk-QVMXF7FY.js";
23
+ import "../chunk-X3SPPUFG.js";
24
+ import "../chunk-2ZDO52B4.js";
22
25
  export {
23
26
  doctor
24
27
  };
@@ -1,9 +1,11 @@
1
1
  import {
2
2
  embedCommand,
3
3
  registerEmbedCommand
4
- } from "../chunk-4QYGFWRM.js";
5
- import "../chunk-MAKNAHAW.js";
6
- import "../chunk-MXSSG3QU.js";
4
+ } from "../chunk-ECRZL5XR.js";
5
+ import "../chunk-WIOLLGAD.js";
6
+ import "../chunk-5PJ4STIC.js";
7
+ import "../chunk-GNJL4YGR.js";
8
+ import "../chunk-2ZDO52B4.js";
7
9
  export {
8
10
  embedCommand,
9
11
  registerEmbedCommand
@@ -3,7 +3,8 @@ import {
3
3
  } from "../chunk-J7ZWCI2C.js";
4
4
  import {
5
5
  resolveVaultPath
6
- } from "../chunk-MXSSG3QU.js";
6
+ } from "../chunk-GNJL4YGR.js";
7
+ import "../chunk-2ZDO52B4.js";
7
8
 
8
9
  // src/commands/entities.ts
9
10
  async function entitiesCommand(options) {
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  graphCommand,
3
3
  graphSummary
4
- } from "../chunk-OZ7RIXTO.js";
5
- import "../chunk-MXSSG3QU.js";
4
+ } from "../chunk-IIOU45CK.js";
5
+ import "../chunk-GNJL4YGR.js";
6
6
  import "../chunk-ZZA73MFY.js";
7
+ import "../chunk-2ZDO52B4.js";
7
8
  export {
8
9
  graphCommand,
9
10
  graphSummary
@@ -1,2 +1,2 @@
1
1
  import 'commander';
2
- export { I as InjectCommandOptions, a as InjectFormat, q as buildInjectionResult, v as injectCommand, x as registerInjectCommand } from '../inject-x65KXWPk.js';
2
+ export { I as InjectCommandOptions, a as InjectFormat, q as buildInjectionResult, v as injectCommand, x as registerInjectCommand } from '../inject-DYUrDqQO.js';
@@ -2,11 +2,12 @@ import {
2
2
  buildInjectionResult,
3
3
  injectCommand,
4
4
  registerInjectCommand
5
- } from "../chunk-4VRIMU4O.js";
6
- import "../chunk-HIHOUSXS.js";
7
- import "../chunk-ITPEXLHA.js";
5
+ } from "../chunk-YNIPYN4F.js";
6
+ import "../chunk-URXDAUVH.js";
7
+ import "../chunk-YXQCA6B7.js";
8
8
  import "../chunk-2CDEETQN.js";
9
9
  import "../chunk-ZZA73MFY.js";
10
+ import "../chunk-2ZDO52B4.js";
10
11
  export {
11
12
  buildInjectionResult,
12
13
  injectCommand,
@@ -11,6 +11,7 @@ import {
11
11
  import "../chunk-QWQ3TIKS.js";
12
12
  import "../chunk-MFAWT5O5.js";
13
13
  import "../chunk-7766SIJP.js";
14
+ import "../chunk-2ZDO52B4.js";
14
15
  export {
15
16
  buildKanbanLanes,
16
17
  extractCardSlug,
@@ -13,10 +13,11 @@ import {
13
13
  } from "../chunk-J7ZWCI2C.js";
14
14
  import {
15
15
  resolveVaultPath
16
- } from "../chunk-MXSSG3QU.js";
16
+ } from "../chunk-GNJL4YGR.js";
17
17
  import {
18
18
  buildOrUpdateMemoryGraphIndex
19
19
  } from "../chunk-ZZA73MFY.js";
20
+ import "../chunk-2ZDO52B4.js";
20
21
 
21
22
  // src/commands/link.ts
22
23
  import * as fs from "fs";
@@ -2,10 +2,11 @@ import {
2
2
  migrateObservations,
3
3
  migrateObservationsCommand,
4
4
  registerMigrateObservationsCommand
5
- } from "../chunk-VXEOHTSL.js";
5
+ } from "../chunk-2JQ3O2YL.js";
6
6
  import "../chunk-FHFUXL6G.js";
7
- import "../chunk-MXSSG3QU.js";
7
+ import "../chunk-GNJL4YGR.js";
8
8
  import "../chunk-Z2XBWN7A.js";
9
+ import "../chunk-2ZDO52B4.js";
9
10
  export {
10
11
  migrateObservations,
11
12
  migrateObservationsCommand,
@@ -1,20 +1,22 @@
1
1
  import {
2
2
  observeCommand,
3
3
  registerObserveCommand
4
- } from "../chunk-ME37YNW3.js";
4
+ } from "../chunk-P7SY3D4E.js";
5
5
  import "../chunk-P5EPF6MB.js";
6
- import "../chunk-IEVLHNLU.js";
7
- import "../chunk-HRLWZGMA.js";
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-ITPEXLHA.js";
11
+ import "../chunk-URXDAUVH.js";
12
+ import "../chunk-YXQCA6B7.js";
12
13
  import "../chunk-2CDEETQN.js";
13
- import "../chunk-MXSSG3QU.js";
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
@@ -14,6 +14,7 @@ import {
14
14
  import "../chunk-QWQ3TIKS.js";
15
15
  import "../chunk-MFAWT5O5.js";
16
16
  import "../chunk-7766SIJP.js";
17
+ import "../chunk-2ZDO52B4.js";
17
18
 
18
19
  // src/commands/project.ts
19
20
  import * as fs from "fs";
@@ -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 };