@agent-native/dispatch 0.29.3 → 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/provider-api-register.d.ts +14 -14
- package/dist/components/layout/Layout.d.ts.map +1 -1
- package/dist/components/layout/Layout.js +18 -3
- 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 +48 -8
- 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/components/layout/Layout.tsx +26 -4
- 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 +104 -3
- package/src/components/workspace-app-host.tsx +50 -6
- 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
|
@@ -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":"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;AAqCf,OAAO,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC;AAExE,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,YAAY,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC;IAC1C,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,SAAS,CAAC,EA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ACrC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,kBAAkB,CAAC,EAAE,4BAA4B,CAAC;IAClD,0BAA0B,CAAC,EAAE,CAAC,MAAM,EAAE,4BAA4B,KAAK,IAAI,CAAC;IAC5E,aAAa,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC5C,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,yBAAyB,CAAC,EAAE,mBAAmB,CAAC;IAChD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACrD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC,mDA2VA;AAED,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,UAAU,EACV,aAAa,GACd,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,uBAAuB,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,mDA4pCA"}
|
|
@@ -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";
|
|
@@ -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
|