@agent-native/dispatch 0.29.5 → 0.30.0

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.
@@ -6,6 +6,19 @@ declare const _default: import("@agent-native/core").ActionDefinition<{
6
6
  content: string;
7
7
  scope: "all" | "selected";
8
8
  }, {
9
+ id: string;
10
+ ownerEmail: string;
11
+ orgId: string | null;
12
+ kind: string;
13
+ name: string;
14
+ description: string | null;
15
+ path: string;
16
+ content: string;
17
+ scope: string;
18
+ createdBy: string;
19
+ createdAt: number;
20
+ updatedAt: number;
21
+ } | {
9
22
  id: string;
10
23
  ownerEmail: string;
11
24
  orgId: string | null;
@@ -22,19 +35,6 @@ declare const _default: import("@agent-native/core").ActionDefinition<{
22
35
  reviewedAt: number | null;
23
36
  createdAt: number;
24
37
  updatedAt: number;
25
- } | {
26
- id: string;
27
- ownerEmail: string;
28
- orgId: string | null;
29
- kind: string;
30
- name: string;
31
- description: string | null;
32
- path: string;
33
- content: string;
34
- scope: string;
35
- createdBy: string;
36
- createdAt: number;
37
- updatedAt: number;
38
38
  }>;
39
39
  export default _default;
40
40
  //# sourceMappingURL=create-workspace-resource.d.ts.map
@@ -1,19 +1,6 @@
1
1
  declare const _default: import("@agent-native/core").ActionDefinition<{
2
2
  id: string;
3
3
  }, {
4
- id: string;
5
- ownerEmail: string;
6
- orgId: string | null;
7
- kind: string;
8
- name: string;
9
- description: string | null;
10
- path: string;
11
- content: string;
12
- scope: string;
13
- createdBy: string;
14
- createdAt: number;
15
- updatedAt: number;
16
- } | {
17
4
  id: string;
18
5
  ownerEmail: string;
19
6
  orgId: string | null;
@@ -30,6 +17,19 @@ declare const _default: import("@agent-native/core").ActionDefinition<{
30
17
  reviewedAt: number | null;
31
18
  createdAt: number;
32
19
  updatedAt: number;
20
+ } | {
21
+ id: string;
22
+ ownerEmail: string;
23
+ orgId: string | null;
24
+ kind: string;
25
+ name: string;
26
+ description: string | null;
27
+ path: string;
28
+ content: string;
29
+ scope: string;
30
+ createdBy: string;
31
+ createdAt: number;
32
+ updatedAt: number;
33
33
  }>;
34
34
  export default _default;
35
35
  //# sourceMappingURL=delete-workspace-resource.d.ts.map
@@ -47,10 +47,10 @@ declare const _default: import("node_modules/@agent-native/core/dist").ActionDef
47
47
  notes?: string | undefined;
48
48
  scope?: "org" | "user" | undefined;
49
49
  }, {
50
+ message?: undefined;
50
51
  id?: undefined;
51
52
  provider?: undefined;
52
53
  deleted?: undefined;
53
- message?: undefined;
54
54
  providers: {
55
55
  id: string;
56
56
  label: string;
@@ -65,40 +65,40 @@ declare const _default: import("node_modules/@agent-native/core/dist").ActionDef
65
65
  registered?: undefined;
66
66
  label?: undefined;
67
67
  } | {
68
+ message?: undefined;
69
+ count?: undefined;
68
70
  id?: undefined;
69
71
  deleted?: undefined;
70
- message?: undefined;
71
72
  providers?: undefined;
72
- count?: undefined;
73
73
  found: boolean;
74
74
  provider: import("node_modules/@agent-native/core/dist/provider-api").CustomProviderConfig;
75
75
  registered?: undefined;
76
76
  label?: undefined;
77
77
  } | {
78
+ message?: undefined;
79
+ count?: undefined;
78
80
  provider?: undefined;
79
81
  deleted?: undefined;
80
- message?: undefined;
81
82
  providers?: undefined;
82
- count?: undefined;
83
83
  found: boolean;
84
84
  id: string;
85
85
  registered?: undefined;
86
86
  label?: undefined;
87
87
  } | {
88
- provider?: undefined;
89
88
  message?: undefined;
90
- providers?: undefined;
91
89
  count?: undefined;
90
+ provider?: undefined;
91
+ providers?: undefined;
92
92
  found?: undefined;
93
93
  deleted: boolean;
94
94
  id: string;
95
95
  registered?: undefined;
96
96
  label?: undefined;
97
97
  } | {
98
+ count?: undefined;
98
99
  provider?: undefined;
99
100
  deleted?: undefined;
100
101
  providers?: undefined;
101
- count?: undefined;
102
102
  found?: undefined;
103
103
  registered: boolean;
104
104
  id: string;
@@ -5,19 +5,6 @@ declare const _default: import("@agent-native/core").ActionDefinition<{
5
5
  content?: string | undefined;
6
6
  scope?: "all" | "selected" | undefined;
7
7
  }, {
8
- id: string;
9
- ownerEmail: string;
10
- orgId: string | null;
11
- kind: string;
12
- name: string;
13
- description: string | null;
14
- path: string;
15
- content: string;
16
- scope: string;
17
- createdBy: string;
18
- createdAt: number;
19
- updatedAt: number;
20
- } | {
21
8
  id: string;
22
9
  ownerEmail: string;
23
10
  orgId: string | null;
@@ -34,6 +21,19 @@ declare const _default: import("@agent-native/core").ActionDefinition<{
34
21
  reviewedAt: number | null;
35
22
  createdAt: number;
36
23
  updatedAt: number;
24
+ } | {
25
+ id: string;
26
+ ownerEmail: string;
27
+ orgId: string | null;
28
+ kind: string;
29
+ name: string;
30
+ description: string | null;
31
+ path: string;
32
+ content: string;
33
+ scope: string;
34
+ createdBy: string;
35
+ createdAt: number;
36
+ updatedAt: number;
37
37
  }>;
38
38
  export default _default;
39
39
  //# sourceMappingURL=update-workspace-resource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-app-card.d.ts","sourceRoot":"","sources":["../../src/components/workspace-app-card.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAOL,KAAK,mBAAmB,EACzB,MAAM,uBAAuB,CAAC;AAiC/B,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,SAAS,EACT,QAAgB,EAChB,cAAc,GACf,EAAE;IACD,GAAG,EAAE,mBAAmB,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,mDAuNA"}
1
+ {"version":3,"file":"workspace-app-card.d.ts","sourceRoot":"","sources":["../../src/components/workspace-app-card.tsx"],"names":[],"mappings":"AA4BA,OAAO,EAOL,KAAK,mBAAmB,EACzB,MAAM,uBAAuB,CAAC;AAiC/B,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,SAAS,EACT,QAAgB,EAChB,cAAc,GACf,EAAE;IACD,GAAG,EAAE,mBAAmB,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,mDAkOA"}
@@ -2,6 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
2
2
  import { APP_ACTION_MENU_CONTENT_CLASS } from "@agent-native/core/client/chat-first";
3
3
  import { useActionMutation, useActionQuery, } from "@agent-native/core/client/hooks";
4
4
  import { useT } from "@agent-native/core/client/i18n";
5
+ import { ShareButton } from "@agent-native/core/client/sharing";
5
6
  import { IconChevronDown, IconChevronRight, IconClockHour4, IconEdit, IconEye, IconEyeOff, IconFileText, IconKey, IconPin, IconSettings, IconTrash, IconUser, IconUsersGroup, IconWorld, } from "@tabler/icons-react";
6
7
  import { useEffect, useState } from "react";
7
8
  import { useNavigate } from "react-router";
@@ -94,7 +95,7 @@ export function WorkspaceAppCard({ app, className, isPinned = false, onTogglePin
94
95
  name: app.name,
95
96
  defaultValue: isPinned ? "Unpin this app" : "Pin this app",
96
97
  });
97
- return (_jsxs(_Fragment, { children: [_jsxs(AppListRow, { className: cn(!href && "opacity-60", isArchived && "opacity-70", className), children: [_jsx(AppIcon, { id: app.id, name: app.name, size: "sm" }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("h3", { className: "truncate text-sm font-semibold text-foreground", children: app.name }), app.description || isPending ? (_jsx("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: app.description || pendingLabel })) : null, _jsxs("div", { className: "mt-1.5 flex min-w-0 flex-wrap items-center gap-2 text-[11px] text-muted-foreground", children: [isPending ? (_jsxs("span", { className: "inline-flex min-w-0 items-center gap-1 rounded-full bg-muted px-2 py-0.5", children: [_jsx(IconClockHour4, { size: 12 }), _jsx("span", { className: "truncate", children: pendingLabel })] })) : null, isArchived ? (_jsxs("span", { className: "inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5", children: [_jsx(IconEyeOff, { size: 12 }), "Hidden"] })) : null, audience === "public" ? (_jsxs("span", { className: "inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5", children: [_jsx(IconWorld, { size: 12 }), "Public"] })) : null] })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [_jsx(WorkspaceAppOpenActions, { app: app, href: directHref ?? href, openDirectly: Boolean(directHref), isPinned: isPinned, pinLabel: pinLabel, pendingOpenLabel: pendingOpenLabel, onTogglePinned: onTogglePinned }), _jsx(WorkspaceAppSettings, { app: app, isArchived: isArchived, isPending: isPending, onEdit: () => setEditOpen(true), onKeys: () => setKeysOpen(true), onResources: () => setResourcesOpen(true), onArchive: handleArchive, onUnarchive: handleUnarchive, onRemovePending: handleRemovePending, labels: {
98
+ return (_jsxs(_Fragment, { children: [_jsxs(AppListRow, { className: cn(!href && "opacity-60", isArchived && "opacity-70", className), children: [_jsx(AppIcon, { id: app.id, name: app.name, size: "sm" }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("h3", { className: "truncate text-sm font-semibold text-foreground", children: app.name }), app.description || isPending ? (_jsx("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: app.description || pendingLabel })) : null, _jsxs("div", { className: "mt-1.5 flex min-w-0 flex-wrap items-center gap-2 text-[11px] text-muted-foreground", children: [isPending ? (_jsxs("span", { className: "inline-flex min-w-0 items-center gap-1 rounded-full bg-muted px-2 py-0.5", children: [_jsx(IconClockHour4, { size: 12 }), _jsx("span", { className: "truncate", children: pendingLabel })] })) : null, isArchived ? (_jsxs("span", { className: "inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5", children: [_jsx(IconEyeOff, { size: 12 }), "Hidden"] })) : null, audience === "public" ? (_jsxs("span", { className: "inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5", children: [_jsx(IconWorld, { size: 12 }), "Public"] })) : null] })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [_jsx(WorkspaceAppOpenActions, { app: app, href: directHref ?? href, openDirectly: Boolean(directHref), isPinned: isPinned, pinLabel: pinLabel, pendingOpenLabel: pendingOpenLabel, onTogglePinned: onTogglePinned }), !isPending ? (_jsx("div", { className: "pointer-events-auto", children: _jsx(ShareButton, { resourceType: "workspace-app", resourceId: app.id, resourceTitle: app.name, trigger: "icon", triggerClassName: APP_CARD_ACTION_CLASS }) })) : null, _jsx(WorkspaceAppSettings, { app: app, isArchived: isArchived, isPending: isPending, onEdit: () => setEditOpen(true), onKeys: () => setKeysOpen(true), onResources: () => setResourcesOpen(true), onArchive: handleArchive, onUnarchive: handleUnarchive, onRemovePending: handleRemovePending, labels: {
98
99
  createdBy: t("agents.dashboardMetadataCreatedBy"),
99
100
  owner: t("dispatch.pages.appMetadataOwner"),
100
101
  teams: t("dispatch.pages.appMetadataTeams"),
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-app-card.js","sourceRoot":"","sources":["../../src/components/workspace-app-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC;AACrF,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,OAAO,EACP,UAAU,EACV,YAAY,EACZ,OAAO,EACP,OAAO,EACP,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,cAAc,EACd,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,gBA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ionMutation,\n useActionQuery,\n} from \"@agent-native/core/client/hooks\";\nimport { useT } from \"@agent-native/core/client/i18n\";\nimport {\n IconChevronDown,\n IconChevronRight,\n IconClockHour4,\n IconEdit,\n IconEye,\n IconEyeOff,\n IconFileText,\n IconKey,\n IconPin,\n IconSettings,\n IconTrash,\n IconUser,\n IconUsersGroup,\n IconWorld,\n} from \"@tabler/icons-react\";\nimport { useEffect, useState, type FormEvent } from \"react\";\nimport { useNavigate } from \"react-router\";\nimport { toast } from \"sonner\";\n\nimport { cn } from \"../lib/utils\";\nimport {\n isPathMountedWorkspaceApp,\n isWorkspaceSsoApp,\n navigateToWorkspaceApp,\n workspaceAppDirectHref,\n workspaceAppHref,\n workspaceAppRoute,\n type WorkspaceAppSummary,\n} from \"../lib/workspace-apps\";\nimport { ActionQueryError } from \"./action-query-error\";\nimport { AppIcon } from \"./app-icon\";\nimport { AppKeysPanel } from \"./app-keys-popover\";\nimport { AppListRow } from \"./app-list-row\";\nimport { AppOpenActions } from \"./app-open-actions\";\nimport { Badge } from \"./ui/badge\";\nimport { Button } from \"./ui/button\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"./ui/dialog\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"./ui/dropdown-menu\";\nimport { Input } from \"./ui/input\";\nimport { Label } from \"./ui/label\";\nimport { Textarea } from \"./ui/textarea\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"./ui/tooltip\";\nimport { AppResourceEffectiveStack } from \"./workspace-resource-effective-stack\";\n\nconst APP_CARD_ACTION_CLASS =\n \"size-7 rounded-md p-0 text-muted-foreground transition-[background-color,color] hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-accent data-[state=open]:text-foreground\";\n\nexport function WorkspaceAppCard({\n app,\n className,\n isPinned = false,\n onTogglePinned,\n}: {\n app: WorkspaceAppSummary;\n className?: string;\n isPinned?: boolean;\n onTogglePinned?: () => void;\n}) {\n const t = useT();\n const href = workspaceAppHref(app);\n const directHref =\n app.status !== \"pending\" &&\n !isWorkspaceSsoApp(app) &&\n isPathMountedWorkspaceApp(app)\n ? workspaceAppDirectHref(app, \"/\")\n : null;\n const isPending = app.status === \"pending\";\n const pendingLabel = app.statusLabel || \"Builder branch\";\n const pendingOpenLabel = t(\"dispatch.pages.openBuilderBranch\", {\n defaultValue: \"Open in Builder\",\n });\n const isArchived = !!app.archived;\n const audience = app.audience ?? \"internal\";\n const [editOpen, setEditOpen] = useState(false);\n const [keysOpen, setKeysOpen] = useState(false);\n const [resourcesOpen, setResourcesOpen] = useState(false);\n const [draftName, setDraftName] = useState(app.name);\n const [draftDescription, setDraftDescription] = useState(\n app.description || \"\",\n );\n\n useEffect(() => {\n if (editOpen) return;\n setDraftName(app.name);\n setDraftDescription(app.description || \"\");\n }, [app.description, app.name, editOpen]);\n\n const archive = useActionMutation(\"archive-workspace-app\", {\n onError: (err) =>\n toast.error(`Could not hide ${app.name}: ${stringifyError(err)}`),\n });\n const unarchive = useActionMutation(\"unarchive-workspace-app\", {\n onError: (err) =>\n toast.error(`Could not restore ${app.name}: ${stringifyError(err)}`),\n });\n const removePending = useActionMutation(\"remove-pending-workspace-app\", {\n onError: (err) =>\n toast.error(`Could not remove ${app.name}: ${stringifyError(err)}`),\n });\n const updateMetadata = useActionMutation(\"update-workspace-app-metadata\", {\n onSuccess: () => {\n toast.success(`Updated ${draftName.trim() || app.name}`);\n setEditOpen(false);\n },\n onError: (err) =>\n toast.error(`Could not update ${app.name}: ${stringifyError(err)}`),\n });\n\n const handleArchive = () => {\n archive.mutate({ appId: app.id });\n toast.success(`Hid ${app.name} from the Apps list`);\n };\n const handleUnarchive = () => {\n unarchive.mutate({ appId: app.id });\n toast.success(`Restored ${app.name} to the Apps list`);\n };\n const handleRemovePending = () => {\n removePending.mutate({ appId: app.id });\n toast.success(`Removed pending ${app.name}`);\n };\n const handleMetadataSubmit = (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n const name = draftName.trim();\n if (!name) {\n toast.error(\"App name is required.\");\n return;\n }\n updateMetadata.mutate({\n appId: app.id,\n name,\n description: draftDescription.trim(),\n });\n };\n const pinLabel = t(\n isPinned ? \"dispatch.pages.unpinApp\" : \"dispatch.pages.pinApp\",\n {\n name: app.name,\n defaultValue: isPinned ? \"Unpin this app\" : \"Pin this app\",\n },\n );\n\n return (\n <>\n <AppListRow\n className={cn(\n !href && \"opacity-60\",\n isArchived && \"opacity-70\",\n className,\n )}\n >\n <AppIcon id={app.id} name={app.name} size=\"sm\" />\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"truncate text-sm font-semibold text-foreground\">\n {app.name}\n </h3>\n {app.description || isPending ? (\n <p className=\"mt-0.5 truncate text-xs text-muted-foreground\">\n {app.description || pendingLabel}\n </p>\n ) : null}\n <div className=\"mt-1.5 flex min-w-0 flex-wrap items-center gap-2 text-[11px] text-muted-foreground\">\n {isPending ? (\n <span className=\"inline-flex min-w-0 items-center gap-1 rounded-full bg-muted px-2 py-0.5\">\n <IconClockHour4 size={12} />\n <span className=\"truncate\">{pendingLabel}</span>\n </span>\n ) : null}\n {isArchived ? (\n <span className=\"inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5\">\n <IconEyeOff size={12} />\n Hidden\n </span>\n ) : null}\n {audience === \"public\" ? (\n <span className=\"inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5\">\n <IconWorld size={12} />\n Public\n </span>\n ) : null}\n </div>\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n <WorkspaceAppOpenActions\n app={app}\n href={directHref ?? href}\n openDirectly={Boolean(directHref)}\n isPinned={isPinned}\n pinLabel={pinLabel}\n pendingOpenLabel={pendingOpenLabel}\n onTogglePinned={onTogglePinned}\n />\n <WorkspaceAppSettings\n app={app}\n isArchived={isArchived}\n isPending={isPending}\n onEdit={() => setEditOpen(true)}\n onKeys={() => setKeysOpen(true)}\n onResources={() => setResourcesOpen(true)}\n onArchive={handleArchive}\n onUnarchive={handleUnarchive}\n onRemovePending={handleRemovePending}\n labels={{\n createdBy: t(\"agents.dashboardMetadataCreatedBy\"),\n owner: t(\"dispatch.pages.appMetadataOwner\"),\n teams: t(\"dispatch.pages.appMetadataTeams\"),\n }}\n />\n </div>\n </AppListRow>\n <Dialog open={editOpen} onOpenChange={setEditOpen}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Edit app details</DialogTitle>\n </DialogHeader>\n <form className=\"space-y-4\" onSubmit={handleMetadataSubmit}>\n <div className=\"space-y-2\">\n <Label htmlFor={`app-name-${app.id}`}>Name</Label>\n <Input\n id={`app-name-${app.id}`}\n value={draftName}\n maxLength={120}\n onChange={(event) => setDraftName(event.target.value)}\n />\n </div>\n <div className=\"space-y-2\">\n <Label htmlFor={`app-description-${app.id}`}>Description</Label>\n <Textarea\n id={`app-description-${app.id}`}\n value={draftDescription}\n maxLength={500}\n rows={4}\n onChange={(event) => setDraftDescription(event.target.value)}\n />\n </div>\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => setEditOpen(false)}\n >\n Cancel\n </Button>\n <Button type=\"submit\" disabled={updateMetadata.isPending}>\n {updateMetadata.isPending ? \"Saving...\" : \"Save\"}\n </Button>\n </DialogFooter>\n </form>\n </DialogContent>\n </Dialog>\n <Dialog open={keysOpen} onOpenChange={setKeysOpen}>\n <DialogContent className=\"max-w-md\">\n <DialogHeader>\n <DialogTitle>Manage keys for {app.name}</DialogTitle>\n <DialogDescription>\n Choose which workspace credentials this app can use.\n </DialogDescription>\n </DialogHeader>\n <AppKeysPanel appId={app.id} appName={app.name} />\n <DialogFooter>\n <Button type=\"button\" onClick={() => setKeysOpen(false)}>\n Done\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n <AppResourcesDialog\n app={app}\n open={resourcesOpen}\n onOpenChange={setResourcesOpen}\n />\n </>\n );\n}\n\nfunction WorkspaceAppOpenActions({\n app,\n href,\n openDirectly,\n isPinned,\n pinLabel,\n pendingOpenLabel,\n onTogglePinned,\n}: {\n app: WorkspaceAppSummary;\n href: string | null;\n openDirectly: boolean;\n isPinned: boolean;\n pinLabel: string;\n pendingOpenLabel: string;\n onTogglePinned?: () => void;\n}) {\n const navigate = useNavigate();\n const appRoute = workspaceAppRoute(app.id);\n const isPending = app.status === \"pending\";\n\n if (isPending) {\n return href ? (\n <Button asChild size=\"sm\" variant=\"outline\">\n <a href={href} target=\"_blank\" rel=\"noreferrer\">\n {pendingOpenLabel}\n </a>\n </Button>\n ) : (\n <Button size=\"sm\" variant=\"outline\" disabled>\n {pendingOpenLabel}\n </Button>\n );\n }\n\n if (!href) {\n return (\n <Button size=\"sm\" variant=\"outline\" disabled>\n Open app\n </Button>\n );\n }\n\n return (\n <AppOpenActions\n name={app.name}\n href={href}\n showNewTabOption\n onOpen={() =>\n openDirectly ? navigateToWorkspaceApp(href) : navigate(appRoute)\n }\n menuItems={\n onTogglePinned\n ? [\n {\n id: \"pin\",\n label: pinLabel,\n icon: <IconPin size={14} strokeWidth={isPinned ? 2.2 : 1.7} />,\n onSelect: onTogglePinned,\n },\n ]\n : undefined\n }\n />\n );\n}\n\ntype WorkspaceAppMetadataLabels = {\n createdBy: string;\n owner: string;\n teams: string;\n};\n\nfunction WorkspaceAppSettings({\n app,\n isArchived,\n isPending,\n onEdit,\n onKeys,\n onResources,\n onArchive,\n onUnarchive,\n onRemovePending,\n labels,\n}: {\n app: WorkspaceAppSummary;\n isArchived: boolean;\n isPending: boolean;\n onEdit: () => void;\n onKeys: () => void;\n onResources: () => void;\n onArchive: () => void;\n onUnarchive: () => void;\n onRemovePending: () => void;\n labels: WorkspaceAppMetadataLabels;\n}) {\n return (\n <DropdownMenu>\n <Tooltip>\n <TooltipTrigger asChild>\n <DropdownMenuTrigger asChild>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n aria-label={`Settings for ${app.name}`}\n className={APP_CARD_ACTION_CLASS}\n >\n <IconSettings size={15} />\n </Button>\n </DropdownMenuTrigger>\n </TooltipTrigger>\n <TooltipContent>App settings</TooltipContent>\n </Tooltip>\n <DropdownMenuContent\n align=\"end\"\n className={cn(APP_ACTION_MENU_CONTENT_CLASS, \"min-w-max\")}\n >\n <DropdownMenuItem onSelect={onEdit}>\n <IconEdit size={14} aria-hidden=\"true\" />\n Edit details\n </DropdownMenuItem>\n {!isPending && !isArchived ? (\n <>\n <DropdownMenuItem onSelect={onKeys}>\n <IconKey size={14} aria-hidden=\"true\" />\n Manage keys\n </DropdownMenuItem>\n <DropdownMenuItem onSelect={onResources}>\n <IconFileText size={14} aria-hidden=\"true\" />\n Agent resources\n </DropdownMenuItem>\n </>\n ) : null}\n {isPending ? (\n <DropdownMenuItem\n onSelect={onRemovePending}\n className=\"text-destructive focus:text-destructive\"\n >\n <IconTrash size={14} aria-hidden=\"true\" />\n Remove from list\n </DropdownMenuItem>\n ) : isArchived ? (\n <DropdownMenuItem onSelect={onUnarchive}>\n <IconEye size={14} aria-hidden=\"true\" />\n Restore to list\n </DropdownMenuItem>\n ) : (\n <DropdownMenuItem onSelect={onArchive}>\n <IconEyeOff size={14} aria-hidden=\"true\" />\n Hide from list\n </DropdownMenuItem>\n )}\n <WorkspaceAppMetadata app={app} labels={labels} />\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\nfunction WorkspaceAppMetadata({\n app,\n labels,\n}: {\n app: WorkspaceAppSummary;\n labels: WorkspaceAppMetadataLabels;\n}) {\n const trackedText = (value: string | null | undefined): string | null => {\n const normalized = value?.trim();\n return normalized && normalized.toLowerCase() !== \"not tracked\"\n ? normalized\n : null;\n };\n const rows: Array<{\n id: string;\n icon: typeof IconUser;\n label: string;\n value: string;\n }> = [];\n\n const createdBy = trackedText(app.createdBy);\n if (createdBy) {\n rows.push({\n id: \"created-by\",\n icon: IconUser,\n label: labels.createdBy,\n value: createdBy,\n });\n }\n const owner = trackedText(app.owner);\n if (owner) {\n rows.push({\n id: \"owner\",\n icon: IconUser,\n label: labels.owner,\n value: owner,\n });\n }\n const teams = app.teams\n ?.map(trackedText)\n .filter((team): team is string => Boolean(team))\n .join(\", \");\n if (teams) {\n rows.push({\n id: \"teams\",\n icon: IconUsersGroup,\n label: labels.teams,\n value: teams,\n });\n }\n\n if (rows.length === 0) return null;\n\n return (\n <>\n <DropdownMenuSeparator />\n <DropdownMenuLabel className=\"font-normal\">\n <div className=\"flex flex-col gap-1.5 text-xs text-muted-foreground\">\n {rows.map((row) => (\n <WorkspaceAppMetadataRow key={row.id} {...row} />\n ))}\n </div>\n </DropdownMenuLabel>\n </>\n );\n}\n\nfunction WorkspaceAppMetadataRow({\n icon: Icon,\n label,\n value,\n}: {\n icon: typeof IconUser;\n label: string;\n value: string;\n}) {\n return (\n <div className=\"flex items-start gap-1.5\">\n <Icon className=\"mt-0.5 h-3 w-3 shrink-0\" />\n <span className=\"shrink-0\">{label}</span>\n <span className=\"min-w-0 truncate text-foreground/80\">{value}</span>\n </div>\n );\n}\n\nfunction AppResourcesDialog({\n app,\n open,\n onOpenChange,\n}: {\n app: WorkspaceAppSummary;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n}) {\n const [inspectedResourceId, setInspectedResourceId] = useState<string | null>(\n null,\n );\n const query = useActionQuery(\n \"list-workspace-resources-for-app\",\n { appId: app.id },\n { enabled: open },\n );\n const { data, isLoading } = query;\n\n const resources = ((data as any)?.resources ?? []) as any[];\n const counts = (data as any)?.counts;\n\n return (\n <Dialog\n open={open}\n onOpenChange={(nextOpen) => {\n onOpenChange(nextOpen);\n if (!nextOpen) setInspectedResourceId(null);\n }}\n >\n <DialogContent className=\"max-w-2xl\">\n <DialogHeader>\n <DialogTitle>{app.name} agent resources</DialogTitle>\n <DialogDescription>\n Workspace-scope agent resources are inherited at runtime. App shared\n and personal resources can override them locally.\n </DialogDescription>\n </DialogHeader>\n <div className=\"space-y-4\">\n <div className=\"rounded-lg border bg-muted/30 px-3 py-2 text-xs leading-relaxed text-muted-foreground\">\n All-app agent resources live once at workspace scope and are read by\n each app agent when it builds context. Nothing is copied into this\n app.\n </div>\n\n <div className=\"flex flex-wrap items-center gap-2\">\n <Badge variant=\"secondary\">{counts?.total ?? 0} total</Badge>\n <Badge variant=\"outline\">\n {counts?.workspace ?? counts?.global ?? 0} workspace\n </Badge>\n <Badge variant=\"outline\">{counts?.granted ?? 0} granted</Badge>\n <Badge variant=\"outline\">\n {counts?.autoLoaded ?? 0} auto-loaded\n </Badge>\n </div>\n\n {query.isError ? (\n <ActionQueryError\n error={query.error}\n onRetry={() => void query.refetch()}\n />\n ) : isLoading ? (\n <div className=\"space-y-2\">\n <div className=\"h-14 rounded-lg border bg-muted/30\" />\n <div className=\"h-14 rounded-lg border bg-muted/30\" />\n <div className=\"h-14 rounded-lg border bg-muted/30\" />\n </div>\n ) : resources.length === 0 ? (\n <div className=\"rounded-lg border border-dashed px-4 py-8 text-center text-sm text-muted-foreground\">\n No workspace or granted resources are visible to this app yet.\n </div>\n ) : (\n <div className=\"max-h-[420px] space-y-2 overflow-y-auto pr-1\">\n {resources.map((resource) => {\n const inspected = inspectedResourceId === resource.id;\n return (\n <div\n key={resource.id}\n className=\"rounded-lg border px-3 py-3\"\n >\n <div className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <span className=\"text-sm font-medium text-foreground\">\n {resource.name}\n </span>\n <Badge variant=\"secondary\">{resource.kind}</Badge>\n <Badge variant=\"outline\">\n {resource.source === \"workspace\"\n ? \"All apps\"\n : \"Granted\"}\n </Badge>\n {resource.autoLoaded ? (\n <Badge variant=\"outline\">Auto-loaded</Badge>\n ) : null}\n </div>\n <div className=\"mt-1 truncate font-mono text-xs text-muted-foreground\">\n {resource.path}\n </div>\n </div>\n <div className=\"flex shrink-0 flex-col items-end gap-2\">\n {resource.source === \"grant\" ? (\n <div className=\"text-right text-[11px] text-muted-foreground\">\n Selected grant\n </div>\n ) : null}\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n className=\"h-7 px-2 text-xs\"\n onClick={(event) => {\n event.stopPropagation();\n setInspectedResourceId(\n inspected ? null : resource.id,\n );\n }}\n >\n {inspected ? (\n <IconChevronDown size={14} className=\"mr-1\" />\n ) : (\n <IconChevronRight size={14} className=\"mr-1\" />\n )}\n Stack\n </Button>\n </div>\n </div>\n\n {resource.description ? (\n <p className=\"mt-2 line-clamp-2 text-xs text-muted-foreground\">\n {resource.description}\n </p>\n ) : null}\n\n {inspected ? (\n <AppResourceEffectiveStack\n appId={app.id}\n resource={resource}\n />\n ) : null}\n </div>\n );\n })}\n </div>\n )}\n </div>\n <DialogFooter>\n <Button type=\"button\" onClick={() => onOpenChange(false)}>\n Done\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction stringifyError(err: unknown): string {\n if (err instanceof Error) return err.message;\n return String(err);\n}\n"]}
1
+ {"version":3,"file":"workspace-app-card.js","sourceRoot":"","sources":["../../src/components/workspace-app-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC;AACrF,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,OAAO,EACP,UAAU,EACV,YAAY,EACZ,OAAO,EACP,OAAO,EACP,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,cAAc,EACd,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc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AQ,CAAC,EAAE,CA+DZ,CACP,CAAC;4BACJ,CAAC,CAAC,GACE,CACP,IACG,EACN,KAAC,YAAY,cACX,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,qBAE/C,GACI,IACD,GACT,CACV,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,GAAY;IAClC,IAAI,GAAG,YAAY,KAAK;QAAE,OAAO,GAAG,CAAC,OAAO,CAAC;IAC7C,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC","sourcesContent":["import { APP_ACTION_MENU_CONTENT_CLASS } from \"@agent-native/core/client/chat-first\";\nimport {\n useActionMutation,\n useActionQuery,\n} from \"@agent-native/core/client/hooks\";\nimport { useT } from \"@agent-native/core/client/i18n\";\nimport { ShareButton } from \"@agent-native/core/client/sharing\";\nimport {\n IconChevronDown,\n IconChevronRight,\n IconClockHour4,\n IconEdit,\n IconEye,\n IconEyeOff,\n IconFileText,\n IconKey,\n IconPin,\n IconSettings,\n IconTrash,\n IconUser,\n IconUsersGroup,\n IconWorld,\n} from \"@tabler/icons-react\";\nimport { useEffect, useState, type FormEvent } from \"react\";\nimport { useNavigate } from \"react-router\";\nimport { toast } from \"sonner\";\n\nimport { cn } from \"../lib/utils\";\nimport {\n isPathMountedWorkspaceApp,\n isWorkspaceSsoApp,\n navigateToWorkspaceApp,\n workspaceAppDirectHref,\n workspaceAppHref,\n workspaceAppRoute,\n type WorkspaceAppSummary,\n} from \"../lib/workspace-apps\";\nimport { ActionQueryError } from \"./action-query-error\";\nimport { AppIcon } from \"./app-icon\";\nimport { AppKeysPanel } from \"./app-keys-popover\";\nimport { AppListRow } from \"./app-list-row\";\nimport { AppOpenActions } from \"./app-open-actions\";\nimport { Badge } from \"./ui/badge\";\nimport { Button } from \"./ui/button\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"./ui/dialog\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"./ui/dropdown-menu\";\nimport { Input } from \"./ui/input\";\nimport { Label } from \"./ui/label\";\nimport { Textarea } from \"./ui/textarea\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"./ui/tooltip\";\nimport { AppResourceEffectiveStack } from \"./workspace-resource-effective-stack\";\n\nconst APP_CARD_ACTION_CLASS =\n \"size-7 rounded-md p-0 text-muted-foreground transition-[background-color,color] hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-accent data-[state=open]:text-foreground\";\n\nexport function WorkspaceAppCard({\n app,\n className,\n isPinned = false,\n onTogglePinned,\n}: {\n app: WorkspaceAppSummary;\n className?: string;\n isPinned?: boolean;\n onTogglePinned?: () => void;\n}) {\n const t = useT();\n const href = workspaceAppHref(app);\n const directHref =\n app.status !== \"pending\" &&\n !isWorkspaceSsoApp(app) &&\n isPathMountedWorkspaceApp(app)\n ? workspaceAppDirectHref(app, \"/\")\n : null;\n const isPending = app.status === \"pending\";\n const pendingLabel = app.statusLabel || \"Builder branch\";\n const pendingOpenLabel = t(\"dispatch.pages.openBuilderBranch\", {\n defaultValue: \"Open in Builder\",\n });\n const isArchived = !!app.archived;\n const audience = app.audience ?? \"internal\";\n const [editOpen, setEditOpen] = useState(false);\n const [keysOpen, setKeysOpen] = useState(false);\n const [resourcesOpen, setResourcesOpen] = useState(false);\n const [draftName, setDraftName] = useState(app.name);\n const [draftDescription, setDraftDescription] = useState(\n app.description || \"\",\n );\n\n useEffect(() => {\n if (editOpen) return;\n setDraftName(app.name);\n setDraftDescription(app.description || \"\");\n }, [app.description, app.name, editOpen]);\n\n const archive = useActionMutation(\"archive-workspace-app\", {\n onError: (err) =>\n toast.error(`Could not hide ${app.name}: ${stringifyError(err)}`),\n });\n const unarchive = useActionMutation(\"unarchive-workspace-app\", {\n onError: (err) =>\n toast.error(`Could not restore ${app.name}: ${stringifyError(err)}`),\n });\n const removePending = useActionMutation(\"remove-pending-workspace-app\", {\n onError: (err) =>\n toast.error(`Could not remove ${app.name}: ${stringifyError(err)}`),\n });\n const updateMetadata = useActionMutation(\"update-workspace-app-metadata\", {\n onSuccess: () => {\n toast.success(`Updated ${draftName.trim() || app.name}`);\n setEditOpen(false);\n },\n onError: (err) =>\n toast.error(`Could not update ${app.name}: ${stringifyError(err)}`),\n });\n\n const handleArchive = () => {\n archive.mutate({ appId: app.id });\n toast.success(`Hid ${app.name} from the Apps list`);\n };\n const handleUnarchive = () => {\n unarchive.mutate({ appId: app.id });\n toast.success(`Restored ${app.name} to the Apps list`);\n };\n const handleRemovePending = () => {\n removePending.mutate({ appId: app.id });\n toast.success(`Removed pending ${app.name}`);\n };\n const handleMetadataSubmit = (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n const name = draftName.trim();\n if (!name) {\n toast.error(\"App name is required.\");\n return;\n }\n updateMetadata.mutate({\n appId: app.id,\n name,\n description: draftDescription.trim(),\n });\n };\n const pinLabel = t(\n isPinned ? \"dispatch.pages.unpinApp\" : \"dispatch.pages.pinApp\",\n {\n name: app.name,\n defaultValue: isPinned ? \"Unpin this app\" : \"Pin this app\",\n },\n );\n\n return (\n <>\n <AppListRow\n className={cn(\n !href && \"opacity-60\",\n isArchived && \"opacity-70\",\n className,\n )}\n >\n <AppIcon id={app.id} name={app.name} size=\"sm\" />\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"truncate text-sm font-semibold text-foreground\">\n {app.name}\n </h3>\n {app.description || isPending ? (\n <p className=\"mt-0.5 truncate text-xs text-muted-foreground\">\n {app.description || pendingLabel}\n </p>\n ) : null}\n <div className=\"mt-1.5 flex min-w-0 flex-wrap items-center gap-2 text-[11px] text-muted-foreground\">\n {isPending ? (\n <span className=\"inline-flex min-w-0 items-center gap-1 rounded-full bg-muted px-2 py-0.5\">\n <IconClockHour4 size={12} />\n <span className=\"truncate\">{pendingLabel}</span>\n </span>\n ) : null}\n {isArchived ? (\n <span className=\"inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5\">\n <IconEyeOff size={12} />\n Hidden\n </span>\n ) : null}\n {audience === \"public\" ? (\n <span className=\"inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5\">\n <IconWorld size={12} />\n Public\n </span>\n ) : null}\n </div>\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n <WorkspaceAppOpenActions\n app={app}\n href={directHref ?? href}\n openDirectly={Boolean(directHref)}\n isPinned={isPinned}\n pinLabel={pinLabel}\n pendingOpenLabel={pendingOpenLabel}\n onTogglePinned={onTogglePinned}\n />\n {!isPending ? (\n <div className=\"pointer-events-auto\">\n <ShareButton\n resourceType=\"workspace-app\"\n resourceId={app.id}\n resourceTitle={app.name}\n trigger=\"icon\"\n triggerClassName={APP_CARD_ACTION_CLASS}\n />\n </div>\n ) : null}\n <WorkspaceAppSettings\n app={app}\n isArchived={isArchived}\n isPending={isPending}\n onEdit={() => setEditOpen(true)}\n onKeys={() => setKeysOpen(true)}\n onResources={() => setResourcesOpen(true)}\n onArchive={handleArchive}\n onUnarchive={handleUnarchive}\n onRemovePending={handleRemovePending}\n labels={{\n createdBy: t(\"agents.dashboardMetadataCreatedBy\"),\n owner: t(\"dispatch.pages.appMetadataOwner\"),\n teams: t(\"dispatch.pages.appMetadataTeams\"),\n }}\n />\n </div>\n </AppListRow>\n <Dialog open={editOpen} onOpenChange={setEditOpen}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Edit app details</DialogTitle>\n </DialogHeader>\n <form className=\"space-y-4\" onSubmit={handleMetadataSubmit}>\n <div className=\"space-y-2\">\n <Label htmlFor={`app-name-${app.id}`}>Name</Label>\n <Input\n id={`app-name-${app.id}`}\n value={draftName}\n maxLength={120}\n onChange={(event) => setDraftName(event.target.value)}\n />\n </div>\n <div className=\"space-y-2\">\n <Label htmlFor={`app-description-${app.id}`}>Description</Label>\n <Textarea\n id={`app-description-${app.id}`}\n value={draftDescription}\n maxLength={500}\n rows={4}\n onChange={(event) => setDraftDescription(event.target.value)}\n />\n </div>\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => setEditOpen(false)}\n >\n Cancel\n </Button>\n <Button type=\"submit\" disabled={updateMetadata.isPending}>\n {updateMetadata.isPending ? \"Saving...\" : \"Save\"}\n </Button>\n </DialogFooter>\n </form>\n </DialogContent>\n </Dialog>\n <Dialog open={keysOpen} onOpenChange={setKeysOpen}>\n <DialogContent className=\"max-w-md\">\n <DialogHeader>\n <DialogTitle>Manage keys for {app.name}</DialogTitle>\n <DialogDescription>\n Choose which workspace credentials this app can use.\n </DialogDescription>\n </DialogHeader>\n <AppKeysPanel appId={app.id} appName={app.name} />\n <DialogFooter>\n <Button type=\"button\" onClick={() => setKeysOpen(false)}>\n Done\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n <AppResourcesDialog\n app={app}\n open={resourcesOpen}\n onOpenChange={setResourcesOpen}\n />\n </>\n );\n}\n\nfunction WorkspaceAppOpenActions({\n app,\n href,\n openDirectly,\n isPinned,\n pinLabel,\n pendingOpenLabel,\n onTogglePinned,\n}: {\n app: WorkspaceAppSummary;\n href: string | null;\n openDirectly: boolean;\n isPinned: boolean;\n pinLabel: string;\n pendingOpenLabel: string;\n onTogglePinned?: () => void;\n}) {\n const navigate = useNavigate();\n const appRoute = workspaceAppRoute(app.id);\n const isPending = app.status === \"pending\";\n\n if (isPending) {\n return href ? (\n <Button asChild size=\"sm\" variant=\"outline\">\n <a href={href} target=\"_blank\" rel=\"noreferrer\">\n {pendingOpenLabel}\n </a>\n </Button>\n ) : (\n <Button size=\"sm\" variant=\"outline\" disabled>\n {pendingOpenLabel}\n </Button>\n );\n }\n\n if (!href) {\n return (\n <Button size=\"sm\" variant=\"outline\" disabled>\n Open app\n </Button>\n );\n }\n\n return (\n <AppOpenActions\n name={app.name}\n href={href}\n showNewTabOption\n onOpen={() =>\n openDirectly ? navigateToWorkspaceApp(href) : navigate(appRoute)\n }\n menuItems={\n onTogglePinned\n ? [\n {\n id: \"pin\",\n label: pinLabel,\n icon: <IconPin size={14} strokeWidth={isPinned ? 2.2 : 1.7} />,\n onSelect: onTogglePinned,\n },\n ]\n : undefined\n }\n />\n );\n}\n\ntype WorkspaceAppMetadataLabels = {\n createdBy: string;\n owner: string;\n teams: string;\n};\n\nfunction WorkspaceAppSettings({\n app,\n isArchived,\n isPending,\n onEdit,\n onKeys,\n onResources,\n onArchive,\n onUnarchive,\n onRemovePending,\n labels,\n}: {\n app: WorkspaceAppSummary;\n isArchived: boolean;\n isPending: boolean;\n onEdit: () => void;\n onKeys: () => void;\n onResources: () => void;\n onArchive: () => void;\n onUnarchive: () => void;\n onRemovePending: () => void;\n labels: WorkspaceAppMetadataLabels;\n}) {\n return (\n <DropdownMenu>\n <Tooltip>\n <TooltipTrigger asChild>\n <DropdownMenuTrigger asChild>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n aria-label={`Settings for ${app.name}`}\n className={APP_CARD_ACTION_CLASS}\n >\n <IconSettings size={15} />\n </Button>\n </DropdownMenuTrigger>\n </TooltipTrigger>\n <TooltipContent>App settings</TooltipContent>\n </Tooltip>\n <DropdownMenuContent\n align=\"end\"\n className={cn(APP_ACTION_MENU_CONTENT_CLASS, \"min-w-max\")}\n >\n <DropdownMenuItem onSelect={onEdit}>\n <IconEdit size={14} aria-hidden=\"true\" />\n Edit details\n </DropdownMenuItem>\n {!isPending && !isArchived ? (\n <>\n <DropdownMenuItem onSelect={onKeys}>\n <IconKey size={14} aria-hidden=\"true\" />\n Manage keys\n </DropdownMenuItem>\n <DropdownMenuItem onSelect={onResources}>\n <IconFileText size={14} aria-hidden=\"true\" />\n Agent resources\n </DropdownMenuItem>\n </>\n ) : null}\n {isPending ? (\n <DropdownMenuItem\n onSelect={onRemovePending}\n className=\"text-destructive focus:text-destructive\"\n >\n <IconTrash size={14} aria-hidden=\"true\" />\n Remove from list\n </DropdownMenuItem>\n ) : isArchived ? (\n <DropdownMenuItem onSelect={onUnarchive}>\n <IconEye size={14} aria-hidden=\"true\" />\n Restore to list\n </DropdownMenuItem>\n ) : (\n <DropdownMenuItem onSelect={onArchive}>\n <IconEyeOff size={14} aria-hidden=\"true\" />\n Hide from list\n </DropdownMenuItem>\n )}\n <WorkspaceAppMetadata app={app} labels={labels} />\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\nfunction WorkspaceAppMetadata({\n app,\n labels,\n}: {\n app: WorkspaceAppSummary;\n labels: WorkspaceAppMetadataLabels;\n}) {\n const trackedText = (value: string | null | undefined): string | null => {\n const normalized = value?.trim();\n return normalized && normalized.toLowerCase() !== \"not tracked\"\n ? normalized\n : null;\n };\n const rows: Array<{\n id: string;\n icon: typeof IconUser;\n label: string;\n value: string;\n }> = [];\n\n const createdBy = trackedText(app.createdBy);\n if (createdBy) {\n rows.push({\n id: \"created-by\",\n icon: IconUser,\n label: labels.createdBy,\n value: createdBy,\n });\n }\n const owner = trackedText(app.owner);\n if (owner) {\n rows.push({\n id: \"owner\",\n icon: IconUser,\n label: labels.owner,\n value: owner,\n });\n }\n const teams = app.teams\n ?.map(trackedText)\n .filter((team): team is string => Boolean(team))\n .join(\", \");\n if (teams) {\n rows.push({\n id: \"teams\",\n icon: IconUsersGroup,\n label: labels.teams,\n value: teams,\n });\n }\n\n if (rows.length === 0) return null;\n\n return (\n <>\n <DropdownMenuSeparator />\n <DropdownMenuLabel className=\"font-normal\">\n <div className=\"flex flex-col gap-1.5 text-xs text-muted-foreground\">\n {rows.map((row) => (\n <WorkspaceAppMetadataRow key={row.id} {...row} />\n ))}\n </div>\n </DropdownMenuLabel>\n </>\n );\n}\n\nfunction WorkspaceAppMetadataRow({\n icon: Icon,\n label,\n value,\n}: {\n icon: typeof IconUser;\n label: string;\n value: string;\n}) {\n return (\n <div className=\"flex items-start gap-1.5\">\n <Icon className=\"mt-0.5 h-3 w-3 shrink-0\" />\n <span className=\"shrink-0\">{label}</span>\n <span className=\"min-w-0 truncate text-foreground/80\">{value}</span>\n </div>\n );\n}\n\nfunction AppResourcesDialog({\n app,\n open,\n onOpenChange,\n}: {\n app: WorkspaceAppSummary;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n}) {\n const [inspectedResourceId, setInspectedResourceId] = useState<string | null>(\n null,\n );\n const query = useActionQuery(\n \"list-workspace-resources-for-app\",\n { appId: app.id },\n { enabled: open },\n );\n const { data, isLoading } = query;\n\n const resources = ((data as any)?.resources ?? []) as any[];\n const counts = (data as any)?.counts;\n\n return (\n <Dialog\n open={open}\n onOpenChange={(nextOpen) => {\n onOpenChange(nextOpen);\n if (!nextOpen) setInspectedResourceId(null);\n }}\n >\n <DialogContent className=\"max-w-2xl\">\n <DialogHeader>\n <DialogTitle>{app.name} agent resources</DialogTitle>\n <DialogDescription>\n Workspace-scope agent resources are inherited at runtime. App shared\n and personal resources can override them locally.\n </DialogDescription>\n </DialogHeader>\n <div className=\"space-y-4\">\n <div className=\"rounded-lg border bg-muted/30 px-3 py-2 text-xs leading-relaxed text-muted-foreground\">\n All-app agent resources live once at workspace scope and are read by\n each app agent when it builds context. Nothing is copied into this\n app.\n </div>\n\n <div className=\"flex flex-wrap items-center gap-2\">\n <Badge variant=\"secondary\">{counts?.total ?? 0} total</Badge>\n <Badge variant=\"outline\">\n {counts?.workspace ?? counts?.global ?? 0} workspace\n </Badge>\n <Badge variant=\"outline\">{counts?.granted ?? 0} granted</Badge>\n <Badge variant=\"outline\">\n {counts?.autoLoaded ?? 0} auto-loaded\n </Badge>\n </div>\n\n {query.isError ? (\n <ActionQueryError\n error={query.error}\n onRetry={() => void query.refetch()}\n />\n ) : isLoading ? (\n <div className=\"space-y-2\">\n <div className=\"h-14 rounded-lg border bg-muted/30\" />\n <div className=\"h-14 rounded-lg border bg-muted/30\" />\n <div className=\"h-14 rounded-lg border bg-muted/30\" />\n </div>\n ) : resources.length === 0 ? (\n <div className=\"rounded-lg border border-dashed px-4 py-8 text-center text-sm text-muted-foreground\">\n No workspace or granted resources are visible to this app yet.\n </div>\n ) : (\n <div className=\"max-h-[420px] space-y-2 overflow-y-auto pr-1\">\n {resources.map((resource) => {\n const inspected = inspectedResourceId === resource.id;\n return (\n <div\n key={resource.id}\n className=\"rounded-lg border px-3 py-3\"\n >\n <div className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <span className=\"text-sm font-medium text-foreground\">\n {resource.name}\n </span>\n <Badge variant=\"secondary\">{resource.kind}</Badge>\n <Badge variant=\"outline\">\n {resource.source === \"workspace\"\n ? \"All apps\"\n : \"Granted\"}\n </Badge>\n {resource.autoLoaded ? (\n <Badge variant=\"outline\">Auto-loaded</Badge>\n ) : null}\n </div>\n <div className=\"mt-1 truncate font-mono text-xs text-muted-foreground\">\n {resource.path}\n </div>\n </div>\n <div className=\"flex shrink-0 flex-col items-end gap-2\">\n {resource.source === \"grant\" ? (\n <div className=\"text-right text-[11px] text-muted-foreground\">\n Selected grant\n </div>\n ) : null}\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n className=\"h-7 px-2 text-xs\"\n onClick={(event) => {\n event.stopPropagation();\n setInspectedResourceId(\n inspected ? null : resource.id,\n );\n }}\n >\n {inspected ? (\n <IconChevronDown size={14} className=\"mr-1\" />\n ) : (\n <IconChevronRight size={14} className=\"mr-1\" />\n )}\n Stack\n </Button>\n </div>\n </div>\n\n {resource.description ? (\n <p className=\"mt-2 line-clamp-2 text-xs text-muted-foreground\">\n {resource.description}\n </p>\n ) : null}\n\n {inspected ? (\n <AppResourceEffectiveStack\n appId={app.id}\n resource={resource}\n />\n ) : null}\n </div>\n );\n })}\n </div>\n )}\n </div>\n <DialogFooter>\n <Button type=\"button\" onClick={() => onOpenChange(false)}>\n Done\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction stringifyError(err: unknown): string {\n if (err instanceof Error) return err.message;\n return String(err);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/db/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,eAAO,MAAM,KAAK,kEAAsB,CAAC;AAEzC,wBAAgB,EAAE,+DAEjB;AAED,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/db/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,eAAO,MAAM,KAAK,kEAAsB,CAAC;AA4BzC,wBAAgB,EAAE,+DAEjB;AAED,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
package/dist/db/index.js CHANGED
@@ -1,6 +1,31 @@
1
- import { createGetDb } from "@agent-native/core/db";
1
+ import { createGetDb, getDbExec } from "@agent-native/core/db";
2
+ import { registerShareableResource } from "@agent-native/core/sharing";
2
3
  import * as schema from "./schema.js";
3
4
  export const getDb = createGetDb(schema);
5
+ registerShareableResource({
6
+ type: "workspace-app",
7
+ resourceTable: schema.workspaceApps,
8
+ sharesTable: schema.workspaceAppShares,
9
+ displayName: "Workspace app",
10
+ titleColumn: "name",
11
+ getResourcePath: (resource) => typeof resource?.path === "string" ? resource.path : undefined,
12
+ getDb,
13
+ allowPublic: false,
14
+ requireOrgMemberForUserShares: true,
15
+ supportsGroupShares: true,
16
+ canManageAccess: async (resource, ctx) => {
17
+ if (!ctx.userEmail || !ctx.orgId || resource?.orgId !== ctx.orgId) {
18
+ return false;
19
+ }
20
+ const result = await getDbExec().execute({
21
+ sql: `SELECT 1 FROM org_members
22
+ WHERE org_id = ? AND LOWER(email) = LOWER(?)
23
+ AND role IN ('owner', 'admin') LIMIT 1`,
24
+ args: [ctx.orgId, ctx.userEmail],
25
+ });
26
+ return result.rows.length > 0;
27
+ },
28
+ });
4
29
  export function db() {
5
30
  return getDb();
6
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/db/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,MAAM,CAAC,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAEzC,MAAM,UAAU,EAAE;IAChB,OAAO,KAAK,EAAE,CAAC;AACjB,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC","sourcesContent":["import { createGetDb } from \"@agent-native/core/db\";\n\nimport * as schema from \"./schema.js\";\n\nexport const getDb = createGetDb(schema);\n\nexport function db() {\n return getDb();\n}\n\nexport { schema };\nexport * from \"./schema.js\";\nexport * from \"./migrations.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/db/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,MAAM,CAAC,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAEzC,yBAAyB,CAAC;IACxB,IAAI,EAAE,eAAe;IACrB,aAAa,EAAE,MAAM,CAAC,aAAa;IACnC,WAAW,EAAE,MAAM,CAAC,kBAAkB;IACtC,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,MAAM;IACnB,eAAe,EAAE,CAAC,QAAQ,EAAE,EAAE,CAC5B,OAAO,QAAQ,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;IAChE,KAAK;IACL,WAAW,EAAE,KAAK;IAClB,6BAA6B,EAAE,IAAI;IACnC,mBAAmB,EAAE,IAAI;IACzB,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE;QACvC,IAAI,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,QAAQ,EAAE,KAAK,KAAK,GAAG,CAAC,KAAK,EAAE,CAAC;YAClE,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,SAAS,EAAE,CAAC,OAAO,CAAC;YACvC,GAAG,EAAE;;qDAE0C;YAC/C,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC;SACjC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAChC,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,UAAU,EAAE;IAChB,OAAO,KAAK,EAAE,CAAC;AACjB,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC","sourcesContent":["import { createGetDb, getDbExec } from \"@agent-native/core/db\";\nimport { registerShareableResource } from \"@agent-native/core/sharing\";\n\nimport * as schema from \"./schema.js\";\n\nexport const getDb = createGetDb(schema);\n\nregisterShareableResource({\n type: \"workspace-app\",\n resourceTable: schema.workspaceApps,\n sharesTable: schema.workspaceAppShares,\n displayName: \"Workspace app\",\n titleColumn: \"name\",\n getResourcePath: (resource) =>\n typeof resource?.path === \"string\" ? resource.path : undefined,\n getDb,\n allowPublic: false,\n requireOrgMemberForUserShares: true,\n supportsGroupShares: true,\n canManageAccess: async (resource, ctx) => {\n if (!ctx.userEmail || !ctx.orgId || resource?.orgId !== ctx.orgId) {\n return false;\n }\n const result = await getDbExec().execute({\n sql: `SELECT 1 FROM org_members\n WHERE org_id = ? AND LOWER(email) = LOWER(?)\n AND role IN ('owner', 'admin') LIMIT 1`,\n args: [ctx.orgId, ctx.userEmail],\n });\n return result.rows.length > 0;\n },\n});\n\nexport function db() {\n return getDb();\n}\n\nexport { schema };\nexport * from \"./schema.js\";\nexport * from \"./migrations.js\";\n"]}
@@ -1,3 +1,4 @@
1
+ export { workspaceApps, workspaceAppShares } from "@agent-native/core/org";
1
2
  export declare const dispatchDestinations: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2
3
  name: "dispatch_destinations";
3
4
  schema: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/db/schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY/B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa7B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUlC,CAAC"}
package/dist/db/schema.js CHANGED
@@ -1,4 +1,8 @@
1
1
  import { table, text, integer } from "@agent-native/core/db/schema";
2
+ // Workspace app ownership/sharing lives in core so every mounted app can
3
+ // enforce the same access record. Re-exporting these tables keeps Dispatch's
4
+ // Drizzle accessor aware of them for the generic share actions.
5
+ export { workspaceApps, workspaceAppShares } from "@agent-native/core/org";
2
6
  export const dispatchDestinations = table("dispatch_destinations", {
3
7
  id: text("id").primaryKey(),
4
8
  ownerEmail: text("owner_email").notNull(),
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/db/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAEpE,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,uBAAuB,EAAE;IACjE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE;IAC3B,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;IACzC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;IACrB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE;IAC5B,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE;IACpC,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;IAC1C,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC;IAC7B,KAAK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AAE,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,2CAA2C;IACzE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE;IAClC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,yDAAyD;IACzF,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE;IACvC,SAAS,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE;IAC1C,SAAS,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE;CAC3C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,CAAC,2BAA2B,EAAE;IACxE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE;IAC3B,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;IACzC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;IACrB,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;IACzC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;IAC/B,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,EAAE,uBAAuB;IACzD,QAAQ,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,wCAAwC;IACxE,SAAS,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE;IAC1C,SAAS,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE;CAC3C,CAAC,CAAC","sourcesContent":["import { table, text, integer } from \"@agent-native/core/db/schema\";\n\nexport const dispatchDestinations = table(\"dispatch_destinations\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n name: text(\"name\").notNull(),\n platform: text(\"platform\").notNull(),\n destination: text(\"destination\").notNull(),\n threadRef: text(\"thread_ref\"),\n notes: text(\"notes\"),\n createdBy: text(\"created_by\").notNull(),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const dispatchIdentityLinks = table(\"dispatch_identity_links\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n platform: text(\"platform\").notNull(),\n externalUserId: text(\"external_user_id\").notNull(),\n externalUserName: text(\"external_user_name\"),\n linkedBy: text(\"linked_by\").notNull(),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const dispatchLinkTokens = table(\"dispatch_link_tokens\", {\n id: text(\"id\").primaryKey(),\n token: text(\"token\").notNull(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n platform: text(\"platform\").notNull(),\n createdBy: text(\"created_by\").notNull(),\n expiresAt: integer(\"expires_at\").notNull(),\n claimedAt: integer(\"claimed_at\"),\n claimedByExternalUserId: text(\"claimed_by_external_user_id\"),\n claimedByExternalUserName: text(\"claimed_by_external_user_name\"),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const dispatchApprovalRequests = table(\"dispatch_approval_requests\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n changeType: text(\"change_type\").notNull(),\n targetType: text(\"target_type\").notNull(),\n targetId: text(\"target_id\"),\n status: text(\"status\").notNull(),\n summary: text(\"summary\").notNull(),\n payload: text(\"payload\").notNull(),\n beforeValue: text(\"before_value\"),\n afterValue: text(\"after_value\"),\n requestedBy: text(\"requested_by\").notNull(),\n reviewedBy: text(\"reviewed_by\"),\n reviewedAt: integer(\"reviewed_at\"),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const dispatchAuditEvents = table(\"dispatch_audit_events\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n actor: text(\"actor\").notNull(),\n action: text(\"action\").notNull(),\n targetType: text(\"target_type\").notNull(),\n targetId: text(\"target_id\"),\n summary: text(\"summary\").notNull(),\n metadata: text(\"metadata\"),\n createdAt: integer(\"created_at\").notNull(),\n});\n\nexport const dispatchDreams = table(\"dispatch_dreams\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n sourceId: text(\"source_id\").notNull(),\n title: text(\"title\").notNull(),\n status: text(\"status\").notNull(),\n query: text(\"query\"),\n report: text(\"report\"),\n summary: text(\"summary\"),\n sourceHealth: text(\"source_health\"),\n candidateCount: integer(\"candidate_count\").notNull(),\n inspectedThreadCount: integer(\"inspected_thread_count\").notNull(),\n createdBy: text(\"created_by\").notNull(),\n error: text(\"error\"),\n startedAt: integer(\"started_at\").notNull(),\n completedAt: integer(\"completed_at\"),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const dispatchDreamProposals = table(\"dispatch_dream_proposals\", {\n id: text(\"id\").primaryKey(),\n dreamId: text(\"dream_id\").notNull(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n targetType: text(\"target_type\").notNull(),\n targetPath: text(\"target_path\").notNull(),\n title: text(\"title\").notNull(),\n summary: text(\"summary\").notNull(),\n rationale: text(\"rationale\").notNull(),\n content: text(\"content\").notNull(),\n evidence: text(\"evidence\").notNull(),\n confidence: integer(\"confidence\").notNull(),\n risk: text(\"risk\").notNull(),\n status: text(\"status\").notNull(),\n appliedBy: text(\"applied_by\"),\n appliedAt: integer(\"applied_at\"),\n rejectedBy: text(\"rejected_by\"),\n rejectedAt: integer(\"rejected_at\"),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\n// ─── Vault: workspace-wide secret management ───────────────────────\n\nexport const vaultSecrets = table(\"vault_secrets\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n name: text(\"name\").notNull(),\n credentialKey: text(\"credential_key\").notNull(),\n value: text(\"value\").notNull(),\n provider: text(\"provider\"),\n description: text(\"description\"),\n createdBy: text(\"created_by\").notNull(),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const vaultGrants = table(\"vault_grants\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n secretId: text(\"secret_id\").notNull(),\n appId: text(\"app_id\").notNull(),\n grantedBy: text(\"granted_by\").notNull(),\n status: text(\"status\").notNull(),\n syncedAt: integer(\"synced_at\"),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const vaultRequests = table(\"vault_requests\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n credentialKey: text(\"credential_key\").notNull(),\n appId: text(\"app_id\").notNull(),\n reason: text(\"reason\"),\n requestedBy: text(\"requested_by\").notNull(),\n status: text(\"status\").notNull(),\n reviewedBy: text(\"reviewed_by\"),\n reviewedAt: integer(\"reviewed_at\"),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const vaultAuditLog = table(\"vault_audit_log\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n secretId: text(\"secret_id\"),\n appId: text(\"app_id\"),\n action: text(\"action\").notNull(),\n actor: text(\"actor\").notNull(),\n summary: text(\"summary\").notNull(),\n metadata: text(\"metadata\"),\n createdAt: integer(\"created_at\").notNull(),\n});\n\n// ─── Workspace Resources: shared skills, instructions, agents, knowledge, MCP ─\n\nexport const workspaceResources = table(\"workspace_resources\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n kind: text(\"kind\").notNull(), // \"skill\" | \"instruction\" | \"agent\" | \"agent-file\" | \"knowledge\" | \"mcp-server\"\n name: text(\"name\").notNull(),\n description: text(\"description\"),\n path: text(\"path\").notNull(), // resource path, e.g. \"skills/designer.md\"\n content: text(\"content\").notNull(),\n scope: text(\"scope\").notNull(), // \"all\" (runtime inherited) | \"selected\" (grant per-app)\n createdBy: text(\"created_by\").notNull(),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const workspaceResourceGrants = table(\"workspace_resource_grants\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n resourceId: text(\"resource_id\").notNull(),\n appId: text(\"app_id\").notNull(),\n status: text(\"status\").notNull(), // \"active\" | \"revoked\"\n syncedAt: integer(\"synced_at\"), // legacy column retained for older rows\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/db/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAEpE,yEAAyE;AACzE,6EAA6E;AAC7E,gEAAgE;AAChE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE3E,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,uBAAuB,EAAE;IACjE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE;IAC3B,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE;IACzC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC;IACrB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE;IAC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db/schema\";\n\n// Workspace app ownership/sharing lives in core so every mounted app can\n// enforce the same access record. Re-exporting these tables keeps Dispatch's\n// Drizzle accessor aware of them for the generic share actions.\nexport { workspaceApps, workspaceAppShares } from \"@agent-native/core/org\";\n\nexport const dispatchDestinations = table(\"dispatch_destinations\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n name: text(\"name\").notNull(),\n platform: text(\"platform\").notNull(),\n destination: text(\"destination\").notNull(),\n threadRef: text(\"thread_ref\"),\n notes: text(\"notes\"),\n createdBy: text(\"created_by\").notNull(),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const dispatchIdentityLinks = table(\"dispatch_identity_links\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n platform: text(\"platform\").notNull(),\n externalUserId: text(\"external_user_id\").notNull(),\n externalUserName: text(\"external_user_name\"),\n linkedBy: text(\"linked_by\").notNull(),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const dispatchLinkTokens = table(\"dispatch_link_tokens\", {\n id: text(\"id\").primaryKey(),\n token: text(\"token\").notNull(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n platform: text(\"platform\").notNull(),\n createdBy: text(\"created_by\").notNull(),\n expiresAt: integer(\"expires_at\").notNull(),\n claimedAt: integer(\"claimed_at\"),\n claimedByExternalUserId: text(\"claimed_by_external_user_id\"),\n claimedByExternalUserName: text(\"claimed_by_external_user_name\"),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const dispatchApprovalRequests = table(\"dispatch_approval_requests\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n changeType: text(\"change_type\").notNull(),\n targetType: text(\"target_type\").notNull(),\n targetId: text(\"target_id\"),\n status: text(\"status\").notNull(),\n summary: text(\"summary\").notNull(),\n payload: text(\"payload\").notNull(),\n beforeValue: text(\"before_value\"),\n afterValue: text(\"after_value\"),\n requestedBy: text(\"requested_by\").notNull(),\n reviewedBy: text(\"reviewed_by\"),\n reviewedAt: integer(\"reviewed_at\"),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const dispatchAuditEvents = table(\"dispatch_audit_events\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n actor: text(\"actor\").notNull(),\n action: text(\"action\").notNull(),\n targetType: text(\"target_type\").notNull(),\n targetId: text(\"target_id\"),\n summary: text(\"summary\").notNull(),\n metadata: text(\"metadata\"),\n createdAt: integer(\"created_at\").notNull(),\n});\n\nexport const dispatchDreams = table(\"dispatch_dreams\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n sourceId: text(\"source_id\").notNull(),\n title: text(\"title\").notNull(),\n status: text(\"status\").notNull(),\n query: text(\"query\"),\n report: text(\"report\"),\n summary: text(\"summary\"),\n sourceHealth: text(\"source_health\"),\n candidateCount: integer(\"candidate_count\").notNull(),\n inspectedThreadCount: integer(\"inspected_thread_count\").notNull(),\n createdBy: text(\"created_by\").notNull(),\n error: text(\"error\"),\n startedAt: integer(\"started_at\").notNull(),\n completedAt: integer(\"completed_at\"),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const dispatchDreamProposals = table(\"dispatch_dream_proposals\", {\n id: text(\"id\").primaryKey(),\n dreamId: text(\"dream_id\").notNull(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n targetType: text(\"target_type\").notNull(),\n targetPath: text(\"target_path\").notNull(),\n title: text(\"title\").notNull(),\n summary: text(\"summary\").notNull(),\n rationale: text(\"rationale\").notNull(),\n content: text(\"content\").notNull(),\n evidence: text(\"evidence\").notNull(),\n confidence: integer(\"confidence\").notNull(),\n risk: text(\"risk\").notNull(),\n status: text(\"status\").notNull(),\n appliedBy: text(\"applied_by\"),\n appliedAt: integer(\"applied_at\"),\n rejectedBy: text(\"rejected_by\"),\n rejectedAt: integer(\"rejected_at\"),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\n// ─── Vault: workspace-wide secret management ───────────────────────\n\nexport const vaultSecrets = table(\"vault_secrets\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n name: text(\"name\").notNull(),\n credentialKey: text(\"credential_key\").notNull(),\n value: text(\"value\").notNull(),\n provider: text(\"provider\"),\n description: text(\"description\"),\n createdBy: text(\"created_by\").notNull(),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const vaultGrants = table(\"vault_grants\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n secretId: text(\"secret_id\").notNull(),\n appId: text(\"app_id\").notNull(),\n grantedBy: text(\"granted_by\").notNull(),\n status: text(\"status\").notNull(),\n syncedAt: integer(\"synced_at\"),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const vaultRequests = table(\"vault_requests\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n credentialKey: text(\"credential_key\").notNull(),\n appId: text(\"app_id\").notNull(),\n reason: text(\"reason\"),\n requestedBy: text(\"requested_by\").notNull(),\n status: text(\"status\").notNull(),\n reviewedBy: text(\"reviewed_by\"),\n reviewedAt: integer(\"reviewed_at\"),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const vaultAuditLog = table(\"vault_audit_log\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n secretId: text(\"secret_id\"),\n appId: text(\"app_id\"),\n action: text(\"action\").notNull(),\n actor: text(\"actor\").notNull(),\n summary: text(\"summary\").notNull(),\n metadata: text(\"metadata\"),\n createdAt: integer(\"created_at\").notNull(),\n});\n\n// ─── Workspace Resources: shared skills, instructions, agents, knowledge, MCP ─\n\nexport const workspaceResources = table(\"workspace_resources\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n kind: text(\"kind\").notNull(), // \"skill\" | \"instruction\" | \"agent\" | \"agent-file\" | \"knowledge\" | \"mcp-server\"\n name: text(\"name\").notNull(),\n description: text(\"description\"),\n path: text(\"path\").notNull(), // resource path, e.g. \"skills/designer.md\"\n content: text(\"content\").notNull(),\n scope: text(\"scope\").notNull(), // \"all\" (runtime inherited) | \"selected\" (grant per-app)\n createdBy: text(\"created_by\").notNull(),\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n\nexport const workspaceResourceGrants = table(\"workspace_resource_grants\", {\n id: text(\"id\").primaryKey(),\n ownerEmail: text(\"owner_email\").notNull(),\n orgId: text(\"org_id\"),\n resourceId: text(\"resource_id\").notNull(),\n appId: text(\"app_id\").notNull(),\n status: text(\"status\").notNull(), // \"active\" | \"revoked\"\n syncedAt: integer(\"synced_at\"), // legacy column retained for older rows\n createdAt: integer(\"created_at\").notNull(),\n updatedAt: integer(\"updated_at\").notNull(),\n});\n"]}
@@ -6,6 +6,7 @@ export interface WorkspaceAppSummary {
6
6
  url?: string | null;
7
7
  isDispatch?: boolean;
8
8
  audience?: "internal" | "public";
9
+ visibility?: "private" | "org";
9
10
  publicPaths?: string[];
10
11
  protectedPaths?: string[];
11
12
  status?: "ready" | "pending";
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-apps.d.ts","sourceRoot":"","s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