@receptron/graphai_cli 0.2.1 → 0.3.0

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.
@@ -80,7 +80,7 @@ const main = async () => {
80
80
  }
81
81
  try {
82
82
  const results = await graph.run();
83
- console.log(results);
83
+ console.log(JSON.stringify(results, null, 2));
84
84
  }
85
85
  catch (e) {
86
86
  console.log("error", e);
package/lib/mermaid.js CHANGED
@@ -7,10 +7,10 @@ const mermaid = (graphData) => {
7
7
  Object.keys(graphData.nodes).forEach((nodeId) => {
8
8
  const node = graphData.nodes[nodeId];
9
9
  // label / name
10
- if ("agentId" in node) {
10
+ if ("agent" in node) {
11
11
  if (node.inputs) {
12
12
  node.inputs.forEach((input) => {
13
- const source = (0, utils_1.parseNodeName)(input);
13
+ const source = (0, utils_1.parseNodeName)(input, graphData.version ?? 0.2);
14
14
  if (source.propIds) {
15
15
  console.log(` ${source.nodeId}(${source.nodeId}) -- ${source.propIds.join(".")} --> ${nodeId}`);
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@receptron/graphai_cli",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "GraphAI command line tools.",
5
5
  "main": "lib/graphai_cli.js",
6
6
  "bin": {
@@ -12,8 +12,8 @@
12
12
  "scripts": {
13
13
  "build": "tsc && tsc-alias",
14
14
  "eslint": "eslint --fix --ext .ts ./src",
15
- "format": "prettier --write '{src,tests,samples}/**/*.ts' .eslintrc.js",
16
- "test": "node --test -r tsconfig-paths/register --require ts-node/register ./tests/**/test_*.ts",
15
+ "format": "prettier --write '{src,test_yaml,samples}/**/*.{yaml,ts,json}' .eslintrc.js",
16
+ "test": "node --test -r tsconfig-paths/register --require ts-node/register ./test_yaml/test_*.ts",
17
17
  "cli": "npx ts-node -r tsconfig-paths/register ./src/graphai_cli.ts",
18
18
  "b": "yarn run format && yarn run eslint && yarn run build"
19
19
  },
@@ -47,12 +47,13 @@
47
47
  "deepmerge": "^4.3.1",
48
48
  "dotenv": "^16.4.5",
49
49
  "express": "^4.19.2",
50
- "graphai": "^0.2.7",
50
+ "graphai": "^0.3.0",
51
51
  "groq-sdk": "^0.3.3",
52
52
  "openai": "^4.12.4",
53
53
  "slashgpt": "^0.0.8",
54
54
  "tiktoken": "^1.0.14",
55
55
  "wikipedia": "^2.1.2",
56
+ "xml2js": "^0.6.2",
56
57
  "yaml": "^2.3.3",
57
58
  "yargs": "^17.7.2"
58
59
  },