@gmickel/gno 1.23.0 → 1.24.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.
@@ -0,0 +1,258 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "gno://schemas/setup-receipt@1.0",
4
+ "title": "GNO Verified Folder Setup Receipt",
5
+ "description": "Canonical local receipt for resumable lexical-first folder setup.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "status",
11
+ "generatedAt",
12
+ "input",
13
+ "fingerprints",
14
+ "collection",
15
+ "paths",
16
+ "stages",
17
+ "pending",
18
+ "failure",
19
+ "activation"
20
+ ],
21
+ "properties": {
22
+ "schemaVersion": { "const": "1.0" },
23
+ "status": {
24
+ "enum": ["in_progress", "failed", "completed"]
25
+ },
26
+ "generatedAt": {
27
+ "type": "string",
28
+ "format": "date-time"
29
+ },
30
+ "input": {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "required": [
34
+ "folder",
35
+ "folderFingerprint",
36
+ "indexName",
37
+ "requestedName",
38
+ "excludes",
39
+ "secretRiskAuthorized"
40
+ ],
41
+ "properties": {
42
+ "folder": { "type": "string", "minLength": 1 },
43
+ "folderFingerprint": {
44
+ "type": "string",
45
+ "pattern": "^[a-f0-9]{64}$"
46
+ },
47
+ "indexName": { "type": "string", "minLength": 1, "maxLength": 64 },
48
+ "requestedName": {
49
+ "type": ["string", "null"],
50
+ "minLength": 1,
51
+ "maxLength": 64
52
+ },
53
+ "excludes": {
54
+ "type": "array",
55
+ "uniqueItems": true,
56
+ "items": { "type": "string", "minLength": 1 }
57
+ },
58
+ "secretRiskAuthorized": { "type": "boolean" }
59
+ }
60
+ },
61
+ "fingerprints": {
62
+ "type": "object",
63
+ "additionalProperties": false,
64
+ "required": ["input", "config", "index"],
65
+ "properties": {
66
+ "input": { "$ref": "#/definitions/fingerprint" },
67
+ "config": {
68
+ "oneOf": [{ "$ref": "#/definitions/fingerprint" }, { "type": "null" }]
69
+ },
70
+ "index": {
71
+ "oneOf": [{ "$ref": "#/definitions/fingerprint" }, { "type": "null" }]
72
+ }
73
+ }
74
+ },
75
+ "collection": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": ["name", "path", "disposition"],
79
+ "properties": {
80
+ "name": {
81
+ "type": ["string", "null"],
82
+ "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
83
+ },
84
+ "path": { "type": "string", "minLength": 1 },
85
+ "disposition": {
86
+ "enum": ["pending", "created", "reused"]
87
+ }
88
+ }
89
+ },
90
+ "paths": {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": ["config", "receipt"],
94
+ "properties": {
95
+ "config": { "type": "string", "minLength": 1 },
96
+ "receipt": { "type": "string", "minLength": 1 }
97
+ }
98
+ },
99
+ "stages": {
100
+ "type": "object",
101
+ "additionalProperties": false,
102
+ "required": [
103
+ "preflight",
104
+ "config_saved",
105
+ "store_synced",
106
+ "lexical_indexed",
107
+ "lexical_proved",
108
+ "completed"
109
+ ],
110
+ "properties": {
111
+ "preflight": { "$ref": "#/definitions/stage" },
112
+ "config_saved": { "$ref": "#/definitions/stage" },
113
+ "store_synced": { "$ref": "#/definitions/stage" },
114
+ "lexical_indexed": { "$ref": "#/definitions/stage" },
115
+ "lexical_proved": { "$ref": "#/definitions/stage" },
116
+ "completed": { "$ref": "#/definitions/stage" }
117
+ }
118
+ },
119
+ "pending": {
120
+ "type": "array",
121
+ "uniqueItems": true,
122
+ "items": { "type": "string", "minLength": 1 }
123
+ },
124
+ "failure": {
125
+ "oneOf": [{ "$ref": "#/definitions/failure" }, { "type": "null" }]
126
+ },
127
+ "activation": {
128
+ "oneOf": [
129
+ { "$ref": "gno://schemas/activation-verification@1.0" },
130
+ { "type": "null" }
131
+ ]
132
+ }
133
+ },
134
+ "allOf": [
135
+ {
136
+ "if": {
137
+ "type": "object",
138
+ "properties": { "status": { "const": "completed" } },
139
+ "required": ["status"]
140
+ },
141
+ "then": {
142
+ "type": "object",
143
+ "properties": {
144
+ "failure": { "type": "null" },
145
+ "activation": {
146
+ "allOf": [
147
+ { "$ref": "gno://schemas/activation-verification@1.0" },
148
+ {
149
+ "type": "object",
150
+ "properties": { "ready": { "const": true } },
151
+ "required": ["ready"]
152
+ }
153
+ ]
154
+ },
155
+ "stages": {
156
+ "type": "object",
157
+ "properties": {
158
+ "preflight": {
159
+ "type": "object",
160
+ "properties": { "status": { "const": "passed" } }
161
+ },
162
+ "config_saved": {
163
+ "type": "object",
164
+ "properties": { "status": { "const": "passed" } }
165
+ },
166
+ "store_synced": {
167
+ "type": "object",
168
+ "properties": { "status": { "const": "passed" } }
169
+ },
170
+ "lexical_indexed": {
171
+ "type": "object",
172
+ "properties": { "status": { "const": "passed" } }
173
+ },
174
+ "lexical_proved": {
175
+ "type": "object",
176
+ "properties": { "status": { "const": "passed" } }
177
+ },
178
+ "completed": {
179
+ "type": "object",
180
+ "properties": { "status": { "const": "passed" } }
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ },
187
+ {
188
+ "if": {
189
+ "type": "object",
190
+ "properties": { "status": { "const": "failed" } },
191
+ "required": ["status"]
192
+ },
193
+ "then": {
194
+ "type": "object",
195
+ "properties": {
196
+ "failure": { "$ref": "#/definitions/failure" }
197
+ }
198
+ }
199
+ }
200
+ ],
201
+ "definitions": {
202
+ "fingerprint": {
203
+ "type": "string",
204
+ "pattern": "^[a-f0-9]{64}$"
205
+ },
206
+ "stage": {
207
+ "type": "object",
208
+ "additionalProperties": false,
209
+ "required": [
210
+ "status",
211
+ "token",
212
+ "startedAt",
213
+ "completedAt",
214
+ "code",
215
+ "remediation"
216
+ ],
217
+ "properties": {
218
+ "status": {
219
+ "enum": ["pending", "in_progress", "passed", "failed"]
220
+ },
221
+ "token": {
222
+ "type": ["string", "null"],
223
+ "pattern": "^[a-f0-9]{64}$"
224
+ },
225
+ "startedAt": {
226
+ "type": ["string", "null"],
227
+ "format": "date-time"
228
+ },
229
+ "completedAt": {
230
+ "type": ["string", "null"],
231
+ "format": "date-time"
232
+ },
233
+ "code": { "type": ["string", "null"] },
234
+ "remediation": { "type": ["string", "null"] }
235
+ }
236
+ },
237
+ "failure": {
238
+ "type": "object",
239
+ "additionalProperties": false,
240
+ "required": ["stage", "code", "message", "remediation"],
241
+ "properties": {
242
+ "stage": {
243
+ "enum": [
244
+ "preflight",
245
+ "config_saved",
246
+ "store_synced",
247
+ "lexical_indexed",
248
+ "lexical_proved",
249
+ "completed"
250
+ ]
251
+ },
252
+ "code": { "type": "string", "minLength": 1 },
253
+ "message": { "type": "string", "minLength": 1 },
254
+ "remediation": { "type": "string", "minLength": 1 }
255
+ }
256
+ }
257
+ }
258
+ }
@@ -0,0 +1,195 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "gno://schemas/setup-semantic@1.0",
4
+ "title": "GNO Setup Semantic Handoff Receipt",
5
+ "description": "Privacy-bounded state for one standalone collection-scoped semantic setup worker.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "status",
11
+ "generatedAt",
12
+ "startedAt",
13
+ "completedAt",
14
+ "jobId",
15
+ "collection",
16
+ "indexName",
17
+ "folderFingerprint",
18
+ "pid",
19
+ "offline",
20
+ "setupReceiptFingerprint",
21
+ "setupReceiptPath",
22
+ "receiptPath",
23
+ "logPath",
24
+ "resumeCommand",
25
+ "counts",
26
+ "error"
27
+ ],
28
+ "properties": {
29
+ "schemaVersion": { "const": "1.0" },
30
+ "status": {
31
+ "enum": [
32
+ "scheduled",
33
+ "running",
34
+ "completed",
35
+ "failed",
36
+ "pending",
37
+ "skipped"
38
+ ]
39
+ },
40
+ "generatedAt": { "type": "string", "format": "date-time" },
41
+ "startedAt": {
42
+ "type": ["string", "null"],
43
+ "format": "date-time"
44
+ },
45
+ "completedAt": {
46
+ "type": ["string", "null"],
47
+ "format": "date-time"
48
+ },
49
+ "jobId": { "$ref": "#/definitions/fingerprint" },
50
+ "collection": {
51
+ "type": "string",
52
+ "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
53
+ },
54
+ "indexName": { "type": "string", "minLength": 1, "maxLength": 64 },
55
+ "folderFingerprint": { "$ref": "#/definitions/fingerprint" },
56
+ "pid": {
57
+ "type": ["integer", "null"],
58
+ "minimum": 1
59
+ },
60
+ "offline": { "type": "boolean" },
61
+ "setupReceiptFingerprint": { "$ref": "#/definitions/fingerprint" },
62
+ "setupReceiptPath": { "type": "string", "minLength": 1 },
63
+ "receiptPath": { "type": "string", "minLength": 1 },
64
+ "logPath": { "type": "string", "minLength": 1 },
65
+ "resumeCommand": {
66
+ "type": "string",
67
+ "pattern": "^gno .* embed "
68
+ },
69
+ "counts": {
70
+ "oneOf": [
71
+ {
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": ["embedded", "errors"],
75
+ "properties": {
76
+ "embedded": { "type": "integer", "minimum": 0 },
77
+ "errors": { "type": "integer", "minimum": 0 }
78
+ }
79
+ },
80
+ { "type": "null" }
81
+ ]
82
+ },
83
+ "error": {
84
+ "oneOf": [
85
+ {
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": ["message", "remediation"],
89
+ "properties": {
90
+ "message": { "type": "string", "minLength": 1, "maxLength": 500 },
91
+ "remediation": {
92
+ "type": "string",
93
+ "minLength": 1,
94
+ "maxLength": 8192
95
+ }
96
+ }
97
+ },
98
+ { "type": "null" }
99
+ ]
100
+ }
101
+ },
102
+ "allOf": [
103
+ {
104
+ "if": {
105
+ "properties": { "status": { "const": "scheduled" } },
106
+ "required": ["status"]
107
+ },
108
+ "then": {
109
+ "properties": {
110
+ "startedAt": { "type": "null" },
111
+ "completedAt": { "type": "null" },
112
+ "counts": { "type": "null" },
113
+ "error": { "type": "null" }
114
+ }
115
+ }
116
+ },
117
+ {
118
+ "if": {
119
+ "properties": { "status": { "const": "running" } },
120
+ "required": ["status"]
121
+ },
122
+ "then": {
123
+ "properties": {
124
+ "pid": { "type": "integer", "minimum": 1 },
125
+ "startedAt": { "type": "string", "format": "date-time" },
126
+ "completedAt": { "type": "null" },
127
+ "counts": { "type": "null" },
128
+ "error": { "type": "null" }
129
+ }
130
+ }
131
+ },
132
+ {
133
+ "if": {
134
+ "properties": { "status": { "const": "completed" } },
135
+ "required": ["status"]
136
+ },
137
+ "then": {
138
+ "type": "object",
139
+ "properties": {
140
+ "pid": { "type": "null" },
141
+ "counts": { "type": "object" },
142
+ "error": { "type": "null" },
143
+ "completedAt": { "type": "string", "format": "date-time" }
144
+ }
145
+ }
146
+ },
147
+ {
148
+ "if": {
149
+ "properties": { "status": { "const": "failed" } },
150
+ "required": ["status"]
151
+ },
152
+ "then": {
153
+ "type": "object",
154
+ "properties": {
155
+ "pid": { "type": "null" },
156
+ "error": { "type": "object" },
157
+ "completedAt": { "type": "string", "format": "date-time" }
158
+ }
159
+ }
160
+ },
161
+ {
162
+ "if": {
163
+ "properties": { "status": { "const": "pending" } },
164
+ "required": ["status"]
165
+ },
166
+ "then": {
167
+ "properties": {
168
+ "completedAt": { "type": "null" },
169
+ "counts": { "type": "null" },
170
+ "error": { "type": "object" }
171
+ }
172
+ }
173
+ },
174
+ {
175
+ "if": {
176
+ "properties": { "status": { "const": "skipped" } },
177
+ "required": ["status"]
178
+ },
179
+ "then": {
180
+ "type": "object",
181
+ "properties": {
182
+ "counts": { "type": "null" },
183
+ "error": { "type": "null" },
184
+ "completedAt": { "type": "string", "format": "date-time" }
185
+ }
186
+ }
187
+ }
188
+ ],
189
+ "definitions": {
190
+ "fingerprint": {
191
+ "type": "string",
192
+ "pattern": "^[a-f0-9]{64}$"
193
+ }
194
+ }
195
+ }
@@ -14,6 +14,7 @@ export const SUPPORTED_SHELLS: Shell[] = ["bash", "zsh", "fish"];
14
14
  */
15
15
  const COMMANDS = [
16
16
  "init",
17
+ "setup",
17
18
  "index",
18
19
  "update",
19
20
  "embed",
@@ -317,6 +318,7 @@ export function getCompletionScript(shell: Shell): string {
317
318
  function getCommandDescription(cmd: string): string {
318
319
  const descriptions: Record<string, string> = {
319
320
  init: "Initialize GNO configuration",
321
+ setup: "Add and verify a folder",
320
322
  index: "Index files from collections",
321
323
  update: "Sync files from disk",
322
324
  embed: "Generate embeddings",
@@ -68,6 +68,8 @@ export interface EmbedOptions {
68
68
  json?: boolean;
69
69
  /** Verbose error logging */
70
70
  verbose?: boolean;
71
+ /** Use cached models only (also used by the standalone setup worker). */
72
+ offline?: boolean;
71
73
  }
72
74
 
73
75
  export type EmbedResult =
@@ -469,9 +471,12 @@ export async function embed(options: EmbedOptions = {}): Promise<EmbedResult> {
469
471
  }
470
472
 
471
473
  // Create LLM adapter and embedding port with auto-download
472
- const globals = getGlobals();
474
+ let offline = options.offline;
475
+ if (offline === undefined) {
476
+ offline = getGlobals().offline;
477
+ }
473
478
  const policy = resolveDownloadPolicy(process.env, {
474
- offline: globals.offline,
479
+ offline,
475
480
  });
476
481
 
477
482
  // Create progress renderer for model download (throttled to avoid spam)