@agent-native/dispatch 0.29.2 → 0.29.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/list-workspace-apps.d.ts +1 -0
- package/dist/actions/list-workspace-apps.js +3 -0
- package/dist/actions/list-workspace-apps.js.map +1 -1
- package/dist/actions/provider-api-register.d.ts +14 -14
- package/dist/components/layout/Layout.d.ts.map +1 -1
- package/dist/components/layout/Layout.js +19 -4
- package/dist/components/layout/Layout.js.map +1 -1
- package/dist/components/workspace-app-card.d.ts.map +1 -1
- package/dist/components/workspace-app-card.js +9 -6
- package/dist/components/workspace-app-card.js.map +1 -1
- package/dist/components/workspace-app-host.d.ts.map +1 -1
- package/dist/components/workspace-app-host.js +65 -13
- package/dist/components/workspace-app-host.js.map +1 -1
- package/dist/lib/workspace-apps.d.ts +16 -0
- package/dist/lib/workspace-apps.d.ts.map +1 -1
- package/dist/lib/workspace-apps.js +71 -1
- package/dist/lib/workspace-apps.js.map +1 -1
- package/dist/server/lib/app-creation-store.d.ts +2 -0
- package/dist/server/lib/app-creation-store.d.ts.map +1 -1
- package/dist/server/lib/app-creation-store.js +9 -3
- package/dist/server/lib/app-creation-store.js.map +1 -1
- package/dist/server/lib/mcp-gateway.d.ts.map +1 -1
- package/dist/server/lib/mcp-gateway.js +5 -42
- package/dist/server/lib/mcp-gateway.js.map +1 -1
- package/dist/shared/workspace-sso.d.ts +12 -0
- package/dist/shared/workspace-sso.d.ts.map +1 -1
- package/dist/shared/workspace-sso.js +43 -0
- package/dist/shared/workspace-sso.js.map +1 -1
- package/package.json +2 -2
- package/src/actions/list-workspace-apps.ts +3 -0
- package/src/components/layout/Layout.tsx +27 -5
- package/src/components/workspace-app-card.spec.tsx +60 -0
- package/src/components/workspace-app-card.tsx +17 -4
- package/src/components/workspace-app-host.spec.tsx +208 -41
- package/src/components/workspace-app-host.tsx +85 -10
- package/src/lib/workspace-apps.spec.ts +80 -0
- package/src/lib/workspace-apps.ts +95 -1
- package/src/server/lib/app-creation-store.spec.ts +43 -0
- package/src/server/lib/app-creation-store.ts +11 -3
- package/src/server/lib/mcp-gateway.ts +5 -48
- package/src/shared/workspace-sso.ts +55 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const _default: import("@agent-native/core").ActionDefinition<{
|
|
2
2
|
includeAgentCards?: unknown;
|
|
3
|
+
includeArchived?: unknown;
|
|
3
4
|
audience?: "all" | "internal" | "public" | undefined;
|
|
4
5
|
}, import("../server/lib/app-creation-store.js").WorkspaceAppSummary[]>;
|
|
5
6
|
export default _default;
|
|
@@ -17,6 +17,9 @@ export default defineAction({
|
|
|
17
17
|
includeAgentCards: httpBoolean
|
|
18
18
|
.default(true)
|
|
19
19
|
.describe("Fetch each ready app's /.well-known/agent-card.json with a short non-throwing timeout and include agentCardUrl, agentCardReachable, a2aEndpointUrl, agentName, and agentSkillsCount. Defaults to true for agent calls; UI polling should pass false. Pending Builder apps are not probed."),
|
|
20
|
+
includeArchived: httpBoolean
|
|
21
|
+
.default(false)
|
|
22
|
+
.describe("Include archived workspace apps in the result."),
|
|
20
23
|
audience: z
|
|
21
24
|
.enum(["all", "internal", "public"])
|
|
22
25
|
.default("all")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-workspace-apps.js","sourceRoot":"","sources":["../../src/actions/list-workspace-apps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,MAAM,WAAW,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9C,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAE,OAAO,IAAI,CAAC;IACjE,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAE,OAAO,KAAK,CAAC;IACnE,OAAO,KAAK,CAAC;AACf,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAEhB,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,yZAAyZ;IAC3Z,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,iBAAiB,EAAE,WAAW;aAC3B,OAAO,CAAC,IAAI,CAAC;aACb,QAAQ,CACP,2RAA2R,CAC5R;QACH,QAAQ,EAAE,CAAC;aACR,IAAI,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;aACnC,OAAO,CAAC,KAAK,CAAC;aACd,QAAQ,CAAC,mCAAmC,CAAC;KACjD,CAAC;IACF,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;IACvB,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC;CAC/C,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core\";\nimport { z } from \"zod\";\n\nimport { listWorkspaceApps } from \"../server/lib/app-creation-store.js\";\n\nconst httpBoolean = z.preprocess((value) => {\n if (typeof value !== \"string\") return value;\n const normalized = value.trim().toLowerCase();\n if ([\"true\", \"1\", \"yes\", \"on\"].includes(normalized)) return true;\n if ([\"false\", \"0\", \"no\", \"off\"].includes(normalized)) return false;\n return value;\n}, z.boolean());\n\nexport default defineAction({\n description:\n \"List apps mounted inside this workspace deployment, including paths, absolute URLs, audience (internal/public), page route access overrides, and agent-card/A2A metadata for ready mounted apps by default. This is not the hosted/connected A2A agent registry; use list-connected-agents to discover agents such as Analytics or Content. UI polling callers can pass includeAgentCards=false to skip network probes.\",\n schema: z.object({\n includeAgentCards: httpBoolean\n .default(true)\n .describe(\n \"Fetch each ready app's /.well-known/agent-card.json with a short non-throwing timeout and include agentCardUrl, agentCardReachable, a2aEndpointUrl, agentName, and agentSkillsCount. Defaults to true for agent calls; UI polling should pass false. Pending Builder apps are not probed.\",\n ),\n audience: z\n .enum([\"all\", \"internal\", \"public\"])\n .default(\"all\")\n .describe(\"Filter by workspace app audience.\"),\n }),\n http: { method: \"GET\" },\n run: async (input) => listWorkspaceApps(input),\n});\n"]}
|
|
1
|
+
{"version":3,"file":"list-workspace-apps.js","sourceRoot":"","sources":["../../src/actions/list-workspace-apps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,MAAM,WAAW,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9C,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAE,OAAO,IAAI,CAAC;IACjE,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAE,OAAO,KAAK,CAAC;IACnE,OAAO,KAAK,CAAC;AACf,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAEhB,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,yZAAyZ;IAC3Z,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,iBAAiB,EAAE,WAAW;aAC3B,OAAO,CAAC,IAAI,CAAC;aACb,QAAQ,CACP,2RAA2R,CAC5R;QACH,eAAe,EAAE,WAAW;aACzB,OAAO,CAAC,KAAK,CAAC;aACd,QAAQ,CAAC,gDAAgD,CAAC;QAC7D,QAAQ,EAAE,CAAC;aACR,IAAI,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;aACnC,OAAO,CAAC,KAAK,CAAC;aACd,QAAQ,CAAC,mCAAmC,CAAC;KACjD,CAAC;IACF,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;IACvB,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC;CAC/C,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core\";\nimport { z } from \"zod\";\n\nimport { listWorkspaceApps } from \"../server/lib/app-creation-store.js\";\n\nconst httpBoolean = z.preprocess((value) => {\n if (typeof value !== \"string\") return value;\n const normalized = value.trim().toLowerCase();\n if ([\"true\", \"1\", \"yes\", \"on\"].includes(normalized)) return true;\n if ([\"false\", \"0\", \"no\", \"off\"].includes(normalized)) return false;\n return value;\n}, z.boolean());\n\nexport default defineAction({\n description:\n \"List apps mounted inside this workspace deployment, including paths, absolute URLs, audience (internal/public), page route access overrides, and agent-card/A2A metadata for ready mounted apps by default. This is not the hosted/connected A2A agent registry; use list-connected-agents to discover agents such as Analytics or Content. UI polling callers can pass includeAgentCards=false to skip network probes.\",\n schema: z.object({\n includeAgentCards: httpBoolean\n .default(true)\n .describe(\n \"Fetch each ready app's /.well-known/agent-card.json with a short non-throwing timeout and include agentCardUrl, agentCardReachable, a2aEndpointUrl, agentName, and agentSkillsCount. Defaults to true for agent calls; UI polling should pass false. Pending Builder apps are not probed.\",\n ),\n includeArchived: httpBoolean\n .default(false)\n .describe(\"Include archived workspace apps in the result.\"),\n audience: z\n .enum([\"all\", \"internal\", \"public\"])\n .default(\"all\")\n .describe(\"Filter by workspace app audience.\"),\n }),\n http: { method: \"GET\" },\n run: async (input) => listWorkspaceApps(input),\n});\n"]}
|
|
@@ -47,9 +47,10 @@ declare const _default: import("node_modules/@agent-native/core/dist").ActionDef
|
|
|
47
47
|
notes?: string | undefined;
|
|
48
48
|
scope?: "org" | "user" | undefined;
|
|
49
49
|
}, {
|
|
50
|
+
message?: undefined;
|
|
50
51
|
id?: undefined;
|
|
51
|
-
provider?: undefined;
|
|
52
52
|
deleted?: undefined;
|
|
53
|
+
found?: undefined;
|
|
53
54
|
providers: {
|
|
54
55
|
id: string;
|
|
55
56
|
label: string;
|
|
@@ -60,46 +61,45 @@ declare const _default: import("node_modules/@agent-native/core/dist").ActionDef
|
|
|
60
61
|
updatedAt: number;
|
|
61
62
|
}[];
|
|
62
63
|
count: number;
|
|
63
|
-
|
|
64
|
+
provider?: undefined;
|
|
64
65
|
registered?: undefined;
|
|
65
66
|
label?: undefined;
|
|
66
|
-
message?: undefined;
|
|
67
67
|
} | {
|
|
68
|
+
message?: undefined;
|
|
69
|
+
count?: undefined;
|
|
68
70
|
id?: undefined;
|
|
69
71
|
deleted?: undefined;
|
|
70
72
|
providers?: undefined;
|
|
71
|
-
count?: undefined;
|
|
72
73
|
found: boolean;
|
|
73
74
|
provider: import("node_modules/@agent-native/core/dist/provider-api").CustomProviderConfig;
|
|
74
75
|
registered?: undefined;
|
|
75
76
|
label?: undefined;
|
|
76
|
-
message?: undefined;
|
|
77
77
|
} | {
|
|
78
|
-
|
|
78
|
+
message?: undefined;
|
|
79
|
+
count?: undefined;
|
|
79
80
|
deleted?: undefined;
|
|
80
81
|
providers?: undefined;
|
|
81
|
-
|
|
82
|
+
provider?: undefined;
|
|
82
83
|
found: boolean;
|
|
83
84
|
id: string;
|
|
84
85
|
registered?: undefined;
|
|
85
86
|
label?: undefined;
|
|
86
|
-
message?: undefined;
|
|
87
87
|
} | {
|
|
88
|
-
|
|
89
|
-
providers?: undefined;
|
|
88
|
+
message?: undefined;
|
|
90
89
|
count?: undefined;
|
|
91
90
|
found?: undefined;
|
|
91
|
+
providers?: undefined;
|
|
92
|
+
provider?: undefined;
|
|
92
93
|
deleted: boolean;
|
|
93
94
|
id: string;
|
|
94
95
|
registered?: undefined;
|
|
95
96
|
label?: undefined;
|
|
96
|
-
message?: undefined;
|
|
97
97
|
} | {
|
|
98
|
-
provider?: undefined;
|
|
99
|
-
deleted?: undefined;
|
|
100
|
-
providers?: undefined;
|
|
101
98
|
count?: undefined;
|
|
99
|
+
deleted?: undefined;
|
|
102
100
|
found?: undefined;
|
|
101
|
+
providers?: undefined;
|
|
102
|
+
provider?: undefined;
|
|
103
103
|
registered: boolean;
|
|
104
104
|
id: string;
|
|
105
105
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../src/components/layout/Layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAuBL,KAAK,4BAA4B,EAYlC,MAAM,sCAAsC,CAAC;AAM9C,OAAO,EAaL,KAAK,gBAAgB,EAGrB,KAAK,mBAAmB,EACzB,MAAM,sCAAsC,CAAC;AAiC9C,OAAO,EAQL,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../src/components/layout/Layout.tsx"],"names":[],"mappings":"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"}
|
|
@@ -16,7 +16,7 @@ import { createContext, useEffect, useMemo, useRef, useState, useContext, useCal
|
|
|
16
16
|
import { Link, useLocation, useNavigate } from "react-router";
|
|
17
17
|
import { toast } from "sonner";
|
|
18
18
|
import { cn } from "../../lib/utils.js";
|
|
19
|
-
import { isDispatchWorkspaceAppId, isWorkspaceAppVisibleInDefaultLaunchers, mergeChatFirstWorkspaceApps, workspaceAppIdFromRoute, workspaceAppRoute, } from "../../lib/workspace-apps.js";
|
|
19
|
+
import { isDispatchWorkspaceAppId, isPathMountedWorkspaceApp, isWorkspaceAppVisibleInDefaultLaunchers, isWorkspaceSsoApp, mergeChatFirstWorkspaceApps, navigateToWorkspaceApp, workspaceAppIdFromRoute, workspaceAppDirectHref, workspaceAppRoute, } from "../../lib/workspace-apps.js";
|
|
20
20
|
import { CHAT_FIRST_PANE_STATE_KEY } from "../../shared/chat-first-pane.js";
|
|
21
21
|
import { AppIcon } from "../app-icon.js";
|
|
22
22
|
import { CreateAppPopover } from "../create-app-popover.js";
|
|
@@ -654,7 +654,7 @@ export function Layout({ children, extensions, agentPageHref, }) {
|
|
|
654
654
|
}, [electronEmbedded, location.pathname, location.search]);
|
|
655
655
|
const [chatFirstAppLayout, setChatFirstAppLayout] = useState(() => readChatFirstAppLayout());
|
|
656
656
|
const chatFirstAppLayoutHydratedRef = useRef(false);
|
|
657
|
-
const chatFirstAppsQuery = useActionQuery("list-workspace-apps", { includeAgentCards: false }, { enabled: chatFirstMode });
|
|
657
|
+
const chatFirstAppsQuery = useActionQuery("list-workspace-apps", { includeAgentCards: false, includeArchived: true }, { enabled: chatFirstMode });
|
|
658
658
|
const chatFirstGrantedAppsQuery = useActionQuery("list_apps", {}, { enabled: chatFirstMode });
|
|
659
659
|
const chatFirstWorkspaceApps = useMemo(() => mergeChatFirstWorkspaceApps(chatFirstAppsQuery.data), [chatFirstAppsQuery.data]);
|
|
660
660
|
const chatFirstAppRegistrations = useMemo(() => {
|
|
@@ -687,6 +687,21 @@ export function Layout({ children, extensions, agentPageHref, }) {
|
|
|
687
687
|
id: app.id,
|
|
688
688
|
name: app.name ?? app.id,
|
|
689
689
|
})), [chatFirstAppRegistrations]);
|
|
690
|
+
const openChatFirstApp = useCallback((app) => {
|
|
691
|
+
if (isDispatchWorkspaceAppId(app.id))
|
|
692
|
+
return;
|
|
693
|
+
const registration = chatFirstAppRegistrations.find((candidate) => candidate.id.toLowerCase() === app.id.toLowerCase());
|
|
694
|
+
const directHref = registration &&
|
|
695
|
+
!isWorkspaceSsoApp(registration) &&
|
|
696
|
+
isPathMountedWorkspaceApp(registration)
|
|
697
|
+
? workspaceAppDirectHref(registration, "/")
|
|
698
|
+
: null;
|
|
699
|
+
if (directHref) {
|
|
700
|
+
navigateToWorkspaceApp(directHref);
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
navigate(dispatchNavLinkTarget(workspaceAppRoute(app.id)));
|
|
704
|
+
}, [chatFirstAppRegistrations, navigate]);
|
|
690
705
|
const chatFirstCopy = useMemo(() => createDispatchChatFirstCopy(t), [t]);
|
|
691
706
|
const [chatFirstPane, setChatFirstPane] = useState(null);
|
|
692
707
|
const [chatFirstNotice, setChatFirstNotice] = useState(null);
|
|
@@ -1275,13 +1290,13 @@ export function Layout({ children, extensions, agentPageHref, }) {
|
|
|
1275
1290
|
if (isDispatchWorkspaceAppId(app.id))
|
|
1276
1291
|
return;
|
|
1277
1292
|
setSidebarCollapsed(true);
|
|
1278
|
-
|
|
1293
|
+
openChatFirstApp(app);
|
|
1279
1294
|
}, onChatFirstAppsRetry: () => void chatFirstAppsQuery.refetch(), collapsible: true, onCollapsedChange: setSidebarCollapsed }) }), _jsx(Sheet, { open: mobileOpen, onOpenChange: setMobileOpen, children: _jsxs(SheetContent, { side: "left", className: "w-72 bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden", children: [_jsx(SheetTitle, { className: "sr-only", children: t("dispatch.nav.navigation") }), _jsx(SheetDescription, { className: "sr-only", children: t("dispatch.nav.navigationDescription") }), _jsx("div", { className: "flex h-full w-full flex-col", children: _jsx(NavContent, { extensions: extensions, chatFirstMode: chatFirstMode, chatFirstEmbedded: chatFirstEmbedded, collapsed: false, chatFirstAppLayout: chatFirstAppLayout, onChatFirstAppLayoutChange: persistChatFirstAppLayout, chatFirstApps: chatFirstAppItems, chatFirstAppsLoading: chatFirstAppsQuery.isLoading, chatFirstAppsError: chatFirstAppsQuery.isError
|
|
1280
1295
|
? chatFirstCopy("appsLoadError")
|
|
1281
1296
|
: null, chatFirstActiveAppId: chatFirstActiveAppId, chatFirstActivePrimaryTab: chatFirstActivePrimaryTab, onChatFirstNewChat: () => {
|
|
1282
1297
|
closeChatFirstSessionWatch();
|
|
1283
1298
|
chatFirstSurfaceTabsStore.closeAll();
|
|
1284
1299
|
setChatFirstSurfacePanelOpen(false);
|
|
1285
|
-
}, onChatFirstAppOpen:
|
|
1300
|
+
}, onChatFirstAppOpen: openChatFirstApp, onChatFirstAppsRetry: () => void chatFirstAppsQuery.refetch(), onNavigate: () => setMobileOpen(false) }) })] }) }), _jsxs("div", { className: "relative min-w-0 flex-1 overflow-hidden", children: [content, workspaceAppContent] })] }) }) }));
|
|
1286
1301
|
}
|
|
1287
1302
|
//# sourceMappingURL=Layout.js.map
|