@agent-native/core 0.32.1 → 0.32.17

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 (240) hide show
  1. package/README.md +3 -1
  2. package/dist/agent/run-store.d.ts.map +1 -1
  3. package/dist/agent/run-store.js +48 -10
  4. package/dist/agent/run-store.js.map +1 -1
  5. package/dist/agent/thread-data-builder.d.ts +12 -0
  6. package/dist/agent/thread-data-builder.d.ts.map +1 -1
  7. package/dist/agent/thread-data-builder.js +104 -6
  8. package/dist/agent/thread-data-builder.js.map +1 -1
  9. package/dist/cli/app-skill.js +2 -2
  10. package/dist/cli/app-skill.js.map +1 -1
  11. package/dist/cli/code-agent-executor.d.ts.map +1 -1
  12. package/dist/cli/code-agent-executor.js +6 -1
  13. package/dist/cli/code-agent-executor.js.map +1 -1
  14. package/dist/cli/code-agent-output-smoother.d.ts +7 -0
  15. package/dist/cli/code-agent-output-smoother.d.ts.map +1 -0
  16. package/dist/cli/code-agent-output-smoother.js +111 -0
  17. package/dist/cli/code-agent-output-smoother.js.map +1 -0
  18. package/dist/cli/connect.d.ts.map +1 -1
  19. package/dist/cli/connect.js +5 -0
  20. package/dist/cli/connect.js.map +1 -1
  21. package/dist/cli/migrate.d.ts.map +1 -1
  22. package/dist/cli/migrate.js +17 -42
  23. package/dist/cli/migrate.js.map +1 -1
  24. package/dist/cli/skills.d.ts +23 -2
  25. package/dist/cli/skills.d.ts.map +1 -1
  26. package/dist/cli/skills.js +405 -41
  27. package/dist/cli/skills.js.map +1 -1
  28. package/dist/cli/templates-meta.d.ts.map +1 -1
  29. package/dist/cli/templates-meta.js +7 -105
  30. package/dist/cli/templates-meta.js.map +1 -1
  31. package/dist/client/AgentPanel.d.ts.map +1 -1
  32. package/dist/client/AgentPanel.js +41 -7
  33. package/dist/client/AgentPanel.js.map +1 -1
  34. package/dist/client/AgentTaskCard.d.ts.map +1 -1
  35. package/dist/client/AgentTaskCard.js +0 -28
  36. package/dist/client/AgentTaskCard.js.map +1 -1
  37. package/dist/client/AssistantChat.d.ts +8 -23
  38. package/dist/client/AssistantChat.d.ts.map +1 -1
  39. package/dist/client/AssistantChat.js +359 -205
  40. package/dist/client/AssistantChat.js.map +1 -1
  41. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  42. package/dist/client/MultiTabAssistantChat.js +254 -14
  43. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  44. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  45. package/dist/client/agent-chat-adapter.js +14 -9
  46. package/dist/client/agent-chat-adapter.js.map +1 -1
  47. package/dist/client/agent-chat.d.ts +24 -0
  48. package/dist/client/agent-chat.d.ts.map +1 -1
  49. package/dist/client/agent-chat.js +73 -0
  50. package/dist/client/agent-chat.js.map +1 -1
  51. package/dist/client/assistant-ui-recovery.d.ts +34 -0
  52. package/dist/client/assistant-ui-recovery.d.ts.map +1 -0
  53. package/dist/client/assistant-ui-recovery.js +122 -0
  54. package/dist/client/assistant-ui-recovery.js.map +1 -0
  55. package/dist/client/composer/PromptComposer.d.ts.map +1 -1
  56. package/dist/client/composer/PromptComposer.js +7 -1
  57. package/dist/client/composer/PromptComposer.js.map +1 -1
  58. package/dist/client/composer/TiptapComposer.d.ts +7 -1
  59. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  60. package/dist/client/composer/TiptapComposer.js +22 -2
  61. package/dist/client/composer/TiptapComposer.js.map +1 -1
  62. package/dist/client/frame-protocol.d.ts +6 -2
  63. package/dist/client/frame-protocol.d.ts.map +1 -1
  64. package/dist/client/frame-protocol.js.map +1 -1
  65. package/dist/client/index.d.ts +2 -1
  66. package/dist/client/index.d.ts.map +1 -1
  67. package/dist/client/index.js +2 -1
  68. package/dist/client/index.js.map +1 -1
  69. package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
  70. package/dist/client/org/OrgSwitcher.js +2 -1
  71. package/dist/client/org/OrgSwitcher.js.map +1 -1
  72. package/dist/client/progress/RunsTray.d.ts +13 -3
  73. package/dist/client/progress/RunsTray.d.ts.map +1 -1
  74. package/dist/client/progress/RunsTray.js +105 -36
  75. package/dist/client/progress/RunsTray.js.map +1 -1
  76. package/dist/client/route-warmup.d.ts +61 -0
  77. package/dist/client/route-warmup.d.ts.map +1 -0
  78. package/dist/client/route-warmup.js +456 -0
  79. package/dist/client/route-warmup.js.map +1 -0
  80. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  81. package/dist/client/settings/SettingsPanel.js +2 -1
  82. package/dist/client/settings/SettingsPanel.js.map +1 -1
  83. package/dist/client/settings/useBuilderStatus.d.ts +5 -0
  84. package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
  85. package/dist/client/settings/useBuilderStatus.js +10 -4
  86. package/dist/client/settings/useBuilderStatus.js.map +1 -1
  87. package/dist/client/use-action.d.ts +1 -0
  88. package/dist/client/use-action.d.ts.map +1 -1
  89. package/dist/client/use-action.js +22 -4
  90. package/dist/client/use-action.js.map +1 -1
  91. package/dist/code-agents/background-run.d.ts +2 -0
  92. package/dist/code-agents/background-run.d.ts.map +1 -1
  93. package/dist/code-agents/background-run.js.map +1 -1
  94. package/dist/db/client.d.ts +1 -1
  95. package/dist/db/client.d.ts.map +1 -1
  96. package/dist/db/client.js +25 -1
  97. package/dist/db/client.js.map +1 -1
  98. package/dist/deploy/build.d.ts +4 -0
  99. package/dist/deploy/build.d.ts.map +1 -1
  100. package/dist/deploy/build.js +171 -14
  101. package/dist/deploy/build.js.map +1 -1
  102. package/dist/deploy/immutable-assets.d.ts +1 -0
  103. package/dist/deploy/immutable-assets.d.ts.map +1 -1
  104. package/dist/deploy/immutable-assets.js +1 -0
  105. package/dist/deploy/immutable-assets.js.map +1 -1
  106. package/dist/index.browser.d.ts +1 -1
  107. package/dist/index.browser.d.ts.map +1 -1
  108. package/dist/index.browser.js +1 -1
  109. package/dist/index.browser.js.map +1 -1
  110. package/dist/index.d.ts +1 -1
  111. package/dist/index.d.ts.map +1 -1
  112. package/dist/index.js +1 -1
  113. package/dist/index.js.map +1 -1
  114. package/dist/mcp/connect-route.d.ts.map +1 -1
  115. package/dist/mcp/connect-route.js +118 -82
  116. package/dist/mcp/connect-route.js.map +1 -1
  117. package/dist/progress/routes.d.ts.map +1 -1
  118. package/dist/progress/routes.js +1 -0
  119. package/dist/progress/routes.js.map +1 -1
  120. package/dist/progress/store.d.ts +13 -0
  121. package/dist/progress/store.d.ts.map +1 -1
  122. package/dist/progress/store.js +18 -0
  123. package/dist/progress/store.js.map +1 -1
  124. package/dist/progress/types.d.ts +2 -0
  125. package/dist/progress/types.d.ts.map +1 -1
  126. package/dist/progress/types.js.map +1 -1
  127. package/dist/scripts/db/wipe-leaked-builder-keys.d.ts +2 -2
  128. package/dist/scripts/db/wipe-leaked-builder-keys.d.ts.map +1 -1
  129. package/dist/scripts/db/wipe-leaked-builder-keys.js +14 -3
  130. package/dist/scripts/db/wipe-leaked-builder-keys.js.map +1 -1
  131. package/dist/server/action-routes.d.ts +1 -0
  132. package/dist/server/action-routes.d.ts.map +1 -1
  133. package/dist/server/action-routes.js +36 -2
  134. package/dist/server/action-routes.js.map +1 -1
  135. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  136. package/dist/server/agent-chat-plugin.js +123 -25
  137. package/dist/server/agent-chat-plugin.js.map +1 -1
  138. package/dist/server/agent-discovery.d.ts.map +1 -1
  139. package/dist/server/agent-discovery.js +14 -1
  140. package/dist/server/agent-discovery.js.map +1 -1
  141. package/dist/server/agent-teams-run-queue.d.ts +80 -0
  142. package/dist/server/agent-teams-run-queue.d.ts.map +1 -0
  143. package/dist/server/agent-teams-run-queue.js +208 -0
  144. package/dist/server/agent-teams-run-queue.js.map +1 -0
  145. package/dist/server/agent-teams.d.ts +67 -0
  146. package/dist/server/agent-teams.d.ts.map +1 -1
  147. package/dist/server/agent-teams.js +607 -180
  148. package/dist/server/agent-teams.js.map +1 -1
  149. package/dist/server/auth-marketing.d.ts.map +1 -1
  150. package/dist/server/auth-marketing.js +0 -64
  151. package/dist/server/auth-marketing.js.map +1 -1
  152. package/dist/server/auth.d.ts.map +1 -1
  153. package/dist/server/auth.js +67 -14
  154. package/dist/server/auth.js.map +1 -1
  155. package/dist/server/builder-browser.d.ts +12 -2
  156. package/dist/server/builder-browser.d.ts.map +1 -1
  157. package/dist/server/builder-browser.js +24 -0
  158. package/dist/server/builder-browser.js.map +1 -1
  159. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  160. package/dist/server/core-routes-plugin.js +66 -5
  161. package/dist/server/core-routes-plugin.js.map +1 -1
  162. package/dist/server/credential-provider.d.ts +10 -0
  163. package/dist/server/credential-provider.d.ts.map +1 -1
  164. package/dist/server/credential-provider.js +82 -3
  165. package/dist/server/credential-provider.js.map +1 -1
  166. package/dist/server/csrf.d.ts.map +1 -1
  167. package/dist/server/csrf.js +3 -0
  168. package/dist/server/csrf.js.map +1 -1
  169. package/dist/server/index.d.ts +1 -0
  170. package/dist/server/index.d.ts.map +1 -1
  171. package/dist/server/index.js +1 -0
  172. package/dist/server/index.js.map +1 -1
  173. package/dist/server/onboarding-html.d.ts +1 -0
  174. package/dist/server/onboarding-html.d.ts.map +1 -1
  175. package/dist/server/onboarding-html.js +14 -1
  176. package/dist/server/onboarding-html.js.map +1 -1
  177. package/dist/server/self-dispatch.d.ts +44 -0
  178. package/dist/server/self-dispatch.d.ts.map +1 -0
  179. package/dist/server/self-dispatch.js +113 -0
  180. package/dist/server/self-dispatch.js.map +1 -0
  181. package/dist/server/social-og-image.d.ts +14 -0
  182. package/dist/server/social-og-image.d.ts.map +1 -0
  183. package/dist/server/social-og-image.js +251 -0
  184. package/dist/server/social-og-image.js.map +1 -0
  185. package/dist/server/ssr-handler.d.ts +1 -1
  186. package/dist/server/ssr-handler.d.ts.map +1 -1
  187. package/dist/server/ssr-handler.js +27 -11
  188. package/dist/server/ssr-handler.js.map +1 -1
  189. package/dist/shared/cache-control.d.ts +7 -0
  190. package/dist/shared/cache-control.d.ts.map +1 -1
  191. package/dist/shared/cache-control.js +7 -0
  192. package/dist/shared/cache-control.js.map +1 -1
  193. package/dist/shared/index.d.ts +1 -1
  194. package/dist/shared/index.d.ts.map +1 -1
  195. package/dist/shared/index.js +1 -1
  196. package/dist/shared/index.js.map +1 -1
  197. package/dist/shared/route-warmup-config.d.ts +28 -0
  198. package/dist/shared/route-warmup-config.d.ts.map +1 -0
  199. package/dist/shared/route-warmup-config.js +58 -0
  200. package/dist/shared/route-warmup-config.js.map +1 -0
  201. package/dist/shared/social-meta.d.ts +5 -0
  202. package/dist/shared/social-meta.d.ts.map +1 -1
  203. package/dist/shared/social-meta.js +36 -2
  204. package/dist/shared/social-meta.js.map +1 -1
  205. package/dist/shared/streaming-text-smoothing.d.ts +12 -0
  206. package/dist/shared/streaming-text-smoothing.d.ts.map +1 -0
  207. package/dist/shared/streaming-text-smoothing.js +52 -0
  208. package/dist/shared/streaming-text-smoothing.js.map +1 -0
  209. package/dist/styles/agent-native.css +4 -4
  210. package/dist/templates/default/AGENTS.md +9 -4
  211. package/dist/templates/default/DEVELOPING.md +15 -1
  212. package/dist/templates/workspace-core/AGENTS.md +7 -3
  213. package/dist/templates/workspace-root/AGENTS.md +7 -3
  214. package/dist/vite/client.d.ts +13 -0
  215. package/dist/vite/client.d.ts.map +1 -1
  216. package/dist/vite/client.js +36 -1
  217. package/dist/vite/client.js.map +1 -1
  218. package/dist/vite/index.d.ts +1 -0
  219. package/dist/vite/index.d.ts.map +1 -1
  220. package/dist/vite/index.js.map +1 -1
  221. package/docs/content/client.md +62 -1
  222. package/docs/content/code-agents-ui.md +6 -13
  223. package/docs/content/context-awareness.md +186 -21
  224. package/docs/content/deployment.md +8 -11
  225. package/docs/content/dispatch.md +1 -1
  226. package/docs/content/external-agents.md +32 -2
  227. package/docs/content/migration-workbench.md +4 -21
  228. package/docs/content/multi-app-workspace.md +1 -1
  229. package/docs/content/recurring-jobs.md +1 -1
  230. package/docs/content/security.md +0 -1
  231. package/docs/content/sharing.md +1 -3
  232. package/docs/content/skills-guide.md +12 -10
  233. package/docs/content/template-assets.md +21 -1
  234. package/docs/content/template-design.md +23 -5
  235. package/docs/content/template-dispatch.md +1 -1
  236. package/package.json +2 -1
  237. package/src/templates/default/AGENTS.md +9 -4
  238. package/src/templates/default/DEVELOPING.md +15 -1
  239. package/src/templates/workspace-core/AGENTS.md +7 -3
  240. package/src/templates/workspace-root/AGENTS.md +7 -3
@@ -2,6 +2,7 @@ export declare const IMMUTABLE_ASSET_CACHE_CONTROL = "public, max-age=31536000,
2
2
  export declare const IMMUTABLE_ASSET_CACHE_HEADERS: {
3
3
  readonly "cache-control": "public, max-age=31536000, immutable";
4
4
  readonly "cdn-cache-control": "public, max-age=31536000, immutable";
5
+ readonly "netlify-cdn-cache-control": "public, max-age=31536000, immutable";
5
6
  };
6
7
  export declare const IMMUTABLE_ASSET_PATH_PATTERN = "^/assets/[^/]+-[A-Za-z0-9_-]{8}\\.[a-z0-9]+$";
7
8
  export declare function isImmutableAssetPath(pathname: string): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"immutable-assets.d.ts","sourceRoot":"","sources":["../../src/deploy/immutable-assets.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,6BAA6B,wCACH,CAAC;AAExC,eAAO,MAAM,6BAA6B;;;CAGhC,CAAC;AAEX,eAAO,MAAM,4BAA4B,iDACO,CAAC;AAIjD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAO9D;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAKtE;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,MAAM,CAIR;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAsBpE"}
1
+ {"version":3,"file":"immutable-assets.d.ts","sourceRoot":"","sources":["../../src/deploy/immutable-assets.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,6BAA6B,wCACH,CAAC;AAExC,eAAO,MAAM,6BAA6B;;;;CAIhC,CAAC;AAEX,eAAO,MAAM,4BAA4B,iDACO,CAAC;AAIjD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAO9D;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAKtE;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,MAAM,CAIR;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAsBpE"}
@@ -4,6 +4,7 @@ export const IMMUTABLE_ASSET_CACHE_CONTROL = "public, max-age=31536000, immutabl
4
4
  export const IMMUTABLE_ASSET_CACHE_HEADERS = {
5
5
  "cache-control": IMMUTABLE_ASSET_CACHE_CONTROL,
6
6
  "cdn-cache-control": IMMUTABLE_ASSET_CACHE_CONTROL,
7
+ "netlify-cdn-cache-control": IMMUTABLE_ASSET_CACHE_CONTROL,
7
8
  };
8
9
  export const IMMUTABLE_ASSET_PATH_PATTERN = "^/assets/[^/]+-[A-Za-z0-9_-]{8}\\.[a-z0-9]+$";
9
10
  const IMMUTABLE_ASSET_PATH_RE = new RegExp(IMMUTABLE_ASSET_PATH_PATTERN);
@@ -1 +1 @@
1
- {"version":3,"file":"immutable-assets.js","sourceRoot":"","sources":["../../src/deploy/immutable-assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,CAAC,MAAM,6BAA6B,GACxC,qCAAqC,CAAC;AAExC,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,eAAe,EAAE,6BAA6B;IAC9C,mBAAmB,EAAE,6BAA6B;CAC1C,CAAC;AAEX,MAAM,CAAC,MAAM,4BAA4B,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,MAAM,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;YACjE,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;YAChE,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YAC3C,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;gBACxB,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;gBACvB,SAAS;YACX,CAAC;YACD,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBAAE,SAAS;YAE9B,MAAM,SAAS,GAAG,WAAW,OAAO,EAAE,CAAC;YACvC,IAAI,oBAAoB,CAAC,SAAS,CAAC;gBAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC,CAAC;IAEF,IAAI,CAAC,SAAS,CAAC,CAAC;IAChB,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;AACtB,CAAC","sourcesContent":["import fs from \"fs\";\nimport path from \"path\";\n\nexport const IMMUTABLE_ASSET_CACHE_CONTROL =\n \"public, max-age=31536000, immutable\";\n\nexport const IMMUTABLE_ASSET_CACHE_HEADERS = {\n \"cache-control\": IMMUTABLE_ASSET_CACHE_CONTROL,\n \"cdn-cache-control\": IMMUTABLE_ASSET_CACHE_CONTROL,\n} as const;\n\nexport const IMMUTABLE_ASSET_PATH_PATTERN =\n \"^/assets/[^/]+-[A-Za-z0-9_-]{8}\\\\.[a-z0-9]+$\";\n\nconst IMMUTABLE_ASSET_PATH_RE = new RegExp(IMMUTABLE_ASSET_PATH_PATTERN);\n\nexport function isImmutableAssetPath(pathname: string): boolean {\n // Vite emits content-hashed production chunks under /assets/. Those URLs are\n // stable forever because any content change produces a new filename, so they\n // should be cached for a year at both the browser and CDN layer. Keep this\n // exact hashed-file check; broad /assets/* immutable caching would pin\n // manually named files like logo.png that templates may replace in place.\n return IMMUTABLE_ASSET_PATH_RE.test(pathname);\n}\n\nexport function normalizeBasePath(basePath: string | undefined): string {\n const raw = String(basePath ?? \"\").trim();\n if (!raw || raw === \"/\") return \"\";\n const normalized = raw.replace(/^\\/+/, \"\").replace(/\\/+$/, \"\");\n return normalized ? `/${normalized}` : \"\";\n}\n\nexport function prefixAssetPath(\n pathname: string,\n basePath: string | undefined,\n): string {\n const base = normalizeBasePath(basePath);\n if (!base) return pathname;\n return `${base}${pathname}`;\n}\n\nexport function collectImmutableAssetPaths(rootDir: string): string[] {\n const assetsDir = path.join(rootDir, \"assets\");\n if (!fs.existsSync(assetsDir)) return [];\n\n const paths: string[] = [];\n const scan = (dir: string, relDir = \"\") => {\n for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {\n const relPath = relDir ? `${relDir}/${entry.name}` : entry.name;\n const absPath = path.join(dir, entry.name);\n if (entry.isDirectory()) {\n scan(absPath, relPath);\n continue;\n }\n if (!entry.isFile()) continue;\n\n const assetPath = `/assets/${relPath}`;\n if (isImmutableAssetPath(assetPath)) paths.push(assetPath);\n }\n };\n\n scan(assetsDir);\n return paths.sort();\n}\n"]}
1
+ {"version":3,"file":"immutable-assets.js","sourceRoot":"","sources":["../../src/deploy/immutable-assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,CAAC,MAAM,6BAA6B,GACxC,qCAAqC,CAAC;AAExC,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,eAAe,EAAE,6BAA6B;IAC9C,mBAAmB,EAAE,6BAA6B;IAClD,2BAA2B,EAAE,6BAA6B;CAClD,CAAC;AAEX,MAAM,CAAC,MAAM,4BAA4B,GACvC,8CAA8C,CAAC;AAEjD,MAAM,uBA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CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;YACjE,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;YAChE,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YAC3C,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;gBACxB,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;gBACvB,SAAS;YACX,CAAC;YACD,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBAAE,SAAS;YAE9B,MAAM,SAAS,GAAG,WAAW,OAAO,EAAE,CAAC;YACvC,IAAI,oBAAoB,CAAC,SAAS,CAAC;gBAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC,CAAC;IAEF,IAAI,CAAC,SAAS,CAAC,CAAC;IAChB,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;AACtB,CAAC","sourcesContent":["import fs from \"fs\";\nimport path from \"path\";\n\nexport const IMMUTABLE_ASSET_CACHE_CONTROL =\n \"public, max-age=31536000, immutable\";\n\nexport const IMMUTABLE_ASSET_CACHE_HEADERS = {\n \"cache-control\": IMMUTABLE_ASSET_CACHE_CONTROL,\n \"cdn-cache-control\": IMMUTABLE_ASSET_CACHE_CONTROL,\n \"netlify-cdn-cache-control\": IMMUTABLE_ASSET_CACHE_CONTROL,\n} as const;\n\nexport const IMMUTABLE_ASSET_PATH_PATTERN =\n \"^/assets/[^/]+-[A-Za-z0-9_-]{8}\\\\.[a-z0-9]+$\";\n\nconst IMMUTABLE_ASSET_PATH_RE = new RegExp(IMMUTABLE_ASSET_PATH_PATTERN);\n\nexport function isImmutableAssetPath(pathname: string): boolean {\n // Vite emits content-hashed production chunks under /assets/. Those URLs are\n // stable forever because any content change produces a new filename, so they\n // should be cached for a year at both the browser and CDN layer. Keep this\n // exact hashed-file check; broad /assets/* immutable caching would pin\n // manually named files like logo.png that templates may replace in place.\n return IMMUTABLE_ASSET_PATH_RE.test(pathname);\n}\n\nexport function normalizeBasePath(basePath: string | undefined): string {\n const raw = String(basePath ?? \"\").trim();\n if (!raw || raw === \"/\") return \"\";\n const normalized = raw.replace(/^\\/+/, \"\").replace(/\\/+$/, \"\");\n return normalized ? `/${normalized}` : \"\";\n}\n\nexport function prefixAssetPath(\n pathname: string,\n basePath: string | undefined,\n): string {\n const base = normalizeBasePath(basePath);\n if (!base) return pathname;\n return `${base}${pathname}`;\n}\n\nexport function collectImmutableAssetPaths(rootDir: string): string[] {\n const assetsDir = path.join(rootDir, \"assets\");\n if (!fs.existsSync(assetsDir)) return [];\n\n const paths: string[] = [];\n const scan = (dir: string, relDir = \"\") => {\n for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {\n const relPath = relDir ? `${relDir}/${entry.name}` : entry.name;\n const absPath = path.join(dir, entry.name);\n if (entry.isDirectory()) {\n scan(absPath, relPath);\n continue;\n }\n if (!entry.isFile()) continue;\n\n const assetPath = `/assets/${relPath}`;\n if (isImmutableAssetPath(assetPath)) paths.push(assetPath);\n }\n };\n\n scan(assetsDir);\n return paths.sort();\n}\n"]}
@@ -1,4 +1,4 @@
1
- export { sendToAgentChat, isEmbedMcpChatBridgeActive, useAgentChatGenerating, useDevMode, useSendToAgentChat, AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES, getMcpAppHostContext, openMcpAppHostLink, requestMcpAppDisplayMode, sendMcpAppHostMessage, updateMcpAppModelContext, useMcpAppHostContext, CodeRequiredDialog, useDbSync, useFileWatcher, useSession, cn, ApiKeySettings, type AgentChatMessage, type AgentNativeMcpAppHostMessageType, type McpAppDisplayMode, type McpAppHostChatMessage, type McpAppHostCapabilities, type McpAppHostContext, type McpAppHostContextSnapshot, type McpAppModelContextContentPart, type McpAppModelContextUpdate, type CodeRequiredDialogProps, type AuthSession, } from "./client/index.js";
1
+ export { addContextToAgentChat, appendAgentChatContextToMessage, formatAgentChatContextItemsForPrompt, sendToAgentChat, setContextToAgentChat, isEmbedMcpChatBridgeActive, useAgentChatGenerating, useDevMode, useSendToAgentChat, AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES, getMcpAppHostContext, openMcpAppHostLink, requestMcpAppDisplayMode, sendMcpAppHostMessage, updateMcpAppModelContext, useMcpAppHostContext, CodeRequiredDialog, useDbSync, useFileWatcher, useSession, cn, ApiKeySettings, type AgentChatContextItem, type AgentChatContextMessage, type AgentChatMessage, type AgentNativeMcpAppHostMessageType, type McpAppDisplayMode, type McpAppHostChatMessage, type McpAppHostCapabilities, type McpAppHostContext, type McpAppHostContextSnapshot, type McpAppModelContextContentPart, type McpAppModelContextUpdate, type CodeRequiredDialogProps, type AuthSession, } from "./client/index.js";
2
2
  export { agentChat } from "./shared/index.js";
3
3
  export { parseArgs, camelCaseArgs } from "./scripts/parse-args.js";
4
4
  export { defineAction, AgentActionStopError, isAgentActionStopError, type ActionHttpConfig, type AgentActionStopOptions, MCP_APP_EXTENSION_ID, MCP_APP_MIME_TYPE, MCP_APP_RESOURCE_URI_META_KEY, type ActionMcpAppConfig, type ActionMcpAppCsp, type ActionMcpAppCspBuilder, type ActionMcpAppHtmlBuilder, type ActionMcpAppPermissions, type ActionMcpAppResourceConfig, type ActionMcpAppResourceMeta, } from "./action.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAClB,uCAAuC,EACvC,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,UAAU,EACV,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AkB,EAClB,SAAS,EACT,cAAc,EACd,UAAU,EACV,EAAE,EACF,cAAc,EACd,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,gCAAgC,EACrC,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,WAAW,GACjB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGnE,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,EAC7B,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,QAAQ,EACR,iCAAiC,EACjC,KAAK,eAAe,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB,MAAM,sBAAsB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // Browser-safe entry — only client & shared exports (no Node/Express/chokidar).
2
2
  // Client
3
- export { sendToAgentChat, isEmbedMcpChatBridgeActive, useAgentChatGenerating, useDevMode, useSendToAgentChat, AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES, getMcpAppHostContext, openMcpAppHostLink, requestMcpAppDisplayMode, sendMcpAppHostMessage, updateMcpAppModelContext, useMcpAppHostContext, CodeRequiredDialog, useDbSync, useFileWatcher, useSession, cn, ApiKeySettings, } from "./client/index.js";
3
+ export { addContextToAgentChat, appendAgentChatContextToMessage, formatAgentChatContextItemsForPrompt, sendToAgentChat, setContextToAgentChat, isEmbedMcpChatBridgeActive, useAgentChatGenerating, useDevMode, useSendToAgentChat, AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES, getMcpAppHostContext, openMcpAppHostLink, requestMcpAppDisplayMode, sendMcpAppHostMessage, updateMcpAppModelContext, useMcpAppHostContext, CodeRequiredDialog, useDbSync, useFileWatcher, useSession, cn, ApiKeySettings, } from "./client/index.js";
4
4
  // Shared (isomorphic)
5
5
  export { agentChat } from "./shared/index.js";
6
6
  // Pure utilities (no Node.js deps — safe for browser and SSR)
@@ -1 +1 @@
1
- {"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAEhF,SAAS;AACT,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAClB,uCAAuC,EACvC,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,UAAU,EACV,EAAE,EACF,cAAc,GAYf,MAAM,mBAAmB,CAAC;AAE3B,sBAAsB;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,8DAA8D;AAC9D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEnE,2DAA2D;AAC3D,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EAGtB,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,GAQ9B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,QAAQ,EACR,iCAAiC,GAElC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,UAAU,GAKX,MAAM,sBAAsB,CAAC","sourcesContent":["// Browser-safe entry — only client & shared exports (no Node/Express/chokidar).\n\n// Client\nexport {\n sendToAgentChat,\n isEmbedMcpChatBridgeActive,\n useAgentChatGenerating,\n useDevMode,\n useSendToAgentChat,\n AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES,\n getMcpAppHostContext,\n openMcpAppHostLink,\n requestMcpAppDisplayMode,\n sendMcpAppHostMessage,\n updateMcpAppModelContext,\n useMcpAppHostContext,\n CodeRequiredDialog,\n useDbSync,\n useFileWatcher,\n useSession,\n cn,\n ApiKeySettings,\n type AgentChatMessage,\n type AgentNativeMcpAppHostMessageType,\n type McpAppDisplayMode,\n type McpAppHostChatMessage,\n type McpAppHostCapabilities,\n type McpAppHostContext,\n type McpAppHostContextSnapshot,\n type McpAppModelContextContentPart,\n type McpAppModelContextUpdate,\n type CodeRequiredDialogProps,\n type AuthSession,\n} from \"./client/index.js\";\n\n// Shared (isomorphic)\nexport { agentChat } from \"./shared/index.js\";\n\n// Pure utilities (no Node.js deps — safe for browser and SSR)\nexport { parseArgs, camelCaseArgs } from \"./scripts/parse-args.js\";\n\n// defineAction — used by template actions, no Node.js deps\nexport {\n defineAction,\n AgentActionStopError,\n isAgentActionStopError,\n type ActionHttpConfig,\n type AgentActionStopOptions,\n MCP_APP_EXTENSION_ID,\n MCP_APP_MIME_TYPE,\n MCP_APP_RESOURCE_URI_META_KEY,\n type ActionMcpAppConfig,\n type ActionMcpAppCsp,\n type ActionMcpAppCspBuilder,\n type ActionMcpAppHtmlBuilder,\n type ActionMcpAppPermissions,\n type ActionMcpAppResourceConfig,\n type ActionMcpAppResourceMeta,\n} from \"./action.js\";\nexport {\n embedApp,\n MCP_APP_REQUEST_ORIGIN_CSP_SOURCE,\n type EmbedAppOptions,\n} from \"./mcp/embed-app.js\";\nexport {\n embedRoute,\n type EmbedRouteContext,\n type EmbedRouteOptions,\n type EmbedRoutePathBuilder,\n type EmbedRouteResult,\n} from \"./mcp/embed-route.js\";\n"]}
1
+ {"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAEhF,SAAS;AACT,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,oCAAoC,EACpC,eAAe,EACf,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAClB,uCAAuC,EACvC,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,UAAU,EACV,EAAE,EACF,cAAc,GAcf,MAAM,mBAAmB,CAAC;AAE3B,sBAAsB;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,8DAA8D;AAC9D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEnE,2DAA2D;AAC3D,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EAGtB,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,GAQ9B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,QAAQ,EACR,iCAAiC,GAElC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,UAAU,GAKX,MAAM,sBAAsB,CAAC","sourcesContent":["// Browser-safe entry — only client & shared exports (no Node/Express/chokidar).\n\n// Client\nexport {\n addContextToAgentChat,\n appendAgentChatContextToMessage,\n formatAgentChatContextItemsForPrompt,\n sendToAgentChat,\n setContextToAgentChat,\n isEmbedMcpChatBridgeActive,\n useAgentChatGenerating,\n useDevMode,\n useSendToAgentChat,\n AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES,\n getMcpAppHostContext,\n openMcpAppHostLink,\n requestMcpAppDisplayMode,\n sendMcpAppHostMessage,\n updateMcpAppModelContext,\n useMcpAppHostContext,\n CodeRequiredDialog,\n useDbSync,\n useFileWatcher,\n useSession,\n cn,\n ApiKeySettings,\n type AgentChatContextItem,\n type AgentChatContextMessage,\n type AgentChatMessage,\n type AgentNativeMcpAppHostMessageType,\n type McpAppDisplayMode,\n type McpAppHostChatMessage,\n type McpAppHostCapabilities,\n type McpAppHostContext,\n type McpAppHostContextSnapshot,\n type McpAppModelContextContentPart,\n type McpAppModelContextUpdate,\n type CodeRequiredDialogProps,\n type AuthSession,\n} from \"./client/index.js\";\n\n// Shared (isomorphic)\nexport { agentChat } from \"./shared/index.js\";\n\n// Pure utilities (no Node.js deps — safe for browser and SSR)\nexport { parseArgs, camelCaseArgs } from \"./scripts/parse-args.js\";\n\n// defineAction — used by template actions, no Node.js deps\nexport {\n defineAction,\n AgentActionStopError,\n isAgentActionStopError,\n type ActionHttpConfig,\n type AgentActionStopOptions,\n MCP_APP_EXTENSION_ID,\n MCP_APP_MIME_TYPE,\n MCP_APP_RESOURCE_URI_META_KEY,\n type ActionMcpAppConfig,\n type ActionMcpAppCsp,\n type ActionMcpAppCspBuilder,\n type ActionMcpAppHtmlBuilder,\n type ActionMcpAppPermissions,\n type ActionMcpAppResourceConfig,\n type ActionMcpAppResourceMeta,\n} from \"./action.js\";\nexport {\n embedApp,\n MCP_APP_REQUEST_ORIGIN_CSP_SOURCE,\n type EmbedAppOptions,\n} from \"./mcp/embed-app.js\";\nexport {\n embedRoute,\n type EmbedRouteContext,\n type EmbedRouteOptions,\n type EmbedRoutePathBuilder,\n type EmbedRouteResult,\n} from \"./mcp/embed-route.js\";\n"]}
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export { createDevScriptRegistry } from "./scripts/dev/index.js";
6
6
  export { createAgentChatPlugin, defaultAgentChatPlugin, type AgentChatPluginOptions, } from "./server/agent-chat-plugin.js";
7
7
  export { createAgentNativeEmbeddedPlugin, mountAgentNativeEmbedded, type AgentNativeEmbeddedPluginOptions, } from "./server/embedded.js";
8
8
  export { createServer, createSSEHandler, defineNitroPlugin, autoMountAuth, getSession, type CreateServerOptions, type SSEHandlerOptions, type AuthSession, type AuthOptions, } from "./server/index.js";
9
- export { sendToAgentChat, isEmbedMcpChatBridgeActive, useAgentChatGenerating, useDevMode, useSendToAgentChat, AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES, getMcpAppHostContext, openMcpAppHostLink, requestMcpAppDisplayMode, updateMcpAppModelContext, useMcpAppHostContext, CodeRequiredDialog, useAgentNativeEmbeddedBrowserSession, useDbSync, useFileWatcher, cn, ApiKeySettings, useSession, AgentNativeEmbedded, useProductionAgent, ProductionAgentPanel, type AgentChatMessage, type AgentNativeMcpAppHostMessageType, type McpAppDisplayMode, type McpAppHostCapabilities, type McpAppHostContext, type McpAppHostContextSnapshot, type McpAppModelContextContentPart, type McpAppModelContextUpdate, type AgentNativeEmbeddedProps, type UseAgentNativeEmbeddedBrowserSessionOptions, type CodeRequiredDialogProps, type ProductionAgentMessage, type UseProductionAgentResult, type ProductionAgentPanelProps, useActionQuery, useActionMutation, } from "./client/index.js";
9
+ export { addContextToAgentChat, appendAgentChatContextToMessage, formatAgentChatContextItemsForPrompt, sendToAgentChat, setContextToAgentChat, isEmbedMcpChatBridgeActive, useAgentChatGenerating, useDevMode, useSendToAgentChat, AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES, getMcpAppHostContext, openMcpAppHostLink, requestMcpAppDisplayMode, updateMcpAppModelContext, useMcpAppHostContext, CodeRequiredDialog, useAgentNativeEmbeddedBrowserSession, useDbSync, useFileWatcher, cn, ApiKeySettings, useSession, AgentNativeEmbedded, useProductionAgent, ProductionAgentPanel, type AgentChatContextItem, type AgentChatContextMessage, type AgentChatMessage, type AgentNativeMcpAppHostMessageType, type McpAppDisplayMode, type McpAppHostCapabilities, type McpAppHostContext, type McpAppHostContextSnapshot, type McpAppModelContextContentPart, type McpAppModelContextUpdate, type AgentNativeEmbeddedProps, type UseAgentNativeEmbeddedBrowserSessionOptions, type CodeRequiredDialogProps, type ProductionAgentMessage, type UseProductionAgentResult, type ProductionAgentPanelProps, useActionQuery, useActionMutation, } from "./client/index.js";
10
10
  export { agentChat, type AgentChatCallOptions, type AgentChatResponse, } from "./shared/index.js";
11
11
  export { EMBED_MODE_QUERY_PARAM, EMBED_SESSION_COOKIE, EMBED_START_PATH, EMBED_TOKEN_QUERY_PARAM, } from "./shared/embed-auth.js";
12
12
  export { AGENT_WEB_CRAWLER_CATEGORIES, AGENT_WEB_CRAWLER_USER_AGENTS, DEFAULT_AGENT_WEB_CRAWLER_POLICY, absoluteUrl, agentWebConfigFromPackageJson, buildAgentWebStaticFiles, buildBaseJsonLd, buildLlmsFullTxt, buildLlmsTxt, buildMarkdownResponseHeaders, buildPageJsonLd, buildRobotsTxt, buildSitemapXml, deriveAgentWebPublicRoutes, estimateMarkdownTokens, markdownFilePathForPage, markdownUrlForPage, normalizeAgentWebConfig, pathPatternMatches, resolveAgentWebCrawlerPolicy, type AgentWebConfig, type AgentWebCrawlerCategory, type AgentWebCrawlerDecision, type AgentWebCrawlerOverrides, type AgentWebCrawlerPolicy, type AgentWebInputConfig, type AgentWebPage, type AgentWebStaticFile, type BuildAgentWebStaticFilesOptions, type DeriveAgentWebPublicRoutesOptions, type MarkdownResponseHeadersOptions, } from "./agent-web/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,4BAA4B,EAC5B,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,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U,EACf,KAAK,eAAe,EACpB,KAAK,SAAS,GACf,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ export { createAgentNativeEmbeddedPlugin, mountAgentNativeEmbedded, } from "./se
11
11
  // Server
12
12
  export { createServer, createSSEHandler, defineNitroPlugin, autoMountAuth, getSession, } from "./server/index.js";
13
13
  // Client
14
- export { sendToAgentChat, isEmbedMcpChatBridgeActive, useAgentChatGenerating, useDevMode, useSendToAgentChat, AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES, getMcpAppHostContext, openMcpAppHostLink, requestMcpAppDisplayMode, updateMcpAppModelContext, useMcpAppHostContext, CodeRequiredDialog, useAgentNativeEmbeddedBrowserSession, useDbSync, useFileWatcher, cn, ApiKeySettings, useSession, AgentNativeEmbedded, useProductionAgent, ProductionAgentPanel, useActionQuery, useActionMutation, } from "./client/index.js";
14
+ export { addContextToAgentChat, appendAgentChatContextToMessage, formatAgentChatContextItemsForPrompt, sendToAgentChat, setContextToAgentChat, isEmbedMcpChatBridgeActive, useAgentChatGenerating, useDevMode, useSendToAgentChat, AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES, getMcpAppHostContext, openMcpAppHostLink, requestMcpAppDisplayMode, updateMcpAppModelContext, useMcpAppHostContext, CodeRequiredDialog, useAgentNativeEmbeddedBrowserSession, useDbSync, useFileWatcher, cn, ApiKeySettings, useSession, AgentNativeEmbedded, useProductionAgent, ProductionAgentPanel, useActionQuery, useActionMutation, } from "./client/index.js";
15
15
  // Shared (isomorphic)
16
16
  export { agentChat, } from "./shared/index.js";
17
17
  export { EMBED_MODE_QUERY_PARAM, EMBED_SESSION_COOKIE, EMBED_START_PATH, EMBED_TOKEN_QUERY_PARAM, } from "./shared/embed-auth.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,+CAA+C;AAE/C,0B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B,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,eAAe,GAMhB,MAAM,oBAAoB,CAAC","sourcesContent":["// Framework for agent-native apps.\n// Import everything from \"@agent-native/core\".\n\n// Agent (production mode)\nexport {\n createProductionAgentHandler,\n type ActionEntry,\n type ScriptEntry,\n type ProductionAgentOptions,\n type ActionTool,\n type ScriptTool,\n type AgentMessage,\n type AgentChatRequest,\n type AgentChatEvent,\n type AgentChatAttachment,\n DEFAULT_MODEL,\n} from \"./agent/index.js\";\nexport {\n defineAction,\n AgentActionStopError,\n isAgentActionStopError,\n type ActionHttpConfig,\n type AgentActionStopOptions,\n type PublicAgentActionConfig,\n type ActionDeepLink,\n type ActionLinkBuilder,\n MCP_APP_EXTENSION_ID,\n MCP_APP_MIME_TYPE,\n MCP_APP_RESOURCE_URI_META_KEY,\n type ActionMcpAppConfig,\n type ActionMcpAppCsp,\n type ActionMcpAppCspBuilder,\n type ActionMcpAppHtmlBuilder,\n type ActionMcpAppPermissions,\n type ActionMcpAppResourceConfig,\n type ActionMcpAppResourceMeta,\n} from \"./action.js\";\nexport {\n embedApp,\n MCP_APP_REQUEST_ORIGIN_CSP_SOURCE,\n type EmbedAppOptions,\n} from \"./mcp/embed-app.js\";\nexport {\n embedRoute,\n type EmbedRouteContext,\n type EmbedRouteOptions,\n type EmbedRoutePathBuilder,\n type EmbedRouteResult,\n} from \"./mcp/embed-route.js\";\nexport { createDevScriptRegistry } from \"./scripts/dev/index.js\";\nexport {\n createAgentChatPlugin,\n defaultAgentChatPlugin,\n type AgentChatPluginOptions,\n} from \"./server/agent-chat-plugin.js\";\nexport {\n createAgentNativeEmbeddedPlugin,\n mountAgentNativeEmbedded,\n type AgentNativeEmbeddedPluginOptions,\n} from \"./server/embedded.js\";\n\n// Server\nexport {\n createServer,\n createSSEHandler,\n defineNitroPlugin,\n autoMountAuth,\n getSession,\n type CreateServerOptions,\n type SSEHandlerOptions,\n type AuthSession,\n type AuthOptions,\n} from \"./server/index.js\";\n\n// Client\nexport {\n sendToAgentChat,\n isEmbedMcpChatBridgeActive,\n useAgentChatGenerating,\n useDevMode,\n useSendToAgentChat,\n AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES,\n getMcpAppHostContext,\n openMcpAppHostLink,\n requestMcpAppDisplayMode,\n updateMcpAppModelContext,\n useMcpAppHostContext,\n CodeRequiredDialog,\n useAgentNativeEmbeddedBrowserSession,\n useDbSync,\n useFileWatcher,\n cn,\n ApiKeySettings,\n useSession,\n AgentNativeEmbedded,\n useProductionAgent,\n ProductionAgentPanel,\n type AgentChatMessage,\n type AgentNativeMcpAppHostMessageType,\n type McpAppDisplayMode,\n type McpAppHostCapabilities,\n type McpAppHostContext,\n type McpAppHostContextSnapshot,\n type McpAppModelContextContentPart,\n type McpAppModelContextUpdate,\n type AgentNativeEmbeddedProps,\n type UseAgentNativeEmbeddedBrowserSessionOptions,\n type CodeRequiredDialogProps,\n type ProductionAgentMessage,\n type UseProductionAgentResult,\n type ProductionAgentPanelProps,\n useActionQuery,\n useActionMutation,\n} from \"./client/index.js\";\n\n// Shared (isomorphic)\nexport {\n agentChat,\n type AgentChatCallOptions,\n type AgentChatResponse,\n} from \"./shared/index.js\";\nexport {\n EMBED_MODE_QUERY_PARAM,\n EMBED_SESSION_COOKIE,\n EMBED_START_PATH,\n EMBED_TOKEN_QUERY_PARAM,\n} from \"./shared/embed-auth.js\";\n\n// Agent Web surfaces\nexport {\n AGENT_WEB_CRAWLER_CATEGORIES,\n AGENT_WEB_CRAWLER_USER_AGENTS,\n DEFAULT_AGENT_WEB_CRAWLER_POLICY,\n absoluteUrl,\n agentWebConfigFromPackageJson,\n buildAgentWebStaticFiles,\n buildBaseJsonLd,\n buildLlmsFullTxt,\n buildLlmsTxt,\n buildMarkdownResponseHeaders,\n buildPageJsonLd,\n buildRobotsTxt,\n buildSitemapXml,\n deriveAgentWebPublicRoutes,\n estimateMarkdownTokens,\n markdownFilePathForPage,\n markdownUrlForPage,\n normalizeAgentWebConfig,\n pathPatternMatches,\n resolveAgentWebCrawlerPolicy,\n type AgentWebConfig,\n type AgentWebCrawlerCategory,\n type AgentWebCrawlerDecision,\n type AgentWebCrawlerOverrides,\n type AgentWebCrawlerPolicy,\n type AgentWebInputConfig,\n type AgentWebPage,\n type AgentWebStaticFile,\n type BuildAgentWebStaticFilesOptions,\n type DeriveAgentWebPublicRoutesOptions,\n type MarkdownResponseHeadersOptions,\n} from \"./agent-web/index.js\";\n\n// Token usage tracking\nexport {\n recordUsage,\n getUsageSummary,\n getUserUsageCents,\n calculateCost,\n usageBillingForEngine,\n builderCreditsFromCostCents,\n BUILDER_AGENT_CREDIT_MARGIN_MULTIPLIER,\n BUILDER_AGENT_CREDITS_PER_USD,\n BUILDER_CREDIT_USAGE_BILLING,\n USD_USAGE_BILLING,\n type UsageRecord,\n type UsageSummary,\n type UsageBillingMode,\n type UsageBillingUnit,\n type UsageBucket,\n type DailyBucket,\n type UsageRecentEntry,\n} from \"./usage/store.js\";\n\n// Workspace-scoped third-party connection metadata\nexport {\n deleteWorkspaceConnection,\n getWorkspaceConnectionAppAccess,\n getWorkspaceConnection,\n getWorkspaceConnectionGrant,\n listWorkspaceConnectionProviderCatalogForApp,\n listWorkspaceConnectionGrants,\n listWorkspaceConnections,\n resolveWorkspaceConnectionCredentialForApp,\n resolveWorkspaceConnectionCredentialsForApp,\n revokeWorkspaceConnectionGrant,\n serializeWorkspaceConnectionGrant,\n serializeWorkspaceConnection,\n summarizeWorkspaceConnectionProviderForApp,\n summarizeWorkspaceConnectionProviderReadiness,\n upsertWorkspaceConnectionGrant,\n upsertWorkspaceConnection,\n type ListWorkspaceConnectionProviderCatalogForAppOptions,\n type ListWorkspaceConnectionGrantsOptions,\n type ListWorkspaceConnectionsOptions,\n type ResolveWorkspaceConnectionCredentialForAppOptions,\n type ResolveWorkspaceConnectionCredentialsForAppOptions,\n type SerializedWorkspaceConnectionGrant,\n type SerializedWorkspaceConnection,\n type SummarizeWorkspaceConnectionProviderForAppOptions,\n type SummarizeWorkspaceConnectionProviderReadinessOptions,\n type UpsertWorkspaceConnectionGrantInput,\n type UpsertWorkspaceConnectionInput,\n type WorkspaceConnectionAppAccess,\n type WorkspaceConnectionAppAccessMode,\n type WorkspaceConnection,\n type WorkspaceConnectionCredentialBackend,\n type WorkspaceConnectionCredentialProvenance,\n type WorkspaceConnectionCredentialRef,\n type WorkspaceConnectionCredentialResolution,\n type WorkspaceConnectionCredentialResolutionCheck,\n type WorkspaceConnectionCredentialResolutionStatus,\n type WorkspaceConnectionCredentialsResolution,\n type WorkspaceConnectionExplicitGrantSummary,\n type WorkspaceConnectionForAppSummary,\n type WorkspaceConnectionGrant,\n type WorkspaceConnectionGrantAvailability,\n type WorkspaceConnectionGrantState,\n type WorkspaceConnectionProviderAppSummary,\n type WorkspaceConnectionProviderLike,\n type WorkspaceConnectionProviderCatalogForApp,\n type WorkspaceConnectionProviderCatalogForAppItem,\n type WorkspaceConnectionProviderReadiness,\n type WorkspaceConnectionProviderReadinessStatus,\n type WorkspaceConnectionPublicCredentialRef,\n type WorkspaceConnectionStatus,\n workspaceConnectionIsAvailableToApp,\n} from \"./workspace-connections/index.js\";\n\n// Reusable workspace connection provider catalog\nexport {\n PROVIDER_READERS,\n ProviderReaderRuntimeError,\n WORKSPACE_CONNECTION_PROVIDERS,\n createProviderReaderRuntime,\n defineProviderReader,\n defineProviderReaderImplementation,\n defineWorkspaceConnectionProvider,\n getProviderReader,\n getWorkspaceConnectionProvider,\n isWorkspaceConnectionProviderId,\n listProviderReaders,\n listWorkspaceConnectionProviders,\n listWorkspaceConnectionProvidersForCapability,\n listWorkspaceConnectionProvidersForTemplate,\n providerReaderSupports,\n workspaceConnectionProviderSupports,\n type ListWorkspaceConnectionProvidersOptions,\n type ListProviderReadersOptions,\n type ProviderReaderCapability,\n type ProviderReaderCredentialRequirement,\n type ProviderReaderDefinition,\n type ProviderReaderImplementationStatus,\n type ProviderReaderOperation,\n type ProviderReaderOperationDescriptor,\n type ProviderReaderOperationParameter,\n type ProviderReaderRequest,\n type ProviderReaderRuntime,\n type ProviderReaderRuntimeConnection,\n type ProviderReaderRuntimeConnectionResolverOptions,\n type ProviderReaderRuntimeContext,\n type ProviderReaderRuntimeCredentialsResolverOptions,\n type ProviderReaderRuntimeErrorCode,\n type ProviderReaderRuntimeHandler,\n type ProviderReaderRuntimeImplementation,\n type ProviderReaderRuntimeItem,\n type ProviderReaderRuntimeOptions,\n type ProviderReaderRuntimeResponse,\n type WorkspaceConnectionCapability,\n type WorkspaceConnectionCredentialKey,\n type WorkspaceConnectionProvider,\n type WorkspaceConnectionProviderId,\n type WorkspaceConnectionTemplateUse,\n} from \"./connections/index.js\";\n\n// Scripts\nexport {\n runScript,\n loadEnv,\n parseArgs,\n camelCaseArgs,\n isValidPath,\n isValidProjectPath,\n ensureDir,\n fail,\n} from \"./scripts/index.js\";\n\n// Secrets registry — import from \"@agent-native/core/secrets\" when possible\n// (the subpath keeps the top-level entry point lean), but re-export the\n// public API here for convenience.\nexport {\n registerRequiredSecret,\n listRequiredSecrets,\n getRequiredSecret,\n readAppSecret,\n writeAppSecret,\n deleteAppSecret,\n type RegisteredSecret,\n type SecretScope,\n type SecretKind,\n type SecretValidator,\n type SecretRef,\n} from \"./secrets/index.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,+CAA+C;AAE/C,0BAA0B;AAC1B,OAAO,EACL,4BAA4B,EAU5B,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EAMtB,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,GAQ9B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,QAAQ,EACR,iCAAiC,GAElC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,UAAU,GAKX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,u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AAe,EACf,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,2BAA2B,EAC3B,sCAAsC,EACtC,6BAA6B,EAC7B,4BAA4B,EAC5B,iBAAiB,GAQlB,MAAM,kBAAkB,CAAC;AAE1B,mDAAmD;AACnD,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAC/B,sBAAsB,EACtB,2BAA2B,EAC3B,4CAA4C,EAC5C,6BAA6B,EAC7B,wBAAwB,EACxB,0CAA0C,EAC1C,2CAA2C,EAC3C,8BAA8B,EAC9B,iCAAiC,EACjC,4BAA4B,EAC5B,0CAA0C,EAC1C,6CAA6C,EAC7C,8BAA8B,EAC9B,yBAAyB,EAmCzB,mCAAmC,GACpC,MAAM,kCAAkC,CAAC;AAE1C,iDAAiD;AACjD,OAAO,EACL,gBAAgB,EAChB,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,EAC3B,oBAAoB,EACpB,kCAAkC,EAClC,iCAAiC,EACjC,iBAAiB,EACjB,8BAA8B,EAC9B,+BAA+B,EAC/B,mBAAmB,EACnB,gCAAgC,EAChC,6CAA6C,EAC7C,2CAA2C,EAC3C,sBAAsB,EACtB,mCAAmC,GA2BpC,MAAM,wBAAwB,CAAC;AAEhC,UAAU;AACV,OAAO,EACL,SAAS,EACT,OAAO,EACP,SAAS,EACT,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,SAAS,EACT,IAAI,GACL,MAAM,oBAAoB,CAAC;AAE5B,4EAA4E;AAC5E,wEAAwE;AACxE,mCAAmC;AACnC,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,eAAe,GAMhB,MAAM,oBAAoB,CAAC","sourcesContent":["// Framework for agent-native apps.\n// Import everything from \"@agent-native/core\".\n\n// Agent (production mode)\nexport {\n createProductionAgentHandler,\n type ActionEntry,\n type ScriptEntry,\n type ProductionAgentOptions,\n type ActionTool,\n type ScriptTool,\n type AgentMessage,\n type AgentChatRequest,\n type AgentChatEvent,\n type AgentChatAttachment,\n DEFAULT_MODEL,\n} from \"./agent/index.js\";\nexport {\n defineAction,\n AgentActionStopError,\n isAgentActionStopError,\n type ActionHttpConfig,\n type AgentActionStopOptions,\n type PublicAgentActionConfig,\n type ActionDeepLink,\n type ActionLinkBuilder,\n MCP_APP_EXTENSION_ID,\n MCP_APP_MIME_TYPE,\n MCP_APP_RESOURCE_URI_META_KEY,\n type ActionMcpAppConfig,\n type ActionMcpAppCsp,\n type ActionMcpAppCspBuilder,\n type ActionMcpAppHtmlBuilder,\n type ActionMcpAppPermissions,\n type ActionMcpAppResourceConfig,\n type ActionMcpAppResourceMeta,\n} from \"./action.js\";\nexport {\n embedApp,\n MCP_APP_REQUEST_ORIGIN_CSP_SOURCE,\n type EmbedAppOptions,\n} from \"./mcp/embed-app.js\";\nexport {\n embedRoute,\n type EmbedRouteContext,\n type EmbedRouteOptions,\n type EmbedRoutePathBuilder,\n type EmbedRouteResult,\n} from \"./mcp/embed-route.js\";\nexport { createDevScriptRegistry } from \"./scripts/dev/index.js\";\nexport {\n createAgentChatPlugin,\n defaultAgentChatPlugin,\n type AgentChatPluginOptions,\n} from \"./server/agent-chat-plugin.js\";\nexport {\n createAgentNativeEmbeddedPlugin,\n mountAgentNativeEmbedded,\n type AgentNativeEmbeddedPluginOptions,\n} from \"./server/embedded.js\";\n\n// Server\nexport {\n createServer,\n createSSEHandler,\n defineNitroPlugin,\n autoMountAuth,\n getSession,\n type CreateServerOptions,\n type SSEHandlerOptions,\n type AuthSession,\n type AuthOptions,\n} from \"./server/index.js\";\n\n// Client\nexport {\n addContextToAgentChat,\n appendAgentChatContextToMessage,\n formatAgentChatContextItemsForPrompt,\n sendToAgentChat,\n setContextToAgentChat,\n isEmbedMcpChatBridgeActive,\n useAgentChatGenerating,\n useDevMode,\n useSendToAgentChat,\n AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES,\n getMcpAppHostContext,\n openMcpAppHostLink,\n requestMcpAppDisplayMode,\n updateMcpAppModelContext,\n useMcpAppHostContext,\n CodeRequiredDialog,\n useAgentNativeEmbeddedBrowserSession,\n useDbSync,\n useFileWatcher,\n cn,\n ApiKeySettings,\n useSession,\n AgentNativeEmbedded,\n useProductionAgent,\n ProductionAgentPanel,\n type AgentChatContextItem,\n type AgentChatContextMessage,\n type AgentChatMessage,\n type AgentNativeMcpAppHostMessageType,\n type McpAppDisplayMode,\n type McpAppHostCapabilities,\n type McpAppHostContext,\n type McpAppHostContextSnapshot,\n type McpAppModelContextContentPart,\n type McpAppModelContextUpdate,\n type AgentNativeEmbeddedProps,\n type UseAgentNativeEmbeddedBrowserSessionOptions,\n type CodeRequiredDialogProps,\n type ProductionAgentMessage,\n type UseProductionAgentResult,\n type ProductionAgentPanelProps,\n useActionQuery,\n useActionMutation,\n} from \"./client/index.js\";\n\n// Shared (isomorphic)\nexport {\n agentChat,\n type AgentChatCallOptions,\n type AgentChatResponse,\n} from \"./shared/index.js\";\nexport {\n EMBED_MODE_QUERY_PARAM,\n EMBED_SESSION_COOKIE,\n EMBED_START_PATH,\n EMBED_TOKEN_QUERY_PARAM,\n} from \"./shared/embed-auth.js\";\n\n// Agent Web surfaces\nexport {\n AGENT_WEB_CRAWLER_CATEGORIES,\n AGENT_WEB_CRAWLER_USER_AGENTS,\n DEFAULT_AGENT_WEB_CRAWLER_POLICY,\n absoluteUrl,\n agentWebConfigFromPackageJson,\n buildAgentWebStaticFiles,\n buildBaseJsonLd,\n buildLlmsFullTxt,\n buildLlmsTxt,\n buildMarkdownResponseHeaders,\n buildPageJsonLd,\n buildRobotsTxt,\n buildSitemapXml,\n deriveAgentWebPublicRoutes,\n estimateMarkdownTokens,\n markdownFilePathForPage,\n markdownUrlForPage,\n normalizeAgentWebConfig,\n pathPatternMatches,\n resolveAgentWebCrawlerPolicy,\n type AgentWebConfig,\n type AgentWebCrawlerCategory,\n type AgentWebCrawlerDecision,\n type AgentWebCrawlerOverrides,\n type AgentWebCrawlerPolicy,\n type AgentWebInputConfig,\n type AgentWebPage,\n type AgentWebStaticFile,\n type BuildAgentWebStaticFilesOptions,\n type DeriveAgentWebPublicRoutesOptions,\n type MarkdownResponseHeadersOptions,\n} from \"./agent-web/index.js\";\n\n// Token usage tracking\nexport {\n recordUsage,\n getUsageSummary,\n getUserUsageCents,\n calculateCost,\n usageBillingForEngine,\n builderCreditsFromCostCents,\n BUILDER_AGENT_CREDIT_MARGIN_MULTIPLIER,\n BUILDER_AGENT_CREDITS_PER_USD,\n BUILDER_CREDIT_USAGE_BILLING,\n USD_USAGE_BILLING,\n type UsageRecord,\n type UsageSummary,\n type UsageBillingMode,\n type UsageBillingUnit,\n type UsageBucket,\n type DailyBucket,\n type UsageRecentEntry,\n} from \"./usage/store.js\";\n\n// Workspace-scoped third-party connection metadata\nexport {\n deleteWorkspaceConnection,\n getWorkspaceConnectionAppAccess,\n getWorkspaceConnection,\n getWorkspaceConnectionGrant,\n listWorkspaceConnectionProviderCatalogForApp,\n listWorkspaceConnectionGrants,\n listWorkspaceConnections,\n resolveWorkspaceConnectionCredentialForApp,\n resolveWorkspaceConnectionCredentialsForApp,\n revokeWorkspaceConnectionGrant,\n serializeWorkspaceConnectionGrant,\n serializeWorkspaceConnection,\n summarizeWorkspaceConnectionProviderForApp,\n summarizeWorkspaceConnectionProviderReadiness,\n upsertWorkspaceConnectionGrant,\n upsertWorkspaceConnection,\n type ListWorkspaceConnectionProviderCatalogForAppOptions,\n type ListWorkspaceConnectionGrantsOptions,\n type ListWorkspaceConnectionsOptions,\n type ResolveWorkspaceConnectionCredentialForAppOptions,\n type ResolveWorkspaceConnectionCredentialsForAppOptions,\n type SerializedWorkspaceConnectionGrant,\n type SerializedWorkspaceConnection,\n type SummarizeWorkspaceConnectionProviderForAppOptions,\n type SummarizeWorkspaceConnectionProviderReadinessOptions,\n type UpsertWorkspaceConnectionGrantInput,\n type UpsertWorkspaceConnectionInput,\n type WorkspaceConnectionAppAccess,\n type WorkspaceConnectionAppAccessMode,\n type WorkspaceConnection,\n type WorkspaceConnectionCredentialBackend,\n type WorkspaceConnectionCredentialProvenance,\n type WorkspaceConnectionCredentialRef,\n type WorkspaceConnectionCredentialResolution,\n type WorkspaceConnectionCredentialResolutionCheck,\n type WorkspaceConnectionCredentialResolutionStatus,\n type WorkspaceConnectionCredentialsResolution,\n type WorkspaceConnectionExplicitGrantSummary,\n type WorkspaceConnectionForAppSummary,\n type WorkspaceConnectionGrant,\n type WorkspaceConnectionGrantAvailability,\n type WorkspaceConnectionGrantState,\n type WorkspaceConnectionProviderAppSummary,\n type WorkspaceConnectionProviderLike,\n type WorkspaceConnectionProviderCatalogForApp,\n type WorkspaceConnectionProviderCatalogForAppItem,\n type WorkspaceConnectionProviderReadiness,\n type WorkspaceConnectionProviderReadinessStatus,\n type WorkspaceConnectionPublicCredentialRef,\n type WorkspaceConnectionStatus,\n workspaceConnectionIsAvailableToApp,\n} from \"./workspace-connections/index.js\";\n\n// Reusable workspace connection provider catalog\nexport {\n PROVIDER_READERS,\n ProviderReaderRuntimeError,\n WORKSPACE_CONNECTION_PROVIDERS,\n createProviderReaderRuntime,\n defineProviderReader,\n defineProviderReaderImplementation,\n defineWorkspaceConnectionProvider,\n getProviderReader,\n getWorkspaceConnectionProvider,\n isWorkspaceConnectionProviderId,\n listProviderReaders,\n listWorkspaceConnectionProviders,\n listWorkspaceConnectionProvidersForCapability,\n listWorkspaceConnectionProvidersForTemplate,\n providerReaderSupports,\n workspaceConnectionProviderSupports,\n type ListWorkspaceConnectionProvidersOptions,\n type ListProviderReadersOptions,\n type ProviderReaderCapability,\n type ProviderReaderCredentialRequirement,\n type ProviderReaderDefinition,\n type ProviderReaderImplementationStatus,\n type ProviderReaderOperation,\n type ProviderReaderOperationDescriptor,\n type ProviderReaderOperationParameter,\n type ProviderReaderRequest,\n type ProviderReaderRuntime,\n type ProviderReaderRuntimeConnection,\n type ProviderReaderRuntimeConnectionResolverOptions,\n type ProviderReaderRuntimeContext,\n type ProviderReaderRuntimeCredentialsResolverOptions,\n type ProviderReaderRuntimeErrorCode,\n type ProviderReaderRuntimeHandler,\n type ProviderReaderRuntimeImplementation,\n type ProviderReaderRuntimeItem,\n type ProviderReaderRuntimeOptions,\n type ProviderReaderRuntimeResponse,\n type WorkspaceConnectionCapability,\n type WorkspaceConnectionCredentialKey,\n type WorkspaceConnectionProvider,\n type WorkspaceConnectionProviderId,\n type WorkspaceConnectionTemplateUse,\n} from \"./connections/index.js\";\n\n// Scripts\nexport {\n runScript,\n loadEnv,\n parseArgs,\n camelCaseArgs,\n isValidPath,\n isValidProjectPath,\n ensureDir,\n fail,\n} from \"./scripts/index.js\";\n\n// Secrets registry — import from \"@agent-native/core/secrets\" when possible\n// (the subpath keeps the top-level entry point lean), but re-export the\n// public API here for convenience.\nexport {\n registerRequiredSecret,\n listRequiredSecrets,\n getRequiredSecret,\n readAppSecret,\n writeAppSecret,\n deleteAppSecret,\n type RegisteredSecret,\n type SecretScope,\n type SecretKind,\n type SecretValidator,\n type SecretRef,\n} from \"./secrets/index.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"connect-route.d.ts","sourceRoot":"","sources":["../../src/mcp/connect-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AA0ClC,MAAM,WAAW,sBAAsB;IACrC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AA+6BD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,QAAQ,CAAC,CAoQnB"}
1
+ {"version":3,"file":"connect-route.d.ts","sourceRoot":"","sources":["../../src/mcp/connect-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AA0ClC,MAAM,WAAW,sBAAsB;IACrC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAm9BD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,QAAQ,CAAC,CAoQnB"}
@@ -242,6 +242,98 @@ function renderConnectPage(params) {
242
242
  const brandMarkSvg = agentNativeMarkSvg("brand-mark", "agent-native-connect-brand-gradient");
243
243
  const flowMarkSvg = agentNativeMarkSvg("flow-mark", "agent-native-connect-flow-gradient");
244
244
  const safeUserCode = userCode && USER_CODE_RE.test(userCode) ? escapeHtml(userCode) : "";
245
+ const setupHtml = safeUserCode
246
+ ? ""
247
+ : `
248
+ <div class="mcp-url-block">
249
+ <div class="section-label">Your MCP URL</div>
250
+ <div class="url-row">
251
+ <code id="mcpUrlValue">${safeMcpUrl}</code>
252
+ <button type="button" class="ghost" data-copy="mcpUrlValue" aria-label="Copy MCP URL">Copy</button>
253
+ </div>
254
+ </div>
255
+
256
+ <details id="assistantSetup" class="hosts">
257
+ <summary>
258
+ <span class="connections-title">Assistant setup</span>
259
+ <span class="connections-state">MCP URL guides</span>
260
+ <span class="chev" aria-hidden="true"></span>
261
+ </summary>
262
+ <div class="hosts-body">
263
+ <div class="section-label">Pick your AI assistant</div>
264
+ <div class="tabs" role="tablist" aria-label="Choose your AI assistant">
265
+ <button type="button" class="tab is-active" role="tab" data-tab="claude" aria-selected="true">Claude</button>
266
+ <button type="button" class="tab" role="tab" data-tab="chatgpt" aria-selected="false">ChatGPT</button>
267
+ <button type="button" class="tab" role="tab" data-tab="cursor" aria-selected="false">Cursor</button>
268
+ <button type="button" class="tab" role="tab" data-tab="claude-code" aria-selected="false">Claude Code</button>
269
+ <button type="button" class="tab" role="tab" data-tab="codex" aria-selected="false">Codex</button>
270
+ <button type="button" class="tab" role="tab" data-tab="other" aria-selected="false">Other</button>
271
+ </div>
272
+ <div class="tab-panel is-active" role="tabpanel" data-panel="claude">
273
+ <ol>
274
+ <li>Open <strong>Customize → Connectors</strong> in Claude.</li>
275
+ <li>Click the <strong>+</strong> button → <strong>Add custom connector</strong>.</li>
276
+ <li>Paste the MCP URL above, name it <strong>${safeApp}</strong>, click <strong>Connect</strong>.</li>
277
+ <li>On the consent page, click <strong>Authorize</strong> to approve <code>mcp:read</code>, <code>mcp:write</code>, <code>mcp:apps</code>.</li>
278
+ </ol>
279
+ <a class="primary-link" href="https://claude.ai/customize/connectors" target="_blank" rel="noopener noreferrer">Open Claude → Connectors</a>
280
+ <p class="hint">Works in Claude web and Claude Desktop. Inline MCP Apps (charts, dashboards, drafts) render automatically inside the chat.</p>
281
+ </div>
282
+ <div class="tab-panel" role="tabpanel" data-panel="chatgpt">
283
+ <ol>
284
+ <li>In ChatGPT, open <strong>Settings → Apps</strong> (Business/Enterprise/Edu workspaces with developer mode enabled).</li>
285
+ <li>Scroll to <strong>Advanced settings → Create app</strong>, paste the MCP URL above, name it <strong>${safeApp}</strong>.</li>
286
+ <li>Click <strong>Connect</strong>, sign in with your Agent-Native account, and approve <code>mcp:read</code>, <code>mcp:write</code>, <code>mcp:apps</code>.</li>
287
+ </ol>
288
+ <a class="primary-link" href="https://chatgpt.com/" target="_blank" rel="noopener noreferrer">Open ChatGPT</a>
289
+ <p class="hint"><strong>Got "Connector name already exists" but don't see it under Enabled apps?</strong> ChatGPT saves a hidden draft the moment you click Create — even if you closed the OAuth popup before approving. In <strong>Settings → Apps</strong>, scroll past Enabled apps to the <strong>Drafts</strong> section ("Private apps you've created in developer mode"). Click the draft and either press <strong>Connect</strong> to finish OAuth, or use the <strong>⋯ → Delete</strong> menu and re-create. Workspace admins may also need to enable custom connectors under org settings; each member still authorizes their own account.</p>
290
+ </div>
291
+ <div class="tab-panel" role="tabpanel" data-panel="cursor">
292
+ <ol>
293
+ <li>Open <strong>Cursor → Settings → MCP</strong>.</li>
294
+ <li>Click <strong>Add MCP Server</strong>, paste the MCP URL above, save.</li>
295
+ <li>When prompted, sign in with your Agent-Native account and approve the MCP scopes.</li>
296
+ </ol>
297
+ <p class="hint">Cursor supports remote-OAuth MCP servers, same paste-URL flow as Claude — no terminal needed.</p>
298
+ </div>
299
+ <div class="tab-panel" role="tabpanel" data-panel="claude-code">
300
+ <p>In your terminal, run:</p>
301
+ <pre id="claudeCodeCmd">${safeClaudeCodeCmd}</pre>
302
+ <button type="button" class="primary-link compact" data-copy="claudeCodeCmd">Copy command</button>
303
+ <p class="hint">Then inside Claude Code type <code>/mcp</code>, choose <strong>${safeServerId}</strong>, and click <strong>Authenticate</strong>. Claude completes the OAuth flow itself — no static token needed.</p>
304
+ </div>
305
+ <div class="tab-panel" role="tabpanel" data-panel="codex">
306
+ <p>In your terminal, run:</p>
307
+ <pre id="codexCmd">${safeCodexCmd}</pre>
308
+ <button type="button" class="primary-link compact" data-copy="codexCmd">Copy command</button>
309
+ <p class="hint">Opens this page in your browser and writes Codex's <code>~/.codex/config.toml</code> automatically. The same command works for Claude Cowork and Goose.</p>
310
+ </div>
311
+ <div class="tab-panel" role="tabpanel" data-panel="other">
312
+ <p>Any MCP-compatible client with remote-OAuth support: paste the MCP URL above. For clients without OAuth, paste this <code>.mcp.json</code> snippet and generate a static bearer below:</p>
313
+ <pre id="genericConfig">${safeGenericConfig}</pre>
314
+ <button type="button" class="primary-link compact" data-copy="genericConfig">Copy config</button>
315
+ </div>
316
+ </div>
317
+ </details>`;
318
+ const tokenAdvancedOptionsHtml = safeUserCode
319
+ ? ""
320
+ : `
321
+ <details class="advanced">
322
+ <summary>
323
+ Advanced options
324
+ <span class="chev" aria-hidden="true"></span>
325
+ </summary>
326
+ <div class="advanced-body">
327
+ <div class="field">
328
+ <label for="label">Label (optional)</label>
329
+ <input id="label" type="text" placeholder="e.g. Claude Code on my laptop" maxlength="120" />
330
+ </div>
331
+ <div class="field">
332
+ <label for="ttl">Expires in (days, 1–365)</label>
333
+ <input id="ttl" type="number" min="1" max="365" value="${DEFAULT_TOKEN_TTL_DAYS}" />
334
+ </div>
335
+ </div>
336
+ </details>`;
245
337
  return `<!DOCTYPE html>
246
338
  <html lang="en">
247
339
  <head>
@@ -475,7 +567,26 @@ function renderConnectPage(params) {
475
567
  font-size: 0.78rem; color: var(--text);
476
568
  }
477
569
  .url-row .ghost { flex: 0 0 auto; }
478
- .hosts { margin: 0 0 1rem; }
570
+ .hosts {
571
+ margin: 0 0 1rem; border-top: 1px solid var(--border);
572
+ border-bottom: 1px solid var(--border); padding: 0.35rem 0;
573
+ }
574
+ .hosts > summary {
575
+ list-style: none; cursor: pointer; user-select: none;
576
+ display: flex; align-items: center; gap: 0.55rem;
577
+ min-height: 2.2rem; color: var(--muted); font-size: 0.82rem;
578
+ }
579
+ .hosts > summary::-webkit-details-marker { display: none; }
580
+ .hosts > summary:focus-visible {
581
+ outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px;
582
+ }
583
+ .hosts > summary .chev {
584
+ width: 7px; height: 7px; border-right: 1.5px solid currentColor;
585
+ border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
586
+ transition: transform 0.15s ease; margin: -3px 0 0 0.15rem;
587
+ }
588
+ .hosts[open] > summary .chev { transform: rotate(225deg); margin-top: 2px; }
589
+ .hosts-body { padding: 0.15rem 0 0.25rem; }
479
590
  .tabs {
480
591
  display: flex; flex-wrap: wrap; gap: 0.25rem;
481
592
  border-bottom: 1px solid var(--border); margin-bottom: 0.75rem;
@@ -585,69 +696,7 @@ function renderConnectPage(params) {
585
696
  <span class="value" id="userCodeValue">${safeUserCode}</span>
586
697
  </div>
587
698
 
588
- <div class="mcp-url-block">
589
- <div class="section-label">Your MCP URL</div>
590
- <div class="url-row">
591
- <code id="mcpUrlValue">${safeMcpUrl}</code>
592
- <button type="button" class="ghost" data-copy="mcpUrlValue" aria-label="Copy MCP URL">Copy</button>
593
- </div>
594
- </div>
595
-
596
- <div class="hosts">
597
- <div class="section-label">Pick your AI assistant</div>
598
- <div class="tabs" role="tablist" aria-label="Choose your AI assistant">
599
- <button type="button" class="tab is-active" role="tab" data-tab="claude" aria-selected="true">Claude</button>
600
- <button type="button" class="tab" role="tab" data-tab="chatgpt" aria-selected="false">ChatGPT</button>
601
- <button type="button" class="tab" role="tab" data-tab="cursor" aria-selected="false">Cursor</button>
602
- <button type="button" class="tab" role="tab" data-tab="claude-code" aria-selected="false">Claude Code</button>
603
- <button type="button" class="tab" role="tab" data-tab="codex" aria-selected="false">Codex</button>
604
- <button type="button" class="tab" role="tab" data-tab="other" aria-selected="false">Other</button>
605
- </div>
606
- <div class="tab-panel is-active" role="tabpanel" data-panel="claude">
607
- <ol>
608
- <li>Open <strong>Customize → Connectors</strong> in Claude.</li>
609
- <li>Click the <strong>+</strong> button → <strong>Add custom connector</strong>.</li>
610
- <li>Paste the MCP URL above, name it <strong>${safeApp}</strong>, click <strong>Connect</strong>.</li>
611
- <li>On the consent page, click <strong>Authorize</strong> to approve <code>mcp:read</code>, <code>mcp:write</code>, <code>mcp:apps</code>.</li>
612
- </ol>
613
- <a class="primary-link" href="https://claude.ai/customize/connectors" target="_blank" rel="noopener noreferrer">Open Claude → Connectors</a>
614
- <p class="hint">Works in Claude web and Claude Desktop. Inline MCP Apps (charts, dashboards, drafts) render automatically inside the chat.</p>
615
- </div>
616
- <div class="tab-panel" role="tabpanel" data-panel="chatgpt">
617
- <ol>
618
- <li>In ChatGPT, open <strong>Settings → Apps</strong> (Business/Enterprise/Edu workspaces with developer mode enabled).</li>
619
- <li>Scroll to <strong>Advanced settings → Create app</strong>, paste the MCP URL above, name it <strong>${safeApp}</strong>.</li>
620
- <li>Click <strong>Connect</strong>, sign in with your Agent-Native account, and approve <code>mcp:read</code>, <code>mcp:write</code>, <code>mcp:apps</code>.</li>
621
- </ol>
622
- <a class="primary-link" href="https://chatgpt.com/" target="_blank" rel="noopener noreferrer">Open ChatGPT</a>
623
- <p class="hint"><strong>Got "Connector name already exists" but don't see it under Enabled apps?</strong> ChatGPT saves a hidden draft the moment you click Create — even if you closed the OAuth popup before approving. In <strong>Settings → Apps</strong>, scroll past Enabled apps to the <strong>Drafts</strong> section ("Private apps you've created in developer mode"). Click the draft and either press <strong>Connect</strong> to finish OAuth, or use the <strong>⋯ → Delete</strong> menu and re-create. Workspace admins may also need to enable custom connectors under org settings; each member still authorizes their own account.</p>
624
- </div>
625
- <div class="tab-panel" role="tabpanel" data-panel="cursor">
626
- <ol>
627
- <li>Open <strong>Cursor → Settings → MCP</strong>.</li>
628
- <li>Click <strong>Add MCP Server</strong>, paste the MCP URL above, save.</li>
629
- <li>When prompted, sign in with your Agent-Native account and approve the MCP scopes.</li>
630
- </ol>
631
- <p class="hint">Cursor supports remote-OAuth MCP servers, same paste-URL flow as Claude — no terminal needed.</p>
632
- </div>
633
- <div class="tab-panel" role="tabpanel" data-panel="claude-code">
634
- <p>In your terminal, run:</p>
635
- <pre id="claudeCodeCmd">${safeClaudeCodeCmd}</pre>
636
- <button type="button" class="primary-link compact" data-copy="claudeCodeCmd">Copy command</button>
637
- <p class="hint">Then inside Claude Code type <code>/mcp</code>, choose <strong>${safeServerId}</strong>, and click <strong>Authenticate</strong>. Claude completes the OAuth flow itself — no static token needed.</p>
638
- </div>
639
- <div class="tab-panel" role="tabpanel" data-panel="codex">
640
- <p>In your terminal, run:</p>
641
- <pre id="codexCmd">${safeCodexCmd}</pre>
642
- <button type="button" class="primary-link compact" data-copy="codexCmd">Copy command</button>
643
- <p class="hint">Opens this page in your browser and writes Codex's <code>~/.codex/config.toml</code> automatically. The same command works for Claude Cowork and Goose.</p>
644
- </div>
645
- <div class="tab-panel" role="tabpanel" data-panel="other">
646
- <p>Any MCP-compatible client with remote-OAuth support: paste the MCP URL above. For clients without OAuth, paste this <code>.mcp.json</code> snippet and generate a static bearer below:</p>
647
- <pre id="genericConfig">${safeGenericConfig}</pre>
648
- <button type="button" class="primary-link compact" data-copy="genericConfig">Copy config</button>
649
- </div>
650
- </div>
699
+ ${setupHtml}
651
700
 
652
701
  <details id="staticTokenMint" class="connections static-token-mint"${safeUserCode ? " open" : ""}>
653
702
  <summary>
@@ -659,22 +708,7 @@ function renderConnectPage(params) {
659
708
  <div id="msg" class="msg"></div>
660
709
  <div id="mintForm">
661
710
  <button id="authorizeBtn" class="primary">${safeUserCode ? "Authorize device" : "Create connection token"}</button>
662
- <details class="advanced">
663
- <summary>
664
- Advanced options
665
- <span class="chev" aria-hidden="true"></span>
666
- </summary>
667
- <div class="advanced-body">
668
- <div class="field">
669
- <label for="label">Label (optional)</label>
670
- <input id="label" type="text" placeholder="e.g. Claude Code on my laptop" maxlength="120" />
671
- </div>
672
- <div class="field">
673
- <label for="ttl">Expires in (days, 1–365)</label>
674
- <input id="ttl" type="number" min="1" max="365" value="${DEFAULT_TOKEN_TTL_DAYS}" />
675
- </div>
676
- </div>
677
- </details>
711
+ ${tokenAdvancedOptionsHtml}
678
712
  </div>
679
713
  <div id="result" class="result-panel hidden">
680
714
  <div class="result-title">Connection token created</div>
@@ -833,8 +867,6 @@ function renderConnectPage(params) {
833
867
  var btn = this;
834
868
  btn.disabled = true;
835
869
  clearMsg();
836
- var label = document.getElementById("label").value || undefined;
837
- var ttlDays = parseInt(document.getElementById("ttl").value, 10) || undefined;
838
870
  try {
839
871
  if (USER_CODE) {
840
872
  var a = await postJson("/device/authorize", { user_code: USER_CODE });
@@ -895,6 +927,10 @@ function renderConnectPage(params) {
895
927
  }, 2000);
896
928
  return;
897
929
  } else {
930
+ var labelEl = document.getElementById("label");
931
+ var ttlEl = document.getElementById("ttl");
932
+ var label = labelEl ? labelEl.value || undefined : undefined;
933
+ var ttlDays = ttlEl ? parseInt(ttlEl.value, 10) || undefined : undefined;
898
934
  var m = await postJson("/token", { label: label, ttlDays: ttlDays });
899
935
  if (!m.ok) {
900
936
  btn.disabled = false;