@adonis-agora/agent 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/LICENSE +21 -0
  2. package/dist/configure.d.ts +18 -0
  3. package/dist/configure.d.ts.map +1 -0
  4. package/dist/configure.js +29 -0
  5. package/dist/configure.js.map +1 -0
  6. package/dist/providers/agent_provider.d.ts +25 -0
  7. package/dist/providers/agent_provider.d.ts.map +1 -0
  8. package/dist/providers/agent_provider.js +511 -0
  9. package/dist/providers/agent_provider.js.map +1 -0
  10. package/dist/src/actor-resolver.d.ts +41 -0
  11. package/dist/src/actor-resolver.d.ts.map +1 -0
  12. package/dist/src/agent-deps-factory.d.ts +59 -0
  13. package/dist/src/agent-deps-factory.d.ts.map +1 -0
  14. package/dist/src/agent-deps-factory.js +111 -0
  15. package/dist/src/agent-deps-factory.js.map +1 -0
  16. package/dist/src/agent-deps.d.ts +42 -0
  17. package/dist/src/agent-deps.d.ts.map +1 -0
  18. package/dist/src/agent-deps.js +5 -0
  19. package/dist/src/agent-deps.js.map +1 -0
  20. package/dist/src/agent-loop.d.ts +101 -0
  21. package/dist/src/agent-loop.d.ts.map +1 -0
  22. package/dist/src/agent-loop.js +396 -0
  23. package/dist/src/agent-loop.js.map +1 -0
  24. package/dist/src/agent-registry.d.ts +10 -0
  25. package/dist/src/agent-registry.d.ts.map +1 -0
  26. package/dist/src/agent-service.d.ts +50 -0
  27. package/dist/src/agent-service.d.ts.map +1 -0
  28. package/dist/src/agent-service.js +82 -0
  29. package/dist/src/agent-service.js.map +1 -0
  30. package/dist/src/ai-sdk/ai-sdk-model.d.ts +17 -0
  31. package/dist/src/ai-sdk/ai-sdk-model.d.ts.map +1 -0
  32. package/dist/src/ai-sdk/ai-sdk-model.js +263 -0
  33. package/dist/src/ai-sdk/ai-sdk-model.js.map +1 -0
  34. package/dist/src/ai-sdk/index.d.ts +2 -0
  35. package/dist/src/ai-sdk/index.d.ts.map +1 -0
  36. package/dist/src/ai-tool-ref.d.ts +79 -0
  37. package/dist/src/ai-tool-ref.d.ts.map +1 -0
  38. package/dist/src/ai-tool-ref.js +81 -0
  39. package/dist/src/ai-tool-ref.js.map +1 -0
  40. package/dist/src/authorizer.d.ts +18 -0
  41. package/dist/src/authorizer.d.ts.map +1 -0
  42. package/dist/src/authz/authz-tool-authorizer.d.ts +85 -0
  43. package/dist/src/authz/authz-tool-authorizer.d.ts.map +1 -0
  44. package/dist/src/authz/authz-tool-authorizer.js +63 -0
  45. package/dist/src/authz/authz-tool-authorizer.js.map +1 -0
  46. package/dist/src/authz/index.d.ts +3 -0
  47. package/dist/src/authz/index.d.ts.map +1 -0
  48. package/dist/src/authz/index.js +2 -0
  49. package/dist/src/authz/index.js.map +1 -0
  50. package/dist/src/data/data-tool.d.ts +64 -0
  51. package/dist/src/data/data-tool.d.ts.map +1 -0
  52. package/dist/src/data/data-tool.js +146 -0
  53. package/dist/src/data/data-tool.js.map +1 -0
  54. package/dist/src/data/index.d.ts +7 -0
  55. package/dist/src/data/index.d.ts.map +1 -0
  56. package/dist/src/data/index.js +7 -0
  57. package/dist/src/data/index.js.map +1 -0
  58. package/dist/src/data/limit.d.ts +12 -0
  59. package/dist/src/data/limit.d.ts.map +1 -0
  60. package/dist/src/data/limit.js +29 -0
  61. package/dist/src/data/limit.js.map +1 -0
  62. package/dist/src/data/parser.d.ts +27 -0
  63. package/dist/src/data/parser.d.ts.map +1 -0
  64. package/dist/src/data/parser.js +18 -0
  65. package/dist/src/data/parser.js.map +1 -0
  66. package/dist/src/data/sql-validator.d.ts +37 -0
  67. package/dist/src/data/sql-validator.d.ts.map +1 -0
  68. package/dist/src/data/sql-validator.js +92 -0
  69. package/dist/src/data/sql-validator.js.map +1 -0
  70. package/dist/src/data/table-access.d.ts +40 -0
  71. package/dist/src/data/table-access.d.ts.map +1 -0
  72. package/dist/src/data/table-access.js +41 -0
  73. package/dist/src/data/table-access.js.map +1 -0
  74. package/dist/src/data/tenant-scope.d.ts +39 -0
  75. package/dist/src/data/tenant-scope.d.ts.map +1 -0
  76. package/dist/src/data/tenant-scope.js +126 -0
  77. package/dist/src/data/tenant-scope.js.map +1 -0
  78. package/dist/src/define_config.d.ts +153 -0
  79. package/dist/src/define_config.d.ts.map +1 -0
  80. package/dist/src/define_config.js +7 -0
  81. package/dist/src/define_config.js.map +1 -0
  82. package/dist/src/diagnostics.d.ts +82 -0
  83. package/dist/src/diagnostics.d.ts.map +1 -0
  84. package/dist/src/diagnostics.js +50 -0
  85. package/dist/src/diagnostics.js.map +1 -0
  86. package/dist/src/durable/agent-run-context.d.ts +24 -0
  87. package/dist/src/durable/agent-run-context.d.ts.map +1 -0
  88. package/dist/src/durable/agent-run-context.js +17 -0
  89. package/dist/src/durable/agent-run-context.js.map +1 -0
  90. package/dist/src/durable/agent-run-workflow.d.ts +37 -0
  91. package/dist/src/durable/agent-run-workflow.d.ts.map +1 -0
  92. package/dist/src/durable/agent-run-workflow.js +128 -0
  93. package/dist/src/durable/agent-run-workflow.js.map +1 -0
  94. package/dist/src/durable/durable-agent-runner.d.ts +25 -0
  95. package/dist/src/durable/durable-agent-runner.d.ts.map +1 -0
  96. package/dist/src/durable/durable-agent-runner.js +59 -0
  97. package/dist/src/durable/durable-agent-runner.js.map +1 -0
  98. package/dist/src/durable/index.d.ts +17 -0
  99. package/dist/src/durable/index.d.ts.map +1 -0
  100. package/dist/src/durable/index.js +20 -0
  101. package/dist/src/durable/index.js.map +1 -0
  102. package/dist/src/index.d.ts +55 -0
  103. package/dist/src/index.d.ts.map +1 -0
  104. package/dist/src/index.js +45 -0
  105. package/dist/src/index.js.map +1 -0
  106. package/dist/src/personas.d.ts +7 -0
  107. package/dist/src/personas.d.ts.map +1 -0
  108. package/dist/src/rag/chunk.d.ts +14 -0
  109. package/dist/src/rag/chunk.d.ts.map +1 -0
  110. package/dist/src/rag/chunk.js +42 -0
  111. package/dist/src/rag/chunk.js.map +1 -0
  112. package/dist/src/rag/embedding-retriever.d.ts +15 -0
  113. package/dist/src/rag/embedding-retriever.d.ts.map +1 -0
  114. package/dist/src/rag/embedding-retriever.js +24 -0
  115. package/dist/src/rag/embedding-retriever.js.map +1 -0
  116. package/dist/src/rag/filter.d.ts +6 -0
  117. package/dist/src/rag/filter.d.ts.map +1 -0
  118. package/dist/src/rag/filter.js +11 -0
  119. package/dist/src/rag/filter.js.map +1 -0
  120. package/dist/src/rag/index.d.ts +8 -0
  121. package/dist/src/rag/index.d.ts.map +1 -0
  122. package/dist/src/rag/index.js +8 -0
  123. package/dist/src/rag/index.js.map +1 -0
  124. package/dist/src/rag/ingest.d.ts +33 -0
  125. package/dist/src/rag/ingest.d.ts.map +1 -0
  126. package/dist/src/rag/ingest.js +37 -0
  127. package/dist/src/rag/ingest.js.map +1 -0
  128. package/dist/src/rag/memory-vector-store.d.ts +16 -0
  129. package/dist/src/rag/memory-vector-store.d.ts.map +1 -0
  130. package/dist/src/rag/memory-vector-store.js +70 -0
  131. package/dist/src/rag/memory-vector-store.js.map +1 -0
  132. package/dist/src/rag/pg-vector-store.d.ts +84 -0
  133. package/dist/src/rag/pg-vector-store.d.ts.map +1 -0
  134. package/dist/src/rag/pg-vector-store.js +220 -0
  135. package/dist/src/rag/pg-vector-store.js.map +1 -0
  136. package/dist/src/rag/vector-store.d.ts +47 -0
  137. package/dist/src/rag/vector-store.d.ts.map +1 -0
  138. package/dist/src/rag/vector-store.js +5 -0
  139. package/dist/src/rag/vector-store.js.map +1 -0
  140. package/dist/src/rag-media/diagnostics.d.ts +43 -0
  141. package/dist/src/rag-media/diagnostics.d.ts.map +1 -0
  142. package/dist/src/rag-media/diagnostics.js +36 -0
  143. package/dist/src/rag-media/diagnostics.js.map +1 -0
  144. package/dist/src/rag-media/index.d.ts +5 -0
  145. package/dist/src/rag-media/index.d.ts.map +1 -0
  146. package/dist/src/rag-media/index.js +5 -0
  147. package/dist/src/rag-media/index.js.map +1 -0
  148. package/dist/src/rag-media/media-events.d.ts +23 -0
  149. package/dist/src/rag-media/media-events.d.ts.map +1 -0
  150. package/dist/src/rag-media/media-events.js +28 -0
  151. package/dist/src/rag-media/media-events.js.map +1 -0
  152. package/dist/src/rag-media/media-rag-ingestion.d.ts +155 -0
  153. package/dist/src/rag-media/media-rag-ingestion.d.ts.map +1 -0
  154. package/dist/src/rag-media/media-rag-ingestion.js +204 -0
  155. package/dist/src/rag-media/media-rag-ingestion.js.map +1 -0
  156. package/dist/src/rag-media/text-extractor.d.ts +46 -0
  157. package/dist/src/rag-media/text-extractor.d.ts.map +1 -0
  158. package/dist/src/rag-media/text-extractor.js +92 -0
  159. package/dist/src/rag-media/text-extractor.js.map +1 -0
  160. package/dist/src/redis-stream-client.d.ts +29 -0
  161. package/dist/src/redis-stream-client.d.ts.map +1 -0
  162. package/dist/src/redis-stream-client.js +2 -0
  163. package/dist/src/redis-stream-client.js.map +1 -0
  164. package/dist/src/redis-token-stream-sink.d.ts +36 -0
  165. package/dist/src/redis-token-stream-sink.d.ts.map +1 -0
  166. package/dist/src/redis-token-stream-sink.js +94 -0
  167. package/dist/src/redis-token-stream-sink.js.map +1 -0
  168. package/dist/src/runners/inline-agent-runner.d.ts +26 -0
  169. package/dist/src/runners/inline-agent-runner.d.ts.map +1 -0
  170. package/dist/src/runners/inline-agent-runner.js +85 -0
  171. package/dist/src/runners/inline-agent-runner.js.map +1 -0
  172. package/dist/src/spi/actor-directory.d.ts +23 -0
  173. package/dist/src/spi/actor-directory.d.ts.map +1 -0
  174. package/dist/src/spi/actor-directory.js +2 -0
  175. package/dist/src/spi/actor-directory.js.map +1 -0
  176. package/dist/src/spi/actor-resolver.d.ts +18 -0
  177. package/dist/src/spi/actor-resolver.d.ts.map +1 -0
  178. package/dist/src/spi/agent-runner.d.ts +20 -0
  179. package/dist/src/spi/agent-runner.d.ts.map +1 -0
  180. package/dist/src/spi/agent-store.d.ts +104 -0
  181. package/dist/src/spi/agent-store.d.ts.map +1 -0
  182. package/dist/src/spi/agent-store.js +2 -0
  183. package/dist/src/spi/agent-store.js.map +1 -0
  184. package/dist/src/spi/attachment-staging.d.ts +27 -0
  185. package/dist/src/spi/attachment-staging.d.ts.map +1 -0
  186. package/dist/src/spi/attachment-staging.js +2 -0
  187. package/dist/src/spi/attachment-staging.js.map +1 -0
  188. package/dist/src/spi/embedding-provider.d.ts +12 -0
  189. package/dist/src/spi/embedding-provider.d.ts.map +1 -0
  190. package/dist/src/spi/embedding-provider.js +2 -0
  191. package/dist/src/spi/embedding-provider.js.map +1 -0
  192. package/dist/src/spi/governance-queries.d.ts +215 -0
  193. package/dist/src/spi/governance-queries.d.ts.map +1 -0
  194. package/dist/src/spi/governance-queries.js +15 -0
  195. package/dist/src/spi/governance-queries.js.map +1 -0
  196. package/dist/src/spi/model-provider.d.ts +41 -0
  197. package/dist/src/spi/model-provider.d.ts.map +1 -0
  198. package/dist/src/spi/pricing-store.d.ts +45 -0
  199. package/dist/src/spi/pricing-store.d.ts.map +1 -0
  200. package/dist/src/spi/pricing-store.js +24 -0
  201. package/dist/src/spi/pricing-store.js.map +1 -0
  202. package/dist/src/spi/quota-store.d.ts +7 -0
  203. package/dist/src/spi/quota-store.d.ts.map +1 -0
  204. package/dist/src/spi/reranker.d.ts +17 -0
  205. package/dist/src/spi/reranker.d.ts.map +1 -0
  206. package/dist/src/spi/reranker.js +2 -0
  207. package/dist/src/spi/reranker.js.map +1 -0
  208. package/dist/src/spi/retriever.d.ts +28 -0
  209. package/dist/src/spi/retriever.d.ts.map +1 -0
  210. package/dist/src/spi/retriever.js +11 -0
  211. package/dist/src/spi/retriever.js.map +1 -0
  212. package/dist/src/spi/roles-policy.d.ts +11 -0
  213. package/dist/src/spi/roles-policy.d.ts.map +1 -0
  214. package/dist/src/spi/tool.d.ts +21 -0
  215. package/dist/src/spi/tool.d.ts.map +1 -0
  216. package/dist/src/stores/factory.d.ts +363 -0
  217. package/dist/src/stores/factory.d.ts.map +1 -0
  218. package/dist/src/stores/factory.js +341 -0
  219. package/dist/src/stores/factory.js.map +1 -0
  220. package/dist/src/stores/ledger-quota.d.ts +23 -0
  221. package/dist/src/stores/ledger-quota.d.ts.map +1 -0
  222. package/dist/src/stores/ledger-quota.js +32 -0
  223. package/dist/src/stores/ledger-quota.js.map +1 -0
  224. package/dist/src/stores/lucid-governance-queries.d.ts +73 -0
  225. package/dist/src/stores/lucid-governance-queries.d.ts.map +1 -0
  226. package/dist/src/stores/lucid-governance-queries.js +510 -0
  227. package/dist/src/stores/lucid-governance-queries.js.map +1 -0
  228. package/dist/src/stores/lucid-pricing.d.ts +20 -0
  229. package/dist/src/stores/lucid-pricing.d.ts.map +1 -0
  230. package/dist/src/stores/lucid-pricing.js +67 -0
  231. package/dist/src/stores/lucid-pricing.js.map +1 -0
  232. package/dist/src/stores/lucid-schema.d.ts +37 -0
  233. package/dist/src/stores/lucid-schema.d.ts.map +1 -0
  234. package/dist/src/stores/lucid-schema.js +139 -0
  235. package/dist/src/stores/lucid-schema.js.map +1 -0
  236. package/dist/src/stores/lucid.d.ts +73 -0
  237. package/dist/src/stores/lucid.d.ts.map +1 -0
  238. package/dist/src/stores/lucid.js +400 -0
  239. package/dist/src/stores/lucid.js.map +1 -0
  240. package/dist/src/telescope/dashboard.d.ts +21 -0
  241. package/dist/src/telescope/dashboard.d.ts.map +1 -0
  242. package/dist/src/telescope/dashboard.js +140 -0
  243. package/dist/src/telescope/dashboard.js.map +1 -0
  244. package/dist/src/telescope/data-providers.d.ts +39 -0
  245. package/dist/src/telescope/data-providers.d.ts.map +1 -0
  246. package/dist/src/telescope/data-providers.js +345 -0
  247. package/dist/src/telescope/data-providers.js.map +1 -0
  248. package/dist/src/telescope/extension.d.ts +27 -0
  249. package/dist/src/telescope/extension.d.ts.map +1 -0
  250. package/dist/src/telescope/extension.js +45 -0
  251. package/dist/src/telescope/extension.js.map +1 -0
  252. package/dist/src/telescope/index.d.ts +5 -0
  253. package/dist/src/telescope/index.d.ts.map +1 -0
  254. package/dist/src/telescope/index.js +4 -0
  255. package/dist/src/telescope/index.js.map +1 -0
  256. package/dist/src/telescope/telescope-sdk.d.ts +126 -0
  257. package/dist/src/telescope/telescope-sdk.d.ts.map +1 -0
  258. package/dist/src/telescope/telescope-sdk.js +15 -0
  259. package/dist/src/telescope/telescope-sdk.js.map +1 -0
  260. package/dist/src/testing/fake-embedding-provider.d.ts +37 -0
  261. package/dist/src/testing/fake-embedding-provider.d.ts.map +1 -0
  262. package/dist/src/testing/fake-embedding-provider.js +67 -0
  263. package/dist/src/testing/fake-embedding-provider.js.map +1 -0
  264. package/dist/src/testing/fake-media.d.ts +44 -0
  265. package/dist/src/testing/fake-media.d.ts.map +1 -0
  266. package/dist/src/testing/fake-media.js +69 -0
  267. package/dist/src/testing/fake-media.js.map +1 -0
  268. package/dist/src/testing/fake-model-provider.d.ts +29 -0
  269. package/dist/src/testing/fake-model-provider.d.ts.map +1 -0
  270. package/dist/src/testing/in-memory-actor-directory.d.ts +14 -0
  271. package/dist/src/testing/in-memory-actor-directory.d.ts.map +1 -0
  272. package/dist/src/testing/in-memory-actor-directory.js +27 -0
  273. package/dist/src/testing/in-memory-actor-directory.js.map +1 -0
  274. package/dist/src/testing/in-memory-attachment-staging.d.ts +22 -0
  275. package/dist/src/testing/in-memory-attachment-staging.d.ts.map +1 -0
  276. package/dist/src/testing/in-memory-attachment-staging.js +28 -0
  277. package/dist/src/testing/in-memory-attachment-staging.js.map +1 -0
  278. package/dist/src/testing/in-memory-governance-queries.d.ts +34 -0
  279. package/dist/src/testing/in-memory-governance-queries.d.ts.map +1 -0
  280. package/dist/src/testing/in-memory-governance-queries.js +373 -0
  281. package/dist/src/testing/in-memory-governance-queries.js.map +1 -0
  282. package/dist/src/testing/in-memory-pricing.d.ts +13 -0
  283. package/dist/src/testing/in-memory-pricing.d.ts.map +1 -0
  284. package/dist/src/testing/in-memory-pricing.js +27 -0
  285. package/dist/src/testing/in-memory-pricing.js.map +1 -0
  286. package/dist/src/testing/in-memory-quota.d.ts +11 -0
  287. package/dist/src/testing/in-memory-quota.d.ts.map +1 -0
  288. package/dist/src/testing/in-memory-sink.d.ts +14 -0
  289. package/dist/src/testing/in-memory-sink.d.ts.map +1 -0
  290. package/dist/src/testing/in-memory-store.d.ts +119 -0
  291. package/dist/src/testing/in-memory-store.d.ts.map +1 -0
  292. package/dist/src/testing/in-memory-store.js +317 -0
  293. package/dist/src/testing/in-memory-store.js.map +1 -0
  294. package/dist/src/testing/index.d.ts +11 -0
  295. package/dist/src/testing/index.d.ts.map +1 -0
  296. package/dist/src/testing/index.js +11 -0
  297. package/dist/src/testing/index.js.map +1 -0
  298. package/dist/src/tool-discovery.d.ts +35 -0
  299. package/dist/src/tool-discovery.d.ts.map +1 -0
  300. package/dist/src/tool-registry.d.ts +45 -0
  301. package/dist/src/tool-registry.d.ts.map +1 -0
  302. package/dist/src/tool-retry.d.ts +56 -0
  303. package/dist/src/tool-retry.d.ts.map +1 -0
  304. package/dist/src/tool-retry.js +95 -0
  305. package/dist/src/tool-retry.js.map +1 -0
  306. package/dist/src/types.d.ts +222 -0
  307. package/dist/src/types.d.ts.map +1 -0
  308. package/dist/src/types.js +2 -0
  309. package/dist/src/types.js.map +1 -0
  310. package/dist/stubs/config/agent.stub +55 -0
  311. package/dist/stubs/database/migrations/create_agent_rag_chunks.stub +41 -0
  312. package/dist/stubs/database/migrations/create_agent_run_tracking.stub +80 -0
  313. package/dist/stubs/database/migrations/create_agent_tables.stub +113 -0
  314. package/package.json +174 -0
@@ -0,0 +1,363 @@
1
+ import type { ApplicationService } from '@adonisjs/core/types';
2
+ import type { IngestDocument } from '../rag/ingest.js';
3
+ import type { PgVectorColumns, PgVectorMetric } from '../rag/pg-vector-store.js';
4
+ import type { RedisStreamClient } from '../redis-stream-client.js';
5
+ import type { ActorDirectory } from '../spi/actor-directory.js';
6
+ import type { AgentStore } from '../spi/agent-store.js';
7
+ import type { AttachmentStagingStore } from '../spi/attachment-staging.js';
8
+ import type { EmbeddingProvider } from '../spi/embedding-provider.js';
9
+ import type { AgentGovernanceQueries } from '../spi/governance-queries.js';
10
+ import type { AgentPricingStore } from '../spi/pricing-store.js';
11
+ import type { QuotaStore } from '../spi/quota-store.js';
12
+ import type { Retriever } from '../spi/retriever.js';
13
+ import type { TokenStreamSink } from '../spi/token-stream-sink.js';
14
+ import type { LucidDatabaseLike } from './lucid.js';
15
+ /**
16
+ * Runtime context a {@link StoreFactory} thunk receives when the agent provider builds the configured
17
+ * store at boot. Carries the booted application so a driver can resolve a peer's service if it needs to.
18
+ */
19
+ export interface StoreContext {
20
+ app: ApplicationService;
21
+ }
22
+ /**
23
+ * A configured agent store: a thunk the agent provider calls at boot to build the {@link AgentStore}.
24
+ * Each factory lazily imports its peer dependency (`@adonisjs/lucid`) inside the thunk, so the driver
25
+ * is only loaded when it is actually selected — keeping that package optional.
26
+ */
27
+ export type StoreFactory = (ctx: StoreContext) => Promise<AgentStore>;
28
+ /** Options for the Lucid-backed persistent store. */
29
+ export interface LucidStoreConfig {
30
+ /** Lucid connection name to use. Defaults to the `Database` default connection. */
31
+ connection?: string;
32
+ /**
33
+ * Create the five agent tables on first use (no migration). Handy for tests/scripts; production
34
+ * should run the published migration. Default `false`.
35
+ */
36
+ autoCreateTables?: boolean;
37
+ }
38
+ /** Options for the in-memory store (single-process, non-durable). */
39
+ export type MemoryStoreConfig = Record<string, never>;
40
+ /**
41
+ * The store factory namespace used in `config/agent.ts`:
42
+ *
43
+ * ```ts
44
+ * import { defineConfig, stores } from '@adonis-agora/agent'
45
+ *
46
+ * export default defineConfig({
47
+ * store: 'lucid',
48
+ * stores: {
49
+ * memory: stores.memory(),
50
+ * lucid: stores.lucid({ connection: 'pg' }),
51
+ * },
52
+ * })
53
+ * ```
54
+ *
55
+ * Each factory returns a {@link StoreFactory} — a lazy thunk. Calling it in the config file costs
56
+ * nothing; the peer dependency is only imported when the provider builds the selected store at boot.
57
+ */
58
+ export declare const stores: {
59
+ /** In-memory store — single-process, non-durable. Handy for tests and scratch/dev apps. */
60
+ memory(_config?: MemoryStoreConfig): StoreFactory;
61
+ /** Persist threads/messages/tool-calls/usage in SQL via `@adonisjs/lucid`. */
62
+ lucid(config?: LucidStoreConfig): StoreFactory;
63
+ };
64
+ /**
65
+ * Runtime context a {@link QuotaFactory} thunk receives — the {@link StoreContext} plus the already
66
+ * built {@link AgentStore}, so a ledger-backed quota store can read the run's own token-usage ledger
67
+ * (no separate quota table). The provider builds the store first, then the quota, then passes it here.
68
+ */
69
+ export interface QuotaContext extends StoreContext {
70
+ store: AgentStore;
71
+ }
72
+ /**
73
+ * A configured quota store: a lazy thunk the agent provider calls at boot. Omitting a quota disables
74
+ * budgeting (fail-open). A plain `() => new InMemoryQuotaStore()` still satisfies this — the context
75
+ * arg is optional to consume.
76
+ */
77
+ export type QuotaFactory = (ctx: QuotaContext) => QuotaStore | Promise<QuotaStore>;
78
+ /** Options for both bundled quota stores — the daily per-actor token budget. */
79
+ export interface QuotaConfig {
80
+ /** Daily token budget per actor. */
81
+ limitTokens: number;
82
+ }
83
+ /**
84
+ * The quota factory namespace used in `config/agent.ts`, mirroring {@link stores}:
85
+ *
86
+ * ```ts
87
+ * export default defineConfig({
88
+ * store: 'lucid',
89
+ * stores: { lucid: stores.lucid() },
90
+ * quota: quotas.ledger({ limitTokens: 1_000_000 }),
91
+ * })
92
+ * ```
93
+ */
94
+ export declare const quotas: {
95
+ /** In-memory per-actor/day budget — single-process, non-durable. Handy for tests and dev apps. */
96
+ memory(config: QuotaConfig): QuotaFactory;
97
+ /**
98
+ * Enforce the budget off the persisted token-usage ledger (the selected `store`) — one source of
99
+ * truth across replicas, with no double-counting. Pairs with any {@link AgentStore}.
100
+ */
101
+ ledger(config: QuotaConfig): QuotaFactory;
102
+ };
103
+ /** Runtime context a {@link PricingFactory} thunk receives — the booted application. */
104
+ export type PricingContext = StoreContext;
105
+ /** A configured pricing store: a lazy thunk the agent provider calls at boot. */
106
+ export type PricingFactory = (ctx: PricingContext) => AgentPricingStore | Promise<AgentPricingStore>;
107
+ /** Options for the Lucid-backed pricing store. */
108
+ export interface LucidPricingConfig {
109
+ /** Lucid connection name to use. Defaults to the `Database` default connection. */
110
+ connection?: string;
111
+ }
112
+ /**
113
+ * The pricing factory namespace used in `config/agent.ts`, mirroring {@link stores}:
114
+ *
115
+ * ```ts
116
+ * export default defineConfig({
117
+ * pricingStore: pricingStores.lucid(),
118
+ * })
119
+ * ```
120
+ *
121
+ * Seed model prices once (e.g. in a command) with `seedModelPrices(store, [...])`.
122
+ */
123
+ export declare const pricingStores: {
124
+ /** In-memory pricing table — for tests and the offline demo. */
125
+ memory(): PricingFactory;
126
+ /** Persist per-model prices in SQL (the `agent_model_pricing` table) via `@adonisjs/lucid`. */
127
+ lucid(config?: LucidPricingConfig): PricingFactory;
128
+ };
129
+ /**
130
+ * Runtime context a {@link GovernanceQueriesFactory} thunk receives — the {@link StoreContext} plus the
131
+ * already-resolved {@link AgentPricingStore} (when the app configured one), so the read-model prices its
132
+ * cost rollups against the SAME live prices the loop's cost fold uses. The provider resolves pricing
133
+ * first, then the governance queries, then passes it here (mirroring how {@link QuotaContext} carries the
134
+ * built store). `pricingStore` is absent when the app configured none → the read-model reports 0 cost.
135
+ */
136
+ export interface GovernanceQueriesContext extends StoreContext {
137
+ pricingStore?: AgentPricingStore;
138
+ }
139
+ /**
140
+ * A configured governance read-model: a lazy thunk the agent provider calls at boot to build the
141
+ * {@link AgentGovernanceQueries} the optional `/agent/governance/*` read routes serve from. Each factory
142
+ * lazily imports its peer inside the thunk (like {@link stores}), so nothing loads until governance is
143
+ * actually selected.
144
+ */
145
+ export type GovernanceQueriesFactory = (ctx: GovernanceQueriesContext) => AgentGovernanceQueries | Promise<AgentGovernanceQueries>;
146
+ /** Options for the Lucid-backed governance read-model. */
147
+ export interface LucidGovernanceConfig {
148
+ /** Lucid connection name to use. Defaults to the `Database` default connection. */
149
+ connection?: string;
150
+ }
151
+ /**
152
+ * The governance-queries factory namespace used in `config/agent.ts`, mirroring {@link pricingStores}:
153
+ *
154
+ * ```ts
155
+ * export default defineConfig({
156
+ * pricingStore: pricingStores.lucid(),
157
+ * governanceQueries: governanceQueries.lucid(),
158
+ * })
159
+ * ```
160
+ *
161
+ * The Lucid read-model aggregates the same five agent tables the store writes and prices cost against
162
+ * the configured `pricingStore`; wiring it mounts the `/agent/governance/*` read routes.
163
+ */
164
+ export declare const governanceQueries: {
165
+ /** Aggregate the five agent tables in SQL via `@adonisjs/lucid`, priced against the pricing store. */
166
+ lucid(config?: LucidGovernanceConfig): GovernanceQueriesFactory;
167
+ };
168
+ /** Runtime context a {@link RetrieverFactory} thunk receives — the booted application. */
169
+ export type RetrieverContext = StoreContext;
170
+ /**
171
+ * A configured retriever: a lazy thunk the agent provider calls at boot to build the {@link Retriever}
172
+ * wired into inject-mode retrieval. Each factory imports the RAG stack inside the thunk, so nothing is
173
+ * loaded until a retriever is actually selected — mirroring {@link stores}/{@link quotas}.
174
+ */
175
+ export type RetrieverFactory = (ctx: RetrieverContext) => Retriever | Promise<Retriever>;
176
+ /** A lazy {@link EmbeddingProvider} factory, so an embedding SDK peer imports only when the config loads. */
177
+ export type EmbeddingFactory = () => EmbeddingProvider | Promise<EmbeddingProvider>;
178
+ /** Options for the in-memory embedding retriever (cosine over a Map, no infra). */
179
+ export interface MemoryRetrieverConfig {
180
+ /** The embedding provider (query + ingestion), or a lazy factory so its SDK peer loads lazily. */
181
+ embedder: EmbeddingProvider | EmbeddingFactory;
182
+ /** Documents to ingest at boot (chunk → embed → index). Omit to ingest separately at runtime. */
183
+ documents?: IngestDocument[];
184
+ /** Target max characters per chunk. Default 800. */
185
+ chunkSize?: number;
186
+ /** Characters of overlap between chunks. Default 100. */
187
+ overlap?: number;
188
+ }
189
+ /** Options for the pgvector-backed retriever (production RAG over `@adonisjs/lucid` + pgvector). */
190
+ export interface PgVectorRetrieverConfig {
191
+ /** The embedding provider (query + ingestion), or a lazy factory so its SDK peer loads lazily. */
192
+ embedder: EmbeddingProvider | EmbeddingFactory;
193
+ /**
194
+ * A structural Lucid DB handle (bring-your-own). Omit to resolve `@adonisjs/lucid`'s default `db`
195
+ * service lazily inside the thunk (optionally on `connection`), keeping the peer optional.
196
+ */
197
+ db?: LucidDatabaseLike;
198
+ /** Lucid connection name (used only when `db` is omitted). Defaults to the `Database` default. */
199
+ connection?: string;
200
+ /** Chunk table name. Default `agent_rag_chunks`. Validated against a strict identifier regex. */
201
+ table?: string;
202
+ /** Embedding width — must match the model (e.g. 1536 for text-embedding-3-small). Default 1536. */
203
+ dimension?: number;
204
+ /** Similarity metric / distance operator (`cosine` default, `l2`, `inner`). */
205
+ metric?: PgVectorMetric;
206
+ /** Override the physical column names (each validated). */
207
+ columns?: PgVectorColumns;
208
+ /**
209
+ * Provision the `vector` extension, table, and index at boot (idempotent DDL). Handy for tests/scripts;
210
+ * production should run the bundled migration instead. Default `false`.
211
+ */
212
+ ensureSchema?: boolean;
213
+ /** Documents to ingest at boot (chunk → embed → upsert). Omit to ingest separately at runtime. */
214
+ documents?: IngestDocument[];
215
+ /** Target max characters per chunk. Default 800. */
216
+ chunkSize?: number;
217
+ /** Characters of overlap between chunks. Default 100. */
218
+ overlap?: number;
219
+ }
220
+ /**
221
+ * The retriever factory namespace used in `config/agent.ts`, mirroring {@link stores}:
222
+ *
223
+ * ```ts
224
+ * export default defineConfig({
225
+ * model: () => aiSdkModel({ model: '...' }),
226
+ * retriever: retrievers.memory({ embedder: myEmbedder, documents: [...] }),
227
+ * retrievalTopK: 5,
228
+ * })
229
+ * ```
230
+ *
231
+ * Use `retrievers.pgvector({...})` for the production pgvector/Lucid store; `retrievers.memory` covers
232
+ * tests and small/embedded corpora.
233
+ */
234
+ export declare const retrievers: {
235
+ /** In-memory embedding retriever — cosine over a Map, single-process. Handy for tests and dev apps. */
236
+ memory(config: MemoryRetrieverConfig): RetrieverFactory;
237
+ /**
238
+ * Production pgvector retriever — cosine/L2/inner similarity over a `vector(N)` column via
239
+ * `@adonisjs/lucid` (raw SQL for the pgvector operators; the embedding is a `?::vector` binding). The
240
+ * Lucid peer is imported lazily inside the thunk (unless a structural `db` is passed), so it stays
241
+ * optional. Pass `ensureSchema: true` to provision the extension/table/index at boot for tests.
242
+ */
243
+ pgvector(config: PgVectorRetrieverConfig): RetrieverFactory;
244
+ };
245
+ /** Runtime context an {@link AttachmentStagingFactory} thunk receives — the booted application. */
246
+ export type AttachmentStagingContext = StoreContext;
247
+ /**
248
+ * A configured attachment-staging store: a lazy thunk the agent provider calls at boot to build the
249
+ * {@link AttachmentStagingStore} the optional `POST /agent/attachments` upload route stages through.
250
+ * Each factory imports its impl inside the thunk (like {@link stores}), so nothing is loaded until a
251
+ * staging store is actually selected.
252
+ */
253
+ export type AttachmentStagingFactory = (ctx: AttachmentStagingContext) => AttachmentStagingStore | Promise<AttachmentStagingStore>;
254
+ /**
255
+ * The attachment-staging factory namespace used in `config/agent.ts`, mirroring {@link stores}:
256
+ *
257
+ * ```ts
258
+ * export default defineConfig({
259
+ * model: () => aiSdkModel({ model: '...' }),
260
+ * attachmentStaging: attachmentStores.memory(),
261
+ * })
262
+ * ```
263
+ *
264
+ * A real deployment binds its own staging store (presigning against S3/GCS or wrapping the host's
265
+ * media pipeline) by passing an instance; `attachmentStores.memory` covers tests and the offline demo.
266
+ */
267
+ export declare const attachmentStores: {
268
+ /**
269
+ * In-memory staging — encodes the uploaded bytes into a `data:` URL the model provider fetches
270
+ * inline (no external object store, no presigning). Single-process; handy for tests and dev apps.
271
+ */
272
+ memory(): AttachmentStagingFactory;
273
+ };
274
+ /**
275
+ * A configured {@link TokenStreamSink}: a lazy thunk the agent provider calls at boot to build the live
276
+ * token transport (the "data plane"). Each factory imports its impl — and, for Redis, its optional
277
+ * driver — inside the thunk, so nothing loads until the sink is actually selected. Assignable to the
278
+ * `sink` field's `SinkFactory`.
279
+ */
280
+ export type TokenSinkFactory = () => TokenStreamSink | Promise<TokenStreamSink>;
281
+ /** Options for the Redis multi-replica token-stream sink. */
282
+ export interface RedisTokenSinkConfig {
283
+ /** `@adonisjs/redis` connection name. Omit for the default connection. */
284
+ connection?: string;
285
+ /** Key/channel namespace. Defaults to `agent:stream`. */
286
+ keyPrefix?: string;
287
+ /**
288
+ * Bring-your-own {@link RedisStreamClient} adapter (over `ioredis`, `node-redis`, ...). When set, the
289
+ * `@adonisjs/redis` peer is NOT imported — the factory uses this client directly. Handy for tests and
290
+ * non-Adonis Redis drivers.
291
+ */
292
+ client?: RedisStreamClient;
293
+ }
294
+ /**
295
+ * The token-sink factory namespace used in `config/agent.ts`, mirroring {@link stores}. Also exported as
296
+ * `streamTransports` (an alias — pick whichever name reads better):
297
+ *
298
+ * ```ts
299
+ * import { defineConfig, tokenSinks } from '@adonis-agora/agent'
300
+ *
301
+ * export default defineConfig({
302
+ * model: () => aiSdkModel({ model: '...' }),
303
+ * sink: tokenSinks.redis({ connection: 'main' }), // multi-replica; any pod serves any run's SSE
304
+ * })
305
+ * ```
306
+ *
307
+ * Omitting `sink` entirely keeps the in-process sink (single replica); `tokenSinks.memory()` selects it
308
+ * explicitly. `tokenSinks.redis()` fans a run's tokens across replicas over Redis pub/sub + a replayable
309
+ * list, keeping the SSE envelope byte-identical. The `@adonisjs/redis` peer is imported ONLY inside the
310
+ * `redis` thunk, so it stays fully optional.
311
+ */
312
+ export declare const tokenSinks: {
313
+ /** The in-process sink — per-run in-memory buffers, single replica. The default when `sink` is omitted. */
314
+ memory(): TokenSinkFactory;
315
+ /**
316
+ * The Redis multi-replica sink: any pod can serve any run's SSE stream. Builds a
317
+ * {@link RedisStreamClient} over `@adonisjs/redis` (imported lazily here), or uses `config.client` when
318
+ * provided. Requires `@adonisjs/redis` installed + configured (`config/redis.ts`) unless a `client` is
319
+ * passed.
320
+ */
321
+ redis(config?: RedisTokenSinkConfig): TokenSinkFactory;
322
+ };
323
+ /** Alias of {@link tokenSinks}. */
324
+ export declare const streamTransports: {
325
+ /** The in-process sink — per-run in-memory buffers, single replica. The default when `sink` is omitted. */
326
+ memory(): TokenSinkFactory;
327
+ /**
328
+ * The Redis multi-replica sink: any pod can serve any run's SSE stream. Builds a
329
+ * {@link RedisStreamClient} over `@adonisjs/redis` (imported lazily here), or uses `config.client` when
330
+ * provided. Requires `@adonisjs/redis` installed + configured (`config/redis.ts`) unless a `client` is
331
+ * passed.
332
+ */
333
+ redis(config?: RedisTokenSinkConfig): TokenSinkFactory;
334
+ };
335
+ /**
336
+ * A configured {@link ActorDirectory}: a lazy thunk the agent provider calls at boot to build the
337
+ * read-side `actorRef → label` lookup governance/dashboard surfaces resolve display names through. Each
338
+ * factory imports its impl inside the thunk (like {@link stores}).
339
+ */
340
+ export type ActorDirectoryFactory = (ctx: StoreContext) => ActorDirectory | Promise<ActorDirectory>;
341
+ /** Options for the in-memory actor directory. */
342
+ export interface MemoryActorDirectoryConfig {
343
+ /** Seed `actorRef → display label` mappings. */
344
+ labels?: Record<string, string>;
345
+ }
346
+ /**
347
+ * The actor-directory factory namespace used in `config/agent.ts`, mirroring {@link stores}:
348
+ *
349
+ * ```ts
350
+ * export default defineConfig({
351
+ * actorDirectory: actorDirectories.memory({ labels: { u_1: 'Ada Lovelace' } }),
352
+ * })
353
+ * ```
354
+ *
355
+ * Omit `actorDirectory` → governance surfaces render raw opaque refs. A real deployment binds its own
356
+ * directory over the host's user table by passing an instance; `actorDirectories.memory` covers tests,
357
+ * the offline demo, and small fixed label tables.
358
+ */
359
+ export declare const actorDirectories: {
360
+ /** In-memory `actorRef → label` map — single-process. Handy for tests and dev apps. */
361
+ memory(config?: MemoryActorDirectoryConfig): ActorDirectoryFactory;
362
+ };
363
+ //# sourceMappingURL=factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/stores/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,2BAA2B,C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