sil-openclaw 0.4.6 → 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 +171 -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 +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 +14 -11
- 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,160 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-domain-create-request.schema.json",
|
|
4
|
+
"title": "sil shopping_domain_create — request",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"path",
|
|
8
|
+
"guide",
|
|
9
|
+
"name",
|
|
10
|
+
"specs"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"path": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
|
|
16
|
+
"maxLength": 255,
|
|
17
|
+
"description": "Mints this path; only its root must already stand. A path directly under `product` is refused — name the family the thing is shelved in, as `product.sports.winter.ski.boots` does."
|
|
18
|
+
},
|
|
19
|
+
"guide": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1,
|
|
22
|
+
"maxLength": 4096,
|
|
23
|
+
"description": "Writes the domain document every later buyer inherits, in markdown: what the thing is bought on, what goes wrong and what that costs the buyer, what to trust and what not to, and what buying it online takes in place of handling it. A domain sil has curated already carries one — write one only for a domain the registry does not hold."
|
|
24
|
+
},
|
|
25
|
+
"name": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1,
|
|
28
|
+
"maxLength": 64,
|
|
29
|
+
"description": "Names the thing in English, and there is ONE. A name a standing domain already answers to is refused, naming that domain."
|
|
30
|
+
},
|
|
31
|
+
"labels": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"minLength": 1,
|
|
36
|
+
"maxLength": 64
|
|
37
|
+
},
|
|
38
|
+
"minItems": 1,
|
|
39
|
+
"maxItems": 20,
|
|
40
|
+
"description": "Seeds the market's own words for the thing, in any language — `καφετιέρα φίλτρου`, `dripper`. sil asks the indexes in them and grows more from the titles it holds."
|
|
41
|
+
},
|
|
42
|
+
"specs": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"required": [
|
|
47
|
+
"key",
|
|
48
|
+
"display_name",
|
|
49
|
+
"type"
|
|
50
|
+
],
|
|
51
|
+
"properties": {
|
|
52
|
+
"key": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"minLength": 1,
|
|
55
|
+
"maxLength": 64,
|
|
56
|
+
"description": "Coins the key here; naming one an ancestor defines redefines it for this subtree, or answers `inherited: true` when the declaration states nothing new."
|
|
57
|
+
},
|
|
58
|
+
"display_name": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"minLength": 1,
|
|
61
|
+
"maxLength": 128,
|
|
62
|
+
"description": "Names the key for a reader in the buyer's words."
|
|
63
|
+
},
|
|
64
|
+
"description": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"maxLength": 1024,
|
|
67
|
+
"description": "Writes how this one key moves the fit, for every agent that reads this domain after you — what it decides, what goes wrong at either end of it, and how a measurement or a stated preference becomes a value for it."
|
|
68
|
+
},
|
|
69
|
+
"type": {
|
|
70
|
+
"anyOf": [
|
|
71
|
+
{
|
|
72
|
+
"type": "string",
|
|
73
|
+
"const": "number"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "string",
|
|
77
|
+
"const": "boolean"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "string",
|
|
81
|
+
"const": "enum"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "string",
|
|
85
|
+
"const": "money"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"description": "Types the value the agent sends and reads for this key."
|
|
89
|
+
},
|
|
90
|
+
"unit": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"minLength": 1,
|
|
93
|
+
"description": "Declares the unit every value of this key is in."
|
|
94
|
+
},
|
|
95
|
+
"allowed_values": {
|
|
96
|
+
"type": "array",
|
|
97
|
+
"items": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"minLength": 1
|
|
100
|
+
},
|
|
101
|
+
"minItems": 1,
|
|
102
|
+
"description": "Declares the closed set an enum takes."
|
|
103
|
+
},
|
|
104
|
+
"step": {
|
|
105
|
+
"type": "number",
|
|
106
|
+
"exclusiveMinimum": 0,
|
|
107
|
+
"description": "Declares the increment the maker prints this numeric axis in — 0.5 for a Mondopoint size. Only on a number."
|
|
108
|
+
},
|
|
109
|
+
"forms": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"patternProperties": {
|
|
112
|
+
"^.*$": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"minLength": 1
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"maxProperties": 100,
|
|
118
|
+
"description": "Declares what pages print for a value, mapped to the value — `{\"1-4 cups\": \"02\", \"43⅓\": \"43.3\"}` — so a page sil has never read keys it without a model."
|
|
119
|
+
},
|
|
120
|
+
"labels": {
|
|
121
|
+
"type": "array",
|
|
122
|
+
"items": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"minLength": 1,
|
|
125
|
+
"maxLength": 60
|
|
126
|
+
},
|
|
127
|
+
"minItems": 1,
|
|
128
|
+
"maxItems": 20,
|
|
129
|
+
"description": "Maps the headings pages print this key under — `Flex`, `Flex Index`, `Ευρετήριο Flex` — so a page sil has never read keys the value without a model."
|
|
130
|
+
},
|
|
131
|
+
"aliases": {
|
|
132
|
+
"type": "array",
|
|
133
|
+
"items": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"minLength": 1,
|
|
136
|
+
"maxLength": 60
|
|
137
|
+
},
|
|
138
|
+
"minItems": 1,
|
|
139
|
+
"maxItems": 20,
|
|
140
|
+
"description": "Maps the names another agent may send for this key — `mondopoint`, `mondo` — so a search naming one of them is answered on this key instead of refused."
|
|
141
|
+
},
|
|
142
|
+
"variant_spec": {
|
|
143
|
+
"type": "boolean",
|
|
144
|
+
"const": true,
|
|
145
|
+
"description": "Marks a key that, alone or with the others so marked, identifies a purchasable variant."
|
|
146
|
+
},
|
|
147
|
+
"product_spec": {
|
|
148
|
+
"type": "boolean",
|
|
149
|
+
"const": true,
|
|
150
|
+
"description": "Marks a key that, with the brand and the others so marked, tells one product from the next."
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"additionalProperties": false
|
|
154
|
+
},
|
|
155
|
+
"maxItems": 50,
|
|
156
|
+
"description": "Coins the keys this domain is bought by; the registry derives the operators."
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"additionalProperties": false
|
|
160
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-domain-create-response.schema.json",
|
|
4
|
+
"title": "sil shopping_domain_create — response",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"status",
|
|
8
|
+
"path",
|
|
9
|
+
"specs"
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"status": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"const": "ok",
|
|
15
|
+
"description": "Reads the answer. Every other status arrives as an error body carrying recovery."
|
|
16
|
+
},
|
|
17
|
+
"path": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Searches it."
|
|
20
|
+
},
|
|
21
|
+
"specs": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"required": [
|
|
26
|
+
"key"
|
|
27
|
+
],
|
|
28
|
+
"properties": {
|
|
29
|
+
"key": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Uses this key in the Brief and in `shopping_search`."
|
|
32
|
+
},
|
|
33
|
+
"variant_spec": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"const": true,
|
|
36
|
+
"description": "Knows it must settle this key for a variant."
|
|
37
|
+
},
|
|
38
|
+
"product_spec": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"const": true,
|
|
41
|
+
"description": "Knows this key tells one product from the next."
|
|
42
|
+
},
|
|
43
|
+
"inherited": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"const": true,
|
|
46
|
+
"description": "Knows it may filter on this key without having minted it."
|
|
47
|
+
},
|
|
48
|
+
"bound_from": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"maxLength": 64,
|
|
51
|
+
"description": "Reads the key it sent, which named a key that already stands: sil answers on the standing one and maps what was sent onto it. Uses `key`, never this."
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"additionalProperties": false
|
|
55
|
+
},
|
|
56
|
+
"description": "Reads back the keys the registry accepted, as it accepted them."
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"additionalProperties": false
|
|
60
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-domain-get-request.schema.json",
|
|
4
|
+
"title": "sil shopping_domain_get — request",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"path"
|
|
8
|
+
],
|
|
9
|
+
"properties": {
|
|
10
|
+
"path": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
|
|
13
|
+
"maxLength": 255,
|
|
14
|
+
"description": "Sends one standing path. A path that does not stand answers `not_found`; the root `product` always stands."
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"additionalProperties": false
|
|
18
|
+
}
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-domain-get-response.schema.json",
|
|
4
|
+
"title": "sil shopping_domain_get — response",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"status",
|
|
8
|
+
"path",
|
|
9
|
+
"guide",
|
|
10
|
+
"name",
|
|
11
|
+
"labels",
|
|
12
|
+
"specs",
|
|
13
|
+
"seller_specs"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"status": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"const": "ok",
|
|
19
|
+
"description": "Reads the answer. Every other status arrives as an error body carrying recovery."
|
|
20
|
+
},
|
|
21
|
+
"path": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Sends it verbatim as `shopping_search.domain`."
|
|
24
|
+
},
|
|
25
|
+
"guide": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "Reads the domain document — markdown on how this thing is bought well: what it is bought on, what goes wrong and what that costs the buyer, what to trust, and what buying it online takes in place of handling it. It is what sil knows about the domain, so reason from it rather than reciting it, and never send the buyer to a shop it already tells you how to do without."
|
|
28
|
+
},
|
|
29
|
+
"name": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"maxLength": 64,
|
|
32
|
+
"description": "Calls the thing this in English — there is one, and this is it."
|
|
33
|
+
},
|
|
34
|
+
"labels": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"maxLength": 64
|
|
39
|
+
},
|
|
40
|
+
"maxItems": 20,
|
|
41
|
+
"description": "Reads every other word for the thing — the market's own, in any language, folded to the form sil maps under. sil asks each index in them; the agent never sends them."
|
|
42
|
+
},
|
|
43
|
+
"specs": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"required": [
|
|
48
|
+
"key",
|
|
49
|
+
"display_name",
|
|
50
|
+
"type",
|
|
51
|
+
"operators"
|
|
52
|
+
],
|
|
53
|
+
"properties": {
|
|
54
|
+
"key": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"minLength": 1,
|
|
57
|
+
"maxLength": 64,
|
|
58
|
+
"description": "Names the key in the Brief and sends it as a `shopping_search` spec key."
|
|
59
|
+
},
|
|
60
|
+
"display_name": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"minLength": 1,
|
|
63
|
+
"maxLength": 128,
|
|
64
|
+
"description": "Calls the key this when it writes it down or says it out loud."
|
|
65
|
+
},
|
|
66
|
+
"description": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"maxLength": 1024,
|
|
69
|
+
"description": "Reads how this one key moves the fit — what it decides, what goes wrong at either end of it, and how a buyer's own fact becomes a value for it. Reason from it; ask from it; never recite it back."
|
|
70
|
+
},
|
|
71
|
+
"type": {
|
|
72
|
+
"anyOf": [
|
|
73
|
+
{
|
|
74
|
+
"type": "string",
|
|
75
|
+
"const": "number"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "string",
|
|
79
|
+
"const": "boolean"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "string",
|
|
83
|
+
"const": "enum"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "string",
|
|
87
|
+
"const": "money"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"description": "Types the value the agent sends and reads for this key."
|
|
91
|
+
},
|
|
92
|
+
"unit": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"minLength": 1,
|
|
95
|
+
"description": "States the value in this unit, the one sil holds it in."
|
|
96
|
+
},
|
|
97
|
+
"allowed_values": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"minLength": 1
|
|
102
|
+
},
|
|
103
|
+
"minItems": 1,
|
|
104
|
+
"description": "Maps the buyer's word into the closed set; an enum without one takes any name, a maker's for `brand`."
|
|
105
|
+
},
|
|
106
|
+
"operators": {
|
|
107
|
+
"type": "array",
|
|
108
|
+
"items": {
|
|
109
|
+
"anyOf": [
|
|
110
|
+
{
|
|
111
|
+
"type": "string",
|
|
112
|
+
"const": "eq"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "string",
|
|
116
|
+
"const": "neq"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "string",
|
|
120
|
+
"const": "gte"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "string",
|
|
124
|
+
"const": "lte"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"type": "string",
|
|
128
|
+
"const": "in"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"type": "string",
|
|
132
|
+
"const": "nin"
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
"minItems": 1,
|
|
137
|
+
"description": "Picks the comparison that fits: `eq`/`in` on a variant spec and on enums, `gte`/`lte` on numbers and money."
|
|
138
|
+
},
|
|
139
|
+
"step": {
|
|
140
|
+
"type": "number",
|
|
141
|
+
"exclusiveMinimum": 0,
|
|
142
|
+
"description": "Asks on the grid the maker prints the axis in — 0.5 for a Mondopoint size. A figure off the grid is something sil has not read as a value."
|
|
143
|
+
},
|
|
144
|
+
"forms": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"patternProperties": {
|
|
147
|
+
"^.*$": {
|
|
148
|
+
"type": "string"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"description": "Reads what pages print for a value, mapped to the value — `{\"27/27.5\": \"27.5\"}`. Never sent: the request takes the value, and this is how sil recognises it in the wild."
|
|
152
|
+
},
|
|
153
|
+
"labels": {
|
|
154
|
+
"type": "array",
|
|
155
|
+
"items": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"minLength": 1,
|
|
158
|
+
"maxLength": 60
|
|
159
|
+
},
|
|
160
|
+
"minItems": 1,
|
|
161
|
+
"maxItems": 20,
|
|
162
|
+
"description": "Sends any of these as the key and reaches this one: the names sil maps here — the headings pages print it under and the keys other agents send for it, one mapping with no origin between them. Folded to the form the mapping stores, best-attested first, at most 20."
|
|
163
|
+
},
|
|
164
|
+
"variant_spec": {
|
|
165
|
+
"type": "boolean",
|
|
166
|
+
"const": true,
|
|
167
|
+
"description": "Settles these before searching when the buyer has not said them; expects their values under `variants[]`."
|
|
168
|
+
},
|
|
169
|
+
"product_spec": {
|
|
170
|
+
"type": "boolean",
|
|
171
|
+
"const": true,
|
|
172
|
+
"description": "Writes it into the brief when the buyer names it; never treats two products that differ on it as one."
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"additionalProperties": false
|
|
176
|
+
},
|
|
177
|
+
"description": "Builds predicates with keys the registry holds."
|
|
178
|
+
},
|
|
179
|
+
"seller_specs": {
|
|
180
|
+
"type": "array",
|
|
181
|
+
"items": {
|
|
182
|
+
"type": "object",
|
|
183
|
+
"required": [
|
|
184
|
+
"key",
|
|
185
|
+
"display_name",
|
|
186
|
+
"type",
|
|
187
|
+
"operators"
|
|
188
|
+
],
|
|
189
|
+
"properties": {
|
|
190
|
+
"key": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"minLength": 1,
|
|
193
|
+
"maxLength": 64,
|
|
194
|
+
"description": "Names the key in the Brief and sends it as a `shopping_search` spec key."
|
|
195
|
+
},
|
|
196
|
+
"display_name": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"minLength": 1,
|
|
199
|
+
"maxLength": 128,
|
|
200
|
+
"description": "Calls the key this when it writes it down or says it out loud."
|
|
201
|
+
},
|
|
202
|
+
"description": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"maxLength": 1024,
|
|
205
|
+
"description": "Reads how this one key moves the fit — what it decides, what goes wrong at either end of it, and how a buyer's own fact becomes a value for it. Reason from it; ask from it; never recite it back."
|
|
206
|
+
},
|
|
207
|
+
"type": {
|
|
208
|
+
"anyOf": [
|
|
209
|
+
{
|
|
210
|
+
"type": "string",
|
|
211
|
+
"const": "number"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"type": "string",
|
|
215
|
+
"const": "boolean"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"type": "string",
|
|
219
|
+
"const": "enum"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"type": "string",
|
|
223
|
+
"const": "money"
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
"description": "Types the value the agent sends and reads for this key."
|
|
227
|
+
},
|
|
228
|
+
"unit": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"minLength": 1,
|
|
231
|
+
"description": "States the value in this unit, the one sil holds it in."
|
|
232
|
+
},
|
|
233
|
+
"allowed_values": {
|
|
234
|
+
"type": "array",
|
|
235
|
+
"items": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"minLength": 1
|
|
238
|
+
},
|
|
239
|
+
"minItems": 1,
|
|
240
|
+
"description": "Maps the buyer's word into the closed set; an enum without one takes any name, a maker's for `brand`."
|
|
241
|
+
},
|
|
242
|
+
"operators": {
|
|
243
|
+
"type": "array",
|
|
244
|
+
"items": {
|
|
245
|
+
"anyOf": [
|
|
246
|
+
{
|
|
247
|
+
"type": "string",
|
|
248
|
+
"const": "eq"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"type": "string",
|
|
252
|
+
"const": "neq"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"type": "string",
|
|
256
|
+
"const": "gte"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"type": "string",
|
|
260
|
+
"const": "lte"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"type": "string",
|
|
264
|
+
"const": "in"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"type": "string",
|
|
268
|
+
"const": "nin"
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
"minItems": 1,
|
|
273
|
+
"description": "Picks the comparison that fits: `eq`/`in` on a variant spec and on enums, `gte`/`lte` on numbers and money."
|
|
274
|
+
},
|
|
275
|
+
"step": {
|
|
276
|
+
"type": "number",
|
|
277
|
+
"exclusiveMinimum": 0,
|
|
278
|
+
"description": "Asks on the grid the maker prints the axis in — 0.5 for a Mondopoint size. A figure off the grid is something sil has not read as a value."
|
|
279
|
+
},
|
|
280
|
+
"forms": {
|
|
281
|
+
"type": "object",
|
|
282
|
+
"patternProperties": {
|
|
283
|
+
"^.*$": {
|
|
284
|
+
"type": "string"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"description": "Reads what pages print for a value, mapped to the value — `{\"27/27.5\": \"27.5\"}`. Never sent: the request takes the value, and this is how sil recognises it in the wild."
|
|
288
|
+
},
|
|
289
|
+
"labels": {
|
|
290
|
+
"type": "array",
|
|
291
|
+
"items": {
|
|
292
|
+
"type": "string",
|
|
293
|
+
"minLength": 1,
|
|
294
|
+
"maxLength": 60
|
|
295
|
+
},
|
|
296
|
+
"minItems": 1,
|
|
297
|
+
"maxItems": 20,
|
|
298
|
+
"description": "Sends any of these as the key and reaches this one: the names sil maps here — the headings pages print it under and the keys other agents send for it, one mapping with no origin between them. Folded to the form the mapping stores, best-attested first, at most 20."
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"additionalProperties": false
|
|
302
|
+
},
|
|
303
|
+
"description": "Builds seller rows with keys the registry holds — the base every domain shares and this domain's own branch — and sends them to `shopping_offers`."
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"additionalProperties": false
|
|
307
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-domain-search-request.schema.json",
|
|
4
|
+
"title": "sil shopping_domain_search — request",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"q"
|
|
8
|
+
],
|
|
9
|
+
"properties": {
|
|
10
|
+
"q": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"maxLength": 200,
|
|
14
|
+
"description": "Sends the item in the buyer's own words."
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"additionalProperties": false
|
|
18
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.sil.com/shopping-domain-search-response.schema.json",
|
|
4
|
+
"title": "sil shopping_domain_search — response",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"status",
|
|
8
|
+
"matches",
|
|
9
|
+
"tree"
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"status": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"const": "ok",
|
|
15
|
+
"description": "Reads the answer. Every other status arrives as an error body carrying recovery."
|
|
16
|
+
},
|
|
17
|
+
"matches": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"required": [
|
|
22
|
+
"path",
|
|
23
|
+
"about"
|
|
24
|
+
],
|
|
25
|
+
"properties": {
|
|
26
|
+
"path": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
|
|
29
|
+
"maxLength": 255,
|
|
30
|
+
"description": "Passes it to `shopping_domain_get` and `shopping_search` verbatim."
|
|
31
|
+
},
|
|
32
|
+
"about": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "Judges fit before reading the whole guide: adopts it, or descends under a broader one."
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
},
|
|
39
|
+
"maxItems": 20,
|
|
40
|
+
"description": "Reads what already stands for this domain; an empty list is the one thing that licenses a mint."
|
|
41
|
+
},
|
|
42
|
+
"tree": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"required": [
|
|
47
|
+
"family",
|
|
48
|
+
"domains",
|
|
49
|
+
"paths"
|
|
50
|
+
],
|
|
51
|
+
"properties": {
|
|
52
|
+
"family": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "Reads the family this thing would be shelved in, as a specialist shop would."
|
|
55
|
+
},
|
|
56
|
+
"domains": {
|
|
57
|
+
"type": "integer",
|
|
58
|
+
"description": "Sees how much of the tree already sits under it."
|
|
59
|
+
},
|
|
60
|
+
"paths": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"required": [
|
|
65
|
+
"path",
|
|
66
|
+
"name"
|
|
67
|
+
],
|
|
68
|
+
"properties": {
|
|
69
|
+
"path": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
|
|
72
|
+
"maxLength": 255,
|
|
73
|
+
"description": "Reads it with `shopping_domain_get`, or descends from it."
|
|
74
|
+
},
|
|
75
|
+
"name": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"maxLength": 64,
|
|
78
|
+
"description": "Sees what this leaf already stands for before coining a second one."
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"additionalProperties": false
|
|
82
|
+
},
|
|
83
|
+
"description": "Adopts one of these, or coins a sibling leaf beside them."
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"additionalProperties": false
|
|
87
|
+
},
|
|
88
|
+
"description": "Places a new leaf where a specialist shop would shelve it, and sees that a setup of several things is several leaves: every standing path below the root, by family."
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"additionalProperties": false
|
|
92
|
+
}
|