@indra.ai/deva.vector 0.0.3 → 0.0.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 (4) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +2 -4
  3. package/index.js +38 -21
  4. package/package.json +15 -15
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Quinn A Michaels
3
+ Copyright (c) 2025 Quinn Michaels
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,4 +1,2 @@
1
- # deva.wall
2
- The Wall Deva
3
-
4
- (c) Copyright 2025 Quinn A Michaels. All Rights Reserved.
1
+ # deva.vector
2
+ The Vector Deva
package/index.js CHANGED
@@ -1,11 +1,12 @@
1
1
  // Copyright (c)2025 Quinn Michaels
2
- // Wall Deva
2
+ // Vector 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
8
  import {exec, spawn} from 'node:child_process';
9
+
9
10
  // set the __dirname
10
11
  import {dirname} from 'node:path';
11
12
  import {fileURLToPath} from 'node:url';
@@ -25,7 +26,7 @@ const info = {
25
26
  copyright: pkg.copyright
26
27
  };
27
28
 
28
- const WALL = new Deva({
29
+ const VECTOR = new Deva({
29
30
  info,
30
31
  agent,
31
32
  vars,
@@ -36,31 +37,47 @@ const WALL = new Deva({
36
37
  },
37
38
  listeners: {
38
39
  'devacore:question'(packet) {
39
- this.prompt(packet.md5);
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
- });
40
+ this.func.echostr(packet.q);
41
+ },
42
+ 'devacore:answer'(packet) {
43
+ this.func.echostr(packet.a);
51
44
  }
52
45
  },
53
46
  modules: {},
54
47
  devas: {},
55
- func: {},
48
+ func: {
49
+ echostr(opts) {
50
+ const {id, agent, client, md5, sha256, sha512} = opts;
51
+ const created = Date.now();
52
+
53
+ this.action('func', `echostr:${id}`);
54
+ this.state('set', `echostr:${id}`);
55
+ const echostr = [
56
+ `::begin:vector:${id}`,
57
+ `transport: ${id}`,
58
+ `client: ${client.profile.id}`,
59
+ `agent: ${agent.profile.id}`,
60
+ `created: ${created}`,
61
+ `md5: ${md5}`,
62
+ `sha256:${sha256}`,
63
+ `sha512:${sha512}`,
64
+ `::end:vector:${id}`,
65
+ ].join('\nliek');
66
+
67
+ // stub for later features right now just echo into the system process for SIGINT monitoring.
68
+ const echo = spawn('echo', [echostr])
69
+ echo.stderr.on('data', err => {
70
+ this.error(err, opts);
71
+ });
72
+
73
+ this.state('return', `echostr:${id}`);
74
+ return echostr;
75
+ }
76
+ },
56
77
  methods: {},
57
78
  onReady(data, resolve) {
58
79
  this.prompt(this.vars.messages.ready);
59
- this.vars.userinfo = this.lib.os.userInfo();
60
-
61
- console.log('userinfo', this.vars.userinfo);
62
- return resolve(data);
63
-
80
+ return resolve(data);
64
81
  },
65
82
  onError(data, err, reject) {
66
83
  this.prompt(this.vars.messages.error);
@@ -68,5 +85,5 @@ const WALL = new Deva({
68
85
  return reject(err);
69
86
  },
70
87
  });
71
- export default WALL
88
+ export default VECTOR
72
89
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
- "id": "835ebdd3-17dc-4b53-a6e3-02d089700f4",
2
+ "id": "33555f8a-707d-4fc9-ae19-ba09036473d4",
3
3
  "name": "@indra.ai/deva.vector",
4
- "version": "0.0.3",
4
+ "version": "0.0.4",
5
5
  "author": "Quinn Michaels",
6
6
  "license": "MIT",
7
7
  "copyright": "2025",
@@ -28,11 +28,11 @@
28
28
  },
29
29
  "homepage": "https://deva.space/devas/wall",
30
30
  "dependencies": {
31
- "@indra.ai/deva": "^1.5.42"
31
+ "@indra.ai/deva": "^1.5.43"
32
32
  },
33
33
  "data": {
34
34
  "agent": {
35
- "id": "fdc56065-5e10-4419-aa6a-6858639685ce",
35
+ "id": "ee657d59-01fb-427f-bc7a-fc96e56d7541",
36
36
  "key": "vector",
37
37
  "prompt": {
38
38
  "emoji": "🛤️",
@@ -55,7 +55,7 @@
55
55
  "hashtag": "#Vector",
56
56
  "title": "Vector Deva",
57
57
  "subtitle": "Vector Deva for the VectorGuardWall.",
58
- "describe": "Vector Deva",
58
+ "describe": "The Vector Deva",
59
59
  "post": "Vector.",
60
60
  "hashtags": "QuinnMichaels,IndraAI,DevaWorld,VectorDeva",
61
61
  "pronouns": "He, Him",
@@ -72,8 +72,8 @@
72
72
  "owner": "Quinn Michaels",
73
73
  "caseid": "none",
74
74
  "copyright": "©2025 Quinn Michaels. All rights reserved.",
75
- "created": "Friday, August 29, 2025 - 4:38:05 PM",
76
- "modified": "Friday, August 29, 2025 - 4:38:05 PM"
75
+ "created": "Friday, August 29, 2025 - 4:47:05 PM",
76
+ "modified": "Friday, August 29, 2025 - 4:47:05 PM"
77
77
  }
78
78
  },
79
79
  "vars": {
@@ -94,14 +94,14 @@
94
94
  "history": []
95
95
  },
96
96
  "context": {
97
- "uid": "Vector is creating a uid",
98
- "status": "Vector is viewing the status",
99
- "help": "Vector is viewing the help",
100
- "artist": "Vector creating",
101
- "live": "Vector livechat",
102
- "ask": "Vector asking",
103
- "reply": "Vector reply",
104
- "comment": "Vector comment"
97
+ "uid": "Wall is creating a uid",
98
+ "status": "Wall is viewing the status",
99
+ "help": "Wall is viewing the help",
100
+ "artist": "Wall creating",
101
+ "live": "Wall livechat",
102
+ "ask": "Wall asking",
103
+ "reply": "Wall reply",
104
+ "comment": "Wall comment"
105
105
  }
106
106
  }
107
107
  }