managed-deepagents 0.4.2 → 0.4.3-dev.94

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 (449) hide show
  1. package/README.md +78 -35
  2. package/dist/channels/assistant-text.js +1 -1
  3. package/dist/channels/assistant-text.js.map +1 -1
  4. package/dist/channels/binding.d.ts.map +1 -1
  5. package/dist/channels/binding.js +3 -1
  6. package/dist/channels/binding.js.map +1 -1
  7. package/dist/channels/index.d.ts +7 -8
  8. package/dist/channels/index.d.ts.map +1 -1
  9. package/dist/channels/index.js +6 -5
  10. package/dist/channels/index.js.map +1 -1
  11. package/dist/channels/manifest.d.ts +7 -4
  12. package/dist/channels/manifest.d.ts.map +1 -1
  13. package/dist/channels/messaging-registry.d.ts +21 -0
  14. package/dist/channels/messaging-registry.d.ts.map +1 -0
  15. package/dist/channels/messaging-registry.js +50 -0
  16. package/dist/channels/messaging-registry.js.map +1 -0
  17. package/dist/channels/registry-types.d.ts +1 -1
  18. package/dist/channels/registry.d.ts +4 -3
  19. package/dist/channels/registry.d.ts.map +1 -1
  20. package/dist/channels/registry.js +5 -6
  21. package/dist/channels/registry.js.map +1 -1
  22. package/dist/channels/schedule-delivery.d.ts +4 -1
  23. package/dist/channels/schedule-delivery.d.ts.map +1 -1
  24. package/dist/channels/schedule-delivery.js +3 -1
  25. package/dist/channels/schedule-delivery.js.map +1 -1
  26. package/dist/channels/slack/adapter.d.ts +1 -2
  27. package/dist/channels/slack/adapter.d.ts.map +1 -1
  28. package/dist/channels/slack/adapter.js +0 -2
  29. package/dist/channels/slack/adapter.js.map +1 -1
  30. package/dist/channels/slack/http.d.ts +7 -39
  31. package/dist/channels/slack/http.d.ts.map +1 -1
  32. package/dist/channels/slack/http.js +64 -122
  33. package/dist/channels/slack/http.js.map +1 -1
  34. package/dist/channels/slack/index.d.ts +94 -8
  35. package/dist/channels/slack/index.d.ts.map +1 -1
  36. package/dist/channels/slack/index.js +144 -6
  37. package/dist/channels/slack/index.js.map +1 -1
  38. package/dist/channels/slack/normalize.d.ts +6 -4
  39. package/dist/channels/slack/normalize.d.ts.map +1 -1
  40. package/dist/channels/slack/normalize.js +61 -28
  41. package/dist/channels/slack/normalize.js.map +1 -1
  42. package/dist/channels/slack/transport.d.ts.map +1 -1
  43. package/dist/channels/slack/transport.js +3 -2
  44. package/dist/channels/slack/transport.js.map +1 -1
  45. package/dist/channels/store.d.ts +14 -0
  46. package/dist/channels/store.d.ts.map +1 -1
  47. package/dist/channels/store.js +41 -27
  48. package/dist/channels/store.js.map +1 -1
  49. package/dist/connectors/marketplace/catalog.d.ts +96 -0
  50. package/dist/connectors/marketplace/catalog.d.ts.map +1 -0
  51. package/dist/connectors/marketplace/catalog.js +213 -0
  52. package/dist/connectors/marketplace/catalog.js.map +1 -0
  53. package/dist/connectors/marketplace/fleet-mcp.d.ts +62 -0
  54. package/dist/connectors/marketplace/fleet-mcp.d.ts.map +1 -0
  55. package/dist/connectors/marketplace/fleet-mcp.js +215 -0
  56. package/dist/connectors/marketplace/fleet-mcp.js.map +1 -0
  57. package/dist/connectors/marketplace/index.d.ts +31 -0
  58. package/dist/connectors/marketplace/index.d.ts.map +1 -0
  59. package/dist/connectors/marketplace/index.js +39 -0
  60. package/dist/connectors/marketplace/index.js.map +1 -0
  61. package/dist/connectors/marketplace/load.d.ts +14 -0
  62. package/dist/connectors/marketplace/load.d.ts.map +1 -0
  63. package/dist/connectors/marketplace/load.js +206 -0
  64. package/dist/connectors/marketplace/load.js.map +1 -0
  65. package/dist/connectors/mcp/index.d.ts +13 -20
  66. package/dist/connectors/mcp/index.d.ts.map +1 -1
  67. package/dist/connectors/mcp/index.js +92 -112
  68. package/dist/connectors/mcp/index.js.map +1 -1
  69. package/dist/connectors/mcp/load.d.ts.map +1 -1
  70. package/dist/connectors/mcp/load.js +16 -40
  71. package/dist/connectors/mcp/load.js.map +1 -1
  72. package/dist/connectors/slack/index.d.ts +24 -0
  73. package/dist/connectors/slack/index.d.ts.map +1 -0
  74. package/dist/connectors/slack/index.js +64 -0
  75. package/dist/connectors/slack/index.js.map +1 -0
  76. package/dist/connectors/tool-selection.d.ts +55 -0
  77. package/dist/connectors/tool-selection.d.ts.map +1 -0
  78. package/dist/connectors/tool-selection.js +112 -0
  79. package/dist/connectors/tool-selection.js.map +1 -0
  80. package/dist/connectors/toolserver/catalog.d.ts +326 -0
  81. package/dist/connectors/toolserver/catalog.d.ts.map +1 -0
  82. package/dist/connectors/toolserver/catalog.js +415 -0
  83. package/dist/connectors/toolserver/catalog.js.map +1 -0
  84. package/dist/connectors/toolserver/connectors.d.ts +698 -0
  85. package/dist/connectors/toolserver/connectors.d.ts.map +1 -0
  86. package/dist/connectors/toolserver/connectors.js +13 -0
  87. package/dist/connectors/toolserver/connectors.js.map +1 -0
  88. package/dist/connectors/toolserver/index.d.ts +142 -0
  89. package/dist/connectors/toolserver/index.d.ts.map +1 -0
  90. package/dist/connectors/toolserver/index.js +105 -0
  91. package/dist/connectors/toolserver/index.js.map +1 -0
  92. package/dist/connectors/toolserver/integrations.d.ts +103 -0
  93. package/dist/connectors/toolserver/integrations.d.ts.map +1 -0
  94. package/dist/connectors/toolserver/integrations.js +288 -0
  95. package/dist/connectors/toolserver/integrations.js.map +1 -0
  96. package/dist/connectors/toolserver/load.d.ts +55 -0
  97. package/dist/connectors/toolserver/load.d.ts.map +1 -0
  98. package/dist/connectors/toolserver/load.js +289 -0
  99. package/dist/connectors/toolserver/load.js.map +1 -0
  100. package/dist/define-deep-agent.d.ts.map +1 -1
  101. package/dist/define-deep-agent.js +9 -3
  102. package/dist/define-deep-agent.js.map +1 -1
  103. package/dist/extension.d.ts +69 -0
  104. package/dist/extension.d.ts.map +1 -0
  105. package/dist/extension.js +108 -0
  106. package/dist/extension.js.map +1 -0
  107. package/dist/identity/actor-subject.d.ts +60 -0
  108. package/dist/identity/actor-subject.d.ts.map +1 -0
  109. package/dist/identity/actor-subject.js +107 -0
  110. package/dist/identity/actor-subject.js.map +1 -0
  111. package/dist/identity/byo-oauth.d.ts +105 -0
  112. package/dist/identity/byo-oauth.d.ts.map +1 -0
  113. package/dist/identity/byo-oauth.js +190 -0
  114. package/dist/identity/byo-oauth.js.map +1 -0
  115. package/dist/identity/claims.d.ts +16 -0
  116. package/dist/identity/claims.d.ts.map +1 -0
  117. package/dist/identity/claims.js +33 -0
  118. package/dist/identity/claims.js.map +1 -0
  119. package/dist/identity/connect-inference.d.ts +37 -0
  120. package/dist/identity/connect-inference.d.ts.map +1 -0
  121. package/dist/identity/connect-inference.js +53 -0
  122. package/dist/identity/connect-inference.js.map +1 -0
  123. package/dist/identity/connect-provider-types.d.ts +35 -6
  124. package/dist/identity/connect-provider-types.d.ts.map +1 -1
  125. package/dist/identity/connect-provider-types.js +3 -1
  126. package/dist/identity/connect-provider-types.js.map +1 -1
  127. package/dist/identity/connect-provider.d.ts +9 -4
  128. package/dist/identity/connect-provider.d.ts.map +1 -1
  129. package/dist/identity/connect-provider.js +39 -13
  130. package/dist/identity/connect-provider.js.map +1 -1
  131. package/dist/identity/credential-resolvers.d.ts +33 -0
  132. package/dist/identity/credential-resolvers.d.ts.map +1 -0
  133. package/dist/identity/credential-resolvers.js +62 -0
  134. package/dist/identity/credential-resolvers.js.map +1 -0
  135. package/dist/identity/define-fleet-connect.d.ts +53 -0
  136. package/dist/identity/define-fleet-connect.d.ts.map +1 -0
  137. package/dist/identity/define-fleet-connect.js +76 -0
  138. package/dist/identity/define-fleet-connect.js.map +1 -0
  139. package/dist/identity/fleet-connect-hint.d.ts +41 -0
  140. package/dist/identity/fleet-connect-hint.d.ts.map +1 -0
  141. package/dist/identity/fleet-connect-hint.js +190 -0
  142. package/dist/identity/fleet-connect-hint.js.map +1 -0
  143. package/dist/identity/fleet-connect.d.ts +93 -0
  144. package/dist/identity/fleet-connect.d.ts.map +1 -0
  145. package/dist/identity/fleet-connect.js +256 -0
  146. package/dist/identity/fleet-connect.js.map +1 -0
  147. package/dist/identity/fleet-integration-connect.d.ts +32 -0
  148. package/dist/identity/fleet-integration-connect.d.ts.map +1 -0
  149. package/dist/identity/fleet-integration-connect.js +35 -0
  150. package/dist/identity/fleet-integration-connect.js.map +1 -0
  151. package/dist/identity/fleet.d.ts +56 -0
  152. package/dist/identity/fleet.d.ts.map +1 -0
  153. package/dist/identity/fleet.js +131 -0
  154. package/dist/identity/fleet.js.map +1 -0
  155. package/dist/identity/github/connect-http.d.ts +8 -4
  156. package/dist/identity/github/connect-http.d.ts.map +1 -1
  157. package/dist/identity/github/connect-http.js +32 -15
  158. package/dist/identity/github/connect-http.js.map +1 -1
  159. package/dist/identity/github/credentials-store.d.ts +10 -10
  160. package/dist/identity/github/credentials-store.d.ts.map +1 -1
  161. package/dist/identity/github/credentials-store.js +51 -49
  162. package/dist/identity/github/credentials-store.js.map +1 -1
  163. package/dist/identity/github/credentials.d.ts +16 -13
  164. package/dist/identity/github/credentials.d.ts.map +1 -1
  165. package/dist/identity/github/credentials.js +43 -23
  166. package/dist/identity/github/credentials.js.map +1 -1
  167. package/dist/identity/github/index.d.ts +1 -4
  168. package/dist/identity/github/index.d.ts.map +1 -1
  169. package/dist/identity/github/index.js +0 -3
  170. package/dist/identity/github/index.js.map +1 -1
  171. package/dist/identity/github/oauth.d.ts +18 -20
  172. package/dist/identity/github/oauth.d.ts.map +1 -1
  173. package/dist/identity/github/oauth.js +90 -109
  174. package/dist/identity/github/oauth.js.map +1 -1
  175. package/dist/identity/google/connect-http.d.ts +37 -0
  176. package/dist/identity/google/connect-http.d.ts.map +1 -0
  177. package/dist/identity/google/connect-http.js +42 -0
  178. package/dist/identity/google/connect-http.js.map +1 -0
  179. package/dist/identity/google/index.d.ts +7 -0
  180. package/dist/identity/google/index.d.ts.map +1 -0
  181. package/dist/identity/google/index.js +6 -0
  182. package/dist/identity/google/index.js.map +1 -0
  183. package/dist/identity/google/oauth.d.ts +22 -0
  184. package/dist/identity/google/oauth.d.ts.map +1 -0
  185. package/dist/identity/google/oauth.js +48 -0
  186. package/dist/identity/google/oauth.js.map +1 -0
  187. package/dist/identity/index.d.ts +40 -64
  188. package/dist/identity/index.d.ts.map +1 -1
  189. package/dist/identity/index.js +104 -243
  190. package/dist/identity/index.js.map +1 -1
  191. package/dist/identity/linkedin/connect-http.d.ts +37 -0
  192. package/dist/identity/linkedin/connect-http.d.ts.map +1 -0
  193. package/dist/identity/linkedin/connect-http.js +41 -0
  194. package/dist/identity/linkedin/connect-http.js.map +1 -0
  195. package/dist/identity/linkedin/index.d.ts +7 -0
  196. package/dist/identity/linkedin/index.d.ts.map +1 -0
  197. package/dist/identity/linkedin/index.js +6 -0
  198. package/dist/identity/linkedin/index.js.map +1 -0
  199. package/dist/identity/linkedin/oauth.d.ts +22 -0
  200. package/dist/identity/linkedin/oauth.d.ts.map +1 -0
  201. package/dist/identity/linkedin/oauth.js +47 -0
  202. package/dist/identity/linkedin/oauth.js.map +1 -0
  203. package/dist/identity/loopback.d.ts +27 -2
  204. package/dist/identity/loopback.d.ts.map +1 -1
  205. package/dist/identity/loopback.js +61 -8
  206. package/dist/identity/loopback.js.map +1 -1
  207. package/dist/identity/marketplace/connect-hint.d.ts +31 -0
  208. package/dist/identity/marketplace/connect-hint.d.ts.map +1 -0
  209. package/dist/identity/marketplace/connect-hint.js +59 -0
  210. package/dist/identity/marketplace/connect-hint.js.map +1 -0
  211. package/dist/identity/marketplace/connect.d.ts +51 -0
  212. package/dist/identity/marketplace/connect.d.ts.map +1 -0
  213. package/dist/identity/marketplace/connect.js +88 -0
  214. package/dist/identity/marketplace/connect.js.map +1 -0
  215. package/dist/identity/marketplace/index.d.ts +9 -0
  216. package/dist/identity/marketplace/index.d.ts.map +1 -0
  217. package/dist/identity/marketplace/index.js +9 -0
  218. package/dist/identity/marketplace/index.js.map +1 -0
  219. package/dist/identity/microsoft/connect-http.d.ts +38 -0
  220. package/dist/identity/microsoft/connect-http.d.ts.map +1 -0
  221. package/dist/identity/microsoft/connect-http.js +42 -0
  222. package/dist/identity/microsoft/connect-http.js.map +1 -0
  223. package/dist/identity/microsoft/index.d.ts +7 -0
  224. package/dist/identity/microsoft/index.d.ts.map +1 -0
  225. package/dist/identity/microsoft/index.js +6 -0
  226. package/dist/identity/microsoft/index.js.map +1 -0
  227. package/dist/identity/microsoft/oauth.d.ts +24 -0
  228. package/dist/identity/microsoft/oauth.d.ts.map +1 -0
  229. package/dist/identity/microsoft/oauth.js +65 -0
  230. package/dist/identity/microsoft/oauth.js.map +1 -0
  231. package/dist/identity/oauth-env.d.ts +43 -0
  232. package/dist/identity/oauth-env.d.ts.map +1 -0
  233. package/dist/identity/oauth-env.js +66 -0
  234. package/dist/identity/oauth-env.js.map +1 -0
  235. package/dist/identity/oauth-tickets.d.ts +37 -0
  236. package/dist/identity/oauth-tickets.d.ts.map +1 -0
  237. package/dist/identity/oauth-tickets.js +114 -0
  238. package/dist/identity/oauth-tickets.js.map +1 -0
  239. package/dist/identity/options.d.ts +35 -0
  240. package/dist/identity/options.d.ts.map +1 -0
  241. package/dist/identity/options.js +80 -0
  242. package/dist/identity/options.js.map +1 -0
  243. package/dist/identity/slack/connect-http.d.ts +6 -4
  244. package/dist/identity/slack/connect-http.d.ts.map +1 -1
  245. package/dist/identity/slack/connect-http.js +27 -17
  246. package/dist/identity/slack/connect-http.js.map +1 -1
  247. package/dist/identity/slack/index.d.ts +1 -2
  248. package/dist/identity/slack/index.d.ts.map +1 -1
  249. package/dist/identity/slack/index.js +1 -2
  250. package/dist/identity/slack/index.js.map +1 -1
  251. package/dist/identity/slack/links.d.ts +18 -17
  252. package/dist/identity/slack/links.d.ts.map +1 -1
  253. package/dist/identity/slack/links.js +64 -61
  254. package/dist/identity/slack/links.js.map +1 -1
  255. package/dist/identity/slack/oauth.d.ts +3 -35
  256. package/dist/identity/slack/oauth.d.ts.map +1 -1
  257. package/dist/identity/slack/oauth.js +9 -115
  258. package/dist/identity/slack/oauth.js.map +1 -1
  259. package/dist/identity/supabase.js +9 -9
  260. package/dist/identity/supabase.js.map +1 -1
  261. package/dist/identity/types.d.ts +91 -54
  262. package/dist/identity/types.d.ts.map +1 -1
  263. package/dist/identity/x/connect-http.d.ts +38 -0
  264. package/dist/identity/x/connect-http.d.ts.map +1 -0
  265. package/dist/identity/x/connect-http.js +41 -0
  266. package/dist/identity/x/connect-http.js.map +1 -0
  267. package/dist/identity/x/index.d.ts +6 -0
  268. package/dist/identity/x/index.d.ts.map +1 -0
  269. package/dist/identity/x/index.js +5 -0
  270. package/dist/identity/x/index.js.map +1 -0
  271. package/dist/index.d.ts +9 -20
  272. package/dist/index.d.ts.map +1 -1
  273. package/dist/index.js +3 -11
  274. package/dist/index.js.map +1 -1
  275. package/dist/ingress/index.d.ts +52 -0
  276. package/dist/ingress/index.d.ts.map +1 -0
  277. package/dist/ingress/index.js +127 -0
  278. package/dist/ingress/index.js.map +1 -0
  279. package/dist/memory/define-memory.d.ts +39 -0
  280. package/dist/memory/define-memory.d.ts.map +1 -0
  281. package/dist/memory/define-memory.js +78 -0
  282. package/dist/memory/define-memory.js.map +1 -0
  283. package/dist/memory/index.d.ts +9 -0
  284. package/dist/memory/index.d.ts.map +1 -0
  285. package/dist/memory/index.js +8 -0
  286. package/dist/memory/index.js.map +1 -0
  287. package/dist/memory/instructions-middleware.d.ts +74 -0
  288. package/dist/memory/instructions-middleware.d.ts.map +1 -0
  289. package/dist/memory/instructions-middleware.js +115 -0
  290. package/dist/memory/instructions-middleware.js.map +1 -0
  291. package/dist/memory/slices.d.ts +21 -0
  292. package/dist/memory/slices.d.ts.map +1 -0
  293. package/dist/memory/slices.js +61 -0
  294. package/dist/memory/slices.js.map +1 -0
  295. package/dist/memory/types.d.ts +71 -0
  296. package/dist/memory/types.d.ts.map +1 -0
  297. package/dist/memory/types.js +10 -0
  298. package/dist/memory/types.js.map +1 -0
  299. package/dist/namespaces.d.ts +262 -0
  300. package/dist/namespaces.d.ts.map +1 -0
  301. package/dist/namespaces.js +101 -0
  302. package/dist/namespaces.js.map +1 -0
  303. package/dist/runtime/auth.d.ts +43 -32
  304. package/dist/runtime/auth.d.ts.map +1 -1
  305. package/dist/runtime/auth.js +225 -125
  306. package/dist/runtime/auth.js.map +1 -1
  307. package/dist/runtime/backend.d.ts +1 -1
  308. package/dist/runtime/backend.d.ts.map +1 -1
  309. package/dist/runtime/backend.js +26 -5
  310. package/dist/runtime/backend.js.map +1 -1
  311. package/dist/runtime/channel.d.ts +91 -0
  312. package/dist/runtime/channel.d.ts.map +1 -0
  313. package/dist/runtime/channel.js +98 -0
  314. package/dist/runtime/channel.js.map +1 -0
  315. package/dist/runtime/connector.d.ts +66 -23
  316. package/dist/runtime/connector.d.ts.map +1 -1
  317. package/dist/runtime/connector.js +67 -27
  318. package/dist/runtime/connector.js.map +1 -1
  319. package/dist/runtime/cors.d.ts +12 -3
  320. package/dist/runtime/cors.d.ts.map +1 -1
  321. package/dist/runtime/cors.js +23 -5
  322. package/dist/runtime/cors.js.map +1 -1
  323. package/dist/runtime/credentials.d.ts +8 -8
  324. package/dist/runtime/credentials.d.ts.map +1 -1
  325. package/dist/runtime/credentials.js +46 -23
  326. package/dist/runtime/credentials.js.map +1 -1
  327. package/dist/runtime/http.d.ts +46 -0
  328. package/dist/runtime/http.d.ts.map +1 -0
  329. package/dist/runtime/http.js +53 -0
  330. package/dist/runtime/http.js.map +1 -0
  331. package/dist/runtime/identity-http.d.ts +13 -20
  332. package/dist/runtime/identity-http.d.ts.map +1 -1
  333. package/dist/runtime/identity-http.js +158 -75
  334. package/dist/runtime/identity-http.js.map +1 -1
  335. package/dist/runtime/identity-runtime.d.ts +12 -28
  336. package/dist/runtime/identity-runtime.d.ts.map +1 -1
  337. package/dist/runtime/identity-runtime.js +35 -72
  338. package/dist/runtime/identity-runtime.js.map +1 -1
  339. package/dist/runtime/index.d.ts +89 -225
  340. package/dist/runtime/index.d.ts.map +1 -1
  341. package/dist/runtime/index.js +92 -61
  342. package/dist/runtime/index.js.map +1 -1
  343. package/dist/runtime/memory/index.d.ts +0 -2
  344. package/dist/runtime/memory/index.d.ts.map +1 -1
  345. package/dist/runtime/memory/index.js +0 -2
  346. package/dist/runtime/memory/index.js.map +1 -1
  347. package/dist/runtime/memory/mounts.d.ts +4 -12
  348. package/dist/runtime/memory/mounts.d.ts.map +1 -1
  349. package/dist/runtime/memory/mounts.js +9 -20
  350. package/dist/runtime/memory/mounts.js.map +1 -1
  351. package/dist/runtime/recursion-limit.d.ts +22 -0
  352. package/dist/runtime/recursion-limit.d.ts.map +1 -0
  353. package/dist/runtime/recursion-limit.js +46 -0
  354. package/dist/runtime/recursion-limit.js.map +1 -0
  355. package/dist/runtime/sandbox-manager.d.ts +60 -3
  356. package/dist/runtime/sandbox-manager.d.ts.map +1 -1
  357. package/dist/runtime/sandbox-manager.js +326 -26
  358. package/dist/runtime/sandbox-manager.js.map +1 -1
  359. package/dist/runtime/sandbox-stream-retry.d.ts +18 -0
  360. package/dist/runtime/sandbox-stream-retry.d.ts.map +1 -0
  361. package/dist/runtime/sandbox-stream-retry.js +90 -0
  362. package/dist/runtime/sandbox-stream-retry.js.map +1 -0
  363. package/dist/runtime/setup-script.d.ts.map +1 -1
  364. package/dist/runtime/setup-script.js +16 -2
  365. package/dist/runtime/setup-script.js.map +1 -1
  366. package/dist/runtime/types.d.ts +16 -0
  367. package/dist/runtime/types.d.ts.map +1 -1
  368. package/dist/runtime/validated-token.d.ts +9 -14
  369. package/dist/runtime/validated-token.d.ts.map +1 -1
  370. package/dist/runtime/validated-token.js +79 -106
  371. package/dist/runtime/validated-token.js.map +1 -1
  372. package/dist/sandbox.d.ts +17 -42
  373. package/dist/sandbox.d.ts.map +1 -1
  374. package/dist/sandbox.js +11 -32
  375. package/dist/sandbox.js.map +1 -1
  376. package/dist/schedules.js +8 -9
  377. package/dist/schedules.js.map +1 -1
  378. package/dist/types.d.ts +4 -3
  379. package/dist/types.d.ts.map +1 -1
  380. package/dist/types.js.map +1 -1
  381. package/package.json +22 -29
  382. package/dist/channels/collect.d.ts +0 -26
  383. package/dist/channels/collect.d.ts.map +0 -1
  384. package/dist/channels/collect.js +0 -42
  385. package/dist/channels/collect.js.map +0 -1
  386. package/dist/channels/github/adapter-core.d.ts +0 -6
  387. package/dist/channels/github/adapter-core.d.ts.map +0 -1
  388. package/dist/channels/github/adapter-core.js +0 -27
  389. package/dist/channels/github/adapter-core.js.map +0 -1
  390. package/dist/channels/github/adapter.d.ts +0 -16
  391. package/dist/channels/github/adapter.d.ts.map +0 -1
  392. package/dist/channels/github/adapter.js +0 -52
  393. package/dist/channels/github/adapter.js.map +0 -1
  394. package/dist/channels/github/define.d.ts +0 -198
  395. package/dist/channels/github/define.d.ts.map +0 -1
  396. package/dist/channels/github/define.js +0 -166
  397. package/dist/channels/github/define.js.map +0 -1
  398. package/dist/channels/github/http.d.ts +0 -25
  399. package/dist/channels/github/http.d.ts.map +0 -1
  400. package/dist/channels/github/http.js +0 -147
  401. package/dist/channels/github/http.js.map +0 -1
  402. package/dist/channels/github/index.d.ts +0 -12
  403. package/dist/channels/github/index.d.ts.map +0 -1
  404. package/dist/channels/github/index.js +0 -10
  405. package/dist/channels/github/index.js.map +0 -1
  406. package/dist/channels/github/normalize.d.ts +0 -32
  407. package/dist/channels/github/normalize.d.ts.map +0 -1
  408. package/dist/channels/github/normalize.js +0 -152
  409. package/dist/channels/github/normalize.js.map +0 -1
  410. package/dist/channels/github/source-thread.d.ts +0 -24
  411. package/dist/channels/github/source-thread.d.ts.map +0 -1
  412. package/dist/channels/github/source-thread.js +0 -54
  413. package/dist/channels/github/source-thread.js.map +0 -1
  414. package/dist/channels/github/transport.d.ts +0 -19
  415. package/dist/channels/github/transport.d.ts.map +0 -1
  416. package/dist/channels/github/transport.js +0 -92
  417. package/dist/channels/github/transport.js.map +0 -1
  418. package/dist/channels/plugin.d.ts +0 -61
  419. package/dist/channels/plugin.d.ts.map +0 -1
  420. package/dist/channels/plugin.js +0 -80
  421. package/dist/channels/plugin.js.map +0 -1
  422. package/dist/channels/slack/define.d.ts +0 -74
  423. package/dist/channels/slack/define.d.ts.map +0 -1
  424. package/dist/channels/slack/define.js +0 -160
  425. package/dist/channels/slack/define.js.map +0 -1
  426. package/dist/connectors/github/index.d.ts +0 -78
  427. package/dist/connectors/github/index.d.ts.map +0 -1
  428. package/dist/connectors/github/index.js +0 -106
  429. package/dist/connectors/github/index.js.map +0 -1
  430. package/dist/connectors/github/sandbox.d.ts +0 -54
  431. package/dist/connectors/github/sandbox.d.ts.map +0 -1
  432. package/dist/connectors/github/sandbox.js +0 -515
  433. package/dist/connectors/github/sandbox.js.map +0 -1
  434. package/dist/connectors/langsmith/index.d.ts +0 -385
  435. package/dist/connectors/langsmith/index.d.ts.map +0 -1
  436. package/dist/connectors/langsmith/index.js +0 -431
  437. package/dist/connectors/langsmith/index.js.map +0 -1
  438. package/dist/connectors/langsmith/routes.d.ts +0 -247
  439. package/dist/connectors/langsmith/routes.d.ts.map +0 -1
  440. package/dist/connectors/langsmith/routes.js +0 -1182
  441. package/dist/connectors/langsmith/routes.js.map +0 -1
  442. package/dist/runtime/memory/seed.d.ts +0 -21
  443. package/dist/runtime/memory/seed.d.ts.map +0 -1
  444. package/dist/runtime/memory/seed.js +0 -160
  445. package/dist/runtime/memory/seed.js.map +0 -1
  446. package/dist/runtime/memory/user-repo.d.ts +0 -19
  447. package/dist/runtime/memory/user-repo.d.ts.map +0 -1
  448. package/dist/runtime/memory/user-repo.js +0 -57
  449. package/dist/runtime/memory/user-repo.js.map +0 -1
@@ -1,431 +0,0 @@
1
- /**
2
- * LangSmith connector — authoring surface.
3
- *
4
- * A capability-delegation layer for *external / untrusted* callers (browsers,
5
- * channels, schedules). The deployment declares a small set of constrained
6
- * LangSmith capabilities; MDA performs them server-side with the workspace key
7
- * and returns allowlisted responses. The browser never receives
8
- * `LANGSMITH_API_KEY`.
9
- *
10
- * This module is authoring-only: typed per-resource builders + presets that
11
- * compile to grants, plus eager validation. The runtime enforcement engine lives
12
- * in `./routes.ts` and is mounted synchronously by the
13
- * connector's `http` hook so routes register before LangGraph captures the
14
- * custom HTTP app.
15
- */
16
- import { CONNECTOR_BRAND, } from "../../runtime/connector.js";
17
- import { mountLangSmithRoutes } from "./routes.js";
18
- /** Conservative default `include` allowlists per resource (browser-safe). */
19
- const DEFAULT_INCLUDE = {
20
- runs: ["id", "status", "start_time", "end_time", "url", "metadata"],
21
- feedback: ["id", "run_id", "key", "score", "created_at"],
22
- examples: ["id", "dataset_id", "created_at"],
23
- prompts: ["name", "commit_hash", "updated_at"],
24
- threads: ["thread_id", "created_at", "metadata.title"],
25
- };
26
- /** Fields that can never reach a browser without an explicit `allowSensitive`. */
27
- const SENSITIVE_FIELDS = {
28
- runs: ["inputs", "outputs", "events"],
29
- prompts: ["content", "messages"],
30
- threads: ["messages", "values"],
31
- };
32
- /** Constraint keys each resource understands. Unknown keys fail validation. */
33
- const ALLOWED_CONSTRAINT_KEYS = {
34
- runs: [],
35
- feedback: ["keys", "scores", "maxCommentChars", "onePerActor"],
36
- examples: ["dataset", "allowedFields", "maxExamplesPerThread"],
37
- annotation_queues: ["queue", "allowedPriorities", "maxNoteChars"],
38
- prompts: [],
39
- threads: ["metadataKeys", "maxTitleChars"],
40
- };
41
- function omitUndefined(value) {
42
- return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== undefined));
43
- }
44
- /**
45
- * Build a `runs` capability grant (`read` / `share`).
46
- *
47
- * Use for redacted trace summaries and share links. Prefer {@link traceViewer}
48
- * when the default browser surface is enough.
49
- *
50
- * @param options - Grant id, surfaces, actions, scope, and optional response shaping.
51
- * @returns A compiled {@link LangSmithCapability} for the `runs` resource.
52
- *
53
- * @example
54
- * ```ts
55
- * langsmith.runs({
56
- * id: "app:run-summary",
57
- * exposeTo: ["browser"],
58
- * actions: ["read", "share"],
59
- * scope: "thread",
60
- * })
61
- * ```
62
- */
63
- export function runs(options) {
64
- return {
65
- id: options.id,
66
- exposeTo: options.exposeTo,
67
- resource: "runs",
68
- actions: options.actions,
69
- scope: options.scope,
70
- response: {
71
- include: options.include ?? DEFAULT_INCLUDE.runs,
72
- redact: options.redact ?? SENSITIVE_FIELDS.runs,
73
- },
74
- ...(options.allowSensitive
75
- ? { allowSensitive: options.allowSensitive }
76
- : {}),
77
- };
78
- }
79
- /**
80
- * Build a `feedback` capability grant (`create` / `update` / `delete`).
81
- *
82
- * Constrains keys, optional categorical scores, comment length, and
83
- * per-actor uniqueness. Prefer {@link chatFeedback} for the common browser
84
- * thumbs-up/down + dataset capture surface.
85
- *
86
- * @param options - Grant id, surfaces, actions, key/score constraints, and shaping.
87
- * @returns A compiled {@link LangSmithCapability} for the `feedback` resource.
88
- *
89
- * @example
90
- * ```ts
91
- * langsmith.feedback({
92
- * id: "app:user-score",
93
- * exposeTo: ["browser"],
94
- * actions: ["create", "update", "delete"],
95
- * scope: "run",
96
- * keys: ["user_score"],
97
- * scores: ["positive", "negative"],
98
- * onePerActor: true,
99
- * })
100
- * ```
101
- */
102
- export function feedback(options) {
103
- return {
104
- id: options.id,
105
- exposeTo: options.exposeTo,
106
- resource: "feedback",
107
- actions: options.actions,
108
- scope: options.scope ?? "run",
109
- constraints: omitUndefined({
110
- keys: options.keys,
111
- scores: options.scores,
112
- maxCommentChars: options.maxCommentChars,
113
- onePerActor: options.onePerActor,
114
- }),
115
- response: { include: options.include ?? DEFAULT_INCLUDE.feedback },
116
- };
117
- }
118
- /**
119
- * Build an `examples` capability grant (`create` into a fixed dataset).
120
- *
121
- * The dataset name is fixed in the grant so callers cannot write to arbitrary
122
- * datasets. Prefer {@link chatFeedback} when pairing with run feedback.
123
- *
124
- * @param options - Grant id, surfaces, dataset, and optional field/thread caps.
125
- * @returns A compiled {@link LangSmithCapability} for the `examples` resource.
126
- *
127
- * @example
128
- * ```ts
129
- * langsmith.examples({
130
- * id: "app:capture-thread",
131
- * exposeTo: ["browser"],
132
- * actions: ["create"],
133
- * scope: "thread",
134
- * dataset: "public-feedback",
135
- * allowedFields: ["messages", "answer", "feedback", "source"],
136
- * })
137
- * ```
138
- */
139
- export function examples(options) {
140
- return {
141
- id: options.id,
142
- exposeTo: options.exposeTo,
143
- resource: "examples",
144
- actions: options.actions,
145
- scope: options.scope ?? "thread",
146
- constraints: omitUndefined({
147
- dataset: options.dataset,
148
- allowedFields: options.allowedFields,
149
- maxExamplesPerThread: options.maxExamplesPerThread,
150
- }),
151
- response: { include: options.include ?? DEFAULT_INCLUDE.examples },
152
- };
153
- }
154
- /**
155
- * Build an `annotation_queues` capability grant (`enqueue_run` into a fixed queue).
156
- *
157
- * The queue is fixed in the grant so callers cannot enqueue into arbitrary
158
- * queues.
159
- *
160
- * @param options - Grant id, surfaces, queue, and optional priority/note limits.
161
- * @returns A compiled {@link LangSmithCapability} for the `annotation_queues` resource.
162
- *
163
- * @example
164
- * ```ts
165
- * langsmith.annotationQueues({
166
- * id: "app:enqueue-review",
167
- * exposeTo: ["trusted_backend"],
168
- * actions: ["enqueue_run"],
169
- * scope: "run",
170
- * queue: "human-review",
171
- * })
172
- * ```
173
- */
174
- export function annotationQueues(options) {
175
- return {
176
- id: options.id,
177
- exposeTo: options.exposeTo,
178
- resource: "annotation_queues",
179
- actions: options.actions,
180
- scope: options.scope ?? "run",
181
- constraints: omitUndefined({
182
- queue: options.queue,
183
- allowedPriorities: options.allowedPriorities,
184
- maxNoteChars: options.maxNoteChars,
185
- }),
186
- // Enqueue is a write with no readable body; include stays minimal.
187
- response: { include: ["id"] },
188
- };
189
- }
190
- /**
191
- * Build a `prompts` capability grant (`read_metadata`).
192
- *
193
- * Returns prompt metadata only by default; prompt body fields stay redacted.
194
- *
195
- * @param options - Grant id, surfaces, and optional response shaping.
196
- * @returns A compiled {@link LangSmithCapability} for the `prompts` resource.
197
- *
198
- * @example
199
- * ```ts
200
- * langsmith.prompts({
201
- * id: "app:prompt-meta",
202
- * exposeTo: ["browser"],
203
- * actions: ["read_metadata"],
204
- * scope: "agent",
205
- * })
206
- * ```
207
- */
208
- export function prompts(options) {
209
- return {
210
- id: options.id,
211
- exposeTo: options.exposeTo,
212
- resource: "prompts",
213
- actions: options.actions,
214
- scope: options.scope ?? "agent",
215
- response: {
216
- include: options.include ?? DEFAULT_INCLUDE.prompts,
217
- redact: options.redact ?? SENSITIVE_FIELDS.prompts,
218
- },
219
- };
220
- }
221
- /**
222
- * Build a `threads` capability grant (`read` / `update_metadata`).
223
- *
224
- * Thread message bodies stay redacted unless `allowSensitive` acknowledges
225
- * them for a browser surface.
226
- *
227
- * @param options - Grant id, surfaces, actions, metadata constraints, and shaping.
228
- * @returns A compiled {@link LangSmithCapability} for the `threads` resource.
229
- *
230
- * @example
231
- * ```ts
232
- * langsmith.threads({
233
- * id: "app:thread-title",
234
- * exposeTo: ["browser"],
235
- * actions: ["read", "update_metadata"],
236
- * scope: "actor",
237
- * metadataKeys: ["title"],
238
- * maxTitleChars: 120,
239
- * })
240
- * ```
241
- */
242
- export function threads(options) {
243
- return {
244
- id: options.id,
245
- exposeTo: options.exposeTo,
246
- resource: "threads",
247
- actions: options.actions,
248
- scope: options.scope ?? "actor",
249
- constraints: omitUndefined({
250
- metadataKeys: options.metadataKeys,
251
- maxTitleChars: options.maxTitleChars,
252
- }),
253
- response: {
254
- include: options.include ?? DEFAULT_INCLUDE.threads,
255
- redact: SENSITIVE_FIELDS.threads,
256
- },
257
- ...(options.allowSensitive
258
- ? { allowSensitive: options.allowSensitive }
259
- : {}),
260
- };
261
- }
262
- // --- Presets ---------------------------------------------------------------
263
- /**
264
- * Browser chat feedback preset: thumbs up/down on a run, plus optional dataset
265
- * capture of the conversation.
266
- *
267
- * Expands to two grants with stable capability ids (safe to hard-code in
268
- * clients):
269
- *
270
- * - `langsmith:chat-feedback` — run-scoped {@link feedback} for browsers.
271
- * Key `user_score`, scores `positive`/`negative`, comments ≤ 2000 chars,
272
- * `onePerActor: true`.
273
- * - `langsmith:chat-feedback-examples` — thread-scoped {@link examples} create
274
- * into `dataset`, allowing fields `messages`, `answer`, `feedback`, `source`.
275
- *
276
- * Pass the returned array (or spread it) into {@link connector}.
277
- *
278
- * @param options.dataset - LangSmith dataset name for the examples capability.
279
- * @returns Capability grants for feedback + example capture.
280
- *
281
- * @example
282
- * ```ts
283
- * export default langsmith.connector(
284
- * langsmith.chatFeedback({ dataset: "public-feedback" }),
285
- * );
286
- * // POST /connectors/langsmith/capabilities/langsmith:chat-feedback
287
- * ```
288
- */
289
- export function chatFeedback(options) {
290
- return [
291
- feedback({
292
- id: "langsmith:chat-feedback",
293
- exposeTo: ["browser"],
294
- actions: ["create", "update", "delete"],
295
- scope: "run",
296
- keys: ["user_score"],
297
- scores: ["positive", "negative"],
298
- maxCommentChars: 2000,
299
- onePerActor: true,
300
- }),
301
- examples({
302
- id: "langsmith:chat-feedback-examples",
303
- exposeTo: ["browser"],
304
- actions: ["create"],
305
- scope: "thread",
306
- dataset: options.dataset,
307
- allowedFields: ["messages", "answer", "feedback", "source"],
308
- }),
309
- ];
310
- }
311
- /**
312
- * Browser trace viewer preset: read a redacted run summary and create a share
313
- * link for the caller's thread.
314
- *
315
- * Expands to one grant with a stable capability id:
316
- *
317
- * - `langsmith:trace-viewer` — thread-scoped {@link runs} with actions
318
- * `read` and `share`, exposed to `browser`. Responses include
319
- * `id` / `status` / `start_time` / `end_time` / `url` / `metadata` and redact
320
- * `inputs` / `outputs` / `events` by default.
321
- *
322
- * Pass the returned array (or spread it) into {@link connector}.
323
- *
324
- * @returns Capability grant for redacted run read/share.
325
- *
326
- * @example
327
- * ```ts
328
- * export default langsmith.connector(langsmith.traceViewer());
329
- * // POST /connectors/langsmith/capabilities/langsmith:trace-viewer
330
- * ```
331
- */
332
- export function traceViewer() {
333
- return [
334
- runs({
335
- id: "langsmith:trace-viewer",
336
- exposeTo: ["browser"],
337
- actions: ["read", "share"],
338
- scope: "thread",
339
- }),
340
- ];
341
- }
342
- // --- Validation ------------------------------------------------------------
343
- /**
344
- * Fail-closed authoring checks that do not require the identity config. The
345
- * identity-dependent checks (scope/ingress sanity, tenancy) run when the
346
- * connector's `http` hook is mounted, where the resolved identity is available.
347
- */
348
- export function validateLangSmithConnector(capabilities) {
349
- if (capabilities.length === 0) {
350
- throw new Error("langsmith.connector(...) requires at least one capability.");
351
- }
352
- const seen = new Set();
353
- for (const capability of capabilities) {
354
- validateCapability(capability, seen);
355
- }
356
- }
357
- function validateCapability(capability, seen) {
358
- if (!capability.id) {
359
- throw new Error("Every LangSmith capability requires an `id`.");
360
- }
361
- if (seen.has(capability.id)) {
362
- throw new Error(`Duplicate LangSmith capability id: "${capability.id}".`);
363
- }
364
- seen.add(capability.id);
365
- if (capability.exposeTo.length === 0) {
366
- throw new Error(`LangSmith capability "${capability.id}" must declare at least one exposeTo surface.`);
367
- }
368
- if (capability.actions.length === 0) {
369
- throw new Error(`LangSmith capability "${capability.id}" must declare at least one action.`);
370
- }
371
- // Every external-surface grant needs an explicit include allowlist.
372
- const include = capability.response?.include;
373
- if (!include || include.length === 0) {
374
- throw new Error(`LangSmith capability "${capability.id}" must set response.include ` +
375
- `(fail-closed: unknown fields are dropped).`);
376
- }
377
- assertSensitiveOptIn(capability, include);
378
- assertKnownConstraintKeys(capability);
379
- }
380
- function assertSensitiveOptIn(capability, include) {
381
- const sensitive = SENSITIVE_FIELDS[capability.resource] ?? [];
382
- const acknowledged = new Set(capability.allowSensitive ?? []);
383
- const browserExposed = capability.exposeTo.includes("browser");
384
- if (!browserExposed) {
385
- return;
386
- }
387
- for (const field of include) {
388
- const root = field.split(".")[0] ?? field;
389
- if (sensitive.includes(root) && !acknowledged.has(root)) {
390
- throw new Error(`LangSmith capability "${capability.id}" includes sensitive field ` +
391
- `"${root}" for a browser surface. Add allowSensitive: ["${root}"] to ` +
392
- `acknowledge exposing it.`);
393
- }
394
- }
395
- }
396
- function assertKnownConstraintKeys(capability) {
397
- const allowed = ALLOWED_CONSTRAINT_KEYS[capability.resource];
398
- if (!capability.constraints || allowed === undefined) {
399
- return;
400
- }
401
- for (const key of Object.keys(capability.constraints)) {
402
- if (!allowed.includes(key)) {
403
- throw new Error(`LangSmith capability "${capability.id}" has unknown constraint ` +
404
- `"${key}" for resource "${capability.resource}".`);
405
- }
406
- }
407
- }
408
- /**
409
- * Build a branded LangSmith connector from capabilities (or preset-produced
410
- * capability arrays). Runs {@link validateLangSmithConnector} eagerly, then
411
- * returns a connector whose `http` hook mounts the enforcement engine.
412
- */
413
- export function connector(...capabilities) {
414
- const flat = capabilities.flat();
415
- validateLangSmithConnector(flat);
416
- const instance = {
417
- [CONNECTOR_BRAND]: true,
418
- kind: "langsmith",
419
- capabilities: flat,
420
- /**
421
- * Mount must be synchronous: `buildManagedHttpApp` does not await hooks,
422
- * and LangGraph captures custom routes at import time. A dynamic `import()`
423
- * here races that capture and leaves connector paths as platform 404s.
424
- */
425
- http(ctx) {
426
- mountLangSmithRoutes(ctx, flat);
427
- },
428
- };
429
- return instance;
430
- }
431
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/connectors/langsmith/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,eAAe,GAGhB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAkDnD,6EAA6E;AAC7E,MAAM,eAAe,GAAiD;IACpE,IAAI,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,CAAC;IACnE,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,CAAC;IACxD,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC;IAC5C,OAAO,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,YAAY,CAAC;IAC9C,OAAO,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,gBAAgB,CAAC;CACvD,CAAC;AAEF,kFAAkF;AAClF,MAAM,gBAAgB,GAAiD;IACrE,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,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EAAE,CAAC;QACtD,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CACb,yBAAyB,UAAU,CAAC,EAAE,2BAA2B;gBAC/D,IAAI,GAAG,mBAAmB,UAAU,CAAC,QAAQ,IAAI,CACpD,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAUD;;;;GAIG;AACH,MAAM,UAAU,SAAS,CACvB,GAAG,YAAgE;IAEnE,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC;IACjC,0BAA0B,CAAC,IAAI,CAAC,CAAC;IAEjC,MAAM,QAAQ,GAAG;QACf,CAAC,eAAe,CAAC,EAAE,IAAa;QAChC,IAAI,EAAE,WAAoB;QAC1B,YAAY,EAAE,IAAI;QAClB;;;;WAIG;QACH,IAAI,CAAC,GAAgB;YACnB,oBAAoB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAClC,CAAC;KACF,CAAC;IACF,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,247 +0,0 @@
1
- /**
2
- * LangSmith connector — runtime enforcement engine.
3
- *
4
- * Mounted by the connector's `http(ctx)` hook on its namespaced sub-router.
5
- * Exposes one uniform endpoint per capability:
6
- *
7
- * POST /connectors/langsmith/capabilities/{capability_id}
8
- *
9
- * with a JSON body naming the `action` and its parameters. Per request the
10
- * engine resolves identity (resolve-or-401), checks the caller surface, checks
11
- * the action, proves capability ownership from `runtime.identity`, validates typed
12
- * constraints, performs the LangSmith operation server-side with the workspace
13
- * key, and returns an allowlisted response.
14
- *
15
- * v0 has no rate limiting, audit, or multi-workspace fan-out.
16
- */
17
- import type { Example, Feedback, KVMap, Prompt, Run, ScoreType, ValueType } from "langsmith/schemas";
18
- import type { IdentityConfig, RuntimeIdentity } from "../../identity/index.js";
19
- import type { HttpContext } from "../../runtime/connector.js";
20
- import type { LangSmithCapability, LangSmithCallerSurface } from "./index.js";
21
- /**
22
- * The thin LangSmith operations the engine needs, typed against the `langsmith`
23
- * SDK's own schemas. {@link defaultClient} wraps a real {@link Client}; tests
24
- * inject a fake so the enforcement logic is verified without network or SDK
25
- * specifics.
26
- *
27
- * A connector "score" is a categorical value (e.g. `"positive"`), so it maps to
28
- * a LangSmith `score` when numeric/boolean and to a feedback `value` otherwise —
29
- * hence the `ScoreType | ValueType` inputs.
30
- */
31
- export interface LangSmithClient {
32
- createFeedback(input: {
33
- runId: string;
34
- key: string;
35
- score?: ScoreType | ValueType;
36
- comment?: string;
37
- feedbackId?: string;
38
- metadata?: KVMap;
39
- }): Promise<Feedback>;
40
- updateFeedback(input: {
41
- feedbackId: string;
42
- score?: ScoreType | ValueType;
43
- comment?: string;
44
- }): Promise<void>;
45
- deleteFeedback(input: {
46
- feedbackId: string;
47
- }): Promise<void>;
48
- listFeedbackForRun(input: {
49
- runId: string;
50
- }): Promise<Feedback[]>;
51
- readFeedback(input: {
52
- feedbackId: string;
53
- }): Promise<Feedback>;
54
- readRun(input: {
55
- runId: string;
56
- }): Promise<Run>;
57
- shareRun(input: {
58
- runId: string;
59
- }): Promise<{
60
- url: string;
61
- }>;
62
- createExample(input: {
63
- dataset: string;
64
- inputs: KVMap;
65
- outputs?: KVMap;
66
- metadata?: KVMap;
67
- }): Promise<Example>;
68
- listExamples(input: {
69
- dataset: string;
70
- metadata?: KVMap;
71
- }): Promise<Example[]>;
72
- enqueueRun(input: {
73
- queue: string;
74
- runId: string;
75
- priority?: string;
76
- note?: string;
77
- }): Promise<void>;
78
- readPrompt(input: {
79
- name: string;
80
- }): Promise<Prompt | null>;
81
- readThread(input: {
82
- threadId: string;
83
- }): Promise<Run>;
84
- updateThreadMetadata(input: {
85
- threadId: string;
86
- metadata: KVMap;
87
- }): Promise<void>;
88
- }
89
- /** An error carrying an HTTP status the engine surfaces to the caller. */
90
- export declare class EnforcementError extends Error {
91
- readonly status: number;
92
- /**
93
- * @param status - HTTP status code returned to the caller.
94
- * @param message - Human-readable error detail.
95
- */
96
- constructor(status: number, message: string);
97
- }
98
- /** Options the engine handler closes over. */
99
- export interface HandlerDeps {
100
- capabilitiesById: Map<string, LangSmithCapability>;
101
- client: LangSmithClient;
102
- identityConfig?: IdentityConfig;
103
- /**
104
- * Prove the caller may access a LangGraph thread. Required when binding a
105
- * client-supplied thread id (browser connector path). Injected in tests;
106
- * production defaults to a same-origin `GET /threads/{id}` ownership check.
107
- */
108
- assertThreadAccess?: AssertThreadAccess;
109
- }
110
- /**
111
- * Fail closed unless the authenticated caller may access `threadId`.
112
- *
113
- * @param threadId - LangGraph thread id to authorize.
114
- * @returns Resolves when access is allowed; rejects with `EnforcementError` on denial.
115
- */
116
- export type AssertThreadAccess = (threadId: string) => Promise<void>;
117
- /**
118
- * Mount the capability route on the connector's namespaced sub-router. Runs the
119
- * identity-dependent authoring checks at mount time (fails startup on an illegal
120
- * scope/ingress combination), then registers the uniform POST endpoint.
121
- *
122
- * @param ctx - HTTP mount context with the namespaced router and identity config.
123
- * @param capabilities - Declared LangSmith capabilities to expose.
124
- * @param client - LangSmith client used for server-side operations; defaults to {@link defaultClient}.
125
- */
126
- export declare function mountLangSmithRoutes(ctx: HttpContext, capabilities: LangSmithCapability[], client?: LangSmithClient): void;
127
- /**
128
- * Identity-aware authoring validation, run when the app is constructed.
129
- * Rejects illegal scope/ingress combinations before any request is served.
130
- *
131
- * @param capabilities - Declared LangSmith capabilities to validate.
132
- * @param identity - Deployment identity config, or `undefined` when identity is not configured.
133
- * @throws {Error} When a capability's scope, exposure, or tenancy is illegal for this deployment.
134
- */
135
- export declare function validateAgainstIdentity(capabilities: LangSmithCapability[], identity: IdentityConfig | undefined): void;
136
- /**
137
- * Per-request enforcement pipeline for a capability POST.
138
- * Resolves the capability, checks surface/action, proves thread ownership when
139
- * needed, enforces scope, performs the LangSmith call, and shapes the response.
140
- *
141
- * @param request - Incoming HTTP request for `/capabilities/:id`.
142
- * @param identity - Frozen runtime identity resolved by the secure router.
143
- * @param deps - Closed-over capabilities map, LangSmith client, and optional access prover.
144
- * @returns JSON `Response` with `{ data }` on success or `{ error }` on failure.
145
- */
146
- export declare function handleCapabilityRequest(request: Request, identity: RuntimeIdentity, deps: HandlerDeps): Promise<Response>;
147
- /**
148
- * Map the resolved identity + ingress mode to a caller surface.
149
- *
150
- * @param identity - Frozen runtime identity for this request.
151
- * @param identityConfig - Deployment identity config (ingress mode).
152
- * @returns The surface used for `exposeTo` checks (`browser`, `trusted_backend`, `channel`, or `schedule`).
153
- */
154
- export declare function callerSurface(identity: RuntimeIdentity, identityConfig: IdentityConfig | undefined): LangSmithCallerSurface;
155
- /**
156
- * Attach a proven thread id onto a copy of the identity envelope.
157
- * Returns the same object when the identity already carries that thread id.
158
- *
159
- * @param identity - Frozen runtime identity to copy.
160
- * @param threadId - Proven thread id to bind onto `source.threadId`.
161
- * @returns Identity with `source.threadId` set to `threadId`.
162
- */
163
- export declare function withIdentityThread(identity: RuntimeIdentity, threadId: string): RuntimeIdentity;
164
- /**
165
- * Resolve the thread id for a thread/run-scoped capability and prove access
166
- * when it did not come from the trusted identity envelope.
167
- *
168
- * - identity `source.threadId` (server-derived from agent runs) is trusted
169
- * - LangSmith run session/thread (when `run_id` is present) is authoritative
170
- * - bare body `threadId`/`thread_id` (no identity thread, no run) requires
171
- * {@link AssertThreadAccess}
172
- *
173
- * @param capability - Capability whose `scope` drives whether a thread id is required.
174
- * @param identity - Frozen runtime identity for this request.
175
- * @param body - Parsed JSON request body.
176
- * @param client - LangSmith client used to load a run when `run_id` is present.
177
- * @param assertThreadAccess - Ownership prover for bare body thread ids.
178
- * @returns Proven thread id, or the identity thread id for non-thread/run scopes.
179
- * @throws {EnforcementError} On missing/mismatched thread ids or failed ownership proof.
180
- */
181
- export declare function resolveProvenThreadId(capability: LangSmithCapability, identity: RuntimeIdentity, body: Record<string, unknown>, client: LangSmithClient, assertThreadAccess: AssertThreadAccess): Promise<string | undefined>;
182
- /**
183
- * Build the default ownership proof: `GET /threads/{id}` with the caller's
184
- * credentials and require `metadata.owner` to match the identity's thread-owner key.
185
- *
186
- * @param request - Incoming request whose auth headers are forwarded to the thread GET.
187
- * @param identity - Frozen runtime identity used to derive the expected owner key.
188
- * @param identityConfig - Deployment identity config (`scoping.threads`).
189
- * @returns An `AssertThreadAccess` function closed over the request and expected owner.
190
- */
191
- export declare function defaultAssertThreadAccess(request: Request, identity: RuntimeIdentity, identityConfig: IdentityConfig | undefined): AssertThreadAccess;
192
- /**
193
- * Prove the capability's ownership scope from `runtime.identity` before the
194
- * LangSmith call. Thread id must already be present on identity when required
195
- * (see {@link resolveProvenThreadId}).
196
- *
197
- * @param capability - Capability whose `scope` is enforced.
198
- * @param identity - Identity with any proven thread id already bound.
199
- * @param body - Parsed JSON request body (used for run-scoped `run_id` checks).
200
- * @param client - LangSmith client used to load runs for run-scope verification.
201
- * @throws {EnforcementError} When the identity lacks the required scope fields or the run is foreign.
202
- */
203
- export declare function assertCapabilityScope(capability: LangSmithCapability, identity: RuntimeIdentity, body: Record<string, unknown>, client: LangSmithClient): Promise<void>;
204
- /**
205
- * Apply the capability's `include` allowlist, then drop any `redact` roots.
206
- *
207
- * @param raw - Full LangSmith result coerced to a plain record.
208
- * @param capability - Capability whose `response.include` / `response.redact` apply.
209
- * @returns Allowlisted (and redacted) response object returned to the caller.
210
- */
211
- export declare function shapeResponse(raw: Record<string, unknown>, capability: LangSmithCapability): Record<string, unknown>;
212
- /**
213
- * Read a required string from the body, accepting either camelCase or snake_case.
214
- *
215
- * @param body - Parsed JSON request body.
216
- * @param camel - Preferred camelCase field name (used in error messages).
217
- * @param snake - Alternate snake_case field name.
218
- * @returns Non-empty string from either key.
219
- * @throws {EnforcementError} When neither key yields a non-empty string.
220
- */
221
- export declare function bodyString(body: Record<string, unknown>, camel: string, snake: string): string;
222
- /**
223
- * Resolve the LangSmith workspace id used for `X-Tenant-Id`.
224
- *
225
- * Org-scoped / multi-workspace API keys default to the key's home workspace
226
- * unless scoped. Prefer `LANGSMITH_WORKSPACE_ID` (SDK standard); fall back to
227
- * `LANGSMITH_TENANT_ID` (deploy CLI / platform legacy name for the same id).
228
- *
229
- * @param env - Environment map; defaults to `process.env`.
230
- * @returns Trimmed workspace id, or `undefined` when unset.
231
- */
232
- export declare function resolveLangSmithWorkspaceId(env?: NodeJS.ProcessEnv): string | undefined;
233
- /**
234
- * Default client backed by the `langsmith` SDK {@link Client}. The underlying
235
- * client is created on first use so building the engine (e.g. for an app with no
236
- * requests yet) never requires `LANGSMITH_API_KEY`.
237
- *
238
- * Passes {@link resolveLangSmithWorkspaceId} so run/feedback calls target the
239
- * deployment workspace rather than the API key's default tenant.
240
- *
241
- * A connector "score" is numeric/boolean → LangSmith `score`, or categorical
242
- * (string/object) → LangSmith feedback `value`.
243
- *
244
- * @returns `LangSmithClient` adapter over the official SDK.
245
- */
246
- export declare function defaultClient(): LangSmithClient;
247
- //# sourceMappingURL=routes.d.ts.map