@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.
- package/dist/agent/production-agent.js +23 -6
- package/dist/agent/thread-data-builder.js +7 -4
- package/dist/cli/eval.js +20 -4
- package/dist/client/analytics/index.d.ts +1 -1
- package/dist/client/analytics.d.ts +12 -3
- package/dist/client/analytics.js +51 -17
- package/dist/client/onboarding/use-onboarding.d.ts +1 -0
- package/dist/client/onboarding/use-onboarding.js +19 -6
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/eval/agent-runner.js +18 -8
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/mcp/connect-route.js +9 -4
- package/dist/observability/routes.d.ts +7 -7
- package/dist/onboarding/plugin.js +15 -45
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/store.js +25 -30
- package/dist/server/agent-discovery.js +47 -53
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agent-engine-ollama-models-route.d.ts +2 -2
- package/dist/server/builtin-agents.d.ts +2 -0
- package/dist/server/builtin-agents.js +50 -3
- package/dist/server/credential-provider.d.ts +6 -9
- package/dist/server/credential-provider.js +33 -21
- package/dist/templates/builder-code-starter/.agents/skills/adding-a-feature/SKILL.md.patch +1 -1
- package/dist/templates/builder-code-starter/AGENTS.md.patch +3 -3
- package/dist/templates/builder-code-starter/app/components/layout/Layout.tsx.patch +6 -7
- package/dist/templates/builder-code-starter/app/hooks/use-navigation-state.ts.patch +21 -28
- package/dist/templates/builder-code-starter/app/root.tsx.patch +16 -5
- package/dist/templates/builder-code-starter/template-layer.json +4 -0
- package/dist/templates/chat/.agents/skills/secrets/SKILL.md +6 -2
- package/dist/templates/chat/AGENTS.md +3 -3
- package/dist/templates/chat/CHANGELOG.md +6 -0
- package/dist/templates/chat/app/components/chat/ChatHomeRedirect.tsx +25 -0
- package/dist/templates/chat/app/components/chat/ChatRouteContent.tsx +828 -15
- package/dist/templates/chat/app/components/home/HomePage.tsx +332 -0
- package/dist/templates/chat/app/components/layout/AgentInspector.tsx +2 -4
- package/dist/templates/chat/app/components/layout/Header.tsx +1 -1
- package/dist/templates/chat/app/components/layout/Layout.tsx +5 -6
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +35 -11
- package/dist/templates/chat/app/components/ui/item.tsx +1 -0
- package/dist/templates/chat/app/components/ui/separator.tsx +1 -0
- package/dist/templates/chat/app/components/ui/skeleton.tsx +1 -0
- package/dist/templates/chat/app/hooks/use-navigation-state.ts +16 -22
- package/dist/templates/chat/app/i18n/ar-SA.ts +25 -0
- package/dist/templates/chat/app/i18n/de-DE.ts +26 -0
- package/dist/templates/chat/app/i18n/en-US.ts +25 -0
- package/dist/templates/chat/app/i18n/es-ES.ts +26 -0
- package/dist/templates/chat/app/i18n/fr-FR.ts +26 -0
- package/dist/templates/chat/app/i18n/hi-IN.ts +26 -0
- package/dist/templates/chat/app/i18n/ja-JP.ts +26 -0
- package/dist/templates/chat/app/i18n/ko-KR.ts +26 -0
- package/dist/templates/chat/app/i18n/pt-BR.ts +26 -0
- package/dist/templates/chat/app/i18n/zh-CN.ts +25 -0
- package/dist/templates/chat/app/i18n/zh-TW.ts +25 -0
- package/dist/templates/chat/app/lib/chat-paths.ts +479 -0
- package/dist/templates/chat/app/root.tsx +14 -3
- package/dist/templates/chat/app/routes/chat._index.tsx +5 -0
- package/dist/templates/chat/app/routes/home.tsx +3 -22
- package/dist/templates/chat/changelog/2026-10-10-home-handoff-recovery-capacity.md +6 -0
- package/dist/templates/default/.agents/skills/secrets/SKILL.md +6 -2
- package/dist/templates/headless/.agents/skills/secrets/SKILL.md +6 -2
- package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +6 -2
- package/dist/triggers/actions/manage-automation.d.ts +2 -2
- package/docs/content/deployment-environment-variables.mdx +10 -10
- package/docs/content/environment-variables.mdx +38 -6
- package/docs/content/getting-started.mdx +7 -7
- package/docs/content/multi-app-workspace.mdx +7 -3
- package/docs/content/template-chat-first-edits.mdx +46 -33
- package/package.json +4 -4
- package/src/templates/builder-code-starter/.agents/skills/adding-a-feature/SKILL.md.patch +1 -1
- package/src/templates/builder-code-starter/AGENTS.md.patch +3 -3
- package/src/templates/builder-code-starter/app/components/layout/Layout.tsx.patch +6 -7
- package/src/templates/builder-code-starter/app/hooks/use-navigation-state.ts.patch +21 -28
- package/src/templates/builder-code-starter/app/root.tsx.patch +16 -5
- package/src/templates/builder-code-starter/template-layer.json +4 -0
- package/src/templates/chat/.agents/skills/secrets/SKILL.md +6 -2
- package/src/templates/chat/AGENTS.md +3 -3
- package/src/templates/chat/CHANGELOG.md +6 -0
- package/src/templates/chat/app/components/chat/ChatHomeRedirect.tsx +25 -0
- package/src/templates/chat/app/components/chat/ChatRouteContent.tsx +828 -15
- package/src/templates/chat/app/components/home/HomePage.tsx +332 -0
- package/src/templates/chat/app/components/layout/AgentInspector.tsx +2 -4
- package/src/templates/chat/app/components/layout/Header.tsx +1 -1
- package/src/templates/chat/app/components/layout/Layout.tsx +5 -6
- package/src/templates/chat/app/components/layout/Sidebar.tsx +35 -11
- package/src/templates/chat/app/components/ui/item.tsx +1 -0
- package/src/templates/chat/app/components/ui/separator.tsx +1 -0
- package/src/templates/chat/app/components/ui/skeleton.tsx +1 -0
- package/src/templates/chat/app/hooks/use-navigation-state.ts +16 -22
- package/src/templates/chat/app/i18n/ar-SA.ts +25 -0
- package/src/templates/chat/app/i18n/de-DE.ts +26 -0
- package/src/templates/chat/app/i18n/en-US.ts +25 -0
- package/src/templates/chat/app/i18n/es-ES.ts +26 -0
- package/src/templates/chat/app/i18n/fr-FR.ts +26 -0
- package/src/templates/chat/app/i18n/hi-IN.ts +26 -0
- package/src/templates/chat/app/i18n/ja-JP.ts +26 -0
- package/src/templates/chat/app/i18n/ko-KR.ts +26 -0
- package/src/templates/chat/app/i18n/pt-BR.ts +26 -0
- package/src/templates/chat/app/i18n/zh-CN.ts +25 -0
- package/src/templates/chat/app/i18n/zh-TW.ts +25 -0
- package/src/templates/chat/app/lib/chat-paths.ts +479 -0
- package/src/templates/chat/app/root.tsx +14 -3
- package/src/templates/chat/app/routes/chat._index.tsx +5 -0
- package/src/templates/chat/app/routes/home.tsx +3 -22
- package/src/templates/chat/changelog/2026-10-10-home-handoff-recovery-capacity.md +6 -0
- package/src/templates/default/.agents/skills/secrets/SKILL.md +6 -2
- package/src/templates/headless/.agents/skills/secrets/SKILL.md +6 -2
- 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,
|
|
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
|
-
@@ -
|
|
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
|
|
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
|
-
- {
|
|
127
|
-
- <CommandMenu.Item onSelect={() => navigate(
|
|
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.
|
|
29
|
-
|
|
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
|
|
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`.
|
|
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
|
|
|
@@ -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
|
+
}
|