@akasecurity/cli 0.9.4 → 0.9.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.
- package/README.md +18 -0
- package/dist/cli.js +2220 -410
- package/extension/background.js +1 -0
- package/extension/content.js +1 -0
- package/extension/icons/icon128.png +0 -0
- package/extension/icons/icon16.png +0 -0
- package/extension/icons/icon48.png +0 -0
- package/extension/manifest.json +39 -0
- package/extension/popup.html +69 -0
- package/extension/popup.js +1 -0
- package/native-host/host.js +31084 -0
- package/native-host/scan-worker.js +18006 -0
- package/package.json +12 -8
- package/web-ui/package.json +11 -7
- package/web-ui/packages/dashboard-ui/package.json +2 -0
- package/web-ui/packages/plugin-sdk/package.json +3 -1
- package/web-ui/packages/ui-kit/package.json +1 -0
- package/web-ui/rules/secrets/gcp-service-account.json +1 -1
- package/web-ui/web-ui/.next/BUILD_ID +1 -1
- package/web-ui/web-ui/.next/app-build-manifest.json +194 -56
- package/web-ui/web-ui/.next/app-path-routes-manifest.json +8 -8
- package/web-ui/web-ui/.next/build-manifest.json +8 -8
- package/web-ui/web-ui/.next/prerender-manifest.json +14 -14
- package/web-ui/web-ui/.next/required-server-files.json +5 -0
- package/web-ui/web-ui/.next/server/app/(app)/activity/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/activity/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/data-shares/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/data-shares/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/data-shares/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/detections/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/detections/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/detections/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/findings/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/findings/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/findings/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/inventory/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/inventory/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/inventory/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/policies/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/policies/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/policies/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/scan/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/scan/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/scan/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/security/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/security/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/security/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/settings/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/settings/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/updates/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/updates/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/updates/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/vault/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/vault/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/vault/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/_not-found/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/_not-found.html +1 -1
- package/web-ui/web-ui/.next/server/app/_not-found.rsc +2 -2
- package/web-ui/web-ui/.next/server/app/index.html +1 -1
- package/web-ui/web-ui/.next/server/app/index.rsc +2 -2
- package/web-ui/web-ui/.next/server/app/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app-paths-manifest.json +8 -8
- package/web-ui/web-ui/.next/server/chunks/114.js +792 -0
- package/web-ui/web-ui/.next/server/chunks/160.js +785 -0
- package/web-ui/web-ui/.next/server/chunks/243.js +1 -1
- package/web-ui/web-ui/.next/server/chunks/330.js +1 -1
- package/web-ui/web-ui/.next/server/chunks/333.js +1 -0
- package/web-ui/web-ui/.next/server/chunks/363.js +12 -0
- package/web-ui/web-ui/.next/server/chunks/528.js +73 -0
- package/web-ui/web-ui/.next/server/chunks/557.js +5 -0
- package/web-ui/web-ui/.next/server/chunks/561.js +123 -0
- package/web-ui/web-ui/.next/server/functions-config-manifest.json +6 -6
- package/web-ui/web-ui/.next/server/middleware-build-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/middleware-manifest.json +5 -5
- package/web-ui/web-ui/.next/server/pages/404.html +1 -1
- package/web-ui/web-ui/.next/server/pages/500.html +1 -1
- package/web-ui/web-ui/.next/server/server-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/server-reference-manifest.json +1 -1
- package/web-ui/web-ui/.next/static/chunks/133-14f0f297836736b9.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/539-b35890d398017f99.js +62 -0
- package/web-ui/web-ui/.next/static/chunks/992-ba273ebe2ac236a5.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/loading-0e999b82265bac84.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/page-90ea4cb1f1956a03.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/loading-0e999b82265bac84.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/page-d96aa1158bb1c630.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/loading-0e999b82265bac84.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-269fa2d4f47e6125.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/error-092d6780c93209d5.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/loading-0e999b82265bac84.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-4ad5b60f476d7c6e.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/loading-0e999b82265bac84.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/loading-0e999b82265bac84.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/page-2bf76696fbe6e76d.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-5d2511a7c06dd645.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/loading-0e999b82265bac84.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/page-1891ec610b461455.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/loading-0e999b82265bac84.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-bc090490b3416d48.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/layout-d7a290e9b0dd8a15.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/loading-0e999b82265bac84.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/page-1d1a93a1e561ca82.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/loading-0e999b82265bac84.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-7a1a29a230626f96.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/security/loading-0e999b82265bac84.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/security/page-a7fa0e028623b7cb.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/loading-0e999b82265bac84.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-9729632fc8128534.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/loading-0e999b82265bac84.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/page-bda9e826a1ac1a00.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/loading-0e999b82265bac84.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/page-28116d3ce827e152.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/page-315a9068831a3ad5.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/{framework-3444de8758288822.js → framework-a566532c222ba944.js} +1 -1
- package/web-ui/web-ui/.next/static/chunks/{main-b13545f01f111855.js → main-f710385bb68f9de5.js} +1 -1
- package/web-ui/web-ui/.next/static/chunks/pages/{_app-7f0d920cc5af1c9f.js → _app-63f369037199ea68.js} +1 -1
- package/web-ui/web-ui/.next/static/chunks/pages/{_error-3d8b61361c4b2c6b.js → _error-41a11264bde7b852.js} +1 -1
- package/web-ui/web-ui/.next/static/css/0af7782f7a750368.css +2 -0
- package/web-ui/web-ui/.next/static/{cVKs25XbQsC1083sU5GOD → x4ixG3_q4UeyC_WNmSFdI}/_buildManifest.js +1 -1
- package/web-ui/web-ui/dist/scan-worker.js +18006 -0
- package/web-ui/web-ui/package.json +4 -3
- package/web-ui/web-ui/server.js +1 -1
- package/web-ui/web-ui/.next/server/chunks/28.js +0 -1
- package/web-ui/web-ui/.next/server/chunks/334.js +0 -2
- package/web-ui/web-ui/.next/server/chunks/514.js +0 -755
- package/web-ui/web-ui/.next/server/chunks/628.js +0 -84
- package/web-ui/web-ui/.next/server/chunks/817.js +0 -1
- package/web-ui/web-ui/.next/server/chunks/830.js +0 -750
- package/web-ui/web-ui/.next/server/chunks/949.js +0 -123
- package/web-ui/web-ui/.next/static/chunks/501-939e9e83b25a6293.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/84-8205054e8901dbde.js +0 -62
- package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/page-e3ce4be93d2f8ac5.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/page-8bb13b53c7bde504.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-07307e6d8ddb5cbf.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-aecbc7b6fbd143c2.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/page-1d468a1a0cf12aea.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-863e759b7e26c759.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/page-7636a56ffa40d5c6.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-c80a692b9d05f321.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/layout-01e6dceb36cb882f.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/page-d98e303b17524dad.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-178c53b1f56b5e97.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/security/page-7f69b2579337c729.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-7019a1567cd9aadd.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/page-90ce0ad1b9403f48.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/page-7ef77f76ff07ea1f.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/page-3fbfddda391d9939.js +0 -1
- package/web-ui/web-ui/.next/static/css/10425160b1a85ff4.css +0 -2
- /package/web-ui/web-ui/.next/static/{cVKs25XbQsC1083sU5GOD → x4ixG3_q4UeyC_WNmSFdI}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(()=>{var a="com.akasecurity.aka";var u=3e3,r=null,d=0,o=new Map;function l(e){let n=e,t=n.requestId;if(t===void 0)return;let s=o.get(t);s&&(o.delete(t),s(n))}function f(){r=null;for(let[e,n]of o)n({type:"error",requestId:e,ok:!1,message:"native host disconnected"});o.clear()}function g(){let e=chrome.runtime.connectNative(a);return e.onMessage.addListener(l),e.onDisconnect.addListener(f),e}function m(e){let n=`${Date.now().toString()}-${(d++).toString()}`;return new Promise(t=>{let s=setTimeout(()=>{o.delete(n)&&t({type:"error",requestId:n,ok:!1,message:"the AKA native host did not respond in time"})},u),i=c=>{clearTimeout(s),t(c)};o.set(n,i);try{(r??(r=g())).postMessage({...e,requestId:n})}catch{o.delete(n),i({type:"error",requestId:n,ok:!1,message:"failed to reach the AKA native host \u2014 is it installed? Run `aka extension install`."})}})}function p(e){return typeof e=="object"&&e!==null&&"type"in e}chrome.runtime.onMessage.addListener((e,n,t)=>p(e)?(m(e).then(t).catch(()=>{t({type:"error",requestId:void 0,ok:!1,message:"relay failed"})}),!0):!1);})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(()=>{function T(t){let{adapter:e,sessionId:s,relay:r,showBanner:n}=t,d=!1,u=!1;function c(i){return d=!0,setTimeout(()=>{d=!1},0),e.submit(i)?!0:(d=!1,n("AKA could not send this message \u2014 the send button was not found, so the site may have changed. Your text is still in the composer and was NOT sent.","block"),!1)}async function m(i,l){let o=await r({type:"capture",sessionId:s,tool:e.id,kind:"prompt",text:l}).catch(()=>({type:"error",requestId:void 0,ok:!1,message:"relay failed"}));if(o.type!=="capture"){c(i);return}if(o.action==="block"){n(`AKA blocked this message \u2014 flagged ${o.ruleIds.join(", ")}. Remove it and resend.`,"block");return}if(o.action==="redact"){if(typeof o.text!="string"){n(`AKA could not redact this message (${o.ruleIds.join(", ")}) \u2014 remove the flagged content and resend.`,"block");return}if(e.setText(i,o.text),e.extractText(i).trim()!==o.text.trim()){n("AKA could not redact this message \u2014 remove the flagged content and resend.","block");return}if(!c(i))return;n(`AKA redacted sensitive content (${o.ruleIds.join(", ")}) before sending.`,"redact");return}if(o.action==="warn"){if(!c(i))return;n(`AKA flagged sensitive content (${o.ruleIds.join(", ")}) \u2014 sent unchanged.`,"warn");return}c(i)}return{handleSubmit(i,l){if(d){d=!1;return}let o=e.extractText(l);o.trim()!==""&&(i.preventDefault(),i.stopImmediatePropagation(),!u&&(u=!0,m(l,o).finally(()=>{u=!1})))}}}function p(t){for(let e of t){let s=document.querySelector(e);if(s)return s}return null}function f(t){return t.innerText}function h(t,e){t.focus(),t.textContent=e,t.dispatchEvent(new InputEvent("input",{bubbles:!0,cancelable:!0}))}function b(t,e){let s=r=>{r.key==="Enter"&&!r.shiftKey&&!r.isComposing&&e(r)};return t.addEventListener("keydown",s,!0),()=>{t.removeEventListener("keydown",s,!0)}}function x(t,e){return t.addEventListener("click",e,!0),()=>{t.removeEventListener("click",e,!0)}}var R=["#prompt-textarea",'form [contenteditable="true"][role="textbox"]','form [contenteditable="true"]'],L=['[data-testid="send-button"]','button[aria-label*="send" i]'];function g(){return p(L)}var v={id:"chatgpt",hostnames:["chatgpt.com","chat.openai.com"],findComposer(){return p(R)},findSendButton:g,extractText:f,setText:h,watchSubmit(t,e){let s=b(t,e),r=g(),n=r?x(r,e):void 0;return()=>{s(),n?.()}},submit(){let t=g();return t?(t.click(),!0):!1}};var M=['div[contenteditable="true"][aria-label*="claude" i]','fieldset [contenteditable="true"]','form [contenteditable="true"]'],P=['button[aria-label*="send" i]','fieldset button[type="submit"]'];function y(){return p(P)}var k={id:"claude-ai",hostnames:["claude.ai"],findComposer(){return p(M)},findSendButton:y,extractText:f,setText:h,watchSubmit(t,e){let s=b(t,e),r=y(),n=r?x(r,e):void 0;return()=>{s(),n?.()}},submit(){let t=y();return t?(t.click(),!0):!1}};var w=[v,k],$=w.flatMap(t=>t.hostnames);function S(t){return w.find(e=>e.hostnames.includes(t))??null}var A=S(location.hostname);A&&H(A);function H(t){let e=crypto.randomUUID(),s=T({adapter:t,sessionId:e,relay:B,showBanner:I}),r=null,n=null,d=null,u=!1;function c(){u=!1;let i=t.findComposer(),l=t.findSendButton();if(!(i===r&&l===n))if(d?.(),r=i,n=l,r&&n){let o=r;d=t.watchSubmit(o,C=>{s.handleSubmit(C,o)})}else d=null}function m(){u||(u=!0,requestAnimationFrame(c))}m(),new MutationObserver(m).observe(document.body,{childList:!0,subtree:!0}),B({type:"session_start",sessionId:e,tool:t.id,hostname:location.hostname}).catch(()=>{})}function B(t){return chrome.runtime.sendMessage(t)}var a=null,E=null;function I(t,e){a||(a=document.createElement("div"),a.style.all="initial",a.style.position="fixed",a.style.zIndex="2147483647",a.style.bottom="24px",a.style.left="50%",a.style.transform="translateX(-50%)",document.body.append(a));let s=a.shadowRoot??a.attachShadow({mode:"open"}),r=e==="block"?"#dc2626":e==="redact"?"#d97706":"#2563eb",n=document.createElement("div");n.style.font="13px/1.4 system-ui, sans-serif",n.style.background=r,n.style.color="white",n.style.padding="8px 14px",n.style.borderRadius="8px",n.style.boxShadow="0 4px 12px rgba(0,0,0,0.25)",n.style.maxWidth="480px",n.textContent=t,s.replaceChildren(n),E&&clearTimeout(E),E=setTimeout(()=>{a?.remove(),a=null},6e3)}})();
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 3,
|
|
3
|
+
"name": "AI Traffic Control",
|
|
4
|
+
"version": "0.9.5",
|
|
5
|
+
"description": "Local secret detection and redaction for ChatGPT and Claude.ai web chat.",
|
|
6
|
+
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqnwx5Snbi3oZ7mDBC78NaTHO6dTKYRtCqr29YnOImR47UM21tP1us3KF6FjQMtR6tAsffflRok1PThQpjBNwYdRM+stvPIUr5GqBRQL1Ge///kZaVz7eCptCjKg00ygk2HwelaCNt6nWy6czIcM3/HssrNflw42IKsBORW7qQ+KhhKqlABjkRUDvBcuhwOU34HHMJxeP2XdyI5T5msqVJN1nVA+X9T/18dP7cCSzkp9RwLN1hvQMS6n3A1R0HUCmfra1lb1KqQhy3EBdm2VwxTDGVPfGYbTdNSyRT70wzcZy1IdQkfT6YOy1M//+yT7Vu9p/aajs+dNNn/zUn0qJyQIDAQAB",
|
|
7
|
+
"icons": {
|
|
8
|
+
"16": "icons/icon16.png",
|
|
9
|
+
"48": "icons/icon48.png",
|
|
10
|
+
"128": "icons/icon128.png"
|
|
11
|
+
},
|
|
12
|
+
"background": {
|
|
13
|
+
"service_worker": "background.js"
|
|
14
|
+
},
|
|
15
|
+
"content_scripts": [
|
|
16
|
+
{
|
|
17
|
+
"matches": [
|
|
18
|
+
"https://chatgpt.com/*",
|
|
19
|
+
"https://chat.openai.com/*",
|
|
20
|
+
"https://claude.ai/*"
|
|
21
|
+
],
|
|
22
|
+
"js": [
|
|
23
|
+
"content.js"
|
|
24
|
+
],
|
|
25
|
+
"run_at": "document_idle"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"action": {
|
|
29
|
+
"default_popup": "popup.html",
|
|
30
|
+
"default_icon": {
|
|
31
|
+
"16": "icons/icon16.png",
|
|
32
|
+
"48": "icons/icon48.png",
|
|
33
|
+
"128": "icons/icon128.png"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"permissions": [
|
|
37
|
+
"nativeMessaging"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>AI Traffic Control</title>
|
|
6
|
+
<style>
|
|
7
|
+
body {
|
|
8
|
+
width: 280px;
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 16px;
|
|
11
|
+
font:
|
|
12
|
+
13px/1.4 system-ui,
|
|
13
|
+
sans-serif;
|
|
14
|
+
color: #1f2937;
|
|
15
|
+
}
|
|
16
|
+
h1 {
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
margin: 0 0 12px;
|
|
19
|
+
}
|
|
20
|
+
.row {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 8px;
|
|
24
|
+
margin-bottom: 10px;
|
|
25
|
+
}
|
|
26
|
+
.dot {
|
|
27
|
+
width: 8px;
|
|
28
|
+
height: 8px;
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
background: #9ca3af;
|
|
31
|
+
flex: none;
|
|
32
|
+
}
|
|
33
|
+
.dot.ok {
|
|
34
|
+
background: #16a34a;
|
|
35
|
+
}
|
|
36
|
+
.dot.error {
|
|
37
|
+
background: #dc2626;
|
|
38
|
+
}
|
|
39
|
+
.muted {
|
|
40
|
+
color: #6b7280;
|
|
41
|
+
}
|
|
42
|
+
button {
|
|
43
|
+
width: 100%;
|
|
44
|
+
margin-top: 8px;
|
|
45
|
+
padding: 8px;
|
|
46
|
+
border: 1px solid #d1d5db;
|
|
47
|
+
border-radius: 6px;
|
|
48
|
+
background: white;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
font: inherit;
|
|
51
|
+
}
|
|
52
|
+
button:hover {
|
|
53
|
+
background: #f3f4f6;
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
56
|
+
</head>
|
|
57
|
+
<body>
|
|
58
|
+
<h1>AI Traffic Control</h1>
|
|
59
|
+
<div class="row">
|
|
60
|
+
<span id="status-dot" class="dot"></span>
|
|
61
|
+
<span id="status-text">Checking native host…</span>
|
|
62
|
+
</div>
|
|
63
|
+
<div id="findings-row" class="row muted" hidden>
|
|
64
|
+
<span id="findings-text"></span>
|
|
65
|
+
</div>
|
|
66
|
+
<button id="open-dashboard">Open dashboard</button>
|
|
67
|
+
<script src="popup.js"></script>
|
|
68
|
+
</body>
|
|
69
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(()=>{var d="http://localhost:4319/security";function s(e){return chrome.runtime.sendMessage(e)}function r(e,t){let n=document.getElementById("status-dot"),o=document.getElementById("status-text");n&&(n.className=`dot ${t==="pending"?"":t}`.trim()),o&&(o.textContent=e)}function a(e){let t=document.getElementById("findings-row"),n=document.getElementById("findings-text");!t||!n||(n.textContent=`${e.toString()} finding${e===1?"":"s"} recorded (all time)`,t.hidden=!1)}async function i(){let e=await s({type:"ping"}).catch(()=>({type:"error",requestId:void 0,ok:!1,message:"relay failed"}));if(e.type!=="ping"){r("Native host not reachable \u2014 run `aka extension install`","error");return}r(e.onboarded?"Connected":"Connected (not onboarded \u2014 run aka:setup)","ok");let t=await s({type:"health"}).catch(()=>({type:"error",requestId:void 0,ok:!1,message:"relay failed"}));t.type==="health"&&a(t.findings)}document.getElementById("open-dashboard")?.addEventListener("click",()=>{chrome.tabs.create({url:d})});i();})();
|