fraim-framework 2.0.190 → 2.0.191
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/package.json +1 -1
- package/public/ai-hub/script.js +24 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fraim-framework",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.191",
|
|
4
4
|
"description": "FRAIM: AI Workforce Infrastructure — the organizational capability that turns AI agents into an accountable workforce, their operators into capable AI managers, and executives into leaders with clear optics on AI proficiency.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
package/public/ai-hub/script.js
CHANGED
|
@@ -9400,22 +9400,32 @@ function tfCloseConnectedSurface() {
|
|
|
9400
9400
|
tfShowArea(returnArea);
|
|
9401
9401
|
}
|
|
9402
9402
|
|
|
9403
|
-
async function tfHandleConnectedAuthMessage(event) {
|
|
9404
|
-
const frame = document.getElementById('connected-frame');
|
|
9405
|
-
if (frame && frame.contentWindow && event.source !== frame.contentWindow) return;
|
|
9406
|
-
let remoteOrigin = '';
|
|
9407
|
-
try { remoteOrigin = new URL(tfConnectedRemoteBase()).origin; }
|
|
9403
|
+
async function tfHandleConnectedAuthMessage(event) {
|
|
9404
|
+
const frame = document.getElementById('connected-frame');
|
|
9405
|
+
if (frame && frame.contentWindow && event.source !== frame.contentWindow) return;
|
|
9406
|
+
let remoteOrigin = '';
|
|
9407
|
+
try { remoteOrigin = new URL(tfConnectedRemoteBase()).origin; }
|
|
9408
9408
|
catch { return; }
|
|
9409
9409
|
if (event.origin !== remoteOrigin) return;
|
|
9410
|
-
const msg = event.data || {};
|
|
9411
|
-
if (!msg || msg.type !== 'fraim-auth-api-key' || typeof msg.apiKey !== 'string' || !msg.apiKey) return;
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
const
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9410
|
+
const msg = event.data || {};
|
|
9411
|
+
if (!msg || msg.type !== 'fraim-auth-api-key' || typeof msg.apiKey !== 'string' || !msg.apiKey) return;
|
|
9412
|
+
const previousKey = tfConnectedApiKey();
|
|
9413
|
+
await tfRememberConnectedApiKey(msg.apiKey);
|
|
9414
|
+
if (state.connectedSurface) {
|
|
9415
|
+
const nextUrl = tfConnectedSurfaceUrl(state.connectedSurface);
|
|
9416
|
+
const frameEl = document.getElementById('connected-frame');
|
|
9417
|
+
if (frameEl) {
|
|
9418
|
+
try {
|
|
9419
|
+
const current = new URL(frameEl.src || '', window.location.href);
|
|
9420
|
+
const next = new URL(nextUrl, window.location.href);
|
|
9421
|
+
if (previousKey === msg.apiKey && current.origin === next.origin && current.pathname === next.pathname) {
|
|
9422
|
+
return;
|
|
9423
|
+
}
|
|
9424
|
+
} catch {}
|
|
9425
|
+
frameEl.src = nextUrl;
|
|
9426
|
+
}
|
|
9427
|
+
}
|
|
9428
|
+
}
|
|
9419
9429
|
|
|
9420
9430
|
async function tfRememberConnectedApiKey(apiKey) {
|
|
9421
9431
|
const changed = apiKey !== state.storedApiKey;
|