@burdenoff/fe-libs 2026.1005.3 → 2026.1006.1
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/shared/assistant/index.d.ts +3 -0
- package/dist/shared/assistant/index.d.ts.map +1 -1
- package/dist/shared/assistant/speech/createSpeechEngine.d.ts.map +1 -1
- package/dist/shared/assistant/speech/createSpeechEngine.js +38 -37
- package/dist/shared/assistant/speech/notifyCancellationSpeechEngine.d.ts +4 -0
- package/dist/shared/assistant/speech/notifyCancellationSpeechEngine.d.ts.map +1 -0
- package/dist/shared/assistant/speech/notifyCancellationSpeechEngine.js +38 -0
- package/dist/shared/assistant/ui/WorkflowAssistantPanel.d.ts +14 -0
- package/dist/shared/assistant/ui/WorkflowAssistantPanel.d.ts.map +1 -0
- package/dist/shared/assistant/ui/WorkflowAssistantPanel.js +425 -0
- package/dist/shared/assistant/workflowApi.d.ts +100 -0
- package/dist/shared/assistant/workflowApi.d.ts.map +1 -0
- package/dist/shared/assistant/workflowApi.js +206 -0
- package/dist/shared/components/SSORedirectGuard.d.ts +15 -0
- package/dist/shared/components/SSORedirectGuard.d.ts.map +1 -1
- package/dist/shared/components/SSORedirectGuard.js +39 -42
- package/dist/shared/native/platform.d.ts +6 -0
- package/dist/shared/native/platform.d.ts.map +1 -1
- package/dist/shared/native/platform.js +22 -15
- package/dist/shared/providers/shell/authProvider/ssoRelay.d.ts +3 -3
- package/dist/shared/providers/shell/authProvider/ssoRelay.d.ts.map +1 -1
- package/dist/shared/providers/shell/authProvider/ssoRelay.js +14 -13
- package/dist/shared/providers/shell/authProvider/useBridgeInitialization.d.ts.map +1 -1
- package/dist/shared/providers/shell/authProvider/useBridgeInitialization.js +38 -37
- package/dist/shared/providers/shell/authProvider/useSsoDepositBootGuard.d.ts.map +1 -1
- package/dist/shared/providers/shell/authProvider/useSsoDepositBootGuard.js +23 -26
- package/dist/shared-assistant.js +202 -199
- package/dist/shell-native/capacitor-config.d.ts +2 -0
- package/dist/shell-native/capacitor-config.d.ts.map +1 -1
- package/dist/shell-native/capacitor-config.js +38 -32
- package/dist/shell-native/index.d.ts +1 -1
- package/dist/shell-native/index.d.ts.map +1 -1
- package/dist/shell-native.js +4 -4
- package/package.json +2 -2
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { executeAssistantGraphQLOnce } from './gatewayClient';
|
|
2
|
+
import { AssistantSandboxAuthContext } from './types';
|
|
3
|
+
/** Product configuration selects a server-owned assistant, never a model or workflow override. */
|
|
4
|
+
export type AssistantWorkflowTarget = {
|
|
5
|
+
kind: 'botmanor';
|
|
6
|
+
agentId: string;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'buildmyiq-course';
|
|
9
|
+
courseId: string;
|
|
10
|
+
};
|
|
11
|
+
export interface WorkflowAssistantTurnInput {
|
|
12
|
+
clientTurnId: string;
|
|
13
|
+
clientConversationId: string;
|
|
14
|
+
message: string;
|
|
15
|
+
}
|
|
16
|
+
export interface WorkflowAssistantReceipt {
|
|
17
|
+
partialMessage?: string | null;
|
|
18
|
+
id: string;
|
|
19
|
+
clientTurnId: string;
|
|
20
|
+
courseId: string | null;
|
|
21
|
+
status: 'READY' | 'RUNNING' | 'GENERATED' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'UNKNOWN';
|
|
22
|
+
historyDelivered: boolean;
|
|
23
|
+
usageDelivered: boolean;
|
|
24
|
+
result: {
|
|
25
|
+
message: string;
|
|
26
|
+
model: string;
|
|
27
|
+
tokensUsed: number;
|
|
28
|
+
sources: {
|
|
29
|
+
reference: number;
|
|
30
|
+
chunkId: string;
|
|
31
|
+
documentId: string;
|
|
32
|
+
knowledgeBaseId: string;
|
|
33
|
+
}[];
|
|
34
|
+
} | null;
|
|
35
|
+
}
|
|
36
|
+
export interface WorkflowAssistantConversationPage {
|
|
37
|
+
nodes: Array<{
|
|
38
|
+
clientConversationId: string;
|
|
39
|
+
createdAt: string;
|
|
40
|
+
}>;
|
|
41
|
+
nextCursor: string | null;
|
|
42
|
+
}
|
|
43
|
+
export interface WorkflowAssistantConversation {
|
|
44
|
+
clientConversationId: string;
|
|
45
|
+
turns: Array<{
|
|
46
|
+
message: string;
|
|
47
|
+
receipt: WorkflowAssistantReceipt;
|
|
48
|
+
}>;
|
|
49
|
+
pending: WorkflowAssistantTurnInput | null;
|
|
50
|
+
}
|
|
51
|
+
export interface WorkflowAssistantRequestContext {
|
|
52
|
+
workspaceId: string;
|
|
53
|
+
authContext?: AssistantSandboxAuthContext;
|
|
54
|
+
signal?: AbortSignal;
|
|
55
|
+
}
|
|
56
|
+
export interface WorkflowAssistantRunHandle {
|
|
57
|
+
runId: string;
|
|
58
|
+
status: string;
|
|
59
|
+
workflowId: string;
|
|
60
|
+
workflowKey: string;
|
|
61
|
+
version: string;
|
|
62
|
+
triggerNodeId: string;
|
|
63
|
+
}
|
|
64
|
+
export type WorkflowAssistantWaitOutcome = {
|
|
65
|
+
kind: 'completed';
|
|
66
|
+
receipt: WorkflowAssistantReceipt;
|
|
67
|
+
} | {
|
|
68
|
+
kind: 'terminal';
|
|
69
|
+
receipt: WorkflowAssistantReceipt;
|
|
70
|
+
} | {
|
|
71
|
+
kind: 'pending';
|
|
72
|
+
receipt: WorkflowAssistantReceipt | null;
|
|
73
|
+
};
|
|
74
|
+
/** Only an authoritative admission refusal can release a blocked composer. */
|
|
75
|
+
export declare function isWorkflowAssistantAdmissionRefusal(error: unknown): boolean;
|
|
76
|
+
/** Shared authenticated gateway implementation. There is no sandbox or vendor fallback. */
|
|
77
|
+
export declare class AssistantWorkflowClient {
|
|
78
|
+
private readonly request;
|
|
79
|
+
constructor(request?: typeof executeAssistantGraphQLOnce);
|
|
80
|
+
/** Resolve an LMS route through its owner-filtered server endpoint. */
|
|
81
|
+
courseTargetForEnrollment(enrollmentId: string, context: WorkflowAssistantRequestContext): Promise<Extract<AssistantWorkflowTarget, {
|
|
82
|
+
kind: 'buildmyiq-course';
|
|
83
|
+
}>>;
|
|
84
|
+
start(target: AssistantWorkflowTarget, input: WorkflowAssistantTurnInput, context: WorkflowAssistantRequestContext): Promise<WorkflowAssistantRunHandle>;
|
|
85
|
+
read(target: AssistantWorkflowTarget, clientTurnId: string, context: WorkflowAssistantRequestContext, retryDelivery?: boolean): Promise<WorkflowAssistantReceipt | null>;
|
|
86
|
+
conversations(target: AssistantWorkflowTarget, context: WorkflowAssistantRequestContext, after?: string | null): Promise<WorkflowAssistantConversationPage>;
|
|
87
|
+
conversation(target: AssistantWorkflowTarget, context: WorkflowAssistantRequestContext, clientConversationId?: string | null): Promise<WorkflowAssistantConversation | null>;
|
|
88
|
+
messages(target: AssistantWorkflowTarget, context: WorkflowAssistantRequestContext, clientConversationId: string, before?: string | null): Promise<{
|
|
89
|
+
turns: WorkflowAssistantConversation['turns'];
|
|
90
|
+
nextCursor: string | null;
|
|
91
|
+
}>;
|
|
92
|
+
cancel(clientTurnId: string, context: WorkflowAssistantRequestContext): Promise<boolean>;
|
|
93
|
+
/** A client deadline leaves an admitted turn recoverable; it never regenerates it. */
|
|
94
|
+
wait(target: AssistantWorkflowTarget, clientTurnId: string, context: WorkflowAssistantRequestContext, options?: {
|
|
95
|
+
budgetMs?: number;
|
|
96
|
+
intervalMs?: number;
|
|
97
|
+
onProgress?: (receipt: WorkflowAssistantReceipt) => void;
|
|
98
|
+
}): Promise<WorkflowAssistantWaitOutcome>;
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=workflowApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflowApi.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/workflowApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAE3D,kGAAkG;AAClG,MAAM,MAAM,uBAAuB,GAC/B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AACnD,MAAM,WAAW,0BAA0B;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;CACjB;AACD,MAAM,WAAW,wBAAwB;IACvC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;IAC7F,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE;YACP,SAAS,EAAE,MAAM,CAAC;YAClB,OAAO,EAAE,MAAM,CAAC;YAChB,UAAU,EAAE,MAAM,CAAC;YACnB,eAAe,EAAE,MAAM,CAAC;SACzB,EAAE,CAAC;KACL,GAAG,IAAI,CAAC;CACV;AACD,MAAM,WAAW,iCAAiC;IAChD,KAAK,EAAE,KAAK,CAAC;QAAE,oBAAoB,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AACD,MAAM,WAAW,6BAA6B;IAC5C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,wBAAwB,CAAA;KAAE,CAAC,CAAC;IACrE,OAAO,EAAE,0BAA0B,GAAG,IAAI,CAAC;CAC5C;AACD,MAAM,WAAW,+BAA+B;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,2BAA2B,CAAC;IAC1C,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AACD,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;CACvB;AACD,MAAM,MAAM,4BAA4B,GACpC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,wBAAwB,CAAA;CAAE,GACxD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,wBAAwB,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAAA;CAAE,CAAC;AAoFlE,8EAA8E;AAC9E,wBAAgB,mCAAmC,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAiB3E;AAED,2FAA2F;AAC3F,qBAAa,uBAAuB;IAEhC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,GAAE,OAAO,2BAAyD;IAG5F,uEAAuE;IACjE,yBAAyB,CAC7B,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,OAAO,CAAC,uBAAuB,EAAE;QAAE,IAAI,EAAE,kBAAkB,CAAA;KAAE,CAAC,CAAC;IAoBpE,KAAK,CACT,MAAM,EAAE,uBAAuB,EAC/B,KAAK,EAAE,0BAA0B,EACjC,OAAO,EAAE,+BAA+B;IA2CpC,IAAI,CACR,MAAM,EAAE,uBAAuB,EAC/B,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,+BAA+B,EACxC,aAAa,UAAQ,GACpB,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC;IA4BrC,aAAa,CACjB,MAAM,EAAE,uBAAuB,EAC/B,OAAO,EAAE,+BAA+B,EACxC,KAAK,GAAE,MAAM,GAAG,IAAW,GAC1B,OAAO,CAAC,iCAAiC,CAAC;IA+BvC,YAAY,CAChB,MAAM,EAAE,uBAAuB,EAC/B,OAAO,EAAE,+BAA+B,EACxC,oBAAoB,GAAE,MAAM,GAAG,IAAW,GACzC,OAAO,CAAC,6BAA6B,GAAG,IAAI,CAAC;IA6D1C,QAAQ,CACZ,MAAM,EAAE,uBAAuB,EAC/B,OAAO,EAAE,+BAA+B,EACxC,oBAAoB,EAAE,MAAM,EAC5B,MAAM,GAAE,MAAM,GAAG,IAAW,GAC3B,OAAO,CAAC;QACT,KAAK,EAAE,6BAA6B,CAAC,OAAO,CAAC,CAAC;QAC9C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;KAC3B,CAAC;IA+DI,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,+BAA+B,GAAG,OAAO,CAAC,OAAO,CAAC;IAa9F,sFAAsF;IAChF,IAAI,CACR,MAAM,EAAE,uBAAuB,EAC/B,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,+BAA+B,EACxC,OAAO,GAAE;QACP,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,IAAI,CAAC;KACrD,GACL,OAAO,CAAC,4BAA4B,CAAC;CAmDzC"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { executeAssistantGraphQLOnce as e } from "./gatewayClient.js";
|
|
2
|
+
//#region src/shared/assistant/workflowApi.ts
|
|
3
|
+
var t = "id clientTurnId courseId status partialMessage historyDelivered usageDelivered\n result { message model tokensUsed sources { reference chunkId documentId knowledgeBaseId } }", n = "runId status workflowId workflowKey version triggerNodeId";
|
|
4
|
+
function r(e) {
|
|
5
|
+
return typeof e == "string" && e.length > 0 && e.length <= 255;
|
|
6
|
+
}
|
|
7
|
+
function i(e, t, n) {
|
|
8
|
+
if (!r(n.workspaceId) || !/^[a-zA-Z0-9_.:-]{1,128}$/.test(t) || !r(e.kind === "botmanor" ? e.agentId : e.courseId)) throw Error("Invalid assistant turn scope");
|
|
9
|
+
}
|
|
10
|
+
function a(e) {
|
|
11
|
+
return !e || typeof e.message != "string" || !e.message.trim() || new TextEncoder().encode(e.message).length > 131072 || typeof e.model != "string" || !e.model || new TextEncoder().encode(e.model).length > 1024 || !Number.isInteger(e.tokensUsed) || e.tokensUsed < 0 || e.tokensUsed > 2147483647 || !Array.isArray(e.sources) || e.sources.length > 100 ? !1 : e.sources.every((e) => e && Number.isInteger(e.reference) && e.reference >= 1 && r(e.chunkId) && r(e.documentId) && r(e.knowledgeBaseId));
|
|
12
|
+
}
|
|
13
|
+
function o(e, t, n) {
|
|
14
|
+
if (n === null) return null;
|
|
15
|
+
if (!n) throw Error("Missing assistant turn receipt");
|
|
16
|
+
if (!r(n.id) || typeof n.historyDelivered != "boolean" || typeof n.usageDelivered != "boolean" || n.clientTurnId !== t || (e.kind === "buildmyiq-course" ? n.courseId !== e.courseId : n.courseId !== null) || ![
|
|
17
|
+
"READY",
|
|
18
|
+
"RUNNING",
|
|
19
|
+
"GENERATED",
|
|
20
|
+
"COMPLETED",
|
|
21
|
+
"FAILED",
|
|
22
|
+
"CANCELLED",
|
|
23
|
+
"UNKNOWN"
|
|
24
|
+
].includes(n.status)) throw Error("Invalid assistant turn receipt");
|
|
25
|
+
if (n.partialMessage != null && (n.status !== "RUNNING" || typeof n.partialMessage != "string" || new TextEncoder().encode(n.partialMessage).length > 131072)) throw Error("Invalid provisional assistant answer");
|
|
26
|
+
if (n.result !== null && !a(n.result)) throw Error("Invalid assistant answer receipt");
|
|
27
|
+
if (n.status === "COMPLETED" && (!n.result || !n.historyDelivered || !n.usageDelivered)) throw Error("Assistant answer delivery is incomplete");
|
|
28
|
+
return n;
|
|
29
|
+
}
|
|
30
|
+
function s(e) {
|
|
31
|
+
if (!e || typeof e != "object" || !("extensions" in e)) return !1;
|
|
32
|
+
let t = e.extensions;
|
|
33
|
+
return !!t && typeof t == "object" && "code" in t && typeof t.code == "string" && [
|
|
34
|
+
"BAD_USER_INPUT",
|
|
35
|
+
"FAILED_PRECONDITION",
|
|
36
|
+
"FORBIDDEN",
|
|
37
|
+
"NOT_FOUND",
|
|
38
|
+
"QUOTA_EXHAUSTED",
|
|
39
|
+
"QUOTA_NOT_PROVISIONED"
|
|
40
|
+
].includes(t.code);
|
|
41
|
+
}
|
|
42
|
+
var c = class {
|
|
43
|
+
request;
|
|
44
|
+
constructor(t = e) {
|
|
45
|
+
this.request = t;
|
|
46
|
+
}
|
|
47
|
+
async courseTargetForEnrollment(e, t) {
|
|
48
|
+
if (!r(e) || !r(t.workspaceId)) throw Error("Invalid assistant enrollment scope");
|
|
49
|
+
let n = await this.request({
|
|
50
|
+
...t,
|
|
51
|
+
operationName: "ReadCourseAssistantTarget",
|
|
52
|
+
query: "query ReadCourseAssistantTarget($enrollmentId: ID!) { buiMyCourseAssistantTarget(enrollmentId: $enrollmentId) { courseId } }",
|
|
53
|
+
variables: { enrollmentId: e }
|
|
54
|
+
});
|
|
55
|
+
if (!r(n.buiMyCourseAssistantTarget?.courseId)) throw Error("Invalid assistant course target");
|
|
56
|
+
return {
|
|
57
|
+
kind: "buildmyiq-course",
|
|
58
|
+
courseId: n.buiMyCourseAssistantTarget.courseId
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
async start(e, t, a) {
|
|
62
|
+
if (i(e, t.clientTurnId, a), !a.workspaceId || !/^[a-zA-Z0-9_.:-]{1,128}$/.test(t.clientTurnId) || !/^[a-zA-Z0-9][a-zA-Z0-9_.:-]{7,127}$/.test(t.clientConversationId) || !t.message.trim() || t.message.length > 8192) throw Error("Invalid assistant turn");
|
|
63
|
+
let o = e.kind === "buildmyiq-course", s = o ? "buiStartCourseAssistantTurn" : "startAssistantTurn", c = o ? "BuiCourseAssistantTurnInput" : "StartAssistantTurnInput", l = (await this.request({
|
|
64
|
+
...a,
|
|
65
|
+
operationName: "StartWorkflowAssistantTurn",
|
|
66
|
+
query: `mutation StartWorkflowAssistantTurn($input: ${c}!) { ${s}(input: $input) { ${n} } }`,
|
|
67
|
+
variables: { input: {
|
|
68
|
+
...t,
|
|
69
|
+
...o ? { courseId: e.courseId } : {
|
|
70
|
+
agentId: e.agentId,
|
|
71
|
+
expectedCourseId: null
|
|
72
|
+
}
|
|
73
|
+
} }
|
|
74
|
+
}))[s];
|
|
75
|
+
if (!l || ![
|
|
76
|
+
l.runId,
|
|
77
|
+
l.status,
|
|
78
|
+
l.workflowId,
|
|
79
|
+
l.workflowKey,
|
|
80
|
+
l.version,
|
|
81
|
+
l.triggerNodeId
|
|
82
|
+
].every(r)) throw Error("Assistant admission could not be confirmed; recover with the same turn ID");
|
|
83
|
+
return l;
|
|
84
|
+
}
|
|
85
|
+
async read(e, n, r, a = !1) {
|
|
86
|
+
i(e, n, r);
|
|
87
|
+
let s = e.kind === "buildmyiq-course", c = s ? a ? "buiRetryCourseAssistantDelivery" : "buiMyCourseAssistantTurn" : a ? "retryMyAssistantTurnDelivery" : "myAssistantTurn", l = a ? "RetryWorkflowAssistantDelivery" : "ReadWorkflowAssistantTurn", u = (await this.request({
|
|
88
|
+
...r,
|
|
89
|
+
operationName: l,
|
|
90
|
+
query: `${a ? "mutation" : "query"} ${l}($clientTurnId: ID!${s ? ", $courseId: ID!" : ""}) {
|
|
91
|
+
${c}(clientTurnId: $clientTurnId${s ? ", courseId: $courseId" : ""}) { ${t} }
|
|
92
|
+
}`,
|
|
93
|
+
variables: {
|
|
94
|
+
clientTurnId: n,
|
|
95
|
+
...s ? { courseId: e.courseId } : {}
|
|
96
|
+
}
|
|
97
|
+
}))[c];
|
|
98
|
+
return o(e, n, u);
|
|
99
|
+
}
|
|
100
|
+
async conversations(e, t, n = null) {
|
|
101
|
+
i(e, "history-list", t);
|
|
102
|
+
let r = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i;
|
|
103
|
+
if (n !== null && !r.test(n)) throw Error("Invalid assistant conversation cursor");
|
|
104
|
+
let a = e.kind === "buildmyiq-course", o = a ? "buiMyCourseAssistantConversations" : "myAssistantWorkflowConversations", s = (await this.request({
|
|
105
|
+
...t,
|
|
106
|
+
operationName: "ListWorkflowAssistantConversations",
|
|
107
|
+
query: `query ListWorkflowAssistantConversations($targetId: ID!, $after: ID) { ${o}(${a ? "courseId" : "agentId"}: $targetId, after: $after) { nodes { clientConversationId createdAt } nextCursor } }`,
|
|
108
|
+
variables: {
|
|
109
|
+
targetId: a ? e.courseId : e.agentId,
|
|
110
|
+
after: n
|
|
111
|
+
}
|
|
112
|
+
}))[o];
|
|
113
|
+
if (!s || !Array.isArray(s.nodes) || s.nodes.length > 20 || s.nodes.some((e) => !e || !/^[a-zA-Z0-9][a-zA-Z0-9_.:-]{7,127}$/.test(e.clientConversationId) || typeof e.createdAt != "string" || !Number.isFinite(Date.parse(e.createdAt))) || s.nextCursor !== null && (!r.test(s.nextCursor) || s.nextCursor === n)) throw Error("Invalid assistant conversation page");
|
|
114
|
+
return s;
|
|
115
|
+
}
|
|
116
|
+
async conversation(e, n, r = null) {
|
|
117
|
+
if (i(e, "history-read", n), r !== null && !/^[a-zA-Z0-9][a-zA-Z0-9_.:-]{7,127}$/.test(r)) throw Error("Invalid assistant conversation");
|
|
118
|
+
let a = e.kind === "buildmyiq-course", s = a ? "buiMyCourseAssistantConversation" : "myAssistantWorkflowConversation", c = a ? "courseId" : "agentId", l = (await this.request({
|
|
119
|
+
...n,
|
|
120
|
+
operationName: "ReadWorkflowAssistantConversation",
|
|
121
|
+
query: `query ReadWorkflowAssistantConversation($targetId: ID!, $clientConversationId: ID) { ${s}(${c}: $targetId, clientConversationId: $clientConversationId) {
|
|
122
|
+
clientConversationId turns { message receipt { ${t} } } pending { clientTurnId clientConversationId message }
|
|
123
|
+
} }`,
|
|
124
|
+
variables: {
|
|
125
|
+
targetId: a ? e.courseId : e.agentId,
|
|
126
|
+
clientConversationId: r
|
|
127
|
+
}
|
|
128
|
+
}))[s];
|
|
129
|
+
if (l === null) return null;
|
|
130
|
+
if (!l || r !== null && l.clientConversationId !== r || !/^[a-zA-Z0-9][a-zA-Z0-9_.:-]{7,127}$/.test(l.clientConversationId) || !Array.isArray(l.turns) || l.turns.length > 6) throw Error("Invalid assistant conversation receipt");
|
|
131
|
+
let u = /* @__PURE__ */ new Set();
|
|
132
|
+
for (let t of l.turns) {
|
|
133
|
+
if (!t || typeof t.message != "string" || t.message.length > 8192 || !t.receipt || t.receipt.status !== "COMPLETED" || !/^[a-zA-Z0-9_.:-]{1,128}$/.test(t.receipt.clientTurnId) || u.has(t.receipt.clientTurnId)) throw Error("Invalid assistant history turn");
|
|
134
|
+
o(e, t.receipt.clientTurnId, t.receipt), u.add(t.receipt.clientTurnId);
|
|
135
|
+
}
|
|
136
|
+
let d = l.pending;
|
|
137
|
+
if (d !== null && (!d || !/^[a-zA-Z0-9_.:-]{1,128}$/.test(d.clientTurnId) || d.clientConversationId !== l.clientConversationId || typeof d.message != "string" || !d.message.trim() || d.message.length > 8192 || u.has(d.clientTurnId))) throw Error("Invalid assistant recovery handle");
|
|
138
|
+
return l;
|
|
139
|
+
}
|
|
140
|
+
async messages(e, n, r, a = null) {
|
|
141
|
+
if (i(e, "history-page", n), !/^[a-zA-Z0-9][a-zA-Z0-9_.:-]{7,127}$/.test(r) || a !== null && (a.length > 4096 || !/^[A-Za-z0-9_-]+$/.test(a))) throw Error("Invalid assistant transcript cursor");
|
|
142
|
+
let s = e.kind === "buildmyiq-course", c = s ? "buiMyCourseAssistantMessages" : "myAssistantWorkflowConversationMessages", l = (await this.request({
|
|
143
|
+
...n,
|
|
144
|
+
operationName: "ReadWorkflowAssistantMessages",
|
|
145
|
+
query: `query ReadWorkflowAssistantMessages($targetId:ID!,$clientConversationId:ID!,$before:String) { ${c}(${s ? "courseId" : "agentId"}:$targetId,clientConversationId:$clientConversationId,before:$before) { turns { message receipt { ${t} } } nextCursor } }`,
|
|
146
|
+
variables: {
|
|
147
|
+
targetId: s ? e.courseId : e.agentId,
|
|
148
|
+
clientConversationId: r,
|
|
149
|
+
before: a
|
|
150
|
+
}
|
|
151
|
+
}))[c];
|
|
152
|
+
if (!l || !Array.isArray(l.turns) || l.turns.length > 25 || l.nextCursor !== null && (typeof l.nextCursor != "string" || l.nextCursor.length > 4096 || !/^[A-Za-z0-9_-]+$/.test(l.nextCursor) || l.nextCursor === a)) throw Error("Invalid assistant transcript page");
|
|
153
|
+
let u = /* @__PURE__ */ new Set(), d = 0;
|
|
154
|
+
for (let t of l.turns) {
|
|
155
|
+
if (!t || typeof t.message != "string" || !t.receipt || t.receipt.status !== "COMPLETED" || !t.receipt.result || u.has(t.receipt.clientTurnId)) throw Error("Invalid assistant transcript turn");
|
|
156
|
+
o(e, t.receipt.clientTurnId, t.receipt), u.add(t.receipt.clientTurnId), d += new TextEncoder().encode(t.message).length + new TextEncoder().encode(t.receipt.result.message).length;
|
|
157
|
+
}
|
|
158
|
+
if (d > 262144) throw Error("Invalid assistant transcript size");
|
|
159
|
+
return l;
|
|
160
|
+
}
|
|
161
|
+
async cancel(e, t) {
|
|
162
|
+
if (!r(t.workspaceId) || !/^[a-zA-Z0-9_.:-]{1,128}$/.test(e)) throw Error("Invalid assistant turn scope");
|
|
163
|
+
return (await this.request({
|
|
164
|
+
...t,
|
|
165
|
+
operationName: "CancelWorkflowAssistantTurn",
|
|
166
|
+
query: "mutation CancelWorkflowAssistantTurn($clientTurnId: ID!) { cancelMyAssistantTurn(clientTurnId: $clientTurnId) }",
|
|
167
|
+
variables: { clientTurnId: e }
|
|
168
|
+
})).cancelMyAssistantTurn === !0;
|
|
169
|
+
}
|
|
170
|
+
async wait(e, t, n, r = {}) {
|
|
171
|
+
let i = r.budgetMs ?? 18e4, a = r.intervalMs ?? 1e3;
|
|
172
|
+
if (!Number.isInteger(i) || i < 100 || i > 6e5 || !Number.isInteger(a) || a < 10 || a > 5e3) throw Error("Invalid assistant polling budget");
|
|
173
|
+
let o = Date.now() + i, s = null, c = 0;
|
|
174
|
+
for (; Date.now() < o;) {
|
|
175
|
+
if (n.signal?.throwIfAborted(), s = await this.read(e, t, n), s?.status === "GENERATED" && Date.now() >= c && (c = Date.now() + 5e3, s = await this.read(e, t, n, !0)), s) {
|
|
176
|
+
if (r.onProgress?.(s), s.status === "COMPLETED") return {
|
|
177
|
+
kind: "completed",
|
|
178
|
+
receipt: s
|
|
179
|
+
};
|
|
180
|
+
if ([
|
|
181
|
+
"FAILED",
|
|
182
|
+
"UNKNOWN",
|
|
183
|
+
"CANCELLED"
|
|
184
|
+
].includes(s.status)) return {
|
|
185
|
+
kind: "terminal",
|
|
186
|
+
receipt: s
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
if (n.signal?.throwIfAborted(), Date.now() >= o) break;
|
|
190
|
+
await new Promise((e, t) => {
|
|
191
|
+
let r = () => n.signal?.removeEventListener("abort", s), i = setTimeout(() => {
|
|
192
|
+
r(), e();
|
|
193
|
+
}, Math.min(a, o - Date.now())), s = () => {
|
|
194
|
+
clearTimeout(i), r(), t(n.signal?.reason ?? new DOMException("Aborted", "AbortError"));
|
|
195
|
+
};
|
|
196
|
+
n.signal?.addEventListener("abort", s, { once: !0 }), n.signal?.aborted && s();
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
return {
|
|
200
|
+
kind: "pending",
|
|
201
|
+
receipt: s
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
//#endregion
|
|
206
|
+
export { c as AssistantWorkflowClient, s as isWorkflowAssistantAdmissionRefusal };
|
|
@@ -15,6 +15,21 @@ export declare function clearSSORelayAttempt(): void;
|
|
|
15
15
|
export declare function shouldSkipSSORedirect(returnPath?: string): boolean;
|
|
16
16
|
export declare function hasRecentSSORedirectAttempt(relayOrigin: string, returnTo: string): boolean;
|
|
17
17
|
export declare function markSSORedirectAttempt(relayOrigin: string, returnTo: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* Check if an SSO redirect should be initiated.
|
|
20
|
+
* Returns the redirect URL if SSO should happen, null otherwise.
|
|
21
|
+
*
|
|
22
|
+
* Call this from ProtectedRoute or LandingOrDashboardRedirect
|
|
23
|
+
* before showing login page.
|
|
24
|
+
*
|
|
25
|
+
* Cross-eTLD+1 product shells always start at the central bridge
|
|
26
|
+
* (alphaapp/app.burdenoff.com): product cookies are first-party only and must
|
|
27
|
+
* not route a visitor through a different product origin. The bridge reads its
|
|
28
|
+
* own first-party session state — including its profile-origin hint — then
|
|
29
|
+
* returns to the original product origin through `/auth/sso-callback#sso=...`.
|
|
30
|
+
* On no central session the bridge bounces back with `?sso_failed=1` and
|
|
31
|
+
* `isAutoSSOSuppressed` keeps the user on the login screen.
|
|
32
|
+
*/
|
|
18
33
|
export declare function getSSORedirectUrl(returnPath?: string): string | null;
|
|
19
34
|
/**
|
|
20
35
|
* Check if Single Logout (SLO) has occurred on another shell.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SSORedirectGuard.d.ts","sourceRoot":"","sources":["../../../src/shared/components/SSORedirectGuard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAuDH,wBAAgB,oBAAoB,IAAI,IAAI,CAM3C;AA2CD,wBAAgB,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAGlE;AAED,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAM1F;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAiBlF;
|
|
1
|
+
{"version":3,"file":"SSORedirectGuard.d.ts","sourceRoot":"","sources":["../../../src/shared/components/SSORedirectGuard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAuDH,wBAAgB,oBAAoB,IAAI,IAAI,CAM3C;AA2CD,wBAAgB,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAGlE;AAED,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAM1F;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAiBlF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAqDpE;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CA6BlC;AAED;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAyC9F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CA6B1C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,4CAEjC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { resolveAuthBridgeConfig as e } from "../config/authBridgeUrls.js";
|
|
2
2
|
import { clearActiveContextStorage as t } from "../providers/shell/ActiveContextStorage.js";
|
|
3
3
|
import { clearShellSsoCookies as n, isLocalDevSsoHost as r, isSharedSsoCookieDomain as i, isTrustedSsoOrigin as a, readShellSsoCookie as o } from "../utils/authCookie.js";
|
|
4
|
-
import {
|
|
5
|
-
import { BrandedSplash as
|
|
6
|
-
import { jsx as
|
|
4
|
+
import { isRealNativeOrDesktopShell as s } from "../native/platform.js";
|
|
5
|
+
import { BrandedSplash as c } from "../../ui/branded-splash.js";
|
|
6
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
7
7
|
//#region src/shared/components/SSORedirectGuard.tsx
|
|
8
|
-
var
|
|
8
|
+
var u = "bf-sso-relay-attempt", d = 120 * 1e3, f = [
|
|
9
9
|
"sso_failed",
|
|
10
10
|
"sso-failed",
|
|
11
11
|
"sso-attempted"
|
|
12
12
|
];
|
|
13
|
-
function
|
|
13
|
+
function p(e) {
|
|
14
14
|
if (typeof window > "u") return null;
|
|
15
15
|
try {
|
|
16
16
|
let t = `${window.location.pathname}${window.location.search}${window.location.hash}`, n = new URL(e ?? t, window.location.origin);
|
|
@@ -19,73 +19,70 @@ function m(e) {
|
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function m(e) {
|
|
23
23
|
return e === "/auth" || e.startsWith("/auth/");
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return
|
|
25
|
+
function h(e) {
|
|
26
|
+
return f.some((t) => e.searchParams.has(t));
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
if (
|
|
30
|
-
if (
|
|
28
|
+
function g(e) {
|
|
29
|
+
if (h(e)) return n(), !0;
|
|
30
|
+
if (m(e.pathname)) return !0;
|
|
31
31
|
let t = e.searchParams.get("reason");
|
|
32
32
|
return t === "session-expired" || t === "logout";
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function _() {
|
|
35
35
|
try {
|
|
36
|
-
sessionStorage.removeItem(
|
|
36
|
+
sessionStorage.removeItem(u);
|
|
37
37
|
} catch {}
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function v() {
|
|
40
40
|
if (typeof window > "u") return null;
|
|
41
41
|
try {
|
|
42
|
-
let e = sessionStorage.getItem(
|
|
42
|
+
let e = sessionStorage.getItem(u);
|
|
43
43
|
if (!e) return null;
|
|
44
44
|
let t = JSON.parse(e);
|
|
45
|
-
return typeof t.relayOrigin != "string" || typeof t.returnTo != "string" || typeof t.startedAt != "number" || Date.now() - t.startedAt >
|
|
45
|
+
return typeof t.relayOrigin != "string" || typeof t.returnTo != "string" || typeof t.startedAt != "number" || Date.now() - t.startedAt > d ? (_(), null) : {
|
|
46
46
|
relayOrigin: t.relayOrigin,
|
|
47
47
|
returnTo: t.returnTo,
|
|
48
48
|
startedAt: t.startedAt
|
|
49
49
|
};
|
|
50
50
|
} catch {
|
|
51
|
-
return
|
|
51
|
+
return _(), null;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function y(e) {
|
|
55
55
|
try {
|
|
56
56
|
return new URL(e).origin;
|
|
57
57
|
} catch {
|
|
58
58
|
return null;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
let t =
|
|
63
|
-
return !t ||
|
|
61
|
+
function b(e) {
|
|
62
|
+
let t = p(e);
|
|
63
|
+
return !t || g(t);
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
let n =
|
|
65
|
+
function x(e, t) {
|
|
66
|
+
let n = y(e), r = p(t), i = v();
|
|
67
67
|
return !!(n && r && i?.returnTo === r.href);
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function S(e, t) {
|
|
70
70
|
if (typeof window > "u") return;
|
|
71
|
-
let n =
|
|
71
|
+
let n = y(e), r = p(t);
|
|
72
72
|
if (!(!n || !r)) try {
|
|
73
73
|
let e = {
|
|
74
74
|
relayOrigin: n,
|
|
75
75
|
returnTo: r.href,
|
|
76
76
|
startedAt: Date.now()
|
|
77
77
|
};
|
|
78
|
-
sessionStorage.setItem(
|
|
78
|
+
sessionStorage.setItem(u, JSON.stringify(e));
|
|
79
79
|
} catch {}
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
function T(t) {
|
|
85
|
-
if (w()) return null;
|
|
81
|
+
function C(t) {
|
|
82
|
+
if (s()) return null;
|
|
86
83
|
try {
|
|
87
|
-
let n =
|
|
88
|
-
if (!n ||
|
|
84
|
+
let n = p(t);
|
|
85
|
+
if (!n || g(n) || r()) return null;
|
|
89
86
|
let i = window.location.origin, s = null;
|
|
90
87
|
try {
|
|
91
88
|
s = new URL(e().url).origin;
|
|
@@ -93,23 +90,23 @@ function T(t) {
|
|
|
93
90
|
let c = o();
|
|
94
91
|
if (s === i && c?.origin && a(c.origin)) {
|
|
95
92
|
let e = new URL(c.origin).origin;
|
|
96
|
-
if (e && e !== i && !
|
|
93
|
+
if (e && e !== i && !x(e, n.href)) return S(e, n.href), `${e}/auth/sso-relay?returnTo=${encodeURIComponent(n.href)}`;
|
|
97
94
|
}
|
|
98
|
-
return s && s !== i && !
|
|
95
|
+
return s && s !== i && !x(s, n.href) ? (S(s, n.href), `${s}/auth/sso-relay?returnTo=${encodeURIComponent(n.href)}`) : null;
|
|
99
96
|
} catch {
|
|
100
97
|
return null;
|
|
101
98
|
}
|
|
102
99
|
}
|
|
103
|
-
function
|
|
100
|
+
function w() {
|
|
104
101
|
try {
|
|
105
102
|
if (o()) return !1;
|
|
106
103
|
let e = sessionStorage.getItem("bf-active-profile");
|
|
107
|
-
return !e || !localStorage.getItem(`bf-p-${e}-tokens`) || !i() ? !1 : (
|
|
104
|
+
return !e || !localStorage.getItem(`bf-p-${e}-tokens`) || !i() ? !1 : (E(), !0);
|
|
108
105
|
} catch {
|
|
109
106
|
return !1;
|
|
110
107
|
}
|
|
111
108
|
}
|
|
112
|
-
async function
|
|
109
|
+
async function T(e, t) {
|
|
113
110
|
try {
|
|
114
111
|
let n = await fetch(e, {
|
|
115
112
|
method: "POST",
|
|
@@ -126,7 +123,7 @@ async function D(e, t) {
|
|
|
126
123
|
return !1;
|
|
127
124
|
}
|
|
128
125
|
}
|
|
129
|
-
function
|
|
126
|
+
function E() {
|
|
130
127
|
try {
|
|
131
128
|
let e = localStorage.getItem("bf-profiles");
|
|
132
129
|
if (e) {
|
|
@@ -137,8 +134,8 @@ function O() {
|
|
|
137
134
|
localStorage.removeItem("bf-profiles"), localStorage.removeItem("auth-storage"), sessionStorage.removeItem("bf-active-profile"), t(), n(), window.dispatchEvent(new Event("bf-auth-state-cleared")), window.dispatchEvent(new Event("bf-profile-storage-change"));
|
|
138
135
|
} catch {}
|
|
139
136
|
}
|
|
140
|
-
function
|
|
141
|
-
return /* @__PURE__ */
|
|
137
|
+
function D() {
|
|
138
|
+
return /* @__PURE__ */ l(c, { label: "Signing you in…" });
|
|
142
139
|
}
|
|
143
140
|
//#endregion
|
|
144
|
-
export {
|
|
141
|
+
export { D as SSORedirectSpinner, T as checkRemoteSLO, w as checkSLO, E as clearLocalAuthState, _ as clearSSORelayAttempt, C as getSSORedirectUrl, x as hasRecentSSORedirectAttempt, S as markSSORedirectAttempt, b as shouldSkipSSORedirect };
|
|
@@ -6,6 +6,12 @@ export declare function isAndroid(): boolean;
|
|
|
6
6
|
export declare function isWeb(): boolean;
|
|
7
7
|
/** Running inside an Electron desktop shell. */
|
|
8
8
|
export declare function isElectron(): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether cross-origin session hops should stay inside the current product origin.
|
|
11
|
+
* Capacitor is detected independently of boot order; presentation previews remain
|
|
12
|
+
* ordinary browser tabs so their bridge-host session maintenance still runs.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isRealNativeOrDesktopShell(): boolean;
|
|
9
15
|
/** Running as an installed / standalone PWA (added to home screen / installed). */
|
|
10
16
|
export declare function isStandalonePWA(): boolean;
|
|
11
17
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../src/shared/native/platform.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../src/shared/native/platform.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD,wBAAgB,WAAW,IAAI,uBAAuB,CAIrD;AAED,wBAAgB,QAAQ,IAAI,OAAO,CAElC;AAED,wBAAgB,KAAK,IAAI,OAAO,CAE/B;AAED,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,wBAAgB,KAAK,IAAI,OAAO,CAE/B;AAED,gDAAgD;AAChD,wBAAgB,UAAU,IAAI,OAAO,CAapC;AAYD;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI,OAAO,CAIpD;AAED,mFAAmF;AACnF,wBAAgB,eAAe,IAAI,OAAO,CAQzC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAExC;AAED,6EAA6E;AAC7E,wBAAgB,YAAY,IAAI,OAAO,CAEtC"}
|
|
@@ -1,35 +1,42 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isCapacitorNative as e } from "./capacitor.js";
|
|
2
|
+
import { getNativeBridge as t } from "./bridge.js";
|
|
2
3
|
//#region src/shared/native/platform.ts
|
|
3
|
-
function t() {
|
|
4
|
-
let t = e();
|
|
5
|
-
return t ? t.getPlatform() : "web";
|
|
6
|
-
}
|
|
7
4
|
function n() {
|
|
8
|
-
|
|
5
|
+
let e = t();
|
|
6
|
+
return e ? e.getPlatform() : "web";
|
|
9
7
|
}
|
|
10
8
|
function r() {
|
|
11
|
-
return t()
|
|
9
|
+
return t()?.isNativePlatform() ?? !1;
|
|
12
10
|
}
|
|
13
11
|
function i() {
|
|
14
|
-
return
|
|
12
|
+
return n() === "ios";
|
|
15
13
|
}
|
|
16
14
|
function a() {
|
|
17
|
-
return
|
|
15
|
+
return n() === "android";
|
|
18
16
|
}
|
|
19
17
|
function o() {
|
|
20
|
-
return
|
|
18
|
+
return n() === "web";
|
|
21
19
|
}
|
|
22
20
|
function s() {
|
|
21
|
+
return typeof window > "u" ? !1 : !!(window.__burdenoffDesktop?.isElectron || typeof navigator < "u" && /electron/i.test(navigator.userAgent) || typeof window < "u" && window.process?.type === "renderer");
|
|
22
|
+
}
|
|
23
|
+
function c() {
|
|
24
|
+
return typeof document < "u" && !!document.documentElement?.dataset?.nativePreview;
|
|
25
|
+
}
|
|
26
|
+
function l() {
|
|
27
|
+
return e() ? !0 : c() ? !1 : r() || s();
|
|
28
|
+
}
|
|
29
|
+
function u() {
|
|
23
30
|
if (typeof window > "u") return !1;
|
|
24
31
|
if (document?.documentElement?.dataset?.nativePreview === "pwa") return !0;
|
|
25
32
|
let e = window.matchMedia?.("(display-mode: standalone)")?.matches ?? !1, t = window.navigator.standalone === !0;
|
|
26
33
|
return e || t;
|
|
27
34
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
35
|
+
function d() {
|
|
36
|
+
return r() || s() || u();
|
|
30
37
|
}
|
|
31
|
-
function
|
|
32
|
-
return !
|
|
38
|
+
function f() {
|
|
39
|
+
return !d();
|
|
33
40
|
}
|
|
34
41
|
//#endregion
|
|
35
|
-
export {
|
|
42
|
+
export { n as getPlatform, a as isAndroid, s as isElectron, i as isIOS, d as isInstalledApp, r as isNative, l as isRealNativeOrDesktopShell, u as isStandalonePWA, o as isWeb, f as isWebBrowser };
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* getSSORedirectUrl would relay the stale session back on the next visit
|
|
8
8
|
* and the user would silently stay logged in.
|
|
9
9
|
*
|
|
10
|
-
* Returns null when no detour is needed (already on the bridge host,
|
|
11
|
-
* unable to resolve a bridge URL — caller should
|
|
12
|
-
* own origin).
|
|
10
|
+
* Returns null when no detour is needed (already on the bridge host, inside a
|
|
11
|
+
* native or desktop shell, or unable to resolve a bridge URL — caller should
|
|
12
|
+
* just stay/navigate on its own origin).
|
|
13
13
|
*/
|
|
14
14
|
export declare function getCrossOriginLogoutUrl(): string | null;
|
|
15
15
|
export declare function hasLocalProfileSession(profileId: string | null): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssoRelay.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/ssoRelay.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ssoRelay.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/ssoRelay.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAYvD;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAWxE;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA2BrE"}
|