@gmickel/gno 1.24.0 → 1.26.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 (96) hide show
  1. package/README.md +18 -4
  2. package/assets/skill/SKILL.md +40 -17
  3. package/assets/skill/recipes/capture-and-file.md +20 -5
  4. package/browser-extension/artifacts/gno-browser-clipper-v1.26.0.zip +0 -0
  5. package/browser-extension/artifacts/gno-browser-clipper-v1.26.0.zip.sha256 +1 -0
  6. package/browser-extension/dist/PRIVACY.md +55 -0
  7. package/browser-extension/dist/chunk-vn5f663b.js +50 -0
  8. package/browser-extension/dist/chunk-ydfx5d7p.css +1 -0
  9. package/browser-extension/dist/content.js +1 -0
  10. package/browser-extension/dist/manifest.json +25 -0
  11. package/browser-extension/dist/preview.html +13 -0
  12. package/browser-extension/dist/service-worker.js +40 -0
  13. package/package.json +13 -3
  14. package/spec/cli.md +196 -4
  15. package/spec/db/schema.sql +102 -1
  16. package/spec/mcp.md +10 -0
  17. package/spec/output-schemas/browser-clip-preview.schema.json +83 -0
  18. package/spec/output-schemas/browser-clip.schema.json +586 -0
  19. package/spec/output-schemas/capture-receipt.schema.json +22 -1
  20. package/spec/output-schemas/clipper-csrf.schema.json +12 -0
  21. package/spec/output-schemas/clipper-error.schema.json +46 -0
  22. package/spec/output-schemas/clipper-pair-approval.schema.json +17 -0
  23. package/spec/output-schemas/clipper-pair-start.schema.json +26 -0
  24. package/spec/output-schemas/clipper-pair-status.schema.json +46 -0
  25. package/spec/output-schemas/clipper-revoke.schema.json +28 -0
  26. package/spec/output-schemas/mcp-capture-result.schema.json +12 -1
  27. package/spec/output-schemas/project-profile-apply.schema.json +209 -0
  28. package/spec/output-schemas/project-profile-command.schema.json +160 -0
  29. package/spec/output-schemas/query-diagnose.schema.json +7 -1
  30. package/spec/output-schemas/setup-profile-result.schema.json +87 -0
  31. package/spec/project-profile.schema.json +301 -0
  32. package/src/cli/commands/collection/add.ts +39 -45
  33. package/src/cli/commands/collection/remove.ts +28 -28
  34. package/src/cli/commands/collection/rename.ts +55 -73
  35. package/src/cli/commands/context/add.ts +37 -26
  36. package/src/cli/commands/context/rm.ts +47 -20
  37. package/src/cli/commands/init.ts +55 -125
  38. package/src/cli/commands/models/use.ts +43 -38
  39. package/src/cli/commands/profile-apply.ts +334 -0
  40. package/src/cli/commands/profile.ts +409 -0
  41. package/src/cli/commands/setup-activation.ts +205 -54
  42. package/src/cli/commands/setup-profile.ts +223 -0
  43. package/src/cli/commands/setup.ts +3 -0
  44. package/src/cli/program.ts +110 -9
  45. package/src/config/index.ts +3 -0
  46. package/src/config/project-profile.ts +367 -0
  47. package/src/config/saver.ts +16 -7
  48. package/src/config/types.ts +42 -0
  49. package/src/core/browser-clip-provenance.ts +139 -0
  50. package/src/core/browser-clip.ts +473 -0
  51. package/src/core/capture-write.ts +5 -0
  52. package/src/core/capture.ts +75 -18
  53. package/src/core/config-mutation.ts +138 -76
  54. package/src/core/config-write-lock.ts +89 -0
  55. package/src/core/context-identity.ts +16 -0
  56. package/src/core/context-resolver.ts +2 -12
  57. package/src/core/file-lock.ts +20 -6
  58. package/src/core/folder-setup-planning.ts +6 -21
  59. package/src/core/folder-setup.ts +30 -2
  60. package/src/core/path-rules.ts +53 -0
  61. package/src/core/project-affinity-surface.ts +102 -7
  62. package/src/core/project-profile-apply-state.ts +268 -0
  63. package/src/core/project-profile-apply-validation.ts +95 -0
  64. package/src/core/project-profile-apply.ts +408 -0
  65. package/src/core/project-profile-canonical.ts +71 -0
  66. package/src/core/project-profile-diff.ts +302 -0
  67. package/src/core/project-profile-discovery.ts +519 -0
  68. package/src/core/project-profile-file.ts +37 -0
  69. package/src/core/project-profile-parser.ts +98 -0
  70. package/src/core/project-profile.ts +490 -0
  71. package/src/ingestion/walker.ts +85 -44
  72. package/src/llm/cache.ts +21 -0
  73. package/src/serve/capture-service.ts +420 -0
  74. package/src/serve/clipper-body.ts +62 -0
  75. package/src/serve/clipper-capture.ts +248 -0
  76. package/src/serve/clipper-contract.ts +57 -0
  77. package/src/serve/clipper-idempotency.ts +35 -0
  78. package/src/serve/clipper-pairing.ts +297 -0
  79. package/src/serve/clipper-security-errors.ts +23 -0
  80. package/src/serve/clipper-security.ts +449 -0
  81. package/src/serve/config-sync.ts +2 -2
  82. package/src/serve/public/app.tsx +8 -1
  83. package/src/serve/public/globals.built.css +1 -1
  84. package/src/serve/public/index.html +1 -0
  85. package/src/serve/public/lib/clipper-approval.ts +206 -0
  86. package/src/serve/public/pages/ClipperPairing.tsx +210 -0
  87. package/src/serve/resident-runtime.ts +1 -0
  88. package/src/serve/routes/api.ts +20 -115
  89. package/src/serve/routes/clipper.ts +394 -0
  90. package/src/serve/server.ts +22 -0
  91. package/src/store/migrations/020-browser-clipper-security.ts +128 -0
  92. package/src/store/migrations/021-multi-context-identity.ts +37 -0
  93. package/src/store/migrations/index.ts +4 -0
  94. package/src/store/sqlite/adapter.ts +83 -0
  95. package/src/store/sqlite/clipper-store-types.ts +104 -0
  96. package/src/store/sqlite/clipper-store.ts +496 -0
@@ -0,0 +1,586 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "gno://schemas/browser-clip@1.0",
4
+ "title": "GNO Browser Clip Payload",
5
+ "description": "Closed local browser-clip request. Reader extraction is a constrained semantic AST; raw HTML is not accepted.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "mode",
11
+ "sourceUrl",
12
+ "canonicalUrl",
13
+ "title",
14
+ "author",
15
+ "site",
16
+ "publishedAt",
17
+ "observedAt",
18
+ "browser",
19
+ "extraction",
20
+ "destination",
21
+ "tags",
22
+ "note"
23
+ ],
24
+ "properties": {
25
+ "schemaVersion": { "const": "1.0" },
26
+ "mode": { "enum": ["selection", "reader"] },
27
+ "sourceUrl": { "$ref": "#/definitions/httpUrl" },
28
+ "canonicalUrl": {
29
+ "oneOf": [{ "$ref": "#/definitions/httpUrl" }, { "type": "null" }]
30
+ },
31
+ "title": {
32
+ "allOf": [
33
+ { "$ref": "#/definitions/controlSafeString" },
34
+ { "type": "string", "minLength": 1, "maxLength": 2048 }
35
+ ]
36
+ },
37
+ "author": {
38
+ "oneOf": [
39
+ {
40
+ "allOf": [
41
+ { "$ref": "#/definitions/controlSafeString" },
42
+ { "type": "string", "maxLength": 1024 }
43
+ ]
44
+ },
45
+ { "type": "null" }
46
+ ]
47
+ },
48
+ "site": {
49
+ "oneOf": [
50
+ {
51
+ "allOf": [
52
+ { "$ref": "#/definitions/controlSafeString" },
53
+ { "type": "string", "maxLength": 1024 }
54
+ ]
55
+ },
56
+ { "type": "null" }
57
+ ]
58
+ },
59
+ "publishedAt": {
60
+ "oneOf": [
61
+ {
62
+ "allOf": [
63
+ { "$ref": "#/definitions/controlSafeString" },
64
+ { "type": "string", "format": "date" }
65
+ ]
66
+ },
67
+ {
68
+ "allOf": [
69
+ { "$ref": "#/definitions/controlSafeString" },
70
+ { "type": "string", "format": "date-time" }
71
+ ]
72
+ },
73
+ { "type": "null" }
74
+ ]
75
+ },
76
+ "observedAt": {
77
+ "allOf": [
78
+ { "$ref": "#/definitions/controlSafeString" },
79
+ { "type": "string", "format": "date-time" }
80
+ ]
81
+ },
82
+ "browser": {
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": ["name", "version", "platform"],
86
+ "properties": {
87
+ "name": {
88
+ "allOf": [
89
+ { "$ref": "#/definitions/controlSafeString" },
90
+ { "type": "string", "minLength": 1, "maxLength": 128 }
91
+ ]
92
+ },
93
+ "version": {
94
+ "oneOf": [
95
+ {
96
+ "allOf": [
97
+ { "$ref": "#/definitions/controlSafeString" },
98
+ { "type": "string", "maxLength": 128 }
99
+ ]
100
+ },
101
+ { "type": "null" }
102
+ ]
103
+ },
104
+ "platform": {
105
+ "oneOf": [
106
+ {
107
+ "allOf": [
108
+ { "$ref": "#/definitions/controlSafeString" },
109
+ { "type": "string", "maxLength": 128 }
110
+ ]
111
+ },
112
+ { "type": "null" }
113
+ ]
114
+ }
115
+ }
116
+ },
117
+ "extraction": {
118
+ "type": "object",
119
+ "additionalProperties": false,
120
+ "required": [
121
+ "visibility",
122
+ "authenticated",
123
+ "extractorVersion",
124
+ "warnings"
125
+ ],
126
+ "properties": {
127
+ "visibility": { "const": "user_visible" },
128
+ "authenticated": { "type": "boolean" },
129
+ "extractorVersion": {
130
+ "allOf": [
131
+ { "$ref": "#/definitions/controlSafeString" },
132
+ { "type": "string", "minLength": 1, "maxLength": 128 }
133
+ ]
134
+ },
135
+ "warnings": {
136
+ "type": "array",
137
+ "maxItems": 16,
138
+ "uniqueItems": true,
139
+ "items": { "$ref": "#/definitions/warningCode" }
140
+ }
141
+ }
142
+ },
143
+ "destination": {
144
+ "type": "object",
145
+ "additionalProperties": false,
146
+ "required": ["collection", "relPath", "folderPath", "collisionPolicy"],
147
+ "properties": {
148
+ "collection": {
149
+ "allOf": [
150
+ { "$ref": "#/definitions/controlSafeString" },
151
+ { "type": "string", "minLength": 1, "maxLength": 128 }
152
+ ]
153
+ },
154
+ "relPath": {
155
+ "oneOf": [
156
+ {
157
+ "allOf": [
158
+ { "$ref": "#/definitions/controlSafeString" },
159
+ { "type": "string", "minLength": 1, "maxLength": 2048 }
160
+ ]
161
+ },
162
+ { "type": "null" }
163
+ ]
164
+ },
165
+ "folderPath": {
166
+ "oneOf": [
167
+ {
168
+ "allOf": [
169
+ { "$ref": "#/definitions/controlSafeString" },
170
+ { "type": "string", "minLength": 1, "maxLength": 2048 }
171
+ ]
172
+ },
173
+ { "type": "null" }
174
+ ]
175
+ },
176
+ "collisionPolicy": {
177
+ "enum": ["error", "open_existing", "create_with_suffix"]
178
+ }
179
+ },
180
+ "not": {
181
+ "properties": {
182
+ "relPath": { "type": "string" },
183
+ "folderPath": { "type": "string" }
184
+ },
185
+ "required": ["relPath", "folderPath"]
186
+ }
187
+ },
188
+ "tags": {
189
+ "type": "array",
190
+ "maxItems": 128,
191
+ "items": {
192
+ "allOf": [
193
+ { "$ref": "#/definitions/controlSafeString" },
194
+ { "type": "string", "minLength": 1, "maxLength": 256 }
195
+ ]
196
+ }
197
+ },
198
+ "note": {
199
+ "oneOf": [
200
+ {
201
+ "allOf": [
202
+ { "$ref": "#/definitions/controlSafeString" },
203
+ { "type": "string", "maxLength": 32768 }
204
+ ]
205
+ },
206
+ { "type": "null" }
207
+ ]
208
+ },
209
+ "selection": { "$ref": "#/definitions/selection" },
210
+ "reader": { "$ref": "#/definitions/reader" }
211
+ },
212
+ "oneOf": [
213
+ {
214
+ "properties": {
215
+ "mode": { "const": "selection" },
216
+ "selection": {}
217
+ },
218
+ "required": ["selection"],
219
+ "not": { "properties": { "reader": {} }, "required": ["reader"] }
220
+ },
221
+ {
222
+ "properties": {
223
+ "mode": { "const": "reader" },
224
+ "reader": {}
225
+ },
226
+ "required": ["reader"],
227
+ "not": {
228
+ "properties": { "selection": {} },
229
+ "required": ["selection"]
230
+ }
231
+ }
232
+ ],
233
+ "definitions": {
234
+ "controlSafeString": {
235
+ "type": "string",
236
+ "pattern": "^[^\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\u007F-\\u009F]*$"
237
+ },
238
+ "httpUrl": {
239
+ "type": "string",
240
+ "maxLength": 4096,
241
+ "pattern": "^[Hh][Tt][Tt][Pp][Ss]?://(?:(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])|(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)*[A-Za-z](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)(?::(?:[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?(?:(?:/(?:[A-Za-z0-9._~!$&'()*+,;=:@-]|%[0-9A-Fa-f]{2})*)*)(?:\\?(?:[A-Za-z0-9._~!$&'()*+,;=:@/?-]|%[0-9A-Fa-f]{2})*)?(?:#(?:[A-Za-z0-9._~!$&'()*+,;=:@/?-]|%[0-9A-Fa-f]{2})*)?$"
242
+ },
243
+ "warningCode": {
244
+ "enum": [
245
+ "authenticated_visible_content",
246
+ "canonical_url_differs",
247
+ "edited_content",
248
+ "line_endings_normalized",
249
+ "reader_partial",
250
+ "selection_truncated",
251
+ "spa_snapshot",
252
+ "unicode_normalized"
253
+ ]
254
+ },
255
+ "inline": {
256
+ "oneOf": [
257
+ {
258
+ "type": "object",
259
+ "additionalProperties": false,
260
+ "required": ["type", "text"],
261
+ "properties": {
262
+ "type": { "const": "text" },
263
+ "text": {
264
+ "allOf": [
265
+ { "$ref": "#/definitions/controlSafeString" },
266
+ { "type": "string", "minLength": 1, "maxLength": 32768 }
267
+ ]
268
+ }
269
+ }
270
+ },
271
+ {
272
+ "type": "object",
273
+ "additionalProperties": false,
274
+ "required": ["type", "text", "href"],
275
+ "properties": {
276
+ "type": { "const": "link" },
277
+ "text": {
278
+ "allOf": [
279
+ { "$ref": "#/definitions/controlSafeString" },
280
+ { "type": "string", "minLength": 1, "maxLength": 32768 }
281
+ ]
282
+ },
283
+ "href": { "$ref": "#/definitions/httpUrl" }
284
+ }
285
+ }
286
+ ]
287
+ },
288
+ "inlineContent": {
289
+ "type": "array",
290
+ "minItems": 1,
291
+ "maxItems": 256,
292
+ "items": { "$ref": "#/definitions/inline" }
293
+ },
294
+ "readerBlock": {
295
+ "oneOf": [
296
+ {
297
+ "type": "object",
298
+ "additionalProperties": false,
299
+ "required": ["type", "content"],
300
+ "properties": {
301
+ "type": { "const": "paragraph" },
302
+ "content": { "$ref": "#/definitions/inlineContent" }
303
+ }
304
+ },
305
+ {
306
+ "type": "object",
307
+ "additionalProperties": false,
308
+ "required": ["type", "level", "content"],
309
+ "properties": {
310
+ "type": { "const": "heading" },
311
+ "level": { "type": "integer", "minimum": 1, "maximum": 6 },
312
+ "content": { "$ref": "#/definitions/inlineContent" }
313
+ }
314
+ },
315
+ {
316
+ "type": "object",
317
+ "additionalProperties": false,
318
+ "required": ["type", "content"],
319
+ "properties": {
320
+ "type": { "const": "quote" },
321
+ "content": { "$ref": "#/definitions/inlineContent" }
322
+ }
323
+ },
324
+ {
325
+ "type": "object",
326
+ "additionalProperties": false,
327
+ "required": ["type", "ordered", "items"],
328
+ "properties": {
329
+ "type": { "const": "list" },
330
+ "ordered": { "type": "boolean" },
331
+ "items": {
332
+ "type": "array",
333
+ "minItems": 1,
334
+ "maxItems": 256,
335
+ "items": { "$ref": "#/definitions/inlineContent" }
336
+ }
337
+ }
338
+ },
339
+ {
340
+ "type": "object",
341
+ "additionalProperties": false,
342
+ "required": ["type", "language", "text"],
343
+ "properties": {
344
+ "type": { "const": "code" },
345
+ "language": {
346
+ "oneOf": [
347
+ {
348
+ "allOf": [
349
+ { "$ref": "#/definitions/controlSafeString" },
350
+ {
351
+ "type": "string",
352
+ "pattern": "^[A-Za-z0-9_+-]{1,32}$"
353
+ }
354
+ ]
355
+ },
356
+ { "type": "null" }
357
+ ]
358
+ },
359
+ "text": {
360
+ "allOf": [
361
+ { "$ref": "#/definitions/controlSafeString" },
362
+ { "type": "string", "maxLength": 131072 }
363
+ ]
364
+ }
365
+ }
366
+ },
367
+ {
368
+ "type": "object",
369
+ "additionalProperties": false,
370
+ "required": ["type"],
371
+ "properties": { "type": { "const": "horizontal_rule" } }
372
+ }
373
+ ]
374
+ },
375
+ "selection": {
376
+ "type": "object",
377
+ "additionalProperties": false,
378
+ "required": ["exactText", "editedMarkdown"],
379
+ "properties": {
380
+ "exactText": {
381
+ "allOf": [
382
+ { "$ref": "#/definitions/controlSafeString" },
383
+ { "type": "string", "minLength": 1, "maxLength": 524288 }
384
+ ]
385
+ },
386
+ "editedMarkdown": {
387
+ "oneOf": [
388
+ {
389
+ "allOf": [
390
+ { "$ref": "#/definitions/controlSafeString" },
391
+ { "type": "string", "maxLength": 524288 }
392
+ ]
393
+ },
394
+ { "type": "null" }
395
+ ]
396
+ }
397
+ }
398
+ },
399
+ "reader": {
400
+ "type": "object",
401
+ "additionalProperties": false,
402
+ "required": ["blocks", "editedMarkdown"],
403
+ "properties": {
404
+ "blocks": {
405
+ "type": "array",
406
+ "minItems": 1,
407
+ "maxItems": 4096,
408
+ "items": { "$ref": "#/definitions/readerBlock" }
409
+ },
410
+ "editedMarkdown": {
411
+ "oneOf": [
412
+ {
413
+ "allOf": [
414
+ { "$ref": "#/definitions/controlSafeString" },
415
+ { "type": "string", "maxLength": 524288 }
416
+ ]
417
+ },
418
+ { "type": "null" }
419
+ ]
420
+ }
421
+ }
422
+ },
423
+ "provenance": {
424
+ "type": "object",
425
+ "additionalProperties": false,
426
+ "required": [
427
+ "schemaVersion",
428
+ "mode",
429
+ "sourceUrl",
430
+ "canonicalUrl",
431
+ "title",
432
+ "author",
433
+ "site",
434
+ "publishedAt",
435
+ "observedAt",
436
+ "capturedAt",
437
+ "extractionHash",
438
+ "finalBodyHash",
439
+ "clipIdentity",
440
+ "previewDigest",
441
+ "exactSelection",
442
+ "extractionWarnings",
443
+ "browser"
444
+ ],
445
+ "properties": {
446
+ "schemaVersion": { "const": "1.0" },
447
+ "mode": { "enum": ["selection", "reader"] },
448
+ "sourceUrl": { "$ref": "#/definitions/httpUrl" },
449
+ "canonicalUrl": {
450
+ "oneOf": [{ "$ref": "#/definitions/httpUrl" }, { "type": "null" }]
451
+ },
452
+ "title": {
453
+ "allOf": [
454
+ { "$ref": "#/definitions/controlSafeString" },
455
+ { "type": "string", "minLength": 1, "maxLength": 2048 }
456
+ ]
457
+ },
458
+ "author": {
459
+ "oneOf": [
460
+ {
461
+ "allOf": [
462
+ { "$ref": "#/definitions/controlSafeString" },
463
+ { "type": "string", "maxLength": 1024 }
464
+ ]
465
+ },
466
+ { "type": "null" }
467
+ ]
468
+ },
469
+ "site": {
470
+ "oneOf": [
471
+ {
472
+ "allOf": [
473
+ { "$ref": "#/definitions/controlSafeString" },
474
+ { "type": "string", "maxLength": 1024 }
475
+ ]
476
+ },
477
+ { "type": "null" }
478
+ ]
479
+ },
480
+ "publishedAt": {
481
+ "oneOf": [
482
+ {
483
+ "allOf": [
484
+ { "$ref": "#/definitions/controlSafeString" },
485
+ { "type": "string", "format": "date" }
486
+ ]
487
+ },
488
+ {
489
+ "allOf": [
490
+ { "$ref": "#/definitions/controlSafeString" },
491
+ { "type": "string", "format": "date-time" }
492
+ ]
493
+ },
494
+ { "type": "null" }
495
+ ]
496
+ },
497
+ "observedAt": {
498
+ "allOf": [
499
+ { "$ref": "#/definitions/controlSafeString" },
500
+ { "type": "string", "format": "date-time" }
501
+ ]
502
+ },
503
+ "capturedAt": {
504
+ "allOf": [
505
+ { "$ref": "#/definitions/controlSafeString" },
506
+ { "type": "string", "format": "date-time" }
507
+ ]
508
+ },
509
+ "extractionHash": { "$ref": "#/definitions/sha256" },
510
+ "finalBodyHash": { "$ref": "#/definitions/sha256" },
511
+ "clipIdentity": { "$ref": "#/definitions/sha256" },
512
+ "previewDigest": { "$ref": "#/definitions/sha256" },
513
+ "exactSelection": {
514
+ "oneOf": [
515
+ {
516
+ "allOf": [
517
+ { "$ref": "#/definitions/controlSafeString" },
518
+ { "type": "string", "maxLength": 524288 }
519
+ ]
520
+ },
521
+ { "type": "null" }
522
+ ]
523
+ },
524
+ "extractionWarnings": {
525
+ "type": "array",
526
+ "maxItems": 16,
527
+ "uniqueItems": true,
528
+ "items": { "$ref": "#/definitions/warningCode" }
529
+ },
530
+ "browser": {
531
+ "type": "object",
532
+ "additionalProperties": false,
533
+ "required": ["name", "version", "platform"],
534
+ "properties": {
535
+ "name": {
536
+ "allOf": [
537
+ { "$ref": "#/definitions/controlSafeString" },
538
+ { "type": "string", "minLength": 1, "maxLength": 128 }
539
+ ]
540
+ },
541
+ "version": {
542
+ "oneOf": [
543
+ {
544
+ "allOf": [
545
+ { "$ref": "#/definitions/controlSafeString" },
546
+ { "type": "string", "maxLength": 128 }
547
+ ]
548
+ },
549
+ { "type": "null" }
550
+ ]
551
+ },
552
+ "platform": {
553
+ "oneOf": [
554
+ {
555
+ "allOf": [
556
+ { "$ref": "#/definitions/controlSafeString" },
557
+ { "type": "string", "maxLength": 128 }
558
+ ]
559
+ },
560
+ { "type": "null" }
561
+ ]
562
+ }
563
+ }
564
+ }
565
+ },
566
+ "allOf": [
567
+ {
568
+ "if": { "properties": { "mode": { "const": "selection" } } },
569
+ "then": {
570
+ "properties": {
571
+ "exactSelection": { "type": "string", "minLength": 1 }
572
+ }
573
+ }
574
+ },
575
+ {
576
+ "if": { "properties": { "mode": { "const": "reader" } } },
577
+ "then": { "properties": { "exactSelection": { "type": "null" } } }
578
+ }
579
+ ]
580
+ },
581
+ "sha256": {
582
+ "type": "string",
583
+ "pattern": "^[a-f0-9]{64}$"
584
+ }
585
+ }
586
+ }
@@ -4,6 +4,7 @@
4
4
  "title": "GNO Capture Receipt",
5
5
  "description": "Shared receipt returned by capture surfaces after a write/open decision.",
6
6
  "type": "object",
7
+ "additionalProperties": false,
7
8
  "required": [
8
9
  "uri",
9
10
  "collection",
@@ -19,6 +20,10 @@
19
20
  "collisionPolicyResult"
20
21
  ],
21
22
  "properties": {
23
+ "schemaVersion": {
24
+ "const": "1.0",
25
+ "description": "Present on browser-clipper HTTP responses."
26
+ },
22
27
  "uri": {
23
28
  "type": "string",
24
29
  "description": "GNO URI for the captured note.",
@@ -40,6 +45,9 @@
40
45
  "type": "string",
41
46
  "description": "Absolute path when the local surface exposes it."
42
47
  },
48
+ "serverInstanceId": {
49
+ "type": "string"
50
+ },
43
51
  "created": {
44
52
  "type": "boolean",
45
53
  "description": "True when a new file was written."
@@ -63,6 +71,7 @@
63
71
  },
64
72
  "source": {
65
73
  "type": "object",
74
+ "additionalProperties": false,
66
75
  "required": ["kind", "capturedAt"],
67
76
  "properties": {
68
77
  "kind": {
@@ -85,9 +94,20 @@
85
94
  "mime": { "type": "string" },
86
95
  "ext": { "type": "string" },
87
96
  "author": { "type": "string" },
97
+ "canonicalUrl": { "type": "string", "format": "uri" },
98
+ "site": { "type": "string" },
99
+ "publishedAt": {
100
+ "oneOf": [
101
+ { "type": "string", "format": "date" },
102
+ { "type": "string", "format": "date-time" }
103
+ ]
104
+ },
88
105
  "observedAt": { "type": "string", "format": "date-time" },
89
106
  "capturedAt": { "type": "string", "format": "date-time" },
90
- "externalId": { "type": "string" }
107
+ "externalId": { "type": "string" },
108
+ "browserClip": {
109
+ "$ref": "gno://schemas/browser-clip@1.0#/definitions/provenance"
110
+ }
91
111
  }
92
112
  },
93
113
  "tags": {
@@ -114,6 +134,7 @@
114
134
  "definitions": {
115
135
  "indexStatus": {
116
136
  "type": "object",
137
+ "additionalProperties": false,
117
138
  "required": ["status"],
118
139
  "properties": {
119
140
  "status": {
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "gno://schemas/clipper-csrf@1.0",
4
+ "title": "Browser Clipper Approval CSRF",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "csrfToken"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "1.0" },
10
+ "csrfToken": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
11
+ }
12
+ }