obsidian-mcp-server 3.7.2 → 3.8.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/AGENTS.md +10 -7
- package/CLAUDE.md +10 -7
- package/README.md +22 -14
- package/changelog/3.8.x/3.8.0.md +38 -0
- package/dist/config/server-config.d.ts +1 -0
- package/dist/config/server-config.d.ts.map +1 -1
- package/dist/config/server-config.js +24 -15
- package/dist/config/server-config.js.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.ts.map +1 -1
- package/dist/instructions.js +21 -7
- package/dist/instructions.js.map +1 -1
- package/dist/mcp-server/resources/definitions/index.d.ts +2 -2
- package/dist/mcp-server/resources/definitions/obsidian-tags.resource.d.ts +3 -2
- package/dist/mcp-server/resources/definitions/obsidian-tags.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/obsidian-tags.resource.js +6 -5
- package/dist/mcp-server/resources/definitions/obsidian-tags.resource.js.map +1 -1
- package/dist/mcp-server/resources/definitions/obsidian-vault-note.resource.d.ts +2 -2
- package/dist/mcp-server/resources/definitions/obsidian-vault-note.resource.js +2 -2
- package/dist/mcp-server/resources/definitions/obsidian-vault-note.resource.js.map +1 -1
- package/dist/mcp-server/tools/definitions/_shared/suggest-paths.d.ts +8 -1
- package/dist/mcp-server/tools/definitions/_shared/suggest-paths.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/_shared/suggest-paths.js +14 -5
- package/dist/mcp-server/tools/definitions/_shared/suggest-paths.js.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +18 -18
- package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.js +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-append-to-note.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.d.ts +7 -6
- package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.js +7 -7
- package/dist/mcp-server/tools/definitions/obsidian-delete-note.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.js +8 -5
- package/dist/mcp-server/tools/definitions/obsidian-get-note.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.d.ts +6 -6
- package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.js +8 -8
- package/dist/mcp-server/tools/definitions/obsidian-list-notes.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-list-tags.tool.d.ts +4 -4
- package/dist/mcp-server/tools/definitions/obsidian-list-tags.tool.js +6 -6
- package/dist/mcp-server/tools/definitions/obsidian-list-tags.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.js +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-manage-frontmatter.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.js +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-manage-tags.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-open-in-ui.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-open-in-ui.tool.js +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-open-in-ui.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.js +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-patch-note.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.js +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-replace-in-note.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.d.ts +46 -12
- package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.js +77 -22
- package/dist/mcp-server/tools/definitions/obsidian-search-notes.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.js +2 -2
- package/dist/mcp-server/tools/definitions/obsidian-write-note.tool.js.map +1 -1
- package/dist/services/obsidian/jsonlogic-evaluator.d.ts +33 -8
- package/dist/services/obsidian/jsonlogic-evaluator.d.ts.map +1 -1
- package/dist/services/obsidian/jsonlogic-evaluator.js +171 -32
- package/dist/services/obsidian/jsonlogic-evaluator.js.map +1 -1
- package/dist/services/obsidian/jsonlogic-worker.d.ts +6 -5
- package/dist/services/obsidian/jsonlogic-worker.d.ts.map +1 -1
- package/dist/services/obsidian/jsonlogic-worker.js +7 -5
- package/dist/services/obsidian/jsonlogic-worker.js.map +1 -1
- package/dist/services/obsidian/obsidian-service.d.ts +38 -22
- package/dist/services/obsidian/obsidian-service.d.ts.map +1 -1
- package/dist/services/obsidian/obsidian-service.js +293 -99
- package/dist/services/obsidian/obsidian-service.js.map +1 -1
- package/dist/services/obsidian/patch-instruction.d.ts +4 -1
- package/dist/services/obsidian/patch-instruction.d.ts.map +1 -1
- package/dist/services/obsidian/patch-instruction.js +5 -2
- package/dist/services/obsidian/patch-instruction.js.map +1 -1
- package/dist/services/obsidian/path-policy.d.ts +67 -23
- package/dist/services/obsidian/path-policy.d.ts.map +1 -1
- package/dist/services/obsidian/path-policy.js +183 -80
- package/dist/services/obsidian/path-policy.js.map +1 -1
- package/dist/services/obsidian/section-extractor.d.ts +6 -1
- package/dist/services/obsidian/section-extractor.d.ts.map +1 -1
- package/dist/services/obsidian/section-extractor.js +106 -11
- package/dist/services/obsidian/section-extractor.js.map +1 -1
- package/dist/services/obsidian/simple-search.d.ts +62 -0
- package/dist/services/obsidian/simple-search.d.ts.map +1 -0
- package/dist/services/obsidian/simple-search.js +264 -0
- package/dist/services/obsidian/simple-search.js.map +1 -0
- package/manifest.json +10 -2
- package/package.json +3 -3
- package/server.json +19 -7
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Server-side JSONLogic evaluation for searches scoped by
|
|
3
|
-
* OBSIDIAN_READ_PATHS. The caller's tree runs here, on
|
|
4
|
-
* the readable notes alone, instead of upstream over the
|
|
5
|
-
* result, or error reads a note outside the read scope.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
3
|
+
* OBSIDIAN_READ_PATHS or OBSIDIAN_DENY_PATHS. The caller's tree runs here, on
|
|
4
|
+
* a worker thread, over the readable notes alone, instead of upstream over the
|
|
5
|
+
* whole vault: no hit, result, or error reads a note outside the read scope.
|
|
6
|
+
* The notes carry no link fields: which note a link resolves to is Obsidian's
|
|
7
|
+
* vault-wide resolution, so `links`, `backlinks`, and `unresolvedLinks` would
|
|
8
|
+
* change with notes outside the scope (#165). A tree that names one fails with
|
|
9
|
+
* `link_fields_unavailable` before the search makes a request.
|
|
8
10
|
*
|
|
9
11
|
* Every evaluation is bounded — tree depth, work budgets the worker enforces
|
|
10
12
|
* (per note for what each note's evaluation builds, per search for what kept
|
|
@@ -74,6 +76,108 @@ export function assertTreeDepth(logic) {
|
|
|
74
76
|
throw tooCostly(`The JSONLogic tree nests deeper than ${MAX_TREE_DEPTH.toLocaleString('en-US')} levels.`);
|
|
75
77
|
}
|
|
76
78
|
}
|
|
79
|
+
/** The note fields a scoped search leaves out: each follows Obsidian's link resolution across the whole vault. */
|
|
80
|
+
const LINK_FIELDS = new Set(['links', 'backlinks', 'unresolvedLinks']);
|
|
81
|
+
/**
|
|
82
|
+
* json-logic-js operations that apply their second operand to each element of
|
|
83
|
+
* the first (`reduce`: to `{ current, accumulator }`) rather than to the note.
|
|
84
|
+
*/
|
|
85
|
+
const PER_ELEMENT_OPERATIONS = new Set([
|
|
86
|
+
'map',
|
|
87
|
+
'filter',
|
|
88
|
+
'reduce',
|
|
89
|
+
'all',
|
|
90
|
+
'some',
|
|
91
|
+
'none',
|
|
92
|
+
]);
|
|
93
|
+
/**
|
|
94
|
+
* Reject a tree that reads a link field of the note through `var`, `missing`,
|
|
95
|
+
* or `missing_some`. A scoped search's notes carry none, so such a read would
|
|
96
|
+
* see `null` on every note: `{"in": [X, {"var": "backlinks"}]}` would answer
|
|
97
|
+
* "nothing links here", and `{"missing": ["backlinks"]}` would report the
|
|
98
|
+
* field missing everywhere. Only a key fixed by the tree is caught —
|
|
99
|
+
* `"links"`, `"backlinks.0"`, the array form with a default — while a computed
|
|
100
|
+
* key reads `null`, and a `var` or `missing` applied to the elements a `map`,
|
|
101
|
+
* `filter`, `reduce`, `all`, `some`, or `none` walks reads the element, not
|
|
102
|
+
* the note. An object of other than one key is data json-logic-js never
|
|
103
|
+
* evaluates. Iterative; the tree's depth is already held to
|
|
104
|
+
* {@link MAX_TREE_DEPTH}.
|
|
105
|
+
*/
|
|
106
|
+
export function assertNoLinkFields(logic) {
|
|
107
|
+
const pending = [logic];
|
|
108
|
+
while (pending.length > 0) {
|
|
109
|
+
const node = pending.pop();
|
|
110
|
+
if (Array.isArray(node)) {
|
|
111
|
+
for (const item of node)
|
|
112
|
+
pending.push(item);
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (node === null || typeof node !== 'object' || Object.keys(node).length !== 1)
|
|
116
|
+
continue;
|
|
117
|
+
const [[operation, raw]] = Object.entries(node);
|
|
118
|
+
const operands = Array.isArray(raw) ? raw : [raw];
|
|
119
|
+
const keys = operation === 'var'
|
|
120
|
+
? [raw]
|
|
121
|
+
: operation === 'missing'
|
|
122
|
+
? missingKeys(raw)
|
|
123
|
+
: operation === 'missing_some'
|
|
124
|
+
? missingKeys(operands[1])
|
|
125
|
+
: [];
|
|
126
|
+
for (const key of keys) {
|
|
127
|
+
const field = varField(key);
|
|
128
|
+
if (field !== undefined && LINK_FIELDS.has(field))
|
|
129
|
+
throw linkFieldsUnavailable(field);
|
|
130
|
+
}
|
|
131
|
+
for (const [index, operand] of operands.entries()) {
|
|
132
|
+
if (index !== 1 || !PER_ELEMENT_OPERATIONS.has(operation))
|
|
133
|
+
pending.push(operand);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* The keys `missing` reads, each through `{"var": key}`, as json-logic-js
|
|
139
|
+
* picks them from its arguments: the first argument when it is an array,
|
|
140
|
+
* otherwise every argument. `missing_some` hands its second operand to
|
|
141
|
+
* `missing` the same way. None when a computed first argument leaves the
|
|
142
|
+
* choice to the note.
|
|
143
|
+
*/
|
|
144
|
+
function missingKeys(raw) {
|
|
145
|
+
const args = Array.isArray(raw) ? raw : [raw];
|
|
146
|
+
if (Array.isArray(args[0]))
|
|
147
|
+
return args[0];
|
|
148
|
+
return staticValue(args[0]) === COMPUTED ? [] : args;
|
|
149
|
+
}
|
|
150
|
+
/** The note field `{"var": raw}` reads when the tree fixes its key; `undefined` otherwise. */
|
|
151
|
+
function varField(raw) {
|
|
152
|
+
return staticKey(Array.isArray(raw) ? raw[0] : raw)?.split('.')[0];
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* The key a `var` operand evaluates to when the tree alone fixes it, as the
|
|
156
|
+
* worker's `var` reads it (`String(key)`); `undefined` when it is computed or
|
|
157
|
+
* names the whole note. json-logic-js evaluates an array element by element,
|
|
158
|
+
* so a literal array is fixed when every element is, and returns an object of
|
|
159
|
+
* other than one key as it is.
|
|
160
|
+
*/
|
|
161
|
+
function staticKey(operand) {
|
|
162
|
+
const value = staticValue(operand);
|
|
163
|
+
if (value === COMPUTED || value === undefined || value === null || value === '')
|
|
164
|
+
return;
|
|
165
|
+
return String(value);
|
|
166
|
+
}
|
|
167
|
+
const COMPUTED = Symbol('computed');
|
|
168
|
+
function staticValue(operand) {
|
|
169
|
+
if (Array.isArray(operand)) {
|
|
170
|
+
const values = operand.map(staticValue);
|
|
171
|
+
return values.includes(COMPUTED) ? COMPUTED : values;
|
|
172
|
+
}
|
|
173
|
+
if (operand !== null && typeof operand === 'object' && Object.keys(operand).length === 1) {
|
|
174
|
+
return COMPUTED;
|
|
175
|
+
}
|
|
176
|
+
return operand;
|
|
177
|
+
}
|
|
178
|
+
function linkFieldsUnavailable(field) {
|
|
179
|
+
return validationError(`The JSONLogic tree reads \`${field}\`, which a search under OBSIDIAN_READ_PATHS or OBSIDIAN_DENY_PATHS does not provide: \`links\`, \`backlinks\`, and \`unresolvedLinks\` follow Obsidian's link resolution across the whole vault.`, { reason: 'link_fields_unavailable' });
|
|
180
|
+
}
|
|
77
181
|
/**
|
|
78
182
|
* Deepest object/array nesting in `value`, which is level 1, measured until
|
|
79
183
|
* it passes `limit`. Iterative, so it measures data too deep for any
|
|
@@ -102,12 +206,59 @@ function nestingDepth(value, limit = Number.POSITIVE_INFINITY) {
|
|
|
102
206
|
* `logic_invalid` when the tree fails on a note, `logic_too_costly` past
|
|
103
207
|
* either budget or the deadline, `note_too_deep` for a note the worker
|
|
104
208
|
* hand-off cannot carry, and the abort reason when `signal` aborts first.
|
|
209
|
+
*
|
|
210
|
+
* One worker evaluates every batch: started with the first batch that holds a
|
|
211
|
+
* note, it is terminated when a batch fails, passes a bound, or is cancelled,
|
|
212
|
+
* and otherwise by `close`.
|
|
105
213
|
*/
|
|
106
214
|
export function createJsonLogicEvaluation(logic, opts = {}) {
|
|
107
215
|
const { signal, deadlineMs = EVALUATION_DEADLINE_MS } = opts;
|
|
108
216
|
let keptUnitsLeft = KEPT_RESULT_UNITS;
|
|
109
217
|
let msLeft = deadlineMs;
|
|
218
|
+
let worker;
|
|
219
|
+
/** The batch the worker is evaluating, settled by its reply, its failure, or its exit. */
|
|
220
|
+
let pending;
|
|
110
221
|
const pastDeadline = () => tooCostly(`Evaluating the JSONLogic tree over the readable notes ran past ${deadlineMs / 1000} s.`);
|
|
222
|
+
const start = () => {
|
|
223
|
+
const started = new Worker(WORKER_URL);
|
|
224
|
+
started.on('message', (response) => pending?.resolve(response));
|
|
225
|
+
started.on('error', (err) => pending?.reject(err));
|
|
226
|
+
started.on('exit', (code) => {
|
|
227
|
+
pending?.reject(new Error(`JSONLogic worker exited with code ${code} before answering`));
|
|
228
|
+
if (worker === started)
|
|
229
|
+
worker = undefined;
|
|
230
|
+
});
|
|
231
|
+
return started;
|
|
232
|
+
};
|
|
233
|
+
const close = async () => {
|
|
234
|
+
const running = worker;
|
|
235
|
+
worker = undefined;
|
|
236
|
+
await running?.terminate();
|
|
237
|
+
};
|
|
238
|
+
/** Hand `request` to the worker and wait for its reply, the deadline, or the abort. */
|
|
239
|
+
const answer = async (request) => {
|
|
240
|
+
worker ??= start();
|
|
241
|
+
const { promise, resolve, reject } = Promise.withResolvers();
|
|
242
|
+
pending = { resolve, reject };
|
|
243
|
+
const timer = setTimeout(() => reject(pastDeadline()), msLeft);
|
|
244
|
+
const onAbort = () => reject(signal?.reason);
|
|
245
|
+
signal?.addEventListener('abort', onAbort, { once: true });
|
|
246
|
+
try {
|
|
247
|
+
worker.postMessage(request);
|
|
248
|
+
}
|
|
249
|
+
catch (err) {
|
|
250
|
+
// Rejected before the await below takes the promise, so the exit `close` raises settles nothing.
|
|
251
|
+
reject(handOffError(err, request.notes));
|
|
252
|
+
}
|
|
253
|
+
try {
|
|
254
|
+
return await promise;
|
|
255
|
+
}
|
|
256
|
+
finally {
|
|
257
|
+
pending = undefined;
|
|
258
|
+
clearTimeout(timer);
|
|
259
|
+
signal?.removeEventListener('abort', onAbort);
|
|
260
|
+
}
|
|
261
|
+
};
|
|
111
262
|
return {
|
|
112
263
|
async evaluate(notes) {
|
|
113
264
|
if (notes.length === 0)
|
|
@@ -116,7 +267,19 @@ export function createJsonLogicEvaluation(logic, opts = {}) {
|
|
|
116
267
|
if (msLeft <= 0)
|
|
117
268
|
throw pastDeadline();
|
|
118
269
|
const started = performance.now();
|
|
119
|
-
|
|
270
|
+
let response;
|
|
271
|
+
try {
|
|
272
|
+
response = await answer({
|
|
273
|
+
logic,
|
|
274
|
+
notes,
|
|
275
|
+
keptUnits: keptUnitsLeft,
|
|
276
|
+
noteUnits: NOTE_BUILD_UNITS,
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
catch (err) {
|
|
280
|
+
await close();
|
|
281
|
+
throw err;
|
|
282
|
+
}
|
|
120
283
|
msLeft -= performance.now() - started;
|
|
121
284
|
if (response.ok) {
|
|
122
285
|
keptUnitsLeft = response.keptUnitsLeft;
|
|
@@ -125,8 +288,10 @@ export function createJsonLogicEvaluation(logic, opts = {}) {
|
|
|
125
288
|
result: JSON.parse(hit.json),
|
|
126
289
|
}));
|
|
127
290
|
}
|
|
291
|
+
await close();
|
|
128
292
|
throw failureError(response);
|
|
129
293
|
},
|
|
294
|
+
close,
|
|
130
295
|
};
|
|
131
296
|
}
|
|
132
297
|
function failureError(response) {
|
|
@@ -142,32 +307,6 @@ function failureError(response) {
|
|
|
142
307
|
return tooCostly(`The JSONLogic tree's results over the readable notes held more than the search's work budget of ${KEPT_RESULT_UNITS.toLocaleString('en-US')} units: each result over 1,024 characters pays for what it holds beyond its own note's size.`);
|
|
143
308
|
}
|
|
144
309
|
}
|
|
145
|
-
/** One worker per batch, terminated however it ends. */
|
|
146
|
-
async function runWorker(request, deadlineMs, pastDeadline, signal) {
|
|
147
|
-
const worker = new Worker(WORKER_URL);
|
|
148
|
-
const { promise, resolve, reject } = Promise.withResolvers();
|
|
149
|
-
const timer = setTimeout(() => reject(pastDeadline()), deadlineMs);
|
|
150
|
-
const onAbort = () => reject(signal?.reason);
|
|
151
|
-
signal?.addEventListener('abort', onAbort, { once: true });
|
|
152
|
-
worker.once('message', resolve);
|
|
153
|
-
worker.once('error', reject);
|
|
154
|
-
worker.once('exit', (code) => reject(new Error(`JSONLogic worker exited with code ${code} before answering`)));
|
|
155
|
-
try {
|
|
156
|
-
worker.postMessage(request);
|
|
157
|
-
}
|
|
158
|
-
catch (err) {
|
|
159
|
-
// Rejected before the await below takes the promise, so the exit `terminate` raises settles nothing.
|
|
160
|
-
reject(handOffError(err, request.notes));
|
|
161
|
-
}
|
|
162
|
-
try {
|
|
163
|
-
return await promise;
|
|
164
|
-
}
|
|
165
|
-
finally {
|
|
166
|
-
clearTimeout(timer);
|
|
167
|
-
signal?.removeEventListener('abort', onAbort);
|
|
168
|
-
await worker.terminate();
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
310
|
/**
|
|
172
311
|
* Why `postMessage` refused a batch. Structured clone recurses, so data
|
|
173
312
|
* nested deep enough overflows the stack: about 3,500 levels under Node,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonlogic-evaluator.js","sourceRoot":"","sources":["../../../src/services/obsidian/jsonlogic-evaluator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"jsonlogic-evaluator.js","sourceRoot":"","sources":["../../../src/services/obsidian/jsonlogic-evaluator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAIpF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,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kB;YACrB,OAAO,SAAS,CACd,mGAAmG,iBAAiB,CAAC,cAAc,CAAC,OAAO,CAAC,8FAA8F,CAC3O,CAAC;IACN,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAS,YAAY,CAAC,GAAY,EAAE,KAA6B;IAC/D,IAAI,CAAC,CAAC,GAAG,YAAY,UAAU,CAAC;QAAE,OAAO,GAAG,CAAC;IAC7C,IAAI,OAAO,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IACtC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM;YAAE,OAAO,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IACrE,CAAC;IACD,OAAO,kBAAkB,CACvB,sBAAsB,OAAO,CAAC,IAAI,uBAAuB,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,iEAAiE,EAChK,EAAE,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAC/C,EAAE,KAAK,EAAE,GAAG,EAAE,CACf,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,OAAe;IAChC,OAAO,eAAe,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Worker-thread entry that evaluates a caller's JSONLogic tree
|
|
3
|
-
* against note contexts, for searches scoped by OBSIDIAN_READ_PATHS
|
|
4
|
-
* operator set the Local REST API plugin runs
|
|
5
|
-
* `glob` and `regexp`), with the plugin's hit
|
|
6
|
-
* a scoped search answers as the plugin would
|
|
3
|
+
* against note contexts, for searches scoped by OBSIDIAN_READ_PATHS or
|
|
4
|
+
* OBSIDIAN_DENY_PATHS. Runs the operator set the Local REST API plugin runs
|
|
5
|
+
* (json-logic-js 2.0.5 plus its `glob` and `regexp`), with the plugin's hit
|
|
6
|
+
* test and JSON-shaped results, so a scoped search answers as the plugin would
|
|
7
|
+
* over the same notes.
|
|
7
8
|
*
|
|
8
9
|
* Off the main thread so a slow tree cannot hold the event loop: the evaluator
|
|
9
10
|
* terminates this worker at its deadline, which also stops a native regex
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
*
|
|
19
20
|
* @module services/obsidian/jsonlogic-worker
|
|
20
21
|
*/
|
|
21
|
-
/** A note as the plugin's JSONLogic search evaluates it, link fields
|
|
22
|
+
/** A note as the plugin's JSONLogic search evaluates it, less the link fields a scoped search leaves out. */
|
|
22
23
|
export interface NoteContext {
|
|
23
24
|
path: string;
|
|
24
25
|
[field: string]: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonlogic-worker.d.ts","sourceRoot":"","sources":["../../../src/services/obsidian/jsonlogic-worker.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"jsonlogic-worker.d.ts","sourceRoot":"","sources":["../../../src/services/obsidian/jsonlogic-worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,6GAA6G;AAC7G,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,kGAAkG;IAClG,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,kGAAkG;IAClG,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GACpF;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,SAAS,GAAG,gBAAgB,GAAG,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzF,KAAK,aAAa,GAAG,kBAAkB,GAAG,kBAAkB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Worker-thread entry that evaluates a caller's JSONLogic tree
|
|
3
|
-
* against note contexts, for searches scoped by OBSIDIAN_READ_PATHS
|
|
4
|
-
* operator set the Local REST API plugin runs
|
|
5
|
-
* `glob` and `regexp`), with the plugin's hit
|
|
6
|
-
* a scoped search answers as the plugin would
|
|
3
|
+
* against note contexts, for searches scoped by OBSIDIAN_READ_PATHS or
|
|
4
|
+
* OBSIDIAN_DENY_PATHS. Runs the operator set the Local REST API plugin runs
|
|
5
|
+
* (json-logic-js 2.0.5 plus its `glob` and `regexp`), with the plugin's hit
|
|
6
|
+
* test and JSON-shaped results, so a scoped search answers as the plugin would
|
|
7
|
+
* over the same notes.
|
|
7
8
|
*
|
|
8
9
|
* Off the main thread so a slow tree cannot hold the event loop: the evaluator
|
|
9
10
|
* terminates this worker at its deadline, which also stops a native regex
|
|
@@ -231,7 +232,8 @@ function evaluate(request) {
|
|
|
231
232
|
}
|
|
232
233
|
return { ok: true, hits, keptUnitsLeft };
|
|
233
234
|
}
|
|
234
|
-
|
|
235
|
+
/** One reply per request: a search's batches arrive one at a time, each answered before the next is sent. */
|
|
236
|
+
parentPort?.on('message', (request) => {
|
|
235
237
|
parentPort?.postMessage(evaluate(request));
|
|
236
238
|
});
|
|
237
239
|
//# sourceMappingURL=jsonlogic-worker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonlogic-worker.js","sourceRoot":"","sources":["../../../src/services/obsidian/jsonlogic-worker.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"jsonlogic-worker.js","sourceRoot":"","sources":["../../../src/services/obsidian/jsonlogic-worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,SAAS,MAAM,eAAe,CAAC;AA4BtC,2FAA2F;AAC3F,MAAM,eAAgB,SAAQ,KAAK;IACxB,OAAO,CAAgB;IAChC,YAAY,OAAsB;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AAED,iFAAiF;AACjF,IAAI,aAAa,GAAG,CAAC,CAAC;AACtB,kEAAkE;AAClE,IAAI,aAAa,GAAG,CAAC,CAAC;AAEtB;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAS,MAAM,CAAC,KAAa;IAC3B,aAAa,IAAI,KAAK,CAAC;IACvB,IAAI,aAAa,GAAG,CAAC;QAAE,MAAM,IAAI,eAAe,CAAC,kBAAkB,CAAC,CAAC;AACvE,CAAC;AAED,oGAAoG;AACpG,SAAS,UAAU,CAAC,KAAa;IAC/B,aAAa,IAAI,KAAK,CAAC;IACvB,IAAI,aAAa,GAAG,CAAC;QAAE,MAAM,IAAI,eAAe,CAAC,kBAAkB,CAAC,CAAC;AACvE,CAAC;AAED,uEAAuE;AACvE,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAE/B;;;;;;;;;GASG;AACH,SAAS,MAAM,CAAC,KAAc,EAAE,KAAa;IAC3C,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,MAAM,OAAO,GAAc,CAAC,KAAK,CAAC,CAAC;IACnC,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,IAAI,KAAK,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43
43
|
* Close the undici dispatcher, releasing its keep-alive sockets to the Local
|
|
44
|
-
* REST API and Omnisearch
|
|
45
|
-
* in-flight requests to
|
|
44
|
+
* REST API and Omnisearch, after rejecting the note-body reads still queued.
|
|
45
|
+
* Wired through `createApp({ teardown })`; waits for in-flight requests to
|
|
46
|
+
* settle rather than aborting them.
|
|
46
47
|
*
|
|
47
48
|
* Bun resolves `undici` to a built-in shim whose `Agent` is an inert object
|
|
48
49
|
* with no `close` — Bun's `fetch` pools sockets itself and ignores the
|
|
@@ -125,9 +126,10 @@ export declare class ObsidianService {
|
|
|
125
126
|
/**
|
|
126
127
|
* Vault tags with usage counts, hierarchical parents included. Unscoped, the
|
|
127
128
|
* plugin's `/tags/` with its occurrence counts. That payload carries no
|
|
128
|
-
* per-note attribution, so under OBSIDIAN_READ_PATHS
|
|
129
|
-
* the readable notes' contexts instead (one upstream
|
|
130
|
-
* each one counts the readable notes carrying it or a
|
|
129
|
+
* per-note attribution, so under OBSIDIAN_READ_PATHS or OBSIDIAN_DENY_PATHS
|
|
130
|
+
* the tags are read from the readable notes' contexts instead (one upstream
|
|
131
|
+
* search, no bodies), and each one counts the readable notes carrying it or a
|
|
132
|
+
* tag nested under it.
|
|
131
133
|
*/
|
|
132
134
|
listTags(ctx: Context): Promise<ObsidianTag[]>;
|
|
133
135
|
listCommands(ctx: Context): Promise<ObsidianCommand[]>;
|
|
@@ -136,33 +138,40 @@ export declare class ObsidianService {
|
|
|
136
138
|
* (`contextRelativeSpan`), then a multi-token query's spans are merged into
|
|
137
139
|
* match locations (`mergeIntoLocations`).
|
|
138
140
|
*
|
|
139
|
-
* The upstream
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
141
|
+
* The upstream serializes every match in the vault, its context window and
|
|
142
|
+
* about 150 characters of offsets and framing, into one response, so a
|
|
143
|
+
* broad query exhausts V8's string capacity, even at a small
|
|
144
|
+
* `contextLength`, and comes back as an opaque 500 — caught
|
|
145
|
+
* here and re-thrown typed, the way `searchOmnisearch` re-throws its own
|
|
146
|
+
* reachability failure. Under OBSIDIAN_READ_PATHS or OBSIDIAN_DENY_PATHS
|
|
147
|
+
* that would make the outcome depend on notes outside the scope, so the
|
|
148
|
+
* search runs here instead (`#searchTextScoped`).
|
|
144
149
|
*/
|
|
145
150
|
searchText(ctx: Context, query: string, contextLength?: number): Promise<TextSearchHit[]>;
|
|
146
151
|
/**
|
|
147
152
|
* JSONLogic search. Unscoped, the tree goes to the plugin unchanged. Under
|
|
148
|
-
* OBSIDIAN_READ_PATHS
|
|
149
|
-
*
|
|
153
|
+
* OBSIDIAN_READ_PATHS or OBSIDIAN_DENY_PATHS (`restrictsReads`) the plugin
|
|
154
|
+
* would evaluate it against every note in the vault, denied ones included,
|
|
155
|
+
* so the tree stays here instead: the readable notes' contexts
|
|
150
156
|
* are fetched and the tree is evaluated over those alone
|
|
151
157
|
* (`createJsonLogicEvaluation`), the way the plugin evaluates it. No hit,
|
|
152
|
-
* result, or error then reads a note outside the read scope
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
158
|
+
* result, or error then reads a note outside the read scope. The contexts
|
|
159
|
+
* carry no `links`, `backlinks`, or `unresolvedLinks`, since which note a
|
|
160
|
+
* link resolves to depends on notes outside the scope; a tree that names
|
|
161
|
+
* one fails before any request (`assertNoLinkFields`).
|
|
156
162
|
*
|
|
157
163
|
* The plugin hands a tree note bodies only when its JSON holds the string
|
|
158
|
-
* `"content"` (`readsContent`); such a tree gets them here too,
|
|
159
|
-
*
|
|
160
|
-
* scope never holds every readable body at once.
|
|
164
|
+
* `"content"` (`readsContent`); such a tree gets them here too, one read
|
|
165
|
+
* per readable note, evaluated in batches of at most `CONTENT_BATCH_BYTES`
|
|
166
|
+
* so a broad scope never holds every readable body at once. Every request
|
|
167
|
+
* the search makes shares `ctx.signal` and one deadline,
|
|
168
|
+
* `SCOPED_SEARCH_DEADLINE_MS`; past it the search fails with
|
|
169
|
+
* `logic_too_costly`.
|
|
161
170
|
*/
|
|
162
171
|
searchJsonLogic(ctx: Context, logic: Record<string, unknown>): Promise<StructuredSearchHit[]>;
|
|
163
172
|
/**
|
|
164
173
|
* A JSONLogic search for a caller paging through its hits `pageSize` at a
|
|
165
|
-
* time. Unscoped, it is `searchJsonLogic`. Under
|
|
174
|
+
* time. Unscoped, it is `searchJsonLogic`. Under a read scope a call
|
|
166
175
|
* without `walk` evaluates fresh and, when the hits run past one page,
|
|
167
176
|
* stores the full ordered hit list under a new walk id, returned as `walk`;
|
|
168
177
|
* a call naming that id with the same tree is served from the stored list
|
|
@@ -211,14 +220,21 @@ export declare class ObsidianService {
|
|
|
211
220
|
createIfMissing?: boolean;
|
|
212
221
|
}): Promise<void>;
|
|
213
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* `path` less its leading and trailing `/` runs, as `/^\/+|\/+$/g` leaves it,
|
|
225
|
+
* found by scanning in from each end: the regex retries at every `/` of a run
|
|
226
|
+
* inside the path, in time quadratic in the run.
|
|
227
|
+
*/
|
|
228
|
+
export declare function trimSlashes(path: string): string;
|
|
214
229
|
/**
|
|
215
230
|
* Encode a vault-relative path for the URL. Splits on `/` and `\` (so
|
|
216
231
|
* Windows-style separators are honored), URL-encodes each segment, and
|
|
217
232
|
* rejoins with `/` since the Local REST API plugin expects forward slashes.
|
|
218
233
|
*
|
|
219
234
|
* Rejects `.` and `..` segments here rather than relying on the upstream Local
|
|
220
|
-
* REST API plugin to normalize them — `
|
|
221
|
-
*
|
|
235
|
+
* REST API plugin to normalize them — with `OBSIDIAN_READ_PATHS` unset,
|
|
236
|
+
* `PathPolicy` allows every path no deny prefix covers, and `..` is
|
|
237
|
+
* unreserved per RFC 3986 so
|
|
222
238
|
* `encodeURIComponent` leaves it intact. This is the single chokepoint before
|
|
223
239
|
* URL construction, so guard vault escape here. Backslash is treated as a
|
|
224
240
|
* separator so `..\..\etc` traverses identically to `../../etc` and can't
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"obsidian-service.d.ts","sourceRoot":"","sources":["../../../src/services/obsidian/obsidian-service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAatD,OAAO,EAAS,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACxF,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"obsidian-service.d.ts","sourceRoot":"","sources":["../../../src/services/obsidian/obsidian-service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAatD,OAAO,EAAS,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACxF,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAwB/E,OAAO,EAAqB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAejE,OAAO,KAAK,EAEV,WAAW,EACX,WAAW,EACX,QAAQ,EACR,UAAU,EACV,eAAe,EACf,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,aAAa,EACb,WAAW,EACZ,MAAM,YAAY,CAAC;AAEpB,KAAK,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC;AAE9D;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,WAAW,GAAG;IAClB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,GAAG,CAAC,EAAE;QAAE,kBAAkB,EAAE,OAAO,CAAA;KAAE,CAAC;CACvC,KACE,OAAO,CAAC,cAAc,CAAC,CAA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