tpmkms 9.8.0 → 9.9.0

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 (95) hide show
  1. package/common/actions.instance.json +10 -8
  2. package/common/actions.js +13 -11
  3. package/common/angle.instance.json +25 -17
  4. package/common/animals.instance.json +54 -28
  5. package/common/askfor.instance.json +89 -192
  6. package/common/askfor.js +49 -12
  7. package/common/asking.js +13 -5
  8. package/common/avatar.js +3 -3
  9. package/common/can.instance.json +32 -20
  10. package/common/can.js +2 -2
  11. package/common/colors.instance.json +44 -16
  12. package/common/colors.js +1 -1
  13. package/common/comparable.instance.json +25 -22
  14. package/common/compass.instance.json +9 -3
  15. package/common/concept.instance.json +14 -6
  16. package/common/concept.js +2 -0
  17. package/common/conjunction.js +17 -9
  18. package/common/control.js +10 -18
  19. package/common/countable.js +4 -3
  20. package/common/crew.instance.json +95 -27
  21. package/common/dateTimeSelectors.instance.json +4 -4
  22. package/common/dateTimeSelectors.js +4 -7
  23. package/common/dates.instance.json +52 -28
  24. package/common/dates.js +16 -11
  25. package/common/debug.instance.json +48 -0
  26. package/common/debug.js +50 -0
  27. package/common/debug.test.json +1 -0
  28. package/common/dialogues.js +126 -70
  29. package/common/dimension.instance.json +239 -495
  30. package/common/dimension.js +51 -9
  31. package/common/drone.instance.json +395 -84
  32. package/common/drone.js +43 -50
  33. package/common/drone_v1.instance.json +36 -12
  34. package/common/drone_v1.js +14 -9
  35. package/common/edible.instance.json +96 -32
  36. package/common/emotions.instance.json +15 -1
  37. package/common/evaluate.js +10 -13
  38. package/common/fastfood.instance.json +282 -100
  39. package/common/fastfood.js +30 -15
  40. package/common/formulas.instance.json +162 -24
  41. package/common/formulas.js +18 -9
  42. package/common/gdefaults.js +20 -96
  43. package/common/helpers/concept.js +2 -9
  44. package/common/helpers/conjunction.js +11 -1
  45. package/common/helpers/dialogues.js +48 -24
  46. package/common/helpers/gdefaults.js +15 -5
  47. package/common/helpers/properties.js +125 -326
  48. package/common/helpers.js +28 -58
  49. package/common/hierarchy.js +71 -41
  50. package/common/kirk.instance.json +3 -1
  51. package/common/latin.instance.json +10 -10
  52. package/common/latin.js +5 -5
  53. package/common/length.instance.json +247 -61
  54. package/common/math.instance.json +144 -5
  55. package/common/math.js +18 -5
  56. package/common/menus.instance.json +29 -11
  57. package/common/menus.js +8 -5
  58. package/common/meta.js +14 -13
  59. package/common/nameable.js +9 -5
  60. package/common/numbers.instance.json +5 -3
  61. package/common/numbers.js +28 -28
  62. package/common/ordering.instance.json +53 -4
  63. package/common/ordinals.js +25 -25
  64. package/common/people.instance.json +66 -12
  65. package/common/percentages.js +4 -2
  66. package/common/pipboy.instance.json +89 -44
  67. package/common/pipboy.js +21 -14
  68. package/common/pokemon.instance.json +39 -13
  69. package/common/pressure.instance.json +14 -6
  70. package/common/properties.instance.json +2370 -511
  71. package/common/properties.js +496 -78
  72. package/common/punctuation.js +1 -0
  73. package/common/rates.instance.json +2 -2
  74. package/common/rates.js +3 -3
  75. package/common/reminders.instance.json +16 -0
  76. package/common/reminders.js +24 -20
  77. package/common/reports.instance.json +11 -12
  78. package/common/reports.js +12 -12
  79. package/common/scorekeeper.js +20 -10
  80. package/common/sdefaults.js +30 -9
  81. package/common/spock.instance.json +3 -1
  82. package/common/stm.js +16 -21
  83. package/common/temperature.instance.json +19 -11
  84. package/common/testing.js +2 -2
  85. package/common/time.instance.json +104 -47
  86. package/common/time.js +9 -8
  87. package/common/ui.instance.json +4 -2
  88. package/common/ui.js +5 -5
  89. package/common/weight.instance.json +86 -21
  90. package/common/weight.js +5 -1
  91. package/common/words.js +113 -2
  92. package/common/wp.instance.json +125 -18
  93. package/common/wp.js +6 -2
  94. package/main.js +2 -0
  95. package/package.json +7 -3
package/common/reports.js CHANGED
@@ -194,7 +194,7 @@ const config = {
194
194
 
195
195
  generatorp: async ({context, gp}) => `move ${await gp(context.from)} ${await gp(context.to)}`,
196
196
  semantic: async ({context, e, objects, kms, insert}) => {
197
- const report = await e(context.on)
197
+ const report = await e(context.on, where())
198
198
  const id = report.value.value
199
199
  const listing = objects.listings[id]
200
200
 
@@ -222,7 +222,7 @@ const config = {
222
222
  bridge: "{ ...next(operator), on: { marker: 'report', pullFromContext: true }, removee: after[0] }",
223
223
  generatorp: async ({context, gp}) => `remove ${await gp(context.removee)}`,
224
224
  semantic: async ({context, e, kms, insert, objects}) => {
225
- const report = await e(context.on)
225
+ const report = await e(context.on, where())
226
226
  const id = report.value.value
227
227
  const listing = objects.listings[id]
228
228
  const column = context.removee.index.value
@@ -337,7 +337,7 @@ const config = {
337
337
  return `call ${await g(context.namee)} ${await gs(context.name)}`
338
338
  },
339
339
  semantic: async ({context, objects, e, config, km}) => {
340
- const namee = (await e(context.namee)).evalue
340
+ const namee = (await e(context.namee, where())).evalue
341
341
  const id = namee.value
342
342
  const listing = objects.listings[id]
343
343
  // const name = context.name.text
@@ -410,7 +410,7 @@ const config = {
410
410
  if (context.report) {
411
411
  return `show ${await gp(context.report)}`
412
412
  } else {
413
- const report = await e(context.on)
413
+ const report = await e(context.on, where())
414
414
  const id = report.value.value
415
415
  const listing = objects.listings[id]
416
416
  return `the properties being shown are ${await gs(listing.columns, ', ', ' and ')}`
@@ -462,8 +462,8 @@ const config = {
462
462
  kms.stm.api.setVariable('price', { marker: 'price', value: 23 })
463
463
  kms.stm.api.setVariable('quantity', { marker: 'quantity', value: 3 })
464
464
  const c1 = { marker: 'worth', value: 'worth' }
465
- r1 = toEValue(await e(c1));
466
- r2 = await e({ marker: 'supplier', value: 'supplier' })
465
+ r1 = toEValue(await e(c1, where()));
466
+ r2 = await e({ marker: 'supplier', value: 'supplier' }, where())
467
467
  }
468
468
  const data = []
469
469
  for (const product of products) {
@@ -472,7 +472,7 @@ const config = {
472
472
  kms.stm.api.setVariable(p, { marker: p, value: product[p] })
473
473
  }
474
474
  for (const property of columns) {
475
- const value = toFinalValue(await e({ marker: property, value: property }));
475
+ const value = toFinalValue(await e({ marker: property, value: property }, where()));
476
476
  row.push(value)
477
477
  }
478
478
  data.push(row)
@@ -504,7 +504,7 @@ const config = {
504
504
  const responses = []
505
505
  for (let value of values) {
506
506
  if (!value.value || value.pullFromContext) {
507
- value = await e(value)
507
+ value = await e(value, where())
508
508
  }
509
509
  let id = value.value
510
510
  if (value.evalue) {
@@ -527,7 +527,7 @@ const config = {
527
527
  }
528
528
  context.isResponse = true
529
529
  } else {
530
- const report = await e(context.on)
530
+ const report = await e(context.on, where())
531
531
  const id = report.value.value
532
532
  const listing = objects.listings[id]
533
533
  const values = propertyToArray(context.properties)
@@ -554,7 +554,7 @@ const config = {
554
554
  //const name = '***current***'
555
555
  if (context.api) {
556
556
  // id = newReport({km, objects})
557
- const report = await e({ marker: 'report', pullFromContext: true })
557
+ const report = await e({ marker: 'report', pullFromContext: true }, where())
558
558
  const id = report.value.value
559
559
  const listing = objects.listings[id]
560
560
  listing.api = context.api
@@ -562,7 +562,7 @@ const config = {
562
562
  context.id = id
563
563
  context.listing = apis[listing.api].getAllProducts(listing)
564
564
  } else {
565
- const report = await e({ marker: 'report', pullFromContext: true })
565
+ const report = await e({ marker: 'report', pullFromContext: true }, where())
566
566
  const id = report.evalue.value
567
567
  const listing = objects.listings[id]
568
568
  const api = apis[listing.api]
@@ -575,7 +575,7 @@ const config = {
575
575
  {
576
576
  match: ({context}) => context.marker == 'answer',
577
577
  apply: async ({e, context, objects, kms, insert}) => {
578
- const report = await e({ marker: 'report', pullFromContext: true })
578
+ const report = await e({ marker: 'report', pullFromContext: true }, where())
579
579
  const id = report.value.value
580
580
  const listing = objects.listings[id]
581
581
  listing.type = context.type
@@ -145,9 +145,9 @@ const config = {
145
145
  semantics: [
146
146
  {
147
147
  where: where(),
148
- match: ({context}) => context.marker == 'player' && context.same,
148
+ match: ({context}) => context.marker == 'same' && context.one.marker == 'player',
149
149
  apply: ({context, objects, config, km}) => {
150
- const players = context.same.value.map( (props) => props.value )
150
+ const players = context.two.value.map( (props) => props.value )
151
151
  setPlayers(objects, config, players)
152
152
  for (const player of objects.players) {
153
153
  objects.scores[player] = 0
@@ -204,7 +204,7 @@ const config = {
204
204
  },
205
205
  {
206
206
  where: where(),
207
- match: ({context}) => context.marker == 'turn' && context.evaluate && context.whose,
207
+ match: ({context}) => context.marker == 'turn' && context.whose,
208
208
  apply: ({context, objects}) => {
209
209
  if (Number.isInteger(objects.nextPlayer)) {
210
210
  context.evalue = `${objects.players[objects.nextPlayer]}'s turn`
@@ -215,7 +215,18 @@ const config = {
215
215
  },
216
216
  {
217
217
  where: where(),
218
- match: ({context}) => context.marker == 'next' && context.evaluate,
218
+ match: ({context}) => context.marker == 'unify' && context.terms[0].whose,
219
+ apply: ({context, objects}) => {
220
+ if (Number.isInteger(objects.nextPlayer)) {
221
+ context.evalue = `${objects.players[objects.nextPlayer]}'s turn`
222
+ } else {
223
+ context.evalue = "no one's turn"
224
+ }
225
+ }
226
+ },
227
+ {
228
+ where: where(),
229
+ match: ({context}) => context.marker == 'next',
219
230
  apply: ({context, objects}) => {
220
231
  if (Number.isInteger(objects.nextPlayer)) {
221
232
  context.evalue = objects.players[objects.nextPlayer]
@@ -226,7 +237,7 @@ const config = {
226
237
  },
227
238
  {
228
239
  where: where(),
229
- match: ({context}) => context.marker == 'player' && context.evaluate && context.pullFromContext,
240
+ match: ({context}) => context.marker == 'player' && context.pullFromContext,
230
241
  apply: async ({context, objects, gs}) => {
231
242
  const players = objects.players
232
243
  if (players.length == 0) {
@@ -239,15 +250,14 @@ const config = {
239
250
  // same
240
251
  {
241
252
  where: where(),
242
- match: ({context}) => context.marker == 'score' && context.same && context.winning,
253
+ match: ({context}) => context.marker == 'same' && context.one.marker == 'score' && context.one.winning,
243
254
  apply: ({context, objects}) => {
244
- // objects.winningScore = context.same.amount.value
245
- objects.winningScore = context.same.value
255
+ objects.winningScore = context.two.value
246
256
  }
247
257
  },
248
258
  {
249
259
  where: where(),
250
- match: ({context}) => context.marker == 'score' && context.evaluate && context.winning,
260
+ match: ({context}) => context.marker == 'score' && context.winning,
251
261
  apply: ({context, objects}) => {
252
262
  //context.value = { marker: 'point', value: objects.winningScore }
253
263
  // i got the value by running -q '20 points'
@@ -270,7 +280,7 @@ const config = {
270
280
  },
271
281
  {
272
282
  where: where(),
273
- match: ({context}) => context.marker == 'score' && context.evaluate,
283
+ match: ({context}) => context.marker == 'score',
274
284
  apply: ({context, objects}) => {
275
285
  const players = Object.keys(objects.scores);
276
286
  let allScoresAreZero = true
@@ -1,5 +1,5 @@
1
1
  const { knowledgeModule, where, debug } = require('./runtime').theprogrammablemind
2
- const { defaultContextCheck, concats, toEValue, toFinalValue } = require('./helpers')
2
+ const { isMany, defaultContextCheck, concats, toEValue, toFinalValue } = require('./helpers')
3
3
  const control = require('./control')
4
4
  const sdefaults_tests = require('./sdefaults.test.json')
5
5
 
@@ -26,16 +26,17 @@ const config = {
26
26
  priority: -1,
27
27
  // match: ({context}) => context.flatten || context.listable && context.value[0].flatten,
28
28
  // match: (args) => okay(args, ({context}) => (context.flatten || context.listable && context.value.some((value) => value.flatten))),
29
- match: (args) => args.callOnce(args, ({context}) => (context.flatten || context.listable && context.value.some((value) => value.flatten))),
29
+ match: async (args) => await args.callOnce(args, 'sdefaults.1', ({context}) => (context.flatten || context.listable && context.value.some((value) => value.flatten))),
30
30
  // match: ({context}) => context.flatten || context.listable || (Array.isArray(context.value) && context.value.some((value) => value.flatten)),
31
- apply: async ({config, km, context, s, _continue, flatten}) => {
31
+ apply: async ({config, km, context, e, _continue, flatten}) => {
32
32
  const flats = flatten(['list'], context)
33
33
  const evalues = []
34
34
  for (const flat of flats) {
35
35
  if (!flat.control) {
36
36
  flat.control = context.control
37
37
  }
38
- const result = await s(flat)
38
+ flat.topLevel = context.topLevel
39
+ const result = await e(flat, where())
39
40
  if (result.evalue) {
40
41
  evalues.push(result.evalue)
41
42
  }
@@ -51,14 +52,15 @@ const config = {
51
52
  notes: 'flatten relation',
52
53
  where: where(),
53
54
  priority: -1,
54
- match: (args) => args.callOnce(args, ({context}) => (context.flatten && context.relation)),
55
- apply: async ({flatten, config, km, context, s}) => {
55
+ // sdefault.1 tag is the same as above on purpose
56
+ match: async (args) => await args.callOnce(args, 'sdefaults.1', ({context}) => (context.flatten && context.relation)),
57
+ apply: async ({flatten, config, km, context, e}) => {
56
58
  const flats = flatten(['list'], context)
57
59
  for (const flat of flats) {
58
60
  if (!flat.control) {
59
61
  flat.control = context.control
60
62
  }
61
- await s(flat)
63
+ await e(flat, where())
62
64
  }
63
65
  }
64
66
  },
@@ -68,7 +70,7 @@ const config = {
68
70
  priority: -1,
69
71
  match: ({context}) => context.semanticIsEvaluate,
70
72
  apply: async ({context, e}) => {
71
- context.evalue = await e({ ...context, semanticIsEvaluate: false })
73
+ context.evalue = await e({ ...context, semanticIsEvaluate: false }, where())
72
74
  context.isResponse = true
73
75
  }
74
76
  },
@@ -84,13 +86,32 @@ const config = {
84
86
  _continue()
85
87
  }
86
88
  },
89
+ {
90
+ where: where(),
91
+ match: ({context}) => {
92
+ const retval = context.marker == 'unify' &&
93
+ context.terms &&
94
+ context.terms.every((term) => term.isInstance) &&
95
+ context.terms[0].value == context.terms[1].value
96
+ return retval
97
+ },
98
+ apply: ({context, resolveEvaluate}) => resolveEvaluate(context, context.terms[0]),
99
+ },
87
100
  ],
88
101
  };
89
102
 
90
103
  function initializer({objects, config, isModule}) {
91
- config.addArgs(() => ({
104
+ config.addArgs(({e}) => ({
92
105
  toFinalValue,
93
106
  toEValue,
107
+ isMany,
108
+ unify: async (term1, term2) => {
109
+ const unification = await e({
110
+ marker: 'unify',
111
+ terms: [term1, term2],
112
+ }, where())
113
+ return unification?.evalue
114
+ },
94
115
  }))
95
116
  }
96
117
 
@@ -106,7 +106,6 @@
106
106
  "level": 2,
107
107
  "context_index": 1,
108
108
  "topLevel": true,
109
- "context_id": 2,
110
109
  "touchedBy": [
111
110
  "spock#call2"
112
111
  ]
@@ -232,6 +231,9 @@
232
231
  }
233
232
  ],
234
233
  "learned_contextual_priorities": [],
234
+ "explain_associations_details": [
235
+ null
236
+ ],
235
237
  "query": "you are spock",
236
238
  "key": {
237
239
  "query": "you are spock"
package/common/stm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  const { knowledgeModule, where, debug } = require('./runtime').theprogrammablemind
2
- const { defaultContextCheckProperties, defaultContextCheck } = require('./helpers')
2
+ const { defaultContextCheckProperties, defaultContextCheck, toFinalValue } = require('./helpers')
3
3
  const helpers = require('./helpers')
4
4
  const helpers_conjunction = require('./helpers/conjunction')
5
5
  const articles = require('./articles')
@@ -55,8 +55,6 @@ class API {
55
55
  return
56
56
  }
57
57
 
58
- concept.evaluate = false
59
-
60
58
  if (!frameOfReference) {
61
59
  frameOfReference = this._objects
62
60
  }
@@ -266,6 +264,7 @@ const config = {
266
264
  },
267
265
  {
268
266
  id: 'delete',
267
+ where: where(),
269
268
  isA: ['verb'],
270
269
  bridge: "{ ...next(operator), deletable: after[0], operator: operator, interpolate: [{ property: 'operator' }, { property: 'deletable' }] }",
271
270
  semantic: async ({context, recall}) => {
@@ -286,19 +285,21 @@ const config = {
286
285
  },
287
286
  {
288
287
  id: 'recall',
288
+ where: where(),
289
289
  bridge: "{ ...next(operator), postModifiers: ['recallee'], recallee: after[0] }",
290
290
  isA: ['verb'],
291
- semantic: async ({context, recall, resolveResponse, e}) => {
291
+ semantic: async ({context, recall, resolveEvaluate, e}) => {
292
292
  const object = await recall({ context: context.recallee })
293
- resolveResponse(context, object)
293
+ resolveEvaluate(context, object)
294
294
  },
295
295
  },
296
296
  {
297
297
  id: 'remember',
298
+ where: where(),
298
299
  bridge: "{ ...next(operator), postModifiers: ['rememberee'], rememberee: after[0] }",
299
300
  isA: ['verb'],
300
301
  semantic: async ({context, api, e}) => {
301
- let value = (await e(context.rememberee)).evalue
302
+ let value = toFinalValue((await e(context.rememberee, where())))
302
303
  if (value == context.rememberee.value) {
303
304
  value = context.rememberee
304
305
  }
@@ -324,7 +325,7 @@ const config = {
324
325
  semantics: [
325
326
  {
326
327
  where: where(),
327
- match: ({context}) => context.marker == 'mentions' && context.evaluate && context.args?.context?.distributer,
328
+ match: ({context}) => context.marker == 'mentions' && context.args?.context?.distributer,
328
329
  apply: async ({callId, _continue, toList, context, kms, e, log, toArray, retry}) => {
329
330
  context.args.filter ??= (r) => r
330
331
  context.args.all = true
@@ -337,7 +338,7 @@ const config = {
337
338
  },
338
339
  {
339
340
  where: where(),
340
- match: ({context}) => context.marker == 'mentions' && context.evaluate,
341
+ match: ({context}) => context.marker == 'mentions',
341
342
  apply: ({context, kms, toList, resolveEvaluate}) => {
342
343
  const value = kms.stm.api.recall(context.args)
343
344
  if (value) {
@@ -366,21 +367,15 @@ const config = {
366
367
  }
367
368
 
368
369
  if (!context.value) {
369
- context.evalue = { marker: 'answerNotKnown' }
370
+ context.evalue = { marker: 'undefined' }
370
371
  return
371
372
  }
372
373
 
373
- if (context.evaluate) {
374
- const instance = await e(context.value)
375
- if (instance.evalue && !instance.edefault) {
376
- context.value = instance.evalue
377
- }
378
- if (context.evaluate) {
379
- context.evalue = context.value
380
- }
381
- } else {
382
- await s(context.value)
374
+ const instance = await e(context.value, where())
375
+ if (instance.evalue && !instance.edefault) {
376
+ context.value = instance.evalue
383
377
  }
378
+ context.evalue = context.value
384
379
  },
385
380
  },
386
381
  ],
@@ -422,13 +417,13 @@ function initializer({config}) {
422
417
 
423
418
  recall: async (args) => {
424
419
  if (args.frameOfReference?.nameable_named) {
425
- const result = await e(args.frameOfReference)
420
+ const result = await e(args.frameOfReference, where())
426
421
  if (result.evalue) {
427
422
  args.frameOfReference = result.evalue
428
423
  }
429
424
  }
430
425
 
431
- const result = await e({ marker: 'mentions', args })
426
+ const result = await e({ marker: 'mentions', args }, where())
432
427
  // evalue will return the argument if there is no evalue. dont want that for this case
433
428
  if (!result.evalue) {
434
429
  return
@@ -140,7 +140,6 @@
140
140
  "level": 2,
141
141
  "context_index": 1,
142
142
  "topLevel": true,
143
- "context_id": 2,
144
143
  "touchedBy": [
145
144
  "temperature#call2"
146
145
  ]
@@ -321,6 +320,9 @@
321
320
  }
322
321
  ],
323
322
  "learned_contextual_priorities": [],
323
+ "explain_associations_details": [
324
+ null
325
+ ],
324
326
  "query": "temperature is a dimension",
325
327
  "key": {
326
328
  "query": "temperature is a dimension"
@@ -725,7 +727,6 @@
725
727
  "level": 2,
726
728
  "context_index": 1,
727
729
  "topLevel": true,
728
- "context_id": 2,
729
730
  "touchedBy": [
730
731
  "temperature#call2"
731
732
  ]
@@ -1376,6 +1377,9 @@
1376
1377
  }
1377
1378
  ],
1378
1379
  "learned_contextual_priorities": [],
1380
+ "explain_associations_details": [
1381
+ null
1382
+ ],
1379
1383
  "query": "celcius fahrenheit and kelvin are units of temperature",
1380
1384
  "key": {
1381
1385
  "query": "celcius fahrenheit and kelvin are units of temperature"
@@ -1700,7 +1704,7 @@
1700
1704
  },
1701
1705
  "y": {
1702
1706
  "value": 9,
1703
- "instance": true,
1707
+ "isInstance": true,
1704
1708
  "text": "9",
1705
1709
  "marker": "integer",
1706
1710
  "word": "9",
@@ -1731,7 +1735,7 @@
1731
1735
  },
1732
1736
  "y": {
1733
1737
  "value": 5,
1734
- "instance": true,
1738
+ "isInstance": true,
1735
1739
  "text": "5",
1736
1740
  "marker": "integer",
1737
1741
  "word": "5",
@@ -1762,7 +1766,7 @@
1762
1766
  },
1763
1767
  "y": {
1764
1768
  "value": 32,
1765
- "instance": true,
1769
+ "isInstance": true,
1766
1770
  "text": "32",
1767
1771
  "marker": "integer",
1768
1772
  "word": "32",
@@ -1794,7 +1798,6 @@
1794
1798
  "level": 1,
1795
1799
  "context_index": 1,
1796
1800
  "topLevel": true,
1797
- "context_id": 2,
1798
1801
  "touchedBy": [
1799
1802
  "temperature#call2"
1800
1803
  ]
@@ -2285,6 +2288,9 @@
2285
2288
  }
2286
2289
  ],
2287
2290
  "learned_contextual_priorities": [],
2291
+ "explain_associations_details": [
2292
+ null
2293
+ ],
2288
2294
  "query": "fahrenheit = celcius*9/5 + 32",
2289
2295
  "key": {
2290
2296
  "query": "fahrenheit = celcius*9/5 + 32"
@@ -2656,7 +2662,7 @@
2656
2662
  },
2657
2663
  "y": {
2658
2664
  "value": 32,
2659
- "instance": true,
2665
+ "isInstance": true,
2660
2666
  "text": "32",
2661
2667
  "marker": "integer",
2662
2668
  "word": "32",
@@ -2688,7 +2694,7 @@
2688
2694
  },
2689
2695
  "y": {
2690
2696
  "value": 5,
2691
- "instance": true,
2697
+ "isInstance": true,
2692
2698
  "text": "5",
2693
2699
  "marker": "integer",
2694
2700
  "word": "5",
@@ -2719,7 +2725,7 @@
2719
2725
  },
2720
2726
  "y": {
2721
2727
  "value": 8,
2722
- "instance": true,
2728
+ "isInstance": true,
2723
2729
  "text": "8",
2724
2730
  "marker": "integer",
2725
2731
  "word": "8",
@@ -2750,7 +2756,7 @@
2750
2756
  },
2751
2757
  "y": {
2752
2758
  "value": 32,
2753
- "instance": true,
2759
+ "isInstance": true,
2754
2760
  "text": "32",
2755
2761
  "marker": "integer",
2756
2762
  "word": "32",
@@ -2782,7 +2788,6 @@
2782
2788
  "level": 1,
2783
2789
  "context_index": 1,
2784
2790
  "topLevel": true,
2785
- "context_id": 2,
2786
2791
  "touchedBy": [
2787
2792
  "temperature#call2"
2788
2793
  ]
@@ -3678,6 +3683,9 @@
3678
3683
  }
3679
3684
  ],
3680
3685
  "learned_contextual_priorities": [],
3686
+ "explain_associations_details": [
3687
+ null
3688
+ ],
3681
3689
  "query": "celcius = (fahrenheit - 32)*5/8 + 32",
3682
3690
  "key": {
3683
3691
  "query": "celcius = (fahrenheit - 32)*5/8 + 32"
package/common/testing.js CHANGED
@@ -14,7 +14,7 @@ const config = {
14
14
  id: 'testingEvaluate',
15
15
  generatorp: async ({context, g}) => `${context.word} ${await g(context.value)}`,
16
16
  semantic: async ({context, e}) => {
17
- context.evalue = await e(context.value)
17
+ context.evalue = await e(context.value, where())
18
18
  context.isResponse = true
19
19
  },
20
20
  bridge: "{ ...next(operator), value: after[0] }",
@@ -22,7 +22,7 @@ const config = {
22
22
  {
23
23
  where: where(),
24
24
  id: 'testingValue',
25
- evaluator: ({context}) => {
25
+ semantic: ({context}) => {
26
26
  context.evalue = 'evaluated testingValue'
27
27
  }
28
28
  },