sil-openclaw 0.5.2 → 0.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +27 -26
  3. package/SECURITY.md +3 -4
  4. package/dist/index.js +1 -1
  5. package/dist/lib/shopping-call.js +7 -4
  6. package/dist/lib/sil-client.js +36 -66
  7. package/dist/lib/tool-result.js +1 -1
  8. package/dist/tools/catalog.js +83 -242
  9. package/dist/tools/identity.js +74 -87
  10. package/openclaw.plugin.json +12 -7
  11. package/package.json +1 -1
  12. package/schema/PROVENANCE.md +7 -4
  13. package/schema/shopping-brief-read-response.schema.json +1 -1
  14. package/schema/shopping-brief-write-request.schema.json +225 -0
  15. package/schema/{shopping-brief-create-response.schema.json → shopping-brief-write-response.schema.json} +3 -3
  16. package/schema/shopping-content-request.schema.json +89 -0
  17. package/schema/shopping-content-response.schema.json +298 -0
  18. package/schema/shopping-domain-get-request.schema.json +19 -1
  19. package/schema/shopping-domain-get-response.schema.json +330 -66
  20. package/schema/shopping-domain-search-request.schema.json +1 -1
  21. package/schema/shopping-domain-search-response.schema.json +40 -35
  22. package/schema/shopping-offers-request.schema.json +174 -23
  23. package/schema/shopping-offers-response.schema.json +20 -10
  24. package/schema/shopping-product-get-request.schema.json +2 -2
  25. package/schema/shopping-product-get-response.schema.json +119 -16
  26. package/schema/shopping-search-request.schema.json +16 -25
  27. package/schema/shopping-search-response.schema.json +101 -21
  28. package/schema/shopping-seller-get-response.schema.json +249 -221
  29. package/schema/shopping-user-forget-request.schema.json +43 -0
  30. package/schema/shopping-user-forget-response.schema.json +74 -0
  31. package/schema/shopping-user-read-request.schema.json +36 -0
  32. package/schema/shopping-user-read-response.schema.json +372 -0
  33. package/schema/shopping-user-remember-request.schema.json +340 -0
  34. package/schema/shopping-user-remember-response.schema.json +66 -0
  35. package/schema/sil-whoami-request.schema.json +8 -0
  36. package/schema/sil-whoami-response.schema.json +90 -0
  37. package/sil-shopping/SKILL.md +139 -180
  38. package/schema/shopping-brief-create-request.schema.json +0 -98
  39. package/schema/shopping-brief-edit-request.schema.json +0 -125
  40. package/schema/shopping-brief-edit-response.schema.json +0 -24
  41. package/schema/shopping-domain-create-request.schema.json +0 -160
  42. package/schema/shopping-domain-create-response.schema.json +0 -60
  43. package/schema/shopping-profile-edit-request.schema.json +0 -97
  44. package/schema/shopping-profile-edit-response.schema.json +0 -17
  45. package/sil-shopping/references/mint.md +0 -190
@@ -23,6 +23,7 @@
23
23
  "host",
24
24
  "country",
25
25
  "ships",
26
+ "policy_urls",
26
27
  "specs"
27
28
  ],
28
29
  "properties": {
@@ -30,11 +31,11 @@
30
31
  "type": "string",
31
32
  "minLength": 1,
32
33
  "maxLength": 256,
33
- "description": "Matches the seller to the offers that named it."
34
+ "description": "Matches the seller to its offers."
34
35
  },
35
36
  "name": {
36
37
  "type": "string",
37
- "description": "Names the shop to the buyer."
38
+ "description": "Names the shop."
38
39
  },
39
40
  "host": {
40
41
  "type": "string",
@@ -46,14 +47,15 @@
46
47
  "type": "string",
47
48
  "pattern": "^[A-Z]{2}$",
48
49
  "minLength": 2,
49
- "maxLength": 2
50
+ "maxLength": 2,
51
+ "description": "Where the shop is."
50
52
  },
51
53
  {
52
54
  "type": "string",
53
55
  "const": "unknown"
54
56
  }
55
57
  ],
56
- "description": "Says where the shop is; `unknown` says sil has not read where this seller is, never that it is nowhere."
58
+ "description": "Says where the shop is; `unknown`, sil has not read it."
57
59
  },
58
60
  "ships": {
59
61
  "anyOf": [
@@ -72,6 +74,182 @@
72
74
  ],
73
75
  "description": "Says whether it ships there; `unknown` keeps the seller and says sil has not read its policy."
74
76
  },
77
+ "delivery": {
78
+ "type": "object",
79
+ "properties": {
80
+ "cost": {
81
+ "anyOf": [
82
+ {
83
+ "type": "object",
84
+ "required": [
85
+ "amount",
86
+ "currency"
87
+ ],
88
+ "properties": {
89
+ "amount": {
90
+ "type": "string",
91
+ "pattern": "^[0-9]+(\\.[0-9]+)?$",
92
+ "description": "Quotes the amount as the page states it."
93
+ },
94
+ "currency": {
95
+ "type": "string",
96
+ "pattern": "^[A-Z]{3}$",
97
+ "minLength": 3,
98
+ "maxLength": 3,
99
+ "description": "Quotes the amount in this currency."
100
+ }
101
+ },
102
+ "additionalProperties": false
103
+ },
104
+ {
105
+ "type": "object",
106
+ "required": [
107
+ "min",
108
+ "max",
109
+ "currency"
110
+ ],
111
+ "properties": {
112
+ "min": {
113
+ "type": "string",
114
+ "pattern": "^[0-9]+(\\.[0-9]+)?$",
115
+ "description": "Quotes the low end."
116
+ },
117
+ "max": {
118
+ "type": "string",
119
+ "pattern": "^[0-9]+(\\.[0-9]+)?$",
120
+ "description": "Quotes the high end."
121
+ },
122
+ "currency": {
123
+ "type": "string",
124
+ "pattern": "^[A-Z]{3}$",
125
+ "minLength": 3,
126
+ "maxLength": 3,
127
+ "description": "Quotes the range in this currency."
128
+ }
129
+ },
130
+ "additionalProperties": false
131
+ }
132
+ ],
133
+ "description": "Quotes what delivery there costs."
134
+ },
135
+ "free_over": {
136
+ "type": "object",
137
+ "required": [
138
+ "amount",
139
+ "currency"
140
+ ],
141
+ "properties": {
142
+ "amount": {
143
+ "type": "string",
144
+ "pattern": "^[0-9]+(\\.[0-9]+)?$",
145
+ "description": "Quotes the amount as the page states it."
146
+ },
147
+ "currency": {
148
+ "type": "string",
149
+ "pattern": "^[A-Z]{3}$",
150
+ "minLength": 3,
151
+ "maxLength": 3,
152
+ "description": "Quotes the amount in this currency."
153
+ }
154
+ },
155
+ "additionalProperties": false,
156
+ "description": "Quotes the basket that clears the charge."
157
+ },
158
+ "days": {
159
+ "type": "object",
160
+ "required": [
161
+ "min",
162
+ "max"
163
+ ],
164
+ "properties": {
165
+ "min": {
166
+ "type": "integer",
167
+ "description": "Tells the buyer the soonest it arrives."
168
+ },
169
+ "max": {
170
+ "type": "integer",
171
+ "description": "Tells the buyer the latest."
172
+ }
173
+ },
174
+ "additionalProperties": false,
175
+ "description": "Tells the buyer how long the route takes."
176
+ }
177
+ },
178
+ "additionalProperties": false,
179
+ "description": "Tells the buyer what delivery to their address costs and how long it takes."
180
+ },
181
+ "returns": {
182
+ "type": "object",
183
+ "properties": {
184
+ "window_days": {
185
+ "type": "integer",
186
+ "minimum": 0,
187
+ "description": "Days to send it back."
188
+ },
189
+ "restocking_fee": {
190
+ "type": "number",
191
+ "minimum": 0,
192
+ "maximum": 1,
193
+ "description": "The share of the price withheld."
194
+ }
195
+ },
196
+ "additionalProperties": false,
197
+ "description": "Tells the buyer the return terms."
198
+ },
199
+ "warranty": {
200
+ "type": "object",
201
+ "required": [
202
+ "months"
203
+ ],
204
+ "properties": {
205
+ "months": {
206
+ "type": "integer",
207
+ "minimum": 0,
208
+ "description": "How long the shop’s warranty runs."
209
+ }
210
+ },
211
+ "additionalProperties": false,
212
+ "description": "Tells the buyer the shop’s warranty."
213
+ },
214
+ "policy_urls": {
215
+ "type": "array",
216
+ "items": {
217
+ "type": "object",
218
+ "required": [
219
+ "kind",
220
+ "url"
221
+ ],
222
+ "properties": {
223
+ "kind": {
224
+ "anyOf": [
225
+ {
226
+ "type": "string",
227
+ "const": "shipping"
228
+ },
229
+ {
230
+ "type": "string",
231
+ "const": "returns"
232
+ },
233
+ {
234
+ "type": "string",
235
+ "const": "warranty"
236
+ },
237
+ {
238
+ "type": "string",
239
+ "const": "terms"
240
+ }
241
+ ],
242
+ "description": "Reads which policy the page holds."
243
+ },
244
+ "url": {
245
+ "type": "string",
246
+ "description": "Opens the shop’s own page."
247
+ }
248
+ },
249
+ "additionalProperties": false
250
+ },
251
+ "description": "Hands the buyer the shop’s own policy pages; a link is not a claim."
252
+ },
75
253
  "specs": {
76
254
  "type": "object",
77
255
  "patternProperties": {
@@ -89,248 +267,98 @@
89
267
  ]
90
268
  }
91
269
  },
92
- "description": "Reads the seller's whole terms, base and branch, as the dossier's `specs` are a product's; empty for a seller sil has read nothing about."
270
+ "description": "Reads every seller key sil holds a value for."
93
271
  },
94
- "shipping": {
272
+ "reviews": {
95
273
  "type": "object",
96
274
  "required": [
97
- "policy_url",
98
- "routes"
275
+ "count",
276
+ "praised",
277
+ "complained",
278
+ "sources"
99
279
  ],
100
280
  "properties": {
101
- "policy_url": {
102
- "anyOf": [
103
- {
104
- "type": "string"
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."
105
297
  },
106
- {
107
- "type": "null"
298
+ "of": {
299
+ "type": "number",
300
+ "exclusiveMinimum": 0,
301
+ "description": "The scale’s top: 5, 10, 100."
108
302
  }
109
- ],
110
- "description": "Links the policy page; `null` when the routes were read off a product page and sil holds no policy page."
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": {
310
+ "type": "string",
311
+ "minLength": 1,
312
+ "maxLength": 256,
313
+ "description": "One thing reviewers praise."
314
+ },
315
+ "maxItems": 5,
316
+ "description": "Says what reviewers praise, most often first."
317
+ },
318
+ "complained": {
319
+ "type": "array",
320
+ "items": {
321
+ "type": "string",
322
+ "minLength": 1,
323
+ "maxLength": 256,
324
+ "description": "One thing reviewers complain of."
325
+ },
326
+ "maxItems": 5,
327
+ "description": "Says what reviewers complain of, most often first."
111
328
  },
112
- "routes": {
329
+ "sources": {
113
330
  "type": "array",
114
331
  "items": {
115
332
  "type": "object",
116
333
  "required": [
117
- "country",
118
- "service"
334
+ "name",
335
+ "url",
336
+ "date"
119
337
  ],
120
338
  "properties": {
121
- "country": {
339
+ "name": {
122
340
  "type": "string",
123
- "minLength": 2,
124
- "maxLength": 2,
125
- "description": "Checks the route covers the buyer."
126
- },
127
- "service": {
128
- "anyOf": [
129
- {
130
- "type": "string",
131
- "const": "economy"
132
- },
133
- {
134
- "type": "string",
135
- "const": "standard"
136
- },
137
- {
138
- "type": "string",
139
- "const": "express"
140
- },
141
- {
142
- "type": "string",
143
- "const": "same_day"
144
- },
145
- {
146
- "type": "string",
147
- "const": "pickup"
148
- },
149
- {
150
- "type": "string",
151
- "const": "locker"
152
- }
153
- ],
154
- "description": "Tells the buyer which service the route is."
341
+ "description": "Names the site or reviewer."
155
342
  },
156
- "label": {
343
+ "url": {
157
344
  "type": "string",
158
- "description": "Quotes the merchant's own name for the service."
345
+ "description": "Hands the buyer the reviews."
159
346
  },
160
- "cost": {
161
- "anyOf": [
162
- {
163
- "type": "object",
164
- "required": [
165
- "amount",
166
- "currency"
167
- ],
168
- "properties": {
169
- "amount": {
170
- "type": "string",
171
- "pattern": "^[0-9]+(\\.[0-9]+)?$",
172
- "description": "Quotes the amount as the page states it."
173
- },
174
- "currency": {
175
- "type": "string",
176
- "pattern": "^[A-Z]{3}$",
177
- "minLength": 3,
178
- "maxLength": 3,
179
- "description": "Quotes the amount in this currency."
180
- }
181
- },
182
- "additionalProperties": false
183
- },
184
- {
185
- "type": "object",
186
- "required": [
187
- "min",
188
- "max",
189
- "currency"
190
- ],
191
- "properties": {
192
- "min": {
193
- "type": "string",
194
- "pattern": "^[0-9]+(\\.[0-9]+)?$",
195
- "description": "Quotes the low end."
196
- },
197
- "max": {
198
- "type": "string",
199
- "pattern": "^[0-9]+(\\.[0-9]+)?$",
200
- "description": "Quotes the high end."
201
- },
202
- "currency": {
203
- "type": "string",
204
- "pattern": "^[A-Z]{3}$",
205
- "minLength": 3,
206
- "maxLength": 3,
207
- "description": "Quotes the range in this currency."
208
- }
209
- },
210
- "additionalProperties": false
211
- }
212
- ],
213
- "description": "Tells the buyer what shipping costs on this route."
214
- },
215
- "free_over": {
216
- "anyOf": [
217
- {
218
- "type": "object",
219
- "required": [
220
- "amount",
221
- "currency"
222
- ],
223
- "properties": {
224
- "amount": {
225
- "type": "string",
226
- "pattern": "^[0-9]+(\\.[0-9]+)?$",
227
- "description": "Quotes the amount as the page states it."
228
- },
229
- "currency": {
230
- "type": "string",
231
- "pattern": "^[A-Z]{3}$",
232
- "minLength": 3,
233
- "maxLength": 3,
234
- "description": "Quotes the amount in this currency."
235
- }
236
- },
237
- "additionalProperties": false
238
- },
239
- {
240
- "type": "object",
241
- "required": [
242
- "min",
243
- "max",
244
- "currency"
245
- ],
246
- "properties": {
247
- "min": {
248
- "type": "string",
249
- "pattern": "^[0-9]+(\\.[0-9]+)?$",
250
- "description": "Quotes the low end."
251
- },
252
- "max": {
253
- "type": "string",
254
- "pattern": "^[0-9]+(\\.[0-9]+)?$",
255
- "description": "Quotes the high end."
256
- },
257
- "currency": {
258
- "type": "string",
259
- "pattern": "^[A-Z]{3}$",
260
- "minLength": 3,
261
- "maxLength": 3,
262
- "description": "Quotes the range in this currency."
263
- }
264
- },
265
- "additionalProperties": false
266
- }
267
- ],
268
- "description": "Tells the buyer what basket clears the shipping charge."
269
- },
270
- "days": {
271
- "type": "object",
272
- "required": [
273
- "min",
274
- "max"
275
- ],
276
- "properties": {
277
- "min": {
278
- "type": "integer",
279
- "description": "Tells the buyer the soonest it arrives."
280
- },
281
- "max": {
282
- "type": "integer",
283
- "description": "Tells the buyer the latest."
284
- }
285
- },
286
- "additionalProperties": false,
287
- "description": "Tells the buyer how long the route takes."
347
+ "date": {
348
+ "type": "string",
349
+ "format": "date",
350
+ "description": "Dates the latest review read there."
288
351
  }
289
352
  },
290
353
  "additionalProperties": false
291
354
  },
292
- "description": "Quotes the route that covers the buyer."
293
- }
294
- },
295
- "additionalProperties": false,
296
- "description": "Quotes the shipping terms and links the policy page."
297
- },
298
- "returns": {
299
- "type": "object",
300
- "required": [
301
- "policy_url"
302
- ],
303
- "properties": {
304
- "policy_url": {
305
- "anyOf": [
306
- {
307
- "type": "string"
308
- },
309
- {
310
- "type": "null"
311
- }
312
- ],
313
- "description": "Links the returns page; `null` the same way as shipping."
314
- },
315
- "window_days": {
316
- "type": "integer",
317
- "description": "Tells the buyer how long they have to send it back."
318
- },
319
- "restocking_fee": {
320
- "type": "number",
321
- "description": "Tells the buyer what a return costs: the fraction of the price the seller withholds, 0 to 1."
355
+ "minItems": 1,
356
+ "maxItems": 5,
357
+ "description": "Cites where, and how recent."
322
358
  }
323
359
  },
324
360
  "additionalProperties": false,
325
- "description": "Tells the buyer the return terms and links the page."
326
- },
327
- "policy_urls": {
328
- "type": "array",
329
- "items": {
330
- "type": "string"
331
- },
332
- "minItems": 1,
333
- "description": "Opens the shop's own shipping, returns and terms pages where sil has read none of them yet. A link is not a claim: `ships` stays `unknown` until sil reads what is behind it."
361
+ "description": "Tells the buyer what other buyers said, from the reviews sil holds; absent until it holds any."
334
362
  }
335
363
  },
336
364
  "additionalProperties": false
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.sil.com/shopping-user-forget-request.schema.json",
4
+ "title": "sil shopping_user_forget — request",
5
+ "anyOf": [
6
+ {
7
+ "type": "object",
8
+ "required": [
9
+ "ids"
10
+ ],
11
+ "properties": {
12
+ "ids": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "string",
16
+ "minLength": 1,
17
+ "maxLength": 256,
18
+ "description": "Names the row to replace it, and to forget it."
19
+ },
20
+ "minItems": 1,
21
+ "maxItems": 50,
22
+ "description": "Forgets these rows, named off the read, on the buyer’s word."
23
+ }
24
+ },
25
+ "additionalProperties": false
26
+ },
27
+ {
28
+ "type": "object",
29
+ "required": [
30
+ "all"
31
+ ],
32
+ "properties": {
33
+ "all": {
34
+ "type": "boolean",
35
+ "const": true,
36
+ "description": "Forgets everything the read lists and the buyer’s calls in sil’s record."
37
+ }
38
+ },
39
+ "additionalProperties": false
40
+ }
41
+ ],
42
+ "type": "object"
43
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.sil.com/shopping-user-forget-response.schema.json",
4
+ "title": "sil shopping_user_forget — response",
5
+ "type": "object",
6
+ "required": [
7
+ "status",
8
+ "removed",
9
+ "cannot_reach"
10
+ ],
11
+ "properties": {
12
+ "status": {
13
+ "type": "string",
14
+ "const": "ok",
15
+ "description": "Reads the answer. Every other status arrives as an error body carrying recovery."
16
+ },
17
+ "removed": {
18
+ "type": "object",
19
+ "required": [
20
+ "measurement",
21
+ "memory",
22
+ "preference",
23
+ "purchase",
24
+ "record",
25
+ "brief"
26
+ ],
27
+ "properties": {
28
+ "measurement": {
29
+ "type": "integer",
30
+ "minimum": 0,
31
+ "description": "Measurements removed."
32
+ },
33
+ "memory": {
34
+ "type": "integer",
35
+ "minimum": 0,
36
+ "description": "Memories removed."
37
+ },
38
+ "preference": {
39
+ "type": "integer",
40
+ "minimum": 0,
41
+ "description": "Preferences removed."
42
+ },
43
+ "purchase": {
44
+ "type": "integer",
45
+ "minimum": 0,
46
+ "description": "Purchases removed."
47
+ },
48
+ "record": {
49
+ "type": "integer",
50
+ "minimum": 0,
51
+ "description": "The buyer’s searches, offers calls and call traces removed; counts are kept."
52
+ },
53
+ "brief": {
54
+ "type": "integer",
55
+ "minimum": 0,
56
+ "description": "Briefs removed."
57
+ }
58
+ },
59
+ "additionalProperties": false,
60
+ "description": "Tells the buyer exactly what went."
61
+ },
62
+ "cannot_reach": {
63
+ "type": "array",
64
+ "items": {
65
+ "type": "string",
66
+ "minLength": 1,
67
+ "maxLength": 256,
68
+ "description": "Something sil cannot erase, and who holds it."
69
+ },
70
+ "description": "Tells the buyer what sil cannot erase: the chat itself, a shop’s own copy."
71
+ }
72
+ },
73
+ "additionalProperties": false
74
+ }