@sudosandwich/limps 2.0.0 → 2.2.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 +69 -7
- package/dist/agent-parser.d.ts +10 -2
- package/dist/agent-parser.d.ts.map +1 -1
- package/dist/agent-parser.js +0 -3
- package/dist/agent-parser.js.map +1 -1
- package/dist/cli/list-plans.d.ts.map +1 -1
- package/dist/cli/list-plans.js +4 -2
- package/dist/cli/list-plans.js.map +1 -1
- package/dist/cli/status.d.ts.map +1 -1
- package/dist/cli/status.js +3 -1
- package/dist/cli/status.js.map +1 -1
- package/dist/indexer.d.ts.map +1 -1
- package/dist/indexer.js +40 -69
- package/dist/indexer.js.map +1 -1
- package/dist/resources/plans-full.d.ts.map +1 -1
- package/dist/resources/plans-full.js +4 -3
- package/dist/resources/plans-full.js.map +1 -1
- package/dist/resources/plans-index.d.ts.map +1 -1
- package/dist/resources/plans-index.js +8 -4
- package/dist/resources/plans-index.js.map +1 -1
- package/dist/resources/plans-summary.d.ts.map +1 -1
- package/dist/resources/plans-summary.js +3 -2
- package/dist/resources/plans-summary.js.map +1 -1
- package/dist/rlm/extractors.d.ts +1 -0
- package/dist/rlm/extractors.d.ts.map +1 -1
- package/dist/rlm/extractors.js +17 -198
- package/dist/rlm/extractors.js.map +1 -1
- package/dist/rlm/helpers.js +10 -10
- package/dist/rlm/helpers.js.map +1 -1
- package/dist/server-main.js +1 -1
- package/dist/server-main.js.map +1 -1
- package/dist/tools/create-doc.d.ts +1 -0
- package/dist/tools/create-doc.d.ts.map +1 -1
- package/dist/tools/create-doc.js +23 -6
- package/dist/tools/create-doc.js.map +1 -1
- package/dist/tools/create-plan.d.ts.map +1 -1
- package/dist/tools/create-plan.js +4 -3
- package/dist/tools/create-plan.js.map +1 -1
- package/dist/tools/get-next-task.d.ts +1 -0
- package/dist/tools/get-next-task.d.ts.map +1 -1
- package/dist/tools/get-next-task.js +7 -3
- package/dist/tools/get-next-task.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +18 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/list-docs.d.ts +1 -0
- package/dist/tools/list-docs.d.ts.map +1 -1
- package/dist/tools/list-docs.js +6 -2
- package/dist/tools/list-docs.js.map +1 -1
- package/dist/tools/list-plans.d.ts +4 -2
- package/dist/tools/list-plans.d.ts.map +1 -1
- package/dist/tools/list-plans.js +9 -3
- package/dist/tools/list-plans.js.map +1 -1
- package/dist/tools/manage-tags.d.ts +39 -0
- package/dist/tools/manage-tags.d.ts.map +1 -0
- package/dist/tools/manage-tags.js +203 -0
- package/dist/tools/manage-tags.js.map +1 -0
- package/dist/tools/process-doc.d.ts +1 -0
- package/dist/tools/process-doc.d.ts.map +1 -1
- package/dist/tools/process-doc.js +6 -2
- package/dist/tools/process-doc.js.map +1 -1
- package/dist/tools/process-docs.js +2 -2
- package/dist/tools/process-docs.js.map +1 -1
- package/dist/tools/search-docs.d.ts +25 -5
- package/dist/tools/search-docs.d.ts.map +1 -1
- package/dist/tools/search-docs.js +187 -57
- package/dist/tools/search-docs.js.map +1 -1
- package/dist/tools/update-doc.d.ts +12 -0
- package/dist/tools/update-doc.d.ts.map +1 -1
- package/dist/tools/update-doc.js +127 -24
- package/dist/tools/update-doc.js.map +1 -1
- package/dist/tools/update-task-status.js +1 -1
- package/dist/utils/errors.d.ts +37 -6
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +49 -8
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/frontmatter.d.ts +74 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js +153 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/obsidian-vault.d.ts +31 -0
- package/dist/utils/obsidian-vault.d.ts.map +1 -0
- package/dist/utils/obsidian-vault.js +172 -0
- package/dist/utils/obsidian-vault.js.map +1 -0
- package/dist/utils/pathfilter.d.ts +53 -0
- package/dist/utils/pathfilter.d.ts.map +1 -0
- package/dist/utils/pathfilter.js +107 -0
- package/dist/utils/pathfilter.js.map +1 -0
- package/dist/utils/paths.d.ts +17 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +55 -2
- package/dist/utils/paths.js.map +1 -1
- package/dist/watcher.d.ts.map +1 -1
- package/dist/watcher.js +50 -16
- package/dist/watcher.js.map +1 -1
- package/package.json +2 -1
package/dist/tools/update-doc.js
CHANGED
|
@@ -5,8 +5,9 @@ import { z } from 'zod';
|
|
|
5
5
|
import { existsSync, readFileSync, writeFileSync, statSync } from 'fs';
|
|
6
6
|
import { dirname } from 'path';
|
|
7
7
|
import { validatePath, isProtectedPlanFile } from '../utils/paths.js';
|
|
8
|
-
import { notFound } from '../utils/errors.js';
|
|
8
|
+
import { notFound, permissionDenied, noSpaceError } from '../utils/errors.js';
|
|
9
9
|
import { createBackup } from '../utils/backup.js';
|
|
10
|
+
import { FrontmatterHandler } from '../utils/frontmatter.js';
|
|
10
11
|
import { indexDocument } from '../indexer.js';
|
|
11
12
|
/**
|
|
12
13
|
* Patch operation schema.
|
|
@@ -21,15 +22,35 @@ export const PatchSchema = z.object({
|
|
|
21
22
|
*/
|
|
22
23
|
export const UpdateDocInputBaseSchema = z.object({
|
|
23
24
|
path: z.string().min(1).describe('Path to existing file'),
|
|
24
|
-
content: z
|
|
25
|
+
content: z
|
|
26
|
+
.string()
|
|
27
|
+
.optional()
|
|
28
|
+
.describe('Content to write (required for overwrite/append/prepend modes)'),
|
|
25
29
|
patch: PatchSchema.optional().describe('Search/replace patch'),
|
|
30
|
+
mode: z
|
|
31
|
+
.enum(['overwrite', 'append', 'prepend'])
|
|
32
|
+
.default('overwrite')
|
|
33
|
+
.describe('Write mode: overwrite (default), append, or prepend'),
|
|
26
34
|
createBackup: z.boolean().default(true).describe('Create backup before update'),
|
|
27
35
|
force: z.boolean().default(false).describe('Skip validation warnings'),
|
|
36
|
+
prettyPrint: z
|
|
37
|
+
.boolean()
|
|
38
|
+
.default(false)
|
|
39
|
+
.describe('Format JSON response with indentation (default: false)'),
|
|
28
40
|
});
|
|
29
41
|
/**
|
|
30
42
|
* Input schema for update_doc tool (with validation).
|
|
31
43
|
*/
|
|
32
|
-
export const UpdateDocInputSchema = UpdateDocInputBaseSchema.refine((data) =>
|
|
44
|
+
export const UpdateDocInputSchema = UpdateDocInputBaseSchema.refine((data) => {
|
|
45
|
+
// For append/prepend modes, content is required
|
|
46
|
+
if ((data.mode === 'append' || data.mode === 'prepend') && data.content === undefined) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
// For overwrite mode or patch, either content or patch must be provided
|
|
50
|
+
return data.content !== undefined || data.patch !== undefined;
|
|
51
|
+
}, {
|
|
52
|
+
message: 'Content is required for append/prepend modes. For overwrite mode, either content or patch must be provided.',
|
|
53
|
+
});
|
|
33
54
|
/**
|
|
34
55
|
* Get repository root from config.
|
|
35
56
|
*/
|
|
@@ -70,17 +91,22 @@ function applyPatch(content, patch) {
|
|
|
70
91
|
* @returns Tool result
|
|
71
92
|
*/
|
|
72
93
|
export async function handleUpdateDoc(input, context) {
|
|
73
|
-
const { path, content, patch, createBackup: shouldBackup, force } = input;
|
|
94
|
+
const { path, content, patch, mode = 'overwrite', createBackup: shouldBackup, force, prettyPrint, } = input;
|
|
74
95
|
const repoRoot = getRepoRoot(context.config);
|
|
96
|
+
const frontmatterHandler = new FrontmatterHandler();
|
|
75
97
|
try {
|
|
76
98
|
// Validate path
|
|
77
99
|
const validated = validatePath(path, repoRoot);
|
|
78
|
-
// Check if file exists
|
|
79
|
-
|
|
100
|
+
// Check if file exists (required for append/prepend modes)
|
|
101
|
+
const fileExists = existsSync(validated.absolute);
|
|
102
|
+
if (!fileExists && (mode === 'append' || mode === 'prepend')) {
|
|
103
|
+
throw notFound(path);
|
|
104
|
+
}
|
|
105
|
+
if (!fileExists && mode === 'overwrite' && patch === undefined) {
|
|
80
106
|
throw notFound(path);
|
|
81
107
|
}
|
|
82
108
|
// Check if this is a protected plan file
|
|
83
|
-
if (isProtectedPlanFile(validated.relative) && !force) {
|
|
109
|
+
if (fileExists && isProtectedPlanFile(validated.relative) && !force) {
|
|
84
110
|
return {
|
|
85
111
|
content: [
|
|
86
112
|
{
|
|
@@ -88,38 +114,102 @@ export async function handleUpdateDoc(input, context) {
|
|
|
88
114
|
text: JSON.stringify({
|
|
89
115
|
warning: 'Protected plan file - confirm with force: true',
|
|
90
116
|
path: validated.relative,
|
|
91
|
-
}, null, 2),
|
|
117
|
+
}, null, prettyPrint ? 2 : undefined),
|
|
92
118
|
},
|
|
93
119
|
],
|
|
94
120
|
isError: true,
|
|
95
121
|
};
|
|
96
122
|
}
|
|
97
|
-
// Read existing content
|
|
98
|
-
const oldContent = readFileSync(validated.absolute, 'utf-8');
|
|
123
|
+
// Read existing content if file exists
|
|
124
|
+
const oldContent = fileExists ? readFileSync(validated.absolute, 'utf-8') : '';
|
|
99
125
|
const hadFrontmatter = hasFrontmatter(oldContent);
|
|
100
126
|
// Determine new content
|
|
101
127
|
let newContent;
|
|
102
128
|
if (content !== undefined) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
129
|
+
if (mode === 'overwrite') {
|
|
130
|
+
// Full replacement
|
|
131
|
+
newContent = content;
|
|
132
|
+
// Warn if frontmatter was removed (unless force is true)
|
|
133
|
+
if (hadFrontmatter && !hasFrontmatter(newContent) && !force) {
|
|
134
|
+
return {
|
|
135
|
+
content: [
|
|
136
|
+
{
|
|
137
|
+
type: 'text',
|
|
138
|
+
text: JSON.stringify({
|
|
139
|
+
warning: 'Frontmatter removed - confirm with force: true',
|
|
140
|
+
path: validated.relative,
|
|
141
|
+
}, null, prettyPrint ? 2 : undefined),
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
isError: true,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
else if (mode === 'append' || mode === 'prepend') {
|
|
149
|
+
// Append or prepend mode - merge frontmatter and content
|
|
150
|
+
if (!fileExists) {
|
|
151
|
+
// File doesn't exist, treat as overwrite
|
|
152
|
+
newContent = content;
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
// Parse existing note
|
|
156
|
+
const existingNote = frontmatterHandler.parse(oldContent);
|
|
157
|
+
const newNote = frontmatterHandler.parse(content);
|
|
158
|
+
// Merge frontmatter
|
|
159
|
+
const mergedFrontmatter = {
|
|
160
|
+
...existingNote.frontmatter,
|
|
161
|
+
...newNote.frontmatter,
|
|
162
|
+
};
|
|
163
|
+
// Combine content based on mode
|
|
164
|
+
let combinedContent;
|
|
165
|
+
if (mode === 'append') {
|
|
166
|
+
combinedContent = existingNote.content + newNote.content;
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
// prepend
|
|
170
|
+
combinedContent = newNote.content + existingNote.content;
|
|
171
|
+
}
|
|
172
|
+
// Validate merged frontmatter
|
|
173
|
+
const validation = frontmatterHandler.validate(mergedFrontmatter);
|
|
174
|
+
if (!validation.isValid) {
|
|
175
|
+
return {
|
|
176
|
+
content: [
|
|
177
|
+
{
|
|
178
|
+
type: 'text',
|
|
179
|
+
text: JSON.stringify({
|
|
180
|
+
error: `Invalid frontmatter after merge: ${validation.errors.join(', ')}`,
|
|
181
|
+
path: validated.relative,
|
|
182
|
+
}, null, prettyPrint ? 2 : undefined),
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
isError: true,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
// Stringify with merged frontmatter and combined content
|
|
189
|
+
newContent = frontmatterHandler.stringify(mergedFrontmatter, combinedContent);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
// This should never happen due to schema validation
|
|
194
|
+
throw new Error(`Invalid mode: ${mode}`);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
else if (patch !== undefined) {
|
|
198
|
+
// Patch operation (only works with overwrite mode)
|
|
199
|
+
if (mode !== 'overwrite') {
|
|
107
200
|
return {
|
|
108
201
|
content: [
|
|
109
202
|
{
|
|
110
203
|
type: 'text',
|
|
111
204
|
text: JSON.stringify({
|
|
112
|
-
|
|
205
|
+
error: 'Patch operations only work with overwrite mode',
|
|
113
206
|
path: validated.relative,
|
|
114
|
-
}, null, 2),
|
|
207
|
+
}, null, prettyPrint ? 2 : undefined),
|
|
115
208
|
},
|
|
116
209
|
],
|
|
117
210
|
isError: true,
|
|
118
211
|
};
|
|
119
212
|
}
|
|
120
|
-
}
|
|
121
|
-
else if (patch !== undefined) {
|
|
122
|
-
// Patch operation
|
|
123
213
|
newContent = applyPatch(oldContent, patch);
|
|
124
214
|
// Warn if patch had no matches
|
|
125
215
|
if (newContent === oldContent) {
|
|
@@ -131,7 +221,7 @@ export async function handleUpdateDoc(input, context) {
|
|
|
131
221
|
warning: 'Patch had no matches - file unchanged',
|
|
132
222
|
path: validated.relative,
|
|
133
223
|
search: patch.search,
|
|
134
|
-
}, null, 2),
|
|
224
|
+
}, null, prettyPrint ? 2 : undefined),
|
|
135
225
|
},
|
|
136
226
|
],
|
|
137
227
|
isError: true,
|
|
@@ -148,8 +238,21 @@ export async function handleUpdateDoc(input, context) {
|
|
|
148
238
|
const backupResult = await createBackup(validated.absolute, repoRoot);
|
|
149
239
|
backupPath = backupResult.backupPath;
|
|
150
240
|
}
|
|
151
|
-
// Write new content
|
|
152
|
-
|
|
241
|
+
// Write new content with error handling
|
|
242
|
+
try {
|
|
243
|
+
writeFileSync(validated.absolute, newContent, 'utf-8');
|
|
244
|
+
}
|
|
245
|
+
catch (error) {
|
|
246
|
+
if (error instanceof Error && 'code' in error) {
|
|
247
|
+
if (error.code === 'EACCES' || error.code === 'EPERM') {
|
|
248
|
+
throw permissionDenied(validated.relative, undefined, 'write');
|
|
249
|
+
}
|
|
250
|
+
if (error.code === 'ENOSPC') {
|
|
251
|
+
throw noSpaceError(validated.relative);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
throw error;
|
|
255
|
+
}
|
|
153
256
|
// Get file size
|
|
154
257
|
const stats = statSync(validated.absolute);
|
|
155
258
|
const size = stats.size;
|
|
@@ -168,7 +271,7 @@ export async function handleUpdateDoc(input, context) {
|
|
|
168
271
|
content: [
|
|
169
272
|
{
|
|
170
273
|
type: 'text',
|
|
171
|
-
text: JSON.stringify(output, null, 2),
|
|
274
|
+
text: JSON.stringify(output, null, prettyPrint ? 2 : undefined),
|
|
172
275
|
},
|
|
173
276
|
],
|
|
174
277
|
};
|
|
@@ -185,7 +288,7 @@ export async function handleUpdateDoc(input, context) {
|
|
|
185
288
|
type: 'text',
|
|
186
289
|
text: JSON.stringify({
|
|
187
290
|
error: error instanceof Error ? error.message : String(error),
|
|
188
|
-
}, null, 2),
|
|
291
|
+
}, null, prettyPrint ? 2 : undefined),
|
|
189
292
|
},
|
|
190
293
|
],
|
|
191
294
|
isError: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-doc.js","sourceRoot":"","sources":["../../src/tools/update-doc.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"update-doc.js","sourceRoot":"","sources":["../../src/tools/update-doc.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU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AAM,aAAa,CAAC,OAAO,CAAC,EAAE,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;QAEpD,MAAM,MAAM,GAAoB;YAC9B,IAAI,EAAE,SAAS,CAAC,QAAQ;YACxB,OAAO,EAAE,IAAI;YACb,IAAI;YACJ,MAAM,EAAE,UAAU;YAClB,OAAO;SACR,CAAC;QAEF,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;iBAChE;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,+BAA+B;QAC/B,IAAI,KAAK,YAAY,KAAK,IAAI,MAAM,IAAI,KAAK,EAAE,CAAC;YAC9C,MAAM,KAAK,CAAC;QACd,CAAC;QAED,oBAAoB;QACpB,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;wBACE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;qBAC9D,EACD,IAAI,EACJ,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAC5B;iBACF;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -101,7 +101,7 @@ function findPlanDocument(db, plansPath, planId) {
|
|
|
101
101
|
SELECT path
|
|
102
102
|
FROM documents
|
|
103
103
|
WHERE path LIKE ?
|
|
104
|
-
AND path LIKE '%/plan.md'
|
|
104
|
+
AND (path LIKE '%-plan.md' OR path LIKE '%/plan.md')
|
|
105
105
|
`)
|
|
106
106
|
.all(`${plansPath}%${planId}%`);
|
|
107
107
|
if (plans.length === 0) {
|
package/dist/utils/errors.d.ts
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
import type { JsonError } from '../cli/json-output.js';
|
|
6
6
|
/**
|
|
7
7
|
* Error codes for document operations.
|
|
8
|
+
* Includes filesystem error codes (ENOENT, EACCES, etc.) for better error handling.
|
|
8
9
|
*/
|
|
9
|
-
export type ErrorCode = 'NOT_FOUND' | 'ALREADY_EXISTS' | 'PERMISSION_DENIED' | 'VALIDATION_ERROR' | 'RESTRICTED_PATH' | 'INTERNAL_ERROR';
|
|
10
|
+
export type ErrorCode = 'NOT_FOUND' | 'ENOENT' | 'ALREADY_EXISTS' | 'EEXIST' | 'PERMISSION_DENIED' | 'EACCES' | 'VALIDATION_ERROR' | 'RESTRICTED_PATH' | 'INTERNAL_ERROR' | 'EISDIR' | 'ENOTDIR' | 'ENOSPC';
|
|
10
11
|
/**
|
|
11
12
|
* MCP-compatible error shape for JSON responses.
|
|
12
13
|
*/
|
|
@@ -34,12 +35,34 @@ export declare class DocumentError extends Error {
|
|
|
34
35
|
* Factory: File not found error.
|
|
35
36
|
*
|
|
36
37
|
* @param path - Path to the file that was not found
|
|
38
|
+
* @param suggestion - Optional custom suggestion
|
|
37
39
|
* @returns DocumentError with NOT_FOUND code
|
|
38
40
|
* @example
|
|
39
41
|
* throw notFound('research/missing.md');
|
|
40
42
|
* // DocumentError: File not found: research/missing.md
|
|
41
43
|
*/
|
|
42
|
-
export declare function notFound(path: string): DocumentError;
|
|
44
|
+
export declare function notFound(path: string, suggestion?: string): DocumentError;
|
|
45
|
+
/**
|
|
46
|
+
* Factory: Directory not found error.
|
|
47
|
+
*
|
|
48
|
+
* @param path - Path to the directory that was not found
|
|
49
|
+
* @returns DocumentError with ENOENT code
|
|
50
|
+
*/
|
|
51
|
+
export declare function directoryNotFound(path: string): DocumentError;
|
|
52
|
+
/**
|
|
53
|
+
* Factory: Cannot read directory as file error.
|
|
54
|
+
*
|
|
55
|
+
* @param path - Path that is a directory, not a file
|
|
56
|
+
* @returns DocumentError with EISDIR code
|
|
57
|
+
*/
|
|
58
|
+
export declare function isDirectoryError(path: string): DocumentError;
|
|
59
|
+
/**
|
|
60
|
+
* Factory: Not a directory error.
|
|
61
|
+
*
|
|
62
|
+
* @param path - Path that points to a file, not a directory
|
|
63
|
+
* @returns DocumentError with ENOTDIR code
|
|
64
|
+
*/
|
|
65
|
+
export declare function notDirectoryError(path: string): DocumentError;
|
|
43
66
|
/**
|
|
44
67
|
* Factory: File already exists error.
|
|
45
68
|
*
|
|
@@ -55,12 +78,13 @@ export declare function alreadyExists(path: string): DocumentError;
|
|
|
55
78
|
*
|
|
56
79
|
* @param path - Path to the file
|
|
57
80
|
* @param reason - Reason for the permission denial
|
|
58
|
-
* @
|
|
81
|
+
* @param operation - Operation that was denied (read, write, delete, etc.)
|
|
82
|
+
* @returns DocumentError with EACCES code
|
|
59
83
|
* @example
|
|
60
|
-
* throw permissionDenied('config.json', 'File is read-only');
|
|
61
|
-
* // DocumentError: Permission denied
|
|
84
|
+
* throw permissionDenied('config.json', 'File is read-only', 'write');
|
|
85
|
+
* // DocumentError: Permission denied: config.json. The file exists but cannot be written due to filesystem permissions.
|
|
62
86
|
*/
|
|
63
|
-
export declare function permissionDenied(path: string, reason
|
|
87
|
+
export declare function permissionDenied(path: string, reason?: string, operation?: string): DocumentError;
|
|
64
88
|
/**
|
|
65
89
|
* Factory: Restricted path error.
|
|
66
90
|
*
|
|
@@ -82,6 +106,13 @@ export declare function restrictedPath(path: string): DocumentError;
|
|
|
82
106
|
* // DocumentError: Validation failed for 'path': must be relative to repo root
|
|
83
107
|
*/
|
|
84
108
|
export declare function validationError(field: string, message: string): DocumentError;
|
|
109
|
+
/**
|
|
110
|
+
* Factory: No space left on device error.
|
|
111
|
+
*
|
|
112
|
+
* @param path - Path where write failed
|
|
113
|
+
* @returns DocumentError with ENOSPC code
|
|
114
|
+
*/
|
|
115
|
+
export declare function noSpaceError(path: string): DocumentError;
|
|
85
116
|
/**
|
|
86
117
|
* Error thrown when recursion depth limit is exceeded.
|
|
87
118
|
* Used by RLM sub-call processing.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD;;;GAGG;AACH,MAAM,MAAM,SAAS,GACjB,WAAW,GACX,QAAQ,GACR,gBAAgB,GAChB,QAAQ,GACR,mBAAmB,GACnB,QAAQ,GACR,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,GAChB,QAAQ,GACR,SAAS,GACT,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;gBAEjB,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;IAgBhF;;OAEG;IACH,MAAM,IAAI,QAAQ;CAgBnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,aAAa,CAOzE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AAC,WAAW,EAAE,MAAM,EAAE,CAAC;gBAEnB,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB;IAexD;;OAEG;IACH,MAAM,IAAI,SAAS;CAgBpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,UAAU,CAoBvF;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,UAAU,CAoBtF"}
|
package/dist/utils/errors.js
CHANGED
|
@@ -45,13 +45,41 @@ export class DocumentError extends Error {
|
|
|
45
45
|
* Factory: File not found error.
|
|
46
46
|
*
|
|
47
47
|
* @param path - Path to the file that was not found
|
|
48
|
+
* @param suggestion - Optional custom suggestion
|
|
48
49
|
* @returns DocumentError with NOT_FOUND code
|
|
49
50
|
* @example
|
|
50
51
|
* throw notFound('research/missing.md');
|
|
51
52
|
* // DocumentError: File not found: research/missing.md
|
|
52
53
|
*/
|
|
53
|
-
export function notFound(path) {
|
|
54
|
-
return new DocumentError('NOT_FOUND', `File not found: ${path}
|
|
54
|
+
export function notFound(path, suggestion) {
|
|
55
|
+
return new DocumentError('NOT_FOUND', `File not found: ${path}. Use list_directory to see available files, or check the path spelling.`, path, suggestion || 'Use create_doc to create a new file, or check that the path is correct.');
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Factory: Directory not found error.
|
|
59
|
+
*
|
|
60
|
+
* @param path - Path to the directory that was not found
|
|
61
|
+
* @returns DocumentError with ENOENT code
|
|
62
|
+
*/
|
|
63
|
+
export function directoryNotFound(path) {
|
|
64
|
+
return new DocumentError('ENOENT', `Directory not found: ${path}. Use list_directory with no path or '/' to see root folders.`, path, 'Check that the directory path is correct and exists.');
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Factory: Cannot read directory as file error.
|
|
68
|
+
*
|
|
69
|
+
* @param path - Path that is a directory, not a file
|
|
70
|
+
* @returns DocumentError with EISDIR code
|
|
71
|
+
*/
|
|
72
|
+
export function isDirectoryError(path) {
|
|
73
|
+
return new DocumentError('EISDIR', `Cannot read directory as file: ${path}. Use list_directory tool instead.`, path, 'Use list_directory to list files in a directory, or read_note to read a file.');
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Factory: Not a directory error.
|
|
77
|
+
*
|
|
78
|
+
* @param path - Path that points to a file, not a directory
|
|
79
|
+
* @returns DocumentError with ENOTDIR code
|
|
80
|
+
*/
|
|
81
|
+
export function notDirectoryError(path) {
|
|
82
|
+
return new DocumentError('ENOTDIR', `Not a directory: ${path}. This path points to a file, not a folder. Use read_note to read files.`, path, 'Use read_note to read files, or list_directory to list directory contents.');
|
|
55
83
|
}
|
|
56
84
|
/**
|
|
57
85
|
* Factory: File already exists error.
|
|
@@ -70,13 +98,17 @@ export function alreadyExists(path) {
|
|
|
70
98
|
*
|
|
71
99
|
* @param path - Path to the file
|
|
72
100
|
* @param reason - Reason for the permission denial
|
|
73
|
-
* @
|
|
101
|
+
* @param operation - Operation that was denied (read, write, delete, etc.)
|
|
102
|
+
* @returns DocumentError with EACCES code
|
|
74
103
|
* @example
|
|
75
|
-
* throw permissionDenied('config.json', 'File is read-only');
|
|
76
|
-
* // DocumentError: Permission denied
|
|
104
|
+
* throw permissionDenied('config.json', 'File is read-only', 'write');
|
|
105
|
+
* // DocumentError: Permission denied: config.json. The file exists but cannot be written due to filesystem permissions.
|
|
77
106
|
*/
|
|
78
|
-
export function permissionDenied(path, reason) {
|
|
79
|
-
|
|
107
|
+
export function permissionDenied(path, reason, operation) {
|
|
108
|
+
const operationText = operation ? ` (${operation})` : '';
|
|
109
|
+
const reasonText = reason ? `: ${reason}` : '';
|
|
110
|
+
const message = `Permission denied${operationText}: ${path}${reasonText}. The file exists but cannot be ${operation || 'accessed'} due to filesystem permissions.`;
|
|
111
|
+
return new DocumentError('EACCES', message, path, 'Check file permissions or ensure the file is not locked.');
|
|
80
112
|
}
|
|
81
113
|
/**
|
|
82
114
|
* Factory: Restricted path error.
|
|
@@ -101,7 +133,16 @@ export function restrictedPath(path) {
|
|
|
101
133
|
* // DocumentError: Validation failed for 'path': must be relative to repo root
|
|
102
134
|
*/
|
|
103
135
|
export function validationError(field, message) {
|
|
104
|
-
return new DocumentError('VALIDATION_ERROR', `Validation failed for '${field}': ${message}
|
|
136
|
+
return new DocumentError('VALIDATION_ERROR', `Validation failed for '${field}': ${message}`, undefined, 'Check the input format and try again.');
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Factory: No space left on device error.
|
|
140
|
+
*
|
|
141
|
+
* @param path - Path where write failed
|
|
142
|
+
* @returns DocumentError with ENOSPC code
|
|
143
|
+
*/
|
|
144
|
+
export function noSpaceError(path) {
|
|
145
|
+
return new DocumentError('ENOSPC', `No space left on device: ${path}`, path, 'Free up disk space and try again.');
|
|
105
146
|
}
|
|
106
147
|
/**
|
|
107
148
|
* Error thrown when recursion depth limit is exceeded.
|
package/dist/utils/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AA8B/C;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK;IAC7B,IAAI,CAAY;IAChB,IAAI,CAAU;IACd,UAAU,CAAU;IAE7B,YAAY,IAAe,EAAE,OAAe,EAAE,IAAa,EAAE,UAAmB;QAC9E,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5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,WAAW;KACZ,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frontmatter handling utilities with validation.
|
|
3
|
+
* Based on patterns from mcp-obsidian for safe YAML frontmatter parsing.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Parsed note with frontmatter and content separated.
|
|
7
|
+
*/
|
|
8
|
+
export interface ParsedNote {
|
|
9
|
+
frontmatter: Record<string, unknown>;
|
|
10
|
+
content: string;
|
|
11
|
+
originalContent: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Result of frontmatter validation.
|
|
15
|
+
*/
|
|
16
|
+
export interface FrontmatterValidationResult {
|
|
17
|
+
isValid: boolean;
|
|
18
|
+
errors: string[];
|
|
19
|
+
warnings: string[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Frontmatter handler with validation and safe parsing.
|
|
23
|
+
* Prevents functions, symbols, and other dangerous objects in frontmatter.
|
|
24
|
+
*/
|
|
25
|
+
export declare class FrontmatterHandler {
|
|
26
|
+
/**
|
|
27
|
+
* Parse frontmatter from content.
|
|
28
|
+
* Returns parsed frontmatter and content separated.
|
|
29
|
+
*
|
|
30
|
+
* @param content - Content with optional YAML frontmatter
|
|
31
|
+
* @returns Parsed note with frontmatter and content
|
|
32
|
+
*/
|
|
33
|
+
parse(content: string): ParsedNote;
|
|
34
|
+
/**
|
|
35
|
+
* Stringify frontmatter and content back to markdown.
|
|
36
|
+
*
|
|
37
|
+
* @param frontmatterData - Frontmatter object
|
|
38
|
+
* @param content - Content body
|
|
39
|
+
* @returns Complete markdown with frontmatter
|
|
40
|
+
*/
|
|
41
|
+
stringify(frontmatterData: Record<string, unknown>, content: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* Validate frontmatter for security and correctness.
|
|
44
|
+
* Prevents functions, symbols, and other dangerous objects.
|
|
45
|
+
*
|
|
46
|
+
* @param frontmatterData - Frontmatter object to validate
|
|
47
|
+
* @returns Validation result with errors and warnings
|
|
48
|
+
*/
|
|
49
|
+
validate(frontmatterData: Record<string, unknown>): FrontmatterValidationResult;
|
|
50
|
+
/**
|
|
51
|
+
* Recursively check for problematic values in frontmatter.
|
|
52
|
+
*
|
|
53
|
+
* @param obj - Object to check
|
|
54
|
+
* @param result - Validation result to update
|
|
55
|
+
* @param path - Current path in the object (for error messages)
|
|
56
|
+
*/
|
|
57
|
+
private checkForProblematicValues;
|
|
58
|
+
/**
|
|
59
|
+
* Extract only frontmatter from content without parsing body.
|
|
60
|
+
*
|
|
61
|
+
* @param content - Content with optional YAML frontmatter
|
|
62
|
+
* @returns Frontmatter object
|
|
63
|
+
*/
|
|
64
|
+
extractFrontmatter(content: string): Record<string, unknown>;
|
|
65
|
+
/**
|
|
66
|
+
* Update frontmatter in content, preserving body.
|
|
67
|
+
*
|
|
68
|
+
* @param content - Original content
|
|
69
|
+
* @param updates - Frontmatter updates to merge
|
|
70
|
+
* @returns Updated content with new frontmatter
|
|
71
|
+
*/
|
|
72
|
+
updateFrontmatter(content: string, updates: Record<string, unknown>): string;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=frontmatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../../src/utils/frontmatter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;GAGG;AACH,qBAAa,kBAAkB;IAC7B;;;;;;OAMG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU;IAkBlC;;;;;;OAMG;IACH,SAAS,CAAC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;IAe5E;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,2BAA2B;IAuB/E;;;;;;OAMG;IACH,OAAO,CAAC,yBAAyB;IAmDjC;;;;;OAKG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAK5D;;;;;;OAMG;IACH,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;CAW7E"}
|