@ultrst-armada/floks 2.0.8 → 2.0.9

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.
Files changed (40) hide show
  1. package/.krusbl-release-attestation.json +3 -3
  2. package/package.json +2 -2
  3. package/packages/canvas-ui/dist/chunk-DAAI7BIG.js +625 -0
  4. package/packages/canvas-ui/dist/fod/FodAuthorizedRemoteNodes.test.d.ts +1 -0
  5. package/packages/canvas-ui/dist/fod/FodModule.authorization.test.d.ts +1 -0
  6. package/packages/canvas-ui/dist/fod/FodModule.d.ts +27 -1
  7. package/packages/canvas-ui/dist/fod/FodPassiveNavigationAdversarial.test.d.ts +1 -0
  8. package/packages/canvas-ui/dist/fod/FodRemoteExecution.test.d.ts +1 -0
  9. package/packages/canvas-ui/dist/fod/index.d.ts +3 -0
  10. package/packages/canvas-ui/dist/fod/index.js +25 -3
  11. package/packages/canvas-ui/dist/fod/remoteAuthorizationFingerprint.d.ts +10 -0
  12. package/packages/canvas-ui/dist/fod/remoteAuthorizationFingerprint.test.d.ts +1 -0
  13. package/packages/canvas-ui/dist/fod/remoteGraphConnections.d.ts +40 -0
  14. package/packages/canvas-ui/dist/fod/remoteGraphConnections.test.d.ts +1 -0
  15. package/packages/canvas-ui/dist/fod/remoteGraphContract.d.ts +37 -0
  16. package/packages/canvas-ui/dist/fod/remoteGraphContract.test.d.ts +1 -0
  17. package/packages/canvas-ui/dist/fod/remoteKloksInvocation.d.ts +29 -0
  18. package/packages/canvas-ui/dist/fod/remoteKloksInvocation.test.d.ts +1 -0
  19. package/packages/canvas-ui/dist/index.js +30 -8
  20. package/packages/ui/dist/chunk-5Y2HGI37.js +443 -0
  21. package/packages/ui/dist/{chunk-XMRSW4TL.js → chunk-6J5J56YO.js} +31 -79
  22. package/packages/ui/dist/{chunk-KIFQA7L6.js → chunk-CIH4FVXM.js} +22 -34
  23. package/packages/ui/dist/chunk-F5XUUMSI.js +14 -0
  24. package/packages/ui/dist/{chunk-MYXPGPI3.js → chunk-KMVDLACR.js} +25 -2
  25. package/packages/ui/dist/{chunk-FA6GHJKU.js → chunk-SJPSY27C.js} +163 -5
  26. package/packages/ui/dist/components/ai/chat/AgentChatDock.d.ts +12 -0
  27. package/packages/ui/dist/components/ai/chat/AgentChatPanel.d.ts +11 -0
  28. package/packages/ui/dist/components/ai/chat/AgentChatPanel.test.d.ts +1 -0
  29. package/packages/ui/dist/components/ai/chat/AgentChatTypes.d.ts +39 -0
  30. package/packages/ui/dist/components/ai/chat/index.d.ts +3 -0
  31. package/packages/ui/dist/components/ai/index.js +17 -4
  32. package/packages/ui/dist/components/auth/LuthOidcGate.d.ts +29 -0
  33. package/packages/ui/dist/components/auth/index.d.ts +1 -0
  34. package/packages/ui/dist/components/auth/index.js +5 -1
  35. package/packages/ui/dist/components/base/index.js +4 -2
  36. package/packages/ui/dist/components/layout/AppShell.d.ts +2 -0
  37. package/packages/ui/dist/components/layout/index.js +3 -1
  38. package/packages/ui/dist/index.js +24 -6
  39. package/packages/ui/package.json +1 -1
  40. package/packages/canvas-ui/dist/chunk-24JGPSGO.js +0 -162
@@ -2,48 +2,37 @@ import {
2
2
  BaseTooltip
3
3
  } from "./chunk-GKP6KHTI.js";
4
4
 
5
- // src/components/base/BaseTextarea.tsx
5
+ // src/components/base/BaseSelect.tsx
6
6
  import { forwardRef } from "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
- var BaseTextarea = forwardRef(({
9
- className = "",
10
- ...props
11
- }, ref) => {
12
- return /* @__PURE__ */ jsx("textarea", { ref, className: `skipo-textarea ${className}`, ...props });
13
- });
14
- BaseTextarea.displayName = "BaseTextarea";
15
-
16
- // src/components/base/BaseSelect.tsx
17
- import { forwardRef as forwardRef2 } from "react";
18
- import { jsx as jsx2 } from "react/jsx-runtime";
19
- var BaseSelect = forwardRef2(({
8
+ var BaseSelect = forwardRef(({
20
9
  options,
21
10
  error,
22
11
  className = "",
23
12
  ...props
24
13
  }, ref) => {
25
- return /* @__PURE__ */ jsx2("select", { ref, className: `skipo-select ${className}`, "data-error": error, ...props, children: options.map((o) => /* @__PURE__ */ jsx2("option", { value: o.value, children: o.label }, o.value)) });
14
+ return /* @__PURE__ */ jsx("select", { ref, className: `skipo-select ${className}`, "data-error": error, ...props, children: options.map((o) => /* @__PURE__ */ jsx("option", { value: o.value, children: o.label }, o.value)) });
26
15
  });
27
16
  BaseSelect.displayName = "BaseSelect";
28
17
 
29
18
  // src/components/base/BaseToggle.tsx
30
- import { forwardRef as forwardRef3 } from "react";
31
- import { jsx as jsx3, jsxs } from "react/jsx-runtime";
32
- var BaseToggle = forwardRef3(({
19
+ import { forwardRef as forwardRef2 } from "react";
20
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
21
+ var BaseToggle = forwardRef2(({
33
22
  label,
34
23
  className = "",
35
24
  ...props
36
25
  }, ref) => {
37
26
  return /* @__PURE__ */ jsxs("label", { className: "skipo-toggle-label", children: [
38
- /* @__PURE__ */ jsx3("input", { ref, type: "checkbox", className: `skipo-toggle ${className}`, ...props }),
39
- label && /* @__PURE__ */ jsx3("span", { children: label })
27
+ /* @__PURE__ */ jsx2("input", { ref, type: "checkbox", className: `skipo-toggle ${className}`, ...props }),
28
+ label && /* @__PURE__ */ jsx2("span", { children: label })
40
29
  ] });
41
30
  });
42
31
  BaseToggle.displayName = "BaseToggle";
43
32
 
44
33
  // src/components/base/CredentialField.tsx
45
- import { forwardRef as forwardRef4, useState } from "react";
46
- import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
34
+ import { forwardRef as forwardRef3, useState } from "react";
35
+ import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
47
36
  var KNOWN_CREDENTIAL_URLS = {
48
37
  openai: { name: "OpenAI API Keys", url: "https://platform.openai.com/api-keys" },
49
38
  anthropic: { name: "Anthropic Console", url: "https://console.anthropic.com/settings/keys" },
@@ -60,7 +49,7 @@ var KNOWN_CREDENTIAL_URLS = {
60
49
  github: { name: "GitHub Personal Access Tokens", url: "https://github.com/settings/tokens" },
61
50
  openrouter: { name: "OpenRouter Keys", url: "https://openrouter.ai/keys" }
62
51
  };
63
- var CredentialField = forwardRef4(({
52
+ var CredentialField = forwardRef3(({
64
53
  serviceId,
65
54
  credentialUrl,
66
55
  serviceLabel,
@@ -82,7 +71,7 @@ var CredentialField = forwardRef4(({
82
71
  width: "100%"
83
72
  },
84
73
  children: [
85
- /* @__PURE__ */ jsx4(
74
+ /* @__PURE__ */ jsx3(
86
75
  "input",
87
76
  {
88
77
  ref,
@@ -103,7 +92,7 @@ var CredentialField = forwardRef4(({
103
92
  gap: "2px"
104
93
  },
105
94
  children: [
106
- /* @__PURE__ */ jsx4(BaseTooltip, { content: showSecret ? "HIDE SECRET CREDENTIAL" : "SHOW SECRET CREDENTIAL", children: /* @__PURE__ */ jsx4(
95
+ /* @__PURE__ */ jsx3(BaseTooltip, { content: showSecret ? "HIDE SECRET CREDENTIAL" : "SHOW SECRET CREDENTIAL", children: /* @__PURE__ */ jsx3(
107
96
  "button",
108
97
  {
109
98
  type: "button",
@@ -118,16 +107,16 @@ var CredentialField = forwardRef4(({
118
107
  display: "flex",
119
108
  alignItems: "center"
120
109
  },
121
- children: /* @__PURE__ */ jsx4("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: showSecret ? /* @__PURE__ */ jsxs2(Fragment, { children: [
122
- /* @__PURE__ */ jsx4("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" }),
123
- /* @__PURE__ */ jsx4("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
110
+ children: /* @__PURE__ */ jsx3("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: showSecret ? /* @__PURE__ */ jsxs2(Fragment, { children: [
111
+ /* @__PURE__ */ jsx3("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" }),
112
+ /* @__PURE__ */ jsx3("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
124
113
  ] }) : /* @__PURE__ */ jsxs2(Fragment, { children: [
125
- /* @__PURE__ */ jsx4("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
126
- /* @__PURE__ */ jsx4("circle", { cx: "12", cy: "12", r: "3" })
114
+ /* @__PURE__ */ jsx3("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
115
+ /* @__PURE__ */ jsx3("circle", { cx: "12", cy: "12", r: "3" })
127
116
  ] }) })
128
117
  }
129
118
  ) }),
130
- resolvedUrl && /* @__PURE__ */ jsx4(BaseTooltip, { content: `GET CREDENTIALS: OPEN ${resolvedLabel.toUpperCase()} (EXTERNAL LINK)`, children: /* @__PURE__ */ jsx4(
119
+ resolvedUrl && /* @__PURE__ */ jsx3(BaseTooltip, { content: `GET CREDENTIALS: OPEN ${resolvedLabel.toUpperCase()} (EXTERNAL LINK)`, children: /* @__PURE__ */ jsx3(
131
120
  "a",
132
121
  {
133
122
  href: resolvedUrl,
@@ -143,9 +132,9 @@ var CredentialField = forwardRef4(({
143
132
  textDecoration: "none"
144
133
  },
145
134
  children: /* @__PURE__ */ jsxs2("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
146
- /* @__PURE__ */ jsx4("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
147
- /* @__PURE__ */ jsx4("polyline", { points: "15 3 21 3 21 9" }),
148
- /* @__PURE__ */ jsx4("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
135
+ /* @__PURE__ */ jsx3("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
136
+ /* @__PURE__ */ jsx3("polyline", { points: "15 3 21 3 21 9" }),
137
+ /* @__PURE__ */ jsx3("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
149
138
  ] })
150
139
  }
151
140
  ) })
@@ -159,7 +148,6 @@ var CredentialField = forwardRef4(({
159
148
  CredentialField.displayName = "CredentialField";
160
149
 
161
150
  export {
162
- BaseTextarea,
163
151
  BaseSelect,
164
152
  BaseToggle,
165
153
  KNOWN_CREDENTIAL_URLS,
@@ -0,0 +1,14 @@
1
+ // src/components/base/BaseTextarea.tsx
2
+ import { forwardRef } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ var BaseTextarea = forwardRef(({
5
+ className = "",
6
+ ...props
7
+ }, ref) => {
8
+ return /* @__PURE__ */ jsx("textarea", { ref, className: `skipo-textarea ${className}`, ...props });
9
+ });
10
+ BaseTextarea.displayName = "BaseTextarea";
11
+
12
+ export {
13
+ BaseTextarea
14
+ };
@@ -1,3 +1,6 @@
1
+ import {
2
+ AgentChatDock
3
+ } from "./chunk-5Y2HGI37.js";
1
4
  import {
2
5
  BaseTooltip
3
6
  } from "./chunk-GKP6KHTI.js";
@@ -13,12 +16,13 @@ import {
13
16
 
14
17
  // src/components/layout/AppShell.tsx
15
18
  import { forwardRef } from "react";
16
- import { jsx, jsxs } from "react/jsx-runtime";
19
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
17
20
  var AppShell = forwardRef(({
18
21
  header,
19
22
  sidebar,
20
23
  footer,
21
24
  bottomStripProps,
25
+ agentChat,
22
26
  disableBottomStrip = false,
23
27
  workspaceGate,
24
28
  children,
@@ -69,7 +73,26 @@ var AppShell = forwardRef(({
69
73
  children
70
74
  }
71
75
  ),
72
- footer !== void 0 ? footer : !disableBottomStrip && /* @__PURE__ */ jsx(BottomStrip, { ...bottomStripProps })
76
+ footer !== void 0 ? footer : !disableBottomStrip && /* @__PURE__ */ jsx(
77
+ BottomStrip,
78
+ {
79
+ ...bottomStripProps,
80
+ rightSlot: /* @__PURE__ */ jsxs(Fragment, { children: [
81
+ bottomStripProps?.rightSlot,
82
+ /* @__PURE__ */ jsx(
83
+ AgentChatDock,
84
+ {
85
+ scopeKey: agentChat?.scopeKey,
86
+ targets: agentChat?.targets ?? [],
87
+ appAgentId: agentChat?.appAgentId,
88
+ onInvoke: agentChat?.onInvoke,
89
+ onCancel: agentChat?.onCancel
90
+ },
91
+ agentChat?.scopeKey ?? "unbound"
92
+ )
93
+ ] })
94
+ }
95
+ )
73
96
  ]
74
97
  }
75
98
  )
@@ -318,20 +318,29 @@ function useLuthAuth(config) {
318
318
  const [loading, setLoading] = useState2(true);
319
319
  const [initializing, setInitializing] = useState2(true);
320
320
  const [error, setError] = useState2(null);
321
+ const sessionRevision = useRef(0);
322
+ const signingOut = useRef(false);
321
323
  const refresh = useCallback(async (options = {}) => {
324
+ if (signingOut.current) return { authenticated: false };
325
+ const revision = ++sessionRevision.current;
322
326
  if (!options.silent) setLoading(true);
323
327
  setError(null);
324
328
  try {
325
329
  const next = await client.getSession();
330
+ if (revision !== sessionRevision.current || signingOut.current) {
331
+ return { authenticated: false };
332
+ }
326
333
  setSession(next);
327
334
  return next;
328
335
  } catch (cause) {
329
336
  const message = cause instanceof Error ? cause.message : "Unable to retrieve the Luth session.";
330
- setError(message);
337
+ if (revision === sessionRevision.current && !signingOut.current) setError(message);
331
338
  throw cause;
332
339
  } finally {
333
- if (!options.silent) setLoading(false);
334
- setInitializing(false);
340
+ if (revision === sessionRevision.current && !signingOut.current) {
341
+ if (!options.silent) setLoading(false);
342
+ setInitializing(false);
343
+ }
335
344
  }
336
345
  }, [client]);
337
346
  useEffect2(() => {
@@ -343,6 +352,7 @@ function useLuthAuth(config) {
343
352
  window.addEventListener("focus", revalidate);
344
353
  window.addEventListener("online", revalidate);
345
354
  return () => {
355
+ ++sessionRevision.current;
346
356
  window.removeEventListener("focus", revalidate);
347
357
  window.removeEventListener("online", revalidate);
348
358
  };
@@ -360,16 +370,19 @@ function useLuthAuth(config) {
360
370
  [client]
361
371
  );
362
372
  const signOut = useCallback(async () => {
373
+ signingOut.current = true;
374
+ ++sessionRevision.current;
375
+ setSession({ authenticated: false });
363
376
  setLoading(true);
364
377
  setError(null);
365
378
  try {
366
379
  await client.signOut();
367
- setSession({ authenticated: false });
368
380
  } catch (cause) {
369
381
  const message = cause instanceof Error ? cause.message : "Luth sign-out failed.";
370
382
  setError(message);
371
383
  throw cause;
372
384
  } finally {
385
+ signingOut.current = false;
373
386
  setLoading(false);
374
387
  }
375
388
  }, [client]);
@@ -583,6 +596,149 @@ var LuthProtectedRoute = ({
583
596
  }
584
597
  );
585
598
 
599
+ // src/components/auth/LuthOidcGate.tsx
600
+ import { useCallback as useCallback2, useEffect as useEffect4, useMemo as useMemo3, useRef as useRef3, useState as useState4 } from "react";
601
+ import {
602
+ createApplicationAuthClient
603
+ } from "@dinilmusick/gutts/auth";
604
+ import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
605
+ function useApplicationOidcAuth() {
606
+ const client = useMemo3(() => createApplicationAuthClient(), []);
607
+ const [session, setSession] = useState4({ authenticated: false });
608
+ const [initializing, setInitializing] = useState4(true);
609
+ const [loading, setLoading] = useState4(true);
610
+ const [error, setError] = useState4(null);
611
+ const revision = useRef3(0);
612
+ const signingOut = useRef3(false);
613
+ const refresh = useCallback2(async () => {
614
+ if (signingOut.current) return { authenticated: false };
615
+ const expected = ++revision.current;
616
+ setLoading(true);
617
+ try {
618
+ const verified = await client.getSession();
619
+ if (expected === revision.current && !signingOut.current) {
620
+ setSession(verified);
621
+ setError(null);
622
+ }
623
+ return verified;
624
+ } catch (cause) {
625
+ if (expected === revision.current && !signingOut.current) {
626
+ setSession({ authenticated: false });
627
+ setError(cause instanceof Error ? cause.message : "Authentication service unavailable.");
628
+ }
629
+ throw cause;
630
+ } finally {
631
+ if (expected === revision.current && !signingOut.current) {
632
+ setLoading(false);
633
+ setInitializing(false);
634
+ }
635
+ }
636
+ }, [client]);
637
+ useEffect4(() => {
638
+ void refresh().catch(() => void 0);
639
+ if (typeof window === "undefined") return;
640
+ const retry = () => {
641
+ void refresh().catch(() => void 0);
642
+ };
643
+ window.addEventListener("focus", retry);
644
+ window.addEventListener("online", retry);
645
+ return () => {
646
+ ++revision.current;
647
+ window.removeEventListener("focus", retry);
648
+ window.removeEventListener("online", retry);
649
+ };
650
+ }, [refresh]);
651
+ const signOut = useCallback2(async () => {
652
+ signingOut.current = true;
653
+ ++revision.current;
654
+ setSession({ authenticated: false });
655
+ setLoading(true);
656
+ try {
657
+ await client.signOut();
658
+ setError(null);
659
+ } catch (cause) {
660
+ setError(cause instanceof Error ? cause.message : "Logout failed.");
661
+ throw cause;
662
+ } finally {
663
+ signingOut.current = false;
664
+ setLoading(false);
665
+ }
666
+ }, [client]);
667
+ return {
668
+ client,
669
+ session,
670
+ user: session.user,
671
+ loading,
672
+ initializing,
673
+ error,
674
+ refresh,
675
+ signOut,
676
+ signIn: (returnTo) => client.startSignIn(returnTo)
677
+ };
678
+ }
679
+ function LuthOidcGate({
680
+ appName = "ULTRST APP",
681
+ authenticatedContent,
682
+ loadingContent,
683
+ onAuthenticated,
684
+ onContinueAsGuest
685
+ }) {
686
+ const auth = useApplicationOidcAuth();
687
+ const notified = useRef3(null);
688
+ const onAuthenticatedRef = useRef3(onAuthenticated);
689
+ useEffect4(() => {
690
+ onAuthenticatedRef.current = onAuthenticated;
691
+ }, [onAuthenticated]);
692
+ useEffect4(() => {
693
+ if (!auth.session.authenticated || !auth.user) {
694
+ notified.current = null;
695
+ } else if (notified.current !== auth.user.id) {
696
+ notified.current = auth.user.id;
697
+ onAuthenticatedRef.current?.(auth.user);
698
+ }
699
+ }, [auth.session.authenticated, auth.user]);
700
+ if (auth.initializing || auth.loading) {
701
+ return /* @__PURE__ */ jsx7(Fragment3, { children: loadingContent ?? /* @__PURE__ */ jsx7(AuthLoadingScreen, { label: "VERIFYING LUTH SESSION..." }) });
702
+ }
703
+ if (auth.session.authenticated && auth.user) {
704
+ return typeof authenticatedContent === "function" ? /* @__PURE__ */ jsx7(Fragment3, { children: authenticatedContent(auth) }) : /* @__PURE__ */ jsx7(Fragment3, { children: authenticatedContent });
705
+ }
706
+ return /* @__PURE__ */ jsx7("main", { className: "min-h-screen flex items-center justify-center p-6 bg-[var(--skipo-bg,#0a0e17)] text-[var(--skipo-text,#f8fafc)]", children: /* @__PURE__ */ jsxs6("section", { className: "w-full max-w-md rounded-lg border border-[var(--skipo-border-color,#252d3d)] bg-[var(--skipo-surface,#121722)] p-6 space-y-5", children: [
707
+ /* @__PURE__ */ jsx7("h1", { className: "font-bold text-xl", children: appName }),
708
+ /* @__PURE__ */ jsx7("p", { className: "text-sm opacity-80", children: "Sign in securely through Luth. Google and email passwords are handled only by Luth." }),
709
+ auth.error && /* @__PURE__ */ jsx7("p", { role: "alert", className: "text-sm text-red-300", children: auth.error }),
710
+ /* @__PURE__ */ jsx7(
711
+ "button",
712
+ {
713
+ type: "button",
714
+ onClick: () => auth.signIn(),
715
+ className: "w-full rounded border border-[var(--skipo-accent,#6366f1)] px-4 py-3 font-semibold",
716
+ children: "Continue with Luth (Google or email)"
717
+ }
718
+ ),
719
+ auth.error && /* @__PURE__ */ jsx7(
720
+ "button",
721
+ {
722
+ type: "button",
723
+ onClick: () => {
724
+ void auth.refresh().catch(() => void 0);
725
+ },
726
+ className: "w-full rounded border px-4 py-2 text-sm",
727
+ children: "Retry session"
728
+ }
729
+ ),
730
+ onContinueAsGuest && /* @__PURE__ */ jsx7(
731
+ "button",
732
+ {
733
+ type: "button",
734
+ onClick: onContinueAsGuest,
735
+ className: "w-full rounded border px-4 py-2 text-sm",
736
+ children: "Continue as guest"
737
+ }
738
+ )
739
+ ] }) });
740
+ }
741
+
586
742
  export {
587
743
  GoogleIcon,
588
744
  GoogleSignInButton,
@@ -600,5 +756,7 @@ export {
600
756
  useLuthAuth,
601
757
  LuthAuthPage,
602
758
  LoginModal,
603
- LuthProtectedRoute
759
+ LuthProtectedRoute,
760
+ useApplicationOidcAuth,
761
+ LuthOidcGate
604
762
  };
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { type AgentChatPanelProps } from './AgentChatPanel.js';
3
+ /**
4
+ * The host supplies an opaque, non-secret scope revision for the authenticated
5
+ * principal, app, workspace, active session, and permission/grant revision.
6
+ * Changing any of those MUST change scopeKey. No agent invocation is exposed
7
+ * until a valid scopeKey and host-authorized invoker are supplied.
8
+ */
9
+ export type AgentChatDockProps = Omit<AgentChatPanelProps, 'onClose'> & {
10
+ scopeKey?: string;
11
+ };
12
+ export declare function AgentChatDock(props: AgentChatDockProps): React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { type AgentChatInvoker, type AgentChatTarget, type AgentChatCanceller } from './AgentChatTypes.js';
3
+ export interface AgentChatPanelProps {
4
+ targets: readonly AgentChatTarget[];
5
+ appAgentId?: string;
6
+ onInvoke?: AgentChatInvoker;
7
+ /** Host-side cancellation of an authenticated invocation. */
8
+ onCancel?: AgentChatCanceller;
9
+ onClose: () => void;
10
+ }
11
+ export declare function AgentChatPanel({ targets, appAgentId, onInvoke, onCancel, onClose }: AgentChatPanelProps): React.JSX.Element;
@@ -0,0 +1,39 @@
1
+ export type AgentChatKind = 'app' | 'endpoint' | 'workflow';
2
+ export interface AgentChatTarget {
3
+ id: string;
4
+ kind: AgentChatKind;
5
+ name: string;
6
+ alias?: string;
7
+ }
8
+ export interface AgentChatInvocation {
9
+ targetId: string;
10
+ targetKind: AgentChatKind;
11
+ prompt: string;
12
+ resumeInvocationId?: string;
13
+ /** Typed clarification values; the server must validate against its own schema. */
14
+ parameters?: Record<string, string | number | boolean>;
15
+ }
16
+ export interface AgentChatClarificationField {
17
+ key: string;
18
+ label: string;
19
+ type: 'text' | 'number' | 'boolean';
20
+ required?: boolean;
21
+ }
22
+ export interface AgentChatReply {
23
+ kind: 'completed' | 'needs_input' | 'failed';
24
+ text: string;
25
+ invocationId?: string;
26
+ /** Optional server-provided field hints for a continuation. Never trust these for authorization. */
27
+ fields?: readonly AgentChatClarificationField[];
28
+ }
29
+ export type AgentChatInvoker = (invocation: AgentChatInvocation, options?: {
30
+ signal: AbortSignal;
31
+ }) => Promise<AgentChatReply>;
32
+ export type AgentChatCanceller = (target: {
33
+ targetId: string;
34
+ targetKind: AgentChatKind;
35
+ invocationId?: string;
36
+ }) => Promise<void> | void;
37
+ export declare function agentChatLabel(target: AgentChatTarget): string;
38
+ export declare function matchAgentMentions(targets: readonly AgentChatTarget[], query: string): AgentChatTarget[];
39
+ export declare function selectedAgentIsValid(target: AgentChatTarget | null, targets: readonly AgentChatTarget[]): boolean;
@@ -6,3 +6,6 @@ export * from './AgentExecutionCard.js';
6
6
  export * from './DirectChatHeader.js';
7
7
  export * from './DirectChatMessageList.js';
8
8
  export * from './DirectChatInput.js';
9
+ export * from './AgentChatTypes.js';
10
+ export * from './AgentChatPanel.js';
11
+ export * from './AgentChatDock.js';
@@ -4,7 +4,6 @@ import {
4
4
  AgentExecutionCard,
5
5
  DirectChatHeader,
6
6
  DirectChatInput,
7
- DirectChatMessageList,
8
7
  EmailProfileCard,
9
8
  EmailProfileRegistrationForm,
10
9
  EmailProviderRow,
@@ -22,8 +21,17 @@ import {
22
21
  SingleKeyForm,
23
22
  TimelineScrubber,
24
23
  getProviderIcon
25
- } from "../../chunk-XMRSW4TL.js";
26
- import "../../chunk-KIFQA7L6.js";
24
+ } from "../../chunk-6J5J56YO.js";
25
+ import "../../chunk-CIH4FVXM.js";
26
+ import {
27
+ AgentChatDock,
28
+ AgentChatPanel,
29
+ DirectChatMessageList,
30
+ agentChatLabel,
31
+ matchAgentMentions,
32
+ selectedAgentIsValid
33
+ } from "../../chunk-5Y2HGI37.js";
34
+ import "../../chunk-F5XUUMSI.js";
27
35
  import "../../chunk-GKP6KHTI.js";
28
36
  import "../../chunk-UOR4P6PO.js";
29
37
  import "../../chunk-W42SJGOJ.js";
@@ -32,6 +40,8 @@ import "../../chunk-A2CDQISJ.js";
32
40
  export {
33
41
  AIModelPicker,
34
42
  AIProviderSelector,
43
+ AgentChatDock,
44
+ AgentChatPanel,
35
45
  AgentExecutionCard,
36
46
  DirectChatHeader,
37
47
  DirectChatInput,
@@ -52,5 +62,8 @@ export {
52
62
  SingleKeyCard,
53
63
  SingleKeyForm,
54
64
  TimelineScrubber,
55
- getProviderIcon
65
+ agentChatLabel,
66
+ getProviderIcon,
67
+ matchAgentMentions,
68
+ selectedAgentIsValid
56
69
  };
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import { type ApplicationAuthClient, type LuthSessionResult } from '@dinilmusick/gutts/auth';
3
+ export interface ApplicationOidcAuth {
4
+ client: ApplicationAuthClient;
5
+ session: LuthSessionResult;
6
+ user: LuthSessionResult['user'];
7
+ initializing: boolean;
8
+ loading: boolean;
9
+ error: string | null;
10
+ refresh: () => Promise<LuthSessionResult>;
11
+ signIn: (returnTo?: string) => void;
12
+ signOut: () => Promise<void>;
13
+ }
14
+ /**
15
+ * Canonical application identity gate. Browser receives only an opaque
16
+ * app-origin cookie; Luth/Better Auth hosts the actual Google/email login.
17
+ * All Skipo-generated and migrated app shells should use this one gate,
18
+ * rather than reimplementing callback or session hydration.
19
+ */
20
+ export declare function useApplicationOidcAuth(): ApplicationOidcAuth;
21
+ export interface LuthOidcGateProps {
22
+ appName?: string;
23
+ authenticatedContent: React.ReactNode | ((auth: ApplicationOidcAuth) => React.ReactNode);
24
+ loadingContent?: React.ReactNode;
25
+ onAuthenticated?: (user: NonNullable<LuthSessionResult['user']>) => void;
26
+ onContinueAsGuest?: () => void;
27
+ }
28
+ export declare function LuthOidcGate({ appName, authenticatedContent, loadingContent, onAuthenticated, onContinueAsGuest, }: LuthOidcGateProps): React.JSX.Element;
29
+ export default LuthOidcGate;
@@ -7,3 +7,4 @@ export * from './GoogleSignInButton.js';
7
7
  export * from './LuthAuthClient.js';
8
8
  export * from './LuthAuthPage.js';
9
9
  export * from './LuthProtectedRoute.js';
10
+ export * from './LuthOidcGate.js';
@@ -9,14 +9,16 @@ import {
9
9
  LuthAuthClient,
10
10
  LuthAuthError,
11
11
  LuthAuthPage,
12
+ LuthOidcGate,
12
13
  LuthProtectedRoute,
13
14
  authPageDefinition,
14
15
  createLuthAuthClient,
15
16
  createLuthAuthClientForApplication,
16
17
  resolveLuthEnvironment,
17
18
  resolveLuthOrigin,
19
+ useApplicationOidcAuth,
18
20
  useLuthAuth
19
- } from "../../chunk-FA6GHJKU.js";
21
+ } from "../../chunk-SJPSY27C.js";
20
22
  import "../../chunk-RLM72WKL.js";
21
23
  import "../../chunk-5ZMXFCD4.js";
22
24
  import "../../chunk-C3L53YN4.js";
@@ -35,11 +37,13 @@ export {
35
37
  LuthAuthClient,
36
38
  LuthAuthError,
37
39
  LuthAuthPage,
40
+ LuthOidcGate,
38
41
  LuthProtectedRoute,
39
42
  authPageDefinition,
40
43
  createLuthAuthClient,
41
44
  createLuthAuthClientForApplication,
42
45
  resolveLuthEnvironment,
43
46
  resolveLuthOrigin,
47
+ useApplicationOidcAuth,
44
48
  useLuthAuth
45
49
  };
@@ -1,10 +1,12 @@
1
1
  import {
2
2
  BaseSelect,
3
- BaseTextarea,
4
3
  BaseToggle,
5
4
  CredentialField,
6
5
  KNOWN_CREDENTIAL_URLS
7
- } from "../../chunk-KIFQA7L6.js";
6
+ } from "../../chunk-CIH4FVXM.js";
7
+ import {
8
+ BaseTextarea
9
+ } from "../../chunk-F5XUUMSI.js";
8
10
  import {
9
11
  BaseTooltip
10
12
  } from "../../chunk-GKP6KHTI.js";
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
2
  import { type BottomStripProps } from '../bottom-strip/BottomStrip.js';
3
+ import { type AgentChatDockProps } from '../ai/chat/AgentChatDock.js';
3
4
  import '../../styles/layout.css';
4
5
  export interface AppShellProps extends React.HTMLAttributes<HTMLDivElement> {
5
6
  header?: React.ReactNode;
6
7
  sidebar?: React.ReactNode;
7
8
  footer?: React.ReactNode;
8
9
  bottomStripProps?: BottomStripProps;
10
+ agentChat?: AgentChatDockProps;
9
11
  disableBottomStrip?: boolean;
10
12
  workspaceGate?: React.ReactNode;
11
13
  }
@@ -3,7 +3,9 @@ import {
3
3
  BreadcrumbNav,
4
4
  HeaderBar,
5
5
  TopToolbar
6
- } from "../../chunk-MYXPGPI3.js";
6
+ } from "../../chunk-KMVDLACR.js";
7
+ import "../../chunk-5Y2HGI37.js";
8
+ import "../../chunk-F5XUUMSI.js";
7
9
  import "../../chunk-GKP6KHTI.js";
8
10
  import "../../chunk-C3L53YN4.js";
9
11
  import "../../chunk-62ITRDJX.js";