@appsoftwareltd/etherpk-mcp 0.30.0 → 0.31.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/dist/main.js CHANGED
@@ -820,7 +820,7 @@ function looksLikeAgentSetupCode(value) {
820
820
  }
821
821
  var package_default = {
822
822
  name: "@appsoftwareltd/etherpk-mcp",
823
- version: "0.30.0",
823
+ version: "0.31.0",
824
824
  license: "Elastic-2.0",
825
825
  description: "EtherPK Headless Client: an MCP server over a synced knowledge graph, run beside the agent on the user's own machine.",
826
826
  type: "module",
@@ -4923,7 +4923,15 @@ function parseTaskTextFilter(typed) {
4923
4923
  * and the index is plaintext at rest, so the conservative reading is the only safe one.
4924
4924
  */
4925
4925
  function fencedLines(text) {
4926
- const lines = text.split("\n");
4926
+ return indexFencedLines(text.split("\n"));
4927
+ }
4928
+ /**
4929
+ * {@link fencedLines} over a document's lines: whether the index reads 0-based line `line` as fenced,
4930
+ * so that a `- [ ]` there is no task. The editor draws a task's checkbox from this same answer
4931
+ * (`task-checkbox.ts`), so a checkbox shows exactly where the [[Tasks View]] lists a task, at every
4932
+ * step of typing a fence, before its closer arrives too.
4933
+ */
4934
+ function indexFencedLines(lines) {
4927
4935
  const spans = fencedBlocks(lines).map((b) => [b.start, b.end]);
4928
4936
  const inside = (line) => spans.some(([from, to]) => line >= from && line <= to);
4929
4937
  for (let index = 0; index < lines.length; index++) {
@@ -5565,8 +5573,15 @@ function parseSearchQuery(input, knownKeys) {
5565
5573
  terms
5566
5574
  };
5567
5575
  }
5568
- /** The filter for a value as typed, or null when there is no value yet. */
5569
- function filterValue(key, raw, negated) {
5576
+ /**
5577
+ * The filter for a value as typed, or null when there is no value yet.
5578
+ *
5579
+ * The value is trimmed. A token only holds whitespace after a quote, and an unclosed one runs to
5580
+ * the end of the input (`status:done" ` while typing), so without this the value would carry the
5581
+ * input's trailing whitespace, and lose it when taking another filter out trimmed the input.
5582
+ */
5583
+ function filterValue(key, typed, negated) {
5584
+ const raw = typed.trim();
5570
5585
  if (raw === "*") return {
5571
5586
  key,
5572
5587
  value: null,
@@ -5585,7 +5600,7 @@ function filterValue(key, raw, negated) {
5585
5600
  }
5586
5601
  if (raw.length > 1 && raw.endsWith("*")) return {
5587
5602
  key,
5588
- value: raw.slice(0, -1),
5603
+ value: raw.slice(0, -1).trimEnd(),
5589
5604
  prefix: true,
5590
5605
  negated
5591
5606
  };
@@ -9759,7 +9774,7 @@ function keyRetryDelayMs(round, random = Math.random) {
9759
9774
  return Math.floor(ceiling / 2 + random() * (ceiling / 2));
9760
9775
  }
9761
9776
  // ../client/src/lib/document/quick-notes.ts
9762
- /** A hard ceiling, so a corrupt or hostile list cannot swamp the View or the root doc. */
9777
+ /** A hard ceiling, so a corrupt or hostile list cannot swamp the modal or the root doc. */
9763
9778
  var MAX_QUICK_NOTES = 1e4;
9764
9779
  /**
9765
9780
  * Keep only well-formed notes, deduped by id (first seen wins) - tolerant of a hand-edited