Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "sentienceapi"
version = "0.90.13"
version = "0.90.14"
description = "Python SDK for Sentience AI Agent Browser Automation"
readme = "README.md"
requires-python = ">=3.11"
Expand Down
2 changes: 1 addition & 1 deletion sentience/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
)
from .wait import wait_for

__version__ = "0.90.13"
__version__ = "0.90.14"

__all__ = [
# Core SDK
Expand Down
4 changes: 1 addition & 3 deletions sentience/cloud_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,7 @@ def _upload_index(self) -> None:
pass # Ignore cleanup errors
else:
if self.logger:
self.logger.warning(
f"Index upload failed: HTTP {index_response.status_code}"
)
self.logger.warning(f"Index upload failed: HTTP {index_response.status_code}")
print(f"⚠️ [Sentience] Index upload failed: HTTP {index_response.status_code}")

except Exception as e:
Expand Down
6 changes: 3 additions & 3 deletions sentience/extension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ async function handleScreenshotCapture(_tabId, options = {}) {
async function handleSnapshotProcessing(rawData, options = {}) {
const MAX_ELEMENTS = 10000; // Safety limit to prevent hangs
const startTime = performance.now();

try {
// Safety check: limit element count to prevent hangs
if (!Array.isArray(rawData)) {
throw new Error('rawData must be an array');
}

if (rawData.length > MAX_ELEMENTS) {
console.warn(`[Sentience Background] ⚠️ Large dataset: ${rawData.length} elements. Limiting to ${MAX_ELEMENTS} to prevent hangs.`);
rawData = rawData.slice(0, MAX_ELEMENTS);
Expand Down Expand Up @@ -186,7 +186,7 @@ async function handleSnapshotProcessing(rawData, options = {}) {
// Add timeout protection (18 seconds - less than content.js timeout)
analyzedElements = await Promise.race([
wasmPromise,
new Promise((_, reject) =>
new Promise((_, reject) =>
setTimeout(() => reject(new Error('WASM processing timeout (>18s)')), 18000)
)
]);
Expand Down
2 changes: 1 addition & 1 deletion sentience/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function handleSnapshotRequest(data) {
if (responded) return; // Already responded via timeout
responded = true;
clearTimeout(timeoutId);

const duration = performance.now() - startTime;

// Handle Chrome extension errors (e.g., background script crashed)
Expand Down
Loading