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
@@ -63,66 +63,114 @@
63
63
  "^.*$": {
64
64
  "type": "array",
65
65
  "items": {
66
- "type": "object",
67
- "required": [
68
- "key",
69
- "op",
70
- "value"
71
- ],
72
- "properties": {
73
- "key": {
74
- "type": "string",
75
- "minLength": 1,
76
- "maxLength": 64,
77
- "description": "Names the key from the domain read; `price` is a key every domain has."
78
- },
79
- "op": {
80
- "anyOf": [
81
- {
66
+ "anyOf": [
67
+ {
68
+ "type": "object",
69
+ "required": [
70
+ "spec",
71
+ "op",
72
+ "value"
73
+ ],
74
+ "properties": {
75
+ "spec": {
82
76
  "type": "string",
83
- "const": "eq"
77
+ "minLength": 1,
78
+ "maxLength": 64,
79
+ "description": "Sends a spec the domain read listed, unchanged: a part’s by its path (`boiler.boilerVolume`)."
84
80
  },
85
- {
86
- "type": "string",
87
- "const": "neq"
81
+ "op": {
82
+ "anyOf": [
83
+ {
84
+ "type": "string",
85
+ "const": "eq"
86
+ },
87
+ {
88
+ "type": "string",
89
+ "const": "neq"
90
+ },
91
+ {
92
+ "type": "string",
93
+ "const": "gte"
94
+ },
95
+ {
96
+ "type": "string",
97
+ "const": "lte"
98
+ },
99
+ {
100
+ "type": "string",
101
+ "const": "in"
102
+ },
103
+ {
104
+ "type": "string",
105
+ "const": "nin"
106
+ }
107
+ ],
108
+ "description": "Sends the operator the domain read listed for this spec."
88
109
  },
89
- {
90
- "type": "string",
91
- "const": "gte"
110
+ "value": {
111
+ "description": "Sends the desired value, typed by the spec's type."
92
112
  },
93
- {
113
+ "reason": {
94
114
  "type": "string",
95
- "const": "lte"
96
- },
97
- {
115
+ "minLength": 1,
116
+ "maxLength": 256,
117
+ "description": "Quotes the buyer's own words behind the spec, in English — translated, never a paraphrase, never a sentence they did not say; a spec derived from a measurement quotes the measurement. Reads them back before proposing to relax it."
118
+ }
119
+ },
120
+ "additionalProperties": false
121
+ },
122
+ {
123
+ "type": "object",
124
+ "required": [
125
+ "spec",
126
+ "range"
127
+ ],
128
+ "properties": {
129
+ "spec": {
98
130
  "type": "string",
99
- "const": "in"
131
+ "minLength": 1,
132
+ "maxLength": 64,
133
+ "description": "Names a money spec: `price`, or a seller’s money spec."
134
+ },
135
+ "range": {
136
+ "type": "object",
137
+ "required": [
138
+ "currency"
139
+ ],
140
+ "properties": {
141
+ "min": {
142
+ "type": "integer",
143
+ "minimum": 0,
144
+ "maximum": 9007199254740991,
145
+ "description": "The low end, in the minor unit."
146
+ },
147
+ "max": {
148
+ "type": "integer",
149
+ "minimum": 0,
150
+ "maximum": 9007199254740991,
151
+ "description": "The high end, in the minor unit."
152
+ },
153
+ "currency": {
154
+ "type": "string",
155
+ "pattern": "^[A-Z]{3}$",
156
+ "minLength": 3,
157
+ "maxLength": 3,
158
+ "description": "Both ends in this currency; sil converts nothing."
159
+ }
160
+ },
161
+ "additionalProperties": false,
162
+ "description": "Holds the money spec’s range, one or both ends."
100
163
  },
101
- {
164
+ "reason": {
102
165
  "type": "string",
103
- "const": "nin"
166
+ "minLength": 1,
167
+ "maxLength": 256,
168
+ "description": "Quotes the buyer's own words behind the spec, in English — translated, never a paraphrase, never a sentence they did not say; a spec derived from a measurement quotes the measurement. Reads them back before proposing to relax it."
104
169
  }
105
- ],
106
- "description": "Sends the operator the domain read listed for this key."
107
- },
108
- "value": {
109
- "description": "Sends the desired value, typed by the key's type."
110
- },
111
- "currency": {
112
- "type": "string",
113
- "pattern": "^[A-Z]{3}$",
114
- "minLength": 3,
115
- "maxLength": 3,
116
- "description": "On money, the currency the bound is tested in: sil holds no exchange rate, so it is tested against offers in this currency only. Leave it out to mean the buyer's own currency, as `sil_whoami` answers it."
117
- },
118
- "reason": {
119
- "type": "string",
120
- "minLength": 1,
121
- "maxLength": 256,
122
- "description": "Quotes the buyer's own words behind the spec, in English — translated, never a paraphrase, never a sentence they did not say; a spec derived from a measurement quotes the measurement. Reads them back before proposing to relax it."
170
+ },
171
+ "additionalProperties": false
123
172
  }
124
- },
125
- "additionalProperties": false
173
+ ]
126
174
  }
127
175
  }
128
176
  },
@@ -31,69 +31,117 @@
31
31
  "specs": {
32
32
  "type": "array",
33
33
  "items": {
34
- "type": "object",
35
- "required": [
36
- "key",
37
- "op",
38
- "value"
39
- ],
40
- "properties": {
41
- "key": {
42
- "type": "string",
43
- "minLength": 1,
44
- "maxLength": 64,
45
- "description": "Names the key from the domain read; `price` is a key every domain has."
46
- },
47
- "op": {
48
- "anyOf": [
49
- {
34
+ "anyOf": [
35
+ {
36
+ "type": "object",
37
+ "required": [
38
+ "spec",
39
+ "op",
40
+ "value"
41
+ ],
42
+ "properties": {
43
+ "spec": {
50
44
  "type": "string",
51
- "const": "eq"
45
+ "minLength": 1,
46
+ "maxLength": 64,
47
+ "description": "Sends a spec the domain read listed, unchanged: a part’s by its path (`boiler.boilerVolume`)."
52
48
  },
53
- {
54
- "type": "string",
55
- "const": "neq"
49
+ "op": {
50
+ "anyOf": [
51
+ {
52
+ "type": "string",
53
+ "const": "eq"
54
+ },
55
+ {
56
+ "type": "string",
57
+ "const": "neq"
58
+ },
59
+ {
60
+ "type": "string",
61
+ "const": "gte"
62
+ },
63
+ {
64
+ "type": "string",
65
+ "const": "lte"
66
+ },
67
+ {
68
+ "type": "string",
69
+ "const": "in"
70
+ },
71
+ {
72
+ "type": "string",
73
+ "const": "nin"
74
+ }
75
+ ],
76
+ "description": "Sends the operator the domain read listed for this spec."
56
77
  },
57
- {
58
- "type": "string",
59
- "const": "gte"
78
+ "value": {
79
+ "description": "Sends the desired value, typed by the spec's type."
60
80
  },
61
- {
81
+ "reason": {
62
82
  "type": "string",
63
- "const": "lte"
64
- },
65
- {
83
+ "minLength": 1,
84
+ "maxLength": 256,
85
+ "description": "Quotes the buyer's own words behind the spec, in English — translated, never a paraphrase, never a sentence they did not say; a spec derived from a measurement quotes the measurement. Reads them back before proposing to relax it."
86
+ }
87
+ },
88
+ "additionalProperties": false
89
+ },
90
+ {
91
+ "type": "object",
92
+ "required": [
93
+ "spec",
94
+ "range"
95
+ ],
96
+ "properties": {
97
+ "spec": {
66
98
  "type": "string",
67
- "const": "in"
99
+ "minLength": 1,
100
+ "maxLength": 64,
101
+ "description": "Names a money spec: `price`, or a seller’s money spec."
102
+ },
103
+ "range": {
104
+ "type": "object",
105
+ "required": [
106
+ "currency"
107
+ ],
108
+ "properties": {
109
+ "min": {
110
+ "type": "integer",
111
+ "minimum": 0,
112
+ "maximum": 9007199254740991,
113
+ "description": "The low end, in the minor unit."
114
+ },
115
+ "max": {
116
+ "type": "integer",
117
+ "minimum": 0,
118
+ "maximum": 9007199254740991,
119
+ "description": "The high end, in the minor unit."
120
+ },
121
+ "currency": {
122
+ "type": "string",
123
+ "pattern": "^[A-Z]{3}$",
124
+ "minLength": 3,
125
+ "maxLength": 3,
126
+ "description": "Both ends in this currency; sil converts nothing."
127
+ }
128
+ },
129
+ "additionalProperties": false,
130
+ "description": "Holds the money spec’s range, one or both ends."
68
131
  },
69
- {
132
+ "reason": {
70
133
  "type": "string",
71
- "const": "nin"
134
+ "minLength": 1,
135
+ "maxLength": 256,
136
+ "description": "Quotes the buyer's own words behind the spec, in English — translated, never a paraphrase, never a sentence they did not say; a spec derived from a measurement quotes the measurement. Reads them back before proposing to relax it."
72
137
  }
73
- ],
74
- "description": "Sends the operator the domain read listed for this key."
75
- },
76
- "value": {
77
- "description": "Sends the desired value, typed by the key's type."
78
- },
79
- "currency": {
80
- "type": "string",
81
- "pattern": "^[A-Z]{3}$",
82
- "minLength": 3,
83
- "maxLength": 3,
84
- "description": "On money, the currency the bound is tested in: sil holds no exchange rate, so it is tested against offers in this currency only. Leave it out to mean the buyer's own currency, as `sil_whoami` answers it."
85
- },
86
- "reason": {
87
- "type": "string",
88
- "minLength": 1,
89
- "maxLength": 256,
90
- "description": "Quotes the buyer's own words behind the spec, in English — translated, never a paraphrase, never a sentence they did not say; a spec derived from a measurement quotes the measurement. Reads them back before proposing to relax it."
138
+ },
139
+ "additionalProperties": false
91
140
  }
92
- },
93
- "additionalProperties": false
141
+ ]
94
142
  },
95
143
  "maxItems": 32,
96
- "description": "Replaces every spec on the keys they name under that domain."
144
+ "description": "Replaces every spec on the specs they name under that domain; a money spec is its range."
97
145
  }
98
146
  },
99
147
  "additionalProperties": false
@@ -131,69 +179,117 @@
131
179
  "specs": {
132
180
  "type": "array",
133
181
  "items": {
134
- "type": "object",
135
- "required": [
136
- "key",
137
- "op",
138
- "value"
139
- ],
140
- "properties": {
141
- "key": {
142
- "type": "string",
143
- "minLength": 1,
144
- "maxLength": 64,
145
- "description": "Names the key from the domain read; `price` is a key every domain has."
146
- },
147
- "op": {
148
- "anyOf": [
149
- {
182
+ "anyOf": [
183
+ {
184
+ "type": "object",
185
+ "required": [
186
+ "spec",
187
+ "op",
188
+ "value"
189
+ ],
190
+ "properties": {
191
+ "spec": {
150
192
  "type": "string",
151
- "const": "eq"
193
+ "minLength": 1,
194
+ "maxLength": 64,
195
+ "description": "Sends a spec the domain read listed, unchanged: a part’s by its path (`boiler.boilerVolume`)."
152
196
  },
153
- {
154
- "type": "string",
155
- "const": "neq"
197
+ "op": {
198
+ "anyOf": [
199
+ {
200
+ "type": "string",
201
+ "const": "eq"
202
+ },
203
+ {
204
+ "type": "string",
205
+ "const": "neq"
206
+ },
207
+ {
208
+ "type": "string",
209
+ "const": "gte"
210
+ },
211
+ {
212
+ "type": "string",
213
+ "const": "lte"
214
+ },
215
+ {
216
+ "type": "string",
217
+ "const": "in"
218
+ },
219
+ {
220
+ "type": "string",
221
+ "const": "nin"
222
+ }
223
+ ],
224
+ "description": "Sends the operator the domain read listed for this spec."
156
225
  },
157
- {
158
- "type": "string",
159
- "const": "gte"
226
+ "value": {
227
+ "description": "Sends the desired value, typed by the spec's type."
160
228
  },
161
- {
229
+ "reason": {
162
230
  "type": "string",
163
- "const": "lte"
164
- },
165
- {
231
+ "minLength": 1,
232
+ "maxLength": 256,
233
+ "description": "Quotes the buyer's own words behind the spec, in English — translated, never a paraphrase, never a sentence they did not say; a spec derived from a measurement quotes the measurement. Reads them back before proposing to relax it."
234
+ }
235
+ },
236
+ "additionalProperties": false
237
+ },
238
+ {
239
+ "type": "object",
240
+ "required": [
241
+ "spec",
242
+ "range"
243
+ ],
244
+ "properties": {
245
+ "spec": {
166
246
  "type": "string",
167
- "const": "in"
247
+ "minLength": 1,
248
+ "maxLength": 64,
249
+ "description": "Names a money spec: `price`, or a seller’s money spec."
250
+ },
251
+ "range": {
252
+ "type": "object",
253
+ "required": [
254
+ "currency"
255
+ ],
256
+ "properties": {
257
+ "min": {
258
+ "type": "integer",
259
+ "minimum": 0,
260
+ "maximum": 9007199254740991,
261
+ "description": "The low end, in the minor unit."
262
+ },
263
+ "max": {
264
+ "type": "integer",
265
+ "minimum": 0,
266
+ "maximum": 9007199254740991,
267
+ "description": "The high end, in the minor unit."
268
+ },
269
+ "currency": {
270
+ "type": "string",
271
+ "pattern": "^[A-Z]{3}$",
272
+ "minLength": 3,
273
+ "maxLength": 3,
274
+ "description": "Both ends in this currency; sil converts nothing."
275
+ }
276
+ },
277
+ "additionalProperties": false,
278
+ "description": "Holds the money spec’s range, one or both ends."
168
279
  },
169
- {
280
+ "reason": {
170
281
  "type": "string",
171
- "const": "nin"
282
+ "minLength": 1,
283
+ "maxLength": 256,
284
+ "description": "Quotes the buyer's own words behind the spec, in English — translated, never a paraphrase, never a sentence they did not say; a spec derived from a measurement quotes the measurement. Reads them back before proposing to relax it."
172
285
  }
173
- ],
174
- "description": "Sends the operator the domain read listed for this key."
175
- },
176
- "value": {
177
- "description": "Sends the desired value, typed by the key's type."
178
- },
179
- "currency": {
180
- "type": "string",
181
- "pattern": "^[A-Z]{3}$",
182
- "minLength": 3,
183
- "maxLength": 3,
184
- "description": "On money, the currency the bound is tested in: sil holds no exchange rate, so it is tested against offers in this currency only. Leave it out to mean the buyer's own currency, as `sil_whoami` answers it."
185
- },
186
- "reason": {
187
- "type": "string",
188
- "minLength": 1,
189
- "maxLength": 256,
190
- "description": "Quotes the buyer's own words behind the spec, in English — translated, never a paraphrase, never a sentence they did not say; a spec derived from a measurement quotes the measurement. Reads them back before proposing to relax it."
286
+ },
287
+ "additionalProperties": false
191
288
  }
192
- },
193
- "additionalProperties": false
289
+ ]
194
290
  },
195
291
  "maxItems": 32,
196
- "description": "Replaces every spec on the keys they name under that domain."
292
+ "description": "Replaces every spec on the specs they name under that domain; a money spec is its range."
197
293
  },
198
294
  "remove": {
199
295
  "type": "array",
@@ -201,10 +297,10 @@
201
297
  "type": "string",
202
298
  "minLength": 1,
203
299
  "maxLength": 64,
204
- "description": "A key whose specs go."
300
+ "description": "A spec whose rows go."
205
301
  },
206
302
  "maxItems": 32,
207
- "description": "Drops the specs on these keys."
303
+ "description": "Drops the rows on these specs."
208
304
  },
209
305
  "decision": {
210
306
  "type": "string",
@@ -221,5 +317,6 @@
221
317
  "additionalProperties": false
222
318
  }
223
319
  ],
224
- "type": "object"
320
+ "type": "object",
321
+ "description": "Money is in the minor unit: €130 is 13000."
225
322
  }
@@ -5,31 +5,20 @@
5
5
  "type": "object",
6
6
  "required": [
7
7
  "path",
8
- "q"
8
+ "about"
9
9
  ],
10
10
  "properties": {
11
11
  "path": {
12
12
  "type": "string",
13
13
  "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
14
14
  "maxLength": 255,
15
- "description": "Sends the node whose line is read: the leaf chosen, or any place above it. The line is the node, every kind it is, what sits beneath it and every place above it."
15
+ "description": "Sends the place whose line is read: the place itself, every kind it is, what sits beneath it and every place above it."
16
16
  },
17
- "q": {
17
+ "about": {
18
18
  "type": "string",
19
19
  "minLength": 1,
20
20
  "maxLength": 200,
21
- "description": "Sends the terms to grep, as the buyer or a shop says them; a \"quoted phrase\" is one term. A passage holding every term comes first, then one holding some."
22
- },
23
- "document": {
24
- "type": "string",
25
- "minLength": 1,
26
- "maxLength": 256,
27
- "description": "Reads one document's passages in order instead of grepping: any `id` a passage or a domain's map or a place's `guides` carried, from part `from` on; past its last part, none."
28
- },
29
- "from": {
30
- "type": "integer",
31
- "minimum": 1,
32
- "description": "Starts the read of `document` at this part. Default 1."
21
+ "description": "Sends the words to find, as the buyer or a shop says them; a \"quoted phrase\" is one term. Passages holding every word come first."
33
22
  },
34
23
  "kinds": {
35
24
  "type": "array",
@@ -62,27 +51,22 @@
62
51
  {
63
52
  "type": "string",
64
53
  "const": "news"
54
+ },
55
+ {
56
+ "type": "string",
57
+ "const": "discussion"
65
58
  }
66
- ]
59
+ ],
60
+ "description": "A kind of document."
67
61
  },
68
62
  "minItems": 1,
69
63
  "uniqueItems": true,
70
- "description": "Narrows the read to these kinds of document; absent reads every kind."
71
- },
72
- "min_passages": {
73
- "type": "integer",
74
- "minimum": 0,
75
- "description": "Fills up to this many from the nearest documents when too few match, marked by an empty `matched`. At most 20; a larger ask is served at that. Default 1."
76
- },
77
- "max_passages": {
78
- "type": "integer",
79
- "minimum": 1,
80
- "description": "Caps the passages answered, at most 20; a larger ask is served at that. Default 8."
64
+ "description": "Reads only these kinds; absent, every kind."
81
65
  },
82
66
  "max_tokens": {
83
67
  "type": "integer",
84
68
  "minimum": 200,
85
- "description": "Caps what the passages cost, a token being four characters of a passage as sent; the last passage is cut to fit and marked `truncated`. At most 2300; a larger ask is served at that. Default 2000."
69
+ "description": "Caps what the passages cost, a token being four characters; whole passages are answered while they fit. At most 2300, a larger ask served at that. Default 2000."
86
70
  }
87
71
  },
88
72
  "additionalProperties": false