@burdenoff/microfe-vibecontrols 2026.905.3 → 2026.905.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.
|
@@ -2,24 +2,25 @@ import { buildVibeControlsCache as e } from "../lib/apolloCache.js";
|
|
|
2
2
|
import { getMainDefinition as t } from "../node_modules/@apollo/client/utilities/internal/getMainDefinition.js";
|
|
3
3
|
import { CombinedGraphQLErrors as n } from "../node_modules/@apollo/client/errors/CombinedGraphQLErrors.js";
|
|
4
4
|
import { BatchHttpLink as r } from "../node_modules/@apollo/client/link/batch-http/batchHttpLink.js";
|
|
5
|
-
import i from "
|
|
6
|
-
import
|
|
5
|
+
import { configureSpeechEngine as i } from "../services/speech/index.js";
|
|
6
|
+
import a from "./AgentEventsProvider.js";
|
|
7
|
+
import { QUOTA_EXHAUSTED_EVENT as o, inferQuotaKindFromOperation as ee } from "../utils/quotaUtils.js";
|
|
7
8
|
import { QuotaExhaustedProvider as s } from "./QuotaExhaustedProvider.js";
|
|
8
9
|
import c from "../hooks/useInitialDataLoader.js";
|
|
9
|
-
import { createContext as l, use as u, useCallback as d, useEffect as f, useMemo as
|
|
10
|
-
import { MemoryRouter as
|
|
11
|
-
import { ApolloClient as
|
|
12
|
-
import { onError as
|
|
13
|
-
import { setContext as
|
|
14
|
-
import { ApolloProvider as
|
|
15
|
-
import { MutationCache as
|
|
16
|
-
import { getStoredAuthToken as
|
|
17
|
-
import { getStoredWorkspaceId as
|
|
18
|
-
import { PermissionProvider as
|
|
19
|
-
import { isAuthNetworkError as
|
|
20
|
-
import { Fragment as
|
|
10
|
+
import { createContext as l, use as u, useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
11
|
+
import { MemoryRouter as te, useNavigate as g } from "react-router";
|
|
12
|
+
import { ApolloClient as _, ApolloLink as v, Observable as y, from as b } from "@apollo/client";
|
|
13
|
+
import { onError as ne } from "@apollo/client/link/error";
|
|
14
|
+
import { setContext as re } from "@apollo/client/link/context";
|
|
15
|
+
import { ApolloProvider as x } from "@apollo/client/react";
|
|
16
|
+
import { MutationCache as S, QueryClient as C, QueryClientProvider as w } from "@tanstack/react-query";
|
|
17
|
+
import { getStoredAuthToken as ie, getStoredWorkspaceToken as ae, isWorkspaceTokenValidForContext as oe } from "@burdenoff/fe-libs/shared/graphql";
|
|
18
|
+
import { getStoredWorkspaceId as se } from "@burdenoff/fe-libs/shared/graphql/fetch";
|
|
19
|
+
import { PermissionProvider as ce } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
20
|
+
import { isAuthNetworkError as le } from "@burdenoff/fe-libs/shared/utils";
|
|
21
|
+
import { Fragment as T, jsx as E } from "react/jsx-runtime";
|
|
21
22
|
//#region src/providers/VibeControlsProvider.tsx
|
|
22
|
-
function
|
|
23
|
+
function D() {
|
|
23
24
|
try {
|
|
24
25
|
let e = sessionStorage.getItem("burdenoff-active-context-project");
|
|
25
26
|
if (e) return e;
|
|
@@ -31,27 +32,27 @@ function se() {
|
|
|
31
32
|
return null;
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
+
function O(e = []) {
|
|
35
36
|
return e.some((e) => {
|
|
36
37
|
let t = typeof e.extensions?.code == "string" ? e.extensions.code : "", n = typeof e.extensions?.errorCode == "string" ? e.extensions.errorCode : "", r = (e.message ?? "").toLowerCase();
|
|
37
38
|
return t === "UNAUTHENTICATED" || n === "TOKEN_EXPIRED" || r.includes("token_expired") || r.includes("token expired") || r.includes("session expired") || r.includes("unauthorized") || r.includes("unauthenticated") || r.includes("authentication required") || r.includes("workspace context missing");
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
+
function k(e) {
|
|
41
42
|
let n = t(e);
|
|
42
43
|
return n.kind === "OperationDefinition" && n.operation === "mutation";
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
+
function A(e) {
|
|
45
46
|
let t = e.errors;
|
|
46
47
|
return Array.isArray(t) && t.length > 0;
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
-
return new
|
|
50
|
-
let r =
|
|
51
|
-
return new
|
|
49
|
+
function j(e) {
|
|
50
|
+
return new v((t, n) => {
|
|
51
|
+
let r = k(t.query) && t.getContext().autoRefreshAfterMutation !== !1 && t.getContext().skipMutationAutoRefresh !== !0;
|
|
52
|
+
return new y((i) => {
|
|
52
53
|
let a = n(t).subscribe({
|
|
53
54
|
next: (t) => {
|
|
54
|
-
i.next(t), !(!r ||
|
|
55
|
+
i.next(t), !(!r || A(t)) && e()?.refetchQueries({ include: "active" });
|
|
55
56
|
},
|
|
56
57
|
error: (e) => {
|
|
57
58
|
i.error(e);
|
|
@@ -66,18 +67,18 @@ function M(e) {
|
|
|
66
67
|
});
|
|
67
68
|
});
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
+
function M(e = []) {
|
|
70
71
|
return e.find((e) => {
|
|
71
72
|
let t = typeof e.extensions?.code == "string" ? e.extensions.code : "", n = typeof e.extensions?.errorCode == "string" ? e.extensions.errorCode : "", r = (e.message ?? "").toLowerCase();
|
|
72
73
|
return t === "QUOTA_EXHAUSTED" || n === "QUOTA_EXHAUSTED" || r.includes("quota_exhausted") || r.includes("quota exhausted");
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
|
-
var
|
|
76
|
-
let e = u(
|
|
76
|
+
var N = ({ workspaceId: e, children: t }) => (c({ workspaceId: e }), /* @__PURE__ */ E(T, { children: t })), P = l(null), F = () => {
|
|
77
|
+
let e = u(P);
|
|
77
78
|
if (!e) throw Error("useVibeControls must be used within VibeControlsProvider");
|
|
78
79
|
return e;
|
|
79
|
-
},
|
|
80
|
-
let { navigate: e, basePath: t } =
|
|
80
|
+
}, I = () => {
|
|
81
|
+
let { navigate: e, basePath: t } = F(), n = g();
|
|
81
82
|
return d((r) => {
|
|
82
83
|
let i = t && t !== "/" ? `${t}${r}` : r;
|
|
83
84
|
e ? e(i) : n(i);
|
|
@@ -86,10 +87,10 @@ var P = ({ workspaceId: e, children: t }) => (c({ workspaceId: e }), /* @__PURE_
|
|
|
86
87
|
t,
|
|
87
88
|
n
|
|
88
89
|
]);
|
|
89
|
-
},
|
|
90
|
-
let [
|
|
91
|
-
let e = new
|
|
92
|
-
mutationCache: new
|
|
90
|
+
}, L = ({ children: t, basePath: c, navigate: l, currentUser: u, workspaceId: g, organizationId: v, projectId: y, tenantId: T, apiGatewayUrl: k, authToken: A, workspaceToken: F, onAgentSelect: I, onSessionStart: L, onVibeActivate: R, defaultView: z, registerNavItems: B, registerFooterItems: V, onAuthError: H, ttsEndpoint: U }) => {
|
|
91
|
+
let [ue] = h(() => {
|
|
92
|
+
let e = new C({
|
|
93
|
+
mutationCache: new S({ onSuccess: () => {
|
|
93
94
|
e.invalidateQueries();
|
|
94
95
|
} }),
|
|
95
96
|
defaultOptions: { queries: {
|
|
@@ -98,43 +99,46 @@ var P = ({ workspaceId: e, children: t }) => (c({ workspaceId: e }), /* @__PURE_
|
|
|
98
99
|
} }
|
|
99
100
|
});
|
|
100
101
|
return e;
|
|
101
|
-
}), W =
|
|
102
|
+
}), W = m(A), G = m(F), K = m(g), q = m(v), J = m(T), Y = m(y), X = m(H);
|
|
102
103
|
f(() => {
|
|
103
104
|
W.current = A;
|
|
104
|
-
}, [A]),
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
}, [A]), i({
|
|
106
|
+
ttsEndpoint: U,
|
|
107
|
+
getHeaders: d(() => W.current ? { authorization: `Bearer ${W.current}` } : {}, [])
|
|
108
|
+
}), f(() => {
|
|
109
|
+
G.current = F;
|
|
110
|
+
}, [F]), f(() => {
|
|
111
|
+
K.current = g;
|
|
110
112
|
}, [g]), f(() => {
|
|
111
|
-
|
|
113
|
+
q.current = v;
|
|
112
114
|
}, [v]), f(() => {
|
|
113
|
-
|
|
114
|
-
}, [
|
|
115
|
+
J.current = T;
|
|
116
|
+
}, [T]), f(() => {
|
|
117
|
+
Y.current = y;
|
|
118
|
+
}, [y]), f(() => {
|
|
115
119
|
X.current = H;
|
|
116
120
|
}, [H]);
|
|
117
|
-
let
|
|
118
|
-
let t =
|
|
121
|
+
let de = p(() => {
|
|
122
|
+
let t = ne(({ error: e, operation: t }) => {
|
|
119
123
|
if (n.is(e)) {
|
|
120
|
-
if (
|
|
124
|
+
if (O(e.errors)) {
|
|
121
125
|
console.warn("[VibeControls] Auth error detected — notifying host shell"), X.current?.();
|
|
122
126
|
return;
|
|
123
127
|
}
|
|
124
|
-
let n =
|
|
128
|
+
let n = M(e.errors);
|
|
125
129
|
if (n) {
|
|
126
130
|
let e = {
|
|
127
|
-
kind:
|
|
131
|
+
kind: ee(t?.operationName),
|
|
128
132
|
message: n.message,
|
|
129
133
|
operationName: t?.operationName ?? null
|
|
130
134
|
};
|
|
131
|
-
window.dispatchEvent(new CustomEvent(
|
|
135
|
+
window.dispatchEvent(new CustomEvent(o, { detail: e }));
|
|
132
136
|
return;
|
|
133
137
|
}
|
|
134
138
|
}
|
|
135
|
-
e instanceof Error &&
|
|
136
|
-
}), i =
|
|
137
|
-
let n = W.current ??
|
|
139
|
+
e instanceof Error && le(e) && (console.warn("[VibeControls] Auth network error — notifying host shell"), X.current?.());
|
|
140
|
+
}), i = re((e, { headers: t }) => {
|
|
141
|
+
let n = W.current ?? ie(), r = K.current || se(), i = Y.current || D(), a = G.current ?? ae(), o = oe(a, {
|
|
138
142
|
workspaceId: r,
|
|
139
143
|
organizationId: q.current,
|
|
140
144
|
tenantId: J.current,
|
|
@@ -147,17 +151,17 @@ var P = ({ workspaceId: e, children: t }) => (c({ workspaceId: e }), /* @__PURE_
|
|
|
147
151
|
...r ? { "x-workspace-id": r } : {},
|
|
148
152
|
...i ? { "x-project-id": i } : {}
|
|
149
153
|
} };
|
|
150
|
-
}),
|
|
151
|
-
uri:
|
|
154
|
+
}), a = new r({
|
|
155
|
+
uri: k ? `${k}/workspaces/graphql` : "/workspaces/graphql",
|
|
152
156
|
batchMax: 10,
|
|
153
157
|
batchInterval: 10
|
|
154
|
-
}),
|
|
155
|
-
return
|
|
156
|
-
link:
|
|
158
|
+
}), s = null;
|
|
159
|
+
return s = new _({
|
|
160
|
+
link: b([
|
|
157
161
|
t,
|
|
158
|
-
|
|
162
|
+
j(() => s),
|
|
159
163
|
i,
|
|
160
|
-
|
|
164
|
+
a
|
|
161
165
|
]),
|
|
162
166
|
cache: e(),
|
|
163
167
|
defaultOptions: {
|
|
@@ -168,18 +172,18 @@ var P = ({ workspaceId: e, children: t }) => (c({ workspaceId: e }), /* @__PURE_
|
|
|
168
172
|
query: { errorPolicy: "all" },
|
|
169
173
|
mutate: { errorPolicy: "all" }
|
|
170
174
|
}
|
|
171
|
-
}),
|
|
172
|
-
}, [
|
|
175
|
+
}), s;
|
|
176
|
+
}, [k]), Z = {
|
|
173
177
|
basePath: c,
|
|
174
178
|
navigate: l,
|
|
175
179
|
currentUser: u,
|
|
176
|
-
workspaceId:
|
|
177
|
-
organizationId:
|
|
178
|
-
projectId:
|
|
179
|
-
tenantId:
|
|
180
|
-
apiGatewayUrl:
|
|
180
|
+
workspaceId: g,
|
|
181
|
+
organizationId: v,
|
|
182
|
+
projectId: y,
|
|
183
|
+
tenantId: T,
|
|
184
|
+
apiGatewayUrl: k,
|
|
181
185
|
authToken: A,
|
|
182
|
-
workspaceToken:
|
|
186
|
+
workspaceToken: F,
|
|
183
187
|
onAgentSelect: I,
|
|
184
188
|
onSessionStart: L,
|
|
185
189
|
onVibeActivate: R,
|
|
@@ -187,34 +191,34 @@ var P = ({ workspaceId: e, children: t }) => (c({ workspaceId: e }), /* @__PURE_
|
|
|
187
191
|
registerNavItems: B,
|
|
188
192
|
registerFooterItems: V,
|
|
189
193
|
onAuthError: H
|
|
190
|
-
}, Q = /* @__PURE__ */
|
|
191
|
-
workspaceId:
|
|
192
|
-
children: /* @__PURE__ */
|
|
193
|
-
scopeId:
|
|
194
|
+
}, Q = /* @__PURE__ */ E(s, { children: typeof window < "u" && /^\/vibecontrols\/(share|deck)\//.test(window.location.pathname) ? t : /* @__PURE__ */ E(N, {
|
|
195
|
+
workspaceId: g,
|
|
196
|
+
children: /* @__PURE__ */ E(ce, {
|
|
197
|
+
scopeId: g ?? null,
|
|
194
198
|
gateway: "workspace",
|
|
195
|
-
children: /* @__PURE__ */
|
|
199
|
+
children: /* @__PURE__ */ E(a, {
|
|
196
200
|
toastPosition: "bottom-right",
|
|
197
201
|
autoDismissDelay: 5e3,
|
|
198
202
|
maxVisibleToasts: 3,
|
|
199
203
|
children: t
|
|
200
204
|
})
|
|
201
205
|
})
|
|
202
|
-
}) }), $ = /* @__PURE__ */
|
|
203
|
-
client:
|
|
204
|
-
children: c ? /* @__PURE__ */
|
|
206
|
+
}) }), $ = /* @__PURE__ */ E(w, {
|
|
207
|
+
client: ue,
|
|
208
|
+
children: c ? /* @__PURE__ */ E(P.Provider, {
|
|
205
209
|
value: Z,
|
|
206
210
|
children: Q
|
|
207
|
-
}) : /* @__PURE__ */
|
|
208
|
-
client:
|
|
209
|
-
children: /* @__PURE__ */
|
|
211
|
+
}) : /* @__PURE__ */ E(x, {
|
|
212
|
+
client: de,
|
|
213
|
+
children: /* @__PURE__ */ E(P.Provider, {
|
|
210
214
|
value: Z,
|
|
211
215
|
children: Q
|
|
212
216
|
})
|
|
213
217
|
})
|
|
214
218
|
});
|
|
215
|
-
return c ? $ : /* @__PURE__ */
|
|
219
|
+
return c ? $ : /* @__PURE__ */ E(te, { children: $ });
|
|
216
220
|
};
|
|
217
221
|
//#endregion
|
|
218
|
-
export {
|
|
222
|
+
export { L as VibeControlsProvider, F as useVibeControls, I as useVibeNavigate };
|
|
219
223
|
|
|
220
224
|
//# sourceMappingURL=VibeControlsProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VibeControlsProvider.js","names":[],"sources":["../../src/providers/VibeControlsProvider.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from 'react';\nimport { createContext, use, useMemo, useCallback, useRef, useEffect, useState } from 'react';\nimport { MemoryRouter, useNavigate as useRouterNavigate } from 'react-router';\nimport { ApolloClient, ApolloLink, type FetchResult, Observable, from } from '@apollo/client';\nimport { buildVibeControlsCache } from '@/lib/apolloCache';\nimport { BatchHttpLink } from '@apollo/client/link/batch-http';\nimport { onError } from '@apollo/client/link/error';\nimport { CombinedGraphQLErrors } from '@apollo/client/errors';\nimport { setContext } from '@apollo/client/link/context';\nimport { ApolloProvider } from '@apollo/client/react';\nimport { getMainDefinition } from '@apollo/client/utilities';\nimport { MutationCache, QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport {\n getStoredAuthToken,\n getStoredWorkspaceToken,\n isWorkspaceTokenValidForContext,\n} from '@burdenoff/fe-libs/shared/graphql';\nimport { getStoredWorkspaceId } from '@burdenoff/fe-libs/shared/graphql/fetch';\nimport { PermissionProvider } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { isAuthNetworkError } from '@burdenoff/fe-libs/shared/utils';\nimport type { VibeControlsRootProps } from '../types';\nimport { AgentEventsProvider } from './AgentEventsProvider';\nimport { QuotaExhaustedProvider } from './QuotaExhaustedProvider';\nimport { useInitialDataLoader } from '../hooks/useInitialDataLoader';\nimport {\n QUOTA_EXHAUSTED_EVENT,\n inferQuotaKindFromOperation,\n type QuotaExhaustedEventDetail,\n} from '../utils/quotaUtils';\n\ntype GraphQLErrorLike = { message?: string; extensions?: Record<string, unknown> };\n\nfunction getStoredProjectId(): string | null {\n try {\n const fromSession = sessionStorage.getItem('burdenoff-active-context-project');\n if (fromSession) return fromSession;\n\n const activeProfileId = sessionStorage.getItem('bf-active-profile');\n const profileContext = activeProfileId\n ? localStorage.getItem(`bf-p-${activeProfileId}-context`)\n : null;\n if (!profileContext) return null;\n\n const parsed = JSON.parse(profileContext) as { projectId?: unknown };\n return typeof parsed.projectId === 'string' && parsed.projectId.length > 0\n ? parsed.projectId\n : null;\n } catch {\n return null;\n }\n}\n\nfunction hasSessionAuthErrors(errors: ReadonlyArray<GraphQLErrorLike> = []): boolean {\n return errors.some((error) => {\n const code = typeof error.extensions?.code === 'string' ? error.extensions.code : '';\n const errorCode =\n typeof error.extensions?.errorCode === 'string' ? error.extensions.errorCode : '';\n const message = (error.message ?? '').toLowerCase();\n\n return (\n code === 'UNAUTHENTICATED' ||\n errorCode === 'TOKEN_EXPIRED' ||\n message.includes('token_expired') ||\n message.includes('token expired') ||\n message.includes('session expired') ||\n message.includes('unauthorized') ||\n message.includes('unauthenticated') ||\n message.includes('authentication required') ||\n message.includes('workspace context missing')\n );\n });\n}\n\nfunction isMutationOperation(query: Parameters<typeof getMainDefinition>[0]): boolean {\n const definition = getMainDefinition(query);\n return definition.kind === 'OperationDefinition' && definition.operation === 'mutation';\n}\n\nfunction hasGraphQLResultErrors(result: FetchResult<Record<string, unknown>>): boolean {\n const errors = result.errors;\n return Array.isArray(errors) && errors.length > 0;\n}\n\nfunction createMutationAutoRefreshLink(\n getClient: () => InstanceType<typeof ApolloClient> | null\n): ApolloLink {\n return new ApolloLink((operation, forward) => {\n const shouldRefreshAfterMutation =\n isMutationOperation(operation.query) &&\n operation.getContext().autoRefreshAfterMutation !== false &&\n operation.getContext().skipMutationAutoRefresh !== true;\n\n return new Observable<FetchResult<Record<string, unknown>>>((observer) => {\n const subscription = forward(operation).subscribe({\n next: (result) => {\n observer.next(result as FetchResult<Record<string, unknown>>);\n if (!shouldRefreshAfterMutation || hasGraphQLResultErrors(result)) return;\n\n void getClient()?.refetchQueries({ include: 'active' });\n },\n error: (error: unknown) => {\n observer.error(error);\n },\n complete: () => {\n observer.complete();\n },\n });\n\n return () => {\n subscription.unsubscribe();\n };\n });\n });\n}\n\nfunction findQuotaExhaustedError(\n errors: ReadonlyArray<GraphQLErrorLike> = []\n): GraphQLErrorLike | undefined {\n return errors.find((error) => {\n const code = typeof error.extensions?.code === 'string' ? error.extensions.code : '';\n const errorCode =\n typeof error.extensions?.errorCode === 'string' ? error.extensions.errorCode : '';\n // Match both the constant form and the human-readable phrase, case\n // insensitively — mirrors what `isQuotaExhaustedError` accepts at the\n // per-page level so the link doesn't miss any quota error the rest\n // of the code base already recognises.\n const message = (error.message ?? '').toLowerCase();\n return (\n code === 'QUOTA_EXHAUSTED' ||\n errorCode === 'QUOTA_EXHAUSTED' ||\n message.includes('quota_exhausted') ||\n message.includes('quota exhausted')\n );\n });\n}\n\n/**\n * Runs the initial data query inside the ApolloProvider tree so the result\n * lands in the MFE's own Apollo cache (not the shell's).\n */\nconst InitialDataPrefetcher: FC<PropsWithChildren<{ workspaceId?: string | null }>> = ({\n workspaceId,\n children,\n}) => {\n useInitialDataLoader({ workspaceId });\n return <>{children}</>;\n};\n\n/**\n * Context value for VibeControls microfrontend\n */\ntype VibeControlsContextValue = VibeControlsRootProps;\n\nconst VibeControlsContext = createContext<VibeControlsContextValue | null>(null);\n\n/**\n * Hook to access VibeControls context\n */\nexport const useVibeControls = () => {\n const context = use(VibeControlsContext);\n if (!context) {\n throw new Error('useVibeControls must be used within VibeControlsProvider');\n }\n return context;\n};\n\n/**\n * Hook for navigation within the VibeControls microfrontend.\n * Uses the shell's navigate function if available, falling back to\n * React Router's useNavigate. Automatically prepends basePath.\n *\n * Usage:\n * const navigate = useVibeNavigate();\n * navigate('/agents/123'); // navigates to /vibecontrols/agents/123\n */\nexport const useVibeNavigate = () => {\n const { navigate: shellNavigate, basePath } = useVibeControls();\n const routerNavigate = useRouterNavigate();\n\n return useCallback(\n (path: string) => {\n const fullPath = basePath && basePath !== '/' ? `${basePath}${path}` : path;\n if (shellNavigate) {\n shellNavigate(fullPath);\n } else {\n routerNavigate(fullPath);\n }\n },\n [shellNavigate, basePath, routerNavigate]\n );\n};\n\n/**\n * Provider component for VibeControls microfrontend\n * Sets up routing, Apollo Client with auth error detection, and context.\n *\n * The Apollo Client is configured with:\n * - An onError link that detects UNAUTHENTICATED / FORBIDDEN responses and\n * invokes the `onAuthError` prop so the host shell can trigger logout.\n * - A dynamic auth link that reads the token per-request (not baked in at\n * client creation time), so token refreshes take effect immediately.\n */\nexport const VibeControlsProvider: FC<PropsWithChildren<VibeControlsRootProps>> = ({\n children,\n basePath,\n navigate,\n currentUser,\n workspaceId,\n organizationId,\n projectId,\n tenantId,\n apiGatewayUrl,\n authToken,\n workspaceToken,\n onAgentSelect,\n onSessionStart,\n onVibeActivate,\n defaultView,\n registerNavItems,\n registerFooterItems,\n onAuthError,\n}) => {\n // Per-instance QueryClient so multiple MFE mounts don't share cache\n const [queryClient] = useState(() => {\n const client = new QueryClient({\n mutationCache: new MutationCache({\n onSuccess: () => {\n void client.invalidateQueries();\n },\n }),\n defaultOptions: {\n queries: {\n staleTime: 5 * 60 * 1000, // 5 minutes\n retry: 2,\n },\n },\n });\n return client;\n });\n\n // Store tokens and callbacks in refs so the Apollo Client (and its cache)\n // survives token refreshes. The setContext auth link reads from refs\n // per-request, so refreshed tokens take effect immediately without\n // destroying the InMemoryCache.\n const authTokenRef = useRef(authToken);\n const workspaceTokenRef = useRef(workspaceToken);\n const workspaceIdRef = useRef(workspaceId);\n const organizationIdRef = useRef(organizationId);\n const tenantIdRef = useRef(tenantId);\n const projectIdRef = useRef(projectId);\n const onAuthErrorRef = useRef(onAuthError);\n useEffect(() => {\n authTokenRef.current = authToken;\n }, [authToken]);\n useEffect(() => {\n workspaceTokenRef.current = workspaceToken;\n }, [workspaceToken]);\n useEffect(() => {\n workspaceIdRef.current = workspaceId;\n }, [workspaceId]);\n useEffect(() => {\n organizationIdRef.current = organizationId;\n }, [organizationId]);\n useEffect(() => {\n tenantIdRef.current = tenantId;\n }, [tenantId]);\n useEffect(() => {\n projectIdRef.current = projectId;\n }, [projectId]);\n useEffect(() => {\n onAuthErrorRef.current = onAuthError;\n }, [onAuthError]);\n\n // Build Apollo Client with error link + dynamic auth link.\n // Only recreated when apiGatewayUrl changes (different endpoint = different client).\n //\n // SCOPE NOTE (codex #128 review):\n // This client — and the `errorLink` below — is ONLY used when the microfe\n // mounts in standalone mode (no `basePath`, e.g. `bun run dev` against\n // this package directly). When integrated into an app shell (the\n // production path) `basePath` is set, the local ApolloProvider is\n // skipped further down, and mutations go through the shell's\n // `MultiGatewayProvider` Apollo client. In that integrated mode the\n // global error-dispatch path here does NOT fire — quota-handling\n // relies on the per-page `isQuotaExhaustedError(result.error)`\n // checks (e.g. TargetsPage.handleCreate) which still render the\n // local QuotaExhaustedDialog. Tracked as a follow-up: lift this\n // link into fe-libs `MultiGatewayProvider` so the global event\n // dispatches in shell mode too.\n const apolloClient = useMemo(() => {\n // Error link (Apollo v4 pattern): detect authentication failures + quota.\n //\n // Quota: we use `errorPolicy: 'all'` for mutations, so GraphQL errors land\n // on `result.error` instead of rejecting the mutation promise. Most\n // callsites only have a `catch` block, so quota errors silently disappear\n // (BOFF-2625). Dispatching a CustomEvent here lets a single provider\n // (QuotaExhaustedProvider) render the dialog for every mutation without\n // touching individual handlers. Per-page handlers that already react to\n // `isQuotaExhaustedError(result.error)` still work — both paths just open\n // the same modal state.\n const errorLink = onError(({ error, operation }) => {\n if (CombinedGraphQLErrors.is(error)) {\n // Auth first: a response can carry BOTH an UNAUTHENTICATED and a\n // QUOTA_EXHAUSTED error (token expired mid-request that also\n // triggered a quota check). If we returned after dispatching the\n // quota event, the host shell would never get the auth signal and\n // the session would stay broken behind the modal. The quota\n // dialog is moot for an expired session anyway.\n if (hasSessionAuthErrors(error.errors)) {\n console.warn('[VibeControls] Auth error detected — notifying host shell');\n onAuthErrorRef.current?.();\n return;\n }\n\n const quotaError = findQuotaExhaustedError(error.errors);\n if (quotaError) {\n const detail: QuotaExhaustedEventDetail = {\n kind: inferQuotaKindFromOperation(operation?.operationName),\n message: quotaError.message,\n operationName: operation?.operationName ?? null,\n };\n window.dispatchEvent(\n new CustomEvent<QuotaExhaustedEventDetail>(QUOTA_EXHAUSTED_EVENT, { detail })\n );\n return;\n }\n }\n\n if (error instanceof Error && isAuthNetworkError(error)) {\n console.warn('[VibeControls] Auth network error — notifying host shell');\n onAuthErrorRef.current?.();\n }\n });\n\n // Auth link: dynamically attach dual-token auth and workspace context per-request.\n // Reads from refs so token refreshes don't recreate the client.\n const authLink = setContext((_, { headers }) => {\n const resolvedAuthToken = authTokenRef.current ?? getStoredAuthToken();\n // Fall back to storage when workspaceId prop is empty (e.g. during initial render\n // before ActiveContextProvider has propagated the value through workspaceBaseProps)\n const resolvedWorkspaceId = workspaceIdRef.current || getStoredWorkspaceId();\n const resolvedProjectId = projectIdRef.current || getStoredProjectId();\n const rawWorkspaceToken = workspaceTokenRef.current ?? getStoredWorkspaceToken();\n const resolvedWorkspaceToken = isWorkspaceTokenValidForContext(rawWorkspaceToken, {\n workspaceId: resolvedWorkspaceId,\n organizationId: organizationIdRef.current,\n tenantId: tenantIdRef.current,\n projectId: resolvedProjectId,\n })\n ? rawWorkspaceToken\n : null;\n\n return {\n headers: {\n ...headers,\n ...(resolvedAuthToken ? { Authorization: `Bearer ${resolvedAuthToken}` } : {}),\n ...(resolvedWorkspaceToken\n ? { 'X-Workspace-Authorization': `Bearer ${resolvedWorkspaceToken}` }\n : {}),\n ...(resolvedWorkspaceId ? { 'x-workspace-id': resolvedWorkspaceId } : {}),\n ...(resolvedProjectId ? { 'x-project-id': resolvedProjectId } : {}),\n },\n };\n });\n\n const httpLink = new BatchHttpLink({\n uri: apiGatewayUrl ? `${apiGatewayUrl}/workspaces/graphql` : '/workspaces/graphql',\n batchMax: 10,\n batchInterval: 10, // ms — tight window so latency isn't hurt\n });\n\n let client: InstanceType<typeof ApolloClient> | null = null;\n const mutationAutoRefreshLink = createMutationAutoRefreshLink(() => client);\n\n client = new ApolloClient({\n link: from([errorLink, mutationAutoRefreshLink, authLink, httpLink]),\n cache: buildVibeControlsCache(),\n defaultOptions: {\n watchQuery: { fetchPolicy: 'cache-first', errorPolicy: 'all' },\n query: { errorPolicy: 'all' },\n mutate: { errorPolicy: 'all' },\n },\n });\n return client;\n }, [apiGatewayUrl]);\n\n const contextValue: VibeControlsContextValue = {\n basePath,\n navigate,\n currentUser,\n workspaceId,\n organizationId,\n projectId,\n tenantId,\n apiGatewayUrl,\n authToken,\n workspaceToken,\n onAgentSelect,\n onSessionStart,\n onVibeActivate,\n defaultView,\n registerNavItems,\n registerFooterItems,\n onAuthError,\n };\n\n const isPublicLinkRoute =\n typeof window !== 'undefined' &&\n /^\\/vibecontrols\\/(share|deck)\\//.test(window.location.pathname);\n\n // Core providers that wrap the children\n // PermissionProvider requires AuthProvider which is provided by the shell.\n // It fetches permissions from wspace-rbac-svc via the workspace gateway.\n // AgentEventsProvider manages WebSocket connections to agents for real-time notifications.\n //\n // QuotaExhaustedProvider wraps both public and authenticated trees because\n // public deck routes (`/vibecontrols/deck/:token`) still run mutations like\n // `ExecuteSharedVibeDeckButton` that can hit command-execution quota\n // (#128 review codex P2). The provider is cheap and route-agnostic — it\n // only listens for a window event.\n const authedTree = (\n <InitialDataPrefetcher workspaceId={workspaceId}>\n <PermissionProvider scopeId={workspaceId ?? null} gateway=\"workspace\">\n <AgentEventsProvider\n toastPosition=\"bottom-right\"\n autoDismissDelay={5000}\n maxVisibleToasts={3}\n >\n {children}\n </AgentEventsProvider>\n </PermissionProvider>\n </InitialDataPrefetcher>\n );\n\n const routedChildren = (\n <QuotaExhaustedProvider>{isPublicLinkRoute ? children : authedTree}</QuotaExhaustedProvider>\n );\n\n const coreProviders = (\n <QueryClientProvider client={queryClient}>\n {basePath ? (\n <VibeControlsContext.Provider value={contextValue}>\n {routedChildren}\n </VibeControlsContext.Provider>\n ) : (\n <ApolloProvider client={apolloClient}>\n <VibeControlsContext.Provider value={contextValue}>\n {routedChildren}\n </VibeControlsContext.Provider>\n </ApolloProvider>\n )}\n </QueryClientProvider>\n );\n\n // When integrated into a shell (basePath provided), the shell already has a router\n // so we don't create another one. When standalone (no basePath), use MemoryRouter.\n if (basePath) {\n // Integrated mode: shell already has BrowserRouter, don't create nested router\n return coreProviders;\n }\n\n // Standalone mode: create MemoryRouter for independent operation\n return <MemoryRouter>{coreProviders}</MemoryRouter>;\n};\n"],"mappings":";;;;;;;;;;;;;;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S,GA2BnB,IAd7C,kBAAC,GAAD;EAAoC;YAClC,kBAAC,IAAD;GAAoB,SAAS,KAAe;GAAM,SAAQ;aACxD,kBAAC,GAAD;IACE,eAAc;IACd,kBAAkB;IAClB,kBAAkB;IAEjB;IACmB,CAAA;GACH,CAAA;EACC,CAAA,EAIoE,CAAA,EAGxF,IACJ,kBAAC,GAAD;EAAqB,QAAQ;YAC1B,IACC,kBAAC,EAAoB,UAArB;GAA8B,OAAO;aAClC;GAC4B,CAAA,GAE/B,kBAAC,GAAD;GAAgB,QAAQ;aACtB,kBAAC,EAAoB,UAArB;IAA8B,OAAO;cAClC;IAC4B,CAAA;GAChB,CAAA;EAEC,CAAA;AAWxB,QANI,IAEK,IAIF,kBAAC,GAAD,EAAA,UAAe,GAA6B,CAAA"}
|
|
1
|
+
{"version":3,"file":"VibeControlsProvider.js","names":[],"sources":["../../src/providers/VibeControlsProvider.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from 'react';\nimport { createContext, use, useMemo, useCallback, useRef, useEffect, useState } from 'react';\nimport { MemoryRouter, useNavigate as useRouterNavigate } from 'react-router';\nimport { ApolloClient, ApolloLink, type FetchResult, Observable, from } from '@apollo/client';\nimport { buildVibeControlsCache } from '@/lib/apolloCache';\nimport { BatchHttpLink } from '@apollo/client/link/batch-http';\nimport { onError } from '@apollo/client/link/error';\nimport { CombinedGraphQLErrors } from '@apollo/client/errors';\nimport { setContext } from '@apollo/client/link/context';\nimport { ApolloProvider } from '@apollo/client/react';\nimport { getMainDefinition } from '@apollo/client/utilities';\nimport { MutationCache, QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport {\n getStoredAuthToken,\n getStoredWorkspaceToken,\n isWorkspaceTokenValidForContext,\n} from '@burdenoff/fe-libs/shared/graphql';\nimport { getStoredWorkspaceId } from '@burdenoff/fe-libs/shared/graphql/fetch';\nimport { PermissionProvider } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { isAuthNetworkError } from '@burdenoff/fe-libs/shared/utils';\nimport type { VibeControlsRootProps } from '../types';\nimport { configureSpeechEngine } from '../services/speech';\nimport { AgentEventsProvider } from './AgentEventsProvider';\nimport { QuotaExhaustedProvider } from './QuotaExhaustedProvider';\nimport { useInitialDataLoader } from '../hooks/useInitialDataLoader';\nimport {\n QUOTA_EXHAUSTED_EVENT,\n inferQuotaKindFromOperation,\n type QuotaExhaustedEventDetail,\n} from '../utils/quotaUtils';\n\ntype GraphQLErrorLike = { message?: string; extensions?: Record<string, unknown> };\n\nfunction getStoredProjectId(): string | null {\n try {\n const fromSession = sessionStorage.getItem('burdenoff-active-context-project');\n if (fromSession) return fromSession;\n\n const activeProfileId = sessionStorage.getItem('bf-active-profile');\n const profileContext = activeProfileId\n ? localStorage.getItem(`bf-p-${activeProfileId}-context`)\n : null;\n if (!profileContext) return null;\n\n const parsed = JSON.parse(profileContext) as { projectId?: unknown };\n return typeof parsed.projectId === 'string' && parsed.projectId.length > 0\n ? parsed.projectId\n : null;\n } catch {\n return null;\n }\n}\n\nfunction hasSessionAuthErrors(errors: ReadonlyArray<GraphQLErrorLike> = []): boolean {\n return errors.some((error) => {\n const code = typeof error.extensions?.code === 'string' ? error.extensions.code : '';\n const errorCode =\n typeof error.extensions?.errorCode === 'string' ? error.extensions.errorCode : '';\n const message = (error.message ?? '').toLowerCase();\n\n return (\n code === 'UNAUTHENTICATED' ||\n errorCode === 'TOKEN_EXPIRED' ||\n message.includes('token_expired') ||\n message.includes('token expired') ||\n message.includes('session expired') ||\n message.includes('unauthorized') ||\n message.includes('unauthenticated') ||\n message.includes('authentication required') ||\n message.includes('workspace context missing')\n );\n });\n}\n\nfunction isMutationOperation(query: Parameters<typeof getMainDefinition>[0]): boolean {\n const definition = getMainDefinition(query);\n return definition.kind === 'OperationDefinition' && definition.operation === 'mutation';\n}\n\nfunction hasGraphQLResultErrors(result: FetchResult<Record<string, unknown>>): boolean {\n const errors = result.errors;\n return Array.isArray(errors) && errors.length > 0;\n}\n\nfunction createMutationAutoRefreshLink(\n getClient: () => InstanceType<typeof ApolloClient> | null\n): ApolloLink {\n return new ApolloLink((operation, forward) => {\n const shouldRefreshAfterMutation =\n isMutationOperation(operation.query) &&\n operation.getContext().autoRefreshAfterMutation !== false &&\n operation.getContext().skipMutationAutoRefresh !== true;\n\n return new Observable<FetchResult<Record<string, unknown>>>((observer) => {\n const subscription = forward(operation).subscribe({\n next: (result) => {\n observer.next(result as FetchResult<Record<string, unknown>>);\n if (!shouldRefreshAfterMutation || hasGraphQLResultErrors(result)) return;\n\n void getClient()?.refetchQueries({ include: 'active' });\n },\n error: (error: unknown) => {\n observer.error(error);\n },\n complete: () => {\n observer.complete();\n },\n });\n\n return () => {\n subscription.unsubscribe();\n };\n });\n });\n}\n\nfunction findQuotaExhaustedError(\n errors: ReadonlyArray<GraphQLErrorLike> = []\n): GraphQLErrorLike | undefined {\n return errors.find((error) => {\n const code = typeof error.extensions?.code === 'string' ? error.extensions.code : '';\n const errorCode =\n typeof error.extensions?.errorCode === 'string' ? error.extensions.errorCode : '';\n // Match both the constant form and the human-readable phrase, case\n // insensitively — mirrors what `isQuotaExhaustedError` accepts at the\n // per-page level so the link doesn't miss any quota error the rest\n // of the code base already recognises.\n const message = (error.message ?? '').toLowerCase();\n return (\n code === 'QUOTA_EXHAUSTED' ||\n errorCode === 'QUOTA_EXHAUSTED' ||\n message.includes('quota_exhausted') ||\n message.includes('quota exhausted')\n );\n });\n}\n\n/**\n * Runs the initial data query inside the ApolloProvider tree so the result\n * lands in the MFE's own Apollo cache (not the shell's).\n */\nconst InitialDataPrefetcher: FC<PropsWithChildren<{ workspaceId?: string | null }>> = ({\n workspaceId,\n children,\n}) => {\n useInitialDataLoader({ workspaceId });\n return <>{children}</>;\n};\n\n/**\n * Context value for VibeControls microfrontend\n */\ntype VibeControlsContextValue = VibeControlsRootProps;\n\nconst VibeControlsContext = createContext<VibeControlsContextValue | null>(null);\n\n/**\n * Hook to access VibeControls context\n */\nexport const useVibeControls = () => {\n const context = use(VibeControlsContext);\n if (!context) {\n throw new Error('useVibeControls must be used within VibeControlsProvider');\n }\n return context;\n};\n\n/**\n * Hook for navigation within the VibeControls microfrontend.\n * Uses the shell's navigate function if available, falling back to\n * React Router's useNavigate. Automatically prepends basePath.\n *\n * Usage:\n * const navigate = useVibeNavigate();\n * navigate('/agents/123'); // navigates to /vibecontrols/agents/123\n */\nexport const useVibeNavigate = () => {\n const { navigate: shellNavigate, basePath } = useVibeControls();\n const routerNavigate = useRouterNavigate();\n\n return useCallback(\n (path: string) => {\n const fullPath = basePath && basePath !== '/' ? `${basePath}${path}` : path;\n if (shellNavigate) {\n shellNavigate(fullPath);\n } else {\n routerNavigate(fullPath);\n }\n },\n [shellNavigate, basePath, routerNavigate]\n );\n};\n\n/**\n * Provider component for VibeControls microfrontend\n * Sets up routing, Apollo Client with auth error detection, and context.\n *\n * The Apollo Client is configured with:\n * - An onError link that detects UNAUTHENTICATED / FORBIDDEN responses and\n * invokes the `onAuthError` prop so the host shell can trigger logout.\n * - A dynamic auth link that reads the token per-request (not baked in at\n * client creation time), so token refreshes take effect immediately.\n */\nexport const VibeControlsProvider: FC<PropsWithChildren<VibeControlsRootProps>> = ({\n children,\n basePath,\n navigate,\n currentUser,\n workspaceId,\n organizationId,\n projectId,\n tenantId,\n apiGatewayUrl,\n authToken,\n workspaceToken,\n onAgentSelect,\n onSessionStart,\n onVibeActivate,\n defaultView,\n registerNavItems,\n registerFooterItems,\n onAuthError,\n ttsEndpoint,\n}) => {\n // Per-instance QueryClient so multiple MFE mounts don't share cache\n const [queryClient] = useState(() => {\n const client = new QueryClient({\n mutationCache: new MutationCache({\n onSuccess: () => {\n void client.invalidateQueries();\n },\n }),\n defaultOptions: {\n queries: {\n staleTime: 5 * 60 * 1000, // 5 minutes\n retry: 2,\n },\n },\n });\n return client;\n });\n\n // Store tokens and callbacks in refs so the Apollo Client (and its cache)\n // survives token refreshes. The setContext auth link reads from refs\n // per-request, so refreshed tokens take effect immediately without\n // destroying the InMemoryCache.\n const authTokenRef = useRef(authToken);\n const workspaceTokenRef = useRef(workspaceToken);\n const workspaceIdRef = useRef(workspaceId);\n const organizationIdRef = useRef(organizationId);\n const tenantIdRef = useRef(tenantId);\n const projectIdRef = useRef(projectId);\n const onAuthErrorRef = useRef(onAuthError);\n useEffect(() => {\n authTokenRef.current = authToken;\n }, [authToken]);\n\n /**\n * Point the assistant's speech stack at the hosted TTS proxy.\n *\n * ★★ Without this the assistant speaks in DEVICE voices only. `getSpeechEngine`\n * falls back to `browserSpeechEngine` whenever no endpoint is configured, so\n * the feature degrades silently — you get a robotic system voice and no voice\n * picker, because the selector hides itself when fewer than two voices are\n * available for the locale. Nothing errors, nothing logs.\n *\n * ★ Wired HERE rather than exported for the host to call. Nothing outside this\n * module graph would import `configureSpeechEngine`, and fe-libs is bundled\n * with rolldown — an unreferenced export is tree-shaken out of `dist`, so the\n * function would not exist at runtime to be called. HealthyBowl learned this\n * the same way.\n *\n * ★★ The token is read through a REF, not captured. `configureSpeechEngine` is\n * deliberately idempotent — resetting the memoised engine every render would\n * cancel playback mid-reply — so it keeps the FIRST `getHeaders` it is given.\n * A captured token would work until it refreshed and then fail mid-sentence,\n * which is the hardest place to notice. The proxy bills per character, so an\n * endpoint reachable without headers is a metered API open to anyone who reads\n * the bundle.\n */\n const getTtsHeaders = useCallback(\n (): Record<string, string> =>\n authTokenRef.current ? { authorization: `Bearer ${authTokenRef.current}` } : {},\n []\n );\n configureSpeechEngine({ ttsEndpoint, getHeaders: getTtsHeaders });\n useEffect(() => {\n workspaceTokenRef.current = workspaceToken;\n }, [workspaceToken]);\n useEffect(() => {\n workspaceIdRef.current = workspaceId;\n }, [workspaceId]);\n useEffect(() => {\n organizationIdRef.current = organizationId;\n }, [organizationId]);\n useEffect(() => {\n tenantIdRef.current = tenantId;\n }, [tenantId]);\n useEffect(() => {\n projectIdRef.current = projectId;\n }, [projectId]);\n useEffect(() => {\n onAuthErrorRef.current = onAuthError;\n }, [onAuthError]);\n\n // Build Apollo Client with error link + dynamic auth link.\n // Only recreated when apiGatewayUrl changes (different endpoint = different client).\n //\n // SCOPE NOTE (codex #128 review):\n // This client — and the `errorLink` below — is ONLY used when the microfe\n // mounts in standalone mode (no `basePath`, e.g. `bun run dev` against\n // this package directly). When integrated into an app shell (the\n // production path) `basePath` is set, the local ApolloProvider is\n // skipped further down, and mutations go through the shell's\n // `MultiGatewayProvider` Apollo client. In that integrated mode the\n // global error-dispatch path here does NOT fire — quota-handling\n // relies on the per-page `isQuotaExhaustedError(result.error)`\n // checks (e.g. TargetsPage.handleCreate) which still render the\n // local QuotaExhaustedDialog. Tracked as a follow-up: lift this\n // link into fe-libs `MultiGatewayProvider` so the global event\n // dispatches in shell mode too.\n const apolloClient = useMemo(() => {\n // Error link (Apollo v4 pattern): detect authentication failures + quota.\n //\n // Quota: we use `errorPolicy: 'all'` for mutations, so GraphQL errors land\n // on `result.error` instead of rejecting the mutation promise. Most\n // callsites only have a `catch` block, so quota errors silently disappear\n // (BOFF-2625). Dispatching a CustomEvent here lets a single provider\n // (QuotaExhaustedProvider) render the dialog for every mutation without\n // touching individual handlers. Per-page handlers that already react to\n // `isQuotaExhaustedError(result.error)` still work — both paths just open\n // the same modal state.\n const errorLink = onError(({ error, operation }) => {\n if (CombinedGraphQLErrors.is(error)) {\n // Auth first: a response can carry BOTH an UNAUTHENTICATED and a\n // QUOTA_EXHAUSTED error (token expired mid-request that also\n // triggered a quota check). If we returned after dispatching the\n // quota event, the host shell would never get the auth signal and\n // the session would stay broken behind the modal. The quota\n // dialog is moot for an expired session anyway.\n if (hasSessionAuthErrors(error.errors)) {\n console.warn('[VibeControls] Auth error detected — notifying host shell');\n onAuthErrorRef.current?.();\n return;\n }\n\n const quotaError = findQuotaExhaustedError(error.errors);\n if (quotaError) {\n const detail: QuotaExhaustedEventDetail = {\n kind: inferQuotaKindFromOperation(operation?.operationName),\n message: quotaError.message,\n operationName: operation?.operationName ?? null,\n };\n window.dispatchEvent(\n new CustomEvent<QuotaExhaustedEventDetail>(QUOTA_EXHAUSTED_EVENT, { detail })\n );\n return;\n }\n }\n\n if (error instanceof Error && isAuthNetworkError(error)) {\n console.warn('[VibeControls] Auth network error — notifying host shell');\n onAuthErrorRef.current?.();\n }\n });\n\n // Auth link: dynamically attach dual-token auth and workspace context per-request.\n // Reads from refs so token refreshes don't recreate the client.\n const authLink = setContext((_, { headers }) => {\n const resolvedAuthToken = authTokenRef.current ?? getStoredAuthToken();\n // Fall back to storage when workspaceId prop is empty (e.g. during initial render\n // before ActiveContextProvider has propagated the value through workspaceBaseProps)\n const resolvedWorkspaceId = workspaceIdRef.current || getStoredWorkspaceId();\n const resolvedProjectId = projectIdRef.current || getStoredProjectId();\n const rawWorkspaceToken = workspaceTokenRef.current ?? getStoredWorkspaceToken();\n const resolvedWorkspaceToken = isWorkspaceTokenValidForContext(rawWorkspaceToken, {\n workspaceId: resolvedWorkspaceId,\n organizationId: organizationIdRef.current,\n tenantId: tenantIdRef.current,\n projectId: resolvedProjectId,\n })\n ? rawWorkspaceToken\n : null;\n\n return {\n headers: {\n ...headers,\n ...(resolvedAuthToken ? { Authorization: `Bearer ${resolvedAuthToken}` } : {}),\n ...(resolvedWorkspaceToken\n ? { 'X-Workspace-Authorization': `Bearer ${resolvedWorkspaceToken}` }\n : {}),\n ...(resolvedWorkspaceId ? { 'x-workspace-id': resolvedWorkspaceId } : {}),\n ...(resolvedProjectId ? { 'x-project-id': resolvedProjectId } : {}),\n },\n };\n });\n\n const httpLink = new BatchHttpLink({\n uri: apiGatewayUrl ? `${apiGatewayUrl}/workspaces/graphql` : '/workspaces/graphql',\n batchMax: 10,\n batchInterval: 10, // ms — tight window so latency isn't hurt\n });\n\n let client: InstanceType<typeof ApolloClient> | null = null;\n const mutationAutoRefreshLink = createMutationAutoRefreshLink(() => client);\n\n client = new ApolloClient({\n link: from([errorLink, mutationAutoRefreshLink, authLink, httpLink]),\n cache: buildVibeControlsCache(),\n defaultOptions: {\n watchQuery: { fetchPolicy: 'cache-first', errorPolicy: 'all' },\n query: { errorPolicy: 'all' },\n mutate: { errorPolicy: 'all' },\n },\n });\n return client;\n }, [apiGatewayUrl]);\n\n const contextValue: VibeControlsContextValue = {\n basePath,\n navigate,\n currentUser,\n workspaceId,\n organizationId,\n projectId,\n tenantId,\n apiGatewayUrl,\n authToken,\n workspaceToken,\n onAgentSelect,\n onSessionStart,\n onVibeActivate,\n defaultView,\n registerNavItems,\n registerFooterItems,\n onAuthError,\n };\n\n const isPublicLinkRoute =\n typeof window !== 'undefined' &&\n /^\\/vibecontrols\\/(share|deck)\\//.test(window.location.pathname);\n\n // Core providers that wrap the children\n // PermissionProvider requires AuthProvider which is provided by the shell.\n // It fetches permissions from wspace-rbac-svc via the workspace gateway.\n // AgentEventsProvider manages WebSocket connections to agents for real-time notifications.\n //\n // QuotaExhaustedProvider wraps both public and authenticated trees because\n // public deck routes (`/vibecontrols/deck/:token`) still run mutations like\n // `ExecuteSharedVibeDeckButton` that can hit command-execution quota\n // (#128 review codex P2). The provider is cheap and route-agnostic — it\n // only listens for a window event.\n const authedTree = (\n <InitialDataPrefetcher workspaceId={workspaceId}>\n <PermissionProvider scopeId={workspaceId ?? null} gateway=\"workspace\">\n <AgentEventsProvider\n toastPosition=\"bottom-right\"\n autoDismissDelay={5000}\n maxVisibleToasts={3}\n >\n {children}\n </AgentEventsProvider>\n </PermissionProvider>\n </InitialDataPrefetcher>\n );\n\n const routedChildren = (\n <QuotaExhaustedProvider>{isPublicLinkRoute ? children : authedTree}</QuotaExhaustedProvider>\n );\n\n const coreProviders = (\n <QueryClientProvider client={queryClient}>\n {basePath ? (\n <VibeControlsContext.Provider value={contextValue}>\n {routedChildren}\n </VibeControlsContext.Provider>\n ) : (\n <ApolloProvider client={apolloClient}>\n <VibeControlsContext.Provider value={contextValue}>\n {routedChildren}\n </VibeControlsContext.Provider>\n </ApolloProvider>\n )}\n </QueryClientProvider>\n );\n\n // When integrated into a shell (basePath provided), the shell already has a router\n // so we don't create another one. When standalone (no basePath), use MemoryRouter.\n if (basePath) {\n // Integrated mode: shell already has BrowserRouter, don't create nested router\n return coreProviders;\n }\n\n // Standalone mode: create MemoryRouter for independent operation\n return <MemoryRouter>{coreProviders}</MemoryRouter>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiCA,SAAS,IAAoC;AAC3C,KAAI;EACF,IAAM,IAAc,eAAe,QAAQ,mCAAmC;AAC9E,MAAI,EAAa,QAAO;EAExB,IAAM,IAAkB,eAAe,QAAQ,oBAAoB,EAC7D,IAAiB,IACnB,aAAa,QAAQ,QAAQ,EAAgB,UAAU,GACvD;AACJ,MAAI,CAAC,EAAgB,QAAO;EAE5B,IAAM,IAAS,KAAK,MAAM,EAAe;AACzC,SAAO,OAAO,EAAO,aAAc,YAAY,EAAO,UAAU,SAAS,IACrE,EAAO,YACP;SACE;AACN,SAAO;;;AAIX,SAAS,EAAqB,IAA0C,EAAE,EAAW;AACnF,QAAO,EAAO,MAAM,MAAU;EAC5B,IAAM,IAAO,OAAO,EAAM,YAAY,QAAS,WAAW,EAAM,WAAW,OAAO,IAC5E,IACJ,OAAO,EAAM,YAAY,aAAc,WAAW,EAAM,WAAW,YAAY,IAC3E,KAAW,EAAM,WAAW,IAAI,aAAa;AAEnD,SACE,MAAS,qBACT,MAAc,mBACd,EAAQ,SAAS,gBAAgB,IACjC,EAAQ,SAAS,gBAAgB,IACjC,EAAQ,SAAS,kBAAkB,IACnC,EAAQ,SAAS,eAAe,IAChC,EAAQ,SAAS,kBAAkB,IACnC,EAAQ,SAAS,0BAA0B,IAC3C,EAAQ,SAAS,4BAA4B;GAE/C;;AAGJ,SAAS,EAAoB,GAAyD;CACpF,IAAM,IAAa,EAAkB,EAAM;AAC3C,QAAO,EAAW,SAAS,yBAAyB,EAAW,cAAc;;AAG/E,SAAS,EAAuB,GAAuD;CACrF,IAAM,IAAS,EAAO;AACtB,QAAO,MAAM,QAAQ,EAAO,IAAI,EAAO,SAAS;;AAGlD,SAAS,EACP,GACY;AACZ,QAAO,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O,EAAE,aAAa,OAAO;IAC7B,QAAQ,EAAE,aAAa,OAAO;IAC/B;GACF,CAAC,EACK;IACN,CAAC,EAAc,CAAC,EAEb,IAAyC;EAC7C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,EA8BK,IACJ,kBAAC,GAAD,EAAA,UA5BA,OAAO,SAAW,OAClB,kCAAkC,KAAK,OAAO,SAAS,SAAS,GA2BnB,IAd7C,kBAAC,GAAD;EAAoC;YAClC,kBAAC,IAAD;GAAoB,SAAS,KAAe;GAAM,SAAQ;aACxD,kBAAC,GAAD;IACE,eAAc;IACd,kBAAkB;IAClB,kBAAkB;IAEjB;IACmB,CAAA;GACH,CAAA;EACC,CAAA,EAIoE,CAAA,EAGxF,IACJ,kBAAC,GAAD;EAAqB,QAAQ;YAC1B,IACC,kBAAC,EAAoB,UAArB;GAA8B,OAAO;aAClC;GAC4B,CAAA,GAE/B,kBAAC,GAAD;GAAgB,QAAQ;aACtB,kBAAC,EAAoB,UAArB;IAA8B,OAAO;cAClC;IAC4B,CAAA;GAChB,CAAA;EAEC,CAAA;AAWxB,QANI,IAEK,IAIF,kBAAC,IAAD,EAAA,UAAe,GAA6B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-vibecontrols",
|
|
3
|
-
"version": "2026.905.
|
|
3
|
+
"version": "2026.905.4",
|
|
4
4
|
"description": "VibeControls microfrontend for Burdenoff products",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"license": "PROPRIETARY",
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@apollo/client": "4.1.9",
|
|
65
|
-
"@burdenoff/fe-libs": "2026.905.
|
|
65
|
+
"@burdenoff/fe-libs": "2026.905.7",
|
|
66
66
|
"@tanstack/react-query": "^5.90.16",
|
|
67
67
|
"@xyflow/react": "^12.10.2",
|
|
68
68
|
"clsx": "^2.1.1",
|