sil-openclaw 0.7.0 → 0.8.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 (42) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/EXAMPLES.md +93 -0
  3. package/README.md +50 -113
  4. package/SECURITY.md +9 -6
  5. package/assets/banner-dark.svg +15 -0
  6. package/assets/banner.svg +15 -0
  7. package/dist/gateway/screen.js +174 -0
  8. package/dist/index.js +5 -9
  9. package/dist/lib/answers.js +59 -0
  10. package/dist/lib/screen-log.js +13 -0
  11. package/dist/lib/shopping-call.js +23 -28
  12. package/dist/lib/sil-client.js +19 -8
  13. package/dist/tools/catalog.js +69 -72
  14. package/dist/tools/identity.js +10 -6
  15. package/openclaw.plugin.json +2 -2
  16. package/package.json +4 -2
  17. package/schema/PROVENANCE.md +1 -1
  18. package/schema/shopping-brief-read-request.schema.json +2 -1
  19. package/schema/shopping-brief-read-response.schema.json +98 -50
  20. package/schema/shopping-brief-write-request.schema.json +202 -105
  21. package/schema/shopping-content-request.schema.json +12 -28
  22. package/schema/shopping-content-response.schema.json +49 -256
  23. package/schema/shopping-domain-get-request.schema.json +16 -11
  24. package/schema/shopping-domain-get-response.schema.json +24 -460
  25. package/schema/shopping-domain-search-request.schema.json +3 -3
  26. package/schema/shopping-domain-search-response.schema.json +3 -56
  27. package/schema/shopping-offers-request.schema.json +28 -174
  28. package/schema/shopping-offers-response.schema.json +369 -102
  29. package/schema/shopping-product-get-request.schema.json +3 -2
  30. package/schema/shopping-product-get-response.schema.json +332 -128
  31. package/schema/shopping-search-request.schema.json +41 -19
  32. package/schema/shopping-search-response.schema.json +405 -187
  33. package/schema/shopping-seller-get-request.schema.json +13 -1
  34. package/schema/shopping-seller-get-response.schema.json +488 -147
  35. package/schema/shopping-user-read-request.schema.json +2 -1
  36. package/schema/shopping-user-read-response.schema.json +2 -2
  37. package/schema/shopping-user-remember-request.schema.json +9 -8
  38. package/schema/sil-whoami-response.schema.json +37 -28
  39. package/sil-shopping/SKILL.md +132 -137
  40. package/dist/gateway/search-results.js +0 -99
  41. package/dist/lib/search-results-log.js +0 -23
  42. package/dist/lib/search-results-store.js +0 -116
@@ -5,6 +5,7 @@
5
5
  "type": "object",
6
6
  "required": [
7
7
  "status",
8
+ "ship_to",
8
9
  "sellers"
9
10
  ],
10
11
  "properties": {
@@ -13,6 +14,35 @@
13
14
  "const": "ok",
14
15
  "description": "Reads the answer. Every other status arrives as an error body carrying recovery."
15
16
  },
17
+ "ship_to": {
18
+ "type": "object",
19
+ "required": [
20
+ "country"
21
+ ],
22
+ "properties": {
23
+ "label": {
24
+ "type": "string",
25
+ "minLength": 1,
26
+ "maxLength": 64,
27
+ "description": "Names the address."
28
+ },
29
+ "locality": {
30
+ "type": "string",
31
+ "minLength": 1,
32
+ "maxLength": 128,
33
+ "description": "Says the town."
34
+ },
35
+ "country": {
36
+ "type": "string",
37
+ "pattern": "^[A-Z]{2}$",
38
+ "minLength": 2,
39
+ "maxLength": 2,
40
+ "description": "Says the country every `ships` is relative to."
41
+ }
42
+ },
43
+ "additionalProperties": false,
44
+ "description": "Says where delivery was priced to: every `ships` is relative to it."
45
+ },
16
46
  "sellers": {
17
47
  "type": "array",
18
48
  "items": {
@@ -23,8 +53,10 @@
23
53
  "host",
24
54
  "country",
25
55
  "ships",
56
+ "promotions",
57
+ "terms",
26
58
  "policy_urls",
27
- "specs"
59
+ "reviews"
28
60
  ],
29
61
  "properties": {
30
62
  "id": {
@@ -87,16 +119,17 @@
87
119
  ],
88
120
  "properties": {
89
121
  "amount": {
90
- "type": "string",
91
- "pattern": "^[0-9]+(\\.[0-9]+)?$",
92
- "description": "Quotes the amount as the page states it."
122
+ "type": "integer",
123
+ "minimum": 0,
124
+ "maximum": 9007199254740991,
125
+ "description": "The amount in the currency’s minor unit (cents): €130 is 13000."
93
126
  },
94
127
  "currency": {
95
128
  "type": "string",
96
129
  "pattern": "^[A-Z]{3}$",
97
130
  "minLength": 3,
98
131
  "maxLength": 3,
99
- "description": "Quotes the amount in this currency."
132
+ "description": "In this currency."
100
133
  }
101
134
  },
102
135
  "additionalProperties": false
@@ -104,33 +137,33 @@
104
137
  {
105
138
  "type": "object",
106
139
  "required": [
107
- "min",
108
- "max",
109
140
  "currency"
110
141
  ],
111
142
  "properties": {
112
143
  "min": {
113
- "type": "string",
114
- "pattern": "^[0-9]+(\\.[0-9]+)?$",
115
- "description": "Quotes the low end."
144
+ "type": "integer",
145
+ "minimum": 0,
146
+ "maximum": 9007199254740991,
147
+ "description": "The low end, in the minor unit."
116
148
  },
117
149
  "max": {
118
- "type": "string",
119
- "pattern": "^[0-9]+(\\.[0-9]+)?$",
120
- "description": "Quotes the high end."
150
+ "type": "integer",
151
+ "minimum": 0,
152
+ "maximum": 9007199254740991,
153
+ "description": "The high end, in the minor unit."
121
154
  },
122
155
  "currency": {
123
156
  "type": "string",
124
157
  "pattern": "^[A-Z]{3}$",
125
158
  "minLength": 3,
126
159
  "maxLength": 3,
127
- "description": "Quotes the range in this currency."
160
+ "description": "Both ends in this currency; sil converts nothing."
128
161
  }
129
162
  },
130
163
  "additionalProperties": false
131
164
  }
132
165
  ],
133
- "description": "Quotes what delivery there costs."
166
+ "description": "Quotes one fee, or the range from the cheapest route’s to the dearest’s."
134
167
  },
135
168
  "free_over": {
136
169
  "type": "object",
@@ -140,16 +173,17 @@
140
173
  ],
141
174
  "properties": {
142
175
  "amount": {
143
- "type": "string",
144
- "pattern": "^[0-9]+(\\.[0-9]+)?$",
145
- "description": "Quotes the amount as the page states it."
176
+ "type": "integer",
177
+ "minimum": 0,
178
+ "maximum": 9007199254740991,
179
+ "description": "The amount in the currency’s minor unit (cents): €130 is 13000."
146
180
  },
147
181
  "currency": {
148
182
  "type": "string",
149
183
  "pattern": "^[A-Z]{3}$",
150
184
  "minLength": 3,
151
185
  "maxLength": 3,
152
- "description": "Quotes the amount in this currency."
186
+ "description": "In this currency."
153
187
  }
154
188
  },
155
189
  "additionalProperties": false,
@@ -176,40 +210,412 @@
176
210
  }
177
211
  },
178
212
  "additionalProperties": false,
179
- "description": "Tells the buyer what delivery to their address costs and how long it takes."
213
+ "description": "Tells the buyer what delivery to their country costs and how long it takes."
180
214
  },
181
- "returns": {
182
- "type": "object",
183
- "properties": {
184
- "window_days": {
185
- "type": "integer",
186
- "minimum": 0,
187
- "description": "Days to send it back."
215
+ "returns_days": {
216
+ "type": "integer",
217
+ "minimum": 0,
218
+ "description": "Says how many days the buyer has to return it."
219
+ },
220
+ "warranty_months": {
221
+ "type": "integer",
222
+ "minimum": 0,
223
+ "description": "Says how many months the shop stands behind it."
224
+ },
225
+ "promotions": {
226
+ "type": "array",
227
+ "items": {
228
+ "type": "object",
229
+ "required": [
230
+ "what"
231
+ ],
232
+ "properties": {
233
+ "what": {
234
+ "type": "string",
235
+ "description": "Quotes the promotion as the shop prints it."
236
+ },
237
+ "discount": {
238
+ "type": "number",
239
+ "minimum": 0,
240
+ "maximum": 100,
241
+ "description": "Quotes its discount, in percent, where the shop states one."
242
+ },
243
+ "minimum_spend": {
244
+ "type": "object",
245
+ "required": [
246
+ "amount",
247
+ "currency"
248
+ ],
249
+ "properties": {
250
+ "amount": {
251
+ "type": "integer",
252
+ "minimum": 0,
253
+ "maximum": 9007199254740991,
254
+ "description": "The amount in the currency’s minor unit (cents): €130 is 13000."
255
+ },
256
+ "currency": {
257
+ "type": "string",
258
+ "pattern": "^[A-Z]{3}$",
259
+ "minLength": 3,
260
+ "maxLength": 3,
261
+ "description": "In this currency."
262
+ }
263
+ },
264
+ "additionalProperties": false,
265
+ "description": "Quotes the spend it needs."
266
+ },
267
+ "until": {
268
+ "type": "string",
269
+ "format": "date",
270
+ "description": "Says when it ends."
271
+ }
188
272
  },
189
- "restocking_fee": {
190
- "type": "number",
191
- "minimum": 0,
192
- "maximum": 1,
193
- "description": "The share of the price withheld."
194
- }
273
+ "additionalProperties": false
195
274
  },
196
- "additionalProperties": false,
197
- "description": "Tells the buyer the return terms."
275
+ "description": "Quotes the shop’s promotions: ask who qualifies; a reduced price only from `discount` and only on the buyer’s yes."
198
276
  },
199
- "warranty": {
277
+ "terms": {
200
278
  "type": "object",
201
- "required": [
202
- "months"
203
- ],
204
279
  "properties": {
205
- "months": {
206
- "type": "integer",
207
- "minimum": 0,
208
- "description": "How long the shop’s warranty runs."
280
+ "who": {
281
+ "type": "object",
282
+ "patternProperties": {
283
+ "^.*$": {
284
+ "anyOf": [
285
+ {
286
+ "type": "number"
287
+ },
288
+ {
289
+ "type": "boolean"
290
+ },
291
+ {
292
+ "type": "string"
293
+ },
294
+ {
295
+ "type": "array",
296
+ "items": {
297
+ "type": "string"
298
+ }
299
+ },
300
+ {
301
+ "type": "object",
302
+ "required": [
303
+ "amount",
304
+ "currency"
305
+ ],
306
+ "properties": {
307
+ "amount": {
308
+ "type": "integer",
309
+ "minimum": 0,
310
+ "maximum": 9007199254740991,
311
+ "description": "The amount in the currency’s minor unit (cents): €130 is 13000."
312
+ },
313
+ "currency": {
314
+ "type": "string",
315
+ "pattern": "^[A-Z]{3}$",
316
+ "minLength": 3,
317
+ "maxLength": 3,
318
+ "description": "In this currency."
319
+ }
320
+ },
321
+ "additionalProperties": false
322
+ }
323
+ ]
324
+ }
325
+ },
326
+ "description": "Says who the shop is."
327
+ },
328
+ "delivery": {
329
+ "type": "object",
330
+ "patternProperties": {
331
+ "^.*$": {
332
+ "anyOf": [
333
+ {
334
+ "type": "number"
335
+ },
336
+ {
337
+ "type": "boolean"
338
+ },
339
+ {
340
+ "type": "string"
341
+ },
342
+ {
343
+ "type": "array",
344
+ "items": {
345
+ "type": "string"
346
+ }
347
+ },
348
+ {
349
+ "type": "object",
350
+ "required": [
351
+ "amount",
352
+ "currency"
353
+ ],
354
+ "properties": {
355
+ "amount": {
356
+ "type": "integer",
357
+ "minimum": 0,
358
+ "maximum": 9007199254740991,
359
+ "description": "The amount in the currency’s minor unit (cents): €130 is 13000."
360
+ },
361
+ "currency": {
362
+ "type": "string",
363
+ "pattern": "^[A-Z]{3}$",
364
+ "minLength": 3,
365
+ "maxLength": 3,
366
+ "description": "In this currency."
367
+ }
368
+ },
369
+ "additionalProperties": false
370
+ }
371
+ ]
372
+ }
373
+ },
374
+ "description": "Says how the shop delivers, beyond the buyer’s own country."
375
+ },
376
+ "payment": {
377
+ "type": "object",
378
+ "patternProperties": {
379
+ "^.*$": {
380
+ "anyOf": [
381
+ {
382
+ "type": "number"
383
+ },
384
+ {
385
+ "type": "boolean"
386
+ },
387
+ {
388
+ "type": "string"
389
+ },
390
+ {
391
+ "type": "array",
392
+ "items": {
393
+ "type": "string"
394
+ }
395
+ },
396
+ {
397
+ "type": "object",
398
+ "required": [
399
+ "amount",
400
+ "currency"
401
+ ],
402
+ "properties": {
403
+ "amount": {
404
+ "type": "integer",
405
+ "minimum": 0,
406
+ "maximum": 9007199254740991,
407
+ "description": "The amount in the currency’s minor unit (cents): €130 is 13000."
408
+ },
409
+ "currency": {
410
+ "type": "string",
411
+ "pattern": "^[A-Z]{3}$",
412
+ "minLength": 3,
413
+ "maxLength": 3,
414
+ "description": "In this currency."
415
+ }
416
+ },
417
+ "additionalProperties": false
418
+ }
419
+ ]
420
+ }
421
+ },
422
+ "description": "Says how the buyer pays."
423
+ },
424
+ "support": {
425
+ "type": "object",
426
+ "patternProperties": {
427
+ "^.*$": {
428
+ "anyOf": [
429
+ {
430
+ "type": "number"
431
+ },
432
+ {
433
+ "type": "boolean"
434
+ },
435
+ {
436
+ "type": "string"
437
+ },
438
+ {
439
+ "type": "array",
440
+ "items": {
441
+ "type": "string"
442
+ }
443
+ },
444
+ {
445
+ "type": "object",
446
+ "required": [
447
+ "amount",
448
+ "currency"
449
+ ],
450
+ "properties": {
451
+ "amount": {
452
+ "type": "integer",
453
+ "minimum": 0,
454
+ "maximum": 9007199254740991,
455
+ "description": "The amount in the currency’s minor unit (cents): €130 is 13000."
456
+ },
457
+ "currency": {
458
+ "type": "string",
459
+ "pattern": "^[A-Z]{3}$",
460
+ "minLength": 3,
461
+ "maxLength": 3,
462
+ "description": "In this currency."
463
+ }
464
+ },
465
+ "additionalProperties": false
466
+ }
467
+ ]
468
+ }
469
+ },
470
+ "description": "Says how the buyer reaches help."
471
+ },
472
+ "returns": {
473
+ "type": "object",
474
+ "patternProperties": {
475
+ "^.*$": {
476
+ "anyOf": [
477
+ {
478
+ "type": "number"
479
+ },
480
+ {
481
+ "type": "boolean"
482
+ },
483
+ {
484
+ "type": "string"
485
+ },
486
+ {
487
+ "type": "array",
488
+ "items": {
489
+ "type": "string"
490
+ }
491
+ },
492
+ {
493
+ "type": "object",
494
+ "required": [
495
+ "amount",
496
+ "currency"
497
+ ],
498
+ "properties": {
499
+ "amount": {
500
+ "type": "integer",
501
+ "minimum": 0,
502
+ "maximum": 9007199254740991,
503
+ "description": "The amount in the currency’s minor unit (cents): €130 is 13000."
504
+ },
505
+ "currency": {
506
+ "type": "string",
507
+ "pattern": "^[A-Z]{3}$",
508
+ "minLength": 3,
509
+ "maxLength": 3,
510
+ "description": "In this currency."
511
+ }
512
+ },
513
+ "additionalProperties": false
514
+ }
515
+ ]
516
+ }
517
+ },
518
+ "description": "Says how a return works."
519
+ },
520
+ "warranty": {
521
+ "type": "object",
522
+ "patternProperties": {
523
+ "^.*$": {
524
+ "anyOf": [
525
+ {
526
+ "type": "number"
527
+ },
528
+ {
529
+ "type": "boolean"
530
+ },
531
+ {
532
+ "type": "string"
533
+ },
534
+ {
535
+ "type": "array",
536
+ "items": {
537
+ "type": "string"
538
+ }
539
+ },
540
+ {
541
+ "type": "object",
542
+ "required": [
543
+ "amount",
544
+ "currency"
545
+ ],
546
+ "properties": {
547
+ "amount": {
548
+ "type": "integer",
549
+ "minimum": 0,
550
+ "maximum": 9007199254740991,
551
+ "description": "The amount in the currency’s minor unit (cents): €130 is 13000."
552
+ },
553
+ "currency": {
554
+ "type": "string",
555
+ "pattern": "^[A-Z]{3}$",
556
+ "minLength": 3,
557
+ "maxLength": 3,
558
+ "description": "In this currency."
559
+ }
560
+ },
561
+ "additionalProperties": false
562
+ }
563
+ ]
564
+ }
565
+ },
566
+ "description": "Says what the shop stands behind."
567
+ },
568
+ "guarantees": {
569
+ "type": "object",
570
+ "patternProperties": {
571
+ "^.*$": {
572
+ "anyOf": [
573
+ {
574
+ "type": "number"
575
+ },
576
+ {
577
+ "type": "boolean"
578
+ },
579
+ {
580
+ "type": "string"
581
+ },
582
+ {
583
+ "type": "array",
584
+ "items": {
585
+ "type": "string"
586
+ }
587
+ },
588
+ {
589
+ "type": "object",
590
+ "required": [
591
+ "amount",
592
+ "currency"
593
+ ],
594
+ "properties": {
595
+ "amount": {
596
+ "type": "integer",
597
+ "minimum": 0,
598
+ "maximum": 9007199254740991,
599
+ "description": "The amount in the currency’s minor unit (cents): €130 is 13000."
600
+ },
601
+ "currency": {
602
+ "type": "string",
603
+ "pattern": "^[A-Z]{3}$",
604
+ "minLength": 3,
605
+ "maxLength": 3,
606
+ "description": "In this currency."
607
+ }
608
+ },
609
+ "additionalProperties": false
610
+ }
611
+ ]
612
+ }
613
+ },
614
+ "description": "Says what the shop promises."
209
615
  }
210
616
  },
211
617
  "additionalProperties": false,
212
- "description": "Tells the buyer the shop’s warranty."
618
+ "description": "Reads every other term sil holds, by the lever it weighs the shop by; a lever with nothing held is absent."
213
619
  },
214
620
  "policy_urls": {
215
621
  "type": "array",
@@ -248,122 +654,57 @@
248
654
  },
249
655
  "additionalProperties": false
250
656
  },
251
- "description": "Hands the buyer the shop’s own policy pages; a link is not a claim."
252
- },
253
- "specs": {
254
- "type": "object",
255
- "patternProperties": {
256
- "^.*$": {
257
- "anyOf": [
258
- {
259
- "type": "number"
260
- },
261
- {
262
- "type": "boolean"
263
- },
264
- {
265
- "type": "string"
266
- }
267
- ]
268
- }
269
- },
270
- "description": "Reads every seller key sil holds a value for."
657
+ "description": "Hands the buyer the shop’s own policy pages."
271
658
  },
272
659
  "reviews": {
273
- "type": "object",
274
- "required": [
275
- "count",
276
- "praised",
277
- "complained",
278
- "sources"
279
- ],
280
- "properties": {
281
- "count": {
282
- "type": "integer",
283
- "minimum": 1,
284
- "description": "Says how many reviews sil read."
285
- },
286
- "score": {
287
- "type": "object",
288
- "required": [
289
- "value",
290
- "of"
291
- ],
292
- "properties": {
293
- "value": {
294
- "type": "number",
295
- "minimum": 0,
296
- "description": "The average score."
297
- },
298
- "of": {
299
- "type": "number",
300
- "exclusiveMinimum": 0,
301
- "description": "The scale’s top: 5, 10, 100."
302
- }
303
- },
304
- "additionalProperties": false,
305
- "description": "Says the average score on its own scale, where the reviews give one."
306
- },
307
- "praised": {
308
- "type": "array",
309
- "items": {
660
+ "type": "array",
661
+ "items": {
662
+ "type": "object",
663
+ "required": [
664
+ "source",
665
+ "url",
666
+ "score",
667
+ "of",
668
+ "count"
669
+ ],
670
+ "properties": {
671
+ "source": {
310
672
  "type": "string",
311
- "minLength": 1,
312
- "maxLength": 256,
313
- "description": "One thing reviewers praise."
673
+ "description": "Names the site that gathered the reviews."
314
674
  },
315
- "maxItems": 5,
316
- "description": "Says what reviewers praise, most often first."
317
- },
318
- "complained": {
319
- "type": "array",
320
- "items": {
675
+ "url": {
321
676
  "type": "string",
322
- "minLength": 1,
323
- "maxLength": 256,
324
- "description": "One thing reviewers complain of."
677
+ "description": "Hands the buyer the reviews."
325
678
  },
326
- "maxItems": 5,
327
- "description": "Says what reviewers complain of, most often first."
328
- },
329
- "sources": {
330
- "type": "array",
331
- "items": {
332
- "type": "object",
333
- "required": [
334
- "name",
335
- "url",
336
- "date"
337
- ],
338
- "properties": {
339
- "name": {
340
- "type": "string",
341
- "description": "Names the site or reviewer."
342
- },
343
- "url": {
344
- "type": "string",
345
- "description": "Hands the buyer the reviews."
346
- },
347
- "date": {
348
- "type": "string",
349
- "format": "date",
350
- "description": "Dates the latest review read there."
351
- }
352
- },
353
- "additionalProperties": false
679
+ "score": {
680
+ "type": "number",
681
+ "minimum": 0,
682
+ "description": "Quotes the score as that site gives it."
354
683
  },
355
- "minItems": 1,
356
- "maxItems": 5,
357
- "description": "Cites where, and how recent."
358
- }
684
+ "of": {
685
+ "type": "number",
686
+ "exclusiveMinimum": 0,
687
+ "description": "Reads the scale’s top: 5, 10, 100."
688
+ },
689
+ "count": {
690
+ "type": "integer",
691
+ "minimum": 0,
692
+ "description": "Says how many reviews the score rests on."
693
+ }
694
+ },
695
+ "additionalProperties": false
359
696
  },
360
- "additionalProperties": false,
361
- "description": "Tells the buyer what other buyers said, from the reviews sil holds; absent until it holds any."
697
+ "description": "Gives scores from a source the shop does not control; empty until sil reads one."
362
698
  }
363
699
  },
364
700
  "additionalProperties": false
365
701
  },
366
702
  "description": "Reads the terms before recommending a seller."
703
+ },
704
+ "next_page": {
705
+ "type": "integer",
706
+ "minimum": 2,
707
+ "description": "Sends it as `page` to read the sellers on; absent on the last page."
367
708
  }
368
709
  },
369
710
  "additionalProperties": false