clawvault 2.4.6 → 2.5.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.
Files changed (69) hide show
  1. package/bin/clawvault.js +5 -0
  2. package/bin/command-registration.test.js +1 -1
  3. package/bin/help-contract.test.js +1 -0
  4. package/bin/register-config-route-commands.test.js +8 -1
  5. package/bin/register-core-commands.js +3 -3
  6. package/bin/register-project-commands.js +209 -0
  7. package/bin/register-project-commands.test.js +201 -0
  8. package/bin/register-query-commands.js +40 -0
  9. package/bin/register-task-commands.js +2 -18
  10. package/bin/register-task-commands.test.js +3 -4
  11. package/bin/test-helpers/cli-command-fixtures.js +5 -0
  12. package/dist/{chunk-3PJIGGWV.js → chunk-2CDEETQN.js} +1 -0
  13. package/dist/{chunk-FD2ZA65C.js → chunk-2RK2AG32.js} +5 -5
  14. package/dist/chunk-5GZFTAL7.js +340 -0
  15. package/dist/{chunk-P2ZH6AN5.js → chunk-6RQPD7X6.js} +3 -4
  16. package/dist/{chunk-HNMFXFYP.js → chunk-7OHQFMJK.js} +2 -1
  17. package/dist/{chunk-FKQJB6XC.js → chunk-C3PF7WBA.js} +2 -2
  18. package/dist/{chunk-JXY6T5R7.js → chunk-FW465EEA.js} +1 -1
  19. package/dist/{chunk-BI6SGGZP.js → chunk-G3OQJ2NQ.js} +1 -1
  20. package/dist/chunk-GSD4ALSI.js +724 -0
  21. package/dist/{chunk-6QLRSPLZ.js → chunk-IOALNTAN.js} +268 -47
  22. package/dist/chunk-ITPEXLHA.js +528 -0
  23. package/dist/{chunk-LLN5SPGL.js → chunk-J5EMBUPK.js} +1 -1
  24. package/dist/chunk-K3CDT7IH.js +122 -0
  25. package/dist/{chunk-AHGUJG76.js → chunk-KCCHROBR.js} +13 -69
  26. package/dist/{chunk-JTO7NZLS.js → chunk-LMCC5OC7.js} +2 -2
  27. package/dist/{chunk-QALB2V3E.js → chunk-MQUJNOHK.js} +1 -1
  28. package/dist/{chunk-H6WQUUNK.js → chunk-TMZMN7OS.js} +334 -457
  29. package/dist/{chunk-HVTTYDCJ.js → chunk-VR5NE7PZ.js} +1 -1
  30. package/dist/{chunk-22WE3J4F.js → chunk-WIICLBNF.js} +35 -4
  31. package/dist/chunk-YCVDVI5B.js +273 -0
  32. package/dist/{chunk-NAMFB7ZA.js → chunk-Z2XBWN7A.js} +0 -2
  33. package/dist/commands/archive.js +3 -3
  34. package/dist/commands/backlog.js +1 -1
  35. package/dist/commands/blocked.js +1 -1
  36. package/dist/commands/canvas.d.ts +1 -14
  37. package/dist/commands/canvas.js +123 -1543
  38. package/dist/commands/context.js +5 -6
  39. package/dist/commands/doctor.js +2 -2
  40. package/dist/commands/inject.d.ts +2 -0
  41. package/dist/commands/inject.js +14 -0
  42. package/dist/commands/kanban.js +2 -2
  43. package/dist/commands/migrate-observations.js +2 -2
  44. package/dist/commands/observe.js +8 -6
  45. package/dist/commands/project.d.ts +85 -0
  46. package/dist/commands/project.js +411 -0
  47. package/dist/commands/rebuild.js +7 -5
  48. package/dist/commands/reflect.js +5 -4
  49. package/dist/commands/replay.js +10 -7
  50. package/dist/commands/setup.d.ts +1 -1
  51. package/dist/commands/setup.js +2 -2
  52. package/dist/commands/sleep.d.ts +1 -1
  53. package/dist/commands/sleep.js +11 -8
  54. package/dist/commands/status.js +2 -2
  55. package/dist/commands/task.d.ts +2 -2
  56. package/dist/commands/task.js +11 -301
  57. package/dist/commands/wake.d.ts +1 -1
  58. package/dist/commands/wake.js +4 -4
  59. package/dist/index.d.ts +75 -107
  60. package/dist/index.js +78 -36
  61. package/dist/inject-x65KXWPk.d.ts +137 -0
  62. package/dist/lib/project-utils.d.ts +97 -0
  63. package/dist/lib/project-utils.js +19 -0
  64. package/dist/lib/task-utils.d.ts +8 -3
  65. package/dist/lib/task-utils.js +1 -1
  66. package/dist/{types-DMU3SuAV.d.ts → types-jjuYN2Xn.d.ts} +1 -1
  67. package/package.json +2 -2
  68. package/dist/chunk-L3DJ36BZ.js +0 -40
  69. package/dist/chunk-UMMCYTJV.js +0 -105
package/dist/index.js CHANGED
@@ -35,27 +35,25 @@ import {
35
35
  syncWithPeer
36
36
  } from "./chunk-4GBPTBFJ.js";
37
37
  import "./chunk-CLE2HHNT.js";
38
- import {
39
- appendTransition,
40
- buildTransitionEvent,
41
- countBlockedTransitions,
42
- formatTransitionsTable,
43
- isRegression,
44
- queryTransitions,
45
- readAllTransitions
46
- } from "./chunk-UMMCYTJV.js";
47
38
  import {
48
39
  buildTemplateVariables,
49
40
  renderTemplate
50
41
  } from "./chunk-7766SIJP.js";
42
+ import {
43
+ rebuildCommand,
44
+ registerRebuildCommand
45
+ } from "./chunk-LMCC5OC7.js";
51
46
  import {
52
47
  reflectCommand,
53
48
  registerReflectCommand
54
- } from "./chunk-BI6SGGZP.js";
49
+ } from "./chunk-G3OQJ2NQ.js";
55
50
  import {
56
51
  registerReplayCommand,
57
52
  replayCommand
58
- } from "./chunk-FKQJB6XC.js";
53
+ } from "./chunk-C3PF7WBA.js";
54
+ import {
55
+ runReflection
56
+ } from "./chunk-KCCHROBR.js";
59
57
  import {
60
58
  buildSessionRecap,
61
59
  formatSessionRecapMarkdown,
@@ -63,14 +61,23 @@ import {
63
61
  } from "./chunk-ZKGY7WTT.js";
64
62
  import {
65
63
  setupCommand
66
- } from "./chunk-P2ZH6AN5.js";
67
- import {
68
- runReflection
69
- } from "./chunk-AHGUJG76.js";
64
+ } from "./chunk-6RQPD7X6.js";
70
65
  import {
71
66
  graphCommand,
72
67
  graphSummary
73
68
  } from "./chunk-OZ7RIXTO.js";
69
+ import {
70
+ buildInjectionResult,
71
+ deterministicInjectMatches,
72
+ indexInjectableItems,
73
+ injectCommand,
74
+ registerInjectCommand,
75
+ runPromptInjection
76
+ } from "./chunk-GSD4ALSI.js";
77
+ import {
78
+ requestLlmCompletion,
79
+ resolveLlmProvider
80
+ } from "./chunk-K3CDT7IH.js";
74
81
  import {
75
82
  buildKanbanLanes,
76
83
  extractCardSlug,
@@ -80,31 +87,39 @@ import {
80
87
  kanbanCommand,
81
88
  parseKanbanMarkdown,
82
89
  syncKanbanBoard
83
- } from "./chunk-LLN5SPGL.js";
90
+ } from "./chunk-J5EMBUPK.js";
84
91
  import {
85
92
  migrateObservations,
86
93
  migrateObservationsCommand,
87
94
  registerMigrateObservationsCommand
88
- } from "./chunk-JXY6T5R7.js";
95
+ } from "./chunk-FW465EEA.js";
89
96
  import {
90
97
  SessionWatcher,
91
98
  observeCommand,
92
99
  registerObserveCommand
93
- } from "./chunk-FD2ZA65C.js";
94
- import "./chunk-HRLWZGMA.js";
100
+ } from "./chunk-2RK2AG32.js";
95
101
  import {
96
102
  parseSessionFile
97
103
  } from "./chunk-P5EPF6MB.js";
98
- import {
99
- rebuildCommand,
100
- registerRebuildCommand
101
- } from "./chunk-JTO7NZLS.js";
102
104
  import {
103
105
  Compressor,
104
106
  Observer,
105
- Reflector,
107
+ Reflector
108
+ } from "./chunk-TMZMN7OS.js";
109
+ import {
110
+ archiveProject,
111
+ createProject,
112
+ getProjectActivity,
113
+ getProjectTasks,
114
+ listProjects,
115
+ readProject,
116
+ updateProject
117
+ } from "./chunk-5GZFTAL7.js";
118
+ import "./chunk-HRLWZGMA.js";
119
+ import {
106
120
  SUPPORTED_CONFIG_KEYS,
107
121
  addRouteRule,
122
+ getConfig,
108
123
  getConfigValue,
109
124
  listConfig,
110
125
  listRouteRules,
@@ -113,23 +128,32 @@ import {
113
128
  resetConfig,
114
129
  setConfigValue,
115
130
  testRouteRule
116
- } from "./chunk-H6WQUUNK.js";
131
+ } from "./chunk-ITPEXLHA.js";
117
132
  import {
118
133
  archiveCommand,
119
134
  registerArchiveCommand
120
- } from "./chunk-HVTTYDCJ.js";
135
+ } from "./chunk-VR5NE7PZ.js";
121
136
  import {
122
137
  archiveObservations
123
- } from "./chunk-QALB2V3E.js";
138
+ } from "./chunk-MQUJNOHK.js";
124
139
  import {
125
140
  findNearestVaultPath,
126
141
  getVaultPath,
127
142
  resolveVaultPath
128
143
  } from "./chunk-MXSSG3QU.js";
129
144
  import {
145
+ appendTransition,
146
+ buildTransitionEvent,
147
+ completeTask,
148
+ countBlockedTransitions,
149
+ formatTransitionsTable,
150
+ isRegression,
130
151
  listDependentTasks,
131
- listSubtasks
132
- } from "./chunk-6QLRSPLZ.js";
152
+ listSubtasks,
153
+ queryTransitions,
154
+ readAllTransitions,
155
+ updateTask
156
+ } from "./chunk-IOALNTAN.js";
133
157
  import {
134
158
  checkOpenClawCompatibility,
135
159
  compatCommand,
@@ -143,12 +167,12 @@ import {
143
167
  normalizeContextProfileInput,
144
168
  registerContextCommand,
145
169
  resolveContextProfile
146
- } from "./chunk-22WE3J4F.js";
170
+ } from "./chunk-WIICLBNF.js";
147
171
  import {
148
172
  ClawVault,
149
173
  createVault,
150
174
  findVault
151
- } from "./chunk-HNMFXFYP.js";
175
+ } from "./chunk-7OHQFMJK.js";
152
176
  import {
153
177
  QMD_INSTALL_COMMAND,
154
178
  QMD_INSTALL_URL,
@@ -165,16 +189,15 @@ import {
165
189
  DEFAULT_CONFIG,
166
190
  MEMORY_TYPES,
167
191
  TYPE_TO_CATEGORY
168
- } from "./chunk-3PJIGGWV.js";
169
- import "./chunk-L3DJ36BZ.js";
192
+ } from "./chunk-2CDEETQN.js";
193
+ import "./chunk-FHFUXL6G.js";
170
194
  import {
171
195
  MEMORY_GRAPH_SCHEMA_VERSION,
172
196
  buildOrUpdateMemoryGraphIndex,
173
197
  getMemoryGraph,
174
198
  loadMemoryGraphIndex
175
199
  } from "./chunk-ZZA73MFY.js";
176
- import "./chunk-FHFUXL6G.js";
177
- import "./chunk-NAMFB7ZA.js";
200
+ import "./chunk-Z2XBWN7A.js";
178
201
 
179
202
  // src/index.ts
180
203
  import * as fs from "fs";
@@ -190,6 +213,7 @@ function readPackageVersion() {
190
213
  var VERSION = readPackageVersion();
191
214
  function registerCommanderCommands(program) {
192
215
  registerContextCommand(program);
216
+ registerInjectCommand(program);
193
217
  registerObserveCommand(program);
194
218
  registerReflectCommand(program);
195
219
  registerTailscaleCommands(program);
@@ -218,7 +242,9 @@ export {
218
242
  appendTransition,
219
243
  archiveCommand,
220
244
  archiveObservations,
245
+ archiveProject,
221
246
  buildContext,
247
+ buildInjectionResult,
222
248
  buildKanbanLanes,
223
249
  buildOrUpdateMemoryGraphIndex,
224
250
  buildSessionRecap,
@@ -229,10 +255,13 @@ export {
229
255
  compareManifests,
230
256
  compatCommand,
231
257
  compatibilityExitCode,
258
+ completeTask,
232
259
  configureTailscaleServe,
233
260
  contextCommand,
234
261
  countBlockedTransitions,
262
+ createProject,
235
263
  createVault,
264
+ deterministicInjectMatches,
236
265
  discoverClawVaultPeers,
237
266
  extractCardSlug,
238
267
  extractTags,
@@ -248,9 +277,12 @@ export {
248
277
  formatTransitionsTable,
249
278
  generateKanbanMarkdown,
250
279
  generateVaultManifest,
280
+ getConfig,
251
281
  getConfigValue,
252
282
  getMemoryGraph,
253
283
  getOnlinePeers,
284
+ getProjectActivity,
285
+ getProjectTasks,
254
286
  getTailscaleStatus,
255
287
  getTailscaleVersion,
256
288
  getVaultPath,
@@ -259,11 +291,14 @@ export {
259
291
  hasQmd,
260
292
  hasTailscale,
261
293
  importKanbanBoard,
294
+ indexInjectableItems,
262
295
  inferContextProfile,
296
+ injectCommand,
263
297
  isRegression,
264
298
  kanbanCommand,
265
299
  listConfig,
266
300
  listDependentTasks,
301
+ listProjects,
267
302
  listRouteRules,
268
303
  listSubtasks,
269
304
  loadMemoryGraphIndex,
@@ -279,11 +314,13 @@ export {
279
314
  qmdUpdate,
280
315
  queryTransitions,
281
316
  readAllTransitions,
317
+ readProject,
282
318
  rebuildCommand,
283
319
  reflectCommand,
284
320
  registerArchiveCommand,
285
321
  registerCommanderCommands,
286
322
  registerContextCommand,
323
+ registerInjectCommand,
287
324
  registerMigrateObservationsCommand,
288
325
  registerObserveCommand,
289
326
  registerRebuildCommand,
@@ -298,10 +335,13 @@ export {
298
335
  removeRouteRule,
299
336
  renderTemplate,
300
337
  replayCommand,
338
+ requestLlmCompletion,
301
339
  resetConfig,
302
340
  resolveContextProfile,
341
+ resolveLlmProvider,
303
342
  resolvePeerIP,
304
343
  resolveVaultPath,
344
+ runPromptInjection,
305
345
  runReflection,
306
346
  serveVault,
307
347
  sessionRecapCommand,
@@ -315,5 +355,7 @@ export {
315
355
  tailscaleServeCommand,
316
356
  tailscaleStatusCommand,
317
357
  tailscaleSyncCommand,
318
- testRouteRule
358
+ testRouteRule,
359
+ updateProject,
360
+ updateTask
319
361
  };
@@ -0,0 +1,137 @@
1
+ import { Command } from 'commander';
2
+
3
+ declare const MEMORY_GRAPH_SCHEMA_VERSION = 1;
4
+ type NodeCategory = 'note' | 'daily' | 'observation' | 'handoff' | 'decision' | 'lesson' | 'project' | 'person' | 'commitment' | 'tag' | 'unresolved';
5
+ type MemoryGraphNodeType = NodeCategory;
6
+ type MemoryGraphEdgeType = 'wiki_link' | 'tag' | 'frontmatter_relation';
7
+ interface MemoryGraphNode {
8
+ id: string;
9
+ title: string;
10
+ type: MemoryGraphNodeType;
11
+ category: string;
12
+ path: string | null;
13
+ tags: string[];
14
+ missing: boolean;
15
+ degree: number;
16
+ modifiedAt: string | null;
17
+ }
18
+ interface MemoryGraphEdge {
19
+ id: string;
20
+ source: string;
21
+ target: string;
22
+ type: MemoryGraphEdgeType;
23
+ label?: string;
24
+ }
25
+ interface MemoryGraphStats {
26
+ generatedAt: string;
27
+ nodeCount: number;
28
+ edgeCount: number;
29
+ nodeTypeCounts: Record<string, number>;
30
+ edgeTypeCounts: Record<string, number>;
31
+ }
32
+ interface MemoryGraph {
33
+ schemaVersion: number;
34
+ nodes: MemoryGraphNode[];
35
+ edges: MemoryGraphEdge[];
36
+ stats: MemoryGraphStats;
37
+ }
38
+ interface MemoryGraphFileFragment {
39
+ relativePath: string;
40
+ mtimeMs: number;
41
+ nodes: MemoryGraphNode[];
42
+ edges: MemoryGraphEdge[];
43
+ }
44
+ interface MemoryGraphIndex {
45
+ schemaVersion: number;
46
+ vaultPath: string;
47
+ generatedAt: string;
48
+ files: Record<string, MemoryGraphFileFragment>;
49
+ graph: MemoryGraph;
50
+ }
51
+ interface BuildGraphIndexOptions {
52
+ forceFull?: boolean;
53
+ }
54
+ declare function loadMemoryGraphIndex(vaultPath: string): MemoryGraphIndex | null;
55
+ declare function buildOrUpdateMemoryGraphIndex(vaultPathInput: string, options?: BuildGraphIndexOptions): Promise<MemoryGraphIndex>;
56
+ declare function getMemoryGraph(vaultPath: string, options?: {
57
+ refresh?: boolean;
58
+ }): Promise<MemoryGraph>;
59
+
60
+ type LlmProvider = 'anthropic' | 'openai' | 'gemini';
61
+ interface LlmCompletionOptions {
62
+ prompt: string;
63
+ provider?: LlmProvider | null;
64
+ model?: string;
65
+ systemPrompt?: string;
66
+ temperature?: number;
67
+ maxTokens?: number;
68
+ fetchImpl?: typeof fetch;
69
+ }
70
+ declare function resolveLlmProvider(): LlmProvider | null;
71
+ declare function requestLlmCompletion(options: LlmCompletionOptions): Promise<string>;
72
+
73
+ declare const INJECTABLE_CATEGORIES: readonly ["rules", "decisions", "preferences"];
74
+ type InjectSourceCategory = (typeof INJECTABLE_CATEGORIES)[number];
75
+ type InjectMatchSource = 'trigger' | 'keyword' | 'entity' | 'graph_1hop' | 'llm_intent';
76
+ interface InjectableItem {
77
+ id: string;
78
+ category: InjectSourceCategory;
79
+ relativePath: string;
80
+ title: string;
81
+ content: string;
82
+ triggers: string[];
83
+ scope: string[];
84
+ priority: number;
85
+ searchKeywords: string[];
86
+ noteNodeId: string;
87
+ }
88
+ interface InjectMatchReason {
89
+ source: InjectMatchSource;
90
+ value: string;
91
+ weight: number;
92
+ }
93
+ interface InjectMatch {
94
+ item: InjectableItem;
95
+ score: number;
96
+ deterministicScore: number;
97
+ llmScore: number | null;
98
+ reasons: InjectMatchReason[];
99
+ }
100
+ interface InjectResult {
101
+ message: string;
102
+ generatedAt: string;
103
+ deterministicMs: number;
104
+ llmProvider: LlmProvider | null;
105
+ usedLlm: boolean;
106
+ matches: InjectMatch[];
107
+ }
108
+ interface InjectRuntimeOptions {
109
+ maxResults?: number;
110
+ useLlm?: boolean;
111
+ scope?: string | string[];
112
+ model?: string;
113
+ fetchImpl?: typeof fetch;
114
+ }
115
+ declare function indexInjectableItems(vaultPathInput: string): InjectableItem[];
116
+ declare function deterministicInjectMatches(params: {
117
+ message: string;
118
+ items: InjectableItem[];
119
+ graph: MemoryGraph;
120
+ scope?: string | string[];
121
+ }): InjectMatch[];
122
+ declare function runPromptInjection(vaultPathInput: string, message: string, options?: InjectRuntimeOptions): Promise<InjectResult>;
123
+
124
+ type InjectFormat = 'markdown' | 'json';
125
+ interface InjectCommandOptions {
126
+ vaultPath: string;
127
+ maxResults?: number;
128
+ useLlm?: boolean;
129
+ scope?: string | string[];
130
+ format?: InjectFormat;
131
+ model?: string;
132
+ }
133
+ declare function buildInjectionResult(message: string, options: InjectCommandOptions): Promise<InjectResult>;
134
+ declare function injectCommand(message: string, options: InjectCommandOptions): Promise<void>;
135
+ declare function registerInjectCommand(program: Command): void;
136
+
137
+ export { runPromptInjection as A, type InjectCommandOptions as I, type LlmCompletionOptions as L, MEMORY_GRAPH_SCHEMA_VERSION as M, type InjectFormat as a, type InjectMatch as b, type InjectMatchReason as c, type InjectMatchSource as d, type InjectResult as e, type InjectRuntimeOptions as f, type InjectSourceCategory as g, type InjectableItem as h, type LlmProvider as i, type MemoryGraph as j, type MemoryGraphEdge as k, type MemoryGraphEdgeType as l, type MemoryGraphIndex as m, type MemoryGraphNode as n, type MemoryGraphNodeType as o, type MemoryGraphStats as p, buildInjectionResult as q, buildOrUpdateMemoryGraphIndex as r, deterministicInjectMatches as s, getMemoryGraph as t, indexInjectableItems as u, injectCommand as v, loadMemoryGraphIndex as w, registerInjectCommand as x, requestLlmCompletion as y, resolveLlmProvider as z };
@@ -0,0 +1,97 @@
1
+ import { Task } from './task-utils.js';
2
+
3
+ /**
4
+ * Project utilities for ClawVault project tracking
5
+ * Handles project definition and activity file read/write/query operations
6
+ */
7
+
8
+ type ProjectStatus = 'active' | 'paused' | 'completed' | 'archived';
9
+ interface ProjectFrontmatter {
10
+ type: 'project';
11
+ status: ProjectStatus;
12
+ created: string;
13
+ updated: string;
14
+ owner?: string;
15
+ team?: string[];
16
+ client?: string;
17
+ tags?: string[];
18
+ description?: string;
19
+ started?: string;
20
+ deadline?: string;
21
+ repo?: string;
22
+ url?: string;
23
+ completed?: string;
24
+ reason?: string;
25
+ }
26
+ interface Project {
27
+ slug: string;
28
+ title: string;
29
+ content: string;
30
+ frontmatter: ProjectFrontmatter;
31
+ }
32
+ interface ProjectFilterOptions {
33
+ status?: ProjectStatus;
34
+ owner?: string;
35
+ client?: string;
36
+ tag?: string;
37
+ }
38
+ interface CreateProjectOptions {
39
+ status?: ProjectStatus;
40
+ owner?: string;
41
+ team?: string[];
42
+ client?: string;
43
+ tags?: string[];
44
+ description?: string;
45
+ started?: string;
46
+ deadline?: string;
47
+ repo?: string;
48
+ url?: string;
49
+ completed?: string;
50
+ reason?: string;
51
+ content?: string;
52
+ }
53
+ interface UpdateProjectOptions {
54
+ status?: ProjectStatus;
55
+ owner?: string | null;
56
+ team?: string[] | null;
57
+ client?: string | null;
58
+ tags?: string[] | null;
59
+ description?: string | null;
60
+ started?: string | null;
61
+ deadline?: string | null;
62
+ repo?: string | null;
63
+ url?: string | null;
64
+ completed?: string | null;
65
+ reason?: string | null;
66
+ }
67
+ /**
68
+ * List all project definition files in the vault.
69
+ * Includes only root-level projects/*.md files with type: project frontmatter.
70
+ */
71
+ declare function listProjects(vaultPath: string, filters?: ProjectFilterOptions): Project[];
72
+ /**
73
+ * Read a project definition file from projects/{slug}.md
74
+ */
75
+ declare function readProject(vaultPath: string, slug: string): Project | null;
76
+ /**
77
+ * Create a new project definition at projects/{slug}.md
78
+ */
79
+ declare function createProject(vaultPath: string, title: string, options?: CreateProjectOptions): Project;
80
+ /**
81
+ * Update an existing project's frontmatter
82
+ */
83
+ declare function updateProject(vaultPath: string, slug: string, updates: UpdateProjectOptions): Project;
84
+ /**
85
+ * Archive a project with optional reason and completion date
86
+ */
87
+ declare function archiveProject(vaultPath: string, slug: string, reason?: string): Project;
88
+ /**
89
+ * List tasks linked to a project by task.frontmatter.project === project slug
90
+ */
91
+ declare function getProjectTasks(vaultPath: string, slug: string): Task[];
92
+ /**
93
+ * List files in projects/{slug}/ sorted by date (newest first)
94
+ */
95
+ declare function getProjectActivity(vaultPath: string, slug: string): string[];
96
+
97
+ export { type CreateProjectOptions, type Project, type ProjectFilterOptions, type ProjectFrontmatter, type ProjectStatus, type UpdateProjectOptions, archiveProject, createProject, getProjectActivity, getProjectTasks, listProjects, readProject, updateProject };
@@ -0,0 +1,19 @@
1
+ import {
2
+ archiveProject,
3
+ createProject,
4
+ getProjectActivity,
5
+ getProjectTasks,
6
+ listProjects,
7
+ readProject,
8
+ updateProject
9
+ } from "../chunk-5GZFTAL7.js";
10
+ import "../chunk-IOALNTAN.js";
11
+ export {
12
+ archiveProject,
13
+ createProject,
14
+ getProjectActivity,
15
+ getProjectTasks,
16
+ listProjects,
17
+ readProject,
18
+ updateProject
19
+ };
@@ -58,6 +58,11 @@ interface BacklogFilterOptions {
58
58
  project?: string;
59
59
  source?: string;
60
60
  }
61
+ interface TaskTransitionOptions {
62
+ skipTransition?: boolean;
63
+ confidence?: number;
64
+ reason?: string | null;
65
+ }
61
66
  /**
62
67
  * Slugify a title for use as filename
63
68
  * Deterministic: same title = same slug
@@ -139,11 +144,11 @@ declare function updateTask(vaultPath: string, slug: string, updates: {
139
144
  estimate?: string | null;
140
145
  parent?: string | null;
141
146
  depends_on?: string[] | null;
142
- }): Task;
147
+ }, options?: TaskTransitionOptions): Task;
143
148
  /**
144
149
  * Mark a task as done
145
150
  */
146
- declare function completeTask(vaultPath: string, slug: string): Task;
151
+ declare function completeTask(vaultPath: string, slug: string, options?: TaskTransitionOptions): Task;
147
152
  /**
148
153
  * Create a new backlog item
149
154
  */
@@ -199,4 +204,4 @@ declare function getStatusIcon(status: TaskStatus): string;
199
204
  */
200
205
  declare function getStatusDisplay(status: TaskStatus): string;
201
206
 
202
- export { type BacklogFilterOptions, type BacklogFrontmatter, type BacklogItem, type Task, type TaskFilterOptions, type TaskFrontmatter, type TaskPriority, type TaskStatus, completeTask, createBacklogItem, createTask, ensureBacklogDir, ensureTasksDir, getActiveTasks, getBacklogDir, getBacklogPath, getBlockedTasks, getRecentlyCompletedTasks, getStatusDisplay, getStatusIcon, getTaskPath, getTasksDir, listBacklogItems, listDependentTasks, listSubtasks, listTasks, promoteBacklogItem, readBacklogItem, readTask, slugify, updateBacklogItem, updateTask };
207
+ export { type BacklogFilterOptions, type BacklogFrontmatter, type BacklogItem, type Task, type TaskFilterOptions, type TaskFrontmatter, type TaskPriority, type TaskStatus, type TaskTransitionOptions, completeTask, createBacklogItem, createTask, ensureBacklogDir, ensureTasksDir, getActiveTasks, getBacklogDir, getBacklogPath, getBlockedTasks, getRecentlyCompletedTasks, getStatusDisplay, getStatusIcon, getTaskPath, getTasksDir, listBacklogItems, listDependentTasks, listSubtasks, listTasks, promoteBacklogItem, readBacklogItem, readTask, slugify, updateBacklogItem, updateTask };
@@ -23,7 +23,7 @@ import {
23
23
  slugify,
24
24
  updateBacklogItem,
25
25
  updateTask
26
- } from "../chunk-6QLRSPLZ.js";
26
+ } from "../chunk-IOALNTAN.js";
27
27
  export {
28
28
  completeTask,
29
29
  createBacklogItem,
@@ -101,7 +101,7 @@ interface SyncResult {
101
101
  unchanged: string[];
102
102
  errors: string[];
103
103
  }
104
- type Category = 'preferences' | 'decisions' | 'patterns' | 'people' | 'projects' | 'goals' | 'transcripts' | 'inbox' | 'templates' | 'facts' | 'feelings' | 'lessons' | 'commitments' | 'handoffs' | string;
104
+ type Category = 'preferences' | 'decisions' | 'rules' | 'patterns' | 'people' | 'projects' | 'goals' | 'transcripts' | 'inbox' | 'templates' | 'facts' | 'feelings' | 'lessons' | 'commitments' | 'handoffs' | string;
105
105
  declare const DEFAULT_CATEGORIES: Category[];
106
106
  /**
107
107
  * Memory Type Taxonomy (Benthic's 8 categories)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawvault",
3
- "version": "2.4.6",
3
+ "version": "2.5.0",
4
4
  "description": "Structured memory system for AI agents — typed storage, knowledge graph, context profiles, canvas dashboards, neural graph themes, and Obsidian-native task views. An elephant never forgets. 🐘",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -29,7 +29,7 @@
29
29
  ]
30
30
  },
31
31
  "scripts": {
32
- "build": "tsup src/commands/archive.ts src/commands/backlog.ts src/commands/blocked.ts src/commands/canvas.ts src/commands/checkpoint.ts src/commands/compat.ts src/commands/context.ts src/commands/doctor.ts src/commands/entities.ts src/commands/graph.ts src/commands/kanban.ts src/commands/link.ts src/commands/migrate-observations.ts src/commands/observe.ts src/commands/rebuild.ts src/commands/recover.ts src/commands/reflect.ts src/commands/repair-session.ts src/commands/replay.ts src/commands/session-recap.ts src/commands/setup.ts src/commands/shell-init.ts src/commands/sleep.ts src/commands/status.ts src/commands/sync-bd.ts src/commands/tailscale.ts src/commands/task.ts src/commands/template.ts src/commands/wake.ts src/index.ts src/lib/auto-linker.ts src/lib/canvas-layout.ts src/lib/config.ts src/lib/entity-index.ts src/lib/session-repair.ts src/lib/session-utils.ts src/lib/tailscale.ts src/lib/task-utils.ts src/lib/template-engine.ts src/lib/webdav.ts --format esm --dts --clean",
32
+ "build": "tsup src/commands/archive.ts src/commands/backlog.ts src/commands/blocked.ts src/commands/canvas.ts src/commands/checkpoint.ts src/commands/compat.ts src/commands/context.ts src/commands/doctor.ts src/commands/entities.ts src/commands/graph.ts src/commands/inject.ts src/commands/kanban.ts src/commands/link.ts src/commands/migrate-observations.ts src/commands/observe.ts src/commands/project.ts src/commands/rebuild.ts src/commands/recover.ts src/commands/reflect.ts src/commands/repair-session.ts src/commands/replay.ts src/commands/session-recap.ts src/commands/setup.ts src/commands/shell-init.ts src/commands/sleep.ts src/commands/status.ts src/commands/sync-bd.ts src/commands/tailscale.ts src/commands/task.ts src/commands/template.ts src/commands/wake.ts src/index.ts src/lib/auto-linker.ts src/lib/canvas-layout.ts src/lib/config.ts src/lib/entity-index.ts src/lib/project-utils.ts src/lib/session-repair.ts src/lib/session-utils.ts src/lib/tailscale.ts src/lib/task-utils.ts src/lib/template-engine.ts src/lib/webdav.ts --format esm --dts --clean",
33
33
  "dev": "tsup src/index.ts src/commands/*.ts src/lib/*.ts --format esm --dts --watch",
34
34
  "lint": "eslint src",
35
35
  "typecheck": "tsc --noEmit",
@@ -1,40 +0,0 @@
1
- import {
2
- parseObservationMarkdown
3
- } from "./chunk-FHFUXL6G.js";
4
- import {
5
- listObservationFiles
6
- } from "./chunk-NAMFB7ZA.js";
7
-
8
- // src/lib/observation-reader.ts
9
- import * as fs from "fs";
10
- function readObservations(vaultPath, days = 7) {
11
- const normalizedDays = Number.isFinite(days) ? Math.max(0, Math.floor(days)) : 0;
12
- if (normalizedDays === 0) {
13
- return "";
14
- }
15
- const files = listObservationFiles(vaultPath, {
16
- includeLegacy: true,
17
- includeArchive: false,
18
- dedupeByDate: true
19
- }).sort((left, right) => right.date.localeCompare(left.date)).slice(0, normalizedDays);
20
- if (files.length === 0) {
21
- return "";
22
- }
23
- return files.map((entry) => fs.readFileSync(entry.path, "utf-8").trim()).filter(Boolean).join("\n\n").trim();
24
- }
25
- function parseObservationLines(markdown) {
26
- return parseObservationMarkdown(markdown).map((record) => ({
27
- type: record.type,
28
- confidence: record.confidence,
29
- importance: record.importance,
30
- content: record.content,
31
- date: record.date,
32
- format: record.format,
33
- priority: record.priority
34
- }));
35
- }
36
-
37
- export {
38
- readObservations,
39
- parseObservationLines
40
- };