managed-deepagents 0.5.0-dev.89 → 0.5.0-dev.96

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 (275) hide show
  1. package/README.md +36 -37
  2. package/dist/channels/index.d.ts +6 -5
  3. package/dist/channels/index.d.ts.map +1 -1
  4. package/dist/channels/index.js +6 -5
  5. package/dist/channels/index.js.map +1 -1
  6. package/dist/channels/manifest.d.ts +1 -1
  7. package/dist/channels/manifest.d.ts.map +1 -1
  8. package/dist/channels/messaging-registry.d.ts +8 -4
  9. package/dist/channels/messaging-registry.d.ts.map +1 -1
  10. package/dist/channels/messaging-registry.js +22 -16
  11. package/dist/channels/messaging-registry.js.map +1 -1
  12. package/dist/channels/registry-types.d.ts +1 -1
  13. package/dist/channels/registry-types.d.ts.map +1 -1
  14. package/dist/channels/registry.d.ts.map +1 -1
  15. package/dist/channels/registry.js +1 -3
  16. package/dist/channels/registry.js.map +1 -1
  17. package/dist/channels/schedule-delivery.js +1 -1
  18. package/dist/channels/schedule-delivery.js.map +1 -1
  19. package/dist/{connectors → channels}/slack/adapter-core.d.ts +1 -1
  20. package/dist/channels/slack/adapter-core.d.ts.map +1 -0
  21. package/dist/channels/slack/adapter-core.js.map +1 -0
  22. package/dist/{connectors → channels}/slack/adapter.d.ts +3 -3
  23. package/dist/channels/slack/adapter.d.ts.map +1 -0
  24. package/dist/{connectors → channels}/slack/adapter.js +0 -1
  25. package/dist/channels/slack/adapter.js.map +1 -0
  26. package/dist/{connectors → channels}/slack/http.d.ts +7 -5
  27. package/dist/channels/slack/http.d.ts.map +1 -0
  28. package/dist/{connectors → channels}/slack/http.js +46 -11
  29. package/dist/channels/slack/http.js.map +1 -0
  30. package/dist/channels/slack/index.d.ts +104 -0
  31. package/dist/channels/slack/index.d.ts.map +1 -0
  32. package/dist/channels/slack/index.js +151 -0
  33. package/dist/channels/slack/index.js.map +1 -0
  34. package/dist/{connectors → channels}/slack/normalize.d.ts +7 -4
  35. package/dist/channels/slack/normalize.d.ts.map +1 -0
  36. package/dist/{connectors → channels}/slack/normalize.js +47 -11
  37. package/dist/channels/slack/normalize.js.map +1 -0
  38. package/dist/channels/slack/source-thread.d.ts.map +1 -0
  39. package/dist/channels/slack/source-thread.js.map +1 -0
  40. package/dist/{connectors → channels}/slack/transport.d.ts +1 -1
  41. package/dist/channels/slack/transport.d.ts.map +1 -0
  42. package/dist/{connectors → channels}/slack/transport.js +1 -1
  43. package/dist/channels/slack/transport.js.map +1 -0
  44. package/dist/channels/store.d.ts +14 -0
  45. package/dist/channels/store.d.ts.map +1 -1
  46. package/dist/channels/store.js +41 -27
  47. package/dist/channels/store.js.map +1 -1
  48. package/dist/connectors/slack/index.d.ts +10 -79
  49. package/dist/connectors/slack/index.d.ts.map +1 -1
  50. package/dist/connectors/slack/index.js +24 -127
  51. package/dist/connectors/slack/index.js.map +1 -1
  52. package/dist/connectors/toolserver/catalog.d.ts +4 -10
  53. package/dist/connectors/toolserver/catalog.d.ts.map +1 -1
  54. package/dist/connectors/toolserver/catalog.js +6 -54
  55. package/dist/connectors/toolserver/catalog.js.map +1 -1
  56. package/dist/connectors/toolserver/index.d.ts +5 -7
  57. package/dist/connectors/toolserver/index.d.ts.map +1 -1
  58. package/dist/connectors/toolserver/index.js +4 -6
  59. package/dist/connectors/toolserver/index.js.map +1 -1
  60. package/dist/connectors/toolserver/integrations.d.ts +4 -4
  61. package/dist/connectors/toolserver/integrations.d.ts.map +1 -1
  62. package/dist/define-deep-agent.d.ts.map +1 -1
  63. package/dist/define-deep-agent.js +9 -3
  64. package/dist/define-deep-agent.js.map +1 -1
  65. package/dist/extension.d.ts +6 -14
  66. package/dist/extension.d.ts.map +1 -1
  67. package/dist/extension.js +5 -24
  68. package/dist/extension.js.map +1 -1
  69. package/dist/identity/connect-inference.d.ts +6 -7
  70. package/dist/identity/connect-inference.d.ts.map +1 -1
  71. package/dist/identity/connect-inference.js +7 -9
  72. package/dist/identity/connect-inference.js.map +1 -1
  73. package/dist/identity/github/connect-http.d.ts +3 -4
  74. package/dist/identity/github/connect-http.d.ts.map +1 -1
  75. package/dist/identity/github/connect-http.js +7 -10
  76. package/dist/identity/github/connect-http.js.map +1 -1
  77. package/dist/identity/github/credentials-store.d.ts.map +1 -1
  78. package/dist/identity/github/credentials-store.js +26 -10
  79. package/dist/identity/github/credentials-store.js.map +1 -1
  80. package/dist/identity/github/index.d.ts +0 -2
  81. package/dist/identity/github/index.d.ts.map +1 -1
  82. package/dist/identity/github/index.js +0 -2
  83. package/dist/identity/github/index.js.map +1 -1
  84. package/dist/identity/index.d.ts +15 -71
  85. package/dist/identity/index.d.ts.map +1 -1
  86. package/dist/identity/index.js +30 -223
  87. package/dist/identity/index.js.map +1 -1
  88. package/dist/identity/oauth-env.d.ts +4 -3
  89. package/dist/identity/oauth-env.d.ts.map +1 -1
  90. package/dist/identity/oauth-env.js +4 -3
  91. package/dist/identity/oauth-env.js.map +1 -1
  92. package/dist/identity/options.d.ts +12 -72
  93. package/dist/identity/options.d.ts.map +1 -1
  94. package/dist/identity/options.js +38 -112
  95. package/dist/identity/options.js.map +1 -1
  96. package/dist/identity/slack/connect-http.d.ts +3 -1
  97. package/dist/identity/slack/connect-http.d.ts.map +1 -1
  98. package/dist/identity/slack/connect-http.js +3 -1
  99. package/dist/identity/slack/connect-http.js.map +1 -1
  100. package/dist/identity/slack/links.d.ts +3 -2
  101. package/dist/identity/slack/links.d.ts.map +1 -1
  102. package/dist/identity/slack/links.js +29 -12
  103. package/dist/identity/slack/links.js.map +1 -1
  104. package/dist/identity/types.d.ts +12 -43
  105. package/dist/identity/types.d.ts.map +1 -1
  106. package/dist/index.d.ts +8 -12
  107. package/dist/index.d.ts.map +1 -1
  108. package/dist/index.js +3 -2
  109. package/dist/index.js.map +1 -1
  110. package/dist/ingress/index.d.ts.map +1 -1
  111. package/dist/ingress/index.js +26 -10
  112. package/dist/ingress/index.js.map +1 -1
  113. package/dist/memory/define-memory.d.ts +39 -0
  114. package/dist/memory/define-memory.d.ts.map +1 -0
  115. package/dist/memory/define-memory.js +78 -0
  116. package/dist/memory/define-memory.js.map +1 -0
  117. package/dist/memory/index.d.ts +9 -0
  118. package/dist/memory/index.d.ts.map +1 -0
  119. package/dist/memory/index.js +8 -0
  120. package/dist/memory/index.js.map +1 -0
  121. package/dist/memory/instructions-middleware.d.ts +74 -0
  122. package/dist/memory/instructions-middleware.d.ts.map +1 -0
  123. package/dist/memory/instructions-middleware.js +115 -0
  124. package/dist/memory/instructions-middleware.js.map +1 -0
  125. package/dist/memory/slices.d.ts +21 -0
  126. package/dist/memory/slices.d.ts.map +1 -0
  127. package/dist/memory/slices.js +61 -0
  128. package/dist/memory/slices.js.map +1 -0
  129. package/dist/memory/types.d.ts +71 -0
  130. package/dist/memory/types.d.ts.map +1 -0
  131. package/dist/memory/types.js +10 -0
  132. package/dist/memory/types.js.map +1 -0
  133. package/dist/namespaces.d.ts +46 -90
  134. package/dist/namespaces.d.ts.map +1 -1
  135. package/dist/namespaces.js +13 -39
  136. package/dist/namespaces.js.map +1 -1
  137. package/dist/runtime/auth.d.ts +31 -19
  138. package/dist/runtime/auth.d.ts.map +1 -1
  139. package/dist/runtime/auth.js +192 -68
  140. package/dist/runtime/auth.js.map +1 -1
  141. package/dist/runtime/backend.d.ts.map +1 -1
  142. package/dist/runtime/backend.js +26 -18
  143. package/dist/runtime/backend.js.map +1 -1
  144. package/dist/runtime/channel.d.ts +91 -0
  145. package/dist/runtime/channel.d.ts.map +1 -0
  146. package/dist/runtime/channel.js +98 -0
  147. package/dist/runtime/channel.js.map +1 -0
  148. package/dist/runtime/connector.d.ts +1 -1
  149. package/dist/runtime/connector.js +5 -1
  150. package/dist/runtime/connector.js.map +1 -1
  151. package/dist/runtime/cors.d.ts +1 -1
  152. package/dist/runtime/cors.d.ts.map +1 -1
  153. package/dist/runtime/cors.js +5 -1
  154. package/dist/runtime/cors.js.map +1 -1
  155. package/dist/runtime/http.d.ts +1 -2
  156. package/dist/runtime/http.d.ts.map +1 -1
  157. package/dist/runtime/http.js +1 -2
  158. package/dist/runtime/http.js.map +1 -1
  159. package/dist/runtime/identity-http.d.ts +9 -6
  160. package/dist/runtime/identity-http.d.ts.map +1 -1
  161. package/dist/runtime/identity-http.js +67 -42
  162. package/dist/runtime/identity-http.js.map +1 -1
  163. package/dist/runtime/identity-runtime.d.ts +0 -18
  164. package/dist/runtime/identity-runtime.d.ts.map +1 -1
  165. package/dist/runtime/identity-runtime.js +0 -27
  166. package/dist/runtime/identity-runtime.js.map +1 -1
  167. package/dist/runtime/index.d.ts +4 -3
  168. package/dist/runtime/index.d.ts.map +1 -1
  169. package/dist/runtime/index.js +33 -31
  170. package/dist/runtime/index.js.map +1 -1
  171. package/dist/runtime/memory/index.d.ts +0 -3
  172. package/dist/runtime/memory/index.d.ts.map +1 -1
  173. package/dist/runtime/memory/index.js +0 -3
  174. package/dist/runtime/memory/index.js.map +1 -1
  175. package/dist/runtime/memory/mounts.d.ts +2 -10
  176. package/dist/runtime/memory/mounts.d.ts.map +1 -1
  177. package/dist/runtime/memory/mounts.js +3 -11
  178. package/dist/runtime/memory/mounts.js.map +1 -1
  179. package/dist/runtime/sandbox-manager.d.ts +5 -0
  180. package/dist/runtime/sandbox-manager.d.ts.map +1 -1
  181. package/dist/runtime/sandbox-manager.js +21 -15
  182. package/dist/runtime/sandbox-manager.js.map +1 -1
  183. package/dist/runtime/sandbox-stream-retry.d.ts +15 -7
  184. package/dist/runtime/sandbox-stream-retry.d.ts.map +1 -1
  185. package/dist/runtime/sandbox-stream-retry.js +24 -12
  186. package/dist/runtime/sandbox-stream-retry.js.map +1 -1
  187. package/dist/runtime/types.d.ts +16 -0
  188. package/dist/runtime/types.d.ts.map +1 -1
  189. package/dist/runtime/validated-token.d.ts +7 -12
  190. package/dist/runtime/validated-token.d.ts.map +1 -1
  191. package/dist/runtime/validated-token.js +10 -66
  192. package/dist/runtime/validated-token.js.map +1 -1
  193. package/dist/sandbox.d.ts +16 -38
  194. package/dist/sandbox.d.ts.map +1 -1
  195. package/dist/sandbox.js +9 -16
  196. package/dist/sandbox.js.map +1 -1
  197. package/dist/types.d.ts +4 -3
  198. package/dist/types.d.ts.map +1 -1
  199. package/dist/types.js.map +1 -1
  200. package/package.json +8 -8
  201. package/dist/connectors/github/adapter-core.d.ts +0 -15
  202. package/dist/connectors/github/adapter-core.d.ts.map +0 -1
  203. package/dist/connectors/github/adapter-core.js +0 -52
  204. package/dist/connectors/github/adapter-core.js.map +0 -1
  205. package/dist/connectors/github/define.d.ts +0 -168
  206. package/dist/connectors/github/define.d.ts.map +0 -1
  207. package/dist/connectors/github/define.js +0 -72
  208. package/dist/connectors/github/define.js.map +0 -1
  209. package/dist/connectors/github/http.d.ts +0 -25
  210. package/dist/connectors/github/http.d.ts.map +0 -1
  211. package/dist/connectors/github/http.js +0 -146
  212. package/dist/connectors/github/http.js.map +0 -1
  213. package/dist/connectors/github/index.d.ts +0 -121
  214. package/dist/connectors/github/index.d.ts.map +0 -1
  215. package/dist/connectors/github/index.js +0 -192
  216. package/dist/connectors/github/index.js.map +0 -1
  217. package/dist/connectors/github/match.d.ts +0 -20
  218. package/dist/connectors/github/match.d.ts.map +0 -1
  219. package/dist/connectors/github/match.js +0 -41
  220. package/dist/connectors/github/match.js.map +0 -1
  221. package/dist/connectors/github/normalize.d.ts +0 -32
  222. package/dist/connectors/github/normalize.d.ts.map +0 -1
  223. package/dist/connectors/github/normalize.js +0 -152
  224. package/dist/connectors/github/normalize.js.map +0 -1
  225. package/dist/connectors/github/sandbox.d.ts +0 -54
  226. package/dist/connectors/github/sandbox.d.ts.map +0 -1
  227. package/dist/connectors/github/sandbox.js +0 -532
  228. package/dist/connectors/github/sandbox.js.map +0 -1
  229. package/dist/connectors/github/source-thread.d.ts +0 -24
  230. package/dist/connectors/github/source-thread.d.ts.map +0 -1
  231. package/dist/connectors/github/source-thread.js +0 -54
  232. package/dist/connectors/github/source-thread.js.map +0 -1
  233. package/dist/connectors/github/transport.d.ts +0 -25
  234. package/dist/connectors/github/transport.d.ts.map +0 -1
  235. package/dist/connectors/github/transport.js +0 -106
  236. package/dist/connectors/github/transport.js.map +0 -1
  237. package/dist/connectors/langsmith/index.d.ts +0 -397
  238. package/dist/connectors/langsmith/index.d.ts.map +0 -1
  239. package/dist/connectors/langsmith/index.js +0 -436
  240. package/dist/connectors/langsmith/index.js.map +0 -1
  241. package/dist/connectors/langsmith/routes.d.ts +0 -236
  242. package/dist/connectors/langsmith/routes.d.ts.map +0 -1
  243. package/dist/connectors/langsmith/routes.js +0 -1154
  244. package/dist/connectors/langsmith/routes.js.map +0 -1
  245. package/dist/connectors/slack/adapter-core.d.ts.map +0 -1
  246. package/dist/connectors/slack/adapter-core.js.map +0 -1
  247. package/dist/connectors/slack/adapter.d.ts.map +0 -1
  248. package/dist/connectors/slack/adapter.js.map +0 -1
  249. package/dist/connectors/slack/http.d.ts.map +0 -1
  250. package/dist/connectors/slack/http.js.map +0 -1
  251. package/dist/connectors/slack/normalize.d.ts.map +0 -1
  252. package/dist/connectors/slack/normalize.js.map +0 -1
  253. package/dist/connectors/slack/source-thread.d.ts.map +0 -1
  254. package/dist/connectors/slack/source-thread.js.map +0 -1
  255. package/dist/connectors/slack/transport.d.ts.map +0 -1
  256. package/dist/connectors/slack/transport.js.map +0 -1
  257. package/dist/identity/memory-slices.d.ts +0 -21
  258. package/dist/identity/memory-slices.d.ts.map +0 -1
  259. package/dist/identity/memory-slices.js +0 -105
  260. package/dist/identity/memory-slices.js.map +0 -1
  261. package/dist/runtime/memory/lazy-context-backend.d.ts +0 -74
  262. package/dist/runtime/memory/lazy-context-backend.d.ts.map +0 -1
  263. package/dist/runtime/memory/lazy-context-backend.js +0 -166
  264. package/dist/runtime/memory/lazy-context-backend.js.map +0 -1
  265. package/dist/runtime/memory/seed.d.ts +0 -30
  266. package/dist/runtime/memory/seed.d.ts.map +0 -1
  267. package/dist/runtime/memory/seed.js +0 -199
  268. package/dist/runtime/memory/seed.js.map +0 -1
  269. package/dist/runtime/memory/user-repo.d.ts +0 -18
  270. package/dist/runtime/memory/user-repo.d.ts.map +0 -1
  271. package/dist/runtime/memory/user-repo.js +0 -50
  272. package/dist/runtime/memory/user-repo.js.map +0 -1
  273. /package/dist/{connectors → channels}/slack/adapter-core.js +0 -0
  274. /package/dist/{connectors → channels}/slack/source-thread.d.ts +0 -0
  275. /package/dist/{connectors → channels}/slack/source-thread.js +0 -0
@@ -0,0 +1,71 @@
1
+ /**
2
+ * The `defineMemory(...)` input and the resolved contract the runtime reads.
3
+ *
4
+ * Durable memory is opt-in and owned by one root declaration: a project with no
5
+ * `memory.ts` mounts nothing. The resolved form is a list of slices rather than a
6
+ * flag, so later slice kinds (a private user slice, a group mount keyed by a JWT
7
+ * claim) are data the runtime already knows how to carry — not a new shape.
8
+ */
9
+ /**
10
+ * One enabled memory mount after normalize. Mounts are always read/write.
11
+ *
12
+ * One kind today. The resolved shape is a list so later kinds (a private user
13
+ * slice, a group mount keyed by a claim) are added here without changing what
14
+ * consumers read.
15
+ */
16
+ export type ResolvedMemorySlice = {
17
+ kind: "agent";
18
+ };
19
+ /** Slice kinds the runtime can mount, authorable or not. */
20
+ export type MemorySliceKind = ResolvedMemorySlice["kind"];
21
+ /**
22
+ * Resolved durable memory: which slices are mounted.
23
+ *
24
+ * Empty array means no durable memory.
25
+ */
26
+ export type MemoryScope = ResolvedMemorySlice[];
27
+ /**
28
+ * Authoring form of a single memory slice.
29
+ *
30
+ * Deployment-shared agent memory is the whole launch surface. `"user"` and the
31
+ * object slice form (`{ kind, mount, access }`) are recognized and rejected with
32
+ * a "not implemented yet" error rather than being silently accepted.
33
+ */
34
+ export type MemorySliceInput = "agent";
35
+ /**
36
+ * Authoring form of `defineMemory({ scope })`.
37
+ *
38
+ * - `"none"` / `[]` / omitted — no durable memory
39
+ * - `"agent"` / `["agent"]` — deployment-shared memory at `/memories/agent/`
40
+ */
41
+ export type MemoryScopeInput = "none" | MemorySliceInput | MemorySliceInput[];
42
+ /** The memory declaration. Every key is optional. */
43
+ export interface MemoryOptions {
44
+ /**
45
+ * Which memory slices runs of this deployment may use. Defaults to `"none"`,
46
+ * so a declaration that names no scope mounts nothing.
47
+ */
48
+ scope?: MemoryScopeInput;
49
+ }
50
+ /**
51
+ * The resolved memory contract the managed runtime reads.
52
+ *
53
+ * Versioned because the authoring surface will grow slice kinds and per-slice
54
+ * options: a consumer can branch on `version` instead of guessing from shape.
55
+ */
56
+ export interface MemoryConfig {
57
+ readonly version: 1;
58
+ /** Enabled slices, agent first (empty = no durable memory). */
59
+ readonly slices: MemoryScope;
60
+ }
61
+ /**
62
+ * The pre-runtime spec returned by `defineMemory`.
63
+ *
64
+ * The CLI discovers the `memory` export from a root `memory.{ts,tsx,mts,cts}`
65
+ * and hands this config to the managed runtime, which mounts the named slices.
66
+ */
67
+ export interface MemoryDefinition {
68
+ readonly kind: "memory";
69
+ readonly config: MemoryConfig;
70
+ }
71
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/memory/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpD,4DAA4D;AAC5D,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,mBAAmB,EAAE,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,gBAAgB,GAAG,gBAAgB,EAAE,CAAC;AAE9E,qDAAqD;AACrD,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;CAC9B;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;CAC/B"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The `defineMemory(...)` input and the resolved contract the runtime reads.
3
+ *
4
+ * Durable memory is opt-in and owned by one root declaration: a project with no
5
+ * `memory.ts` mounts nothing. The resolved form is a list of slices rather than a
6
+ * flag, so later slice kinds (a private user slice, a group mount keyed by a JWT
7
+ * claim) are data the runtime already knows how to carry — not a new shape.
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/memory/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
@@ -6,12 +6,9 @@
6
6
  * and providers can be added without growing the barrel:
7
7
  *
8
8
  * ```ts
9
- * connectors.slack({ on: ["app_mention"] });
10
- * connectors.github({
11
- * repositories: [{ repo: "acme/api", path: "api" }],
12
- * events: [{ on: "pull_request.opened", prompt: () => "review" }],
13
- * });
14
- * sandboxes.langsmith({ defaultTimeout: 600 });
9
+ * channels.slack();
10
+ * connectors.slack({ includeTools: ["slack_list_channels"] });
11
+ * defineSandbox({ defaultTimeout: 600 });
15
12
  * auth.supabase({ projectRef: "abc" });
16
13
  * credentials.github({ read: ["user"] });
17
14
  * connect.github();
@@ -24,11 +21,9 @@
24
21
  * These are the only primitives the managed runtime will mount. A project
25
22
  * cannot contribute its own — `defineExtension` stays internal.
26
23
  */
27
- import { LangSmithSandbox } from "deepagents";
28
- import { githubConnector } from "./connectors/github/index.js";
29
- import { annotationQueues, chatFeedback, examples, feedback, langsmithConnector, prompts, runs, threads, traceViewer } from "./connectors/langsmith/index.js";
30
24
  import { type MarketplaceConnectors } from "./connectors/marketplace/index.js";
31
25
  import { mcpConnector } from "./connectors/mcp/index.js";
26
+ import { slackChannel } from "./channels/slack/index.js";
32
27
  import { slackConnector } from "./connectors/slack/index.js";
33
28
  import { type ToolServerConnectors } from "./connectors/toolserver/index.js";
34
29
  import { connect as githubConnect } from "./identity/github/connect-http.js";
@@ -39,34 +34,7 @@ import { connect as linkedinConnect } from "./identity/linkedin/connect-http.js"
39
34
  import { connect as microsoftConnect } from "./identity/microsoft/connect-http.js";
40
35
  import { connect as slackConnect } from "./identity/slack/connect-http.js";
41
36
  import { connect as xConnect } from "./identity/x/connect-http.js";
42
- import { type LangSmithSandboxOptions, type SandboxDefinition } from "./sandbox.js";
43
37
  export { auth } from "./identity/index.js";
44
- /** Execution environments the agent's shell runs in. Exported from `sandbox/`. */
45
- export declare const sandboxes: {
46
- langsmith(options?: LangSmithSandboxOptions): SandboxDefinition<typeof LangSmithSandbox>;
47
- };
48
- /**
49
- * `connectors.langsmith` — the connector factory plus its capability builders.
50
- *
51
- * Call `connectors.langsmith({ capabilities })` to declare the connector; use
52
- * the attached builders / presets to compose grants without a second import.
53
- *
54
- * Builder properties are typed as `typeof` the exported functions so hover
55
- * docs stay on those symbols (`runs`, `chatFeedback`, …) rather than being
56
- * restated here.
57
- *
58
- * @see {@link langsmithConnector}
59
- */
60
- export type LangSmithConnectorsNamespace = typeof langsmithConnector & {
61
- readonly runs: typeof runs;
62
- readonly feedback: typeof feedback;
63
- readonly examples: typeof examples;
64
- readonly annotationQueues: typeof annotationQueues;
65
- readonly prompts: typeof prompts;
66
- readonly threads: typeof threads;
67
- readonly chatFeedback: typeof chatFeedback;
68
- readonly traceViewer: typeof traceViewer;
69
- };
70
38
  /**
71
39
  * Integrations: tools, HTTP routes, sandbox provisioning, inbound events, and
72
40
  * named messaging. Exported from `connectors/*`.
@@ -77,11 +45,8 @@ export type LangSmithConnectorsNamespace = typeof langsmithConnector & {
77
45
  * LangSmith. They are spread from the catalog so adding an integration is one
78
46
  * entry there rather than a line here as well. Marketplace bridges
79
47
  * (`connectors.notion`, `connectors.cloudflare`, …) are spread the same way
80
- * from the Fleet marketplace catalog. GitHub and Slack are first-class
81
- * connectors that may also contribute sandbox / Events / messaging.
82
- *
83
- * `langsmith` doubles as the namespace for its capability builders, so a
84
- * project selects grants without a second import.
48
+ * from the Fleet marketplace catalog. Slack tool-server tools live here;
49
+ * Slack Events ingress lives on {@link channels}.
85
50
  *
86
51
  * Docs live on this interface (not the value) so IDE hover on `connectors.<name>`
87
52
  * stays useful — TypeScript surfaces property docs from the annotation.
@@ -104,67 +69,58 @@ export interface Connectors extends ToolServerConnectors, MarketplaceConnectors
104
69
  */
105
70
  mcp: typeof mcpConnector;
106
71
  /**
107
- * GitHub tools (via the LangSmith tool server), sandbox repository checkout,
108
- * optional `gh` CLI provisioning, and optional GitHub App webhook Events.
72
+ * Slack tool-server tools (`includeTools` / `excludeTools`). Names are typed
73
+ * from the catalog's `slack` entry.
109
74
  *
110
- * Installing the `gh` CLI (the default) leaves tool-server tools off; name
111
- * tools via `includeTools` / `excludeTools` or set `installCLI: false` to
112
- * expose them. Tool names are typed from the catalog's `github` entry.
75
+ * For Slack Events ingress / messaging, use {@link channels.slack}.
113
76
  *
114
77
  * @example
115
78
  * ```ts
116
- * export const connector = connectors.github({
117
- * repositories: [{ repo: "acme/api", path: "api" }],
118
- * events: [{ on: "pull_request.opened", prompt: () => "review" }],
79
+ * export const connector = connectors.slack({
80
+ * includeTools: ["slack_list_channels"],
119
81
  * });
120
82
  * ```
121
83
  *
122
- * @see {@link githubConnector}
123
- */
124
- github: typeof githubConnector;
125
- /**
126
- * Slack Events ingress, named messaging, and optional tool-server Slack tools.
127
- *
128
- * Events (`on`) mount ingress + messaging; `includeTools` / `excludeTools`
129
- * enable Slack tool-server tools (names typed from the catalog's `slack`
130
- * entry).
131
- *
132
- * @example
133
- * ```ts
134
- * export const connector = connectors.slack({ on: ["app_mention"] });
135
- * ```
136
- *
137
84
  * @see {@link slackConnector}
138
85
  */
139
86
  slack: typeof slackConnector;
87
+ }
88
+ /**
89
+ * Integrations: tools, HTTP routes, sandbox provisioning, inbound events, and
90
+ * named messaging. Exported from `connectors/*`.
91
+ *
92
+ * Factories are assigned by reference (same pattern as the Python namespace) so
93
+ * signatures stay in step with the connector modules. Hover docs come from
94
+ * {@link Connectors}.
95
+ */
96
+ export declare const connectors: Connectors;
97
+ /**
98
+ * Inbound messaging surfaces (Events ingress + outbound messaging). Exported
99
+ * from `channels/*`. Slack-only for now.
100
+ *
101
+ * Docs live on this interface so IDE hover on `channels.<name>` stays useful.
102
+ */
103
+ export interface Channels {
140
104
  /**
141
- * Capability-delegation connector for external / untrusted callers (browser,
142
- * channels, schedules). Declares constrained LangSmith grants; MDA performs
143
- * them server-side so the caller never receives `LANGSMITH_API_KEY`.
105
+ * Slack Events ingress, named messaging, and deploy requirements.
144
106
  *
145
- * Also namespaces the grant builders: `connectors.langsmith.runs(...)`,
146
- * `connectors.langsmith.chatFeedback(...)`, …
107
+ * Mounts public Events at `/channels/{name}/events`. For Slack tool-server
108
+ * tools, use {@link connectors.slack}.
147
109
  *
148
110
  * @example
149
111
  * ```ts
150
- * export const connector = connectors.langsmith({
151
- * capabilities: [connectors.langsmith.traceViewer()],
152
- * });
112
+ * export const channel = channels.slack();
153
113
  * ```
154
114
  *
155
- * @see {@link langsmithConnector}
115
+ * @see {@link slackChannel}
156
116
  */
157
- langsmith: LangSmithConnectorsNamespace;
117
+ slack: typeof slackChannel;
158
118
  }
159
119
  /**
160
- * Integrations: tools, HTTP routes, sandbox provisioning, inbound events, and
161
- * named messaging. Exported from `connectors/*`.
162
- *
163
- * Factories are assigned by reference (same pattern as the Python namespace) so
164
- * signatures stay in step with the connector modules. Hover docs come from
165
- * {@link Connectors}.
120
+ * Inbound messaging surfaces. Factories are assigned by reference so signatures
121
+ * stay in step with the channel modules. Hover docs come from {@link Channels}.
166
122
  */
167
- export declare const connectors: Connectors;
123
+ export declare const channels: Channels;
168
124
  /** Third-party token resolvers. Composed into `defineIdentity({ credentials })`. */
169
125
  export declare const credentials: {
170
126
  github: typeof githubCredentials;
@@ -177,12 +133,12 @@ export declare const credentials: {
177
133
  export interface Connect extends MarketplaceConnect {
178
134
  /**
179
135
  * Connect-with-GitHub — link a caller's GitHub account for actor OAuth tokens
180
- * used by sandbox git/`gh` and GitHub credentials.
136
+ * used by GitHub credentials.
181
137
  *
182
- * Usually unnecessary: declaring `connectors.github` on a user-scoped identity
183
- * deployment mounts this automatically (same pattern as Google/Microsoft).
184
- * Also mounts when a credential chain reads per-user GitHub tokens, or when
185
- * listed on `identity.connect`.
138
+ * Usually unnecessary: declaring `credentials.github(...)` on a user-scoped
139
+ * identity deployment mounts this automatically (same pattern as
140
+ * Google/Microsoft). Also mounts when a credential chain reads per-user
141
+ * GitHub tokens, or when listed on `identity.connect`.
186
142
  *
187
143
  * @example
188
144
  * ```ts
@@ -257,10 +213,10 @@ export interface Connect extends MarketplaceConnect {
257
213
  x: typeof xConnect;
258
214
  /**
259
215
  * Connect-with-Slack — link a caller's Slack identity via OIDC for per-user
260
- * channel routing and actor mapping.
216
+ * Events remapping and credential resolution.
261
217
  *
262
218
  * Mounts under `/identity/slack/*` when listed on `identity.connect`, or when
263
- * a Slack channel routes into a user-scoped deployment.
219
+ * a Slack channel routes into a user-scoped / custom-credentials deployment.
264
220
  *
265
221
  * @example
266
222
  * ```ts
@@ -286,8 +242,8 @@ export interface Connect extends MarketplaceConnect {
286
242
  * per-actor tokens for tools, sandbox git/`gh`, or Fleet toolserver subjects.
287
243
  *
288
244
  * Authors rarely list providers by hand. Prefer inference: a user-scoped
289
- * identity plus `connectors.github` / `credentials.github({ read: ["user"] })`,
290
- * Slack Events, Google/Microsoft/LinkedIn/X toolserver connectors, or marketplace
245
+ * identity plus `credentials.github({ read: ["user"] })`, Slack Events,
246
+ * Google/Microsoft/LinkedIn/X toolserver connectors, or marketplace
291
247
  * bridges (`connectors.notion`, `connectors.neon`, …) mounts the matching
292
248
  * Connect flow automatically. Use this namespace when you need an explicit
293
249
  * opt-in or a custom options bag.
@@ -1 +1 @@
1
- {"version":3,"file":"namespaces.d.ts","sourceRoot":"","sources":["../src/namespaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,OAAO,EACP,IAAI,EACJ,OAAO,EACP,WAAW,EACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,i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
@@ -6,12 +6,9 @@
6
6
  * and providers can be added without growing the barrel:
7
7
  *
8
8
  * ```ts
9
- * connectors.slack({ on: ["app_mention"] });
10
- * connectors.github({
11
- * repositories: [{ repo: "acme/api", path: "api" }],
12
- * events: [{ on: "pull_request.opened", prompt: () => "review" }],
13
- * });
14
- * sandboxes.langsmith({ defaultTimeout: 600 });
9
+ * channels.slack();
10
+ * connectors.slack({ includeTools: ["slack_list_channels"] });
11
+ * defineSandbox({ defaultTimeout: 600 });
15
12
  * auth.supabase({ projectRef: "abc" });
16
13
  * credentials.github({ read: ["user"] });
17
14
  * connect.github();
@@ -24,14 +21,11 @@
24
21
  * These are the only primitives the managed runtime will mount. A project
25
22
  * cannot contribute its own — `defineExtension` stays internal.
26
23
  */
27
- import { LangSmithSandbox } from "deepagents";
28
- import { githubConnector } from "./connectors/github/index.js";
29
- import { annotationQueues, chatFeedback, examples, feedback, langsmithConnector, prompts, runs, threads, traceViewer, } from "./connectors/langsmith/index.js";
30
24
  import { marketplaceConnectors, } from "./connectors/marketplace/index.js";
31
25
  import { mcpConnector } from "./connectors/mcp/index.js";
26
+ import { slackChannel } from "./channels/slack/index.js";
32
27
  import { slackConnector } from "./connectors/slack/index.js";
33
28
  import { toolServerConnectors, } from "./connectors/toolserver/index.js";
34
- import { defineExtension } from "./extension.js";
35
29
  import { connect as githubConnect } from "./identity/github/connect-http.js";
36
30
  import { credentials as githubCredentials } from "./identity/github/credentials.js";
37
31
  import { connect as googleConnect } from "./identity/google/connect-http.js";
@@ -40,32 +34,7 @@ import { connect as linkedinConnect } from "./identity/linkedin/connect-http.js"
40
34
  import { connect as microsoftConnect } from "./identity/microsoft/connect-http.js";
41
35
  import { connect as slackConnect } from "./identity/slack/connect-http.js";
42
36
  import { connect as xConnect } from "./identity/x/connect-http.js";
43
- import {} from "./sandbox.js";
44
37
  export { auth } from "./identity/index.js";
45
- const langsmithSandbox = defineExtension("sandbox", {
46
- label: "sandboxes.langsmith",
47
- provider: LangSmithSandbox,
48
- // Not a schema: a sandbox's options are inferred from the provider class's
49
- // own `create(...)` types, so a hand-written one would restate deepagents'
50
- // surface and drift from it.
51
- args: (options) => options ?? {},
52
- });
53
- /** Execution environments the agent's shell runs in. Exported from `sandbox/`. */
54
- export const sandboxes = {
55
- langsmith(options) {
56
- return langsmithSandbox(options);
57
- },
58
- };
59
- const langsmithConnectors = Object.assign(langsmithConnector, {
60
- runs,
61
- feedback,
62
- examples,
63
- annotationQueues,
64
- prompts,
65
- threads,
66
- chatFeedback,
67
- traceViewer,
68
- });
69
38
  /**
70
39
  * Integrations: tools, HTTP routes, sandbox provisioning, inbound events, and
71
40
  * named messaging. Exported from `connectors/*`.
@@ -78,9 +47,14 @@ export const connectors = {
78
47
  ...toolServerConnectors,
79
48
  ...marketplaceConnectors,
80
49
  mcp: mcpConnector,
81
- github: githubConnector,
82
50
  slack: slackConnector,
83
- langsmith: langsmithConnectors,
51
+ };
52
+ /**
53
+ * Inbound messaging surfaces. Factories are assigned by reference so signatures
54
+ * stay in step with the channel modules. Hover docs come from {@link Channels}.
55
+ */
56
+ export const channels = {
57
+ slack: slackChannel,
84
58
  };
85
59
  /** Third-party token resolvers. Composed into `defineIdentity({ credentials })`. */
86
60
  export const credentials = {
@@ -99,8 +73,8 @@ export const credentials = {
99
73
  * per-actor tokens for tools, sandbox git/`gh`, or Fleet toolserver subjects.
100
74
  *
101
75
  * Authors rarely list providers by hand. Prefer inference: a user-scoped
102
- * identity plus `connectors.github` / `credentials.github({ read: ["user"] })`,
103
- * Slack Events, Google/Microsoft/LinkedIn/X toolserver connectors, or marketplace
76
+ * identity plus `credentials.github({ read: ["user"] })`, Slack Events,
77
+ * Google/Microsoft/LinkedIn/X toolserver connectors, or marketplace
104
78
  * bridges (`connectors.notion`, `connectors.neon`, …) mounts the matching
105
79
  * Connect flow automatically. Use this namespace when you need an explicit
106
80
  * opt-in or a custom options bag.
@@ -1 +1 @@
1
- {"version":3,"file":"namespaces.js","sourceRoot":"","sources":["../src/namespa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;IACrB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,EAAE,eAAe;IACzB,CAAC,EAAE,QAAQ;IACX,KAAK,EAAE,YAAY;CACpB,CAAC"}
@@ -8,18 +8,24 @@ import { type IdentityConfig, type IdentityDefinition, type RuntimeIdentity } fr
8
8
  */
9
9
  /** Trusted-backend / channel-loopback identity headers (single source of truth). */
10
10
  export declare const USER_HEADER = "x-mda-user-id";
11
- /** Comma- or space-delimited group memberships. */
12
- export declare const GROUPS_HEADER = "x-mda-groups";
13
11
  export declare const INGRESS_SECRET_HEADER = "x-mda-ingress-secret";
14
12
  /**
15
- * Internal channel handoff headers. Accepted only after the ingress secret
16
- * validates — never part of the public HTTP identity surface, and deliberately
17
- * not allowlisted into `config.configurable`.
13
+ * Internal channel handoff headers. Accepted only after a server API key or
14
+ * legacy ingress secret validates — never part of the public HTTP identity
15
+ * surface, and deliberately not allowlisted into `config.configurable`.
18
16
  */
19
17
  export declare const SOURCE_PROVIDER_HEADER = "x-mda-source-provider";
20
18
  export declare const SOURCE_THREAD_HEADER = "x-mda-source-thread-id";
21
19
  /** Deployment env var carrying the shared secret the trusted backend presents. */
22
20
  export declare const INGRESS_SECRET_ENV = "MDA_INGRESS_SECRET";
21
+ /** Deploy/dev-owned credential used only for internal identity handoffs. */
22
+ export declare const HANDOFF_SECRET_ENV = "MDA_HANDOFF_SECRET";
23
+ export declare const HANDOFF_SECRET_HEADER = "x-mda-handoff-secret";
24
+ /** Platform-owned LangSmith auth configuration. */
25
+ export declare const LANGSMITH_AUTH_ENDPOINT_ENV = "LANGSMITH_AUTH_ENDPOINT";
26
+ export declare const LANGSMITH_TENANT_ID_ENV = "LANGSMITH_TENANT_ID";
27
+ export declare const LANGSMITH_API_KEY_HEADER = "x-api-key";
28
+ export declare const LANGSMITH_API_KEY_ENV = "LANGSMITH_API_KEY";
23
29
  /**
24
30
  * The user object `@auth.authenticate` returns. `identity`/`permissions` satisfy
25
31
  * the LangGraph base shape; the `mda_*` fields carry the identity envelope into
@@ -30,7 +36,7 @@ export interface ManagedUser {
30
36
  permissions: string[];
31
37
  mda_user_id: string;
32
38
  mda_user_email?: string;
33
- /** Group memberships the ingress asserted; read-only, never an isolation key. */
39
+ /** Resolved group memberships; read-only, never an isolation key. */
34
40
  mda_groups?: string[];
35
41
  mda_claims?: Record<string, unknown>;
36
42
  /** Trusted source provider stamped by managed ingress (never client-supplied). */
@@ -42,10 +48,8 @@ export interface ManagedUser {
42
48
  /**
43
49
  * Build the managed LangGraph custom-auth handler from a declared identity.
44
50
  *
45
- * Handles both ingress modes: `trusted_backend` (reserved headers behind a
46
- * shared ingress secret) and `validated_token` (browser-direct IdP tokens
47
- * verified via JWKS / introspection / MDA-signed guest). Also registers thread
48
- * and store scoping with a studio bypass.
51
+ * Handles trusted-backend, LangSmith API-key, and validated-token ingress.
52
+ * Also registers thread and store scoping with a studio bypass.
49
53
  */
50
54
  export declare function buildManagedAuth(identity: IdentityDefinition): Auth;
51
55
  /**
@@ -72,11 +76,19 @@ export declare const GITHUB_CREDENTIALS_STORE_PREFIX = "mda_github_credentials";
72
76
  */
73
77
  export declare const IDENTITY_LINKS_SERVICE_USER = "mda:identity-links";
74
78
  /**
75
- * Fail-closed (403) unless the store `namespace` contains the caller id as a
76
- * contiguous ordered prefix (typically after the deployment id). No user slice
77
- * no per-identity restriction.
79
+ * Fail-closed (403) on the managed reserved namespaces.
80
+ *
81
+ * `mda_identity_links` and `mda_github_credentials` are deployment-wide managed
82
+ * tables — account links and OAuth tokens for every caller — so only the trusted
83
+ * identity-links service principal may touch them. This check deliberately does
84
+ * not consult memory: it used to sit behind a per-caller memory check, which left
85
+ * the tables open to any authenticated caller on deployments without a user
86
+ * slice.
87
+ *
88
+ * There is no per-caller store partition to enforce beyond that, because no
89
+ * declaration mounts per-caller state in this release.
78
90
  */
79
- export declare function assertStoreAccess(cfg: IdentityConfig, user: ManagedUser, value: unknown): void;
91
+ export declare function assertStoreAccess(user: ManagedUser, value: unknown): void;
80
92
  /** True when `required` appears as a contiguous ordered subsequence of `namespace`. */
81
93
  export declare function namespaceHasOrderedSegments(namespace: string[], required: string[]): boolean;
82
94
  /**
@@ -93,6 +105,8 @@ export declare function namespaceHasOrderedSegments(namespace: string[], require
93
105
  * loopback handoff — ordinary clients without the secret cannot stamp them.
94
106
  */
95
107
  export declare function resolveTrustedBackendUser(cfg: IdentityConfig, request: Request): ManagedUser;
108
+ /** Verify a LangSmith API key without replacing MDA's authorization hooks. */
109
+ export declare function resolveLangSmithApiKeyUser(request: Request): Promise<ManagedUser>;
96
110
  /**
97
111
  * Under `mda dev`, synthetic local/Companion service principals are unscoped
98
112
  * for thread search + store so authors can see Studio-created Local threads.
@@ -108,14 +122,12 @@ export declare function isLocalDevUnscopedUser(user: unknown): boolean;
108
122
  export declare function tryLocalDevTrustedUser(_cfg: IdentityConfig, request: Request): ManagedUser | null;
109
123
  /** Derive the owner value `@auth.on.threads` filters on (the caller user id). */
110
124
  export declare function threadOwnerKey(user: ManagedUser): string;
111
- /** True when this deployment exposes guest issuance and the request targets it. */
112
- export declare function isGuestIssuanceRequest(request: Request, cfg: IdentityConfig): boolean;
113
- /** True when the request targets a public connector Events ingress route. */
125
+ /** True when the request targets a public channel/connector Events ingress route. */
114
126
  export declare function isChannelEventsRequest(request: Request): boolean;
115
127
  /** True when the request is a public identity-provider OAuth/OIDC callback. */
116
128
  export declare function isIdentityProviderCallbackRequest(request: Request): boolean;
117
- /** Placeholder identity so LangGraph auth middleware allows tokenless issuance. */
118
- export declare function guestIssuanceBypassUser(): ManagedUser;
129
+ /** Placeholder identity so LangGraph auth middleware allows public routes. */
130
+ export declare function publicRouteBypassUser(): ManagedUser;
119
131
  /** Placeholder identity so middleware allows provider-signed channel Events. */
120
132
  export declare function channelEventsBypassUser(): ManagedUser;
121
133
  //# sourceMappingURL=auth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/runtime/auth.ts"],"names":[],"mappings":"AAAA,OA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