tpmkms 8.0.0-beta.42 → 8.0.0-beta.44

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.
Files changed (66) hide show
  1. package/common/animals.js +17 -20
  2. package/common/articles.js +6 -11
  3. package/common/avatar.js +5 -9
  4. package/common/characters.js +22 -26
  5. package/common/colors.instance.json +28 -0
  6. package/common/colors.js +4 -8
  7. package/common/comparable.js +5 -9
  8. package/common/concept.js +120 -124
  9. package/common/countable.js +5 -9
  10. package/common/crew.js +36 -41
  11. package/common/currency.js +25 -43
  12. package/common/dialogues.js +46 -49
  13. package/common/dimension.instance.json +8 -8
  14. package/common/dimension.js +7 -13
  15. package/common/edible.instance.json +112 -0
  16. package/common/edible.js +3 -8
  17. package/common/emotions.js +35 -38
  18. package/common/evaluate.js +5 -11
  19. package/common/events.js +6 -10
  20. package/common/fastfood.instance.json +401 -317
  21. package/common/fastfood.js +53 -63
  22. package/common/formulas.instance.json +10 -10
  23. package/common/formulas.js +7 -14
  24. package/common/gdefaults.js +8 -10
  25. package/common/help.js +7 -12
  26. package/common/hierarchy.js +8 -12
  27. package/common/javascript.js +7 -14
  28. package/common/kirk.js +5 -8
  29. package/common/length.js +4 -8
  30. package/common/listener.js +5 -11
  31. package/common/math.instance.json +16 -16
  32. package/common/math.js +6 -10
  33. package/common/meta.js +5 -22
  34. package/common/nameable.js +6 -13
  35. package/common/negation.js +5 -5
  36. package/common/numbers.js +5 -9
  37. package/common/ordering.instance.json +68 -0
  38. package/common/ordering.js +80 -86
  39. package/common/people.js +8 -12
  40. package/common/percentages.js +5 -9
  41. package/common/pipboy.instance.json +84 -28
  42. package/common/pipboy.js +7 -15
  43. package/common/pokemon.js +7 -20
  44. package/common/pos.js +4 -5
  45. package/common/pressure.js +4 -8
  46. package/common/properties.js +6 -12
  47. package/common/punctuation.js +5 -5
  48. package/common/reports.instance.json +1 -1
  49. package/common/reports.js +9 -14
  50. package/common/scorekeeper.js +8 -12
  51. package/common/sdefaults.js +4 -5
  52. package/common/sizeable.js +5 -9
  53. package/common/spock.js +5 -8
  54. package/common/stgame.js +18 -23
  55. package/common/stm.js +9 -15
  56. package/common/tell.js +9 -13
  57. package/common/temperature.instance.json +0 -112
  58. package/common/temperature.js +4 -8
  59. package/common/tester.js +1 -1
  60. package/common/testing.js +5 -9
  61. package/common/time.js +18 -23
  62. package/common/tokenize.js +4 -5
  63. package/common/ui.js +6 -12
  64. package/common/weight.js +4 -8
  65. package/common/yesno.js +5 -5
  66. package/package.json +2 -2
@@ -1,9 +1,9 @@
1
- const { Config, knowledgeModule, where } = require('./runtime').theprogrammablemind
1
+ const { knowledgeModule, where } = require('./runtime').theprogrammablemind
2
2
  const { defaultContextCheck } = require('./helpers')
3
3
  const percentages_tests = require('./percentages.test.json')
4
4
  const numbers = require('./numbers')
5
5
 
6
- let configStruct = {
6
+ let config = {
7
7
  name: 'percentages',
8
8
  operators: [
9
9
  "((number/*) [percent])",
@@ -36,15 +36,11 @@ let configStruct = {
36
36
  version: '3',
37
37
  };
38
38
 
39
- const createConfig = async () => {
40
- const config = new Config(configStruct, module)
41
- await config.add(numbers)
42
- return config
43
- }
44
-
45
39
  knowledgeModule( {
40
+ config,
41
+ includes: [numbers],
42
+
46
43
  module,
47
- createConfig,
48
44
  description: 'talking about percentages',
49
45
  test: {
50
46
  name: './percentages.test.json',
@@ -105,7 +105,7 @@
105
105
  ],
106
106
  "bridges": [
107
107
  {
108
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:153",
108
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
109
109
  "id": "put",
110
110
  "isA": [
111
111
  "verby"
@@ -115,7 +115,7 @@
115
115
  "generatorp": "({context}) => `put on`"
116
116
  },
117
117
  {
118
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:161",
118
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
119
119
  "id": "propertyCondition",
120
120
  "before": [
121
121
  "adjective",
@@ -127,7 +127,7 @@
127
127
  "bridge": "{ ...next(after[0]), condition: before[0], modifiers: ['condition'] }"
128
128
  },
129
129
  {
130
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:169",
130
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
131
131
  "id": "on",
132
132
  "isA": [
133
133
  "preposition"
@@ -138,7 +138,7 @@
138
138
  "semantic": "({api, context}) => {\n api.change(context.item.marker)\n }"
139
139
  },
140
140
  {
141
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:180",
141
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
142
142
  "id": "change",
143
143
  "isA": [
144
144
  "verby"
@@ -155,7 +155,7 @@
155
155
  "semantic": "({api, context}) => {\n api.change(context.item.marker)\n }"
156
156
  },
157
157
  {
158
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:192",
158
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
159
159
  "id": "disarm",
160
160
  "isA": [
161
161
  "verby"
@@ -166,7 +166,7 @@
166
166
  "semantic": "({api, context}) => {\n api.disarm()\n }"
167
167
  },
168
168
  {
169
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:203",
169
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
170
170
  "id": "strip",
171
171
  "isA": [
172
172
  "verby"
@@ -177,7 +177,7 @@
177
177
  "semantic": "({api, context}) => {\n api.strip()\n }"
178
178
  },
179
179
  {
180
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:214",
180
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
181
181
  "id": "call",
182
182
  "isA": [
183
183
  "verby"
@@ -188,7 +188,7 @@
188
188
  "semantic": "({api, context}) => {\n api.setName(context.item, context.name.name.value)\n }"
189
189
  },
190
190
  {
191
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:225",
191
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
192
192
  "id": "putOn",
193
193
  "isA": [
194
194
  "verby"
@@ -199,7 +199,7 @@
199
199
  "semantic": "({api, context}) => {\n if (context.item.name) {\n api.wear({ name: context.item.name.value, type: 'outfit' })\n } else {\n api.wear({ type: context.item.value })\n }\n }"
200
200
  },
201
201
  {
202
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:240",
202
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
203
203
  "id": "wear",
204
204
  "isA": [
205
205
  "verby"
@@ -213,7 +213,7 @@
213
213
  "semantic": "({api, context}) => {\n if (context.item.name) {\n api.wear({ name: context.item.name.value, type: 'outfit' })\n } else {\n api.wear({ type: context.item.value })\n }\n }"
214
214
  },
215
215
  {
216
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:256",
216
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
217
217
  "id": "equip",
218
218
  "isA": [
219
219
  "verby"
@@ -234,7 +234,7 @@
234
234
  "semantic": "async ({api, context}) => {\n let condition\n if (context.item.condition) {\n condition = { selector: context.item.condition.marker, property: context.item.condition.property[0].marker }\n }\n api.equip({ type: context.item.value, condition })\n }"
235
235
  },
236
236
  {
237
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:272",
237
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
238
238
  "id": "toDrink",
239
239
  "isA": [
240
240
  "verby"
@@ -245,7 +245,7 @@
245
245
  "semantic": "async ({api, context, e}) => {\n const value = await e(context.item)\n api.drink(value.value)\n }"
246
246
  },
247
247
  {
248
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:284",
248
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
249
249
  "id": "eat",
250
250
  "isA": [
251
251
  "verby"
@@ -256,7 +256,7 @@
256
256
  "semantic": "async ({api, context}) => {\n api.eat(context.item.value)\n }"
257
257
  },
258
258
  {
259
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:295",
259
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
260
260
  "id": "take",
261
261
  "isA": [
262
262
  "verby"
@@ -267,7 +267,7 @@
267
267
  "semantic": "async ({api, context, e}) => {\n const value = await e(context.item)\n api.take(value.value)\n }"
268
268
  },
269
269
  {
270
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:307",
270
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
271
271
  "id": "nameable",
272
272
  "isA": [
273
273
  "theAble"
@@ -1497,6 +1497,20 @@
1497
1497
  1
1498
1498
  ]
1499
1499
  ],
1500
+ [
1501
+ [
1502
+ "is",
1503
+ 0
1504
+ ],
1505
+ [
1506
+ "list",
1507
+ 1
1508
+ ],
1509
+ [
1510
+ "unknown",
1511
+ 1
1512
+ ]
1513
+ ],
1500
1514
  [
1501
1515
  [
1502
1516
  "is",
@@ -7064,6 +7078,20 @@
7064
7078
  1
7065
7079
  ]
7066
7080
  ],
7081
+ [
7082
+ [
7083
+ "is",
7084
+ 0
7085
+ ],
7086
+ [
7087
+ "list",
7088
+ 1
7089
+ ],
7090
+ [
7091
+ "unknown",
7092
+ 1
7093
+ ]
7094
+ ],
7067
7095
  [
7068
7096
  [
7069
7097
  "is",
@@ -24923,7 +24951,7 @@
24923
24951
  ],
24924
24952
  "bridges": [
24925
24953
  {
24926
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:153",
24954
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
24927
24955
  "id": "put",
24928
24956
  "isA": [
24929
24957
  "verby"
@@ -24932,7 +24960,7 @@
24932
24960
  "bridge": "{ ...next(operator) }"
24933
24961
  },
24934
24962
  {
24935
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:161",
24963
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
24936
24964
  "id": "propertyCondition",
24937
24965
  "before": [
24938
24966
  "adjective",
@@ -24944,7 +24972,7 @@
24944
24972
  "bridge": "{ ...next(after[0]), condition: before[0], modifiers: ['condition'] }"
24945
24973
  },
24946
24974
  {
24947
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:169",
24975
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
24948
24976
  "id": "on",
24949
24977
  "isA": [
24950
24978
  "preposition"
@@ -24953,7 +24981,7 @@
24953
24981
  "bridge": "{ ...before, marker: operator('putOn', 0), dead: false }"
24954
24982
  },
24955
24983
  {
24956
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:180",
24984
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
24957
24985
  "id": "change",
24958
24986
  "isA": [
24959
24987
  "verby"
@@ -24968,7 +24996,7 @@
24968
24996
  ]
24969
24997
  },
24970
24998
  {
24971
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:192",
24999
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
24972
25000
  "id": "disarm",
24973
25001
  "isA": [
24974
25002
  "verby"
@@ -24977,7 +25005,7 @@
24977
25005
  "bridge": "{ ...next(operator) }"
24978
25006
  },
24979
25007
  {
24980
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:203",
25008
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
24981
25009
  "id": "strip",
24982
25010
  "isA": [
24983
25011
  "verby"
@@ -24986,7 +25014,7 @@
24986
25014
  "bridge": "{ ...next(operator) }"
24987
25015
  },
24988
25016
  {
24989
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:214",
25017
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
24990
25018
  "id": "call",
24991
25019
  "isA": [
24992
25020
  "verby"
@@ -24995,7 +25023,7 @@
24995
25023
  "bridge": "{ ...next(operator), item: after[0], name: after[1] }"
24996
25024
  },
24997
25025
  {
24998
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:225",
25026
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
24999
25027
  "id": "putOn",
25000
25028
  "isA": [
25001
25029
  "verby"
@@ -25004,7 +25032,7 @@
25004
25032
  "bridge": "{ ...next(operator), item: after[0] }"
25005
25033
  },
25006
25034
  {
25007
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:240",
25035
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
25008
25036
  "id": "wear",
25009
25037
  "isA": [
25010
25038
  "verby"
@@ -25016,7 +25044,7 @@
25016
25044
  "bridge": "{ ...next(operator), item: after[0] }"
25017
25045
  },
25018
25046
  {
25019
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:256",
25047
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
25020
25048
  "id": "equip",
25021
25049
  "isA": [
25022
25050
  "verby"
@@ -25035,7 +25063,7 @@
25035
25063
  "bridge": "{ ...next(operator), item: after[0] }"
25036
25064
  },
25037
25065
  {
25038
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:272",
25066
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
25039
25067
  "id": "toDrink",
25040
25068
  "isA": [
25041
25069
  "verby"
@@ -25044,7 +25072,7 @@
25044
25072
  "bridge": "{ ...next(operator), item: after[0] }"
25045
25073
  },
25046
25074
  {
25047
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:284",
25075
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
25048
25076
  "id": "eat",
25049
25077
  "isA": [
25050
25078
  "verby"
@@ -25053,7 +25081,7 @@
25053
25081
  "bridge": "{ ...next(operator), item: after[0] }"
25054
25082
  },
25055
25083
  {
25056
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:295",
25084
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
25057
25085
  "id": "take",
25058
25086
  "isA": [
25059
25087
  "verby"
@@ -25062,7 +25090,7 @@
25062
25090
  "bridge": "{ ...next(operator), item: after[0] }"
25063
25091
  },
25064
25092
  {
25065
- "where": "/home/dev/code/theprogrammablemind/kms/common/pipboy.js:307",
25093
+ "where": "/home/dev/code/theprogrammablemind/kms/node_modules/theprogrammablemind/src/helpers.js:5",
25066
25094
  "id": "nameable",
25067
25095
  "isA": [
25068
25096
  "theAble"
@@ -26127,6 +26155,34 @@
26127
26155
  1
26128
26156
  ]
26129
26157
  ],
26158
+ [
26159
+ [
26160
+ "is",
26161
+ 0
26162
+ ],
26163
+ [
26164
+ "list",
26165
+ 1
26166
+ ],
26167
+ [
26168
+ "unknown",
26169
+ 1
26170
+ ]
26171
+ ],
26172
+ [
26173
+ [
26174
+ "is",
26175
+ 0
26176
+ ],
26177
+ [
26178
+ "list",
26179
+ 1
26180
+ ],
26181
+ [
26182
+ "unknown",
26183
+ 1
26184
+ ]
26185
+ ],
26130
26186
  [
26131
26187
  [
26132
26188
  "is",
package/common/pipboy.js CHANGED
@@ -1,4 +1,4 @@
1
- const { Config, knowledgeModule, where, Digraph } = require('./runtime').theprogrammablemind
1
+ const { knowledgeModule, where, Digraph } = require('./runtime').theprogrammablemind
2
2
  const { defaultContextCheck } = require('./helpers')
3
3
  const hierarchy = require('./hierarchy')
4
4
  const countable = require('./countable')
@@ -100,7 +100,7 @@ class API {
100
100
  }
101
101
  const api = new API()
102
102
 
103
- let configStruct = {
103
+ let config = {
104
104
  name: 'pipboy',
105
105
  // TODO mark default as local scope
106
106
  operators: [
@@ -521,25 +521,17 @@ const template = {
521
521
  "medicine and stimpaks are takeable",
522
522
  "item modifies properties",
523
523
  "damage luck hp rads value ap charisma range and accuracy are item properties",
524
- configStruct,
524
+ config,
525
525
  ]
526
526
  }
527
527
 
528
- const createConfig = async () => {
529
- const config = new Config({ name: 'pipboy' }, module)
530
- config.stop_auto_rebuild()
531
- await config.add(hierarchy, countable, comparable, help, math)
532
- // console.log('config.config.hierarchy', JSON.stringify(config.config.hierarchy, null, 2))
533
- // console.log('config.hierarchy', config.hierarchy)
534
- await config.setApi(api)
535
- await config.restart_auto_rebuild()
536
- return config
537
- }
538
-
539
528
  knowledgeModule({
529
+ config: { name: 'pipboy' },
530
+ includes: [hierarchy, countable, comparable, help, math],
531
+ api: () => new API(),
532
+
540
533
  module,
541
534
  description: 'Control a pipboy with speech',
542
- createConfig,
543
535
  template: { template, instance },
544
536
  test: {
545
537
  name: './pipboy.test.json',
package/common/pokemon.js CHANGED
@@ -1,4 +1,4 @@
1
- const { Config, knowledgeModule, where } = require('./runtime').theprogrammablemind
1
+ const { knowledgeModule, where } = require('./runtime').theprogrammablemind
2
2
  const { defaultContextCheck } = require('./helpers')
3
3
  const hierarchy = require('./hierarchy')
4
4
  const pokemon_tests = require('./pokemon.test.json')
@@ -29,19 +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 = async () => {
33
- const config = new Config({
34
- name: 'pokemon',
35
- hierarchy: [
36
- // ['pokemon', 'theAble'],
37
- // ['pokemon', 'theAble'],
38
- // ['pokemon', 'queryable'],
39
- // ['pokemon', 'whatAble'],
40
- ],
41
- })
42
- config.stop_auto_rebuild()
43
- await config.add(hierarchy)
44
- await config.initializer( ({config, apis}) => {
32
+ const initializer = ({config, apis}) => {
45
33
  const api = apis('properties')
46
34
  /*
47
35
  api.createActionPrefix({
@@ -61,16 +49,15 @@ const createConfig = async () => {
61
49
  relation: true,
62
50
  config
63
51
  })
64
- })
65
- await config.restart_auto_rebuild()
66
- // config.load(template, pokemon_instance)
67
- return config
68
- }
52
+ }
69
53
 
70
54
  knowledgeModule( {
55
+ config: { name: 'pokemon' },
56
+ includes: [hierarchy],
57
+ initializer,
58
+
71
59
  module,
72
60
  description: 'Knowledge about the pokemon using a KM template',
73
- createConfig,
74
61
  test: {
75
62
  name: './pokemon.test.json',
76
63
  contents: pokemon_tests,
package/common/pos.js CHANGED
@@ -1,8 +1,8 @@
1
- const { Config, knowledgeModule, where } = require('./runtime').theprogrammablemind
1
+ const { knowledgeModule, where } = require('./runtime').theprogrammablemind
2
2
  const { defaultContextCheck } = require('./helpers')
3
3
  const pos_tests = require('./pos.test.json')
4
4
 
5
- let configStruct = {
5
+ let config = {
6
6
  name: 'pos',
7
7
  operators: [
8
8
  "([adjective])",
@@ -36,11 +36,10 @@ let configStruct = {
36
36
 
37
37
  };
38
38
 
39
- createConfig = async () => new Config(configStruct, module)
40
-
41
39
  knowledgeModule( {
40
+ config,
41
+
42
42
  module,
43
- createConfig,
44
43
  description: 'parts of speech',
45
44
  test: {
46
45
  name: './pos.test.json',
@@ -1,4 +1,4 @@
1
- const { Config, knowledgeModule, where, Digraph } = require('./runtime').theprogrammablemind
1
+ const { knowledgeModule, where, Digraph } = require('./runtime').theprogrammablemind
2
2
  const { defaultContextCheck } = require('./helpers')
3
3
  const dimension = require('./dimension.js')
4
4
  const pressure_tests = require('./pressure.test.json')
@@ -14,16 +14,12 @@ const template = {
14
14
  ],
15
15
  }
16
16
 
17
- const createConfig = async () => {
18
- const config = new Config({ name: 'pressure' }, module)
19
- await config.add(dimension)
20
- return config
21
- }
22
-
23
17
  knowledgeModule({
18
+ config: { name: 'pressure' },
19
+ includes: [dimension],
20
+
24
21
  module,
25
22
  description: 'Pressure dimension',
26
- createConfig,
27
23
  test: {
28
24
  name: './pressure.test.json',
29
25
  contents: pressure_tests
@@ -1,4 +1,4 @@
1
- const { Config, knowledgeModule, where } = require('./runtime').theprogrammablemind
1
+ const { knowledgeModule, where } = require('./runtime').theprogrammablemind
2
2
  const { defaultContextCheck } = require('./helpers')
3
3
  const dialogues = require('./dialogues')
4
4
  const meta = require('./meta')
@@ -79,7 +79,7 @@ const template = {
79
79
 
80
80
  const api = new API();
81
81
 
82
- let configStruct = {
82
+ let config = {
83
83
  name: 'properties',
84
84
  operators: [
85
85
  "([hierarchyAble|])",
@@ -617,19 +617,13 @@ let configStruct = {
617
617
  ]
618
618
  };
619
619
 
620
- const createConfig = async () => {
621
- const config = new Config(configStruct, module)
622
- config.stop_auto_rebuild()
623
- await config.setApi(api)
624
- await config.add(concept, meta, dialogues)
625
- await config.restart_auto_rebuild()
626
- return config
627
- }
628
-
629
620
  knowledgeModule( {
621
+ config,
622
+ api: () => new API(),
623
+ includes: [concept, meta, dialogues],
624
+
630
625
  module,
631
626
  description: 'properties of objects',
632
- createConfig,
633
627
  test: {
634
628
  name: './properties.test.json',
635
629
  contents: properties_tests,
@@ -1,9 +1,9 @@
1
- const { Config, knowledgeModule, where } = require('./runtime').theprogrammablemind
1
+ const { knowledgeModule, where } = require('./runtime').theprogrammablemind
2
2
  const { defaultContextCheck } = require('./helpers')
3
3
  const gdefaults = require('./gdefaults')
4
4
  const punctuation_tests = require('./punctuation.test.json')
5
5
 
6
- let configStruct = {
6
+ let config = {
7
7
  name: 'punctuation',
8
8
  operators: [
9
9
  "([leftParenthesis|] (phrase) ([rightParenthesis|]))",
@@ -50,11 +50,11 @@ let configStruct = {
50
50
  ],
51
51
  };
52
52
 
53
- const createConfig = async () => new Config(configStruct, module).add(gdefaults)
54
-
55
53
  knowledgeModule( {
54
+ config,
55
+ includes: [gdefaults],
56
+
56
57
  module,
57
- createConfig,
58
58
  description: 'punctuation',
59
59
  test: {
60
60
  name: './punctuation.test.json',