sil-openclaw 0.6.0 → 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 (38) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +12 -11
  3. package/SECURITY.md +3 -3
  4. package/dist/lib/shopping-call.js +5 -1
  5. package/dist/lib/sil-client.js +34 -62
  6. package/dist/lib/tool-result.js +1 -1
  7. package/dist/tools/catalog.js +83 -239
  8. package/dist/tools/identity.js +74 -87
  9. package/openclaw.plugin.json +11 -6
  10. package/package.json +1 -1
  11. package/schema/PROVENANCE.md +7 -4
  12. package/schema/shopping-brief-write-request.schema.json +225 -0
  13. package/schema/{shopping-brief-create-response.schema.json → shopping-brief-write-response.schema.json} +3 -3
  14. package/schema/shopping-content-request.schema.json +4 -7
  15. package/schema/shopping-content-response.schema.json +234 -108
  16. package/schema/shopping-domain-get-request.schema.json +18 -0
  17. package/schema/shopping-domain-get-response.schema.json +124 -86
  18. package/schema/shopping-offers-request.schema.json +174 -23
  19. package/schema/shopping-offers-response.schema.json +20 -10
  20. package/schema/shopping-product-get-request.schema.json +2 -2
  21. package/schema/shopping-product-get-response.schema.json +113 -16
  22. package/schema/shopping-search-request.schema.json +16 -25
  23. package/schema/shopping-search-response.schema.json +95 -21
  24. package/schema/shopping-seller-get-response.schema.json +249 -221
  25. package/schema/shopping-user-forget-request.schema.json +43 -0
  26. package/schema/shopping-user-forget-response.schema.json +74 -0
  27. package/schema/shopping-user-read-request.schema.json +36 -0
  28. package/schema/shopping-user-read-response.schema.json +372 -0
  29. package/schema/shopping-user-remember-request.schema.json +340 -0
  30. package/schema/shopping-user-remember-response.schema.json +66 -0
  31. package/schema/sil-whoami-request.schema.json +8 -0
  32. package/schema/sil-whoami-response.schema.json +90 -0
  33. package/sil-shopping/SKILL.md +149 -203
  34. package/schema/shopping-brief-create-request.schema.json +0 -98
  35. package/schema/shopping-brief-edit-request.schema.json +0 -125
  36. package/schema/shopping-brief-edit-response.schema.json +0 -24
  37. package/schema/shopping-profile-edit-request.schema.json +0 -97
  38. package/schema/shopping-profile-edit-response.schema.json +0 -17
@@ -29,7 +29,7 @@
29
29
  "type": "string",
30
30
  "minLength": 1,
31
31
  "maxLength": 256,
32
- "description": "Matches the entry back to the id it asked for."
32
+ "description": "Matches the entry to the id asked for."
33
33
  },
34
34
  "title": {
35
35
  "type": "string",
@@ -37,18 +37,20 @@
37
37
  },
38
38
  "brand": {
39
39
  "type": "string",
40
- "description": "Names the maker to the buyer."
40
+ "description": "Names the maker."
41
41
  },
42
42
  "description": {
43
43
  "type": "string",
44
- "description": "Quotes the page's own product description."
44
+ "maxLength": 1000,
45
+ "description": "Quotes the page's own description, cut at a word where it is long."
45
46
  },
46
47
  "images": {
47
48
  "type": "array",
48
49
  "items": {
49
50
  "type": "string"
50
51
  },
51
- "description": "Shows it to the buyer."
52
+ "maxItems": 5,
53
+ "description": "Shows it."
52
54
  },
53
55
  "specs": {
54
56
  "type": "object",
@@ -73,7 +75,7 @@
73
75
  ]
74
76
  }
75
77
  },
76
- "description": "Compares the shortlist on every key sil holds — the product's values and this variant's own — not only the asked ones."
78
+ "description": "Compares on every key sil holds."
77
79
  },
78
80
  "sources": {
79
81
  "type": "array",
@@ -98,29 +100,124 @@
98
100
  },
99
101
  "description": "Says where and when sil read them."
100
102
  },
101
- "webpage_info": {
103
+ "reviews": {
102
104
  "type": "object",
103
105
  "required": [
104
- "url",
105
- "text"
106
+ "count",
107
+ "praised",
108
+ "complained",
109
+ "sources"
106
110
  ],
107
111
  "properties": {
108
- "url": {
109
- "type": "string",
110
- "description": "Links the page it read the words off."
112
+ "count": {
113
+ "type": "integer",
114
+ "minimum": 1,
115
+ "description": "Says how many reviews sil read."
111
116
  },
112
- "text": {
113
- "type": "string",
114
- "description": "Reads the whole page in the shop's own words for what sil has not keyed yet — a provisional read, never a verified one."
117
+ "score": {
118
+ "type": "object",
119
+ "required": [
120
+ "value",
121
+ "of"
122
+ ],
123
+ "properties": {
124
+ "value": {
125
+ "type": "number",
126
+ "minimum": 0,
127
+ "description": "The average score."
128
+ },
129
+ "of": {
130
+ "type": "number",
131
+ "exclusiveMinimum": 0,
132
+ "description": "The scale’s top: 5, 10, 100."
133
+ }
134
+ },
135
+ "additionalProperties": false,
136
+ "description": "Says the average score on its own scale, where the reviews give one."
137
+ },
138
+ "praised": {
139
+ "type": "array",
140
+ "items": {
141
+ "type": "string",
142
+ "minLength": 1,
143
+ "maxLength": 256,
144
+ "description": "One thing reviewers praise."
145
+ },
146
+ "maxItems": 5,
147
+ "description": "Says what reviewers praise, most often first."
148
+ },
149
+ "complained": {
150
+ "type": "array",
151
+ "items": {
152
+ "type": "string",
153
+ "minLength": 1,
154
+ "maxLength": 256,
155
+ "description": "One thing reviewers complain of."
156
+ },
157
+ "maxItems": 5,
158
+ "description": "Says what reviewers complain of, most often first."
159
+ },
160
+ "sources": {
161
+ "type": "array",
162
+ "items": {
163
+ "type": "object",
164
+ "required": [
165
+ "name",
166
+ "url",
167
+ "date"
168
+ ],
169
+ "properties": {
170
+ "name": {
171
+ "type": "string",
172
+ "description": "Names the site or reviewer."
173
+ },
174
+ "url": {
175
+ "type": "string",
176
+ "description": "Hands the buyer the reviews."
177
+ },
178
+ "date": {
179
+ "type": "string",
180
+ "format": "date",
181
+ "description": "Dates the latest review read there."
182
+ }
183
+ },
184
+ "additionalProperties": false
185
+ },
186
+ "minItems": 1,
187
+ "maxItems": 5,
188
+ "description": "Cites where, and how recent."
115
189
  }
116
190
  },
117
191
  "additionalProperties": false,
118
- "description": "Reads a page sil has not read yet, in the page's own words."
192
+ "description": "Tells the buyer what other buyers said, from the reviews sil holds; absent until it holds any."
193
+ }
194
+ },
195
+ "additionalProperties": false
196
+ },
197
+ "description": "Reads the whole before recommending."
198
+ },
199
+ "not_held": {
200
+ "type": "array",
201
+ "items": {
202
+ "type": "object",
203
+ "required": [
204
+ "id",
205
+ "reason"
206
+ ],
207
+ "properties": {
208
+ "id": {
209
+ "type": "string",
210
+ "description": "Echoes the id asked for."
211
+ },
212
+ "reason": {
213
+ "type": "string",
214
+ "description": "Says why sil has no dossier, and what to do instead."
119
215
  }
120
216
  },
121
217
  "additionalProperties": false
122
218
  },
123
- "description": "Reads the whole of what sil knows before recommending."
219
+ "minItems": 1,
220
+ "description": "Names each id sil holds no product for; the agent says so and searches."
124
221
  }
125
222
  },
126
223
  "additionalProperties": false
@@ -4,35 +4,15 @@
4
4
  "title": "sil shopping_search — request",
5
5
  "type": "object",
6
6
  "required": [
7
- "brief",
8
7
  "domain",
9
- "query",
10
8
  "n"
11
9
  ],
12
10
  "properties": {
13
- "brief": {
14
- "type": "string",
15
- "minLength": 1,
16
- "maxLength": 256,
17
- "description": "Names the session's brief, so sil records this call against the want behind it. A brief that is not the buyer's answers `not_found`."
18
- },
19
11
  "domain": {
20
12
  "type": "string",
21
13
  "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
22
14
  "maxLength": 255,
23
- "description": "Sends a leaf the domain search answered. A kind, shelf, domain or top answers `not_a_leaf`, naming leaves to pick."
24
- },
25
- "query": {
26
- "type": "string",
27
- "minLength": 1,
28
- "maxLength": 512,
29
- "description": "Sends the shopping words: the thing as a shop lists it and the numbers that pick the product, never a sentence."
30
- },
31
- "n": {
32
- "type": "integer",
33
- "minimum": 1,
34
- "maximum": 10,
35
- "description": "Asks for this many variants — one size or one colour each, grouped under their products."
15
+ "description": "Sends a leaf, or the kind above its leaves when the question is which kind; a shelf, domain or top answers `not_a_leaf`."
36
16
  },
37
17
  "specs": {
38
18
  "type": "array",
@@ -93,13 +73,24 @@
93
73
  "additionalProperties": false
94
74
  },
95
75
  "maxItems": 32,
96
- "description": "Sends the product specs this search asks, written by the agent from the brief's; a key the domain does not hold is recorded, never refused."
76
+ "description": "Sends every settled want as a spec with the operator it needs; on a kind, `leaf` in or nin its leaves. A key the place does not hold is recorded, never refused."
77
+ },
78
+ "query": {
79
+ "type": "string",
80
+ "minLength": 1,
81
+ "maxLength": 512,
82
+ "description": "Sends words only for what no spec holds, never a sentence."
97
83
  },
98
- "ship_to": {
84
+ "n": {
85
+ "type": "integer",
86
+ "minimum": 1,
87
+ "description": "Asks for this many variants; at most 10, a larger ask is served at that."
88
+ },
89
+ "brief": {
99
90
  "type": "string",
100
91
  "minLength": 1,
101
- "maxLength": 64,
102
- "description": "Leave this out: sil then localizes the search to the buyer's default address. Send it only when the buyer named another address, as the exact `label` `sil_whoami` lists — never a word like \"default\", never a country. It excludes no seller anywhere else — where the seller is, is the seller spec `country`, on the brief, for the offers to read."
92
+ "maxLength": 256,
93
+ "description": "Ties the call to a brief in sil’s record; never required."
103
94
  }
104
95
  },
105
96
  "additionalProperties": false
@@ -5,7 +5,8 @@
5
5
  "type": "object",
6
6
  "required": [
7
7
  "status",
8
- "products"
8
+ "products",
9
+ "receipt"
9
10
  ],
10
11
  "properties": {
11
12
  "status": {
@@ -29,7 +30,7 @@
29
30
  "type": "string",
30
31
  "minLength": 1,
31
32
  "maxLength": 256,
32
- "description": "Writes it into the Brief as the pick, so the next session names the same product."
33
+ "description": "Names the product."
33
34
  },
34
35
  "title": {
35
36
  "type": "string",
@@ -37,11 +38,17 @@
37
38
  },
38
39
  "brand": {
39
40
  "type": "string",
40
- "description": "Names the maker to the buyer."
41
+ "description": "Names the maker."
41
42
  },
42
43
  "image": {
43
44
  "type": "string",
44
- "description": "Shows it on the card."
45
+ "description": "Shows it."
46
+ },
47
+ "leaf": {
48
+ "type": "string",
49
+ "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
50
+ "maxLength": 255,
51
+ "description": "On a search over a kind: which leaf it is."
45
52
  },
46
53
  "fit": {
47
54
  "type": "object",
@@ -66,7 +73,7 @@
66
73
  ]
67
74
  }
68
75
  },
69
- "description": "Answers each requested key with the value sil holds, or `\"unknown\"` where it holds none — what to dig into or to say as unverified, never a miss."
76
+ "description": "Answers each asked key with the value sil holds, or `\"unknown\"`: what to say as unverified."
70
77
  },
71
78
  "price": {
72
79
  "type": "array",
@@ -98,7 +105,7 @@
98
105
  },
99
106
  "additionalProperties": false
100
107
  },
101
- "description": "Quotes the range over the variants that came back; a currency other than the ask's is a bound sil could not test."
108
+ "description": "Quotes the range over the variants returned."
102
109
  },
103
110
  "variants": {
104
111
  "type": "array",
@@ -163,25 +170,92 @@
163
170
  },
164
171
  "description": "A variant that answers the ask, and every option value that identifies it. One carrying none is a listing sil has not read sizes from."
165
172
  },
166
- "description": "Passes an `id` on to the dossier and the offers; names the option to the buyer."
167
- },
168
- "host": {
169
- "type": "string",
170
- "description": "Names the shop whose page sil read in this request."
171
- },
172
- "printed": {
173
- "type": "object",
174
- "patternProperties": {
175
- "^.*$": {
176
- "type": "string"
177
- }
178
- },
179
- "description": "Reads the page's own labelled pairs that no key catches — a provisional read of what sil could not verify. Absent on a product sil already holds."
173
+ "description": "Passes an `id` to the dossier and offers."
180
174
  }
181
175
  },
182
176
  "additionalProperties": false
183
177
  },
184
- "description": "Shows the shortlist in this order, and never re-ranks it."
178
+ "description": "Shows the shortlist in this order."
179
+ },
180
+ "receipt": {
181
+ "type": "object",
182
+ "required": [
183
+ "shops",
184
+ "products",
185
+ "fit",
186
+ "could_not_tell",
187
+ "offered",
188
+ "finding",
189
+ "set_aside"
190
+ ],
191
+ "properties": {
192
+ "shops": {
193
+ "type": "integer",
194
+ "minimum": 0,
195
+ "description": "Says how many shops sil looked across."
196
+ },
197
+ "products": {
198
+ "type": "integer",
199
+ "minimum": 0,
200
+ "description": "Says how many products sil weighed: all it holds in the place asked; `fit`, `could_not_tell` and every `set_aside` line add up to it."
201
+ },
202
+ "fit": {
203
+ "type": "integer",
204
+ "minimum": 0,
205
+ "description": "Says how many meet every asked spec on values sil read."
206
+ },
207
+ "could_not_tell": {
208
+ "type": "integer",
209
+ "minimum": 0,
210
+ "description": "Says how many sil could not tell: nothing failed, a value was unread. Never a failure."
211
+ },
212
+ "offered": {
213
+ "type": "integer",
214
+ "minimum": 0,
215
+ "description": "Says how many of the fit sil holds an offer for in the buyer’s country."
216
+ },
217
+ "finding": {
218
+ "type": "integer",
219
+ "minimum": 0,
220
+ "description": "Says how many products sil has started finding offers for in the buyer’s country; the next offers call reads them."
221
+ },
222
+ "set_aside": {
223
+ "type": "array",
224
+ "items": {
225
+ "type": "object",
226
+ "required": [
227
+ "count",
228
+ "key"
229
+ ],
230
+ "properties": {
231
+ "count": {
232
+ "type": "integer",
233
+ "minimum": 0,
234
+ "description": "Says how many were set aside on this key, each product once, on its first failing spec."
235
+ },
236
+ "key": {
237
+ "type": "string",
238
+ "minLength": 1,
239
+ "maxLength": 64,
240
+ "description": "Names the asked spec they failed."
241
+ },
242
+ "values": {
243
+ "type": "array",
244
+ "items": {
245
+ "type": "string"
246
+ },
247
+ "maxItems": 3,
248
+ "description": "On a choice: the values they held, most common first."
249
+ }
250
+ },
251
+ "additionalProperties": false
252
+ },
253
+ "maxItems": 32,
254
+ "description": "Says why the rest were set aside, in the buyer’s words."
255
+ }
256
+ },
257
+ "additionalProperties": false,
258
+ "description": "Shows the buyer what sil checked, in a shop assistant’s words; relayed, never recounted."
185
259
  }
186
260
  },
187
261
  "additionalProperties": false