sil-openclaw 0.6.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 (53) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/EXAMPLES.md +93 -0
  3. package/README.md +58 -120
  4. package/SECURITY.md +12 -9
  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 +27 -28
  12. package/dist/lib/sil-client.js +49 -66
  13. package/dist/lib/tool-result.js +1 -1
  14. package/dist/tools/catalog.js +113 -272
  15. package/dist/tools/identity.js +79 -88
  16. package/openclaw.plugin.json +12 -7
  17. package/package.json +4 -2
  18. package/schema/PROVENANCE.md +7 -4
  19. package/schema/shopping-brief-read-request.schema.json +2 -1
  20. package/schema/shopping-brief-read-response.schema.json +98 -50
  21. package/schema/shopping-brief-write-request.schema.json +322 -0
  22. package/schema/{shopping-brief-create-response.schema.json → shopping-brief-write-response.schema.json} +3 -3
  23. package/schema/shopping-content-request.schema.json +12 -31
  24. package/schema/shopping-content-response.schema.json +14 -95
  25. package/schema/shopping-domain-get-request.schema.json +24 -1
  26. package/schema/shopping-domain-get-response.schema.json +23 -421
  27. package/schema/shopping-domain-search-request.schema.json +3 -3
  28. package/schema/shopping-domain-search-response.schema.json +3 -56
  29. package/schema/shopping-offers-request.schema.json +14 -9
  30. package/schema/shopping-offers-response.schema.json +368 -91
  31. package/schema/shopping-product-get-request.schema.json +4 -3
  32. package/schema/shopping-product-get-response.schema.json +347 -46
  33. package/schema/shopping-search-request.schema.json +53 -40
  34. package/schema/shopping-search-response.schema.json +408 -116
  35. package/schema/shopping-seller-get-request.schema.json +13 -1
  36. package/schema/shopping-seller-get-response.schema.json +594 -225
  37. package/schema/shopping-user-forget-request.schema.json +43 -0
  38. package/schema/shopping-user-forget-response.schema.json +74 -0
  39. package/schema/shopping-user-read-request.schema.json +37 -0
  40. package/schema/shopping-user-read-response.schema.json +372 -0
  41. package/schema/shopping-user-remember-request.schema.json +341 -0
  42. package/schema/shopping-user-remember-response.schema.json +66 -0
  43. package/schema/sil-whoami-request.schema.json +8 -0
  44. package/schema/sil-whoami-response.schema.json +99 -0
  45. package/sil-shopping/SKILL.md +149 -208
  46. package/dist/gateway/search-results.js +0 -99
  47. package/dist/lib/search-results-log.js +0 -23
  48. package/dist/lib/search-results-store.js +0 -116
  49. package/schema/shopping-brief-create-request.schema.json +0 -98
  50. package/schema/shopping-brief-edit-request.schema.json +0 -125
  51. package/schema/shopping-brief-edit-response.schema.json +0 -24
  52. package/schema/shopping-profile-edit-request.schema.json +0 -97
  53. package/schema/shopping-profile-edit-response.schema.json +0 -17
@@ -0,0 +1,341 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.sil.com/shopping-user-remember-request.schema.json",
4
+ "title": "sil shopping_user_remember — request",
5
+ "type": "object",
6
+ "required": [
7
+ "rows"
8
+ ],
9
+ "properties": {
10
+ "rows": {
11
+ "type": "array",
12
+ "items": {
13
+ "anyOf": [
14
+ {
15
+ "type": "object",
16
+ "required": [
17
+ "kind",
18
+ "what",
19
+ "value",
20
+ "gives_back",
21
+ "source"
22
+ ],
23
+ "properties": {
24
+ "id": {
25
+ "type": "string",
26
+ "minLength": 1,
27
+ "maxLength": 256,
28
+ "description": "Replaces this row: only an id `shopping_user_read` or a keep answered, never made up. A new row has none."
29
+ },
30
+ "kind": {
31
+ "type": "string",
32
+ "const": "measurement",
33
+ "description": "Reads what kind of row it is."
34
+ },
35
+ "what": {
36
+ "type": "string",
37
+ "minLength": 1,
38
+ "maxLength": 64,
39
+ "description": "Names what was measured, in plain words: \"foot length\", \"chest\"."
40
+ },
41
+ "value": {
42
+ "anyOf": [
43
+ {
44
+ "type": "number"
45
+ },
46
+ {
47
+ "type": "string",
48
+ "minLength": 1,
49
+ "maxLength": 128,
50
+ "description": "A size as it is printed."
51
+ }
52
+ ],
53
+ "description": "Reads a number to turn into a spec value, or a size as printed."
54
+ },
55
+ "unit": {
56
+ "type": "string",
57
+ "minLength": 1,
58
+ "maxLength": 16,
59
+ "description": "Reads the unit, or the size system: cm, mm, EU, UK."
60
+ },
61
+ "brand": {
62
+ "type": "string",
63
+ "minLength": 1,
64
+ "maxLength": 64,
65
+ "description": "Reads whose sizing a printed size is in."
66
+ },
67
+ "place": {
68
+ "type": "string",
69
+ "minLength": 1,
70
+ "maxLength": 64,
71
+ "description": "Names where the row applies: a place sil holds, or a wider one in a word or two, never a sentence."
72
+ },
73
+ "gives_back": {
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "maxLength": 200,
77
+ "description": "Says what the row gives the buyer back next time; said when it is kept."
78
+ },
79
+ "source": {
80
+ "anyOf": [
81
+ {
82
+ "type": "string",
83
+ "const": "told"
84
+ },
85
+ {
86
+ "type": "string",
87
+ "const": "agent"
88
+ }
89
+ ],
90
+ "description": "`told`: the buyer said it. `agent`: the agent read it off the conversation."
91
+ }
92
+ },
93
+ "additionalProperties": false
94
+ },
95
+ {
96
+ "type": "object",
97
+ "required": [
98
+ "kind",
99
+ "text",
100
+ "gives_back",
101
+ "source"
102
+ ],
103
+ "properties": {
104
+ "id": {
105
+ "type": "string",
106
+ "minLength": 1,
107
+ "maxLength": 256,
108
+ "description": "Replaces this row: only an id `shopping_user_read` or a keep answered, never made up. A new row has none."
109
+ },
110
+ "kind": {
111
+ "type": "string",
112
+ "const": "memory",
113
+ "description": "Reads what kind of row it is."
114
+ },
115
+ "text": {
116
+ "type": "string",
117
+ "minLength": 1,
118
+ "maxLength": 500,
119
+ "description": "Reads what the buyer told, in a sentence; starts from it, never asks it again."
120
+ },
121
+ "place": {
122
+ "type": "string",
123
+ "minLength": 1,
124
+ "maxLength": 64,
125
+ "description": "Names where the row applies: a place sil holds, or a wider one in a word or two, never a sentence."
126
+ },
127
+ "gives_back": {
128
+ "type": "string",
129
+ "minLength": 1,
130
+ "maxLength": 200,
131
+ "description": "Says what the row gives the buyer back next time; said when it is kept."
132
+ },
133
+ "source": {
134
+ "anyOf": [
135
+ {
136
+ "type": "string",
137
+ "const": "told"
138
+ },
139
+ {
140
+ "type": "string",
141
+ "const": "agent"
142
+ }
143
+ ],
144
+ "description": "`told`: the buyer said it. `agent`: the agent read it off the conversation."
145
+ }
146
+ },
147
+ "additionalProperties": false
148
+ },
149
+ {
150
+ "type": "object",
151
+ "required": [
152
+ "kind",
153
+ "subject",
154
+ "op",
155
+ "value",
156
+ "gives_back",
157
+ "source"
158
+ ],
159
+ "properties": {
160
+ "id": {
161
+ "type": "string",
162
+ "minLength": 1,
163
+ "maxLength": 256,
164
+ "description": "Replaces this row: only an id `shopping_user_read` or a keep answered, never made up. A new row has none."
165
+ },
166
+ "kind": {
167
+ "type": "string",
168
+ "const": "preference",
169
+ "description": "Reads what kind of row it is."
170
+ },
171
+ "subject": {
172
+ "type": "string",
173
+ "minLength": 1,
174
+ "maxLength": 64,
175
+ "description": "Names what the preference is about: noise, price, a maker."
176
+ },
177
+ "op": {
178
+ "anyOf": [
179
+ {
180
+ "type": "string",
181
+ "const": "eq"
182
+ },
183
+ {
184
+ "type": "string",
185
+ "const": "neq"
186
+ },
187
+ {
188
+ "type": "string",
189
+ "const": "gte"
190
+ },
191
+ {
192
+ "type": "string",
193
+ "const": "lte"
194
+ },
195
+ {
196
+ "type": "string",
197
+ "const": "likes"
198
+ },
199
+ {
200
+ "type": "string",
201
+ "const": "dislikes"
202
+ }
203
+ ],
204
+ "description": "Reads how the value bounds it: a spec operator, or likes and dislikes."
205
+ },
206
+ "value": {
207
+ "anyOf": [
208
+ {
209
+ "type": "number"
210
+ },
211
+ {
212
+ "type": "string",
213
+ "minLength": 1,
214
+ "maxLength": 256,
215
+ "description": "The value in words."
216
+ }
217
+ ],
218
+ "description": "Reads the value the preference holds to; on price, money in the minor unit: €130 is 13000."
219
+ },
220
+ "unit": {
221
+ "type": "string",
222
+ "minLength": 1,
223
+ "maxLength": 16,
224
+ "description": "Reads the unit of a number; on price, its currency: EUR."
225
+ },
226
+ "place": {
227
+ "type": "string",
228
+ "minLength": 1,
229
+ "maxLength": 64,
230
+ "description": "Names where the row applies: a place sil holds, or a wider one in a word or two, never a sentence."
231
+ },
232
+ "reason": {
233
+ "type": "string",
234
+ "minLength": 1,
235
+ "maxLength": 256,
236
+ "description": "Quotes why, in the buyer’s words."
237
+ },
238
+ "gives_back": {
239
+ "type": "string",
240
+ "minLength": 1,
241
+ "maxLength": 200,
242
+ "description": "Says what the row gives the buyer back next time; said when it is kept."
243
+ },
244
+ "source": {
245
+ "anyOf": [
246
+ {
247
+ "type": "string",
248
+ "const": "told"
249
+ },
250
+ {
251
+ "type": "string",
252
+ "const": "agent"
253
+ }
254
+ ],
255
+ "description": "`told`: the buyer said it. `agent`: the agent read it off the conversation."
256
+ }
257
+ },
258
+ "additionalProperties": false
259
+ },
260
+ {
261
+ "type": "object",
262
+ "required": [
263
+ "kind",
264
+ "product",
265
+ "when",
266
+ "gives_back",
267
+ "source"
268
+ ],
269
+ "properties": {
270
+ "id": {
271
+ "type": "string",
272
+ "minLength": 1,
273
+ "maxLength": 256,
274
+ "description": "Replaces this row: only an id `shopping_user_read` or a keep answered, never made up. A new row has none."
275
+ },
276
+ "kind": {
277
+ "type": "string",
278
+ "const": "purchase",
279
+ "description": "Reads what kind of row it is."
280
+ },
281
+ "product": {
282
+ "type": "string",
283
+ "minLength": 1,
284
+ "maxLength": 128,
285
+ "description": "Names what they bought, maker and model."
286
+ },
287
+ "place": {
288
+ "type": "string",
289
+ "minLength": 1,
290
+ "maxLength": 64,
291
+ "description": "Names where the row applies: a place sil holds, or a wider one in a word or two, never a sentence."
292
+ },
293
+ "store": {
294
+ "type": "string",
295
+ "minLength": 1,
296
+ "maxLength": 128,
297
+ "description": "Names where they bought it."
298
+ },
299
+ "when": {
300
+ "type": "string",
301
+ "pattern": "^[0-9]{4}-[0-9]{2}(-[0-9]{2})?$",
302
+ "description": "Dates it, to the month or the day."
303
+ },
304
+ "note": {
305
+ "type": "string",
306
+ "minLength": 1,
307
+ "maxLength": 256,
308
+ "description": "Reads what else they said about it: its size, its fit."
309
+ },
310
+ "gives_back": {
311
+ "type": "string",
312
+ "minLength": 1,
313
+ "maxLength": 200,
314
+ "description": "Says what the row gives the buyer back next time; said when it is kept."
315
+ },
316
+ "source": {
317
+ "anyOf": [
318
+ {
319
+ "type": "string",
320
+ "const": "told"
321
+ },
322
+ {
323
+ "type": "string",
324
+ "const": "agent"
325
+ }
326
+ ],
327
+ "description": "`told`: the buyer said it. `agent`: the agent read it off the conversation."
328
+ }
329
+ },
330
+ "additionalProperties": false
331
+ }
332
+ ]
333
+ },
334
+ "minItems": 1,
335
+ "maxItems": 10,
336
+ "description": "Keeps what lasts beyond this buy, in the turn that settled it. Kept only when the answer is `ok` and lists the row in `kept`."
337
+ }
338
+ },
339
+ "additionalProperties": false,
340
+ "description": "Money is in the minor unit: €130 is 13000."
341
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.sil.com/shopping-user-remember-response.schema.json",
4
+ "title": "sil shopping_user_remember — response",
5
+ "type": "object",
6
+ "required": [
7
+ "status",
8
+ "kept"
9
+ ],
10
+ "properties": {
11
+ "status": {
12
+ "type": "string",
13
+ "const": "ok",
14
+ "description": "Reads the answer. Every other status arrives as an error body carrying recovery."
15
+ },
16
+ "kept": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "object",
20
+ "required": [
21
+ "id",
22
+ "kind",
23
+ "gives_back"
24
+ ],
25
+ "properties": {
26
+ "id": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "maxLength": 256,
30
+ "description": "Names the row to replace it, and to forget it."
31
+ },
32
+ "kind": {
33
+ "anyOf": [
34
+ {
35
+ "type": "string",
36
+ "const": "measurement"
37
+ },
38
+ {
39
+ "type": "string",
40
+ "const": "memory"
41
+ },
42
+ {
43
+ "type": "string",
44
+ "const": "preference"
45
+ },
46
+ {
47
+ "type": "string",
48
+ "const": "purchase"
49
+ }
50
+ ],
51
+ "description": "Reads which kind was kept."
52
+ },
53
+ "gives_back": {
54
+ "type": "string",
55
+ "minLength": 1,
56
+ "maxLength": 200,
57
+ "description": "Says what the row gives the buyer back next time; said when it is kept."
58
+ }
59
+ },
60
+ "additionalProperties": false
61
+ },
62
+ "description": "Tells the buyer each keep, what it gives back, and that \"forget that\" undoes it."
63
+ }
64
+ },
65
+ "additionalProperties": false
66
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.sil.com/sil-whoami-request.schema.json",
4
+ "title": "sil sil_whoami — request",
5
+ "type": "object",
6
+ "properties": {},
7
+ "additionalProperties": false
8
+ }
@@ -0,0 +1,99 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.sil.com/sil-whoami-response.schema.json",
4
+ "title": "sil sil_whoami — response",
5
+ "type": "object",
6
+ "required": [
7
+ "status",
8
+ "name",
9
+ "addresses"
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
+ "name": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "maxLength": 128,
21
+ "description": "Greets the buyer by it."
22
+ },
23
+ "country": {
24
+ "type": "string",
25
+ "pattern": "^[A-Z]{2}$",
26
+ "minLength": 2,
27
+ "maxLength": 2,
28
+ "description": "Localizes every answer to where the buyer is."
29
+ },
30
+ "currency": {
31
+ "type": "string",
32
+ "pattern": "^[A-Z]{3}$",
33
+ "minLength": 3,
34
+ "maxLength": 3,
35
+ "description": "Reads what the buyer prices in; a money row naming none means it."
36
+ },
37
+ "gender": {
38
+ "anyOf": [
39
+ {
40
+ "type": "string",
41
+ "const": "male"
42
+ },
43
+ {
44
+ "type": "string",
45
+ "const": "female"
46
+ },
47
+ {
48
+ "type": "string",
49
+ "const": "other"
50
+ }
51
+ ],
52
+ "description": "Sends it as the product spec `gender` on anything worn."
53
+ },
54
+ "language": {
55
+ "type": "string",
56
+ "pattern": "^[a-z]{2}$",
57
+ "description": "Speaks to the buyer in it; sil is always spoken to in English."
58
+ },
59
+ "addresses": {
60
+ "type": "array",
61
+ "items": {
62
+ "type": "object",
63
+ "required": [
64
+ "locality",
65
+ "country",
66
+ "default"
67
+ ],
68
+ "properties": {
69
+ "label": {
70
+ "type": "string",
71
+ "minLength": 1,
72
+ "maxLength": 64,
73
+ "description": "Names the address; send it, or the town where it has none, as `ship_to`."
74
+ },
75
+ "locality": {
76
+ "type": "string",
77
+ "minLength": 1,
78
+ "maxLength": 128,
79
+ "description": "Says where things ship to, by town."
80
+ },
81
+ "country": {
82
+ "type": "string",
83
+ "pattern": "^[A-Z]{2}$",
84
+ "minLength": 2,
85
+ "maxLength": 2,
86
+ "description": "Says which country things ship to."
87
+ },
88
+ "default": {
89
+ "type": "boolean",
90
+ "description": "Is the address delivery is priced to when no `ship_to` is sent."
91
+ }
92
+ },
93
+ "additionalProperties": false
94
+ },
95
+ "description": "Knows where things ship to, the default first; never asks the buyer for it. Empty: none on file."
96
+ }
97
+ },
98
+ "additionalProperties": false
99
+ }