@gmickel/gno 1.18.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 (129) hide show
  1. package/README.md +5 -3
  2. package/assets/skill/SKILL.md +27 -0
  3. package/package.json +2 -1
  4. package/spec/AGENTS.md +83 -0
  5. package/spec/CLAUDE.md +83 -0
  6. package/spec/bench-fixture.schema.json +137 -0
  7. package/spec/cli.md +2894 -0
  8. package/spec/db/schema.sql +442 -0
  9. package/spec/evals-agentic.md +510 -0
  10. package/spec/evals.md +1106 -0
  11. package/spec/mcp.md +2229 -0
  12. package/spec/output-schemas/activation-verification.schema.json +515 -0
  13. package/spec/output-schemas/ask.schema.json +366 -0
  14. package/spec/output-schemas/backlinks.schema.json +131 -0
  15. package/spec/output-schemas/bench-result.schema.json +120 -0
  16. package/spec/output-schemas/capture-receipt.schema.json +143 -0
  17. package/spec/output-schemas/collection-list.schema.json +45 -0
  18. package/spec/output-schemas/context-capsule-v1.schema.json +691 -0
  19. package/spec/output-schemas/context-capsule-verification.schema.json +1338 -0
  20. package/spec/output-schemas/context-list.schema.json +21 -0
  21. package/spec/output-schemas/doctor.schema.json +313 -0
  22. package/spec/output-schemas/error.schema.json +30 -0
  23. package/spec/output-schemas/expansion.schema.json +37 -0
  24. package/spec/output-schemas/get.schema.json +140 -0
  25. package/spec/output-schemas/graph-query.schema.json +99 -0
  26. package/spec/output-schemas/graph.schema.json +371 -0
  27. package/spec/output-schemas/links-list.schema.json +186 -0
  28. package/spec/output-schemas/mcp-add-collection-result.schema.json +23 -0
  29. package/spec/output-schemas/mcp-capture-result.schema.json +152 -0
  30. package/spec/output-schemas/mcp-http-error.schema.json +30 -0
  31. package/spec/output-schemas/mcp-job-list.schema.json +58 -0
  32. package/spec/output-schemas/mcp-job-status.schema.json +224 -0
  33. package/spec/output-schemas/mcp-remove-result.schema.json +39 -0
  34. package/spec/output-schemas/mcp-sync-result.schema.json +41 -0
  35. package/spec/output-schemas/mcp-tag-result.schema.json +33 -0
  36. package/spec/output-schemas/models-list.schema.json +93 -0
  37. package/spec/output-schemas/multi-get.schema.json +103 -0
  38. package/spec/output-schemas/process-status.schema.json +119 -0
  39. package/spec/output-schemas/query-diagnose.schema.json +123 -0
  40. package/spec/output-schemas/resident-status.schema.json +154 -0
  41. package/spec/output-schemas/retrieval-trace-common.schema.json +492 -0
  42. package/spec/output-schemas/retrieval-trace-delete.schema.json +16 -0
  43. package/spec/output-schemas/retrieval-trace-export.schema.json +61 -0
  44. package/spec/output-schemas/retrieval-trace-filters.schema.json +139 -0
  45. package/spec/output-schemas/retrieval-trace-judgment.schema.json +15 -0
  46. package/spec/output-schemas/retrieval-trace-list.schema.json +18 -0
  47. package/spec/output-schemas/retrieval-trace-payloads.schema.json +178 -0
  48. package/spec/output-schemas/retrieval-trace-purge.schema.json +31 -0
  49. package/spec/output-schemas/retrieval-trace-qrels.schema.json +303 -0
  50. package/spec/output-schemas/retrieval-trace-replay.schema.json +286 -0
  51. package/spec/output-schemas/retrieval-trace-show.schema.json +69 -0
  52. package/spec/output-schemas/retrieval-trace-summary.schema.json +65 -0
  53. package/spec/output-schemas/search-result.schema.json +154 -0
  54. package/spec/output-schemas/search-results.schema.json +338 -0
  55. package/spec/output-schemas/similar.schema.json +84 -0
  56. package/spec/output-schemas/status.schema.json +676 -0
  57. package/spec/output-schemas/tags-list.schema.json +48 -0
  58. package/src/app/context-runtime-types.ts +3 -0
  59. package/src/app/context-runtime.ts +15 -1
  60. package/src/cli/commands/ask.ts +106 -36
  61. package/src/cli/commands/context-build.ts +56 -9
  62. package/src/cli/commands/get.ts +64 -3
  63. package/src/cli/commands/query.ts +62 -23
  64. package/src/cli/commands/replay.ts +140 -0
  65. package/src/cli/commands/search.ts +48 -3
  66. package/src/cli/commands/shared.ts +3 -1
  67. package/src/cli/commands/trace.ts +200 -0
  68. package/src/cli/commands/vsearch.ts +75 -53
  69. package/src/cli/program.ts +255 -0
  70. package/src/config/index.ts +9 -0
  71. package/src/config/retrieval-traces.ts +56 -0
  72. package/src/config/types.ts +4 -0
  73. package/src/core/context-compiler.ts +11 -4
  74. package/src/core/retrieval-qrels.ts +405 -0
  75. package/src/core/retrieval-replay-candidate.ts +368 -0
  76. package/src/core/retrieval-replay-types.ts +109 -0
  77. package/src/core/retrieval-replay-validation.ts +89 -0
  78. package/src/core/retrieval-replay.ts +441 -0
  79. package/src/core/retrieval-trace-evidence-origin.ts +175 -0
  80. package/src/core/retrieval-trace-export.ts +113 -0
  81. package/src/core/retrieval-trace-filter-normalization.ts +27 -0
  82. package/src/core/retrieval-trace-filters.ts +19 -0
  83. package/src/core/retrieval-trace-management-helpers.ts +247 -0
  84. package/src/core/retrieval-trace-management-types.ts +132 -0
  85. package/src/core/retrieval-trace-management.ts +422 -0
  86. package/src/core/retrieval-trace-request.ts +141 -0
  87. package/src/core/retrieval-trace-session.ts +494 -0
  88. package/src/core/retrieval-trace.ts +472 -0
  89. package/src/mcp/tools/context.ts +59 -8
  90. package/src/mcp/tools/get.ts +35 -1
  91. package/src/mcp/tools/index.ts +74 -0
  92. package/src/mcp/tools/query.ts +95 -64
  93. package/src/mcp/tools/search.ts +36 -13
  94. package/src/mcp/tools/trace.ts +143 -0
  95. package/src/mcp/tools/vsearch.ts +71 -38
  96. package/src/pipeline/answer.ts +167 -26
  97. package/src/pipeline/graph-retrieval.ts +15 -1
  98. package/src/pipeline/hybrid.ts +151 -43
  99. package/src/pipeline/search.ts +36 -3
  100. package/src/pipeline/trace-metadata.ts +47 -0
  101. package/src/pipeline/types.ts +43 -0
  102. package/src/pipeline/vsearch.ts +101 -38
  103. package/src/sdk/client.ts +380 -71
  104. package/src/sdk/documents.ts +48 -1
  105. package/src/sdk/index.ts +17 -0
  106. package/src/sdk/types.ts +28 -0
  107. package/src/serve/context-capsule.ts +67 -8
  108. package/src/serve/public/app.tsx +12 -1
  109. package/src/serve/public/globals.built.css +1 -1
  110. package/src/serve/public/lib/workspace-tabs.ts +2 -0
  111. package/src/serve/public/pages/Dashboard.tsx +10 -0
  112. package/src/serve/public/pages/TraceHistory.tsx +478 -0
  113. package/src/serve/public/pages/trace-history-detail.tsx +224 -0
  114. package/src/serve/retrieval-trace.ts +28 -0
  115. package/src/serve/routes/api.ts +366 -72
  116. package/src/serve/routes/traces.ts +156 -0
  117. package/src/serve/server.ts +87 -2
  118. package/src/store/index.ts +31 -0
  119. package/src/store/migrations/014-retrieval-traces.ts +303 -0
  120. package/src/store/migrations/index.ts +2 -0
  121. package/src/store/retrieval-trace-codec.ts +384 -0
  122. package/src/store/sqlite/adapter.ts +153 -1
  123. package/src/store/sqlite/retrieval-trace-management-store.ts +341 -0
  124. package/src/store/sqlite/retrieval-trace-retention.ts +349 -0
  125. package/src/store/sqlite/retrieval-trace-rows.ts +267 -0
  126. package/src/store/sqlite/retrieval-trace-store.ts +515 -0
  127. package/src/store/types.ts +297 -0
  128. package/src/store/vector/sqlite-vec.ts +76 -1
  129. package/src/store/vector/types.ts +1 -1
@@ -0,0 +1,143 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "gno://schemas/capture-receipt@1.0",
4
+ "title": "GNO Capture Receipt",
5
+ "description": "Shared receipt returned by capture surfaces after a write/open decision.",
6
+ "type": "object",
7
+ "required": [
8
+ "uri",
9
+ "collection",
10
+ "relPath",
11
+ "created",
12
+ "openedExisting",
13
+ "createdWithSuffix",
14
+ "contentHash",
15
+ "source",
16
+ "tags",
17
+ "sync",
18
+ "embed",
19
+ "collisionPolicyResult"
20
+ ],
21
+ "properties": {
22
+ "uri": {
23
+ "type": "string",
24
+ "description": "GNO URI for the captured note.",
25
+ "pattern": "^gno://[^/]+/.+"
26
+ },
27
+ "docid": {
28
+ "type": "string",
29
+ "description": "Document id when sync has resolved it."
30
+ },
31
+ "collection": {
32
+ "type": "string",
33
+ "description": "Target collection name."
34
+ },
35
+ "relPath": {
36
+ "type": "string",
37
+ "description": "Relative path within the collection."
38
+ },
39
+ "absPath": {
40
+ "type": "string",
41
+ "description": "Absolute path when the local surface exposes it."
42
+ },
43
+ "created": {
44
+ "type": "boolean",
45
+ "description": "True when a new file was written."
46
+ },
47
+ "openedExisting": {
48
+ "type": "boolean",
49
+ "description": "True when collision policy selected an existing file."
50
+ },
51
+ "createdWithSuffix": {
52
+ "type": "boolean",
53
+ "description": "True when a suffixed path was created after collision."
54
+ },
55
+ "overwritten": {
56
+ "type": "boolean",
57
+ "description": "Legacy compatibility flag for overwrite-capable surfaces."
58
+ },
59
+ "contentHash": {
60
+ "type": "string",
61
+ "description": "SHA-256 hash of normalized capture body content.",
62
+ "pattern": "^[a-f0-9]{64}$"
63
+ },
64
+ "source": {
65
+ "type": "object",
66
+ "required": ["kind", "capturedAt"],
67
+ "properties": {
68
+ "kind": {
69
+ "type": "string",
70
+ "enum": [
71
+ "direct",
72
+ "web",
73
+ "email",
74
+ "meeting",
75
+ "chat",
76
+ "file",
77
+ "api",
78
+ "unknown"
79
+ ]
80
+ },
81
+ "title": { "type": "string" },
82
+ "url": { "type": "string", "format": "uri" },
83
+ "uri": { "type": "string" },
84
+ "docid": { "type": "string" },
85
+ "mime": { "type": "string" },
86
+ "ext": { "type": "string" },
87
+ "author": { "type": "string" },
88
+ "observedAt": { "type": "string", "format": "date-time" },
89
+ "capturedAt": { "type": "string", "format": "date-time" },
90
+ "externalId": { "type": "string" }
91
+ }
92
+ },
93
+ "tags": {
94
+ "type": "array",
95
+ "items": { "type": "string" }
96
+ },
97
+ "sync": {
98
+ "$ref": "#/definitions/indexStatus"
99
+ },
100
+ "embed": {
101
+ "$ref": "#/definitions/indexStatus"
102
+ },
103
+ "collisionPolicyResult": {
104
+ "type": "string",
105
+ "enum": [
106
+ "created",
107
+ "opened_existing",
108
+ "created_with_suffix",
109
+ "overwritten",
110
+ "conflict"
111
+ ]
112
+ }
113
+ },
114
+ "definitions": {
115
+ "indexStatus": {
116
+ "type": "object",
117
+ "required": ["status"],
118
+ "properties": {
119
+ "status": {
120
+ "type": "string",
121
+ "enum": [
122
+ "not_requested",
123
+ "pending",
124
+ "running",
125
+ "completed",
126
+ "skipped",
127
+ "failed",
128
+ "unknown"
129
+ ]
130
+ },
131
+ "jobId": {
132
+ "type": ["string", "null"]
133
+ },
134
+ "reason": {
135
+ "type": "string"
136
+ },
137
+ "error": {
138
+ "type": "string"
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "gno://schemas/collection-list@1.0",
4
+ "title": "GNO Collection List",
5
+ "description": "List of configured collections",
6
+ "type": "array",
7
+ "items": {
8
+ "type": "object",
9
+ "required": ["name", "path", "pattern", "include", "exclude"],
10
+ "properties": {
11
+ "name": {
12
+ "type": "string",
13
+ "description": "Collection identifier (lowercase, alphanumeric with hyphens/underscores)",
14
+ "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
15
+ },
16
+ "path": {
17
+ "type": "string",
18
+ "description": "Absolute path to collection root directory"
19
+ },
20
+ "pattern": {
21
+ "type": "string",
22
+ "description": "Glob pattern for file matching",
23
+ "default": "**/*"
24
+ },
25
+ "include": {
26
+ "type": "array",
27
+ "description": "Extension allowlist (empty = all)",
28
+ "items": { "type": "string" }
29
+ },
30
+ "exclude": {
31
+ "type": "array",
32
+ "description": "Path patterns to skip",
33
+ "items": { "type": "string" }
34
+ },
35
+ "updateCmd": {
36
+ "type": "string",
37
+ "description": "Optional shell command to run before indexing"
38
+ },
39
+ "languageHint": {
40
+ "type": "string",
41
+ "description": "BCP-47 language hint for the collection"
42
+ }
43
+ }
44
+ }
45
+ }