sil-openclaw 0.5.2 → 0.6.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.
@@ -0,0 +1,172 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.sil.com/shopping-content-response.schema.json",
4
+ "title": "sil shopping_content — response",
5
+ "type": "object",
6
+ "required": [
7
+ "status",
8
+ "tokens",
9
+ "total",
10
+ "passages"
11
+ ],
12
+ "properties": {
13
+ "status": {
14
+ "type": "string",
15
+ "const": "ok",
16
+ "description": "Reads the answer. Every other status arrives as an error body carrying recovery."
17
+ },
18
+ "tokens": {
19
+ "type": "integer",
20
+ "minimum": 0,
21
+ "description": "Reads what the passages cost, in tokens."
22
+ },
23
+ "total": {
24
+ "type": "integer",
25
+ "minimum": 0,
26
+ "description": "Reads how many passages hold a term before the cut — on the line, or in the document read: more than came back means a narrower grep, `kinds` or more `max_passages`."
27
+ },
28
+ "passages": {
29
+ "type": "array",
30
+ "items": {
31
+ "type": "object",
32
+ "required": [
33
+ "id",
34
+ "kind",
35
+ "title",
36
+ "from",
37
+ "role",
38
+ "written",
39
+ "part",
40
+ "of",
41
+ "matched",
42
+ "text"
43
+ ],
44
+ "properties": {
45
+ "id": {
46
+ "type": "string",
47
+ "description": "Names the document, to cite it as sil's."
48
+ },
49
+ "kind": {
50
+ "anyOf": [
51
+ {
52
+ "type": "string",
53
+ "const": "guide"
54
+ },
55
+ {
56
+ "type": "string",
57
+ "const": "tutorial"
58
+ },
59
+ {
60
+ "type": "string",
61
+ "const": "faq"
62
+ },
63
+ {
64
+ "type": "string",
65
+ "const": "glossary"
66
+ },
67
+ {
68
+ "type": "string",
69
+ "const": "review"
70
+ },
71
+ {
72
+ "type": "string",
73
+ "const": "comparison"
74
+ },
75
+ {
76
+ "type": "string",
77
+ "const": "news"
78
+ }
79
+ ],
80
+ "description": "Reads what the document is: a guide, a tutorial, an FAQ, a glossary …"
81
+ },
82
+ "title": {
83
+ "type": "string",
84
+ "description": "Calls the document this when citing it."
85
+ },
86
+ "author": {
87
+ "type": "string",
88
+ "description": "Reads who wrote these words, quoted verbatim from a source sil read: cite them, never as sil's own. Absent, sil wrote them."
89
+ },
90
+ "url": {
91
+ "type": "string",
92
+ "description": "Reads where the author's text was read, to hand the buyer."
93
+ },
94
+ "from": {
95
+ "type": "string",
96
+ "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
97
+ "maxLength": 255,
98
+ "description": "Reads the node the document is written for."
99
+ },
100
+ "role": {
101
+ "anyOf": [
102
+ {
103
+ "type": "string",
104
+ "const": "root"
105
+ },
106
+ {
107
+ "type": "string",
108
+ "const": "top"
109
+ },
110
+ {
111
+ "type": "string",
112
+ "const": "domain"
113
+ },
114
+ {
115
+ "type": "string",
116
+ "const": "shelf"
117
+ },
118
+ {
119
+ "type": "string",
120
+ "const": "kind"
121
+ },
122
+ {
123
+ "type": "string",
124
+ "const": "leaf"
125
+ }
126
+ ],
127
+ "description": "Reads what that node is: the root, a top, a domain, a shelf, a kind or a leaf."
128
+ },
129
+ "written": {
130
+ "type": "string",
131
+ "format": "date",
132
+ "description": "Dates the document."
133
+ },
134
+ "heading": {
135
+ "type": "string",
136
+ "description": "Reads the heading the passage sits under; absent, it has none."
137
+ },
138
+ "part": {
139
+ "type": "integer",
140
+ "minimum": 1,
141
+ "description": "Reads where the passage sits in its document, to read on from it."
142
+ },
143
+ "of": {
144
+ "type": "integer",
145
+ "minimum": 1,
146
+ "description": "Reads how many parts its document has."
147
+ },
148
+ "matched": {
149
+ "type": "array",
150
+ "items": {
151
+ "type": "string"
152
+ },
153
+ "description": "Reads which of the asked terms the passage holds. Empty: none — it fills the minimum from the nearest documents and answers no word of the ask."
154
+ },
155
+ "text": {
156
+ "type": "string",
157
+ "description": "Reads the passage whole, or cut where `truncated`."
158
+ },
159
+ "truncated": {
160
+ "type": "boolean",
161
+ "const": true,
162
+ "description": "Reads that the budget cut the passage short here."
163
+ }
164
+ },
165
+ "additionalProperties": false
166
+ },
167
+ "maxItems": 20,
168
+ "description": "Reads sil's passages for the terms, best first: every term, then more terms, then the densest, the nearer node breaking a tie. Empty: nothing sil holds here answers; say so, never the open web."
169
+ }
170
+ },
171
+ "additionalProperties": false
172
+ }
@@ -11,7 +11,7 @@
11
11
  "type": "string",
12
12
  "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
13
13
  "maxLength": 255,
14
- "description": "Sends one standing path. A path that does not stand answers `not_found`; the root `product` always stands."
14
+ "description": "Sends a leaf `shopping_domain_search` answered, or a kind to list its leaves. One that does not stand answers `not_found`; a shelf, domain or top answers `not_a_leaf` naming leaves under it; an area sil does not carry yet answers `not_carried`."
15
15
  }
16
16
  },
17
17
  "additionalProperties": false
@@ -6,11 +6,14 @@
6
6
  "required": [
7
7
  "status",
8
8
  "path",
9
- "guide",
10
9
  "name",
11
10
  "labels",
12
11
  "specs",
13
- "seller_specs"
12
+ "seller_specs",
13
+ "reach",
14
+ "kinds",
15
+ "parts",
16
+ "made_for"
14
17
  ],
15
18
  "properties": {
16
19
  "status": {
@@ -22,10 +25,6 @@
22
25
  "type": "string",
23
26
  "description": "Sends it verbatim as `shopping_search.domain`."
24
27
  },
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
28
  "name": {
30
29
  "type": "string",
31
30
  "maxLength": 64,
@@ -38,7 +37,7 @@
38
37
  "maxLength": 64
39
38
  },
40
39
  "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."
40
+ "description": "Reads every other word for the thing — the market's own English, folded to the form sil maps under. sil asks each index in them; the agent never sends them."
42
41
  },
43
42
  "specs": {
44
43
  "type": "array",
@@ -170,6 +169,11 @@
170
169
  "type": "boolean",
171
170
  "const": true,
172
171
  "description": "Writes it into the brief when the buyer names it; never treats two products that differ on it as one."
172
+ },
173
+ "several": {
174
+ "type": "boolean",
175
+ "const": true,
176
+ "description": "Reads a list for it under `fit`: a product holds several of these at once. `eq`/`in` match a product holding any value asked; `neq`/`nin` one holding none of them."
173
177
  }
174
178
  },
175
179
  "additionalProperties": false
@@ -301,6 +305,228 @@
301
305
  "additionalProperties": false
302
306
  },
303
307
  "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`."
308
+ },
309
+ "reach": {
310
+ "type": "array",
311
+ "items": {
312
+ "type": "object",
313
+ "required": [
314
+ "from",
315
+ "via",
316
+ "keys"
317
+ ],
318
+ "properties": {
319
+ "from": {
320
+ "type": "string",
321
+ "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
322
+ "maxLength": 255,
323
+ "description": "Reads the node that declares these keys: this one, or a kind it is."
324
+ },
325
+ "via": {
326
+ "anyOf": [
327
+ {
328
+ "type": "string",
329
+ "const": "own"
330
+ },
331
+ {
332
+ "type": "string",
333
+ "const": "kind"
334
+ },
335
+ {
336
+ "type": "string",
337
+ "const": "part"
338
+ }
339
+ ],
340
+ "description": "Reads how: the node's own list, a kind it is, or what one of its parts' links says."
341
+ },
342
+ "part": {
343
+ "type": "string",
344
+ "description": "Names the part, where `via` is one."
345
+ },
346
+ "keys": {
347
+ "type": "array",
348
+ "items": {
349
+ "type": "string",
350
+ "minLength": 1,
351
+ "maxLength": 64
352
+ },
353
+ "description": "Reads the keys, in the order the node lists them."
354
+ }
355
+ },
356
+ "additionalProperties": false
357
+ },
358
+ "description": "Reads where each key comes from: this node, a kind it is, or a link to a part."
359
+ },
360
+ "kinds": {
361
+ "type": "array",
362
+ "items": {
363
+ "type": "object",
364
+ "required": [
365
+ "path",
366
+ "name"
367
+ ],
368
+ "properties": {
369
+ "path": {
370
+ "type": "string",
371
+ "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
372
+ "maxLength": 255,
373
+ "description": "Reads the kind on its own node."
374
+ },
375
+ "name": {
376
+ "type": "string",
377
+ "maxLength": 64,
378
+ "description": "Calls the kind this."
379
+ }
380
+ },
381
+ "additionalProperties": false
382
+ },
383
+ "description": "Reads every kind this thing is, nearest first; it takes each one's keys."
384
+ },
385
+ "parts": {
386
+ "type": "array",
387
+ "items": {
388
+ "type": "object",
389
+ "required": [
390
+ "name",
391
+ "how",
392
+ "optional",
393
+ "many",
394
+ "keys"
395
+ ],
396
+ "properties": {
397
+ "name": {
398
+ "type": "string",
399
+ "description": "Calls the part this."
400
+ },
401
+ "role": {
402
+ "type": "string",
403
+ "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
404
+ "maxLength": 255,
405
+ "description": "Reads the node any thing that fills this part is."
406
+ },
407
+ "elsewhere": {
408
+ "type": "string",
409
+ "description": "Reads the part in plain words, where no node draws it yet."
410
+ },
411
+ "how": {
412
+ "type": "array",
413
+ "items": {
414
+ "anyOf": [
415
+ {
416
+ "type": "string",
417
+ "const": "built in"
418
+ },
419
+ {
420
+ "type": "string",
421
+ "const": "in the box"
422
+ },
423
+ {
424
+ "type": "string",
425
+ "const": "sold separately"
426
+ },
427
+ {
428
+ "type": "string",
429
+ "const": "used with"
430
+ }
431
+ ]
432
+ },
433
+ "description": "Knows whether the part is built in, in the box, bought apart or used with it."
434
+ },
435
+ "optional": {
436
+ "type": "boolean",
437
+ "description": "Knows whether some of these things come without it."
438
+ },
439
+ "many": {
440
+ "type": "boolean",
441
+ "description": "Knows whether the thing has several of the part."
442
+ },
443
+ "keys": {
444
+ "type": "array",
445
+ "items": {
446
+ "type": "string",
447
+ "minLength": 1,
448
+ "maxLength": 64
449
+ },
450
+ "description": "Reads the keys the link says about the part, here."
451
+ }
452
+ },
453
+ "additionalProperties": false
454
+ },
455
+ "description": "Reads what the thing has, and the keys each part is bought on."
456
+ },
457
+ "made_for": {
458
+ "type": "array",
459
+ "items": {
460
+ "anyOf": [
461
+ {
462
+ "type": "object",
463
+ "required": [
464
+ "path"
465
+ ],
466
+ "properties": {
467
+ "path": {
468
+ "type": "string",
469
+ "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
470
+ "maxLength": 255,
471
+ "description": "Reads the node this part or consumable is made for."
472
+ }
473
+ },
474
+ "additionalProperties": false
475
+ },
476
+ {
477
+ "type": "object",
478
+ "required": [
479
+ "elsewhere"
480
+ ],
481
+ "properties": {
482
+ "elsewhere": {
483
+ "type": "string",
484
+ "description": "Reads what it is made for in plain words, where no node draws it yet."
485
+ }
486
+ },
487
+ "additionalProperties": false
488
+ }
489
+ ]
490
+ },
491
+ "description": "Reads what this part or consumable is made for, where it is one."
492
+ },
493
+ "leaves": {
494
+ "type": "array",
495
+ "items": {
496
+ "type": "object",
497
+ "required": [
498
+ "path",
499
+ "name"
500
+ ],
501
+ "properties": {
502
+ "path": {
503
+ "type": "string",
504
+ "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
505
+ "maxLength": 255,
506
+ "description": "Sends the leaf to `shopping_domain_get` and `shopping_search`."
507
+ },
508
+ "name": {
509
+ "type": "string",
510
+ "maxLength": 64,
511
+ "description": "Calls the leaf this."
512
+ }
513
+ },
514
+ "additionalProperties": false
515
+ },
516
+ "description": "On a kind: every leaf under it, to pick the one the buyer means. A kind’s own specs are served too, but a search runs on a leaf."
517
+ },
518
+ "record": {
519
+ "anyOf": [
520
+ {
521
+ "type": "string",
522
+ "const": "full"
523
+ },
524
+ {
525
+ "type": "string",
526
+ "const": "specs"
527
+ }
528
+ ],
529
+ "description": "On a leaf: how its products are bought. `specs` — on their measures alone; `full` — on their measures and their record: purpose, story, pros and cons, for and not for."
304
530
  }
305
531
  },
306
532
  "additionalProperties": false
@@ -11,7 +11,7 @@
11
11
  "type": "string",
12
12
  "minLength": 1,
13
13
  "maxLength": 200,
14
- "description": "Sends the item in the buyer's own words."
14
+ "description": "Sends what the thing is called, in English — translate the buyer first."
15
15
  }
16
16
  },
17
17
  "additionalProperties": false
@@ -5,8 +5,7 @@
5
5
  "type": "object",
6
6
  "required": [
7
7
  "status",
8
- "matches",
9
- "tree"
8
+ "matches"
10
9
  ],
11
10
  "properties": {
12
11
  "status": {
@@ -20,72 +19,78 @@
20
19
  "type": "object",
21
20
  "required": [
22
21
  "path",
23
- "about"
22
+ "name",
23
+ "matched",
24
+ "under"
24
25
  ],
25
26
  "properties": {
26
27
  "path": {
27
28
  "type": "string",
28
29
  "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
29
30
  "maxLength": 255,
30
- "description": "Passes it to `shopping_domain_get` and `shopping_search` verbatim."
31
+ "description": "Passes the leaf to `shopping_domain_get` and `shopping_search` verbatim."
31
32
  },
32
- "about": {
33
+ "name": {
33
34
  "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."
35
+ "maxLength": 64,
36
+ "description": "Calls the leaf this."
55
37
  },
56
- "domains": {
57
- "type": "integer",
58
- "description": "Sees how much of the tree already sits under it."
38
+ "matched": {
39
+ "type": "string",
40
+ "description": "Reads which of sil's words for it the ask matched."
59
41
  },
60
- "paths": {
42
+ "under": {
61
43
  "type": "array",
62
44
  "items": {
63
45
  "type": "object",
64
46
  "required": [
65
47
  "path",
66
- "name"
48
+ "name",
49
+ "role"
67
50
  ],
68
51
  "properties": {
69
52
  "path": {
70
53
  "type": "string",
71
54
  "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
72
55
  "maxLength": 255,
73
- "description": "Reads it with `shopping_domain_get`, or descends from it."
56
+ "description": "Names the place the leaf sits under."
74
57
  },
75
58
  "name": {
76
59
  "type": "string",
77
60
  "maxLength": 64,
78
- "description": "Sees what this leaf already stands for before coining a second one."
61
+ "description": "Calls the place this."
62
+ },
63
+ "role": {
64
+ "anyOf": [
65
+ {
66
+ "type": "string",
67
+ "const": "top"
68
+ },
69
+ {
70
+ "type": "string",
71
+ "const": "domain"
72
+ },
73
+ {
74
+ "type": "string",
75
+ "const": "shelf"
76
+ },
77
+ {
78
+ "type": "string",
79
+ "const": "kind"
80
+ }
81
+ ],
82
+ "description": "Reads what the place is: a top, a domain, a shelf or a kind."
79
83
  }
80
84
  },
81
85
  "additionalProperties": false
82
86
  },
83
- "description": "Adopts one of these, or coins a sibling leaf beside them."
87
+ "description": "Reads every place above the leaf, outermost first and its parent last, to judge whether this is the thing the buyer means."
84
88
  }
85
89
  },
86
90
  "additionalProperties": false
87
91
  },
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."
92
+ "maxItems": 3,
93
+ "description": "Reads the most relevant leaves for these words and judges which, if any, is the buyer’s thing. Empty: sil holds no such leaf; say so, or rephrase with what the thing is called."
89
94
  }
90
95
  },
91
96
  "additionalProperties": false
@@ -63,6 +63,12 @@
63
63
  },
64
64
  {
65
65
  "type": "string"
66
+ },
67
+ {
68
+ "type": "array",
69
+ "items": {
70
+ "type": "string"
71
+ }
66
72
  }
67
73
  ]
68
74
  }
@@ -20,7 +20,7 @@
20
20
  "type": "string",
21
21
  "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)*$",
22
22
  "maxLength": 255,
23
- "description": "Sends the path the domain read returned."
23
+ "description": "Sends a leaf the domain search answered. A kind, shelf, domain or top answers `not_a_leaf`, naming leaves to pick."
24
24
  },
25
25
  "query": {
26
26
  "type": "string",
@@ -56,6 +56,12 @@
56
56
  },
57
57
  {
58
58
  "type": "string"
59
+ },
60
+ {
61
+ "type": "array",
62
+ "items": {
63
+ "type": "string"
64
+ }
59
65
  }
60
66
  ]
61
67
  }