@agent-native/core 0.114.4 → 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.
- package/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +16 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/client/resources/ResourceTree.tsx +11 -5
- package/corpus/core/src/client/resources/ResourcesPanel.tsx +141 -18
- package/corpus/templates/clips/.agents/skills/meetings/SKILL.md +11 -1
- package/corpus/templates/clips/AGENTS.md +14 -4
- package/corpus/templates/clips/actions/update-meeting.ts +13 -3
- package/corpus/templates/clips/actions/view-screen.ts +1 -0
- package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +96 -4
- package/corpus/templates/clips/app/i18n/en-US.ts +11 -0
- package/corpus/templates/clips/app/lib/public-meeting.ts +85 -0
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +11 -1
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +6 -7
- package/corpus/templates/clips/app/routes/share.meeting.$meetingId.tsx +241 -135
- package/corpus/templates/clips/changelog/2026-07-20-meeting-share-links-can-include-the-full-transcript-with-an-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-20-opening-zoom-meeting-launches-native-app.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-20-recording-retries-the-default-mac-microphone-when-a-saved-in.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-20-shared-clips-now-tell-agents-to-wait-while-uploads-and-trans.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +7 -11
- package/corpus/templates/clips/desktop/src/lib/meeting-join-url.ts +1 -33
- package/corpus/templates/clips/desktop/src/lib/open-meeting-join-url.ts +22 -0
- package/corpus/templates/clips/desktop/src/lib/transcription-engine.ts +65 -2
- package/corpus/templates/clips/desktop/src/overlays/meeting-notification.tsx +2 -3
- package/corpus/templates/clips/server/db/schema.ts +3 -0
- package/corpus/templates/clips/server/lib/public-agent-context.ts +31 -21
- package/corpus/templates/clips/server/plugins/auth.ts +1 -0
- package/corpus/templates/clips/server/plugins/db.ts +6 -0
- package/corpus/templates/clips/server/routes/api/agent-transcript.json.get.ts +13 -3
- package/corpus/templates/clips/server/routes/api/public-meeting.get.ts +152 -0
- package/corpus/templates/clips/shared/agent-context.ts +60 -0
- package/corpus/templates/clips/shared/meeting-join-url.ts +31 -0
- package/corpus/templates/content/.agents/skills/document-editing/SKILL.md +9 -1
- package/corpus/templates/content/AGENTS.md +4 -1
- package/corpus/templates/content/actions/_content-spaces.ts +6 -1
- package/corpus/templates/content/actions/_database-row-batch.ts +15 -2
- package/corpus/templates/content/actions/_database-utils.ts +83 -15
- package/corpus/templates/content/actions/add-database-item.ts +3 -0
- package/corpus/templates/content/actions/connect-local-folder-source.ts +2 -1
- package/corpus/templates/content/actions/delete-content-database.ts +12 -9
- package/corpus/templates/content/actions/delete-database-items.ts +3 -2
- package/corpus/templates/content/actions/delete-document.ts +233 -6
- package/corpus/templates/content/actions/duplicate-database-item.ts +1 -0
- package/corpus/templates/content/actions/get-document.ts +4 -1
- package/corpus/templates/content/actions/list-content-databases.ts +1 -0
- package/corpus/templates/content/actions/list-documents.ts +1 -0
- package/corpus/templates/content/actions/list-trashed-content-databases.ts +8 -2
- package/corpus/templates/content/actions/list-trashed-documents.ts +50 -0
- package/corpus/templates/content/actions/permanently-delete-document.ts +28 -0
- package/corpus/templates/content/actions/pull-document.ts +15 -2
- package/corpus/templates/content/actions/restore-content-database.ts +48 -11
- package/corpus/templates/content/actions/restore-document.ts +28 -0
- package/corpus/templates/content/actions/search-documents.ts +2 -1
- package/corpus/templates/content/actions/view-screen.ts +2 -1
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +149 -55
- package/corpus/templates/content/app/components/editor/database/GalleryView.tsx +7 -2
- package/corpus/templates/content/app/components/editor/database/ListView.tsx +7 -2
- package/corpus/templates/content/app/components/editor/database/TimelineView.tsx +3 -0
- package/corpus/templates/content/app/components/editor/database/sidebar.tsx +26 -5
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +243 -163
- package/corpus/templates/content/app/components/sidebar/WorkspaceSourceMenu.tsx +154 -0
- package/corpus/templates/content/app/components/sidebar/select-content-space.ts +11 -0
- package/corpus/templates/content/app/hooks/use-content-database.ts +6 -0
- package/corpus/templates/content/app/hooks/use-documents.ts +57 -0
- package/corpus/templates/content/app/i18n-data.ts +83 -2
- package/corpus/templates/content/app/routes/_app.local-files.tsx +8 -1
- package/corpus/templates/content/changelog/2026-07-19-pages-now-move-to-a-reversible-trash-and-the-organization-pi.md +6 -0
- package/corpus/templates/content/changelog/2026-07-20-trash-actions-now-preserve-independent-archived-pages-enforc.md +6 -0
- package/corpus/templates/content/changelog/2026-07-20-workspace-toggles-now-stay-independently-open-or-closed-and-.md +6 -0
- package/corpus/templates/content/changelog/2026-07-20-workspaces-can-be-added-from-a-blank-workspace-or-a-connecte.md +6 -0
- package/corpus/templates/content/parity/matrix.md +1 -1
- package/corpus/templates/content/parity/matrix.ts +3 -0
- package/corpus/templates/content/server/db/schema.ts +2 -0
- package/corpus/templates/content/server/lib/public-documents.ts +8 -2
- package/corpus/templates/content/server/plugins/db.ts +52 -0
- package/corpus/templates/content/server/routes/api/document-agent-context.json.get.ts +2 -2
- package/corpus/templates/content/shared/api.ts +10 -0
- package/corpus/toolkit/CHANGELOG.md +6 -0
- package/corpus/toolkit/package.json +1 -1
- package/corpus/toolkit/src/ui/progress.tsx +3 -2
- package/dist/client/resources/ResourceTree.d.ts +3 -1
- package/dist/client/resources/ResourceTree.d.ts.map +1 -1
- package/dist/client/resources/ResourceTree.js +4 -4
- 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 +55 -6
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +5 -5
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/package.json +3 -3
- package/src/client/resources/ResourceTree.tsx +11 -5
- package/src/client/resources/ResourcesPanel.tsx +141 -18
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from "@agent-native/toolkit/ui/button";
|
|
2
3
|
import { IconPlus, IconUpload, IconArrowLeft, IconPencil, IconBulb, IconBolt, IconTrash, IconEye, IconCode, IconClock, IconHierarchy2, IconExternalLink, IconHelp, IconPlugConnected, } from "@tabler/icons-react";
|
|
3
4
|
import React, { useState, useRef, useCallback, useEffect, useMemo, } from "react";
|
|
4
5
|
import { CLAUDE_SONNET_MODEL_ID, CLAUDE_SONNET_MODEL_LABEL, } from "../../agent/model-config.js";
|
|
@@ -23,6 +24,37 @@ import { useMcpServers, useCreateMcpServer, useDeleteMcpServer, parseMcpVirtualI
|
|
|
23
24
|
import { useResourceTree, useResource, useCreateResource, useUpdateResource, useDeleteResource, withMcpServersFolder, withAgentScratchFolder, } from "./use-resources.js";
|
|
24
25
|
const WORKSPACE_DOCS_URL = "https://agent-native.com/docs/workspace";
|
|
25
26
|
const LOCAL_WORKSPACE_RESOURCE_METADATA_SOURCE = "local-workspace-resource";
|
|
27
|
+
const EMPTY_RESOURCE_ACTION_LABELS = {
|
|
28
|
+
files: "Add file",
|
|
29
|
+
instructions: "Add instructions",
|
|
30
|
+
agents: "Add agent",
|
|
31
|
+
memory: "Add memory",
|
|
32
|
+
skills: "Add skill",
|
|
33
|
+
learnings: "Add learning",
|
|
34
|
+
"remote-agents": "Add remote agent",
|
|
35
|
+
};
|
|
36
|
+
const EMPTY_RESOURCE_SEEDS = {
|
|
37
|
+
instructions: {
|
|
38
|
+
path: "AGENTS.md",
|
|
39
|
+
content: "# Agent Instructions\n\n",
|
|
40
|
+
mimeType: "text/markdown",
|
|
41
|
+
},
|
|
42
|
+
memory: {
|
|
43
|
+
path: "memory/MEMORY.md",
|
|
44
|
+
content: "# Memory\n\n",
|
|
45
|
+
mimeType: "text/markdown",
|
|
46
|
+
},
|
|
47
|
+
learnings: {
|
|
48
|
+
path: "LEARNINGS.md",
|
|
49
|
+
content: "# Learnings\n\n",
|
|
50
|
+
mimeType: "text/markdown",
|
|
51
|
+
},
|
|
52
|
+
"remote-agents": {
|
|
53
|
+
path: "remote-agents/new-agent.json",
|
|
54
|
+
content: '{\n "id": "new-agent",\n "name": "New agent",\n "description": "",\n "url": "",\n "color": "#6B7280"\n}\n',
|
|
55
|
+
mimeType: "application/json",
|
|
56
|
+
},
|
|
57
|
+
};
|
|
26
58
|
const SPECIAL_RESOURCE_ROOTS = new Set([
|
|
27
59
|
"agents",
|
|
28
60
|
"agent-scratch",
|
|
@@ -105,7 +137,7 @@ function buildAgentResourceContent({ name, description, model, tools, body, }) {
|
|
|
105
137
|
];
|
|
106
138
|
return serializeFrontmatter(fields) + body.trim() + "\n";
|
|
107
139
|
}
|
|
108
|
-
function CreateMenu({ scope, resourceFilter, onCreateFile, onCreateResource, onCreateMcpServer, canCreateOrgMcp, hasOrg, onCreated, showToast, mcpIntegrations, }) {
|
|
140
|
+
function CreateMenu({ scope, resourceFilter, onCreateFile, onCreateResource, onCreateMcpServer, canCreateOrgMcp, hasOrg, onCreated, showToast, mcpIntegrations, triggerVariant = "icon", triggerLabel, initialView = "menu", }) {
|
|
109
141
|
const t = useT();
|
|
110
142
|
const [open, setOpen] = useState(false);
|
|
111
143
|
const [mcpDialogOpen, setMcpDialogOpen] = useState(false);
|
|
@@ -149,7 +181,7 @@ function CreateMenu({ scope, resourceFilter, onCreateFile, onCreateResource, onC
|
|
|
149
181
|
const [skillUploadFileName, setSkillUploadFileName] = useState("");
|
|
150
182
|
useEffect(() => {
|
|
151
183
|
if (open) {
|
|
152
|
-
setView(
|
|
184
|
+
setView(initialView);
|
|
153
185
|
setValue("");
|
|
154
186
|
setAgentName("");
|
|
155
187
|
setAgentDescription("");
|
|
@@ -160,7 +192,7 @@ function CreateMenu({ scope, resourceFilter, onCreateFile, onCreateResource, onC
|
|
|
160
192
|
setSkillUploadFileName("");
|
|
161
193
|
setSkillFlyoutOpen(false);
|
|
162
194
|
}
|
|
163
|
-
}, [open]);
|
|
195
|
+
}, [initialView, open]);
|
|
164
196
|
useEffect(() => {
|
|
165
197
|
if (view !== "menu" && view !== "agent-form") {
|
|
166
198
|
setValue("");
|
|
@@ -439,7 +471,7 @@ The result should be a reusable agent profile, not a one-off task response.`,
|
|
|
439
471
|
return (_jsxs(_Fragment, { children: [_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx("input", { ref: skillFileInputRef, type: "file", accept: ".md,text/markdown", multiple: true, className: "hidden", onChange: (e) => {
|
|
440
472
|
handleUploadSkillFiles(e.target.files);
|
|
441
473
|
e.target.value = "";
|
|
442
|
-
} }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(PopoverTrigger, { asChild: true, children: _jsx("button", { type: "button", className: cn("flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-accent/50", open && "bg-accent/50 text-foreground"), children: _jsx(IconPlus, { className: "h-3.5 w-3.5" }) }) }) }), _jsx(TooltipContent, { children: "Create new..." })] }), _jsxs(PopoverContent, { align: "end", sideOffset: 6, collisionPadding: 8, className: cn("z-[260] p-0 text-[13px] leading-normal", view === "menu" || view === "file"
|
|
474
|
+
} }), triggerVariant === "outline" ? (_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { type: "button", variant: "outline", size: "sm", className: "h-7 gap-1.5 px-2.5 text-xs", children: [_jsx(IconPlus, { className: "size-3.5" }), triggerLabel ?? "Add resource"] }) })) : (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(PopoverTrigger, { asChild: true, children: _jsx("button", { type: "button", className: cn("flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-accent/50", open && "bg-accent/50 text-foreground"), children: _jsx(IconPlus, { className: "h-3.5 w-3.5" }) }) }) }), _jsx(TooltipContent, { children: "Create new..." })] })), _jsxs(PopoverContent, { align: "end", sideOffset: 6, collisionPadding: 8, className: cn("z-[260] p-0 text-[13px] leading-normal", view === "menu" || view === "file"
|
|
443
475
|
? "w-[260px]"
|
|
444
476
|
: "max-h-[70vh] w-[calc(100vw-24px)] max-w-[380px] overflow-y-auto"), children: [view === "menu" && (_jsx("div", { className: "py-1", children: visibleMenuItems.map((item) => {
|
|
445
477
|
const isSkill = item.label === "Create Skill";
|
|
@@ -770,6 +802,23 @@ export function ResourcesPanel({ showMcpServers = true, scope: requestedScope, s
|
|
|
770
802
|
return null;
|
|
771
803
|
return (_jsx(CreateMenu, { scope: targetScope, resourceFilter: resourceFilter, onCreateFile: (name) => handleCreateFromToolbar(targetScope, name), onCreateResource: (path, content, mimeType, opts) => handleCreateResourceFromToolbar(targetScope, path, content, mimeType, opts), onCreateMcpServer: handleCreateMcpServer, canCreateOrgMcp: canCreateOrgMcp, hasOrg: hasOrgForMcp, showToast: showToast, mcpIntegrations: mcpIntegrations }));
|
|
772
804
|
};
|
|
805
|
+
const renderEmptyStateAction = (targetScope) => {
|
|
806
|
+
if (targetScope === "shared" && !canEditOrg)
|
|
807
|
+
return null;
|
|
808
|
+
const label = resourceFilter
|
|
809
|
+
? EMPTY_RESOURCE_ACTION_LABELS[resourceFilter]
|
|
810
|
+
: "Add resource";
|
|
811
|
+
if (!resourceFilter ||
|
|
812
|
+
resourceFilter === "files" ||
|
|
813
|
+
resourceFilter === "agents" ||
|
|
814
|
+
resourceFilter === "skills") {
|
|
815
|
+
return (_jsx(CreateMenu, { scope: targetScope, resourceFilter: resourceFilter, onCreateFile: (name) => handleCreateFromToolbar(targetScope, name), onCreateResource: (path, content, mimeType, opts) => handleCreateResourceFromToolbar(targetScope, path, content, mimeType, opts), onCreateMcpServer: handleCreateMcpServer, canCreateOrgMcp: canCreateOrgMcp, hasOrg: hasOrgForMcp, showToast: showToast, mcpIntegrations: mcpIntegrations, triggerVariant: "outline", triggerLabel: label, initialView: resourceFilter === "files" ? "file" : "menu" }));
|
|
816
|
+
}
|
|
817
|
+
const seed = EMPTY_RESOURCE_SEEDS[resourceFilter];
|
|
818
|
+
if (!seed)
|
|
819
|
+
return null;
|
|
820
|
+
return (_jsxs(Button, { type: "button", variant: "outline", size: "sm", className: "h-7 gap-1.5 px-2.5 text-xs", disabled: createResource.isPending, onClick: () => handleCreateResourceFromToolbar(targetScope, seed.path, seed.content, seed.mimeType), children: [_jsx(IconPlus, { className: "size-3.5" }), label] }));
|
|
821
|
+
};
|
|
773
822
|
return (_jsxs("div", { className: cn("relative flex h-full flex-col min-h-0", dragOver && "ring-2 ring-inset ring-accent"), onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, children: [isEditing ? (_jsxs("div", { className: "flex shrink-0 items-center justify-between border-b border-border px-2 py-1.5", children: [_jsxs("div", { className: "flex items-center gap-1.5 min-w-0", children: [_jsx(TooltipProvider, { delayDuration: 200, children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { onClick: handleBack, "aria-label": "Back to workspace", className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-accent/50", children: _jsx(IconArrowLeft, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Back to workspace" })] }) }), selectedMcpServer ? (_jsx(PathBreadcrumb, { path: `mcp-servers/${selectedMcpServer.name}.json` })) : selectedBuiltinCapability ? (_jsx(PathBreadcrumb, { path: `mcp-servers/${selectedBuiltinCapability.capability.name}.json` })) : resourceQuery.data ? (_jsx(PathBreadcrumb, { path: resourceQuery.data.path })) : null] }), _jsxs("div", { className: "flex items-center gap-1 shrink-0", children: [!selectedMcpServer &&
|
|
774
823
|
resourceQuery.data &&
|
|
775
824
|
selectedResourceReadOnly && (_jsx("span", { "aria-live": "polite", className: "mr-1 w-16 text-right text-[11px] text-muted-foreground/60", children: "Read only" })), !selectedMcpServer &&
|
|
@@ -816,13 +865,13 @@ export function ResourcesPanel({ showMcpServers = true, scope: requestedScope, s
|
|
|
816
865
|
? deleteResource.variables
|
|
817
866
|
: deleteMcpServer.isPending
|
|
818
867
|
? `mcp:${deleteMcpServer.variables.scope}:${deleteMcpServer.variables.id}`
|
|
819
|
-
: null, selectedId: selectedResourceId, onSelect: handleSelect, onCreateFile: (parentPath, name) => handleCreateFile(parentPath, name, "personal"), onCreateFolder: (parentPath, name) => handleCreateFolder(parentPath, name, "personal"), onDelete: handleDelete, onRename: handleRename, onDrop: (files) => handleUploadFiles(files, "personal"), title: "Personal", titleTooltip: "Files visible only to you", sectionAction: renderScopeCreateMenu("personal") })), showSharedTree && (_jsx(ResourceTree, { tree: displayedSharedTree, variant: resourceTreeVariant, isLoading: sharedTreeQuery.isLoading, deletingId: deleteResource.isPending
|
|
868
|
+
: null, selectedId: selectedResourceId, onSelect: handleSelect, onCreateFile: (parentPath, name) => handleCreateFile(parentPath, name, "personal"), onCreateFolder: (parentPath, name) => handleCreateFolder(parentPath, name, "personal"), onDelete: handleDelete, onRename: handleRename, onDrop: (files) => handleUploadFiles(files, "personal"), title: "Personal", titleTooltip: "Files visible only to you", sectionAction: renderScopeCreateMenu("personal"), emptyStateAction: renderEmptyStateAction("personal") })), showSharedTree && (_jsx(ResourceTree, { tree: displayedSharedTree, variant: resourceTreeVariant, isLoading: sharedTreeQuery.isLoading, deletingId: deleteResource.isPending
|
|
820
869
|
? deleteResource.variables
|
|
821
870
|
: deleteMcpServer.isPending
|
|
822
871
|
? `mcp:${deleteMcpServer.variables.scope}:${deleteMcpServer.variables.id}`
|
|
823
872
|
: null, selectedId: selectedResourceId, onSelect: handleSelect, onCreateFile: (parentPath, name) => handleCreateFile(parentPath, name, "shared"), onCreateFolder: (parentPath, name) => handleCreateFolder(parentPath, name, "shared"), onDelete: handleDelete, onRename: handleRename, onDrop: (files) => handleUploadFiles(files, "shared"), title: "Organization", titleTooltip: canEditOrg
|
|
824
873
|
? "Files visible to everyone in your organization"
|
|
825
|
-
: "Files visible to everyone in your organization. Read-only — only admins can edit.", readOnly: !canEditOrg, headingHint: !canEditOrg ? "Read only" : undefined, sectionAction: renderScopeCreateMenu("shared") }))] })) }), toast && (_jsx("div", { className: "pointer-events-none absolute bottom-3 left-1/2 z-[300] -translate-x-1/2", children: _jsxs("div", { role: "status", className: cn("pointer-events-auto flex max-w-[320px] items-center gap-3 rounded-md border px-3 py-2 text-[12px] shadow-md", toast.kind === "ok"
|
|
874
|
+
: "Files visible to everyone in your organization. Read-only — only admins can edit.", readOnly: !canEditOrg, headingHint: !canEditOrg ? "Read only" : undefined, sectionAction: renderScopeCreateMenu("shared"), emptyStateAction: renderEmptyStateAction("shared") }))] })) }), toast && (_jsx("div", { className: "pointer-events-none absolute bottom-3 left-1/2 z-[300] -translate-x-1/2", children: _jsxs("div", { role: "status", className: cn("pointer-events-auto flex max-w-[320px] items-center gap-3 rounded-md border px-3 py-2 text-[12px] shadow-md", toast.kind === "ok"
|
|
826
875
|
? "border-emerald-500/40 bg-emerald-500/10 text-emerald-600 dark:text-emerald-300"
|
|
827
876
|
: "border-red-500/40 bg-red-500/10 text-red-600 dark:text-red-300"), children: [_jsx("span", { className: "min-w-0 flex-1 truncate", children: toast.message }), toast.kind === "ok" && toast.resourceId && (_jsx("button", { type: "button", onClick: () => {
|
|
828
877
|
setSelectedResourceId(toast.resourceId);
|