@agent-native/core 0.168.4 → 0.168.5
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.
|
@@ -161,6 +161,8 @@ export declare function shouldAllowAgentChatSurfaceSettingsMode(mode: AgentChatS
|
|
|
161
161
|
export declare function AgentChatSurface({ mode, className, defaultMode, showHeader, showTabBar, isFullscreen, style, chatViewTransition, showPageNewChatButton, ...props }: AgentChatSurfaceProps): React.JSX.Element;
|
|
162
162
|
export interface AgentSidebarProps {
|
|
163
163
|
children: React.ReactNode;
|
|
164
|
+
/** Keep the app surface mounted while temporarily disabling the chat panel. */
|
|
165
|
+
enabled?: boolean;
|
|
164
166
|
/** Placeholder text for the empty chat state */
|
|
165
167
|
emptyStateText?: string;
|
|
166
168
|
/** Suggestion prompts shown when no messages */
|
|
@@ -260,7 +262,7 @@ export interface AgentSidebarProps {
|
|
|
260
262
|
* Wraps app content with a toggleable agent sidebar.
|
|
261
263
|
* Use AgentToggleButton in your header to open/close it.
|
|
262
264
|
*/
|
|
263
|
-
export declare function AgentSidebar({ children, emptyStateText, suggestions, dynamicSuggestions, composerToolbarSlot, composerSlot, onComposerTextChange, imageModelMenu, availableAgents, availableModels, modelListLoading, selectedAgent, onAgentChange, onConnectLocalRuntime, onConnectProvider, runtime, adapterReloadKey, threadFooterSlot, defaultSidebarWidth, sidebarWidth, position, defaultOpen, animateMobile, animateDesktop, chatViewTransition, chatViewTransitionHandoff, storageKey, openStorageKey, apiUrl, agentChatSurface, desktopIdentityUnauthenticated, desktopIdentityAuthenticated, showTabBar, suppressInlineOpenApp, composerPlaceholder, openOnChatRunning, onFullscreenRequest, scope, isolateHistoryByScope, showScopeBadge, browserTabId, threadUrlSync, agentPageHref, suppressFirstRunOnboarding, }: AgentSidebarProps): React.JSX.Element;
|
|
265
|
+
export declare function AgentSidebar({ children, enabled, emptyStateText, suggestions, dynamicSuggestions, composerToolbarSlot, composerSlot, onComposerTextChange, imageModelMenu, availableAgents, availableModels, modelListLoading, selectedAgent, onAgentChange, onConnectLocalRuntime, onConnectProvider, runtime, adapterReloadKey, threadFooterSlot, defaultSidebarWidth, sidebarWidth, position, defaultOpen, animateMobile, animateDesktop, chatViewTransition, chatViewTransitionHandoff, storageKey, openStorageKey, apiUrl, agentChatSurface, desktopIdentityUnauthenticated, desktopIdentityAuthenticated, showTabBar, suppressInlineOpenApp, composerPlaceholder, openOnChatRunning, onFullscreenRequest, scope, isolateHistoryByScope, showScopeBadge, browserTabId, threadUrlSync, agentPageHref, suppressFirstRunOnboarding, }: AgentSidebarProps): React.JSX.Element;
|
|
264
266
|
/**
|
|
265
267
|
* Focus the agent chat composer input.
|
|
266
268
|
* Opens the sidebar if closed, then focuses the text input.
|
|
@@ -1418,7 +1418,7 @@ export function AgentChatSurface({ mode = "panel", className, defaultMode = "cha
|
|
|
1418
1418
|
* Wraps app content with a toggleable agent sidebar.
|
|
1419
1419
|
* Use AgentToggleButton in your header to open/close it.
|
|
1420
1420
|
*/
|
|
1421
|
-
export function AgentSidebar({ children, emptyStateText = "How can I help you?", suggestions, dynamicSuggestions, composerToolbarSlot, composerSlot, onComposerTextChange, imageModelMenu, availableAgents, availableModels, modelListLoading, selectedAgent, onAgentChange, onConnectLocalRuntime, onConnectProvider, runtime, adapterReloadKey, threadFooterSlot, defaultSidebarWidth, sidebarWidth, position = "right", defaultOpen = false, animateMobile = true, animateDesktop = true, chatViewTransition = false, chatViewTransitionHandoff = false, storageKey, openStorageKey, apiUrl, agentChatSurface, desktopIdentityUnauthenticated, desktopIdentityAuthenticated, showTabBar = true, suppressInlineOpenApp, composerPlaceholder, openOnChatRunning = false, onFullscreenRequest, scope, isolateHistoryByScope = false, showScopeBadge, browserTabId, threadUrlSync, agentPageHref, suppressFirstRunOnboarding = false, }) {
|
|
1421
|
+
export function AgentSidebar({ children, enabled = true, emptyStateText = "How can I help you?", suggestions, dynamicSuggestions, composerToolbarSlot, composerSlot, onComposerTextChange, imageModelMenu, availableAgents, availableModels, modelListLoading, selectedAgent, onAgentChange, onConnectLocalRuntime, onConnectProvider, runtime, adapterReloadKey, threadFooterSlot, defaultSidebarWidth, sidebarWidth, position = "right", defaultOpen = false, animateMobile = true, animateDesktop = true, chatViewTransition = false, chatViewTransitionHandoff = false, storageKey, openStorageKey, apiUrl, agentChatSurface, desktopIdentityUnauthenticated, desktopIdentityAuthenticated, showTabBar = true, suppressInlineOpenApp, composerPlaceholder, openOnChatRunning = false, onFullscreenRequest, scope, isolateHistoryByScope = false, showScopeBadge, browserTabId, threadUrlSync, agentPageHref, suppressFirstRunOnboarding = false, }) {
|
|
1422
1422
|
const staticHostedHarnessEnabled = isHostedHarnessConfigured(injectedAgentNativeConfig().harness);
|
|
1423
1423
|
const hostedHarnessQuery = useActionQuery("get-hosted-harness-config", undefined, { enabled: staticHostedHarnessEnabled });
|
|
1424
1424
|
const hostedHarnessStatus = hostedHarnessQuery.data;
|
|
@@ -1596,7 +1596,8 @@ export function AgentSidebar({ children, emptyStateText = "How can I help you?",
|
|
|
1596
1596
|
const [hasFrameSidebarState, setHasFrameSidebarState] = useState(false);
|
|
1597
1597
|
const [backgroundPanelActive, setBackgroundPanelActive] = useState(false);
|
|
1598
1598
|
const [runningTabIds, setRunningTabIds] = useState(() => new Set());
|
|
1599
|
-
const shouldMountPanel =
|
|
1599
|
+
const shouldMountPanel = enabled &&
|
|
1600
|
+
!isPerAppChatHosted &&
|
|
1600
1601
|
!presentationMode &&
|
|
1601
1602
|
(!frameCodeMode || !shouldParentFrameOwnAgentPanel()) &&
|
|
1602
1603
|
(open || backgroundPanelActive || runningTabIds.size > 0);
|
|
@@ -1612,9 +1613,10 @@ export function AgentSidebar({ children, emptyStateText = "How can I help you?",
|
|
|
1612
1613
|
if (frameOwned && !hasFrameSidebarState && !isPerAppChatHosted)
|
|
1613
1614
|
return;
|
|
1614
1615
|
dispatchAgentSidebarStateChange({
|
|
1615
|
-
open:
|
|
1616
|
-
|
|
1617
|
-
|
|
1616
|
+
open: enabled &&
|
|
1617
|
+
(isPerAppChatHosted
|
|
1618
|
+
? perAppChatState.open
|
|
1619
|
+
: !presentationMode && (frameOwned ? frameSidebarOpen : open)),
|
|
1618
1620
|
source: frameOwned ? "frame" : "app",
|
|
1619
1621
|
mode: frameOwned ? "code" : "app",
|
|
1620
1622
|
});
|
|
@@ -1626,6 +1628,7 @@ export function AgentSidebar({ children, emptyStateText = "How can I help you?",
|
|
|
1626
1628
|
hasFrameSidebarState,
|
|
1627
1629
|
isPerAppChatHosted,
|
|
1628
1630
|
perAppChatState.open,
|
|
1631
|
+
enabled,
|
|
1629
1632
|
]);
|
|
1630
1633
|
useEffect(() => {
|
|
1631
1634
|
if (!isPerAppChatSidebar)
|
|
@@ -1633,7 +1636,7 @@ export function AgentSidebar({ children, emptyStateText = "How can I help you?",
|
|
|
1633
1636
|
const frameOwned = frameCodeMode && shouldParentFrameOwnAgentPanel();
|
|
1634
1637
|
if (frameOwned && !hasFrameSidebarState)
|
|
1635
1638
|
return;
|
|
1636
|
-
const openState = !presentationMode && (frameOwned ? frameSidebarOpen : open);
|
|
1639
|
+
const openState = enabled && !presentationMode && (frameOwned ? frameSidebarOpen : open);
|
|
1637
1640
|
const message = buildAppChatSidebarStateMessage(openState);
|
|
1638
1641
|
window.dispatchEvent(new CustomEvent(APP_CHAT_SIDEBAR_STATE_EVENT, {
|
|
1639
1642
|
detail: message.data,
|
|
@@ -1656,6 +1659,7 @@ export function AgentSidebar({ children, emptyStateText = "How can I help you?",
|
|
|
1656
1659
|
isPerAppChatSidebar,
|
|
1657
1660
|
open,
|
|
1658
1661
|
presentationMode,
|
|
1662
|
+
enabled,
|
|
1659
1663
|
]);
|
|
1660
1664
|
useEffect(() => {
|
|
1661
1665
|
const preparePanel = () => setBackgroundPanelActive(true);
|
|
@@ -1968,10 +1972,9 @@ export function AgentSidebar({ children, emptyStateText = "How can I help you?",
|
|
|
1968
1972
|
}
|
|
1969
1973
|
};
|
|
1970
1974
|
}, [shouldMountPanel, sidebarAnimationEnabled]);
|
|
1971
|
-
const shouldRenderPanel =
|
|
1972
|
-
? renderAnimatedPanel
|
|
1973
|
-
|
|
1974
|
-
const panelOpen = open && shouldMountPanel;
|
|
1975
|
+
const shouldRenderPanel = enabled &&
|
|
1976
|
+
(sidebarAnimationEnabled ? renderAnimatedPanel : shouldMountPanel);
|
|
1977
|
+
const panelOpen = enabled && open && shouldMountPanel;
|
|
1975
1978
|
const panelLayout = isMobile
|
|
1976
1979
|
? "mobile"
|
|
1977
1980
|
: wideDrawerEnabled
|
|
@@ -2064,6 +2067,7 @@ export function AgentSidebar({ children, emptyStateText = "How can I help you?",
|
|
|
2064
2067
|
return (_jsx(AgentSidebarOnboardingContext.Provider, { value: true, children: _jsxs(RealtimeVoiceModeProvider, { browserTabId: browserTabId, children: [showFirstRunOnboarding && (_jsx(Suspense, { fallback: null, children: _jsx(FirstRunOnboarding, {}) })), _jsxs("div", { className: "agent-sidebar-shell flex min-w-0 flex-1 h-screen overflow-hidden", "data-agent-sidebar-position": effectivePosition, "data-agent-native-hosted-harness-ui": hostedHarnessUi ? "desktop" : undefined, "data-agent-native-hosted-chat": isPerAppChatHosted ? "true" : undefined, "data-agent-sidebar-resizing": isResizing ? "true" : undefined, children: [isMobile &&
|
|
2065
2068
|
!isPerAppChatHosted &&
|
|
2066
2069
|
!presentationMode &&
|
|
2070
|
+
enabled &&
|
|
2067
2071
|
(mobileAnimationEnabled ? shouldRenderPanel : open) && (_jsx("div", { className: cn("agent-sidebar-backdrop fixed inset-0 bg-foreground/40", mobileAnimationEnabled && !panelOpen && "pointer-events-none"), "data-agent-sidebar-animation": mobileAnimationEnabled ? "mobile" : undefined, "data-agent-sidebar-state": panelOpen ? "open" : "closed", style: { zIndex: SIDEBAR_OVERLAY_Z_INDEX - 1 }, onClick: () => setOpenPersisted(false) })), shouldMountPanel ? _jsx(URLSync, { browserTabId: browserTabId }) : null, isResizing ? (_jsx("div", { "aria-hidden": "true", className: "agent-sidebar-resize-overlay" })) : null, isLeft && !presentationMode ? sidebar : null, isLeft && !presentationMode ? drawerPlaceholder : null, _jsx("div", { className: "agent-sidebar-main-surface flex flex-1 flex-col overflow-auto min-w-0", "data-agent-sidebar-main-position": position, "data-agent-sidebar-main-state": !isMobile && !presentationMode && panelOpen ? "open" : "closed", "data-agent-sidebar-resizing": isResizing ? "true" : undefined, children: _jsx(ScreenRefreshBoundary, { children: children }) }), !isLeft && !presentationMode ? drawerPlaceholder : null, !isLeft && !presentationMode ? sidebar : null] })] }) }));
|
|
2068
2072
|
}
|
|
2069
2073
|
/**
|
package/dist/collab/routes.d.ts
CHANGED
|
@@ -26,8 +26,8 @@ export declare const getCollabState: import("h3").EventHandlerWithFetch<import("
|
|
|
26
26
|
* Body: { update: string (base64), requestSource?: string }
|
|
27
27
|
*/
|
|
28
28
|
export declare const postCollabUpdate: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
29
|
-
error: string;
|
|
30
29
|
ok?: undefined;
|
|
30
|
+
error: string;
|
|
31
31
|
} | {
|
|
32
32
|
error?: undefined;
|
|
33
33
|
ok: boolean;
|
package/dist/secrets/routes.d.ts
CHANGED
|
@@ -37,17 +37,17 @@ export declare function createWriteSecretHandler(): import("h3").EventHandlerWit
|
|
|
37
37
|
ok?: undefined;
|
|
38
38
|
status?: undefined;
|
|
39
39
|
} | {
|
|
40
|
-
error?: undefined;
|
|
41
40
|
ok: boolean;
|
|
42
41
|
status: string;
|
|
42
|
+
error?: undefined;
|
|
43
43
|
} | {
|
|
44
44
|
ok?: undefined;
|
|
45
45
|
error: string;
|
|
46
46
|
removed?: undefined;
|
|
47
47
|
} | {
|
|
48
|
-
error?: undefined;
|
|
49
48
|
ok: boolean;
|
|
50
49
|
removed: boolean;
|
|
50
|
+
error?: undefined;
|
|
51
51
|
}>>;
|
|
52
52
|
/**
|
|
53
53
|
* POST /_agent-native/secrets/:key/test — validate an optional candidate value
|
|
@@ -58,13 +58,13 @@ export declare function createTestSecretHandler(): import("h3").EventHandlerWith
|
|
|
58
58
|
error: string;
|
|
59
59
|
note?: undefined;
|
|
60
60
|
} | {
|
|
61
|
-
error?: undefined;
|
|
62
61
|
ok: boolean;
|
|
63
62
|
note?: undefined;
|
|
64
|
-
} | {
|
|
65
63
|
error?: undefined;
|
|
64
|
+
} | {
|
|
66
65
|
ok: boolean;
|
|
67
66
|
note: string;
|
|
67
|
+
error?: undefined;
|
|
68
68
|
} | {
|
|
69
69
|
note?: undefined;
|
|
70
70
|
ok: boolean;
|
|
@@ -95,11 +95,11 @@ export interface AdHocSecretPayload {
|
|
|
95
95
|
export declare function createAdHocSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<AdHocSecretPayload[] | {
|
|
96
96
|
error: string;
|
|
97
97
|
} | {
|
|
98
|
-
error?: undefined;
|
|
99
98
|
ok: boolean;
|
|
100
99
|
key: string;
|
|
101
|
-
} | {
|
|
102
100
|
error?: undefined;
|
|
101
|
+
} | {
|
|
103
102
|
ok: boolean;
|
|
104
103
|
removed: boolean;
|
|
104
|
+
error?: undefined;
|
|
105
105
|
}>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.168.
|
|
3
|
+
"version": "0.168.5",
|
|
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": {
|
|
@@ -428,8 +428,8 @@
|
|
|
428
428
|
"y-protocols": "^1.0.7",
|
|
429
429
|
"yjs": "^13.6.32",
|
|
430
430
|
"zod": "^4.3.6",
|
|
431
|
-
"@agent-native/
|
|
432
|
-
"@agent-native/
|
|
431
|
+
"@agent-native/recap-cli": "0.5.7",
|
|
432
|
+
"@agent-native/toolkit": "^0.16.9"
|
|
433
433
|
},
|
|
434
434
|
"devDependencies": {
|
|
435
435
|
"@ai-sdk/anthropic": "^3.0.71",
|