tpmkms_4wp 9.1.1 → 9.2.0-beta.1
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 +21 -8
- package/common/articles.js +3 -0
- package/common/asking.test.json +193 -72
- package/common/avatar.js +0 -6
- package/common/colors.instance.json +32 -18
- package/common/comparable.instance.json +3 -0
- package/common/comparable.js +6 -0
- package/common/concept.js +1 -1
- package/common/crew.instance.json +4885 -1224
- package/common/crew.js +0 -7
- package/common/crew.test.json +1904 -0
- package/common/dates.instance.json +28562 -0
- package/common/dates.js +152 -0
- package/common/dates.test.json +10239 -0
- package/common/dialogues.js +30 -10
- package/common/dimension.instance.json +3 -2
- package/common/edible.instance.json +1292 -517
- package/common/emotions.instance.json +7 -14
- package/common/emotions.js +4 -5
- package/common/events.js +3 -3
- package/common/events.test.json +107 -36
- package/common/fastfood.instance.json +4649 -13349
- package/common/fastfood.js +2 -1
- package/common/formulas.instance.json +1 -0
- package/common/formulas.js +3 -1
- package/common/formulas.test.json +643 -711
- package/common/gdefaults.js +14 -0
- package/common/helpers/concept.js +7 -2
- package/common/helpers/dialogues.js +4 -1
- package/common/helpers/menus.js +154 -0
- package/common/helpers/properties.js +2 -27
- package/common/helpers.js +57 -0
- package/common/hierarchy.js +4 -3
- package/common/kirk.instance.json +156 -10
- package/common/length.instance.json +17 -2
- package/common/math.instance.json +1 -0
- package/common/menus.instance.json +10097 -0
- package/common/menus.js +261 -0
- package/common/menus.test.json +27226 -0
- package/common/meta.js +3 -3
- package/common/negation.js +5 -0
- package/common/ordering.instance.json +4 -2
- package/common/people.instance.json +96 -8
- package/common/pipboy.instance.json +61 -135
- package/common/pipboy.js +0 -7
- package/common/pokemon.instance.json +15 -2
- package/common/pressure.instance.json +6 -2
- package/common/properties.instance.json +1 -0
- package/common/properties.js +20 -5
- package/common/punctuation.js +3 -0
- package/common/reports.instance.json +6 -3
- package/common/reports.js +12 -3
- package/common/sdefaults.js +28 -3
- package/common/spock.instance.json +156 -10
- package/common/stm.js +2 -1
- package/common/temperature.instance.json +150 -2
- package/common/tester.js +24 -2
- package/common/ui.instance.json +446 -0
- package/common/ui.js +9 -4
- package/common/ui.test.json +6794 -0
- package/common/weight.instance.json +14 -0
- package/common/wp.instance.json +6497 -9
- package/common/wp.js +10 -0
- package/main.js +4 -0
- package/package.json +12 -3
@@ -400,6 +400,11 @@
|
|
400
400
|
"queryable",
|
401
401
|
false
|
402
402
|
],
|
403
|
+
[
|
404
|
+
"doctor",
|
405
|
+
"rank",
|
406
|
+
false
|
407
|
+
],
|
403
408
|
[
|
404
409
|
"doctor",
|
405
410
|
"theAble",
|
@@ -495,11 +500,6 @@
|
|
495
500
|
"theAble",
|
496
501
|
false
|
497
502
|
],
|
498
|
-
[
|
499
|
-
"emotion",
|
500
|
-
"unknown",
|
501
|
-
false
|
502
|
-
],
|
503
503
|
[
|
504
504
|
"evaluate",
|
505
505
|
"verb",
|
@@ -510,6 +510,41 @@
|
|
510
510
|
"article",
|
511
511
|
false
|
512
512
|
],
|
513
|
+
[
|
514
|
+
"eye",
|
515
|
+
"hierarchyAble",
|
516
|
+
false
|
517
|
+
],
|
518
|
+
[
|
519
|
+
"eye",
|
520
|
+
"isEdee",
|
521
|
+
false
|
522
|
+
],
|
523
|
+
[
|
524
|
+
"eye",
|
525
|
+
"isEder",
|
526
|
+
false
|
527
|
+
],
|
528
|
+
[
|
529
|
+
"eye",
|
530
|
+
"object",
|
531
|
+
false
|
532
|
+
],
|
533
|
+
[
|
534
|
+
"eye",
|
535
|
+
"property",
|
536
|
+
false
|
537
|
+
],
|
538
|
+
[
|
539
|
+
"eye",
|
540
|
+
"queryable",
|
541
|
+
false
|
542
|
+
],
|
543
|
+
[
|
544
|
+
"eye",
|
545
|
+
"theAble",
|
546
|
+
false
|
547
|
+
],
|
513
548
|
[
|
514
549
|
"feel",
|
515
550
|
"canBeDoQuestion",
|
@@ -790,6 +825,11 @@
|
|
790
825
|
"isEder",
|
791
826
|
false
|
792
827
|
],
|
828
|
+
[
|
829
|
+
"mccoy",
|
830
|
+
"name",
|
831
|
+
false
|
832
|
+
],
|
793
833
|
[
|
794
834
|
"mccoy",
|
795
835
|
"object",
|
@@ -865,6 +905,41 @@
|
|
865
905
|
"verb",
|
866
906
|
false
|
867
907
|
],
|
908
|
+
[
|
909
|
+
"name",
|
910
|
+
"hierarchyAble",
|
911
|
+
false
|
912
|
+
],
|
913
|
+
[
|
914
|
+
"name",
|
915
|
+
"isEdee",
|
916
|
+
false
|
917
|
+
],
|
918
|
+
[
|
919
|
+
"name",
|
920
|
+
"isEder",
|
921
|
+
false
|
922
|
+
],
|
923
|
+
[
|
924
|
+
"name",
|
925
|
+
"object",
|
926
|
+
false
|
927
|
+
],
|
928
|
+
[
|
929
|
+
"name",
|
930
|
+
"property",
|
931
|
+
false
|
932
|
+
],
|
933
|
+
[
|
934
|
+
"name",
|
935
|
+
"queryable",
|
936
|
+
false
|
937
|
+
],
|
938
|
+
[
|
939
|
+
"name",
|
940
|
+
"theAble",
|
941
|
+
false
|
942
|
+
],
|
868
943
|
[
|
869
944
|
"negatable",
|
870
945
|
"queryable",
|
@@ -1185,6 +1260,41 @@
|
|
1185
1260
|
"punctuation",
|
1186
1261
|
false
|
1187
1262
|
],
|
1263
|
+
[
|
1264
|
+
"rank",
|
1265
|
+
"hierarchyAble",
|
1266
|
+
false
|
1267
|
+
],
|
1268
|
+
[
|
1269
|
+
"rank",
|
1270
|
+
"isEdee",
|
1271
|
+
false
|
1272
|
+
],
|
1273
|
+
[
|
1274
|
+
"rank",
|
1275
|
+
"isEder",
|
1276
|
+
false
|
1277
|
+
],
|
1278
|
+
[
|
1279
|
+
"rank",
|
1280
|
+
"object",
|
1281
|
+
false
|
1282
|
+
],
|
1283
|
+
[
|
1284
|
+
"rank",
|
1285
|
+
"property",
|
1286
|
+
false
|
1287
|
+
],
|
1288
|
+
[
|
1289
|
+
"rank",
|
1290
|
+
"queryable",
|
1291
|
+
false
|
1292
|
+
],
|
1293
|
+
[
|
1294
|
+
"rank",
|
1295
|
+
"theAble",
|
1296
|
+
false
|
1297
|
+
],
|
1188
1298
|
[
|
1189
1299
|
"readonly",
|
1190
1300
|
"queryable",
|
@@ -1210,11 +1320,6 @@
|
|
1210
1320
|
"queryable",
|
1211
1321
|
false
|
1212
1322
|
],
|
1213
|
-
[
|
1214
|
-
"sentientBeing",
|
1215
|
-
"unknown",
|
1216
|
-
false
|
1217
|
-
],
|
1218
1323
|
[
|
1219
1324
|
"spock",
|
1220
1325
|
"crew_member",
|
@@ -1240,6 +1345,11 @@
|
|
1240
1345
|
"isEder",
|
1241
1346
|
false
|
1242
1347
|
],
|
1348
|
+
[
|
1349
|
+
"spock",
|
1350
|
+
"name",
|
1351
|
+
false
|
1352
|
+
],
|
1243
1353
|
[
|
1244
1354
|
"spock",
|
1245
1355
|
"object",
|
@@ -1260,6 +1370,41 @@
|
|
1260
1370
|
"theAble",
|
1261
1371
|
false
|
1262
1372
|
],
|
1373
|
+
[
|
1374
|
+
"status",
|
1375
|
+
"hierarchyAble",
|
1376
|
+
false
|
1377
|
+
],
|
1378
|
+
[
|
1379
|
+
"status",
|
1380
|
+
"isEdee",
|
1381
|
+
false
|
1382
|
+
],
|
1383
|
+
[
|
1384
|
+
"status",
|
1385
|
+
"isEder",
|
1386
|
+
false
|
1387
|
+
],
|
1388
|
+
[
|
1389
|
+
"status",
|
1390
|
+
"object",
|
1391
|
+
false
|
1392
|
+
],
|
1393
|
+
[
|
1394
|
+
"status",
|
1395
|
+
"property",
|
1396
|
+
false
|
1397
|
+
],
|
1398
|
+
[
|
1399
|
+
"status",
|
1400
|
+
"queryable",
|
1401
|
+
false
|
1402
|
+
],
|
1403
|
+
[
|
1404
|
+
"status",
|
1405
|
+
"theAble",
|
1406
|
+
false
|
1407
|
+
],
|
1263
1408
|
[
|
1264
1409
|
"stm_before",
|
1265
1410
|
"adjective",
|
@@ -1567,6 +1712,7 @@
|
|
1567
1712
|
"level": 2,
|
1568
1713
|
"context_index": 1,
|
1569
1714
|
"topLevel": true,
|
1715
|
+
"context_id": 2,
|
1570
1716
|
"touchedBy": [
|
1571
1717
|
"spock#call2"
|
1572
1718
|
]
|
package/common/stm.js
CHANGED
@@ -14,6 +14,7 @@ class API {
|
|
14
14
|
this._objects.mentioned = []
|
15
15
|
this._objects.variables = {}
|
16
16
|
this.idCounter = 0
|
17
|
+
this.maximumMentioned = 50
|
17
18
|
}
|
18
19
|
|
19
20
|
getId() {
|
@@ -65,7 +66,7 @@ class API {
|
|
65
66
|
concept.stm.id = this.getId()
|
66
67
|
}
|
67
68
|
frameOfReference.mentioned = (frameOfReference.mentioned || []).filter( (context) => context.stm && context.stm.id != concept.stm.id )
|
68
|
-
frameOfReference.mentioned.
|
69
|
+
helpers.unshiftL(frameOfReference.mentioned, concept, this.maximumMentioned)
|
69
70
|
}
|
70
71
|
|
71
72
|
mentions({ context, frameOfReference, useHierarchy=true, all, condition = (() => true) } = {}) {
|
@@ -1163,6 +1163,7 @@
|
|
1163
1163
|
"level": 2,
|
1164
1164
|
"context_index": 1,
|
1165
1165
|
"topLevel": true,
|
1166
|
+
"context_id": 2,
|
1166
1167
|
"touchedBy": [
|
1167
1168
|
"temperature#call2"
|
1168
1169
|
]
|
@@ -2762,10 +2763,10 @@
|
|
2762
2763
|
"start": 8,
|
2763
2764
|
"end": 17
|
2764
2765
|
},
|
2766
|
+
"dead": true,
|
2765
2767
|
"types": [
|
2766
2768
|
"unknown"
|
2767
2769
|
],
|
2768
|
-
"dead": true,
|
2769
2770
|
"level": 0
|
2770
2771
|
},
|
2771
2772
|
{
|
@@ -2778,10 +2779,10 @@
|
|
2778
2779
|
"start": 23,
|
2779
2780
|
"end": 28
|
2780
2781
|
},
|
2782
|
+
"dead": true,
|
2781
2783
|
"types": [
|
2782
2784
|
"unknown"
|
2783
2785
|
],
|
2784
|
-
"dead": true,
|
2785
2786
|
"level": 0
|
2786
2787
|
}
|
2787
2788
|
],
|
@@ -2858,6 +2859,7 @@
|
|
2858
2859
|
"level": 2,
|
2859
2860
|
"context_index": 1,
|
2860
2861
|
"topLevel": true,
|
2862
|
+
"context_id": 2,
|
2861
2863
|
"touchedBy": [
|
2862
2864
|
"temperature#call2"
|
2863
2865
|
]
|
@@ -5213,6 +5215,7 @@
|
|
5213
5215
|
"level": 1,
|
5214
5216
|
"context_index": 1,
|
5215
5217
|
"topLevel": true,
|
5218
|
+
"context_id": 2,
|
5216
5219
|
"touchedBy": [
|
5217
5220
|
"temperature#call2"
|
5218
5221
|
]
|
@@ -5260,6 +5263,36 @@
|
|
5260
5263
|
0
|
5261
5264
|
]
|
5262
5265
|
],
|
5266
|
+
[
|
5267
|
+
[
|
5268
|
+
"celcius",
|
5269
|
+
0
|
5270
|
+
],
|
5271
|
+
[
|
5272
|
+
"divideByOperator",
|
5273
|
+
0
|
5274
|
+
],
|
5275
|
+
[
|
5276
|
+
"equals",
|
5277
|
+
0
|
5278
|
+
],
|
5279
|
+
[
|
5280
|
+
"fahrenheit",
|
5281
|
+
0
|
5282
|
+
],
|
5283
|
+
[
|
5284
|
+
"integer",
|
5285
|
+
0
|
5286
|
+
],
|
5287
|
+
[
|
5288
|
+
"plusOperator",
|
5289
|
+
0
|
5290
|
+
],
|
5291
|
+
[
|
5292
|
+
"timesOperator",
|
5293
|
+
0
|
5294
|
+
]
|
5295
|
+
],
|
5263
5296
|
[
|
5264
5297
|
[
|
5265
5298
|
"celcius",
|
@@ -7761,6 +7794,7 @@
|
|
7761
7794
|
"level": 1,
|
7762
7795
|
"context_index": 1,
|
7763
7796
|
"topLevel": true,
|
7797
|
+
"context_id": 2,
|
7764
7798
|
"touchedBy": [
|
7765
7799
|
"temperature#call2"
|
7766
7800
|
]
|
@@ -7820,6 +7854,48 @@
|
|
7820
7854
|
0
|
7821
7855
|
]
|
7822
7856
|
],
|
7857
|
+
[
|
7858
|
+
[
|
7859
|
+
"celcius",
|
7860
|
+
0
|
7861
|
+
],
|
7862
|
+
[
|
7863
|
+
"divideByOperator",
|
7864
|
+
0
|
7865
|
+
],
|
7866
|
+
[
|
7867
|
+
"equals",
|
7868
|
+
0
|
7869
|
+
],
|
7870
|
+
[
|
7871
|
+
"fahrenheit",
|
7872
|
+
0
|
7873
|
+
],
|
7874
|
+
[
|
7875
|
+
"integer",
|
7876
|
+
0
|
7877
|
+
],
|
7878
|
+
[
|
7879
|
+
"leftParenthesis",
|
7880
|
+
0
|
7881
|
+
],
|
7882
|
+
[
|
7883
|
+
"minusOperator",
|
7884
|
+
0
|
7885
|
+
],
|
7886
|
+
[
|
7887
|
+
"plusOperator",
|
7888
|
+
0
|
7889
|
+
],
|
7890
|
+
[
|
7891
|
+
"rightParenthesis",
|
7892
|
+
0
|
7893
|
+
],
|
7894
|
+
[
|
7895
|
+
"timesOperator",
|
7896
|
+
0
|
7897
|
+
]
|
7898
|
+
],
|
7823
7899
|
[
|
7824
7900
|
[
|
7825
7901
|
"celcius",
|
@@ -9394,6 +9470,78 @@
|
|
9394
9470
|
0
|
9395
9471
|
]
|
9396
9472
|
],
|
9473
|
+
[
|
9474
|
+
[
|
9475
|
+
"celcius",
|
9476
|
+
0
|
9477
|
+
],
|
9478
|
+
[
|
9479
|
+
"divideByOperator",
|
9480
|
+
0
|
9481
|
+
],
|
9482
|
+
[
|
9483
|
+
"equals",
|
9484
|
+
0
|
9485
|
+
],
|
9486
|
+
[
|
9487
|
+
"fahrenheit",
|
9488
|
+
0
|
9489
|
+
],
|
9490
|
+
[
|
9491
|
+
"integer",
|
9492
|
+
0
|
9493
|
+
],
|
9494
|
+
[
|
9495
|
+
"leftParenthesis",
|
9496
|
+
0
|
9497
|
+
],
|
9498
|
+
[
|
9499
|
+
"minusOperator",
|
9500
|
+
0
|
9501
|
+
],
|
9502
|
+
[
|
9503
|
+
"plusOperator",
|
9504
|
+
0
|
9505
|
+
],
|
9506
|
+
[
|
9507
|
+
"rightParenthesis",
|
9508
|
+
0
|
9509
|
+
],
|
9510
|
+
[
|
9511
|
+
"timesOperator",
|
9512
|
+
0
|
9513
|
+
]
|
9514
|
+
],
|
9515
|
+
[
|
9516
|
+
[
|
9517
|
+
"celcius",
|
9518
|
+
0
|
9519
|
+
],
|
9520
|
+
[
|
9521
|
+
"divideByOperator",
|
9522
|
+
0
|
9523
|
+
],
|
9524
|
+
[
|
9525
|
+
"equals",
|
9526
|
+
0
|
9527
|
+
],
|
9528
|
+
[
|
9529
|
+
"fahrenheit",
|
9530
|
+
0
|
9531
|
+
],
|
9532
|
+
[
|
9533
|
+
"integer",
|
9534
|
+
0
|
9535
|
+
],
|
9536
|
+
[
|
9537
|
+
"plusOperator",
|
9538
|
+
0
|
9539
|
+
],
|
9540
|
+
[
|
9541
|
+
"timesOperator",
|
9542
|
+
0
|
9543
|
+
]
|
9544
|
+
],
|
9397
9545
|
[
|
9398
9546
|
[
|
9399
9547
|
"celcius",
|
package/common/tester.js
CHANGED
@@ -3,13 +3,20 @@ const { defaultContextCheck } = require('./helpers')
|
|
3
3
|
const tester_tests = require('./tester.test.json')
|
4
4
|
const ArgumentParser = require('argparse').ArgumentParser
|
5
5
|
|
6
|
+
const testModuleNameFn = () => {
|
7
|
+
const parser = new ArgumentParser({ description: 'Get test module name' })
|
8
|
+
parser.add_argument('-tmn', '--testModuleName', { help: 'List of module to run the tests from' })
|
9
|
+
const [args, unknown] = parser.parse_known_args()
|
10
|
+
return args.testModuleName
|
11
|
+
}
|
12
|
+
const testModuleName = testModuleNameFn()
|
13
|
+
|
6
14
|
const parser = new ArgumentParser({
|
7
15
|
description: 'Test modules together'
|
8
16
|
})
|
9
17
|
|
10
18
|
parser.add_argument('-m', '--modules', { help: 'List of modules to load' })
|
11
19
|
const [args, unknown] = parser.parse_known_args()
|
12
|
-
|
13
20
|
process.argv = [process.argv[0], process.argv[1], ...unknown]
|
14
21
|
|
15
22
|
const createConfig = async () => {
|
@@ -29,12 +36,26 @@ const createConfig = async () => {
|
|
29
36
|
global.theprogrammablemind = {
|
30
37
|
loadForTesting: {}
|
31
38
|
}
|
39
|
+
|
32
40
|
const includes = args.modules.split(',').map((module) => {
|
33
41
|
global.theprogrammablemind.loadForTesting[module] = true
|
34
42
|
const km = require(`./${module}`)
|
35
43
|
return km
|
36
44
|
})
|
37
45
|
|
46
|
+
const fixtures = async (args) => {
|
47
|
+
const { config, kms, apis } = args;
|
48
|
+
if (kms[testModuleName].testConfig?.fixtures) {
|
49
|
+
const fixtures = kms.menus.testConfig?.fixtures
|
50
|
+
kms.menus.testConfig.fixtures = null
|
51
|
+
const testModuleApi = apis(testModuleName)
|
52
|
+
const objects = testModuleApi._objects
|
53
|
+
args.objects = objects
|
54
|
+
await fixtures({ ...args, objects, api: testModuleApi })
|
55
|
+
kms.menus.testConfig.fixtures = fixtures
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
38
59
|
knowledgeModule({
|
39
60
|
config: { name: 'tester' },
|
40
61
|
includes,
|
@@ -43,6 +64,7 @@ knowledgeModule({
|
|
43
64
|
description: 'Testing modules loaded together',
|
44
65
|
test: {
|
45
66
|
name: './tester.test.json',
|
46
|
-
contents: tester_tests
|
67
|
+
contents: tester_tests,
|
68
|
+
fixtures,
|
47
69
|
},
|
48
70
|
})
|