@hraness/wordcell 0.22.0 → 0.22.1

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 (45) hide show
  1. package/README.md +4 -4
  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-4ag64rc1.js → index-810nfzdj.js} +73 -18
  15. package/dist/{index-avbce90h.js → index-bqtqeak3.js} +4 -4
  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-1rh2d7mt.js} +14 -14
  35. package/dist/workflows/decision-context.js +10 -10
  36. package/dist/workflows/index.js +10 -10
  37. package/package.json +6 -5
  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 +94 -3
  45. package/src/graph.ts +1 -1
package/README.md CHANGED
@@ -36,14 +36,14 @@ Git evidence, and selective publishing. [Compare the tradeoffs](https://github.c
36
36
  The CLI and TypeScript SDK run with Bun. Install the versioned GitHub archive:
37
37
 
38
38
  ```sh
39
- bun add --global --ignore-scripts https://github.com/hraness/wordcell/releases/download/v0.22.0/hraness-wordcell-0.22.0.tgz
39
+ bun add --global --ignore-scripts https://github.com/hraness/wordcell/releases/download/v0.22.1/hraness-wordcell-0.22.1.tgz
40
40
  wordcell --help
41
41
  ```
42
42
 
43
43
  Prefer npm? The same release is [mirrored there](https://www.npmjs.com/package/@hraness/wordcell):
44
44
 
45
45
  ```sh
46
- npm install --global --ignore-scripts @hraness/wordcell@0.22.0
46
+ npm install --global --ignore-scripts @hraness/wordcell@0.22.1
47
47
  wordcell --help
48
48
  ```
49
49
 
@@ -85,7 +85,7 @@ After trying the CLI, install the public Agent Skill into a compatible agent,
85
85
  such as Claude Code, Codex, Cursor, or GitHub Copilot:
86
86
 
87
87
  ```sh
88
- bunx skills add hraness/wordcell#v0.22.0 --skill wordcell
88
+ bunx skills add hraness/wordcell#v0.22.1 --skill wordcell
89
89
  ```
90
90
 
91
91
  Then ask:
@@ -265,7 +265,7 @@ exist. [Graph queries and proof limits](https://github.com/hraness/wordcell/blob
265
265
  Add the same immutable release to a Bun project:
266
266
 
267
267
  ```sh
268
- bun add --exact --ignore-scripts https://github.com/hraness/wordcell/releases/download/v0.22.0/hraness-wordcell-0.22.0.tgz
268
+ bun add --exact --ignore-scripts https://github.com/hraness/wordcell/releases/download/v0.22.1/hraness-wordcell-0.22.1.tgz
269
269
  ```
270
270
 
271
271
  The SDK provides read-only vault sessions, metadata queries, search, graph
package/dist/authoring.js CHANGED
@@ -12,12 +12,14 @@ import {
12
12
  listNoteRelations,
13
13
  normalizeRelationPredicate,
14
14
  noteRevision,
15
- removeNoteRelation
16
- } from "./index-6sw24nvv.js";
15
+ removeNoteRelation,
16
+ updateNoteBody
17
+ } from "./index-ecqpgr5y.js";
17
18
  import"./index-3rm7cz6h.js";
18
- import"./index-ekpwvbra.js";
19
+ import"./index-qbssx940.js";
19
20
  import"./index-z1w83f81.js";
20
21
  export {
22
+ updateNoteBody,
21
23
  removeNoteRelation,
22
24
  noteRevision,
23
25
  normalizeRelationPredicate,
@@ -3,7 +3,7 @@ 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
  validateRepositoryScopeSelection
9
9
  } from "./index-06c9ctr6.js";
@@ -11,7 +11,7 @@ import"./index-5vwpzb5a.js";
11
11
  import {
12
12
  isCanonicalNoteId,
13
13
  isCanonicalRelationPredicate
14
- } from "./index-ekpwvbra.js";
14
+ } from "./index-qbssx940.js";
15
15
  import"./index-z1w83f81.js";
16
16
 
17
17
  // src/oh/authority.ts
package/dist/benchmark.js CHANGED
@@ -4,13 +4,13 @@ import {
4
4
  createSyntheticRankFusionFixture,
5
5
  evaluateRanking,
6
6
  evaluateRetrievalBenchmark
7
- } from "./index-qwgsmtsz.js";
8
- import"./index-gm9t95d9.js";
7
+ } from "./index-n386evxj.js";
8
+ import"./index-vnybgywh.js";
9
9
  import"./index-d13v9ckt.js";
10
10
  import"./index-48pz4jpc.js";
11
11
  import"./index-06c9ctr6.js";
12
12
  import"./index-5vwpzb5a.js";
13
- import"./index-ekpwvbra.js";
13
+ import"./index-qbssx940.js";
14
14
  import"./index-z1w83f81.js";
15
15
  export {
16
16
  evaluateRetrievalBenchmark,
package/dist/cli.js CHANGED
@@ -5,10 +5,10 @@ import {
5
5
  parseArguments,
6
6
  runExecutable,
7
7
  usage
8
- } from "./index-4ag64rc1.js";
8
+ } from "./index-810nfzdj.js";
9
9
  import"./index-bcknqxrq.js";
10
10
  import"./index-054mb7d3.js";
11
- import"./index-avbce90h.js";
11
+ import"./index-bqtqeak3.js";
12
12
  import"./index-j4zgmzjr.js";
13
13
  import"./index-de2w8crk.js";
14
14
  import"./index-6jcz0m1c.js";
@@ -27,22 +27,22 @@ import"./index-mxxxytys.js";
27
27
  import"./index-23z4zxgg.js";
28
28
  import"./index-pj501bh1.js";
29
29
  import"./index-9rf81m0p.js";
30
- import"./index-e6p9e926.js";
31
- import"./index-2hf27mws.js";
30
+ import"./index-1k595z6v.js";
31
+ import"./index-q7tbg07z.js";
32
32
  import"./index-adx6khj5.js";
33
- import"./index-hcw140eb.js";
33
+ import"./index-rr9kzq4n.js";
34
34
  import"./index-4j3tt0c3.js";
35
35
  import"./index-j70m75wd.js";
36
36
  import"./index-b88v3vtm.js";
37
- import"./index-t2bs9xdr.js";
38
- import"./index-nd6nynv2.js";
39
- import"./index-famy7fhs.js";
40
- import"./index-11621h23.js";
37
+ import"./index-djrcc1yf.js";
38
+ import"./index-jk1sgx36.js";
39
+ import"./index-xv80vzfp.js";
40
+ import"./index-tf4wzjew.js";
41
41
  import"./index-1gwbassd.js";
42
- import"./index-gm9t95d9.js";
42
+ import"./index-vnybgywh.js";
43
43
  import"./index-1xxnjn0d.js";
44
- import"./index-0dqfnrz9.js";
45
- import"./index-1tm7bgx7.js";
44
+ import"./index-hmw17zaa.js";
45
+ import"./index-233z9wmn.js";
46
46
  import"./index-d13v9ckt.js";
47
47
  import"./index-48pz4jpc.js";
48
48
  import"./index-06c9ctr6.js";
@@ -52,16 +52,16 @@ import"./index-3agn8scn.js";
52
52
  import"./index-hya40gb2.js";
53
53
  import"./index-5vwpzb5a.js";
54
54
  import"./index-x3fthpsc.js";
55
- import"./index-6sw24nvv.js";
55
+ import"./index-ecqpgr5y.js";
56
56
  import"./index-3rm7cz6h.js";
57
- import"./index-ekpwvbra.js";
57
+ import"./index-qbssx940.js";
58
58
  import {
59
59
  __require
60
60
  } from "./index-z1w83f81.js";
61
61
 
62
62
  // src/cli.ts
63
63
  if (import.meta.main) {
64
- const { standaloneSupportEnvironment, isUsefulSupportResult, runProductSupportCommand, showProductSupportInvitation } = await import("./support-mywv1em0.js");
64
+ const { standaloneSupportEnvironment, isUsefulSupportResult, runProductSupportCommand, showProductSupportInvitation } = await import("./support-1rh2d7mt.js");
65
65
  const env = standaloneSupportEnvironment();
66
66
  const args = process.argv.slice(2);
67
67
  if (args[0] === "support") {
@@ -4,14 +4,14 @@ import {
4
4
  knowledgeBaseEvaluationRetrieverIds,
5
5
  openKnowledgeBaseEvaluation,
6
6
  verifyFrozenEvaluationSnapshot
7
- } from "./index-e6p9e926.js";
8
- import"./index-2hf27mws.js";
7
+ } from "./index-1k595z6v.js";
8
+ import"./index-q7tbg07z.js";
9
9
  import"./index-adx6khj5.js";
10
10
  import {
11
11
  indexSemanticVault,
12
12
  recommendedEmbeddingModel,
13
13
  recommendedEmbeddingModelSha256
14
- } from "./index-hcw140eb.js";
14
+ } from "./index-rr9kzq4n.js";
15
15
  import"./index-4j3tt0c3.js";
16
16
  import"./index-j70m75wd.js";
17
17
  import {
@@ -19,24 +19,24 @@ import {
19
19
  MAX_EVALUATION_EVIDENCE_BYTES,
20
20
  MAX_EVALUATION_RESULTS_PER_QUERY
21
21
  } from "./index-b88v3vtm.js";
22
- import"./index-t2bs9xdr.js";
23
- import"./index-nd6nynv2.js";
24
- import"./index-famy7fhs.js";
25
- import"./index-11621h23.js";
22
+ import"./index-djrcc1yf.js";
23
+ import"./index-jk1sgx36.js";
24
+ import"./index-xv80vzfp.js";
25
+ import"./index-tf4wzjew.js";
26
26
  import {
27
27
  runGitCommand
28
28
  } from "./index-1gwbassd.js";
29
- import"./index-gm9t95d9.js";
29
+ import"./index-vnybgywh.js";
30
30
  import"./index-1xxnjn0d.js";
31
31
  import {
32
32
  scanVault
33
- } from "./index-1tm7bgx7.js";
33
+ } from "./index-233z9wmn.js";
34
34
  import"./index-d13v9ckt.js";
35
35
  import"./index-48pz4jpc.js";
36
36
  import"./index-06c9ctr6.js";
37
37
  import"./index-5vwpzb5a.js";
38
38
  import"./index-3rm7cz6h.js";
39
- import"./index-ekpwvbra.js";
39
+ import"./index-qbssx940.js";
40
40
  import"./index-z1w83f81.js";
41
41
 
42
42
  // src/evaluation-builder.ts
@@ -4,27 +4,27 @@ import {
4
4
  knowledgeBaseEvaluationRetrieverIds,
5
5
  openKnowledgeBaseEvaluation,
6
6
  verifyFrozenEvaluationSnapshot
7
- } from "./index-e6p9e926.js";
8
- import"./index-2hf27mws.js";
7
+ } from "./index-1k595z6v.js";
8
+ import"./index-q7tbg07z.js";
9
9
  import"./index-adx6khj5.js";
10
- import"./index-hcw140eb.js";
10
+ import"./index-rr9kzq4n.js";
11
11
  import"./index-4j3tt0c3.js";
12
12
  import"./index-j70m75wd.js";
13
13
  import"./index-b88v3vtm.js";
14
- import"./index-t2bs9xdr.js";
15
- import"./index-nd6nynv2.js";
16
- import"./index-famy7fhs.js";
17
- import"./index-11621h23.js";
14
+ import"./index-djrcc1yf.js";
15
+ import"./index-jk1sgx36.js";
16
+ import"./index-xv80vzfp.js";
17
+ import"./index-tf4wzjew.js";
18
18
  import"./index-1gwbassd.js";
19
- import"./index-gm9t95d9.js";
19
+ import"./index-vnybgywh.js";
20
20
  import"./index-1xxnjn0d.js";
21
- import"./index-1tm7bgx7.js";
21
+ import"./index-233z9wmn.js";
22
22
  import"./index-d13v9ckt.js";
23
23
  import"./index-48pz4jpc.js";
24
24
  import"./index-06c9ctr6.js";
25
25
  import"./index-5vwpzb5a.js";
26
26
  import"./index-3rm7cz6h.js";
27
- import"./index-ekpwvbra.js";
27
+ import"./index-qbssx940.js";
28
28
  import"./index-z1w83f81.js";
29
29
  export {
30
30
  verifyFrozenEvaluationSnapshot,
@@ -5,17 +5,17 @@ import {
5
5
  queryGraph,
6
6
  rebuildGraph,
7
7
  verifyGraph
8
- } from "./index-famy7fhs.js";
8
+ } from "./index-xv80vzfp.js";
9
9
  import {
10
10
  GRAPH_LIMITS,
11
11
  GraphAuthorityError,
12
12
  validateGraphQueryRequest
13
- } from "./index-11621h23.js";
14
- import"./index-1tm7bgx7.js";
13
+ } from "./index-tf4wzjew.js";
14
+ import"./index-233z9wmn.js";
15
15
  import"./index-06c9ctr6.js";
16
16
  import"./index-5vwpzb5a.js";
17
17
  import"./index-3rm7cz6h.js";
18
- import"./index-ekpwvbra.js";
18
+ import"./index-qbssx940.js";
19
19
  import"./index-z1w83f81.js";
20
20
  export {
21
21
  verifyGraph,
@@ -1,15 +1,15 @@
1
1
  // @bun
2
2
  import {
3
3
  percolateWithGraph
4
- } from "./index-t2bs9xdr.js";
5
- import"./index-nd6nynv2.js";
6
- import"./index-famy7fhs.js";
7
- import"./index-11621h23.js";
8
- import"./index-1tm7bgx7.js";
4
+ } from "./index-djrcc1yf.js";
5
+ import"./index-jk1sgx36.js";
6
+ import"./index-xv80vzfp.js";
7
+ import"./index-tf4wzjew.js";
8
+ import"./index-233z9wmn.js";
9
9
  import"./index-06c9ctr6.js";
10
10
  import"./index-5vwpzb5a.js";
11
11
  import"./index-3rm7cz6h.js";
12
- import"./index-ekpwvbra.js";
12
+ import"./index-qbssx940.js";
13
13
  import"./index-z1w83f81.js";
14
14
  export {
15
15
  percolateWithGraph
package/dist/graph.js CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  replaceCatalog,
19
19
  searchableMarkdown,
20
20
  wikiLinks
21
- } from "./index-ekpwvbra.js";
21
+ } from "./index-qbssx940.js";
22
22
  import"./index-z1w83f81.js";
23
23
  export {
24
24
  wikiLinks,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  MAX_SEARCH_RESULTS,
4
4
  openKnowledgeBase
5
- } from "./index-2hf27mws.js";
5
+ } from "./index-q7tbg07z.js";
6
6
  import {
7
7
  MAX_EVALUATION_EVIDENCE_BYTES,
8
8
  redactEvaluationMachinePaths
@@ -12,7 +12,7 @@ import {
12
12
  } from "./index-1gwbassd.js";
13
13
  import {
14
14
  scanVault
15
- } from "./index-1tm7bgx7.js";
15
+ } from "./index-233z9wmn.js";
16
16
  import {
17
17
  MAX_REPOSITORY_MEMORY_DETAIL_LIMIT,
18
18
  MAX_REPOSITORY_MEMORY_GROUP_LIMIT,
@@ -8,7 +8,7 @@ import {
8
8
  parseNote,
9
9
  renderCatalog,
10
10
  replaceCatalog
11
- } from "./index-ekpwvbra.js";
11
+ } from "./index-qbssx940.js";
12
12
 
13
13
  // src/vault.ts
14
14
  import { randomUUID } from "crypto";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-h170byqw.js";
5
5
  import {
6
6
  packUntrustedSearchContext
7
- } from "./index-2hf27mws.js";
7
+ } from "./index-q7tbg07z.js";
8
8
 
9
9
  // src/workflows/decision-context.ts
10
10
  var decisionContextWorkflow = defineWorkflow({
@@ -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";
@@ -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") {
@@ -5,7 +5,7 @@ import {
5
5
  MAX_SEARCH_RESULTS,
6
6
  openKnowledgeBase,
7
7
  validateKnowledgeBaseSearchHistory
8
- } from "./index-2hf27mws.js";
8
+ } from "./index-q7tbg07z.js";
9
9
  import {
10
10
  expandSearchRequest,
11
11
  parseSearchRules
@@ -15,10 +15,10 @@ import {
15
15
  } from "./index-1gwbassd.js";
16
16
  import {
17
17
  validateSearchQuery
18
- } from "./index-gm9t95d9.js";
18
+ } from "./index-vnybgywh.js";
19
19
  import {
20
20
  scanVault
21
- } from "./index-1tm7bgx7.js";
21
+ } from "./index-233z9wmn.js";
22
22
  import {
23
23
  validateQueryOptions
24
24
  } from "./index-48pz4jpc.js";
@@ -32,7 +32,7 @@ import {
32
32
  parseVaultKey,
33
33
  portfolioDocumentIdentity,
34
34
  portfolioVaultIdentity
35
- } from "./index-ekpwvbra.js";
35
+ } from "./index-qbssx940.js";
36
36
 
37
37
  // src/portfolio.ts
38
38
  import { createHash as createHash2 } from "crypto";
@@ -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) {