@gmickel/gno 2.5.1 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -5
- package/assets/skill/README.md +5 -1
- package/assets/skill/SKILL.md +80 -4
- package/assets/skill/cli-reference.md +132 -2
- package/assets/skill/examples.md +30 -0
- package/assets/skill/mcp-reference.md +54 -1
- package/assets/skill/recipes/capture-and-file.md +6 -0
- package/assets/skill/recipes/memory-file-decision.md +6 -0
- package/assets/skill/recipes/memory-supersede-fact.md +5 -0
- package/assets/skill/recipes/session-evidence-lookup.md +98 -0
- package/assets/spa-production.json.gz +0 -0
- package/browser-extension/artifacts/{gno-browser-clipper-v2.5.1.zip → gno-browser-clipper-v2.7.0.zip} +0 -0
- package/browser-extension/artifacts/gno-browser-clipper-v2.7.0.zip.sha256 +1 -0
- package/browser-extension/dist/manifest.json +1 -1
- package/package.json +2 -1
- package/spec/cli.md +449 -35
- package/spec/mcp.md +234 -4
- package/spec/output-schemas/ask.schema.json +1 -1
- package/spec/output-schemas/capture-receipt.schema.json +4 -1
- package/spec/output-schemas/doctor.schema.json +88 -0
- package/spec/output-schemas/error.schema.json +11 -2
- package/spec/output-schemas/get.schema.json +1 -1
- package/spec/output-schemas/mcp-capture-result.schema.json +4 -2
- package/spec/output-schemas/memory-remember.schema.json +10 -4
- package/spec/output-schemas/multi-get.schema.json +4 -1
- package/spec/output-schemas/peek.schema.json +2 -9
- package/spec/output-schemas/request-status.schema.json +113 -0
- package/spec/output-schemas/resident-status.schema.json +22 -0
- package/spec/output-schemas/search-result.schema.json +1 -1
- package/spec/output-schemas/search-results.schema.json +1 -1
- package/spec/output-schemas/sessions-automation-run.schema.json +46 -0
- package/spec/output-schemas/sessions-discovery.schema.json +38 -0
- package/spec/output-schemas/sessions-import-receipt.schema.json +156 -0
- package/spec/output-schemas/sessions-status.schema.json +432 -0
- package/spec/output-schemas/status.schema.json +98 -0
- package/src/cli/commands/ask.ts +14 -2
- package/src/cli/commands/capture.ts +55 -96
- package/src/cli/commands/daemon.ts +41 -0
- package/src/cli/commands/doctor.ts +54 -20
- package/src/cli/commands/embed.ts +41 -3
- package/src/cli/commands/ls.ts +3 -0
- package/src/cli/commands/memory.ts +12 -3
- package/src/cli/commands/query.ts +5 -0
- package/src/cli/commands/request-status.ts +59 -0
- package/src/cli/commands/reset.ts +39 -5
- package/src/cli/commands/sessions.ts +713 -0
- package/src/cli/commands/shared.ts +14 -1
- package/src/cli/commands/status.ts +63 -5
- package/src/cli/commands/vec.ts +54 -0
- package/src/cli/detach.ts +29 -1
- package/src/cli/errors.ts +13 -9
- package/src/cli/program.ts +441 -2
- package/src/cli/session-binding.ts +49 -0
- package/src/config/types.ts +8 -0
- package/src/core/capture-publish.ts +239 -0
- package/src/core/capture-sync.ts +12 -2
- package/src/core/host-paths.ts +31 -0
- package/src/core/memory-remember.ts +234 -122
- package/src/core/memory-types.ts +11 -0
- package/src/core/network-boundary-inventory.ts +8 -0
- package/src/core/request-receipts.ts +671 -0
- package/src/core/shutdown-budget.ts +6 -0
- package/src/core/vector-partition-status.ts +52 -0
- package/src/embed/backlog.ts +124 -18
- package/src/embed/fingerprint.ts +6 -3
- package/src/embed/retry.ts +66 -27
- package/src/embed/variant-backlog.ts +15 -10
- package/src/embed/variant-retry.ts +31 -22
- package/src/index.ts +30 -2
- package/src/llm/native-worker/dispatcher.ts +2 -0
- package/src/llm/native-worker/embedding-identity.ts +42 -0
- package/src/llm/native-worker/protocol.ts +1 -0
- package/src/llm/types.ts +3 -0
- package/src/mcp/context.ts +17 -0
- package/src/mcp/http-egress.ts +4 -0
- package/src/mcp/http-transport.ts +2 -0
- package/src/mcp/resources/index.ts +6 -5
- package/src/mcp/tool-descriptions-core.ts +1 -1
- package/src/mcp/tools/capture.ts +87 -85
- package/src/mcp/tools/index.ts +77 -4
- package/src/mcp/tools/memory-remember.ts +8 -1
- package/src/mcp/tools/memory-shared.ts +7 -1
- package/src/mcp/tools/request-status.ts +73 -0
- package/src/mcp/tools/sessions.ts +208 -0
- package/src/mcp/tools/status.ts +4 -0
- package/src/pipeline/hybrid.ts +37 -7
- package/src/pipeline/vsearch.ts +14 -2
- package/src/sdk/client.ts +180 -84
- package/src/sdk/index.ts +6 -0
- package/src/sdk/types.ts +54 -2
- package/src/serve/capture-service.ts +98 -32
- package/src/serve/config-sync.ts +3 -2
- package/src/serve/embed-scheduler.ts +133 -19
- package/src/serve/host-path-redaction.ts +79 -0
- package/src/serve/public/app.tsx +4 -1
- package/src/serve/public/components/CaptureModal.tsx +26 -8
- package/src/serve/public/components/sessions/AutomationPanel.tsx +800 -0
- package/src/serve/public/components/sessions/ImportReceipt.tsx +238 -0
- package/src/serve/public/components/sessions/SessionSearch.tsx +286 -0
- package/src/serve/public/components/sessions/SourcesPanel.tsx +541 -0
- package/src/serve/public/components/sessions/api.ts +40 -0
- package/src/serve/public/globals.built.css +1 -1
- package/src/serve/public/hooks/use-api.ts +26 -3
- package/src/serve/public/lib/request-intent.ts +77 -0
- package/src/serve/public/lib/snippet.tsx +52 -0
- package/src/serve/public/lib/workspace-actions.ts +12 -1
- package/src/serve/public/lib/workspace-tabs.ts +2 -0
- package/src/serve/public/pages/Dashboard.tsx +22 -9
- package/src/serve/public/pages/DocView.tsx +25 -6
- package/src/serve/public/pages/DocumentEditor.tsx +224 -104
- package/src/serve/public/pages/Search.tsx +1 -41
- package/src/serve/public/pages/Sessions.tsx +350 -0
- package/src/serve/resident-runtime.ts +69 -4
- package/src/serve/resident-status.ts +13 -1
- package/src/serve/routes/api.ts +476 -147
- package/src/serve/routes/sessions.ts +766 -0
- package/src/serve/security.ts +9 -0
- package/src/serve/server.ts +215 -10
- package/src/serve/session-automation.ts +146 -0
- package/src/serve/status-model.ts +16 -0
- package/src/serve/status.ts +2 -0
- package/src/serve/watch-reconciliation-shared.ts +3 -0
- package/src/serve/watch-service-events.ts +3 -2
- package/src/serve/watch-service-run-flush.ts +35 -2
- package/src/serve/watch-service.ts +5 -0
- package/src/sessions/archive.ts +348 -0
- package/src/sessions/automation-state.ts +444 -0
- package/src/sessions/automation-status.ts +239 -0
- package/src/sessions/automation.ts +1169 -0
- package/src/sessions/binding.ts +105 -0
- package/src/sessions/claude-hook.ts +240 -0
- package/src/sessions/config.ts +176 -0
- package/src/sessions/format.ts +191 -0
- package/src/sessions/import-child-env.ts +8 -0
- package/src/sessions/import-child.ts +152 -0
- package/src/sessions/parsers/claude-code.ts +259 -0
- package/src/sessions/parsers/codex.ts +303 -0
- package/src/sessions/parsers/hermes.ts +248 -0
- package/src/sessions/parsers/openclaw.ts +496 -0
- package/src/sessions/parsers/shared.ts +184 -0
- package/src/sessions/sanitize.ts +222 -0
- package/src/sessions/service.ts +1533 -0
- package/src/sessions/setup.ts +477 -0
- package/src/sessions/sources.ts +518 -0
- package/src/sessions/state.ts +118 -0
- package/src/sessions/types.ts +457 -0
- package/src/store/migrations/031-runtime-independent-vectors.ts +29 -0
- package/src/store/migrations/032-vector-runtime-callers.ts +17 -0
- package/src/store/migrations/index.ts +4 -0
- package/src/store/sqlite/adapter.ts +76 -16
- package/src/store/sqlite/scoped-index.ts +9 -0
- package/src/store/types.ts +11 -1
- package/src/store/vector/lazy.ts +46 -43
- package/src/store/vector/runtime-compat.ts +651 -0
- package/src/store/vector/sqlite-vec.ts +20 -2
- package/src/store/vector/status.ts +276 -35
- package/src/store/vector/types.ts +2 -0
- package/src/store/vector/variant-search.ts +71 -23
- package/src/store/vector/variants.ts +49 -14
- package/browser-extension/artifacts/gno-browser-clipper-v2.5.1.zip.sha256 +0 -1
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/sessions-status@1.0",
|
|
4
|
+
"title": "GNO Session Archive Status",
|
|
5
|
+
"description": "Shared status of a session archive on every surface (CLI `gno sessions status --json`, MCP gno_sessions_status, REST GET /api/sessions/status, SDK client.sessionsStatus()). Derived from SessionsStatus in src/sessions/types.ts. Includes opt-in automation state. Contains no host paths and no session content.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schemaVersion",
|
|
10
|
+
"configured",
|
|
11
|
+
"index",
|
|
12
|
+
"collections",
|
|
13
|
+
"sources",
|
|
14
|
+
"automation",
|
|
15
|
+
"warnings"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"schemaVersion": {
|
|
19
|
+
"const": "1"
|
|
20
|
+
},
|
|
21
|
+
"configured": {
|
|
22
|
+
"const": true
|
|
23
|
+
},
|
|
24
|
+
"index": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1
|
|
27
|
+
},
|
|
28
|
+
"collections": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"required": ["name", "threads"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"name": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"threads": {
|
|
39
|
+
"type": "integer",
|
|
40
|
+
"minimum": 0
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"sources": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"required": [
|
|
51
|
+
"id",
|
|
52
|
+
"harness",
|
|
53
|
+
"collection",
|
|
54
|
+
"available",
|
|
55
|
+
"units",
|
|
56
|
+
"archivedThreads",
|
|
57
|
+
"staleParser",
|
|
58
|
+
"sourceUnavailable",
|
|
59
|
+
"lastImportAt"
|
|
60
|
+
],
|
|
61
|
+
"properties": {
|
|
62
|
+
"id": { "type": "string" },
|
|
63
|
+
"harness": { "enum": ["codex", "claude-code", "openclaw", "hermes"] },
|
|
64
|
+
"collection": { "type": "string" },
|
|
65
|
+
"available": {
|
|
66
|
+
"type": "boolean",
|
|
67
|
+
"description": "False when the source root is missing or cannot be listed."
|
|
68
|
+
},
|
|
69
|
+
"units": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": [
|
|
73
|
+
"total",
|
|
74
|
+
"complete",
|
|
75
|
+
"incomplete",
|
|
76
|
+
"failed",
|
|
77
|
+
"pending"
|
|
78
|
+
],
|
|
79
|
+
"properties": {
|
|
80
|
+
"total": {
|
|
81
|
+
"type": "integer",
|
|
82
|
+
"minimum": 0
|
|
83
|
+
},
|
|
84
|
+
"complete": {
|
|
85
|
+
"type": "integer",
|
|
86
|
+
"minimum": 0
|
|
87
|
+
},
|
|
88
|
+
"incomplete": {
|
|
89
|
+
"type": "integer",
|
|
90
|
+
"minimum": 0
|
|
91
|
+
},
|
|
92
|
+
"failed": {
|
|
93
|
+
"type": "integer",
|
|
94
|
+
"minimum": 0
|
|
95
|
+
},
|
|
96
|
+
"pending": {
|
|
97
|
+
"type": "integer",
|
|
98
|
+
"minimum": 0
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"archivedThreads": {
|
|
103
|
+
"type": "integer",
|
|
104
|
+
"minimum": 0
|
|
105
|
+
},
|
|
106
|
+
"staleParser": {
|
|
107
|
+
"type": "integer",
|
|
108
|
+
"minimum": 0,
|
|
109
|
+
"description": "Archived units produced by an older parser whose source is no longer available to reparse."
|
|
110
|
+
},
|
|
111
|
+
"sourceUnavailable": {
|
|
112
|
+
"type": "integer",
|
|
113
|
+
"minimum": 0,
|
|
114
|
+
"description": "Archived units whose source no longer exists; their archive is retained until an explicit prune."
|
|
115
|
+
},
|
|
116
|
+
"lastImportAt": {
|
|
117
|
+
"type": ["string", "null"],
|
|
118
|
+
"format": "date-time"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"automation": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": ["daemon", "timezone", "profiles"],
|
|
127
|
+
"properties": {
|
|
128
|
+
"daemon": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"additionalProperties": false,
|
|
131
|
+
"required": ["state", "heartbeatAt"],
|
|
132
|
+
"properties": {
|
|
133
|
+
"state": {
|
|
134
|
+
"enum": ["running", "not_running", "stale"],
|
|
135
|
+
"description": "running only with a fresh heartbeat from a live daemon on this archive; serve never counts."
|
|
136
|
+
},
|
|
137
|
+
"heartbeatAt": {
|
|
138
|
+
"type": ["string", "null"],
|
|
139
|
+
"format": "date-time"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"timezone": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"description": "IANA timezone for human-readable times; stored instants are UTC."
|
|
146
|
+
},
|
|
147
|
+
"profiles": {
|
|
148
|
+
"type": "array",
|
|
149
|
+
"items": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"additionalProperties": false,
|
|
152
|
+
"required": [
|
|
153
|
+
"id",
|
|
154
|
+
"sources",
|
|
155
|
+
"collections",
|
|
156
|
+
"state",
|
|
157
|
+
"hook",
|
|
158
|
+
"schedule",
|
|
159
|
+
"limit",
|
|
160
|
+
"retries",
|
|
161
|
+
"pending",
|
|
162
|
+
"running",
|
|
163
|
+
"lastTrigger",
|
|
164
|
+
"lastRun",
|
|
165
|
+
"lastSuccessAt",
|
|
166
|
+
"retryAt",
|
|
167
|
+
"recovery"
|
|
168
|
+
],
|
|
169
|
+
"properties": {
|
|
170
|
+
"id": {
|
|
171
|
+
"type": "string"
|
|
172
|
+
},
|
|
173
|
+
"sources": {
|
|
174
|
+
"type": "array",
|
|
175
|
+
"items": {
|
|
176
|
+
"type": "string"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"collections": {
|
|
180
|
+
"type": "array",
|
|
181
|
+
"items": {
|
|
182
|
+
"type": "string"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"state": {
|
|
186
|
+
"enum": [
|
|
187
|
+
"off",
|
|
188
|
+
"idle",
|
|
189
|
+
"pending",
|
|
190
|
+
"running",
|
|
191
|
+
"retrying",
|
|
192
|
+
"partial",
|
|
193
|
+
"failed"
|
|
194
|
+
],
|
|
195
|
+
"description": "off: no trigger enabled and nothing pending. partial/failed describe the last run."
|
|
196
|
+
},
|
|
197
|
+
"hook": {
|
|
198
|
+
"oneOf": [
|
|
199
|
+
{
|
|
200
|
+
"type": "null"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"type": "object",
|
|
204
|
+
"additionalProperties": false,
|
|
205
|
+
"required": ["harness", "enabled", "installed"],
|
|
206
|
+
"properties": {
|
|
207
|
+
"harness": {
|
|
208
|
+
"enum": ["claude-code"]
|
|
209
|
+
},
|
|
210
|
+
"enabled": {
|
|
211
|
+
"type": "boolean"
|
|
212
|
+
},
|
|
213
|
+
"installed": {
|
|
214
|
+
"type": ["boolean", "null"],
|
|
215
|
+
"description": "Owned entry present in the host settings file; null when the file cannot be read."
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
"schedule": {
|
|
222
|
+
"oneOf": [
|
|
223
|
+
{
|
|
224
|
+
"type": "null"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"type": "object",
|
|
228
|
+
"additionalProperties": false,
|
|
229
|
+
"required": ["enabled", "cadence", "nextDueAt"],
|
|
230
|
+
"properties": {
|
|
231
|
+
"enabled": {
|
|
232
|
+
"type": "boolean"
|
|
233
|
+
},
|
|
234
|
+
"cadence": {
|
|
235
|
+
"type": "string"
|
|
236
|
+
},
|
|
237
|
+
"nextDueAt": {
|
|
238
|
+
"type": ["string", "null"],
|
|
239
|
+
"format": "date-time",
|
|
240
|
+
"description": "Null unless enabled and a daemon is running on this archive."
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
"limit": {
|
|
247
|
+
"type": "integer",
|
|
248
|
+
"minimum": 1
|
|
249
|
+
},
|
|
250
|
+
"retries": {
|
|
251
|
+
"type": "integer",
|
|
252
|
+
"minimum": 0
|
|
253
|
+
},
|
|
254
|
+
"pending": {
|
|
255
|
+
"oneOf": [
|
|
256
|
+
{
|
|
257
|
+
"type": "null"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"type": "object",
|
|
261
|
+
"additionalProperties": false,
|
|
262
|
+
"required": ["since", "triggers"],
|
|
263
|
+
"properties": {
|
|
264
|
+
"since": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"format": "date-time"
|
|
267
|
+
},
|
|
268
|
+
"triggers": {
|
|
269
|
+
"type": "array",
|
|
270
|
+
"items": {
|
|
271
|
+
"enum": ["hook", "schedule", "manual"]
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
]
|
|
277
|
+
},
|
|
278
|
+
"running": {
|
|
279
|
+
"oneOf": [
|
|
280
|
+
{
|
|
281
|
+
"type": "null"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"type": "object",
|
|
285
|
+
"additionalProperties": false,
|
|
286
|
+
"required": ["startedAt", "triggers"],
|
|
287
|
+
"properties": {
|
|
288
|
+
"startedAt": {
|
|
289
|
+
"type": "string",
|
|
290
|
+
"format": "date-time"
|
|
291
|
+
},
|
|
292
|
+
"triggers": {
|
|
293
|
+
"type": "array",
|
|
294
|
+
"items": {
|
|
295
|
+
"enum": ["hook", "schedule", "manual"]
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
"lastTrigger": {
|
|
303
|
+
"oneOf": [
|
|
304
|
+
{
|
|
305
|
+
"type": "null"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"type": "object",
|
|
309
|
+
"additionalProperties": false,
|
|
310
|
+
"required": ["kind", "at"],
|
|
311
|
+
"properties": {
|
|
312
|
+
"kind": {
|
|
313
|
+
"enum": ["hook", "schedule", "manual"]
|
|
314
|
+
},
|
|
315
|
+
"at": {
|
|
316
|
+
"type": "string",
|
|
317
|
+
"format": "date-time"
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
]
|
|
322
|
+
},
|
|
323
|
+
"lastRun": {
|
|
324
|
+
"oneOf": [
|
|
325
|
+
{
|
|
326
|
+
"type": "null"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"$ref": "#/definitions/runRecord"
|
|
330
|
+
}
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
"lastSuccessAt": {
|
|
334
|
+
"type": ["string", "null"],
|
|
335
|
+
"format": "date-time"
|
|
336
|
+
},
|
|
337
|
+
"retryAt": {
|
|
338
|
+
"type": ["string", "null"],
|
|
339
|
+
"format": "date-time"
|
|
340
|
+
},
|
|
341
|
+
"recovery": {
|
|
342
|
+
"type": ["string", "null"]
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"warnings": {
|
|
350
|
+
"type": "array",
|
|
351
|
+
"items": {
|
|
352
|
+
"type": "string"
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
"definitions": {
|
|
357
|
+
"runRecord": {
|
|
358
|
+
"type": "object",
|
|
359
|
+
"additionalProperties": false,
|
|
360
|
+
"required": [
|
|
361
|
+
"triggers",
|
|
362
|
+
"startedAt",
|
|
363
|
+
"finishedAt",
|
|
364
|
+
"outcome",
|
|
365
|
+
"reason",
|
|
366
|
+
"threads",
|
|
367
|
+
"units"
|
|
368
|
+
],
|
|
369
|
+
"properties": {
|
|
370
|
+
"triggers": {
|
|
371
|
+
"type": "array",
|
|
372
|
+
"items": {
|
|
373
|
+
"enum": ["hook", "schedule", "manual"]
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
"startedAt": {
|
|
377
|
+
"type": "string",
|
|
378
|
+
"format": "date-time"
|
|
379
|
+
},
|
|
380
|
+
"finishedAt": {
|
|
381
|
+
"type": "string",
|
|
382
|
+
"format": "date-time"
|
|
383
|
+
},
|
|
384
|
+
"outcome": {
|
|
385
|
+
"enum": ["complete", "up_to_date", "partial", "failed"]
|
|
386
|
+
},
|
|
387
|
+
"reason": {
|
|
388
|
+
"type": ["string", "null"],
|
|
389
|
+
"description": "Stable reason code for partial or failed runs, e.g. busy, runtime_error, source_revoked, source_unavailable, invalid_configuration, import_failed, interrupted, deferred, incomplete_units, index_sync_failed, unit_failures."
|
|
390
|
+
},
|
|
391
|
+
"threads": {
|
|
392
|
+
"type": "object",
|
|
393
|
+
"additionalProperties": false,
|
|
394
|
+
"required": ["imported", "updated", "unchanged"],
|
|
395
|
+
"properties": {
|
|
396
|
+
"imported": {
|
|
397
|
+
"type": "integer",
|
|
398
|
+
"minimum": 0
|
|
399
|
+
},
|
|
400
|
+
"updated": {
|
|
401
|
+
"type": "integer",
|
|
402
|
+
"minimum": 0
|
|
403
|
+
},
|
|
404
|
+
"unchanged": {
|
|
405
|
+
"type": "integer",
|
|
406
|
+
"minimum": 0
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"units": {
|
|
411
|
+
"type": "object",
|
|
412
|
+
"additionalProperties": false,
|
|
413
|
+
"required": ["incomplete", "failed", "deferred"],
|
|
414
|
+
"properties": {
|
|
415
|
+
"incomplete": {
|
|
416
|
+
"type": "integer",
|
|
417
|
+
"minimum": 0
|
|
418
|
+
},
|
|
419
|
+
"failed": {
|
|
420
|
+
"type": "integer",
|
|
421
|
+
"minimum": 0
|
|
422
|
+
},
|
|
423
|
+
"deferred": {
|
|
424
|
+
"type": "integer",
|
|
425
|
+
"minimum": 0
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
@@ -150,6 +150,104 @@
|
|
|
150
150
|
"description": "Chunks awaiting embedding",
|
|
151
151
|
"minimum": 0
|
|
152
152
|
},
|
|
153
|
+
"vectorPartitions": {
|
|
154
|
+
"type": "array",
|
|
155
|
+
"description": "Vector partitions of the embedding model; omitted when none exist",
|
|
156
|
+
"items": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"additionalProperties": false,
|
|
159
|
+
"required": [
|
|
160
|
+
"id",
|
|
161
|
+
"model",
|
|
162
|
+
"dimensions",
|
|
163
|
+
"state",
|
|
164
|
+
"legacy",
|
|
165
|
+
"retrieval",
|
|
166
|
+
"droppable",
|
|
167
|
+
"owners",
|
|
168
|
+
"provenance",
|
|
169
|
+
"compatibleRuntimes",
|
|
170
|
+
"incompatibleRuntimes"
|
|
171
|
+
],
|
|
172
|
+
"properties": {
|
|
173
|
+
"id": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"description": "Partition id (drop with `gno vec drop <id-prefix>`)"
|
|
176
|
+
},
|
|
177
|
+
"model": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"description": "Embedding model URI"
|
|
180
|
+
},
|
|
181
|
+
"dimensions": {
|
|
182
|
+
"type": "integer",
|
|
183
|
+
"minimum": 1
|
|
184
|
+
},
|
|
185
|
+
"state": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"enum": ["active", "shadow"],
|
|
188
|
+
"description": "active = activated for retrieval; shadow = incomplete or abandoned"
|
|
189
|
+
},
|
|
190
|
+
"legacy": {
|
|
191
|
+
"type": "boolean",
|
|
192
|
+
"description": "Pre-runtime-independent key, awaiting measured re-keying"
|
|
193
|
+
},
|
|
194
|
+
"retrieval": {
|
|
195
|
+
"type": "boolean",
|
|
196
|
+
"description": "Status counts use this partition: the activated runtime-independent partition every compatible runtime reads"
|
|
197
|
+
},
|
|
198
|
+
"droppable": {
|
|
199
|
+
"type": "boolean",
|
|
200
|
+
"description": "`gno vec drop` accepts it; never the partition this runtime's retrieval uses"
|
|
201
|
+
},
|
|
202
|
+
"owners": {
|
|
203
|
+
"type": "integer",
|
|
204
|
+
"minimum": 0,
|
|
205
|
+
"description": "Current chunks bound to this partition"
|
|
206
|
+
},
|
|
207
|
+
"provenance": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"description": "Runtime that built the partition, e.g. \"CUDA, Bun 1.4.2\""
|
|
210
|
+
},
|
|
211
|
+
"compatibleRuntimes": {
|
|
212
|
+
"type": "array",
|
|
213
|
+
"items": {
|
|
214
|
+
"type": "string"
|
|
215
|
+
},
|
|
216
|
+
"description": "Runtimes measured (or recorded as the builder) to read this partition"
|
|
217
|
+
},
|
|
218
|
+
"incompatibleRuntimes": {
|
|
219
|
+
"type": "array",
|
|
220
|
+
"items": {
|
|
221
|
+
"type": "string"
|
|
222
|
+
},
|
|
223
|
+
"description": "Runtimes measured incompatible; they read another partition or use lexical retrieval only"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"vectorRuntime": {
|
|
229
|
+
"type": "object",
|
|
230
|
+
"additionalProperties": false,
|
|
231
|
+
"required": ["label", "state", "partition"],
|
|
232
|
+
"description": "This process's runtime, resolved by the same selection rule its queries use",
|
|
233
|
+
"properties": {
|
|
234
|
+
"label": {
|
|
235
|
+
"type": ["string", "null"],
|
|
236
|
+
"description": "Runtime recorded by this caller's last query or embed"
|
|
237
|
+
},
|
|
238
|
+
"state": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"enum": ["vectors", "unavailable", "unresolved"],
|
|
241
|
+
"description": "vectors: queries read `partition`; unavailable: lexical retrieval only; unresolved: no query or embed has resolved this caller yet"
|
|
242
|
+
},
|
|
243
|
+
"partition": {
|
|
244
|
+
"type": ["string", "null"]
|
|
245
|
+
},
|
|
246
|
+
"reason": {
|
|
247
|
+
"type": "string"
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
153
251
|
"recentErrors": {
|
|
154
252
|
"type": "integer",
|
|
155
253
|
"description": "Recent ingest errors in the last 24 hours",
|
package/src/cli/commands/ask.ts
CHANGED
|
@@ -15,6 +15,7 @@ import type {
|
|
|
15
15
|
} from "../../llm/types";
|
|
16
16
|
import type { AskOptions, AskResult, Citation } from "../../pipeline/types";
|
|
17
17
|
|
|
18
|
+
import { decorateUriForIndex } from "../../app/constants";
|
|
18
19
|
import { buildVerifiedAsk } from "../../app/verified-ask";
|
|
19
20
|
import { resolveCliProjectAffinity } from "../../core/project-affinity-surface";
|
|
20
21
|
import {
|
|
@@ -96,7 +97,7 @@ export async function ask(
|
|
|
96
97
|
const globals = getGlobals();
|
|
97
98
|
|
|
98
99
|
const initResult = await initStore({
|
|
99
|
-
configPath: options.configPath,
|
|
100
|
+
configPath: options.configPath ?? globals.config,
|
|
100
101
|
indexName: globals.index,
|
|
101
102
|
collection: options.collection,
|
|
102
103
|
syncConfig: false,
|
|
@@ -434,9 +435,20 @@ export async function ask(
|
|
|
434
435
|
return { success: false, error: finalized.error.message };
|
|
435
436
|
}
|
|
436
437
|
}
|
|
438
|
+
// URIs carry `?index=` like search and Capsule results on a named index.
|
|
437
439
|
return {
|
|
438
440
|
success: true,
|
|
439
|
-
data:
|
|
441
|
+
data: {
|
|
442
|
+
...askResult,
|
|
443
|
+
results: askResult.results.map((result) => ({
|
|
444
|
+
...result,
|
|
445
|
+
uri: decorateUriForIndex(result.uri, globals.index),
|
|
446
|
+
})),
|
|
447
|
+
citations: askResult.citations?.map((citation) => ({
|
|
448
|
+
...citation,
|
|
449
|
+
uri: decorateUriForIndex(citation.uri, globals.index),
|
|
450
|
+
})),
|
|
451
|
+
},
|
|
440
452
|
metadata: traceSession?.metadata(),
|
|
441
453
|
};
|
|
442
454
|
} catch (cause) {
|