@hraness/wordcell 0.22.0 → 0.22.2

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 (46) hide show
  1. package/README.md +40 -17
  2. package/dist/authoring.js +5 -3
  3. package/dist/{authority-1pgftmwq.js → authority-06eqhqam.js} +2 -2
  4. package/dist/benchmark.js +3 -3
  5. package/dist/cli.js +15 -15
  6. package/dist/evaluation-builder.js +10 -10
  7. package/dist/evaluation-kb.js +10 -10
  8. package/dist/graph-authority.js +4 -4
  9. package/dist/graph-percolation.js +6 -6
  10. package/dist/graph.js +1 -1
  11. package/dist/{index-e6p9e926.js → index-1k595z6v.js} +2 -2
  12. package/dist/{index-1tm7bgx7.js → index-233z9wmn.js} +1 -1
  13. package/dist/{index-a6kbv718.js → index-76dbn6pe.js} +1 -1
  14. package/dist/{index-avbce90h.js → index-bqtqeak3.js} +4 -4
  15. package/dist/{index-4ag64rc1.js → index-bw2r37z9.js} +74 -19
  16. package/dist/{index-t2bs9xdr.js → index-djrcc1yf.js} +4 -4
  17. package/dist/{index-6sw24nvv.js → index-ecqpgr5y.js} +53 -2
  18. package/dist/{index-0dqfnrz9.js → index-hmw17zaa.js} +2 -2
  19. package/dist/{index-nd6nynv2.js → index-jk1sgx36.js} +1 -1
  20. package/dist/{index-qwgsmtsz.js → index-n386evxj.js} +1 -1
  21. package/dist/{index-2hf27mws.js → index-q7tbg07z.js} +7 -7
  22. package/dist/{index-ekpwvbra.js → index-qbssx940.js} +1 -2
  23. package/dist/{index-hcw140eb.js → index-rr9kzq4n.js} +2 -2
  24. package/dist/{index-11621h23.js → index-tf4wzjew.js} +1 -1
  25. package/dist/{index-gm9t95d9.js → index-vnybgywh.js} +1 -1
  26. package/dist/{index-famy7fhs.js → index-xv80vzfp.js} +4 -4
  27. package/dist/index.js +16 -14
  28. package/dist/percolate.js +2 -2
  29. package/dist/portfolio.js +10 -10
  30. package/dist/publish.js +3 -3
  31. package/dist/sdk.js +9 -9
  32. package/dist/search.js +2 -2
  33. package/dist/semantic.js +4 -4
  34. package/dist/{support-mywv1em0.js → support-p452p9c4.js} +15 -15
  35. package/dist/workflows/decision-context.js +10 -10
  36. package/dist/workflows/index.js +10 -10
  37. package/package.json +7 -6
  38. package/skills/wordcell/SKILL.md +2 -2
  39. package/skills/wordcell/references/publish.md +34 -0
  40. package/skills/wordcell/references/refresh.md +14 -0
  41. package/src/authoring-model.ts +29 -0
  42. package/src/authoring-program.ts +38 -3
  43. package/src/authoring.ts +17 -3
  44. package/src/cli-program.ts +95 -4
  45. package/src/graph.ts +1 -1
  46. package/src/support-profile.ts +1 -1
@@ -12,7 +12,7 @@ import {
12
12
  loadPortfolioRegistry,
13
13
  openKnowledgePortfolio,
14
14
  snapshotPortfolioRegistry
15
- } from "./index-avbce90h.js";
15
+ } from "./index-bqtqeak3.js";
16
16
  import {
17
17
  diffCaptureBundle
18
18
  } from "./index-j4zgmzjr.js";
@@ -39,7 +39,7 @@ import {
39
39
  import {
40
40
  knowledgeBaseEvaluationRetrieverIds,
41
41
  openKnowledgeBaseEvaluation
42
- } from "./index-e6p9e926.js";
42
+ } from "./index-1k595z6v.js";
43
43
  import {
44
44
  DEFAULT_SEARCH_RESULTS,
45
45
  MAX_SEARCH_CANDIDATES,
@@ -48,7 +48,7 @@ import {
48
48
  MAX_SEARCH_RESULTS,
49
49
  openKnowledgeBase,
50
50
  searchEvidenceRank
51
- } from "./index-2hf27mws.js";
51
+ } from "./index-q7tbg07z.js";
52
52
  import {
53
53
  MAX_SEARCH_RULE_CONFIG_BYTES,
54
54
  parseSearchRules
@@ -59,7 +59,7 @@ import {
59
59
  recommendedEmbeddingModel,
60
60
  recommendedEmbeddingModelSha256,
61
61
  sha256EmbeddingModelFile
62
- } from "./index-hcw140eb.js";
62
+ } from "./index-rr9kzq4n.js";
63
63
  import {
64
64
  MAX_RERANK_CANDIDATES
65
65
  } from "./index-j70m75wd.js";
@@ -72,25 +72,25 @@ import {
72
72
  } from "./index-b88v3vtm.js";
73
73
  import {
74
74
  percolateWithGraph
75
- } from "./index-t2bs9xdr.js";
75
+ } from "./index-djrcc1yf.js";
76
76
  import {
77
77
  MAX_PERCOLATION_MENTIONS,
78
78
  MAX_PERCOLATION_MENTION_PAIRS,
79
79
  MAX_PERCOLATION_NOTES,
80
80
  MAX_SCOPED_PERCOLATION_MENTION_PAIRS,
81
81
  percolateVault
82
- } from "./index-nd6nynv2.js";
82
+ } from "./index-jk1sgx36.js";
83
83
  import {
84
84
  queryGraph,
85
85
  rebuildGraph,
86
86
  verifyGraph
87
- } from "./index-famy7fhs.js";
87
+ } from "./index-xv80vzfp.js";
88
88
  import {
89
89
  validateGraphQueryRequest
90
- } from "./index-11621h23.js";
90
+ } from "./index-tf4wzjew.js";
91
91
  import {
92
92
  validateSearchQuery
93
- } from "./index-gm9t95d9.js";
93
+ } from "./index-vnybgywh.js";
94
94
  import {
95
95
  sanitizeTerminalLine,
96
96
  sanitizeTerminalText
@@ -100,11 +100,11 @@ import {
100
100
  MAX_PUBLISH_LIST_LIMIT,
101
101
  publishVault,
102
102
  renderPublishReportText
103
- } from "./index-0dqfnrz9.js";
103
+ } from "./index-hmw17zaa.js";
104
104
  import {
105
105
  refreshVault,
106
106
  scanVault
107
- } from "./index-1tm7bgx7.js";
107
+ } from "./index-233z9wmn.js";
108
108
  import {
109
109
  navigateLinks
110
110
  } from "./index-d13v9ckt.js";
@@ -115,7 +115,9 @@ import {
115
115
  validateQueryOptions
116
116
  } from "./index-48pz4jpc.js";
117
117
  import {
118
+ MAX_REPOSITORY_MEMORY_DETAIL_LIMIT,
118
119
  MAX_REPOSITORY_SCOPES,
120
+ auditRepositoryMemoryScopes,
119
121
  buildRepositoryMemoryContext,
120
122
  repositoryMemoryGroupKeys
121
123
  } from "./index-06c9ctr6.js";
@@ -141,12 +143,12 @@ import {
141
143
  addNoteRelation,
142
144
  createNote,
143
145
  removeNoteRelation
144
- } from "./index-6sw24nvv.js";
146
+ } from "./index-ecqpgr5y.js";
145
147
  import {
146
148
  lookupNote,
147
149
  parseVaultKey,
148
150
  renderCatalog
149
- } from "./index-ekpwvbra.js";
151
+ } from "./index-qbssx940.js";
150
152
 
151
153
  // src/clip/url-metadata-cli.ts
152
154
  import { resolve as resolve2 } from "path";
@@ -1140,7 +1142,7 @@ async function loadSearchRulesFile(path) {
1140
1142
  }
1141
1143
  return parseSearchRules(input);
1142
1144
  }
1143
- var usage = `wordcell \u2014 a local knowledge base for coding agents
1145
+ var usage = `wordcell \u2014 a local Markdown knowledge base with superpowers
1144
1146
 
1145
1147
  Start here (no account or model needed):
1146
1148
  wordcell init kb
@@ -1162,7 +1164,7 @@ Usage:
1162
1164
  wordcell inspect <url> [capture options]
1163
1165
  wordcell pdf <file-or-url> [PDF options]
1164
1166
  wordcell refresh [--root <directory>] [--index <path>] [--json]
1165
- wordcell check [--root <directory>] [--index <path>] [--no-catalog] [--json]
1167
+ wordcell check [--root <directory>] [--index <path>] [--no-catalog] [--repo <repository>] [--json]
1166
1168
  wordcell catalog [--root <directory>] [--index <path>] [--json]
1167
1169
  wordcell graph [--root <directory>] [--index <path>] [--json]
1168
1170
  wordcell graph rebuild [--fresh] [--root <directory>] [--index <path>] [--json]
@@ -1292,6 +1294,7 @@ function parseVaultCommand(command, arguments_) {
1292
1294
  let depth = 1;
1293
1295
  let limit;
1294
1296
  let noCatalog = false;
1297
+ let repository;
1295
1298
  const positional = [];
1296
1299
  for (let cursor = 0;cursor < arguments_.length; cursor += 1) {
1297
1300
  const argument = arguments_[cursor];
@@ -1305,6 +1308,14 @@ function parseVaultCommand(command, arguments_) {
1305
1308
  noCatalog = true;
1306
1309
  continue;
1307
1310
  }
1311
+ if (argument === "--repo" && command === "check") {
1312
+ const value = readValue(arguments_, cursor);
1313
+ if (value === null)
1314
+ return { ok: false, message: "--repo requires a value" };
1315
+ repository = value;
1316
+ cursor += 1;
1317
+ continue;
1318
+ }
1308
1319
  if (argument === "--root" || argument === "--index") {
1309
1320
  const value = readValue(arguments_, cursor);
1310
1321
  if (value === null)
@@ -1371,7 +1382,8 @@ function parseVaultCommand(command, arguments_) {
1371
1382
  root,
1372
1383
  options: index === undefined ? {} : { index },
1373
1384
  json,
1374
- ...command === "check" && noCatalog ? { noCatalog: true } : {}
1385
+ ...command === "check" && noCatalog ? { noCatalog: true } : {},
1386
+ ...command === "check" && repository !== undefined ? { repository } : {}
1375
1387
  }
1376
1388
  };
1377
1389
  }
@@ -3206,7 +3218,8 @@ function summary(snapshot, options = {}) {
3206
3218
  truncated: options.attachments.truncated,
3207
3219
  issues: options.attachments.issues
3208
3220
  }
3209
- }
3221
+ },
3222
+ ...options.repositoryScopes === undefined ? {} : { repositoryScopes: options.repositoryScopes }
3210
3223
  };
3211
3224
  }
3212
3225
  function renderIssue(issue) {
@@ -3239,6 +3252,38 @@ function renderAdvisories(analysis) {
3239
3252
  }
3240
3253
  return lines;
3241
3254
  }
3255
+ function renderRepositoryScopeAuditError(error) {
3256
+ if (error.kind === "invalid-record") {
3257
+ return `${safe(error.path)}: ${error.issues.map(safe).join(" ")}`;
3258
+ }
3259
+ const declared = error.recordPaths.map(safe).join(", ") + (error.recordPathsTruncated ? ", \u2026" : "");
3260
+ return `${safe(error.scope)}: ${safe(error.state.reason)} at ${safe(error.state.path)}` + ` (declared by ${declared})`;
3261
+ }
3262
+ function renderRepositoryScopeAudit(audit) {
3263
+ const { counts } = audit;
3264
+ const lines = [
3265
+ `Repository scopes: ${counts.authoredRecords} declaring note${counts.authoredRecords === 1 ? "" : "s"}; ` + `${counts.distinctScopes} distinct scope${counts.distinctScopes === 1 ? "" : "s"} ` + `(${counts.presentScopes} present, ${counts.absentScopes} absent, ${counts.invalidScopes} unusable).`
3266
+ ];
3267
+ if (audit.advisories.total > 0) {
3268
+ lines.push(audit.advisories.total === 1 ? "Advisory: 1 current note declares a repository path that no longer exists." : `Advisory: ${audit.advisories.total} current notes declare repository paths that no longer exist.`);
3269
+ for (const advisory of audit.advisories.details) {
3270
+ lines.push(` ${safe(advisory.path)} declares absent scope ${safe(advisory.scope)}`);
3271
+ }
3272
+ if (audit.advisories.truncated) {
3273
+ lines.push(` \u2026 ${audit.advisories.total - audit.advisories.returned} more; rerun with --json for the complete audit.`);
3274
+ }
3275
+ }
3276
+ if (audit.errors.total > 0) {
3277
+ lines.push(`Advisory: ${audit.errors.total} repository scope declaration problem${audit.errors.total === 1 ? "" : "s"}.`);
3278
+ for (const error of audit.errors.details) {
3279
+ lines.push(` ${renderRepositoryScopeAuditError(error)}`);
3280
+ }
3281
+ if (audit.errors.truncated) {
3282
+ lines.push(` \u2026 ${audit.errors.total - audit.errors.returned} more; rerun with --json for the complete audit.`);
3283
+ }
3284
+ }
3285
+ return lines;
3286
+ }
3242
3287
  function checkExitCode(snapshot, noCatalog = false, attachments) {
3243
3288
  return !noCatalog && snapshot.index === "stale" || snapshot.analysis.issues.length > 0 || snapshot.analysis.relationIssues.length > 0 || (attachments?.issues.length ?? 0) > 0 || attachments?.truncated === true ? 3 : 0;
3244
3289
  }
@@ -3246,7 +3291,7 @@ function renderAttachmentIssue(issue) {
3246
3291
  const candidates = issue.candidates === undefined ? "" : ` (${issue.candidates.map(safe).join(", ")})`;
3247
3292
  return `${safe(issue.source)}:${issue.line}: ${safe(issue.kind)} attachment ${safe(issue.target)}: ${safe(issue.message)}${candidates}`;
3248
3293
  }
3249
- function renderSnapshot(command, snapshot, noCatalog = false, attachments) {
3294
+ function renderSnapshot(command, snapshot, noCatalog = false, attachments, repositoryScopes) {
3250
3295
  const lines = [
3251
3296
  `${command === "refresh" ? "Refreshed" : "Checked"} ${safe(snapshot.root)}`,
3252
3297
  `Index: ${noCatalog ? `not required (${snapshot.index})` : snapshot.index}; notes: ${snapshot.analysis.noteCount}; contextual links: ${snapshot.analysis.contextualLinks.length}; typed relationships: ${snapshot.analysis.authoredRelations.length}.`
@@ -3266,6 +3311,8 @@ function renderSnapshot(command, snapshot, noCatalog = false, attachments) {
3266
3311
  lines.push("error: attachment validation was truncated by a resource limit");
3267
3312
  }
3268
3313
  lines.push(...renderAdvisories(snapshot.analysis));
3314
+ if (repositoryScopes !== undefined)
3315
+ lines.push(...renderRepositoryScopeAudit(repositoryScopes));
3269
3316
  return `${lines.join(`
3270
3317
  `)}
3271
3318
  `;
@@ -4050,7 +4097,15 @@ async function runVault(command, output, dependencies) {
4050
4097
  root: snapshot.root,
4051
4098
  documents: snapshot.notes.map(({ path, content }) => ({ path, content }))
4052
4099
  }) : undefined;
4053
- output.stdout(command.json ? terminalSafeJson(summary(snapshot, { noCatalog, ...attachments === undefined ? {} : { attachments } })) : sanitizeTerminalText(renderSnapshot(command.kind, snapshot, noCatalog, attachments)));
4100
+ const repositoryScopes = command.kind === "check" && command.repository !== undefined ? await (dependencies.auditRepositoryMemoryScopes ?? auditRepositoryMemoryScopes)(snapshot.notes, {
4101
+ repositoryRoot: command.repository,
4102
+ detailLimit: MAX_REPOSITORY_MEMORY_DETAIL_LIMIT
4103
+ }) : undefined;
4104
+ output.stdout(command.json ? terminalSafeJson(summary(snapshot, {
4105
+ noCatalog,
4106
+ ...attachments === undefined ? {} : { attachments },
4107
+ ...repositoryScopes === undefined ? {} : { repositoryScopes }
4108
+ })) : sanitizeTerminalText(renderSnapshot(command.kind, snapshot, noCatalog, attachments, repositoryScopes)));
4054
4109
  return checkExitCode(snapshot, noCatalog, attachments);
4055
4110
  }
4056
4111
  if (command.kind === "graph") {
@@ -1,20 +1,20 @@
1
1
  // @bun
2
2
  import {
3
3
  percolateVault
4
- } from "./index-nd6nynv2.js";
4
+ } from "./index-jk1sgx36.js";
5
5
  import {
6
6
  createGraphSnapshot,
7
7
  openGraphAuthority
8
- } from "./index-famy7fhs.js";
8
+ } from "./index-xv80vzfp.js";
9
9
  import {
10
10
  GraphAuthorityError,
11
11
  validateGraphPercolationOptions
12
- } from "./index-11621h23.js";
12
+ } from "./index-tf4wzjew.js";
13
13
  import {
14
14
  analyzeVault,
15
15
  lookupNote,
16
16
  parseNote
17
- } from "./index-ekpwvbra.js";
17
+ } from "./index-qbssx940.js";
18
18
 
19
19
  // src/graph-percolation.ts
20
20
  async function percolateWithGraph(snapshot, options) {
@@ -7,7 +7,7 @@ import {
7
7
  isCanonicalRelationPredicate,
8
8
  parseDocumentId,
9
9
  parseQualifiedDocumentUri
10
- } from "./index-ekpwvbra.js";
10
+ } from "./index-qbssx940.js";
11
11
 
12
12
  // src/authoring-model.ts
13
13
  import { createHash } from "crypto";
@@ -443,6 +443,25 @@ function normalizedRequestedBody(body) {
443
443
  `) ? body : `${body}
444
444
  `;
445
445
  }
446
+ function renderUpdatedNoteBody(snapshot, parts, body) {
447
+ if (typeof body !== "string")
448
+ throw new TypeError("a note body must be a string");
449
+ if (Buffer.byteLength(body, "utf8") > MAX_NOTE_BYTES) {
450
+ throw new RangeError("the note body is too large for bounded authoring");
451
+ }
452
+ if (Buffer.from(body, "utf8").toString("utf8") !== body) {
453
+ throw new TypeError("a note body must contain well-formed Unicode");
454
+ }
455
+ const normalized = normalizedRequestedBody(body);
456
+ if (!parts.hadFrontmatter) {
457
+ if (frontmatter(normalized, snapshot.relativePath).hadFrontmatter) {
458
+ throw new TypeError("a body update cannot introduce frontmatter into a note");
459
+ }
460
+ return normalized;
461
+ }
462
+ const header = snapshot.content.slice(0, snapshot.content.length - parts.bodySuffix.length);
463
+ return `${header}${parts.newline}${parts.newline}${normalized}`;
464
+ }
446
465
  function renderCreatedNote(input, documentId) {
447
466
  const title = validateTitle(input.title);
448
467
  const type = validateType(input.type);
@@ -1158,6 +1177,35 @@ function editNoteRelationProgram(platform, operation, root, sourceIdInput, predi
1158
1177
  }), (lock) => authoringNative(() => lock.release()));
1159
1178
  });
1160
1179
  }
1180
+ function updateNoteBodyProgram(platform, root, idInput, body, options) {
1181
+ return Effect2.gen(function* () {
1182
+ const id = yield* authoringSync(() => canonicalNoteId(idInput));
1183
+ const expected = yield* authoringSync(() => {
1184
+ if (typeof options?.expectedRevision !== "string") {
1185
+ throw new TypeError("expectedRevision is required for a note body update");
1186
+ }
1187
+ return requireRevision(options.expectedRevision);
1188
+ });
1189
+ const vault = yield* authoringNative(() => platform.resolveVault(root));
1190
+ const dependencies = yield* authoringSync(() => platform.dependenciesFor(options.dependencies));
1191
+ return yield* authoringResource(authoringNative(() => platform.acquireNoteLock(vault.root, id, options.lock)), (lock) => Effect2.gen(function* () {
1192
+ yield* authoringNative(() => platform.recoverInterruptedAuthoring(vault, id, lock));
1193
+ const source = yield* authoringNative(() => platform.readSnapshot(vault, id));
1194
+ yield* authoringSync(() => assertExpected(source, expected));
1195
+ const parts = yield* authoringSync(() => frontmatter(source.content, source.relativePath));
1196
+ const identity = yield* authoringSync(() => existingDocumentId(parts));
1197
+ if (identity.kind === "invalid")
1198
+ return yield* fail(new TypeError("the note has an invalid document_id"));
1199
+ const documentId = identity.kind === "valid" ? identity.documentId : undefined;
1200
+ const relations = yield* authoringSync(() => relationsFromParts(parts, source.relativePath));
1201
+ const content = yield* authoringSync(() => renderUpdatedNoteBody(source, parts, body));
1202
+ if (content === source.content)
1203
+ return yield* authoringSync(() => noteResult(source, relations, false, documentId));
1204
+ const revision = yield* installNote(platform, vault, id, content, source, lock, dependencies);
1205
+ return yield* authoringSync(() => noteResult({ relativePath: source.relativePath, revision }, relations, true, documentId));
1206
+ }), (lock) => authoringNative(() => lock.release()));
1207
+ });
1208
+ }
1161
1209
 
1162
1210
  // src/authoring.ts
1163
1211
  async function noteRevision(root, id) {
@@ -1179,6 +1227,9 @@ async function createNote(root, input, options = {}) {
1179
1227
  async function createConceptNote(root, input, options = {}) {
1180
1228
  return createNote(root, { ...input, type: "concept" }, options);
1181
1229
  }
1230
+ async function updateNoteBody(root, id, body, options) {
1231
+ return runAuthoring(updateNoteBodyProgram(nativeAuthoringPlatform, root, id, body, options));
1232
+ }
1182
1233
  async function addNoteRelation(root, sourceId, predicate, targetId, options = {}) {
1183
1234
  return runAuthoring(editNoteRelationProgram(nativeAuthoringPlatform, "add", root, sourceId, predicate, targetId, options));
1184
1235
  }
@@ -1186,4 +1237,4 @@ async function removeNoteRelation(root, sourceId, predicate, targetId, options =
1186
1237
  return runAuthoring(editNoteRelationProgram(nativeAuthoringPlatform, "remove", root, sourceId, predicate, targetId, options));
1187
1238
  }
1188
1239
 
1189
- export { InvalidCanonicalNoteIdError, NoteRevisionConflictError, NoteAlreadyExistsError, NoteRecoveryRequiredError, canonicalNoteId, canonicalRelationTarget, normalizeRelationPredicate, noteRevision, listNoteRelations, createNote, createConceptNote, addNoteRelation, removeNoteRelation };
1240
+ export { InvalidCanonicalNoteIdError, NoteRevisionConflictError, NoteAlreadyExistsError, NoteRecoveryRequiredError, canonicalNoteId, canonicalRelationTarget, normalizeRelationPredicate, noteRevision, listNoteRelations, createNote, createConceptNote, updateNoteBody, addNoteRelation, removeNoteRelation };
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  scanVault
4
- } from "./index-1tm7bgx7.js";
4
+ } from "./index-233z9wmn.js";
5
5
  import {
6
6
  navigateLinks
7
7
  } from "./index-d13v9ckt.js";
@@ -39,7 +39,7 @@ import {
39
39
  import {
40
40
  lookupNote,
41
41
  normalizeVaultPath
42
- } from "./index-ekpwvbra.js";
42
+ } from "./index-qbssx940.js";
43
43
 
44
44
  // src/publish.ts
45
45
  import { createHash } from "crypto";
@@ -5,7 +5,7 @@ import {
5
5
  isCanonicalNoteId,
6
6
  isCanonicalRelationPredicate,
7
7
  lookupNote
8
- } from "./index-ekpwvbra.js";
8
+ } from "./index-qbssx940.js";
9
9
 
10
10
  // src/percolate.ts
11
11
  import { createHash } from "crypto";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  fuseRankedCandidates
4
- } from "./index-gm9t95d9.js";
4
+ } from "./index-vnybgywh.js";
5
5
 
6
6
  // src/benchmark.ts
7
7
  var MAX_BENCHMARK_CASES = 500;
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  openSemanticSearchSession,
9
9
  recommendedEmbeddingModel
10
- } from "./index-hcw140eb.js";
10
+ } from "./index-rr9kzq4n.js";
11
11
  import {
12
12
  UntrustedContentBudgetError,
13
13
  createUntrustedToolResult
@@ -19,14 +19,14 @@ import {
19
19
  } from "./index-j70m75wd.js";
20
20
  import {
21
21
  percolateWithGraph
22
- } from "./index-t2bs9xdr.js";
22
+ } from "./index-djrcc1yf.js";
23
23
  import {
24
24
  openGraphAuthority
25
- } from "./index-famy7fhs.js";
25
+ } from "./index-xv80vzfp.js";
26
26
  import {
27
27
  validateGraphPercolationOptions,
28
28
  validateGraphQueryRequest
29
- } from "./index-11621h23.js";
29
+ } from "./index-tf4wzjew.js";
30
30
  import {
31
31
  GitHistoryError,
32
32
  gitHistoryForNotes,
@@ -41,10 +41,10 @@ import {
41
41
  fuseRankedCandidates,
42
42
  searchExactVault,
43
43
  validateSearchQuery
44
- } from "./index-gm9t95d9.js";
44
+ } from "./index-vnybgywh.js";
45
45
  import {
46
46
  scanVault
47
- } from "./index-1tm7bgx7.js";
47
+ } from "./index-233z9wmn.js";
48
48
  import {
49
49
  NavigationBudgetError,
50
50
  navigateLinks
@@ -54,7 +54,7 @@ import {
54
54
  } from "./index-48pz4jpc.js";
55
55
  import {
56
56
  lookupNote
57
- } from "./index-ekpwvbra.js";
57
+ } from "./index-qbssx940.js";
58
58
 
59
59
  // src/sdk.ts
60
60
  import { resolve } from "path";
@@ -374,8 +374,7 @@ function aliasesFromMetadata(metadata) {
374
374
  return value.filter((candidate) => typeof candidate === "string" && candidate.trim() !== "");
375
375
  }
376
376
  function frontmatterOf(content, path) {
377
- const lines = content.split(`
378
- `);
377
+ const lines = content.split(/\r?\n/u);
379
378
  if (lines[0]?.trim() !== "---") {
380
379
  return {
381
380
  values: new Map,
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  fuseRankedCandidates,
4
4
  validateSearchQuery
5
- } from "./index-gm9t95d9.js";
5
+ } from "./index-vnybgywh.js";
6
6
  import {
7
7
  MAX_NOTE_UTF8_BYTES,
8
8
  MAX_SCANNED_NOTES,
9
9
  MAX_VAULT_UTF8_BYTES,
10
10
  VaultScanBudgetError,
11
11
  scanVault
12
- } from "./index-1tm7bgx7.js";
12
+ } from "./index-233z9wmn.js";
13
13
 
14
14
  // src/semantic.ts
15
15
  import { createHash as createHash2 } from "crypto";
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  isCanonicalNoteId,
7
7
  isCanonicalRelationPredicate
8
- } from "./index-ekpwvbra.js";
8
+ } from "./index-qbssx940.js";
9
9
 
10
10
  // src/graph-authority-model.ts
11
11
  var GRAPH_LIMITS = Object.freeze({
@@ -7,7 +7,7 @@ import {
7
7
  } from "./index-48pz4jpc.js";
8
8
  import {
9
9
  lookupNote
10
- } from "./index-ekpwvbra.js";
10
+ } from "./index-qbssx940.js";
11
11
 
12
12
  // src/search.ts
13
13
  var MAX_EXACT_RESULTS = 500;
@@ -3,10 +3,10 @@ import {
3
3
  GRAPH_LIMITS,
4
4
  GraphAuthorityError,
5
5
  validateGraphQueryRequest
6
- } from "./index-11621h23.js";
6
+ } from "./index-tf4wzjew.js";
7
7
  import {
8
8
  scanVault
9
- } from "./index-1tm7bgx7.js";
9
+ } from "./index-233z9wmn.js";
10
10
  import {
11
11
  analyzeAuthoredRepositoryScopes
12
12
  } from "./index-06c9ctr6.js";
@@ -19,7 +19,7 @@ import {
19
19
  documentIdState,
20
20
  isCanonicalNoteId,
21
21
  parseNote
22
- } from "./index-ekpwvbra.js";
22
+ } from "./index-qbssx940.js";
23
23
  import {
24
24
  __require
25
25
  } from "./index-z1w83f81.js";
@@ -231,7 +231,7 @@ import { lstat, open } from "fs/promises";
231
231
  var graphCacheFileSystem = { lstat, open };
232
232
 
233
233
  // src/graph-authority.ts
234
- var openOhGraphAdapter = async (...args) => await (await import("./authority-1pgftmwq.js")).openOhGraphAdapter(...args);
234
+ var openOhGraphAdapter = async (...args) => await (await import("./authority-06eqhqam.js")).openOhGraphAdapter(...args);
235
235
  var MAX_CACHE_BYTES = 67108864;
236
236
  var ignoredCache = `# Disposable Wordcell graph state. Rebuild from Markdown.
237
237
  *
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  createSyntheticRankFusionFixture,
16
16
  evaluateRanking,
17
17
  evaluateRetrievalBenchmark
18
- } from "./index-qwgsmtsz.js";
18
+ } from "./index-n386evxj.js";
19
19
  import {
20
20
  initVault
21
21
  } from "./index-23z4zxgg.js";
@@ -37,7 +37,7 @@ import {
37
37
  knowledgeBaseEvaluationRetrieverIds,
38
38
  openKnowledgeBaseEvaluation,
39
39
  verifyFrozenEvaluationSnapshot
40
- } from "./index-e6p9e926.js";
40
+ } from "./index-1k595z6v.js";
41
41
  import {
42
42
  DEFAULT_SEARCH_RESULTS,
43
43
  MAX_SEARCH_CANDIDATES,
@@ -50,7 +50,7 @@ import {
50
50
  packUntrustedSearchContext,
51
51
  searchEvidenceRank,
52
52
  validateKnowledgeBaseSearchHistory
53
- } from "./index-2hf27mws.js";
53
+ } from "./index-q7tbg07z.js";
54
54
  import"./index-adx6khj5.js";
55
55
  import {
56
56
  MAX_EMBEDDING_MODEL_BYTES,
@@ -67,7 +67,7 @@ import {
67
67
  searchSemanticVault,
68
68
  semanticDatabasePath,
69
69
  sha256EmbeddingModelFile
70
- } from "./index-hcw140eb.js";
70
+ } from "./index-rr9kzq4n.js";
71
71
  import"./index-4j3tt0c3.js";
72
72
  import {
73
73
  MAX_RERANK_CANDIDATES,
@@ -94,7 +94,7 @@ import {
94
94
  } from "./index-b88v3vtm.js";
95
95
  import {
96
96
  percolateWithGraph
97
- } from "./index-t2bs9xdr.js";
97
+ } from "./index-djrcc1yf.js";
98
98
  import {
99
99
  DEFAULT_PERCOLATION_LIMIT,
100
100
  DEFAULT_PERCOLATION_MIN_SUPPORT,
@@ -115,19 +115,19 @@ import {
115
115
  parsePercolationResultV1,
116
116
  parsePercolationResultV2,
117
117
  percolateVault
118
- } from "./index-nd6nynv2.js";
118
+ } from "./index-jk1sgx36.js";
119
119
  import {
120
120
  createGraphSnapshot,
121
121
  openGraphAuthority,
122
122
  queryGraph,
123
123
  rebuildGraph,
124
124
  verifyGraph
125
- } from "./index-famy7fhs.js";
125
+ } from "./index-xv80vzfp.js";
126
126
  import {
127
127
  GRAPH_LIMITS,
128
128
  GraphAuthorityError,
129
129
  validateGraphQueryRequest
130
- } from "./index-11621h23.js";
130
+ } from "./index-tf4wzjew.js";
131
131
  import {
132
132
  GitHistoryError,
133
133
  MAX_GIT_HISTORY_COMMITS,
@@ -154,7 +154,7 @@ import {
154
154
  fuseRankedCandidates,
155
155
  searchExactVault,
156
156
  validateSearchQuery
157
- } from "./index-gm9t95d9.js";
157
+ } from "./index-vnybgywh.js";
158
158
  import"./index-1xxnjn0d.js";
159
159
  import {
160
160
  DEFAULT_PUBLISH_LIST_LIMIT,
@@ -167,7 +167,7 @@ import {
167
167
  publishVault,
168
168
  renderPublishReportText,
169
169
  serializeSiteFile
170
- } from "./index-0dqfnrz9.js";
170
+ } from "./index-hmw17zaa.js";
171
171
  import {
172
172
  MAX_NOTE_UTF8_BYTES,
173
173
  MAX_SCANNED_NOTES,
@@ -178,7 +178,7 @@ import {
178
178
  readVaultNotes,
179
179
  refreshVault,
180
180
  scanVault
181
- } from "./index-1tm7bgx7.js";
181
+ } from "./index-233z9wmn.js";
182
182
  import {
183
183
  MAX_NAVIGATION_INDEXED_CONNECTIONS,
184
184
  MAX_NAVIGATION_RETURNED_CONNECTIONS,
@@ -293,8 +293,9 @@ import {
293
293
  listNoteRelations,
294
294
  normalizeRelationPredicate,
295
295
  noteRevision,
296
- removeNoteRelation
297
- } from "./index-6sw24nvv.js";
296
+ removeNoteRelation,
297
+ updateNoteBody
298
+ } from "./index-ecqpgr5y.js";
298
299
  import"./index-3rm7cz6h.js";
299
300
  import {
300
301
  MAX_ANALYZED_NOTES,
@@ -315,7 +316,7 @@ import {
315
316
  replaceCatalog,
316
317
  searchableMarkdown,
317
318
  wikiLinks
318
- } from "./index-ekpwvbra.js";
319
+ } from "./index-qbssx940.js";
319
320
  import"./index-z1w83f81.js";
320
321
  // src/oh-adoption.ts
321
322
  import { createHash } from "crypto";
@@ -756,6 +757,7 @@ export {
756
757
  validateGitHistoryForNotesRequest,
757
758
  validateGitHistoryForNotesOptions,
758
759
  validateAttachmentReferences,
760
+ updateNoteBody,
759
761
  terminalPlanStatuses,
760
762
  sourceInbox,
761
763
  sha256EmbeddingModelFile,
package/dist/percolate.js CHANGED
@@ -19,8 +19,8 @@ import {
19
19
  parsePercolationResultV1,
20
20
  parsePercolationResultV2,
21
21
  percolateVault
22
- } from "./index-nd6nynv2.js";
23
- import"./index-ekpwvbra.js";
22
+ } from "./index-jk1sgx36.js";
23
+ import"./index-qbssx940.js";
24
24
  import"./index-z1w83f81.js";
25
25
  export {
26
26
  percolateVault,