@gmickel/gno 1.17.0 → 1.19.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.
Files changed (167) hide show
  1. package/README.md +18 -4
  2. package/assets/skill/SKILL.md +44 -1
  3. package/assets/skill/mcp-reference.md +21 -0
  4. package/package.json +3 -2
  5. package/spec/AGENTS.md +83 -0
  6. package/spec/CLAUDE.md +83 -0
  7. package/spec/bench-fixture.schema.json +137 -0
  8. package/spec/cli.md +2894 -0
  9. package/spec/db/schema.sql +442 -0
  10. package/spec/evals-agentic.md +510 -0
  11. package/spec/evals.md +1106 -0
  12. package/spec/mcp.md +2229 -0
  13. package/spec/output-schemas/activation-verification.schema.json +515 -0
  14. package/spec/output-schemas/ask.schema.json +366 -0
  15. package/spec/output-schemas/backlinks.schema.json +131 -0
  16. package/spec/output-schemas/bench-result.schema.json +120 -0
  17. package/spec/output-schemas/capture-receipt.schema.json +143 -0
  18. package/spec/output-schemas/collection-list.schema.json +45 -0
  19. package/spec/output-schemas/context-capsule-v1.schema.json +691 -0
  20. package/spec/output-schemas/context-capsule-verification.schema.json +1338 -0
  21. package/spec/output-schemas/context-list.schema.json +21 -0
  22. package/spec/output-schemas/doctor.schema.json +313 -0
  23. package/spec/output-schemas/error.schema.json +30 -0
  24. package/spec/output-schemas/expansion.schema.json +37 -0
  25. package/spec/output-schemas/get.schema.json +140 -0
  26. package/spec/output-schemas/graph-query.schema.json +99 -0
  27. package/spec/output-schemas/graph.schema.json +371 -0
  28. package/spec/output-schemas/links-list.schema.json +186 -0
  29. package/spec/output-schemas/mcp-add-collection-result.schema.json +23 -0
  30. package/spec/output-schemas/mcp-capture-result.schema.json +152 -0
  31. package/spec/output-schemas/mcp-http-error.schema.json +30 -0
  32. package/spec/output-schemas/mcp-job-list.schema.json +58 -0
  33. package/spec/output-schemas/mcp-job-status.schema.json +224 -0
  34. package/spec/output-schemas/mcp-remove-result.schema.json +39 -0
  35. package/spec/output-schemas/mcp-sync-result.schema.json +41 -0
  36. package/spec/output-schemas/mcp-tag-result.schema.json +33 -0
  37. package/spec/output-schemas/models-list.schema.json +93 -0
  38. package/spec/output-schemas/multi-get.schema.json +103 -0
  39. package/spec/output-schemas/process-status.schema.json +119 -0
  40. package/spec/output-schemas/query-diagnose.schema.json +123 -0
  41. package/spec/output-schemas/resident-status.schema.json +154 -0
  42. package/spec/output-schemas/retrieval-trace-common.schema.json +492 -0
  43. package/spec/output-schemas/retrieval-trace-delete.schema.json +16 -0
  44. package/spec/output-schemas/retrieval-trace-export.schema.json +61 -0
  45. package/spec/output-schemas/retrieval-trace-filters.schema.json +139 -0
  46. package/spec/output-schemas/retrieval-trace-judgment.schema.json +15 -0
  47. package/spec/output-schemas/retrieval-trace-list.schema.json +18 -0
  48. package/spec/output-schemas/retrieval-trace-payloads.schema.json +178 -0
  49. package/spec/output-schemas/retrieval-trace-purge.schema.json +31 -0
  50. package/spec/output-schemas/retrieval-trace-qrels.schema.json +303 -0
  51. package/spec/output-schemas/retrieval-trace-replay.schema.json +286 -0
  52. package/spec/output-schemas/retrieval-trace-show.schema.json +69 -0
  53. package/spec/output-schemas/retrieval-trace-summary.schema.json +65 -0
  54. package/spec/output-schemas/search-result.schema.json +154 -0
  55. package/spec/output-schemas/search-results.schema.json +338 -0
  56. package/spec/output-schemas/similar.schema.json +84 -0
  57. package/spec/output-schemas/status.schema.json +676 -0
  58. package/spec/output-schemas/tags-list.schema.json +48 -0
  59. package/src/app/context-runtime-types.ts +3 -0
  60. package/src/app/context-runtime.ts +15 -1
  61. package/src/cli/commands/ask.ts +106 -36
  62. package/src/cli/commands/context-build.ts +56 -9
  63. package/src/cli/commands/daemon.ts +69 -2
  64. package/src/cli/commands/get.ts +64 -3
  65. package/src/cli/commands/models/pull.ts +13 -3
  66. package/src/cli/commands/query.ts +62 -23
  67. package/src/cli/commands/replay.ts +140 -0
  68. package/src/cli/commands/search.ts +48 -3
  69. package/src/cli/commands/shared.ts +3 -1
  70. package/src/cli/commands/status.ts +2 -0
  71. package/src/cli/commands/trace.ts +200 -0
  72. package/src/cli/commands/vsearch.ts +75 -53
  73. package/src/cli/detach.ts +37 -20
  74. package/src/cli/program.ts +329 -27
  75. package/src/config/index.ts +12 -0
  76. package/src/config/retrieval-traces.ts +56 -0
  77. package/src/config/types.ts +41 -0
  78. package/src/core/context-compiler.ts +11 -4
  79. package/src/core/job-manager.ts +19 -0
  80. package/src/core/mutation-generations.ts +33 -0
  81. package/src/core/retrieval-qrels.ts +405 -0
  82. package/src/core/retrieval-replay-candidate.ts +368 -0
  83. package/src/core/retrieval-replay-types.ts +109 -0
  84. package/src/core/retrieval-replay-validation.ts +89 -0
  85. package/src/core/retrieval-replay.ts +441 -0
  86. package/src/core/retrieval-trace-evidence-origin.ts +175 -0
  87. package/src/core/retrieval-trace-export.ts +113 -0
  88. package/src/core/retrieval-trace-filter-normalization.ts +27 -0
  89. package/src/core/retrieval-trace-filters.ts +19 -0
  90. package/src/core/retrieval-trace-management-helpers.ts +247 -0
  91. package/src/core/retrieval-trace-management-types.ts +132 -0
  92. package/src/core/retrieval-trace-management.ts +422 -0
  93. package/src/core/retrieval-trace-request.ts +141 -0
  94. package/src/core/retrieval-trace-session.ts +494 -0
  95. package/src/core/retrieval-trace.ts +472 -0
  96. package/src/llm/cache.ts +13 -3
  97. package/src/llm/nodeLlamaCpp/adapter.ts +10 -1
  98. package/src/llm/nodeLlamaCpp/lifecycle.ts +71 -0
  99. package/src/mcp/context.ts +161 -0
  100. package/src/mcp/http-security.ts +477 -0
  101. package/src/mcp/http-session.ts +272 -0
  102. package/src/mcp/http-transport.ts +370 -0
  103. package/src/mcp/resources/index.ts +141 -134
  104. package/src/mcp/server.ts +19 -79
  105. package/src/mcp/tools/add-collection.ts +3 -1
  106. package/src/mcp/tools/capture.ts +3 -0
  107. package/src/mcp/tools/clear-collection-embeddings.ts +2 -0
  108. package/src/mcp/tools/context.ts +68 -16
  109. package/src/mcp/tools/embed.ts +62 -52
  110. package/src/mcp/tools/get.ts +35 -1
  111. package/src/mcp/tools/index-cmd.ts +88 -74
  112. package/src/mcp/tools/index.ts +96 -2
  113. package/src/mcp/tools/query.ts +95 -64
  114. package/src/mcp/tools/remove-collection.ts +2 -0
  115. package/src/mcp/tools/search.ts +36 -13
  116. package/src/mcp/tools/status.ts +11 -0
  117. package/src/mcp/tools/sync.ts +16 -14
  118. package/src/mcp/tools/trace.ts +143 -0
  119. package/src/mcp/tools/vsearch.ts +71 -38
  120. package/src/mcp/tools/workspace-write.ts +7 -3
  121. package/src/pipeline/answer.ts +167 -26
  122. package/src/pipeline/graph-retrieval.ts +15 -1
  123. package/src/pipeline/hybrid.ts +151 -43
  124. package/src/pipeline/search.ts +36 -3
  125. package/src/pipeline/trace-metadata.ts +47 -0
  126. package/src/pipeline/types.ts +43 -0
  127. package/src/pipeline/vsearch.ts +101 -38
  128. package/src/sdk/client.ts +380 -71
  129. package/src/sdk/documents.ts +48 -1
  130. package/src/sdk/index.ts +17 -0
  131. package/src/sdk/types.ts +28 -0
  132. package/src/serve/background-runtime.ts +12 -212
  133. package/src/serve/context-capsule.ts +67 -8
  134. package/src/serve/embed-scheduler.ts +74 -43
  135. package/src/serve/index.ts +9 -0
  136. package/src/serve/jobs.ts +78 -80
  137. package/src/serve/public/app.tsx +12 -1
  138. package/src/serve/public/components/HealthCenter.tsx +74 -1
  139. package/src/serve/public/globals.built.css +1 -1
  140. package/src/serve/public/lib/workspace-tabs.ts +2 -0
  141. package/src/serve/public/pages/Dashboard.tsx +11 -0
  142. package/src/serve/public/pages/TraceHistory.tsx +478 -0
  143. package/src/serve/public/pages/trace-history-detail.tsx +224 -0
  144. package/src/serve/resident-admission.ts +159 -0
  145. package/src/serve/resident-background-work.ts +39 -0
  146. package/src/serve/resident-request.ts +55 -0
  147. package/src/serve/resident-runtime.ts +490 -0
  148. package/src/serve/resident-status.ts +96 -0
  149. package/src/serve/retrieval-trace.ts +28 -0
  150. package/src/serve/routes/api.ts +629 -239
  151. package/src/serve/routes/mcp.ts +69 -0
  152. package/src/serve/routes/traces.ts +156 -0
  153. package/src/serve/server.ts +276 -37
  154. package/src/serve/status-model.ts +51 -0
  155. package/src/serve/status.ts +5 -0
  156. package/src/store/index.ts +31 -0
  157. package/src/store/migrations/014-retrieval-traces.ts +303 -0
  158. package/src/store/migrations/index.ts +2 -0
  159. package/src/store/retrieval-trace-codec.ts +384 -0
  160. package/src/store/sqlite/adapter.ts +179 -10
  161. package/src/store/sqlite/retrieval-trace-management-store.ts +341 -0
  162. package/src/store/sqlite/retrieval-trace-retention.ts +349 -0
  163. package/src/store/sqlite/retrieval-trace-rows.ts +267 -0
  164. package/src/store/sqlite/retrieval-trace-store.ts +515 -0
  165. package/src/store/types.ts +297 -0
  166. package/src/store/vector/sqlite-vec.ts +76 -1
  167. package/src/store/vector/types.ts +1 -1
@@ -0,0 +1,371 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "gno://schemas/graph@1.0",
4
+ "title": "GNO Graph",
5
+ "description": "Knowledge graph of document links",
6
+ "type": "object",
7
+ "required": ["nodes", "links", "report", "meta"],
8
+ "properties": {
9
+ "nodes": {
10
+ "type": "array",
11
+ "description": "Graph nodes representing documents",
12
+ "items": {
13
+ "type": "object",
14
+ "required": ["id", "uri", "collection", "relPath", "degree"],
15
+ "properties": {
16
+ "id": {
17
+ "type": "string",
18
+ "description": "Document ID (#hex)"
19
+ },
20
+ "uri": {
21
+ "type": "string",
22
+ "description": "Document URI (gno://collection/path)"
23
+ },
24
+ "title": {
25
+ "type": ["string", "null"],
26
+ "description": "Document title"
27
+ },
28
+ "collection": {
29
+ "type": "string",
30
+ "description": "Collection name"
31
+ },
32
+ "relPath": {
33
+ "type": "string",
34
+ "description": "Relative path within collection"
35
+ },
36
+ "degree": {
37
+ "type": "integer",
38
+ "description": "Total degree (in + out unique neighbors)",
39
+ "minimum": 0
40
+ },
41
+ "communityId": {
42
+ "type": "string",
43
+ "description": "Optional deterministic community id"
44
+ }
45
+ }
46
+ }
47
+ },
48
+ "links": {
49
+ "type": "array",
50
+ "description": "Graph edges between documents",
51
+ "items": {
52
+ "type": "object",
53
+ "required": [
54
+ "source",
55
+ "target",
56
+ "type",
57
+ "weight",
58
+ "confidence",
59
+ "audit"
60
+ ],
61
+ "properties": {
62
+ "source": {
63
+ "type": "string",
64
+ "description": "Source node ID (docid)"
65
+ },
66
+ "target": {
67
+ "type": "string",
68
+ "description": "Target node ID (docid)"
69
+ },
70
+ "type": {
71
+ "type": "string",
72
+ "enum": ["wiki", "markdown", "similar"],
73
+ "description": "Edge type"
74
+ },
75
+ "weight": {
76
+ "type": "number",
77
+ "description": "Edge weight (link count or similarity score)",
78
+ "minimum": 0
79
+ },
80
+ "confidence": {
81
+ "type": "string",
82
+ "enum": ["explicit", "inferred", "ambiguous", "similarity"],
83
+ "description": "Trust classification for retrieval and agent audit"
84
+ },
85
+ "audit": {
86
+ "type": "object",
87
+ "description": "Metadata explaining how the edge was derived",
88
+ "required": ["resolution"],
89
+ "properties": {
90
+ "resolution": {
91
+ "type": "string",
92
+ "enum": [
93
+ "exact-title",
94
+ "exact-path",
95
+ "path-fallback",
96
+ "ambiguous-fallback",
97
+ "similarity"
98
+ ]
99
+ },
100
+ "matchCount": {
101
+ "type": "integer",
102
+ "minimum": 1
103
+ },
104
+ "score": {
105
+ "type": "number",
106
+ "minimum": 0,
107
+ "maximum": 1
108
+ }
109
+ }
110
+ }
111
+ }
112
+ }
113
+ },
114
+ "report": {
115
+ "type": "object",
116
+ "description": "Graph health and topology report",
117
+ "required": [
118
+ "hubs",
119
+ "bridgeCandidates",
120
+ "isolated",
121
+ "unresolvedLinks",
122
+ "edgeTypes",
123
+ "edgeConfidence",
124
+ "audit",
125
+ "communities"
126
+ ],
127
+ "properties": {
128
+ "hubs": {
129
+ "type": "array",
130
+ "description": "Highest-degree documents",
131
+ "items": { "$ref": "#/definitions/reportNode" }
132
+ },
133
+ "bridgeCandidates": {
134
+ "type": "array",
135
+ "description": "Bridge-like documents with both incoming and outgoing links",
136
+ "items": { "$ref": "#/definitions/reportNode" }
137
+ },
138
+ "isolated": {
139
+ "type": "object",
140
+ "required": ["total", "examples"],
141
+ "properties": {
142
+ "total": {
143
+ "type": "integer",
144
+ "description": "Total isolated active documents in scope",
145
+ "minimum": 0
146
+ },
147
+ "examples": {
148
+ "type": "array",
149
+ "description": "Example isolated documents",
150
+ "items": { "$ref": "#/definitions/reportNode" }
151
+ }
152
+ }
153
+ },
154
+ "unresolvedLinks": {
155
+ "type": "object",
156
+ "required": ["total", "byType"],
157
+ "properties": {
158
+ "total": {
159
+ "type": "integer",
160
+ "description": "Total unresolved wiki/markdown links in scope",
161
+ "minimum": 0
162
+ },
163
+ "byType": {
164
+ "type": "object",
165
+ "required": ["wiki", "markdown"],
166
+ "properties": {
167
+ "wiki": { "type": "integer", "minimum": 0 },
168
+ "markdown": { "type": "integer", "minimum": 0 }
169
+ }
170
+ }
171
+ }
172
+ },
173
+ "edgeTypes": {
174
+ "type": "object",
175
+ "required": ["wiki", "markdown", "similar"],
176
+ "properties": {
177
+ "wiki": { "type": "integer", "minimum": 0 },
178
+ "markdown": { "type": "integer", "minimum": 0 },
179
+ "similar": { "type": "integer", "minimum": 0 }
180
+ }
181
+ },
182
+ "edgeConfidence": {
183
+ "type": "object",
184
+ "description": "Edge confidence counts before edge-limit truncation",
185
+ "required": ["explicit", "inferred", "ambiguous", "similarity"],
186
+ "properties": {
187
+ "explicit": { "type": "integer", "minimum": 0 },
188
+ "inferred": { "type": "integer", "minimum": 0 },
189
+ "ambiguous": { "type": "integer", "minimum": 0 },
190
+ "similarity": { "type": "integer", "minimum": 0 }
191
+ }
192
+ },
193
+ "audit": {
194
+ "type": "object",
195
+ "description": "Graph audit rollups for fallback and similarity edges",
196
+ "required": ["inferredEdges", "ambiguousEdges", "similarityEdges"],
197
+ "properties": {
198
+ "inferredEdges": { "type": "integer", "minimum": 0 },
199
+ "ambiguousEdges": { "type": "integer", "minimum": 0 },
200
+ "similarityEdges": { "type": "integer", "minimum": 0 }
201
+ }
202
+ },
203
+ "communities": {
204
+ "type": "object",
205
+ "description": "Deterministic community analysis over returned nodes",
206
+ "required": ["total", "algorithm", "skipped", "assignments", "top"],
207
+ "properties": {
208
+ "total": { "type": "integer", "minimum": 0 },
209
+ "algorithm": {
210
+ "type": "string",
211
+ "enum": ["deterministic-label-propagation"]
212
+ },
213
+ "skipped": { "type": "boolean" },
214
+ "assignments": {
215
+ "type": "object",
216
+ "additionalProperties": { "type": "string" }
217
+ },
218
+ "top": {
219
+ "type": "array",
220
+ "items": { "$ref": "#/definitions/community" }
221
+ }
222
+ }
223
+ }
224
+ }
225
+ },
226
+ "meta": {
227
+ "type": "object",
228
+ "required": [
229
+ "nodeLimit",
230
+ "edgeLimit",
231
+ "totalNodes",
232
+ "totalEdges",
233
+ "totalEdgesUnresolved",
234
+ "returnedNodes",
235
+ "returnedEdges",
236
+ "truncated",
237
+ "linkedOnly",
238
+ "includedSimilar",
239
+ "similarAvailable",
240
+ "similarTopK",
241
+ "similarTruncatedByComputeBudget",
242
+ "warnings"
243
+ ],
244
+ "properties": {
245
+ "collection": {
246
+ "type": ["string", "null"],
247
+ "description": "Collection filter applied"
248
+ },
249
+ "nodeLimit": {
250
+ "type": "integer",
251
+ "description": "Node limit applied",
252
+ "minimum": 1
253
+ },
254
+ "edgeLimit": {
255
+ "type": "integer",
256
+ "description": "Edge limit applied",
257
+ "minimum": 1
258
+ },
259
+ "totalNodes": {
260
+ "type": "integer",
261
+ "description": "Total nodes before truncation",
262
+ "minimum": 0
263
+ },
264
+ "totalEdges": {
265
+ "type": "integer",
266
+ "description": "Total edges before truncation",
267
+ "minimum": 0
268
+ },
269
+ "totalEdgesUnresolved": {
270
+ "type": "integer",
271
+ "description": "Edges dropped due to unresolved targets",
272
+ "minimum": 0
273
+ },
274
+ "returnedNodes": {
275
+ "type": "integer",
276
+ "description": "Nodes actually returned",
277
+ "minimum": 0
278
+ },
279
+ "returnedEdges": {
280
+ "type": "integer",
281
+ "description": "Edges actually returned",
282
+ "minimum": 0
283
+ },
284
+ "truncated": {
285
+ "type": "boolean",
286
+ "description": "Whether results were truncated"
287
+ },
288
+ "linkedOnly": {
289
+ "type": "boolean",
290
+ "description": "Whether linkedOnly filter was applied"
291
+ },
292
+ "includedSimilar": {
293
+ "type": "boolean",
294
+ "description": "Whether similarity edges were included"
295
+ },
296
+ "similarAvailable": {
297
+ "type": "boolean",
298
+ "description": "Whether similarity search is available"
299
+ },
300
+ "similarTopK": {
301
+ "type": "integer",
302
+ "description": "Similar top-K value used",
303
+ "minimum": 1
304
+ },
305
+ "similarTruncatedByComputeBudget": {
306
+ "type": "boolean",
307
+ "description": "Whether similarity was truncated by compute budget"
308
+ },
309
+ "warnings": {
310
+ "type": "array",
311
+ "description": "Warning messages",
312
+ "items": {
313
+ "type": "string"
314
+ }
315
+ }
316
+ }
317
+ }
318
+ },
319
+ "definitions": {
320
+ "reportNode": {
321
+ "type": "object",
322
+ "required": ["id", "uri", "collection", "relPath", "degree"],
323
+ "properties": {
324
+ "id": {
325
+ "type": "string",
326
+ "description": "Document ID (#hex)"
327
+ },
328
+ "uri": {
329
+ "type": "string",
330
+ "description": "Document URI (gno://collection/path)"
331
+ },
332
+ "title": {
333
+ "type": ["string", "null"],
334
+ "description": "Document title"
335
+ },
336
+ "collection": {
337
+ "type": "string",
338
+ "description": "Collection name"
339
+ },
340
+ "relPath": {
341
+ "type": "string",
342
+ "description": "Relative path within collection"
343
+ },
344
+ "degree": {
345
+ "type": "integer",
346
+ "description": "Total degree (in + out unique neighbors)",
347
+ "minimum": 0
348
+ },
349
+ "communityId": {
350
+ "type": "string",
351
+ "description": "Optional deterministic community id"
352
+ }
353
+ }
354
+ },
355
+ "community": {
356
+ "type": "object",
357
+ "required": ["id", "label", "size", "edgeCount", "density", "topNodes"],
358
+ "properties": {
359
+ "id": { "type": "string" },
360
+ "label": { "type": "string" },
361
+ "size": { "type": "integer", "minimum": 1 },
362
+ "edgeCount": { "type": "integer", "minimum": 0 },
363
+ "density": { "type": "number", "minimum": 0 },
364
+ "topNodes": {
365
+ "type": "array",
366
+ "items": { "$ref": "#/definitions/reportNode" }
367
+ }
368
+ }
369
+ }
370
+ }
371
+ }
@@ -0,0 +1,186 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "gno://schemas/links-list@1.1",
4
+ "title": "GNO Links List",
5
+ "description": "List of outgoing links from a document",
6
+ "type": "object",
7
+ "required": ["links", "meta"],
8
+ "properties": {
9
+ "links": {
10
+ "type": "array",
11
+ "description": "List of outgoing links",
12
+ "items": {
13
+ "oneOf": [
14
+ {
15
+ "type": "object",
16
+ "required": ["targetRef", "linkType", "startLine", "startCol"],
17
+ "additionalProperties": false,
18
+ "properties": {
19
+ "targetRef": {
20
+ "type": "string",
21
+ "description": "Target reference (path or wiki name)"
22
+ },
23
+ "targetRefNorm": {
24
+ "type": "string",
25
+ "description": "Normalized target reference for matching"
26
+ },
27
+ "targetAnchor": {
28
+ "type": "string",
29
+ "description": "Target anchor/fragment without #"
30
+ },
31
+ "targetCollection": {
32
+ "type": "string",
33
+ "description": "Explicit collection prefix"
34
+ },
35
+ "linkType": {
36
+ "type": "string",
37
+ "enum": ["wiki", "markdown"],
38
+ "description": "Link type"
39
+ },
40
+ "linkText": {
41
+ "type": "string",
42
+ "description": "Display text (truncated 256 graphemes)"
43
+ },
44
+ "startLine": {
45
+ "type": "integer",
46
+ "description": "1-based line number",
47
+ "minimum": 1
48
+ },
49
+ "startCol": {
50
+ "type": "integer",
51
+ "description": "1-based column",
52
+ "minimum": 1
53
+ },
54
+ "endLine": {
55
+ "type": "integer",
56
+ "description": "1-based end line",
57
+ "minimum": 1
58
+ },
59
+ "endCol": {
60
+ "type": "integer",
61
+ "description": "1-based end column",
62
+ "minimum": 1
63
+ },
64
+ "source": {
65
+ "type": "string",
66
+ "enum": ["parsed", "user", "suggested"],
67
+ "description": "Source of the positional link"
68
+ },
69
+ "resolved": {
70
+ "type": "boolean",
71
+ "description": "Whether target document exists in index"
72
+ },
73
+ "resolvedDocid": {
74
+ "type": "string",
75
+ "description": "Docid of resolved target document"
76
+ },
77
+ "resolvedUri": {
78
+ "type": "string",
79
+ "description": "URI of resolved target document"
80
+ },
81
+ "resolvedTitle": {
82
+ "type": "string",
83
+ "description": "Title of resolved target document"
84
+ }
85
+ }
86
+ },
87
+ {
88
+ "type": "object",
89
+ "required": [
90
+ "targetDocid",
91
+ "targetUri",
92
+ "edgeType",
93
+ "confidence",
94
+ "edgeSource"
95
+ ],
96
+ "additionalProperties": false,
97
+ "properties": {
98
+ "targetDocid": {
99
+ "type": "string",
100
+ "description": "Target document ID"
101
+ },
102
+ "targetUri": {
103
+ "type": "string",
104
+ "description": "Target document URI"
105
+ },
106
+ "targetTitle": {
107
+ "type": "string",
108
+ "description": "Target document title"
109
+ },
110
+ "edgeType": {
111
+ "type": "string",
112
+ "description": "Semantic relationship type"
113
+ },
114
+ "relationType": {
115
+ "type": "string",
116
+ "description": "Alias of edgeType"
117
+ },
118
+ "confidence": {
119
+ "type": "string",
120
+ "enum": ["parsed", "configured", "manual", "inferred"]
121
+ },
122
+ "edgeSource": {
123
+ "type": "string",
124
+ "enum": ["wikilink", "markdown-link", "frontmatter-relation"]
125
+ }
126
+ }
127
+ }
128
+ ]
129
+ }
130
+ },
131
+ "meta": {
132
+ "type": "object",
133
+ "required": [
134
+ "docid",
135
+ "totalLinks",
136
+ "resolvedCount",
137
+ "resolutionAvailable"
138
+ ],
139
+ "properties": {
140
+ "docid": {
141
+ "type": "string",
142
+ "description": "Source document ID"
143
+ },
144
+ "uri": {
145
+ "type": "string",
146
+ "description": "Source document URI"
147
+ },
148
+ "title": {
149
+ "type": "string",
150
+ "description": "Source document title"
151
+ },
152
+ "totalLinks": {
153
+ "type": "integer",
154
+ "description": "Total number of outgoing links",
155
+ "minimum": 0
156
+ },
157
+ "resolvedCount": {
158
+ "type": "integer",
159
+ "description": "Number of links that resolved to existing documents",
160
+ "minimum": 0
161
+ },
162
+ "resolutionAvailable": {
163
+ "type": "boolean",
164
+ "description": "Whether link resolution completed successfully"
165
+ },
166
+ "typeFilter": {
167
+ "type": "string",
168
+ "enum": ["wiki", "markdown"],
169
+ "description": "Link type filter applied"
170
+ },
171
+ "edgeTypeFilter": {
172
+ "type": "string",
173
+ "description": "Semantic edge-type filter applied"
174
+ },
175
+ "relationFilter": {
176
+ "type": "string",
177
+ "description": "Semantic relation filter applied"
178
+ },
179
+ "semantic": {
180
+ "type": "boolean",
181
+ "description": "Whether links came from the semantic edge layer"
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "gno://schemas/mcp-add-collection-result@1.0",
4
+ "title": "GNO MCP Add Collection Result",
5
+ "description": "Result payload for gno_add_collection",
6
+ "type": "object",
7
+ "required": ["jobId", "collection", "status"],
8
+ "properties": {
9
+ "jobId": {
10
+ "type": "string",
11
+ "description": "Job identifier"
12
+ },
13
+ "collection": {
14
+ "type": "string",
15
+ "description": "Normalized collection name"
16
+ },
17
+ "status": {
18
+ "type": "string",
19
+ "description": "Job status",
20
+ "enum": ["started"]
21
+ }
22
+ }
23
+ }