sil-openclaw 0.7.0 → 0.8.1

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 +36 -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
  "offers"
9
10
  ],
10
11
  "properties": {
@@ -13,54 +14,325 @@
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
  "offers": {
17
47
  "type": "array",
18
48
  "items": {
19
49
  "type": "object",
20
50
  "required": [
21
51
  "variant_id",
22
- "title",
23
- "seller_id",
24
- "seller_name",
52
+ "seller",
25
53
  "price",
26
- "currency",
27
- "availability",
28
- "observed_at",
29
54
  "url",
30
- "seller_fit"
55
+ "read_on"
31
56
  ],
32
57
  "properties": {
33
58
  "variant_id": {
34
59
  "type": "string",
35
60
  "minLength": 1,
36
61
  "maxLength": 256,
37
- "description": "Matches the offer to the pick; passes it to the dossier."
38
- },
39
- "title": {
40
- "type": "string",
41
- "description": "Names what the listing sells."
42
- },
43
- "seller_id": {
44
- "type": "string",
45
- "minLength": 1,
46
- "maxLength": 256,
47
- "description": "Passes it to `shopping_seller_get`."
62
+ "description": "Matches the offer to the variant asked for."
48
63
  },
49
- "seller_name": {
50
- "type": "string",
51
- "description": "Names the shop."
64
+ "seller": {
65
+ "type": "object",
66
+ "required": [
67
+ "id",
68
+ "name",
69
+ "host",
70
+ "country",
71
+ "ships",
72
+ "promotions"
73
+ ],
74
+ "properties": {
75
+ "id": {
76
+ "type": "string",
77
+ "minLength": 1,
78
+ "maxLength": 256,
79
+ "description": "Passes it to `shopping_seller_get` for its warranty, policies, reviews and other terms."
80
+ },
81
+ "name": {
82
+ "type": "string",
83
+ "description": "Names the shop."
84
+ },
85
+ "host": {
86
+ "type": "string",
87
+ "description": "Names the shop by its site."
88
+ },
89
+ "country": {
90
+ "anyOf": [
91
+ {
92
+ "type": "string",
93
+ "pattern": "^[A-Z]{2}$",
94
+ "minLength": 2,
95
+ "maxLength": 2,
96
+ "description": "Where the shop is."
97
+ },
98
+ {
99
+ "type": "string",
100
+ "const": "unknown"
101
+ }
102
+ ],
103
+ "description": "Says where the shop is."
104
+ },
105
+ "ships": {
106
+ "anyOf": [
107
+ {
108
+ "type": "string",
109
+ "const": "serviceable"
110
+ },
111
+ {
112
+ "type": "string",
113
+ "const": "not_serviceable"
114
+ },
115
+ {
116
+ "type": "string",
117
+ "const": "unknown"
118
+ }
119
+ ],
120
+ "description": "Says whether it ships there; `unknown` keeps the seller and says sil has not read its policy."
121
+ },
122
+ "delivery": {
123
+ "type": "object",
124
+ "properties": {
125
+ "cost": {
126
+ "anyOf": [
127
+ {
128
+ "type": "object",
129
+ "required": [
130
+ "amount",
131
+ "currency"
132
+ ],
133
+ "properties": {
134
+ "amount": {
135
+ "type": "integer",
136
+ "minimum": 0,
137
+ "maximum": 9007199254740991,
138
+ "description": "The amount in the currency’s minor unit (cents): €130 is 13000."
139
+ },
140
+ "currency": {
141
+ "type": "string",
142
+ "pattern": "^[A-Z]{3}$",
143
+ "minLength": 3,
144
+ "maxLength": 3,
145
+ "description": "In this currency."
146
+ }
147
+ },
148
+ "additionalProperties": false
149
+ },
150
+ {
151
+ "type": "object",
152
+ "required": [
153
+ "currency"
154
+ ],
155
+ "properties": {
156
+ "min": {
157
+ "type": "integer",
158
+ "minimum": 0,
159
+ "maximum": 9007199254740991,
160
+ "description": "The low end, in the minor unit."
161
+ },
162
+ "max": {
163
+ "type": "integer",
164
+ "minimum": 0,
165
+ "maximum": 9007199254740991,
166
+ "description": "The high end, in the minor unit."
167
+ },
168
+ "currency": {
169
+ "type": "string",
170
+ "pattern": "^[A-Z]{3}$",
171
+ "minLength": 3,
172
+ "maxLength": 3,
173
+ "description": "Both ends in this currency; sil converts nothing."
174
+ }
175
+ },
176
+ "additionalProperties": false
177
+ }
178
+ ],
179
+ "description": "Quotes one fee, or the range from the cheapest route’s to the dearest’s."
180
+ },
181
+ "free_over": {
182
+ "type": "object",
183
+ "required": [
184
+ "amount",
185
+ "currency"
186
+ ],
187
+ "properties": {
188
+ "amount": {
189
+ "type": "integer",
190
+ "minimum": 0,
191
+ "maximum": 9007199254740991,
192
+ "description": "The amount in the currency’s minor unit (cents): €130 is 13000."
193
+ },
194
+ "currency": {
195
+ "type": "string",
196
+ "pattern": "^[A-Z]{3}$",
197
+ "minLength": 3,
198
+ "maxLength": 3,
199
+ "description": "In this currency."
200
+ }
201
+ },
202
+ "additionalProperties": false,
203
+ "description": "Quotes the basket that clears the charge."
204
+ },
205
+ "days": {
206
+ "type": "object",
207
+ "required": [
208
+ "min",
209
+ "max"
210
+ ],
211
+ "properties": {
212
+ "min": {
213
+ "type": "integer",
214
+ "description": "Tells the buyer the soonest it arrives."
215
+ },
216
+ "max": {
217
+ "type": "integer",
218
+ "description": "Tells the buyer the latest."
219
+ }
220
+ },
221
+ "additionalProperties": false,
222
+ "description": "Tells the buyer how long the route takes."
223
+ }
224
+ },
225
+ "additionalProperties": false,
226
+ "description": "Tells the buyer what delivery to their country costs and how long it takes."
227
+ },
228
+ "returns_days": {
229
+ "type": "integer",
230
+ "minimum": 0,
231
+ "description": "Says how many days the buyer has to return it."
232
+ },
233
+ "promotions": {
234
+ "type": "array",
235
+ "items": {
236
+ "type": "object",
237
+ "required": [
238
+ "what"
239
+ ],
240
+ "properties": {
241
+ "what": {
242
+ "type": "string",
243
+ "description": "Quotes the promotion as the shop prints it."
244
+ },
245
+ "discount": {
246
+ "type": "number",
247
+ "minimum": 0,
248
+ "maximum": 100,
249
+ "description": "Quotes its discount, in percent, where the shop states one."
250
+ },
251
+ "minimum_spend": {
252
+ "type": "object",
253
+ "required": [
254
+ "amount",
255
+ "currency"
256
+ ],
257
+ "properties": {
258
+ "amount": {
259
+ "type": "integer",
260
+ "minimum": 0,
261
+ "maximum": 9007199254740991,
262
+ "description": "The amount in the currency’s minor unit (cents): €130 is 13000."
263
+ },
264
+ "currency": {
265
+ "type": "string",
266
+ "pattern": "^[A-Z]{3}$",
267
+ "minLength": 3,
268
+ "maxLength": 3,
269
+ "description": "In this currency."
270
+ }
271
+ },
272
+ "additionalProperties": false,
273
+ "description": "Quotes the spend it needs."
274
+ },
275
+ "until": {
276
+ "type": "string",
277
+ "format": "date",
278
+ "description": "Says when it ends."
279
+ }
280
+ },
281
+ "additionalProperties": false
282
+ },
283
+ "description": "Quotes this shop’s own promotions, on its offers only: ask who qualifies; a reduced price only from `discount` and only on the buyer’s yes."
284
+ }
285
+ },
286
+ "additionalProperties": false,
287
+ "description": "The shop selling it."
52
288
  },
53
289
  "price": {
54
- "type": "string",
55
- "pattern": "^[0-9]+(\\.[0-9]+)?$",
56
- "description": "Quotes the price as read, never converted."
290
+ "type": "object",
291
+ "required": [
292
+ "amount",
293
+ "currency"
294
+ ],
295
+ "properties": {
296
+ "amount": {
297
+ "type": "integer",
298
+ "minimum": 0,
299
+ "maximum": 9007199254740991,
300
+ "description": "The amount in the currency’s minor unit (cents): €130 is 13000."
301
+ },
302
+ "currency": {
303
+ "type": "string",
304
+ "pattern": "^[A-Z]{3}$",
305
+ "minLength": 3,
306
+ "maxLength": 3,
307
+ "description": "In this currency."
308
+ }
309
+ },
310
+ "additionalProperties": false,
311
+ "description": "Quotes what it costs, as the shop printed it."
57
312
  },
58
- "currency": {
59
- "type": "string",
60
- "pattern": "^[A-Z]{3}$",
61
- "minLength": 3,
62
- "maxLength": 3,
63
- "description": "Quotes the price in this currency."
313
+ "was": {
314
+ "type": "object",
315
+ "required": [
316
+ "amount",
317
+ "currency"
318
+ ],
319
+ "properties": {
320
+ "amount": {
321
+ "type": "integer",
322
+ "minimum": 0,
323
+ "maximum": 9007199254740991,
324
+ "description": "The amount in the currency’s minor unit (cents): €130 is 13000."
325
+ },
326
+ "currency": {
327
+ "type": "string",
328
+ "pattern": "^[A-Z]{3}$",
329
+ "minLength": 3,
330
+ "maxLength": 3,
331
+ "description": "In this currency."
332
+ }
333
+ },
334
+ "additionalProperties": false,
335
+ "description": "Quotes the price it was, struck through."
64
336
  },
65
337
  "availability": {
66
338
  "anyOf": [
@@ -76,6 +348,10 @@
76
348
  "type": "string",
77
349
  "const": "preorder"
78
350
  },
351
+ {
352
+ "type": "string",
353
+ "const": "by_enquiry"
354
+ },
79
355
  {
80
356
  "type": "string",
81
357
  "const": "out_of_stock"
@@ -91,91 +367,82 @@
91
367
  ],
92
368
  "description": "Tells the buyer whether it can be bought now."
93
369
  },
94
- "observed_at": {
95
- "type": "string",
96
- "format": "date-time",
97
- "description": "Dates the price: when sil last read it."
370
+ "condition": {
371
+ "anyOf": [
372
+ {
373
+ "type": "string",
374
+ "const": "new"
375
+ },
376
+ {
377
+ "type": "string",
378
+ "const": "used"
379
+ },
380
+ {
381
+ "type": "string",
382
+ "const": "refurbished"
383
+ },
384
+ {
385
+ "type": "string",
386
+ "const": "damaged"
387
+ }
388
+ ],
389
+ "description": "Says it is not sold new where the shop says so; absent, new or unstated."
98
390
  },
99
- "url": {
100
- "type": "string",
101
- "description": "Hands the buyer the listing."
391
+ "plan": {
392
+ "type": "array",
393
+ "items": {
394
+ "type": "string"
395
+ },
396
+ "minItems": 1,
397
+ "description": "Says the price is a subscription’s, and each cadence the shop offers."
102
398
  },
103
- "seller_fit": {
399
+ "pack": {
104
400
  "type": "object",
105
401
  "required": [
106
- "ships"
402
+ "count",
403
+ "with"
107
404
  ],
108
405
  "properties": {
109
- "ships": {
110
- "anyOf": [
111
- {
112
- "type": "string",
113
- "const": "serviceable"
114
- },
115
- {
116
- "type": "string",
117
- "const": "not_serviceable"
118
- },
119
- {
120
- "type": "string",
121
- "const": "unknown"
122
- }
123
- ],
124
- "description": "Says whether it ships there; `unknown` keeps the seller and says sil has not read its policy."
125
- }
126
- },
127
- "additionalProperties": {
128
- "anyOf": [
129
- {
130
- "type": "number"
131
- },
132
- {
133
- "type": "boolean"
134
- },
135
- {
406
+ "count": {
407
+ "type": "integer",
408
+ "minimum": 1,
409
+ "description": "Says how many of the variant it holds."
410
+ },
411
+ "with": {
412
+ "type": "array",
413
+ "items": {
136
414
  "type": "string"
137
415
  },
138
- {
139
- "type": "object",
140
- "required": [
141
- "amount",
142
- "currency"
143
- ],
144
- "properties": {
145
- "amount": {
146
- "type": "string",
147
- "pattern": "^[0-9]+(\\.[0-9]+)?$",
148
- "description": "Quotes the amount as the page states it."
149
- },
150
- "currency": {
151
- "type": "string",
152
- "pattern": "^[A-Z]{3}$",
153
- "minLength": 3,
154
- "maxLength": 3,
155
- "description": "Quotes the amount in this currency."
156
- }
157
- },
158
- "additionalProperties": false
159
- }
160
- ]
416
+ "description": "Names what else comes in it."
417
+ }
161
418
  },
162
- "description": "Compares each requested seller key with what it asked, on this seller's value; `ships` says whether it reaches the address."
419
+ "additionalProperties": false,
420
+ "description": "Says the price buys a pack or a bundle, not one of the variant."
421
+ },
422
+ "packaging": {
423
+ "type": "string",
424
+ "minLength": 1,
425
+ "description": "Names a special packaging the price buys it in, as the shop printed it."
426
+ },
427
+ "url": {
428
+ "type": "string",
429
+ "description": "Hands the buyer the listing."
430
+ },
431
+ "read_on": {
432
+ "type": "string",
433
+ "format": "date",
434
+ "description": "Dates the price: the day sil read it."
163
435
  }
164
436
  },
165
- "additionalProperties": false
437
+ "additionalProperties": false,
438
+ "description": "One shop’s offer of a variant."
166
439
  },
167
- "description": "Lists where it can be bought, best for the buyer first."
440
+ "description": "Lists where each variant can be bought: shops shipping to `ship_to` first, cheapest first."
168
441
  },
169
- "pending": {
170
- "type": "array",
171
- "items": {
172
- "type": "string",
173
- "minLength": 1,
174
- "maxLength": 256,
175
- "description": "Names a variant whose offers sil is still finding."
176
- },
177
- "maxItems": 10,
178
- "description": "Names the asked variants whose offers sil is still finding; ask again in a few seconds."
442
+ "next_page": {
443
+ "type": "integer",
444
+ "minimum": 2,
445
+ "description": "Sends it as `page` to read the offers on; absent on the last page."
179
446
  }
180
447
  },
181
448
  "additionalProperties": false
@@ -17,8 +17,9 @@
17
17
  },
18
18
  "minItems": 1,
19
19
  "maxItems": 3,
20
- "description": "Sends the variant ids it wants the whole of; one sil holds no product for is named in `not_held`."
20
+ "description": "Sends the product or variant ids it wants the whole of; one sil does not hold is left out."
21
21
  }
22
22
  },
23
- "additionalProperties": false
23
+ "additionalProperties": false,
24
+ "description": "Money is in the minor unit: €130 is 13000."
24
25
  }