@mastra/code-sdk 0.0.0-agent-tags-alpha-20261125185303

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 (407) hide show
  1. package/LICENSE.md +32 -0
  2. package/README.md +284 -0
  3. package/dist/acp/agent.d.ts +48 -0
  4. package/dist/acp/agent.js +414 -0
  5. package/dist/acp/errors.d.ts +3 -0
  6. package/dist/acp/errors.js +11 -0
  7. package/dist/acp/event-mapper.d.ts +28 -0
  8. package/dist/acp/event-mapper.js +274 -0
  9. package/dist/acp/index.d.ts +9 -0
  10. package/dist/acp/index.js +21 -0
  11. package/dist/acp/runtime.d.ts +5 -0
  12. package/dist/acp/runtime.js +91 -0
  13. package/dist/acp/server.d.ts +4 -0
  14. package/dist/acp/server.js +35 -0
  15. package/dist/acp/skills.d.ts +6 -0
  16. package/dist/acp/skills.js +30 -0
  17. package/dist/acp.d.ts +2 -0
  18. package/dist/acp.js +1 -0
  19. package/dist/agent-connections/messaging-processor.d.ts +17 -0
  20. package/dist/agent-connections/messaging-processor.js +131 -0
  21. package/dist/agent-connections/ownership.d.ts +24 -0
  22. package/dist/agent-connections/ownership.js +96 -0
  23. package/dist/agent-connections/registry.d.ts +20 -0
  24. package/dist/agent-connections/registry.js +167 -0
  25. package/dist/agent-connections/session-advertisement.d.ts +27 -0
  26. package/dist/agent-connections/session-advertisement.js +86 -0
  27. package/dist/agent-connections/signal-provider.d.ts +141 -0
  28. package/dist/agent-connections/signal-provider.js +35 -0
  29. package/dist/agent-connections/state-processor.d.ts +23 -0
  30. package/dist/agent-connections/state-processor.js +270 -0
  31. package/dist/agent-connections/thread-state.d.ts +41 -0
  32. package/dist/agent-connections/thread-state.js +157 -0
  33. package/dist/agent-connections/tools.d.ts +133 -0
  34. package/dist/agent-connections/tools.js +616 -0
  35. package/dist/agent-connections/types.d.ts +99 -0
  36. package/dist/agent-connections/types.js +4 -0
  37. package/dist/agent-connections/untrusted-text.d.ts +5 -0
  38. package/dist/agent-connections/untrusted-text.js +19 -0
  39. package/dist/agents/background-completion-events.d.ts +16 -0
  40. package/dist/agents/background-completion-events.js +16 -0
  41. package/dist/agents/background-completion.d.ts +22 -0
  42. package/dist/agents/background-completion.js +73 -0
  43. package/dist/agents/context-audit.d.ts +84 -0
  44. package/dist/agents/context-audit.js +115 -0
  45. package/dist/agents/credential-resolver.d.ts +74 -0
  46. package/dist/agents/credential-resolver.js +142 -0
  47. package/dist/agents/custom-provider-source.d.ts +35 -0
  48. package/dist/agents/custom-provider-source.js +22 -0
  49. package/dist/agents/fastembed-subprocess.d.ts +52 -0
  50. package/dist/agents/fastembed-subprocess.js +282 -0
  51. package/dist/agents/instructions.d.ts +42 -0
  52. package/dist/agents/instructions.js +69 -0
  53. package/dist/agents/mastracode-gateway.d.ts +85 -0
  54. package/dist/agents/mastracode-gateway.js +500 -0
  55. package/dist/agents/memory.d.ts +36 -0
  56. package/dist/agents/memory.js +248 -0
  57. package/dist/agents/model.d.ts +158 -0
  58. package/dist/agents/model.js +382 -0
  59. package/dist/agents/modes/build.d.ts +12 -0
  60. package/dist/agents/modes/build.js +33 -0
  61. package/dist/agents/modes/explore.d.ts +10 -0
  62. package/dist/agents/modes/explore.js +25 -0
  63. package/dist/agents/modes/plan.d.ts +8 -0
  64. package/dist/agents/modes/plan.js +43 -0
  65. package/dist/agents/prompts/agent-instructions.d.ts +122 -0
  66. package/dist/agents/prompts/agent-instructions.js +617 -0
  67. package/dist/agents/prompts/build.d.ts +12 -0
  68. package/dist/agents/prompts/build.js +73 -0
  69. package/dist/agents/prompts/fast.d.ts +5 -0
  70. package/dist/agents/prompts/fast.js +23 -0
  71. package/dist/agents/prompts/index.d.ts +61 -0
  72. package/dist/agents/prompts/index.js +141 -0
  73. package/dist/agents/prompts/model.d.ts +5 -0
  74. package/dist/agents/prompts/model.js +20 -0
  75. package/dist/agents/prompts/plan.d.ts +11 -0
  76. package/dist/agents/prompts/plan.js +132 -0
  77. package/dist/agents/prompts/tool-guidance.d.ts +18 -0
  78. package/dist/agents/prompts/tool-guidance.js +158 -0
  79. package/dist/agents/sandbox-filesystem.d.ts +232 -0
  80. package/dist/agents/sandbox-filesystem.js +851 -0
  81. package/dist/agents/subagents/execute.d.ts +3 -0
  82. package/dist/agents/subagents/execute.js +24 -0
  83. package/dist/agents/subagents/explore.d.ts +3 -0
  84. package/dist/agents/subagents/explore.js +15 -0
  85. package/dist/agents/subagents/index.d.ts +6 -0
  86. package/dist/agents/subagents/index.js +15 -0
  87. package/dist/agents/subagents/plan.d.ts +3 -0
  88. package/dist/agents/subagents/plan.js +15 -0
  89. package/dist/agents/thread-caveman-state.d.ts +17 -0
  90. package/dist/agents/thread-caveman-state.js +104 -0
  91. package/dist/agents/tool-availability.d.ts +17 -0
  92. package/dist/agents/tool-availability.js +134 -0
  93. package/dist/agents/tools.d.ts +37 -0
  94. package/dist/agents/tools.js +154 -0
  95. package/dist/agents/workflow-builder-agent.d.ts +2 -0
  96. package/dist/agents/workflow-builder-agent.js +79 -0
  97. package/dist/agents/workspace.d.ts +35 -0
  98. package/dist/agents/workspace.js +207 -0
  99. package/dist/analytics.d.ts +18 -0
  100. package/dist/analytics.js +159 -0
  101. package/dist/auth/account-rotation-processor.d.ts +210 -0
  102. package/dist/auth/account-rotation-processor.js +662 -0
  103. package/dist/auth/account-routing-context.d.ts +17 -0
  104. package/dist/auth/account-routing-context.js +38 -0
  105. package/dist/auth/authorization-input.d.ts +16 -0
  106. package/dist/auth/authorization-input.js +39 -0
  107. package/dist/auth/device-code.d.ts +93 -0
  108. package/dist/auth/device-code.js +126 -0
  109. package/dist/auth/index.d.ts +13 -0
  110. package/dist/auth/index.js +9 -0
  111. package/dist/auth/pkce.d.ts +13 -0
  112. package/dist/auth/pkce.js +29 -0
  113. package/dist/auth/provider-auth-error.d.ts +24 -0
  114. package/dist/auth/provider-auth-error.js +44 -0
  115. package/dist/auth/providers/anthropic.d.ts +40 -0
  116. package/dist/auth/providers/anthropic.js +117 -0
  117. package/dist/auth/providers/github-copilot.d.ts +154 -0
  118. package/dist/auth/providers/github-copilot.js +359 -0
  119. package/dist/auth/providers/kimi-coding.d.ts +38 -0
  120. package/dist/auth/providers/kimi-coding.js +225 -0
  121. package/dist/auth/providers/openai-codex.d.ts +141 -0
  122. package/dist/auth/providers/openai-codex.js +531 -0
  123. package/dist/auth/providers/xai.d.ts +64 -0
  124. package/dist/auth/providers/xai.js +223 -0
  125. package/dist/auth/storage.d.ts +222 -0
  126. package/dist/auth/storage.js +805 -0
  127. package/dist/auth/types.d.ts +164 -0
  128. package/dist/auth/types.js +1 -0
  129. package/dist/clipboard/index.d.ts +26 -0
  130. package/dist/clipboard/index.js +224 -0
  131. package/dist/constants.d.ts +29 -0
  132. package/dist/constants.js +34 -0
  133. package/dist/error-classification.d.ts +10 -0
  134. package/dist/error-classification.js +19 -0
  135. package/dist/evals/context-builder.d.ts +41 -0
  136. package/dist/evals/context-builder.js +156 -0
  137. package/dist/evals/index.d.ts +4 -0
  138. package/dist/evals/index.js +5 -0
  139. package/dist/evals/scorers/classify-command.d.ts +30 -0
  140. package/dist/evals/scorers/classify-command.js +61 -0
  141. package/dist/evals/scorers/efficiency.d.ts +44 -0
  142. package/dist/evals/scorers/efficiency.js +256 -0
  143. package/dist/evals/scorers/extract-tools.d.ts +25 -0
  144. package/dist/evals/scorers/extract-tools.js +57 -0
  145. package/dist/evals/scorers/index.d.ts +3 -0
  146. package/dist/evals/scorers/index.js +3 -0
  147. package/dist/evals/scorers/outcome.d.ts +49 -0
  148. package/dist/evals/scorers/outcome.js +360 -0
  149. package/dist/experimental-agent.d.ts +19 -0
  150. package/dist/experimental-agent.js +45 -0
  151. package/dist/factory/client.d.ts +44 -0
  152. package/dist/factory/client.js +110 -0
  153. package/dist/factory/remote-controller.d.ts +34 -0
  154. package/dist/factory/remote-controller.js +40 -0
  155. package/dist/factory/remote-session.d.ts +210 -0
  156. package/dist/factory/remote-session.js +415 -0
  157. package/dist/goal-manager.d.ts +114 -0
  158. package/dist/goal-manager.js +351 -0
  159. package/dist/goal-signal.d.ts +14 -0
  160. package/dist/goal-signal.js +14 -0
  161. package/dist/headless/cli.d.ts +55 -0
  162. package/dist/headless/cli.js +261 -0
  163. package/dist/headless/flags.d.ts +33 -0
  164. package/dist/headless/flags.js +207 -0
  165. package/dist/headless/format.d.ts +41 -0
  166. package/dist/headless/format.js +94 -0
  167. package/dist/headless/index.d.ts +25 -0
  168. package/dist/headless/index.js +6 -0
  169. package/dist/headless/policy.d.ts +17 -0
  170. package/dist/headless/policy.js +39 -0
  171. package/dist/headless/run-mc.d.ts +7 -0
  172. package/dist/headless/run-mc.js +438 -0
  173. package/dist/headless/types.d.ts +175 -0
  174. package/dist/headless/types.js +16 -0
  175. package/dist/hooks/config.d.ts +11 -0
  176. package/dist/hooks/config.js +77 -0
  177. package/dist/hooks/executor.d.ts +13 -0
  178. package/dist/hooks/executor.js +128 -0
  179. package/dist/hooks/index.d.ts +6 -0
  180. package/dist/hooks/index.js +5 -0
  181. package/dist/hooks/manager.d.ts +75 -0
  182. package/dist/hooks/manager.js +289 -0
  183. package/dist/hooks/types.d.ts +180 -0
  184. package/dist/hooks/types.js +5 -0
  185. package/dist/index.d.ts +537 -0
  186. package/dist/index.js +1399 -0
  187. package/dist/ipc/ipc-reporter.d.ts +14 -0
  188. package/dist/ipc/ipc-reporter.js +18 -0
  189. package/dist/knowledge-inspector.d.ts +139 -0
  190. package/dist/knowledge-inspector.js +533 -0
  191. package/dist/knowledge-scope-id.d.ts +7 -0
  192. package/dist/knowledge-scope-id.js +10 -0
  193. package/dist/knowledge-scope.d.ts +41 -0
  194. package/dist/knowledge-scope.js +85 -0
  195. package/dist/lsp/client.d.ts +56 -0
  196. package/dist/lsp/client.js +248 -0
  197. package/dist/lsp/index.d.ts +4 -0
  198. package/dist/lsp/index.js +4 -0
  199. package/dist/lsp/language.d.ts +9 -0
  200. package/dist/lsp/language.js +41 -0
  201. package/dist/lsp/manager.d.ts +34 -0
  202. package/dist/lsp/manager.js +79 -0
  203. package/dist/lsp/server.d.ts +27 -0
  204. package/dist/lsp/server.js +158 -0
  205. package/dist/lsp/workspace.d.ts +9 -0
  206. package/dist/lsp/workspace.js +52 -0
  207. package/dist/mcp/config.d.ts +77 -0
  208. package/dist/mcp/config.js +313 -0
  209. package/dist/mcp/index.d.ts +6 -0
  210. package/dist/mcp/index.js +3 -0
  211. package/dist/mcp/manager.d.ts +104 -0
  212. package/dist/mcp/manager.js +693 -0
  213. package/dist/mcp/state.d.ts +35 -0
  214. package/dist/mcp/state.js +94 -0
  215. package/dist/mcp/types.d.ts +139 -0
  216. package/dist/mcp/types.js +1 -0
  217. package/dist/onboarding/custom-packs.d.ts +7 -0
  218. package/dist/onboarding/custom-packs.js +17 -0
  219. package/dist/onboarding/custom-providers.d.ts +4 -0
  220. package/dist/onboarding/custom-providers.js +27 -0
  221. package/dist/onboarding/index.d.ts +5 -0
  222. package/dist/onboarding/index.js +3 -0
  223. package/dist/onboarding/om-settings.d.ts +47 -0
  224. package/dist/onboarding/om-settings.js +80 -0
  225. package/dist/onboarding/pack-activation.d.ts +43 -0
  226. package/dist/onboarding/pack-activation.js +105 -0
  227. package/dist/onboarding/packs.d.ts +106 -0
  228. package/dist/onboarding/packs.js +283 -0
  229. package/dist/onboarding/settings.d.ts +563 -0
  230. package/dist/onboarding/settings.js +1110 -0
  231. package/dist/permissions.d.ts +55 -0
  232. package/dist/permissions.js +139 -0
  233. package/dist/platform/index.d.ts +74 -0
  234. package/dist/platform/index.js +199 -0
  235. package/dist/plugin.d.ts +156 -0
  236. package/dist/plugin.js +27 -0
  237. package/dist/plugins/dependencies.d.ts +9 -0
  238. package/dist/plugins/dependencies.js +84 -0
  239. package/dist/plugins/install.d.ts +21 -0
  240. package/dist/plugins/install.js +187 -0
  241. package/dist/plugins/loader.d.ts +25 -0
  242. package/dist/plugins/loader.js +264 -0
  243. package/dist/plugins/manager.d.ts +115 -0
  244. package/dist/plugins/manager.js +507 -0
  245. package/dist/plugins/manifest.d.ts +14 -0
  246. package/dist/plugins/manifest.js +47 -0
  247. package/dist/plugins/package-link.d.ts +3 -0
  248. package/dist/plugins/package-link.js +58 -0
  249. package/dist/plugins/paths.d.ts +10 -0
  250. package/dist/plugins/paths.js +22 -0
  251. package/dist/plugins/registry.d.ts +8 -0
  252. package/dist/plugins/registry.js +109 -0
  253. package/dist/plugins/scaffold.d.ts +10 -0
  254. package/dist/plugins/scaffold.js +115 -0
  255. package/dist/plugins/signal-lane.d.ts +59 -0
  256. package/dist/plugins/signal-lane.js +163 -0
  257. package/dist/plugins/types.d.ts +95 -0
  258. package/dist/plugins/types.js +1 -0
  259. package/dist/process-memory-diagnostics.d.ts +136 -0
  260. package/dist/process-memory-diagnostics.js +497 -0
  261. package/dist/processors/plan-rejection-abort.d.ts +16 -0
  262. package/dist/processors/plan-rejection-abort.js +62 -0
  263. package/dist/providers/amazon-bedrock-gateway.d.ts +47 -0
  264. package/dist/providers/amazon-bedrock-gateway.js +142 -0
  265. package/dist/providers/amazon-bedrock.d.ts +28 -0
  266. package/dist/providers/amazon-bedrock.js +99 -0
  267. package/dist/providers/anthropic-prompt-cache.d.ts +19 -0
  268. package/dist/providers/anthropic-prompt-cache.js +8 -0
  269. package/dist/providers/anthropic-thinking.d.ts +5 -0
  270. package/dist/providers/anthropic-thinking.js +22 -0
  271. package/dist/providers/claude-max.d.ts +67 -0
  272. package/dist/providers/claude-max.js +232 -0
  273. package/dist/providers/github-copilot-gateway.d.ts +35 -0
  274. package/dist/providers/github-copilot-gateway.js +58 -0
  275. package/dist/providers/github-copilot.d.ts +60 -0
  276. package/dist/providers/github-copilot.js +320 -0
  277. package/dist/providers/google-thinking.d.ts +31 -0
  278. package/dist/providers/google-thinking.js +64 -0
  279. package/dist/providers/google-vertex-gateway.d.ts +23 -0
  280. package/dist/providers/google-vertex-gateway.js +49 -0
  281. package/dist/providers/google-vertex.d.ts +6 -0
  282. package/dist/providers/google-vertex.js +51 -0
  283. package/dist/providers/kimi-coding.d.ts +14 -0
  284. package/dist/providers/kimi-coding.js +80 -0
  285. package/dist/providers/model-ids.d.ts +53 -0
  286. package/dist/providers/model-ids.js +132 -0
  287. package/dist/providers/openai-codex.d.ts +114 -0
  288. package/dist/providers/openai-codex.js +427 -0
  289. package/dist/providers/provider-thinking.d.ts +23 -0
  290. package/dist/providers/provider-thinking.js +61 -0
  291. package/dist/providers/thinking-request.d.ts +14 -0
  292. package/dist/providers/thinking-request.js +87 -0
  293. package/dist/providers/xai.d.ts +33 -0
  294. package/dist/providers/xai.js +72 -0
  295. package/dist/schedules/index.d.ts +10 -0
  296. package/dist/schedules/index.js +6 -0
  297. package/dist/schedules/interval.d.ts +49 -0
  298. package/dist/schedules/interval.js +212 -0
  299. package/dist/schedules/prompt.d.ts +36 -0
  300. package/dist/schedules/prompt.js +36 -0
  301. package/dist/schedules/run-script.d.ts +8 -0
  302. package/dist/schedules/run-script.js +80 -0
  303. package/dist/schedules/scheduler.d.ts +101 -0
  304. package/dist/schedules/scheduler.js +167 -0
  305. package/dist/schedules/tools.d.ts +57 -0
  306. package/dist/schedules/tools.js +217 -0
  307. package/dist/schema.d.ts +499 -0
  308. package/dist/schema.js +131 -0
  309. package/dist/theme-palette.d.ts +17 -0
  310. package/dist/theme-palette.js +18 -0
  311. package/dist/thinking-catalog.d.ts +4 -0
  312. package/dist/thinking-catalog.js +13 -0
  313. package/dist/thinking.d.ts +37 -0
  314. package/dist/thinking.js +134 -0
  315. package/dist/tool-names.d.ts +77 -0
  316. package/dist/tool-names.js +53 -0
  317. package/dist/tools/index.d.ts +6 -0
  318. package/dist/tools/index.js +3 -0
  319. package/dist/tools/request-sandbox-access.d.ts +6 -0
  320. package/dist/tools/request-sandbox-access.js +80 -0
  321. package/dist/tools/utils.d.ts +20 -0
  322. package/dist/tools/utils.js +31 -0
  323. package/dist/tools/web-search.d.ts +116 -0
  324. package/dist/tools/web-search.js +158 -0
  325. package/dist/tools/workflows/create-workflow.d.ts +7 -0
  326. package/dist/tools/workflows/create-workflow.js +82 -0
  327. package/dist/tools/workflows/delete-workflow.d.ts +7 -0
  328. package/dist/tools/workflows/delete-workflow.js +18 -0
  329. package/dist/tools/workflows/ephemeral-memory.d.ts +28 -0
  330. package/dist/tools/workflows/ephemeral-memory.js +41 -0
  331. package/dist/tools/workflows/extract-json-schema.d.ts +12 -0
  332. package/dist/tools/workflows/extract-json-schema.js +19 -0
  333. package/dist/tools/workflows/get-workflow.d.ts +11 -0
  334. package/dist/tools/workflows/get-workflow.js +31 -0
  335. package/dist/tools/workflows/list-available-agents.d.ts +8 -0
  336. package/dist/tools/workflows/list-available-agents.js +29 -0
  337. package/dist/tools/workflows/list-available-classifiers.d.ts +19 -0
  338. package/dist/tools/workflows/list-available-classifiers.js +53 -0
  339. package/dist/tools/workflows/list-available-tools.d.ts +9 -0
  340. package/dist/tools/workflows/list-available-tools.js +37 -0
  341. package/dist/tools/workflows/list-available-workflows.d.ts +9 -0
  342. package/dist/tools/workflows/list-available-workflows.js +29 -0
  343. package/dist/tools/workflows/list-workflows.d.ts +9 -0
  344. package/dist/tools/workflows/list-workflows.js +30 -0
  345. package/dist/tools/workflows/run-workflow.d.ts +9 -0
  346. package/dist/tools/workflows/run-workflow.js +49 -0
  347. package/dist/tools/workflows/save-workflow.d.ts +1125 -0
  348. package/dist/tools/workflows/save-workflow.js +25 -0
  349. package/dist/tools/workflows/tool-ids.d.ts +16 -0
  350. package/dist/tools/workflows/tool-ids.js +17 -0
  351. package/dist/utils/binaries.d.ts +7 -0
  352. package/dist/utils/binaries.js +97 -0
  353. package/dist/utils/debug-log.d.ts +12 -0
  354. package/dist/utils/debug-log.js +56 -0
  355. package/dist/utils/discarding-scores-storage.d.ts +33 -0
  356. package/dist/utils/discarding-scores-storage.js +51 -0
  357. package/dist/utils/errors.d.ts +36 -0
  358. package/dist/utils/errors.js +215 -0
  359. package/dist/utils/gateway-sync.d.ts +26 -0
  360. package/dist/utils/gateway-sync.js +58 -0
  361. package/dist/utils/local-observability.d.ts +19 -0
  362. package/dist/utils/local-observability.js +54 -0
  363. package/dist/utils/maintenance-lock.d.ts +42 -0
  364. package/dist/utils/maintenance-lock.js +196 -0
  365. package/dist/utils/notification-dispatch.d.ts +74 -0
  366. package/dist/utils/notification-dispatch.js +128 -0
  367. package/dist/utils/open-url.d.ts +10 -0
  368. package/dist/utils/open-url.js +27 -0
  369. package/dist/utils/path-security.d.ts +2 -0
  370. package/dist/utils/path-security.js +7 -0
  371. package/dist/utils/plan-diff.d.ts +25 -0
  372. package/dist/utils/plan-diff.js +59 -0
  373. package/dist/utils/plans.d.ts +61 -0
  374. package/dist/utils/plans.js +120 -0
  375. package/dist/utils/project.d.ts +160 -0
  376. package/dist/utils/project.js +361 -0
  377. package/dist/utils/prune-cli.d.ts +24 -0
  378. package/dist/utils/prune-cli.js +124 -0
  379. package/dist/utils/signals-pubsub.d.ts +103 -0
  380. package/dist/utils/signals-pubsub.js +409 -0
  381. package/dist/utils/slash-command-loader.d.ts +52 -0
  382. package/dist/utils/slash-command-loader.js +139 -0
  383. package/dist/utils/slash-command-processor.d.ts +14 -0
  384. package/dist/utils/slash-command-processor.js +106 -0
  385. package/dist/utils/stdin-pipe.d.ts +33 -0
  386. package/dist/utils/stdin-pipe.js +93 -0
  387. package/dist/utils/storage-factory.d.ts +50 -0
  388. package/dist/utils/storage-factory.js +118 -0
  389. package/dist/utils/storage-maintenance.d.ts +121 -0
  390. package/dist/utils/storage-maintenance.js +352 -0
  391. package/dist/utils/thread-lock.d.ts +26 -0
  392. package/dist/utils/thread-lock.js +109 -0
  393. package/dist/utils/token-estimator.d.ts +3 -0
  394. package/dist/utils/token-estimator.js +19 -0
  395. package/dist/utils/update-check.d.ts +151 -0
  396. package/dist/utils/update-check.js +430 -0
  397. package/dist/utils/wake-session.d.ts +44 -0
  398. package/dist/utils/wake-session.js +83 -0
  399. package/dist/voice/stt-registry.d.ts +67 -0
  400. package/dist/voice/stt-registry.js +144 -0
  401. package/dist/voice/transcribe.d.ts +10 -0
  402. package/dist/voice/transcribe.js +75 -0
  403. package/dist/workflows/register-primitives.d.ts +52 -0
  404. package/dist/workflows/register-primitives.js +40 -0
  405. package/dist/workflows/service.d.ts +64 -0
  406. package/dist/workflows/service.js +50 -0
  407. package/package.json +117 -0
@@ -0,0 +1,99 @@
1
+ export declare const AGENT_CONNECTIONS_STATE_ID = "agent-connections";
2
+ export declare const AGENT_CONNECTIONS_STATE_TYPE = "agent_connection";
3
+ export type AgentPeerRelationship = 'none' | 'saved';
4
+ export type AgentPeerPresence = 'advertised' | 'absent';
5
+ export type AgentPeerDisplayStatus = 'discovered' | 'connected' | 'saved';
6
+ export type AgentSignalPriority = 'low' | 'medium' | 'high' | 'urgent';
7
+ export type AgentSignalRoutingAction = 'wake' | 'deliver' | 'persist' | 'discard' | 'blocked';
8
+ export interface AgentPeerIdentity {
9
+ /** Stable model-facing id used by tools. Discovery ids must match the canonical routing tuple id. */
10
+ id?: string;
11
+ /** Target agent id. Defaults to the current code agent when omitted by discovery. */
12
+ agentId?: string;
13
+ resourceId: string;
14
+ threadId: string;
15
+ label?: string;
16
+ title?: string;
17
+ mode?: string;
18
+ pid?: number;
19
+ lastSeenAt?: number;
20
+ }
21
+ export interface AgentPeerView {
22
+ id: string;
23
+ agentId: string;
24
+ resourceId: string;
25
+ threadId: string;
26
+ label?: string;
27
+ title?: string;
28
+ mode?: string;
29
+ relationship: AgentPeerRelationship;
30
+ presence: AgentPeerPresence;
31
+ displayStatus: AgentPeerDisplayStatus;
32
+ canAttemptSend: boolean;
33
+ pid?: number;
34
+ connectedAt?: number;
35
+ lastSeenAt?: number;
36
+ }
37
+ export interface ConnectedAgentPeer extends AgentPeerIdentity {
38
+ id: string;
39
+ connectedAt: number;
40
+ lastSeenAt: number;
41
+ }
42
+ export interface SentAgentSignal {
43
+ messageId: string;
44
+ fingerprint: string;
45
+ targetId: string;
46
+ priority: AgentSignalPriority;
47
+ expectsReply: boolean;
48
+ replyTo?: string;
49
+ returnPeerId: string;
50
+ routingAction?: AgentSignalRoutingAction;
51
+ runId?: string;
52
+ sentAt: number;
53
+ }
54
+ export interface AgentConnectionsState {
55
+ peers: ConnectedAgentPeer[];
56
+ sentSignals?: SentAgentSignal[];
57
+ }
58
+ export interface AgentConnectionDeltaOp {
59
+ op: 'connect' | 'disconnect' | 'presence-change' | 'update';
60
+ id: string;
61
+ peer?: AgentPeerView;
62
+ presence?: AgentPeerPresence;
63
+ displayStatus?: AgentPeerDisplayStatus;
64
+ }
65
+ export interface AgentConnectionListResult {
66
+ content: string;
67
+ peers: AgentPeerView[];
68
+ savedCount: number;
69
+ isError?: boolean;
70
+ }
71
+ export interface AgentConnectResult {
72
+ content: string;
73
+ connected: ConnectedAgentPeer[];
74
+ changed: AgentConnectionDeltaOp[];
75
+ isError?: boolean;
76
+ }
77
+ export interface AgentDisconnectResult {
78
+ content: string;
79
+ connected: ConnectedAgentPeer[];
80
+ disconnectedIds: string[];
81
+ alreadyDisconnectedIds: string[];
82
+ changed: AgentConnectionDeltaOp[];
83
+ isError?: boolean;
84
+ }
85
+ export interface AgentSignalSendResult {
86
+ content: string;
87
+ target?: AgentPeerView;
88
+ priority?: AgentSignalPriority;
89
+ expectsReply?: boolean;
90
+ messageId?: string;
91
+ replyTo?: string;
92
+ returnPeerId?: string;
93
+ routingAction?: AgentSignalRoutingAction;
94
+ replyOutcome?: 'peer-unavailable';
95
+ runId?: string;
96
+ duplicate?: boolean;
97
+ isError?: boolean;
98
+ }
99
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,4 @@
1
+ // src/agent-connections/types.ts
2
+ const AGENT_CONNECTIONS_STATE_ID = "agent-connections";
3
+ const AGENT_CONNECTIONS_STATE_TYPE = "agent_connection";
4
+ export { AGENT_CONNECTIONS_STATE_ID, AGENT_CONNECTIONS_STATE_TYPE };
@@ -0,0 +1,5 @@
1
+ export declare const UNTRUSTED_PEER_ID_MAX_LENGTH = 512;
2
+ export declare const UNTRUSTED_PEER_METADATA_MAX_LENGTH = 256;
3
+ export declare function boundUntrustedText(value: string | undefined, maxLength: number): string | undefined;
4
+ export declare function serializeUntrustedData(value: unknown): string;
5
+ //# sourceMappingURL=untrusted-text.d.ts.map
@@ -0,0 +1,19 @@
1
+ // src/agent-connections/untrusted-text.ts
2
+ const UNTRUSTED_PEER_ID_MAX_LENGTH = 512;
3
+ const UNTRUSTED_PEER_METADATA_MAX_LENGTH = 256;
4
+ function boundUntrustedText(value, maxLength) {
5
+ if (value === void 0 || value.length <= maxLength) return value;
6
+ return `${value.slice(0, maxLength)}…`;
7
+ }
8
+ function serializeUntrustedData(value) {
9
+ return JSON.stringify(value).replace(/[<>&\u2028\u2029]/g, (character) => {
10
+ switch (character) {
11
+ case "<": return "\\u003c";
12
+ case ">": return "\\u003e";
13
+ case "&": return "\\u0026";
14
+ case "\u2028": return "\\u2028";
15
+ default: return "\\u2029";
16
+ }
17
+ });
18
+ }
19
+ export { UNTRUSTED_PEER_ID_MAX_LENGTH, UNTRUSTED_PEER_METADATA_MAX_LENGTH, boundUntrustedText, serializeUntrustedData };
@@ -0,0 +1,16 @@
1
+ export interface BackgroundCompletionEvent {
2
+ id: string;
3
+ taskId: string;
4
+ originRunId: string;
5
+ originToolCallId: string;
6
+ resourceId: string;
7
+ threadId: string;
8
+ toolName: string;
9
+ status: 'completed' | 'failed' | 'cancelled';
10
+ }
11
+ export interface BackgroundCompletionEvents {
12
+ publish(event: BackgroundCompletionEvent): void;
13
+ subscribe(listener: (event: BackgroundCompletionEvent) => void): () => void;
14
+ }
15
+ export declare function createBackgroundCompletionEvents(): BackgroundCompletionEvents;
16
+ //# sourceMappingURL=background-completion-events.d.ts.map
@@ -0,0 +1,16 @@
1
+ // src/agents/background-completion-events.ts
2
+ function createBackgroundCompletionEvents() {
3
+ const listeners = /* @__PURE__ */ new Set();
4
+ return {
5
+ publish(event) {
6
+ for (const listener of listeners) try {
7
+ listener(event);
8
+ } catch {}
9
+ },
10
+ subscribe(listener) {
11
+ listeners.add(listener);
12
+ return () => listeners.delete(listener);
13
+ }
14
+ };
15
+ }
16
+ export { createBackgroundCompletionEvents };
@@ -0,0 +1,22 @@
1
+ import type { Session } from '@mastra/core/agent-controller';
2
+ import type { BackgroundTaskManagerConfig } from '@mastra/core/background-tasks';
3
+ import type { BackgroundCompletionEvents } from './background-completion-events.js';
4
+ interface BackgroundCompletionRouter<TState = unknown> {
5
+ getSession(sessionId: string): Promise<Session<TState> | undefined>;
6
+ /** Live sessions to search when no session is addressed by the thread or resource id. */
7
+ listLiveSessions?(): Iterable<Session<TState>>;
8
+ }
9
+ /**
10
+ * Find the live session a thread runs in. Factory sessions are addressed by
11
+ * their thread id; Mastra Code sessions by their resource id, or, after
12
+ * switching resources, by being the live session on that thread. Only a
13
+ * session working on the same resource qualifies, so a thread is never run by
14
+ * a session of another resource.
15
+ */
16
+ export declare function findSessionForThread<TState>(controller: BackgroundCompletionRouter<TState>, { resourceId, threadId }: {
17
+ resourceId: string;
18
+ threadId: string;
19
+ }): Promise<Session<TState> | undefined>;
20
+ export declare function createBackgroundCompletionCallbacks(getController: () => BackgroundCompletionRouter, events?: BackgroundCompletionEvents): Pick<BackgroundTaskManagerConfig, 'onTaskComplete' | 'onTaskFailed' | 'onTaskCancelled'>;
21
+ export {};
22
+ //# sourceMappingURL=background-completion.d.ts.map
@@ -0,0 +1,73 @@
1
+ // src/agents/background-completion.ts
2
+ /**
3
+ * Find the live session a thread runs in. Factory sessions are addressed by
4
+ * their thread id; Mastra Code sessions by their resource id, or, after
5
+ * switching resources, by being the live session on that thread. Only a
6
+ * session working on the same resource qualifies, so a thread is never run by
7
+ * a session of another resource.
8
+ */
9
+ async function findSessionForThread(controller, { resourceId, threadId }) {
10
+ for (const sessionId of /* @__PURE__ */ new Set([threadId, resourceId])) {
11
+ const session = await controller.getSession(sessionId);
12
+ if (session?.identity.getResourceId() === resourceId) return session;
13
+ }
14
+ for (const session of controller.listLiveSessions?.() ?? []) if (session.identity.getResourceId() === resourceId && session.thread.getId() === threadId) return session;
15
+ }
16
+ async function persistBackgroundCompletion(controller, task, status) {
17
+ if (!task.resourceId || !task.threadId) return;
18
+ const session = await findSessionForThread(controller, {
19
+ resourceId: task.resourceId,
20
+ threadId: task.threadId
21
+ });
22
+ if (!session) return;
23
+ const eventId = `background-task:${task.id}:${status}`;
24
+ await session.sendSignalToThread({
25
+ id: eventId,
26
+ type: "notification",
27
+ tagName: "notification",
28
+ contents: `${task.toolName} ${status} in background`,
29
+ attributes: {
30
+ source: "background-work",
31
+ kind: `background-task-${status}`,
32
+ priority: status === "failed" ? "high" : "low",
33
+ status
34
+ },
35
+ metadata: { backgroundCompletion: {
36
+ eventId,
37
+ taskId: task.id,
38
+ originRunId: task.runId,
39
+ originToolCallId: task.toolCallId,
40
+ toolName: task.toolName,
41
+ status
42
+ } }
43
+ }, {
44
+ resourceId: task.resourceId,
45
+ threadId: task.threadId
46
+ }).accepted;
47
+ }
48
+ function createBackgroundCompletionCallbacks(getController, events) {
49
+ const deliver = async (task, status) => {
50
+ if (!task.resourceId || !task.threadId) return;
51
+ const event = {
52
+ id: `background-task:${task.id}:${status}`,
53
+ taskId: task.id,
54
+ originRunId: task.runId,
55
+ originToolCallId: task.toolCallId,
56
+ resourceId: task.resourceId,
57
+ threadId: task.threadId,
58
+ toolName: task.toolName,
59
+ status
60
+ };
61
+ try {
62
+ await persistBackgroundCompletion(getController(), task, status);
63
+ } finally {
64
+ events?.publish(event);
65
+ }
66
+ };
67
+ return {
68
+ onTaskComplete: (task) => deliver(task, "completed"),
69
+ onTaskFailed: (task) => deliver(task, "failed"),
70
+ onTaskCancelled: (task) => deliver(task, "cancelled")
71
+ };
72
+ }
73
+ export { createBackgroundCompletionCallbacks, findSessionForThread };
@@ -0,0 +1,84 @@
1
+ import type { PromptSection } from './prompts/index.js';
2
+ /** A single measured contributor to the context window. */
3
+ export interface ContextAuditEntry {
4
+ id: string;
5
+ label: string;
6
+ /** Provenance: file path, server name, model id — whatever identifies the source. */
7
+ detail?: string;
8
+ tokens: number;
9
+ characters: number;
10
+ /** Share of the audit total, 0-100. */
11
+ percent: number;
12
+ }
13
+ /** A category of contributors (e.g. all agent instruction files). */
14
+ export interface ContextAuditGroup {
15
+ id: string;
16
+ label: string;
17
+ tokens: number;
18
+ /** Share of the audit total, 0-100. */
19
+ percent: number;
20
+ entries: ContextAuditEntry[];
21
+ /** Shown alongside the group when its numbers need qualifying. */
22
+ note?: string;
23
+ }
24
+ export interface ContextAudit {
25
+ /** Context present before the first message: system prompt, skills, tools. */
26
+ startup: {
27
+ tokens: number;
28
+ percent: number;
29
+ groups: ContextAuditGroup[];
30
+ };
31
+ /** Context accumulated by the session: conversation and observation memory. */
32
+ accumulated: {
33
+ tokens: number;
34
+ percent: number;
35
+ groups: ContextAuditGroup[];
36
+ };
37
+ /** Startup + accumulated. Percentages elsewhere are shares of this. */
38
+ totalTokens: number;
39
+ /** Estimated rather than measured: token counts come from a heuristic estimator. */
40
+ estimated: true;
41
+ }
42
+ /** A tool definition as advertised to the model. */
43
+ export interface ContextAuditTool {
44
+ name: string;
45
+ description?: string;
46
+ /** JSON schema (or any serializable shape) sent with the definition. */
47
+ parameters?: unknown;
48
+ /** MCP server that provides the tool, when it is not built in. */
49
+ server?: string;
50
+ }
51
+ export interface ContextAuditInput {
52
+ /** Labeled sections of the assembled system prompt. */
53
+ promptSections?: PromptSection[];
54
+ /** Labeled sections of the per-request dynamic instructions. */
55
+ instructionSections?: PromptSection[];
56
+ /** The skills catalog exactly as injected into the system message. */
57
+ skillsCatalog?: string;
58
+ /** Tool definitions advertised to the model. */
59
+ tools?: ContextAuditTool[];
60
+ /**
61
+ * Observation memory currently occupying the context window, either as the
62
+ * injected text or as a token count reported by the memory subsystem.
63
+ *
64
+ * Only observations that are actually in the context belong here.
65
+ * Observations that merely sit in storage cost nothing until recalled, and
66
+ * conflating the two is exactly the confusion this audit exists to resolve.
67
+ */
68
+ injectedObservations?: string | {
69
+ tokens: number;
70
+ };
71
+ /** Prompt tokens the provider reported for the most recent request. */
72
+ conversation?: {
73
+ promptTokens?: number;
74
+ };
75
+ }
76
+ /**
77
+ * Build a context audit from already-collected context.
78
+ *
79
+ * Percentages are shares of the audited total, not of the model's context
80
+ * window: window size is not exposed by the model registry, and inventing one
81
+ * would make every number wrong for models that disagree with the guess.
82
+ */
83
+ export declare function buildContextAudit(input: ContextAuditInput): ContextAudit;
84
+ //# sourceMappingURL=context-audit.d.ts.map
@@ -0,0 +1,115 @@
1
+ import { tokenEstimate } from "../utils/token-estimator.js";
2
+ // src/agents/context-audit.ts
3
+ /**
4
+ * Context audit — accounts for what occupies the model's context window.
5
+ *
6
+ * Deliberately pure: callers collect the real strings (prompt sections, the
7
+ * injected skills catalog, tool definitions) and this module only measures and
8
+ * groups them. That keeps the audit honest — it reports on the same text the
9
+ * model receives rather than a description of it — and keeps it testable
10
+ * without a live session.
11
+ *
12
+ * Nothing here reads file contents or secrets: entries carry labels, origins
13
+ * and sizes only, never the underlying text, so an audit can be shown or
14
+ * pasted without leaking whatever the context happens to contain.
15
+ */
16
+ function measure(id, label, content, detail) {
17
+ return {
18
+ id,
19
+ label,
20
+ detail,
21
+ tokens: tokenEstimate(content),
22
+ characters: content.length,
23
+ percent: 0
24
+ };
25
+ }
26
+ function sectionEntries(sections, prefix) {
27
+ return sections.filter((section) => section.content.length > 0).map((section) => measure(`${prefix}:${section.id}`, section.label, section.content, section.detail));
28
+ }
29
+ function group(id, label, entries, note) {
30
+ if (entries.length === 0) return void 0;
31
+ return {
32
+ id,
33
+ label,
34
+ tokens: entries.reduce((sum, entry) => sum + entry.tokens, 0),
35
+ percent: 0,
36
+ entries,
37
+ note
38
+ };
39
+ }
40
+ /**
41
+ * Group tool definitions by their provider so a chatty MCP server is visible as
42
+ * one line rather than fifty. Per-tool entries stay available underneath.
43
+ */
44
+ function toolEntries(tools) {
45
+ return tools.map((tool) => {
46
+ const serialized = [
47
+ tool.name,
48
+ tool.description ?? "",
49
+ tool.parameters ? JSON.stringify(tool.parameters) : ""
50
+ ].join("\n");
51
+ return measure(`tool:${tool.server ?? "built-in"}:${tool.name}`, tool.name, serialized, tool.server);
52
+ });
53
+ }
54
+ function withPercent(items, total) {
55
+ for (const item of items) item.percent = total > 0 ? item.tokens / total * 100 : 0;
56
+ return items;
57
+ }
58
+ function sumTokens(groups) {
59
+ return groups.reduce((sum, entry) => sum + entry.tokens, 0);
60
+ }
61
+ /**
62
+ * Build a context audit from already-collected context.
63
+ *
64
+ * Percentages are shares of the audited total, not of the model's context
65
+ * window: window size is not exposed by the model registry, and inventing one
66
+ * would make every number wrong for models that disagree with the guess.
67
+ */
68
+ function buildContextAudit(input) {
69
+ const startupGroups = [
70
+ group("system-prompt", "System prompt", sectionEntries(input.promptSections ?? [], "prompt")),
71
+ group("dynamic-instructions", "Dynamic instructions", sectionEntries(input.instructionSections ?? [], "dynamic")),
72
+ group("skills", "Skills catalog", input.skillsCatalog ? [measure("skills:catalog", "Available skills", input.skillsCatalog)] : [], "Skill instructions are loaded on demand and are not counted here."),
73
+ group("tools", "Tool definitions", toolEntries(input.tools ?? []))
74
+ ].filter((entry) => entry !== void 0);
75
+ const observationEntries = [];
76
+ if (typeof input.injectedObservations === "string") observationEntries.push(measure("observations:injected", "Injected into context", input.injectedObservations));
77
+ else if (input.injectedObservations && input.injectedObservations.tokens > 0) observationEntries.push({
78
+ id: "observations:injected",
79
+ label: "Injected into context",
80
+ tokens: input.injectedObservations.tokens,
81
+ characters: 0,
82
+ percent: 0
83
+ });
84
+ const startupTokens = sumTokens(startupGroups);
85
+ const injectedObservationTokens = observationEntries.reduce((sum, entry) => sum + entry.tokens, 0);
86
+ const promptTokens = input.conversation?.promptTokens ?? 0;
87
+ const conversationTokens = Math.max(0, promptTokens - startupTokens - injectedObservationTokens);
88
+ const accumulatedGroups = [group("conversation", "Conversation", promptTokens > 0 ? [{
89
+ id: "conversation:messages",
90
+ label: "Messages, tool calls and results",
91
+ tokens: conversationTokens,
92
+ characters: 0,
93
+ percent: 0
94
+ }] : [], `Derived from the provider's last request (~${promptTokens} prompt tokens) minus the startup context measured above.`), group("observations", "Observation memory", observationEntries, "Observations kept only in storage are not counted: they cost nothing until recalled.")].filter((entry) => entry !== void 0);
95
+ const accumulatedTokens = sumTokens(accumulatedGroups);
96
+ const totalTokens = startupTokens + accumulatedTokens;
97
+ for (const entry of [...startupGroups, ...accumulatedGroups]) withPercent(entry.entries, totalTokens);
98
+ withPercent(startupGroups, totalTokens);
99
+ withPercent(accumulatedGroups, totalTokens);
100
+ return {
101
+ startup: {
102
+ tokens: startupTokens,
103
+ percent: totalTokens > 0 ? startupTokens / totalTokens * 100 : 0,
104
+ groups: startupGroups
105
+ },
106
+ accumulated: {
107
+ tokens: accumulatedTokens,
108
+ percent: totalTokens > 0 ? accumulatedTokens / totalTokens * 100 : 0,
109
+ groups: accumulatedGroups
110
+ },
111
+ totalTokens,
112
+ estimated: true
113
+ };
114
+ }
115
+ export { buildContextAudit };
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Per-tenant credential resolution seam for deployed (multi-user) servers.
3
+ *
4
+ * Locally, model resolution reads the server-global file-backed `AuthStorage`.
5
+ * A deployed web host registers a {@link CredentialStoreProvider} at boot; from
6
+ * then on `resolveModel` uses the host's trusted execution policy, never mutable
7
+ * session state. Factory scope reads organization credentials only. User scope reads
8
+ * the Factory session owner's credentials only, or the authenticated principal
9
+ * for project-less personal sessions.
10
+ *
11
+ * When no provider is registered (TUI, local web), everything falls through to
12
+ * the existing global behavior unchanged.
13
+ */
14
+ import type { RequestContext } from '@mastra/core/request-context';
15
+ import type { RequestContextReader } from '../auth/account-routing-context.js';
16
+ import type { CredentialStore } from '../auth/types.js';
17
+ export type CredentialScope = 'factory' | 'user';
18
+ /** The identity and exclusive scope a credential lookup is resolved against. */
19
+ export interface CredentialTenant {
20
+ /** Org tenant; absent for personal accounts (store impls may synthesize one). */
21
+ orgId?: string;
22
+ /** Stable user id used for user-scoped credentials and tenant cache keys. */
23
+ userId: string;
24
+ /** Exclusive credential scope for this request. */
25
+ credentialScope: CredentialScope;
26
+ }
27
+ /**
28
+ * Returns a tenant-scoped {@link CredentialStore}, or `undefined` when tenant
29
+ * storage is unavailable. Must be synchronous — implementations serve from a
30
+ * primed snapshot and do authoritative async work inside `getApiKey`.
31
+ */
32
+ export type CredentialStoreProvider = (tenant: CredentialTenant) => CredentialStore | undefined;
33
+ export type CredentialTenantResolver = (requestContext: RequestContext) => Promise<CredentialTenant | undefined>;
34
+ type CredentialLogger = {
35
+ error(message: string, meta?: Record<string, unknown>): void;
36
+ };
37
+ /** Route credential failures to the host's logger (e.g. Mastra's), so they reach deployed log sinks. */
38
+ export declare function setCredentialLogger(next: CredentialLogger | undefined): void;
39
+ /** Register (or clear) the tenant credential store provider. Deployed-web only. */
40
+ export declare function setCredentialStoreProvider(provider: CredentialStoreProvider | undefined, resolveTenant?: CredentialTenantResolver): void;
41
+ /** Refresh authority before a fresh model invocation; cloned contexts inherit only an opaque token. */
42
+ export declare function prepareCredentialTenant(requestContext?: RequestContext): Promise<void>;
43
+ export declare function withCredentialTenantPreparation<T>(resolve: (ctx: {
44
+ requestContext: RequestContext;
45
+ }) => T | Promise<T>): (ctx: {
46
+ requestContext: RequestContext;
47
+ }) => Promise<T>;
48
+ /**
49
+ * Whether a tenant provider is registered. Used to disable the
50
+ * `loadStoredApiKeysIntoEnv` side-channel in deployed mode — per-tenant
51
+ * credentials must never leak into process-global env vars.
52
+ */
53
+ export declare function hasCredentialStoreProvider(): boolean;
54
+ export declare function hasCredentialTenantResolver(): boolean;
55
+ export declare function resolveCredentialScope(requestContext?: RequestContext): CredentialScope;
56
+ /**
57
+ * Derive the calling tenant from a request context, if an authenticated web
58
+ * user was stashed on it. Mirrors the web layer's stable-id resolution
59
+ * (`workosId` falling back to the provider `id`).
60
+ *
61
+ * Session state and HTTP-supplied policy values never establish credential authority.
62
+ */
63
+ export declare function resolveTenantFromRequestContext(requestContext?: RequestContextReader): CredentialTenant | undefined;
64
+ /** Authenticated principal only, for hosts resolving durable session ownership. */
65
+ export declare function resolveAuthenticatedCredentialTenant(requestContext?: RequestContextReader): CredentialTenant | undefined;
66
+ /**
67
+ * Resolve the credential store for a request. Local mode returns `undefined`
68
+ * and keeps the global `AuthStorage` behavior. Once deployed web registers a
69
+ * provider, missing tenant identity or unavailable tenant storage fails closed
70
+ * through an empty store that also disables process-environment fallback.
71
+ */
72
+ export declare function resolveCredentialStore(requestContext?: RequestContextReader): CredentialStore | undefined;
73
+ export {};
74
+ //# sourceMappingURL=credential-resolver.d.ts.map