@agent-native/core 0.107.0 → 0.107.1

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 (131) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +10 -0
  3. package/corpus/core/docs/content/integrations.mdx +27 -27
  4. package/corpus/core/package.json +1 -1
  5. package/corpus/core/src/agent/production-agent.ts +19 -0
  6. package/corpus/core/src/agent/run-store.ts +98 -2
  7. package/corpus/core/src/client/AssistantChat.tsx +13 -0
  8. package/corpus/core/src/client/CommandMenu.tsx +5 -0
  9. package/corpus/core/src/client/active-run-state.ts +34 -0
  10. package/corpus/core/src/client/agent-chat-adapter.ts +4 -0
  11. package/corpus/core/src/client/resources/McpConnectionSuggestion.tsx +41 -11
  12. package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +27 -9
  13. package/corpus/core/src/client/resources/mcp-integration-catalog.ts +45 -0
  14. package/corpus/core/src/client/sharing/ShareButton.tsx +30 -9
  15. package/corpus/core/src/client/use-agent-chat-home-handoff.ts +2 -2
  16. package/corpus/core/src/localization/default-messages.ts +4 -1
  17. package/corpus/core/src/secrets/register-framework-secrets.ts +28 -0
  18. package/corpus/core/src/server/agent-chat-plugin.ts +29 -1
  19. package/corpus/core/src/vite/client.ts +24 -0
  20. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +29 -21
  21. package/corpus/templates/analytics/AGENTS.md +8 -0
  22. package/corpus/templates/analytics/actions/dashboard-mutation-api.ts +1 -1
  23. package/corpus/templates/analytics/actions/update-dashboard.ts +6 -2
  24. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +35 -7
  25. package/corpus/templates/analytics/app/components/layout/Layout.tsx +1 -3
  26. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +11 -1
  27. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/extension-slot.ts +11 -0
  28. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +27 -0
  29. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +6 -0
  30. package/corpus/templates/analytics/changelog/2026-07-17-dashboard-extension-boxes.md +6 -0
  31. package/corpus/templates/analytics/server/lib/agent-readable-resource-context.ts +8 -0
  32. package/corpus/templates/analytics/server/plugins/agent-chat.ts +1 -0
  33. package/corpus/templates/assets/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  34. package/corpus/templates/brain/app/hooks/use-navigation-state.ts +6 -1
  35. package/corpus/templates/brain/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  36. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +1 -1
  37. package/corpus/templates/calendar/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  38. package/corpus/templates/chat/app/hooks/use-navigation-state.ts +4 -1
  39. package/corpus/templates/chat/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  40. package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -1
  41. package/corpus/templates/clips/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  42. package/corpus/templates/content/actions/_content-space-access.ts +45 -2
  43. package/corpus/templates/content/actions/create-content-database.ts +41 -7
  44. package/corpus/templates/content/app/components/layout/Layout.tsx +1 -1
  45. package/corpus/templates/content/app/root.tsx +1 -10
  46. package/corpus/templates/content/changelog/2026-07-17-creating-a-database-now-completes-reliably-in-hosted-workspa.md +6 -0
  47. package/corpus/templates/content/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  48. package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +4 -1
  49. package/corpus/templates/dispatch/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  50. package/corpus/templates/forms/app/components/layout/Layout.tsx +2 -4
  51. package/corpus/templates/forms/app/components/ui/popover.tsx +25 -1
  52. package/corpus/templates/forms/app/hooks/use-navigation-state.ts +6 -1
  53. package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +13 -10
  54. package/corpus/templates/forms/app/root.tsx +6 -1
  55. package/corpus/templates/forms/changelog/2026-07-17-form-builder-popovers-stay-within-the-viewport.md +6 -0
  56. package/corpus/templates/forms/changelog/2026-07-17-form-editor-loading-matches-current-sidebar-free-layout.md +6 -0
  57. package/corpus/templates/forms/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  58. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +1 -1
  59. package/corpus/templates/mail/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  60. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +14 -3
  61. package/corpus/templates/plan/app/hooks/use-navigation-state.ts +8 -1
  62. package/corpus/templates/plan/app/root.tsx +0 -2
  63. package/corpus/templates/plan/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  64. package/corpus/templates/slides/app/components/layout/Layout.tsx +1 -1
  65. package/corpus/templates/slides/app/context/DeckContext.tsx +23 -23
  66. package/corpus/templates/slides/changelog/2026-07-17-duplicated-slides-now-stay-in-the-deck.md +6 -0
  67. package/corpus/templates/slides/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  68. package/corpus/templates/tasks/app/components/layout/Layout.tsx +2 -13
  69. package/corpus/templates/tasks/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it.md +6 -0
  70. package/dist/agent/production-agent.d.ts.map +1 -1
  71. package/dist/agent/production-agent.js +13 -1
  72. package/dist/agent/production-agent.js.map +1 -1
  73. package/dist/agent/run-store.d.ts +17 -0
  74. package/dist/agent/run-store.d.ts.map +1 -1
  75. package/dist/agent/run-store.js +84 -2
  76. package/dist/agent/run-store.js.map +1 -1
  77. package/dist/client/AssistantChat.d.ts.map +1 -1
  78. package/dist/client/AssistantChat.js +10 -1
  79. package/dist/client/AssistantChat.js.map +1 -1
  80. package/dist/client/CommandMenu.d.ts.map +1 -1
  81. package/dist/client/CommandMenu.js +4 -0
  82. package/dist/client/CommandMenu.js.map +1 -1
  83. package/dist/client/active-run-state.d.ts +7 -0
  84. package/dist/client/active-run-state.d.ts.map +1 -1
  85. package/dist/client/active-run-state.js +28 -0
  86. package/dist/client/active-run-state.js.map +1 -1
  87. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  88. package/dist/client/agent-chat-adapter.js +4 -1
  89. package/dist/client/agent-chat-adapter.js.map +1 -1
  90. package/dist/client/resources/McpConnectionSuggestion.d.ts.map +1 -1
  91. package/dist/client/resources/McpConnectionSuggestion.js +27 -8
  92. package/dist/client/resources/McpConnectionSuggestion.js.map +1 -1
  93. package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
  94. package/dist/client/resources/McpIntegrationDialog.js +4 -2
  95. package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
  96. package/dist/client/resources/mcp-integration-catalog.d.ts +6 -0
  97. package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -1
  98. package/dist/client/resources/mcp-integration-catalog.js +33 -0
  99. package/dist/client/resources/mcp-integration-catalog.js.map +1 -1
  100. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  101. package/dist/client/sharing/ShareButton.js +15 -12
  102. package/dist/client/sharing/ShareButton.js.map +1 -1
  103. package/dist/client/use-agent-chat-home-handoff.d.ts +1 -1
  104. package/dist/client/use-agent-chat-home-handoff.d.ts.map +1 -1
  105. package/dist/client/use-agent-chat-home-handoff.js +1 -1
  106. package/dist/client/use-agent-chat-home-handoff.js.map +1 -1
  107. package/dist/collab/awareness.d.ts +2 -2
  108. package/dist/collab/awareness.d.ts.map +1 -1
  109. package/dist/collab/routes.d.ts +1 -1
  110. package/dist/collab/struct-routes.d.ts +1 -1
  111. package/dist/localization/default-messages.d.ts +2 -0
  112. package/dist/localization/default-messages.d.ts.map +1 -1
  113. package/dist/localization/default-messages.js +3 -1
  114. package/dist/localization/default-messages.js.map +1 -1
  115. package/dist/observability/routes.d.ts +5 -5
  116. package/dist/secrets/register-framework-secrets.d.ts.map +1 -1
  117. package/dist/secrets/register-framework-secrets.js +25 -0
  118. package/dist/secrets/register-framework-secrets.js.map +1 -1
  119. package/dist/secrets/routes.d.ts +9 -9
  120. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  121. package/dist/server/agent-chat-plugin.js +23 -1
  122. package/dist/server/agent-chat-plugin.js.map +1 -1
  123. package/dist/templates/chat/app/hooks/use-navigation-state.ts +4 -1
  124. package/dist/templates/chat/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  125. package/dist/vite/client.d.ts.map +1 -1
  126. package/dist/vite/client.js +20 -0
  127. package/dist/vite/client.js.map +1 -1
  128. package/docs/content/integrations.mdx +27 -27
  129. package/package.json +1 -1
  130. package/src/templates/chat/app/hooks/use-navigation-state.ts +4 -1
  131. package/src/templates/chat/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  appBasePath,
3
+ isAgentChatHomeHandoffActive,
3
4
  appPath,
4
5
  markAgentChatHomeHandoff,
5
6
  useAgentRouteState,
@@ -34,7 +35,9 @@ export function useNavigationState() {
34
35
  isChatPath(location.pathname) &&
35
36
  !isChatPath(pathnameFromPath(path))
36
37
  ) {
37
- markAgentChatHomeHandoff("chat");
38
+ if (isAgentChatHomeHandoffActive("chat")) {
39
+ markAgentChatHomeHandoff("chat");
40
+ }
38
41
  }
39
42
  },
40
43
  });
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-07-17
4
+ ---
5
+
6
+ The agent chat sidebar stays closed until you open it or start a chat handoff.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CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjD;AAED,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CACxD,mBAAmB,EACnB,SAAS,GAAG,aAAa,CAC1B;IACC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAkiBD,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,MAAM,GAAG,SAAS,CAMpB;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,OAAO,CAWT;AA69BD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CACzB,OAAO,GAAE,4BAAiC,GACzC,MAAM,EAAE,CAcV;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,UAAU,CAU1E;AAED,OAAO,EACL,eAAe,IAAI,gBAAgB,EACnC,sBAAsB,IAAI,uBAAuB,EACjD,mBAAmB,IAAI,oBAAoB,EAC3C,qBAAqB,IAAI,sBAAsB,EAC/C,gCAAgC,IAAI,iCAAiC,GACtE,CAAC"}
@@ -2111,6 +2111,25 @@ function createAgentNativePlugins(options, { command, includeReactTransform, use
2111
2111
  createTailwindPlugin(options),
2112
2112
  ].filter(Boolean);
2113
2113
  }
2114
+ function resolveAgentNativeTemplate(cwd) {
2115
+ const configured = [
2116
+ process.env.AGENT_NATIVE_TEMPLATE,
2117
+ process.env.VITE_AGENT_NATIVE_TEMPLATE,
2118
+ process.env.VITE_APP_TEMPLATE,
2119
+ ].find((value) => value?.trim());
2120
+ if (configured)
2121
+ return configured.trim().toLowerCase();
2122
+ const normalizedCwd = cwd.replaceAll("\\", "/");
2123
+ const marker = "/templates/";
2124
+ const markerIndex = normalizedCwd.lastIndexOf(marker);
2125
+ if (markerIndex === -1)
2126
+ return "";
2127
+ return (normalizedCwd
2128
+ .slice(markerIndex + marker.length)
2129
+ .split("/")[0]
2130
+ ?.trim()
2131
+ .toLowerCase() ?? "");
2132
+ }
2114
2133
  function createAgentNativeConfig(options = {}, command, userConfig = {}) {
2115
2134
  const cwd = process.cwd();
2116
2135
  // Workspace env fallback. If this app is inside a workspace, tell Vite to
@@ -2189,6 +2208,7 @@ function createAgentNativeConfig(options = {}, command, userConfig = {}) {
2189
2208
  // authoritative even if app config provides its own `define` entries.
2190
2209
  __AGENT_NATIVE_ROUTE_WARMUP_CONFIG__: JSON.stringify(normalizeAgentNativeRouteWarmupConfig(options.routeWarmup)),
2191
2210
  __AGENT_NATIVE_MCP_INTEGRATIONS_CONFIG__: JSON.stringify(normalizeMcpIntegrationsConfig(options.mcpIntegrations)),
2211
+ __AGENT_NATIVE_TEMPLATE__: JSON.stringify(resolveAgentNativeTemplate(cwd)),
2192
2212
  },
2193
2213
  server: {
2194
2214
  ...(userConfig.server ?? {}),