tpmkms 8.0.0-beta.74 → 8.0.0-beta.76
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/common/animals.instance.json +0 -130
- package/common/colors.instance.json +28 -140
- package/common/crew.instance.json +48 -430
- package/common/dialogues.js +6 -4
- package/common/dimension.instance.json +28 -20
- package/common/dimension.js +5 -1
- package/common/dimension.test.json +76 -76
- package/common/edible.instance.json +56 -320
- package/common/emotions.instance.json +4 -74
- package/common/fastfood.instance.json +1137 -1305
- package/common/formulas.instance.json +10 -20
- package/common/helpers/dialogues.js +3 -0
- package/common/helpers/properties.js +13 -2
- package/common/kirk.instance.json +0 -10
- package/common/length.instance.json +86 -179
- package/common/math.instance.json +16 -26
- package/common/ordering.instance.json +132 -32
- package/common/people.instance.json +0 -80
- package/common/pipboy.instance.json +103 -208
- package/common/pipboy.js +2 -2
- package/common/pokemon.instance.json +0 -130
- package/common/pressure.instance.json +22 -46
- package/common/properties.instance.json +4 -14
- package/common/properties.js +90 -24
- package/common/reports.instance.json +1 -21
- package/common/reports.js +0 -1
- package/common/spock.instance.json +0 -10
- package/common/temperature.instance.json +23 -47
- package/common/ui.instance.json +0 -10
- package/common/weight.instance.json +64 -141
- package/package.json +2 -2
@@ -29,14 +29,14 @@
|
|
29
29
|
],
|
30
30
|
"semantics": [
|
31
31
|
{
|
32
|
-
"where": "/home/dev/code/theprogrammablemind/kms/
|
32
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:109",
|
33
33
|
"match": "({context, api}) => context.evaluate && api.get(context)",
|
34
34
|
"apply": "async ({context, api, e}) => {\n const { formula } = api.get(context)\n // console.log('greg24 -----------', JSON.stringify(formula, null, 2))\n context.evalue = await e(formula) \n }"
|
35
35
|
}
|
36
36
|
],
|
37
37
|
"bridges": [
|
38
38
|
{
|
39
|
-
"where": "/home/dev/code/theprogrammablemind/kms/
|
39
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:120",
|
40
40
|
"id": "formulaForVariable",
|
41
41
|
"isA": [
|
42
42
|
"preposition",
|
@@ -48,7 +48,7 @@
|
|
48
48
|
"evaluator": "({context, api, objects}) => {\n const formulas = api.gets(context.variable).map((f) => { return { ...f.equality, paraphrase: true } })\n context.evalue = { marker: 'list', value: formulas }\n }"
|
49
49
|
},
|
50
50
|
{
|
51
|
-
"where": "/home/dev/code/theprogrammablemind/kms/
|
51
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:132",
|
52
52
|
"id": "solve",
|
53
53
|
"bridge": "{ ...next(operator), equality: after[0], variable: after[2] }",
|
54
54
|
"generatorp": "async ({context, gp}) => `${context.word} ${await gp(context.equality)} for ${await gp(context.variable)}`",
|
@@ -74,7 +74,7 @@
|
|
74
74
|
]
|
75
75
|
},
|
76
76
|
{
|
77
|
-
"where": "/home/dev/code/theprogrammablemind/kms/
|
77
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:159",
|
78
78
|
"id": "calculate",
|
79
79
|
"isA": [
|
80
80
|
"verb"
|
@@ -90,7 +90,7 @@
|
|
90
90
|
"semantic": "async ({context, e}) => {\n context.evalue = await e(context.expression)\n context.isResponse = true\n }"
|
91
91
|
},
|
92
92
|
{
|
93
|
-
"where": "/home/dev/code/theprogrammablemind/kms/
|
93
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:171",
|
94
94
|
"id": "equals",
|
95
95
|
"bridge": "{ ...next(operator), left: before[0], right: after[0] }",
|
96
96
|
"words": [
|
@@ -614,11 +614,6 @@
|
|
614
614
|
"theAble",
|
615
615
|
false
|
616
616
|
],
|
617
|
-
[
|
618
|
-
"property",
|
619
|
-
"unknown",
|
620
|
-
false
|
621
|
-
],
|
622
617
|
[
|
623
618
|
"punctuation",
|
624
619
|
"punctuation",
|
@@ -829,11 +824,6 @@
|
|
829
824
|
"hierarchyAble",
|
830
825
|
false
|
831
826
|
],
|
832
|
-
[
|
833
|
-
"unknown",
|
834
|
-
"object",
|
835
|
-
false
|
836
|
-
],
|
837
827
|
[
|
838
828
|
"unknown",
|
839
829
|
"queryable",
|
@@ -1088,12 +1078,12 @@
|
|
1088
1078
|
],
|
1089
1079
|
"semantics": [
|
1090
1080
|
{
|
1091
|
-
"where": "/home/dev/code/theprogrammablemind/kms/
|
1081
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:109"
|
1092
1082
|
}
|
1093
1083
|
],
|
1094
1084
|
"bridges": [
|
1095
1085
|
{
|
1096
|
-
"where": "/home/dev/code/theprogrammablemind/kms/
|
1086
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:120",
|
1097
1087
|
"id": "formulaForVariable",
|
1098
1088
|
"isA": [
|
1099
1089
|
"preposition",
|
@@ -1103,7 +1093,7 @@
|
|
1103
1093
|
"bridge": "{ number: before[0].number, ...next(operator), what: before[0], equality: after[0], variable: after[1] }"
|
1104
1094
|
},
|
1105
1095
|
{
|
1106
|
-
"where": "/home/dev/code/theprogrammablemind/kms/
|
1096
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:132",
|
1107
1097
|
"id": "solve",
|
1108
1098
|
"bridge": "{ ...next(operator), equality: after[0], variable: after[2] }"
|
1109
1099
|
},
|
@@ -1127,7 +1117,7 @@
|
|
1127
1117
|
]
|
1128
1118
|
},
|
1129
1119
|
{
|
1130
|
-
"where": "/home/dev/code/theprogrammablemind/kms/
|
1120
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:159",
|
1131
1121
|
"id": "calculate",
|
1132
1122
|
"isA": [
|
1133
1123
|
"verb"
|
@@ -1141,7 +1131,7 @@
|
|
1141
1131
|
]
|
1142
1132
|
},
|
1143
1133
|
{
|
1144
|
-
"where": "/home/dev/code/theprogrammablemind/kms/
|
1134
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/formulas.js:171",
|
1145
1135
|
"id": "equals",
|
1146
1136
|
"bridge": "{ ...next(operator), left: before[0], right: after[0] }",
|
1147
1137
|
"words": [
|
@@ -316,7 +316,12 @@ class API {
|
|
316
316
|
allowDups: true,
|
317
317
|
})
|
318
318
|
// config.addOperator({ id: operator, level: 1, words: [operator] })
|
319
|
-
config.addBridge({
|
319
|
+
config.addBridge({
|
320
|
+
id: operator,
|
321
|
+
level: 1,
|
322
|
+
bridge: '{ ...next(operator) }',
|
323
|
+
allowDups: true,
|
324
|
+
})
|
320
325
|
config.addPriority({ "context": [['does', 0], [operator, 1], ], "choose": [0] })
|
321
326
|
config.addPriority({ "context": [['doesnt', 0], [operator, 1], ], "choose": [0] })
|
322
327
|
config.addPriority({ "context": [[operator, 0], ['does', 0], ], "choose": [0] })
|
@@ -355,7 +360,13 @@ class API {
|
|
355
360
|
|
356
361
|
const unflattenArgs = [ ...before.map( (arg) => arg.tag ), ...after.map( (arg) => arg.tag ) ]
|
357
362
|
const focusable = [ ...before.map( (arg) => arg.tag ), ...after.map( (arg) => arg.tag ) ]
|
358
|
-
config.addBridge({
|
363
|
+
config.addBridge({
|
364
|
+
id: operator,
|
365
|
+
level: 0,
|
366
|
+
localHierarchy: [...localHierarchy, ['object', 'unknown']],
|
367
|
+
bridge: `{ ... next(operator) ${doParams} ${beforeArgs} ${afterArgs}, unflatten: ${JSON.stringify(unflattenArgs)}, focusable: ${JSON.stringify(focusable)} }`,
|
368
|
+
allowDups: true
|
369
|
+
})
|
359
370
|
if (words.length > 0) {
|
360
371
|
for (const word of words) {
|
361
372
|
config.addWord(word, { id: operator, initial: `{ value: "${operator}" }` })
|
@@ -1130,11 +1130,6 @@
|
|
1130
1130
|
"theAble",
|
1131
1131
|
false
|
1132
1132
|
],
|
1133
|
-
[
|
1134
|
-
"property",
|
1135
|
-
"unknown",
|
1136
|
-
false
|
1137
|
-
],
|
1138
1133
|
[
|
1139
1134
|
"punctuation",
|
1140
1135
|
"punctuation",
|
@@ -1340,11 +1335,6 @@
|
|
1340
1335
|
"hierarchyAble",
|
1341
1336
|
false
|
1342
1337
|
],
|
1343
|
-
[
|
1344
|
-
"unknown",
|
1345
|
-
"object",
|
1346
|
-
false
|
1347
|
-
],
|
1348
1338
|
[
|
1349
1339
|
"unknown",
|
1350
1340
|
"queryable",
|