gazesight 0.3.5

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.
Files changed (52) hide show
  1. package/LICENSE +37 -0
  2. package/README.md +102 -0
  3. package/dist/chrome/background-capture-offscreen.html +10 -0
  4. package/dist/chrome/background-capture-offscreen.js +1 -0
  5. package/dist/chrome/background.js +62 -0
  6. package/dist/chrome/content.js +62 -0
  7. package/dist/chrome/diagnostics-page.js +1 -0
  8. package/dist/chrome/fullpage-stitch-offscreen.html +10 -0
  9. package/dist/chrome/fullpage-stitch-offscreen.js +1 -0
  10. package/dist/chrome/icons/icon-128.png +0 -0
  11. package/dist/chrome/icons/icon-16.png +0 -0
  12. package/dist/chrome/icons/icon-32.png +0 -0
  13. package/dist/chrome/icons/icon-48.png +0 -0
  14. package/dist/chrome/icons/icon-64.png +0 -0
  15. package/dist/chrome/icons/icon-96.png +0 -0
  16. package/dist/chrome/logo_sans_background.png +0 -0
  17. package/dist/chrome/manifest.json +70 -0
  18. package/dist/chrome/options.css +66 -0
  19. package/dist/chrome/options.html +76 -0
  20. package/dist/chrome/options.js +82 -0
  21. package/dist/chrome/permission.css +13 -0
  22. package/dist/chrome/permission.html +15 -0
  23. package/dist/chrome/permission.js +1 -0
  24. package/dist/chrome/popup.css +446 -0
  25. package/dist/chrome/popup.html +191 -0
  26. package/dist/chrome/popup.js +1 -0
  27. package/dist/cli/index.js +320 -0
  28. package/dist/firefox/background.js +62 -0
  29. package/dist/firefox/content.js +62 -0
  30. package/dist/firefox/diagnostics-page.js +1 -0
  31. package/dist/firefox/icons/icon-128.png +0 -0
  32. package/dist/firefox/icons/icon-16.png +0 -0
  33. package/dist/firefox/icons/icon-32.png +0 -0
  34. package/dist/firefox/icons/icon-48.png +0 -0
  35. package/dist/firefox/icons/icon-64.png +0 -0
  36. package/dist/firefox/icons/icon-96.png +0 -0
  37. package/dist/firefox/logo_sans_background.png +0 -0
  38. package/dist/firefox/manifest.json +90 -0
  39. package/dist/firefox/options.css +66 -0
  40. package/dist/firefox/options.html +76 -0
  41. package/dist/firefox/options.js +82 -0
  42. package/dist/firefox/permission.css +13 -0
  43. package/dist/firefox/permission.html +15 -0
  44. package/dist/firefox/permission.js +1 -0
  45. package/dist/firefox/popup.css +446 -0
  46. package/dist/firefox/popup.html +191 -0
  47. package/dist/firefox/popup.js +1 -0
  48. package/dist/gazesight-firefox.xpi +0 -0
  49. package/dist/mcp/index.js +1428 -0
  50. package/dist/worker/visual-diff.js +642 -0
  51. package/docs/preview-matrix.csv +6 -0
  52. package/package.json +130 -0
@@ -0,0 +1 @@
1
+ "use strict";(()=>{function a(e,s){return e.slice(0,4096).replace(/https?:\/\/[^\s"'<>]+/gi,o=>{try{let n=new URL(o);return n.origin+n.pathname}catch{return"[redacted URL]"}}).replace(/(?:bearer\s+)[\w.+/=-]+/gi,"[redacted]").replace(/\beyJ[\w-]+\.[\w-]+(?:\.[\w-]+)?/g,"[redacted]").replace(/\b[a-zA-Z0-9_+/-]{24,}={0,2}\b/g,"[redacted]").replace(/((?:password|passwd|token|secret|credential|api[-_]?key|authorization)["']?\s*[:=]\s*["']?)[^\s,;"']+/gi,"$1[redacted]").replace(/\s+/g," ").trim().slice(0,s)}function w(e,s){let o={warn:e.warn,error:e.error},n={},p=()=>{for(let t of["warn","error"])e[t]===n[t]&&(e[t]=o[t])};try{for(let t of["warn","error"]){let d=o[t],i=function(...l){try{return Reflect.apply(d,this,l)}finally{try{let u=l.slice(0,8).map(r=>typeof r=="string"?a(r,256):typeof r=="number"||typeof r=="boolean"||r===null||r===void 0?String(r):"[object omitted]").join(" ");s({level:t,message:a(u,512),timestamp:Date.now()})}catch{}}};if(n[t]=i,e[t]=i,e[t]!==i)throw new Error("Console method cannot be wrapped")}return p}catch{throw p(),new Error("Console capture unavailable")}}var c="gazesight-console-stop";window.dispatchEvent(new Event(c));try{let e=n=>window.postMessage(n,location.origin),s=w(console,n=>e({namespace:"gazesight-console",type:"entry",entry:n})),o=()=>{s(),window.removeEventListener(c,o),e({namespace:"gazesight-console",type:"stopped"})};window.addEventListener(c,o),e({namespace:"gazesight-console",type:"ready"})}catch{}})();
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,90 @@
1
+ {
2
+ "manifest_version": 2,
3
+ "name": "GazeSight",
4
+ "version": "0.3.5",
5
+ "description": "Give coding agents visual access to the Firefox tab you're already using.",
6
+ "icons": {
7
+ "16": "icons/icon-16.png",
8
+ "32": "icons/icon-32.png",
9
+ "48": "icons/icon-48.png",
10
+ "64": "icons/icon-64.png",
11
+ "96": "icons/icon-96.png",
12
+ "128": "icons/icon-128.png"
13
+ },
14
+ "browser_specific_settings": {
15
+ "gecko": {
16
+ "id": "extension@gazesight.dev",
17
+ "strict_min_version": "142.0",
18
+ "data_collection_permissions": {
19
+ "required": [
20
+ "websiteContent",
21
+ "browsingActivity"
22
+ ]
23
+ }
24
+ }
25
+ },
26
+ "permissions": [
27
+ "activeTab",
28
+ "tabs",
29
+ "storage",
30
+ "scripting",
31
+ "webRequest",
32
+ "http://localhost/*",
33
+ "https://localhost/*",
34
+ "http://127.0.0.1/*",
35
+ "https://127.0.0.1/*",
36
+ "http://[::1]/*",
37
+ "https://[::1]/*"
38
+ ],
39
+ "optional_permissions": [
40
+ "<all_urls>",
41
+ "downloads"
42
+ ],
43
+ "background": {
44
+ "scripts": [
45
+ "background.js"
46
+ ],
47
+ "persistent": true
48
+ },
49
+ "browser_action": {
50
+ "default_title": "GazeSight — target and connection",
51
+ "default_popup": "popup.html",
52
+ "default_icon": {
53
+ "16": "icons/icon-16.png",
54
+ "32": "icons/icon-32.png",
55
+ "48": "icons/icon-48.png",
56
+ "64": "icons/icon-64.png",
57
+ "96": "icons/icon-96.png",
58
+ "128": "icons/icon-128.png"
59
+ }
60
+ },
61
+ "commands": {
62
+ "gazesight-select-target": {
63
+ "suggested_key": {
64
+ "default": "Ctrl+Shift+Y"
65
+ },
66
+ "description": "Select or reauthorize this tab with GazeSight"
67
+ }
68
+ },
69
+ "options_ui": {
70
+ "page": "options.html",
71
+ "open_in_tab": true
72
+ },
73
+ "content_security_policy": "script-src 'self'; object-src 'none'; connect-src ws://127.0.0.1:* data:",
74
+ "content_scripts": [
75
+ {
76
+ "matches": [
77
+ "http://localhost/*",
78
+ "https://localhost/*",
79
+ "http://127.0.0.1/*",
80
+ "https://127.0.0.1/*",
81
+ "http://[::1]/*",
82
+ "https://[::1]/*"
83
+ ],
84
+ "js": [
85
+ "content.js"
86
+ ],
87
+ "run_at": "document_start"
88
+ }
89
+ ]
90
+ }
@@ -0,0 +1,66 @@
1
+ :root {
2
+ font-family: system-ui, sans-serif;
3
+ color: #142b52;
4
+ background: #edf3fc;
5
+ }
6
+ main {
7
+ max-width: 620px;
8
+ margin: 64px auto;
9
+ padding: 24px;
10
+ }
11
+ h1 {
12
+ font-size: 42px;
13
+ letter-spacing: -1.5px;
14
+ }
15
+ form {
16
+ display: grid;
17
+ gap: 12px;
18
+ }
19
+ input,
20
+ textarea,
21
+ button {
22
+ font: inherit;
23
+ padding: 12px;
24
+ border: 1px solid #83938c;
25
+ border-radius: 6px;
26
+ }
27
+ textarea {
28
+ min-height: 80px;
29
+ }
30
+ button {
31
+ background: #234fa3;
32
+ color: white;
33
+ cursor: pointer;
34
+ }
35
+ output {
36
+ min-height: 2em;
37
+ }
38
+ input:focus-visible,
39
+ textarea:focus-visible,
40
+ button:focus-visible {
41
+ outline: 3px solid #b86d23;
42
+ outline-offset: 3px;
43
+ }
44
+ #agent-guidance {
45
+ margin-top: 32px;
46
+ padding-top: 16px;
47
+ border-top: 1px solid #c8d3e6;
48
+ }
49
+ #agent-guidance h2 {
50
+ font-size: 20px;
51
+ margin-bottom: 8px;
52
+ }
53
+ .muted {
54
+ color: #4e5c78;
55
+ font-size: 13px;
56
+ }
57
+ #guidance-text {
58
+ white-space: pre-wrap;
59
+ background: #fff;
60
+ border: 1px solid #c8d3e6;
61
+ border-radius: 6px;
62
+ padding: 12px;
63
+ font-size: 13px;
64
+ max-height: 320px;
65
+ overflow: auto;
66
+ }
@@ -0,0 +1,76 @@
1
+ <!doctype html>
2
+ <html lang="fr">
3
+ <meta charset="utf-8" /><title>GazeSight — connexion locale</title
4
+ ><link rel="stylesheet" href="options.css" />
5
+ <main>
6
+ <p>GAZESIGHT / FIREFOX</p>
7
+ <h1>Connectez votre onglet.</h1>
8
+ <p>Le serveur MCP et Firefox échangent uniquement sur votre machine.</p>
9
+ <p>
10
+ GazeSight observe seulement la cible sélectionnée sur localhost ou les
11
+ origines que vous autorisez. La permission scripting sert à observer les
12
+ avertissements et erreurs console ; webRequest signale les requêtes
13
+ échouées sans collecter leurs headers, bodies ou cookies.
14
+ </p>
15
+ <p>
16
+ Le token de pairing est conservé dans le stockage local de Firefox, qui
17
+ n’est pas chiffré. Ne partagez pas votre fichier de configuration.
18
+ </p>
19
+ <form>
20
+ <label for="config-file"
21
+ >Importer la configuration GazeSight locale</label
22
+ >
23
+ <input id="config-file" type="file" accept="application/json,.json" />
24
+ <label for="token">Token de pairing</label
25
+ ><input
26
+ id="token"
27
+ type="password"
28
+ required
29
+ autocomplete="off"
30
+ minlength="64"
31
+ maxlength="64"
32
+ /><label for="port">Port du bridge</label
33
+ ><input
34
+ id="port"
35
+ type="number"
36
+ value="32147"
37
+ min="1024"
38
+ max="65535"
39
+ required
40
+ /><label for="origins"
41
+ >Origines externes autorisées (facultatif, une par ligne)</label
42
+ ><textarea
43
+ id="origins"
44
+ placeholder="https://preview.example.com"
45
+ ></textarea
46
+ ><button>Enregistrer et connecter</button
47
+ ><output aria-live="polite"></output>
48
+ </form>
49
+ <p>
50
+ Ouvrez ensuite votre application locale, puis GazeSight et « Use this tab
51
+ », ou utilisez Ctrl+Maj+Y. Gardez cet onglet actif pour les captures.
52
+ </p>
53
+ <section id="agent-guidance">
54
+ <h2>Agent Guidance</h2>
55
+ <p>
56
+ GazeSight fournit à votre agent de codage des instructions locales
57
+ pour utiliser efficacement ses outils visuels. Cela ne réécrit jamais
58
+ vos prompts.
59
+ </p>
60
+ <p>
61
+ Agent Guidance : <output id="guidance-enabled">—</output><br />
62
+ Visual Fidelity guidance : <output id="guidance-fidelity">—</output>
63
+ </p>
64
+ <p class="muted">
65
+ Reflète la configuration locale importée ci-dessus. Pour modifier ce
66
+ réglage, éditez <code>agentGuidance</code> dans votre fichier de
67
+ configuration GazeSight puis reconnectez votre agent de codage.
68
+ </p>
69
+ <details>
70
+ <summary>Voir le texte des instructions</summary>
71
+ <pre id="guidance-text"></pre>
72
+ </details>
73
+ </section>
74
+ </main>
75
+ <script src="options.js" type="module"></script>
76
+ </html>