ekms 9.8.0 → 9.9.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.
Files changed (99) hide show
  1. package/common/actions.instance.json +12 -10
  2. package/common/actions.js +14 -12
  3. package/common/angle.instance.json +37 -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/compass.js +1 -1
  16. package/common/concept.instance.json +14 -6
  17. package/common/concept.js +2 -0
  18. package/common/conjunction.js +20 -12
  19. package/common/control.js +10 -18
  20. package/common/countable.js +4 -3
  21. package/common/crew.instance.json +95 -27
  22. package/common/dateTimeSelectors.instance.json +4 -4
  23. package/common/dateTimeSelectors.js +4 -7
  24. package/common/dates.instance.json +52 -28
  25. package/common/dates.js +16 -11
  26. package/common/debug.instance.json +52 -0
  27. package/common/debug.js +52 -0
  28. package/common/debug.test.json +1 -0
  29. package/common/dialogues.js +126 -70
  30. package/common/dimension.instance.json +259 -492
  31. package/common/dimension.js +72 -12
  32. package/common/drone.instance.json +441 -84
  33. package/common/drone.js +57 -56
  34. package/common/drone_v1.instance.json +36 -12
  35. package/common/drone_v1.js +20 -15
  36. package/common/edible.instance.json +96 -32
  37. package/common/emotions.instance.json +15 -1
  38. package/common/evaluate.js +10 -13
  39. package/common/fastfood.instance.json +282 -100
  40. package/common/fastfood.js +30 -15
  41. package/common/formulas.instance.json +162 -24
  42. package/common/formulas.js +18 -9
  43. package/common/gdefaults.js +20 -96
  44. package/common/helpers/concept.js +2 -9
  45. package/common/helpers/conjunction.js +11 -1
  46. package/common/helpers/dialogues.js +48 -24
  47. package/common/helpers/gdefaults.js +15 -5
  48. package/common/helpers/properties.js +132 -326
  49. package/common/helpers.js +28 -58
  50. package/common/hierarchy.js +71 -41
  51. package/common/kirk.instance.json +3 -1
  52. package/common/latin.instance.json +14 -14
  53. package/common/latin.js +7 -7
  54. package/common/length.instance.json +331 -61
  55. package/common/linear_orderings.instance.json +1 -0
  56. package/common/linear_orderings.js +90 -0
  57. package/common/linear_orderings.test.json +1 -0
  58. package/common/math.instance.json +144 -5
  59. package/common/math.js +18 -7
  60. package/common/menus.instance.json +29 -11
  61. package/common/menus.js +8 -5
  62. package/common/meta.js +14 -13
  63. package/common/nameable.js +9 -5
  64. package/common/numbers.instance.json +8 -3
  65. package/common/numbers.js +59 -35
  66. package/common/ordering.instance.json +53 -4
  67. package/common/ordinals.js +25 -25
  68. package/common/people.instance.json +66 -12
  69. package/common/percentages.js +4 -2
  70. package/common/pipboy.instance.json +89 -44
  71. package/common/pipboy.js +21 -14
  72. package/common/pokemon.instance.json +39 -13
  73. package/common/pressure.instance.json +20 -6
  74. package/common/properties.instance.json +2648 -501
  75. package/common/properties.js +561 -82
  76. package/common/punctuation.js +1 -0
  77. package/common/rates.instance.json +2 -2
  78. package/common/rates.js +3 -3
  79. package/common/reminders.instance.json +16 -0
  80. package/common/reminders.js +24 -20
  81. package/common/reports.instance.json +11 -12
  82. package/common/reports.js +12 -12
  83. package/common/scorekeeper.js +20 -10
  84. package/common/sdefaults.js +30 -9
  85. package/common/spock.instance.json +3 -1
  86. package/common/stm.js +16 -21
  87. package/common/temperature.instance.json +40 -11
  88. package/common/testing.js +2 -2
  89. package/common/time.instance.json +149 -47
  90. package/common/time.js +9 -8
  91. package/common/ui.instance.json +4 -2
  92. package/common/ui.js +5 -5
  93. package/common/weight.instance.json +113 -21
  94. package/common/weight.js +5 -1
  95. package/common/words.js +113 -2
  96. package/common/wp.instance.json +125 -18
  97. package/common/wp.js +6 -2
  98. package/main.js +2 -0
  99. package/package.json +10 -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,10 @@
1700
1704
  },
1701
1705
  "y": {
1702
1706
  "value": 9,
1703
- "instance": true,
1707
+ "isInstance": true,
1708
+ "rangeableWith": [
1709
+ "number"
1710
+ ],
1704
1711
  "text": "9",
1705
1712
  "marker": "integer",
1706
1713
  "word": "9",
@@ -1731,7 +1738,10 @@
1731
1738
  },
1732
1739
  "y": {
1733
1740
  "value": 5,
1734
- "instance": true,
1741
+ "isInstance": true,
1742
+ "rangeableWith": [
1743
+ "number"
1744
+ ],
1735
1745
  "text": "5",
1736
1746
  "marker": "integer",
1737
1747
  "word": "5",
@@ -1762,7 +1772,10 @@
1762
1772
  },
1763
1773
  "y": {
1764
1774
  "value": 32,
1765
- "instance": true,
1775
+ "isInstance": true,
1776
+ "rangeableWith": [
1777
+ "number"
1778
+ ],
1766
1779
  "text": "32",
1767
1780
  "marker": "integer",
1768
1781
  "word": "32",
@@ -1794,7 +1807,6 @@
1794
1807
  "level": 1,
1795
1808
  "context_index": 1,
1796
1809
  "topLevel": true,
1797
- "context_id": 2,
1798
1810
  "touchedBy": [
1799
1811
  "temperature#call2"
1800
1812
  ]
@@ -2285,6 +2297,9 @@
2285
2297
  }
2286
2298
  ],
2287
2299
  "learned_contextual_priorities": [],
2300
+ "explain_associations_details": [
2301
+ null
2302
+ ],
2288
2303
  "query": "fahrenheit = celcius*9/5 + 32",
2289
2304
  "key": {
2290
2305
  "query": "fahrenheit = celcius*9/5 + 32"
@@ -2656,7 +2671,10 @@
2656
2671
  },
2657
2672
  "y": {
2658
2673
  "value": 32,
2659
- "instance": true,
2674
+ "isInstance": true,
2675
+ "rangeableWith": [
2676
+ "number"
2677
+ ],
2660
2678
  "text": "32",
2661
2679
  "marker": "integer",
2662
2680
  "word": "32",
@@ -2688,7 +2706,10 @@
2688
2706
  },
2689
2707
  "y": {
2690
2708
  "value": 5,
2691
- "instance": true,
2709
+ "isInstance": true,
2710
+ "rangeableWith": [
2711
+ "number"
2712
+ ],
2692
2713
  "text": "5",
2693
2714
  "marker": "integer",
2694
2715
  "word": "5",
@@ -2719,7 +2740,10 @@
2719
2740
  },
2720
2741
  "y": {
2721
2742
  "value": 8,
2722
- "instance": true,
2743
+ "isInstance": true,
2744
+ "rangeableWith": [
2745
+ "number"
2746
+ ],
2723
2747
  "text": "8",
2724
2748
  "marker": "integer",
2725
2749
  "word": "8",
@@ -2750,7 +2774,10 @@
2750
2774
  },
2751
2775
  "y": {
2752
2776
  "value": 32,
2753
- "instance": true,
2777
+ "isInstance": true,
2778
+ "rangeableWith": [
2779
+ "number"
2780
+ ],
2754
2781
  "text": "32",
2755
2782
  "marker": "integer",
2756
2783
  "word": "32",
@@ -2782,7 +2809,6 @@
2782
2809
  "level": 1,
2783
2810
  "context_index": 1,
2784
2811
  "topLevel": true,
2785
- "context_id": 2,
2786
2812
  "touchedBy": [
2787
2813
  "temperature#call2"
2788
2814
  ]
@@ -3678,6 +3704,9 @@
3678
3704
  }
3679
3705
  ],
3680
3706
  "learned_contextual_priorities": [],
3707
+ "explain_associations_details": [
3708
+ null
3709
+ ],
3681
3710
  "query": "celcius = (fahrenheit - 32)*5/8 + 32",
3682
3711
  "key": {
3683
3712
  "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
  },