@agent-native/core 0.119.1 → 0.119.3
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/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +21 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/client.ts +4 -0
- package/corpus/core/src/agent/production-agent.ts +1 -0
- package/corpus/core/src/cli/create.ts +44 -5
- package/corpus/core/src/client/AssistantChat.tsx +11 -50
- package/corpus/core/src/client/ErrorBoundary.tsx +25 -19
- package/corpus/core/src/client/agent-page/AgentTabFrame.tsx +1 -1
- package/corpus/core/src/client/agent-page/AgentTabsPage.tsx +23 -0
- package/corpus/core/src/client/components/ui/message-scroller.tsx +1 -9
- package/corpus/core/src/client/resources/ResourceTree.tsx +3 -3
- package/corpus/core/src/client/resources/ResourcesPanel.tsx +64 -60
- package/corpus/core/src/client/settings/AccountSettingsCard.tsx +228 -0
- package/corpus/core/src/client/settings/SecretsSection.tsx +7 -5
- package/corpus/core/src/client/settings/SettingsPanel.tsx +67 -244
- package/corpus/core/src/client/settings/SettingsTabsPage.tsx +88 -21
- package/corpus/core/src/client/settings/agent-settings-search.ts +0 -2
- package/corpus/core/src/client/settings/index.ts +7 -0
- package/corpus/core/src/client/vite-dev-recovery-script.ts +18 -1
- package/corpus/core/src/db/client.ts +65 -15
- package/corpus/core/src/db/index.ts +2 -0
- package/corpus/core/src/localization/default-messages.ts +1 -0
- package/corpus/core/src/server/email.ts +33 -1
- package/corpus/core/src/styles/agent-native.css +23 -0
- package/corpus/core/src/templates/default/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/core/src/templates/default/app/routes/settings.tsx +2 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/core/src/vite/client.ts +76 -8
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +3 -1
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +9 -13
- package/corpus/templates/analytics/app/components/layout/layout-route-policy.ts +2 -2
- package/corpus/templates/analytics/app/global.css +0 -5
- package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +0 -13
- package/corpus/templates/analytics/app/lib/sql-query.ts +15 -2
- package/corpus/templates/analytics/app/pages/Settings.tsx +2 -24
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +6 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +11 -1
- package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +8 -1
- package/corpus/templates/analytics/app/pages/settings/settings-search.ts +1 -1
- package/corpus/templates/analytics/changelog/2026-07-22-fixed-dashboards-and-analyses-missing-a-copyable-share-link.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-23-ask-analytics-is-better-centered-with-a-quieter-chat-rail-an.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-23-daily-dashboard-emails-load-read-heavy-panels-reliably.md +6 -0
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +2 -2
- package/corpus/templates/analytics/server/jobs/dashboard-report.ts +39 -5
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +186 -62
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +3 -0
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +18 -2
- package/corpus/templates/analytics/shared/dashboard-report-timeouts.ts +3 -0
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/templates/assets/app/components/layout/Layout.tsx +3 -4
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +1 -1
- package/corpus/templates/assets/app/global.css +0 -5
- package/corpus/templates/assets/app/hooks/use-navigation-state.ts +0 -22
- package/corpus/templates/assets/app/routes/settings.tsx +2 -0
- package/corpus/templates/assets/changelog/2026-07-23-create-and-chat-surfaces-are-better-centered-with-quieter-ch.md +6 -0
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/templates/brain/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +1 -1
- package/corpus/templates/brain/app/global.css +0 -9
- package/corpus/templates/brain/app/hooks/use-navigation-state.ts +0 -12
- package/corpus/templates/brain/app/i18n-data.ts +1 -0
- package/corpus/templates/brain/app/lib/settings-navigation.ts +1 -1
- package/corpus/templates/brain/app/routes/settings.tsx +21 -22
- package/corpus/templates/brain/changelog/2026-07-23-ask-brain-is-better-centered-with-quieter-chat-history-and-a.md +6 -0
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/templates/calendar/app/pages/Settings.tsx +2 -0
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/templates/chat/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +1 -1
- package/corpus/templates/chat/app/hooks/use-navigation-state.ts +0 -15
- package/corpus/templates/chat/app/routes/settings.tsx +2 -0
- package/corpus/templates/chat/changelog/2026-07-23-full-page-chat-is-better-centered-with-quieter-chat-history-.md +6 -0
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +2 -0
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/templates/content/app/routes/_app.settings.tsx +2 -0
- package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/templates/design/app/routes/settings.tsx +2 -0
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/templates/dispatch/app/routes/settings.tsx +2 -0
- package/corpus/templates/dispatch/changelog/2026-07-23-quieter-progressive-disclosure.md +6 -0
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/templates/forms/app/global.css +0 -5
- package/corpus/templates/forms/app/hooks/use-navigation-state.ts +0 -7
- package/corpus/templates/forms/app/root.tsx +1 -7
- package/corpus/templates/forms/app/routes/_app.settings.tsx +2 -0
- package/corpus/templates/forms/changelog/2026-07-23-ask-forms-is-better-centered-with-quieter-chat-history-and-a.md +6 -0
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/templates/macros/app/routes/settings.tsx +2 -0
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/templates/mail/app/pages/SettingsPage.tsx +3 -1
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/templates/plan/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +1 -13
- package/corpus/templates/plan/app/hooks/use-navigation-state.ts +0 -4
- package/corpus/templates/plan/app/routes/settings.tsx +2 -0
- package/corpus/templates/plan/changelog/2026-07-23-ask-plan-is-now-a-clean-full-page-chat-surface-with-better-c.md +6 -0
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/templates/slides/app/routes/settings.tsx +2 -0
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +28 -0
- package/corpus/toolkit/CHANGELOG.md +6 -0
- package/corpus/toolkit/package.json +1 -1
- package/corpus/toolkit/src/chat-history.css +2 -2
- package/corpus/toolkit/src/composer/PromptComposer.tsx +0 -31
- package/corpus/toolkit/src/composer/RealtimeVoiceMode.tsx +7 -2
- package/corpus/toolkit/src/styles.css +183 -36
- package/dist/a2a/client.d.ts +2 -0
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +2 -0
- package/dist/a2a/client.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +1 -0
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/cli/create.d.ts +2 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +43 -6
- package/dist/cli/create.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +11 -42
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/ErrorBoundary.d.ts.map +1 -1
- package/dist/client/ErrorBoundary.js +3 -2
- package/dist/client/ErrorBoundary.js.map +1 -1
- package/dist/client/agent-page/AgentTabFrame.js +1 -1
- package/dist/client/agent-page/AgentTabFrame.js.map +1 -1
- package/dist/client/agent-page/AgentTabsPage.d.ts.map +1 -1
- package/dist/client/agent-page/AgentTabsPage.js +13 -1
- package/dist/client/agent-page/AgentTabsPage.js.map +1 -1
- package/dist/client/components/ui/message-scroller.d.ts.map +1 -1
- package/dist/client/components/ui/message-scroller.js +2 -2
- package/dist/client/components/ui/message-scroller.js.map +1 -1
- package/dist/client/resources/ResourceTree.js +2 -2
- package/dist/client/resources/ResourceTree.js.map +1 -1
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +11 -11
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/settings/AccountSettingsCard.d.ts +9 -0
- package/dist/client/settings/AccountSettingsCard.d.ts.map +1 -0
- package/dist/client/settings/AccountSettingsCard.js +78 -0
- package/dist/client/settings/AccountSettingsCard.js.map +1 -0
- package/dist/client/settings/SecretsSection.d.ts.map +1 -1
- package/dist/client/settings/SecretsSection.js +2 -2
- package/dist/client/settings/SecretsSection.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts +3 -0
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +25 -77
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/SettingsTabsPage.d.ts +5 -1
- package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
- package/dist/client/settings/SettingsTabsPage.js +35 -9
- package/dist/client/settings/SettingsTabsPage.js.map +1 -1
- package/dist/client/settings/agent-settings-search.d.ts.map +1 -1
- package/dist/client/settings/agent-settings-search.js +0 -2
- package/dist/client/settings/agent-settings-search.js.map +1 -1
- package/dist/client/settings/index.d.ts +2 -1
- package/dist/client/settings/index.d.ts.map +1 -1
- package/dist/client/settings/index.js +2 -1
- package/dist/client/settings/index.js.map +1 -1
- package/dist/client/vite-dev-recovery-script.d.ts.map +1 -1
- package/dist/client/vite-dev-recovery-script.js +18 -1
- package/dist/client/vite-dev-recovery-script.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/db/client.d.ts +18 -8
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +34 -11
- package/dist/db/client.js.map +1 -1
- package/dist/db/index.d.ts +1 -1
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/index.js.map +1 -1
- package/dist/localization/default-messages.d.ts +1 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +1 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +7 -7
- package/dist/provider-api/actions/provider-api.d.ts +7 -7
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/email.d.ts +1 -0
- package/dist/server/email.d.ts.map +1 -1
- package/dist/server/email.js +29 -1
- package/dist/server/email.js.map +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/styles/agent-native.css +23 -0
- package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +28 -0
- package/dist/templates/chat/app/components/layout/Layout.tsx +1 -1
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +1 -1
- package/dist/templates/chat/app/hooks/use-navigation-state.ts +0 -15
- package/dist/templates/chat/app/routes/settings.tsx +2 -0
- package/dist/templates/chat/changelog/2026-07-23-full-page-chat-is-better-centered-with-quieter-chat-history-.md +6 -0
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +28 -0
- package/dist/templates/default/app/routes/settings.tsx +2 -0
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +28 -0
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +68 -6
- package/dist/vite/client.js.map +1 -1
- package/package.json +2 -2
- package/src/a2a/client.ts +4 -0
- package/src/agent/production-agent.ts +1 -0
- package/src/cli/create.ts +44 -5
- package/src/client/AssistantChat.tsx +11 -50
- package/src/client/ErrorBoundary.tsx +25 -19
- package/src/client/agent-page/AgentTabFrame.tsx +1 -1
- package/src/client/agent-page/AgentTabsPage.tsx +23 -0
- package/src/client/components/ui/message-scroller.tsx +1 -9
- package/src/client/resources/ResourceTree.tsx +3 -3
- package/src/client/resources/ResourcesPanel.tsx +64 -60
- package/src/client/settings/AccountSettingsCard.tsx +228 -0
- package/src/client/settings/SecretsSection.tsx +7 -5
- package/src/client/settings/SettingsPanel.tsx +67 -244
- package/src/client/settings/SettingsTabsPage.tsx +88 -21
- package/src/client/settings/agent-settings-search.ts +0 -2
- package/src/client/settings/index.ts +7 -0
- package/src/client/vite-dev-recovery-script.ts +18 -1
- package/src/db/client.ts +65 -15
- package/src/db/index.ts +2 -0
- package/src/localization/default-messages.ts +1 -0
- package/src/server/email.ts +33 -1
- package/src/styles/agent-native.css +23 -0
- package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +28 -0
- package/src/templates/chat/app/components/layout/Layout.tsx +1 -1
- package/src/templates/chat/app/components/layout/Sidebar.tsx +1 -1
- package/src/templates/chat/app/hooks/use-navigation-state.ts +0 -15
- package/src/templates/chat/app/routes/settings.tsx +2 -0
- package/src/templates/chat/changelog/2026-07-23-full-page-chat-is-better-centered-with-quieter-chat-history-.md +6 -0
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +28 -0
- package/src/templates/default/app/routes/settings.tsx +2 -0
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +28 -0
- package/src/vite/client.ts +76 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.119.
|
|
3
|
+
"version": "0.119.3",
|
|
4
4
|
"description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -390,7 +390,7 @@
|
|
|
390
390
|
"yjs": "^13.6.31",
|
|
391
391
|
"zod": "^4.3.6",
|
|
392
392
|
"@agent-native/recap-cli": "0.5.1",
|
|
393
|
-
"@agent-native/toolkit": "^0.10.
|
|
393
|
+
"@agent-native/toolkit": "^0.10.2"
|
|
394
394
|
},
|
|
395
395
|
"devDependencies": {
|
|
396
396
|
"@ai-sdk/anthropic": "^3.0.71",
|
package/src/a2a/client.ts
CHANGED
|
@@ -647,6 +647,8 @@ export async function callAgent(
|
|
|
647
647
|
text: string,
|
|
648
648
|
opts?: {
|
|
649
649
|
apiKey?: string;
|
|
650
|
+
/** Additional bearer tokens to try in order after apiKey during rotation. */
|
|
651
|
+
apiKeyFallbacks?: string[];
|
|
650
652
|
/** Additional transport metadata. Receivers must not use it as identity. */
|
|
651
653
|
metadata?: Record<string, unknown>;
|
|
652
654
|
contextId?: string;
|
|
@@ -831,6 +833,7 @@ export async function callAction(
|
|
|
831
833
|
async function buildA2AApiKeyAttempts(
|
|
832
834
|
opts?: {
|
|
833
835
|
apiKey?: string;
|
|
836
|
+
apiKeyFallbacks?: string[];
|
|
834
837
|
userEmail?: string;
|
|
835
838
|
orgDomain?: string;
|
|
836
839
|
orgSecret?: string;
|
|
@@ -844,6 +847,7 @@ async function buildA2AApiKeyAttempts(
|
|
|
844
847
|
};
|
|
845
848
|
|
|
846
849
|
add(opts?.apiKey);
|
|
850
|
+
for (const fallback of opts?.apiKeyFallbacks ?? []) add(fallback);
|
|
847
851
|
|
|
848
852
|
if (opts?.userEmail && (opts.orgSecret || process.env.A2A_SECRET)) {
|
|
849
853
|
if (process.env.A2A_SECRET?.trim()) {
|
|
@@ -1846,6 +1846,7 @@ export async function callConnectedAgentReference(input: {
|
|
|
1846
1846
|
const response = await input.callAgent(input.path, input.message, {
|
|
1847
1847
|
async: true,
|
|
1848
1848
|
apiKey: callerAuth.apiKey,
|
|
1849
|
+
apiKeyFallbacks: callerAuth.apiKeyFallbacks,
|
|
1849
1850
|
metadata: callerAuth.metadata,
|
|
1850
1851
|
userEmail: callerAuth.userEmail,
|
|
1851
1852
|
orgDomain: callerAuth.orgDomain,
|
package/src/cli/create.ts
CHANGED
|
@@ -1384,6 +1384,7 @@ export {
|
|
|
1384
1384
|
getCoreDependencyVersion as _getCoreDependencyVersion,
|
|
1385
1385
|
getDispatchDependencyVersion as _getDispatchDependencyVersion,
|
|
1386
1386
|
getToolkitDependencyVersion as _getToolkitDependencyVersion,
|
|
1387
|
+
getCorePackageVersion as _getCorePackageVersion,
|
|
1387
1388
|
getGitHubTemplateRef as _getGitHubTemplateRef,
|
|
1388
1389
|
getGitHubTemplateRefCandidates as _getGitHubTemplateRefCandidates,
|
|
1389
1390
|
githubTarballUrl as _githubTarballUrl,
|
|
@@ -1753,11 +1754,22 @@ function getCoreDependencyVersion(): string {
|
|
|
1753
1754
|
if (localCore) return localPackageTarball(localCore);
|
|
1754
1755
|
}
|
|
1755
1756
|
|
|
1756
|
-
//
|
|
1757
|
-
//
|
|
1758
|
-
//
|
|
1759
|
-
//
|
|
1760
|
-
|
|
1757
|
+
// Pin to the exact core version running this CLI rather than the npm
|
|
1758
|
+
// `latest` dist-tag. `latest` can drift forward after `create` runs (a
|
|
1759
|
+
// stale/cached CLI invocation, or simply time passing before `npm
|
|
1760
|
+
// install`), installing a newer core release whose internal toolkit
|
|
1761
|
+
// dependency no longer matches the toolkit range this CLI just wrote into
|
|
1762
|
+
// the scaffold via getOwnPackageDependencyVersion() — reintroducing the
|
|
1763
|
+
// exact duplicate/mismatched-toolkit class of bug this pinning exists to
|
|
1764
|
+
// prevent. For the common case — `npx @agent-native/core@<version> create`
|
|
1765
|
+
// against the public registry — this exact version is guaranteed
|
|
1766
|
+
// installable, since npx just fetched it. Private/offline mirrors with a
|
|
1767
|
+
// retention window narrower than "every historical version" are a known
|
|
1768
|
+
// gap; `getCorePackageVersion()` returning undefined (e.g. malformed own
|
|
1769
|
+
// package.json) falls back to `latest` rather than failing scaffolding
|
|
1770
|
+
// outright. Local file deps stay opt-in so scaffolded repos remain
|
|
1771
|
+
// portable by default.
|
|
1772
|
+
return getCorePackageVersion() ?? "latest";
|
|
1761
1773
|
}
|
|
1762
1774
|
|
|
1763
1775
|
function getDispatchDependencyVersion(): string {
|
|
@@ -1766,6 +1778,9 @@ function getDispatchDependencyVersion(): string {
|
|
|
1766
1778
|
if (localDispatch) return pathToFileURL(localDispatch).href;
|
|
1767
1779
|
}
|
|
1768
1780
|
|
|
1781
|
+
// Unlike toolkit, core's own package.json does not declare
|
|
1782
|
+
// @agent-native/dispatch as a dependency, so there is no published
|
|
1783
|
+
// compatible range to read here — "latest" is the best available signal.
|
|
1769
1784
|
return "latest";
|
|
1770
1785
|
}
|
|
1771
1786
|
|
|
@@ -1775,6 +1790,30 @@ function getToolkitDependencyVersion(): string {
|
|
|
1775
1790
|
if (localToolkit) return localPackageTarball(localToolkit);
|
|
1776
1791
|
}
|
|
1777
1792
|
|
|
1793
|
+
return getOwnPackageDependencyVersion("@agent-native/toolkit");
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
/**
|
|
1797
|
+
* Toolkit is versioned and published independently of core, so its npm
|
|
1798
|
+
* `latest` dist-tag can briefly point to an incompatible release relative to
|
|
1799
|
+
* the core version currently running this CLI. The published core
|
|
1800
|
+
* `package.json` already carries the exact compatible range changesets
|
|
1801
|
+
* resolved at release time — read it from there instead of trusting
|
|
1802
|
+
* `latest`, which is only safe for pinning `core` itself.
|
|
1803
|
+
*/
|
|
1804
|
+
function getOwnPackageDependencyVersion(depName: string): string {
|
|
1805
|
+
try {
|
|
1806
|
+
const ownPkgPath = path.join(__dirname, "../../package.json");
|
|
1807
|
+
const ownPkg = JSON.parse(fs.readFileSync(ownPkgPath, "utf-8"));
|
|
1808
|
+
const range = ownPkg.dependencies?.[depName];
|
|
1809
|
+
const isPublishedRange =
|
|
1810
|
+
typeof range === "string" &&
|
|
1811
|
+
range.length > 0 &&
|
|
1812
|
+
!range.startsWith("workspace:") &&
|
|
1813
|
+
range !== "catalog:";
|
|
1814
|
+
if (isPublishedRange) return range;
|
|
1815
|
+
} catch {}
|
|
1816
|
+
|
|
1778
1817
|
return "latest";
|
|
1779
1818
|
}
|
|
1780
1819
|
|
|
@@ -186,10 +186,7 @@ import {
|
|
|
186
186
|
readSSEStreamRaw,
|
|
187
187
|
settleInterruptedToolCalls,
|
|
188
188
|
} from "./sse-event-processor.js";
|
|
189
|
-
import {
|
|
190
|
-
fetchAgentEngineConfiguredState,
|
|
191
|
-
useAgentEngineConfigured,
|
|
192
|
-
} from "./use-agent-engine-configured.js";
|
|
189
|
+
import { useAgentEngineConfigured } from "./use-agent-engine-configured.js";
|
|
193
190
|
import type {
|
|
194
191
|
ChatThreadScope,
|
|
195
192
|
ChatThreadSnapshot,
|
|
@@ -292,8 +289,6 @@ const RECONNECT_NO_PROGRESS_CONTINUE_MESSAGE =
|
|
|
292
289
|
// through transient labels ("Contacting model", "Preparing X action"); past it
|
|
293
290
|
// the live label appears so a genuinely slow step reads as working, not hung.
|
|
294
291
|
const ACTIVITY_LABEL_REVEAL_DELAY_MS = 6_000;
|
|
295
|
-
const SUBMIT_ENGINE_STATUS_TIMEOUT_MS = 1000;
|
|
296
|
-
|
|
297
292
|
type ActiveRunLookup = {
|
|
298
293
|
active?: boolean;
|
|
299
294
|
runId?: string;
|
|
@@ -2376,8 +2371,6 @@ const AssistantChatInner = forwardRef<
|
|
|
2376
2371
|
{ tabId, threadId },
|
|
2377
2372
|
);
|
|
2378
2373
|
const missingApiKey = agentEngineConfigured.missing;
|
|
2379
|
-
const isProviderStatusChecking =
|
|
2380
|
-
providerStatusChecksEnabled && agentEngineConfigured.state === "unknown";
|
|
2381
2374
|
const isProviderStatusUnavailable =
|
|
2382
2375
|
providerStatusChecksEnabled &&
|
|
2383
2376
|
agentEngineConfigured.state === "unavailable";
|
|
@@ -2396,36 +2389,6 @@ const AssistantChatInner = forwardRef<
|
|
|
2396
2389
|
if (agentEngineConfigured.state !== "configured") return;
|
|
2397
2390
|
setMissingKeySetupOpen(false);
|
|
2398
2391
|
}, [agentEngineConfigured.state]);
|
|
2399
|
-
const ensureAgentEngineReadyForSubmit = useCallback(async () => {
|
|
2400
|
-
const state =
|
|
2401
|
-
agentEngineConfigured.state === "missing"
|
|
2402
|
-
? "missing"
|
|
2403
|
-
: await fetchAgentEngineConfiguredState(providerStatusChecksEnabled, {
|
|
2404
|
-
timeoutMs: SUBMIT_ENGINE_STATUS_TIMEOUT_MS,
|
|
2405
|
-
});
|
|
2406
|
-
if (state === "configured") return true;
|
|
2407
|
-
|
|
2408
|
-
// Unknown means the readiness endpoint is unavailable or still resolving.
|
|
2409
|
-
// Do not start a run optimistically: that recreates the long failure path
|
|
2410
|
-
// this preflight exists to prevent. The mounted hook retries automatically.
|
|
2411
|
-
if (state === "unknown" || state === "unavailable") return false;
|
|
2412
|
-
|
|
2413
|
-
requestMissingKeySetup();
|
|
2414
|
-
if (typeof window !== "undefined") {
|
|
2415
|
-
window.dispatchEvent(
|
|
2416
|
-
new CustomEvent("agent-chat:missing-api-key", {
|
|
2417
|
-
detail: { tabId, threadId },
|
|
2418
|
-
}),
|
|
2419
|
-
);
|
|
2420
|
-
}
|
|
2421
|
-
return false;
|
|
2422
|
-
}, [
|
|
2423
|
-
agentEngineConfigured.state,
|
|
2424
|
-
providerStatusChecksEnabled,
|
|
2425
|
-
requestMissingKeySetup,
|
|
2426
|
-
tabId,
|
|
2427
|
-
threadId,
|
|
2428
|
-
]);
|
|
2429
2392
|
const [authError, setAuthError] = useState<{
|
|
2430
2393
|
sessionExpired?: boolean;
|
|
2431
2394
|
} | null>(null);
|
|
@@ -4449,7 +4412,7 @@ const AssistantChatInner = forwardRef<
|
|
|
4449
4412
|
) => {
|
|
4450
4413
|
if (isAgentChatSubmitCancelled(submitMessageId)) return;
|
|
4451
4414
|
if (agentEngineConfigured.state === "missing") {
|
|
4452
|
-
|
|
4415
|
+
requestMissingKeySetup();
|
|
4453
4416
|
reportAgentChatSubmitResult(submitMessageId, false, "missing-engine");
|
|
4454
4417
|
return;
|
|
4455
4418
|
}
|
|
@@ -4687,12 +4650,12 @@ const AssistantChatInner = forwardRef<
|
|
|
4687
4650
|
applyLocalQueuedMessages,
|
|
4688
4651
|
agentEngineConfigured.state,
|
|
4689
4652
|
buildComposerContextSubmission,
|
|
4690
|
-
ensureAgentEngineReadyForSubmit,
|
|
4691
4653
|
execMode,
|
|
4692
4654
|
isRunning,
|
|
4693
4655
|
materializeFrozenReconnectContent,
|
|
4694
4656
|
markOptimisticRunning,
|
|
4695
4657
|
appendThreadMessage,
|
|
4658
|
+
requestMissingKeySetup,
|
|
4696
4659
|
updateComposerContextItems,
|
|
4697
4660
|
],
|
|
4698
4661
|
);
|
|
@@ -5654,16 +5617,14 @@ const AssistantChatInner = forwardRef<
|
|
|
5654
5617
|
? "Connect AI to start chatting..."
|
|
5655
5618
|
: isProviderStatusUnavailable
|
|
5656
5619
|
? t("agentPanel.connectionUnavailable")
|
|
5657
|
-
:
|
|
5658
|
-
?
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
: "Send a follow-up..."
|
|
5666
|
-
: composerPlaceholder
|
|
5620
|
+
: composerDisabled
|
|
5621
|
+
? (composerDisabledPlaceholder ??
|
|
5622
|
+
"Open Desktop to use this chat.")
|
|
5623
|
+
: isRunning
|
|
5624
|
+
? queuedMessages.length > 0
|
|
5625
|
+
? `${queuedMessages.length} queued — send a follow-up...`
|
|
5626
|
+
: "Send a follow-up..."
|
|
5627
|
+
: composerPlaceholder
|
|
5667
5628
|
}
|
|
5668
5629
|
onSubmit={
|
|
5669
5630
|
isRunning || composerContextItems.length > 0
|
|
@@ -304,6 +304,8 @@ function ErrorScreen({ error }: { error: unknown }) {
|
|
|
304
304
|
console.error("[ErrorBoundary]", error);
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
+
const isNotFound = status === 404;
|
|
308
|
+
|
|
307
309
|
return (
|
|
308
310
|
<main className="flex items-center justify-center min-h-screen p-4 bg-background text-foreground">
|
|
309
311
|
<div className="flex flex-col items-center text-center max-w-md">
|
|
@@ -318,25 +320,29 @@ function ErrorScreen({ error }: { error: unknown }) {
|
|
|
318
320
|
<a href={appPath("/")} className={primaryActionClassName}>
|
|
319
321
|
{copy.goHome}
|
|
320
322
|
</a>
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
323
|
+
{!isNotFound && (
|
|
324
|
+
<>
|
|
325
|
+
<button
|
|
326
|
+
type="button"
|
|
327
|
+
onClick={() => window.location.reload()}
|
|
328
|
+
className={secondaryActionClassName}
|
|
329
|
+
>
|
|
330
|
+
{copy.reload}
|
|
331
|
+
</button>
|
|
332
|
+
<ErrorReportActions
|
|
333
|
+
appName="Agent Native"
|
|
334
|
+
title={title}
|
|
335
|
+
details={details}
|
|
336
|
+
status={status}
|
|
337
|
+
issueTitle={`Error screen: ${title}`}
|
|
338
|
+
feedbackLabel={copy.sendFeedback}
|
|
339
|
+
feedbackPlaceholder={copy.feedbackPlaceholder}
|
|
340
|
+
githubLabel={copy.openGitHubIssue}
|
|
341
|
+
feedbackClassName="h-9"
|
|
342
|
+
githubClassName="h-9"
|
|
343
|
+
/>
|
|
344
|
+
</>
|
|
345
|
+
)}
|
|
340
346
|
</div>
|
|
341
347
|
{stack && (
|
|
342
348
|
<pre className="mt-6 w-full text-start text-xs overflow-auto p-4 bg-muted rounded">
|
|
@@ -27,7 +27,7 @@ export function AgentTabFrame({
|
|
|
27
27
|
<div
|
|
28
28
|
className={cn("mx-auto flex w-full max-w-5xl flex-col gap-6", className)}
|
|
29
29
|
>
|
|
30
|
-
<header className="flex flex-wrap items-start justify-between gap-4
|
|
30
|
+
<header className="flex flex-wrap items-start justify-between gap-4 pb-5">
|
|
31
31
|
<div className="space-y-1">
|
|
32
32
|
<div className="flex items-center gap-1.5">
|
|
33
33
|
<h2 className="text-xl font-semibold tracking-tight text-foreground">
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
IconPlugConnected,
|
|
11
11
|
IconTopologyRing2,
|
|
12
12
|
IconSearch,
|
|
13
|
+
IconSettings,
|
|
13
14
|
IconShieldLock,
|
|
14
15
|
IconX,
|
|
15
16
|
} from "@tabler/icons-react";
|
|
@@ -49,6 +50,11 @@ import {
|
|
|
49
50
|
type McpServer,
|
|
50
51
|
type McpServerScope,
|
|
51
52
|
} from "../resources/use-mcp-servers.js";
|
|
53
|
+
import {
|
|
54
|
+
AGENT_SETTINGS_SECTIONS,
|
|
55
|
+
buildSectionSearchEntries,
|
|
56
|
+
} from "../settings/agent-settings-search.js";
|
|
57
|
+
import { AgentSettingsContent } from "../settings/SettingsPanel.js";
|
|
52
58
|
import type {
|
|
53
59
|
SettingsSearchEntry,
|
|
54
60
|
SettingsTabItem,
|
|
@@ -685,6 +691,7 @@ export function AgentTabsPage({
|
|
|
685
691
|
value,
|
|
686
692
|
onValueChange,
|
|
687
693
|
}: AgentTabsPageProps) {
|
|
694
|
+
const t = useT();
|
|
688
695
|
const { data: org } = useOrg();
|
|
689
696
|
const canManageOrg =
|
|
690
697
|
!org?.orgId || org.role === "owner" || org.role === "admin";
|
|
@@ -826,6 +833,22 @@ export function AgentTabsPage({
|
|
|
826
833
|
</Suspense>
|
|
827
834
|
),
|
|
828
835
|
},
|
|
836
|
+
{
|
|
837
|
+
id: "settings",
|
|
838
|
+
label: t("settings.agentTitle"),
|
|
839
|
+
icon: IconSettings,
|
|
840
|
+
group: "agent",
|
|
841
|
+
keywords: "agent settings model llm api keys limits voice automations",
|
|
842
|
+
searchEntries: buildSectionSearchEntries(AGENT_SETTINGS_SECTIONS),
|
|
843
|
+
content: (
|
|
844
|
+
<AgentTabFrame
|
|
845
|
+
title={t("settings.agentTitle")}
|
|
846
|
+
description={t("settings.agentDescription")}
|
|
847
|
+
>
|
|
848
|
+
<AgentSettingsContent />
|
|
849
|
+
</AgentTabFrame>
|
|
850
|
+
),
|
|
851
|
+
},
|
|
829
852
|
{
|
|
830
853
|
id: "access",
|
|
831
854
|
label: "Access",
|
|
@@ -57,19 +57,11 @@ function MessageScrollerViewport({
|
|
|
57
57
|
<ShadcnMessageScroller.Viewport
|
|
58
58
|
className={cn(
|
|
59
59
|
"min-h-0 flex-1 overflow-y-auto overflow-x-hidden",
|
|
60
|
+
hasContentAbove && "message-scroller-viewport--top-fade",
|
|
60
61
|
className,
|
|
61
62
|
)}
|
|
62
63
|
{...props}
|
|
63
64
|
>
|
|
64
|
-
{hasContentAbove && (
|
|
65
|
-
<div
|
|
66
|
-
aria-hidden="true"
|
|
67
|
-
className="pointer-events-none sticky top-0 z-10 h-0"
|
|
68
|
-
data-message-scroller-top-fade
|
|
69
|
-
>
|
|
70
|
-
<div className="absolute inset-x-0 top-0 h-12 bg-gradient-to-b from-background via-background/90 to-transparent" />
|
|
71
|
-
</div>
|
|
72
|
-
)}
|
|
73
65
|
{children}
|
|
74
66
|
</ShadcnMessageScroller.Viewport>
|
|
75
67
|
);
|
|
@@ -771,7 +771,7 @@ export function ResourceTree({
|
|
|
771
771
|
|
|
772
772
|
{variant === "collection"
|
|
773
773
|
? leafResources.length > 0 && (
|
|
774
|
-
<div className="
|
|
774
|
+
<div className="space-y-1">
|
|
775
775
|
{leafResources.map((node) => (
|
|
776
776
|
<CollectionResourceRow
|
|
777
777
|
key={node.resource.id}
|
|
@@ -849,8 +849,8 @@ export function ResourceTree({
|
|
|
849
849
|
)}
|
|
850
850
|
|
|
851
851
|
{isEmpty && !creating && !isLoading && (
|
|
852
|
-
<div className="flex flex-col items-start
|
|
853
|
-
<p className="
|
|
852
|
+
<div className="flex flex-col items-start px-2 py-5">
|
|
853
|
+
<p className="text-xs text-muted-foreground">
|
|
854
854
|
{variant === "collection"
|
|
855
855
|
? "No resources in this collection yet"
|
|
856
856
|
: "No files yet"}
|
|
@@ -1944,68 +1944,72 @@ export function ResourcesPanel({
|
|
|
1944
1944
|
/>
|
|
1945
1945
|
)}
|
|
1946
1946
|
{showPersonalTree && (
|
|
1947
|
-
<
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1947
|
+
<div className="pt-3">
|
|
1948
|
+
<ResourceTree
|
|
1949
|
+
tree={displayedPersonalTree}
|
|
1950
|
+
variant={resourceTreeVariant}
|
|
1951
|
+
isLoading={personalTreeQuery.isLoading}
|
|
1952
|
+
deletingId={
|
|
1953
|
+
deleteResource.isPending
|
|
1954
|
+
? (deleteResource.variables as string)
|
|
1955
|
+
: deleteMcpServer.isPending
|
|
1956
|
+
? `mcp:${(deleteMcpServer.variables as { scope: string }).scope}:${(deleteMcpServer.variables as { id: string }).id}`
|
|
1957
|
+
: null
|
|
1958
|
+
}
|
|
1959
|
+
selectedId={selectedResourceId}
|
|
1960
|
+
onSelect={handleSelect}
|
|
1961
|
+
onCreateFile={(parentPath, name) =>
|
|
1962
|
+
handleCreateFile(parentPath, name, "personal")
|
|
1963
|
+
}
|
|
1964
|
+
onCreateFolder={(parentPath, name) =>
|
|
1965
|
+
handleCreateFolder(parentPath, name, "personal")
|
|
1966
|
+
}
|
|
1967
|
+
onDelete={handleDelete}
|
|
1968
|
+
onRename={handleRename}
|
|
1969
|
+
onDrop={(files) => handleUploadFiles(files, "personal")}
|
|
1970
|
+
title="Personal"
|
|
1971
|
+
titleTooltip="Files visible only to you"
|
|
1972
|
+
sectionAction={renderScopeCreateMenu("personal")}
|
|
1973
|
+
emptyStateAction={renderEmptyStateAction("personal")}
|
|
1974
|
+
/>
|
|
1975
|
+
</div>
|
|
1974
1976
|
)}
|
|
1975
1977
|
{showSharedTree && (
|
|
1976
|
-
<
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
1978
|
+
<div className="pt-3">
|
|
1979
|
+
<ResourceTree
|
|
1980
|
+
tree={displayedSharedTree}
|
|
1981
|
+
variant={resourceTreeVariant}
|
|
1982
|
+
isLoading={sharedTreeQuery.isLoading}
|
|
1983
|
+
deletingId={
|
|
1984
|
+
deleteResource.isPending
|
|
1985
|
+
? (deleteResource.variables as string)
|
|
1986
|
+
: deleteMcpServer.isPending
|
|
1987
|
+
? `mcp:${(deleteMcpServer.variables as { scope: string }).scope}:${(deleteMcpServer.variables as { id: string }).id}`
|
|
1988
|
+
: null
|
|
1989
|
+
}
|
|
1990
|
+
selectedId={selectedResourceId}
|
|
1991
|
+
onSelect={handleSelect}
|
|
1992
|
+
onCreateFile={(parentPath, name) =>
|
|
1993
|
+
handleCreateFile(parentPath, name, "shared")
|
|
1994
|
+
}
|
|
1995
|
+
onCreateFolder={(parentPath, name) =>
|
|
1996
|
+
handleCreateFolder(parentPath, name, "shared")
|
|
1997
|
+
}
|
|
1998
|
+
onDelete={handleDelete}
|
|
1999
|
+
onRename={handleRename}
|
|
2000
|
+
onDrop={(files) => handleUploadFiles(files, "shared")}
|
|
2001
|
+
title="Organization"
|
|
2002
|
+
titleTooltip={
|
|
2003
|
+
canEditOrg
|
|
2004
|
+
? "Files visible to everyone in your organization"
|
|
2005
|
+
: "Files visible to everyone in your organization. Read-only — only admins can edit."
|
|
2006
|
+
}
|
|
2007
|
+
readOnly={!canEditOrg}
|
|
2008
|
+
headingHint={!canEditOrg ? "Read only" : undefined}
|
|
2009
|
+
sectionAction={renderScopeCreateMenu("shared")}
|
|
2010
|
+
emptyStateAction={renderEmptyStateAction("shared")}
|
|
2011
|
+
/>
|
|
2012
|
+
</div>
|
|
2009
2013
|
)}
|
|
2010
2014
|
</div>
|
|
2011
2015
|
)}
|