@agent-native/core 0.178.1 → 0.178.2-nightly-20260910214741

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 (50) hide show
  1. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +108 -121
  2. package/corpus/templates/assets/actions/create-generation-session.ts +2 -6
  3. package/corpus/templates/assets/actions/generate-image.ts +3 -12
  4. package/corpus/templates/assets/app/components/layout/Sidebar.tsx +87 -220
  5. package/corpus/templates/assets/server/lib/library-access.ts +23 -0
  6. package/corpus/templates/brain/app/components/layout/Sidebar.tsx +83 -221
  7. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +324 -460
  8. package/corpus/templates/chat/app/components/layout/Sidebar.tsx +57 -247
  9. package/corpus/templates/clips/app/components/library/library-layout.tsx +15 -48
  10. package/corpus/templates/clips/changelog/2026-09-10-open-mcp-connections-in-new-tabs.md +1 -0
  11. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +84 -94
  12. package/corpus/templates/crm/app/components/layout/CrmLayout.tsx +1 -1
  13. package/corpus/templates/crm/app/components/layout/CrmSidebar.tsx +108 -296
  14. package/corpus/templates/design/app/components/layout/Sidebar.tsx +55 -212
  15. package/corpus/templates/factory/app/components/layout/Sidebar.tsx +72 -260
  16. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +143 -362
  17. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +64 -159
  18. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +152 -165
  19. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +82 -207
  20. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +61 -234
  21. package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +73 -225
  22. package/dist/client/EnvironmentBadge.d.ts +7 -4
  23. package/dist/client/EnvironmentBadge.js +26 -18
  24. package/dist/client/FeedbackButton.js +23 -8
  25. package/dist/client/app-providers.js +1 -1
  26. package/dist/client/auth/AuthPage.js +0 -38
  27. package/dist/client/components/icons/AgentNativeIcon.js +1 -1
  28. package/dist/client/index.d.ts +1 -0
  29. package/dist/client/index.js +1 -0
  30. package/dist/client/ui/AppSidebar.d.ts +15 -0
  31. package/dist/client/ui/AppSidebar.js +34 -0
  32. package/dist/client/ui/index.d.ts +1 -0
  33. package/dist/client/ui/index.js +1 -0
  34. package/dist/collab/routes.d.ts +1 -1
  35. package/dist/config.d.ts +4 -0
  36. package/dist/config.js +19 -3
  37. package/dist/file-upload/actions/upload-image.d.ts +3 -3
  38. package/dist/notifications/routes.d.ts +2 -2
  39. package/dist/observability/routes.d.ts +5 -5
  40. package/dist/provider-api/actions/custom-provider-registration.d.ts +9 -9
  41. package/dist/provider-api/actions/provider-api.d.ts +15 -15
  42. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  43. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  44. package/dist/server/beta-opt-out-html.js +2 -2
  45. package/dist/templates/chat/app/components/layout/Sidebar.tsx +57 -247
  46. package/dist/vite/client.js +4 -1
  47. package/docs/content/template-clips-anonymous-intake.mdx +7 -5
  48. package/docs/content/template-clips-developers.mdx +1 -1
  49. package/package.json +2 -2
  50. package/src/templates/chat/app/components/layout/Sidebar.tsx +57 -247
@@ -6,48 +6,32 @@ import {
6
6
  import { useT } from "@agent-native/core/client/i18n";
7
7
  import { openCommandMenu } from "@agent-native/core/client/navigation";
8
8
  import { OrgSwitcher } from "@agent-native/core/client/org";
9
- import { AgentNativeIcon, FeedbackButton } from "@agent-native/core/client/ui";
10
- import { SidebarFooterActions } from "@agent-native/toolkit/app-shell";
9
+ import {
10
+ AppSidebar,
11
+ AppSidebarNavItem,
12
+ FeedbackButton,
13
+ type AppSidebarItemDefinition,
14
+ } from "@agent-native/core/client/ui";
11
15
  import {
12
16
  ChatHistoryRail,
13
17
  type ChatHistoryItem,
14
18
  } from "@agent-native/toolkit/chat-history";
15
19
  import {
16
- IconLayoutSidebarLeftCollapse,
17
- IconLayoutSidebarLeftExpand,
18
20
  IconMessageCircle,
19
21
  IconSearch,
20
22
  IconSettings,
21
23
  } from "@tabler/icons-react";
22
24
  import { useEffect, useMemo } from "react";
23
- import { Link, useLocation, useNavigate } from "react-router";
25
+ import { useLocation, useNavigate } from "react-router";
24
26
  import { toast } from "sonner";
25
27
 
28
+ import { Button } from "@/components/ui/button";
26
29
  import {
27
30
  Tooltip,
28
31
  TooltipContent,
29
32
  TooltipTrigger,
30
33
  } from "@/components/ui/tooltip";
31
34
  import { APP_TITLE } from "@/lib/app-config";
32
- import { cn } from "@/lib/utils";
33
-
34
- const navItems = [
35
- {
36
- icon: IconMessageCircle,
37
- labelKey: "navigation.chat",
38
- href: "/home",
39
- view: "chat",
40
- },
41
- ];
42
-
43
- const bottomNavItems = [
44
- {
45
- icon: IconSettings,
46
- labelKey: "navigation.settings",
47
- href: "/settings",
48
- view: "settings",
49
- },
50
- ];
51
35
 
52
36
  const CHAT_STORAGE_KEY = "chat";
53
37
  const CHAT_ACTIVE_THREAD_KEY = `agent-chat-active-thread:${CHAT_STORAGE_KEY}`;
@@ -275,245 +259,71 @@ export function Sidebar({
275
259
  const t = useT();
276
260
  const isChatRoute =
277
261
  location.pathname === "/home" || location.pathname.startsWith("/chat/");
278
- const ToggleIcon = collapsed
279
- ? IconLayoutSidebarLeftExpand
280
- : IconLayoutSidebarLeftCollapse;
281
- const navClass = ({ isActive }: { isActive: boolean }) =>
282
- cn(
283
- "flex items-center text-sm transition-colors",
284
- collapsed
285
- ? "relative h-10 w-full justify-center rounded-none px-0"
286
- : "h-9 rounded-md gap-3 px-3",
287
- isActive
288
- ? collapsed
289
- ? "bg-sidebar-accent text-sidebar-accent-foreground"
290
- : "bg-sidebar-accent text-sidebar-accent-foreground"
291
- : collapsed
292
- ? "text-sidebar-foreground/70 hover:bg-sidebar-accent/55 hover:text-sidebar-accent-foreground"
293
- : "text-sidebar-foreground hover:bg-sidebar-accent/65 hover:text-sidebar-accent-foreground",
294
- );
295
- const collapseButton = collapsible ? (
296
- <Tooltip>
297
- <TooltipTrigger asChild>
298
- <button
299
- type="button"
300
- onClick={() => onCollapsedChange?.(!collapsed)}
301
- className={cn(
302
- "flex shrink-0 items-center justify-center rounded-md text-sidebar-foreground/65 transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
303
- collapsed ? "size-8" : "size-7",
304
- )}
305
- aria-label={
306
- collapsed
307
- ? t("navigation.expandSidebar")
308
- : t("navigation.collapseSidebar")
309
- }
310
- >
311
- <ToggleIcon className="size-4" />
312
- </button>
313
- </TooltipTrigger>
314
- <TooltipContent side="right">
315
- {collapsed
316
- ? t("navigation.expandSidebar")
317
- : t("navigation.collapseSidebar")}
318
- </TooltipContent>
319
- </Tooltip>
320
- ) : null;
262
+
263
+ const secondaryItems: AppSidebarItemDefinition[] = [
264
+ {
265
+ to: "/settings",
266
+ label: t("navigation.settings"),
267
+ icon: IconSettings,
268
+ active: location.pathname.startsWith("/settings"),
269
+ },
270
+ ];
271
+
272
+ const feedbackButton = (
273
+ <FeedbackButton variant={collapsed ? "icon" : "sidebar"} side="right" />
274
+ );
275
+
276
+ const orgSwitcher = <OrgSwitcher compact={collapsed} reserveSpace />;
277
+
321
278
  const searchButton = (
322
279
  <Tooltip>
323
280
  <TooltipTrigger asChild>
324
- <button
281
+ <Button
325
282
  type="button"
283
+ variant="ghost"
284
+ size="icon"
285
+ className="size-9 shrink-0 text-primary hover:bg-accent/60 hover:text-primary"
326
286
  onClick={openCommandMenu}
327
287
  aria-label={t("root.commandSearch")}
328
- className="flex size-8 items-center justify-center rounded-md text-sidebar-foreground/65 transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
329
288
  >
330
289
  <IconSearch className="size-4" />
331
- </button>
290
+ </Button>
332
291
  </TooltipTrigger>
333
292
  <TooltipContent side="right">{t("root.commandSearch")}</TooltipContent>
334
293
  </Tooltip>
335
294
  );
336
- const feedbackButton = (
337
- <FeedbackButton
338
- variant={collapsed ? "icon" : "sidebar"}
339
- side="right"
340
- className={collapsed ? "h-8 w-8" : "min-w-0"}
341
- />
342
- );
343
295
 
344
296
  return (
345
- <aside
346
- data-collapsed={collapsed ? "true" : "false"}
347
- className={cn(
348
- "flex h-full min-w-0 shrink-0 flex-col overflow-hidden border-e border-sidebar-border bg-sidebar text-sidebar-foreground transition-[width] duration-200 ease-out",
349
- collapsed ? "w-12" : "w-60",
350
- )}
297
+ <AppSidebar
298
+ collapsed={collapsed}
299
+ collapsible={collapsible}
300
+ onCollapsedChange={onCollapsedChange}
301
+ brandName={APP_TITLE}
302
+ brandHref="/home"
303
+ secondaryItems={secondaryItems}
304
+ feedback={feedbackButton}
305
+ orgSwitcher={orgSwitcher}
306
+ footerExtras={searchButton}
351
307
  >
352
- <div
353
- className={cn(
354
- "flex shrink-0 items-center border-b border-sidebar-border",
355
- collapsed ? "h-12 justify-center px-0" : "h-14 px-3",
356
- )}
357
- >
358
- <Link
359
- to="/home"
360
- onClick={(event) => {
361
- if (
362
- !collapsible ||
363
- !onCollapsedChange ||
364
- event.metaKey ||
365
- event.ctrlKey ||
366
- event.shiftKey ||
367
- event.altKey ||
368
- event.button !== 0
369
- ) {
370
- return;
371
- }
308
+ <AppSidebarNavItem
309
+ to="/home"
310
+ label={t("navigation.chat")}
311
+ icon={IconMessageCircle}
312
+ active={isChatRoute}
313
+ onClick={(event) => {
314
+ if (
315
+ !isChatRoute &&
316
+ !event.metaKey &&
317
+ !event.ctrlKey &&
318
+ !event.shiftKey &&
319
+ !event.altKey
320
+ ) {
372
321
  event.preventDefault();
373
- onCollapsedChange(!collapsed);
374
- }}
375
- className={cn(
376
- "flex min-w-0 items-center rounded outline-none focus-visible:ring-2 focus-visible:ring-ring",
377
- collapsed ? "size-7 justify-center" : "flex-1 gap-3",
378
- )}
379
- aria-label={
380
- collapsible && onCollapsedChange
381
- ? collapsed
382
- ? t("navigation.expandSidebar")
383
- : t("navigation.collapseSidebar")
384
- : collapsed
385
- ? APP_TITLE
386
- : undefined
322
+ navigateWithAgentChatViewTransition(navigate, "/home");
387
323
  }
388
- >
389
- <AgentNativeIcon
390
- aria-hidden="true"
391
- className="h-3.5 w-6 shrink-0 text-sidebar-accent-foreground"
392
- />
393
- <div className={cn("min-w-0", collapsed && "sr-only")}>
394
- <p className="truncate text-sm font-semibold text-sidebar-accent-foreground">
395
- {APP_TITLE}
396
- </p>
397
- </div>
398
- </Link>
399
- </div>
400
-
401
- <nav
402
- className={cn(
403
- "flex-1 overflow-y-auto",
404
- collapsed ? "px-0 py-2" : "px-2 py-3",
405
- )}
406
- >
407
- <div className={cn("grid", collapsed ? "gap-0" : "gap-1")}>
408
- {navItems.map((item) => {
409
- const Icon = item.icon;
410
- const isActive =
411
- item.href === "/home"
412
- ? isChatRoute
413
- : location.pathname.startsWith(item.href);
414
- const link = (
415
- <Link
416
- to={item.href}
417
- onClick={(event) => {
418
- if (
419
- item.href === "/home" &&
420
- !isChatRoute &&
421
- !event.metaKey &&
422
- !event.ctrlKey &&
423
- !event.shiftKey &&
424
- !event.altKey
425
- ) {
426
- event.preventDefault();
427
- navigateWithAgentChatViewTransition(navigate, "/home");
428
- }
429
- }}
430
- className={navClass({ isActive })}
431
- aria-current={isActive ? "page" : undefined}
432
- aria-label={collapsed ? t(item.labelKey) : undefined}
433
- >
434
- <Icon className="size-4 shrink-0" />
435
- <span className={collapsed ? "sr-only" : "truncate"}>
436
- {t(item.labelKey)}
437
- </span>
438
- </Link>
439
- );
440
- return (
441
- <div key={item.href}>
442
- {collapsed ? (
443
- <Tooltip>
444
- <TooltipTrigger asChild>{link}</TooltipTrigger>
445
- <TooltipContent side="right">
446
- {t(item.labelKey)}
447
- </TooltipContent>
448
- </Tooltip>
449
- ) : (
450
- link
451
- )}
452
- {!collapsed && item.view === "chat" ? (
453
- <ChatThreadsSection open={isChatRoute} />
454
- ) : null}
455
- </div>
456
- );
457
- })}
458
- </div>
459
- </nav>
460
-
461
- <div className={cn("mt-auto shrink-0", collapsed && "py-2")}>
462
- <nav
463
- className={cn(
464
- "grid",
465
- collapsed ? "gap-0 px-1 py-1" : "gap-1 px-2 py-1",
466
- )}
467
- >
468
- {bottomNavItems.map((item) => {
469
- const Icon = item.icon;
470
- const isActive = location.pathname.startsWith(item.href);
471
- const link = (
472
- <Link
473
- to={item.href}
474
- className={navClass({ isActive })}
475
- aria-current={isActive ? "page" : undefined}
476
- aria-label={collapsed ? t(item.labelKey) : undefined}
477
- >
478
- <Icon className="size-4 shrink-0" />
479
- <span className={collapsed ? "sr-only" : "truncate"}>
480
- {t(item.labelKey)}
481
- </span>
482
- </Link>
483
- );
484
- return collapsed ? (
485
- <Tooltip key={item.href}>
486
- <TooltipTrigger asChild>{link}</TooltipTrigger>
487
- <TooltipContent side="right">{t(item.labelKey)}</TooltipContent>
488
- </Tooltip>
489
- ) : (
490
- <div key={item.href}>{link}</div>
491
- );
492
- })}
493
- </nav>
494
-
495
- <div
496
- className={cn(
497
- collapsed ? "px-1 py-1 empty:hidden" : "px-3 py-2 empty:hidden",
498
- )}
499
- >
500
- <OrgSwitcher
501
- reserveSpace
502
- className={
503
- collapsed
504
- ? "h-8 justify-center px-0 [&>span]:sr-only [&>svg:last-child]:hidden"
505
- : undefined
506
- }
507
- />
508
- </div>
509
-
510
- <SidebarFooterActions
511
- collapsed={collapsed}
512
- feedback={feedbackButton}
513
- search={searchButton}
514
- collapse={collapseButton}
515
- />
516
- </div>
517
- </aside>
324
+ }}
325
+ />
326
+ {!collapsed && <ChatThreadsSection open={isChatRoute} />}
327
+ </AppSidebar>
518
328
  );
519
329
  }
@@ -2999,7 +2999,10 @@ function createAgentNativeConfig(options = {}, command, userConfig = {}, mode =
2999
2999
  inferredDeploymentEnvironment !== undefined
3000
3000
  ? {
3001
3001
  ...appConfig,
3002
- deployment: { environment: inferredDeploymentEnvironment },
3002
+ deployment: {
3003
+ ...appConfig.deployment,
3004
+ environment: inferredDeploymentEnvironment,
3005
+ },
3003
3006
  }
3004
3007
  : appConfig;
3005
3008
  const buildId = resolveAgentNativeBuildId(process.env, "development");
@@ -12,11 +12,13 @@ The intake URL is a narrow upload capability. It is not a share link, a library
12
12
 
13
13
  ## Capability boundaries
14
14
 
15
- | Capability | Allows | Does not allow | Lifetime |
16
- | --- | --- | --- | --- |
17
- | Intake URL | Create one private recording, upload its chunks, finalize it, or abort it | List recordings, read media, open the library, or use normal agent APIs | One hour by default. Four hours maximum |
18
- | Agent context link | Read the completed recording through the normal scoped Clips agent surface after an authenticated host-side exchange | Be minted by the anonymous intake bearer, read any other recording, or act as the recording owner | Seven days for bug-report completions |
19
- | Clips session | Mint intake URLs and use the normal authenticated Clips UI | Nothing is added to the anonymous visitor's browser | Controlled by normal Clips auth |
15
+ <!-- i18n-copy-ignore: oxfmt table column alignment only; wording unchanged. -->
16
+
17
+ | Capability | Allows | Does not allow | Lifetime |
18
+ | ------------------ | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------- |
19
+ | Intake URL | Create one private recording, upload its chunks, finalize it, or abort it | List recordings, read media, open the library, or use normal agent APIs | One hour by default. Four hours maximum |
20
+ | Agent context link | Read the completed recording through the normal scoped Clips agent surface after an authenticated host-side exchange | Be minted by the anonymous intake bearer, read any other recording, or act as the recording owner | Seven days for bug-report completions |
21
+ | Clips session | Mint intake URLs and use the normal authenticated Clips UI | Nothing is added to the anonymous visitor's browser | Controlled by normal Clips auth |
20
22
 
21
23
  The intake token is signed with the existing scoped-token mechanism. The token is never stored in SQL. The database stores only the intake id, owner and organization binding, recording id, status, and expiry.
22
24
 
@@ -273,7 +273,7 @@ Two things live outside this schema on purpose: organization/member/invitation r
273
273
  | `recording_ctas` | Call-to-action buttons (label, url, color, placement) overlaid on a recording |
274
274
  | `recording_comments` | Threaded, timestamped comments with emoji-reaction map and resolved flag |
275
275
  | `recording_bug_reports` | Redacted host-product bug report metadata keyed by `recording_id` |
276
- | `clips_intake_sessions` | One-use anonymous intake capabilities bound to an owner, organization, and recording |
276
+ | `clips_intake_sessions` | One-use anonymous intake capabilities bound to an owner, organization, and recording |
277
277
  | `recording_reactions` | Emoji reactions pinned to a video timestamp (anonymous viewers allowed) |
278
278
  | `recording_viewers` / `recording_events` | View analytics: per-viewer watch time and completion, plus granular events (view-start, watch-progress, seek, pause, cta-click, reaction) |
279
279
  | `recording_views` | Append-only per-view log (who viewed, when) — backs the owner-facing "Viewed by" popover, kept separate from the aggregate counters above |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.178.1",
3
+ "version": "0.178.2-nightly-20260910214741",
4
4
  "description": "The agentic application framework for building autonomous agents with intuitive UIs",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -447,7 +447,7 @@
447
447
  "yjs": "^13.6.32",
448
448
  "zod": "^4.3.6",
449
449
  "@agent-native/recap-cli": "0.5.29",
450
- "@agent-native/toolkit": "^0.19.7"
450
+ "@agent-native/toolkit": "^0.19.8-nightly-20260910214741"
451
451
  },
452
452
  "devDependencies": {
453
453
  "@ai-sdk/anthropic": "^3.0.71",