openloops 0.1.9 → 0.1.10

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 (464) hide show
  1. package/dist/chunk-XRJFNASX.mjs +14 -0
  2. package/dist/common/clients/index.d.ts +3 -0
  3. package/dist/common/clients/index.js +26 -0
  4. package/dist/common/clients/index.mjs +3 -0
  5. package/dist/common/clients/llm-client.d.ts +30 -0
  6. package/dist/common/clients/llm-client.js +159 -0
  7. package/dist/common/clients/llm-client.mjs +126 -0
  8. package/dist/common/clients/sentry-client.d.ts +10 -0
  9. package/dist/common/clients/sentry-client.js +87 -0
  10. package/dist/common/clients/sentry-client.mjs +53 -0
  11. package/dist/common/clients/serper-client.d.ts +66 -0
  12. package/dist/common/clients/serper-client.js +74 -0
  13. package/dist/common/clients/serper-client.mjs +41 -0
  14. package/dist/common/core/base.app.d.ts +12 -0
  15. package/dist/common/core/base.app.js +57 -0
  16. package/dist/common/core/base.app.mjs +34 -0
  17. package/dist/common/core/base.entity.d.ts +55 -0
  18. package/dist/common/core/base.entity.js +208 -0
  19. package/dist/common/core/base.entity.mjs +179 -0
  20. package/dist/common/core/base.use-case.d.ts +15 -0
  21. package/dist/common/core/base.use-case.js +30 -0
  22. package/dist/common/core/base.use-case.mjs +7 -0
  23. package/dist/common/core/index.d.ts +1 -0
  24. package/dist/common/core/index.js +1 -0
  25. package/dist/common/core/index.mjs +0 -0
  26. package/dist/common/core/utils/delete-empty-fields.d.ts +1 -0
  27. package/dist/common/core/utils/delete-empty-fields.js +66 -0
  28. package/dist/common/core/utils/delete-empty-fields.mjs +43 -0
  29. package/dist/common/core/utils/flatten-object.d.ts +1 -0
  30. package/dist/common/core/utils/flatten-object.js +45 -0
  31. package/dist/common/core/utils/flatten-object.mjs +22 -0
  32. package/dist/common/core/utils/index.d.ts +3 -0
  33. package/dist/common/core/utils/index.js +26 -0
  34. package/dist/common/core/utils/index.mjs +3 -0
  35. package/dist/common/core/utils/is-plain-object.d.ts +1 -0
  36. package/dist/common/core/utils/is-plain-object.js +32 -0
  37. package/dist/common/core/utils/is-plain-object.mjs +9 -0
  38. package/dist/common/decorators/admin-only/admin-only.d.ts +2 -0
  39. package/dist/common/decorators/admin-only/admin-only.js +52 -0
  40. package/dist/common/decorators/admin-only/admin-only.mjs +28 -0
  41. package/dist/common/decorators/admin-only/index.d.ts +1 -0
  42. package/dist/common/decorators/admin-only/index.js +22 -0
  43. package/dist/common/decorators/admin-only/index.mjs +1 -0
  44. package/dist/common/decorators/index.d.ts +3 -0
  45. package/dist/common/decorators/index.js +26 -0
  46. package/dist/common/decorators/index.mjs +3 -0
  47. package/dist/common/decorators/mask-in-logs/index.d.ts +1 -0
  48. package/dist/common/decorators/mask-in-logs/index.js +22 -0
  49. package/dist/common/decorators/mask-in-logs/index.mjs +1 -0
  50. package/dist/common/decorators/mask-in-logs/mask-in-logs.d.ts +2 -0
  51. package/dist/common/decorators/mask-in-logs/mask-in-logs.js +53 -0
  52. package/dist/common/decorators/mask-in-logs/mask-in-logs.mjs +29 -0
  53. package/dist/common/decorators/owner-only/index.d.ts +1 -0
  54. package/dist/common/decorators/owner-only/index.js +22 -0
  55. package/dist/common/decorators/owner-only/index.mjs +1 -0
  56. package/dist/common/decorators/owner-only/owner-only.d.ts +2 -0
  57. package/dist/common/decorators/owner-only/owner-only.js +52 -0
  58. package/dist/common/decorators/owner-only/owner-only.mjs +28 -0
  59. package/dist/common/error/http-error.d.ts +11 -0
  60. package/dist/common/error/http-error.js +37 -0
  61. package/dist/common/error/http-error.mjs +14 -0
  62. package/dist/common/error/index.d.ts +2 -0
  63. package/dist/common/error/index.js +24 -0
  64. package/dist/common/error/index.mjs +2 -0
  65. package/dist/common/error/reportError.d.ts +2 -0
  66. package/dist/common/error/reportError.js +51 -0
  67. package/dist/common/error/reportError.mjs +28 -0
  68. package/dist/common/helpers/extract-json-from-text.d.ts +1 -0
  69. package/dist/common/helpers/extract-json-from-text.js +63 -0
  70. package/dist/common/helpers/extract-json-from-text.mjs +40 -0
  71. package/dist/common/helpers/index.d.ts +2 -0
  72. package/dist/common/helpers/index.js +24 -0
  73. package/dist/common/helpers/index.mjs +2 -0
  74. package/dist/common/helpers/sanitize-string.d.ts +1 -0
  75. package/dist/common/helpers/sanitize-string.js +45 -0
  76. package/dist/common/helpers/sanitize-string.mjs +12 -0
  77. package/dist/common/logger/index.d.ts +1 -0
  78. package/dist/common/logger/index.js +22 -0
  79. package/dist/common/logger/index.mjs +1 -0
  80. package/dist/common/logger/pino.d.ts +12 -0
  81. package/dist/common/logger/pino.js +70 -0
  82. package/dist/common/logger/pino.mjs +36 -0
  83. package/dist/common/repositories/index.d.ts +2 -0
  84. package/dist/common/repositories/index.js +24 -0
  85. package/dist/common/repositories/index.mjs +2 -0
  86. package/dist/common/repositories/mongo-db.client.d.ts +11 -0
  87. package/dist/common/repositories/mongo-db.client.js +79 -0
  88. package/dist/common/repositories/mongo-db.client.mjs +57 -0
  89. package/dist/common/repositories/mongo-db.repository.d.ts +87 -0
  90. package/dist/common/repositories/mongo-db.repository.js +219 -0
  91. package/dist/common/repositories/mongo-db.repository.mjs +196 -0
  92. package/dist/common/utils/secret-manager.d.ts +15 -0
  93. package/dist/common/utils/secret-manager.js +105 -0
  94. package/dist/common/utils/secret-manager.mjs +71 -0
  95. package/dist/index.d.ts +1 -10
  96. package/dist/index.js +22 -7
  97. package/dist/index.mjs +1 -1
  98. package/dist/services/agent/core/agent-loop.d.ts +38 -0
  99. package/dist/services/agent/core/agent-loop.js +29 -0
  100. package/dist/services/agent/core/agent-loop.mjs +6 -0
  101. package/dist/services/agent/core/agent-state.d.ts +42 -0
  102. package/dist/services/agent/core/agent-state.js +102 -0
  103. package/dist/services/agent/core/agent-state.mjs +78 -0
  104. package/dist/services/agent/core/agent.d.ts +70 -0
  105. package/dist/services/agent/core/agent.js +351 -0
  106. package/dist/services/agent/core/agent.mjs +327 -0
  107. package/dist/services/agent/core/index.d.ts +3 -122
  108. package/dist/services/agent/core/index.js +26 -7
  109. package/dist/services/agent/core/index.mjs +3 -1
  110. package/dist/services/agent/loops/index.d.ts +2 -116
  111. package/dist/services/agent/loops/index.js +24 -10
  112. package/dist/services/agent/loops/index.mjs +2 -4
  113. package/dist/services/agent/loops/plan-execute/index.d.ts +1 -0
  114. package/dist/services/agent/loops/plan-execute/index.js +22 -0
  115. package/dist/services/agent/loops/plan-execute/index.mjs +1 -0
  116. package/dist/services/agent/loops/plan-execute/plan-execute-loop.d.ts +27 -0
  117. package/dist/services/agent/loops/plan-execute/plan-execute-loop.js +242 -0
  118. package/dist/services/agent/loops/plan-execute/plan-execute-loop.mjs +226 -0
  119. package/dist/services/agent/loops/shared/index.d.ts +1 -0
  120. package/dist/services/agent/loops/shared/index.js +22 -0
  121. package/dist/services/agent/loops/shared/index.mjs +1 -0
  122. package/dist/services/agent/loops/shared/skills/action-planner.d.ts +35 -0
  123. package/dist/services/agent/loops/shared/skills/action-planner.js +68 -0
  124. package/dist/services/agent/loops/shared/skills/action-planner.mjs +45 -0
  125. package/dist/services/agent/loops/shared/skills/confirmation-gate.d.ts +9 -0
  126. package/dist/services/agent/loops/shared/skills/confirmation-gate.js +53 -0
  127. package/dist/services/agent/loops/shared/skills/confirmation-gate.mjs +30 -0
  128. package/dist/services/agent/loops/shared/skills/fast-responder.d.ts +9 -0
  129. package/dist/services/agent/loops/shared/skills/fast-responder.js +70 -0
  130. package/dist/services/agent/loops/shared/skills/fast-responder.mjs +47 -0
  131. package/dist/services/agent/loops/shared/skills/final-responder.d.ts +7 -0
  132. package/dist/services/agent/loops/shared/skills/final-responder.js +57 -0
  133. package/dist/services/agent/loops/shared/skills/final-responder.mjs +34 -0
  134. package/dist/services/agent/loops/shared/skills/index.d.ts +6 -0
  135. package/dist/services/agent/loops/shared/skills/index.js +32 -0
  136. package/dist/services/agent/loops/shared/skills/index.mjs +6 -0
  137. package/dist/services/agent/loops/shared/skills/state-observer.d.ts +10 -0
  138. package/dist/services/agent/loops/shared/skills/state-observer.js +57 -0
  139. package/dist/services/agent/loops/shared/skills/state-observer.mjs +34 -0
  140. package/dist/services/agent/loops/shared/skills/strategy-engine.d.ts +15 -0
  141. package/dist/services/agent/loops/shared/skills/strategy-engine.js +60 -0
  142. package/dist/services/agent/loops/shared/skills/strategy-engine.mjs +37 -0
  143. package/dist/services/agent/modules/chats/entities/agent-action.entity.d.ts +58 -0
  144. package/dist/services/agent/modules/chats/entities/agent-action.entity.js +151 -0
  145. package/dist/services/agent/modules/chats/entities/agent-action.entity.mjs +128 -0
  146. package/dist/services/agent/modules/chats/entities/agent-task.entity.d.ts +59 -0
  147. package/dist/services/agent/modules/chats/entities/agent-task.entity.js +231 -0
  148. package/dist/services/agent/modules/chats/entities/agent-task.entity.mjs +207 -0
  149. package/dist/services/agent/modules/chats/entities/chat-context.entity.d.ts +39 -0
  150. package/dist/services/agent/modules/chats/entities/chat-context.entity.js +70 -0
  151. package/dist/services/agent/modules/chats/entities/chat-context.entity.mjs +47 -0
  152. package/dist/services/agent/modules/chats/entities/chat-message.entity.d.ts +16 -0
  153. package/dist/services/agent/modules/chats/entities/chat-message.entity.js +58 -0
  154. package/dist/services/agent/modules/chats/entities/chat-message.entity.mjs +35 -0
  155. package/dist/services/agent/modules/chats/entities/chat-settings.entity.d.ts +17 -0
  156. package/dist/services/agent/modules/chats/entities/chat-settings.entity.js +63 -0
  157. package/dist/services/agent/modules/chats/entities/chat-settings.entity.mjs +40 -0
  158. package/dist/services/agent/modules/chats/entities/chat.entity.d.ts +50 -0
  159. package/dist/services/agent/modules/chats/entities/chat.entity.js +163 -0
  160. package/dist/services/agent/modules/chats/entities/chat.entity.mjs +140 -0
  161. package/dist/services/agent/modules/chats/entities/index.d.ts +1 -0
  162. package/dist/services/agent/modules/chats/entities/index.js +22 -0
  163. package/dist/services/agent/modules/chats/entities/index.mjs +1 -0
  164. package/dist/services/agent/modules/chats/lambdas/create-chat/create-chat.use-case.d.ts +14 -0
  165. package/dist/services/agent/modules/chats/lambdas/create-chat/create-chat.use-case.js +56 -0
  166. package/dist/services/agent/modules/chats/lambdas/create-chat/create-chat.use-case.mjs +27 -0
  167. package/dist/services/agent/modules/chats/lambdas/create-chat/index.d.ts +1 -0
  168. package/dist/services/agent/modules/chats/lambdas/create-chat/index.js +22 -0
  169. package/dist/services/agent/modules/chats/lambdas/create-chat/index.mjs +1 -0
  170. package/dist/services/agent/modules/chats/lambdas/delete-chat/delete-chat.use-case.d.ts +15 -0
  171. package/dist/services/agent/modules/chats/lambdas/delete-chat/delete-chat.use-case.js +61 -0
  172. package/dist/services/agent/modules/chats/lambdas/delete-chat/delete-chat.use-case.mjs +32 -0
  173. package/dist/services/agent/modules/chats/lambdas/delete-chat/index.d.ts +1 -0
  174. package/dist/services/agent/modules/chats/lambdas/delete-chat/index.js +22 -0
  175. package/dist/services/agent/modules/chats/lambdas/delete-chat/index.mjs +1 -0
  176. package/dist/services/agent/modules/chats/lambdas/get-chat-by-id/get-chat-by-id.use-case.d.ts +14 -0
  177. package/dist/services/agent/modules/chats/lambdas/get-chat-by-id/get-chat-by-id.use-case.js +52 -0
  178. package/dist/services/agent/modules/chats/lambdas/get-chat-by-id/get-chat-by-id.use-case.mjs +23 -0
  179. package/dist/services/agent/modules/chats/lambdas/get-chat-by-id/index.d.ts +1 -0
  180. package/dist/services/agent/modules/chats/lambdas/get-chat-by-id/index.js +22 -0
  181. package/dist/services/agent/modules/chats/lambdas/get-chat-by-id/index.mjs +1 -0
  182. package/dist/services/agent/modules/chats/lambdas/interrupt-execution/index.d.ts +1 -0
  183. package/dist/services/agent/modules/chats/lambdas/interrupt-execution/index.js +22 -0
  184. package/dist/services/agent/modules/chats/lambdas/interrupt-execution/index.mjs +1 -0
  185. package/dist/services/agent/modules/chats/lambdas/interrupt-execution/interrupt-execution.use-case.d.ts +14 -0
  186. package/dist/services/agent/modules/chats/lambdas/interrupt-execution/interrupt-execution.use-case.js +64 -0
  187. package/dist/services/agent/modules/chats/lambdas/interrupt-execution/interrupt-execution.use-case.mjs +35 -0
  188. package/dist/services/agent/modules/chats/lambdas/list-chats-by-props/index.d.ts +1 -0
  189. package/dist/services/agent/modules/chats/lambdas/list-chats-by-props/index.js +22 -0
  190. package/dist/services/agent/modules/chats/lambdas/list-chats-by-props/index.mjs +1 -0
  191. package/dist/services/agent/modules/chats/lambdas/list-chats-by-props/list-chats-by-props.use-case.d.ts +16 -0
  192. package/dist/services/agent/modules/chats/lambdas/list-chats-by-props/list-chats-by-props.use-case.js +52 -0
  193. package/dist/services/agent/modules/chats/lambdas/list-chats-by-props/list-chats-by-props.use-case.mjs +23 -0
  194. package/dist/services/agent/modules/chats/lambdas/list-chats-by-user/index.d.ts +1 -0
  195. package/dist/services/agent/modules/chats/lambdas/list-chats-by-user/index.js +22 -0
  196. package/dist/services/agent/modules/chats/lambdas/list-chats-by-user/index.mjs +1 -0
  197. package/dist/services/agent/modules/chats/lambdas/list-chats-by-user/list-chats-by-user.use-case.d.ts +16 -0
  198. package/dist/services/agent/modules/chats/lambdas/list-chats-by-user/list-chats-by-user.use-case.js +59 -0
  199. package/dist/services/agent/modules/chats/lambdas/list-chats-by-user/list-chats-by-user.use-case.mjs +30 -0
  200. package/dist/services/agent/modules/chats/lambdas/update-chat/index.d.ts +1 -0
  201. package/dist/services/agent/modules/chats/lambdas/update-chat/index.js +22 -0
  202. package/dist/services/agent/modules/chats/lambdas/update-chat/index.mjs +1 -0
  203. package/dist/services/agent/modules/chats/lambdas/update-chat/update-chat.use-case.d.ts +15 -0
  204. package/dist/services/agent/modules/chats/lambdas/update-chat/update-chat.use-case.js +64 -0
  205. package/dist/services/agent/modules/chats/lambdas/update-chat/update-chat.use-case.mjs +35 -0
  206. package/dist/services/agent/modules/chats/repositories/chat.repository.d.ts +10 -0
  207. package/dist/services/agent/modules/chats/repositories/chat.repository.js +67 -0
  208. package/dist/services/agent/modules/chats/repositories/chat.repository.mjs +38 -0
  209. package/dist/services/agent/modules/chats/repositories/index.d.ts +1 -0
  210. package/dist/services/agent/modules/chats/repositories/index.js +22 -0
  211. package/dist/services/agent/modules/chats/repositories/index.mjs +1 -0
  212. package/dist/services/agent/modules/llmcalls/entities/index.d.ts +1 -0
  213. package/dist/services/agent/modules/llmcalls/entities/index.js +22 -0
  214. package/dist/services/agent/modules/llmcalls/entities/index.mjs +1 -0
  215. package/dist/services/agent/modules/llmcalls/entities/llmcall.entity.d.ts +23 -0
  216. package/dist/services/agent/modules/llmcalls/entities/llmcall.entity.js +71 -0
  217. package/dist/services/agent/modules/llmcalls/entities/llmcall.entity.mjs +48 -0
  218. package/dist/services/agent/modules/llmcalls/lambdas/create-llmcall/create-llmcall.use-case.d.ts +14 -0
  219. package/dist/services/agent/modules/llmcalls/lambdas/create-llmcall/create-llmcall.use-case.js +56 -0
  220. package/dist/services/agent/modules/llmcalls/lambdas/create-llmcall/create-llmcall.use-case.mjs +27 -0
  221. package/dist/services/agent/modules/llmcalls/lambdas/create-llmcall/index.d.ts +1 -0
  222. package/dist/services/agent/modules/llmcalls/lambdas/create-llmcall/index.js +22 -0
  223. package/dist/services/agent/modules/llmcalls/lambdas/create-llmcall/index.mjs +1 -0
  224. package/dist/services/agent/modules/llmcalls/lambdas/delete-llmcall/delete-llmcall.use-case.d.ts +15 -0
  225. package/dist/services/agent/modules/llmcalls/lambdas/delete-llmcall/delete-llmcall.use-case.js +61 -0
  226. package/dist/services/agent/modules/llmcalls/lambdas/delete-llmcall/delete-llmcall.use-case.mjs +32 -0
  227. package/dist/services/agent/modules/llmcalls/lambdas/delete-llmcall/index.d.ts +1 -0
  228. package/dist/services/agent/modules/llmcalls/lambdas/delete-llmcall/index.js +22 -0
  229. package/dist/services/agent/modules/llmcalls/lambdas/delete-llmcall/index.mjs +1 -0
  230. package/dist/services/agent/modules/llmcalls/lambdas/get-llm-usage/get-llm-usage.use-case.d.ts +21 -0
  231. package/dist/services/agent/modules/llmcalls/lambdas/get-llm-usage/get-llm-usage.use-case.js +123 -0
  232. package/dist/services/agent/modules/llmcalls/lambdas/get-llm-usage/get-llm-usage.use-case.mjs +94 -0
  233. package/dist/services/agent/modules/llmcalls/lambdas/get-llm-usage/index.d.ts +1 -0
  234. package/dist/services/agent/modules/llmcalls/lambdas/get-llm-usage/index.js +22 -0
  235. package/dist/services/agent/modules/llmcalls/lambdas/get-llm-usage/index.mjs +1 -0
  236. package/dist/services/agent/modules/llmcalls/lambdas/get-llmcall-by-id/get-llmcall-by-id.use-case.d.ts +14 -0
  237. package/dist/services/agent/modules/llmcalls/lambdas/get-llmcall-by-id/get-llmcall-by-id.use-case.js +52 -0
  238. package/dist/services/agent/modules/llmcalls/lambdas/get-llmcall-by-id/get-llmcall-by-id.use-case.mjs +23 -0
  239. package/dist/services/agent/modules/llmcalls/lambdas/get-llmcall-by-id/index.d.ts +1 -0
  240. package/dist/services/agent/modules/llmcalls/lambdas/get-llmcall-by-id/index.js +22 -0
  241. package/dist/services/agent/modules/llmcalls/lambdas/get-llmcall-by-id/index.mjs +1 -0
  242. package/dist/services/agent/modules/llmcalls/lambdas/list-llmcalls-by-props/index.d.ts +1 -0
  243. package/dist/services/agent/modules/llmcalls/lambdas/list-llmcalls-by-props/index.js +22 -0
  244. package/dist/services/agent/modules/llmcalls/lambdas/list-llmcalls-by-props/index.mjs +1 -0
  245. package/dist/services/agent/modules/llmcalls/lambdas/list-llmcalls-by-props/list-llmcalls-by-props.use-case.d.ts +16 -0
  246. package/dist/services/agent/modules/llmcalls/lambdas/list-llmcalls-by-props/list-llmcalls-by-props.use-case.js +52 -0
  247. package/dist/services/agent/modules/llmcalls/lambdas/list-llmcalls-by-props/list-llmcalls-by-props.use-case.mjs +23 -0
  248. package/dist/services/agent/modules/llmcalls/lambdas/update-llmcall/index.d.ts +1 -0
  249. package/dist/services/agent/modules/llmcalls/lambdas/update-llmcall/index.js +22 -0
  250. package/dist/services/agent/modules/llmcalls/lambdas/update-llmcall/index.mjs +1 -0
  251. package/dist/services/agent/modules/llmcalls/lambdas/update-llmcall/update-llmcall.use-case.d.ts +15 -0
  252. package/dist/services/agent/modules/llmcalls/lambdas/update-llmcall/update-llmcall.use-case.js +62 -0
  253. package/dist/services/agent/modules/llmcalls/lambdas/update-llmcall/update-llmcall.use-case.mjs +33 -0
  254. package/dist/services/agent/modules/llmcalls/repositories/index.d.ts +1 -0
  255. package/dist/services/agent/modules/llmcalls/repositories/index.js +22 -0
  256. package/dist/services/agent/modules/llmcalls/repositories/index.mjs +1 -0
  257. package/dist/services/agent/modules/llmcalls/repositories/llmcall.repository.d.ts +10 -0
  258. package/dist/services/agent/modules/llmcalls/repositories/llmcall.repository.js +67 -0
  259. package/dist/services/agent/modules/llmcalls/repositories/llmcall.repository.mjs +38 -0
  260. package/dist/services/agent/modules/mcp-servers/entities/index.d.ts +1 -0
  261. package/dist/services/agent/modules/mcp-servers/entities/index.js +22 -0
  262. package/dist/services/agent/modules/mcp-servers/entities/index.mjs +1 -0
  263. package/dist/services/agent/modules/mcp-servers/entities/mcpserver.entity.d.ts +23 -0
  264. package/dist/services/agent/modules/mcp-servers/entities/mcpserver.entity.js +79 -0
  265. package/dist/services/agent/modules/mcp-servers/entities/mcpserver.entity.mjs +56 -0
  266. package/dist/services/agent/modules/mcp-servers/lambdas/create-mcpserver/create-mcpserver.use-case.d.ts +14 -0
  267. package/dist/services/agent/modules/mcp-servers/lambdas/create-mcpserver/create-mcpserver.use-case.js +56 -0
  268. package/dist/services/agent/modules/mcp-servers/lambdas/create-mcpserver/create-mcpserver.use-case.mjs +27 -0
  269. package/dist/services/agent/modules/mcp-servers/lambdas/create-mcpserver/index.d.ts +1 -0
  270. package/dist/services/agent/modules/mcp-servers/lambdas/create-mcpserver/index.js +22 -0
  271. package/dist/services/agent/modules/mcp-servers/lambdas/create-mcpserver/index.mjs +1 -0
  272. package/dist/services/agent/modules/mcp-servers/lambdas/delete-mcpserver/delete-mcpserver.use-case.d.ts +15 -0
  273. package/dist/services/agent/modules/mcp-servers/lambdas/delete-mcpserver/delete-mcpserver.use-case.js +61 -0
  274. package/dist/services/agent/modules/mcp-servers/lambdas/delete-mcpserver/delete-mcpserver.use-case.mjs +32 -0
  275. package/dist/services/agent/modules/mcp-servers/lambdas/delete-mcpserver/index.d.ts +1 -0
  276. package/dist/services/agent/modules/mcp-servers/lambdas/delete-mcpserver/index.js +22 -0
  277. package/dist/services/agent/modules/mcp-servers/lambdas/delete-mcpserver/index.mjs +1 -0
  278. package/dist/services/agent/modules/mcp-servers/lambdas/get-mcpserver-by-id/get-mcpserver-by-id.use-case.d.ts +14 -0
  279. package/dist/services/agent/modules/mcp-servers/lambdas/get-mcpserver-by-id/get-mcpserver-by-id.use-case.js +52 -0
  280. package/dist/services/agent/modules/mcp-servers/lambdas/get-mcpserver-by-id/get-mcpserver-by-id.use-case.mjs +23 -0
  281. package/dist/services/agent/modules/mcp-servers/lambdas/get-mcpserver-by-id/index.d.ts +1 -0
  282. package/dist/services/agent/modules/mcp-servers/lambdas/get-mcpserver-by-id/index.js +22 -0
  283. package/dist/services/agent/modules/mcp-servers/lambdas/get-mcpserver-by-id/index.mjs +1 -0
  284. package/dist/services/agent/modules/mcp-servers/lambdas/list-mcpservers-by-user/index.d.ts +1 -0
  285. package/dist/services/agent/modules/mcp-servers/lambdas/list-mcpservers-by-user/index.js +22 -0
  286. package/dist/services/agent/modules/mcp-servers/lambdas/list-mcpservers-by-user/index.mjs +1 -0
  287. package/dist/services/agent/modules/mcp-servers/lambdas/list-mcpservers-by-user/list-mcpservers-by-user.use-case.d.ts +16 -0
  288. package/dist/services/agent/modules/mcp-servers/lambdas/list-mcpservers-by-user/list-mcpservers-by-user.use-case.js +59 -0
  289. package/dist/services/agent/modules/mcp-servers/lambdas/list-mcpservers-by-user/list-mcpservers-by-user.use-case.mjs +30 -0
  290. package/dist/services/agent/modules/mcp-servers/lambdas/update-mcpserver/index.d.ts +1 -0
  291. package/dist/services/agent/modules/mcp-servers/lambdas/update-mcpserver/index.js +22 -0
  292. package/dist/services/agent/modules/mcp-servers/lambdas/update-mcpserver/index.mjs +1 -0
  293. package/dist/services/agent/modules/mcp-servers/lambdas/update-mcpserver/update-mcpserver.use-case.d.ts +15 -0
  294. package/dist/services/agent/modules/mcp-servers/lambdas/update-mcpserver/update-mcpserver.use-case.js +61 -0
  295. package/dist/services/agent/modules/mcp-servers/lambdas/update-mcpserver/update-mcpserver.use-case.mjs +32 -0
  296. package/dist/services/agent/modules/mcp-servers/repositories/index.d.ts +1 -0
  297. package/dist/services/agent/modules/mcp-servers/repositories/index.js +22 -0
  298. package/dist/services/agent/modules/mcp-servers/repositories/index.mjs +1 -0
  299. package/dist/services/agent/modules/mcp-servers/repositories/mcpserver.repository.d.ts +10 -0
  300. package/dist/services/agent/modules/mcp-servers/repositories/mcpserver.repository.js +67 -0
  301. package/dist/services/agent/modules/mcp-servers/repositories/mcpserver.repository.mjs +38 -0
  302. package/dist/services/agent/skills/index.d.ts +2 -14
  303. package/dist/services/agent/skills/index.js +24 -7
  304. package/dist/services/agent/skills/index.mjs +2 -1
  305. package/dist/services/agent/skills/shared/index.d.ts +1 -0
  306. package/dist/services/agent/skills/shared/index.js +22 -0
  307. package/dist/services/agent/skills/shared/index.mjs +1 -0
  308. package/dist/services/agent/skills/shared/shared-rules.d.ts +4 -0
  309. package/dist/services/agent/skills/shared/shared-rules.js +37 -0
  310. package/dist/services/agent/skills/shared/shared-rules.mjs +11 -0
  311. package/dist/services/agent/skills/skill-runner.d.ts +31 -0
  312. package/dist/services/agent/skills/skill-runner.js +121 -0
  313. package/dist/services/agent/skills/skill-runner.mjs +92 -0
  314. package/dist/services/agent/skills/skill.d.ts +33 -0
  315. package/dist/services/agent/skills/skill.js +128 -0
  316. package/dist/services/agent/skills/skill.mjs +105 -0
  317. package/dist/services/agent/tools/core/call-ai/call-ai.skill.d.ts +6 -0
  318. package/dist/services/agent/tools/core/call-ai/call-ai.skill.js +54 -0
  319. package/dist/services/agent/tools/core/call-ai/call-ai.skill.mjs +31 -0
  320. package/dist/services/agent/tools/core/call-ai/call-ai.tool.d.ts +2 -0
  321. package/dist/services/agent/tools/core/call-ai/call-ai.tool.js +68 -0
  322. package/dist/services/agent/tools/core/call-ai/call-ai.tool.mjs +45 -0
  323. package/dist/services/agent/tools/core/call-ai/index.d.ts +1 -0
  324. package/dist/services/agent/tools/core/call-ai/index.js +22 -0
  325. package/dist/services/agent/tools/core/call-ai/index.mjs +1 -0
  326. package/dist/services/agent/tools/core/index.d.ts +2 -0
  327. package/dist/services/agent/tools/core/index.js +24 -0
  328. package/dist/services/agent/tools/core/index.mjs +2 -0
  329. package/dist/services/agent/tools/core/web-search/index.d.ts +1 -0
  330. package/dist/services/agent/tools/core/web-search/index.js +22 -0
  331. package/dist/services/agent/tools/core/web-search/index.mjs +1 -0
  332. package/dist/services/agent/tools/core/web-search/web-search.tool.d.ts +2 -0
  333. package/dist/services/agent/tools/core/web-search/web-search.tool.js +51 -0
  334. package/dist/services/agent/tools/core/web-search/web-search.tool.mjs +30 -0
  335. package/dist/services/agent/tools/index.d.ts +2 -12
  336. package/dist/services/agent/tools/index.js +24 -7
  337. package/dist/services/agent/tools/index.mjs +2 -1
  338. package/dist/{tool-DMR_ZdjP.d.ts → services/agent/tools/tool.d.ts} +7 -9
  339. package/dist/services/agent/tools/tool.js +57 -0
  340. package/dist/services/agent/tools/tool.mjs +34 -0
  341. package/dist/services/agent/utils/rank-tools-by-keywords.d.ts +12 -0
  342. package/dist/services/agent/utils/rank-tools-by-keywords.js +65 -0
  343. package/dist/services/agent/utils/rank-tools-by-keywords.mjs +42 -0
  344. package/dist/services/app/core/app.d.ts +14 -0
  345. package/dist/services/app/core/app.js +60 -0
  346. package/dist/services/app/core/app.mjs +47 -0
  347. package/dist/{current-session-DC-SF7rl.d.mts → services/app/core/current-session.d.ts} +4 -5
  348. package/dist/services/app/core/current-session.js +124 -0
  349. package/dist/services/app/core/current-session.mjs +104 -0
  350. package/dist/services/app/core/current-user.d.ts +16 -0
  351. package/dist/services/app/core/current-user.js +84 -0
  352. package/dist/services/app/core/current-user.mjs +61 -0
  353. package/dist/services/app/core/index.d.ts +3 -60
  354. package/dist/services/app/core/index.js +26 -7
  355. package/dist/services/app/core/index.mjs +3 -1
  356. package/dist/services/app/modules/authentication/lambdas/login/index.d.ts +1 -0
  357. package/dist/services/app/modules/authentication/lambdas/login/index.js +22 -0
  358. package/dist/services/app/modules/authentication/lambdas/login/index.mjs +1 -0
  359. package/dist/services/app/modules/authentication/lambdas/login/login.use-case.d.ts +21 -0
  360. package/dist/services/app/modules/authentication/lambdas/login/login.use-case.js +89 -0
  361. package/dist/services/app/modules/authentication/lambdas/login/login.use-case.mjs +50 -0
  362. package/dist/services/app/modules/users/entities/index.d.ts +1 -0
  363. package/dist/services/app/modules/users/entities/index.js +22 -0
  364. package/dist/services/app/modules/users/entities/index.mjs +1 -0
  365. package/dist/services/app/modules/users/entities/user-acquisition.d.ts +12 -0
  366. package/dist/services/app/modules/users/entities/user-acquisition.js +55 -0
  367. package/dist/services/app/modules/users/entities/user-acquisition.mjs +26 -0
  368. package/dist/services/app/modules/users/entities/user-country.d.ts +11 -0
  369. package/dist/services/app/modules/users/entities/user-country.js +44 -0
  370. package/dist/services/app/modules/users/entities/user-country.mjs +21 -0
  371. package/dist/services/app/modules/users/entities/user-currency.d.ts +13 -0
  372. package/dist/services/app/modules/users/entities/user-currency.js +44 -0
  373. package/dist/services/app/modules/users/entities/user-currency.mjs +21 -0
  374. package/dist/services/app/modules/users/entities/user-email.value-object.d.ts +6 -0
  375. package/dist/services/app/modules/users/entities/user-email.value-object.js +43 -0
  376. package/dist/services/app/modules/users/entities/user-email.value-object.mjs +20 -0
  377. package/dist/services/app/modules/users/entities/user-language.d.ts +11 -0
  378. package/dist/services/app/modules/users/entities/user-language.js +44 -0
  379. package/dist/services/app/modules/users/entities/user-language.mjs +21 -0
  380. package/dist/services/app/modules/users/entities/user-marketing.d.ts +9 -0
  381. package/dist/services/app/modules/users/entities/user-marketing.js +53 -0
  382. package/dist/services/app/modules/users/entities/user-marketing.mjs +24 -0
  383. package/dist/services/app/modules/users/entities/user-notification-preferences.d.ts +11 -0
  384. package/dist/services/app/modules/users/entities/user-notification-preferences.js +41 -0
  385. package/dist/services/app/modules/users/entities/user-notification-preferences.mjs +18 -0
  386. package/dist/services/app/modules/users/entities/user-password.value-object.d.ts +8 -0
  387. package/dist/services/app/modules/users/entities/user-password.value-object.js +69 -0
  388. package/dist/services/app/modules/users/entities/user-password.value-object.mjs +36 -0
  389. package/dist/services/app/modules/users/entities/user-permissions.d.ts +21 -0
  390. package/dist/services/app/modules/users/entities/user-permissions.js +59 -0
  391. package/dist/services/app/modules/users/entities/user-permissions.mjs +36 -0
  392. package/dist/services/app/modules/users/entities/user-preferences.d.ts +25 -0
  393. package/dist/services/app/modules/users/entities/user-preferences.js +69 -0
  394. package/dist/services/app/modules/users/entities/user-preferences.mjs +46 -0
  395. package/dist/services/app/modules/users/entities/user-report-preferences.d.ts +16 -0
  396. package/dist/services/app/modules/users/entities/user-report-preferences.js +56 -0
  397. package/dist/services/app/modules/users/entities/user-report-preferences.mjs +33 -0
  398. package/dist/services/app/modules/users/entities/user-report-schedule.d.ts +11 -0
  399. package/dist/services/app/modules/users/entities/user-report-schedule.js +41 -0
  400. package/dist/services/app/modules/users/entities/user-report-schedule.mjs +18 -0
  401. package/dist/services/app/modules/users/entities/user-timezone.d.ts +11 -0
  402. package/dist/services/app/modules/users/entities/user-timezone.js +44 -0
  403. package/dist/services/app/modules/users/entities/user-timezone.mjs +21 -0
  404. package/dist/services/app/modules/users/entities/user.entity.d.ts +41 -0
  405. package/dist/services/app/modules/users/entities/user.entity.js +133 -0
  406. package/dist/services/app/modules/users/entities/user.entity.mjs +103 -0
  407. package/dist/services/app/modules/users/lambdas/create-user/create-user.use-case.d.ts +14 -0
  408. package/dist/services/app/modules/users/lambdas/create-user/create-user.use-case.js +58 -0
  409. package/dist/services/app/modules/users/lambdas/create-user/create-user.use-case.mjs +29 -0
  410. package/dist/services/app/modules/users/lambdas/create-user/index.d.ts +1 -0
  411. package/dist/services/app/modules/users/lambdas/create-user/index.js +22 -0
  412. package/dist/services/app/modules/users/lambdas/create-user/index.mjs +1 -0
  413. package/dist/services/app/modules/users/lambdas/delete-user/delete-user.use-case.d.ts +16 -0
  414. package/dist/services/app/modules/users/lambdas/delete-user/delete-user.use-case.js +61 -0
  415. package/dist/services/app/modules/users/lambdas/delete-user/delete-user.use-case.mjs +32 -0
  416. package/dist/services/app/modules/users/lambdas/delete-user/index.d.ts +1 -0
  417. package/dist/services/app/modules/users/lambdas/delete-user/index.js +22 -0
  418. package/dist/services/app/modules/users/lambdas/delete-user/index.mjs +1 -0
  419. package/dist/services/app/modules/users/lambdas/get-user-by-id/get-user-by-id.use-case.d.ts +14 -0
  420. package/dist/services/app/modules/users/lambdas/get-user-by-id/get-user-by-id.use-case.js +52 -0
  421. package/dist/services/app/modules/users/lambdas/get-user-by-id/get-user-by-id.use-case.mjs +23 -0
  422. package/dist/services/app/modules/users/lambdas/get-user-by-id/index.d.ts +1 -0
  423. package/dist/services/app/modules/users/lambdas/get-user-by-id/index.js +22 -0
  424. package/dist/services/app/modules/users/lambdas/get-user-by-id/index.mjs +1 -0
  425. package/dist/services/app/modules/users/lambdas/list-users-by-props/index.d.ts +1 -0
  426. package/dist/services/app/modules/users/lambdas/list-users-by-props/index.js +22 -0
  427. package/dist/services/app/modules/users/lambdas/list-users-by-props/index.mjs +1 -0
  428. package/dist/services/app/modules/users/lambdas/list-users-by-props/list-users-by-props.use-case.d.ts +16 -0
  429. package/dist/services/app/modules/users/lambdas/list-users-by-props/list-users-by-props.use-case.js +52 -0
  430. package/dist/services/app/modules/users/lambdas/list-users-by-props/list-users-by-props.use-case.mjs +23 -0
  431. package/dist/services/app/modules/users/lambdas/update-user/index.d.ts +1 -0
  432. package/dist/services/app/modules/users/lambdas/update-user/index.js +22 -0
  433. package/dist/services/app/modules/users/lambdas/update-user/index.mjs +1 -0
  434. package/dist/services/app/modules/users/lambdas/update-user/update-user.use-case.d.ts +15 -0
  435. package/dist/services/app/modules/users/lambdas/update-user/update-user.use-case.js +62 -0
  436. package/dist/services/app/modules/users/lambdas/update-user/update-user.use-case.mjs +33 -0
  437. package/dist/services/app/modules/users/repositories/index.d.ts +1 -0
  438. package/dist/services/app/modules/users/repositories/index.js +22 -0
  439. package/dist/services/app/modules/users/repositories/index.mjs +1 -0
  440. package/dist/services/app/modules/users/repositories/user.repository.d.ts +12 -0
  441. package/dist/services/app/modules/users/repositories/user.repository.js +83 -0
  442. package/dist/services/app/modules/users/repositories/user.repository.mjs +54 -0
  443. package/package.json +1 -1
  444. package/dist/agent-loop-C41Y1CGp.d.mts +0 -60
  445. package/dist/agent-loop-ZH4GRi4A.d.ts +0 -60
  446. package/dist/base.use-case-8K6_Ods0.d.mts +0 -14
  447. package/dist/base.use-case-ChEb3nh6.d.ts +0 -14
  448. package/dist/chunk-6PCVBY5G.mjs +0 -1
  449. package/dist/chunk-7WJ3XXSP.mjs +0 -7
  450. package/dist/chunk-CCRMOWMO.mjs +0 -1
  451. package/dist/chunk-ISOEJA2L.mjs +0 -1
  452. package/dist/chunk-XXB52O7H.mjs +0 -1
  453. package/dist/current-session-DC-SF7rl.d.ts +0 -130
  454. package/dist/current-user-4BppBUBP.d.mts +0 -264
  455. package/dist/current-user-4BppBUBP.d.ts +0 -264
  456. package/dist/index.d.mts +0 -10
  457. package/dist/services/agent/core/index.d.mts +0 -122
  458. package/dist/services/agent/loops/index.d.mts +0 -116
  459. package/dist/services/agent/skills/index.d.mts +0 -14
  460. package/dist/services/agent/tools/index.d.mts +0 -12
  461. package/dist/services/app/core/index.d.mts +0 -60
  462. package/dist/skill-CtYQbG6-.d.ts +0 -308
  463. package/dist/skill-DXNkK5FG.d.mts +0 -308
  464. package/dist/tool-BaG2a8Np.d.mts +0 -42
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var confirmation_gate_exports = {};
20
+ __export(confirmation_gate_exports, {
21
+ confirmationGate: () => confirmationGate
22
+ });
23
+ module.exports = __toCommonJS(confirmation_gate_exports);
24
+ var import_skill = require("../../../skills/skill");
25
+ const confirmationGate = new import_skill.Skill({
26
+ name: "confirmation_gate",
27
+ version: "1.0.0",
28
+ description: "Classifies whether the user is confirming or declining a pending destructive-action confirmation, and drafts the follow-up message for each outcome.",
29
+ temperature: 0.1,
30
+ systemInstructions: {
31
+ instruction_set: {
32
+ goal: "Determine whether the user's latest message approves, declines, or fails to clearly answer a pending confirmation request (CONTEXT.pending_confirmation, if provided) that was already shown to them.",
33
+ role: "Yes/no confirmation classifier for pending destructive-action approvals",
34
+ logic_rules: [
35
+ "CLASSIFICATION: Read the user's current message (INPUT.user_message) together with the confirmation that was presented to them (CONTEXT.pending_confirmation, when present). Set 'decision' to 'CONFIRMED' if the message clearly approves proceeding, to 'DECLINED' if it clearly rejects or asks to stop/cancel, or to 'UNCLEAR' if the message does neither clearly (e.g. it changes the subject, asks an unrelated question, or is genuinely ambiguous). Judge intent, not exact wording \u2014 affirmations and rejections can be phrased in countless ways and in any language.",
36
+ "ACKNOWLEDGEMENT: If 'decision' is 'DECLINED', write a short, friendly 'acknowledgement' confirming that the pending action will NOT be performed. Base the language ONLY on the user's actual conversation language \u2014 use CONTEXT.detected_language when present; only fall back to CONTEXT.user_details.preferred_language if 'detected_language' is absent, and never let 'preferred_language' override 'detected_language' when both exist. Leave 'acknowledgement' as an empty string for any other 'decision'.",
37
+ "CLARIFICATION: If 'decision' is 'UNCLEAR', write a brief, polite 'clarification_prompt' asking the user to explicitly confirm or decline the pending action, using the same language priority described in ACKNOWLEDGEMENT. Leave 'clarification_prompt' as an empty string for any other 'decision'.",
38
+ "REASONING: Always fill 'reasoning' with a short explanation of the decision, in English, regardless of 'decision'.",
39
+ "STRICT_OUTPUT: Return ONLY the JSON object matching response_schema."
40
+ ],
41
+ response_schema: {
42
+ decision: "string (CONFIRMED | DECLINED | UNCLEAR)",
43
+ reasoning: "string",
44
+ acknowledgement: "string \u2014 only when decision is DECLINED, in the user's actual conversation language",
45
+ clarification_prompt: "string \u2014 only when decision is UNCLEAR, in the user's actual conversation language"
46
+ }
47
+ }
48
+ }
49
+ });
50
+ // Annotate the CommonJS export names for ESM import in node:
51
+ 0 && (module.exports = {
52
+ confirmationGate
53
+ });
@@ -0,0 +1,30 @@
1
+ import "../../../../../chunk-XRJFNASX.mjs";
2
+ import { Skill } from "../../../skills/skill";
3
+ const confirmationGate = new Skill({
4
+ name: "confirmation_gate",
5
+ version: "1.0.0",
6
+ description: "Classifies whether the user is confirming or declining a pending destructive-action confirmation, and drafts the follow-up message for each outcome.",
7
+ temperature: 0.1,
8
+ systemInstructions: {
9
+ instruction_set: {
10
+ goal: "Determine whether the user's latest message approves, declines, or fails to clearly answer a pending confirmation request (CONTEXT.pending_confirmation, if provided) that was already shown to them.",
11
+ role: "Yes/no confirmation classifier for pending destructive-action approvals",
12
+ logic_rules: [
13
+ "CLASSIFICATION: Read the user's current message (INPUT.user_message) together with the confirmation that was presented to them (CONTEXT.pending_confirmation, when present). Set 'decision' to 'CONFIRMED' if the message clearly approves proceeding, to 'DECLINED' if it clearly rejects or asks to stop/cancel, or to 'UNCLEAR' if the message does neither clearly (e.g. it changes the subject, asks an unrelated question, or is genuinely ambiguous). Judge intent, not exact wording \u2014 affirmations and rejections can be phrased in countless ways and in any language.",
14
+ "ACKNOWLEDGEMENT: If 'decision' is 'DECLINED', write a short, friendly 'acknowledgement' confirming that the pending action will NOT be performed. Base the language ONLY on the user's actual conversation language \u2014 use CONTEXT.detected_language when present; only fall back to CONTEXT.user_details.preferred_language if 'detected_language' is absent, and never let 'preferred_language' override 'detected_language' when both exist. Leave 'acknowledgement' as an empty string for any other 'decision'.",
15
+ "CLARIFICATION: If 'decision' is 'UNCLEAR', write a brief, polite 'clarification_prompt' asking the user to explicitly confirm or decline the pending action, using the same language priority described in ACKNOWLEDGEMENT. Leave 'clarification_prompt' as an empty string for any other 'decision'.",
16
+ "REASONING: Always fill 'reasoning' with a short explanation of the decision, in English, regardless of 'decision'.",
17
+ "STRICT_OUTPUT: Return ONLY the JSON object matching response_schema."
18
+ ],
19
+ response_schema: {
20
+ decision: "string (CONFIRMED | DECLINED | UNCLEAR)",
21
+ reasoning: "string",
22
+ acknowledgement: "string \u2014 only when decision is DECLINED, in the user's actual conversation language",
23
+ clarification_prompt: "string \u2014 only when decision is UNCLEAR, in the user's actual conversation language"
24
+ }
25
+ }
26
+ }
27
+ });
28
+ export {
29
+ confirmationGate
30
+ };
@@ -0,0 +1,9 @@
1
+ import { Skill } from '../../../skills/skill';
2
+ type ResponseSchema = {
3
+ can_answer: boolean;
4
+ answer: string;
5
+ reasoning: string;
6
+ detected_language: string;
7
+ };
8
+ export declare const fastResponder: Skill<ResponseSchema>;
9
+ export {};
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var fast_responder_exports = {};
20
+ __export(fast_responder_exports, {
21
+ fastResponder: () => fastResponder
22
+ });
23
+ module.exports = __toCommonJS(fast_responder_exports);
24
+ var import_skill = require("../../../skills/skill");
25
+ var import_shared_rules = require("../../../skills/shared/shared-rules");
26
+ const fastResponder = new import_skill.Skill({
27
+ name: "fast_responder",
28
+ version: "2.3.2",
29
+ description: "Handles general conversations and multipurpose user assistance in SofiApp.",
30
+ temperature: 0.7,
31
+ systemInstructions: {
32
+ instruction_set: {
33
+ goal: "Provide general assistance in a friendly, empathetic, and natural manner as a close companion.",
34
+ identity: {
35
+ name: "Sofi",
36
+ gender: "Female",
37
+ role: "Personal assistant and daily companion"
38
+ },
39
+ soul: {
40
+ tone: "Warm, fluid, and enthusiastic, and empathetic",
41
+ style: "Conversational and natural, avoiding overly formal language",
42
+ // catchphrases: ["Sure thing!", "I've got you covered!"],
43
+ formality_level: "Informal and friendly, yet respectful"
44
+ },
45
+ logic_rules: [
46
+ "LANGUAGE_DETECTION: Identify the language of the CURRENT user message in INPUT.user_message, or follow any explicit request to answer in a specific language (e.g., 'responde en espa\xF1ol', 'reply in English'). Base this decision ONLY on the actual text the user just typed. CONTEXT.user_details.preferred_language reflects the app's configured display language, NOT what the user is typing right now \u2014 it MUST NEVER influence this detection, even when it disagrees with the message's actual language. Always generate the 'answer' field in that detected or requested language, and set 'detected_language' in the output to its 2-letter ISO 639-1 code (e.g., 'es', 'en', 'fr').",
47
+ "MEMORY_AND_PERSONAL_DATA_CHECK: Do NOT assume, pretend, or hallucinate remembering past events, meetings, notes, or specific user context. If the user asks about something mentioned in the past (e.g., 'recuerdas la reuni\xF3n...?', 'qu\xE9 te dije de...?'), set 'can_answer' to false UNLESS the exact details are explicitly provided inside 'context_injection'. Never fake memory.",
48
+ "CAPABILITY_CHECK: Set 'can_answer' to false if: 1) The query involves creating, registering, updating, or deleting data or non-text resources (e.g., expenses, records, reminders, calendar entries), 2) The query refers to personal memory, past events, meetings, or stored notes not present in 'context_injection', 3) The query requires specialized skills or tools (e.g., searching databases, calendar lookup, external integrations), 4) The query requires live internet access (news, weather, live data), 5) The query is a correction, rejection, or negative feedback regarding a previously executed task or tool response (e.g., 'no era esa fecha', 'te equivocaste', 'busca otra opci\xF3n', 'eso no sirvi\xF3'). When 'can_answer' is false, leave 'answer' minimal or empty for the fallback engine.",
49
+ "REASONING: Always generate the 'reasoning' field with a short explanation in English of the decision-making process, regardless of whether 'can_answer' is true or false.",
50
+ import_shared_rules.FORMATTING,
51
+ import_shared_rules.LATEX_FORMATTING,
52
+ import_shared_rules.CITATION_FORMATTING,
53
+ "TIMEZONE_CONVERSION: When answering queries involving dates, times, or schedules, convert any UTC timestamps provided in the context to the user's local time zone if their timezone offset is included in 'context'.",
54
+ "PROACTIVE_ENGAGEMENT: When 'can_answer' is true, always end your response with a relevant, proactive follow-up question related to the topic. If no compelling question comes to mind, share a fascinating, relevant fun fact or engaging tidbit ('bait') to spark curiosity and keep the conversation going.",
55
+ import_shared_rules.POLICY_RESTRICTIONS,
56
+ "STRICT_OUTPUT: Return ONLY the JSON object matching response_schema."
57
+ ],
58
+ response_schema: {
59
+ can_answer: "boolean",
60
+ answer: "string",
61
+ reasoning: "string",
62
+ detected_language: "string"
63
+ }
64
+ }
65
+ }
66
+ });
67
+ // Annotate the CommonJS export names for ESM import in node:
68
+ 0 && (module.exports = {
69
+ fastResponder
70
+ });
@@ -0,0 +1,47 @@
1
+ import "../../../../../chunk-XRJFNASX.mjs";
2
+ import { Skill } from "../../../skills/skill";
3
+ import { FORMATTING, LATEX_FORMATTING, CITATION_FORMATTING, POLICY_RESTRICTIONS } from "../../../skills/shared/shared-rules";
4
+ const fastResponder = new Skill({
5
+ name: "fast_responder",
6
+ version: "2.3.2",
7
+ description: "Handles general conversations and multipurpose user assistance in SofiApp.",
8
+ temperature: 0.7,
9
+ systemInstructions: {
10
+ instruction_set: {
11
+ goal: "Provide general assistance in a friendly, empathetic, and natural manner as a close companion.",
12
+ identity: {
13
+ name: "Sofi",
14
+ gender: "Female",
15
+ role: "Personal assistant and daily companion"
16
+ },
17
+ soul: {
18
+ tone: "Warm, fluid, and enthusiastic, and empathetic",
19
+ style: "Conversational and natural, avoiding overly formal language",
20
+ // catchphrases: ["Sure thing!", "I've got you covered!"],
21
+ formality_level: "Informal and friendly, yet respectful"
22
+ },
23
+ logic_rules: [
24
+ "LANGUAGE_DETECTION: Identify the language of the CURRENT user message in INPUT.user_message, or follow any explicit request to answer in a specific language (e.g., 'responde en espa\xF1ol', 'reply in English'). Base this decision ONLY on the actual text the user just typed. CONTEXT.user_details.preferred_language reflects the app's configured display language, NOT what the user is typing right now \u2014 it MUST NEVER influence this detection, even when it disagrees with the message's actual language. Always generate the 'answer' field in that detected or requested language, and set 'detected_language' in the output to its 2-letter ISO 639-1 code (e.g., 'es', 'en', 'fr').",
25
+ "MEMORY_AND_PERSONAL_DATA_CHECK: Do NOT assume, pretend, or hallucinate remembering past events, meetings, notes, or specific user context. If the user asks about something mentioned in the past (e.g., 'recuerdas la reuni\xF3n...?', 'qu\xE9 te dije de...?'), set 'can_answer' to false UNLESS the exact details are explicitly provided inside 'context_injection'. Never fake memory.",
26
+ "CAPABILITY_CHECK: Set 'can_answer' to false if: 1) The query involves creating, registering, updating, or deleting data or non-text resources (e.g., expenses, records, reminders, calendar entries), 2) The query refers to personal memory, past events, meetings, or stored notes not present in 'context_injection', 3) The query requires specialized skills or tools (e.g., searching databases, calendar lookup, external integrations), 4) The query requires live internet access (news, weather, live data), 5) The query is a correction, rejection, or negative feedback regarding a previously executed task or tool response (e.g., 'no era esa fecha', 'te equivocaste', 'busca otra opci\xF3n', 'eso no sirvi\xF3'). When 'can_answer' is false, leave 'answer' minimal or empty for the fallback engine.",
27
+ "REASONING: Always generate the 'reasoning' field with a short explanation in English of the decision-making process, regardless of whether 'can_answer' is true or false.",
28
+ FORMATTING,
29
+ LATEX_FORMATTING,
30
+ CITATION_FORMATTING,
31
+ "TIMEZONE_CONVERSION: When answering queries involving dates, times, or schedules, convert any UTC timestamps provided in the context to the user's local time zone if their timezone offset is included in 'context'.",
32
+ "PROACTIVE_ENGAGEMENT: When 'can_answer' is true, always end your response with a relevant, proactive follow-up question related to the topic. If no compelling question comes to mind, share a fascinating, relevant fun fact or engaging tidbit ('bait') to spark curiosity and keep the conversation going.",
33
+ POLICY_RESTRICTIONS,
34
+ "STRICT_OUTPUT: Return ONLY the JSON object matching response_schema."
35
+ ],
36
+ response_schema: {
37
+ can_answer: "boolean",
38
+ answer: "string",
39
+ reasoning: "string",
40
+ detected_language: "string"
41
+ }
42
+ }
43
+ }
44
+ });
45
+ export {
46
+ fastResponder
47
+ };
@@ -0,0 +1,7 @@
1
+ import { Skill } from '../../../skills/skill';
2
+ type ResponseSchema = {
3
+ final_response: string;
4
+ reasoning: string;
5
+ };
6
+ export declare const finalResponder: Skill<ResponseSchema>;
7
+ export {};
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var final_responder_exports = {};
20
+ __export(final_responder_exports, {
21
+ finalResponder: () => finalResponder
22
+ });
23
+ module.exports = __toCommonJS(final_responder_exports);
24
+ var import_skill = require("../../../skills/skill");
25
+ var import_shared_rules = require("../../../skills/shared/shared-rules");
26
+ const finalResponder = new import_skill.Skill({
27
+ name: "final_responder",
28
+ version: "1.0.0",
29
+ description: "Synthesizes tool execution results, scratchpad, and context state into a clear, natural, user-facing final response.",
30
+ temperature: 0.3,
31
+ systemInstructions: {
32
+ instruction_set: {
33
+ goal: "Synthesize the user's initial goal, extracted entities, and technical tool execution results into a comprehensive, helpful, and naturally formatted final response for the user.",
34
+ role: "Final synthesis and communication engine",
35
+ logic_rules: [
36
+ "RESULT_SYNTHESIS: Review all tool execution results, outputs, and scratchpad context to build a clear, coherent answer addressing the user's original goal.",
37
+ "USER_LANGUAGE_MATCHING: Always draft 'final_response' in the language used by the user in their original input or conversation history.",
38
+ import_shared_rules.FORMATTING,
39
+ import_shared_rules.LATEX_FORMATTING,
40
+ import_shared_rules.CITATION_FORMATTING,
41
+ "PROACTIVE_ENGAGEMENT: When 'can_answer' is true, always end your response with a relevant, proactive follow-up question related to the topic. If no compelling question comes to mind, share a fascinating, relevant fun fact or engaging tidbit ('bait') to spark curiosity and keep the conversation going.",
42
+ "ERROR_HANDLING: If tool executions failed or yielded partial results, communicate what was accomplished and what failed gracefully without exposing internal raw stack traces unless relevant.",
43
+ "REASONING_LOG: Provide a concise logical summary of how the final answer was constructed from the tool outputs in 'reasoning' strictly in English.",
44
+ "STRICT_ENGLISH_REASONING: The 'reasoning' field MUST strictly be written in English, while 'final_response' MUST match the user's language.",
45
+ "STRICT_OUTPUT: Return ONLY the JSON object matching response_schema."
46
+ ],
47
+ response_schema: {
48
+ final_response: "string",
49
+ reasoning: "string"
50
+ }
51
+ }
52
+ }
53
+ });
54
+ // Annotate the CommonJS export names for ESM import in node:
55
+ 0 && (module.exports = {
56
+ finalResponder
57
+ });
@@ -0,0 +1,34 @@
1
+ import "../../../../../chunk-XRJFNASX.mjs";
2
+ import { Skill } from "../../../skills/skill";
3
+ import { FORMATTING, LATEX_FORMATTING, CITATION_FORMATTING } from "../../../skills/shared/shared-rules";
4
+ const finalResponder = new Skill({
5
+ name: "final_responder",
6
+ version: "1.0.0",
7
+ description: "Synthesizes tool execution results, scratchpad, and context state into a clear, natural, user-facing final response.",
8
+ temperature: 0.3,
9
+ systemInstructions: {
10
+ instruction_set: {
11
+ goal: "Synthesize the user's initial goal, extracted entities, and technical tool execution results into a comprehensive, helpful, and naturally formatted final response for the user.",
12
+ role: "Final synthesis and communication engine",
13
+ logic_rules: [
14
+ "RESULT_SYNTHESIS: Review all tool execution results, outputs, and scratchpad context to build a clear, coherent answer addressing the user's original goal.",
15
+ "USER_LANGUAGE_MATCHING: Always draft 'final_response' in the language used by the user in their original input or conversation history.",
16
+ FORMATTING,
17
+ LATEX_FORMATTING,
18
+ CITATION_FORMATTING,
19
+ "PROACTIVE_ENGAGEMENT: When 'can_answer' is true, always end your response with a relevant, proactive follow-up question related to the topic. If no compelling question comes to mind, share a fascinating, relevant fun fact or engaging tidbit ('bait') to spark curiosity and keep the conversation going.",
20
+ "ERROR_HANDLING: If tool executions failed or yielded partial results, communicate what was accomplished and what failed gracefully without exposing internal raw stack traces unless relevant.",
21
+ "REASONING_LOG: Provide a concise logical summary of how the final answer was constructed from the tool outputs in 'reasoning' strictly in English.",
22
+ "STRICT_ENGLISH_REASONING: The 'reasoning' field MUST strictly be written in English, while 'final_response' MUST match the user's language.",
23
+ "STRICT_OUTPUT: Return ONLY the JSON object matching response_schema."
24
+ ],
25
+ response_schema: {
26
+ final_response: "string",
27
+ reasoning: "string"
28
+ }
29
+ }
30
+ }
31
+ });
32
+ export {
33
+ finalResponder
34
+ };
@@ -0,0 +1,6 @@
1
+ export * from './action-planner';
2
+ export * from './confirmation-gate';
3
+ export * from './fast-responder';
4
+ export * from './final-responder';
5
+ export * from './state-observer';
6
+ export * from './strategy-engine';
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var skills_exports = {};
17
+ module.exports = __toCommonJS(skills_exports);
18
+ __reExport(skills_exports, require("./action-planner"), module.exports);
19
+ __reExport(skills_exports, require("./confirmation-gate"), module.exports);
20
+ __reExport(skills_exports, require("./fast-responder"), module.exports);
21
+ __reExport(skills_exports, require("./final-responder"), module.exports);
22
+ __reExport(skills_exports, require("./state-observer"), module.exports);
23
+ __reExport(skills_exports, require("./strategy-engine"), module.exports);
24
+ // Annotate the CommonJS export names for ESM import in node:
25
+ 0 && (module.exports = {
26
+ ...require("./action-planner"),
27
+ ...require("./confirmation-gate"),
28
+ ...require("./fast-responder"),
29
+ ...require("./final-responder"),
30
+ ...require("./state-observer"),
31
+ ...require("./strategy-engine")
32
+ });
@@ -0,0 +1,6 @@
1
+ export * from "./action-planner";
2
+ export * from "./confirmation-gate";
3
+ export * from "./fast-responder";
4
+ export * from "./final-responder";
5
+ export * from "./state-observer";
6
+ export * from "./strategy-engine";
@@ -0,0 +1,10 @@
1
+ import { Skill } from '../../../skills/skill';
2
+ type StateObserverResponseSchema = {
3
+ action: 'CONTINUE' | 'REPLAN' | 'ASK_USER' | 'FINISH';
4
+ feedback_for_planner: string;
5
+ user_prompt: string;
6
+ detected_language: string;
7
+ reasoning: string;
8
+ };
9
+ export declare const stateObserver: Skill<StateObserverResponseSchema>;
10
+ export {};
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var state_observer_exports = {};
20
+ __export(state_observer_exports, {
21
+ stateObserver: () => stateObserver
22
+ });
23
+ module.exports = __toCommonJS(state_observer_exports);
24
+ var import_skill = require("../../../skills/skill");
25
+ const stateObserver = new import_skill.Skill({
26
+ name: "state_observer",
27
+ version: "1.1.0",
28
+ description: "Evaluates the execution output of a tool step against the overall user intent. Determines whether to proceed, replan, ask the user, or finish.",
29
+ temperature: 0.1,
30
+ systemInstructions: {
31
+ instruction_set: {
32
+ goal: "Analyze the execution result of the latest executed tool step alongside the original user intent, remaining plan steps, and extracted entities. Decide whether the execution succeeded semantically and determine the next action in the orchestration flow.",
33
+ role: "Execution state observer, semantic error evaluator, and dynamic replanning controller agent",
34
+ logic_rules: [
35
+ "STEP_OUTPUT_ANALYSIS: Inspect 'executed_step'. Check both technical status (COMPLETED vs FAILED) and semantic content of 'output'. Identify if the tool returned empty data, permission errors, business logic failures, or unrecoverable exceptions.",
36
+ "EVALUATE_CONTINUE: If the step status is 'COMPLETED' and the 'output' contains valid, expected data required for subsequent steps: 1) Set 'action' to 'CONTINUE', 2) Set 'feedback_for_planner' to '', 3) Set 'user_prompt' to ''.",
37
+ "EVALUATE_FINISH: If the step status is 'COMPLETED' and the output fully answers the user's intent, rendering remaining planned steps unnecessary: 1) Set 'action' to 'FINISH', 2) Set 'feedback_for_planner' to '', 3) Set 'user_prompt' to ''.",
38
+ "EVALUATE_REPLAN: If the step status is 'FAILED', OR if the tool output is empty/invalid, OR if the data returned drastically alters the context/assumptions required for remaining steps: 1) Set 'action' to 'REPLAN', 2) Provide detailed, actionable diagnostic feedback in 'feedback_for_planner' in English explaining why the step failed or what new constraints were discovered, 3) Set 'user_prompt' to ''.",
39
+ "EVALUATE_ASK_USER: If the tool output explicitly indicates that user intervention, a missing secret, an auth confirmation, or a decision choice is required to proceed: 1) Set 'action' to 'ASK_USER', 2) Set 'feedback_for_planner' to '', 3) Generate a clear, direct prompt in 'user_prompt' written in 'detected_language' asking the user for the necessary input.",
40
+ "LANGUAGE_DETECTION: Detect the primary language of the user input/context and output its ISO 639-1 code in 'detected_language' (e.g., 'es', 'en', 'pt').",
41
+ "LANGUAGE_ENFORCEMENT: ONLY 'user_prompt' MUST be written in the language specified in 'detected_language'. ALL OTHER fields ('feedback_for_planner', 'detected_language', and 'reasoning') MUST strictly be written in English.",
42
+ "STRICT_OUTPUT: Return ONLY the JSON object matching response_schema."
43
+ ],
44
+ response_schema: {
45
+ action: "string (CONTINUE | REPLAN | ASK_USER | FINISH)",
46
+ feedback_for_planner: "string",
47
+ user_prompt: "string",
48
+ detected_language: "string",
49
+ reasoning: "string"
50
+ }
51
+ }
52
+ }
53
+ });
54
+ // Annotate the CommonJS export names for ESM import in node:
55
+ 0 && (module.exports = {
56
+ stateObserver
57
+ });
@@ -0,0 +1,34 @@
1
+ import "../../../../../chunk-XRJFNASX.mjs";
2
+ import { Skill } from "../../../skills/skill";
3
+ const stateObserver = new Skill({
4
+ name: "state_observer",
5
+ version: "1.1.0",
6
+ description: "Evaluates the execution output of a tool step against the overall user intent. Determines whether to proceed, replan, ask the user, or finish.",
7
+ temperature: 0.1,
8
+ systemInstructions: {
9
+ instruction_set: {
10
+ goal: "Analyze the execution result of the latest executed tool step alongside the original user intent, remaining plan steps, and extracted entities. Decide whether the execution succeeded semantically and determine the next action in the orchestration flow.",
11
+ role: "Execution state observer, semantic error evaluator, and dynamic replanning controller agent",
12
+ logic_rules: [
13
+ "STEP_OUTPUT_ANALYSIS: Inspect 'executed_step'. Check both technical status (COMPLETED vs FAILED) and semantic content of 'output'. Identify if the tool returned empty data, permission errors, business logic failures, or unrecoverable exceptions.",
14
+ "EVALUATE_CONTINUE: If the step status is 'COMPLETED' and the 'output' contains valid, expected data required for subsequent steps: 1) Set 'action' to 'CONTINUE', 2) Set 'feedback_for_planner' to '', 3) Set 'user_prompt' to ''.",
15
+ "EVALUATE_FINISH: If the step status is 'COMPLETED' and the output fully answers the user's intent, rendering remaining planned steps unnecessary: 1) Set 'action' to 'FINISH', 2) Set 'feedback_for_planner' to '', 3) Set 'user_prompt' to ''.",
16
+ "EVALUATE_REPLAN: If the step status is 'FAILED', OR if the tool output is empty/invalid, OR if the data returned drastically alters the context/assumptions required for remaining steps: 1) Set 'action' to 'REPLAN', 2) Provide detailed, actionable diagnostic feedback in 'feedback_for_planner' in English explaining why the step failed or what new constraints were discovered, 3) Set 'user_prompt' to ''.",
17
+ "EVALUATE_ASK_USER: If the tool output explicitly indicates that user intervention, a missing secret, an auth confirmation, or a decision choice is required to proceed: 1) Set 'action' to 'ASK_USER', 2) Set 'feedback_for_planner' to '', 3) Generate a clear, direct prompt in 'user_prompt' written in 'detected_language' asking the user for the necessary input.",
18
+ "LANGUAGE_DETECTION: Detect the primary language of the user input/context and output its ISO 639-1 code in 'detected_language' (e.g., 'es', 'en', 'pt').",
19
+ "LANGUAGE_ENFORCEMENT: ONLY 'user_prompt' MUST be written in the language specified in 'detected_language'. ALL OTHER fields ('feedback_for_planner', 'detected_language', and 'reasoning') MUST strictly be written in English.",
20
+ "STRICT_OUTPUT: Return ONLY the JSON object matching response_schema."
21
+ ],
22
+ response_schema: {
23
+ action: "string (CONTINUE | REPLAN | ASK_USER | FINISH)",
24
+ feedback_for_planner: "string",
25
+ user_prompt: "string",
26
+ detected_language: "string",
27
+ reasoning: "string"
28
+ }
29
+ }
30
+ }
31
+ });
32
+ export {
33
+ stateObserver
34
+ };
@@ -0,0 +1,15 @@
1
+ import { Skill } from '../../../skills/skill';
2
+ type ResponseSchema = {
3
+ goal: string;
4
+ hypothesis: string;
5
+ required_capabilities: string[];
6
+ tool_keywords: Array<{
7
+ keyword: string;
8
+ weight: number;
9
+ }>;
10
+ detected_language: string;
11
+ reasoning: string;
12
+ is_continuation: boolean;
13
+ };
14
+ export declare const strategyEngine: Skill<ResponseSchema>;
15
+ export {};
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var strategy_engine_exports = {};
20
+ __export(strategy_engine_exports, {
21
+ strategyEngine: () => strategyEngine
22
+ });
23
+ module.exports = __toCommonJS(strategy_engine_exports);
24
+ var import_skill = require("../../../skills/skill");
25
+ const strategyEngine = new import_skill.Skill({
26
+ name: "strategy_engine",
27
+ version: "1.3.0",
28
+ description: "Analyzes user goals, chat history, and past tasks to formulate high-level strategies, required capabilities, weighted tool discovery keywords, execution hypotheses, and Task continuity detection.",
29
+ temperature: 0.2,
30
+ systemInstructions: {
31
+ instruction_set: {
32
+ goal: "Analyze the user's intent, conversation context, and last completed task to establish a high-level execution goal, a logical hypothesis, required system capabilities, weighted keywords to match available tools, and determine whether the message continues a previous task.",
33
+ role: "Strategic reasoning, capability mapping, tool discovery, and task continuity engine",
34
+ logic_rules: [
35
+ "TASK_CONTINUATION_DETECTION: Set 'is_continuation' to true ONLY if 'last_completed_task' is provided in context AND the user's current message directly references, follows up on, or modifies that specific previous task. Set to false if the user introduces a completely new goal or independent topic.",
36
+ "GOAL_REFINEMENT: Refine and summarize the ultimate goal of the user into 'goal' strictly in English, resolving references from chat history if present.",
37
+ "HYPOTHESIS_FORMULATION: Formulate a clear, step-by-step strategic hypothesis in 'hypothesis' in English explaining how the goal can be achieved logically.",
38
+ "CAPABILITY_MAPPING: Identify and list all functional system capabilities or domain requirements needed in 'required_capabilities' in English (e.g., ['calendar_access', 'data_parsing', 'web_search']).",
39
+ "TOOL_KEYWORD_EXTRACTION: Extract 4 to 8 single-word terms (no multi-word patterns or underscores) in English targeting functional backend tools. Always prioritize domain nouns (e.g., 'expense', 'transaction', 'finance', 'budget', 'search', 'weather'). Include target third-party platforms or services if explicitly mentioned or strongly implied (e.g., 'slack', 'jira', 'github', 'google') with lower weight. DO NOT extract specific dynamic entities or transactional values (e.g., 'McDonalds', '10 USD'). Assign a float 'weight' from 0.1 to 1.0 (0.9-1.0 for core domain nouns and primary action verbs; 0.5-0.7 for secondary/broader domain concepts; 0.3-0.5 for third-party platforms/services; 0.1-0.3 for generic operations).",
40
+ "LANGUAGE_DETECTION: Detect the primary language of the user input and output its ISO 639-1 code in 'detected_language' (e.g., 'es', 'en', 'pt').",
41
+ "REASONING_LOG: Provide a concise, step-by-step logical justification of the proposed strategy in 'reasoning' strictly in English.",
42
+ "STRICT_ENGLISH_OUTPUT: ALL output fields ('goal', 'hypothesis', 'required_capabilities', 'tool_keywords' keywords, and 'reasoning') MUST strictly be written in English, regardless of the user input language.",
43
+ "STRICT_OUTPUT: Return ONLY the JSON object matching response_schema."
44
+ ],
45
+ response_schema: {
46
+ goal: "string",
47
+ hypothesis: "string",
48
+ required_capabilities: "array of strings",
49
+ tool_keywords: "array of objects with fields 'keyword' (string) and 'weight' (number between 0.1 and 1.0)",
50
+ detected_language: "string",
51
+ reasoning: "string",
52
+ is_continuation: "boolean"
53
+ }
54
+ }
55
+ }
56
+ });
57
+ // Annotate the CommonJS export names for ESM import in node:
58
+ 0 && (module.exports = {
59
+ strategyEngine
60
+ });
@@ -0,0 +1,37 @@
1
+ import "../../../../../chunk-XRJFNASX.mjs";
2
+ import { Skill } from "../../../skills/skill";
3
+ const strategyEngine = new Skill({
4
+ name: "strategy_engine",
5
+ version: "1.3.0",
6
+ description: "Analyzes user goals, chat history, and past tasks to formulate high-level strategies, required capabilities, weighted tool discovery keywords, execution hypotheses, and Task continuity detection.",
7
+ temperature: 0.2,
8
+ systemInstructions: {
9
+ instruction_set: {
10
+ goal: "Analyze the user's intent, conversation context, and last completed task to establish a high-level execution goal, a logical hypothesis, required system capabilities, weighted keywords to match available tools, and determine whether the message continues a previous task.",
11
+ role: "Strategic reasoning, capability mapping, tool discovery, and task continuity engine",
12
+ logic_rules: [
13
+ "TASK_CONTINUATION_DETECTION: Set 'is_continuation' to true ONLY if 'last_completed_task' is provided in context AND the user's current message directly references, follows up on, or modifies that specific previous task. Set to false if the user introduces a completely new goal or independent topic.",
14
+ "GOAL_REFINEMENT: Refine and summarize the ultimate goal of the user into 'goal' strictly in English, resolving references from chat history if present.",
15
+ "HYPOTHESIS_FORMULATION: Formulate a clear, step-by-step strategic hypothesis in 'hypothesis' in English explaining how the goal can be achieved logically.",
16
+ "CAPABILITY_MAPPING: Identify and list all functional system capabilities or domain requirements needed in 'required_capabilities' in English (e.g., ['calendar_access', 'data_parsing', 'web_search']).",
17
+ "TOOL_KEYWORD_EXTRACTION: Extract 4 to 8 single-word terms (no multi-word patterns or underscores) in English targeting functional backend tools. Always prioritize domain nouns (e.g., 'expense', 'transaction', 'finance', 'budget', 'search', 'weather'). Include target third-party platforms or services if explicitly mentioned or strongly implied (e.g., 'slack', 'jira', 'github', 'google') with lower weight. DO NOT extract specific dynamic entities or transactional values (e.g., 'McDonalds', '10 USD'). Assign a float 'weight' from 0.1 to 1.0 (0.9-1.0 for core domain nouns and primary action verbs; 0.5-0.7 for secondary/broader domain concepts; 0.3-0.5 for third-party platforms/services; 0.1-0.3 for generic operations).",
18
+ "LANGUAGE_DETECTION: Detect the primary language of the user input and output its ISO 639-1 code in 'detected_language' (e.g., 'es', 'en', 'pt').",
19
+ "REASONING_LOG: Provide a concise, step-by-step logical justification of the proposed strategy in 'reasoning' strictly in English.",
20
+ "STRICT_ENGLISH_OUTPUT: ALL output fields ('goal', 'hypothesis', 'required_capabilities', 'tool_keywords' keywords, and 'reasoning') MUST strictly be written in English, regardless of the user input language.",
21
+ "STRICT_OUTPUT: Return ONLY the JSON object matching response_schema."
22
+ ],
23
+ response_schema: {
24
+ goal: "string",
25
+ hypothesis: "string",
26
+ required_capabilities: "array of strings",
27
+ tool_keywords: "array of objects with fields 'keyword' (string) and 'weight' (number between 0.1 and 1.0)",
28
+ detected_language: "string",
29
+ reasoning: "string",
30
+ is_continuation: "boolean"
31
+ }
32
+ }
33
+ }
34
+ });
35
+ export {
36
+ strategyEngine
37
+ };