Spaces:
Runtime error
Runtime error
Merge pull request #1 from uandersonricardo/add-base-agents
Browse files- .env.example +1 -0
- package-lock.json +460 -1
- package.json +9 -0
- src/agents/auditor/agent.ts +20 -0
- src/agents/auditor/model.ts +5 -0
- src/agents/auditor/state.ts +7 -0
- src/agents/auditor/tools/slither-tool.ts +15 -0
- src/agents/coder/agent.ts +20 -0
- src/agents/coder/state.ts +7 -0
- src/agents/tester/agent.ts +13 -0
- src/agents/tester/state.ts +8 -0
- src/config/constants.ts +5 -0
- src/index.ts +22 -1
- tsconfig.json +1 -0
.env.example
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
OPENROUTER_API_KEY=
|
package-lock.json
CHANGED
|
@@ -8,6 +8,14 @@
|
|
| 8 |
"name": "projeto-talp1",
|
| 9 |
"version": "0.0.1",
|
| 10 |
"license": "ISC",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
"devDependencies": {
|
| 12 |
"@biomejs/biome": "2.4.14",
|
| 13 |
"@types/node": "^25.6.0",
|
|
@@ -178,6 +186,12 @@
|
|
| 178 |
"node": ">=14.21.3"
|
| 179 |
}
|
| 180 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 181 |
"node_modules/@emnapi/core": {
|
| 182 |
"version": "1.10.0",
|
| 183 |
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz",
|
|
@@ -219,6 +233,189 @@
|
|
| 219 |
"dev": true,
|
| 220 |
"license": "MIT"
|
| 221 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
"node_modules/@napi-rs/wasm-runtime": {
|
| 223 |
"version": "1.1.4",
|
| 224 |
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz",
|
|
@@ -516,7 +713,6 @@
|
|
| 516 |
"version": "1.1.0",
|
| 517 |
"resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz",
|
| 518 |
"integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",
|
| 519 |
-
"dev": true,
|
| 520 |
"license": "MIT"
|
| 521 |
},
|
| 522 |
"node_modules/@tybys/wasm-util": {
|
|
@@ -555,6 +751,12 @@
|
|
| 555 |
"dev": true,
|
| 556 |
"license": "MIT"
|
| 557 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 558 |
"node_modules/@types/node": {
|
| 559 |
"version": "25.6.0",
|
| 560 |
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz",
|
|
@@ -678,6 +880,18 @@
|
|
| 678 |
"url": "https://opencollective.com/vitest"
|
| 679 |
}
|
| 680 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 681 |
"node_modules/assertion-error": {
|
| 682 |
"version": "2.0.1",
|
| 683 |
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",
|
|
@@ -688,6 +902,38 @@
|
|
| 688 |
"node": ">=12"
|
| 689 |
}
|
| 690 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 691 |
"node_modules/chai": {
|
| 692 |
"version": "6.2.2",
|
| 693 |
"resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz",
|
|
@@ -705,6 +951,15 @@
|
|
| 705 |
"dev": true,
|
| 706 |
"license": "MIT"
|
| 707 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 708 |
"node_modules/detect-libc": {
|
| 709 |
"version": "2.1.2",
|
| 710 |
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
|
|
@@ -715,6 +970,18 @@
|
|
| 715 |
"node": ">=8"
|
| 716 |
}
|
| 717 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 718 |
"node_modules/es-module-lexer": {
|
| 719 |
"version": "2.1.0",
|
| 720 |
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.1.0.tgz",
|
|
@@ -732,6 +999,21 @@
|
|
| 732 |
"@types/estree": "^1.0.0"
|
| 733 |
}
|
| 734 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 735 |
"node_modules/expect-type": {
|
| 736 |
"version": "1.3.0",
|
| 737 |
"resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz",
|
|
@@ -775,6 +1057,78 @@
|
|
| 775 |
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
| 776 |
}
|
| 777 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 778 |
"node_modules/lightningcss": {
|
| 779 |
"version": "1.32.0",
|
| 780 |
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz",
|
|
@@ -1046,6 +1400,15 @@
|
|
| 1046 |
"@jridgewell/sourcemap-codec": "^1.5.5"
|
| 1047 |
}
|
| 1048 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1049 |
"node_modules/nanoid": {
|
| 1050 |
"version": "3.3.12",
|
| 1051 |
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz",
|
|
@@ -1076,6 +1439,79 @@
|
|
| 1076 |
],
|
| 1077 |
"license": "MIT"
|
| 1078 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1079 |
"node_modules/pathe": {
|
| 1080 |
"version": "2.0.3",
|
| 1081 |
"resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
|
|
@@ -1270,6 +1706,20 @@
|
|
| 1270 |
"dev": true,
|
| 1271 |
"license": "MIT"
|
| 1272 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1273 |
"node_modules/vite": {
|
| 1274 |
"version": "8.0.11",
|
| 1275 |
"resolved": "https://registry.npmjs.org/vite/-/vite-8.0.11.tgz",
|
|
@@ -1454,6 +1904,15 @@
|
|
| 1454 |
"engines": {
|
| 1455 |
"node": ">=8"
|
| 1456 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1457 |
}
|
| 1458 |
}
|
| 1459 |
}
|
|
|
|
| 8 |
"name": "projeto-talp1",
|
| 9 |
"version": "0.0.1",
|
| 10 |
"license": "ISC",
|
| 11 |
+
"dependencies": {
|
| 12 |
+
"@langchain/core": "^1.1.45",
|
| 13 |
+
"@langchain/langgraph": "^1.3.0",
|
| 14 |
+
"@langchain/openrouter": "^0.2.4",
|
| 15 |
+
"dotenv": "^17.4.2",
|
| 16 |
+
"langchain": "^1.4.0",
|
| 17 |
+
"zod": "^4.4.3"
|
| 18 |
+
},
|
| 19 |
"devDependencies": {
|
| 20 |
"@biomejs/biome": "2.4.14",
|
| 21 |
"@types/node": "^25.6.0",
|
|
|
|
| 186 |
"node": ">=14.21.3"
|
| 187 |
}
|
| 188 |
},
|
| 189 |
+
"node_modules/@cfworker/json-schema": {
|
| 190 |
+
"version": "4.1.1",
|
| 191 |
+
"resolved": "https://registry.npmjs.org/@cfworker/json-schema/-/json-schema-4.1.1.tgz",
|
| 192 |
+
"integrity": "sha512-gAmrUZSGtKc3AiBL71iNWxDsyUC5uMaKKGdvzYsBoTW/xi42JQHl7eKV2OYzCUqvc+D2RCcf7EXY2iCyFIk6og==",
|
| 193 |
+
"license": "MIT"
|
| 194 |
+
},
|
| 195 |
"node_modules/@emnapi/core": {
|
| 196 |
"version": "1.10.0",
|
| 197 |
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz",
|
|
|
|
| 233 |
"dev": true,
|
| 234 |
"license": "MIT"
|
| 235 |
},
|
| 236 |
+
"node_modules/@langchain/core": {
|
| 237 |
+
"version": "1.1.45",
|
| 238 |
+
"resolved": "https://registry.npmjs.org/@langchain/core/-/core-1.1.45.tgz",
|
| 239 |
+
"integrity": "sha512-Y/wvuglLTMKJahkl4QD9dBIdF/z/CxZJWdTfHJF/q2jtlJtoFf6Mb5JpGxZfsi3mBY6NSG941FSLTcqhCKrhBA==",
|
| 240 |
+
"license": "MIT",
|
| 241 |
+
"dependencies": {
|
| 242 |
+
"@cfworker/json-schema": "^4.0.2",
|
| 243 |
+
"@standard-schema/spec": "^1.1.0",
|
| 244 |
+
"ansi-styles": "^5.0.0",
|
| 245 |
+
"camelcase": "6",
|
| 246 |
+
"decamelize": "1.2.0",
|
| 247 |
+
"js-tiktoken": "^1.0.12",
|
| 248 |
+
"langsmith": ">=0.5.0 <1.0.0",
|
| 249 |
+
"mustache": "^4.2.0",
|
| 250 |
+
"p-queue": "^6.6.2",
|
| 251 |
+
"zod": "^3.25.76 || ^4"
|
| 252 |
+
},
|
| 253 |
+
"engines": {
|
| 254 |
+
"node": ">=20"
|
| 255 |
+
}
|
| 256 |
+
},
|
| 257 |
+
"node_modules/@langchain/langgraph": {
|
| 258 |
+
"version": "1.3.0",
|
| 259 |
+
"resolved": "https://registry.npmjs.org/@langchain/langgraph/-/langgraph-1.3.0.tgz",
|
| 260 |
+
"integrity": "sha512-QvhTjiyqFPz81A+y6LHs223w6DTjv5+882DT4mup72bd72rRhNjTYo5fhes5um0swnKArvY/arc7KeFInfHHWw==",
|
| 261 |
+
"license": "MIT",
|
| 262 |
+
"dependencies": {
|
| 263 |
+
"@langchain/langgraph-checkpoint": "^1.0.2",
|
| 264 |
+
"@langchain/langgraph-sdk": "~1.9.0",
|
| 265 |
+
"@langchain/protocol": "^0.0.15",
|
| 266 |
+
"@standard-schema/spec": "1.1.0",
|
| 267 |
+
"uuid": "^10.0.0"
|
| 268 |
+
},
|
| 269 |
+
"engines": {
|
| 270 |
+
"node": ">=18"
|
| 271 |
+
},
|
| 272 |
+
"peerDependencies": {
|
| 273 |
+
"@langchain/core": "^1.1.44",
|
| 274 |
+
"zod": "^3.25.32 || ^4.2.0",
|
| 275 |
+
"zod-to-json-schema": "^3.x"
|
| 276 |
+
},
|
| 277 |
+
"peerDependenciesMeta": {
|
| 278 |
+
"zod-to-json-schema": {
|
| 279 |
+
"optional": true
|
| 280 |
+
}
|
| 281 |
+
}
|
| 282 |
+
},
|
| 283 |
+
"node_modules/@langchain/langgraph-checkpoint": {
|
| 284 |
+
"version": "1.0.2",
|
| 285 |
+
"resolved": "https://registry.npmjs.org/@langchain/langgraph-checkpoint/-/langgraph-checkpoint-1.0.2.tgz",
|
| 286 |
+
"integrity": "sha512-F4E5Tr0nt8FGghgdscJtHw+ABzChOHeI80R7Y1pjIHdiJom6c2ieo76vL+FWiny80JmoGqhrVAEIWrw0cXKPxg==",
|
| 287 |
+
"license": "MIT",
|
| 288 |
+
"dependencies": {
|
| 289 |
+
"uuid": "^10.0.0"
|
| 290 |
+
},
|
| 291 |
+
"engines": {
|
| 292 |
+
"node": ">=18"
|
| 293 |
+
},
|
| 294 |
+
"peerDependencies": {
|
| 295 |
+
"@langchain/core": "^1.1.44"
|
| 296 |
+
}
|
| 297 |
+
},
|
| 298 |
+
"node_modules/@langchain/langgraph-sdk": {
|
| 299 |
+
"version": "1.9.1",
|
| 300 |
+
"resolved": "https://registry.npmjs.org/@langchain/langgraph-sdk/-/langgraph-sdk-1.9.1.tgz",
|
| 301 |
+
"integrity": "sha512-pHojybde9HoMz7ZDtyW3pgDdomAN4C0pbdgXASjccFS+S2Cqx75iZBtBUUg1A/CSer5xh9GakdIqyihxZOf7VA==",
|
| 302 |
+
"license": "MIT",
|
| 303 |
+
"dependencies": {
|
| 304 |
+
"@langchain/core": "^1.1.44",
|
| 305 |
+
"@langchain/protocol": "^0.0.15",
|
| 306 |
+
"@types/json-schema": "^7.0.15",
|
| 307 |
+
"p-queue": "^9.0.1",
|
| 308 |
+
"p-retry": "^7.1.1",
|
| 309 |
+
"uuid": "^13.0.0"
|
| 310 |
+
},
|
| 311 |
+
"peerDependencies": {
|
| 312 |
+
"react": "^18 || ^19",
|
| 313 |
+
"react-dom": "^18 || ^19",
|
| 314 |
+
"svelte": "^4.0.0 || ^5.0.0",
|
| 315 |
+
"vue": "^3.0.0"
|
| 316 |
+
},
|
| 317 |
+
"peerDependenciesMeta": {
|
| 318 |
+
"react": {
|
| 319 |
+
"optional": true
|
| 320 |
+
},
|
| 321 |
+
"react-dom": {
|
| 322 |
+
"optional": true
|
| 323 |
+
},
|
| 324 |
+
"svelte": {
|
| 325 |
+
"optional": true
|
| 326 |
+
},
|
| 327 |
+
"vue": {
|
| 328 |
+
"optional": true
|
| 329 |
+
}
|
| 330 |
+
}
|
| 331 |
+
},
|
| 332 |
+
"node_modules/@langchain/langgraph-sdk/node_modules/eventemitter3": {
|
| 333 |
+
"version": "5.0.4",
|
| 334 |
+
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz",
|
| 335 |
+
"integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==",
|
| 336 |
+
"license": "MIT"
|
| 337 |
+
},
|
| 338 |
+
"node_modules/@langchain/langgraph-sdk/node_modules/p-queue": {
|
| 339 |
+
"version": "9.2.0",
|
| 340 |
+
"resolved": "https://registry.npmjs.org/p-queue/-/p-queue-9.2.0.tgz",
|
| 341 |
+
"integrity": "sha512-dWgLE8AH0HjQ9fe74pUkKkvzzYT18Inp4zra3lKHnnwqGvcfcUBrvF2EAVX+envufDNBOzpPq/IBUONDbI7+3g==",
|
| 342 |
+
"license": "MIT",
|
| 343 |
+
"dependencies": {
|
| 344 |
+
"eventemitter3": "^5.0.4",
|
| 345 |
+
"p-timeout": "^7.0.0"
|
| 346 |
+
},
|
| 347 |
+
"engines": {
|
| 348 |
+
"node": ">=20"
|
| 349 |
+
},
|
| 350 |
+
"funding": {
|
| 351 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
| 352 |
+
}
|
| 353 |
+
},
|
| 354 |
+
"node_modules/@langchain/langgraph-sdk/node_modules/p-timeout": {
|
| 355 |
+
"version": "7.0.1",
|
| 356 |
+
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-7.0.1.tgz",
|
| 357 |
+
"integrity": "sha512-AxTM2wDGORHGEkPCt8yqxOTMgpfbEHqF51f/5fJCmwFC3C/zNcGT63SymH2ttOAaiIws2zVg4+izQCjrakcwHg==",
|
| 358 |
+
"license": "MIT",
|
| 359 |
+
"engines": {
|
| 360 |
+
"node": ">=20"
|
| 361 |
+
},
|
| 362 |
+
"funding": {
|
| 363 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
| 364 |
+
}
|
| 365 |
+
},
|
| 366 |
+
"node_modules/@langchain/langgraph-sdk/node_modules/uuid": {
|
| 367 |
+
"version": "13.0.2",
|
| 368 |
+
"resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.2.tgz",
|
| 369 |
+
"integrity": "sha512-vzi9uRZ926x4XV73S/4qQaTwPXM2JBj6/6lI/byHH1jOpCzb0zDbfytgA9LcN/hzb2l7WQSQnxITOVx5un/wGw==",
|
| 370 |
+
"funding": [
|
| 371 |
+
"https://github.com/sponsors/broofa",
|
| 372 |
+
"https://github.com/sponsors/ctavan"
|
| 373 |
+
],
|
| 374 |
+
"license": "MIT",
|
| 375 |
+
"bin": {
|
| 376 |
+
"uuid": "dist-node/bin/uuid"
|
| 377 |
+
}
|
| 378 |
+
},
|
| 379 |
+
"node_modules/@langchain/openai": {
|
| 380 |
+
"version": "1.4.5",
|
| 381 |
+
"resolved": "https://registry.npmjs.org/@langchain/openai/-/openai-1.4.5.tgz",
|
| 382 |
+
"integrity": "sha512-bQ2WMIZfSh02trJLYSAtiIcD3j6EBCiAm9nw0dZWQsVaUxmWc3JJqs8uUte6AkMazmLHzcUIw+14UkXO5fRJvQ==",
|
| 383 |
+
"license": "MIT",
|
| 384 |
+
"dependencies": {
|
| 385 |
+
"js-tiktoken": "^1.0.12",
|
| 386 |
+
"openai": "^6.34.0",
|
| 387 |
+
"zod": "^3.25.76 || ^4"
|
| 388 |
+
},
|
| 389 |
+
"engines": {
|
| 390 |
+
"node": ">=20"
|
| 391 |
+
},
|
| 392 |
+
"peerDependencies": {
|
| 393 |
+
"@langchain/core": "^1.1.42"
|
| 394 |
+
}
|
| 395 |
+
},
|
| 396 |
+
"node_modules/@langchain/openrouter": {
|
| 397 |
+
"version": "0.2.4",
|
| 398 |
+
"resolved": "https://registry.npmjs.org/@langchain/openrouter/-/openrouter-0.2.4.tgz",
|
| 399 |
+
"integrity": "sha512-FzoHUwIM4eE3rcMKZ1dL9a3vgVrz+6WiS5ygIMyHagNlPDUxpdg1V5LnA+ZVWosNyAtAkFYmz+DQZys9nM9oQQ==",
|
| 400 |
+
"license": "MIT",
|
| 401 |
+
"dependencies": {
|
| 402 |
+
"@langchain/openai": "1.4.5",
|
| 403 |
+
"eventsource-parser": "^3.0.6",
|
| 404 |
+
"openai": "^6.22.0"
|
| 405 |
+
},
|
| 406 |
+
"engines": {
|
| 407 |
+
"node": ">=20"
|
| 408 |
+
},
|
| 409 |
+
"peerDependencies": {
|
| 410 |
+
"@langchain/core": "^1.0.0"
|
| 411 |
+
}
|
| 412 |
+
},
|
| 413 |
+
"node_modules/@langchain/protocol": {
|
| 414 |
+
"version": "0.0.15",
|
| 415 |
+
"resolved": "https://registry.npmjs.org/@langchain/protocol/-/protocol-0.0.15.tgz",
|
| 416 |
+
"integrity": "sha512-MllvbpMjqHevUm+v94M422mH7XKN+wGCvJRBVROTWBotEDOATYB4Ktk2UheYP859y9o2LlhtPek5t1T9eyfAbQ==",
|
| 417 |
+
"license": "MIT"
|
| 418 |
+
},
|
| 419 |
"node_modules/@napi-rs/wasm-runtime": {
|
| 420 |
"version": "1.1.4",
|
| 421 |
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz",
|
|
|
|
| 713 |
"version": "1.1.0",
|
| 714 |
"resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz",
|
| 715 |
"integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",
|
|
|
|
| 716 |
"license": "MIT"
|
| 717 |
},
|
| 718 |
"node_modules/@tybys/wasm-util": {
|
|
|
|
| 751 |
"dev": true,
|
| 752 |
"license": "MIT"
|
| 753 |
},
|
| 754 |
+
"node_modules/@types/json-schema": {
|
| 755 |
+
"version": "7.0.15",
|
| 756 |
+
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
|
| 757 |
+
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
|
| 758 |
+
"license": "MIT"
|
| 759 |
+
},
|
| 760 |
"node_modules/@types/node": {
|
| 761 |
"version": "25.6.0",
|
| 762 |
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz",
|
|
|
|
| 880 |
"url": "https://opencollective.com/vitest"
|
| 881 |
}
|
| 882 |
},
|
| 883 |
+
"node_modules/ansi-styles": {
|
| 884 |
+
"version": "5.2.0",
|
| 885 |
+
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
|
| 886 |
+
"integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
|
| 887 |
+
"license": "MIT",
|
| 888 |
+
"engines": {
|
| 889 |
+
"node": ">=10"
|
| 890 |
+
},
|
| 891 |
+
"funding": {
|
| 892 |
+
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
| 893 |
+
}
|
| 894 |
+
},
|
| 895 |
"node_modules/assertion-error": {
|
| 896 |
"version": "2.0.1",
|
| 897 |
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",
|
|
|
|
| 902 |
"node": ">=12"
|
| 903 |
}
|
| 904 |
},
|
| 905 |
+
"node_modules/base64-js": {
|
| 906 |
+
"version": "1.5.1",
|
| 907 |
+
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
| 908 |
+
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
| 909 |
+
"funding": [
|
| 910 |
+
{
|
| 911 |
+
"type": "github",
|
| 912 |
+
"url": "https://github.com/sponsors/feross"
|
| 913 |
+
},
|
| 914 |
+
{
|
| 915 |
+
"type": "patreon",
|
| 916 |
+
"url": "https://www.patreon.com/feross"
|
| 917 |
+
},
|
| 918 |
+
{
|
| 919 |
+
"type": "consulting",
|
| 920 |
+
"url": "https://feross.org/support"
|
| 921 |
+
}
|
| 922 |
+
],
|
| 923 |
+
"license": "MIT"
|
| 924 |
+
},
|
| 925 |
+
"node_modules/camelcase": {
|
| 926 |
+
"version": "6.3.0",
|
| 927 |
+
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
|
| 928 |
+
"integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
|
| 929 |
+
"license": "MIT",
|
| 930 |
+
"engines": {
|
| 931 |
+
"node": ">=10"
|
| 932 |
+
},
|
| 933 |
+
"funding": {
|
| 934 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
| 935 |
+
}
|
| 936 |
+
},
|
| 937 |
"node_modules/chai": {
|
| 938 |
"version": "6.2.2",
|
| 939 |
"resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz",
|
|
|
|
| 951 |
"dev": true,
|
| 952 |
"license": "MIT"
|
| 953 |
},
|
| 954 |
+
"node_modules/decamelize": {
|
| 955 |
+
"version": "1.2.0",
|
| 956 |
+
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
|
| 957 |
+
"integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
|
| 958 |
+
"license": "MIT",
|
| 959 |
+
"engines": {
|
| 960 |
+
"node": ">=0.10.0"
|
| 961 |
+
}
|
| 962 |
+
},
|
| 963 |
"node_modules/detect-libc": {
|
| 964 |
"version": "2.1.2",
|
| 965 |
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
|
|
|
|
| 970 |
"node": ">=8"
|
| 971 |
}
|
| 972 |
},
|
| 973 |
+
"node_modules/dotenv": {
|
| 974 |
+
"version": "17.4.2",
|
| 975 |
+
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz",
|
| 976 |
+
"integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==",
|
| 977 |
+
"license": "BSD-2-Clause",
|
| 978 |
+
"engines": {
|
| 979 |
+
"node": ">=12"
|
| 980 |
+
},
|
| 981 |
+
"funding": {
|
| 982 |
+
"url": "https://dotenvx.com"
|
| 983 |
+
}
|
| 984 |
+
},
|
| 985 |
"node_modules/es-module-lexer": {
|
| 986 |
"version": "2.1.0",
|
| 987 |
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.1.0.tgz",
|
|
|
|
| 999 |
"@types/estree": "^1.0.0"
|
| 1000 |
}
|
| 1001 |
},
|
| 1002 |
+
"node_modules/eventemitter3": {
|
| 1003 |
+
"version": "4.0.7",
|
| 1004 |
+
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
|
| 1005 |
+
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
|
| 1006 |
+
"license": "MIT"
|
| 1007 |
+
},
|
| 1008 |
+
"node_modules/eventsource-parser": {
|
| 1009 |
+
"version": "3.0.8",
|
| 1010 |
+
"resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.8.tgz",
|
| 1011 |
+
"integrity": "sha512-70QWGkr4snxr0OXLRWsFLeRBIRPuQOvt4s8QYjmUlmlkyTZkRqS7EDVRZtzU3TiyDbXSzaOeF0XUKy8PchzukQ==",
|
| 1012 |
+
"license": "MIT",
|
| 1013 |
+
"engines": {
|
| 1014 |
+
"node": ">=18.0.0"
|
| 1015 |
+
}
|
| 1016 |
+
},
|
| 1017 |
"node_modules/expect-type": {
|
| 1018 |
"version": "1.3.0",
|
| 1019 |
"resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz",
|
|
|
|
| 1057 |
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
| 1058 |
}
|
| 1059 |
},
|
| 1060 |
+
"node_modules/is-network-error": {
|
| 1061 |
+
"version": "1.3.1",
|
| 1062 |
+
"resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.3.1.tgz",
|
| 1063 |
+
"integrity": "sha512-6QCxa49rQbmUWLfk0nuGqzql9U8uaV2H6279bRErPBHe/109hCzsLUBUHfbEtvLIHBd6hyXbgedBSHevm43Edw==",
|
| 1064 |
+
"license": "MIT",
|
| 1065 |
+
"engines": {
|
| 1066 |
+
"node": ">=16"
|
| 1067 |
+
},
|
| 1068 |
+
"funding": {
|
| 1069 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
| 1070 |
+
}
|
| 1071 |
+
},
|
| 1072 |
+
"node_modules/js-tiktoken": {
|
| 1073 |
+
"version": "1.0.21",
|
| 1074 |
+
"resolved": "https://registry.npmjs.org/js-tiktoken/-/js-tiktoken-1.0.21.tgz",
|
| 1075 |
+
"integrity": "sha512-biOj/6M5qdgx5TKjDnFT1ymSpM5tbd3ylwDtrQvFQSu0Z7bBYko2dF+W/aUkXUPuk6IVpRxk/3Q2sHOzGlS36g==",
|
| 1076 |
+
"license": "MIT",
|
| 1077 |
+
"dependencies": {
|
| 1078 |
+
"base64-js": "^1.5.1"
|
| 1079 |
+
}
|
| 1080 |
+
},
|
| 1081 |
+
"node_modules/langchain": {
|
| 1082 |
+
"version": "1.4.0",
|
| 1083 |
+
"resolved": "https://registry.npmjs.org/langchain/-/langchain-1.4.0.tgz",
|
| 1084 |
+
"integrity": "sha512-p3H5U1vfO0T4ri/xxqI6jccRP3LYmOW6KGxaJcwI5mIGVR/G6eNhZyjSZB9d7me6J7an4Pc6zA8tH8Qa6/7xwA==",
|
| 1085 |
+
"license": "MIT",
|
| 1086 |
+
"dependencies": {
|
| 1087 |
+
"@langchain/langgraph": "^1.3.0",
|
| 1088 |
+
"@langchain/langgraph-checkpoint": "^1.0.1",
|
| 1089 |
+
"langsmith": ">=0.5.0 <1.0.0",
|
| 1090 |
+
"zod": "^3.25.76 || ^4"
|
| 1091 |
+
},
|
| 1092 |
+
"engines": {
|
| 1093 |
+
"node": ">=20"
|
| 1094 |
+
},
|
| 1095 |
+
"peerDependencies": {
|
| 1096 |
+
"@langchain/core": "^1.1.44"
|
| 1097 |
+
}
|
| 1098 |
+
},
|
| 1099 |
+
"node_modules/langsmith": {
|
| 1100 |
+
"version": "0.6.2",
|
| 1101 |
+
"resolved": "https://registry.npmjs.org/langsmith/-/langsmith-0.6.2.tgz",
|
| 1102 |
+
"integrity": "sha512-OrFt+a2P4UMaa2cSpp3fjYTJ+TWQFjnoz5j4njiZYWMpAJezTrMRN1mrNVzq/FACprgPwAMjq5YkZNRYJKorwg==",
|
| 1103 |
+
"license": "MIT",
|
| 1104 |
+
"dependencies": {
|
| 1105 |
+
"p-queue": "6.6.2"
|
| 1106 |
+
},
|
| 1107 |
+
"peerDependencies": {
|
| 1108 |
+
"@opentelemetry/api": "*",
|
| 1109 |
+
"@opentelemetry/exporter-trace-otlp-proto": "*",
|
| 1110 |
+
"@opentelemetry/sdk-trace-base": "*",
|
| 1111 |
+
"openai": "*",
|
| 1112 |
+
"ws": ">=7"
|
| 1113 |
+
},
|
| 1114 |
+
"peerDependenciesMeta": {
|
| 1115 |
+
"@opentelemetry/api": {
|
| 1116 |
+
"optional": true
|
| 1117 |
+
},
|
| 1118 |
+
"@opentelemetry/exporter-trace-otlp-proto": {
|
| 1119 |
+
"optional": true
|
| 1120 |
+
},
|
| 1121 |
+
"@opentelemetry/sdk-trace-base": {
|
| 1122 |
+
"optional": true
|
| 1123 |
+
},
|
| 1124 |
+
"openai": {
|
| 1125 |
+
"optional": true
|
| 1126 |
+
},
|
| 1127 |
+
"ws": {
|
| 1128 |
+
"optional": true
|
| 1129 |
+
}
|
| 1130 |
+
}
|
| 1131 |
+
},
|
| 1132 |
"node_modules/lightningcss": {
|
| 1133 |
"version": "1.32.0",
|
| 1134 |
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz",
|
|
|
|
| 1400 |
"@jridgewell/sourcemap-codec": "^1.5.5"
|
| 1401 |
}
|
| 1402 |
},
|
| 1403 |
+
"node_modules/mustache": {
|
| 1404 |
+
"version": "4.2.0",
|
| 1405 |
+
"resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz",
|
| 1406 |
+
"integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==",
|
| 1407 |
+
"license": "MIT",
|
| 1408 |
+
"bin": {
|
| 1409 |
+
"mustache": "bin/mustache"
|
| 1410 |
+
}
|
| 1411 |
+
},
|
| 1412 |
"node_modules/nanoid": {
|
| 1413 |
"version": "3.3.12",
|
| 1414 |
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz",
|
|
|
|
| 1439 |
],
|
| 1440 |
"license": "MIT"
|
| 1441 |
},
|
| 1442 |
+
"node_modules/openai": {
|
| 1443 |
+
"version": "6.36.0",
|
| 1444 |
+
"resolved": "https://registry.npmjs.org/openai/-/openai-6.36.0.tgz",
|
| 1445 |
+
"integrity": "sha512-Has2YbIusMq9wQEierFsgf9c783dy1y9arX459LmphNacEkkM5yxi2RIyXP0LmkOroQyW19iTwALHL8Yf26UKA==",
|
| 1446 |
+
"license": "Apache-2.0",
|
| 1447 |
+
"bin": {
|
| 1448 |
+
"openai": "bin/cli"
|
| 1449 |
+
},
|
| 1450 |
+
"peerDependencies": {
|
| 1451 |
+
"ws": "^8.18.0",
|
| 1452 |
+
"zod": "^3.25 || ^4.0"
|
| 1453 |
+
},
|
| 1454 |
+
"peerDependenciesMeta": {
|
| 1455 |
+
"ws": {
|
| 1456 |
+
"optional": true
|
| 1457 |
+
},
|
| 1458 |
+
"zod": {
|
| 1459 |
+
"optional": true
|
| 1460 |
+
}
|
| 1461 |
+
}
|
| 1462 |
+
},
|
| 1463 |
+
"node_modules/p-finally": {
|
| 1464 |
+
"version": "1.0.0",
|
| 1465 |
+
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
|
| 1466 |
+
"integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==",
|
| 1467 |
+
"license": "MIT",
|
| 1468 |
+
"engines": {
|
| 1469 |
+
"node": ">=4"
|
| 1470 |
+
}
|
| 1471 |
+
},
|
| 1472 |
+
"node_modules/p-queue": {
|
| 1473 |
+
"version": "6.6.2",
|
| 1474 |
+
"resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz",
|
| 1475 |
+
"integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==",
|
| 1476 |
+
"license": "MIT",
|
| 1477 |
+
"dependencies": {
|
| 1478 |
+
"eventemitter3": "^4.0.4",
|
| 1479 |
+
"p-timeout": "^3.2.0"
|
| 1480 |
+
},
|
| 1481 |
+
"engines": {
|
| 1482 |
+
"node": ">=8"
|
| 1483 |
+
},
|
| 1484 |
+
"funding": {
|
| 1485 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
| 1486 |
+
}
|
| 1487 |
+
},
|
| 1488 |
+
"node_modules/p-retry": {
|
| 1489 |
+
"version": "7.1.1",
|
| 1490 |
+
"resolved": "https://registry.npmjs.org/p-retry/-/p-retry-7.1.1.tgz",
|
| 1491 |
+
"integrity": "sha512-J5ApzjyRkkf601HpEeykoiCvzHQjWxPAHhyjFcEUP2SWq0+35NKh8TLhpLw+Dkq5TZBFvUM6UigdE9hIVYTl5w==",
|
| 1492 |
+
"license": "MIT",
|
| 1493 |
+
"dependencies": {
|
| 1494 |
+
"is-network-error": "^1.1.0"
|
| 1495 |
+
},
|
| 1496 |
+
"engines": {
|
| 1497 |
+
"node": ">=20"
|
| 1498 |
+
},
|
| 1499 |
+
"funding": {
|
| 1500 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
| 1501 |
+
}
|
| 1502 |
+
},
|
| 1503 |
+
"node_modules/p-timeout": {
|
| 1504 |
+
"version": "3.2.0",
|
| 1505 |
+
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz",
|
| 1506 |
+
"integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==",
|
| 1507 |
+
"license": "MIT",
|
| 1508 |
+
"dependencies": {
|
| 1509 |
+
"p-finally": "^1.0.0"
|
| 1510 |
+
},
|
| 1511 |
+
"engines": {
|
| 1512 |
+
"node": ">=8"
|
| 1513 |
+
}
|
| 1514 |
+
},
|
| 1515 |
"node_modules/pathe": {
|
| 1516 |
"version": "2.0.3",
|
| 1517 |
"resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
|
|
|
|
| 1706 |
"dev": true,
|
| 1707 |
"license": "MIT"
|
| 1708 |
},
|
| 1709 |
+
"node_modules/uuid": {
|
| 1710 |
+
"version": "10.0.0",
|
| 1711 |
+
"resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz",
|
| 1712 |
+
"integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==",
|
| 1713 |
+
"deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).",
|
| 1714 |
+
"funding": [
|
| 1715 |
+
"https://github.com/sponsors/broofa",
|
| 1716 |
+
"https://github.com/sponsors/ctavan"
|
| 1717 |
+
],
|
| 1718 |
+
"license": "MIT",
|
| 1719 |
+
"bin": {
|
| 1720 |
+
"uuid": "dist/bin/uuid"
|
| 1721 |
+
}
|
| 1722 |
+
},
|
| 1723 |
"node_modules/vite": {
|
| 1724 |
"version": "8.0.11",
|
| 1725 |
"resolved": "https://registry.npmjs.org/vite/-/vite-8.0.11.tgz",
|
|
|
|
| 1904 |
"engines": {
|
| 1905 |
"node": ">=8"
|
| 1906 |
}
|
| 1907 |
+
},
|
| 1908 |
+
"node_modules/zod": {
|
| 1909 |
+
"version": "4.4.3",
|
| 1910 |
+
"resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz",
|
| 1911 |
+
"integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==",
|
| 1912 |
+
"license": "MIT",
|
| 1913 |
+
"funding": {
|
| 1914 |
+
"url": "https://github.com/sponsors/colinhacks"
|
| 1915 |
+
}
|
| 1916 |
}
|
| 1917 |
}
|
| 1918 |
}
|
package.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
| 3 |
"version": "0.0.1",
|
| 4 |
"description": "Projeto de TALP 1",
|
| 5 |
"main": "dist/index.js",
|
|
|
|
| 6 |
"scripts": {
|
| 7 |
"test": "vitest",
|
| 8 |
"coverage": "vitest run --coverage",
|
|
@@ -24,5 +25,13 @@
|
|
| 24 |
"@types/node": "^25.6.0",
|
| 25 |
"typescript": "^6.0.3",
|
| 26 |
"vitest": "^4.1.5"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
}
|
| 28 |
}
|
|
|
|
| 3 |
"version": "0.0.1",
|
| 4 |
"description": "Projeto de TALP 1",
|
| 5 |
"main": "dist/index.js",
|
| 6 |
+
"type": "module",
|
| 7 |
"scripts": {
|
| 8 |
"test": "vitest",
|
| 9 |
"coverage": "vitest run --coverage",
|
|
|
|
| 25 |
"@types/node": "^25.6.0",
|
| 26 |
"typescript": "^6.0.3",
|
| 27 |
"vitest": "^4.1.5"
|
| 28 |
+
},
|
| 29 |
+
"dependencies": {
|
| 30 |
+
"@langchain/core": "^1.1.45",
|
| 31 |
+
"@langchain/langgraph": "^1.3.0",
|
| 32 |
+
"@langchain/openrouter": "^0.2.4",
|
| 33 |
+
"dotenv": "^17.4.2",
|
| 34 |
+
"langchain": "^1.4.0",
|
| 35 |
+
"zod": "^4.4.3"
|
| 36 |
}
|
| 37 |
}
|
src/agents/auditor/agent.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { END, type GraphNode, START, StateGraph } from "@langchain/langgraph";
|
| 2 |
+
|
| 3 |
+
import { AuditorState } from "./state.ts";
|
| 4 |
+
import { slitherTool } from "./tools/slither-tool.ts";
|
| 5 |
+
|
| 6 |
+
const PLACEHOLDER_VULNERABILITIES = [
|
| 7 |
+
{ type: "reentrancy", severity: "high", description: "Unchecked external call allows reentrancy attack." },
|
| 8 |
+
{ type: "integer-overflow", severity: "medium", description: "Arithmetic operation may overflow." },
|
| 9 |
+
];
|
| 10 |
+
|
| 11 |
+
const auditContract: GraphNode<typeof AuditorState> = async (state) => {
|
| 12 |
+
await slitherTool.invoke({ solidityFile: state.solidityFile });
|
| 13 |
+
return { vulnerabilities: PLACEHOLDER_VULNERABILITIES };
|
| 14 |
+
};
|
| 15 |
+
|
| 16 |
+
export const auditorAgent = new StateGraph(AuditorState)
|
| 17 |
+
.addNode("auditContract", auditContract)
|
| 18 |
+
.addEdge(START, "auditContract")
|
| 19 |
+
.addEdge("auditContract", END)
|
| 20 |
+
.compile();
|
src/agents/auditor/model.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { ChatOpenRouter } from "@langchain/openrouter";
|
| 2 |
+
|
| 3 |
+
export const auditorModel = new ChatOpenRouter({
|
| 4 |
+
model: "moonshotai/kimi-k2.6",
|
| 5 |
+
});
|
src/agents/auditor/state.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { StateSchema } from "@langchain/langgraph";
|
| 2 |
+
import { z } from "zod";
|
| 3 |
+
|
| 4 |
+
export const AuditorState = new StateSchema({
|
| 5 |
+
solidityFile: z.string().default(""),
|
| 6 |
+
vulnerabilities: z.array(z.record(z.string(), z.any())).default([]),
|
| 7 |
+
});
|
src/agents/auditor/tools/slither-tool.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { tool } from "langchain";
|
| 2 |
+
import { z } from "zod";
|
| 3 |
+
|
| 4 |
+
export const slitherTool = tool(
|
| 5 |
+
async (_input) => {
|
| 6 |
+
return [];
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
name: "slither",
|
| 10 |
+
description: "Run slither static analysis on a Solidity contract.",
|
| 11 |
+
schema: z.object({
|
| 12 |
+
solidityFile: z.string().describe("The Solidity source code to analyze."),
|
| 13 |
+
}),
|
| 14 |
+
},
|
| 15 |
+
);
|
src/agents/coder/agent.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { END, type GraphNode, START, StateGraph } from "@langchain/langgraph";
|
| 2 |
+
|
| 3 |
+
import { CoderState } from "./state.ts";
|
| 4 |
+
|
| 5 |
+
const PLACEHOLDER_CONTRACT = `// SPDX-License-Identifier: MIT
|
| 6 |
+
pragma solidity ^0.8.0;
|
| 7 |
+
|
| 8 |
+
contract Placeholder {
|
| 9 |
+
// TODO: implement contract based on requirements
|
| 10 |
+
}`;
|
| 11 |
+
|
| 12 |
+
const generateContract: GraphNode<typeof CoderState> = async (_state) => {
|
| 13 |
+
return { contract: PLACEHOLDER_CONTRACT };
|
| 14 |
+
};
|
| 15 |
+
|
| 16 |
+
export const coderAgent = new StateGraph(CoderState)
|
| 17 |
+
.addNode("generateContract", generateContract)
|
| 18 |
+
.addEdge(START, "generateContract")
|
| 19 |
+
.addEdge("generateContract", END)
|
| 20 |
+
.compile();
|
src/agents/coder/state.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { StateSchema } from "@langchain/langgraph";
|
| 2 |
+
import { z } from "zod";
|
| 3 |
+
|
| 4 |
+
export const CoderState = new StateSchema({
|
| 5 |
+
requirements: z.array(z.string()).default([]),
|
| 6 |
+
contract: z.string().default(""),
|
| 7 |
+
});
|
src/agents/tester/agent.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { END, type GraphNode, START, StateGraph } from "@langchain/langgraph";
|
| 2 |
+
|
| 3 |
+
import { TesterState } from "./state.ts";
|
| 4 |
+
|
| 5 |
+
const runTests: GraphNode<typeof TesterState> = async (_state) => {
|
| 6 |
+
return { results: [] };
|
| 7 |
+
};
|
| 8 |
+
|
| 9 |
+
export const testerAgent = new StateGraph(TesterState)
|
| 10 |
+
.addNode("runTests", runTests)
|
| 11 |
+
.addEdge(START, "runTests")
|
| 12 |
+
.addEdge("runTests", END)
|
| 13 |
+
.compile();
|
src/agents/tester/state.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { StateSchema } from "@langchain/langgraph";
|
| 2 |
+
import { z } from "zod";
|
| 3 |
+
|
| 4 |
+
export const TesterState = new StateSchema({
|
| 5 |
+
solidityFiles: z.array(z.string()).default([]),
|
| 6 |
+
vulnerability: z.record(z.string(), z.any()).default({}),
|
| 7 |
+
results: z.array(z.any()).default([]),
|
| 8 |
+
});
|
src/config/constants.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const constants = {
|
| 2 |
+
OPENROUTER_API_KEY: process.env.OPENROUTER_API_KEY || "",
|
| 3 |
+
};
|
| 4 |
+
|
| 5 |
+
export default constants;
|
src/index.ts
CHANGED
|
@@ -1 +1,22 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import "dotenv/config";
|
| 2 |
+
|
| 3 |
+
import { auditorAgent } from "./agents/auditor/agent.ts";
|
| 4 |
+
import { coderAgent } from "./agents/coder/agent.ts";
|
| 5 |
+
import { testerAgent } from "./agents/tester/agent.ts";
|
| 6 |
+
|
| 7 |
+
const requirements = ["ERC20 token", "pausable", "ownable"];
|
| 8 |
+
|
| 9 |
+
const coderResult = await coderAgent.invoke({ requirements });
|
| 10 |
+
console.log("======= Coder =======");
|
| 11 |
+
console.log(coderResult.contract);
|
| 12 |
+
|
| 13 |
+
const auditorResult = await auditorAgent.invoke({ solidityFile: coderResult.contract });
|
| 14 |
+
console.log("\n======= Auditor =======");
|
| 15 |
+
console.log(auditorResult.vulnerabilities);
|
| 16 |
+
|
| 17 |
+
const testerResult = await testerAgent.invoke({
|
| 18 |
+
solidityFiles: [coderResult.contract],
|
| 19 |
+
vulnerability: auditorResult.vulnerabilities[0] ?? {},
|
| 20 |
+
});
|
| 21 |
+
console.log("\n======= Tester =======");
|
| 22 |
+
console.log(testerResult.results);
|
tsconfig.json
CHANGED
|
@@ -6,6 +6,7 @@
|
|
| 6 |
"compilerOptions": {
|
| 7 |
"rootDir": "./src",
|
| 8 |
"outDir": "./dist",
|
|
|
|
| 9 |
"module": "nodenext",
|
| 10 |
"target": "esnext",
|
| 11 |
"types": [
|
|
|
|
| 6 |
"compilerOptions": {
|
| 7 |
"rootDir": "./src",
|
| 8 |
"outDir": "./dist",
|
| 9 |
+
"moduleResolution": "nodenext",
|
| 10 |
"module": "nodenext",
|
| 11 |
"target": "esnext",
|
| 12 |
"types": [
|