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
8 changes: 7 additions & 1 deletion sentience-chrome/content.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// content.js - ISOLATED WORLD (Bridge between Main World and Background)
console.log('[Sentience Bridge] Loaded.');

// Detect if we're in a child frame (for iframe support)
const isChildFrame = window !== window.top;
if (isChildFrame) {
console.log('[Sentience Bridge] Running in child frame:', window.location.href);
}

// 1. Pass Extension ID to Main World (So API knows where to find resources)
document.documentElement.dataset.sentienceExtensionId = chrome.runtime.id;

Expand Down Expand Up @@ -94,7 +100,7 @@ function handleSnapshotRequest(data) {
}

if (response?.success) {
// console.log(`[Sentience Bridge] ✓ WASM processing complete in ${duration.toFixed(1)}ms`);
console.log(`[Sentience Bridge] ✓ WASM processing complete in ${duration.toFixed(1)}ms`);
window.postMessage({
type: 'SENTIENCE_SNAPSHOT_RESULT',
requestId: data.requestId,
Expand Down
497 changes: 486 additions & 11 deletions sentience-chrome/injected_api.js

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions sentience-chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Sentience Semantic Visual Grounding Extractor",
"version": "2.0.1",
"version": "2.0.2",
"description": "Extract semantic visual grounding data from web pages",
"permissions": ["activeTab", "scripting"],
"host_permissions": ["<all_urls>"],
Expand All @@ -19,13 +19,15 @@
{
"matches": ["<all_urls>"],
"js": ["content.js"],
"run_at": "document_start"
"run_at": "document_start",
"all_frames": true
},
{
"matches": ["<all_urls>"],
"js": ["injected_api.js"],
"run_at": "document_idle",
"world": "MAIN"
"world": "MAIN",
"all_frames": true
}
],
"content_security_policy": {
Expand Down
95 changes: 48 additions & 47 deletions sentience-chrome/release.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
{
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/272846250",
"assets_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/272846250/assets",
"upload_url": "https://uploads.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/272846250/assets{?name,label}",
"html_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/tag/v2.0.1",
"id": 272846250,
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/272959448",
"assets_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/272959448/assets",
"upload_url": "https://uploads.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/272959448/assets{?name,label}",
"html_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/tag/v2.0.2",
"id": 272959448,
"author": {
"login": "rcholic",
"id": 135060,
"node_id": "MDQ6VXNlcjEzNTA2MA==",
"avatar_url": "https://avatars.githubusercontent.com/u/135060?v=4",
"login": "github-actions[bot]",
"id": 41898282,
"node_id": "MDM6Qm90NDE4OTgyODI=",
"avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rcholic",
"html_url": "https://github.com/rcholic",
"followers_url": "https://api.github.com/users/rcholic/followers",
"following_url": "https://api.github.com/users/rcholic/following{/other_user}",
"gists_url": "https://api.github.com/users/rcholic/gists{/gist_id}",
"starred_url": "https://api.github.com/users/rcholic/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rcholic/subscriptions",
"organizations_url": "https://api.github.com/users/rcholic/orgs",
"repos_url": "https://api.github.com/users/rcholic/repos",
"events_url": "https://api.github.com/users/rcholic/events{/privacy}",
"received_events_url": "https://api.github.com/users/rcholic/received_events",
"type": "User",
"url": "https://api.github.com/users/github-actions%5Bbot%5D",
"html_url": "https://github.com/apps/github-actions",
"followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}",
"starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions",
"organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs",
"repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos",
"events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}",
"received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events",
"type": "Bot",
"user_view_type": "public",
"site_admin": false
},
"node_id": "RE_kwDOQshiJ84QQ02q",
"tag_name": "v2.0.1",
"node_id": "RE_kwDOQshiJ84QRQfY",
"tag_name": "v2.0.2",
"target_commitish": "main",
"name": "Release v2.0.1",
"name": "Release v2.0.2",
"draft": false,
"immutable": false,
"prerelease": false,
"created_at": "2025-12-26T04:24:57Z",
"updated_at": "2025-12-26T04:32:21Z",
"published_at": "2025-12-26T04:31:58Z",
"created_at": "2025-12-27T01:12:14Z",
"updated_at": "2025-12-27T01:13:47Z",
"published_at": "2025-12-27T01:13:15Z",
"assets": [
{
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/333048763",
"id": 333048763,
"node_id": "RA_kwDOQshiJ84T2eu7",
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/333313919",
"id": 333313919,
"node_id": "RA_kwDOQshiJ84T3fd_",
"name": "extension-files.tar.gz",
"label": "",
"uploader": {
Expand All @@ -65,17 +65,17 @@
},
"content_type": "application/gzip",
"state": "uploaded",
"size": 67295,
"digest": "sha256:0ebbd7b8993470d2b9909cb39760816b0509becfd872826ff3dc0627a24d02f7",
"download_count": 0,
"created_at": "2025-12-26T04:32:21Z",
"updated_at": "2025-12-26T04:32:21Z",
"browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.0.1/extension-files.tar.gz"
"size": 73449,
"digest": "sha256:679e004e2be6d7ccab6030b2437353aeab74f0e5882608c3b38048ecffecff82",
"download_count": 3,
"created_at": "2025-12-27T01:13:16Z",
"updated_at": "2025-12-27T01:13:16Z",
"browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.0.2/extension-files.tar.gz"
},
{
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/333048765",
"id": 333048765,
"node_id": "RA_kwDOQshiJ84T2eu9",
"url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/assets/333313918",
"id": 333313918,
"node_id": "RA_kwDOQshiJ84T3fd-",
"name": "extension-package.zip",
"label": "",
"uploader": {
Expand All @@ -101,15 +101,16 @@
},
"content_type": "application/zip",
"state": "uploaded",
"size": 70262,
"digest": "sha256:69d2acf2b358cfe35bf0697813f5e75be60ab54f88854e7e810c2d390f8f911d",
"size": 75594,
"digest": "sha256:e44d1c2d30ada8912df9b1fe3c96a69b9a74a9c6bf89f7c21397d07ec75dda9c",
"download_count": 0,
"created_at": "2025-12-26T04:32:21Z",
"updated_at": "2025-12-26T04:32:21Z",
"browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.0.1/extension-package.zip"
"created_at": "2025-12-27T01:13:16Z",
"updated_at": "2025-12-27T01:13:16Z",
"browser_download_url": "https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/releases/download/v2.0.2/extension-package.zip"
}
],
"tarball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/tarball/v2.0.1",
"zipball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/zipball/v2.0.1",
"body": ""
"tarball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/tarball/v2.0.2",
"zipball_url": "https://api.github.com/repos/SentienceAPI/Sentience-Geometry-Chrome-Extension/zipball/v2.0.2",
"body": "## What's Changed\r\n* Close gaps during migration from Servo + Chrome to extension migrations by @rcholic in https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/pull/17\r\n\r\n\r\n**Full Changelog**: https://github.com/SentienceAPI/Sentience-Geometry-Chrome-Extension/compare/v2.0.1...v2.0.2",
"mentions_count": 1
}
4 changes: 2 additions & 2 deletions tests/tracing/agent-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ describe('Agent Integration with Tracing', () => {
beforeEach(() => {
// Clean up and recreate test directory
if (fs.existsSync(testDir)) {
fs.rmSync(testDir, { recursive: true });
fs.rmSync(testDir, { recursive: true, force: true });
}
fs.mkdirSync(testDir, { recursive: true });
});

afterEach(() => {
// Clean up test directory
if (fs.existsSync(testDir)) {
fs.rmSync(testDir, { recursive: true });
fs.rmSync(testDir, { recursive: true, force: true });
}
});

Expand Down
4 changes: 2 additions & 2 deletions tests/tracing/jsonl-sink.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ describe('JsonlTraceSink', () => {
beforeEach(() => {
// Clean up test directory
if (fs.existsSync(testDir)) {
fs.rmSync(testDir, { recursive: true });
fs.rmSync(testDir, { recursive: true, force: true });
}
});

afterEach(() => {
// Clean up test directory
if (fs.existsSync(testDir)) {
fs.rmSync(testDir, { recursive: true });
fs.rmSync(testDir, { recursive: true, force: true });
}
});

Expand Down
5 changes: 3 additions & 2 deletions tests/tracing/tracer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ describe('Tracer', () => {
beforeEach(() => {
// Clean up and recreate test directory
if (fs.existsSync(testDir)) {
fs.rmSync(testDir, { recursive: true });
fs.rmSync(testDir, { recursive: true, force: true });
}
fs.mkdirSync(testDir, { recursive: true });
});

afterEach(() => {
// Clean up test directory
// Use force: true to handle Windows file locking issues
if (fs.existsSync(testDir)) {
fs.rmSync(testDir, { recursive: true });
fs.rmSync(testDir, { recursive: true, force: true });
}
});

Expand Down
Loading