tpmkms_4wp 8.0.0-beta.2 → 8.0.0-beta.21

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 (84) hide show
  1. package/common/animals.instance.json +2542 -1375
  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 +6646 -3501
  6. package/common/colors.js +2 -2
  7. package/common/colors.test.json +345 -780
  8. package/common/comparable.js +2 -2
  9. package/common/concept.js +8 -6
  10. package/common/countable.js +2 -2
  11. package/common/crew.instance.json +12534 -6597
  12. package/common/crew.js +3 -3
  13. package/common/crew.test.json +714 -452
  14. package/common/currency.js +4 -4
  15. package/common/dialogues.js +5 -21
  16. package/common/dimension.instance.json +242 -261
  17. package/common/dimension.js +4 -4
  18. package/common/dimension.test.json +314 -502
  19. package/common/edible.instance.json +19282 -9954
  20. package/common/edible.js +2 -2
  21. package/common/emotions.instance.json +122 -129
  22. package/common/emotions.js +3 -3
  23. package/common/events.js +3 -3
  24. package/common/fastfood.instance.json +219367 -111011
  25. package/common/fastfood.js +4 -4
  26. package/common/formulas.instance.json +216 -250
  27. package/common/formulas.js +6 -6
  28. package/common/gdefaults.js +2 -2
  29. package/common/help.js +3 -3
  30. package/common/help.test.json +10 -22
  31. package/common/helpers/concept.js +9 -6
  32. package/common/hierarchy.js +3 -3
  33. package/common/javascript.js +3 -3
  34. package/common/kirk.instance.json +564 -290
  35. package/common/kirk.js +2 -2
  36. package/common/length.instance.json +5153 -4677
  37. package/common/length.js +2 -2
  38. package/common/math.instance.json +140 -1157
  39. package/common/math.js +6 -6
  40. package/common/meta.js +3 -3
  41. package/common/negation.instance.json +2 -0
  42. package/common/negation.js +38 -0
  43. package/common/negation.test.json +308 -0
  44. package/common/numbers.js +3 -3
  45. package/common/ordering.instance.json +292 -230
  46. package/common/ordering.js +4 -4
  47. package/common/people.instance.json +1902 -1015
  48. package/common/people.js +3 -3
  49. package/common/percentages.instance.json +2 -0
  50. package/common/percentages.js +57 -0
  51. package/common/percentages.test.json +751 -0
  52. package/common/pipboy.instance.json +7718 -6328
  53. package/common/pipboy.js +4 -4
  54. package/common/pokemon.instance.json +3954 -2081
  55. package/common/pokemon.js +3 -3
  56. package/common/pos.js +1 -1
  57. package/common/pressure.instance.json +1265 -1193
  58. package/common/pressure.js +2 -2
  59. package/common/properties.instance.json +106 -61
  60. package/common/properties.js +6 -4
  61. package/common/punctuation.js +1 -1
  62. package/common/reports.instance.json +557 -559
  63. package/common/reports.js +11 -11
  64. package/common/scorekeeper.js +3 -3
  65. package/common/sdefaults.js +11 -1
  66. package/common/sizeable.js +2 -2
  67. package/common/spock.instance.json +564 -290
  68. package/common/spock.js +2 -2
  69. package/common/stgame.js +13 -9
  70. package/common/stm.js +3 -3
  71. package/common/tell.js +4 -4
  72. package/common/temperature.instance.json +1380 -1208
  73. package/common/temperature.js +2 -2
  74. package/common/tester.js +2 -2
  75. package/common/testing.js +2 -2
  76. package/common/time.js +4 -4
  77. package/common/tokenize.js +1 -1
  78. package/common/ui.instance.json +238 -259
  79. package/common/ui.js +4 -4
  80. package/common/weight.instance.json +4905 -4166
  81. package/common/weight.js +2 -2
  82. package/common/yesno.js +1 -1
  83. package/main.js +51 -46
  84. package/package.json +13 -6
@@ -102,7 +102,7 @@ let configStruct = {
102
102
  "(([expression]) [equals] ([expression]))",
103
103
  ],
104
104
  priorities: [
105
- { "context": [['mathematicalOperator', 0], ['number', 0], ], "choose": [0] },
105
+ { "context": [['mathematical_operator', 0], ['number', 0], ], "choose": [0] },
106
106
  ],
107
107
  semantics: [
108
108
  {
@@ -172,7 +172,7 @@ let configStruct = {
172
172
  id: 'equals',
173
173
  bridge: "{ ...next(operator), left: before[0], right: after[0] }",
174
174
  words: ['='],
175
- after: ['mathematicalOperator'],
175
+ after: ['mathematical_operator'],
176
176
  // TODO have this be per argument then 'is' can map to equals where this only applied to before[0] and not after[0]
177
177
  localHierarchy: [ ['unknown', 'expression'] ],
178
178
  generatorp: ({context, gp}) => `${gp(context.left)} ${context.word} ${gp(context.right)}`,
@@ -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
 
@@ -19,24 +19,6 @@
19
19
  0
20
20
  ]
21
21
  ],
22
- [
23
- [
24
- "help",
25
- 0
26
- ],
27
- [
28
- "km",
29
- 0
30
- ],
31
- [
32
- "list",
33
- 0
34
- ],
35
- [
36
- "withKM",
37
- 0
38
- ]
39
- ],
40
22
  [
41
23
  [
42
24
  "help",
@@ -216,6 +198,7 @@
216
198
  "gdefaults": "gdefaults2",
217
199
  "help": "help1",
218
200
  "meta": "meta2",
201
+ "negation": "negation2",
219
202
  "pos": "pos2",
220
203
  "punctuation": "punctuation2",
221
204
  "sdefaults": "sdefaults2",
@@ -236,6 +219,8 @@
236
219
  },
237
220
  "meta2": {
238
221
  },
222
+ "negation2": {
223
+ },
239
224
  "pos2": {
240
225
  },
241
226
  "punctuation2": {
@@ -361,7 +346,7 @@
361
346
  }
362
347
  ],
363
348
  "generatedParenthesized": [
364
- "( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n)"
349
+ "( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n NAME: negation\n DESCRIPTION: negation\n\n SAMPLE SENTENCES\n\n not negatable\n not negatables\n\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n)"
365
350
  ],
366
351
  "metadata": {
367
352
  "opChoices": [
@@ -386,6 +371,7 @@
386
371
  "gdefaults": "gdefaults2",
387
372
  "help": "help1",
388
373
  "meta": "meta2",
374
+ "negation": "negation2",
389
375
  "pos": "pos2",
390
376
  "punctuation": "punctuation2",
391
377
  "sdefaults": "sdefaults2",
@@ -406,6 +392,8 @@
406
392
  },
407
393
  "meta2": {
408
394
  },
395
+ "negation2": {
396
+ },
409
397
  "pos2": {
410
398
  },
411
399
  "punctuation2": {
@@ -440,11 +428,11 @@
440
428
  "value": "help",
441
429
  "word": "help"
442
430
  },
443
- "generatedParenthesized": "( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n)",
431
+ "generatedParenthesized": "( NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n NAME: negation\n DESCRIPTION: negation\n\n SAMPLE SENTENCES\n\n not negatable\n not negatables\n\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n)",
444
432
  "paraphrases": "help",
445
433
  "paraphrasesParenthesized": "(help)",
446
434
  "responses": [
447
- " NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
435
+ " NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n NAME: negation\n DESCRIPTION: negation\n\n SAMPLE SENTENCES\n\n not negatable\n not negatables\n\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
448
436
  ]
449
437
  }
450
438
  ]
@@ -457,7 +445,7 @@
457
445
  ],
458
446
  "query": "help",
459
447
  "responses": [
460
- " NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
448
+ " NAME: help\n DESCRIPTION: Help the user with the current knowledge modules\n\n SAMPLE SENTENCES\n\n help with help and dialogues\n help\n\n NAME: dialogues\n DESCRIPTION: framework for dialogues\n\n SAMPLE SENTENCES\n\n 1 2 and 3\n be brief\n be brief greg\n is x y\n no\n what is it\n x is y?\n yes\n x is 3 what is x\n x is 3 what is x what is it\n be brief x is 3 what is x what is it\n to it\n why\n nevermindTestSetup accept nevermind hi\n nevermindTestSetup reject nevermind hi\n setidsuffix greg\n setidsuffix greg resetidsuffix\n setidsuffix greg makeObject banana\\nbanana\n setidsuffix _suffy\n\n\n NAME: negation\n DESCRIPTION: negation\n\n SAMPLE SENTENCES\n\n not negatable\n not negatables\n\n\n NAME: meta\n DESCRIPTION: Ways of defining new language elements\n\n SAMPLE SENTENCES\n\n a means b\n a means x\n if f then g gq\n undefined means defined\n\n NAME: punctuation\n DESCRIPTION: punctuation\n\n SAMPLE SENTENCES\n\n (a)\n :\n \"hi man\"\n\n\n\n NAME: tokenize\n DESCRIPTION: tokenize\n\n SAMPLE SENTENCES\n\n hello_world\n"
461
449
  ]
462
450
  }
463
451
  ]
@@ -34,10 +34,9 @@ class API {
34
34
  // TODO make the modifiers objects then below for add words for modifiers only do if !unknown
35
35
  // const objectId = pluralize.singular(object)
36
36
  const objectId = this.args.kms.dialogues.api.toScopedId(object)
37
-
38
37
  // const modifierIds = modifiers.map( (modifier) => pluralize.singular(modifier) )
39
38
  const modifierIds = modifiers.map( (modifier) => this.args.kms.dialogues.api.toScopedId(modifier) )
40
- const modifiersObjectId = `${modifiers.join("_")}_${objectId}`
39
+ const modifiersObjectId = `${modifierIds.join("_")}_${objectId}`
41
40
 
42
41
  const toWord = (object) => {
43
42
  if (typeof object == 'string') {
@@ -76,11 +75,14 @@ class API {
76
75
  config.addWord(objectPlural, { id: objectId, initial: `{ value: '${objectId}', number: 'many' }`})
77
76
  }
78
77
 
79
- zip(modifiers, modifierIds).forEach(([modifierWord, modifierId]) => {
78
+ zip(modifiers, modifierIds).forEach(([modifier, modifierId]) => {
80
79
  // config.addWord(modifier, { id: modifierId, initial: `{ value: '${modifierId}' }`})
81
80
  // TODO call evaluator to pick up overrides
82
- config.addWord(pluralize.singular(modifierWord), { id: modifierId, initial: `{ value: '${modifierId}', number: 'one' }`})
83
- config.addWord(pluralize.plural(modifierWord), { id: modifierId, initial: `{ value: '${modifierId}', number: 'many' }`})
81
+ if (modifier.unknown) {
82
+ const modifierWord = modifier.text
83
+ config.addWord(pluralize.singular(modifierWord), { id: modifierId, initial: `{ value: '${modifierId}', number: 'one' }`})
84
+ config.addWord(pluralize.plural(modifierWord), { id: modifierId, initial: `{ value: '${modifierId}', number: 'many' }`})
85
+ }
84
86
  })
85
87
  // modifierds.forEach((modifierId) => config.addWord(modifierId, { id: modifierId, initial: `{ value: '${modifierId}' }`}))
86
88
 
@@ -94,7 +96,8 @@ class API {
94
96
  id: modifiersObjectId,
95
97
  level: 0,
96
98
  convolution: true,
97
- isA: ['adjective'],
99
+ isA: [{ parent: 'adjective', instance: true }],
100
+ // isA: ['adjective'],
98
101
  before: ['verby'],
99
102
  bridge: `{ ...after[0], ${modifierProperties}, atomic: true, dead: true, marker: next(operator('${modifiersObjectId}')), value: '${modifiersObjectId}', modifiers: append([${modifierList}], after[0].modifiers)}`,
100
103
  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