@graphai/shell_utilty_agent 0.1.1 → 0.1.2

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.
package/README.md CHANGED
@@ -25,13 +25,21 @@ const result = await graph.run();
25
25
  ### Agents description
26
26
  - runShellAgent - shell utility agent
27
27
 
28
+ ### Input/Output/Params Schema & samples
29
+ - [runShellAgent](https://github.com/receptron/graphai/blob/main/docs/agentDocs/system/runShellAgent.md)
30
+
28
31
  ### Input/Params example
29
32
  - runShellAgent
30
33
 
34
+
35
+
31
36
  ```typescript
32
37
  {
33
38
  "inputs": {
34
- "command": "echo 1",
39
+ "commands": [
40
+ "echo",
41
+ "1"
42
+ ],
35
43
  "baseDir": "./"
36
44
  },
37
45
  "params": {}
@@ -45,16 +45,16 @@ const runShellCommand = (commands, path) => {
45
45
  const results = [];
46
46
  const stderrs = [];
47
47
  const child = (0, child_process_1.spawn)(command, args, { cwd: path ?? process.cwd() });
48
- child.stdout.on('data', (data) => {
48
+ child.stdout.on("data", (data) => {
49
49
  results.push(data);
50
50
  });
51
- child.stderr.on('data', (data) => {
51
+ child.stderr.on("data", (data) => {
52
52
  stderrs.push(data);
53
53
  });
54
- child.stderr.on('data', (data) => {
54
+ child.stderr.on("data", (data) => {
55
55
  reject({ error: data, stdout: results.join(""), stderr: stderrs.join("") });
56
56
  });
57
- child.on('close', () => {
57
+ child.on("close", () => {
58
58
  resolve({ text: results.join(""), stderr: stderrs.join("") });
59
59
  });
60
60
  });
@@ -102,7 +102,9 @@ const runShellAgentInfo = {
102
102
  description: "shell utility agent",
103
103
  category: ["system"],
104
104
  author: "isamu arimoto",
105
- repository: "https://github.com/isamu/graphai-agents",
105
+ repository: "https://github.com/receptron/graphai-agents/tree/main/system/shell-util-agent",
106
+ source: "https://github.com/receptron/graphai-agents/tree/main/system/shell-util-agent/src/run_shell_agent.ts",
107
+ package: "@graphai/shell_utilty_agent",
106
108
  license: "MIT",
107
109
  };
108
110
  exports.default = runShellAgentInfo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphai/shell_utilty_agent",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "shell utilty agent",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -8,6 +8,7 @@
8
8
  ],
9
9
  "scripts": {
10
10
  "build": "tsc",
11
+ "typecheck": "tsc --noEmit",
11
12
  "eslint": "eslint src --fix",
12
13
  "format": "prettier --write '{src,tests}/**/*.ts'",
13
14
  "doc": "npx agentdoc",