@floe-ai/sdk 0.1.0-dev.25 → 0.1.0-dev.26
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-sdk/floe-sdk.es.js
CHANGED
|
@@ -17757,7 +17757,7 @@ class dc extends lh {
|
|
|
17757
17757
|
*/
|
|
17758
17758
|
setupNavigationDetection() {
|
|
17759
17759
|
this.navigationCompleteDetector || (this.navigationCompleteDetector = new gh()), this.navigationCompleteDetector.start((t) => {
|
|
17760
|
-
console.log("[OnboardingSDK] Navigation complete detected:", t), this.overlay.
|
|
17760
|
+
console.log("[OnboardingSDK] Navigation complete detected:", t), this.overlay.cleanup(), this.sendMetadata({
|
|
17761
17761
|
type: "navigation_complete",
|
|
17762
17762
|
url: t,
|
|
17763
17763
|
timestamp: Date.now()
|
|
@@ -18164,13 +18164,13 @@ class dc extends lh {
|
|
|
18164
18164
|
console.log("[OnboardingSDK] 🎯 Received direct hybrid action:", n.action), this.handleHybridAction(n);
|
|
18165
18165
|
return;
|
|
18166
18166
|
}
|
|
18167
|
-
n.type === "highlight" ? (console.log("[OnboardingSDK] Handling highlight command"), n.target ? this.overlay.highlightTarget(n.target, n.options) : n.selector && this.overlay.highlight(n.selector, n.options)) : n.type === "tooltip" && n.text ? this.overlay.showTooltip(n.text, n.options) : n.type === "action" ? n.target ? this.handleHybridAction(n) : this.actionExecutor.executeWithConsent(n.action) : n.type === "clear_highlight" ? this.overlay.clearHighlight() : n.type === "batched_navigation" ? this.handleBatchedNavigation(n) : n.type === "fast_action" ? this.executeActionFast(n) : n.type === "execute_api" || n.action === "execute_api" ? this.handleExecuteApi(n) : n.type === "session_paused" ? (console.log("[OnboardingSDK] Session paused:", n), this.agentState = "paused", this.pausedSessionId = n.session_id || null, this.overlay.
|
|
18167
|
+
n.type === "highlight" ? (console.log("[OnboardingSDK] Handling highlight command"), n.target ? this.overlay.highlightTarget(n.target, n.options) : n.selector && this.overlay.highlight(n.selector, n.options)) : n.type === "tooltip" && n.text ? this.overlay.showTooltip(n.text, n.options) : n.type === "action" ? n.target ? this.handleHybridAction(n) : this.actionExecutor.executeWithConsent(n.action) : n.type === "clear_highlight" ? this.overlay.clearHighlight() : n.type === "batched_navigation" ? this.handleBatchedNavigation(n) : n.type === "fast_action" ? this.executeActionFast(n) : n.type === "execute_api" || n.action === "execute_api" ? this.handleExecuteApi(n) : n.type === "session_paused" ? (console.log("[OnboardingSDK] Session paused:", n), this.agentState = "paused", this.pausedSessionId = n.session_id || null, this.overlay.cleanup(), this.renderReactUI(), this.emit("sessionPaused", n)) : n.type === "plan_progress" ? (console.log("[OnboardingSDK] Plan progress:", n), this.planProgress = {
|
|
18168
18168
|
planName: n.planName || "",
|
|
18169
18169
|
currentStep: n.currentStep || 0,
|
|
18170
18170
|
totalSteps: n.totalSteps || 0,
|
|
18171
18171
|
progressPercent: n.progressPercent || 0,
|
|
18172
18172
|
currentTaskTitle: n.currentTaskTitle || ""
|
|
18173
|
-
}, this.renderReactUI(), this.emit("planProgress", this.planProgress)) : n.type === "plan_started" ? (console.log("[OnboardingSDK] Plan started:", n), this.emit("planStarted", { planName: n.planName, totalSteps: n.totalSteps })) : n.type === "plan_complete" ? (console.log("[OnboardingSDK] Plan complete:", n), this.planProgress = null, this.overlay.
|
|
18173
|
+
}, this.renderReactUI(), this.emit("planProgress", this.planProgress)) : n.type === "plan_started" ? (console.log("[OnboardingSDK] Plan started:", n), this.emit("planStarted", { planName: n.planName, totalSteps: n.totalSteps })) : n.type === "plan_complete" ? (console.log("[OnboardingSDK] Plan complete:", n), this.planProgress = null, this.overlay.cleanup(), this.renderReactUI(), this.emit("planComplete", { planName: n.planName })) : console.log("[OnboardingSDK] Unhandled server message type:", n.type || "unknown");
|
|
18174
18174
|
}
|
|
18175
18175
|
/**
|
|
18176
18176
|
* Handle hybrid UI action from bot
|
|
@@ -18202,7 +18202,7 @@ class dc extends lh {
|
|
|
18202
18202
|
}
|
|
18203
18203
|
let o = ue.resolveTarget(t.target);
|
|
18204
18204
|
if (!o) {
|
|
18205
|
-
console.warn("[OnboardingSDK] ⚠️ Click target not found"), this.overlay.
|
|
18205
|
+
console.warn("[OnboardingSDK] ⚠️ Click target not found"), this.overlay.cleanup(), this.sendMetadata({
|
|
18206
18206
|
type: "bot_action_complete",
|
|
18207
18207
|
action: "click",
|
|
18208
18208
|
success: !1,
|
|
@@ -18225,7 +18225,7 @@ class dc extends lh {
|
|
|
18225
18225
|
), a.dispatchEvent(new MouseEvent("mouseenter", { bubbles: !0 })), a.dispatchEvent(new MouseEvent("mouseover", { bubbles: !0 })), await new Promise((m) => setTimeout(m, 450)), console.log("[OnboardingSDK] 📂 Sidebar expanded");
|
|
18226
18226
|
}
|
|
18227
18227
|
if (!await ue.waitForPositionStability(o, 800)) {
|
|
18228
|
-
console.error("[OnboardingSDK] ❌ Element disappeared during stability wait"), this.overlay.
|
|
18228
|
+
console.error("[OnboardingSDK] ❌ Element disappeared during stability wait"), this.overlay.cleanup(), this.sendMetadata({
|
|
18229
18229
|
type: "bot_action_complete",
|
|
18230
18230
|
action: "click",
|
|
18231
18231
|
success: !1,
|
|
@@ -18292,7 +18292,7 @@ class dc extends lh {
|
|
|
18292
18292
|
});
|
|
18293
18293
|
}
|
|
18294
18294
|
await new Promise((b) => setTimeout(b, 100)), setTimeout(() => {
|
|
18295
|
-
this.overlay.
|
|
18295
|
+
this.overlay.cleanup();
|
|
18296
18296
|
}, 800);
|
|
18297
18297
|
}, 350);
|
|
18298
18298
|
break;
|
|
@@ -18320,7 +18320,7 @@ class dc extends lh {
|
|
|
18320
18320
|
console.log("[OnboardingSDK] 📋 Executing MULTI_SELECT action"), await this.handleMultiSelectAction(t);
|
|
18321
18321
|
break;
|
|
18322
18322
|
case "navigate":
|
|
18323
|
-
console.log("[OnboardingSDK] 🧭 Executing NAVIGATE action to URL:", t.value), this.overlay.
|
|
18323
|
+
console.log("[OnboardingSDK] 🧭 Executing NAVIGATE action to URL:", t.value), this.overlay.cleanup();
|
|
18324
18324
|
{
|
|
18325
18325
|
const a = t.value;
|
|
18326
18326
|
if (!a) {
|
|
@@ -19276,7 +19276,7 @@ class dc extends lh {
|
|
|
19276
19276
|
target: n.target.optionText || n.target.text || "dropdown option",
|
|
19277
19277
|
timestamp: Date.now()
|
|
19278
19278
|
}), console.log("[OnboardingSDK] 📤 Sent bot_action_complete for auto-advance"), await new Promise((o) => setTimeout(o, 200)), setTimeout(() => {
|
|
19279
|
-
this.overlay.
|
|
19279
|
+
this.overlay.cleanup();
|
|
19280
19280
|
}, 600);
|
|
19281
19281
|
}
|
|
19282
19282
|
/**
|