@agent-native/core 0.207.0-nightly-20261011124220 → 0.207.0

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 (108) hide show
  1. package/dist/agent/production-agent.js +23 -6
  2. package/dist/agent/thread-data-builder.js +7 -4
  3. package/dist/cli/eval.js +20 -4
  4. package/dist/client/analytics/index.d.ts +1 -1
  5. package/dist/client/analytics.d.ts +12 -3
  6. package/dist/client/analytics.js +51 -17
  7. package/dist/client/onboarding/use-onboarding.d.ts +1 -0
  8. package/dist/client/onboarding/use-onboarding.js +19 -6
  9. package/dist/collab/struct-routes.d.ts +1 -1
  10. package/dist/eval/agent-runner.js +18 -8
  11. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  12. package/dist/mcp/connect-route.js +9 -4
  13. package/dist/observability/routes.d.ts +7 -7
  14. package/dist/onboarding/plugin.js +15 -45
  15. package/dist/progress/routes.d.ts +1 -1
  16. package/dist/resources/store.js +25 -30
  17. package/dist/server/agent-discovery.js +47 -53
  18. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  19. package/dist/server/agent-engine-ollama-models-route.d.ts +2 -2
  20. package/dist/server/builtin-agents.d.ts +2 -0
  21. package/dist/server/builtin-agents.js +50 -3
  22. package/dist/server/credential-provider.d.ts +6 -9
  23. package/dist/server/credential-provider.js +33 -21
  24. package/dist/templates/builder-code-starter/.agents/skills/adding-a-feature/SKILL.md.patch +1 -1
  25. package/dist/templates/builder-code-starter/AGENTS.md.patch +3 -3
  26. package/dist/templates/builder-code-starter/app/components/layout/Layout.tsx.patch +6 -7
  27. package/dist/templates/builder-code-starter/app/hooks/use-navigation-state.ts.patch +21 -28
  28. package/dist/templates/builder-code-starter/app/root.tsx.patch +16 -5
  29. package/dist/templates/builder-code-starter/template-layer.json +4 -0
  30. package/dist/templates/chat/.agents/skills/secrets/SKILL.md +6 -2
  31. package/dist/templates/chat/AGENTS.md +3 -3
  32. package/dist/templates/chat/CHANGELOG.md +6 -0
  33. package/dist/templates/chat/app/components/chat/ChatHomeRedirect.tsx +25 -0
  34. package/dist/templates/chat/app/components/chat/ChatRouteContent.tsx +828 -15
  35. package/dist/templates/chat/app/components/home/HomePage.tsx +332 -0
  36. package/dist/templates/chat/app/components/layout/AgentInspector.tsx +2 -4
  37. package/dist/templates/chat/app/components/layout/Header.tsx +1 -1
  38. package/dist/templates/chat/app/components/layout/Layout.tsx +5 -6
  39. package/dist/templates/chat/app/components/layout/Sidebar.tsx +35 -11
  40. package/dist/templates/chat/app/components/ui/item.tsx +1 -0
  41. package/dist/templates/chat/app/components/ui/separator.tsx +1 -0
  42. package/dist/templates/chat/app/components/ui/skeleton.tsx +1 -0
  43. package/dist/templates/chat/app/hooks/use-navigation-state.ts +16 -22
  44. package/dist/templates/chat/app/i18n/ar-SA.ts +25 -0
  45. package/dist/templates/chat/app/i18n/de-DE.ts +26 -0
  46. package/dist/templates/chat/app/i18n/en-US.ts +25 -0
  47. package/dist/templates/chat/app/i18n/es-ES.ts +26 -0
  48. package/dist/templates/chat/app/i18n/fr-FR.ts +26 -0
  49. package/dist/templates/chat/app/i18n/hi-IN.ts +26 -0
  50. package/dist/templates/chat/app/i18n/ja-JP.ts +26 -0
  51. package/dist/templates/chat/app/i18n/ko-KR.ts +26 -0
  52. package/dist/templates/chat/app/i18n/pt-BR.ts +26 -0
  53. package/dist/templates/chat/app/i18n/zh-CN.ts +25 -0
  54. package/dist/templates/chat/app/i18n/zh-TW.ts +25 -0
  55. package/dist/templates/chat/app/lib/chat-paths.ts +479 -0
  56. package/dist/templates/chat/app/root.tsx +14 -3
  57. package/dist/templates/chat/app/routes/chat._index.tsx +5 -0
  58. package/dist/templates/chat/app/routes/home.tsx +3 -22
  59. package/dist/templates/chat/changelog/2026-10-10-home-handoff-recovery-capacity.md +6 -0
  60. package/dist/templates/default/.agents/skills/secrets/SKILL.md +6 -2
  61. package/dist/templates/headless/.agents/skills/secrets/SKILL.md +6 -2
  62. package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +6 -2
  63. package/dist/triggers/actions/manage-automation.d.ts +2 -2
  64. package/docs/content/deployment-environment-variables.mdx +10 -10
  65. package/docs/content/environment-variables.mdx +38 -6
  66. package/docs/content/getting-started.mdx +7 -7
  67. package/docs/content/multi-app-workspace.mdx +7 -3
  68. package/docs/content/template-chat-first-edits.mdx +46 -33
  69. package/package.json +4 -4
  70. package/src/templates/builder-code-starter/.agents/skills/adding-a-feature/SKILL.md.patch +1 -1
  71. package/src/templates/builder-code-starter/AGENTS.md.patch +3 -3
  72. package/src/templates/builder-code-starter/app/components/layout/Layout.tsx.patch +6 -7
  73. package/src/templates/builder-code-starter/app/hooks/use-navigation-state.ts.patch +21 -28
  74. package/src/templates/builder-code-starter/app/root.tsx.patch +16 -5
  75. package/src/templates/builder-code-starter/template-layer.json +4 -0
  76. package/src/templates/chat/.agents/skills/secrets/SKILL.md +6 -2
  77. package/src/templates/chat/AGENTS.md +3 -3
  78. package/src/templates/chat/CHANGELOG.md +6 -0
  79. package/src/templates/chat/app/components/chat/ChatHomeRedirect.tsx +25 -0
  80. package/src/templates/chat/app/components/chat/ChatRouteContent.tsx +828 -15
  81. package/src/templates/chat/app/components/home/HomePage.tsx +332 -0
  82. package/src/templates/chat/app/components/layout/AgentInspector.tsx +2 -4
  83. package/src/templates/chat/app/components/layout/Header.tsx +1 -1
  84. package/src/templates/chat/app/components/layout/Layout.tsx +5 -6
  85. package/src/templates/chat/app/components/layout/Sidebar.tsx +35 -11
  86. package/src/templates/chat/app/components/ui/item.tsx +1 -0
  87. package/src/templates/chat/app/components/ui/separator.tsx +1 -0
  88. package/src/templates/chat/app/components/ui/skeleton.tsx +1 -0
  89. package/src/templates/chat/app/hooks/use-navigation-state.ts +16 -22
  90. package/src/templates/chat/app/i18n/ar-SA.ts +25 -0
  91. package/src/templates/chat/app/i18n/de-DE.ts +26 -0
  92. package/src/templates/chat/app/i18n/en-US.ts +25 -0
  93. package/src/templates/chat/app/i18n/es-ES.ts +26 -0
  94. package/src/templates/chat/app/i18n/fr-FR.ts +26 -0
  95. package/src/templates/chat/app/i18n/hi-IN.ts +26 -0
  96. package/src/templates/chat/app/i18n/ja-JP.ts +26 -0
  97. package/src/templates/chat/app/i18n/ko-KR.ts +26 -0
  98. package/src/templates/chat/app/i18n/pt-BR.ts +26 -0
  99. package/src/templates/chat/app/i18n/zh-CN.ts +25 -0
  100. package/src/templates/chat/app/i18n/zh-TW.ts +25 -0
  101. package/src/templates/chat/app/lib/chat-paths.ts +479 -0
  102. package/src/templates/chat/app/root.tsx +14 -3
  103. package/src/templates/chat/app/routes/chat._index.tsx +5 -0
  104. package/src/templates/chat/app/routes/home.tsx +3 -22
  105. package/src/templates/chat/changelog/2026-10-10-home-handoff-recovery-capacity.md +6 -0
  106. package/src/templates/default/.agents/skills/secrets/SKILL.md +6 -2
  107. package/src/templates/headless/.agents/skills/secrets/SKILL.md +6 -2
  108. package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +6 -2
@@ -1,7 +1,7 @@
1
1
  ===================================================================
2
2
  --- a/app/root.tsx
3
3
  +++ b/app/root.tsx
4
- @@ -1,70 +1,50 @@
4
+ @@ -1,76 +1,50 @@
5
5
  import { configureTracking } from "@agent-native/core/client/analytics";
6
6
  import { appPath } from "@agent-native/core/client/api-path";
7
7
  import { useDbSync } from "@agent-native/core/client/hooks";
@@ -33,6 +33,12 @@
33
33
  import { AppToolkitProvider } from "@/components/ui/toolkit-provider";
34
34
  import { useNavigationState } from "@/hooks/use-navigation-state";
35
35
  -import { APP_TITLE } from "@/lib/app-config";
36
+ -import {
37
+ - HOME_PATH,
38
+ - isChatPathname,
39
+ - NEW_CHAT_PATH,
40
+ - threadIdFromPath,
41
+ -} from "@/lib/chat-paths";
36
42
  +import { APP_NAME, APP_TITLE } from "@/lib/app-config";
37
43
  import { TAB_ID } from "@/lib/tab-id";
38
44
 
@@ -79,7 +85,7 @@
79
85
  <meta name="mobile-web-app-capable" content="yes" />
80
86
  <meta
81
87
  name="apple-mobile-web-app-status-bar-style"
82
- @@ -94,91 +74,19 @@
88
+ @@ -100,96 +74,19 @@
83
89
  });
84
90
  return null;
85
91
  }
@@ -104,7 +110,7 @@
104
110
  - const navigate = useNavigate();
105
111
  - const t = useT();
106
112
  - const location = useLocation();
107
- - const isChatThread = location.pathname.startsWith("/chat/");
113
+ - const isChatThread = threadIdFromPath(location.pathname) !== null;
108
114
  - useCommandMenuShortcut(useCallback(() => setCmdkOpen(true), []));
109
115
  - return (
110
116
  - <>
@@ -123,8 +129,13 @@
123
129
  - {t("chat.newChat")}
124
130
  - </CommandMenu.Item>
125
131
  - ) : null}
126
- - {!isChatThread && location.pathname !== "/home" ? (
127
- - <CommandMenu.Item onSelect={() => navigate("/home")}>
132
+ - {location.pathname !== HOME_PATH ? (
133
+ - <CommandMenu.Item onSelect={() => navigate(HOME_PATH)}>
134
+ - {t("navigation.home")}
135
+ - </CommandMenu.Item>
136
+ - ) : null}
137
+ - {!isChatPathname(location.pathname) ? (
138
+ - <CommandMenu.Item onSelect={() => navigate(NEW_CHAT_PATH)}>
128
139
  - {t("navigation.chat")}
129
140
  - </CommandMenu.Item>
130
141
  - ) : null}
@@ -5,16 +5,20 @@
5
5
  "CHANGELOG.md",
6
6
  "actions/navigate.spec.ts",
7
7
  "app/components/chat",
8
+ "app/components/home",
8
9
  "app/components/layout/AgentInspector.test.tsx",
9
10
  "app/components/layout/AgentInspector.tsx",
10
11
  "app/components/layout/Header.tsx",
11
12
  "app/components/layout/Sidebar.tsx",
12
13
  "app/i18n",
13
14
  "app/i18n-data.ts",
15
+ "app/lib/chat-paths.spec.ts",
16
+ "app/lib/chat-paths.ts",
14
17
  "app/lib/sidebar-thread-state.spec.ts",
15
18
  "app/lib/sidebar-thread-state.ts",
16
19
  "app/routes/agent.tsx",
17
20
  "app/routes/chat.$threadId.tsx",
21
+ "app/routes/chat._index.tsx",
18
22
  "app/routes/database.tsx",
19
23
  "app/routes/extensions.$id.$slug.tsx",
20
24
  "app/routes/extensions.$id.tsx",
@@ -25,8 +25,12 @@ never copy a value into app code or client-visible state.
25
25
  3. If the app truly needs its own API key, register it with the shared secrets
26
26
  surface. Do not build a parallel key form or storage table.
27
27
  4. Use deployment configuration only for a secret owned by the deployed app,
28
- such as a webhook verification secret. A deployment key must not stand in
29
- for a user's or customer's provider credential.
28
+ such as a webhook verification secret. LLM inference keys are an app-owned
29
+ exception: self-hosted apps may use provider keys from deployment env as a
30
+ shared fallback, while scoped user or organization keys take precedence.
31
+ Hosted-workspace deployments backed by a shared database must not share
32
+ those env keys across apps or tenants. This exception does not authorize
33
+ using env credentials to access user-owned provider data.
30
34
 
31
35
  ## Register an app-local API key
32
36
 
@@ -1,6 +1,6 @@
1
1
  # Chat — Agent Guide
2
2
 
3
- Chat is the minimal chat-first agent-native app. `/` redirects to shared sign-in; authenticated chat starts at `/home`. Actions carry capabilities; screens exist only for durable workflows.
3
+ Chat is the minimal chat-first agent-native app. `/` redirects to shared sign-in, then `/home`, the editable Get started page. Chat lives at `/chat`; new chats start there. Actions carry capabilities; screens exist only for durable workflows.
4
4
 
5
5
  ## Skills
6
6
 
@@ -19,12 +19,12 @@ For custom branding, keep `server/plugins/agent-native-email-branding.ts` aligne
19
19
 
20
20
  ## Application state
21
21
 
22
- - `navigation` describes the view and selected ids. Chat is `chat` at `/home`; `/` opens shared sign-in/signup.
22
+ - `navigation` describes the view and selected ids. Chat is `chat` at `/chat` and `/chat/<threadId>`; the Get started page is `home` at `/home`; `/` opens shared sign-in/signup.
23
23
  - Use `navigate` when supported and `view-screen` for a fresh read of visible details; basic navigation is already in `<current-screen>`.
24
24
 
25
25
  ## Building a domain app
26
26
 
27
- Choose the primary workflow and route before editing. Add a domain route under `app/routes/` and set `app.homePath` in `server/plugins/agent-native-email-branding.ts` with `defineAppConfig`. Keep `/home` as Chat. Add a static link in `app/components/layout/Sidebar.tsx` before `ChatThreadsSection`; `Header.tsx` maps `/home` to Chat and uses `APP_TITLE` elsewhere. Shared sidebar and AgentInspector remain.
27
+ Choose the primary workflow and route before editing. Add a domain route under `app/routes/` and set `app.homePath` in `server/plugins/agent-native-email-branding.ts` with `defineAppConfig`. The default Get started page lives at `/home`, and Chat stays at `/chat`; edit `app/routes/home.tsx` when replacing that page with a domain-specific home. Add a static link in `app/components/layout/Sidebar.tsx` before `ChatThreadsSection`; `Header.tsx` uses `APP_TITLE` elsewhere. Shared sidebar and AgentInspector remain.
28
28
 
29
29
  Use `adding-a-feature` for functional parity and `frontend-design` for a user-facing screen. Keep feature guidance here; do not rewrite `README.md` or `DESIGN.md`. After all edits, run one typecheck, one doctor check, and one browser smoke of the primary workflow, including overlap rejection, cancellation freeing the slot, and authenticated landing. Skip production build and extra test suites.
30
30
 
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable user-facing changes to this app are documented here.
4
4
 
5
+ ## 2026-10-10
6
+
7
+ ### Fixed
8
+
9
+ - Large prompts with full context remain available to retry when sending fails.
10
+
5
11
  ## 2026-09-30
6
12
 
7
13
  ### Improved
@@ -0,0 +1,25 @@
1
+ import { appPath } from "@agent-native/core/client/api-path";
2
+ import { markAgentChatHomeHandoff } from "@agent-native/toolkit/app/chat/agentkit-chat/rail";
3
+ import { useEffect, useRef, useState } from "react";
4
+
5
+ import { getChatHomeThreadId } from "@/lib/chat-home-thread";
6
+ import { chatThreadPath } from "@/lib/chat-paths";
7
+
8
+ export default function ChatHomeRedirect() {
9
+ const [threadId] = useState(getChatHomeThreadId);
10
+ const handoffStartedRef = useRef(false);
11
+
12
+ useEffect(() => {
13
+ if (handoffStartedRef.current) return;
14
+ handoffStartedRef.current = true;
15
+ markAgentChatHomeHandoff("chat");
16
+ try {
17
+ window.location.replace(appPath(chatThreadPath(threadId)));
18
+ } catch (error) {
19
+ handoffStartedRef.current = false;
20
+ throw error;
21
+ }
22
+ }, [threadId]);
23
+
24
+ return null;
25
+ }