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.
- package/CHANGELOG.md +15 -0
- package/README.md +12 -11
- package/SECURITY.md +3 -3
- package/dist/lib/shopping-call.js +5 -1
- package/dist/lib/sil-client.js +34 -62
- package/dist/lib/tool-result.js +1 -1
- package/dist/tools/catalog.js +83 -239
- package/dist/tools/identity.js +74 -87
- package/openclaw.plugin.json +11 -6
- package/package.json +1 -1
- package/schema/PROVENANCE.md +7 -4
- package/schema/shopping-brief-write-request.schema.json +225 -0
- package/schema/{shopping-brief-create-response.schema.json → shopping-brief-write-response.schema.json} +3 -3
- package/schema/shopping-content-request.schema.json +4 -7
- package/schema/shopping-content-response.schema.json +234 -108
- package/schema/shopping-domain-get-request.schema.json +18 -0
- package/schema/shopping-domain-get-response.schema.json +124 -86
- package/schema/shopping-offers-request.schema.json +174 -23
- package/schema/shopping-offers-response.schema.json +20 -10
- package/schema/shopping-product-get-request.schema.json +2 -2
- package/schema/shopping-product-get-response.schema.json +113 -16
- package/schema/shopping-search-request.schema.json +16 -25
- package/schema/shopping-search-response.schema.json +95 -21
- package/schema/shopping-seller-get-response.schema.json +249 -221
- package/schema/shopping-user-forget-request.schema.json +43 -0
- package/schema/shopping-user-forget-response.schema.json +74 -0
- package/schema/shopping-user-read-request.schema.json +36 -0
- package/schema/shopping-user-read-response.schema.json +372 -0
- package/schema/shopping-user-remember-request.schema.json +340 -0
- package/schema/shopping-user-remember-response.schema.json +66 -0
- package/schema/sil-whoami-request.schema.json +8 -0
- package/schema/sil-whoami-response.schema.json +90 -0
- package/sil-shopping/SKILL.md +149 -203
- package/schema/shopping-brief-create-request.schema.json +0 -98
- package/schema/shopping-brief-edit-request.schema.json +0 -125
- package/schema/shopping-brief-edit-response.schema.json +0 -24
- package/schema/shopping-profile-edit-request.schema.json +0 -97
- package/schema/shopping-profile-edit-response.schema.json +0 -17
package/openclaw.plugin.json
CHANGED
|
@@ -2,25 +2,30 @@
|
|
|
2
2
|
"id": "sil",
|
|
3
3
|
"name": "sil",
|
|
4
4
|
"description": "Turn your OpenClaw into an expert shopping agent.",
|
|
5
|
-
"version": "0.
|
|
6
|
-
"skills": [
|
|
5
|
+
"version": "0.7.0",
|
|
6
|
+
"skills": [
|
|
7
|
+
"./sil-shopping"
|
|
8
|
+
],
|
|
7
9
|
"activation": {
|
|
8
|
-
"onCapabilities": [
|
|
10
|
+
"onCapabilities": [
|
|
11
|
+
"tool"
|
|
12
|
+
],
|
|
9
13
|
"onStartup": true
|
|
10
14
|
},
|
|
11
15
|
"contracts": {
|
|
12
16
|
"tools": [
|
|
13
|
-
"shopping_brief_create",
|
|
14
|
-
"shopping_brief_edit",
|
|
15
17
|
"shopping_brief_read",
|
|
18
|
+
"shopping_brief_write",
|
|
16
19
|
"shopping_content",
|
|
17
20
|
"shopping_domain_get",
|
|
18
21
|
"shopping_domain_search",
|
|
19
22
|
"shopping_offers",
|
|
20
23
|
"shopping_product_get",
|
|
21
|
-
"shopping_profile_edit",
|
|
22
24
|
"shopping_search",
|
|
23
25
|
"shopping_seller_get",
|
|
26
|
+
"shopping_user_forget",
|
|
27
|
+
"shopping_user_read",
|
|
28
|
+
"shopping_user_remember",
|
|
24
29
|
"sil_doctor",
|
|
25
30
|
"sil_register",
|
|
26
31
|
"sil_whoami"
|
package/package.json
CHANGED
package/schema/PROVENANCE.md
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
# Where these twenty-
|
|
1
|
+
# Where these twenty-six files come from
|
|
2
2
|
|
|
3
3
|
Copied verbatim from `sil-services` `packages/schemas/schema/`, commit
|
|
4
|
-
`
|
|
5
|
-
|
|
4
|
+
`ac1278e612d8cba9859e4f175efcd520a7e012fd`. One request and one response artifact per
|
|
5
|
+
`shopping_*` tool, plus `sil-whoami-*`; each is `JSON.stringify` of the TypeBox object the
|
|
6
|
+
API serialises against.
|
|
6
7
|
|
|
7
8
|
**Re-copy, never hand-edit.** A local edit is drift the moment the sibling moves, and the
|
|
8
9
|
plugin registers these bytes as each tool's `parameters` — an edited artifact is a
|
|
9
10
|
contract the API never agreed to.
|
|
10
11
|
|
|
11
12
|
```sh
|
|
12
|
-
|
|
13
|
+
S=<sil-services>/packages/schemas/schema; rm schema/*.schema.json \
|
|
14
|
+
&& cp $S/shopping-*.schema.json $S/sil-whoami-*.schema.json schema/ \
|
|
15
|
+
&& node scripts/contract-examples.mjs $S/agent-contract.md
|
|
13
16
|
```
|
|
14
17
|
|
|
15
18
|
Byte-identity against the sibling is graded by sil-stage, not here.
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-brief-write-request.schema.json",
|
|
4
|
+
"title": "sil shopping_brief_write — request",
|
|
5
|
+
"anyOf": [
|
|
6
|
+
{
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": [
|
|
9
|
+
"title",
|
|
10
|
+
"narrative"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"title": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"maxLength": 128,
|
|
17
|
+
"description": "Opens a brief: names the buy so the buyer picks it out later."
|
|
18
|
+
},
|
|
19
|
+
"narrative": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1,
|
|
22
|
+
"maxLength": 2000,
|
|
23
|
+
"description": "Writes what a good buy is for this buyer, in their terms, and what would make it a bad one."
|
|
24
|
+
},
|
|
25
|
+
"domain": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
|
|
28
|
+
"maxLength": 255,
|
|
29
|
+
"description": "Names where `specs` and `remove` sit: a place, or `seller` for seller specs."
|
|
30
|
+
},
|
|
31
|
+
"specs": {
|
|
32
|
+
"type": "array",
|
|
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
|
+
{
|
|
50
|
+
"type": "string",
|
|
51
|
+
"const": "eq"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "string",
|
|
55
|
+
"const": "neq"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "string",
|
|
59
|
+
"const": "gte"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "string",
|
|
63
|
+
"const": "lte"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"type": "string",
|
|
67
|
+
"const": "in"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "string",
|
|
71
|
+
"const": "nin"
|
|
72
|
+
}
|
|
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."
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"additionalProperties": false
|
|
94
|
+
},
|
|
95
|
+
"maxItems": 32,
|
|
96
|
+
"description": "Replaces every spec on the keys they name under that domain."
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"additionalProperties": false
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"type": "object",
|
|
103
|
+
"required": [
|
|
104
|
+
"id"
|
|
105
|
+
],
|
|
106
|
+
"properties": {
|
|
107
|
+
"id": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"minLength": 1,
|
|
110
|
+
"maxLength": 256,
|
|
111
|
+
"description": "Edits this brief; one that is not the buyer’s answers `not_found`."
|
|
112
|
+
},
|
|
113
|
+
"title": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"minLength": 1,
|
|
116
|
+
"maxLength": 128,
|
|
117
|
+
"description": "Renames it."
|
|
118
|
+
},
|
|
119
|
+
"narrative": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"minLength": 1,
|
|
122
|
+
"maxLength": 2000,
|
|
123
|
+
"description": "Replaces the whole narrative."
|
|
124
|
+
},
|
|
125
|
+
"domain": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
|
|
128
|
+
"maxLength": 255,
|
|
129
|
+
"description": "Names where `specs` and `remove` sit: a place, or `seller` for seller specs."
|
|
130
|
+
},
|
|
131
|
+
"specs": {
|
|
132
|
+
"type": "array",
|
|
133
|
+
"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
|
+
{
|
|
150
|
+
"type": "string",
|
|
151
|
+
"const": "eq"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"type": "string",
|
|
155
|
+
"const": "neq"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"type": "string",
|
|
159
|
+
"const": "gte"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"type": "string",
|
|
163
|
+
"const": "lte"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"type": "string",
|
|
167
|
+
"const": "in"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"type": "string",
|
|
171
|
+
"const": "nin"
|
|
172
|
+
}
|
|
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."
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"additionalProperties": false
|
|
194
|
+
},
|
|
195
|
+
"maxItems": 32,
|
|
196
|
+
"description": "Replaces every spec on the keys they name under that domain."
|
|
197
|
+
},
|
|
198
|
+
"remove": {
|
|
199
|
+
"type": "array",
|
|
200
|
+
"items": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"minLength": 1,
|
|
203
|
+
"maxLength": 64,
|
|
204
|
+
"description": "A key whose specs go."
|
|
205
|
+
},
|
|
206
|
+
"maxItems": 32,
|
|
207
|
+
"description": "Drops the specs on these keys."
|
|
208
|
+
},
|
|
209
|
+
"decision": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"minLength": 1,
|
|
212
|
+
"maxLength": 512,
|
|
213
|
+
"description": "Logs in one sentence what the buyer changed and why."
|
|
214
|
+
},
|
|
215
|
+
"status": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"const": "closed",
|
|
218
|
+
"description": "Closes it: the buy is over."
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"additionalProperties": false
|
|
222
|
+
}
|
|
223
|
+
],
|
|
224
|
+
"type": "object"
|
|
225
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schemas.sil.com/shopping-brief-
|
|
4
|
-
"title": "sil
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-brief-write-response.schema.json",
|
|
4
|
+
"title": "sil shopping_brief_write — response",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"required": [
|
|
7
7
|
"status",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"type": "string",
|
|
18
18
|
"minLength": 1,
|
|
19
19
|
"maxLength": 256,
|
|
20
|
-
"description": "
|
|
20
|
+
"description": "Names the brief; a later search or offers call may name it so sil ties them."
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"additionalProperties": false
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"type": "string",
|
|
25
25
|
"minLength": 1,
|
|
26
26
|
"maxLength": 256,
|
|
27
|
-
"description": "Reads one document's passages in order instead of grepping: any `id` a passage or a domain's map carried, from part `from` on; past its last part, none."
|
|
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
28
|
},
|
|
29
29
|
"from": {
|
|
30
30
|
"type": "integer",
|
|
@@ -72,20 +72,17 @@
|
|
|
72
72
|
"min_passages": {
|
|
73
73
|
"type": "integer",
|
|
74
74
|
"minimum": 0,
|
|
75
|
-
"
|
|
76
|
-
"description": "Fills up to this many from the nearest documents when too few match, marked by an empty `matched`. Default 1."
|
|
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."
|
|
77
76
|
},
|
|
78
77
|
"max_passages": {
|
|
79
78
|
"type": "integer",
|
|
80
79
|
"minimum": 1,
|
|
81
|
-
"
|
|
82
|
-
"description": "Caps the passages answered. Default 8."
|
|
80
|
+
"description": "Caps the passages answered, at most 20; a larger ask is served at that. Default 8."
|
|
83
81
|
},
|
|
84
82
|
"max_tokens": {
|
|
85
83
|
"type": "integer",
|
|
86
84
|
"minimum": 200,
|
|
87
|
-
"
|
|
88
|
-
"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`. Default 2000."
|
|
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."
|
|
89
86
|
}
|
|
90
87
|
},
|
|
91
88
|
"additionalProperties": false
|