sil-openclaw 0.4.6 → 0.5.1
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 +185 -0
- package/README.md +34 -46
- package/SECURITY.md +61 -11
- package/dist/gateway/search-results.js +11 -7
- package/dist/index.js +24 -24
- package/dist/lib/allowlist-script.js +13 -0
- package/dist/lib/artifacts.js +30 -0
- package/dist/lib/credentials.js +2 -3
- package/dist/lib/host-wiring.js +44 -15
- package/dist/lib/pkce.js +3 -3
- package/dist/lib/search-results-log.js +23 -0
- package/dist/lib/search-results-store.js +4 -4
- package/dist/lib/shopping-call.js +143 -0
- package/dist/lib/sil-client.js +185 -1046
- package/dist/lib/tool-result.js +10 -3
- package/dist/tools/catalog.js +311 -1197
- package/dist/tools/doctor.js +25 -63
- package/dist/tools/identity.js +110 -245
- package/openclaw.plugin.json +12 -33
- package/package.json +10 -9
- package/schema/PROVENANCE.md +15 -0
- package/schema/shopping-brief-create-request.schema.json +98 -0
- package/schema/shopping-brief-create-response.schema.json +24 -0
- package/schema/shopping-brief-edit-request.schema.json +125 -0
- package/schema/shopping-brief-edit-response.schema.json +24 -0
- package/schema/shopping-brief-read-request.schema.json +15 -0
- package/schema/shopping-brief-read-response.schema.json +235 -0
- package/schema/shopping-domain-create-request.schema.json +160 -0
- package/schema/shopping-domain-create-response.schema.json +60 -0
- package/schema/shopping-domain-get-request.schema.json +18 -0
- package/schema/shopping-domain-get-response.schema.json +307 -0
- package/schema/shopping-domain-search-request.schema.json +18 -0
- package/schema/shopping-domain-search-response.schema.json +92 -0
- package/schema/shopping-offers-request.schema.json +31 -0
- package/schema/shopping-offers-response.schema.json +172 -0
- package/schema/shopping-product-get-request.schema.json +24 -0
- package/schema/shopping-product-get-response.schema.json +121 -0
- package/schema/shopping-profile-edit-request.schema.json +97 -0
- package/schema/shopping-profile-edit-response.schema.json +17 -0
- package/schema/shopping-search-request.schema.json +106 -0
- package/schema/shopping-search-response.schema.json +182 -0
- package/schema/shopping-seller-get-request.schema.json +24 -0
- package/schema/shopping-seller-get-response.schema.json +342 -0
- package/scripts/allowlist-openclaw.mjs +6 -7
- package/sil-shopping/SKILL.md +196 -97
- package/sil-shopping/references/mint.md +190 -0
- package/dist/lib/bind-channel.js +0 -10
- package/dist/lib/creation-entrypoint.js +0 -111
- package/dist/lib/derive-agent-id.js +0 -36
- package/dist/lib/profile-store.js +0 -568
- package/dist/tools/profile.js +0 -300
- package/scripts/create-shopper.mjs +0 -677
- package/sil-shopping/examples/multi_domain_shopper_walkthrough.md +0 -65
- package/sil-shopping/references/agent_creation_engine.md +0 -223
- package/sil-shopping/references/fill_and_feedback.md +0 -102
- package/sil-shopping/references/method_and_prds.md +0 -143
- package/sil-shopping/references/setup_onboarding.md +0 -64
- package/sil-shopping/references/shop_loop.md +0 -118
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-search-response.schema.json",
|
|
4
|
+
"title": "sil shopping_search — response",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"status",
|
|
8
|
+
"products"
|
|
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
|
+
"products": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": [
|
|
21
|
+
"id",
|
|
22
|
+
"title",
|
|
23
|
+
"fit",
|
|
24
|
+
"price",
|
|
25
|
+
"variants"
|
|
26
|
+
],
|
|
27
|
+
"properties": {
|
|
28
|
+
"id": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"minLength": 1,
|
|
31
|
+
"maxLength": 256,
|
|
32
|
+
"description": "Writes it into the Brief as the pick, so the next session names the same product."
|
|
33
|
+
},
|
|
34
|
+
"title": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Draws the card with it."
|
|
37
|
+
},
|
|
38
|
+
"brand": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "Names the maker to the buyer."
|
|
41
|
+
},
|
|
42
|
+
"image": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "Shows it on the card."
|
|
45
|
+
},
|
|
46
|
+
"fit": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"patternProperties": {
|
|
49
|
+
"^.*$": {
|
|
50
|
+
"anyOf": [
|
|
51
|
+
{
|
|
52
|
+
"type": "number"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "boolean"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "string"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"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."
|
|
64
|
+
},
|
|
65
|
+
"price": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"required": [
|
|
70
|
+
"from",
|
|
71
|
+
"to",
|
|
72
|
+
"currency"
|
|
73
|
+
],
|
|
74
|
+
"properties": {
|
|
75
|
+
"from": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"pattern": "^[0-9]+(\\.[0-9]+)?$",
|
|
78
|
+
"description": "Quotes the low end of what the product costs in this currency."
|
|
79
|
+
},
|
|
80
|
+
"to": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"pattern": "^[0-9]+(\\.[0-9]+)?$",
|
|
83
|
+
"description": "Quotes the high end."
|
|
84
|
+
},
|
|
85
|
+
"currency": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"pattern": "^[A-Z]{3}$",
|
|
88
|
+
"minLength": 3,
|
|
89
|
+
"maxLength": 3,
|
|
90
|
+
"description": "Reads which currency the range is in; sil converts nothing."
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"additionalProperties": false
|
|
94
|
+
},
|
|
95
|
+
"description": "Quotes the range over the variants that came back; a currency other than the ask's is a bound sil could not test."
|
|
96
|
+
},
|
|
97
|
+
"variants": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"required": [
|
|
102
|
+
"id",
|
|
103
|
+
"price"
|
|
104
|
+
],
|
|
105
|
+
"properties": {
|
|
106
|
+
"id": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"minLength": 1,
|
|
109
|
+
"maxLength": 256,
|
|
110
|
+
"description": "Passes it to `shopping_product_get` and `shopping_offers`."
|
|
111
|
+
},
|
|
112
|
+
"price": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"items": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"required": [
|
|
117
|
+
"from",
|
|
118
|
+
"to",
|
|
119
|
+
"currency"
|
|
120
|
+
],
|
|
121
|
+
"properties": {
|
|
122
|
+
"from": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"pattern": "^[0-9]+(\\.[0-9]+)?$",
|
|
125
|
+
"description": "Quotes the low end of what the product costs in this currency."
|
|
126
|
+
},
|
|
127
|
+
"to": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"pattern": "^[0-9]+(\\.[0-9]+)?$",
|
|
130
|
+
"description": "Quotes the high end."
|
|
131
|
+
},
|
|
132
|
+
"currency": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"pattern": "^[A-Z]{3}$",
|
|
135
|
+
"minLength": 3,
|
|
136
|
+
"maxLength": 3,
|
|
137
|
+
"description": "Reads which currency the range is in; sil converts nothing."
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"additionalProperties": false
|
|
141
|
+
},
|
|
142
|
+
"description": "Quotes what THIS option costs, over its own offers; a currency other than the ask's is a bound sil could not test."
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"additionalProperties": {
|
|
146
|
+
"anyOf": [
|
|
147
|
+
{
|
|
148
|
+
"type": "number"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"type": "string"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"type": "boolean"
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
"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."
|
|
159
|
+
},
|
|
160
|
+
"description": "Passes an `id` on to the dossier and the offers; names the option to the buyer."
|
|
161
|
+
},
|
|
162
|
+
"host": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"description": "Names the shop whose page sil read in this request."
|
|
165
|
+
},
|
|
166
|
+
"printed": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"patternProperties": {
|
|
169
|
+
"^.*$": {
|
|
170
|
+
"type": "string"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"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."
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"additionalProperties": false
|
|
177
|
+
},
|
|
178
|
+
"description": "Shows the shortlist in this order, and never re-ranks it."
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"additionalProperties": false
|
|
182
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-seller-get-request.schema.json",
|
|
4
|
+
"title": "sil shopping_seller_get — request",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"ids"
|
|
8
|
+
],
|
|
9
|
+
"properties": {
|
|
10
|
+
"ids": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1,
|
|
15
|
+
"maxLength": 256,
|
|
16
|
+
"description": "An id sil minted, passed back verbatim."
|
|
17
|
+
},
|
|
18
|
+
"minItems": 1,
|
|
19
|
+
"maxItems": 10,
|
|
20
|
+
"description": "Sends the seller ids the offers named."
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"additionalProperties": false
|
|
24
|
+
}
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-seller-get-response.schema.json",
|
|
4
|
+
"title": "sil shopping_seller_get — response",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"status",
|
|
8
|
+
"sellers"
|
|
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
|
+
"sellers": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": [
|
|
21
|
+
"id",
|
|
22
|
+
"name",
|
|
23
|
+
"host",
|
|
24
|
+
"country",
|
|
25
|
+
"ships",
|
|
26
|
+
"specs"
|
|
27
|
+
],
|
|
28
|
+
"properties": {
|
|
29
|
+
"id": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1,
|
|
32
|
+
"maxLength": 256,
|
|
33
|
+
"description": "Matches the seller to the offers that named it."
|
|
34
|
+
},
|
|
35
|
+
"name": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "Names the shop to the buyer."
|
|
38
|
+
},
|
|
39
|
+
"host": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Names the site the buyer would buy from."
|
|
42
|
+
},
|
|
43
|
+
"country": {
|
|
44
|
+
"anyOf": [
|
|
45
|
+
{
|
|
46
|
+
"type": "string",
|
|
47
|
+
"pattern": "^[A-Z]{2}$",
|
|
48
|
+
"minLength": 2,
|
|
49
|
+
"maxLength": 2
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "string",
|
|
53
|
+
"const": "unknown"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"description": "Says where the shop is; `unknown` says sil has not read where this seller is, never that it is nowhere."
|
|
57
|
+
},
|
|
58
|
+
"ships": {
|
|
59
|
+
"anyOf": [
|
|
60
|
+
{
|
|
61
|
+
"type": "string",
|
|
62
|
+
"const": "serviceable"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "string",
|
|
66
|
+
"const": "not_serviceable"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "string",
|
|
70
|
+
"const": "unknown"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"description": "Says whether it ships there; `unknown` keeps the seller and says sil has not read its policy."
|
|
74
|
+
},
|
|
75
|
+
"specs": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"patternProperties": {
|
|
78
|
+
"^.*$": {
|
|
79
|
+
"anyOf": [
|
|
80
|
+
{
|
|
81
|
+
"type": "number"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "boolean"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "string"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
},
|
|
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."
|
|
93
|
+
},
|
|
94
|
+
"shipping": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"required": [
|
|
97
|
+
"policy_url",
|
|
98
|
+
"routes"
|
|
99
|
+
],
|
|
100
|
+
"properties": {
|
|
101
|
+
"policy_url": {
|
|
102
|
+
"anyOf": [
|
|
103
|
+
{
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "null"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"description": "Links the policy page; `null` when the routes were read off a product page and sil holds no policy page."
|
|
111
|
+
},
|
|
112
|
+
"routes": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"items": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"required": [
|
|
117
|
+
"country",
|
|
118
|
+
"service"
|
|
119
|
+
],
|
|
120
|
+
"properties": {
|
|
121
|
+
"country": {
|
|
122
|
+
"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."
|
|
155
|
+
},
|
|
156
|
+
"label": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"description": "Quotes the merchant's own name for the service."
|
|
159
|
+
},
|
|
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."
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"additionalProperties": false
|
|
291
|
+
},
|
|
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."
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"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."
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"additionalProperties": false
|
|
337
|
+
},
|
|
338
|
+
"description": "Reads the terms before recommending a seller."
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"additionalProperties": false
|
|
342
|
+
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Install-time helper: trust `sil` in the host OpenClaw config.
|
|
4
4
|
*
|
|
5
|
-
* Operator-invoked (NEVER an npm lifecycle hook —
|
|
6
|
-
*
|
|
5
|
+
* Operator-invoked (NEVER an npm lifecycle hook — SECURITY.md's "no install
|
|
6
|
+
* scripts" is a shipped guarantee that the package
|
|
7
7
|
* runs nothing automatically; an operator explicitly running this is the
|
|
8
8
|
* opposite of an install hook and honours it). This is a standalone script in
|
|
9
9
|
* the same class as `scripts/release.mjs` — it is NOT the plugin process, so
|
|
@@ -96,11 +96,10 @@ function readSilFacts() {
|
|
|
96
96
|
return { id, tools, skill };
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
/** Atomic single-file write: tmp sibling → write → rename over target,
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* half-written one; a crash before rename leaves the original untouched. */
|
|
99
|
+
/** Atomic single-file write: tmp sibling → write → rename over target, PRESERVING the
|
|
100
|
+
* source file's existing mode — host config is operator-readable, NOT a 0600 credential.
|
|
101
|
+
* A reader sees either the old file or the new one, never a half-written one; a crash
|
|
102
|
+
* before rename leaves the original untouched. */
|
|
104
103
|
function atomicWrite(path, contents, mode) {
|
|
105
104
|
const tmp = path + "." + randomBytes(6).toString("hex") + ".tmp";
|
|
106
105
|
writeFileSync(tmp, contents, { mode });
|