@agent-native/core 0.114.5 → 0.114.6

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 (76) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +8 -0
  3. package/corpus/core/package.json +1 -1
  4. package/corpus/core/src/client/resources/ResourceTree.tsx +11 -5
  5. package/corpus/core/src/client/resources/ResourcesPanel.tsx +141 -18
  6. package/corpus/templates/clips/app/components/meetings/meeting-card.tsx +1 -2
  7. package/corpus/templates/clips/changelog/2026-07-20-opening-zoom-meeting-launches-native-app.md +6 -0
  8. package/corpus/templates/clips/desktop/src/app.tsx +7 -11
  9. package/corpus/templates/clips/desktop/src/lib/open-meeting-join-url.ts +22 -0
  10. package/corpus/templates/clips/desktop/src/overlays/meeting-notification.tsx +2 -3
  11. package/corpus/templates/clips/shared/meeting-join-url.ts +0 -5
  12. package/corpus/templates/content/.agents/skills/document-editing/SKILL.md +9 -1
  13. package/corpus/templates/content/AGENTS.md +4 -1
  14. package/corpus/templates/content/actions/_content-spaces.ts +6 -1
  15. package/corpus/templates/content/actions/_database-row-batch.ts +15 -2
  16. package/corpus/templates/content/actions/_database-utils.ts +83 -15
  17. package/corpus/templates/content/actions/add-database-item.ts +3 -0
  18. package/corpus/templates/content/actions/connect-local-folder-source.ts +2 -1
  19. package/corpus/templates/content/actions/delete-content-database.ts +12 -9
  20. package/corpus/templates/content/actions/delete-database-items.ts +3 -2
  21. package/corpus/templates/content/actions/delete-document.ts +233 -6
  22. package/corpus/templates/content/actions/duplicate-database-item.ts +1 -0
  23. package/corpus/templates/content/actions/get-document.ts +4 -1
  24. package/corpus/templates/content/actions/list-content-databases.ts +1 -0
  25. package/corpus/templates/content/actions/list-documents.ts +1 -0
  26. package/corpus/templates/content/actions/list-trashed-content-databases.ts +8 -2
  27. package/corpus/templates/content/actions/list-trashed-documents.ts +50 -0
  28. package/corpus/templates/content/actions/permanently-delete-document.ts +28 -0
  29. package/corpus/templates/content/actions/pull-document.ts +15 -2
  30. package/corpus/templates/content/actions/restore-content-database.ts +48 -11
  31. package/corpus/templates/content/actions/restore-document.ts +28 -0
  32. package/corpus/templates/content/actions/search-documents.ts +2 -1
  33. package/corpus/templates/content/actions/view-screen.ts +2 -1
  34. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +149 -55
  35. package/corpus/templates/content/app/components/editor/database/GalleryView.tsx +7 -2
  36. package/corpus/templates/content/app/components/editor/database/ListView.tsx +7 -2
  37. package/corpus/templates/content/app/components/editor/database/TimelineView.tsx +3 -0
  38. package/corpus/templates/content/app/components/editor/database/sidebar.tsx +26 -5
  39. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +243 -163
  40. package/corpus/templates/content/app/components/sidebar/WorkspaceSourceMenu.tsx +154 -0
  41. package/corpus/templates/content/app/components/sidebar/select-content-space.ts +11 -0
  42. package/corpus/templates/content/app/hooks/use-content-database.ts +6 -0
  43. package/corpus/templates/content/app/hooks/use-documents.ts +57 -0
  44. package/corpus/templates/content/app/i18n-data.ts +83 -2
  45. package/corpus/templates/content/app/routes/_app.local-files.tsx +8 -1
  46. package/corpus/templates/content/changelog/2026-07-19-pages-now-move-to-a-reversible-trash-and-the-organization-pi.md +6 -0
  47. package/corpus/templates/content/changelog/2026-07-20-trash-actions-now-preserve-independent-archived-pages-enforc.md +6 -0
  48. package/corpus/templates/content/changelog/2026-07-20-workspace-toggles-now-stay-independently-open-or-closed-and-.md +6 -0
  49. package/corpus/templates/content/changelog/2026-07-20-workspaces-can-be-added-from-a-blank-workspace-or-a-connecte.md +6 -0
  50. package/corpus/templates/content/parity/matrix.md +1 -1
  51. package/corpus/templates/content/parity/matrix.ts +3 -0
  52. package/corpus/templates/content/server/db/schema.ts +2 -0
  53. package/corpus/templates/content/server/lib/public-documents.ts +8 -2
  54. package/corpus/templates/content/server/plugins/db.ts +52 -0
  55. package/corpus/templates/content/server/routes/api/document-agent-context.json.get.ts +2 -2
  56. package/corpus/templates/content/shared/api.ts +10 -0
  57. package/corpus/toolkit/CHANGELOG.md +6 -0
  58. package/corpus/toolkit/package.json +1 -1
  59. package/corpus/toolkit/src/ui/progress.tsx +3 -2
  60. package/dist/client/resources/ResourceTree.d.ts +3 -1
  61. package/dist/client/resources/ResourceTree.d.ts.map +1 -1
  62. package/dist/client/resources/ResourceTree.js +4 -4
  63. package/dist/client/resources/ResourceTree.js.map +1 -1
  64. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  65. package/dist/client/resources/ResourcesPanel.js +55 -6
  66. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  67. package/dist/collab/routes.d.ts +1 -1
  68. package/dist/collab/struct-routes.d.ts +1 -1
  69. package/dist/notifications/routes.d.ts +1 -1
  70. package/dist/observability/routes.d.ts +5 -5
  71. package/dist/progress/routes.d.ts +1 -1
  72. package/dist/secrets/routes.d.ts +9 -9
  73. package/dist/server/transcribe-voice.d.ts +1 -1
  74. package/package.json +2 -2
  75. package/src/client/resources/ResourceTree.tsx +11 -5
  76. package/src/client/resources/ResourcesPanel.tsx +141 -18
@@ -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;
@@ -13,8 +13,8 @@
13
13
  * Body: { json: any, fieldName?: string, type?: "map"|"array", requestSource?: string }
14
14
  */
15
15
  export declare const postCollabJson: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
16
- ok?: undefined;
17
16
  error: string;
17
+ ok?: undefined;
18
18
  } | {
19
19
  error?: undefined;
20
20
  ok: boolean;
@@ -28,7 +28,7 @@ export declare function createNotificationsHandler(): import("h3").EventHandlerW
28
28
  } | {
29
29
  count?: undefined;
30
30
  updated?: undefined;
31
- ok: boolean;
32
31
  error?: undefined;
32
+ ok: boolean;
33
33
  }>>;
34
34
  //# sourceMappingURL=routes.d.ts.map
@@ -41,28 +41,28 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
41
41
  thumbsUpRate: number;
42
42
  avgEvalScore: number;
43
43
  } | {
44
- error?: undefined;
45
- ok?: undefined;
46
44
  summary: import("./types.js").TraceSummary;
47
45
  spans: import("./types.js").TraceSpan[];
48
46
  id?: undefined;
49
- } | {
50
47
  error?: undefined;
51
48
  ok?: undefined;
49
+ } | {
52
50
  summary?: undefined;
53
51
  spans?: undefined;
54
52
  id: string;
55
- } | {
53
+ error?: undefined;
56
54
  ok?: undefined;
55
+ } | {
57
56
  summary?: undefined;
58
57
  spans?: undefined;
59
58
  id?: undefined;
60
59
  error: any;
60
+ ok?: undefined;
61
61
  } | {
62
- error?: undefined;
63
62
  summary?: undefined;
64
63
  spans?: undefined;
65
64
  id?: undefined;
65
+ error?: undefined;
66
66
  ok: boolean;
67
67
  }>>;
68
68
  //# sourceMappingURL=routes.d.ts.map
@@ -15,7 +15,7 @@ export declare function createProgressHandler(): import("h3").EventHandlerWithFe
15
15
  error: string;
16
16
  ok?: undefined;
17
17
  } | {
18
- error?: undefined;
19
18
  ok: boolean;
19
+ error?: undefined;
20
20
  }>>;
21
21
  //# sourceMappingURL=routes.d.ts.map
@@ -34,37 +34,37 @@ export declare function createListSecretsHandler(): import("h3").EventHandlerWit
34
34
  /** POST /_agent-native/secrets/:key — write a secret. */
35
35
  export declare function createWriteSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
36
36
  error: string;
37
- ok?: undefined;
38
37
  status?: undefined;
38
+ ok?: undefined;
39
39
  } | {
40
- error?: undefined;
41
40
  ok: boolean;
42
41
  status: string;
42
+ error?: undefined;
43
43
  } | {
44
- ok?: undefined;
45
44
  error: string;
46
45
  removed?: undefined;
46
+ ok?: 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 — re-run the validator against the
54
54
  * current stored value without changing anything. Useful for the "Test" button.
55
55
  */
56
56
  export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
57
- ok?: undefined;
58
57
  error: string;
59
58
  note?: undefined;
59
+ ok?: 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,12 +95,12 @@ 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
  }>>;
106
106
  //# sourceMappingURL=routes.d.ts.map
@@ -20,7 +20,7 @@ export declare function createTranscribeVoiceHandler(): import("h3").EventHandle
20
20
  error: string;
21
21
  text?: undefined;
22
22
  } | {
23
- error?: undefined;
24
23
  text: string;
24
+ error?: undefined;
25
25
  }>>;
26
26
  //# sourceMappingURL=transcribe-voice.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.114.5",
3
+ "version": "0.114.6",
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": {
@@ -381,7 +381,7 @@
381
381
  "yjs": "^13.6.31",
382
382
  "zod": "^4.3.6",
383
383
  "@agent-native/recap-cli": "0.4.5",
384
- "@agent-native/toolkit": "^0.8.0"
384
+ "@agent-native/toolkit": "^0.8.1"
385
385
  },
386
386
  "devDependencies": {
387
387
  "@ai-sdk/anthropic": "^3.0.71",
@@ -120,6 +120,8 @@ export interface ResourceTreeProps {
120
120
  headingHint?: React.ReactNode;
121
121
  /** Scope-specific action shown beside the section heading. */
122
122
  sectionAction?: React.ReactNode;
123
+ /** Scope-specific action shown beneath an empty collection message. */
124
+ emptyStateAction?: React.ReactNode;
123
125
  }
124
126
 
125
127
  interface CreatingState {
@@ -638,6 +640,7 @@ export function ResourceTree({
638
640
  readOnly = false,
639
641
  headingHint,
640
642
  sectionAction,
643
+ emptyStateAction,
641
644
  }: ResourceTreeProps) {
642
645
  const [expanded, setExpanded] = useState<Set<string>>(() => new Set());
643
646
  const [creating, setCreating] = useState<CreatingState | null>(null);
@@ -848,11 +851,14 @@ export function ResourceTree({
848
851
  {isEmpty && !creating && !isLoading && (
849
852
  <div className="flex items-start gap-2 border-y border-border/60 px-2 py-4">
850
853
  <IconFile className="mt-0.5 size-3.5 shrink-0 text-muted-foreground" />
851
- <p className="text-xs text-muted-foreground">
852
- {variant === "collection"
853
- ? "No resources in this collection yet"
854
- : "No files yet"}
855
- </p>
854
+ <div className="flex flex-col items-start gap-2">
855
+ <p className="text-xs text-muted-foreground">
856
+ {variant === "collection"
857
+ ? "No resources in this collection yet"
858
+ : "No files yet"}
859
+ </p>
860
+ {emptyStateAction}
861
+ </div>
856
862
  </div>
857
863
  )}
858
864
  </div>
@@ -1,3 +1,4 @@
1
+ import { Button } from "@agent-native/toolkit/ui/button";
1
2
  import {
2
3
  IconPlus,
3
4
  IconUpload,
@@ -82,6 +83,42 @@ import {
82
83
  const WORKSPACE_DOCS_URL = "https://agent-native.com/docs/workspace";
83
84
  const LOCAL_WORKSPACE_RESOURCE_METADATA_SOURCE = "local-workspace-resource";
84
85
 
86
+ const EMPTY_RESOURCE_ACTION_LABELS: Record<ResourceView, string> = {
87
+ files: "Add file",
88
+ instructions: "Add instructions",
89
+ agents: "Add agent",
90
+ memory: "Add memory",
91
+ skills: "Add skill",
92
+ learnings: "Add learning",
93
+ "remote-agents": "Add remote agent",
94
+ };
95
+
96
+ const EMPTY_RESOURCE_SEEDS: Partial<
97
+ Record<ResourceView, { path: string; content: string; mimeType?: string }>
98
+ > = {
99
+ instructions: {
100
+ path: "AGENTS.md",
101
+ content: "# Agent Instructions\n\n",
102
+ mimeType: "text/markdown",
103
+ },
104
+ memory: {
105
+ path: "memory/MEMORY.md",
106
+ content: "# Memory\n\n",
107
+ mimeType: "text/markdown",
108
+ },
109
+ learnings: {
110
+ path: "LEARNINGS.md",
111
+ content: "# Learnings\n\n",
112
+ mimeType: "text/markdown",
113
+ },
114
+ "remote-agents": {
115
+ path: "remote-agents/new-agent.json",
116
+ content:
117
+ '{\n "id": "new-agent",\n "name": "New agent",\n "description": "",\n "url": "",\n "color": "#6B7280"\n}\n',
118
+ mimeType: "application/json",
119
+ },
120
+ };
121
+
85
122
  export type ResourceView =
86
123
  | "files"
87
124
  | "instructions"
@@ -228,6 +265,9 @@ function CreateMenu({
228
265
  onCreated,
229
266
  showToast,
230
267
  mcpIntegrations,
268
+ triggerVariant = "icon",
269
+ triggerLabel,
270
+ initialView = "menu",
231
271
  }: {
232
272
  scope: ResourceScope;
233
273
  resourceFilter?: ResourceView;
@@ -257,6 +297,9 @@ function CreateMenu({
257
297
  message: string,
258
298
  opts?: { resourceId?: string; durationMs?: number },
259
299
  ) => void;
300
+ triggerVariant?: "icon" | "outline";
301
+ triggerLabel?: string;
302
+ initialView?: CreateMenuView;
260
303
  }) {
261
304
  const t = useT();
262
305
  const [open, setOpen] = useState(false);
@@ -313,7 +356,7 @@ function CreateMenu({
313
356
 
314
357
  useEffect(() => {
315
358
  if (open) {
316
- setView("menu");
359
+ setView(initialView);
317
360
  setValue("");
318
361
  setAgentName("");
319
362
  setAgentDescription("");
@@ -326,7 +369,7 @@ function CreateMenu({
326
369
  setSkillUploadFileName("");
327
370
  setSkillFlyoutOpen(false);
328
371
  }
329
- }, [open]);
372
+ }, [initialView, open]);
330
373
 
331
374
  useEffect(() => {
332
375
  if (view !== "menu" && view !== "agent-form") {
@@ -642,22 +685,36 @@ The result should be a reusable agent profile, not a one-off task response.`,
642
685
  e.target.value = "";
643
686
  }}
644
687
  />
645
- <Tooltip>
646
- <TooltipTrigger asChild>
647
- <PopoverTrigger asChild>
648
- <button
649
- type="button"
650
- className={cn(
651
- "flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-accent/50",
652
- open && "bg-accent/50 text-foreground",
653
- )}
654
- >
655
- <IconPlus className="h-3.5 w-3.5" />
656
- </button>
657
- </PopoverTrigger>
658
- </TooltipTrigger>
659
- <TooltipContent>Create new...</TooltipContent>
660
- </Tooltip>
688
+ {triggerVariant === "outline" ? (
689
+ <PopoverTrigger asChild>
690
+ <Button
691
+ type="button"
692
+ variant="outline"
693
+ size="sm"
694
+ className="h-7 gap-1.5 px-2.5 text-xs"
695
+ >
696
+ <IconPlus className="size-3.5" />
697
+ {triggerLabel ?? "Add resource"}
698
+ </Button>
699
+ </PopoverTrigger>
700
+ ) : (
701
+ <Tooltip>
702
+ <TooltipTrigger asChild>
703
+ <PopoverTrigger asChild>
704
+ <button
705
+ type="button"
706
+ className={cn(
707
+ "flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-accent/50",
708
+ open && "bg-accent/50 text-foreground",
709
+ )}
710
+ >
711
+ <IconPlus className="h-3.5 w-3.5" />
712
+ </button>
713
+ </PopoverTrigger>
714
+ </TooltipTrigger>
715
+ <TooltipContent>Create new...</TooltipContent>
716
+ </Tooltip>
717
+ )}
661
718
  <PopoverContent
662
719
  align="end"
663
720
  sideOffset={6}
@@ -1522,6 +1579,70 @@ export function ResourcesPanel({
1522
1579
  );
1523
1580
  };
1524
1581
 
1582
+ const renderEmptyStateAction = (targetScope: ResourceScope) => {
1583
+ if (targetScope === "shared" && !canEditOrg) return null;
1584
+
1585
+ const label = resourceFilter
1586
+ ? EMPTY_RESOURCE_ACTION_LABELS[resourceFilter]
1587
+ : "Add resource";
1588
+
1589
+ if (
1590
+ !resourceFilter ||
1591
+ resourceFilter === "files" ||
1592
+ resourceFilter === "agents" ||
1593
+ resourceFilter === "skills"
1594
+ ) {
1595
+ return (
1596
+ <CreateMenu
1597
+ scope={targetScope}
1598
+ resourceFilter={resourceFilter}
1599
+ onCreateFile={(name) => handleCreateFromToolbar(targetScope, name)}
1600
+ onCreateResource={(path, content, mimeType, opts) =>
1601
+ handleCreateResourceFromToolbar(
1602
+ targetScope,
1603
+ path,
1604
+ content,
1605
+ mimeType,
1606
+ opts,
1607
+ )
1608
+ }
1609
+ onCreateMcpServer={handleCreateMcpServer}
1610
+ canCreateOrgMcp={canCreateOrgMcp}
1611
+ hasOrg={hasOrgForMcp}
1612
+ showToast={showToast}
1613
+ mcpIntegrations={mcpIntegrations}
1614
+ triggerVariant="outline"
1615
+ triggerLabel={label}
1616
+ initialView={resourceFilter === "files" ? "file" : "menu"}
1617
+ />
1618
+ );
1619
+ }
1620
+
1621
+ const seed = EMPTY_RESOURCE_SEEDS[resourceFilter];
1622
+ if (!seed) return null;
1623
+
1624
+ return (
1625
+ <Button
1626
+ type="button"
1627
+ variant="outline"
1628
+ size="sm"
1629
+ className="h-7 gap-1.5 px-2.5 text-xs"
1630
+ disabled={createResource.isPending}
1631
+ onClick={() =>
1632
+ handleCreateResourceFromToolbar(
1633
+ targetScope,
1634
+ seed.path,
1635
+ seed.content,
1636
+ seed.mimeType,
1637
+ )
1638
+ }
1639
+ >
1640
+ <IconPlus className="size-3.5" />
1641
+ {label}
1642
+ </Button>
1643
+ );
1644
+ };
1645
+
1525
1646
  return (
1526
1647
  <div
1527
1648
  className={cn(
@@ -1881,6 +2002,7 @@ export function ResourcesPanel({
1881
2002
  title="Personal"
1882
2003
  titleTooltip="Files visible only to you"
1883
2004
  sectionAction={renderScopeCreateMenu("personal")}
2005
+ emptyStateAction={renderEmptyStateAction("personal")}
1884
2006
  />
1885
2007
  )}
1886
2008
  {showSharedTree && (
@@ -1915,6 +2037,7 @@ export function ResourcesPanel({
1915
2037
  readOnly={!canEditOrg}
1916
2038
  headingHint={!canEditOrg ? "Read only" : undefined}
1917
2039
  sectionAction={renderScopeCreateMenu("shared")}
2040
+ emptyStateAction={renderEmptyStateAction("shared")}
1918
2041
  />
1919
2042
  )}
1920
2043
  </div>