clawvault 2.6.3 → 2.6.5

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 (127) 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-2GKPENIR.js +66 -0
  8. package/dist/{chunk-VXEOHTSL.js → chunk-2JQ3O2YL.js} +1 -1
  9. package/dist/{chunk-VR5NE7PZ.js → chunk-2RAZ4ZFE.js} +1 -1
  10. package/dist/chunk-2ZDO52B4.js +52 -0
  11. package/dist/{chunk-ZZA73MFY.js → chunk-33DOSHTA.js} +176 -36
  12. package/dist/chunk-4BQTQMJP.js +93 -0
  13. package/dist/{chunk-MAKNAHAW.js → chunk-5PJ4STIC.js} +98 -8
  14. package/dist/{chunk-RVYA52PY.js → chunk-5UM4PMMM.js} +1 -1
  15. package/dist/{chunk-4VQTUVH7.js → chunk-7YZWHM36.js} +52 -26
  16. package/dist/{chunk-4VRIMU4O.js → chunk-A4EAUO7T.js} +5 -5
  17. package/dist/{chunk-R6SXNSFD.js → chunk-BV5KWZKR.js} +3 -3
  18. package/dist/chunk-FBITHIZF.js +351 -0
  19. package/dist/{chunk-Q2J5YTUF.js → chunk-FUSLEY6L.js} +751 -34
  20. package/dist/chunk-GNJL4YGR.js +79 -0
  21. package/dist/{chunk-42MXU7A6.js → chunk-K4GFGKFD.js} +51 -47
  22. package/dist/{chunk-PBEE567J.js → chunk-KSZROBFH.js} +2 -2
  23. package/dist/chunk-L4HSSQ6T.js +152 -0
  24. package/dist/{chunk-PZ2AUU2W.js → chunk-LMKQ7NIF.js} +206 -37
  25. package/dist/{chunk-6546Q4OR.js → chunk-M5O6FQ66.js} +6 -6
  26. package/dist/chunk-MM6QGW3P.js +207 -0
  27. package/dist/{chunk-T76H47ZS.js → chunk-MNPUYCHQ.js} +1 -1
  28. package/dist/{chunk-P5EPF6MB.js → chunk-MW5C6ZQA.js} +110 -13
  29. package/dist/{chunk-OZ7RIXTO.js → chunk-QSRRMEYM.js} +2 -2
  30. package/dist/chunk-RHISK3SZ.js +189 -0
  31. package/dist/{chunk-3BTHWPMB.js → chunk-S5OJEGFG.js} +2 -2
  32. package/dist/{chunk-MGDEINGP.js → chunk-SS4B7P7V.js} +1 -1
  33. package/dist/{chunk-ME37YNW3.js → chunk-SV7T4HRE.js} +4 -4
  34. package/dist/{chunk-IEVLHNLU.js → chunk-T3FKSZSN.js} +3 -3
  35. package/dist/{chunk-DTEHFAL7.js → chunk-TS6NDVOU.js} +2 -2
  36. package/dist/chunk-U4O6C46S.js +154 -0
  37. package/dist/{chunk-ITPEXLHA.js → chunk-URXDAUVH.js} +24 -5
  38. package/dist/chunk-WMGIIABP.js +15 -0
  39. package/dist/{chunk-QVMXF7FY.js → chunk-X3SPPUFG.js} +50 -0
  40. package/dist/{chunk-THRJVD4L.js → chunk-Y6VJKXGL.js} +1 -1
  41. package/dist/{chunk-RCBMXTWS.js → chunk-YD7SVXTF.js} +39 -7
  42. package/dist/{chunk-HIHOUSXS.js → chunk-YXQCA6B7.js} +105 -1
  43. package/dist/cli/index.js +20 -18
  44. package/dist/commands/archive.js +3 -2
  45. package/dist/commands/backlog.js +1 -0
  46. package/dist/commands/blocked.js +1 -0
  47. package/dist/commands/canvas.js +2 -1
  48. package/dist/commands/checkpoint.js +1 -0
  49. package/dist/commands/compat.js +2 -1
  50. package/dist/commands/context.js +6 -4
  51. package/dist/commands/doctor.d.ts +10 -1
  52. package/dist/commands/doctor.js +13 -10
  53. package/dist/commands/embed.js +5 -3
  54. package/dist/commands/entities.js +2 -1
  55. package/dist/commands/graph.js +4 -3
  56. package/dist/commands/inject.d.ts +1 -1
  57. package/dist/commands/inject.js +5 -4
  58. package/dist/commands/kanban.js +1 -0
  59. package/dist/commands/link.js +5 -4
  60. package/dist/commands/migrate-observations.js +3 -2
  61. package/dist/commands/observe.js +9 -7
  62. package/dist/commands/project.js +1 -0
  63. package/dist/commands/rebuild-embeddings.d.ts +21 -0
  64. package/dist/commands/rebuild-embeddings.js +91 -0
  65. package/dist/commands/rebuild.js +6 -4
  66. package/dist/commands/recover.js +1 -0
  67. package/dist/commands/reflect.js +5 -4
  68. package/dist/commands/repair-session.js +1 -0
  69. package/dist/commands/replay.js +7 -6
  70. package/dist/commands/session-recap.js +1 -0
  71. package/dist/commands/setup.js +3 -2
  72. package/dist/commands/shell-init.js +2 -0
  73. package/dist/commands/sleep.d.ts +1 -1
  74. package/dist/commands/sleep.js +10 -8
  75. package/dist/commands/status.js +13 -82
  76. package/dist/commands/sync-bd.js +3 -2
  77. package/dist/commands/tailscale.js +3 -2
  78. package/dist/commands/task.js +1 -0
  79. package/dist/commands/template.js +1 -0
  80. package/dist/commands/wake.d.ts +1 -1
  81. package/dist/commands/wake.js +5 -3
  82. package/dist/index.d.ts +254 -10
  83. package/dist/index.js +288 -155
  84. package/dist/{inject-x65KXWPk.d.ts → inject-DYUrDqQO.d.ts} +2 -2
  85. package/dist/ledger-B7g7jhqG.d.ts +44 -0
  86. package/dist/lib/auto-linker.js +2 -1
  87. package/dist/lib/canvas-layout.js +1 -0
  88. package/dist/lib/config.d.ts +27 -3
  89. package/dist/lib/config.js +4 -1
  90. package/dist/lib/entity-index.js +1 -0
  91. package/dist/lib/project-utils.js +1 -0
  92. package/dist/lib/session-repair.js +1 -0
  93. package/dist/lib/session-utils.js +1 -0
  94. package/dist/lib/tailscale.js +1 -0
  95. package/dist/lib/task-utils.js +1 -0
  96. package/dist/lib/template-engine.js +1 -0
  97. package/dist/lib/webdav.js +1 -0
  98. package/dist/onnxruntime_binding-5QEF3SUC.node +0 -0
  99. package/dist/onnxruntime_binding-BKPKNEGC.node +0 -0
  100. package/dist/onnxruntime_binding-FMOXGIUT.node +0 -0
  101. package/dist/onnxruntime_binding-OI2KMXC5.node +0 -0
  102. package/dist/onnxruntime_binding-UX44MLAZ.node +0 -0
  103. package/dist/onnxruntime_binding-Y2W7N7WY.node +0 -0
  104. package/dist/registry-BR4326o0.d.ts +30 -0
  105. package/dist/store-CA-6sKCJ.d.ts +34 -0
  106. package/dist/thread-B9LhXNU0.d.ts +41 -0
  107. package/dist/transformers.node-A2ZRORSQ.js +46775 -0
  108. package/dist/{types-C74wgGL1.d.ts → types-BbWJoC1c.d.ts} +1 -1
  109. package/dist/workgraph/index.d.ts +5 -0
  110. package/dist/workgraph/index.js +23 -0
  111. package/dist/workgraph/ledger.d.ts +2 -0
  112. package/dist/workgraph/ledger.js +25 -0
  113. package/dist/workgraph/registry.d.ts +2 -0
  114. package/dist/workgraph/registry.js +19 -0
  115. package/dist/workgraph/store.d.ts +2 -0
  116. package/dist/workgraph/store.js +25 -0
  117. package/dist/workgraph/thread.d.ts +2 -0
  118. package/dist/workgraph/thread.js +25 -0
  119. package/dist/workgraph/types.d.ts +54 -0
  120. package/dist/workgraph/types.js +7 -0
  121. package/hooks/clawvault/handler.js +714 -2
  122. package/hooks/clawvault/handler.test.js +153 -0
  123. package/hooks/clawvault/openclaw.plugin.json +72 -0
  124. package/openclaw.plugin.json +14 -2
  125. package/package.json +5 -4
  126. package/dist/chunk-4QYGFWRM.js +0 -88
  127. package/dist/chunk-MXSSG3QU.js +0 -42
@@ -0,0 +1,15 @@
1
+ // src/workgraph/types.ts
2
+ var THREAD_STATUS_TRANSITIONS = {
3
+ open: ["active", "cancelled"],
4
+ active: ["blocked", "done", "cancelled", "open"],
5
+ // open = release
6
+ blocked: ["active", "cancelled"],
7
+ done: [],
8
+ // terminal
9
+ cancelled: ["open"]
10
+ // can be reopened
11
+ };
12
+
13
+ export {
14
+ THREAD_STATUS_TRANSITIONS
15
+ };
@@ -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,7 @@
1
+ import {
2
+ loadVaultQmdConfig,
3
+ recoverQmdEmbeddingIfNeeded
4
+ } from "./chunk-FBITHIZF.js";
1
5
  import {
2
6
  QmdUnavailableError,
3
7
  SearchEngine,
@@ -6,14 +10,14 @@ import {
6
10
  hasQmd,
7
11
  qmdEmbed,
8
12
  qmdUpdate
9
- } from "./chunk-MAKNAHAW.js";
13
+ } from "./chunk-5PJ4STIC.js";
10
14
  import {
11
15
  DEFAULT_CATEGORIES,
12
16
  TYPE_TO_CATEGORY
13
17
  } from "./chunk-2CDEETQN.js";
14
18
  import {
15
19
  buildOrUpdateMemoryGraphIndex
16
- } from "./chunk-ZZA73MFY.js";
20
+ } from "./chunk-33DOSHTA.js";
17
21
 
18
22
  // src/lib/vault.ts
19
23
  import * as fs from "fs";
@@ -29,7 +33,9 @@ var ClawVault = class {
29
33
  initialized = false;
30
34
  constructor(vaultPath) {
31
35
  if (!hasQmd()) {
32
- throw new QmdUnavailableError();
36
+ const error = new QmdUnavailableError("NOT_INSTALLED");
37
+ console.error(error.toUserMessage());
38
+ throw error;
33
39
  }
34
40
  this.config = {
35
41
  path: path.resolve(vaultPath),
@@ -46,7 +52,9 @@ var ClawVault = class {
46
52
  */
47
53
  async init(options = {}, initFlags) {
48
54
  if (!hasQmd()) {
49
- throw new QmdUnavailableError();
55
+ const error = new QmdUnavailableError("NOT_INSTALLED");
56
+ console.error(error.toUserMessage());
57
+ throw error;
50
58
  }
51
59
  const vaultPath = this.config.path;
52
60
  const flags = initFlags || {};
@@ -200,7 +208,9 @@ var ClawVault = class {
200
208
  */
201
209
  async load() {
202
210
  if (!hasQmd()) {
203
- throw new QmdUnavailableError();
211
+ const error = new QmdUnavailableError("NOT_INSTALLED");
212
+ console.error(error.toUserMessage());
213
+ throw error;
204
214
  }
205
215
  const vaultPath = this.config.path;
206
216
  const configPath = path.join(vaultPath, CONFIG_FILE);
@@ -218,6 +228,22 @@ var ClawVault = class {
218
228
  fs.writeFileSync(configPath, JSON.stringify(meta, null, 2));
219
229
  }
220
230
  this.applyQmdConfig(meta);
231
+ try {
232
+ const recovery = recoverQmdEmbeddingIfNeeded({
233
+ vaultPath: this.config.path,
234
+ collection: this.getQmdCollection(),
235
+ rootPath: this.getQmdRoot(),
236
+ mode: "marker-only",
237
+ onLog: (message) => console.warn(`[clawvault] ${message}`)
238
+ });
239
+ if (recovery.recovered) {
240
+ console.warn(`[clawvault] qmd embedding recovery finished for "${this.getQmdCollection()}".`);
241
+ }
242
+ } catch (err) {
243
+ console.warn(
244
+ `[clawvault] qmd embedding recovery failed: ${err?.message || "unknown error"}`
245
+ );
246
+ }
221
247
  await this.reindex();
222
248
  this.initialized = true;
223
249
  }
@@ -726,8 +752,14 @@ var ClawVault = class {
726
752
  return dateStr.slice(0, 10);
727
753
  }
728
754
  applyQmdConfig(meta) {
729
- const collection = meta?.qmdCollection || this.config.qmdCollection || this.config.name;
730
- const root = meta?.qmdRoot || this.config.qmdRoot || this.config.path;
755
+ const explicitCollection = meta?.qmdCollection || this.config.qmdCollection;
756
+ const explicitRoot = meta?.qmdRoot || this.config.qmdRoot || this.config.path;
757
+ const qmdConfig = loadVaultQmdConfig(this.config.path);
758
+ const collection = explicitCollection || qmdConfig.qmdCollection || this.config.name;
759
+ const root = explicitRoot || qmdConfig.qmdRoot;
760
+ if (qmdConfig.autoDetected) {
761
+ console.warn(`[clawvault] Auto-detected qmd collection: ${collection}`);
762
+ }
731
763
  this.config.qmdCollection = collection;
732
764
  this.config.qmdRoot = root;
733
765
  this.search.setVaultPath(this.config.path);
@@ -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-M5O6FQ66.js";
4
+ import "../chunk-Y6VJKXGL.js";
5
5
  import "../chunk-TIGW564L.js";
6
6
  import "../chunk-IVRIKYFE.js";
7
- import "../chunk-ME37YNW3.js";
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";
7
+ import "../chunk-SV7T4HRE.js";
8
+ import "../chunk-MW5C6ZQA.js";
9
+ import "../chunk-S5OJEGFG.js";
10
+ import "../chunk-MNPUYCHQ.js";
11
+ import "../chunk-TS6NDVOU.js";
12
+ import "../chunk-T3FKSZSN.js";
13
+ import "../chunk-FUSLEY6L.js";
15
14
  import "../chunk-AZYOKJYC.js";
16
- import "../chunk-RCBMXTWS.js";
15
+ import "../chunk-HRLWZGMA.js";
16
+ import "../chunk-YD7SVXTF.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-2GKPENIR.js";
19
+ import "../chunk-FBITHIZF.js";
20
+ import "../chunk-5PJ4STIC.js";
21
+ import "../chunk-A4EAUO7T.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-ZZA73MFY.js";
26
+ import "../chunk-GNJL4YGR.js";
27
+ import "../chunk-33DOSHTA.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) {
@@ -9,7 +9,7 @@ import {
9
9
  } from "../chunk-MDIH26GC.js";
10
10
  import {
11
11
  loadMemoryGraphIndex
12
- } from "../chunk-ZZA73MFY.js";
12
+ } from "../chunk-33DOSHTA.js";
13
13
  import {
14
14
  listObservationFiles
15
15
  } from "../chunk-Z2XBWN7A.js";
@@ -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-TS6NDVOU.js";
7
+ import "../chunk-YD7SVXTF.js";
8
8
  import "../chunk-FHFUXL6G.js";
9
- import "../chunk-MAKNAHAW.js";
9
+ import "../chunk-FBITHIZF.js";
10
+ import "../chunk-5PJ4STIC.js";
10
11
  import "../chunk-2CDEETQN.js";
11
- import "../chunk-ZZA73MFY.js";
12
+ import "../chunk-33DOSHTA.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-LMKQ7NIF.js";
4
4
  import "../chunk-7ZRP733D.js";
5
- import "../chunk-4VQTUVH7.js";
5
+ import "../chunk-7YZWHM36.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-T3FKSZSN.js";
8
+ import "../chunk-FUSLEY6L.js";
10
9
  import "../chunk-AZYOKJYC.js";
11
- import "../chunk-RCBMXTWS.js";
10
+ import "../chunk-HRLWZGMA.js";
11
+ import "../chunk-YD7SVXTF.js";
12
12
  import "../chunk-FHFUXL6G.js";
13
- import "../chunk-MAKNAHAW.js";
14
- import "../chunk-ITPEXLHA.js";
13
+ import "../chunk-FBITHIZF.js";
14
+ import "../chunk-5PJ4STIC.js";
15
+ import "../chunk-URXDAUVH.js";
16
+ import "../chunk-YXQCA6B7.js";
15
17
  import "../chunk-2CDEETQN.js";
16
- import "../chunk-ZZA73MFY.js";
18
+ import "../chunk-33DOSHTA.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-2GKPENIR.js";
5
+ import "../chunk-FBITHIZF.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";
6
- import "../chunk-ZZA73MFY.js";
4
+ } from "../chunk-QSRRMEYM.js";
5
+ import "../chunk-GNJL4YGR.js";
6
+ import "../chunk-33DOSHTA.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-A4EAUO7T.js";
6
+ import "../chunk-URXDAUVH.js";
7
+ import "../chunk-YXQCA6B7.js";
8
8
  import "../chunk-2CDEETQN.js";
9
- import "../chunk-ZZA73MFY.js";
9
+ import "../chunk-33DOSHTA.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,
@@ -2,21 +2,22 @@ import {
2
2
  autoLink,
3
3
  dryRunLink,
4
4
  findUnlinkedMentions
5
- } from "../chunk-42MXU7A6.js";
5
+ } from "../chunk-K4GFGKFD.js";
6
6
  import {
7
7
  readBacklinksIndex,
8
8
  rebuildBacklinksIndex,
9
9
  scanVaultLinks
10
- } from "../chunk-4VQTUVH7.js";
10
+ } from "../chunk-7YZWHM36.js";
11
11
  import {
12
12
  buildEntityIndex
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
- } from "../chunk-ZZA73MFY.js";
19
+ } from "../chunk-33DOSHTA.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,