@altnovatrail/widgets 0.2.1 → 0.3.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/README.md +1 -1
- package/cores/vector.schema.json +22 -1
- package/kinds/cards/cards.handles.json +109 -0
- package/kinds/cards/cards.schema.json +483 -0
- package/kinds/cards/vectors/any.json +255 -0
- package/kinds/cards/vectors/box.json +325 -0
- package/kinds/cards/vectors/fork-taps.json +305 -0
- package/kinds/cards/vectors/fork.json +254 -0
- package/kinds/cards/vectors/invalid-goal.json +70 -0
- package/kinds/cards/vectors/invalid-ids.json +113 -0
- package/kinds/cards/vectors/invalid-schema.json +88 -0
- package/kinds/cards/vectors/invalid-taps.json +214 -0
- package/kinds/cards/vectors/key.json +264 -0
- package/kinds/cards/vectors/limit.json +274 -0
- package/kinds/cards/vectors/no-goal.json +205 -0
- package/kinds/cards/vectors/none.json +239 -0
- package/kinds/cards/vectors/recog.json +113 -0
- package/kinds/cards/vectors/riddle.json +397 -0
- package/kinds/cards/vectors/solo.json +218 -0
- package/kinds/cells/cells.schema.json +17 -2
- package/kinds/line/line.schema.json +17 -2
- package/lib/cores/kind.d.ts +21 -3
- package/lib/cores/search.d.ts +22 -6
- package/lib/cores/search.js +34 -6
- package/lib/kinds/cards/goal.d.ts +25 -0
- package/lib/kinds/cards/goal.js +72 -0
- package/lib/kinds/cards/index.d.ts +14 -0
- package/lib/kinds/cards/index.js +17 -0
- package/lib/kinds/cards/kind.d.ts +23 -0
- package/lib/kinds/cards/kind.js +101 -0
- package/lib/kinds/cards/parts.d.ts +36 -0
- package/lib/kinds/cards/parts.js +34 -0
- package/lib/kinds/cards/scene.d.ts +102 -0
- package/lib/kinds/cards/scene.js +356 -0
- package/lib/kinds/cards/schema.d.ts +10 -0
- package/lib/kinds/cards/schema.js +285 -0
- package/lib/kinds/cells/registry.js +1 -1
- package/lib/kinds/cells/schema.js +3 -1
- package/lib/kinds/line/registry.js +1 -1
- package/lib/kinds/line/schema.js +3 -1
- package/package.json +8 -3
- package/cores/handles.schema.json +0 -63
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { maxCards, maxColumns, maxGroups, maxJoined, maxLabel, maxOptions, maxSigns, maxText, maxValues, nameId, partId, } from "./scene.js";
|
|
2
|
+
/** The version of the kind's schema: a new member a scene may give is its next minor version. */
|
|
3
|
+
export const version = "1.0";
|
|
4
|
+
/** The $id of the kind's schema at a version: a name, which need not resolve. */
|
|
5
|
+
export function schemaId(at) {
|
|
6
|
+
return `https://altnovatrail.github.io/widgets/kinds/cards/${at}/cards.schema.json`;
|
|
7
|
+
}
|
|
8
|
+
const label = (description, max = maxLabel) => ({
|
|
9
|
+
description,
|
|
10
|
+
type: "string",
|
|
11
|
+
minLength: 1,
|
|
12
|
+
maxLength: max,
|
|
13
|
+
});
|
|
14
|
+
const groupIds = (description) => ({
|
|
15
|
+
description,
|
|
16
|
+
type: "array",
|
|
17
|
+
items: { description: "A group, by its ID.", $ref: "#/$defs/id" },
|
|
18
|
+
minItems: 1,
|
|
19
|
+
maxItems: maxGroups,
|
|
20
|
+
uniqueItems: true,
|
|
21
|
+
});
|
|
22
|
+
const sign = (description) => ({ description, $ref: "#/$defs/name" });
|
|
23
|
+
/** A sign and one of its values, as a literal of a condition and a column of the table give them. */
|
|
24
|
+
const literal = (what) => [
|
|
25
|
+
{
|
|
26
|
+
description: `${what} where a card gives the sign this value.`,
|
|
27
|
+
properties: {
|
|
28
|
+
sign: sign("The sign, by its ID."),
|
|
29
|
+
is: { description: "The value, by its ID.", $ref: "#/$defs/name" },
|
|
30
|
+
},
|
|
31
|
+
required: ["sign", "is"],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
description: `${what} where a card gives the sign any value but this one.`,
|
|
35
|
+
properties: {
|
|
36
|
+
sign: sign("The sign, by its ID."),
|
|
37
|
+
not: { description: "The value, by its ID.", $ref: "#/$defs/name" },
|
|
38
|
+
},
|
|
39
|
+
required: ["sign", "not"],
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
const joined = (join, description) => ({
|
|
43
|
+
description,
|
|
44
|
+
properties: {
|
|
45
|
+
[join]: {
|
|
46
|
+
description: "The conditions joined.",
|
|
47
|
+
type: "array",
|
|
48
|
+
items: {
|
|
49
|
+
description: "A condition.",
|
|
50
|
+
$ref: "#/$defs/condition",
|
|
51
|
+
unevaluatedProperties: false,
|
|
52
|
+
},
|
|
53
|
+
minItems: 1,
|
|
54
|
+
maxItems: maxJoined,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
required: [join],
|
|
58
|
+
});
|
|
59
|
+
export function cardsSchema() {
|
|
60
|
+
return {
|
|
61
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
62
|
+
$id: schemaId(version),
|
|
63
|
+
title: "A scene of the widget kind cards",
|
|
64
|
+
description: "Cards in groups, each giving a value to every sign the scene names; options to choose among; how a tap chooses; a table of signs, its rows the cards and its columns conditions of signs; and at most one goal, whose answer is the cards that meet it. Under $defs, a move and a state of the kind, and the form of a scene's key.",
|
|
65
|
+
type: "object",
|
|
66
|
+
properties: {
|
|
67
|
+
signs: {
|
|
68
|
+
description: "The signs the cards give values to, each with its values: a colour, a pattern, eyes, a hat, or any other the scene names.",
|
|
69
|
+
type: "array",
|
|
70
|
+
items: {
|
|
71
|
+
description: "A sign.",
|
|
72
|
+
$ref: "#/$defs/sign",
|
|
73
|
+
unevaluatedProperties: false,
|
|
74
|
+
},
|
|
75
|
+
minItems: 1,
|
|
76
|
+
maxItems: maxSigns,
|
|
77
|
+
},
|
|
78
|
+
groups: {
|
|
79
|
+
description: "The groups of cards, in the order they are drawn: the examples a goal learns from, the cards to choose among, the cards to mark with the pen.",
|
|
80
|
+
type: "array",
|
|
81
|
+
items: {
|
|
82
|
+
description: "A group.",
|
|
83
|
+
$ref: "#/$defs/group",
|
|
84
|
+
unevaluatedProperties: false,
|
|
85
|
+
},
|
|
86
|
+
minItems: 1,
|
|
87
|
+
maxItems: maxGroups,
|
|
88
|
+
},
|
|
89
|
+
options: {
|
|
90
|
+
description: "Options to choose among that are no cards, each a label, as an answer that the learner does not know yet; a tap chooses them wherever the scene lets a tap choose.",
|
|
91
|
+
type: "array",
|
|
92
|
+
items: {
|
|
93
|
+
description: "An option.",
|
|
94
|
+
type: "object",
|
|
95
|
+
properties: {
|
|
96
|
+
id: { description: "The option's ID, its part's.", $ref: "#/$defs/id" },
|
|
97
|
+
label: label("The option's words."),
|
|
98
|
+
},
|
|
99
|
+
required: ["id", "label"],
|
|
100
|
+
unevaluatedProperties: false,
|
|
101
|
+
},
|
|
102
|
+
minItems: 1,
|
|
103
|
+
maxItems: maxOptions,
|
|
104
|
+
},
|
|
105
|
+
choose: {
|
|
106
|
+
description: "How a tap chooses, where it does: none where left out, a scene only to look at and mark with the pen.",
|
|
107
|
+
type: "object",
|
|
108
|
+
properties: {
|
|
109
|
+
many: {
|
|
110
|
+
description: "Whether a tap adds to what is chosen; where false or left out, a tap chooses one and lets the one before go.",
|
|
111
|
+
type: "boolean",
|
|
112
|
+
},
|
|
113
|
+
from: groupIds("The groups whose cards a tap chooses; every group where left out. The options are chosen whatever it names."),
|
|
114
|
+
},
|
|
115
|
+
unevaluatedProperties: false,
|
|
116
|
+
},
|
|
117
|
+
table: {
|
|
118
|
+
description: "The table of signs: a row for each card of the groups named, a column for each condition, and an empty cell where they cross, for the pen to tick or cross. A tap fills no cell.",
|
|
119
|
+
type: "object",
|
|
120
|
+
properties: {
|
|
121
|
+
rows: groupIds("The groups whose cards are the rows; every group where left out."),
|
|
122
|
+
columns: {
|
|
123
|
+
description: "The columns, in order.",
|
|
124
|
+
type: "array",
|
|
125
|
+
items: {
|
|
126
|
+
description: "A column: its ID, its heading and the condition it asks of a card.",
|
|
127
|
+
type: "object",
|
|
128
|
+
properties: {
|
|
129
|
+
id: { description: "The column's ID.", $ref: "#/$defs/name" },
|
|
130
|
+
label: label("The column's heading, as horns or no hat."),
|
|
131
|
+
},
|
|
132
|
+
required: ["id", "label"],
|
|
133
|
+
oneOf: literal("A column that holds"),
|
|
134
|
+
unevaluatedProperties: false,
|
|
135
|
+
},
|
|
136
|
+
minItems: 1,
|
|
137
|
+
maxItems: maxColumns,
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
required: ["columns"],
|
|
141
|
+
unevaluatedProperties: false,
|
|
142
|
+
},
|
|
143
|
+
goal: {
|
|
144
|
+
description: "What a card is to meet, over the cards of the groups it ranges over: a condition of signs, the values every card of a group shares, or a difference from every other card by the signs named. The answer is the cards that meet it, and a state meets the goal where it holds them chosen.",
|
|
145
|
+
type: "object",
|
|
146
|
+
properties: {
|
|
147
|
+
signs: {
|
|
148
|
+
description: "A condition of signs, which a card meets.",
|
|
149
|
+
$ref: "#/$defs/condition",
|
|
150
|
+
unevaluatedProperties: false,
|
|
151
|
+
},
|
|
152
|
+
like: {
|
|
153
|
+
description: "A group, by its ID, whose cards' shared values a card must give, every one: the group teaches its rule by example.",
|
|
154
|
+
$ref: "#/$defs/id",
|
|
155
|
+
},
|
|
156
|
+
differs: {
|
|
157
|
+
description: "The signs a card must differ by from every other card of the range, at least one of them for each other card: the odd one out by those signs, the others left out.",
|
|
158
|
+
type: "array",
|
|
159
|
+
items: sign("A sign, by its ID."),
|
|
160
|
+
minItems: 1,
|
|
161
|
+
maxItems: maxSigns,
|
|
162
|
+
uniqueItems: true,
|
|
163
|
+
},
|
|
164
|
+
among: groupIds("The groups whose cards the goal ranges over; where left out, every group but the one it learns from."),
|
|
165
|
+
},
|
|
166
|
+
oneOf: ["signs", "like", "differs"].map((form) => ({
|
|
167
|
+
description: `A goal of the form ${form}.`,
|
|
168
|
+
properties: { [form]: { description: `The goal's ${form}.` } },
|
|
169
|
+
required: [form],
|
|
170
|
+
})),
|
|
171
|
+
unevaluatedProperties: false,
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
required: ["signs", "groups"],
|
|
175
|
+
unevaluatedProperties: false,
|
|
176
|
+
$defs: {
|
|
177
|
+
id: {
|
|
178
|
+
description: "The ID of a card, a group or an option, the ID of its part: each once in the scene.",
|
|
179
|
+
type: "string",
|
|
180
|
+
pattern: partId.source,
|
|
181
|
+
},
|
|
182
|
+
name: {
|
|
183
|
+
description: "The ID of a sign, a value or a column, in kebab-case.",
|
|
184
|
+
type: "string",
|
|
185
|
+
pattern: nameId.source,
|
|
186
|
+
},
|
|
187
|
+
sign: {
|
|
188
|
+
description: "A sign, its label and its values.",
|
|
189
|
+
type: "object",
|
|
190
|
+
properties: {
|
|
191
|
+
id: { description: "The sign's ID, each once in the scene.", $ref: "#/$defs/name" },
|
|
192
|
+
label: label("The sign's name, as colour."),
|
|
193
|
+
values: {
|
|
194
|
+
description: "The values a card may give the sign.",
|
|
195
|
+
type: "array",
|
|
196
|
+
items: {
|
|
197
|
+
description: "A value.",
|
|
198
|
+
type: "object",
|
|
199
|
+
properties: {
|
|
200
|
+
id: { description: "The value's ID, each once in its sign.", $ref: "#/$defs/name" },
|
|
201
|
+
label: label("The value's words, as blue or two eyes."),
|
|
202
|
+
},
|
|
203
|
+
required: ["id", "label"],
|
|
204
|
+
unevaluatedProperties: false,
|
|
205
|
+
},
|
|
206
|
+
minItems: 1,
|
|
207
|
+
maxItems: maxValues,
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
required: ["id", "label", "values"],
|
|
211
|
+
},
|
|
212
|
+
card: {
|
|
213
|
+
description: "A card: a creature drawn from its signs, or the card of a task, its statement's text.",
|
|
214
|
+
type: "object",
|
|
215
|
+
properties: {
|
|
216
|
+
id: { description: "The card's ID, its part's.", $ref: "#/$defs/id" },
|
|
217
|
+
text: label("The statement of a task, drawn in place of a creature.", maxText),
|
|
218
|
+
signs: {
|
|
219
|
+
description: "The value the card gives each sign of the scene, every one, by its ID.",
|
|
220
|
+
type: "object",
|
|
221
|
+
propertyNames: { description: "A sign's ID.", $ref: "#/$defs/name" },
|
|
222
|
+
additionalProperties: { description: "The value's ID.", $ref: "#/$defs/name" },
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
required: ["id", "signs"],
|
|
226
|
+
},
|
|
227
|
+
group: {
|
|
228
|
+
description: "A group of cards, with its heading where it has one.",
|
|
229
|
+
type: "object",
|
|
230
|
+
properties: {
|
|
231
|
+
id: { description: "The group's ID, its part's.", $ref: "#/$defs/id" },
|
|
232
|
+
label: label("The group's heading, as Bips."),
|
|
233
|
+
cards: {
|
|
234
|
+
description: "The group's cards, in the order they are drawn.",
|
|
235
|
+
type: "array",
|
|
236
|
+
items: {
|
|
237
|
+
description: "A card.",
|
|
238
|
+
$ref: "#/$defs/card",
|
|
239
|
+
unevaluatedProperties: false,
|
|
240
|
+
},
|
|
241
|
+
minItems: 1,
|
|
242
|
+
maxItems: maxCards,
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
required: ["id", "cards"],
|
|
246
|
+
},
|
|
247
|
+
condition: {
|
|
248
|
+
description: "A condition of signs: a sign has a value, or any other; or conditions joined, all of them or any.",
|
|
249
|
+
type: "object",
|
|
250
|
+
oneOf: [
|
|
251
|
+
...literal("A literal that holds"),
|
|
252
|
+
joined("all", "Every condition holds."),
|
|
253
|
+
joined("any", "At least one condition holds."),
|
|
254
|
+
],
|
|
255
|
+
},
|
|
256
|
+
move: {
|
|
257
|
+
description: "A tap on a card or an option, by its ID.",
|
|
258
|
+
type: "object",
|
|
259
|
+
properties: {
|
|
260
|
+
choose: { description: "The card or the option, by its ID.", $ref: "#/$defs/id" },
|
|
261
|
+
},
|
|
262
|
+
required: ["choose"],
|
|
263
|
+
},
|
|
264
|
+
state: {
|
|
265
|
+
description: "What is chosen.",
|
|
266
|
+
type: "object",
|
|
267
|
+
properties: {
|
|
268
|
+
chosen: {
|
|
269
|
+
description: "The cards and options chosen, by their IDs sorted by UTF-16 code units.",
|
|
270
|
+
type: "array",
|
|
271
|
+
items: { description: "A card or an option, by its ID.", $ref: "#/$defs/id" },
|
|
272
|
+
uniqueItems: true,
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
required: ["chosen"],
|
|
276
|
+
},
|
|
277
|
+
key: {
|
|
278
|
+
description: "The key of a scene, the form of the kind solver's proof: the IDs of the cards that meet the goal, sorted by UTF-16 code units, each once; none where no card meets it.",
|
|
279
|
+
type: "array",
|
|
280
|
+
items: { description: "A card, by its ID.", $ref: "#/$defs/id" },
|
|
281
|
+
uniqueItems: true,
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
};
|
|
285
|
+
}
|
|
@@ -17,7 +17,7 @@ import { sieve, sieveLeast } from "./sieve.js";
|
|
|
17
17
|
import { step, stepOn, stepReach } from "./step.js";
|
|
18
18
|
import { mirrorSymmetric, quarterTurnSymmetric } from "./symmetric.js";
|
|
19
19
|
export const registry = {
|
|
20
|
-
version: "3.
|
|
20
|
+
version: "3.2",
|
|
21
21
|
operations: [fold, paint, step, knight, bishop, paper, counter, sieve, path, cut, polyomino],
|
|
22
22
|
goals: [
|
|
23
23
|
allPainted,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { searchKeySchema } from "../../cores/search.js";
|
|
1
2
|
import { cellPattern, colors, maxFirst, maxSide } from "./sheet.js";
|
|
2
3
|
import { nodePattern, sidePattern } from "./side.js";
|
|
3
4
|
/** The $id of the kind's schema at a version: a name, which need not resolve. */
|
|
@@ -40,7 +41,7 @@ export function cellsSchema(registry) {
|
|
|
40
41
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
41
42
|
$id: schemaId(registry.version),
|
|
42
43
|
title: "A scene of the widget kind cells",
|
|
43
|
-
description: "A sheet of cells, the operations a learner may play on it with their parameters, and at most one goal a state may meet. Under $defs, a move and a state of the kind.",
|
|
44
|
+
description: "A sheet of cells, the operations a learner may play on it with their parameters, and at most one goal a state may meet. Under $defs, a move and a state of the kind, and the form of a scene's key.",
|
|
44
45
|
type: "object",
|
|
45
46
|
properties: {
|
|
46
47
|
sheet: {
|
|
@@ -174,6 +175,7 @@ export function cellsSchema(registry) {
|
|
|
174
175
|
properties: state,
|
|
175
176
|
required: ["marks"],
|
|
176
177
|
},
|
|
178
|
+
key: searchKeySchema,
|
|
177
179
|
},
|
|
178
180
|
};
|
|
179
181
|
}
|
package/lib/kinds/line/schema.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { searchKeySchema } from "../../cores/search.js";
|
|
1
2
|
import { maxNumber, maxPlaces, maxSpacing } from "./line.js";
|
|
2
3
|
import { lineCounters } from "./posts.js";
|
|
3
4
|
/** The $id of the kind's schema at a version: a name, which need not resolve. */
|
|
@@ -36,7 +37,7 @@ export function lineSchema(registry) {
|
|
|
36
37
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
37
38
|
$id: schemaId(registry.version),
|
|
38
39
|
title: "A scene of the widget kind line",
|
|
39
|
-
description: "A line of places, the operations a learner may play on it with their parameters, and at most one goal a state may meet. Under $defs, a move and a state of the kind.",
|
|
40
|
+
description: "A line of places, the operations a learner may play on it with their parameters, and at most one goal a state may meet. Under $defs, a move and a state of the kind, and the form of a scene's key.",
|
|
40
41
|
type: "object",
|
|
41
42
|
properties: {
|
|
42
43
|
line: {
|
|
@@ -152,6 +153,7 @@ export function lineSchema(registry) {
|
|
|
152
153
|
properties: state,
|
|
153
154
|
required: ["posts"],
|
|
154
155
|
},
|
|
156
|
+
key: searchKeySchema,
|
|
155
157
|
},
|
|
156
158
|
};
|
|
157
159
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@altnovatrail/widgets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "NovaTrail's widget kinds: each kind's rules and solver over its states, and the shell they share.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"lib",
|
|
13
13
|
"cores/vector.schema.json",
|
|
14
|
-
"cores/handles.schema.json",
|
|
15
14
|
"kinds/*/*.schema.json",
|
|
16
15
|
"kinds/*/*.handles.json",
|
|
17
16
|
"kinds/*/vectors/*.json"
|
|
@@ -39,7 +38,13 @@
|
|
|
39
38
|
"default": "./lib/cores/random.js"
|
|
40
39
|
},
|
|
41
40
|
"./cores/vector.schema.json": "./cores/vector.schema.json",
|
|
42
|
-
"./
|
|
41
|
+
"./kinds/cards": {
|
|
42
|
+
"types": "./lib/kinds/cards/index.d.ts",
|
|
43
|
+
"default": "./lib/kinds/cards/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./kinds/cards/cards.schema.json": "./kinds/cards/cards.schema.json",
|
|
46
|
+
"./kinds/cards/cards.handles.json": "./kinds/cards/cards.handles.json",
|
|
47
|
+
"./kinds/cards/vectors/*": "./kinds/cards/vectors/*",
|
|
43
48
|
"./kinds/cells": {
|
|
44
49
|
"types": "./lib/kinds/cells/index.d.ts",
|
|
45
50
|
"default": "./lib/kinds/cells/index.js"
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://altnovatrail.github.io/widgets/cores/1.0/handles.schema.json",
|
|
4
|
-
"title": "The handles of a widget",
|
|
5
|
-
"description": "The handles an AI may call on a widget, each in the form of a tool of the Model Context Protocol — its name, its description for the model and the JSON Schema of its arguments — with its class of rights. The shell's file lists the handles every kind gets; a kind's file lists the shell's and its own, and the module package carries it with the bundle, so that the server offers the model only the classes the mode and the place allow.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"handles": {
|
|
9
|
-
"description": "The handles, each name given once.",
|
|
10
|
-
"type": "array",
|
|
11
|
-
"items": {
|
|
12
|
-
"description": "A handle.",
|
|
13
|
-
"$ref": "#/$defs/handle",
|
|
14
|
-
"unevaluatedProperties": false
|
|
15
|
-
},
|
|
16
|
-
"minItems": 1
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"required": ["handles"],
|
|
20
|
-
"unevaluatedProperties": false,
|
|
21
|
-
"$defs": {
|
|
22
|
-
"handle": {
|
|
23
|
-
"description": "A handle: a tool of the Model Context Protocol by its members name, description and inputSchema, and its class.",
|
|
24
|
-
"type": "object",
|
|
25
|
-
"properties": {
|
|
26
|
-
"name": {
|
|
27
|
-
"description": "The handle's name in snake_case, which a call names.",
|
|
28
|
-
"type": "string",
|
|
29
|
-
"pattern": "^[a-z][a-z0-9_]{0,63}$"
|
|
30
|
-
},
|
|
31
|
-
"description": {
|
|
32
|
-
"description": "What the handle does, in English, for the model: the module's eval set measures the prompt with it.",
|
|
33
|
-
"type": "string",
|
|
34
|
-
"minLength": 1,
|
|
35
|
-
"maxLength": 1000
|
|
36
|
-
},
|
|
37
|
-
"inputSchema": {
|
|
38
|
-
"description": "The JSON Schema of the call's arguments, by the conventions of the module format's schemas: an object closed by unevaluatedProperties, no argument free text the learner sees, and only the keywords the shell reads on the device.",
|
|
39
|
-
"type": "object",
|
|
40
|
-
"properties": {
|
|
41
|
-
"type": {
|
|
42
|
-
"description": "The arguments are an object.",
|
|
43
|
-
"const": "object"
|
|
44
|
-
},
|
|
45
|
-
"unevaluatedProperties": {
|
|
46
|
-
"description": "The object is closed: it takes no member its schema does not name.",
|
|
47
|
-
"const": false
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"additionalProperties": {
|
|
51
|
-
"description": "A keyword of JSON Schema with its value."
|
|
52
|
-
},
|
|
53
|
-
"required": ["type", "unevaluatedProperties"]
|
|
54
|
-
},
|
|
55
|
-
"class": {
|
|
56
|
-
"description": "The class of rights: show leaves the state and asks nothing of the solver; rewind brings the state back to one of its history; solve is every other.",
|
|
57
|
-
"enum": ["show", "rewind", "solve"]
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"required": ["name", "description", "inputSchema", "class"]
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|