@indra.ai/deva.wall 0.0.2 → 0.0.3

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 +26 -5
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -1,10 +1,12 @@
1
- // Copyright (c)2025 Quinn A Michaels
2
- // Vaisya Deva
1
+ // Copyright (c)2025 Quinn Michaels
2
+ // Wall Deva
3
3
 
4
4
  import Deva from '@indra.ai/deva';
5
5
  import pkg from './package.json' with {type:'json'};
6
6
  const {agent,vars} = pkg.data;
7
7
 
8
+ import {exec, spawn} from 'node:child_process';
9
+
8
10
  // set the __dirname
9
11
  import {dirname} from 'node:path';
10
12
  import {fileURLToPath} from 'node:url';
@@ -24,7 +26,7 @@ const info = {
24
26
  copyright: pkg.copyright
25
27
  };
26
28
 
27
- const VAISYA = new Deva({
29
+ const WALL = new Deva({
28
30
  info,
29
31
  agent,
30
32
  vars,
@@ -33,14 +35,32 @@ const VAISYA = new Deva({
33
35
  parse(input) {return input.trim();},
34
36
  process(input) {return input.trim();},
35
37
  },
36
- listeners: {},
38
+ listeners: {
39
+ 'devacore:question'(packet) {
40
+ const question = JSON.stringify(packet.q).replace(/'/, '\'').replace(/"/, '\"');
41
+ // stub for later features right now just echo into the system process for SIGINT monitoring.
42
+ exec(`echo "${packet.q.text}"`, (error, stdout, stderr) => {
43
+ const result = stdout.split('\n');
44
+ if (error) {
45
+ console.log('error', error);
46
+ }
47
+ else if (stderr) {
48
+ console.log('stderr', stderr);
49
+ }
50
+ });
51
+ }
52
+ },
37
53
  modules: {},
38
54
  devas: {},
39
55
  func: {},
40
56
  methods: {},
41
57
  onReady(data, resolve) {
42
58
  this.prompt(this.vars.messages.ready);
59
+ this.vars.userinfo = this.lib.os.userInfo();
60
+
61
+ console.log('userinfo', this.vars.userinfo);
43
62
  return resolve(data);
63
+
44
64
  },
45
65
  onError(data, err, reject) {
46
66
  this.prompt(this.vars.messages.error);
@@ -48,4 +68,5 @@ const VAISYA = new Deva({
48
68
  return reject(err);
49
69
  },
50
70
  });
51
- export default VAISYA
71
+ export default WALL
72
+
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
- "id": ":b7b9269a-82be-4735-852c-a2bc08ca0629",
2
+ "id": "b7b9269a-82be-4735-852c-a2bc08ca0629",
3
3
  "name": "@indra.ai/deva.wall",
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "author": "Quinn Michaels",
6
6
  "license": "MIT",
7
7
  "copyright": "2025",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "data": {
34
34
  "agent": {
35
- "id": ":3fff10dc-50fa-40c9-b675-d234479e6871",
35
+ "id": "3fff10dc-50fa-40c9-b675-d234479e6871",
36
36
  "key": "wall",
37
37
  "prompt": {
38
38
  "emoji": "🧱",