@agent-native/dispatch 0.15.10 → 0.15.11

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.
@@ -1 +1 @@
1
- {"version":3,"file":"approvals.js","sourceRoot":"","sources":["../../../src/routes/pages/approvals.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,MAAM,UAAU,IAAI;IAClB,OAAO,CAAC,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,cAAc;IACpC,MAAM,aAAa,GAAG,cAAc,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;IAClE,MAAM,cAAc,GAAG,cAAc,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAAC;IACrE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,aAAa,CAAC;IACzC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,cAAc,CAAC;IAC3C,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC;IAC/B,MAAM,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC;IAC5B,MAAM,CAAC,MAAM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AQ,CAAC,EAAE,CAmCZ,CACP,CAAC,EACD,CAAC,SAAS,EAAE,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CACjC,cAAK,SAAS,EAAC,yEAAyE,0CAElF,CACP,IACG,CACP,IACO,IACN,GACQ,CACjB,CAAC;AACJ,CAAC","sourcesContent":["import {\n useActionMutation,\n useActionQuery,\n} from \"@agent-native/core/client/hooks\";\nimport { useOrg } from \"@agent-native/core/client/org\";\nimport { useMemo, useState } from \"react\";\nimport { toast } from \"sonner\";\n\nimport { ActionQueryError } from \"../../components/action-query-error\";\nimport { DispatchShell } from \"../../components/dispatch-shell\";\nimport { Button } from \"../../components/ui/button\";\nimport { Input } from \"../../components/ui/input\";\nimport { Switch } from \"../../components/ui/switch\";\n\nexport function meta() {\n return [{ title: \"Approvals — Dispatch\" }];\n}\n\nexport default function ApprovalsRoute() {\n const settingsQuery = useActionQuery(\"get-dispatch-settings\", {});\n const approvalsQuery = useActionQuery(\"list-dispatch-approvals\", {});\n const { data: settings } = settingsQuery;\n const { data: approvals } = approvalsQuery;\n const { data: org } = useOrg();\n const hasOrg = !!org?.orgId;\n const [emails, setEmails] = useState(\"\");\n\n const approverList = useMemo(\n () =>\n emails\n .split(\",\")\n .map((value) => value.trim())\n .filter(Boolean),\n [emails],\n );\n\n const savePolicy = useActionMutation(\"set-dispatch-approval-policy\", {\n onSuccess: () => toast.success(\"Approval policy updated\"),\n onError: (err) => toast.error(String(err)),\n });\n const approve = useActionMutation(\"approve-dispatch-change\", {\n onSuccess: () => toast.success(\"Change approved\"),\n onError: (err) => toast.error(String(err)),\n });\n const reject = useActionMutation(\"reject-dispatch-change\", {\n onSuccess: () => toast.success(\"Change rejected\"),\n onError: (err) => toast.error(String(err)),\n });\n\n return (\n <DispatchShell\n title=\"Approvals\"\n description=\"Review durable dispatch changes before they apply.\"\n >\n <div className=\"grid gap-4 xl:grid-cols-[minmax(0,0.9fr)_minmax(0,1.1fr)]\">\n <section className=\"rounded-2xl border bg-card p-5\">\n <h2 className=\"text-lg font-semibold text-foreground\">\n Approval policy\n </h2>\n {settingsQuery.isError ? (\n <ActionQueryError\n className=\"mt-4\"\n error={settingsQuery.error}\n onRetry={() => void settingsQuery.refetch()}\n />\n ) : (\n <div className=\"mt-4 space-y-4\">\n <label className=\"flex items-center justify-between rounded-xl border px-4 py-3\">\n <div>\n <div className=\"text-sm font-medium text-foreground\">\n Require approval for durable changes\n </div>\n <div className=\"mt-1 text-xs text-muted-foreground\">\n {hasOrg\n ? \"Applies to saved destinations, shared dream proposals, All-app workspace resources, and dispatch settings.\"\n : \"Requires a team workspace. Set one up on the Team page.\"}\n </div>\n </div>\n <Switch\n checked={settings?.enabled || false}\n disabled={!hasOrg || savePolicy.isPending}\n onCheckedChange={(checked) =>\n savePolicy.mutate({\n enabled: checked,\n approverEmails: settings?.approverEmails || approverList,\n })\n }\n />\n </label>\n <div className=\"space-y-2\">\n <div className=\"text-sm font-medium text-foreground\">\n Approver emails\n </div>\n <Input\n value={emails}\n onChange={(event) => setEmails(event.target.value)}\n placeholder={(settings?.approverEmails || []).join(\", \")}\n disabled={!hasOrg}\n />\n <Button\n className=\"w-full\"\n variant=\"outline\"\n disabled={!hasOrg || savePolicy.isPending}\n onClick={() =>\n savePolicy.mutate({\n enabled: settings?.enabled || false,\n approverEmails: approverList,\n })\n }\n >\n Save approvers\n </Button>\n </div>\n </div>\n )}\n </section>\n\n <section className=\"rounded-2xl border bg-card p-5\">\n <h2 className=\"text-lg font-semibold text-foreground\">\n Pending and recent requests\n </h2>\n {approvalsQuery.isError ? (\n <ActionQueryError\n className=\"mt-4\"\n error={approvalsQuery.error}\n onRetry={() => void approvalsQuery.refetch()}\n />\n ) : (\n <div className=\"mt-4 space-y-3\">\n {(approvals || []).map((approval: any) => (\n <div\n key={approval.id}\n className=\"rounded-xl border bg-muted/30 px-4 py-3\"\n >\n <div className=\"flex items-start justify-between gap-3\">\n <div>\n <div className=\"text-sm font-medium text-foreground\">\n {approval.summary}\n </div>\n <div className=\"mt-1 text-xs text-muted-foreground\">\n {approval.status} · requested by {approval.requestedBy}\n </div>\n </div>\n {approval.status === \"pending\" && (\n <div className=\"flex gap-2\">\n <Button\n size=\"sm\"\n onClick={() => approve.mutate({ id: approval.id })}\n >\n Approve\n </Button>\n <Button\n size=\"sm\"\n variant=\"outline\"\n onClick={() =>\n reject.mutate({\n id: approval.id,\n reason: \"Rejected in dispatch UI\",\n })\n }\n >\n Reject\n </Button>\n </div>\n )}\n </div>\n </div>\n ))}\n {(approvals?.length || 0) === 0 && (\n <div className=\"rounded-xl border border-dashed px-4 py-8 text-sm text-muted-foreground\">\n No approval requests yet.\n </div>\n )}\n </div>\n )}\n </section>\n </div>\n </DispatchShell>\n );\n}\n"]}
1
+ {"version":3,"file":"approvals.js","sourceRoot":"","sources":["../../../src/routes/pages/approvals.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,MAAM,UAAU,IAAI;IAClB,OAAO,CAAC,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,cAAc;IACpC,MAAM,aAAa,GAAG,cAAc,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;IAClE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EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,wBAG3C,EACT,KAAC,MAAM,IACL,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,GAAG,EAAE,CACZ,MAAM,CAAC,MAAM,CAAC;4DACZ,EAAE,EAAE,QAAQ,CAAC,EAAE;4DACf,MAAM,EAAE,yBAAyB;yDAClC,CAAC,uBAIG,IACL,CACP,IACG,IAlCD,QAAQ,CAAC,EAAE,CAmCZ,CACP,CAAC,EACD,CAAC,SAAS,EAAE,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CACjC,cAAK,SAAS,EAAC,yEAAyE,0CAElF,CACP,IACG,CACP,IACO,IACN,GACQ,CACjB,CAAC;AACJ,CAAC","sourcesContent":["import {\n useActionMutation,\n useActionQuery,\n} from \"@agent-native/core/client/hooks\";\nimport { useOrg } from \"@agent-native/core/client/org\";\nimport { useMemo, useState } from \"react\";\nimport { toast } from \"sonner\";\n\nimport { ActionQueryError } from \"../../components/action-query-error\";\nimport { DispatchShell } from \"../../components/dispatch-shell\";\nimport { Button } from \"../../components/ui/button\";\nimport { Input } from \"../../components/ui/input\";\nimport { Switch } from \"../../components/ui/switch\";\n\nexport function meta() {\n return [{ title: \"Approvals — Dispatch\" }];\n}\n\nexport default function ApprovalsRoute() {\n const settingsQuery = useActionQuery(\"get-dispatch-settings\", {});\n const approvalsQuery = useActionQuery(\"list-dispatch-approvals\", {});\n const { data: settings } = settingsQuery;\n const { data: approvals } = approvalsQuery;\n const { data: org } = useOrg();\n const hasOrg = !!org?.orgId;\n const [emails, setEmails] = useState(\"\");\n\n const approverList = useMemo(\n () =>\n emails\n .split(\",\")\n .map((value) => value.trim())\n .filter(Boolean),\n [emails],\n );\n\n const savePolicy = useActionMutation(\"set-dispatch-approval-policy\", {\n onSuccess: () => toast.success(\"Approval policy updated\"),\n onError: (err) => toast.error(String(err)),\n });\n const approve = useActionMutation(\"approve-dispatch-change\", {\n onSuccess: () => toast.success(\"Change approved\"),\n onError: (err) => toast.error(String(err)),\n });\n const reject = useActionMutation(\"reject-dispatch-change\", {\n onSuccess: () => toast.success(\"Change rejected\"),\n onError: (err) => toast.error(String(err)),\n });\n\n return (\n <DispatchShell\n title=\"Approvals\"\n description=\"Review durable dispatch changes before they apply.\"\n >\n <div className=\"grid gap-4 xl:grid-cols-[minmax(0,0.9fr)_minmax(0,1.1fr)]\">\n <section className=\"rounded-2xl border bg-card p-5\">\n <h2 className=\"text-lg font-semibold text-foreground\">\n Approval policy\n </h2>\n {settingsQuery.isError ? (\n <ActionQueryError\n className=\"mt-4\"\n error={settingsQuery.error}\n onRetry={() => void settingsQuery.refetch()}\n />\n ) : (\n <div className=\"mt-4 space-y-4\">\n <label className=\"flex items-center justify-between rounded-xl border px-4 py-3\">\n <div>\n <div className=\"text-sm font-medium text-foreground\">\n Require approval for durable changes\n </div>\n <div className=\"mt-1 text-xs text-muted-foreground\">\n {hasOrg\n ? \"Applies to saved destinations, shared dream proposals, All-app agent resources, and dispatch settings.\"\n : \"Requires a team workspace. Set one up on the Team page.\"}\n </div>\n </div>\n <Switch\n checked={settings?.enabled || false}\n disabled={!hasOrg || savePolicy.isPending}\n onCheckedChange={(checked) =>\n savePolicy.mutate({\n enabled: checked,\n approverEmails: settings?.approverEmails || approverList,\n })\n }\n />\n </label>\n <div className=\"space-y-2\">\n <div className=\"text-sm font-medium text-foreground\">\n Approver emails\n </div>\n <Input\n value={emails}\n onChange={(event) => setEmails(event.target.value)}\n placeholder={(settings?.approverEmails || []).join(\", \")}\n disabled={!hasOrg}\n />\n <Button\n className=\"w-full\"\n variant=\"outline\"\n disabled={!hasOrg || savePolicy.isPending}\n onClick={() =>\n savePolicy.mutate({\n enabled: settings?.enabled || false,\n approverEmails: approverList,\n })\n }\n >\n Save approvers\n </Button>\n </div>\n </div>\n )}\n </section>\n\n <section className=\"rounded-2xl border bg-card p-5\">\n <h2 className=\"text-lg font-semibold text-foreground\">\n Pending and recent requests\n </h2>\n {approvalsQuery.isError ? (\n <ActionQueryError\n className=\"mt-4\"\n error={approvalsQuery.error}\n onRetry={() => void approvalsQuery.refetch()}\n />\n ) : (\n <div className=\"mt-4 space-y-3\">\n {(approvals || []).map((approval: any) => (\n <div\n key={approval.id}\n className=\"rounded-xl border bg-muted/30 px-4 py-3\"\n >\n <div className=\"flex items-start justify-between gap-3\">\n <div>\n <div className=\"text-sm font-medium text-foreground\">\n {approval.summary}\n </div>\n <div className=\"mt-1 text-xs text-muted-foreground\">\n {approval.status} · requested by {approval.requestedBy}\n </div>\n </div>\n {approval.status === \"pending\" && (\n <div className=\"flex gap-2\">\n <Button\n size=\"sm\"\n onClick={() => approve.mutate({ id: approval.id })}\n >\n Approve\n </Button>\n <Button\n size=\"sm\"\n variant=\"outline\"\n onClick={() =>\n reject.mutate({\n id: approval.id,\n reason: \"Rejected in dispatch UI\",\n })\n }\n >\n Reject\n </Button>\n </div>\n )}\n </div>\n </div>\n ))}\n {(approvals?.length || 0) === 0 && (\n <div className=\"rounded-xl border border-dashed px-4 py-8 text-sm text-muted-foreground\">\n No approval requests yet.\n </div>\n )}\n </div>\n )}\n </section>\n </div>\n </DispatchShell>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../src/routes/pages/workspace.tsx"],"names":[],"mappings":"AAoEA,wBAAgB,IAAI;;IAEnB;AAq7BD,MAAM,CAAC,OAAO,UAAU,cAAc,oDA+JrC"}
1
+ {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../src/routes/pages/workspace.tsx"],"names":[],"mappings":"AAoEA,wBAAgB,IAAI;;IAEnB;AAs7BD,MAAM,CAAC,OAAO,UAAU,cAAc,oDA+JrC"}
@@ -17,7 +17,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger, } from "../../components/ui/t
17
17
  import { Textarea } from "../../components/ui/textarea.js";
18
18
  import { ImpactPreview, workspaceResourceMutationMessage, } from "../../components/workspace-resource-impact-preview.js";
19
19
  export function meta() {
20
- return [{ title: "Workspace Resources — Dispatch" }];
20
+ return [{ title: "Agent Resources — Dispatch" }];
21
21
  }
22
22
  const KIND_CONFIG = {
23
23
  skill: {
@@ -168,7 +168,7 @@ function EditResourceDialog({ resource, trigger, }) {
168
168
  },
169
169
  onError: (err) => toast.error(String(err)),
170
170
  });
171
- return (_jsxs(Dialog, { open: open, onOpenChange: setOpen, children: [_jsx(DialogTrigger, { asChild: true, children: trigger || (_jsxs(Button, { variant: "outline", size: "sm", children: [_jsx(IconEdit, { size: 14, className: "mr-1.5" }), "Edit"] })) }), _jsxs(DialogContent, { className: "max-w-2xl", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Edit workspace resource" }), _jsx(DialogDescription, { children: "Updates apply immediately anywhere this workspace resource is inherited. App shared or personal resources can override it locally." })] }), _jsxs("div", { className: "space-y-4 py-2", children: [_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Name" }), _jsx(Input, { value: name, onChange: (e) => setName(e.target.value) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Scope" }), _jsxs(Select, { value: scope, onValueChange: setScope, children: [_jsx(SelectTrigger, { children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "all", children: "All apps" }), _jsx(SelectItem, { value: "selected", children: "Selected apps only" })] })] })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Path" }), _jsx(Input, { value: resource.path, disabled: true, className: "font-mono text-sm" })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Description" }), _jsx(Input, { value: description, onChange: (e) => setDescription(e.target.value) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Content" }), _jsx(Textarea, { value: content, onChange: (e) => setContent(e.target.value), rows: 14, className: "font-mono text-sm" })] }), _jsx(ImpactPreview, { operation: "update", resourceId: resource.id, scope: scope, enabled: open })] }), _jsx(DialogFooter, { children: _jsx(Button, { onClick: () => update.mutate({
171
+ return (_jsxs(Dialog, { open: open, onOpenChange: setOpen, children: [_jsx(DialogTrigger, { asChild: true, children: trigger || (_jsxs(Button, { variant: "outline", size: "sm", children: [_jsx(IconEdit, { size: 14, className: "mr-1.5" }), "Edit"] })) }), _jsxs(DialogContent, { className: "max-w-2xl", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Edit agent resource" }), _jsx(DialogDescription, { children: "Updates apply immediately anywhere this agent resource is inherited. App shared or personal resources can override it locally." })] }), _jsxs("div", { className: "space-y-4 py-2", children: [_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Name" }), _jsx(Input, { value: name, onChange: (e) => setName(e.target.value) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Scope" }), _jsxs(Select, { value: scope, onValueChange: setScope, children: [_jsx(SelectTrigger, { children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "all", children: "All apps" }), _jsx(SelectItem, { value: "selected", children: "Selected apps only" })] })] })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Path" }), _jsx(Input, { value: resource.path, disabled: true, className: "font-mono text-sm" })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Description" }), _jsx(Input, { value: description, onChange: (e) => setDescription(e.target.value) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Content" }), _jsx(Textarea, { value: content, onChange: (e) => setContent(e.target.value), rows: 14, className: "font-mono text-sm" })] }), _jsx(ImpactPreview, { operation: "update", resourceId: resource.id, scope: scope, enabled: open })] }), _jsx(DialogFooter, { children: _jsx(Button, { onClick: () => update.mutate({
172
172
  id: resource.id,
173
173
  name,
174
174
  description,
@@ -197,7 +197,7 @@ function AddResourceDialog() {
197
197
  },
198
198
  onError: (err) => toast.error(String(err)),
199
199
  });
200
- return (_jsxs(Dialog, { open: open, onOpenChange: setOpen, children: [_jsx(DialogTrigger, { asChild: true, children: _jsxs(Button, { children: [_jsx(IconPlus, { size: 16, className: "mr-1.5" }), "Add resource"] }) }), _jsxs(DialogContent, { className: "max-w-2xl", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Add workspace resource" }), _jsx(DialogDescription, { children: "Create a skill, instruction, agent profile, reference resource, or MCP server that can be shared across workspace apps." })] }), _jsxs("div", { className: "space-y-4 py-2", children: [_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Kind" }), _jsxs(Select, { value: kind, onValueChange: setKind, children: [_jsx(SelectTrigger, { children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "skill", children: "Skill" }), _jsx(SelectItem, { value: "instruction", children: "Instruction" }), _jsx(SelectItem, { value: "agent", children: "Agent" }), _jsx(SelectItem, { value: "knowledge", children: "Knowledge pack" }), _jsx(SelectItem, { value: "mcp-server", children: "MCP server" })] })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Scope" }), _jsxs(Select, { value: scope, onValueChange: setScope, children: [_jsx(SelectTrigger, { children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "all", children: "All apps" }), _jsx(SelectItem, { value: "selected", children: "Selected apps only" })] })] })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Name" }), _jsx(Input, { placeholder: kind === "skill"
200
+ return (_jsxs(Dialog, { open: open, onOpenChange: setOpen, children: [_jsx(DialogTrigger, { asChild: true, children: _jsxs(Button, { children: [_jsx(IconPlus, { size: 16, className: "mr-1.5" }), "Add resource"] }) }), _jsxs(DialogContent, { className: "max-w-2xl", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Add agent resource" }), _jsx(DialogDescription, { children: "Create an agent resource\u2014a skill, instruction, agent profile, reference resource, or MCP server\u2014that can be shared across workspace apps." })] }), _jsxs("div", { className: "space-y-4 py-2", children: [_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Kind" }), _jsxs(Select, { value: kind, onValueChange: setKind, children: [_jsx(SelectTrigger, { children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "skill", children: "Skill" }), _jsx(SelectItem, { value: "instruction", children: "Instruction" }), _jsx(SelectItem, { value: "agent", children: "Agent" }), _jsx(SelectItem, { value: "knowledge", children: "Knowledge pack" }), _jsx(SelectItem, { value: "mcp-server", children: "MCP server" })] })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Scope" }), _jsxs(Select, { value: scope, onValueChange: setScope, children: [_jsx(SelectTrigger, { children: _jsx(SelectValue, {}) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "all", children: "All apps" }), _jsx(SelectItem, { value: "selected", children: "Selected apps only" })] })] })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Name" }), _jsx(Input, { placeholder: kind === "skill"
201
201
  ? "Frontend Designer"
202
202
  : kind === "agent"
203
203
  ? "Research Specialist"
@@ -325,9 +325,9 @@ export default function WorkspaceRoute() {
325
325
  }
326
326
  return (_jsx("div", { className: "space-y-3", children: items.map((resource) => (_jsx(ResourceRow, { resource: resource, grants: grantsByResource[resource.id] || [] }, resource.id))) }));
327
327
  }
328
- return (_jsxs(DispatchShell, { title: "Workspace Resources", description: "Manage inherited workspace skills, guardrail instructions, agent profiles, reference resources, and MCP servers. All-app resources are available to every app without syncing.", children: [resourcesQuery.isError || grantsQuery.isError ? (_jsx(ActionQueryError, { error: resourcesQuery.error ?? grantsQuery.error, onRetry: () => {
328
+ return (_jsxs(DispatchShell, { title: "Agent Resources", description: "Manage inherited skills, guardrail instructions, agent profiles, reference resources, and MCP servers. All-app resources are available to every app without syncing.", children: [resourcesQuery.isError || grantsQuery.isError ? (_jsx(ActionQueryError, { error: resourcesQuery.error ?? grantsQuery.error, onRetry: () => {
329
329
  void resourcesQuery.refetch();
330
330
  void grantsQuery.refetch();
331
- } })) : null, _jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "text-sm text-muted-foreground", children: isLoading ? (_jsx(Skeleton, { className: "h-4 w-24" })) : (`${resources?.length || 0} resource${(resources?.length || 0) !== 1 ? "s" : ""}`) }), _jsx("div", { className: "flex gap-2", children: _jsx(AddResourceDialog, {}) })] }), !resourcesQuery.isError ? (_jsx(GlobalContextSection, { resources: resources || [] })) : null, !resourcesQuery.isError && !grantsQuery.isError ? (_jsxs(Tabs, { defaultValue: "skills", children: [_jsxs(TabsList, { children: [_jsxs(TabsTrigger, { value: "skills", children: ["Skills ", skills.length > 0 && `(${skills.length})`] }), _jsxs(TabsTrigger, { value: "instructions", children: ["Instructions", " ", instructions.length > 0 && `(${instructions.length})`] }), _jsxs(TabsTrigger, { value: "agents", children: ["Agents ", agents.length > 0 && `(${agents.length})`] }), _jsxs(TabsTrigger, { value: "knowledge", children: ["Knowledge ", knowledge.length > 0 && `(${knowledge.length})`] }), _jsxs(TabsTrigger, { value: "mcp", children: ["MCP ", mcpServers.length > 0 && `(${mcpServers.length})`] })] }), _jsx(TabsContent, { value: "skills", className: "mt-4", children: _jsx(ResourceList, { items: skills, emptyText: "No workspace skills yet. Add a skill to share agent guidance across apps." }) }), _jsx(TabsContent, { value: "instructions", className: "mt-4", children: _jsx(ResourceList, { items: instructions, emptyText: "No workspace instructions yet. Add instructions to set behavioral rules across apps." }) }), _jsx(TabsContent, { value: "agents", className: "mt-4", children: _jsx(ResourceList, { items: agents, emptyText: "No workspace agents yet. Add a reusable agent profile to share specialist agents across apps." }) }), _jsx(TabsContent, { value: "knowledge", className: "mt-4", children: _jsx(ResourceList, { items: knowledge, emptyText: "No knowledge packs yet. Add GTM, product, or domain context that apps can reuse." }) }), _jsx(TabsContent, { value: "mcp", className: "mt-4", children: _jsx(ResourceList, { items: mcpServers, emptyText: "No workspace MCP servers yet. Add an HTTP MCP server to share external tools across apps." }) })] })) : null] }));
331
+ } })) : null, _jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "text-sm text-muted-foreground", children: isLoading ? (_jsx(Skeleton, { className: "h-4 w-24" })) : (`${resources?.length || 0} resource${(resources?.length || 0) !== 1 ? "s" : ""}`) }), _jsx("div", { className: "flex gap-2", children: _jsx(AddResourceDialog, {}) })] }), !resourcesQuery.isError ? (_jsx(GlobalContextSection, { resources: resources || [] })) : null, !resourcesQuery.isError && !grantsQuery.isError ? (_jsxs(Tabs, { defaultValue: "skills", children: [_jsxs(TabsList, { children: [_jsxs(TabsTrigger, { value: "skills", children: ["Skills ", skills.length > 0 && `(${skills.length})`] }), _jsxs(TabsTrigger, { value: "instructions", children: ["Instructions", " ", instructions.length > 0 && `(${instructions.length})`] }), _jsxs(TabsTrigger, { value: "agents", children: ["Agents ", agents.length > 0 && `(${agents.length})`] }), _jsxs(TabsTrigger, { value: "knowledge", children: ["Knowledge ", knowledge.length > 0 && `(${knowledge.length})`] }), _jsxs(TabsTrigger, { value: "mcp", children: ["MCP ", mcpServers.length > 0 && `(${mcpServers.length})`] })] }), _jsx(TabsContent, { value: "skills", className: "mt-4", children: _jsx(ResourceList, { items: skills, emptyText: "No skills yet. Add a skill to share agent guidance across apps." }) }), _jsx(TabsContent, { value: "instructions", className: "mt-4", children: _jsx(ResourceList, { items: instructions, emptyText: "No instructions yet. Add instructions to set behavioral rules across apps." }) }), _jsx(TabsContent, { value: "agents", className: "mt-4", children: _jsx(ResourceList, { items: agents, emptyText: "No agent profiles yet. Add a reusable profile to share specialist agents across apps." }) }), _jsx(TabsContent, { value: "knowledge", className: "mt-4", children: _jsx(ResourceList, { items: knowledge, emptyText: "No knowledge packs yet. Add GTM, product, or domain context that apps can reuse." }) }), _jsx(TabsContent, { value: "mcp", className: "mt-4", children: _jsx(ResourceList, { items: mcpServers, emptyText: "No MCP servers yet. Add an HTTP MCP server to share external tools across apps." }) })] })) : null] }));
332
332
  }
333
333
  //# sourceMappingURL=workspace.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../src/routes/pages/workspace.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,eAAe,EACf,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACR,KAAK,GACN,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EACL,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EACL,MAAM,EACN,aAAa,EACb,UAAU,E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AAG,CAAC,IAAI,IAAI,UAAU,CAAC,MAAM,GAAG,IAC1C,IACL,EAEX,KAAC,WAAW,IAAC,KAAK,EAAC,QAAQ,EAAC,SAAS,EAAC,MAAM,YAC1C,KAAC,YAAY,IACX,KAAK,EAAE,MAAM,EACb,SAAS,EAAC,2EAA2E,GACrF,GACU,EAEd,KAAC,WAAW,IAAC,KAAK,EAAC,cAAc,EAAC,SAAS,EAAC,MAAM,YAChD,KAAC,YAAY,IACX,KAAK,EAAE,YAAY,EACnB,SAAS,EAAC,sFAAsF,GAChG,GACU,EAEd,KAAC,WAAW,IAAC,KAAK,EAAC,QAAQ,EAAC,SAAS,EAAC,MAAM,YAC1C,KAAC,YAAY,IACX,KAAK,EAAE,MAAM,EACb,SAAS,EAAC,+FAA+F,GACzG,GACU,EAEd,KAAC,WAAW,IAAC,KAAK,EAAC,WAAW,EAAC,SAAS,EAAC,MAAM,YAC7C,KAAC,YAAY,IACX,KAAK,EAAE,SAAS,EAChB,SAAS,EAAC,kFAAkF,GAC5F,GACU,EAEd,KAAC,WAAW,IAAC,KAAK,EAAC,KAAK,EAAC,SAAS,EAAC,MAAM,YACvC,KAAC,YAAY,IACX,KAAK,EAAE,UAAU,EACjB,SAAS,EAAC,2FAA2F,GACrG,GACU,IACT,CACR,CAAC,CAAC,CAAC,IAAI,IACM,CACjB,CAAC;AACJ,CAAC","sourcesContent":["import {\n useActionMutation,\n useActionQuery,\n} from \"@agent-native/core/client/hooks\";\nimport {\n IconAlertCircle,\n IconBook,\n IconChevronDown,\n IconChevronRight,\n IconCircleCheck,\n IconCode,\n IconEdit,\n IconFileText,\n IconPlus,\n IconPlugConnected,\n IconTrash,\n IconUser,\n IconX,\n} from \"@tabler/icons-react\";\nimport { useEffect, useState, type ReactNode } from \"react\";\nimport { toast } from \"sonner\";\n\nimport { ActionQueryError } from \"../../components/action-query-error\";\nimport { DispatchShell } from \"../../components/dispatch-shell\";\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from \"../../components/ui/alert-dialog\";\nimport { Badge } from \"../../components/ui/badge\";\nimport { Button } from \"../../components/ui/button\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"../../components/ui/dialog\";\nimport { Input } from \"../../components/ui/input\";\nimport { Label } from \"../../components/ui/label\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"../../components/ui/select\";\nimport { Skeleton } from \"../../components/ui/skeleton\";\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from \"../../components/ui/tabs\";\nimport { Textarea } from \"../../components/ui/textarea\";\nimport {\n ImpactPreview,\n workspaceResourceMutationMessage,\n} from \"../../components/workspace-resource-impact-preview\";\n\nexport function meta() {\n return [{ title: \"Workspace Resources — Dispatch\" }];\n}\n\nconst KIND_CONFIG = {\n skill: {\n label: \"Skill\",\n icon: IconCode,\n pathPrefix: \"skills/\",\n description:\n \"Agent skills - on-demand guidance available across workspace apps\",\n },\n instruction: {\n label: \"Instruction\",\n icon: IconBook,\n pathPrefix: \"instructions/\",\n description: \"Global instructions - guardrails loaded by every app agent\",\n },\n agent: {\n label: \"Agent\",\n icon: IconUser,\n pathPrefix: \"agents/\",\n description:\n \"Reusable agent profiles - specialist agents shared across apps\",\n },\n knowledge: {\n label: \"Knowledge\",\n icon: IconFileText,\n pathPrefix: \"context/\",\n description:\n \"Reference resources - brand, positioning, persona, and domain context\",\n },\n \"mcp-server\": {\n label: \"MCP Server\",\n icon: IconPlugConnected,\n pathPrefix: \"mcp-servers/\",\n description:\n \"HTTP MCP servers - external tools centrally granted to app agents\",\n },\n} as const;\n\nconst STARTER_GLOBAL_CONTEXT = [\n {\n path: \"context/company.md\",\n label: \"Company\",\n kind: \"knowledge\",\n description: \"Company facts, ICP, products, and canonical links\",\n },\n {\n path: \"context/brand.md\",\n label: \"Brand\",\n kind: \"knowledge\",\n description: \"Voice, visual identity, naming, and style rules\",\n },\n {\n path: \"context/messaging.md\",\n label: \"Messaging\",\n kind: \"knowledge\",\n description: \"Positioning, value props, proof points, and objections\",\n },\n {\n path: \"instructions/guardrails.md\",\n label: \"Guardrails\",\n kind: \"instruction\",\n description: \"Always-on rules loaded by every app agent\",\n },\n {\n path: \"skills/company-voice/SKILL.md\",\n label: \"Company Voice\",\n kind: \"skill\",\n description: \"On-demand guidance for customer-facing writing\",\n },\n] as const;\n\nfunction resourceSlug(value: string): string {\n return value\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\n\nfunction defaultResourcePath(kind: string, name: string): string {\n const slug = resourceSlug(name) || \"example\";\n if (kind === \"skill\") return `skills/${slug}/SKILL.md`;\n if (kind === \"instruction\") return `instructions/${slug}.md`;\n if (kind === \"agent\") return `agents/${slug}.md`;\n if (kind === \"knowledge\") return `context/${slug}.md`;\n if (kind === \"mcp-server\") return `mcp-servers/${slug}.json`;\n return `${slug}.md`;\n}\n\nfunction isAutoLoadedInstruction(resource: any): boolean {\n return (\n resource.kind === \"instruction\" &&\n (resource.path === \"AGENTS.md\" ||\n String(resource.path).startsWith(\"instructions/\"))\n );\n}\n\nfunction formatTimestamp(value?: number | null): string {\n if (!value) return \"Not present\";\n return new Date(value).toLocaleString();\n}\n\nfunction availabilityLabel(value?: string): string {\n switch (value) {\n case \"all-apps\":\n return \"Inherited by all apps\";\n case \"selected-granted\":\n return \"Granted to selected app\";\n case \"selected-not-granted\":\n return \"Not granted to this app\";\n case \"selected-no-app\":\n return \"Select an app to check grant\";\n case \"path-not-managed\":\n return \"Path is not a Dispatch resource\";\n default:\n return \"Checking availability\";\n }\n}\n\nfunction layerState(layer: any): {\n label: string;\n className: string;\n} {\n if (layer.effective) {\n return {\n label: \"Active\",\n className: \"border-green-500/30 bg-green-500/10 text-green-700\",\n };\n }\n if (layer.overridden) {\n return {\n label: \"Overridden\",\n className: \"border-amber-500/30 bg-amber-500/10 text-amber-700\",\n };\n }\n return {\n label: \"Missing\",\n className: \"text-muted-foreground\",\n };\n}\n\nfunction EditResourceDialog({\n resource,\n trigger,\n}: {\n resource: any;\n trigger?: ReactNode;\n}) {\n const [open, setOpen] = useState(false);\n const [name, setName] = useState(resource.name || \"\");\n const [description, setDescription] = useState(resource.description || \"\");\n const [content, setContent] = useState(resource.content || \"\");\n const [scope, setScope] = useState(resource.scope || \"all\");\n\n useEffect(() => {\n if (!open) return;\n setName(resource.name || \"\");\n setDescription(resource.description || \"\");\n setContent(resource.content || \"\");\n setScope(resource.scope || \"all\");\n }, [open, resource]);\n\n const update = useActionMutation(\"update-workspace-resource\", {\n onSuccess: (result: any) => {\n toast.success(\n workspaceResourceMutationMessage(result, \"Resource updated\"),\n );\n setOpen(false);\n },\n onError: (err) => toast.error(String(err)),\n });\n\n return (\n <Dialog open={open} onOpenChange={setOpen}>\n <DialogTrigger asChild>\n {trigger || (\n <Button variant=\"outline\" size=\"sm\">\n <IconEdit size={14} className=\"mr-1.5\" />\n Edit\n </Button>\n )}\n </DialogTrigger>\n <DialogContent className=\"max-w-2xl\">\n <DialogHeader>\n <DialogTitle>Edit workspace resource</DialogTitle>\n <DialogDescription>\n Updates apply immediately anywhere this workspace resource is\n inherited. App shared or personal resources can override it locally.\n </DialogDescription>\n </DialogHeader>\n <div className=\"space-y-4 py-2\">\n <div className=\"grid grid-cols-2 gap-4\">\n <div className=\"space-y-2\">\n <Label>Name</Label>\n <Input value={name} onChange={(e) => setName(e.target.value)} />\n </div>\n <div className=\"space-y-2\">\n <Label>Scope</Label>\n <Select value={scope} onValueChange={setScope}>\n <SelectTrigger>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"all\">All apps</SelectItem>\n <SelectItem value=\"selected\">Selected apps only</SelectItem>\n </SelectContent>\n </Select>\n </div>\n </div>\n <div className=\"space-y-2\">\n <Label>Path</Label>\n <Input\n value={resource.path}\n disabled\n className=\"font-mono text-sm\"\n />\n </div>\n <div className=\"space-y-2\">\n <Label>Description</Label>\n <Input\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n />\n </div>\n <div className=\"space-y-2\">\n <Label>Content</Label>\n <Textarea\n value={content}\n onChange={(e) => setContent(e.target.value)}\n rows={14}\n className=\"font-mono text-sm\"\n />\n </div>\n <ImpactPreview\n operation=\"update\"\n resourceId={resource.id}\n scope={scope as \"all\" | \"selected\"}\n enabled={open}\n />\n </div>\n <DialogFooter>\n <Button\n onClick={() =>\n update.mutate({\n id: resource.id,\n name,\n description,\n content,\n scope: scope as \"all\" | \"selected\",\n })\n }\n disabled={!name.trim() || update.isPending}\n >\n {update.isPending ? \"Saving...\" : \"Save changes\"}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction AddResourceDialog() {\n const [open, setOpen] = useState(false);\n const [kind, setKind] = useState<string>(\"skill\");\n const [name, setName] = useState(\"\");\n const [description, setDescription] = useState(\"\");\n const [path, setPath] = useState(\"\");\n const [content, setContent] = useState(\"\");\n const [scope, setScope] = useState<string>(\"all\");\n\n const create = useActionMutation(\"create-workspace-resource\", {\n onSuccess: (result: any) => {\n toast.success(\n workspaceResourceMutationMessage(result, \"Resource created\"),\n );\n setOpen(false);\n setKind(\"skill\");\n setName(\"\");\n setDescription(\"\");\n setPath(\"\");\n setContent(\"\");\n setScope(\"all\");\n },\n onError: (err) => toast.error(String(err)),\n });\n\n return (\n <Dialog open={open} onOpenChange={setOpen}>\n <DialogTrigger asChild>\n <Button>\n <IconPlus size={16} className=\"mr-1.5\" />\n Add resource\n </Button>\n </DialogTrigger>\n <DialogContent className=\"max-w-2xl\">\n <DialogHeader>\n <DialogTitle>Add workspace resource</DialogTitle>\n <DialogDescription>\n Create a skill, instruction, agent profile, reference resource, or\n MCP server that can be shared across workspace apps.\n </DialogDescription>\n </DialogHeader>\n <div className=\"space-y-4 py-2\">\n <div className=\"grid grid-cols-2 gap-4\">\n <div className=\"space-y-2\">\n <Label>Kind</Label>\n <Select value={kind} onValueChange={setKind}>\n <SelectTrigger>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"skill\">Skill</SelectItem>\n <SelectItem value=\"instruction\">Instruction</SelectItem>\n <SelectItem value=\"agent\">Agent</SelectItem>\n <SelectItem value=\"knowledge\">Knowledge pack</SelectItem>\n <SelectItem value=\"mcp-server\">MCP server</SelectItem>\n </SelectContent>\n </Select>\n </div>\n <div className=\"space-y-2\">\n <Label>Scope</Label>\n <Select value={scope} onValueChange={setScope}>\n <SelectTrigger>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"all\">All apps</SelectItem>\n <SelectItem value=\"selected\">Selected apps only</SelectItem>\n </SelectContent>\n </Select>\n </div>\n </div>\n <div className=\"space-y-2\">\n <Label>Name</Label>\n <Input\n placeholder={\n kind === \"skill\"\n ? \"Frontend Designer\"\n : kind === \"agent\"\n ? \"Research Specialist\"\n : kind === \"knowledge\"\n ? \"Core GTM Messaging\"\n : kind === \"mcp-server\"\n ? \"Zapier MCP\"\n : \"Code Style Guide\"\n }\n value={name}\n onChange={(e) => setName(e.target.value)}\n />\n </div>\n <div className=\"space-y-2\">\n <Label>Path</Label>\n <Input\n placeholder={defaultResourcePath(kind, name)}\n value={path}\n onChange={(e) => setPath(e.target.value)}\n className=\"font-mono text-sm\"\n />\n <p className=\"text-xs text-muted-foreground\">\n Skills use skills/name/SKILL.md. Guardrails in AGENTS.md or\n instructions/ auto-load in app chat. Reference resources in\n context/ are indexed so agents can read them when relevant. MCP\n server resources use mcp-servers/name.json and are loaded as HTTP\n MCP tools.\n </p>\n </div>\n <div className=\"space-y-2\">\n <Label>Description (optional)</Label>\n <Input\n placeholder=\"Short description of what this resource does\"\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n />\n </div>\n <div className=\"space-y-2\">\n <Label>Content</Label>\n <Textarea\n placeholder={\n kind === \"skill\"\n ? \"---\\nname: my-skill\\ndescription: What this skill teaches\\n---\\n\\n# My Skill\\n\\n...\"\n : kind === \"agent\"\n ? \"---\\nname: Research Specialist\\ndescription: Handles research tasks\\n---\\n\\n# Instructions\\n\\n...\"\n : kind === \"knowledge\"\n ? \"# Core GTM Messaging\\n\\n## Positioning\\n\\n## ICP\\n\\n## Proof points\\n\\n## Source\\n\\n\"\n : kind === \"mcp-server\"\n ? '{\\n \"type\": \"http\",\\n \"url\": \"https://example.com/mcp\",\\n \"headers\": {\\n \"Authorization\": \"Bearer ${keys.MCP_SERVER_TOKEN}\"\\n },\\n \"description\": \"Shared MCP tools for workspace apps\"\\n}\\n'\n : \"# Instructions\\n\\nAlways-on guardrails for agents across apps...\"\n }\n value={content}\n onChange={(e) => setContent(e.target.value)}\n rows={12}\n className=\"font-mono text-sm\"\n />\n </div>\n <ImpactPreview\n operation=\"create\"\n path={path || defaultResourcePath(kind, name)}\n scope={scope as \"all\" | \"selected\"}\n enabled={open && Boolean(name.trim())}\n />\n </div>\n <DialogFooter>\n <Button\n onClick={() =>\n create.mutate({\n kind: kind as\n | \"skill\"\n | \"instruction\"\n | \"agent\"\n | \"knowledge\"\n | \"mcp-server\",\n name,\n description: description || undefined,\n path: path || defaultResourcePath(kind, name),\n content,\n scope: scope as \"all\" | \"selected\",\n })\n }\n disabled={!name || !content || create.isPending}\n >\n {create.isPending ? \"Creating...\" : \"Create resource\"}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction GrantDialog({\n resourceId,\n resourceName,\n}: {\n resourceId: string;\n resourceName: string;\n}) {\n const [open, setOpen] = useState(false);\n const [appId, setAppId] = useState(\"\");\n const { data: catalog } = useActionQuery(\"list-integrations-catalog\", {});\n\n const grant = useActionMutation(\"create-workspace-resource-grant\", {\n onSuccess: () => {\n toast.success(`Granted to ${appId}`);\n setOpen(false);\n setAppId(\"\");\n },\n onError: (err) => toast.error(String(err)),\n });\n\n const apps = (catalog || []).map((a: any) => ({\n id: a.appId,\n name: a.appName,\n }));\n\n return (\n <Dialog open={open} onOpenChange={setOpen}>\n <DialogTrigger asChild>\n <Button variant=\"outline\" size=\"sm\">\n <IconPlus size={14} className=\"mr-1\" />\n Grant\n </Button>\n </DialogTrigger>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Grant \"{resourceName}\" to an app</DialogTitle>\n <DialogDescription>\n Choose which app should receive this resource.\n </DialogDescription>\n </DialogHeader>\n <div className=\"py-2\">\n <Select value={appId} onValueChange={setAppId}>\n <SelectTrigger>\n <SelectValue placeholder=\"Select an app...\" />\n </SelectTrigger>\n <SelectContent>\n {apps.map((app: any) => (\n <SelectItem key={app.id} value={app.id}>\n {app.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <DialogFooter>\n <Button\n onClick={() => grant.mutate({ resourceId, appId })}\n disabled={!appId || grant.isPending}\n >\n {grant.isPending ? \"Granting...\" : \"Grant access\"}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction EffectiveContextPreview({ resource }: { resource: any }) {\n const [appId, setAppId] = useState(\"__any__\");\n const [userEmail, setUserEmail] = useState(\"\");\n const selectedAppId = appId === \"__any__\" ? undefined : appId;\n const normalizedUserEmail = userEmail.trim() || undefined;\n const { data: apps } = useActionQuery(\"list-workspace-apps\", {\n includeAgentCards: false,\n });\n const { data: context, isLoading } = useActionQuery(\n \"get-workspace-resource-effective-context\",\n {\n resourceId: resource.id,\n appId: selectedAppId,\n userEmail: normalizedUserEmail,\n },\n );\n\n const visibleApps = ((apps || []) as any[]).filter(\n (app) => !app.isDispatch && app.status !== \"pending\",\n );\n const layers = ((context as any)?.layers || []) as any[];\n const active = (context as any)?.effectiveResource;\n const availability = (context as any)?.availability;\n\n return (\n <div className=\"rounded-lg border bg-background p-3\">\n <div className=\"flex flex-wrap items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <h4 className=\"text-xs font-semibold uppercase text-muted-foreground\">\n Effective in app\n </h4>\n <p className=\"mt-1 text-xs leading-relaxed text-muted-foreground\">\n Preview the runtime stack for this path: workspace default,\n organization/app override, then personal override.\n </p>\n </div>\n <Badge variant=\"outline\">{availabilityLabel(availability)}</Badge>\n </div>\n\n <div className=\"mt-3 grid gap-3 md:grid-cols-2\">\n <div className=\"space-y-2\">\n <Label htmlFor={`resource-app-${resource.id}`}>App</Label>\n <Select value={appId} onValueChange={setAppId}>\n <SelectTrigger id={`resource-app-${resource.id}`}>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"__any__\">Any app</SelectItem>\n {visibleApps.map((app) => (\n <SelectItem key={app.id} value={app.id}>\n {app.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"space-y-2\">\n <Label htmlFor={`resource-user-${resource.id}`}>User email</Label>\n <Input\n id={`resource-user-${resource.id}`}\n value={userEmail}\n onChange={(event) => setUserEmail(event.target.value)}\n placeholder=\"Current Dispatch user\"\n />\n </div>\n </div>\n\n {resource.scope === \"selected\" ? (\n <div className=\"mt-3 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs leading-relaxed text-amber-800 dark:text-amber-200\">\n Selected resources are app-specific exceptions. Use All apps for\n company-wide context that should be inherited everywhere without copy\n or sync.\n </div>\n ) : null}\n\n {isLoading ? (\n <div className=\"mt-3 grid gap-2 md:grid-cols-3\">\n {Array.from({ length: 3 }).map((_, index) => (\n <Skeleton key={index} className=\"h-28 rounded-lg\" />\n ))}\n </div>\n ) : (\n <div className=\"mt-3 grid gap-2 md:grid-cols-3\">\n {layers.map((layer) => {\n const state = layerState(layer);\n return (\n <div key={layer.scope} className=\"rounded-lg border p-3\">\n <div className=\"flex items-start justify-between gap-2\">\n <span className=\"text-sm font-medium text-foreground\">\n {layer.label}\n </span>\n <Badge variant=\"outline\" className={state.className}>\n {state.label}\n </Badge>\n </div>\n <div className=\"mt-2 truncate font-mono text-[11px] text-muted-foreground\">\n {layer.owner}\n </div>\n {layer.resource ? (\n <div className=\"mt-2 space-y-1 text-xs text-muted-foreground\">\n <div className=\"truncate font-mono\">\n {layer.resource.path}\n </div>\n <div>{formatTimestamp(layer.resource.updatedAt)}</div>\n </div>\n ) : (\n <p className=\"mt-2 text-xs text-muted-foreground\">\n No resource exists at this layer.\n </p>\n )}\n </div>\n );\n })}\n </div>\n )}\n\n <div className=\"mt-3 rounded-md bg-muted/40 px-3 py-2 text-xs text-muted-foreground\">\n {active ? (\n <>\n Active file:{\" \"}\n <span className=\"font-mono text-foreground\">\n {active.owner}/{active.path}\n </span>\n </>\n ) : (\n \"No active resource exists for this path yet.\"\n )}\n </div>\n </div>\n );\n}\n\nfunction ResourceRow({ resource, grants }: { resource: any; grants: any[] }) {\n const [expanded, setExpanded] = useState(false);\n\n const deleteResource = useActionMutation(\"delete-workspace-resource\", {\n onSuccess: (result: any) =>\n toast.success(\n workspaceResourceMutationMessage(result, \"Resource deleted\"),\n ),\n onError: (err) => toast.error(String(err)),\n });\n const revokeGrant = useActionMutation(\"revoke-workspace-resource-grant\", {\n onSuccess: () => toast.success(\"Grant revoked\"),\n onError: (err) => toast.error(String(err)),\n });\n\n const kindInfo = KIND_CONFIG[resource.kind as keyof typeof KIND_CONFIG];\n const KindIcon = kindInfo?.icon || IconCode;\n const activeGrants = grants.filter((g) => g.status === \"active\");\n\n return (\n <div className=\"rounded-lg border bg-card\">\n <button\n type=\"button\"\n className=\"flex w-full items-center gap-3 px-4 py-3 text-left cursor-pointer\"\n onClick={() => setExpanded(!expanded)}\n >\n {expanded ? (\n <IconChevronDown size={16} className=\"text-muted-foreground\" />\n ) : (\n <IconChevronRight size={16} className=\"text-muted-foreground\" />\n )}\n <KindIcon size={16} className=\"text-muted-foreground\" />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm font-medium text-foreground\">\n {resource.name}\n </span>\n <Badge variant=\"secondary\" className=\"text-xs\">\n {kindInfo?.label || resource.kind}\n </Badge>\n <Badge\n variant=\"outline\"\n className={\n resource.scope === \"all\"\n ? \"text-xs bg-green-500/10 text-green-700 dark:text-green-400\"\n : \"text-xs\"\n }\n >\n {resource.scope === \"all\" ? \"All apps\" : \"Selected\"}\n </Badge>\n {isAutoLoadedInstruction(resource) && (\n <Badge variant=\"outline\" className=\"text-xs\">\n Auto-loaded\n </Badge>\n )}\n </div>\n <div className=\"mt-0.5 font-mono text-xs text-muted-foreground\">\n {resource.path}\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n {resource.scope === \"selected\" && (\n <Badge variant=\"outline\" className=\"text-xs\">\n {activeGrants.length} grant\n {activeGrants.length !== 1 ? \"s\" : \"\"}\n </Badge>\n )}\n </div>\n </button>\n\n {expanded && (\n <div className=\"border-t px-4 py-3 space-y-3\">\n {resource.description && (\n <p className=\"text-sm text-muted-foreground\">\n {resource.description}\n </p>\n )}\n\n <div className=\"rounded-lg border bg-muted/30 p-3\">\n <pre className=\"whitespace-pre-wrap text-xs font-mono text-foreground max-h-64 overflow-y-auto\">\n {resource.content}\n </pre>\n </div>\n\n <EffectiveContextPreview resource={resource} />\n\n {resource.scope === \"selected\" && (\n <div className=\"space-y-2\">\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs font-medium text-foreground\">\n Grants\n </span>\n <GrantDialog\n resourceId={resource.id}\n resourceName={resource.name}\n />\n </div>\n {activeGrants.length > 0 ? (\n <div className=\"space-y-1.5\">\n {activeGrants.map((grant: any) => (\n <div\n key={grant.id}\n className=\"flex items-center justify-between rounded-lg border px-3 py-2\"\n >\n <div>\n <span className=\"text-sm font-medium text-foreground\">\n {grant.appId}\n </span>\n <span className=\"ml-2 text-xs text-muted-foreground\">\n selected grant\n </span>\n </div>\n <div className=\"flex gap-1.5\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={() =>\n revokeGrant.mutate({ grantId: grant.id })\n }\n disabled={revokeGrant.isPending}\n >\n <IconX size={14} />\n </Button>\n </div>\n </div>\n ))}\n </div>\n ) : (\n <div className=\"rounded-lg border border-dashed px-3 py-4 text-center text-xs text-muted-foreground\">\n No grants yet. Grant this resource to specific apps.\n </div>\n )}\n </div>\n )}\n\n <div className=\"flex justify-between border-t pt-3\">\n <div className=\"text-xs text-muted-foreground\">\n Created by {resource.createdBy} ·{\" \"}\n {new Date(resource.createdAt).toLocaleString()}\n </div>\n <div className=\"flex gap-2\">\n <EditResourceDialog resource={resource} />\n <AlertDialog>\n <AlertDialogTrigger asChild>\n <Button\n variant=\"destructive\"\n size=\"sm\"\n disabled={deleteResource.isPending}\n >\n <IconTrash size={14} className=\"mr-1\" />\n Delete\n </Button>\n </AlertDialogTrigger>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Delete this resource?</AlertDialogTitle>\n <AlertDialogDescription>\n Removing \"{resource.name}\" revokes all of its grants and\n removes inherited workspace access immediately. This\n cannot be undone.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <ImpactPreview\n operation=\"delete\"\n resourceId={resource.id}\n enabled\n />\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction\n onClick={() => deleteResource.mutate({ id: resource.id })}\n >\n Delete resource\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </div>\n </div>\n </div>\n )}\n </div>\n );\n}\n\nfunction GlobalContextSection({ resources }: { resources: any[] }) {\n const byPath = new Map(\n resources.map((resource) => [resource.path, resource]),\n );\n const missingPaths = STARTER_GLOBAL_CONTEXT.filter(\n (item) => !byPath.has(item.path),\n ).map((item) => item.path);\n const presentCount = STARTER_GLOBAL_CONTEXT.length - missingPaths.length;\n const restoreStarter = useActionMutation(\n \"restore-starter-workspace-resources\",\n {\n onSuccess: (result: any) => {\n const restored = result?.restored?.length ?? 0;\n const existing = result?.existing?.length ?? 0;\n toast.success(\n restored > 0\n ? `Restored ${restored} starter resource${restored === 1 ? \"\" : \"s\"}`\n : `Starter resources already present (${existing})`,\n );\n },\n onError: (err) => toast.error(String(err)),\n },\n );\n\n return (\n <section className=\"space-y-3\">\n <div className=\"flex items-center justify-between gap-3\">\n <div>\n <h2 className=\"text-sm font-semibold text-foreground\">\n Global context\n </h2>\n <p className=\"mt-1 text-xs text-muted-foreground\">\n Starter resources every workspace can use for company facts, brand,\n messaging, guardrails, and voice.\n </p>\n <p className=\"mt-1 text-xs text-muted-foreground\">\n All-app resources live once at workspace scope and are inherited by\n every app agent at runtime.\n </p>\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n {missingPaths.length > 0 ? (\n <Button\n size=\"sm\"\n variant=\"outline\"\n onClick={() => restoreStarter.mutate({ paths: missingPaths })}\n disabled={restoreStarter.isPending}\n >\n <IconPlus size={14} className=\"mr-1.5\" />\n {restoreStarter.isPending ? \"Restoring...\" : \"Restore missing\"}\n </Button>\n ) : null}\n <Badge variant=\"outline\">\n {presentCount}/{STARTER_GLOBAL_CONTEXT.length} ready\n </Badge>\n </div>\n </div>\n <div className=\"grid gap-3 md:grid-cols-2 xl:grid-cols-5\">\n {STARTER_GLOBAL_CONTEXT.map((item) => {\n const resource = byPath.get(item.path);\n const exists = !!resource;\n const global = resource?.scope === \"all\";\n return (\n <div key={item.path} className=\"rounded-lg border bg-card p-4\">\n <div className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <div className=\"flex items-center gap-2\">\n {exists ? (\n <IconCircleCheck\n size={15}\n className=\"shrink-0 text-green-600 dark:text-green-400\"\n />\n ) : (\n <IconAlertCircle\n size={15}\n className=\"shrink-0 text-amber-600 dark:text-amber-400\"\n />\n )}\n <h3 className=\"truncate text-sm font-medium text-foreground\">\n {item.label}\n </h3>\n </div>\n <p className=\"mt-1 line-clamp-2 text-xs text-muted-foreground\">\n {item.description}\n </p>\n </div>\n {resource ? (\n <EditResourceDialog\n resource={resource}\n trigger={\n <Button variant=\"ghost\" size=\"sm\" className=\"h-7 px-2\">\n <span className=\"sr-only\">Edit {item.label}</span>\n <IconEdit size={14} />\n </Button>\n }\n />\n ) : (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"h-7 px-2\"\n onClick={() =>\n restoreStarter.mutate({ paths: [item.path] })\n }\n disabled={restoreStarter.isPending}\n aria-label={`Restore ${item.label}`}\n >\n <IconPlus size={14} />\n </Button>\n )}\n </div>\n <div className=\"mt-3 space-y-2\">\n <div className=\"truncate font-mono text-[11px] text-muted-foreground\">\n {item.path}\n </div>\n <div className=\"flex flex-wrap gap-1.5\">\n <Badge variant={exists ? \"secondary\" : \"outline\"}>\n {exists ? \"Present\" : \"Missing\"}\n </Badge>\n {exists ? (\n <Badge variant=\"outline\">\n {global ? \"All apps\" : \"Selected\"}\n </Badge>\n ) : null}\n {resource && isAutoLoadedInstruction(resource) ? (\n <Badge variant=\"outline\">Auto-loaded</Badge>\n ) : null}\n </div>\n </div>\n </div>\n );\n })}\n </div>\n </section>\n );\n}\n\nexport default function WorkspaceRoute() {\n const resourcesQuery = useActionQuery(\"list-workspace-resources\", {});\n const grantsQuery = useActionQuery(\"list-workspace-resource-grants\", {});\n const { data: resources, isLoading } = resourcesQuery;\n const { data: grants } = grantsQuery;\n\n const grantsByResource = (grants || []).reduce(\n (acc: Record<string, any[]>, g: any) => {\n if (!acc[g.resourceId]) acc[g.resourceId] = [];\n acc[g.resourceId].push(g);\n return acc;\n },\n {} as Record<string, any[]>,\n );\n\n const skills = (resources || []).filter((r: any) => r.kind === \"skill\");\n const instructions = (resources || []).filter(\n (r: any) => r.kind === \"instruction\",\n );\n const agents = (resources || []).filter((r: any) => r.kind === \"agent\");\n const knowledge = (resources || []).filter(\n (r: any) => r.kind === \"knowledge\",\n );\n const mcpServers = (resources || []).filter(\n (r: any) => r.kind === \"mcp-server\",\n );\n\n function ResourceList({\n items,\n emptyText,\n }: {\n items: any[];\n emptyText: string;\n }) {\n if (isLoading && (resources ?? []).length === 0) {\n return (\n <div className=\"space-y-3\">\n {Array.from({ length: 3 }).map((_, index) => (\n <div\n key={index}\n className=\"rounded-lg border bg-card px-5 py-4 space-y-2\"\n >\n <Skeleton className=\"h-4 w-1/3\" />\n <Skeleton className=\"h-3 w-2/3\" />\n </div>\n ))}\n </div>\n );\n }\n if (items.length === 0) {\n return (\n <div className=\"rounded-lg border border-dashed px-6 py-12 text-center text-sm text-muted-foreground\">\n {emptyText}\n </div>\n );\n }\n return (\n <div className=\"space-y-3\">\n {items.map((resource: any) => (\n <ResourceRow\n key={resource.id}\n resource={resource}\n grants={grantsByResource[resource.id] || []}\n />\n ))}\n </div>\n );\n }\n\n return (\n <DispatchShell\n title=\"Workspace Resources\"\n description=\"Manage inherited workspace skills, guardrail instructions, agent profiles, reference resources, and MCP servers. All-app resources are available to every app without syncing.\"\n >\n {resourcesQuery.isError || grantsQuery.isError ? (\n <ActionQueryError\n error={resourcesQuery.error ?? grantsQuery.error}\n onRetry={() => {\n void resourcesQuery.refetch();\n void grantsQuery.refetch();\n }}\n />\n ) : null}\n <div className=\"flex items-center justify-between\">\n <div className=\"text-sm text-muted-foreground\">\n {isLoading ? (\n <Skeleton className=\"h-4 w-24\" />\n ) : (\n `${resources?.length || 0} resource${(resources?.length || 0) !== 1 ? \"s\" : \"\"}`\n )}\n </div>\n <div className=\"flex gap-2\">\n <AddResourceDialog />\n </div>\n </div>\n\n {!resourcesQuery.isError ? (\n <GlobalContextSection resources={resources || []} />\n ) : null}\n\n {!resourcesQuery.isError && !grantsQuery.isError ? (\n <Tabs defaultValue=\"skills\">\n <TabsList>\n <TabsTrigger value=\"skills\">\n Skills {skills.length > 0 && `(${skills.length})`}\n </TabsTrigger>\n <TabsTrigger value=\"instructions\">\n Instructions{\" \"}\n {instructions.length > 0 && `(${instructions.length})`}\n </TabsTrigger>\n <TabsTrigger value=\"agents\">\n Agents {agents.length > 0 && `(${agents.length})`}\n </TabsTrigger>\n <TabsTrigger value=\"knowledge\">\n Knowledge {knowledge.length > 0 && `(${knowledge.length})`}\n </TabsTrigger>\n <TabsTrigger value=\"mcp\">\n MCP {mcpServers.length > 0 && `(${mcpServers.length})`}\n </TabsTrigger>\n </TabsList>\n\n <TabsContent value=\"skills\" className=\"mt-4\">\n <ResourceList\n items={skills}\n emptyText=\"No workspace skills yet. Add a skill to share agent guidance across apps.\"\n />\n </TabsContent>\n\n <TabsContent value=\"instructions\" className=\"mt-4\">\n <ResourceList\n items={instructions}\n emptyText=\"No workspace instructions yet. Add instructions to set behavioral rules across apps.\"\n />\n </TabsContent>\n\n <TabsContent value=\"agents\" className=\"mt-4\">\n <ResourceList\n items={agents}\n emptyText=\"No workspace agents yet. Add a reusable agent profile to share specialist agents across apps.\"\n />\n </TabsContent>\n\n <TabsContent value=\"knowledge\" className=\"mt-4\">\n <ResourceList\n items={knowledge}\n emptyText=\"No knowledge packs yet. Add GTM, product, or domain context that apps can reuse.\"\n />\n </TabsContent>\n\n <TabsContent value=\"mcp\" className=\"mt-4\">\n <ResourceList\n items={mcpServers}\n emptyText=\"No workspace MCP servers yet. Add an HTTP MCP server to share external tools across apps.\"\n />\n </TabsContent>\n </Tabs>\n ) : null}\n </DispatchShell>\n );\n}\n"]}
1
+ {"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../src/routes/pages/workspace.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,eAAe,EACf,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACR,KAAK,GACN,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAi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SAAS,EAAC,MAAM,YACvC,KAAC,YAAY,IACX,KAAK,EAAE,UAAU,EACjB,SAAS,EAAC,iFAAiF,GAC3F,GACU,IACT,CACR,CAAC,CAAC,CAAC,IAAI,IACM,CACjB,CAAC;AACJ,CAAC","sourcesContent":["import {\n useActionMutation,\n useActionQuery,\n} from \"@agent-native/core/client/hooks\";\nimport {\n IconAlertCircle,\n IconBook,\n IconChevronDown,\n IconChevronRight,\n IconCircleCheck,\n IconCode,\n IconEdit,\n IconFileText,\n IconPlus,\n IconPlugConnected,\n IconTrash,\n IconUser,\n IconX,\n} from \"@tabler/icons-react\";\nimport { useEffect, useState, type ReactNode } from \"react\";\nimport { toast } from \"sonner\";\n\nimport { ActionQueryError } from \"../../components/action-query-error\";\nimport { DispatchShell } from \"../../components/dispatch-shell\";\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from \"../../components/ui/alert-dialog\";\nimport { Badge } from \"../../components/ui/badge\";\nimport { Button } from \"../../components/ui/button\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"../../components/ui/dialog\";\nimport { Input } from \"../../components/ui/input\";\nimport { Label } from \"../../components/ui/label\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"../../components/ui/select\";\nimport { Skeleton } from \"../../components/ui/skeleton\";\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from \"../../components/ui/tabs\";\nimport { Textarea } from \"../../components/ui/textarea\";\nimport {\n ImpactPreview,\n workspaceResourceMutationMessage,\n} from \"../../components/workspace-resource-impact-preview\";\n\nexport function meta() {\n return [{ title: \"Agent Resources — Dispatch\" }];\n}\n\nconst KIND_CONFIG = {\n skill: {\n label: \"Skill\",\n icon: IconCode,\n pathPrefix: \"skills/\",\n description:\n \"Agent skills - on-demand guidance available across workspace apps\",\n },\n instruction: {\n label: \"Instruction\",\n icon: IconBook,\n pathPrefix: \"instructions/\",\n description: \"Global instructions - guardrails loaded by every app agent\",\n },\n agent: {\n label: \"Agent\",\n icon: IconUser,\n pathPrefix: \"agents/\",\n description:\n \"Reusable agent profiles - specialist agents shared across apps\",\n },\n knowledge: {\n label: \"Knowledge\",\n icon: IconFileText,\n pathPrefix: \"context/\",\n description:\n \"Reference resources - brand, positioning, persona, and domain context\",\n },\n \"mcp-server\": {\n label: \"MCP Server\",\n icon: IconPlugConnected,\n pathPrefix: \"mcp-servers/\",\n description:\n \"HTTP MCP servers - external tools centrally granted to app agents\",\n },\n} as const;\n\nconst STARTER_GLOBAL_CONTEXT = [\n {\n path: \"context/company.md\",\n label: \"Company\",\n kind: \"knowledge\",\n description: \"Company facts, ICP, products, and canonical links\",\n },\n {\n path: \"context/brand.md\",\n label: \"Brand\",\n kind: \"knowledge\",\n description: \"Voice, visual identity, naming, and style rules\",\n },\n {\n path: \"context/messaging.md\",\n label: \"Messaging\",\n kind: \"knowledge\",\n description: \"Positioning, value props, proof points, and objections\",\n },\n {\n path: \"instructions/guardrails.md\",\n label: \"Guardrails\",\n kind: \"instruction\",\n description: \"Always-on rules loaded by every app agent\",\n },\n {\n path: \"skills/company-voice/SKILL.md\",\n label: \"Company Voice\",\n kind: \"skill\",\n description: \"On-demand guidance for customer-facing writing\",\n },\n] as const;\n\nfunction resourceSlug(value: string): string {\n return value\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\n\nfunction defaultResourcePath(kind: string, name: string): string {\n const slug = resourceSlug(name) || \"example\";\n if (kind === \"skill\") return `skills/${slug}/SKILL.md`;\n if (kind === \"instruction\") return `instructions/${slug}.md`;\n if (kind === \"agent\") return `agents/${slug}.md`;\n if (kind === \"knowledge\") return `context/${slug}.md`;\n if (kind === \"mcp-server\") return `mcp-servers/${slug}.json`;\n return `${slug}.md`;\n}\n\nfunction isAutoLoadedInstruction(resource: any): boolean {\n return (\n resource.kind === \"instruction\" &&\n (resource.path === \"AGENTS.md\" ||\n String(resource.path).startsWith(\"instructions/\"))\n );\n}\n\nfunction formatTimestamp(value?: number | null): string {\n if (!value) return \"Not present\";\n return new Date(value).toLocaleString();\n}\n\nfunction availabilityLabel(value?: string): string {\n switch (value) {\n case \"all-apps\":\n return \"Inherited by all apps\";\n case \"selected-granted\":\n return \"Granted to selected app\";\n case \"selected-not-granted\":\n return \"Not granted to this app\";\n case \"selected-no-app\":\n return \"Select an app to check grant\";\n case \"path-not-managed\":\n return \"Path is not a Dispatch resource\";\n default:\n return \"Checking availability\";\n }\n}\n\nfunction layerState(layer: any): {\n label: string;\n className: string;\n} {\n if (layer.effective) {\n return {\n label: \"Active\",\n className: \"border-green-500/30 bg-green-500/10 text-green-700\",\n };\n }\n if (layer.overridden) {\n return {\n label: \"Overridden\",\n className: \"border-amber-500/30 bg-amber-500/10 text-amber-700\",\n };\n }\n return {\n label: \"Missing\",\n className: \"text-muted-foreground\",\n };\n}\n\nfunction EditResourceDialog({\n resource,\n trigger,\n}: {\n resource: any;\n trigger?: ReactNode;\n}) {\n const [open, setOpen] = useState(false);\n const [name, setName] = useState(resource.name || \"\");\n const [description, setDescription] = useState(resource.description || \"\");\n const [content, setContent] = useState(resource.content || \"\");\n const [scope, setScope] = useState(resource.scope || \"all\");\n\n useEffect(() => {\n if (!open) return;\n setName(resource.name || \"\");\n setDescription(resource.description || \"\");\n setContent(resource.content || \"\");\n setScope(resource.scope || \"all\");\n }, [open, resource]);\n\n const update = useActionMutation(\"update-workspace-resource\", {\n onSuccess: (result: any) => {\n toast.success(\n workspaceResourceMutationMessage(result, \"Resource updated\"),\n );\n setOpen(false);\n },\n onError: (err) => toast.error(String(err)),\n });\n\n return (\n <Dialog open={open} onOpenChange={setOpen}>\n <DialogTrigger asChild>\n {trigger || (\n <Button variant=\"outline\" size=\"sm\">\n <IconEdit size={14} className=\"mr-1.5\" />\n Edit\n </Button>\n )}\n </DialogTrigger>\n <DialogContent className=\"max-w-2xl\">\n <DialogHeader>\n <DialogTitle>Edit agent resource</DialogTitle>\n <DialogDescription>\n Updates apply immediately anywhere this agent resource is inherited.\n App shared or personal resources can override it locally.\n </DialogDescription>\n </DialogHeader>\n <div className=\"space-y-4 py-2\">\n <div className=\"grid grid-cols-2 gap-4\">\n <div className=\"space-y-2\">\n <Label>Name</Label>\n <Input value={name} onChange={(e) => setName(e.target.value)} />\n </div>\n <div className=\"space-y-2\">\n <Label>Scope</Label>\n <Select value={scope} onValueChange={setScope}>\n <SelectTrigger>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"all\">All apps</SelectItem>\n <SelectItem value=\"selected\">Selected apps only</SelectItem>\n </SelectContent>\n </Select>\n </div>\n </div>\n <div className=\"space-y-2\">\n <Label>Path</Label>\n <Input\n value={resource.path}\n disabled\n className=\"font-mono text-sm\"\n />\n </div>\n <div className=\"space-y-2\">\n <Label>Description</Label>\n <Input\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n />\n </div>\n <div className=\"space-y-2\">\n <Label>Content</Label>\n <Textarea\n value={content}\n onChange={(e) => setContent(e.target.value)}\n rows={14}\n className=\"font-mono text-sm\"\n />\n </div>\n <ImpactPreview\n operation=\"update\"\n resourceId={resource.id}\n scope={scope as \"all\" | \"selected\"}\n enabled={open}\n />\n </div>\n <DialogFooter>\n <Button\n onClick={() =>\n update.mutate({\n id: resource.id,\n name,\n description,\n content,\n scope: scope as \"all\" | \"selected\",\n })\n }\n disabled={!name.trim() || update.isPending}\n >\n {update.isPending ? \"Saving...\" : \"Save changes\"}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction AddResourceDialog() {\n const [open, setOpen] = useState(false);\n const [kind, setKind] = useState<string>(\"skill\");\n const [name, setName] = useState(\"\");\n const [description, setDescription] = useState(\"\");\n const [path, setPath] = useState(\"\");\n const [content, setContent] = useState(\"\");\n const [scope, setScope] = useState<string>(\"all\");\n\n const create = useActionMutation(\"create-workspace-resource\", {\n onSuccess: (result: any) => {\n toast.success(\n workspaceResourceMutationMessage(result, \"Resource created\"),\n );\n setOpen(false);\n setKind(\"skill\");\n setName(\"\");\n setDescription(\"\");\n setPath(\"\");\n setContent(\"\");\n setScope(\"all\");\n },\n onError: (err) => toast.error(String(err)),\n });\n\n return (\n <Dialog open={open} onOpenChange={setOpen}>\n <DialogTrigger asChild>\n <Button>\n <IconPlus size={16} className=\"mr-1.5\" />\n Add resource\n </Button>\n </DialogTrigger>\n <DialogContent className=\"max-w-2xl\">\n <DialogHeader>\n <DialogTitle>Add agent resource</DialogTitle>\n <DialogDescription>\n Create an agent resource—a skill, instruction, agent profile,\n reference resource, or MCP server—that can be shared across\n workspace apps.\n </DialogDescription>\n </DialogHeader>\n <div className=\"space-y-4 py-2\">\n <div className=\"grid grid-cols-2 gap-4\">\n <div className=\"space-y-2\">\n <Label>Kind</Label>\n <Select value={kind} onValueChange={setKind}>\n <SelectTrigger>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"skill\">Skill</SelectItem>\n <SelectItem value=\"instruction\">Instruction</SelectItem>\n <SelectItem value=\"agent\">Agent</SelectItem>\n <SelectItem value=\"knowledge\">Knowledge pack</SelectItem>\n <SelectItem value=\"mcp-server\">MCP server</SelectItem>\n </SelectContent>\n </Select>\n </div>\n <div className=\"space-y-2\">\n <Label>Scope</Label>\n <Select value={scope} onValueChange={setScope}>\n <SelectTrigger>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"all\">All apps</SelectItem>\n <SelectItem value=\"selected\">Selected apps only</SelectItem>\n </SelectContent>\n </Select>\n </div>\n </div>\n <div className=\"space-y-2\">\n <Label>Name</Label>\n <Input\n placeholder={\n kind === \"skill\"\n ? \"Frontend Designer\"\n : kind === \"agent\"\n ? \"Research Specialist\"\n : kind === \"knowledge\"\n ? \"Core GTM Messaging\"\n : kind === \"mcp-server\"\n ? \"Zapier MCP\"\n : \"Code Style Guide\"\n }\n value={name}\n onChange={(e) => setName(e.target.value)}\n />\n </div>\n <div className=\"space-y-2\">\n <Label>Path</Label>\n <Input\n placeholder={defaultResourcePath(kind, name)}\n value={path}\n onChange={(e) => setPath(e.target.value)}\n className=\"font-mono text-sm\"\n />\n <p className=\"text-xs text-muted-foreground\">\n Skills use skills/name/SKILL.md. Guardrails in AGENTS.md or\n instructions/ auto-load in app chat. Reference resources in\n context/ are indexed so agents can read them when relevant. MCP\n server resources use mcp-servers/name.json and are loaded as HTTP\n MCP tools.\n </p>\n </div>\n <div className=\"space-y-2\">\n <Label>Description (optional)</Label>\n <Input\n placeholder=\"Short description of what this resource does\"\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n />\n </div>\n <div className=\"space-y-2\">\n <Label>Content</Label>\n <Textarea\n placeholder={\n kind === \"skill\"\n ? \"---\\nname: my-skill\\ndescription: What this skill teaches\\n---\\n\\n# My Skill\\n\\n...\"\n : kind === \"agent\"\n ? \"---\\nname: Research Specialist\\ndescription: Handles research tasks\\n---\\n\\n# Instructions\\n\\n...\"\n : kind === \"knowledge\"\n ? \"# Core GTM Messaging\\n\\n## Positioning\\n\\n## ICP\\n\\n## Proof points\\n\\n## Source\\n\\n\"\n : kind === \"mcp-server\"\n ? '{\\n \"type\": \"http\",\\n \"url\": \"https://example.com/mcp\",\\n \"headers\": {\\n \"Authorization\": \"Bearer ${keys.MCP_SERVER_TOKEN}\"\\n },\\n \"description\": \"Shared MCP tools for workspace apps\"\\n}\\n'\n : \"# Instructions\\n\\nAlways-on guardrails for agents across apps...\"\n }\n value={content}\n onChange={(e) => setContent(e.target.value)}\n rows={12}\n className=\"font-mono text-sm\"\n />\n </div>\n <ImpactPreview\n operation=\"create\"\n path={path || defaultResourcePath(kind, name)}\n scope={scope as \"all\" | \"selected\"}\n enabled={open && Boolean(name.trim())}\n />\n </div>\n <DialogFooter>\n <Button\n onClick={() =>\n create.mutate({\n kind: kind as\n | \"skill\"\n | \"instruction\"\n | \"agent\"\n | \"knowledge\"\n | \"mcp-server\",\n name,\n description: description || undefined,\n path: path || defaultResourcePath(kind, name),\n content,\n scope: scope as \"all\" | \"selected\",\n })\n }\n disabled={!name || !content || create.isPending}\n >\n {create.isPending ? \"Creating...\" : \"Create resource\"}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction GrantDialog({\n resourceId,\n resourceName,\n}: {\n resourceId: string;\n resourceName: string;\n}) {\n const [open, setOpen] = useState(false);\n const [appId, setAppId] = useState(\"\");\n const { data: catalog } = useActionQuery(\"list-integrations-catalog\", {});\n\n const grant = useActionMutation(\"create-workspace-resource-grant\", {\n onSuccess: () => {\n toast.success(`Granted to ${appId}`);\n setOpen(false);\n setAppId(\"\");\n },\n onError: (err) => toast.error(String(err)),\n });\n\n const apps = (catalog || []).map((a: any) => ({\n id: a.appId,\n name: a.appName,\n }));\n\n return (\n <Dialog open={open} onOpenChange={setOpen}>\n <DialogTrigger asChild>\n <Button variant=\"outline\" size=\"sm\">\n <IconPlus size={14} className=\"mr-1\" />\n Grant\n </Button>\n </DialogTrigger>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Grant \"{resourceName}\" to an app</DialogTitle>\n <DialogDescription>\n Choose which app should receive this resource.\n </DialogDescription>\n </DialogHeader>\n <div className=\"py-2\">\n <Select value={appId} onValueChange={setAppId}>\n <SelectTrigger>\n <SelectValue placeholder=\"Select an app...\" />\n </SelectTrigger>\n <SelectContent>\n {apps.map((app: any) => (\n <SelectItem key={app.id} value={app.id}>\n {app.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <DialogFooter>\n <Button\n onClick={() => grant.mutate({ resourceId, appId })}\n disabled={!appId || grant.isPending}\n >\n {grant.isPending ? \"Granting...\" : \"Grant access\"}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction EffectiveContextPreview({ resource }: { resource: any }) {\n const [appId, setAppId] = useState(\"__any__\");\n const [userEmail, setUserEmail] = useState(\"\");\n const selectedAppId = appId === \"__any__\" ? undefined : appId;\n const normalizedUserEmail = userEmail.trim() || undefined;\n const { data: apps } = useActionQuery(\"list-workspace-apps\", {\n includeAgentCards: false,\n });\n const { data: context, isLoading } = useActionQuery(\n \"get-workspace-resource-effective-context\",\n {\n resourceId: resource.id,\n appId: selectedAppId,\n userEmail: normalizedUserEmail,\n },\n );\n\n const visibleApps = ((apps || []) as any[]).filter(\n (app) => !app.isDispatch && app.status !== \"pending\",\n );\n const layers = ((context as any)?.layers || []) as any[];\n const active = (context as any)?.effectiveResource;\n const availability = (context as any)?.availability;\n\n return (\n <div className=\"rounded-lg border bg-background p-3\">\n <div className=\"flex flex-wrap items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <h4 className=\"text-xs font-semibold uppercase text-muted-foreground\">\n Effective in app\n </h4>\n <p className=\"mt-1 text-xs leading-relaxed text-muted-foreground\">\n Preview the runtime stack for this path: workspace default,\n organization/app override, then personal override.\n </p>\n </div>\n <Badge variant=\"outline\">{availabilityLabel(availability)}</Badge>\n </div>\n\n <div className=\"mt-3 grid gap-3 md:grid-cols-2\">\n <div className=\"space-y-2\">\n <Label htmlFor={`resource-app-${resource.id}`}>App</Label>\n <Select value={appId} onValueChange={setAppId}>\n <SelectTrigger id={`resource-app-${resource.id}`}>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"__any__\">Any app</SelectItem>\n {visibleApps.map((app) => (\n <SelectItem key={app.id} value={app.id}>\n {app.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"space-y-2\">\n <Label htmlFor={`resource-user-${resource.id}`}>User email</Label>\n <Input\n id={`resource-user-${resource.id}`}\n value={userEmail}\n onChange={(event) => setUserEmail(event.target.value)}\n placeholder=\"Current Dispatch user\"\n />\n </div>\n </div>\n\n {resource.scope === \"selected\" ? (\n <div className=\"mt-3 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs leading-relaxed text-amber-800 dark:text-amber-200\">\n Selected resources are app-specific exceptions. Use All apps for\n company-wide context that should be inherited everywhere without copy\n or sync.\n </div>\n ) : null}\n\n {isLoading ? (\n <div className=\"mt-3 grid gap-2 md:grid-cols-3\">\n {Array.from({ length: 3 }).map((_, index) => (\n <Skeleton key={index} className=\"h-28 rounded-lg\" />\n ))}\n </div>\n ) : (\n <div className=\"mt-3 grid gap-2 md:grid-cols-3\">\n {layers.map((layer) => {\n const state = layerState(layer);\n return (\n <div key={layer.scope} className=\"rounded-lg border p-3\">\n <div className=\"flex items-start justify-between gap-2\">\n <span className=\"text-sm font-medium text-foreground\">\n {layer.label}\n </span>\n <Badge variant=\"outline\" className={state.className}>\n {state.label}\n </Badge>\n </div>\n <div className=\"mt-2 truncate font-mono text-[11px] text-muted-foreground\">\n {layer.owner}\n </div>\n {layer.resource ? (\n <div className=\"mt-2 space-y-1 text-xs text-muted-foreground\">\n <div className=\"truncate font-mono\">\n {layer.resource.path}\n </div>\n <div>{formatTimestamp(layer.resource.updatedAt)}</div>\n </div>\n ) : (\n <p className=\"mt-2 text-xs text-muted-foreground\">\n No resource exists at this layer.\n </p>\n )}\n </div>\n );\n })}\n </div>\n )}\n\n <div className=\"mt-3 rounded-md bg-muted/40 px-3 py-2 text-xs text-muted-foreground\">\n {active ? (\n <>\n Active file:{\" \"}\n <span className=\"font-mono text-foreground\">\n {active.owner}/{active.path}\n </span>\n </>\n ) : (\n \"No active resource exists for this path yet.\"\n )}\n </div>\n </div>\n );\n}\n\nfunction ResourceRow({ resource, grants }: { resource: any; grants: any[] }) {\n const [expanded, setExpanded] = useState(false);\n\n const deleteResource = useActionMutation(\"delete-workspace-resource\", {\n onSuccess: (result: any) =>\n toast.success(\n workspaceResourceMutationMessage(result, \"Resource deleted\"),\n ),\n onError: (err) => toast.error(String(err)),\n });\n const revokeGrant = useActionMutation(\"revoke-workspace-resource-grant\", {\n onSuccess: () => toast.success(\"Grant revoked\"),\n onError: (err) => toast.error(String(err)),\n });\n\n const kindInfo = KIND_CONFIG[resource.kind as keyof typeof KIND_CONFIG];\n const KindIcon = kindInfo?.icon || IconCode;\n const activeGrants = grants.filter((g) => g.status === \"active\");\n\n return (\n <div className=\"rounded-lg border bg-card\">\n <button\n type=\"button\"\n className=\"flex w-full items-center gap-3 px-4 py-3 text-left cursor-pointer\"\n onClick={() => setExpanded(!expanded)}\n >\n {expanded ? (\n <IconChevronDown size={16} className=\"text-muted-foreground\" />\n ) : (\n <IconChevronRight size={16} className=\"text-muted-foreground\" />\n )}\n <KindIcon size={16} className=\"text-muted-foreground\" />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm font-medium text-foreground\">\n {resource.name}\n </span>\n <Badge variant=\"secondary\" className=\"text-xs\">\n {kindInfo?.label || resource.kind}\n </Badge>\n <Badge\n variant=\"outline\"\n className={\n resource.scope === \"all\"\n ? \"text-xs bg-green-500/10 text-green-700 dark:text-green-400\"\n : \"text-xs\"\n }\n >\n {resource.scope === \"all\" ? \"All apps\" : \"Selected\"}\n </Badge>\n {isAutoLoadedInstruction(resource) && (\n <Badge variant=\"outline\" className=\"text-xs\">\n Auto-loaded\n </Badge>\n )}\n </div>\n <div className=\"mt-0.5 font-mono text-xs text-muted-foreground\">\n {resource.path}\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n {resource.scope === \"selected\" && (\n <Badge variant=\"outline\" className=\"text-xs\">\n {activeGrants.length} grant\n {activeGrants.length !== 1 ? \"s\" : \"\"}\n </Badge>\n )}\n </div>\n </button>\n\n {expanded && (\n <div className=\"border-t px-4 py-3 space-y-3\">\n {resource.description && (\n <p className=\"text-sm text-muted-foreground\">\n {resource.description}\n </p>\n )}\n\n <div className=\"rounded-lg border bg-muted/30 p-3\">\n <pre className=\"whitespace-pre-wrap text-xs font-mono text-foreground max-h-64 overflow-y-auto\">\n {resource.content}\n </pre>\n </div>\n\n <EffectiveContextPreview resource={resource} />\n\n {resource.scope === \"selected\" && (\n <div className=\"space-y-2\">\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs font-medium text-foreground\">\n Grants\n </span>\n <GrantDialog\n resourceId={resource.id}\n resourceName={resource.name}\n />\n </div>\n {activeGrants.length > 0 ? (\n <div className=\"space-y-1.5\">\n {activeGrants.map((grant: any) => (\n <div\n key={grant.id}\n className=\"flex items-center justify-between rounded-lg border px-3 py-2\"\n >\n <div>\n <span className=\"text-sm font-medium text-foreground\">\n {grant.appId}\n </span>\n <span className=\"ml-2 text-xs text-muted-foreground\">\n selected grant\n </span>\n </div>\n <div className=\"flex gap-1.5\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={() =>\n revokeGrant.mutate({ grantId: grant.id })\n }\n disabled={revokeGrant.isPending}\n >\n <IconX size={14} />\n </Button>\n </div>\n </div>\n ))}\n </div>\n ) : (\n <div className=\"rounded-lg border border-dashed px-3 py-4 text-center text-xs text-muted-foreground\">\n No grants yet. Grant this resource to specific apps.\n </div>\n )}\n </div>\n )}\n\n <div className=\"flex justify-between border-t pt-3\">\n <div className=\"text-xs text-muted-foreground\">\n Created by {resource.createdBy} ·{\" \"}\n {new Date(resource.createdAt).toLocaleString()}\n </div>\n <div className=\"flex gap-2\">\n <EditResourceDialog resource={resource} />\n <AlertDialog>\n <AlertDialogTrigger asChild>\n <Button\n variant=\"destructive\"\n size=\"sm\"\n disabled={deleteResource.isPending}\n >\n <IconTrash size={14} className=\"mr-1\" />\n Delete\n </Button>\n </AlertDialogTrigger>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Delete this resource?</AlertDialogTitle>\n <AlertDialogDescription>\n Removing \"{resource.name}\" revokes all of its grants and\n removes inherited workspace access immediately. This\n cannot be undone.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <ImpactPreview\n operation=\"delete\"\n resourceId={resource.id}\n enabled\n />\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction\n onClick={() => deleteResource.mutate({ id: resource.id })}\n >\n Delete resource\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </div>\n </div>\n </div>\n )}\n </div>\n );\n}\n\nfunction GlobalContextSection({ resources }: { resources: any[] }) {\n const byPath = new Map(\n resources.map((resource) => [resource.path, resource]),\n );\n const missingPaths = STARTER_GLOBAL_CONTEXT.filter(\n (item) => !byPath.has(item.path),\n ).map((item) => item.path);\n const presentCount = STARTER_GLOBAL_CONTEXT.length - missingPaths.length;\n const restoreStarter = useActionMutation(\n \"restore-starter-workspace-resources\",\n {\n onSuccess: (result: any) => {\n const restored = result?.restored?.length ?? 0;\n const existing = result?.existing?.length ?? 0;\n toast.success(\n restored > 0\n ? `Restored ${restored} starter resource${restored === 1 ? \"\" : \"s\"}`\n : `Starter resources already present (${existing})`,\n );\n },\n onError: (err) => toast.error(String(err)),\n },\n );\n\n return (\n <section className=\"space-y-3\">\n <div className=\"flex items-center justify-between gap-3\">\n <div>\n <h2 className=\"text-sm font-semibold text-foreground\">\n Global context\n </h2>\n <p className=\"mt-1 text-xs text-muted-foreground\">\n Starter resources every workspace can use for company facts, brand,\n messaging, guardrails, and voice.\n </p>\n <p className=\"mt-1 text-xs text-muted-foreground\">\n All-app resources live once at workspace scope and are inherited by\n every app agent at runtime.\n </p>\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n {missingPaths.length > 0 ? (\n <Button\n size=\"sm\"\n variant=\"outline\"\n onClick={() => restoreStarter.mutate({ paths: missingPaths })}\n disabled={restoreStarter.isPending}\n >\n <IconPlus size={14} className=\"mr-1.5\" />\n {restoreStarter.isPending ? \"Restoring...\" : \"Restore missing\"}\n </Button>\n ) : null}\n <Badge variant=\"outline\">\n {presentCount}/{STARTER_GLOBAL_CONTEXT.length} ready\n </Badge>\n </div>\n </div>\n <div className=\"grid gap-3 md:grid-cols-2 xl:grid-cols-5\">\n {STARTER_GLOBAL_CONTEXT.map((item) => {\n const resource = byPath.get(item.path);\n const exists = !!resource;\n const global = resource?.scope === \"all\";\n return (\n <div key={item.path} className=\"rounded-lg border bg-card p-4\">\n <div className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <div className=\"flex items-center gap-2\">\n {exists ? (\n <IconCircleCheck\n size={15}\n className=\"shrink-0 text-green-600 dark:text-green-400\"\n />\n ) : (\n <IconAlertCircle\n size={15}\n className=\"shrink-0 text-amber-600 dark:text-amber-400\"\n />\n )}\n <h3 className=\"truncate text-sm font-medium text-foreground\">\n {item.label}\n </h3>\n </div>\n <p className=\"mt-1 line-clamp-2 text-xs text-muted-foreground\">\n {item.description}\n </p>\n </div>\n {resource ? (\n <EditResourceDialog\n resource={resource}\n trigger={\n <Button variant=\"ghost\" size=\"sm\" className=\"h-7 px-2\">\n <span className=\"sr-only\">Edit {item.label}</span>\n <IconEdit size={14} />\n </Button>\n }\n />\n ) : (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"h-7 px-2\"\n onClick={() =>\n restoreStarter.mutate({ paths: [item.path] })\n }\n disabled={restoreStarter.isPending}\n aria-label={`Restore ${item.label}`}\n >\n <IconPlus size={14} />\n </Button>\n )}\n </div>\n <div className=\"mt-3 space-y-2\">\n <div className=\"truncate font-mono text-[11px] text-muted-foreground\">\n {item.path}\n </div>\n <div className=\"flex flex-wrap gap-1.5\">\n <Badge variant={exists ? \"secondary\" : \"outline\"}>\n {exists ? \"Present\" : \"Missing\"}\n </Badge>\n {exists ? (\n <Badge variant=\"outline\">\n {global ? \"All apps\" : \"Selected\"}\n </Badge>\n ) : null}\n {resource && isAutoLoadedInstruction(resource) ? (\n <Badge variant=\"outline\">Auto-loaded</Badge>\n ) : null}\n </div>\n </div>\n </div>\n );\n })}\n </div>\n </section>\n );\n}\n\nexport default function WorkspaceRoute() {\n const resourcesQuery = useActionQuery(\"list-workspace-resources\", {});\n const grantsQuery = useActionQuery(\"list-workspace-resource-grants\", {});\n const { data: resources, isLoading } = resourcesQuery;\n const { data: grants } = grantsQuery;\n\n const grantsByResource = (grants || []).reduce(\n (acc: Record<string, any[]>, g: any) => {\n if (!acc[g.resourceId]) acc[g.resourceId] = [];\n acc[g.resourceId].push(g);\n return acc;\n },\n {} as Record<string, any[]>,\n );\n\n const skills = (resources || []).filter((r: any) => r.kind === \"skill\");\n const instructions = (resources || []).filter(\n (r: any) => r.kind === \"instruction\",\n );\n const agents = (resources || []).filter((r: any) => r.kind === \"agent\");\n const knowledge = (resources || []).filter(\n (r: any) => r.kind === \"knowledge\",\n );\n const mcpServers = (resources || []).filter(\n (r: any) => r.kind === \"mcp-server\",\n );\n\n function ResourceList({\n items,\n emptyText,\n }: {\n items: any[];\n emptyText: string;\n }) {\n if (isLoading && (resources ?? []).length === 0) {\n return (\n <div className=\"space-y-3\">\n {Array.from({ length: 3 }).map((_, index) => (\n <div\n key={index}\n className=\"rounded-lg border bg-card px-5 py-4 space-y-2\"\n >\n <Skeleton className=\"h-4 w-1/3\" />\n <Skeleton className=\"h-3 w-2/3\" />\n </div>\n ))}\n </div>\n );\n }\n if (items.length === 0) {\n return (\n <div className=\"rounded-lg border border-dashed px-6 py-12 text-center text-sm text-muted-foreground\">\n {emptyText}\n </div>\n );\n }\n return (\n <div className=\"space-y-3\">\n {items.map((resource: any) => (\n <ResourceRow\n key={resource.id}\n resource={resource}\n grants={grantsByResource[resource.id] || []}\n />\n ))}\n </div>\n );\n }\n\n return (\n <DispatchShell\n title=\"Agent Resources\"\n description=\"Manage inherited skills, guardrail instructions, agent profiles, reference resources, and MCP servers. All-app resources are available to every app without syncing.\"\n >\n {resourcesQuery.isError || grantsQuery.isError ? (\n <ActionQueryError\n error={resourcesQuery.error ?? grantsQuery.error}\n onRetry={() => {\n void resourcesQuery.refetch();\n void grantsQuery.refetch();\n }}\n />\n ) : null}\n <div className=\"flex items-center justify-between\">\n <div className=\"text-sm text-muted-foreground\">\n {isLoading ? (\n <Skeleton className=\"h-4 w-24\" />\n ) : (\n `${resources?.length || 0} resource${(resources?.length || 0) !== 1 ? \"s\" : \"\"}`\n )}\n </div>\n <div className=\"flex gap-2\">\n <AddResourceDialog />\n </div>\n </div>\n\n {!resourcesQuery.isError ? (\n <GlobalContextSection resources={resources || []} />\n ) : null}\n\n {!resourcesQuery.isError && !grantsQuery.isError ? (\n <Tabs defaultValue=\"skills\">\n <TabsList>\n <TabsTrigger value=\"skills\">\n Skills {skills.length > 0 && `(${skills.length})`}\n </TabsTrigger>\n <TabsTrigger value=\"instructions\">\n Instructions{\" \"}\n {instructions.length > 0 && `(${instructions.length})`}\n </TabsTrigger>\n <TabsTrigger value=\"agents\">\n Agents {agents.length > 0 && `(${agents.length})`}\n </TabsTrigger>\n <TabsTrigger value=\"knowledge\">\n Knowledge {knowledge.length > 0 && `(${knowledge.length})`}\n </TabsTrigger>\n <TabsTrigger value=\"mcp\">\n MCP {mcpServers.length > 0 && `(${mcpServers.length})`}\n </TabsTrigger>\n </TabsList>\n\n <TabsContent value=\"skills\" className=\"mt-4\">\n <ResourceList\n items={skills}\n emptyText=\"No skills yet. Add a skill to share agent guidance across apps.\"\n />\n </TabsContent>\n\n <TabsContent value=\"instructions\" className=\"mt-4\">\n <ResourceList\n items={instructions}\n emptyText=\"No instructions yet. Add instructions to set behavioral rules across apps.\"\n />\n </TabsContent>\n\n <TabsContent value=\"agents\" className=\"mt-4\">\n <ResourceList\n items={agents}\n emptyText=\"No agent profiles yet. Add a reusable profile to share specialist agents across apps.\"\n />\n </TabsContent>\n\n <TabsContent value=\"knowledge\" className=\"mt-4\">\n <ResourceList\n items={knowledge}\n emptyText=\"No knowledge packs yet. Add GTM, product, or domain context that apps can reuse.\"\n />\n </TabsContent>\n\n <TabsContent value=\"mcp\" className=\"mt-4\">\n <ResourceList\n items={mcpServers}\n emptyText=\"No MCP servers yet. Add an HTTP MCP server to share external tools across apps.\"\n />\n </TabsContent>\n </Tabs>\n ) : null}\n </DispatchShell>\n );\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/dispatch",
3
- "version": "0.15.10",
3
+ "version": "0.15.11",
4
4
  "description": "Dispatch — workspace control plane for agent-native apps. Vault, integrations, destinations, scheduled jobs, and cross-app delegation, shipped as a single drop-in package.",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -86,7 +86,7 @@
86
86
  "tailwind-merge": "^3.5.0",
87
87
  "vaul": "^1.1.2",
88
88
  "zod": "^4.3.6",
89
- "@agent-native/toolkit": "0.9.0"
89
+ "@agent-native/toolkit": "0.9.1"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@react-router/dev": "^8.1.0",
@@ -100,7 +100,7 @@
100
100
  "typescript-7": "npm:typescript@^7.0.2",
101
101
  "vite": "8.1.0",
102
102
  "vitest": "^4.1.5",
103
- "@agent-native/core": "0.115.0"
103
+ "@agent-native/core": "0.116.0"
104
104
  },
105
105
  "peerDependencies": {
106
106
  "@agent-native/core": ">=0.8.0",