@indra.ai/deva 1.5.3 → 1.5.4

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 (2) hide show
  1. package/index.js +5 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1191,8 +1191,10 @@ class Deva {
1191
1191
  describe
1192
1192
  ***************/
1193
1193
  context(value=false, extra=false) {
1194
+ this.state('try', `context:${value}`);
1194
1195
  try {
1195
1196
  if (!value) return;
1197
+ this.state('set', `context:${value}`);
1196
1198
  this._context = value;
1197
1199
  const lookup = this.vars.context[value] || value;
1198
1200
  const text = extra ? `${lookup} ${extra}` : lookup;
@@ -1208,9 +1210,11 @@ class Deva {
1208
1210
  };
1209
1211
  data.hash = this.lib.hash(data);
1210
1212
  this.talk(config.events.context, data);
1213
+ this.state('return', `context:${value}:${data.id}`);
1211
1214
  return data;
1212
1215
  } catch (e) {
1213
- return this.error(e);
1216
+ this.state('catch', `context:${value}`);
1217
+ return this.error(e, value);
1214
1218
  }
1215
1219
  }
1216
1220
 
@@ -1392,7 +1396,6 @@ class Deva {
1392
1396
  });
1393
1397
  }
1394
1398
 
1395
-
1396
1399
  /**************
1397
1400
  func: prompt
1398
1401
  params:
@@ -1419,11 +1422,6 @@ class Deva {
1419
1422
  return this.talk(config.events.prompt, _data);
1420
1423
  }
1421
1424
 
1422
-
1423
-
1424
-
1425
-
1426
-
1427
1425
  /**************
1428
1426
  func: core
1429
1427
  params: none
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indra.ai/deva",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "The Deva Core",
5
5
  "main": "index.js",
6
6
  "copyright": "(c)2025 Quinn Michaels; All rights reserved.",