@ai.ntellect/core 1.0.0 → 1.1.1

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 (435) hide show
  1. package/.mocharc.json +6 -0
  2. package/AGENTS.md +50 -0
  3. package/ARCHITECTURE.md +58 -0
  4. package/BENCHMARK.md +38 -0
  5. package/CHANGELOG.md +224 -0
  6. package/README.md +363 -142
  7. package/agent/agent-workflow.ts +569 -0
  8. package/agent/agent.ts +183 -0
  9. package/agent/base/executor.ts +103 -0
  10. package/agent/base/index.ts +87 -0
  11. package/agent/entity-resolver/confidence.ts +54 -0
  12. package/agent/entity-resolver/entity-index.ts +241 -0
  13. package/agent/entity-resolver/explore-strategy.ts +82 -0
  14. package/agent/entity-resolver/index.ts +22 -0
  15. package/agent/entity-resolver/resolver.ts +193 -0
  16. package/agent/entity-resolver/scorer.ts +211 -0
  17. package/agent/entity-resolver/types.ts +98 -0
  18. package/agent/generic-executor.ts +713 -0
  19. package/agent/handlers/cognitive-handler.ts +197 -0
  20. package/agent/handlers/index.ts +1 -0
  21. package/agent/handoff.ts +58 -0
  22. package/agent/llm-factory.ts +343 -0
  23. package/agent/orchestrator.ts +45 -0
  24. package/agent/prompt-builder.ts +78 -0
  25. package/agent/registry.ts +64 -0
  26. package/agent/tools/file-system.ts +471 -0
  27. package/agent/tools/index.ts +23 -0
  28. package/agent/tools/logger.ts +105 -0
  29. package/agent/tools/tool-resolver.ts +104 -0
  30. package/benchmark/cortexflow-workflow.ts +182 -0
  31. package/benchmark/langgraph-workflow.ts +201 -0
  32. package/benchmark/llm-client.ts +76 -0
  33. package/benchmark/run-benchmark.ts +222 -0
  34. package/cli-dev.ts +419 -0
  35. package/dist/agent/agent-workflow.d.ts +41 -0
  36. package/dist/agent/agent-workflow.d.ts.map +1 -0
  37. package/dist/agent/agent-workflow.js +560 -0
  38. package/dist/agent/agent-workflow.js.map +1 -0
  39. package/dist/agent/agent.d.ts +38 -0
  40. package/dist/agent/agent.d.ts.map +1 -0
  41. package/dist/agent/agent.js +149 -0
  42. package/dist/agent/agent.js.map +1 -0
  43. package/dist/agent/base/executor.d.ts +51 -0
  44. package/dist/agent/base/executor.d.ts.map +1 -0
  45. package/dist/agent/base/executor.js +69 -0
  46. package/dist/agent/base/executor.js.map +1 -0
  47. package/dist/agent/base/index.d.ts +30 -0
  48. package/dist/agent/base/index.d.ts.map +1 -0
  49. package/dist/agent/base/index.js +88 -0
  50. package/dist/agent/base/index.js.map +1 -0
  51. package/dist/agent/entity-resolver/confidence.d.ts +4 -0
  52. package/dist/agent/entity-resolver/confidence.d.ts.map +1 -0
  53. package/dist/agent/entity-resolver/confidence.js +47 -0
  54. package/dist/agent/entity-resolver/confidence.js.map +1 -0
  55. package/dist/agent/entity-resolver/entity-index.d.ts +40 -0
  56. package/dist/agent/entity-resolver/entity-index.d.ts.map +1 -0
  57. package/dist/agent/entity-resolver/entity-index.js +244 -0
  58. package/dist/agent/entity-resolver/entity-index.js.map +1 -0
  59. package/dist/agent/entity-resolver/explore-strategy.d.ts +13 -0
  60. package/dist/agent/entity-resolver/explore-strategy.d.ts.map +1 -0
  61. package/dist/agent/entity-resolver/explore-strategy.js +109 -0
  62. package/dist/agent/entity-resolver/explore-strategy.js.map +1 -0
  63. package/dist/agent/entity-resolver/index.d.ts +8 -0
  64. package/dist/agent/entity-resolver/index.d.ts.map +1 -0
  65. package/dist/agent/entity-resolver/index.js +16 -0
  66. package/dist/agent/entity-resolver/index.js.map +1 -0
  67. package/dist/agent/entity-resolver/resolver.d.ts +18 -0
  68. package/dist/agent/entity-resolver/resolver.d.ts.map +1 -0
  69. package/dist/agent/entity-resolver/resolver.js +158 -0
  70. package/dist/agent/entity-resolver/resolver.js.map +1 -0
  71. package/dist/agent/entity-resolver/scorer.d.ts +3 -0
  72. package/dist/agent/entity-resolver/scorer.d.ts.map +1 -0
  73. package/dist/agent/entity-resolver/scorer.js +182 -0
  74. package/dist/agent/entity-resolver/scorer.js.map +1 -0
  75. package/dist/agent/entity-resolver/types.d.ts +89 -0
  76. package/dist/agent/entity-resolver/types.d.ts.map +1 -0
  77. package/dist/agent/entity-resolver/types.js +3 -0
  78. package/dist/agent/entity-resolver/types.js.map +1 -0
  79. package/dist/agent/generic-executor.d.ts +68 -0
  80. package/dist/agent/generic-executor.d.ts.map +1 -0
  81. package/dist/agent/generic-executor.js +620 -0
  82. package/dist/agent/generic-executor.js.map +1 -0
  83. package/dist/agent/handlers/cognitive-handler.d.ts +44 -0
  84. package/dist/agent/handlers/cognitive-handler.d.ts.map +1 -0
  85. package/dist/agent/handlers/cognitive-handler.js +172 -0
  86. package/dist/agent/handlers/cognitive-handler.js.map +1 -0
  87. package/dist/agent/handlers/index.d.ts +2 -0
  88. package/dist/agent/handlers/index.d.ts.map +1 -0
  89. package/dist/agent/handlers/index.js +7 -0
  90. package/dist/agent/handlers/index.js.map +1 -0
  91. package/dist/agent/handoff.d.ts +12 -0
  92. package/dist/agent/handoff.d.ts.map +1 -0
  93. package/dist/agent/handoff.js +62 -0
  94. package/dist/agent/handoff.js.map +1 -0
  95. package/dist/agent/llm-factory.d.ts +19 -0
  96. package/dist/agent/llm-factory.d.ts.map +1 -0
  97. package/dist/agent/llm-factory.js +297 -0
  98. package/dist/agent/llm-factory.js.map +1 -0
  99. package/dist/agent/orchestrator.d.ts +18 -0
  100. package/dist/agent/orchestrator.d.ts.map +1 -0
  101. package/dist/agent/orchestrator.js +44 -0
  102. package/dist/agent/orchestrator.js.map +1 -0
  103. package/dist/agent/prompt-builder.d.ts +35 -0
  104. package/dist/agent/prompt-builder.d.ts.map +1 -0
  105. package/dist/agent/prompt-builder.js +76 -0
  106. package/dist/agent/prompt-builder.js.map +1 -0
  107. package/dist/agent/registry.d.ts +19 -0
  108. package/dist/agent/registry.d.ts.map +1 -0
  109. package/dist/agent/registry.js +48 -0
  110. package/dist/agent/registry.js.map +1 -0
  111. package/dist/agent/tools/file-system.d.ts +11 -0
  112. package/dist/agent/tools/file-system.d.ts.map +1 -0
  113. package/dist/agent/tools/file-system.js +528 -0
  114. package/dist/agent/tools/file-system.js.map +1 -0
  115. package/dist/agent/tools/index.d.ts +4 -0
  116. package/dist/agent/tools/index.d.ts.map +1 -0
  117. package/dist/agent/tools/index.js +20 -0
  118. package/dist/agent/tools/index.js.map +1 -0
  119. package/dist/agent/tools/logger.d.ts +33 -0
  120. package/dist/agent/tools/logger.d.ts.map +1 -0
  121. package/dist/agent/tools/logger.js +86 -0
  122. package/dist/agent/tools/logger.js.map +1 -0
  123. package/dist/agent/tools/tool-resolver.d.ts +7 -0
  124. package/dist/agent/tools/tool-resolver.d.ts.map +1 -0
  125. package/dist/agent/tools/tool-resolver.js +122 -0
  126. package/dist/agent/tools/tool-resolver.js.map +1 -0
  127. package/dist/execution/adapters/in-memory-checkpoint.d.ts +11 -0
  128. package/dist/execution/adapters/in-memory-checkpoint.d.ts.map +1 -0
  129. package/dist/execution/adapters/in-memory-checkpoint.js +54 -0
  130. package/dist/execution/adapters/in-memory-checkpoint.js.map +1 -0
  131. package/dist/execution/compiler.d.ts +8 -0
  132. package/dist/execution/compiler.d.ts.map +1 -0
  133. package/dist/execution/compiler.js +50 -0
  134. package/dist/execution/compiler.js.map +1 -0
  135. package/dist/execution/controller.d.ts +30 -0
  136. package/dist/execution/controller.d.ts.map +1 -0
  137. package/dist/execution/controller.js +80 -0
  138. package/dist/execution/controller.js.map +1 -0
  139. package/dist/execution/event-manager.d.ts +29 -0
  140. package/dist/execution/event-manager.d.ts.map +1 -0
  141. package/dist/execution/event-manager.js +264 -0
  142. package/dist/execution/event-manager.js.map +1 -0
  143. package/dist/execution/index.d.ts +221 -0
  144. package/dist/execution/index.d.ts.map +1 -0
  145. package/dist/execution/index.js +638 -0
  146. package/dist/execution/index.js.map +1 -0
  147. package/dist/execution/logger.d.ts +46 -0
  148. package/dist/execution/logger.d.ts.map +1 -0
  149. package/dist/execution/logger.js +69 -0
  150. package/dist/execution/logger.js.map +1 -0
  151. package/dist/execution/node.d.ts +65 -0
  152. package/dist/execution/node.d.ts.map +1 -0
  153. package/dist/execution/node.js +250 -0
  154. package/dist/execution/node.js.map +1 -0
  155. package/dist/execution/observer.d.ts +38 -0
  156. package/dist/execution/observer.d.ts.map +1 -0
  157. package/dist/execution/observer.js +111 -0
  158. package/dist/execution/observer.js.map +1 -0
  159. package/dist/execution/planner.d.ts +14 -0
  160. package/dist/execution/planner.d.ts.map +1 -0
  161. package/dist/execution/planner.js +43 -0
  162. package/dist/execution/planner.js.map +1 -0
  163. package/dist/execution/reducer.d.ts +19 -0
  164. package/dist/execution/reducer.d.ts.map +1 -0
  165. package/dist/execution/reducer.js +61 -0
  166. package/dist/execution/reducer.js.map +1 -0
  167. package/dist/execution/registry.d.ts +38 -0
  168. package/dist/execution/registry.d.ts.map +1 -0
  169. package/dist/execution/registry.js +63 -0
  170. package/dist/execution/registry.js.map +1 -0
  171. package/dist/execution/send-api.d.ts +24 -0
  172. package/dist/execution/send-api.d.ts.map +1 -0
  173. package/dist/execution/send-api.js +52 -0
  174. package/dist/execution/send-api.js.map +1 -0
  175. package/dist/execution/types.parallel.d.ts +61 -0
  176. package/dist/execution/types.parallel.d.ts.map +1 -0
  177. package/dist/execution/types.parallel.js +3 -0
  178. package/dist/execution/types.parallel.js.map +1 -0
  179. package/dist/execution/visualizer.d.ts +35 -0
  180. package/dist/execution/visualizer.d.ts.map +1 -0
  181. package/dist/execution/visualizer.js +131 -0
  182. package/dist/execution/visualizer.js.map +1 -0
  183. package/dist/index.d.ts +47 -0
  184. package/dist/index.d.ts.map +1 -0
  185. package/dist/index.js +78 -0
  186. package/dist/index.js.map +1 -0
  187. package/dist/interfaces/index.d.ts +487 -0
  188. package/dist/interfaces/index.d.ts.map +1 -0
  189. package/dist/interfaces/index.js +75 -0
  190. package/dist/interfaces/index.js.map +1 -0
  191. package/dist/modules/agenda/adapters/node-cron/index.d.ts +17 -0
  192. package/dist/modules/agenda/adapters/node-cron/index.d.ts.map +1 -0
  193. package/dist/modules/agenda/adapters/node-cron/index.js +30 -0
  194. package/dist/modules/agenda/adapters/node-cron/index.js.map +1 -0
  195. package/dist/modules/agenda/index.d.ts +63 -0
  196. package/dist/modules/agenda/index.d.ts.map +1 -0
  197. package/dist/modules/agenda/index.js +141 -0
  198. package/dist/modules/agenda/index.js.map +1 -0
  199. package/dist/modules/cli/index.d.ts +13 -0
  200. package/dist/modules/cli/index.d.ts.map +1 -0
  201. package/dist/modules/cli/index.js +672 -0
  202. package/dist/modules/cli/index.js.map +1 -0
  203. package/dist/modules/embedding/adapters/ai/index.d.ts +29 -0
  204. package/dist/modules/embedding/adapters/ai/index.d.ts.map +1 -0
  205. package/dist/modules/embedding/adapters/ai/index.js +58 -0
  206. package/dist/modules/embedding/adapters/ai/index.js.map +1 -0
  207. package/dist/modules/embedding/index.d.ts +36 -0
  208. package/dist/modules/embedding/index.d.ts.map +1 -0
  209. package/dist/modules/embedding/index.js +60 -0
  210. package/dist/modules/embedding/index.js.map +1 -0
  211. package/dist/modules/nlp/engine.d.ts +126 -0
  212. package/dist/modules/nlp/engine.d.ts.map +1 -0
  213. package/dist/modules/nlp/engine.js +299 -0
  214. package/dist/modules/nlp/engine.js.map +1 -0
  215. package/dist/modules/nlp/index.d.ts +27 -0
  216. package/dist/modules/nlp/index.d.ts.map +1 -0
  217. package/dist/modules/nlp/index.js +56 -0
  218. package/dist/modules/nlp/index.js.map +1 -0
  219. package/dist/persistence/index.d.ts +12 -0
  220. package/dist/persistence/index.d.ts.map +1 -0
  221. package/dist/persistence/index.js +24 -0
  222. package/dist/persistence/index.js.map +1 -0
  223. package/dist/persistence/neo4j/driver.d.ts +26 -0
  224. package/dist/persistence/neo4j/driver.d.ts.map +1 -0
  225. package/dist/persistence/neo4j/driver.js +64 -0
  226. package/dist/persistence/neo4j/driver.js.map +1 -0
  227. package/dist/persistence/neo4j/entity-store.d.ts +15 -0
  228. package/dist/persistence/neo4j/entity-store.d.ts.map +1 -0
  229. package/dist/persistence/neo4j/entity-store.js +136 -0
  230. package/dist/persistence/neo4j/entity-store.js.map +1 -0
  231. package/dist/persistence/neo4j/execution-tracer.d.ts +19 -0
  232. package/dist/persistence/neo4j/execution-tracer.d.ts.map +1 -0
  233. package/dist/persistence/neo4j/execution-tracer.js +166 -0
  234. package/dist/persistence/neo4j/execution-tracer.js.map +1 -0
  235. package/dist/persistence/neo4j/memory-adapter.d.ts +35 -0
  236. package/dist/persistence/neo4j/memory-adapter.d.ts.map +1 -0
  237. package/dist/persistence/neo4j/memory-adapter.js +252 -0
  238. package/dist/persistence/neo4j/memory-adapter.js.map +1 -0
  239. package/dist/persistence/neo4j/petri-checkpoint-adapter.d.ts +22 -0
  240. package/dist/persistence/neo4j/petri-checkpoint-adapter.d.ts.map +1 -0
  241. package/dist/persistence/neo4j/petri-checkpoint-adapter.js +141 -0
  242. package/dist/persistence/neo4j/petri-checkpoint-adapter.js.map +1 -0
  243. package/dist/pipeline/agent-pipeline.d.ts +99 -0
  244. package/dist/pipeline/agent-pipeline.d.ts.map +1 -0
  245. package/dist/pipeline/agent-pipeline.js +356 -0
  246. package/dist/pipeline/agent-pipeline.js.map +1 -0
  247. package/dist/routing/checkpoint-adapter.d.ts +30 -0
  248. package/dist/routing/checkpoint-adapter.d.ts.map +1 -0
  249. package/dist/routing/checkpoint-adapter.js +83 -0
  250. package/dist/routing/checkpoint-adapter.js.map +1 -0
  251. package/dist/routing/documentation-generator.d.ts +47 -0
  252. package/dist/routing/documentation-generator.d.ts.map +1 -0
  253. package/dist/routing/documentation-generator.js +320 -0
  254. package/dist/routing/documentation-generator.js.map +1 -0
  255. package/dist/routing/index.d.ts +38 -0
  256. package/dist/routing/index.d.ts.map +1 -0
  257. package/dist/routing/index.js +375 -0
  258. package/dist/routing/index.js.map +1 -0
  259. package/dist/routing/intent-classifier.d.ts +206 -0
  260. package/dist/routing/intent-classifier.d.ts.map +1 -0
  261. package/dist/routing/intent-classifier.js +267 -0
  262. package/dist/routing/intent-classifier.js.map +1 -0
  263. package/dist/routing/matrix.d.ts +6 -0
  264. package/dist/routing/matrix.d.ts.map +1 -0
  265. package/dist/routing/matrix.js +131 -0
  266. package/dist/routing/matrix.js.map +1 -0
  267. package/dist/routing/orchestrator.d.ts +87 -0
  268. package/dist/routing/orchestrator.d.ts.map +1 -0
  269. package/dist/routing/orchestrator.js +425 -0
  270. package/dist/routing/orchestrator.js.map +1 -0
  271. package/dist/routing/postgres-checkpoint-adapter.d.ts +32 -0
  272. package/dist/routing/postgres-checkpoint-adapter.d.ts.map +1 -0
  273. package/dist/routing/postgres-checkpoint-adapter.js +167 -0
  274. package/dist/routing/postgres-checkpoint-adapter.js.map +1 -0
  275. package/dist/routing/redis-checkpoint-adapter.d.ts +34 -0
  276. package/dist/routing/redis-checkpoint-adapter.d.ts.map +1 -0
  277. package/dist/routing/redis-checkpoint-adapter.js +170 -0
  278. package/dist/routing/redis-checkpoint-adapter.js.map +1 -0
  279. package/dist/routing/types.d.ts +49 -0
  280. package/dist/routing/types.d.ts.map +1 -0
  281. package/dist/routing/types.js +3 -0
  282. package/dist/routing/types.js.map +1 -0
  283. package/dist/types/agent.d.ts +289 -0
  284. package/dist/types/agent.d.ts.map +1 -0
  285. package/dist/types/agent.js +78 -0
  286. package/dist/types/agent.js.map +1 -0
  287. package/dist/types/index.d.ts +343 -0
  288. package/dist/types/index.d.ts.map +1 -0
  289. package/dist/types/index.js +3 -0
  290. package/dist/types/index.js.map +1 -0
  291. package/dist/utils/generate-action-schema.d.ts +4 -0
  292. package/dist/utils/generate-action-schema.d.ts.map +1 -0
  293. package/dist/utils/generate-action-schema.js +46 -0
  294. package/dist/utils/generate-action-schema.js.map +1 -0
  295. package/dist/utils/header-builder.d.ts +12 -0
  296. package/dist/utils/header-builder.d.ts.map +1 -0
  297. package/dist/utils/header-builder.js +35 -0
  298. package/dist/utils/header-builder.js.map +1 -0
  299. package/dist/utils/logger.d.ts +27 -0
  300. package/dist/utils/logger.d.ts.map +1 -0
  301. package/dist/utils/logger.js +45 -0
  302. package/dist/utils/logger.js.map +1 -0
  303. package/docs/.gitbook/assets/image (1).png +0 -0
  304. package/docs/.gitbook/assets/image (2).png +0 -0
  305. package/docs/.gitbook/assets/image (3).png +0 -0
  306. package/docs/.gitbook/assets/image (4).png +0 -0
  307. package/docs/.gitbook/assets/image (5).png +0 -0
  308. package/docs/.gitbook/assets/image (6).png +0 -0
  309. package/docs/.gitbook/assets/image.png +0 -0
  310. package/docs/README.md +57 -0
  311. package/docs/SUMMARY.md +34 -0
  312. package/docs/cas-dusages.md +69 -0
  313. package/docs/cli/README.md +65 -0
  314. package/docs/concepts-cles.md +50 -0
  315. package/docs/core/architecture.md +87 -0
  316. package/docs/core/benchmark.md +59 -0
  317. package/docs/core/checkpoint.md +72 -0
  318. package/docs/core/documentation.md +55 -0
  319. package/docs/core/graphcontroller.md +63 -0
  320. package/docs/core/graphflow.md +137 -0
  321. package/docs/core/introduction.md +41 -0
  322. package/docs/core/les-evenements.md +95 -0
  323. package/docs/modules/agenda/README.md +63 -0
  324. package/docs/modules/agenda/interface-iagenda.md +170 -0
  325. package/docs/modules/agenda/les-adaptateurs/README.md +237 -0
  326. package/docs/modules/agenda/les-adaptateurs/nodecronadapter.md +91 -0
  327. package/docs/modules/introduction.md +55 -0
  328. package/docs/modules/les-adaptateurs.md +52 -0
  329. package/docs/modules/memoire/README.md +68 -0
  330. package/docs/modules/memoire/interface-imemory.md +183 -0
  331. package/docs/modules/memoire/les-adaptateurs/README.md +209 -0
  332. package/docs/modules/memoire/les-adaptateurs/inmemoryadapter.md +110 -0
  333. package/docs/modules/memoire/les-adaptateurs/meilisearchadapter.md +147 -0
  334. package/docs/modules/memoire/les-adaptateurs/redisadapter.md +212 -0
  335. package/docs/modules/nlp/README.md +44 -0
  336. package/docs/philosophie.md +51 -0
  337. package/docs/tutoriels/ajouter-des-conditions.md +150 -0
  338. package/docs/tutoriels/branching.md +194 -0
  339. package/docs/tutoriels/checkpoint-usage.md +99 -0
  340. package/docs/tutoriels/creer-agent-onchain.md +1041 -0
  341. package/docs/tutoriels/creer-un-agent.md +108 -0
  342. package/docs/tutoriels/creer-un-graphe-simple.md +92 -0
  343. package/docs/tutoriels/gerer-les-erreurs.md +124 -0
  344. package/docs/tutoriels/pour-commencer.md +73 -0
  345. package/docs/tutoriels/retry.md +166 -0
  346. package/execution/adapters/in-memory-checkpoint.ts +35 -0
  347. package/execution/compiler.ts +47 -0
  348. package/execution/controller.ts +84 -0
  349. package/execution/event-manager.ts +331 -0
  350. package/execution/index.ts +800 -0
  351. package/execution/logger.ts +70 -0
  352. package/execution/node.ts +315 -0
  353. package/execution/observer.ts +192 -0
  354. package/execution/planner.ts +40 -0
  355. package/execution/reducer.ts +73 -0
  356. package/execution/registry.ts +86 -0
  357. package/execution/send-api.ts +58 -0
  358. package/execution/types.parallel.ts +81 -0
  359. package/execution/visualizer.ts +158 -0
  360. package/index.ts +55 -465
  361. package/interfaces/index.ts +597 -0
  362. package/modules/agenda/adapters/node-cron/index.ts +25 -0
  363. package/modules/agenda/index.ts +146 -0
  364. package/modules/cli/index.ts +580 -0
  365. package/modules/embedding/adapters/ai/index.ts +42 -0
  366. package/modules/embedding/index.ts +45 -0
  367. package/modules/nlp/engine.ts +324 -0
  368. package/modules/nlp/index.ts +45 -0
  369. package/package.json +81 -9
  370. package/persistence/index.ts +27 -0
  371. package/persistence/neo4j/driver.ts +34 -0
  372. package/persistence/neo4j/entity-store.ts +141 -0
  373. package/persistence/neo4j/execution-tracer.ts +194 -0
  374. package/persistence/neo4j/memory-adapter.ts +281 -0
  375. package/persistence/neo4j/petri-checkpoint-adapter.ts +153 -0
  376. package/pipeline/agent-pipeline.ts +426 -0
  377. package/routing/checkpoint-adapter.ts +79 -0
  378. package/routing/documentation-generator.ts +358 -0
  379. package/routing/index.ts +459 -0
  380. package/routing/intent-classifier.ts +360 -0
  381. package/routing/matrix.ts +138 -0
  382. package/routing/orchestrator.ts +498 -0
  383. package/routing/patterns/data-extraction.json +79 -0
  384. package/routing/patterns/human-approval.json +64 -0
  385. package/routing/patterns/rag-search.json +68 -0
  386. package/routing/postgres-checkpoint-adapter.ts +172 -0
  387. package/routing/redis-checkpoint-adapter.ts +187 -0
  388. package/routing/types.ts +59 -0
  389. package/routing/web-server.ts +260 -0
  390. package/scripts/generate-petri-docs.ts +70 -0
  391. package/scripts/get-gmail-token.js +65 -0
  392. package/scripts/get-gmail-token.ts +65 -0
  393. package/test/agent/agent.test.ts +92 -0
  394. package/test/agent/clone.test.ts +143 -0
  395. package/test/agent/cognitive-handler.test.ts +78 -0
  396. package/test/agent/entity-store.test.ts +80 -0
  397. package/test/agent/generic-executor.test.ts +230 -0
  398. package/test/agent/handoff.test.ts +163 -0
  399. package/test/agent/llm-factory.test.ts +40 -0
  400. package/test/agent/orchestrator.test.ts +156 -0
  401. package/test/agent/registry.test.ts +97 -0
  402. package/test/agent/tools.test.ts +267 -0
  403. package/test/execution/checkpoint.test.ts +811 -0
  404. package/test/execution/controller.test.ts +236 -0
  405. package/test/execution/event-manager.test.ts +118 -0
  406. package/test/execution/index.test.ts +690 -0
  407. package/test/execution/node.test.ts +464 -0
  408. package/test/execution/observer.test.ts +393 -0
  409. package/test/execution/parallel.test.ts +135 -0
  410. package/test/execution/plan-llm-integration.test.ts +290 -0
  411. package/test/execution/plan-real-onchain.test.ts +226 -0
  412. package/test/execution/send-api.test.ts +121 -0
  413. package/test/modules/agenda/node-cron.test.ts +307 -0
  414. package/test/modules/cli/index.test.ts +125 -0
  415. package/test/persistence/neo4j-execution-tracer.test.ts +96 -0
  416. package/test/persistence/neo4j-memory-adapter.test.ts +107 -0
  417. package/test/persistence/neo4j-petri-checkpoint.test.ts +89 -0
  418. package/test/pipeline/agent-pipeline.test.ts +118 -0
  419. package/test/routing/checkpoint-persistence.test.ts +58 -0
  420. package/test/routing/documentation-generator.test.ts +76 -0
  421. package/test/routing/integration.test.ts +261 -0
  422. package/test/routing/intent-classifier.test.ts +102 -0
  423. package/test/routing/petri.test.ts +156 -0
  424. package/test/routing/real-llm.test.ts +260 -0
  425. package/test-petri-features.ts +218 -0
  426. package/test-pipeline-api.ts +163 -0
  427. package/tsconfig.json +30 -108
  428. package/types/agent.ts +296 -0
  429. package/types/index.ts +387 -0
  430. package/utils/generate-action-schema.ts +47 -0
  431. package/utils/header-builder.ts +40 -0
  432. package/utils/logger.ts +40 -0
  433. package/package copy.json +0 -21
  434. package/types.ts +0 -62
  435. package/utils/executor.ts +0 -42
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Agent = void 0;
13
+ const base_1 = require("./base");
14
+ const generic_executor_1 = require("./generic-executor");
15
+ const logger_1 = require("./tools/logger");
16
+ const agent_workflow_1 = require("./agent-workflow");
17
+ const entity_index_1 = require("./entity-resolver/entity-index");
18
+ const resolver_1 = require("./entity-resolver/resolver");
19
+ const explore_strategy_1 = require("./entity-resolver/explore-strategy");
20
+ /**
21
+ * A generic assistant that can be configured with different roles, goals, and personalities
22
+ * @class Agent
23
+ * @example
24
+ * const assistant = new Agent({
25
+ * role: "Email Assistant",
26
+ * goal: "Help users send emails efficiently",
27
+ * backstory: "I am a professional and friendly assistant who specializes in email communication",
28
+ * llmConfig: { provider: "openai", model: "gpt-4" }
29
+ * tools: []
30
+ * });
31
+ */
32
+ class Agent {
33
+ constructor(config) {
34
+ var _a, _b;
35
+ const agent = new base_1.BaseAgent({
36
+ role: config.role,
37
+ goal: config.goal,
38
+ backstory: config.backstory,
39
+ tools: config.tools,
40
+ memory: config.memory,
41
+ llmConfig: config.llmConfig,
42
+ });
43
+ const maxIterations = config.maxIterations || 5;
44
+ this.logger = new logger_1.AgentLogger((_a = config.verbose) !== null && _a !== void 0 ? _a : true);
45
+ this.executor = new generic_executor_1.GenericExecutor(agent, config.tools, {
46
+ llmConfig: config.llmConfig,
47
+ verbose: config.verbose,
48
+ }, this.logger, {
49
+ dynamicGoal: config.dynamicGoal,
50
+ dynamicGoalPrompt: config.dynamicGoalPrompt,
51
+ dynamicNext: config.dynamicNext,
52
+ dynamicNextPrompt: config.dynamicNextPrompt,
53
+ enableSchedule: config.enableSchedule,
54
+ agenda: config.agenda,
55
+ });
56
+ this.executor.setLogger(this.logger);
57
+ const entityIndex = new entity_index_1.EntityIndex(config.entityStore);
58
+ if (config.entityStore) {
59
+ entityIndex.hydrate().catch((err) => this.logger.log("warn", "agent", `Entity store hydration failed: ${err}`));
60
+ }
61
+ const entityResolver = new resolver_1.EntityResolver(entityIndex);
62
+ const exploreStrategy = new explore_strategy_1.ExploreStrategy(entityIndex);
63
+ this.executor.setEntityIndex(entityIndex);
64
+ this.workflow = (0, agent_workflow_1.buildAgentWorkflow)({
65
+ executor: this.executor,
66
+ baseAgent: agent,
67
+ logger: this.logger,
68
+ maxIterations,
69
+ enableClone: (_b = config.enableClone) !== null && _b !== void 0 ? _b : false,
70
+ entityResolver: {
71
+ resolve: (ctx) => entityResolver.resolve(ctx),
72
+ getIndex: () => entityIndex,
73
+ },
74
+ exploreStrategy: {
75
+ plan: (candidates, cwd) => exploreStrategy.plan(candidates, cwd),
76
+ },
77
+ });
78
+ }
79
+ /**
80
+ * Processes an input string through the agent's workflow
81
+ * @param {string} input - The input string to process
82
+ * @returns {Promise<AgentContext>} The resulting context after processing
83
+ */
84
+ process(input) {
85
+ return __awaiter(this, void 0, void 0, function* () {
86
+ yield this.workflow.execute("defineGoal", {
87
+ input: { raw: input },
88
+ cwd: process.cwd(),
89
+ actions: [],
90
+ response: "",
91
+ scratchpad: [],
92
+ memories: [],
93
+ });
94
+ return this.workflow.getContext();
95
+ });
96
+ }
97
+ getWorkflow() {
98
+ return this.workflow;
99
+ }
100
+ processWithCheckpoint(input_1, adapter_1) {
101
+ return __awaiter(this, arguments, void 0, function* (input, adapter, config = {}) {
102
+ var _a, _b, _c;
103
+ const result = yield this.workflow.executeWithCheckpoint("defineGoal", adapter, Object.assign(Object.assign({}, config), { breakpoints: config.breakpoints || ["execute"], initialContext: Object.assign({ input: { raw: input }, cwd: process.cwd(), scratchpad: [], memories: [], entityState: ((_a = config.initialContext) === null || _a === void 0 ? void 0 : _a.entityState) || {
104
+ currentTarget: undefined,
105
+ lastEntityType: null,
106
+ pendingResolutions: [],
107
+ resolutionTrace: [],
108
+ explored: false,
109
+ }, conversationState: ((_b = config.initialContext) === null || _b === void 0 ? void 0 : _b.conversationState) || {
110
+ currentGoal: "",
111
+ currentTarget: null,
112
+ lastResolvedEntity: null,
113
+ lastResolvedType: null,
114
+ pendingTask: null,
115
+ turnCount: 0,
116
+ pendingIntent: null,
117
+ }, explorationBudget: ((_c = config.initialContext) === null || _c === void 0 ? void 0 : _c.explorationBudget) || {
118
+ maxSteps: 12,
119
+ maxExplorations: 2,
120
+ maxToolCalls: 8,
121
+ stepsUsed: 0,
122
+ explorationsUsed: 0,
123
+ toolCallsUsed: 0,
124
+ } }, config.initialContext) }));
125
+ return {
126
+ context: result.context,
127
+ checkpointId: result.checkpointId,
128
+ };
129
+ });
130
+ }
131
+ resumeFromCheckpoint(checkpointId, adapter, contextModifications) {
132
+ return __awaiter(this, void 0, void 0, function* () {
133
+ const result = yield this.workflow.resumeFromCheckpoint(checkpointId, adapter, contextModifications);
134
+ return result;
135
+ });
136
+ }
137
+ listCheckpoints(adapter) {
138
+ return __awaiter(this, void 0, void 0, function* () {
139
+ return this.workflow.listCheckpoints(adapter);
140
+ });
141
+ }
142
+ getCheckpointHistory(runId, adapter) {
143
+ return __awaiter(this, void 0, void 0, function* () {
144
+ return this.workflow.getCheckpointHistory(runId, adapter);
145
+ });
146
+ }
147
+ }
148
+ exports.Agent = Agent;
149
+ //# sourceMappingURL=agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.js","sourceRoot":"","sources":["../../agent/agent.ts"],"names":[],"mappings":";;;;;;;;;;;;AAQA,iCAAmC;AACnC,yDAAqD;AACrD,2CAA6C;AAC7C,qDAAsD;AACtD,iEAA6D;AAC7D,yDAA4D;AAC5D,yEAAqE;AAErE;;;;;;;;;;;GAWG;AACH,MAAa,KAAK;IAKhB,YAAY,MAAmB;;QAC7B,MAAM,KAAK,GAAG,IAAI,gBAAS,CAAC;YAC1B,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,SAAS,EAAE,MAAM,CAAC,SAAS;SAC5B,CAAC,CAAC;QAEH,MAAM,aAAa,GAAG,MAAM,CAAC,aAAa,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,MAAM,GAAG,IAAI,oBAAW,CAAC,MAAA,MAAM,CAAC,OAAO,mCAAI,IAAI,CAAC,CAAC;QAEtD,IAAI,CAAC,QAAQ,GAAG,IAAI,kCAAe,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE;YACvD,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,EAAE,IAAI,CAAC,MAAM,EAAE;YACd,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;YAC3C,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;YAC3C,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,MAAM,EAAE,MAAM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CAAE,iBAAiB,KAAI;wBAC7D,QAAQ,EAAE,EAAE;wBACZ,eAAe,EAAE,CAAC;wBAClB,YAAY,EAAE,CAAC;wBACf,SAAS,EAAE,CAAC;wBACZ,gBAAgB,EAAE,CAAC;wBACnB,aAAa,EAAE,CAAC;qBACjB,IACE,MAAM,CAAC,cAAc,KAG7B,CAAC;YACF,OAAO;gBACL,OAAO,EAAE,MAAM,CAAC,OAAkC;gBAClD,YAAY,EAAE,MAAM,CAAC,YAAY;aAClC,CAAC;QACJ,CAAC;KAAA;IAEY,oBAAoB,CAC/B,YAAoB,EACpB,OAA2B,EAC3B,oBAA0C;;YAE1C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CACrD,YAAY,EACZ,OAAO,EACP,oBAAoB,CACrB,CAAC;YACF,OAAO,MAAiC,CAAC;QAC3C,CAAC;KAAA;IAEY,eAAe,CAC1B,OAA2B;;YAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAChD,CAAC;KAAA;IAEY,oBAAoB,CAC/B,KAAa,EACb,OAA2B;;YAE3B,OAAO,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC5D,CAAC;KAAA;CACF;AA1JD,sBA0JC"}
@@ -0,0 +1,51 @@
1
+ import { BaseAgent } from ".";
2
+ import { GraphFlow } from "../../execution";
3
+ import { ActionSchema, AgentContext, DecisionOutput } from "../../types/agent";
4
+ /**
5
+ * Abstract base class for agent executors that handle action execution
6
+ * @abstract
7
+ * @class AgentExecutor
8
+ */
9
+ export declare abstract class AgentExecutor {
10
+ protected agent: BaseAgent;
11
+ protected availableGraphs: Map<string, GraphFlow<any>>;
12
+ /**
13
+ * Creates an instance of AgentExecutor
14
+ * @param {BaseAgent} agent - The agent instance this executor is tied to
15
+ * @param {GraphFlow<any>[]} graphs - Array of available graph flows that can be executed
16
+ */
17
+ constructor(agent: BaseAgent, graphs: GraphFlow<any>[]);
18
+ /**
19
+ * Makes a decision based on the current context
20
+ * @abstract
21
+ * @param {any} context - The context to base the decision on
22
+ * @returns {Promise<DecisionOutput>} The decision output containing actions and response
23
+ */
24
+ abstract makeDecision(context: any): Promise<DecisionOutput>;
25
+ /**
26
+ * Executes a list of actions in the given context
27
+ * @param {ActionSchema[]} actions - Array of actions to execute
28
+ * @param {AgentContext} context - The context in which to execute the actions
29
+ * @returns {Promise<void>}
30
+ */
31
+ executeActions(actions: ActionSchema[], context: AgentContext): Promise<void>;
32
+ /**
33
+ * Prepares the input parameters for an action
34
+ * @private
35
+ * @param {Array<{name: string, value: any}> | Record<string, any>} parameters - Array of parameter objects or direct object
36
+ * @returns {Record<string, any>} Object with parameter names as keys and their values
37
+ */
38
+ private prepareActionInputs;
39
+ /**
40
+ * Executes multiple workflows with their respective inputs
41
+ * @protected
42
+ * @abstract
43
+ * @param {GraphFlow<any>[]} workflows - Array of workflows to execute
44
+ * @param {string[]} startNodes - Array of starting node names for each workflow
45
+ * @param {any[]} inputs - Array of inputs for each workflow
46
+ * @param {AgentContext} context - The context in which to execute the workflows
47
+ * @returns {Promise<void>}
48
+ */
49
+ protected abstract executeWorkflows(workflows: GraphFlow<any>[], startNodes: string[], inputs: any[], context: AgentContext): Promise<void>;
50
+ }
51
+ //# sourceMappingURL=executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../agent/base/executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,cAAc,EACf,MAAM,mBAAmB,CAAC;AAE3B;;;;GAIG;AACH,8BAAsB,aAAa;IACjC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC;IAC3B,SAAS,CAAC,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IAEvD;;;;OAIG;gBACS,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EAAE;IAKtD;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,cAAc,CAAC;IAE5D;;;;;OAKG;IACG,cAAc,CAClB,OAAO,EAAE,YAAY,EAAE,EACvB,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,IAAI,CAAC;IAwBhB;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IAY3B;;;;;;;;;OASG;IACH,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CACjC,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,EAAE,EAC3B,UAAU,EAAE,MAAM,EAAE,EACpB,MAAM,EAAE,GAAG,EAAE,EACb,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,IAAI,CAAC;CACjB"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.AgentExecutor = void 0;
13
+ /**
14
+ * Abstract base class for agent executors that handle action execution
15
+ * @abstract
16
+ * @class AgentExecutor
17
+ */
18
+ class AgentExecutor {
19
+ /**
20
+ * Creates an instance of AgentExecutor
21
+ * @param {BaseAgent} agent - The agent instance this executor is tied to
22
+ * @param {GraphFlow<any>[]} graphs - Array of available graph flows that can be executed
23
+ */
24
+ constructor(agent, graphs) {
25
+ this.agent = agent;
26
+ this.availableGraphs = new Map(graphs.map((g) => [g.name, g]));
27
+ }
28
+ /**
29
+ * Executes a list of actions in the given context
30
+ * @param {ActionSchema[]} actions - Array of actions to execute
31
+ * @param {AgentContext} context - The context in which to execute the actions
32
+ * @returns {Promise<void>}
33
+ */
34
+ executeActions(actions, context) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ const workflowsToExecute = [];
37
+ const startNodes = [];
38
+ const inputs = [];
39
+ for (const action of actions) {
40
+ const workflow = this.availableGraphs.get(action.name);
41
+ if (!workflow)
42
+ continue;
43
+ workflowsToExecute.push(workflow);
44
+ startNodes.push(workflow.getNodes()[0].name);
45
+ inputs.push(this.prepareActionInputs(action.parameters));
46
+ }
47
+ if (workflowsToExecute.length > 0) {
48
+ yield this.executeWorkflows(workflowsToExecute, startNodes, inputs, context);
49
+ }
50
+ });
51
+ }
52
+ /**
53
+ * Prepares the input parameters for an action
54
+ * @private
55
+ * @param {Array<{name: string, value: any}> | Record<string, any>} parameters - Array of parameter objects or direct object
56
+ * @returns {Record<string, any>} Object with parameter names as keys and their values
57
+ */
58
+ prepareActionInputs(parameters) {
59
+ if (Array.isArray(parameters)) {
60
+ return parameters.reduce((acc, param) => {
61
+ acc[param.name] = param.value;
62
+ return acc;
63
+ }, {});
64
+ }
65
+ return parameters;
66
+ }
67
+ }
68
+ exports.AgentExecutor = AgentExecutor;
69
+ //# sourceMappingURL=executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../agent/base/executor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAQA;;;;GAIG;AACH,MAAsB,aAAa;IAIjC;;;;OAIG;IACH,YAAY,KAAgB,EAAE,MAAwB;QACpD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,eAAe,GAAG,IAAI,GAAG,CAAC,MAAM,CA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D,OAAO,UAAiC,CAAC;IAC3C,CAAC;CAkBF;AAzFD,sCAyFC"}
@@ -0,0 +1,30 @@
1
+ import { AgentConfig } from "@/types/agent";
2
+ import { BaseMemoryType } from "../../types";
3
+ /**
4
+ * Base agent class that handles role, goal, and personality management
5
+ * @class BaseAgent
6
+ */
7
+ export declare class BaseAgent {
8
+ private config;
9
+ private memory?;
10
+ constructor(config: AgentConfig);
11
+ execute(context: any, inputs?: any): Promise<any>;
12
+ private storeInMemory;
13
+ recall(query: string): Promise<BaseMemoryType[]>;
14
+ /**
15
+ * Get the agent's role - what function/job it performs
16
+ * @returns {string} The agent's role
17
+ */
18
+ getRole(): string;
19
+ /**
20
+ * Get the agent's goal - what it tries to achieve
21
+ * @returns {string} The agent's goal
22
+ */
23
+ getGoal(): string;
24
+ /**
25
+ * Get the agent's backstory - its personality and behavioral traits
26
+ * @returns {string} The agent's backstory
27
+ */
28
+ getBackstory(): string;
29
+ }
30
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../agent/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C;;;GAGG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,MAAM,CAAC,CAAS;gBAEZ,MAAM,EAAE,WAAW;IAKzB,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;YAuBzC,aAAa;IAcd,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAS7D;;;OAGG;IACI,OAAO,IAAI,MAAM;IAIxB;;;OAGG;IACI,OAAO,IAAI,MAAM;IAIxB;;;OAGG;IACI,YAAY,IAAI,MAAM;CAG9B"}
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.BaseAgent = void 0;
13
+ /**
14
+ * Base agent class that handles role, goal, and personality management
15
+ * @class BaseAgent
16
+ */
17
+ class BaseAgent {
18
+ constructor(config) {
19
+ this.config = config;
20
+ this.memory = config.memory;
21
+ }
22
+ execute(context, inputs) {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ // Log execution if verbose
25
+ if (this.config.verbose) {
26
+ console.log(`Agent ${this.config.role} executing...`);
27
+ console.log("Context:", context);
28
+ console.log("Inputs:", inputs);
29
+ }
30
+ // Store context in memory if available
31
+ if (this.memory) {
32
+ yield this.storeInMemory({
33
+ type: "execution",
34
+ content: JSON.stringify({ context, inputs }),
35
+ metadata: {
36
+ role: this.config.role,
37
+ timestamp: new Date().toISOString(),
38
+ },
39
+ });
40
+ }
41
+ return context;
42
+ });
43
+ }
44
+ storeInMemory(data) {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ if (!this.memory)
47
+ return;
48
+ return this.memory.createMemory({
49
+ content: data.content,
50
+ metadata: data.metadata,
51
+ roomId: "default",
52
+ });
53
+ });
54
+ }
55
+ recall(query) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ if (!this.memory)
58
+ return [];
59
+ return this.memory.getMemoryByIndex(query, {
60
+ roomId: "default",
61
+ limit: 10,
62
+ });
63
+ });
64
+ }
65
+ /**
66
+ * Get the agent's role - what function/job it performs
67
+ * @returns {string} The agent's role
68
+ */
69
+ getRole() {
70
+ return this.config.role;
71
+ }
72
+ /**
73
+ * Get the agent's goal - what it tries to achieve
74
+ * @returns {string} The agent's goal
75
+ */
76
+ getGoal() {
77
+ return this.config.goal;
78
+ }
79
+ /**
80
+ * Get the agent's backstory - its personality and behavioral traits
81
+ * @returns {string} The agent's backstory
82
+ */
83
+ getBackstory() {
84
+ return this.config.backstory;
85
+ }
86
+ }
87
+ exports.BaseAgent = BaseAgent;
88
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../agent/base/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA;;;GAGG;AACH,MAAa,SAAS;IAIpB,YAAY,MAAmB;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9B,CAAC;IAEK,OAAO,CAAC,OAAY,EAAE,MAAY;;YACtC,2BAA2B;YAC3B,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACxB,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,MAAM,CAAC,IAAI,eAAe,CAAC,CAAC;gBACtD,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;gBACjC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YACjC,CAAC;YAED,uCAAuC;YACvC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAChB,MAAM,IAAI,CAAC,aAAa,CAAC;oBACvB,IAAI,EAAE,WAAW;oBACjB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;oBAC5C,QAAQ,EAAE;wBACR,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI;wBACtB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;qBACpC;iBACF,CAAC,CAAC;YACL,CAAC;YAED,OAAO,OAAO,CAAC;QACjB,CAAC;KAAA;IAEa,aAAa,CAAC,IAI3B;;YACC,IAAI,CAAC,IAAI,CAAC,MAAM;gBAAE,OAAO;YAEzB,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;gBAC9B,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,MAAM,EAAE,SAAS;aAClB,CAAC,CAAC;QACL,CAAC;KAAA;IAEY,MAAM,CAAC,KAAa;;YAC/B,IAAI,CAAC,IAAI,CAAC,MAAM;gBAAE,OAAO,EAAE,CAAC;YAE5B,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE;gBACzC,MAAM,EAAE,SAAS;gBACjB,KAAK,EAAE,EAAE;aACV,CAAC,CAAC;QACL,CAAC;KAAA;IAED;;;OAGG;IACI,OAAO;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACI,OAAO;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACI,YAAY;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAC/B,CAAC;CACF;AA9ED,8BA8EC"}
@@ -0,0 +1,4 @@
1
+ import { ScoredCandidate, Confidence } from "./types";
2
+ export declare function computeConfidence(candidates: ScoredCandidate[]): Confidence;
3
+ export declare function confidenceImproved(before: Confidence, after: Confidence): boolean;
4
+ //# sourceMappingURL=confidence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confidence.d.ts","sourceRoot":"","sources":["../../../agent/entity-resolver/confidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAKtD,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,eAAe,EAAE,GAAG,UAAU,CAyC3E;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,UAAU,GAChB,OAAO,CAET"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.computeConfidence = computeConfidence;
4
+ exports.confidenceImproved = confidenceImproved;
5
+ const HIGH_GAP = 0.3;
6
+ const MEDIUM_GAP = 0.15;
7
+ function computeConfidence(candidates) {
8
+ if (candidates.length === 0) {
9
+ return { level: "low", score: 0, gap: 0, reason: "no candidates found" };
10
+ }
11
+ if (candidates.length === 1) {
12
+ const score = candidates[0].breakdown.total;
13
+ if (score >= 0.7) {
14
+ return { level: "high", score, gap: 1, reason: "single candidate with high score" };
15
+ }
16
+ return { level: "medium", score, gap: 1, reason: "single candidate but low score" };
17
+ }
18
+ const top = candidates[0].breakdown.total;
19
+ const second = candidates[1].breakdown.total;
20
+ const gap = top - second;
21
+ if (gap >= HIGH_GAP) {
22
+ return {
23
+ level: "high",
24
+ score: top,
25
+ gap,
26
+ reason: `gap ${gap.toFixed(2)} >= ${HIGH_GAP}, clear winner: ${candidates[0].entity.filename}`,
27
+ };
28
+ }
29
+ if (gap >= MEDIUM_GAP) {
30
+ return {
31
+ level: "medium",
32
+ score: top,
33
+ gap,
34
+ reason: `gap ${gap.toFixed(2)} >= ${MEDIUM_GAP}, ambiguous: ${candidates[0].entity.filename} vs ${candidates[1].entity.filename}`,
35
+ };
36
+ }
37
+ return {
38
+ level: "low",
39
+ score: top,
40
+ gap,
41
+ reason: `gap ${gap.toFixed(2)} < ${MEDIUM_GAP}, too close: ${candidates.map(c => c.entity.filename).join(", ")}`,
42
+ };
43
+ }
44
+ function confidenceImproved(before, after) {
45
+ return after.score > before.score;
46
+ }
47
+ //# sourceMappingURL=confidence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confidence.js","sourceRoot":"","sources":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QAAQ,EAAE;SAC/F,CAAC;IACJ,CAAC;IAED,IAAI,GAAG,IAAI,UAAU,EAAE,CAAC;QACtB,OAAO;YACL,KAAK,EAAE,QAAQ;YACf,KAAK,EAAE,GAAG;YACV,GAAG;YACH,MAAM,EAAE,OAAO,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,UAAU,gBAAgB,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE;SAClI,CAAC;IACJ,CAAC;IAED,OAAO;QACL,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,GAAG;QACV,GAAG;QACH,MAAM,EAAE,OAAO,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,UAAU,gBAAgB,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;KACjH,CAAC;AACJ,CAAC;AAED,SAAgB,kBAAkB,CAChC,MAAkB,EAClB,KAAiB;IAEjB,OAAO,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AACpC,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { Entity } from "./types";
2
+ export interface IEntityStore {
3
+ upsertMany(entities: Entity[]): Promise<void>;
4
+ loadAll(scope?: string): Promise<Entity[]>;
5
+ recordResolution(entityId: string, query: string, confidence: number): Promise<void>;
6
+ clear(scope?: string): Promise<void>;
7
+ }
8
+ export type TargetResolution = {
9
+ target: string;
10
+ resolvedEntity: Entity | null;
11
+ path: string | null;
12
+ entityId: string | null;
13
+ };
14
+ export type LookupMode = "exact" | "fuzzy";
15
+ export declare class EntityIndex {
16
+ private store?;
17
+ private entities;
18
+ private byId;
19
+ private allEntities;
20
+ constructor(store?: IEntityStore | undefined);
21
+ hydrate(scope?: string): Promise<void>;
22
+ private addEntity;
23
+ ingestDirectory(dirPath: string, entries: {
24
+ name: string;
25
+ type: string;
26
+ }[]): void;
27
+ ingestFile(filePath: string): void;
28
+ lookup(query: string, options?: {
29
+ mode?: LookupMode;
30
+ }): Entity[];
31
+ resolveByTarget(target: string): Entity | null;
32
+ resolve(target: string, _toolName?: string): TargetResolution;
33
+ resolveToolParams(params: Record<string, any>, toolName: string): Record<string, any>;
34
+ getByDir(dirPath: string): Entity[];
35
+ getAll(): Entity[];
36
+ getById(id: string): Entity | undefined;
37
+ clear(): void;
38
+ size(): number;
39
+ }
40
+ //# sourceMappingURL=entity-index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-index.d.ts","sourceRoot":"","sources":["../../../agent/entity-resolver/entity-index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAkB,MAAM,SAAS,CAAC;AAEjD,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3C,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrF,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AAyBD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC;AAE3C,qBAAa,WAAW;IAKV,OAAO,CAAC,KAAK,CAAC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