ekms 8.0.0-beta.20 → 8.0.0-beta.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. package/common/animals.instance.json +0 -88
  2. package/common/animals.js +2 -2
  3. package/common/avatar.js +2 -2
  4. package/common/characters.js +12 -16
  5. package/common/colors.instance.json +10 -326
  6. package/common/colors.js +2 -2
  7. package/common/comparable.js +2 -2
  8. package/common/concept.js +4 -5
  9. package/common/countable.js +2 -2
  10. package/common/crew.instance.json +0 -416
  11. package/common/crew.js +3 -3
  12. package/common/currency.js +4 -4
  13. package/common/dialogues.js +4 -4
  14. package/common/dimension.js +4 -4
  15. package/common/edible.instance.json +17 -93
  16. package/common/edible.js +2 -2
  17. package/common/emotions.instance.json +0 -60
  18. package/common/emotions.js +3 -3
  19. package/common/events.js +3 -3
  20. package/common/fastfood.instance.json +237 -517
  21. package/common/fastfood.js +4 -4
  22. package/common/formulas.js +4 -4
  23. package/common/gdefaults.js +2 -2
  24. package/common/help.js +3 -3
  25. package/common/helpers/concept.js +0 -1
  26. package/common/hierarchy.js +3 -3
  27. package/common/javascript.js +3 -3
  28. package/common/kirk.js +2 -2
  29. package/common/length.instance.json +0 -60
  30. package/common/length.js +2 -2
  31. package/common/math.js +2 -2
  32. package/common/meta.js +3 -3
  33. package/common/negation.js +1 -1
  34. package/common/numbers.js +2 -2
  35. package/common/ordering.js +4 -4
  36. package/common/people.js +3 -3
  37. package/common/percentages.js +2 -2
  38. package/common/pipboy.instance.json +10 -78
  39. package/common/pipboy.js +4 -4
  40. package/common/pokemon.instance.json +0 -44
  41. package/common/pokemon.js +3 -3
  42. package/common/pos.js +1 -1
  43. package/common/pressure.js +2 -2
  44. package/common/properties.js +4 -4
  45. package/common/punctuation.js +1 -1
  46. package/common/reports.instance.json +1 -1
  47. package/common/reports.js +11 -11
  48. package/common/scorekeeper.js +3 -3
  49. package/common/sdefaults.js +1 -1
  50. package/common/sizeable.js +2 -2
  51. package/common/spock.js +2 -2
  52. package/common/stgame.js +13 -9
  53. package/common/stm.js +3 -3
  54. package/common/tell.js +4 -4
  55. package/common/temperature.instance.json +84 -60
  56. package/common/temperature.js +2 -2
  57. package/common/tester.js +2 -2
  58. package/common/testing.js +2 -2
  59. package/common/time.js +4 -4
  60. package/common/tokenize.js +1 -1
  61. package/common/ui.js +4 -4
  62. package/common/weight.js +2 -2
  63. package/common/yesno.js +1 -1
  64. package/package.json +2 -2
@@ -935,7 +935,7 @@ class State {
935
935
  }
936
936
  }
937
937
 
938
- const createConfig = (additionalConfig) => {
938
+ const createConfig = async (additionalConfig) => {
939
939
  const config = new Config({
940
940
  name: 'fastfood',
941
941
  operators: [
@@ -987,15 +987,15 @@ const createConfig = (additionalConfig) => {
987
987
  ],
988
988
  }, module)
989
989
  config.stop_auto_rebuild()
990
- config.add(edible(), countable(), events(), sizeable())
991
- config.api = api
990
+ await config.add(edible, countable, events, sizeable)
991
+ await config.setApi(api)
992
992
  config.initializer( ({api}) => {
993
993
  api.state = new State(api)
994
994
  })
995
995
  if (additionalConfig) {
996
996
  additionalConfig(config)
997
997
  }
998
- config.restart_auto_rebuild()
998
+ await config.restart_auto_rebuild()
999
999
  return config
1000
1000
  }
1001
1001
 
@@ -192,13 +192,13 @@ const template = {
192
192
  ]
193
193
  }
194
194
 
195
- const createConfig = () => {
195
+ const createConfig = async () => {
196
196
  const api = new API()
197
197
  config = new Config({ name: 'formulas' }, module)
198
198
  config.stop_auto_rebuild()
199
- config.add(dialogues(), pos(), math(), hierarchy(), comparable(), countable())
200
- config.api = api
201
- config.restart_auto_rebuild()
199
+ await config.add(dialogues, pos, math, hierarchy, comparable, countable)
200
+ await config.setApi(api)
201
+ await config.restart_auto_rebuild()
202
202
  return config
203
203
  }
204
204
 
@@ -181,9 +181,9 @@ let configStruct = {
181
181
  ],
182
182
  };
183
183
 
184
- const createConfig = () => {
184
+ const createConfig = async () => {
185
185
  const config = new Config(configStruct, module)
186
- config.add(tokenize())
186
+ await config.add(tokenize)
187
187
  config.initializer( ({config}) => {
188
188
  config.addArgs((args) => {
189
189
  return {
package/common/help.js CHANGED
@@ -82,10 +82,10 @@ const configStruct = {
82
82
  },
83
83
  };
84
84
 
85
- const createConfig = () => {
85
+ const createConfig = async () => {
86
86
  const config = new Config(configStruct, module)
87
87
  config.stop_auto_rebuild()
88
- config.add(dialogues())
88
+ await config.add(dialogues)
89
89
 
90
90
  config.initializer( ({ config, addWord, kms }) => {
91
91
  const names = new Set()
@@ -96,7 +96,7 @@ const createConfig = () => {
96
96
  addWord(name, {id: "km", initial: `{ value: '${name}', word: '${name}' }`})
97
97
  }
98
98
  })
99
- config.restart_auto_rebuild()
99
+ await config.restart_auto_rebuild()
100
100
  return config
101
101
  }
102
102
 
@@ -86,7 +86,6 @@ class API {
86
86
  })
87
87
  // modifierds.forEach((modifierId) => config.addWord(modifierId, { id: modifierId, initial: `{ value: '${modifierId}' }`}))
88
88
 
89
- debugger
90
89
  modifierIds.forEach((modifierId) => config.addBridge({ id: modifierId, level: 0, bridge: `{ ...next(operator), value: '${modifierId}' }`, allowDups: true }))
91
90
  config.addBridge({ id: objectId, level: 0, bridge: `{ ...next(operator), value: '${objectId}' }`, allowDups: true })
92
91
  // config.addBridge({ id: modifierObjectId, level: 0, bridge: `{ ...next(operator), value: '${modifierObjectId}' }`, allowDups: true })
@@ -288,16 +288,16 @@ let configStruct = {
288
288
  ]
289
289
  };
290
290
 
291
- const createConfig = () => {
291
+ const createConfig = async () => {
292
292
  const config = new Config(configStruct, module)
293
293
  config.stop_auto_rebuild()
294
- config.add(properties())
294
+ await config.add(properties)
295
295
  config.initializer( ({apis, hierarchy}) => {
296
296
  apis('stm').addIsA( (child, parent) => {
297
297
  return hierarchy.isA(child, parent)
298
298
  })
299
299
  })
300
- config.restart_auto_rebuild()
300
+ await config.restart_auto_rebuild()
301
301
  return config
302
302
  }
303
303
 
@@ -60,15 +60,15 @@ let configStruct = {
60
60
  ],
61
61
  };
62
62
 
63
- const createConfig = () => {
63
+ const createConfig = async () => {
64
64
  const config = new Config(configStruct, module)
65
65
  config.stop_auto_rebuild()
66
- config.add(dialogues())
66
+ await config.add(dialogues)
67
67
 
68
68
  config.initializer( ({objects, uuid}) => {
69
69
  objects.variables = {}
70
70
  })
71
- config.restart_auto_rebuild()
71
+ await config.restart_auto_rebuild()
72
72
  return config
73
73
  }
74
74
 
package/common/kirk.js CHANGED
@@ -14,9 +14,9 @@ const template = {
14
14
  // TODO what is the name of you
15
15
  // TODO crew members -> who are the crew members
16
16
 
17
- const createConfig = () => {
17
+ const createConfig = async () => {
18
18
  const config = new Config({ name: 'kirk', }, module)
19
- config.add(crew())
19
+ await config.add(crew)
20
20
  return config
21
21
  }
22
22
 
@@ -2265,36 +2265,6 @@
2265
2265
  1
2266
2266
  ]
2267
2267
  ],
2268
- [
2269
- [
2270
- "is",
2271
- 0
2272
- ],
2273
- [
2274
- "length",
2275
- 0
2276
- ],
2277
- [
2278
- "list",
2279
- 0
2280
- ],
2281
- [
2282
- "propertyOf",
2283
- 0
2284
- ],
2285
- [
2286
- "unit",
2287
- 0
2288
- ],
2289
- [
2290
- "unknown",
2291
- 0
2292
- ],
2293
- [
2294
- "unknown",
2295
- 1
2296
- ]
2297
- ],
2298
2268
  [
2299
2269
  [
2300
2270
  "is",
@@ -18711,36 +18681,6 @@
18711
18681
  1
18712
18682
  ]
18713
18683
  ],
18714
- [
18715
- [
18716
- "is",
18717
- 0
18718
- ],
18719
- [
18720
- "length",
18721
- 0
18722
- ],
18723
- [
18724
- "list",
18725
- 0
18726
- ],
18727
- [
18728
- "propertyOf",
18729
- 0
18730
- ],
18731
- [
18732
- "unit",
18733
- 0
18734
- ],
18735
- [
18736
- "unknown",
18737
- 0
18738
- ],
18739
- [
18740
- "unknown",
18741
- 1
18742
- ]
18743
- ],
18744
18684
  [
18745
18685
  [
18746
18686
  "is",
package/common/length.js CHANGED
@@ -36,9 +36,9 @@ const template = {
36
36
  ],
37
37
  }
38
38
 
39
- const createConfig = () => {
39
+ const createConfig = async () => {
40
40
  const config = new Config({ name: 'length' }, module)
41
- config.add(dimension())
41
+ await config.add(dimension)
42
42
  return config
43
43
  }
44
44
 
package/common/math.js CHANGED
@@ -113,9 +113,9 @@ const template = {
113
113
  ]
114
114
  }
115
115
 
116
- const createConfig = () => {
116
+ const createConfig = async () => {
117
117
  const config = new Config({ name: 'math' }, module)
118
- config.add(numbers(), dialogues(), punctuation(), countable(), comparable())
118
+ await config.add(numbers, dialogues, punctuation, countable, comparable)
119
119
  return config
120
120
  }
121
121
 
package/common/meta.js CHANGED
@@ -378,10 +378,10 @@ let configStruct = {
378
378
  ],
379
379
  };
380
380
 
381
- const createConfig = () => {
381
+ const createConfig = async () => {
382
382
  const config = new Config(configStruct, module)
383
383
  config.stop_auto_rebuild()
384
- config.add(gdefaults())
384
+ await config.add(gdefaults)
385
385
 
386
386
  config.initializer( ({config, addGenerator, isModule}) => {
387
387
  if (!isModule) {
@@ -393,7 +393,7 @@ const createConfig = () => {
393
393
  }
394
394
  })
395
395
 
396
- config.restart_auto_rebuild()
396
+ await config.restart_auto_rebuild()
397
397
  return config
398
398
  }
399
399
 
@@ -21,7 +21,7 @@ let configStruct = {
21
21
  ],
22
22
  };
23
23
 
24
- const createConfig = () => new Config(configStruct, module).add(gdefaults(), pos())
24
+ const createConfig = async () => new Config(configStruct, module).add(gdefaults, pos)
25
25
 
26
26
  knowledgeModule( {
27
27
  module,
package/common/numbers.js CHANGED
@@ -83,9 +83,9 @@ let configStruct = {
83
83
  ],
84
84
  };
85
85
 
86
- const createConfig = () => {
86
+ const createConfig = async () => {
87
87
  const config = new Config(configStruct, module)
88
- config.add(gdefaults(), sdefaults())
88
+ await config.add(gdefaults, sdefaults)
89
89
  return config
90
90
  }
91
91
 
@@ -32,11 +32,11 @@ const api = new API();
32
32
 
33
33
  if a likes b then a wants b
34
34
  */
35
- const createConfig = () => {
35
+ const createConfig = async () => {
36
36
  const config = new Config({ name: 'ordering' }, module)
37
37
  config.stop_auto_rebuild()
38
- config.api = api
39
- config.add(hierarchy())
38
+ await config.setApi(api)
39
+ await config.add(hierarchy)
40
40
  // config.load(template, ordering_instance)
41
41
 
42
42
  config.initializer(({config, km}) => {
@@ -114,7 +114,7 @@ const createConfig = () => {
114
114
  })
115
115
  */
116
116
  })
117
- config.restart_auto_rebuild()
117
+ await config.restart_auto_rebuild()
118
118
  return config
119
119
  }
120
120
 
package/common/people.js CHANGED
@@ -45,10 +45,10 @@ let configStruct = {
45
45
  ],
46
46
  };
47
47
 
48
- const createConfig = () => {
48
+ const createConfig = async () => {
49
49
  const config = new Config(configStruct, module)
50
50
  config.stop_auto_rebuild()
51
- config.add(hierarchy())
51
+ await config.add(hierarchy)
52
52
  config.initializer( ({baseConfig, context, apis, isModule}) => {
53
53
  // const api = km('properties').api
54
54
  const api = apis('properties')
@@ -67,7 +67,7 @@ const createConfig = () => {
67
67
  })
68
68
 
69
69
  })
70
- config.restart_auto_rebuild()
70
+ await config.restart_auto_rebuild()
71
71
  return config
72
72
  }
73
73
 
@@ -36,9 +36,9 @@ let configStruct = {
36
36
  version: '3',
37
37
  };
38
38
 
39
- const createConfig = () => {
39
+ const createConfig = async () => {
40
40
  const config = new Config(configStruct, module)
41
- config.add(numbers())
41
+ await config.add(numbers)
42
42
  return config
43
43
  }
44
44
 
@@ -1472,10 +1472,6 @@
1472
1472
  "list",
1473
1473
  0
1474
1474
  ],
1475
- [
1476
- "unknown",
1477
- 0
1478
- ],
1479
1475
  [
1480
1476
  "unknown",
1481
1477
  1
@@ -1488,7 +1484,7 @@
1488
1484
  ],
1489
1485
  [
1490
1486
  "list",
1491
- 0
1487
+ 1
1492
1488
  ],
1493
1489
  [
1494
1490
  "unknown",
@@ -6957,10 +6953,6 @@
6957
6953
  "list",
6958
6954
  0
6959
6955
  ],
6960
- [
6961
- "unknown",
6962
- 0
6963
- ],
6964
6956
  [
6965
6957
  "unknown",
6966
6958
  1
@@ -6973,7 +6965,7 @@
6973
6965
  ],
6974
6966
  [
6975
6967
  "list",
6976
- 0
6968
+ 1
6977
6969
  ],
6978
6970
  [
6979
6971
  "unknown",
@@ -24451,32 +24443,6 @@
24451
24443
  1
24452
24444
  ]
24453
24445
  ],
24454
- [
24455
- [
24456
- "is",
24457
- 0
24458
- ],
24459
- [
24460
- "item",
24461
- 0
24462
- ],
24463
- [
24464
- "list",
24465
- 0
24466
- ],
24467
- [
24468
- "property",
24469
- 0
24470
- ],
24471
- [
24472
- "unknown",
24473
- 0
24474
- ],
24475
- [
24476
- "unknown",
24477
- 1
24478
- ]
24479
- ],
24480
24446
  [
24481
24447
  [
24482
24448
  "is",
@@ -25457,32 +25423,6 @@
25457
25423
  1
25458
25424
  ]
25459
25425
  ],
25460
- [
25461
- [
25462
- "is",
25463
- 0
25464
- ],
25465
- [
25466
- "item",
25467
- 0
25468
- ],
25469
- [
25470
- "list",
25471
- 0
25472
- ],
25473
- [
25474
- "property",
25475
- 0
25476
- ],
25477
- [
25478
- "unknown",
25479
- 0
25480
- ],
25481
- [
25482
- "unknown",
25483
- 1
25484
- ]
25485
- ],
25486
25426
  [
25487
25427
  [
25488
25428
  "is",
@@ -25742,10 +25682,6 @@
25742
25682
  "list",
25743
25683
  0
25744
25684
  ],
25745
- [
25746
- "unknown",
25747
- 0
25748
- ],
25749
25685
  [
25750
25686
  "unknown",
25751
25687
  1
@@ -25760,10 +25696,6 @@
25760
25696
  "list",
25761
25697
  0
25762
25698
  ],
25763
- [
25764
- "unknown",
25765
- 0
25766
- ],
25767
25699
  [
25768
25700
  "unknown",
25769
25701
  1
@@ -25790,10 +25722,6 @@
25790
25722
  ],
25791
25723
  [
25792
25724
  "list",
25793
- 0
25794
- ],
25795
- [
25796
- "unknown",
25797
25725
  1
25798
25726
  ]
25799
25727
  ],
@@ -25804,10 +25732,6 @@
25804
25732
  ],
25805
25733
  [
25806
25734
  "list",
25807
- 0
25808
- ],
25809
- [
25810
- "unknown",
25811
25735
  1
25812
25736
  ]
25813
25737
  ],
@@ -25829,6 +25753,10 @@
25829
25753
  [
25830
25754
  "list",
25831
25755
  1
25756
+ ],
25757
+ [
25758
+ "unknown",
25759
+ 1
25832
25760
  ]
25833
25761
  ],
25834
25762
  [
@@ -25839,6 +25767,10 @@
25839
25767
  [
25840
25768
  "list",
25841
25769
  1
25770
+ ],
25771
+ [
25772
+ "unknown",
25773
+ 1
25842
25774
  ]
25843
25775
  ],
25844
25776
  [
package/common/pipboy.js CHANGED
@@ -528,14 +528,14 @@ const template = {
528
528
  ]
529
529
  }
530
530
 
531
- const createConfig = () => {
531
+ const createConfig = async () => {
532
532
  const config = new Config({ name: 'pipboy' }, module)
533
533
  config.stop_auto_rebuild()
534
- config.add(hierarchy(), countable(), comparable(), help(), math())
534
+ await config.add(hierarchy, countable, comparable, help, math)
535
535
  // console.log('config.config.hierarchy', JSON.stringify(config.config.hierarchy, null, 2))
536
536
  // console.log('config.hierarchy', config.hierarchy)
537
- config.api = api
538
- config.restart_auto_rebuild()
537
+ await config.setApi(api)
538
+ await config.restart_auto_rebuild()
539
539
  return config
540
540
  }
541
541
 
@@ -1984,28 +1984,6 @@
1984
1984
  1
1985
1985
  ]
1986
1986
  ],
1987
- [
1988
- [
1989
- "is",
1990
- 0
1991
- ],
1992
- [
1993
- "list",
1994
- 0
1995
- ],
1996
- [
1997
- "pokemon",
1998
- 0
1999
- ],
2000
- [
2001
- "unknown",
2002
- 0
2003
- ],
2004
- [
2005
- "unknown",
2006
- 1
2007
- ]
2008
- ],
2009
1987
  [
2010
1988
  [
2011
1989
  "is",
@@ -13567,28 +13545,6 @@
13567
13545
  1
13568
13546
  ]
13569
13547
  ],
13570
- [
13571
- [
13572
- "is",
13573
- 0
13574
- ],
13575
- [
13576
- "list",
13577
- 0
13578
- ],
13579
- [
13580
- "pokemon",
13581
- 0
13582
- ],
13583
- [
13584
- "unknown",
13585
- 0
13586
- ],
13587
- [
13588
- "unknown",
13589
- 1
13590
- ]
13591
- ],
13592
13548
  [
13593
13549
  [
13594
13550
  "is",
package/common/pokemon.js CHANGED
@@ -29,7 +29,7 @@ const template = {
29
29
  // 'ashe owns pikachu who owns pikachu'
30
30
  // TODO does ashe own pikachu / ash owns pikachu? / 'ashe likes pikachu does ashe like pikachu'
31
31
 
32
- const createConfig = () => {
32
+ const createConfig = async () => {
33
33
  const config = new Config({
34
34
  name: 'pokemon',
35
35
  hierarchy: [
@@ -40,7 +40,7 @@ const createConfig = () => {
40
40
  ],
41
41
  })
42
42
  config.stop_auto_rebuild()
43
- config.add(hierarchy())
43
+ await config.add(hierarchy)
44
44
  config.initializer( ({config, apis}) => {
45
45
  const api = apis('properties')
46
46
  /*
@@ -62,7 +62,7 @@ const createConfig = () => {
62
62
  config
63
63
  })
64
64
  })
65
- config.restart_auto_rebuild()
65
+ await config.restart_auto_rebuild()
66
66
  // config.load(template, pokemon_instance)
67
67
  return config
68
68
  }
package/common/pos.js CHANGED
@@ -36,7 +36,7 @@ let configStruct = {
36
36
 
37
37
  };
38
38
 
39
- createConfig = () => new Config(configStruct, module)
39
+ createConfig = async () => new Config(configStruct, module)
40
40
 
41
41
  knowledgeModule( {
42
42
  module,
@@ -14,9 +14,9 @@ const template = {
14
14
  ],
15
15
  }
16
16
 
17
- const createConfig = () => {
17
+ const createConfig = async () => {
18
18
  const config = new Config({ name: 'pressure' }, module)
19
- config.add(dimension())
19
+ await config.add(dimension)
20
20
  return config
21
21
  }
22
22
 
@@ -690,12 +690,12 @@ let configStruct = {
690
690
  ]
691
691
  };
692
692
 
693
- const createConfig = () => {
693
+ const createConfig = async () => {
694
694
  const config = new Config(configStruct, module)
695
695
  config.stop_auto_rebuild()
696
- config.api = api
697
- config.add(concept(), meta(), dialogues())
698
- config.restart_auto_rebuild()
696
+ await config.setApi(api)
697
+ await config.add(concept, meta, dialogues)
698
+ await config.restart_auto_rebuild()
699
699
  return config
700
700
  }
701
701
 
@@ -50,7 +50,7 @@ let configStruct = {
50
50
  ],
51
51
  };
52
52
 
53
- const createConfig = () => new Config(configStruct, module).add(gdefaults())
53
+ const createConfig = async () => new Config(configStruct, module).add(gdefaults)
54
54
 
55
55
  knowledgeModule( {
56
56
  module,