sil-openclaw 0.4.5 → 0.5.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 +186 -0
- package/README.md +33 -45
- 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 +13 -10
- 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 +16 -12
- package/package.json +7 -6
- 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 +4 -5
- 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,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-offers-request.schema.json",
|
|
4
|
+
"title": "sil shopping_offers — request",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"brief",
|
|
8
|
+
"ids"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"brief": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"minLength": 1,
|
|
14
|
+
"maxLength": 256,
|
|
15
|
+
"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`."
|
|
16
|
+
},
|
|
17
|
+
"ids": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1,
|
|
22
|
+
"maxLength": 256,
|
|
23
|
+
"description": "An id sil minted, passed back verbatim."
|
|
24
|
+
},
|
|
25
|
+
"minItems": 1,
|
|
26
|
+
"maxItems": 10,
|
|
27
|
+
"description": "Sends the picked variant ids and nothing else: sil reads the brief's seller specs and price, the buyer's address and currency, off the brief and the profile."
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"additionalProperties": false
|
|
31
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-offers-response.schema.json",
|
|
4
|
+
"title": "sil shopping_offers — response",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"status",
|
|
8
|
+
"offers"
|
|
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
|
+
"ship_to": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"minLength": 1,
|
|
19
|
+
"maxLength": 64,
|
|
20
|
+
"description": "Says which address every `seller_fit.ships` below is about; absent when the default address carries no label."
|
|
21
|
+
},
|
|
22
|
+
"offers": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"required": [
|
|
27
|
+
"variant_id",
|
|
28
|
+
"seller_id",
|
|
29
|
+
"seller_name",
|
|
30
|
+
"price",
|
|
31
|
+
"currency",
|
|
32
|
+
"availability",
|
|
33
|
+
"observed_at",
|
|
34
|
+
"url",
|
|
35
|
+
"seller_fit"
|
|
36
|
+
],
|
|
37
|
+
"properties": {
|
|
38
|
+
"variant_id": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1,
|
|
41
|
+
"maxLength": 256,
|
|
42
|
+
"description": "Matches the offer to the pick."
|
|
43
|
+
},
|
|
44
|
+
"seller_id": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"minLength": 1,
|
|
47
|
+
"maxLength": 256,
|
|
48
|
+
"description": "Passes it to `shopping_seller_get`."
|
|
49
|
+
},
|
|
50
|
+
"seller_name": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "Names the shop to the buyer."
|
|
53
|
+
},
|
|
54
|
+
"price": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"pattern": "^[0-9]+(\\.[0-9]+)?$",
|
|
57
|
+
"description": "Quotes the price as read, never converted."
|
|
58
|
+
},
|
|
59
|
+
"currency": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"pattern": "^[A-Z]{3}$",
|
|
62
|
+
"minLength": 3,
|
|
63
|
+
"maxLength": 3,
|
|
64
|
+
"description": "Quotes the price in this currency."
|
|
65
|
+
},
|
|
66
|
+
"availability": {
|
|
67
|
+
"anyOf": [
|
|
68
|
+
{
|
|
69
|
+
"type": "string",
|
|
70
|
+
"const": "in_stock"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "string",
|
|
74
|
+
"const": "backorder"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "string",
|
|
78
|
+
"const": "preorder"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "string",
|
|
82
|
+
"const": "out_of_stock"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"type": "string",
|
|
86
|
+
"const": "discontinued"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"type": "string",
|
|
90
|
+
"const": "unknown"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"description": "Tells the buyer whether it can be bought now."
|
|
94
|
+
},
|
|
95
|
+
"observed_at": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"format": "date-time",
|
|
98
|
+
"description": "Dates the price to the buyer — this offer was read live, at this moment."
|
|
99
|
+
},
|
|
100
|
+
"url": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"description": "Hands the buyer the listing."
|
|
103
|
+
},
|
|
104
|
+
"seller_fit": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"required": [
|
|
107
|
+
"ships"
|
|
108
|
+
],
|
|
109
|
+
"properties": {
|
|
110
|
+
"ships": {
|
|
111
|
+
"anyOf": [
|
|
112
|
+
{
|
|
113
|
+
"type": "string",
|
|
114
|
+
"const": "serviceable"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"type": "string",
|
|
118
|
+
"const": "not_serviceable"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type": "string",
|
|
122
|
+
"const": "unknown"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"description": "Says whether it ships there; `unknown` keeps the seller and says sil has not read its policy."
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"additionalProperties": {
|
|
129
|
+
"anyOf": [
|
|
130
|
+
{
|
|
131
|
+
"type": "number"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"type": "boolean"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"type": "string"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"type": "object",
|
|
141
|
+
"required": [
|
|
142
|
+
"amount",
|
|
143
|
+
"currency"
|
|
144
|
+
],
|
|
145
|
+
"properties": {
|
|
146
|
+
"amount": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"pattern": "^[0-9]+(\\.[0-9]+)?$",
|
|
149
|
+
"description": "Quotes the amount as the page states it."
|
|
150
|
+
},
|
|
151
|
+
"currency": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"pattern": "^[A-Z]{3}$",
|
|
154
|
+
"minLength": 3,
|
|
155
|
+
"maxLength": 3,
|
|
156
|
+
"description": "Quotes the amount in this currency."
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"additionalProperties": false
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
"description": "Compares each requested seller key with what it asked, on this seller's value; `ships` says whether it reaches the address."
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"additionalProperties": false
|
|
167
|
+
},
|
|
168
|
+
"description": "Lists where the pick can be bought — one variant at one seller per entry."
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"additionalProperties": false
|
|
172
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-product-get-request.schema.json",
|
|
4
|
+
"title": "sil shopping_product_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 variant ids it wants the whole of; one sil cannot place is absent."
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"additionalProperties": false
|
|
24
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-product-get-response.schema.json",
|
|
4
|
+
"title": "sil shopping_product_get — response",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"status",
|
|
8
|
+
"variants"
|
|
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
|
+
"variants": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": [
|
|
21
|
+
"id",
|
|
22
|
+
"title",
|
|
23
|
+
"images",
|
|
24
|
+
"specs",
|
|
25
|
+
"sources"
|
|
26
|
+
],
|
|
27
|
+
"properties": {
|
|
28
|
+
"id": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"minLength": 1,
|
|
31
|
+
"maxLength": 256,
|
|
32
|
+
"description": "Matches the entry back to the id it asked for."
|
|
33
|
+
},
|
|
34
|
+
"title": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Tells the buyer what it is."
|
|
37
|
+
},
|
|
38
|
+
"brand": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "Names the maker to the buyer."
|
|
41
|
+
},
|
|
42
|
+
"description": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "Quotes the page's own product description."
|
|
45
|
+
},
|
|
46
|
+
"images": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "string"
|
|
50
|
+
},
|
|
51
|
+
"description": "Shows it to the buyer."
|
|
52
|
+
},
|
|
53
|
+
"specs": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"patternProperties": {
|
|
56
|
+
"^.*$": {
|
|
57
|
+
"anyOf": [
|
|
58
|
+
{
|
|
59
|
+
"type": "number"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "boolean"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "string"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"description": "Compares the shortlist on every key sil holds — the product's values and this variant's own — not only the asked ones."
|
|
71
|
+
},
|
|
72
|
+
"sources": {
|
|
73
|
+
"type": "array",
|
|
74
|
+
"items": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"required": [
|
|
77
|
+
"host",
|
|
78
|
+
"read_at"
|
|
79
|
+
],
|
|
80
|
+
"properties": {
|
|
81
|
+
"host": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"description": "Says which site sil read."
|
|
84
|
+
},
|
|
85
|
+
"read_at": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"format": "date-time",
|
|
88
|
+
"description": "Says when sil read it."
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"additionalProperties": false
|
|
92
|
+
},
|
|
93
|
+
"description": "Says where and when sil read them."
|
|
94
|
+
},
|
|
95
|
+
"webpage_info": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"required": [
|
|
98
|
+
"url",
|
|
99
|
+
"text"
|
|
100
|
+
],
|
|
101
|
+
"properties": {
|
|
102
|
+
"url": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"description": "Links the page it read the words off."
|
|
105
|
+
},
|
|
106
|
+
"text": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"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."
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"additionalProperties": false,
|
|
112
|
+
"description": "Reads a page sil has not read yet, in the page's own words."
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"additionalProperties": false
|
|
116
|
+
},
|
|
117
|
+
"description": "Reads the whole of what sil knows before recommending."
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"additionalProperties": false
|
|
121
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-profile-edit-request.schema.json",
|
|
4
|
+
"title": "sil shopping_profile_edit — request",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"currency": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"pattern": "^[A-Z]{3}$",
|
|
10
|
+
"minLength": 3,
|
|
11
|
+
"maxLength": 3,
|
|
12
|
+
"description": "Writes the currency the buyer prices in; every money row that names none means this one. sil converts nothing."
|
|
13
|
+
},
|
|
14
|
+
"measurements": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": [
|
|
19
|
+
"name",
|
|
20
|
+
"value"
|
|
21
|
+
],
|
|
22
|
+
"properties": {
|
|
23
|
+
"name": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^[a-z0-9_]+$",
|
|
26
|
+
"minLength": 1,
|
|
27
|
+
"maxLength": 64,
|
|
28
|
+
"description": "Names the measurement in lower snake_case (`foot_length`, never \"foot length\"); writing the same name again replaces it."
|
|
29
|
+
},
|
|
30
|
+
"value": {
|
|
31
|
+
"anyOf": [
|
|
32
|
+
{
|
|
33
|
+
"type": "number"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 1,
|
|
38
|
+
"maxLength": 128
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"description": "Reads a number to translate through the guide, or a size as it is printed."
|
|
42
|
+
},
|
|
43
|
+
"unit": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1,
|
|
46
|
+
"maxLength": 16,
|
|
47
|
+
"description": "Reads which unit the number is in before comparing it with a spec."
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"additionalProperties": false
|
|
51
|
+
},
|
|
52
|
+
"maxItems": 32,
|
|
53
|
+
"description": "Writes what the buyer said about their body before the next search; an entry replaces the one of the same `name`."
|
|
54
|
+
},
|
|
55
|
+
"preferences": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"required": [
|
|
60
|
+
"name",
|
|
61
|
+
"value"
|
|
62
|
+
],
|
|
63
|
+
"properties": {
|
|
64
|
+
"name": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"pattern": "^[a-z0-9_]+$",
|
|
67
|
+
"minLength": 1,
|
|
68
|
+
"maxLength": 64,
|
|
69
|
+
"description": "Names the preference in lower snake_case (`boot_closure`, never \"boot closure\"); writing the same name again replaces it."
|
|
70
|
+
},
|
|
71
|
+
"value": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"minLength": 1,
|
|
74
|
+
"maxLength": 256,
|
|
75
|
+
"description": "Reads the taste in the buyer's own words, and never asks what it answers."
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"additionalProperties": false
|
|
79
|
+
},
|
|
80
|
+
"maxItems": 32,
|
|
81
|
+
"description": "Writes a taste that will still be true next session, in the buyer’s words."
|
|
82
|
+
},
|
|
83
|
+
"remove": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"pattern": "^[a-z0-9_]+$",
|
|
88
|
+
"minLength": 1,
|
|
89
|
+
"maxLength": 64,
|
|
90
|
+
"description": "Names an entry that goes."
|
|
91
|
+
},
|
|
92
|
+
"maxItems": 32,
|
|
93
|
+
"description": "Drops what stopped being true of the buyer."
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"additionalProperties": false
|
|
97
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-profile-edit-response.schema.json",
|
|
4
|
+
"title": "sil shopping_profile_edit — response",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"status"
|
|
8
|
+
],
|
|
9
|
+
"properties": {
|
|
10
|
+
"status": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"const": "ok",
|
|
13
|
+
"description": "Reads the answer. Every other status arrives as an error body carrying recovery."
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"additionalProperties": false
|
|
17
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-search-request.schema.json",
|
|
4
|
+
"title": "sil shopping_search — request",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"brief",
|
|
8
|
+
"domain",
|
|
9
|
+
"query",
|
|
10
|
+
"n"
|
|
11
|
+
],
|
|
12
|
+
"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
|
+
"domain": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
|
|
22
|
+
"maxLength": 255,
|
|
23
|
+
"description": "Sends the path the domain read returned."
|
|
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."
|
|
36
|
+
},
|
|
37
|
+
"specs": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"required": [
|
|
42
|
+
"key",
|
|
43
|
+
"op",
|
|
44
|
+
"value"
|
|
45
|
+
],
|
|
46
|
+
"properties": {
|
|
47
|
+
"key": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1,
|
|
50
|
+
"maxLength": 64,
|
|
51
|
+
"description": "Names the key from the domain read; `price` is a key every domain has."
|
|
52
|
+
},
|
|
53
|
+
"op": {
|
|
54
|
+
"anyOf": [
|
|
55
|
+
{
|
|
56
|
+
"type": "string",
|
|
57
|
+
"const": "eq"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "string",
|
|
61
|
+
"const": "neq"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"type": "string",
|
|
65
|
+
"const": "gte"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "string",
|
|
69
|
+
"const": "lte"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "string",
|
|
73
|
+
"const": "in"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "string",
|
|
77
|
+
"const": "nin"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"description": "Sends the operator the domain read listed for this key."
|
|
81
|
+
},
|
|
82
|
+
"value": {
|
|
83
|
+
"description": "Sends the desired value, typed by the key's type."
|
|
84
|
+
},
|
|
85
|
+
"currency": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"pattern": "^[A-Z]{3}$",
|
|
88
|
+
"minLength": 3,
|
|
89
|
+
"maxLength": 3,
|
|
90
|
+
"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."
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"additionalProperties": false
|
|
94
|
+
},
|
|
95
|
+
"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."
|
|
97
|
+
},
|
|
98
|
+
"ship_to": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"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."
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"additionalProperties": false
|
|
106
|
+
}
|