shadow-claw 1.40.0 → 1.40.1
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/.well-known/mcp/server-card.json +2 -2
- package/.well-known/mcp/servers.json +1 -1
- package/.well-known/mcp.json +2 -2
- package/dist/cli/cli.js +2 -2
- package/dist/lib/components/index.js +2 -2
- package/dist/lib/components/shadow-claw-file-viewer/shadow-claw-file-viewer.d.ts +1 -1
- package/dist/lib/components/shadow-claw-file-viewer.js +1 -1
- package/dist/lib/components/shadow-claw.js +1 -1
- package/dist/lib/core/orchestrator/orchestrator-state.d.ts +2 -1
- package/dist/lib/core/orchestrator/orchestrator.d.ts +2 -1
- package/dist/lib/core/orchestrator/utils/operations/task.d.ts +1 -0
- package/dist/lib/index.js +2 -2
- package/dist/lib/{orchestrator-Bq9ft3uG.js → orchestrator-CMN43L0F.js} +9 -13
- package/dist/lib/orchestrator-CMN43L0F.js.map +1 -0
- package/dist/lib/orchestrator-D9f5fDCb.js.map +1 -1
- package/dist/lib/{shadow-claw-MumteAJy.js → shadow-claw-4x3LqlII.js} +2 -2
- package/dist/lib/{shadow-claw-MumteAJy.js.map → shadow-claw-4x3LqlII.js.map} +1 -1
- package/dist/lib/{shadow-claw-file-viewer-CMOnFmcP.js → shadow-claw-file-viewer-CuDhkVcL.js} +21 -21
- package/dist/lib/{shadow-claw-file-viewer-CMOnFmcP.js.map → shadow-claw-file-viewer-CuDhkVcL.js.map} +1 -1
- package/dist/lib/syncWebMcpRegistration-Bbph0XZl.js.map +1 -1
- package/dist/public/.well-known/mcp/server-card.json +2 -2
- package/dist/public/.well-known/mcp/servers.json +1 -1
- package/dist/public/.well-known/mcp.json +2 -2
- package/dist/public/docs/decisions/native-web-components-and-signals.md +1 -1
- package/dist/public/docs/example/article/index.html +2 -2
- package/dist/public/docs/publishing/index.html +2 -2
- package/dist/public/docs/skill-creator/index.html +2 -2
- package/dist/public/index.html +2 -2
- package/dist/public/index.js +1 -1
- package/dist/public/main/index.html +2 -2
- package/dist/public/main/memory/index.html +2 -2
- package/dist/public/{orchestrator-BLkS_jpm.js → orchestrator-Dc_Q73La.js} +1 -1
- package/dist/public/service-worker.js +1 -1
- package/dist/public/{shadow-claw-DmrxnX3Q.js → shadow-claw-Dabb2AEp.js} +2 -2
- package/dist/public/{shadow-claw-file-viewer-a_uRA30F.js → shadow-claw-file-viewer-CDs1QGXk.js} +1 -1
- package/dist/server.js +1 -1
- package/package.json +1 -1
- package/src/cli/cli.ts +2 -2
- package/src/components/shadow-claw-file-viewer/shadow-claw-file-viewer.ts +31 -31
- package/src/core/effect.test.ts +19 -0
- package/src/core/orchestrator/orchestrator-state.ts +2 -1
- package/src/core/orchestrator/orchestrator.test.ts +686 -5
- package/src/core/orchestrator/orchestrator.ts +3 -10
- package/src/core/orchestrator/utils/compactContext.test.ts +423 -121
- package/src/core/orchestrator/utils/configurePeerJs.test.ts +27 -0
- package/src/core/orchestrator/utils/deliverResponse.test.ts +127 -0
- package/src/core/orchestrator/utils/dispatchSubagentInvoke.test.ts +23 -0
- package/src/core/orchestrator/utils/enqueue.test.ts +520 -86
- package/src/core/orchestrator/utils/handleWorkerMessage.test.ts +664 -144
- package/src/core/orchestrator/utils/initTasks.node.test.ts +147 -0
- package/src/core/orchestrator/utils/initTasks.test.ts +926 -191
- package/src/core/orchestrator/utils/initTasks.ts +5 -4
- package/src/core/orchestrator/utils/invokeAgent.test.ts +563 -110
- package/src/core/orchestrator/utils/invokeAgent.ts +8 -10
- package/src/core/orchestrator/utils/loadChannelConfigurations.test.ts +50 -0
- package/src/core/orchestrator/utils/operations/channel.test.ts +377 -170
- package/src/core/orchestrator/utils/operations/provider.test.ts +663 -85
- package/src/core/orchestrator/utils/operations/room.test.ts +74 -11
- package/src/core/orchestrator/utils/operations/task.test.ts +452 -56
- package/src/core/orchestrator/utils/operations/task.ts +1 -1
- package/src/core/orchestrator/utils/operations/vm.test.ts +66 -7
- package/src/core/orchestrator/utils/parseDirectToolCommand.test.ts +6 -0
- package/src/core/orchestrator/utils/settings.test.ts +248 -81
- package/src/core/orchestrator/utils/setupPushTaskListener.test.ts +58 -0
- package/src/core/orchestrator/utils/syncWebMcpRegistration.test.ts +341 -65
- package/src/core/orchestrator/utils/syncWebMcpRegistration.ts +4 -2
- package/src/server/routes/mcp.ts +2 -2
- package/src/stores/file-viewer.test.ts +11 -0
- package/src/stores/theme.test.ts +41 -2
- package/src/stores/toast.test.ts +25 -0
- package/src/worker/tools/bash/native-bash-executor.test.ts +31 -1
- package/src/worker/tools/git/utils/extractConflictPaths.test.ts +24 -0
- package/src/worker/tools/git/utils/parseConflictRegions.test.ts +46 -0
- package/src/worker/tools/git/utils/resolveCorsProxy.test.ts +26 -5
- package/src/worker/tools/git/utils/truncateSnippet.test.ts +16 -0
- package/src/worker/tools/node-transformers-executor.test.ts +105 -6
- package/src/worker/tools/remote-mcp/remote-mcp.test.ts +172 -47
- package/src/worker/tools/remote-mcp/utils/formatListToolsOutput.test.ts +19 -0
- package/src/worker/tools/remote-mcp/utils/isMcpReauthError.test.ts +45 -0
- package/src/worker/tools/remote-mcp/utils/resolveMcpReauth.test.ts +48 -0
- package/src/worker/tools/rooms/list-room-members.test.ts +24 -10
- package/src/worker/tools/tasks/list-tasks.test.ts +39 -8
- package/src/worker/tools/tasks/update-task.test.ts +78 -14
- package/src/worker/tools/ui/javascript.test.ts +70 -17
- package/src/worker/tools/ui/list-tool-profiles.test.ts +31 -9
- package/dist/lib/orchestrator-Bq9ft3uG.js.map +0 -1
package/dist/public/index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><title>ShadowClaw</title><meta charset="utf-8"><meta name="revision" content="
|
|
1
|
+
<!doctype html><html lang="en"><head><title>ShadowClaw</title><meta charset="utf-8"><meta name="revision" content="56af73ea4f6991a6bc5ea27ed76747e103b59e71" /><meta name="version" content="1.40.1" /><meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"><meta name="description" content="ShadowClaw - multi-runtime AI assistant." /><link rel="canonical" href="https://xt-ml.github.io/shadow-claw/"><meta property="og:title" content="ShadowClaw"><meta property="og:description" content="Multi-runtime AI assistant with local and remote LLM orchestration, Web Workers, OPFS storage, and agentic tool execution."><meta property="og:type" content="website"><meta property="og:url" content="https://xt-ml.github.io/shadow-claw/"><meta property="og:image" content="https://xt-ml.github.io/shadow-claw/assets/icons/512.png"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="ShadowClaw"><meta name="twitter:description" content="Multi-runtime AI assistant with local and remote LLM orchestration, Web Workers, OPFS storage, and agentic tool execution."><meta name="twitter:image" content="https://xt-ml.github.io/shadow-claw/assets/icons/512.png"><script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"SoftwareApplication","@id":"https://xt-ml.github.io/shadow-claw/#software","name":"ShadowClaw","description":"Multi-runtime AI assistant with local and remote LLM orchestration, Web Workers, OPFS storage, and agentic tool execution.","url":"https://xt-ml.github.io/shadow-claw/","applicationCategory":"DeveloperApplication","operatingSystem":"Web, Browser, Desktop","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"author":{"@type":"Organization","name":"xt-ml","url":"https://github.com/xt-ml"},"codeRepository":"https://github.com/xt-ml/shadow-claw","license":"https://github.com/xt-ml/shadow-claw/blob/main/LICENSE"},{"@type":"WebSite","@id":"https://xt-ml.github.io/shadow-claw/#website","url":"https://xt-ml.github.io/shadow-claw/","name":"ShadowClaw","description":"Official website and live deployment of ShadowClaw multi-runtime AI assistant.","publisher":{"@type":"Organization","name":"xt-ml","url":"https://github.com/xt-ml"}},{"@type":"Organization","@id":"https://xt-ml.github.io/shadow-claw/#organization","name":"xt-ml","url":"https://github.com/xt-ml","sameAs":["https://github.com/xt-ml"]}]}</script><meta name="theme-color" content="#fff" /><meta http-equiv="origin-trial" content="A88uTgESYWcVgREKVReKB6jom41uP8TzW6ei3jNdidf+Xl6ONqKRjKNBphsxhrZmdkakLK3oXDgkGq53rtZYSAMAAAB2eyJvcmlnaW4iOiJodHRwczovL3h0LW1sLmdpdGh1Yi5pbzo0NDMiLCJmZWF0dXJlIjoiV2ViTUNQIiwiZXhwaXJ5IjoxNzk0ODczNjAwLCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><base href="/shadow-claw/" /><script id="shadow-claw-site-config" type="application/json">{"$schema":"https:\u002f\u002fjson-schema.org\u002fdraft\u002f2020-12\u002fschema","site":{"title":"ShadowClaw","description":"ShadowClaw - multi-runtime AI assistant.","themeColor":"#fff"},"branding":{"faviconPath":"assets\u002ficons\u002ffavicon.ico","appleTouchIconPath":"assets\u002ficons\u002f180.png","notFoundPath":"404.html"},"pwa":{"manifestPath":"manifest.json","themeColor":"#000000"},"sitemapPath":"sitemap.xml","assets":["assets"],"sidebar":{"pagesHidden":false,"chatHidden":false,"tasksHidden":false,"filesHidden":false,"defaultPage":"pages"},"settings":{"defaultToolsProfile":"__builtin_default"},"agent":{"defaultProvider":"transformers_js_local","defaultModel":"onnx-community\u002fgemma-3-1b-it-ONNX-GQA"},"customElements":{"allowedElements":["block-garden","block-garden-option","block-garden-select"],"allowedDomains":["kherrick.github.io","cdn.jsdelivr.net"]},"security":{"connectSrc":["'self'","blob:","data:","https:\u002f\u002fkherrick.github.io","https:\u002f\u002fcdn.jsdelivr.net"]}}</script>
|
|
2
2
|
<script>var ShadowClawThemeInit=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);function n(){if(globalThis.trustedTypes)return;let e=new Map;globalThis.trustedTypes={createPolicy:(t,n)=>{if(e.has(t))throw TypeError(`Policy with name "${t}" already exists.`);let r={createHTML:n.createHTML?e=>n.createHTML(e):void 0,createScriptURL:n.createScriptURL?e=>n.createScriptURL(e):void 0,createScript:n.createScript?e=>n.createScript(e):void 0};return e.set(t,r),r},getPolicy:t=>e.get(t)??null,isHTML:e=>typeof e==`string`||e instanceof Object&&`toString`in e,isScriptURL:e=>typeof e==`string`||e instanceof Object&&`toString`in e,isScript:e=>typeof e==`string`||e instanceof Object&&`toString`in e}}let r=`__shadowClawDefaultTrustedTypesPolicyState`,i=`default`,a=`shadowclaw-sandbox`;function o(){let e=globalThis;return e[r]||(e[r]={initialized:!1,policy:null}),e[r]}function s(){let e=o();if(e.initialized)return;let t=Reflect.get(globalThis,`trustedTypes`);if(!(!t||typeof t.createPolicy!=`function`)){e.initialized=!0;try{if(typeof t.getPolicy==`function`){let n=t.getPolicy(i);if(n){e.policy=n;return}}let n=!1;if(typeof t.getPolicyNames==`function`){let e=t.getPolicyNames();Array.isArray(e)&&e.includes(i)&&(n=!0)}if(n){if(typeof t.getPolicy==`function`){let n=t.getPolicy(a);if(n){e.policy=n;return}}e.policy=t.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e});return}e.policy=t.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch{typeof t.getPolicy==`function`&&(e.policy=t.getPolicy(i)??t.getPolicy(a)??null)}}}new class{loading=!1;models=new Map;getModelInfo(e){if(!e||typeof e!=`string`)return null;let t=e.toLowerCase().trim(),n=this.models.get(t);if(n)return n;if(t.includes(`/`)){let e=t.split(`/`).pop();if(e&&this.models.has(e))return this.models.get(e)}else for(let[e,n]of this.models.entries())if(e.endsWith(`/${t}`))return n;if(t.includes(`:`)){let e=t.split(`:`)[0],n=this.getModelInfo(e);if(n)return n}return null}registerModelInfo(e,t){this.models.set(e.toLowerCase(),t)}clear(){this.models.clear()}async fetchModelInfo(e,t,n){if(e.modelsUrl){this.loading=!0;try{let r=new Headers;if(r.set(`Content-Type`,`application/json`),e.headers)for(let[t,n]of Object.entries(e.headers))r.set(t,n);if(n)for(let[e,t]of Object.entries(n))r.set(e,t);if(t&&e.apiKeyHeader){let n=e.apiKeyHeaderFormat;r.set(e.apiKeyHeader,n?n.replace(`{key}`,t):t)}let i=await fetch(e.modelsUrl,{headers:r});if(!i.ok)throw Error(`HTTP ${i.status} ${i.statusText}`);let a=await i.json(),o=Array.isArray(a.data)?a.data:Array.isArray(a.models)?a.models:[];for(let e of o){if(!e.id)continue;let t=e.context_length??e.context_window??0,n=e.max_completion_tokens||e.per_request_limits?.completion_tokens||e.top_provider?.max_completion_tokens||null,r=typeof e.supports_tools==`boolean`?e.supports_tools:typeof e.supportsTools==`boolean`?e.supportsTools:void 0,i=this.extractModalities(e,`input`),a=this.extractModalities(e,`output`),o=this.modalitiesInclude(i,`image`,`vision`),s=this.modalitiesInclude(i,`audio`,`voice`,`hearing`),c=this.modalitiesInclude(i,`video`),l=e.id===`openrouter/free`||this.supportedParametersInclude(e,`image`,`vision`,`audio`,`tool`,`structured`),u=this.extractReasoning(e),d=typeof e.supports_prompt_caching==`boolean`?e.supports_prompt_caching:typeof e.supportsPromptCaching==`boolean`?e.supportsPromptCaching:this.supportedParametersInclude(e,`cache_control`,`prompt_caching`)?!0:void 0;!t&&Array.isArray(e.providers)&&e.providers.length>0&&(t=e.providers[0]?.context_length||0),this.registerModelInfo(e.id,{contextWindow:t,maxOutput:n,...r!==void 0&&{supportsTools:r},...i.length>0&&{inputModalities:i},...a.length>0&&{outputModalities:a},...o!==void 0&&{supportsImageInput:o},...s!==void 0&&{supportsAudioInput:s},...c!==void 0&&{supportsVideoInput:c},...u&&{reasoning:u},...l&&{routesByRequestFeatures:l},...d!==void 0&&{supportsPromptCaching:d}})}o.length>0&&console.log(`[ModelRegistry] Registered ${o.length} models for provider "${e.id}"`)}catch(t){console.error(`[ModelRegistry] Error fetching models for ${e.id}:`,t)}finally{this.loading=!1}}}extractModalities(e,t){let n=t===`input`?e.input_modalities||e.inputModalities:e.output_modalities||e.outputModalities,r=e.architecture||{},i=t===`input`?r.input_modalities||r.inputModalities:r.output_modalities||r.outputModalities,a=typeof r.modality==`string`?r.modality:``,o=this.parseArchitectureModality(a,t),s=[...this.normalizeStringArray(n),...this.normalizeStringArray(i),...o];return Array.from(new Set(s))}extractReasoning(e){let t=e?.reasoning;if(!t||typeof t!=`object`)return;let n=this.normalizeStringArray(t.supported_efforts),r=typeof t.default_effort==`string`?t.default_effort.toLowerCase():void 0,i=typeof t.default_enabled==`boolean`?t.default_enabled:void 0,a=typeof t.supports_max_tokens==`boolean`?t.supports_max_tokens:void 0,o=typeof t.mandatory==`boolean`?t.mandatory:void 0;if(!(n.length===0&&r===void 0&&i===void 0&&a===void 0&&o===void 0))return{...n.length>0&&{supportedEfforts:n},...r!==void 0&&{defaultEffort:r},...i!==void 0&&{defaultEnabled:i},...a!==void 0&&{supportsMaxTokens:a},...o!==void 0&&{mandatory:o}}}modalitiesInclude(e,...t){if(e.length!==0)return t.some(t=>e.some(e=>e.includes(t)))}normalizeStringArray(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`).map(e=>e.toLowerCase()):[]}parseArchitectureModality(e,t){if(!e)return[];let[n=``,r=``]=e.toLowerCase().split(`->`).map(e=>e.trim());return(t===`input`?n:r).split(/[+,/\s]+/).map(e=>e.trim()).filter(Boolean)}supportedParametersInclude(e,...t){let n=this.normalizeStringArray(e.supported_parameters||e.supportedParameters);return t.some(e=>n.some(t=>t.includes(e)))}};function c(e){return e.replace(/^\/+|\/+$/g,``)}function l(e){let t=c(e);return t.endsWith(`/index.html`)?t=t.slice(0,-11):t.endsWith(`index.html`)&&(t=t.slice(0,-10)),c(t)}function u(e){let t=c(e),n=t.split(`/`).filter(Boolean);if(n.length===0)return null;let r=n[0].toLowerCase();if(r===`pages`){if(n.length>=3){let e=n[1];return{page:`pages`,groupId:e===`main`?`br:main`:e.startsWith(`br-`)?`br:${e.slice(3)}`:e,path:n.slice(2).join(`/`)}}return{page:`pages`,groupId:`br:main`,path:n.slice(1).join(`/`)}}if(r===`files`){let e=n[1]||`main`;return{page:`files`,groupId:e===`main`?`br:main`:e.startsWith(`br-`)?`br:${e.slice(3)}`:e,path:n.slice(2).join(`/`)||void 0}}if(r===`chat`){let e=n[1]||`main`;return{page:`chat`,groupId:e===`main`?`br:main`:e.startsWith(`br-`)?`br:${e.slice(3)}`:e}}if(r===`tasks`){let e=n[1]||`main`;return{page:`tasks`,groupId:e===`main`?`br:main`:e.startsWith(`br-`)?`br:${e.slice(3)}`:e}}return r===`main`?{page:`pages`,groupId:`br:main`,path:n.slice(1).join(`/`)}:{page:`pages`,groupId:`br:main`,path:t}}function d(){if(typeof document<`u`){let e=document.getElementById(`shadow-claw-static-routing`);if(e&&e.textContent)try{let t=JSON.parse(e.textContent);if(t&&typeof t==`object`&&t.routes)return t}catch(e){console.warn(`Failed to parse embedded static routing manifest:`,e)}}return null}function f(e,t){let n=t||d();if(!n||!n.routes)return null;let r=l(e);if(!r)return null;for(let[e,t]of Object.entries(n.routes))if(!(!t||!t.prettyPath)&&l(t.prettyPath)===r)return u(e);return null}let p=null,ee=new Set([`chat`,`files`,`tasks`,`pages`,`settings`,`tools`,`channels`]);function m(){p=null}typeof globalThis<`u`&&(globalThis.__applyBasePathCacheReset=m);function h(){let e=typeof window<`u`?window:typeof self<`u`?self:globalThis;if(e&&e.__SHADOWCLAW_DEPLOY_ID__){let t=String(e.__SHADOWCLAW_DEPLOY_ID__).trim();if(t)return t.replace(/[^a-zA-Z0-9_-]/g,`-`)}let t=globalThis.process;if(t&&t.env&&t.env.SHADOWCLAW_DEPLOY_ID){let e=String(t.env.SHADOWCLAW_DEPLOY_ID).trim();if(e)return e.replace(/[^a-zA-Z0-9_-]/g,`-`)}let n=te();return!n||n===`/`?``:n.replace(/^\/+|\/+$/g,``).replace(/[^a-zA-Z0-9_-]/g,`-`)}function te(){if(p!==null)return p;if((typeof window>`u`||globalThis.WorkerGlobalScope!==void 0&&typeof self<`u`&&self instanceof globalThis.WorkerGlobalScope)&&typeof self<`u`&&self.location){let e=(self.location.pathname||`/`).split(`/`).filter(Boolean);if(e.length<=1)return p=`/`,p;let t=e[0].toLowerCase(),n=t===`service-worker.js`||t===`sw.js`||t===`manifest.json`||t===`sitemap.xml`||t===`favicon.ico`||t===`index.html`||t===`service-worker`||t===`assets`||t===`dist`||t===`public`;if(n&&e.length===2)return p=`/`,p;if(!n)return p=`/`+e[0]+`/`,p}let e=typeof window<`u`&&window.location?window.location:typeof self<`u`&&self.location?self.location:null;if(!e)return`/`;if(typeof document<`u`&&typeof document.querySelector==`function`){let t=document.querySelector(`base[href]`);if(t){let n=t.getAttribute(`href`);if(n)try{let t=new URL(n,e.origin).pathname;return t.endsWith(`/`)||(t+=`/`),p=t,p}catch{}}}let t=e.pathname||`/`;if(t===`/`)return p=`/`,p;let n=t.split(`/`).filter(Boolean),r=n.findIndex(e=>ee.has(e.toLowerCase()));return r>=0?r===0?(p=`/`,p):(p=`/`+n.slice(0,r).join(`/`)+`/`,p):f(t)?(p=`/`,p):n.length===1&&!t.includes(`.`)?(p=`/`+n[0]+`/`,p):(p=`/`,p)}function ne(e){let t=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return RegExp(`(^|\\s)@${t}\\b`,`i`)}ne(`ShadowClaw`);function g(){let e=h();return e?`shadowclaw-${e}`:`shadowclaw`}g();let _={github:{providerId:`github`,name:`GitHub`,aliases:[`github`,`api.github.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`,`git_remote`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`token `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://github.com/login/oauth/authorize`,tokenUrl:`https://github.com/login/oauth/access_token`,defaultScopes:[`repo`,`read:user`],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},gitlab:{providerId:`gitlab`,name:`GitLab`,aliases:[`gitlab`,`gitlab.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`,`git_remote`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`PRIVATE-TOKEN`,headerPrefix:``},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},tokenAuthByServiceType:{git_remote:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}}},oauth:{authorizeUrl:`https://gitlab.com/oauth/authorize`,tokenUrl:`https://gitlab.com/oauth/token`,defaultScopes:[`read_api`,`read_user`],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},figma:{providerId:`figma`,name:`Figma`,aliases:[`figma`,`api.figma.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`X-Figma-Token`,headerPrefix:``},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://www.figma.com/oauth`,tokenUrl:`https://api.figma.com/v1/oauth/token`,refreshUrl:`https://api.figma.com/v1/oauth/refresh`,defaultScopes:[],usePkce:!0,clientAuthMethod:`basic_header`,scopeSeparator:`space`}},notion:{providerId:`notion`,name:`Notion`,aliases:[`notion`,`api.notion.com`,`notion.so`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://api.notion.com/v1/oauth/authorize`,tokenUrl:`https://api.notion.com/v1/oauth/token`,defaultScopes:[],usePkce:!0,clientAuthMethod:`basic_header`,scopeSeparator:`space`}},microsoft_graph:{providerId:`microsoft_graph`,name:`Microsoft Graph`,aliases:[`microsoft`,`graph.microsoft.com`,`microsoft_graph`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://login.microsoftonline.com/common/oauth2/v2.0/authorize`,tokenUrl:`https://login.microsoftonline.com/common/oauth2/v2.0/token`,defaultScopes:[`openid`,`profile`,`offline_access`,`User.Read`],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},yahoo_mail:{providerId:`yahoo_mail`,name:`Yahoo Mail`,aliases:[`yahoo`,`yahoo_mail`,`mail.yahoo.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://api.login.yahoo.com/oauth2/request_auth`,tokenUrl:`https://api.login.yahoo.com/oauth2/get_token`,defaultScopes:[`mail-r`,`mail-w`],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},google:{providerId:`google`,name:`Google`,aliases:[`google`,`googleapis.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://accounts.google.com/o/oauth2/v2/auth`,tokenUrl:`https://oauth2.googleapis.com/token`,defaultScopes:[`openid`,`profile`,`email`],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},atlassian:{providerId:`atlassian`,name:`Atlassian`,aliases:[`atlassian`,`api.atlassian.com`],modes:[`oauth`,`token`,`basic`],defaultMode:`basic`,serviceTypes:[`http_api`,`git_remote`],authTypes:[`token`,`oauth`,`basic_userpass`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `},basic:{headerName:`Authorization`,headerPrefix:`Basic `}},oauth:{authorizeUrl:`https://auth.atlassian.com/authorize`,tokenUrl:`https://auth.atlassian.com/oauth/token`,defaultScopes:[],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},slack:{providerId:`slack`,name:`Slack`,aliases:[`slack`,`slack.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://slack.com/oauth/v2/authorize`,tokenUrl:`https://slack.com/api/oauth.v2.access`,defaultScopes:[],usePkce:!1,clientAuthMethod:`request_body`,scopeSeparator:`comma`}},linear:{providerId:`linear`,name:`Linear`,aliases:[`linear`,`api.linear.app`,`linear.app`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://linear.app/oauth/authorize`,tokenUrl:`https://api.linear.app/oauth/token`,defaultScopes:[],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},azure_devops:{providerId:`azure_devops`,name:`Azure DevOps`,aliases:[`azure_devops`,`dev.azure.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`,`git_remote`],authTypes:[`token`,`oauth`,`basic_userpass`,`ssh_key`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},tokenAuthByServiceType:{git_remote:{token:{headerName:`Authorization`,headerPrefix:`Basic `},oauth:{headerName:`Authorization`,headerPrefix:`Basic `}}},oauth:{authorizeUrl:`https://app.vssps.visualstudio.com/oauth2/authorize`,tokenUrl:`https://app.vssps.visualstudio.com/oauth2/token`,defaultScopes:[`vso.code`,`vso.profile`,`offline_access`],usePkce:!1,clientAuthMethod:`request_body`,scopeSeparator:`space`}},custom_mcp:{providerId:`custom_mcp`,name:`Custom MCP`,aliases:[`custom_mcp`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`mcp_remote`,`webmcp_local`],authTypes:[`none`,`token`,`oauth`,`custom_header`,`ssh_key`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://example.com/oauth/authorize`,tokenUrl:`https://example.com/oauth/token`,defaultScopes:[],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}}};Object.fromEntries(Object.values(_).filter(e=>!!e.oauth).map(e=>{let t=e.oauth;return[e.providerId,{id:e.providerId,name:e.name,authorizeUrl:t.authorizeUrl,tokenUrl:t.tokenUrl,redirectUri:t.redirectUri,defaultScopes:t.defaultScopes,usePkce:t.usePkce,clientAuthMethod:t.clientAuthMethod,scopeSeparator:t.scopeSeparator}]})),Object.fromEntries(Object.values(_).map(e=>[e.providerId,{providerId:e.providerId,modes:e.modes,defaultMode:e.defaultMode}])),new Promise(e=>{});
|
|
3
3
|
/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */
|
|
4
4
|
function v(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y(e){if(Array.isArray(e))return e}function b(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function re(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
@@ -12,6 +12,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
12
12
|
"updated": "1970-01-01T00:00:00Z",
|
|
13
13
|
"slug": "shadow-claw-pages"
|
|
14
14
|
}</code></pre></details></section><article><h2>Welcome to ShadowClaw Pages</h2><p>This is the default static page for your workspace.</p><h2 id="getting-started-with-shadowclaw">Getting started with ShadowClaw</h2><h3 id="what-is-memorymd">What is MEMORY.md?</h3><ul><li> "<a href="/files/main/MEMORY.md">MEMORY.md</a>" is a per conversation, per invocation, auto-loaded, persistent agent memory file. </li><li> It is designed to be a helpful scratchpad for agents to store important information, notes, and context about the conversation. </li></ul><h3 id="how-to-use-files">How to use Files</h3><ul><li>Open "<a href="/files/main">Files</a>" to browse your workspace.</li><li> Edit and preview files with the file viewer: <ul><li><a href="/files/main/index.html">index.html</a></li><li><a href="/files/main/~/docs/example/article.html">article.html</a></li></ul></li></ul><h3 id="how-to-use-pages">How to use Pages</h3><ul><li>Use Set as Page on any markdown or HTML file to add it to Pages.</li><li>Remove a page anytime from the "<a href="/pages">Pages</a>" view.</li></ul><h3 id="how-to-use-chat">How to use Chat</h3><ul><li> Open "<a href="/settings">Settings</a>" to configure your agent's system prompt, tools, and more. </li><li> Open "<a href="/chat/main">Chat</a>" to start a conversation with your agent. </li></ul><h2 id="further-information">Further information</h2><ul><li><a href="https://github.com/xt-ml/shadow-claw#-shadowclaw" >ShadowClaw Project</a ></li><li><a href="https://deepwiki.com/xt-ml/shadow-claw">Deep Wiki</a></li></ul></article></div></div></article><button type="button" class="pages__nav-btn pages__nav-btn--next" data-pages-next aria-label="Next page" hidden disabled><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="m9 18 6-6-6-6"/></svg></button></div></section></template></shadow-claw-pages></div><div class="page" data-page-id="settings"></div><div class="page" data-page-id="tools"></div><div class="page" data-page-id="channels"></div><div class="chat-split-resize-handle" title="Drag to resize chat panel" hidden></div><shadow-claw-toast></shadow-claw-toast></main></div><shadow-claw-dialog dialog-class="app-dialog" dialog-aria-labelledby="appDialogTitle"><template><form method="dialog" class="app-confirm-dialog__form"><h2 id="appDialogTitle" class="app-dialog__title">Confirm</h2><p class="app-dialog__message"></p><ul class="app-dialog__details" hidden></ul><div class="app-dialog__links" hidden></div><p class="app-dialog__countdown" hidden role="status" aria-live="polite" aria-atomic="true"></p><div class="app-confirm-dialog__actions"><button type="submit" value="cancel" class="app-dialog__btn app-dialog__btn--cancel"> Cancel </button><button type="submit" value="confirm" class="app-dialog__btn app-dialog__btn--confirm"> Confirm </button></div></form></template></shadow-claw-dialog><shadow-claw-dialog dialog-class="app-dialog app-prompt-dialog" dialog-aria-labelledby="appPromptTitle"><template><form method="dialog" class="app-prompt-dialog__form"><h2 id="appPromptTitle" class="app-prompt-dialog__title"> Agent Question </h2><p class="app-prompt-dialog__message"></p><div class="app-prompt-dialog__input-area"></div><div class="app-prompt-dialog__actions"><button type="submit" value="submit" class="app-dialog__btn app-dialog__btn--confirm app-prompt-dialog__submit"> Submit </button></div></form></template></shadow-claw-dialog></div></template>
|
|
15
|
-
<a aria-label="ShadowClaw" class="header-title-link" href="https://xt-ml.github.io/shadow-claw/" slot="header-title-link"> <svg xmlns="http://www.w3.org/2000/svg" class="header-title-logo" viewBox="0 0 128 128"><rect width="128" height="128" fill="var(--shadow-claw-icon-bg)" rx="16"/><ellipse cx="64" cy="108" fill="var(--shadow-claw-icon-body)" rx="18" ry="12"/><ellipse cx="52" cy="112" fill="var(--shadow-claw-icon-accent-dark)" rx="8" ry="10"/><ellipse cx="76" cy="112" fill="var(--shadow-claw-icon-accent-dark)" rx="8" ry="10"/><ellipse cx="64" cy="92" fill="var(--shadow-claw-icon-body-segment)" rx="14" ry="8"/><ellipse cx="64" cy="82" fill="var(--shadow-claw-icon-body)" rx="12" ry="7"/><ellipse cx="64" cy="74" fill="var(--shadow-claw-icon-body-segment)" rx="10" ry="6"/><ellipse cx="64" cy="58" fill="var(--shadow-claw-icon-body)" rx="20" ry="18"/><ellipse cx="64" cy="50" fill="var(--shadow-claw-icon-body-segment)" rx="16" ry="10"/><rect width="18" height="8" x="28" y="45" fill="var(--shadow-claw-icon-body)" rx="4" transform="rotate(-20 37 49)"/><ellipse cx="20" cy="38" fill="var(--shadow-claw-icon-claw-main)" rx="14" ry="10"/><ellipse cx="16" cy="36" fill="var(--shadow-claw-icon-claw-inner)" rx="10" ry="7"/><ellipse cx="12" cy="34" fill="var(--shadow-claw-icon-accent-dark)" rx="5" ry="4"/><rect width="18" height="8" x="82" y="45" fill="var(--shadow-claw-icon-body)" rx="4" transform="rotate(20 91 49)"/><ellipse cx="108" cy="38" fill="var(--shadow-claw-icon-claw-main)" rx="14" ry="10"/><ellipse cx="112" cy="36" fill="var(--shadow-claw-icon-claw-inner)" rx="10" ry="7"/><ellipse cx="116" cy="34" fill="var(--shadow-claw-icon-accent-dark)" rx="5" ry="4"/><rect width="12" height="4" x="38" y="62" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-30 44 64)"/><rect width="14" height="4" x="36" y="68" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-25 43 70)"/><rect width="12" height="4" x="38" y="74" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-20 44 76)"/><rect width="12" height="4" x="78" y="62" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(30 84 64)"/><rect width="14" height="4" x="78" y="68" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(25 85 70)"/><rect width="12" height="4" x="78" y="74" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(20 84 76)"/><ellipse cx="64" cy="38" fill="var(--shadow-claw-icon-body)" rx="14" ry="12"/><circle cx="56" cy="34" r="5" fill="var(--shadow-claw-icon-eye)"/><circle cx="72" cy="34" r="5" fill="var(--shadow-claw-icon-eye)"/><circle cx="56" cy="33" r="2" fill="var(--shadow-claw-icon-eye-shine)"/><circle cx="72" cy="33" r="2" fill="var(--shadow-claw-icon-eye-shine)"/><path fill="none" stroke="var(--shadow-claw-icon-accent-dark)" stroke-linecap="round" stroke-width="2" d="M60 42q4 4 8 0"/><path fill="none" stroke="var(--shadow-claw-icon-accent-dark)" stroke-linecap="round" stroke-width="3" d="M58 26Q50 14 42 8m28 18q8-12 16-18"/><path fill="none" stroke="var(--shadow-claw-icon-body)" stroke-linecap="round" stroke-width="2" d="M60 24q-6-8-10-14m18 14q6-8 10-14"/><ellipse cx="60" cy="55" fill="var(--shadow-claw-icon-body-shine)" opacity=".4" rx="6" ry="8"/></svg> <h1 class="header-title">ShadowClaw</h1> </a> <a aria-label="Shadow Claw Project on GitHub" class="header-actions-logo-link" href="https://github.com/xt-ml/shadow-claw" slot="header-actions-logo"> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" viewBox="0 0 496 512"><path fill="var(--shadow-claw-bg-primary-reverse, currentColor)" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8"/></svg> </a> <noscript> <div style="line-height:1.6;margin:0 auto;max-width:50rem;padding:2rem"> <h2>
|
|
15
|
+
<a aria-label="ShadowClaw" class="header-title-link" href="https://xt-ml.github.io/shadow-claw/" slot="header-title-link"> <svg xmlns="http://www.w3.org/2000/svg" class="header-title-logo" viewBox="0 0 128 128"><rect width="128" height="128" fill="var(--shadow-claw-icon-bg)" rx="16"/><ellipse cx="64" cy="108" fill="var(--shadow-claw-icon-body)" rx="18" ry="12"/><ellipse cx="52" cy="112" fill="var(--shadow-claw-icon-accent-dark)" rx="8" ry="10"/><ellipse cx="76" cy="112" fill="var(--shadow-claw-icon-accent-dark)" rx="8" ry="10"/><ellipse cx="64" cy="92" fill="var(--shadow-claw-icon-body-segment)" rx="14" ry="8"/><ellipse cx="64" cy="82" fill="var(--shadow-claw-icon-body)" rx="12" ry="7"/><ellipse cx="64" cy="74" fill="var(--shadow-claw-icon-body-segment)" rx="10" ry="6"/><ellipse cx="64" cy="58" fill="var(--shadow-claw-icon-body)" rx="20" ry="18"/><ellipse cx="64" cy="50" fill="var(--shadow-claw-icon-body-segment)" rx="16" ry="10"/><rect width="18" height="8" x="28" y="45" fill="var(--shadow-claw-icon-body)" rx="4" transform="rotate(-20 37 49)"/><ellipse cx="20" cy="38" fill="var(--shadow-claw-icon-claw-main)" rx="14" ry="10"/><ellipse cx="16" cy="36" fill="var(--shadow-claw-icon-claw-inner)" rx="10" ry="7"/><ellipse cx="12" cy="34" fill="var(--shadow-claw-icon-accent-dark)" rx="5" ry="4"/><rect width="18" height="8" x="82" y="45" fill="var(--shadow-claw-icon-body)" rx="4" transform="rotate(20 91 49)"/><ellipse cx="108" cy="38" fill="var(--shadow-claw-icon-claw-main)" rx="14" ry="10"/><ellipse cx="112" cy="36" fill="var(--shadow-claw-icon-claw-inner)" rx="10" ry="7"/><ellipse cx="116" cy="34" fill="var(--shadow-claw-icon-accent-dark)" rx="5" ry="4"/><rect width="12" height="4" x="38" y="62" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-30 44 64)"/><rect width="14" height="4" x="36" y="68" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-25 43 70)"/><rect width="12" height="4" x="38" y="74" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-20 44 76)"/><rect width="12" height="4" x="78" y="62" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(30 84 64)"/><rect width="14" height="4" x="78" y="68" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(25 85 70)"/><rect width="12" height="4" x="78" y="74" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(20 84 76)"/><ellipse cx="64" cy="38" fill="var(--shadow-claw-icon-body)" rx="14" ry="12"/><circle cx="56" cy="34" r="5" fill="var(--shadow-claw-icon-eye)"/><circle cx="72" cy="34" r="5" fill="var(--shadow-claw-icon-eye)"/><circle cx="56" cy="33" r="2" fill="var(--shadow-claw-icon-eye-shine)"/><circle cx="72" cy="33" r="2" fill="var(--shadow-claw-icon-eye-shine)"/><path fill="none" stroke="var(--shadow-claw-icon-accent-dark)" stroke-linecap="round" stroke-width="2" d="M60 42q4 4 8 0"/><path fill="none" stroke="var(--shadow-claw-icon-accent-dark)" stroke-linecap="round" stroke-width="3" d="M58 26Q50 14 42 8m28 18q8-12 16-18"/><path fill="none" stroke="var(--shadow-claw-icon-body)" stroke-linecap="round" stroke-width="2" d="M60 24q-6-8-10-14m18 14q6-8 10-14"/><ellipse cx="60" cy="55" fill="var(--shadow-claw-icon-body-shine)" opacity=".4" rx="6" ry="8"/></svg> <h1 class="header-title">ShadowClaw</h1> </a> <a aria-label="Shadow Claw Project on GitHub" class="header-actions-logo-link" href="https://github.com/xt-ml/shadow-claw" slot="header-actions-logo"> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" viewBox="0 0 496 512"><path fill="var(--shadow-claw-bg-primary-reverse, currentColor)" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8"/></svg> </a> <noscript> <div style="line-height:1.6;margin:0 auto;max-width:50rem;padding:2rem"> <h2>Multi-Runtime AI Assistant</h2> <p> ShadowClaw is an open-source, multi-runtime AI assistant designed for autonomous orchestration, client-side tool execution, and private local storage via Origin Private File System (OPFS) and IndexedDB. </p> <h3>Agent & Developer Resources</h3> <ul> <li><a href="llms.txt">llms.txt (Agent Context & Guidance)</a></li> <li> <a href=".well-known/mcp.json">MCP Server Card (SEP-2127)</a> </li> <li> <a href=".well-known/ai-catalog.json">AI Catalog Discovery</a> </li> <li> <a href=".well-known/mcp/servers.json">MCP Servers Manifest</a> </li> <li><a href="sitemap.xml">XML Sitemap</a></li> <li> <a href="https://github.com/xt-ml/shadow-claw">GitHub Repository</a> </li> </ul> </div> </noscript>
|
|
16
16
|
</shadow-claw> <script type="module" src="index.js"></script> <script type="module">try{self[`workbox:window:7.4.0`]&&_()}catch{}function e(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))}function t(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e,n){var r=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,n){if(e){if(typeof e==`string`)return t(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n){r&&(e=r);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
17
17
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function a(e){var t=function(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e,`string`);return typeof t==`symbol`?t:t+``}try{self[`workbox:core:7.4.0`]&&_()}catch{}var o=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))};function s(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var c=function(e,t){this.type=e,Object.assign(this,t)};function l(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}function u(){}var d={type:`SKIP_WAITING`};function f(e,t){return e&&e.then?e.then(u):Promise.resolve()}var p=function(t){function r(e,n){var r,i;return n===void 0&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new o,r.en=new o,r.on=new o,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!s(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener(`updatefound`,r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener(`statechange`,r.ln)},r.ln=function(e){var t=r.fn,n=e.target,i=n.state,a=n===r.vn,o={sw:n,isExternal:a,originalEvent:e};!a&&r.mn&&(o.isUpdate=!0),r.dispatchEvent(new c(i,o)),i===`installed`?r.wn=self.setTimeout((function(){i===`installed`&&t.waiting===n&&r.dispatchEvent(new c(`waiting`,o))}),200):i===`activating`&&(clearTimeout(r.wn),a||r.en.resolve(n))},r.yn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new c(`controlling`,{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(i=function(e){var t=e.data,n=e.ports,i=e.source;return l(r.getSW(),(function(){r.an.has(i)&&r.dispatchEvent(new c(`message`,{data:t,originalEvent:e,ports:n,sw:i}))}))},function(){var e=[...arguments];try{return Promise.resolve(i.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=e,r.nn=n,navigator.serviceWorker.addEventListener(`message`,r.gn),r}var a,u=t;(a=r).prototype=Object.create(u.prototype),a.prototype.constructor=a,i(a,u);var p=r.prototype;return p.register=function(e){var t=(e===void 0?{}:e).immediate,n=t!==void 0&&t;try{var r=this;return l(function(e,t){var n=e();return n&&n.then?n.then(t):t(n)}((function(){if(!n&&document.readyState!==`complete`)return f(new Promise((function(e){return window.addEventListener(`load`,e)})))}),(function(){return r.mn=!!navigator.serviceWorker.controller,r.dn=r.pn(),l(r.bn(),(function(e){r.fn=e,r.dn&&(r.hn=r.dn,r.en.resolve(r.dn),r.on.resolve(r.dn),r.dn.addEventListener(`statechange`,r.ln,{once:!0}));var t=r.fn.waiting;return t&&s(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new c(`waiting`,{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener(`updatefound`,r.cn),navigator.serviceWorker.addEventListener(`controllerchange`,r.yn),r.fn}))})))}catch(e){return Promise.reject(e)}},p.update=function(){try{return this.fn?l(f(this.fn.update())):l()}catch(e){return Promise.reject(e)}},p.getSW=function(){return this.hn===void 0?this.rn.promise:Promise.resolve(this.hn)},p.messageSW=function(t){try{return l(this.getSW(),(function(n){return e(n,t)}))}catch(e){return Promise.reject(e)}},p.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&e(this.fn.waiting,d)},p.pn=function(){var e=navigator.serviceWorker.controller;return e&&s(e.scriptURL,this.sn.toString())?e:void 0},p.bn=function(){try{var e=this;return l(function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return l(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}),(function(e){throw e})))}catch(e){return Promise.reject(e)}},n(r,[{key:`active`,get:function(){return this.en.promise}},{key:`controlling`,get:function(){return this.on.promise}}])}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.jn(e).add(t)},t.removeEventListener=function(e,t){this.jn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=r(this.jn(e.type));!(t=n()).done;)(0,t.value)(e)},t.jn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());const m=`__shadowClawDefaultTrustedTypesPolicyState`,h=`default`,g=`shadowclaw-sandbox`;function v(){let e=globalThis;return e[m]||(e[m]={initialized:!1,policy:null}),e[m]}function y(){let e=v();if(e.initialized)return;let t=Reflect.get(globalThis,`trustedTypes`);if(!(!t||typeof t.createPolicy!=`function`)){e.initialized=!0;try{if(typeof t.getPolicy==`function`){let n=t.getPolicy(h);if(n){e.policy=n;return}}let n=!1;if(typeof t.getPolicyNames==`function`){let e=t.getPolicyNames();Array.isArray(e)&&e.includes(h)&&(n=!0)}if(n){if(typeof t.getPolicy==`function`){let n=t.getPolicy(g);if(n){e.policy=n;return}}e.policy=t.createPolicy(g,{createHTML:e=>e,createScriptURL:e=>e});return}e.policy=t.createPolicy(h,{createHTML:e=>e,createScriptURL:e=>e})}catch{typeof t.getPolicy==`function`&&(e.policy=t.getPolicy(h)??t.getPolicy(g)??null)}}}function b(e){y();let t=v().policy;return!t||typeof t.createScriptURL!=`function`?e:t.createScriptURL(e)}const x=`shadowclaw-oac-reload-attempted`,S=`shadowclaw-sw-update-intent`,C=3e4,w=`shadowclaw-sw-update-failure`;let T=!1,E=null;async function D(e=5e3){let t=Date.now();for(;Date.now()-t<e;){let e=document.querySelector(`shadow-claw`);if(e&&typeof e.requestDialog==`function`)return e;await new Promise(e=>{globalThis.setTimeout(e,50)})}return null}async function O(){let e=await D();return e?.requestDialog?await e.requestDialog({title:`Update Available`,message:`A new version of ShadowClaw is ready. Reload now to apply the update?`,confirmLabel:`Reload now`,cancelLabel:`Later`}):!1}async function k(){let e=await D();e?.requestDialog&&await e.requestDialog({title:`Update Failed`,message:`The app update failed to install automatically. Please try restarting your browser to complete the update.`,confirmLabel:`OK`}),console.warn(`[ShadowClaw] Service worker update failed. Please restart your browser to complete the update.`)}function A(){try{let e=globalThis.sessionStorage?.getItem(S);if(!e)return null;let t=JSON.parse(e);return typeof t.startedAt!=`number`||typeof t.fallbackReloadAttempts!=`number`?null:{startedAt:t.startedAt,fallbackReloadAttempts:t.fallbackReloadAttempts}}catch{return null}}function j(e){try{globalThis.sessionStorage?.setItem(S,JSON.stringify(e))}catch{}}function M(){try{globalThis.sessionStorage?.removeItem(S)}catch{}}function N(){let e=A();return e?Date.now()-e.startedAt<=C?!0:(M(),!1):!1}function P(){L(),j({startedAt:Date.now(),fallbackReloadAttempts:0})}function F(){try{let e=globalThis.sessionStorage?.getItem(w);if(!e)return null;let t=JSON.parse(e);return typeof t.failedAt==`number`?{failedAt:t.failedAt}:null}catch{return null}}function I(e){try{globalThis.sessionStorage?.setItem(w,JSON.stringify(e))}catch{}}function L(){try{globalThis.sessionStorage?.removeItem(w)}catch{}}function R(){let e=F();return e?Date.now()-e.failedAt<=3e5?!0:(L(),!1):!1}function z(){M(),I({failedAt:Date.now()})}function B(){if(T)return;T=!0,E!==null&&(globalThis.clearTimeout(E),E=null);let e=globalThis.location;typeof e?.reload==`function`&&e.reload()}async function V(){if(T||E!==null)return;let e=A();if(e){if(Date.now()-e.startedAt>C){M();return}if(e.fallbackReloadAttempts>=2){z(),await k();return}j({...e,fallbackReloadAttempts:e.fallbackReloadAttempts+1}),E=globalThis.setTimeout(()=>{B()},3e3)}}async function H(e){e.messageSkipWaiting(),await V()}function U(){return N()}function W(){if(globalThis.originAgentCluster!==!1)return!1;let e=globalThis.location?.protocol;if(e!==`http:`&&e!==`https:`)return!1;try{return!globalThis.sessionStorage?.getItem(x)}catch{return!1}}function G(){try{globalThis.sessionStorage?.setItem(x,`1`)}catch{return}B()}function K(){let e=U();if(M(),L(),e){B();return}W()&&G()}try{if(typeof navigator<`u`&&`serviceWorker`in navigator&&navigator.serviceWorker){y();let e=new p(b(`service-worker.js`));e.addEventListener(`waiting`,async()=>{if(!R()){if(N()){await H(e);return}await O()&&(P(),await H(e))}}),e.addEventListener(`controlling`,()=>{K()}),navigator.serviceWorker.addEventListener(`controllerchange`,()=>{K()});let t=()=>{globalThis.setTimeout(()=>{e.register()},1e4)};document.readyState===`complete`?t():globalThis.addEventListener(`load`,t)}}catch{}export{B as reloadCurrentPage,U as shouldReloadAfterControllerChange,W as shouldReloadForOriginAgentCluster};</script> </body></html>
|
package/dist/public/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e,s as t}from"./custom-element-security-piU2U-Ec.js";import{t as n,wt as r}from"./orchestrator-D6tel2Zp.js";import{n as i,t as a}from"./e2e-bridge-CybB810Q.js";import{n as o,r as s,t as c}from"./constants-DiETpg52.js";async function l(e,t){if(!t){t=!0;try{console.log(`🦞 ShadowClaw initializing...`);let r=e.querySelector(`shadow-claw`)||e.body.appendChild(e.createElement(`shadow-claw`));if(console.log(`✅ ShadowClaw initialized successfully`),t=!1,i()&&(console.log(`🧪 E2E Test Bridge enabled`),a(n,r)),await n.whenReady,typeof window<`u`&&typeof r.orchestrator?.ensureAllConnections==`function`)try{await r.orchestrator.ensureAllConnections({force:!1})}catch(e){console.warn(`[App] Failed to ensure connections on initialize:`,e)}return{orchestrator:r.orchestrator,isInitializing:t}}catch(e){throw console.error(`❌ Failed to initialize ShadowClaw:`,e),e}}}async function u(){await import(`./shadow-claw-
|
|
1
|
+
import{o as e,s as t}from"./custom-element-security-piU2U-Ec.js";import{t as n,wt as r}from"./orchestrator-D6tel2Zp.js";import{n as i,t as a}from"./e2e-bridge-CybB810Q.js";import{n as o,r as s,t as c}from"./constants-DiETpg52.js";async function l(e,t){if(!t){t=!0;try{console.log(`🦞 ShadowClaw initializing...`);let r=e.querySelector(`shadow-claw`)||e.body.appendChild(e.createElement(`shadow-claw`));if(console.log(`✅ ShadowClaw initialized successfully`),t=!1,i()&&(console.log(`🧪 E2E Test Bridge enabled`),a(n,r)),await n.whenReady,typeof window<`u`&&typeof r.orchestrator?.ensureAllConnections==`function`)try{await r.orchestrator.ensureAllConnections({force:!1})}catch(e){console.warn(`[App] Failed to ensure connections on initialize:`,e)}return{orchestrator:r.orchestrator,isInitializing:t}}catch(e){throw console.error(`❌ Failed to initialize ShadowClaw:`,e),e}}}async function u(){await import(`./shadow-claw-Dabb2AEp.js`)}if(typeof window<`u`&&!window.__SHADOWCLAW_E2E_ENABLE__)try{Object.defineProperty(window,"fetch",{value:window.fetch,writable:!1,configurable:!1}),window.crypto&&window.crypto.subtle&&Object.defineProperty(window.crypto,"subtle",{value:window.crypto.subtle,writable:!1,configurable:!1})}catch(e){console.warn(`[ShadowClaw] Security: Failed to lock globals:`,e)}t(),e();let d=!1;async function f(){await u(),d=!!(await l(document,d))?.isInitializing}document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,async()=>{try{await f()}catch(e){console.error(`Fatal error during initialization:`,e),d=!1}}):f().catch(e=>{console.error(`Fatal error during initialization:`,e),d=!1}),typeof window<`u`&&[`click`,`keydown`,`touchstart`].forEach(e=>{window.addEventListener(e,r,{once:!0})});export{c as BOOT_PENDING_ATTR,o as BOOT_PENDING_CLASS,s as HYDRATION_PENDING_ATTR};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><title>ShadowClaw</title><meta charset="utf-8"><meta name="revision" content="
|
|
1
|
+
<!doctype html><html lang="en"><head><title>ShadowClaw</title><meta charset="utf-8"><meta name="revision" content="56af73ea4f6991a6bc5ea27ed76747e103b59e71" /><meta name="version" content="1.40.1" /><meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"><meta name="description" content="ShadowClaw - multi-runtime AI assistant." /><link rel="canonical" href="https://xt-ml.github.io/shadow-claw/"><meta property="og:title" content="ShadowClaw"><meta property="og:description" content="Multi-runtime AI assistant with local and remote LLM orchestration, Web Workers, OPFS storage, and agentic tool execution."><meta property="og:type" content="website"><meta property="og:url" content="https://xt-ml.github.io/shadow-claw/"><meta property="og:image" content="https://xt-ml.github.io/shadow-claw/assets/icons/512.png"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="ShadowClaw"><meta name="twitter:description" content="Multi-runtime AI assistant with local and remote LLM orchestration, Web Workers, OPFS storage, and agentic tool execution."><meta name="twitter:image" content="https://xt-ml.github.io/shadow-claw/assets/icons/512.png"><script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"SoftwareApplication","@id":"https://xt-ml.github.io/shadow-claw/#software","name":"ShadowClaw","description":"Multi-runtime AI assistant with local and remote LLM orchestration, Web Workers, OPFS storage, and agentic tool execution.","url":"https://xt-ml.github.io/shadow-claw/","applicationCategory":"DeveloperApplication","operatingSystem":"Web, Browser, Desktop","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"author":{"@type":"Organization","name":"xt-ml","url":"https://github.com/xt-ml"},"codeRepository":"https://github.com/xt-ml/shadow-claw","license":"https://github.com/xt-ml/shadow-claw/blob/main/LICENSE"},{"@type":"WebSite","@id":"https://xt-ml.github.io/shadow-claw/#website","url":"https://xt-ml.github.io/shadow-claw/","name":"ShadowClaw","description":"Official website and live deployment of ShadowClaw multi-runtime AI assistant.","publisher":{"@type":"Organization","name":"xt-ml","url":"https://github.com/xt-ml"}},{"@type":"Organization","@id":"https://xt-ml.github.io/shadow-claw/#organization","name":"xt-ml","url":"https://github.com/xt-ml","sameAs":["https://github.com/xt-ml"]}]}</script><meta name="theme-color" content="#fff" /><meta http-equiv="origin-trial" content="A88uTgESYWcVgREKVReKB6jom41uP8TzW6ei3jNdidf+Xl6ONqKRjKNBphsxhrZmdkakLK3oXDgkGq53rtZYSAMAAAB2eyJvcmlnaW4iOiJodHRwczovL3h0LW1sLmdpdGh1Yi5pbzo0NDMiLCJmZWF0dXJlIjoiV2ViTUNQIiwiZXhwaXJ5IjoxNzk0ODczNjAwLCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><base href="/shadow-claw/" /><script id="shadow-claw-site-config" type="application/json">{"$schema":"https:\u002f\u002fjson-schema.org\u002fdraft\u002f2020-12\u002fschema","site":{"title":"ShadowClaw","description":"ShadowClaw - multi-runtime AI assistant.","themeColor":"#fff"},"branding":{"faviconPath":"assets\u002ficons\u002ffavicon.ico","appleTouchIconPath":"assets\u002ficons\u002f180.png","notFoundPath":"404.html"},"pwa":{"manifestPath":"manifest.json","themeColor":"#000000"},"sitemapPath":"sitemap.xml","assets":["assets"],"sidebar":{"pagesHidden":false,"chatHidden":false,"tasksHidden":false,"filesHidden":false,"defaultPage":"pages"},"settings":{"defaultToolsProfile":"__builtin_default"},"agent":{"defaultProvider":"transformers_js_local","defaultModel":"onnx-community\u002fgemma-3-1b-it-ONNX-GQA"},"customElements":{"allowedElements":["block-garden","block-garden-option","block-garden-select"],"allowedDomains":["kherrick.github.io","cdn.jsdelivr.net"]},"security":{"connectSrc":["'self'","blob:","data:","https:\u002f\u002fkherrick.github.io","https:\u002f\u002fcdn.jsdelivr.net"]}}</script>
|
|
2
2
|
<script>var ShadowClawThemeInit=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);function n(){if(globalThis.trustedTypes)return;let e=new Map;globalThis.trustedTypes={createPolicy:(t,n)=>{if(e.has(t))throw TypeError(`Policy with name "${t}" already exists.`);let r={createHTML:n.createHTML?e=>n.createHTML(e):void 0,createScriptURL:n.createScriptURL?e=>n.createScriptURL(e):void 0,createScript:n.createScript?e=>n.createScript(e):void 0};return e.set(t,r),r},getPolicy:t=>e.get(t)??null,isHTML:e=>typeof e==`string`||e instanceof Object&&`toString`in e,isScriptURL:e=>typeof e==`string`||e instanceof Object&&`toString`in e,isScript:e=>typeof e==`string`||e instanceof Object&&`toString`in e}}let r=`__shadowClawDefaultTrustedTypesPolicyState`,i=`default`,a=`shadowclaw-sandbox`;function o(){let e=globalThis;return e[r]||(e[r]={initialized:!1,policy:null}),e[r]}function s(){let e=o();if(e.initialized)return;let t=Reflect.get(globalThis,`trustedTypes`);if(!(!t||typeof t.createPolicy!=`function`)){e.initialized=!0;try{if(typeof t.getPolicy==`function`){let n=t.getPolicy(i);if(n){e.policy=n;return}}let n=!1;if(typeof t.getPolicyNames==`function`){let e=t.getPolicyNames();Array.isArray(e)&&e.includes(i)&&(n=!0)}if(n){if(typeof t.getPolicy==`function`){let n=t.getPolicy(a);if(n){e.policy=n;return}}e.policy=t.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e});return}e.policy=t.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch{typeof t.getPolicy==`function`&&(e.policy=t.getPolicy(i)??t.getPolicy(a)??null)}}}new class{loading=!1;models=new Map;getModelInfo(e){if(!e||typeof e!=`string`)return null;let t=e.toLowerCase().trim(),n=this.models.get(t);if(n)return n;if(t.includes(`/`)){let e=t.split(`/`).pop();if(e&&this.models.has(e))return this.models.get(e)}else for(let[e,n]of this.models.entries())if(e.endsWith(`/${t}`))return n;if(t.includes(`:`)){let e=t.split(`:`)[0],n=this.getModelInfo(e);if(n)return n}return null}registerModelInfo(e,t){this.models.set(e.toLowerCase(),t)}clear(){this.models.clear()}async fetchModelInfo(e,t,n){if(e.modelsUrl){this.loading=!0;try{let r=new Headers;if(r.set(`Content-Type`,`application/json`),e.headers)for(let[t,n]of Object.entries(e.headers))r.set(t,n);if(n)for(let[e,t]of Object.entries(n))r.set(e,t);if(t&&e.apiKeyHeader){let n=e.apiKeyHeaderFormat;r.set(e.apiKeyHeader,n?n.replace(`{key}`,t):t)}let i=await fetch(e.modelsUrl,{headers:r});if(!i.ok)throw Error(`HTTP ${i.status} ${i.statusText}`);let a=await i.json(),o=Array.isArray(a.data)?a.data:Array.isArray(a.models)?a.models:[];for(let e of o){if(!e.id)continue;let t=e.context_length??e.context_window??0,n=e.max_completion_tokens||e.per_request_limits?.completion_tokens||e.top_provider?.max_completion_tokens||null,r=typeof e.supports_tools==`boolean`?e.supports_tools:typeof e.supportsTools==`boolean`?e.supportsTools:void 0,i=this.extractModalities(e,`input`),a=this.extractModalities(e,`output`),o=this.modalitiesInclude(i,`image`,`vision`),s=this.modalitiesInclude(i,`audio`,`voice`,`hearing`),c=this.modalitiesInclude(i,`video`),l=e.id===`openrouter/free`||this.supportedParametersInclude(e,`image`,`vision`,`audio`,`tool`,`structured`),u=this.extractReasoning(e),d=typeof e.supports_prompt_caching==`boolean`?e.supports_prompt_caching:typeof e.supportsPromptCaching==`boolean`?e.supportsPromptCaching:this.supportedParametersInclude(e,`cache_control`,`prompt_caching`)?!0:void 0;!t&&Array.isArray(e.providers)&&e.providers.length>0&&(t=e.providers[0]?.context_length||0),this.registerModelInfo(e.id,{contextWindow:t,maxOutput:n,...r!==void 0&&{supportsTools:r},...i.length>0&&{inputModalities:i},...a.length>0&&{outputModalities:a},...o!==void 0&&{supportsImageInput:o},...s!==void 0&&{supportsAudioInput:s},...c!==void 0&&{supportsVideoInput:c},...u&&{reasoning:u},...l&&{routesByRequestFeatures:l},...d!==void 0&&{supportsPromptCaching:d}})}o.length>0&&console.log(`[ModelRegistry] Registered ${o.length} models for provider "${e.id}"`)}catch(t){console.error(`[ModelRegistry] Error fetching models for ${e.id}:`,t)}finally{this.loading=!1}}}extractModalities(e,t){let n=t===`input`?e.input_modalities||e.inputModalities:e.output_modalities||e.outputModalities,r=e.architecture||{},i=t===`input`?r.input_modalities||r.inputModalities:r.output_modalities||r.outputModalities,a=typeof r.modality==`string`?r.modality:``,o=this.parseArchitectureModality(a,t),s=[...this.normalizeStringArray(n),...this.normalizeStringArray(i),...o];return Array.from(new Set(s))}extractReasoning(e){let t=e?.reasoning;if(!t||typeof t!=`object`)return;let n=this.normalizeStringArray(t.supported_efforts),r=typeof t.default_effort==`string`?t.default_effort.toLowerCase():void 0,i=typeof t.default_enabled==`boolean`?t.default_enabled:void 0,a=typeof t.supports_max_tokens==`boolean`?t.supports_max_tokens:void 0,o=typeof t.mandatory==`boolean`?t.mandatory:void 0;if(!(n.length===0&&r===void 0&&i===void 0&&a===void 0&&o===void 0))return{...n.length>0&&{supportedEfforts:n},...r!==void 0&&{defaultEffort:r},...i!==void 0&&{defaultEnabled:i},...a!==void 0&&{supportsMaxTokens:a},...o!==void 0&&{mandatory:o}}}modalitiesInclude(e,...t){if(e.length!==0)return t.some(t=>e.some(e=>e.includes(t)))}normalizeStringArray(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`).map(e=>e.toLowerCase()):[]}parseArchitectureModality(e,t){if(!e)return[];let[n=``,r=``]=e.toLowerCase().split(`->`).map(e=>e.trim());return(t===`input`?n:r).split(/[+,/\s]+/).map(e=>e.trim()).filter(Boolean)}supportedParametersInclude(e,...t){let n=this.normalizeStringArray(e.supported_parameters||e.supportedParameters);return t.some(e=>n.some(t=>t.includes(e)))}};function c(e){return e.replace(/^\/+|\/+$/g,``)}function l(e){let t=c(e);return t.endsWith(`/index.html`)?t=t.slice(0,-11):t.endsWith(`index.html`)&&(t=t.slice(0,-10)),c(t)}function u(e){let t=c(e),n=t.split(`/`).filter(Boolean);if(n.length===0)return null;let r=n[0].toLowerCase();if(r===`pages`){if(n.length>=3){let e=n[1];return{page:`pages`,groupId:e===`main`?`br:main`:e.startsWith(`br-`)?`br:${e.slice(3)}`:e,path:n.slice(2).join(`/`)}}return{page:`pages`,groupId:`br:main`,path:n.slice(1).join(`/`)}}if(r===`files`){let e=n[1]||`main`;return{page:`files`,groupId:e===`main`?`br:main`:e.startsWith(`br-`)?`br:${e.slice(3)}`:e,path:n.slice(2).join(`/`)||void 0}}if(r===`chat`){let e=n[1]||`main`;return{page:`chat`,groupId:e===`main`?`br:main`:e.startsWith(`br-`)?`br:${e.slice(3)}`:e}}if(r===`tasks`){let e=n[1]||`main`;return{page:`tasks`,groupId:e===`main`?`br:main`:e.startsWith(`br-`)?`br:${e.slice(3)}`:e}}return r===`main`?{page:`pages`,groupId:`br:main`,path:n.slice(1).join(`/`)}:{page:`pages`,groupId:`br:main`,path:t}}function d(){if(typeof document<`u`){let e=document.getElementById(`shadow-claw-static-routing`);if(e&&e.textContent)try{let t=JSON.parse(e.textContent);if(t&&typeof t==`object`&&t.routes)return t}catch(e){console.warn(`Failed to parse embedded static routing manifest:`,e)}}return null}function f(e,t){let n=t||d();if(!n||!n.routes)return null;let r=l(e);if(!r)return null;for(let[e,t]of Object.entries(n.routes))if(!(!t||!t.prettyPath)&&l(t.prettyPath)===r)return u(e);return null}let p=null,ee=new Set([`chat`,`files`,`tasks`,`pages`,`settings`,`tools`,`channels`]);function m(){p=null}typeof globalThis<`u`&&(globalThis.__applyBasePathCacheReset=m);function h(){let e=typeof window<`u`?window:typeof self<`u`?self:globalThis;if(e&&e.__SHADOWCLAW_DEPLOY_ID__){let t=String(e.__SHADOWCLAW_DEPLOY_ID__).trim();if(t)return t.replace(/[^a-zA-Z0-9_-]/g,`-`)}let t=globalThis.process;if(t&&t.env&&t.env.SHADOWCLAW_DEPLOY_ID){let e=String(t.env.SHADOWCLAW_DEPLOY_ID).trim();if(e)return e.replace(/[^a-zA-Z0-9_-]/g,`-`)}let n=te();return!n||n===`/`?``:n.replace(/^\/+|\/+$/g,``).replace(/[^a-zA-Z0-9_-]/g,`-`)}function te(){if(p!==null)return p;if((typeof window>`u`||globalThis.WorkerGlobalScope!==void 0&&typeof self<`u`&&self instanceof globalThis.WorkerGlobalScope)&&typeof self<`u`&&self.location){let e=(self.location.pathname||`/`).split(`/`).filter(Boolean);if(e.length<=1)return p=`/`,p;let t=e[0].toLowerCase(),n=t===`service-worker.js`||t===`sw.js`||t===`manifest.json`||t===`sitemap.xml`||t===`favicon.ico`||t===`index.html`||t===`service-worker`||t===`assets`||t===`dist`||t===`public`;if(n&&e.length===2)return p=`/`,p;if(!n)return p=`/`+e[0]+`/`,p}let e=typeof window<`u`&&window.location?window.location:typeof self<`u`&&self.location?self.location:null;if(!e)return`/`;if(typeof document<`u`&&typeof document.querySelector==`function`){let t=document.querySelector(`base[href]`);if(t){let n=t.getAttribute(`href`);if(n)try{let t=new URL(n,e.origin).pathname;return t.endsWith(`/`)||(t+=`/`),p=t,p}catch{}}}let t=e.pathname||`/`;if(t===`/`)return p=`/`,p;let n=t.split(`/`).filter(Boolean),r=n.findIndex(e=>ee.has(e.toLowerCase()));return r>=0?r===0?(p=`/`,p):(p=`/`+n.slice(0,r).join(`/`)+`/`,p):f(t)?(p=`/`,p):n.length===1&&!t.includes(`.`)?(p=`/`+n[0]+`/`,p):(p=`/`,p)}function ne(e){let t=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return RegExp(`(^|\\s)@${t}\\b`,`i`)}ne(`ShadowClaw`);function g(){let e=h();return e?`shadowclaw-${e}`:`shadowclaw`}g();let _={github:{providerId:`github`,name:`GitHub`,aliases:[`github`,`api.github.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`,`git_remote`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`token `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://github.com/login/oauth/authorize`,tokenUrl:`https://github.com/login/oauth/access_token`,defaultScopes:[`repo`,`read:user`],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},gitlab:{providerId:`gitlab`,name:`GitLab`,aliases:[`gitlab`,`gitlab.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`,`git_remote`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`PRIVATE-TOKEN`,headerPrefix:``},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},tokenAuthByServiceType:{git_remote:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}}},oauth:{authorizeUrl:`https://gitlab.com/oauth/authorize`,tokenUrl:`https://gitlab.com/oauth/token`,defaultScopes:[`read_api`,`read_user`],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},figma:{providerId:`figma`,name:`Figma`,aliases:[`figma`,`api.figma.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`X-Figma-Token`,headerPrefix:``},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://www.figma.com/oauth`,tokenUrl:`https://api.figma.com/v1/oauth/token`,refreshUrl:`https://api.figma.com/v1/oauth/refresh`,defaultScopes:[],usePkce:!0,clientAuthMethod:`basic_header`,scopeSeparator:`space`}},notion:{providerId:`notion`,name:`Notion`,aliases:[`notion`,`api.notion.com`,`notion.so`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://api.notion.com/v1/oauth/authorize`,tokenUrl:`https://api.notion.com/v1/oauth/token`,defaultScopes:[],usePkce:!0,clientAuthMethod:`basic_header`,scopeSeparator:`space`}},microsoft_graph:{providerId:`microsoft_graph`,name:`Microsoft Graph`,aliases:[`microsoft`,`graph.microsoft.com`,`microsoft_graph`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://login.microsoftonline.com/common/oauth2/v2.0/authorize`,tokenUrl:`https://login.microsoftonline.com/common/oauth2/v2.0/token`,defaultScopes:[`openid`,`profile`,`offline_access`,`User.Read`],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},yahoo_mail:{providerId:`yahoo_mail`,name:`Yahoo Mail`,aliases:[`yahoo`,`yahoo_mail`,`mail.yahoo.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://api.login.yahoo.com/oauth2/request_auth`,tokenUrl:`https://api.login.yahoo.com/oauth2/get_token`,defaultScopes:[`mail-r`,`mail-w`],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},google:{providerId:`google`,name:`Google`,aliases:[`google`,`googleapis.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://accounts.google.com/o/oauth2/v2/auth`,tokenUrl:`https://oauth2.googleapis.com/token`,defaultScopes:[`openid`,`profile`,`email`],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},atlassian:{providerId:`atlassian`,name:`Atlassian`,aliases:[`atlassian`,`api.atlassian.com`],modes:[`oauth`,`token`,`basic`],defaultMode:`basic`,serviceTypes:[`http_api`,`git_remote`],authTypes:[`token`,`oauth`,`basic_userpass`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `},basic:{headerName:`Authorization`,headerPrefix:`Basic `}},oauth:{authorizeUrl:`https://auth.atlassian.com/authorize`,tokenUrl:`https://auth.atlassian.com/oauth/token`,defaultScopes:[],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},slack:{providerId:`slack`,name:`Slack`,aliases:[`slack`,`slack.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://slack.com/oauth/v2/authorize`,tokenUrl:`https://slack.com/api/oauth.v2.access`,defaultScopes:[],usePkce:!1,clientAuthMethod:`request_body`,scopeSeparator:`comma`}},linear:{providerId:`linear`,name:`Linear`,aliases:[`linear`,`api.linear.app`,`linear.app`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://linear.app/oauth/authorize`,tokenUrl:`https://api.linear.app/oauth/token`,defaultScopes:[],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},azure_devops:{providerId:`azure_devops`,name:`Azure DevOps`,aliases:[`azure_devops`,`dev.azure.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`,`git_remote`],authTypes:[`token`,`oauth`,`basic_userpass`,`ssh_key`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},tokenAuthByServiceType:{git_remote:{token:{headerName:`Authorization`,headerPrefix:`Basic `},oauth:{headerName:`Authorization`,headerPrefix:`Basic `}}},oauth:{authorizeUrl:`https://app.vssps.visualstudio.com/oauth2/authorize`,tokenUrl:`https://app.vssps.visualstudio.com/oauth2/token`,defaultScopes:[`vso.code`,`vso.profile`,`offline_access`],usePkce:!1,clientAuthMethod:`request_body`,scopeSeparator:`space`}},custom_mcp:{providerId:`custom_mcp`,name:`Custom MCP`,aliases:[`custom_mcp`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`mcp_remote`,`webmcp_local`],authTypes:[`none`,`token`,`oauth`,`custom_header`,`ssh_key`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://example.com/oauth/authorize`,tokenUrl:`https://example.com/oauth/token`,defaultScopes:[],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}}};Object.fromEntries(Object.values(_).filter(e=>!!e.oauth).map(e=>{let t=e.oauth;return[e.providerId,{id:e.providerId,name:e.name,authorizeUrl:t.authorizeUrl,tokenUrl:t.tokenUrl,redirectUri:t.redirectUri,defaultScopes:t.defaultScopes,usePkce:t.usePkce,clientAuthMethod:t.clientAuthMethod,scopeSeparator:t.scopeSeparator}]})),Object.fromEntries(Object.values(_).map(e=>[e.providerId,{providerId:e.providerId,modes:e.modes,defaultMode:e.defaultMode}])),new Promise(e=>{});
|
|
3
3
|
/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */
|
|
4
4
|
function v(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y(e){if(Array.isArray(e))return e}function b(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function re(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
@@ -12,6 +12,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
12
12
|
"updated": "1970-01-01T00:00:00Z",
|
|
13
13
|
"slug": "shadow-claw-pages"
|
|
14
14
|
}</code></pre></details></section><article><h2>Welcome to ShadowClaw Pages</h2><p>This is the default static page for your workspace.</p><h2 id="getting-started-with-shadowclaw">Getting started with ShadowClaw</h2><h3 id="what-is-memorymd">What is MEMORY.md?</h3><ul><li> "<a href="/files/main/MEMORY.md">MEMORY.md</a>" is a per conversation, per invocation, auto-loaded, persistent agent memory file. </li><li> It is designed to be a helpful scratchpad for agents to store important information, notes, and context about the conversation. </li></ul><h3 id="how-to-use-files">How to use Files</h3><ul><li>Open "<a href="/files/main">Files</a>" to browse your workspace.</li><li> Edit and preview files with the file viewer: <ul><li><a href="/files/main/index.html">index.html</a></li><li><a href="/files/main/~/docs/example/article.html">article.html</a></li></ul></li></ul><h3 id="how-to-use-pages">How to use Pages</h3><ul><li>Use Set as Page on any markdown or HTML file to add it to Pages.</li><li>Remove a page anytime from the "<a href="/pages">Pages</a>" view.</li></ul><h3 id="how-to-use-chat">How to use Chat</h3><ul><li> Open "<a href="/settings">Settings</a>" to configure your agent's system prompt, tools, and more. </li><li> Open "<a href="/chat/main">Chat</a>" to start a conversation with your agent. </li></ul><h2 id="further-information">Further information</h2><ul><li><a href="https://github.com/xt-ml/shadow-claw#-shadowclaw" >ShadowClaw Project</a ></li><li><a href="https://deepwiki.com/xt-ml/shadow-claw">Deep Wiki</a></li></ul></article></div></div></article><button type="button" class="pages__nav-btn pages__nav-btn--next" data-pages-next aria-label="Next page" hidden disabled><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="m9 18 6-6-6-6"/></svg></button></div></section></template></shadow-claw-pages></div><div class="page" data-page-id="settings"></div><div class="page" data-page-id="tools"></div><div class="page" data-page-id="channels"></div><div class="chat-split-resize-handle" title="Drag to resize chat panel" hidden></div><shadow-claw-toast></shadow-claw-toast></main></div><shadow-claw-dialog dialog-class="app-dialog" dialog-aria-labelledby="appDialogTitle"><template><form method="dialog" class="app-confirm-dialog__form"><h2 id="appDialogTitle" class="app-dialog__title">Confirm</h2><p class="app-dialog__message"></p><ul class="app-dialog__details" hidden></ul><div class="app-dialog__links" hidden></div><p class="app-dialog__countdown" hidden role="status" aria-live="polite" aria-atomic="true"></p><div class="app-confirm-dialog__actions"><button type="submit" value="cancel" class="app-dialog__btn app-dialog__btn--cancel"> Cancel </button><button type="submit" value="confirm" class="app-dialog__btn app-dialog__btn--confirm"> Confirm </button></div></form></template></shadow-claw-dialog><shadow-claw-dialog dialog-class="app-dialog app-prompt-dialog" dialog-aria-labelledby="appPromptTitle"><template><form method="dialog" class="app-prompt-dialog__form"><h2 id="appPromptTitle" class="app-prompt-dialog__title"> Agent Question </h2><p class="app-prompt-dialog__message"></p><div class="app-prompt-dialog__input-area"></div><div class="app-prompt-dialog__actions"><button type="submit" value="submit" class="app-dialog__btn app-dialog__btn--confirm app-prompt-dialog__submit"> Submit </button></div></form></template></shadow-claw-dialog></div></template>
|
|
15
|
-
<a aria-label="ShadowClaw" class="header-title-link" href="https://xt-ml.github.io/shadow-claw/" slot="header-title-link"> <svg xmlns="http://www.w3.org/2000/svg" class="header-title-logo" viewBox="0 0 128 128"><rect width="128" height="128" fill="var(--shadow-claw-icon-bg)" rx="16"/><ellipse cx="64" cy="108" fill="var(--shadow-claw-icon-body)" rx="18" ry="12"/><ellipse cx="52" cy="112" fill="var(--shadow-claw-icon-accent-dark)" rx="8" ry="10"/><ellipse cx="76" cy="112" fill="var(--shadow-claw-icon-accent-dark)" rx="8" ry="10"/><ellipse cx="64" cy="92" fill="var(--shadow-claw-icon-body-segment)" rx="14" ry="8"/><ellipse cx="64" cy="82" fill="var(--shadow-claw-icon-body)" rx="12" ry="7"/><ellipse cx="64" cy="74" fill="var(--shadow-claw-icon-body-segment)" rx="10" ry="6"/><ellipse cx="64" cy="58" fill="var(--shadow-claw-icon-body)" rx="20" ry="18"/><ellipse cx="64" cy="50" fill="var(--shadow-claw-icon-body-segment)" rx="16" ry="10"/><rect width="18" height="8" x="28" y="45" fill="var(--shadow-claw-icon-body)" rx="4" transform="rotate(-20 37 49)"/><ellipse cx="20" cy="38" fill="var(--shadow-claw-icon-claw-main)" rx="14" ry="10"/><ellipse cx="16" cy="36" fill="var(--shadow-claw-icon-claw-inner)" rx="10" ry="7"/><ellipse cx="12" cy="34" fill="var(--shadow-claw-icon-accent-dark)" rx="5" ry="4"/><rect width="18" height="8" x="82" y="45" fill="var(--shadow-claw-icon-body)" rx="4" transform="rotate(20 91 49)"/><ellipse cx="108" cy="38" fill="var(--shadow-claw-icon-claw-main)" rx="14" ry="10"/><ellipse cx="112" cy="36" fill="var(--shadow-claw-icon-claw-inner)" rx="10" ry="7"/><ellipse cx="116" cy="34" fill="var(--shadow-claw-icon-accent-dark)" rx="5" ry="4"/><rect width="12" height="4" x="38" y="62" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-30 44 64)"/><rect width="14" height="4" x="36" y="68" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-25 43 70)"/><rect width="12" height="4" x="38" y="74" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-20 44 76)"/><rect width="12" height="4" x="78" y="62" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(30 84 64)"/><rect width="14" height="4" x="78" y="68" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(25 85 70)"/><rect width="12" height="4" x="78" y="74" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(20 84 76)"/><ellipse cx="64" cy="38" fill="var(--shadow-claw-icon-body)" rx="14" ry="12"/><circle cx="56" cy="34" r="5" fill="var(--shadow-claw-icon-eye)"/><circle cx="72" cy="34" r="5" fill="var(--shadow-claw-icon-eye)"/><circle cx="56" cy="33" r="2" fill="var(--shadow-claw-icon-eye-shine)"/><circle cx="72" cy="33" r="2" fill="var(--shadow-claw-icon-eye-shine)"/><path fill="none" stroke="var(--shadow-claw-icon-accent-dark)" stroke-linecap="round" stroke-width="2" d="M60 42q4 4 8 0"/><path fill="none" stroke="var(--shadow-claw-icon-accent-dark)" stroke-linecap="round" stroke-width="3" d="M58 26Q50 14 42 8m28 18q8-12 16-18"/><path fill="none" stroke="var(--shadow-claw-icon-body)" stroke-linecap="round" stroke-width="2" d="M60 24q-6-8-10-14m18 14q6-8 10-14"/><ellipse cx="60" cy="55" fill="var(--shadow-claw-icon-body-shine)" opacity=".4" rx="6" ry="8"/></svg> <h1 class="header-title">ShadowClaw</h1> </a> <a aria-label="Shadow Claw Project on GitHub" class="header-actions-logo-link" href="https://github.com/xt-ml/shadow-claw" slot="header-actions-logo"> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" viewBox="0 0 496 512"><path fill="var(--shadow-claw-bg-primary-reverse, currentColor)" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8"/></svg> </a> <noscript> <div style="line-height:1.6;margin:0 auto;max-width:50rem;padding:2rem"> <h2>
|
|
15
|
+
<a aria-label="ShadowClaw" class="header-title-link" href="https://xt-ml.github.io/shadow-claw/" slot="header-title-link"> <svg xmlns="http://www.w3.org/2000/svg" class="header-title-logo" viewBox="0 0 128 128"><rect width="128" height="128" fill="var(--shadow-claw-icon-bg)" rx="16"/><ellipse cx="64" cy="108" fill="var(--shadow-claw-icon-body)" rx="18" ry="12"/><ellipse cx="52" cy="112" fill="var(--shadow-claw-icon-accent-dark)" rx="8" ry="10"/><ellipse cx="76" cy="112" fill="var(--shadow-claw-icon-accent-dark)" rx="8" ry="10"/><ellipse cx="64" cy="92" fill="var(--shadow-claw-icon-body-segment)" rx="14" ry="8"/><ellipse cx="64" cy="82" fill="var(--shadow-claw-icon-body)" rx="12" ry="7"/><ellipse cx="64" cy="74" fill="var(--shadow-claw-icon-body-segment)" rx="10" ry="6"/><ellipse cx="64" cy="58" fill="var(--shadow-claw-icon-body)" rx="20" ry="18"/><ellipse cx="64" cy="50" fill="var(--shadow-claw-icon-body-segment)" rx="16" ry="10"/><rect width="18" height="8" x="28" y="45" fill="var(--shadow-claw-icon-body)" rx="4" transform="rotate(-20 37 49)"/><ellipse cx="20" cy="38" fill="var(--shadow-claw-icon-claw-main)" rx="14" ry="10"/><ellipse cx="16" cy="36" fill="var(--shadow-claw-icon-claw-inner)" rx="10" ry="7"/><ellipse cx="12" cy="34" fill="var(--shadow-claw-icon-accent-dark)" rx="5" ry="4"/><rect width="18" height="8" x="82" y="45" fill="var(--shadow-claw-icon-body)" rx="4" transform="rotate(20 91 49)"/><ellipse cx="108" cy="38" fill="var(--shadow-claw-icon-claw-main)" rx="14" ry="10"/><ellipse cx="112" cy="36" fill="var(--shadow-claw-icon-claw-inner)" rx="10" ry="7"/><ellipse cx="116" cy="34" fill="var(--shadow-claw-icon-accent-dark)" rx="5" ry="4"/><rect width="12" height="4" x="38" y="62" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-30 44 64)"/><rect width="14" height="4" x="36" y="68" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-25 43 70)"/><rect width="12" height="4" x="38" y="74" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-20 44 76)"/><rect width="12" height="4" x="78" y="62" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(30 84 64)"/><rect width="14" height="4" x="78" y="68" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(25 85 70)"/><rect width="12" height="4" x="78" y="74" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(20 84 76)"/><ellipse cx="64" cy="38" fill="var(--shadow-claw-icon-body)" rx="14" ry="12"/><circle cx="56" cy="34" r="5" fill="var(--shadow-claw-icon-eye)"/><circle cx="72" cy="34" r="5" fill="var(--shadow-claw-icon-eye)"/><circle cx="56" cy="33" r="2" fill="var(--shadow-claw-icon-eye-shine)"/><circle cx="72" cy="33" r="2" fill="var(--shadow-claw-icon-eye-shine)"/><path fill="none" stroke="var(--shadow-claw-icon-accent-dark)" stroke-linecap="round" stroke-width="2" d="M60 42q4 4 8 0"/><path fill="none" stroke="var(--shadow-claw-icon-accent-dark)" stroke-linecap="round" stroke-width="3" d="M58 26Q50 14 42 8m28 18q8-12 16-18"/><path fill="none" stroke="var(--shadow-claw-icon-body)" stroke-linecap="round" stroke-width="2" d="M60 24q-6-8-10-14m18 14q6-8 10-14"/><ellipse cx="60" cy="55" fill="var(--shadow-claw-icon-body-shine)" opacity=".4" rx="6" ry="8"/></svg> <h1 class="header-title">ShadowClaw</h1> </a> <a aria-label="Shadow Claw Project on GitHub" class="header-actions-logo-link" href="https://github.com/xt-ml/shadow-claw" slot="header-actions-logo"> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" viewBox="0 0 496 512"><path fill="var(--shadow-claw-bg-primary-reverse, currentColor)" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8"/></svg> </a> <noscript> <div style="line-height:1.6;margin:0 auto;max-width:50rem;padding:2rem"> <h2>Multi-Runtime AI Assistant</h2> <p> ShadowClaw is an open-source, multi-runtime AI assistant designed for autonomous orchestration, client-side tool execution, and private local storage via Origin Private File System (OPFS) and IndexedDB. </p> <h3>Agent & Developer Resources</h3> <ul> <li><a href="llms.txt">llms.txt (Agent Context & Guidance)</a></li> <li> <a href=".well-known/mcp.json">MCP Server Card (SEP-2127)</a> </li> <li> <a href=".well-known/ai-catalog.json">AI Catalog Discovery</a> </li> <li> <a href=".well-known/mcp/servers.json">MCP Servers Manifest</a> </li> <li><a href="sitemap.xml">XML Sitemap</a></li> <li> <a href="https://github.com/xt-ml/shadow-claw">GitHub Repository</a> </li> </ul> </div> </noscript>
|
|
16
16
|
</shadow-claw> <script type="module" src="index.js"></script> <script type="module">try{self[`workbox:window:7.4.0`]&&_()}catch{}function e(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))}function t(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e,n){var r=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,n){if(e){if(typeof e==`string`)return t(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n){r&&(e=r);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
17
17
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function a(e){var t=function(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e,`string`);return typeof t==`symbol`?t:t+``}try{self[`workbox:core:7.4.0`]&&_()}catch{}var o=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))};function s(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var c=function(e,t){this.type=e,Object.assign(this,t)};function l(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}function u(){}var d={type:`SKIP_WAITING`};function f(e,t){return e&&e.then?e.then(u):Promise.resolve()}var p=function(t){function r(e,n){var r,i;return n===void 0&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new o,r.en=new o,r.on=new o,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!s(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener(`updatefound`,r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener(`statechange`,r.ln)},r.ln=function(e){var t=r.fn,n=e.target,i=n.state,a=n===r.vn,o={sw:n,isExternal:a,originalEvent:e};!a&&r.mn&&(o.isUpdate=!0),r.dispatchEvent(new c(i,o)),i===`installed`?r.wn=self.setTimeout((function(){i===`installed`&&t.waiting===n&&r.dispatchEvent(new c(`waiting`,o))}),200):i===`activating`&&(clearTimeout(r.wn),a||r.en.resolve(n))},r.yn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new c(`controlling`,{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(i=function(e){var t=e.data,n=e.ports,i=e.source;return l(r.getSW(),(function(){r.an.has(i)&&r.dispatchEvent(new c(`message`,{data:t,originalEvent:e,ports:n,sw:i}))}))},function(){var e=[...arguments];try{return Promise.resolve(i.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=e,r.nn=n,navigator.serviceWorker.addEventListener(`message`,r.gn),r}var a,u=t;(a=r).prototype=Object.create(u.prototype),a.prototype.constructor=a,i(a,u);var p=r.prototype;return p.register=function(e){var t=(e===void 0?{}:e).immediate,n=t!==void 0&&t;try{var r=this;return l(function(e,t){var n=e();return n&&n.then?n.then(t):t(n)}((function(){if(!n&&document.readyState!==`complete`)return f(new Promise((function(e){return window.addEventListener(`load`,e)})))}),(function(){return r.mn=!!navigator.serviceWorker.controller,r.dn=r.pn(),l(r.bn(),(function(e){r.fn=e,r.dn&&(r.hn=r.dn,r.en.resolve(r.dn),r.on.resolve(r.dn),r.dn.addEventListener(`statechange`,r.ln,{once:!0}));var t=r.fn.waiting;return t&&s(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new c(`waiting`,{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener(`updatefound`,r.cn),navigator.serviceWorker.addEventListener(`controllerchange`,r.yn),r.fn}))})))}catch(e){return Promise.reject(e)}},p.update=function(){try{return this.fn?l(f(this.fn.update())):l()}catch(e){return Promise.reject(e)}},p.getSW=function(){return this.hn===void 0?this.rn.promise:Promise.resolve(this.hn)},p.messageSW=function(t){try{return l(this.getSW(),(function(n){return e(n,t)}))}catch(e){return Promise.reject(e)}},p.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&e(this.fn.waiting,d)},p.pn=function(){var e=navigator.serviceWorker.controller;return e&&s(e.scriptURL,this.sn.toString())?e:void 0},p.bn=function(){try{var e=this;return l(function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return l(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}),(function(e){throw e})))}catch(e){return Promise.reject(e)}},n(r,[{key:`active`,get:function(){return this.en.promise}},{key:`controlling`,get:function(){return this.on.promise}}])}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.jn(e).add(t)},t.removeEventListener=function(e,t){this.jn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=r(this.jn(e.type));!(t=n()).done;)(0,t.value)(e)},t.jn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());const m=`__shadowClawDefaultTrustedTypesPolicyState`,h=`default`,g=`shadowclaw-sandbox`;function v(){let e=globalThis;return e[m]||(e[m]={initialized:!1,policy:null}),e[m]}function y(){let e=v();if(e.initialized)return;let t=Reflect.get(globalThis,`trustedTypes`);if(!(!t||typeof t.createPolicy!=`function`)){e.initialized=!0;try{if(typeof t.getPolicy==`function`){let n=t.getPolicy(h);if(n){e.policy=n;return}}let n=!1;if(typeof t.getPolicyNames==`function`){let e=t.getPolicyNames();Array.isArray(e)&&e.includes(h)&&(n=!0)}if(n){if(typeof t.getPolicy==`function`){let n=t.getPolicy(g);if(n){e.policy=n;return}}e.policy=t.createPolicy(g,{createHTML:e=>e,createScriptURL:e=>e});return}e.policy=t.createPolicy(h,{createHTML:e=>e,createScriptURL:e=>e})}catch{typeof t.getPolicy==`function`&&(e.policy=t.getPolicy(h)??t.getPolicy(g)??null)}}}function b(e){y();let t=v().policy;return!t||typeof t.createScriptURL!=`function`?e:t.createScriptURL(e)}const x=`shadowclaw-oac-reload-attempted`,S=`shadowclaw-sw-update-intent`,C=3e4,w=`shadowclaw-sw-update-failure`;let T=!1,E=null;async function D(e=5e3){let t=Date.now();for(;Date.now()-t<e;){let e=document.querySelector(`shadow-claw`);if(e&&typeof e.requestDialog==`function`)return e;await new Promise(e=>{globalThis.setTimeout(e,50)})}return null}async function O(){let e=await D();return e?.requestDialog?await e.requestDialog({title:`Update Available`,message:`A new version of ShadowClaw is ready. Reload now to apply the update?`,confirmLabel:`Reload now`,cancelLabel:`Later`}):!1}async function k(){let e=await D();e?.requestDialog&&await e.requestDialog({title:`Update Failed`,message:`The app update failed to install automatically. Please try restarting your browser to complete the update.`,confirmLabel:`OK`}),console.warn(`[ShadowClaw] Service worker update failed. Please restart your browser to complete the update.`)}function A(){try{let e=globalThis.sessionStorage?.getItem(S);if(!e)return null;let t=JSON.parse(e);return typeof t.startedAt!=`number`||typeof t.fallbackReloadAttempts!=`number`?null:{startedAt:t.startedAt,fallbackReloadAttempts:t.fallbackReloadAttempts}}catch{return null}}function j(e){try{globalThis.sessionStorage?.setItem(S,JSON.stringify(e))}catch{}}function M(){try{globalThis.sessionStorage?.removeItem(S)}catch{}}function N(){let e=A();return e?Date.now()-e.startedAt<=C?!0:(M(),!1):!1}function P(){L(),j({startedAt:Date.now(),fallbackReloadAttempts:0})}function F(){try{let e=globalThis.sessionStorage?.getItem(w);if(!e)return null;let t=JSON.parse(e);return typeof t.failedAt==`number`?{failedAt:t.failedAt}:null}catch{return null}}function I(e){try{globalThis.sessionStorage?.setItem(w,JSON.stringify(e))}catch{}}function L(){try{globalThis.sessionStorage?.removeItem(w)}catch{}}function R(){let e=F();return e?Date.now()-e.failedAt<=3e5?!0:(L(),!1):!1}function z(){M(),I({failedAt:Date.now()})}function B(){if(T)return;T=!0,E!==null&&(globalThis.clearTimeout(E),E=null);let e=globalThis.location;typeof e?.reload==`function`&&e.reload()}async function V(){if(T||E!==null)return;let e=A();if(e){if(Date.now()-e.startedAt>C){M();return}if(e.fallbackReloadAttempts>=2){z(),await k();return}j({...e,fallbackReloadAttempts:e.fallbackReloadAttempts+1}),E=globalThis.setTimeout(()=>{B()},3e3)}}async function H(e){e.messageSkipWaiting(),await V()}function U(){return N()}function W(){if(globalThis.originAgentCluster!==!1)return!1;let e=globalThis.location?.protocol;if(e!==`http:`&&e!==`https:`)return!1;try{return!globalThis.sessionStorage?.getItem(x)}catch{return!1}}function G(){try{globalThis.sessionStorage?.setItem(x,`1`)}catch{return}B()}function K(){let e=U();if(M(),L(),e){B();return}W()&&G()}try{if(typeof navigator<`u`&&`serviceWorker`in navigator&&navigator.serviceWorker){y();let e=new p(b(`service-worker.js`));e.addEventListener(`waiting`,async()=>{if(!R()){if(N()){await H(e);return}await O()&&(P(),await H(e))}}),e.addEventListener(`controlling`,()=>{K()}),navigator.serviceWorker.addEventListener(`controllerchange`,()=>{K()});let t=()=>{globalThis.setTimeout(()=>{e.register()},1e4)};document.readyState===`complete`?t():globalThis.addEventListener(`load`,t)}}catch{}export{B as reloadCurrentPage,U as shouldReloadAfterControllerChange,W as shouldReloadForOriginAgentCluster};</script> </body></html>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><title>ShadowClaw</title><meta charset="utf-8"><meta name="revision" content="
|
|
1
|
+
<!doctype html><html lang="en"><head><title>ShadowClaw</title><meta charset="utf-8"><meta name="revision" content="56af73ea4f6991a6bc5ea27ed76747e103b59e71" /><meta name="version" content="1.40.1" /><meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"><meta name="description" content="ShadowClaw - multi-runtime AI assistant." /><link rel="canonical" href="https://xt-ml.github.io/shadow-claw/"><meta property="og:title" content="ShadowClaw"><meta property="og:description" content="Multi-runtime AI assistant with local and remote LLM orchestration, Web Workers, OPFS storage, and agentic tool execution."><meta property="og:type" content="website"><meta property="og:url" content="https://xt-ml.github.io/shadow-claw/"><meta property="og:image" content="https://xt-ml.github.io/shadow-claw/assets/icons/512.png"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="ShadowClaw"><meta name="twitter:description" content="Multi-runtime AI assistant with local and remote LLM orchestration, Web Workers, OPFS storage, and agentic tool execution."><meta name="twitter:image" content="https://xt-ml.github.io/shadow-claw/assets/icons/512.png"><script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"SoftwareApplication","@id":"https://xt-ml.github.io/shadow-claw/#software","name":"ShadowClaw","description":"Multi-runtime AI assistant with local and remote LLM orchestration, Web Workers, OPFS storage, and agentic tool execution.","url":"https://xt-ml.github.io/shadow-claw/","applicationCategory":"DeveloperApplication","operatingSystem":"Web, Browser, Desktop","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"author":{"@type":"Organization","name":"xt-ml","url":"https://github.com/xt-ml"},"codeRepository":"https://github.com/xt-ml/shadow-claw","license":"https://github.com/xt-ml/shadow-claw/blob/main/LICENSE"},{"@type":"WebSite","@id":"https://xt-ml.github.io/shadow-claw/#website","url":"https://xt-ml.github.io/shadow-claw/","name":"ShadowClaw","description":"Official website and live deployment of ShadowClaw multi-runtime AI assistant.","publisher":{"@type":"Organization","name":"xt-ml","url":"https://github.com/xt-ml"}},{"@type":"Organization","@id":"https://xt-ml.github.io/shadow-claw/#organization","name":"xt-ml","url":"https://github.com/xt-ml","sameAs":["https://github.com/xt-ml"]}]}</script><meta name="theme-color" content="#fff" /><meta http-equiv="origin-trial" content="A88uTgESYWcVgREKVReKB6jom41uP8TzW6ei3jNdidf+Xl6ONqKRjKNBphsxhrZmdkakLK3oXDgkGq53rtZYSAMAAAB2eyJvcmlnaW4iOiJodHRwczovL3h0LW1sLmdpdGh1Yi5pbzo0NDMiLCJmZWF0dXJlIjoiV2ViTUNQIiwiZXhwaXJ5IjoxNzk0ODczNjAwLCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><base href="/shadow-claw/" /><script id="shadow-claw-site-config" type="application/json">{"$schema":"https:\u002f\u002fjson-schema.org\u002fdraft\u002f2020-12\u002fschema","site":{"title":"ShadowClaw","description":"ShadowClaw - multi-runtime AI assistant.","themeColor":"#fff"},"branding":{"faviconPath":"assets\u002ficons\u002ffavicon.ico","appleTouchIconPath":"assets\u002ficons\u002f180.png","notFoundPath":"404.html"},"pwa":{"manifestPath":"manifest.json","themeColor":"#000000"},"sitemapPath":"sitemap.xml","assets":["assets"],"sidebar":{"pagesHidden":false,"chatHidden":false,"tasksHidden":false,"filesHidden":false,"defaultPage":"pages"},"settings":{"defaultToolsProfile":"__builtin_default"},"agent":{"defaultProvider":"transformers_js_local","defaultModel":"onnx-community\u002fgemma-3-1b-it-ONNX-GQA"},"customElements":{"allowedElements":["block-garden","block-garden-option","block-garden-select"],"allowedDomains":["kherrick.github.io","cdn.jsdelivr.net"]},"security":{"connectSrc":["'self'","blob:","data:","https:\u002f\u002fkherrick.github.io","https:\u002f\u002fcdn.jsdelivr.net"]}}</script>
|
|
2
2
|
<script>var ShadowClawThemeInit=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);function n(){if(globalThis.trustedTypes)return;let e=new Map;globalThis.trustedTypes={createPolicy:(t,n)=>{if(e.has(t))throw TypeError(`Policy with name "${t}" already exists.`);let r={createHTML:n.createHTML?e=>n.createHTML(e):void 0,createScriptURL:n.createScriptURL?e=>n.createScriptURL(e):void 0,createScript:n.createScript?e=>n.createScript(e):void 0};return e.set(t,r),r},getPolicy:t=>e.get(t)??null,isHTML:e=>typeof e==`string`||e instanceof Object&&`toString`in e,isScriptURL:e=>typeof e==`string`||e instanceof Object&&`toString`in e,isScript:e=>typeof e==`string`||e instanceof Object&&`toString`in e}}let r=`__shadowClawDefaultTrustedTypesPolicyState`,i=`default`,a=`shadowclaw-sandbox`;function o(){let e=globalThis;return e[r]||(e[r]={initialized:!1,policy:null}),e[r]}function s(){let e=o();if(e.initialized)return;let t=Reflect.get(globalThis,`trustedTypes`);if(!(!t||typeof t.createPolicy!=`function`)){e.initialized=!0;try{if(typeof t.getPolicy==`function`){let n=t.getPolicy(i);if(n){e.policy=n;return}}let n=!1;if(typeof t.getPolicyNames==`function`){let e=t.getPolicyNames();Array.isArray(e)&&e.includes(i)&&(n=!0)}if(n){if(typeof t.getPolicy==`function`){let n=t.getPolicy(a);if(n){e.policy=n;return}}e.policy=t.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e});return}e.policy=t.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch{typeof t.getPolicy==`function`&&(e.policy=t.getPolicy(i)??t.getPolicy(a)??null)}}}new class{loading=!1;models=new Map;getModelInfo(e){if(!e||typeof e!=`string`)return null;let t=e.toLowerCase().trim(),n=this.models.get(t);if(n)return n;if(t.includes(`/`)){let e=t.split(`/`).pop();if(e&&this.models.has(e))return this.models.get(e)}else for(let[e,n]of this.models.entries())if(e.endsWith(`/${t}`))return n;if(t.includes(`:`)){let e=t.split(`:`)[0],n=this.getModelInfo(e);if(n)return n}return null}registerModelInfo(e,t){this.models.set(e.toLowerCase(),t)}clear(){this.models.clear()}async fetchModelInfo(e,t,n){if(e.modelsUrl){this.loading=!0;try{let r=new Headers;if(r.set(`Content-Type`,`application/json`),e.headers)for(let[t,n]of Object.entries(e.headers))r.set(t,n);if(n)for(let[e,t]of Object.entries(n))r.set(e,t);if(t&&e.apiKeyHeader){let n=e.apiKeyHeaderFormat;r.set(e.apiKeyHeader,n?n.replace(`{key}`,t):t)}let i=await fetch(e.modelsUrl,{headers:r});if(!i.ok)throw Error(`HTTP ${i.status} ${i.statusText}`);let a=await i.json(),o=Array.isArray(a.data)?a.data:Array.isArray(a.models)?a.models:[];for(let e of o){if(!e.id)continue;let t=e.context_length??e.context_window??0,n=e.max_completion_tokens||e.per_request_limits?.completion_tokens||e.top_provider?.max_completion_tokens||null,r=typeof e.supports_tools==`boolean`?e.supports_tools:typeof e.supportsTools==`boolean`?e.supportsTools:void 0,i=this.extractModalities(e,`input`),a=this.extractModalities(e,`output`),o=this.modalitiesInclude(i,`image`,`vision`),s=this.modalitiesInclude(i,`audio`,`voice`,`hearing`),c=this.modalitiesInclude(i,`video`),l=e.id===`openrouter/free`||this.supportedParametersInclude(e,`image`,`vision`,`audio`,`tool`,`structured`),u=this.extractReasoning(e),d=typeof e.supports_prompt_caching==`boolean`?e.supports_prompt_caching:typeof e.supportsPromptCaching==`boolean`?e.supportsPromptCaching:this.supportedParametersInclude(e,`cache_control`,`prompt_caching`)?!0:void 0;!t&&Array.isArray(e.providers)&&e.providers.length>0&&(t=e.providers[0]?.context_length||0),this.registerModelInfo(e.id,{contextWindow:t,maxOutput:n,...r!==void 0&&{supportsTools:r},...i.length>0&&{inputModalities:i},...a.length>0&&{outputModalities:a},...o!==void 0&&{supportsImageInput:o},...s!==void 0&&{supportsAudioInput:s},...c!==void 0&&{supportsVideoInput:c},...u&&{reasoning:u},...l&&{routesByRequestFeatures:l},...d!==void 0&&{supportsPromptCaching:d}})}o.length>0&&console.log(`[ModelRegistry] Registered ${o.length} models for provider "${e.id}"`)}catch(t){console.error(`[ModelRegistry] Error fetching models for ${e.id}:`,t)}finally{this.loading=!1}}}extractModalities(e,t){let n=t===`input`?e.input_modalities||e.inputModalities:e.output_modalities||e.outputModalities,r=e.architecture||{},i=t===`input`?r.input_modalities||r.inputModalities:r.output_modalities||r.outputModalities,a=typeof r.modality==`string`?r.modality:``,o=this.parseArchitectureModality(a,t),s=[...this.normalizeStringArray(n),...this.normalizeStringArray(i),...o];return Array.from(new Set(s))}extractReasoning(e){let t=e?.reasoning;if(!t||typeof t!=`object`)return;let n=this.normalizeStringArray(t.supported_efforts),r=typeof t.default_effort==`string`?t.default_effort.toLowerCase():void 0,i=typeof t.default_enabled==`boolean`?t.default_enabled:void 0,a=typeof t.supports_max_tokens==`boolean`?t.supports_max_tokens:void 0,o=typeof t.mandatory==`boolean`?t.mandatory:void 0;if(!(n.length===0&&r===void 0&&i===void 0&&a===void 0&&o===void 0))return{...n.length>0&&{supportedEfforts:n},...r!==void 0&&{defaultEffort:r},...i!==void 0&&{defaultEnabled:i},...a!==void 0&&{supportsMaxTokens:a},...o!==void 0&&{mandatory:o}}}modalitiesInclude(e,...t){if(e.length!==0)return t.some(t=>e.some(e=>e.includes(t)))}normalizeStringArray(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`).map(e=>e.toLowerCase()):[]}parseArchitectureModality(e,t){if(!e)return[];let[n=``,r=``]=e.toLowerCase().split(`->`).map(e=>e.trim());return(t===`input`?n:r).split(/[+,/\s]+/).map(e=>e.trim()).filter(Boolean)}supportedParametersInclude(e,...t){let n=this.normalizeStringArray(e.supported_parameters||e.supportedParameters);return t.some(e=>n.some(t=>t.includes(e)))}};function c(e){return e.replace(/^\/+|\/+$/g,``)}function l(e){let t=c(e);return t.endsWith(`/index.html`)?t=t.slice(0,-11):t.endsWith(`index.html`)&&(t=t.slice(0,-10)),c(t)}function u(e){let t=c(e),n=t.split(`/`).filter(Boolean);if(n.length===0)return null;let r=n[0].toLowerCase();if(r===`pages`){if(n.length>=3){let e=n[1];return{page:`pages`,groupId:e===`main`?`br:main`:e.startsWith(`br-`)?`br:${e.slice(3)}`:e,path:n.slice(2).join(`/`)}}return{page:`pages`,groupId:`br:main`,path:n.slice(1).join(`/`)}}if(r===`files`){let e=n[1]||`main`;return{page:`files`,groupId:e===`main`?`br:main`:e.startsWith(`br-`)?`br:${e.slice(3)}`:e,path:n.slice(2).join(`/`)||void 0}}if(r===`chat`){let e=n[1]||`main`;return{page:`chat`,groupId:e===`main`?`br:main`:e.startsWith(`br-`)?`br:${e.slice(3)}`:e}}if(r===`tasks`){let e=n[1]||`main`;return{page:`tasks`,groupId:e===`main`?`br:main`:e.startsWith(`br-`)?`br:${e.slice(3)}`:e}}return r===`main`?{page:`pages`,groupId:`br:main`,path:n.slice(1).join(`/`)}:{page:`pages`,groupId:`br:main`,path:t}}function d(){if(typeof document<`u`){let e=document.getElementById(`shadow-claw-static-routing`);if(e&&e.textContent)try{let t=JSON.parse(e.textContent);if(t&&typeof t==`object`&&t.routes)return t}catch(e){console.warn(`Failed to parse embedded static routing manifest:`,e)}}return null}function f(e,t){let n=t||d();if(!n||!n.routes)return null;let r=l(e);if(!r)return null;for(let[e,t]of Object.entries(n.routes))if(!(!t||!t.prettyPath)&&l(t.prettyPath)===r)return u(e);return null}let p=null,ee=new Set([`chat`,`files`,`tasks`,`pages`,`settings`,`tools`,`channels`]);function m(){p=null}typeof globalThis<`u`&&(globalThis.__applyBasePathCacheReset=m);function h(){let e=typeof window<`u`?window:typeof self<`u`?self:globalThis;if(e&&e.__SHADOWCLAW_DEPLOY_ID__){let t=String(e.__SHADOWCLAW_DEPLOY_ID__).trim();if(t)return t.replace(/[^a-zA-Z0-9_-]/g,`-`)}let t=globalThis.process;if(t&&t.env&&t.env.SHADOWCLAW_DEPLOY_ID){let e=String(t.env.SHADOWCLAW_DEPLOY_ID).trim();if(e)return e.replace(/[^a-zA-Z0-9_-]/g,`-`)}let n=te();return!n||n===`/`?``:n.replace(/^\/+|\/+$/g,``).replace(/[^a-zA-Z0-9_-]/g,`-`)}function te(){if(p!==null)return p;if((typeof window>`u`||globalThis.WorkerGlobalScope!==void 0&&typeof self<`u`&&self instanceof globalThis.WorkerGlobalScope)&&typeof self<`u`&&self.location){let e=(self.location.pathname||`/`).split(`/`).filter(Boolean);if(e.length<=1)return p=`/`,p;let t=e[0].toLowerCase(),n=t===`service-worker.js`||t===`sw.js`||t===`manifest.json`||t===`sitemap.xml`||t===`favicon.ico`||t===`index.html`||t===`service-worker`||t===`assets`||t===`dist`||t===`public`;if(n&&e.length===2)return p=`/`,p;if(!n)return p=`/`+e[0]+`/`,p}let e=typeof window<`u`&&window.location?window.location:typeof self<`u`&&self.location?self.location:null;if(!e)return`/`;if(typeof document<`u`&&typeof document.querySelector==`function`){let t=document.querySelector(`base[href]`);if(t){let n=t.getAttribute(`href`);if(n)try{let t=new URL(n,e.origin).pathname;return t.endsWith(`/`)||(t+=`/`),p=t,p}catch{}}}let t=e.pathname||`/`;if(t===`/`)return p=`/`,p;let n=t.split(`/`).filter(Boolean),r=n.findIndex(e=>ee.has(e.toLowerCase()));return r>=0?r===0?(p=`/`,p):(p=`/`+n.slice(0,r).join(`/`)+`/`,p):f(t)?(p=`/`,p):n.length===1&&!t.includes(`.`)?(p=`/`+n[0]+`/`,p):(p=`/`,p)}function ne(e){let t=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return RegExp(`(^|\\s)@${t}\\b`,`i`)}ne(`ShadowClaw`);function g(){let e=h();return e?`shadowclaw-${e}`:`shadowclaw`}g();let _={github:{providerId:`github`,name:`GitHub`,aliases:[`github`,`api.github.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`,`git_remote`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`token `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://github.com/login/oauth/authorize`,tokenUrl:`https://github.com/login/oauth/access_token`,defaultScopes:[`repo`,`read:user`],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},gitlab:{providerId:`gitlab`,name:`GitLab`,aliases:[`gitlab`,`gitlab.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`,`git_remote`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`PRIVATE-TOKEN`,headerPrefix:``},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},tokenAuthByServiceType:{git_remote:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}}},oauth:{authorizeUrl:`https://gitlab.com/oauth/authorize`,tokenUrl:`https://gitlab.com/oauth/token`,defaultScopes:[`read_api`,`read_user`],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},figma:{providerId:`figma`,name:`Figma`,aliases:[`figma`,`api.figma.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`X-Figma-Token`,headerPrefix:``},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://www.figma.com/oauth`,tokenUrl:`https://api.figma.com/v1/oauth/token`,refreshUrl:`https://api.figma.com/v1/oauth/refresh`,defaultScopes:[],usePkce:!0,clientAuthMethod:`basic_header`,scopeSeparator:`space`}},notion:{providerId:`notion`,name:`Notion`,aliases:[`notion`,`api.notion.com`,`notion.so`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://api.notion.com/v1/oauth/authorize`,tokenUrl:`https://api.notion.com/v1/oauth/token`,defaultScopes:[],usePkce:!0,clientAuthMethod:`basic_header`,scopeSeparator:`space`}},microsoft_graph:{providerId:`microsoft_graph`,name:`Microsoft Graph`,aliases:[`microsoft`,`graph.microsoft.com`,`microsoft_graph`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://login.microsoftonline.com/common/oauth2/v2.0/authorize`,tokenUrl:`https://login.microsoftonline.com/common/oauth2/v2.0/token`,defaultScopes:[`openid`,`profile`,`offline_access`,`User.Read`],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},yahoo_mail:{providerId:`yahoo_mail`,name:`Yahoo Mail`,aliases:[`yahoo`,`yahoo_mail`,`mail.yahoo.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://api.login.yahoo.com/oauth2/request_auth`,tokenUrl:`https://api.login.yahoo.com/oauth2/get_token`,defaultScopes:[`mail-r`,`mail-w`],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},google:{providerId:`google`,name:`Google`,aliases:[`google`,`googleapis.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://accounts.google.com/o/oauth2/v2/auth`,tokenUrl:`https://oauth2.googleapis.com/token`,defaultScopes:[`openid`,`profile`,`email`],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},atlassian:{providerId:`atlassian`,name:`Atlassian`,aliases:[`atlassian`,`api.atlassian.com`],modes:[`oauth`,`token`,`basic`],defaultMode:`basic`,serviceTypes:[`http_api`,`git_remote`],authTypes:[`token`,`oauth`,`basic_userpass`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `},basic:{headerName:`Authorization`,headerPrefix:`Basic `}},oauth:{authorizeUrl:`https://auth.atlassian.com/authorize`,tokenUrl:`https://auth.atlassian.com/oauth/token`,defaultScopes:[],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},slack:{providerId:`slack`,name:`Slack`,aliases:[`slack`,`slack.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://slack.com/oauth/v2/authorize`,tokenUrl:`https://slack.com/api/oauth.v2.access`,defaultScopes:[],usePkce:!1,clientAuthMethod:`request_body`,scopeSeparator:`comma`}},linear:{providerId:`linear`,name:`Linear`,aliases:[`linear`,`api.linear.app`,`linear.app`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`],authTypes:[`token`,`oauth`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://linear.app/oauth/authorize`,tokenUrl:`https://api.linear.app/oauth/token`,defaultScopes:[],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}},azure_devops:{providerId:`azure_devops`,name:`Azure DevOps`,aliases:[`azure_devops`,`dev.azure.com`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`http_api`,`git_remote`],authTypes:[`token`,`oauth`,`basic_userpass`,`ssh_key`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},tokenAuthByServiceType:{git_remote:{token:{headerName:`Authorization`,headerPrefix:`Basic `},oauth:{headerName:`Authorization`,headerPrefix:`Basic `}}},oauth:{authorizeUrl:`https://app.vssps.visualstudio.com/oauth2/authorize`,tokenUrl:`https://app.vssps.visualstudio.com/oauth2/token`,defaultScopes:[`vso.code`,`vso.profile`,`offline_access`],usePkce:!1,clientAuthMethod:`request_body`,scopeSeparator:`space`}},custom_mcp:{providerId:`custom_mcp`,name:`Custom MCP`,aliases:[`custom_mcp`],modes:[`oauth`,`token`],defaultMode:`oauth`,serviceTypes:[`mcp_remote`,`webmcp_local`],authTypes:[`none`,`token`,`oauth`,`custom_header`,`ssh_key`],tokenAuth:{token:{headerName:`Authorization`,headerPrefix:`Bearer `},oauth:{headerName:`Authorization`,headerPrefix:`Bearer `}},oauth:{authorizeUrl:`https://example.com/oauth/authorize`,tokenUrl:`https://example.com/oauth/token`,defaultScopes:[],usePkce:!0,clientAuthMethod:`request_body`,scopeSeparator:`space`}}};Object.fromEntries(Object.values(_).filter(e=>!!e.oauth).map(e=>{let t=e.oauth;return[e.providerId,{id:e.providerId,name:e.name,authorizeUrl:t.authorizeUrl,tokenUrl:t.tokenUrl,redirectUri:t.redirectUri,defaultScopes:t.defaultScopes,usePkce:t.usePkce,clientAuthMethod:t.clientAuthMethod,scopeSeparator:t.scopeSeparator}]})),Object.fromEntries(Object.values(_).map(e=>[e.providerId,{providerId:e.providerId,modes:e.modes,defaultMode:e.defaultMode}])),new Promise(e=>{});
|
|
3
3
|
/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */
|
|
4
4
|
function v(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y(e){if(Array.isArray(e))return e}function b(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function re(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
@@ -29,6 +29,6 @@ metadata:
|
|
|
29
29
|
|
|
30
30
|
<Overview and description of what the skill does, parameters, and usage instructions.>
|
|
31
31
|
</code></pre> </li><li><p><strong>Declarative Tool Format</strong>: JSON with <code>"name"</code>, <code>"description"</code>, <code>"executor": "javascript"</code>, <code>"inputSchema"</code>, and <code>"code"</code>.</p></li><li><p><strong>Authoring</strong>: Use <code>create_directory</code> before writing new directories, then <code>write_file</code>.</p></li></ul></div></div></article><button type="button" class="pages__nav-btn pages__nav-btn--next" data-pages-next aria-label="Next page" hidden disabled><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="m9 18 6-6-6-6"/></svg></button></div></section></template></shadow-claw-pages></div><div class="page" data-page-id="settings"></div><div class="page" data-page-id="tools"></div><div class="page" data-page-id="channels"></div><div class="chat-split-resize-handle" title="Drag to resize chat panel" hidden></div><shadow-claw-toast></shadow-claw-toast></main></div><shadow-claw-dialog dialog-class="app-dialog" dialog-aria-labelledby="appDialogTitle"><template><form method="dialog" class="app-confirm-dialog__form"><h2 id="appDialogTitle" class="app-dialog__title">Confirm</h2><p class="app-dialog__message"></p><ul class="app-dialog__details" hidden></ul><div class="app-dialog__links" hidden></div><p class="app-dialog__countdown" hidden role="status" aria-live="polite" aria-atomic="true"></p><div class="app-confirm-dialog__actions"><button type="submit" value="cancel" class="app-dialog__btn app-dialog__btn--cancel"> Cancel </button><button type="submit" value="confirm" class="app-dialog__btn app-dialog__btn--confirm"> Confirm </button></div></form></template></shadow-claw-dialog><shadow-claw-dialog dialog-class="app-dialog app-prompt-dialog" dialog-aria-labelledby="appPromptTitle"><template><form method="dialog" class="app-prompt-dialog__form"><h2 id="appPromptTitle" class="app-prompt-dialog__title"> Agent Question </h2><p class="app-prompt-dialog__message"></p><div class="app-prompt-dialog__input-area"></div><div class="app-prompt-dialog__actions"><button type="submit" value="submit" class="app-dialog__btn app-dialog__btn--confirm app-prompt-dialog__submit"> Submit </button></div></form></template></shadow-claw-dialog></div></template>
|
|
32
|
-
<a aria-label="ShadowClaw" class="header-title-link" href="https://xt-ml.github.io/shadow-claw/" slot="header-title-link"> <svg xmlns="http://www.w3.org/2000/svg" class="header-title-logo" viewBox="0 0 128 128"><rect width="128" height="128" fill="var(--shadow-claw-icon-bg)" rx="16"/><ellipse cx="64" cy="108" fill="var(--shadow-claw-icon-body)" rx="18" ry="12"/><ellipse cx="52" cy="112" fill="var(--shadow-claw-icon-accent-dark)" rx="8" ry="10"/><ellipse cx="76" cy="112" fill="var(--shadow-claw-icon-accent-dark)" rx="8" ry="10"/><ellipse cx="64" cy="92" fill="var(--shadow-claw-icon-body-segment)" rx="14" ry="8"/><ellipse cx="64" cy="82" fill="var(--shadow-claw-icon-body)" rx="12" ry="7"/><ellipse cx="64" cy="74" fill="var(--shadow-claw-icon-body-segment)" rx="10" ry="6"/><ellipse cx="64" cy="58" fill="var(--shadow-claw-icon-body)" rx="20" ry="18"/><ellipse cx="64" cy="50" fill="var(--shadow-claw-icon-body-segment)" rx="16" ry="10"/><rect width="18" height="8" x="28" y="45" fill="var(--shadow-claw-icon-body)" rx="4" transform="rotate(-20 37 49)"/><ellipse cx="20" cy="38" fill="var(--shadow-claw-icon-claw-main)" rx="14" ry="10"/><ellipse cx="16" cy="36" fill="var(--shadow-claw-icon-claw-inner)" rx="10" ry="7"/><ellipse cx="12" cy="34" fill="var(--shadow-claw-icon-accent-dark)" rx="5" ry="4"/><rect width="18" height="8" x="82" y="45" fill="var(--shadow-claw-icon-body)" rx="4" transform="rotate(20 91 49)"/><ellipse cx="108" cy="38" fill="var(--shadow-claw-icon-claw-main)" rx="14" ry="10"/><ellipse cx="112" cy="36" fill="var(--shadow-claw-icon-claw-inner)" rx="10" ry="7"/><ellipse cx="116" cy="34" fill="var(--shadow-claw-icon-accent-dark)" rx="5" ry="4"/><rect width="12" height="4" x="38" y="62" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-30 44 64)"/><rect width="14" height="4" x="36" y="68" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-25 43 70)"/><rect width="12" height="4" x="38" y="74" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-20 44 76)"/><rect width="12" height="4" x="78" y="62" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(30 84 64)"/><rect width="14" height="4" x="78" y="68" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(25 85 70)"/><rect width="12" height="4" x="78" y="74" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(20 84 76)"/><ellipse cx="64" cy="38" fill="var(--shadow-claw-icon-body)" rx="14" ry="12"/><circle cx="56" cy="34" r="5" fill="var(--shadow-claw-icon-eye)"/><circle cx="72" cy="34" r="5" fill="var(--shadow-claw-icon-eye)"/><circle cx="56" cy="33" r="2" fill="var(--shadow-claw-icon-eye-shine)"/><circle cx="72" cy="33" r="2" fill="var(--shadow-claw-icon-eye-shine)"/><path fill="none" stroke="var(--shadow-claw-icon-accent-dark)" stroke-linecap="round" stroke-width="2" d="M60 42q4 4 8 0"/><path fill="none" stroke="var(--shadow-claw-icon-accent-dark)" stroke-linecap="round" stroke-width="3" d="M58 26Q50 14 42 8m28 18q8-12 16-18"/><path fill="none" stroke="var(--shadow-claw-icon-body)" stroke-linecap="round" stroke-width="2" d="M60 24q-6-8-10-14m18 14q6-8 10-14"/><ellipse cx="60" cy="55" fill="var(--shadow-claw-icon-body-shine)" opacity=".4" rx="6" ry="8"/></svg> <h1 class="header-title">ShadowClaw</h1> </a> <a aria-label="Shadow Claw Project on GitHub" class="header-actions-logo-link" href="https://github.com/xt-ml/shadow-claw" slot="header-actions-logo"> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" viewBox="0 0 496 512"><path fill="var(--shadow-claw-bg-primary-reverse, currentColor)" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8"/></svg> </a> <noscript> <div style="line-height:1.6;margin:0 auto;max-width:50rem;padding:2rem"> <h2>
|
|
32
|
+
<a aria-label="ShadowClaw" class="header-title-link" href="https://xt-ml.github.io/shadow-claw/" slot="header-title-link"> <svg xmlns="http://www.w3.org/2000/svg" class="header-title-logo" viewBox="0 0 128 128"><rect width="128" height="128" fill="var(--shadow-claw-icon-bg)" rx="16"/><ellipse cx="64" cy="108" fill="var(--shadow-claw-icon-body)" rx="18" ry="12"/><ellipse cx="52" cy="112" fill="var(--shadow-claw-icon-accent-dark)" rx="8" ry="10"/><ellipse cx="76" cy="112" fill="var(--shadow-claw-icon-accent-dark)" rx="8" ry="10"/><ellipse cx="64" cy="92" fill="var(--shadow-claw-icon-body-segment)" rx="14" ry="8"/><ellipse cx="64" cy="82" fill="var(--shadow-claw-icon-body)" rx="12" ry="7"/><ellipse cx="64" cy="74" fill="var(--shadow-claw-icon-body-segment)" rx="10" ry="6"/><ellipse cx="64" cy="58" fill="var(--shadow-claw-icon-body)" rx="20" ry="18"/><ellipse cx="64" cy="50" fill="var(--shadow-claw-icon-body-segment)" rx="16" ry="10"/><rect width="18" height="8" x="28" y="45" fill="var(--shadow-claw-icon-body)" rx="4" transform="rotate(-20 37 49)"/><ellipse cx="20" cy="38" fill="var(--shadow-claw-icon-claw-main)" rx="14" ry="10"/><ellipse cx="16" cy="36" fill="var(--shadow-claw-icon-claw-inner)" rx="10" ry="7"/><ellipse cx="12" cy="34" fill="var(--shadow-claw-icon-accent-dark)" rx="5" ry="4"/><rect width="18" height="8" x="82" y="45" fill="var(--shadow-claw-icon-body)" rx="4" transform="rotate(20 91 49)"/><ellipse cx="108" cy="38" fill="var(--shadow-claw-icon-claw-main)" rx="14" ry="10"/><ellipse cx="112" cy="36" fill="var(--shadow-claw-icon-claw-inner)" rx="10" ry="7"/><ellipse cx="116" cy="34" fill="var(--shadow-claw-icon-accent-dark)" rx="5" ry="4"/><rect width="12" height="4" x="38" y="62" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-30 44 64)"/><rect width="14" height="4" x="36" y="68" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-25 43 70)"/><rect width="12" height="4" x="38" y="74" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(-20 44 76)"/><rect width="12" height="4" x="78" y="62" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(30 84 64)"/><rect width="14" height="4" x="78" y="68" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(25 85 70)"/><rect width="12" height="4" x="78" y="74" fill="var(--shadow-claw-icon-accent-dark)" rx="2" transform="rotate(20 84 76)"/><ellipse cx="64" cy="38" fill="var(--shadow-claw-icon-body)" rx="14" ry="12"/><circle cx="56" cy="34" r="5" fill="var(--shadow-claw-icon-eye)"/><circle cx="72" cy="34" r="5" fill="var(--shadow-claw-icon-eye)"/><circle cx="56" cy="33" r="2" fill="var(--shadow-claw-icon-eye-shine)"/><circle cx="72" cy="33" r="2" fill="var(--shadow-claw-icon-eye-shine)"/><path fill="none" stroke="var(--shadow-claw-icon-accent-dark)" stroke-linecap="round" stroke-width="2" d="M60 42q4 4 8 0"/><path fill="none" stroke="var(--shadow-claw-icon-accent-dark)" stroke-linecap="round" stroke-width="3" d="M58 26Q50 14 42 8m28 18q8-12 16-18"/><path fill="none" stroke="var(--shadow-claw-icon-body)" stroke-linecap="round" stroke-width="2" d="M60 24q-6-8-10-14m18 14q6-8 10-14"/><ellipse cx="60" cy="55" fill="var(--shadow-claw-icon-body-shine)" opacity=".4" rx="6" ry="8"/></svg> <h1 class="header-title">ShadowClaw</h1> </a> <a aria-label="Shadow Claw Project on GitHub" class="header-actions-logo-link" href="https://github.com/xt-ml/shadow-claw" slot="header-actions-logo"> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" viewBox="0 0 496 512"><path fill="var(--shadow-claw-bg-primary-reverse, currentColor)" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8"/></svg> </a> <noscript> <div style="line-height:1.6;margin:0 auto;max-width:50rem;padding:2rem"> <h2>Multi-Runtime AI Assistant</h2> <p> ShadowClaw is an open-source, multi-runtime AI assistant designed for autonomous orchestration, client-side tool execution, and private local storage via Origin Private File System (OPFS) and IndexedDB. </p> <h3>Agent & Developer Resources</h3> <ul> <li><a href="llms.txt">llms.txt (Agent Context & Guidance)</a></li> <li> <a href=".well-known/mcp.json">MCP Server Card (SEP-2127)</a> </li> <li> <a href=".well-known/ai-catalog.json">AI Catalog Discovery</a> </li> <li> <a href=".well-known/mcp/servers.json">MCP Servers Manifest</a> </li> <li><a href="sitemap.xml">XML Sitemap</a></li> <li> <a href="https://github.com/xt-ml/shadow-claw">GitHub Repository</a> </li> </ul> </div> </noscript>
|
|
33
33
|
</shadow-claw> <script type="module" src="index.js"></script> <script type="module">try{self[`workbox:window:7.4.0`]&&_()}catch{}function e(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))}function t(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e,n){var r=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,n){if(e){if(typeof e==`string`)return t(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n){r&&(e=r);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
34
34
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function a(e){var t=function(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e,`string`);return typeof t==`symbol`?t:t+``}try{self[`workbox:core:7.4.0`]&&_()}catch{}var o=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))};function s(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var c=function(e,t){this.type=e,Object.assign(this,t)};function l(e,t,n){return e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e}function u(){}var d={type:`SKIP_WAITING`};function f(e,t){return e&&e.then?e.then(u):Promise.resolve()}var p=function(t){function r(e,n){var r,i;return n===void 0&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new o,r.en=new o,r.on=new o,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!s(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener(`updatefound`,r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener(`statechange`,r.ln)},r.ln=function(e){var t=r.fn,n=e.target,i=n.state,a=n===r.vn,o={sw:n,isExternal:a,originalEvent:e};!a&&r.mn&&(o.isUpdate=!0),r.dispatchEvent(new c(i,o)),i===`installed`?r.wn=self.setTimeout((function(){i===`installed`&&t.waiting===n&&r.dispatchEvent(new c(`waiting`,o))}),200):i===`activating`&&(clearTimeout(r.wn),a||r.en.resolve(n))},r.yn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new c(`controlling`,{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(i=function(e){var t=e.data,n=e.ports,i=e.source;return l(r.getSW(),(function(){r.an.has(i)&&r.dispatchEvent(new c(`message`,{data:t,originalEvent:e,ports:n,sw:i}))}))},function(){var e=[...arguments];try{return Promise.resolve(i.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=e,r.nn=n,navigator.serviceWorker.addEventListener(`message`,r.gn),r}var a,u=t;(a=r).prototype=Object.create(u.prototype),a.prototype.constructor=a,i(a,u);var p=r.prototype;return p.register=function(e){var t=(e===void 0?{}:e).immediate,n=t!==void 0&&t;try{var r=this;return l(function(e,t){var n=e();return n&&n.then?n.then(t):t(n)}((function(){if(!n&&document.readyState!==`complete`)return f(new Promise((function(e){return window.addEventListener(`load`,e)})))}),(function(){return r.mn=!!navigator.serviceWorker.controller,r.dn=r.pn(),l(r.bn(),(function(e){r.fn=e,r.dn&&(r.hn=r.dn,r.en.resolve(r.dn),r.on.resolve(r.dn),r.dn.addEventListener(`statechange`,r.ln,{once:!0}));var t=r.fn.waiting;return t&&s(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new c(`waiting`,{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener(`updatefound`,r.cn),navigator.serviceWorker.addEventListener(`controllerchange`,r.yn),r.fn}))})))}catch(e){return Promise.reject(e)}},p.update=function(){try{return this.fn?l(f(this.fn.update())):l()}catch(e){return Promise.reject(e)}},p.getSW=function(){return this.hn===void 0?this.rn.promise:Promise.resolve(this.hn)},p.messageSW=function(t){try{return l(this.getSW(),(function(n){return e(n,t)}))}catch(e){return Promise.reject(e)}},p.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&e(this.fn.waiting,d)},p.pn=function(){var e=navigator.serviceWorker.controller;return e&&s(e.scriptURL,this.sn.toString())?e:void 0},p.bn=function(){try{var e=this;return l(function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return l(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}),(function(e){throw e})))}catch(e){return Promise.reject(e)}},n(r,[{key:`active`,get:function(){return this.en.promise}},{key:`controlling`,get:function(){return this.on.promise}}])}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.jn(e).add(t)},t.removeEventListener=function(e,t){this.jn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=r(this.jn(e.type));!(t=n()).done;)(0,t.value)(e)},t.jn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());const m=`__shadowClawDefaultTrustedTypesPolicyState`,h=`default`,g=`shadowclaw-sandbox`;function v(){let e=globalThis;return e[m]||(e[m]={initialized:!1,policy:null}),e[m]}function y(){let e=v();if(e.initialized)return;let t=Reflect.get(globalThis,`trustedTypes`);if(!(!t||typeof t.createPolicy!=`function`)){e.initialized=!0;try{if(typeof t.getPolicy==`function`){let n=t.getPolicy(h);if(n){e.policy=n;return}}let n=!1;if(typeof t.getPolicyNames==`function`){let e=t.getPolicyNames();Array.isArray(e)&&e.includes(h)&&(n=!0)}if(n){if(typeof t.getPolicy==`function`){let n=t.getPolicy(g);if(n){e.policy=n;return}}e.policy=t.createPolicy(g,{createHTML:e=>e,createScriptURL:e=>e});return}e.policy=t.createPolicy(h,{createHTML:e=>e,createScriptURL:e=>e})}catch{typeof t.getPolicy==`function`&&(e.policy=t.getPolicy(h)??t.getPolicy(g)??null)}}}function b(e){y();let t=v().policy;return!t||typeof t.createScriptURL!=`function`?e:t.createScriptURL(e)}const x=`shadowclaw-oac-reload-attempted`,S=`shadowclaw-sw-update-intent`,C=3e4,w=`shadowclaw-sw-update-failure`;let T=!1,E=null;async function D(e=5e3){let t=Date.now();for(;Date.now()-t<e;){let e=document.querySelector(`shadow-claw`);if(e&&typeof e.requestDialog==`function`)return e;await new Promise(e=>{globalThis.setTimeout(e,50)})}return null}async function O(){let e=await D();return e?.requestDialog?await e.requestDialog({title:`Update Available`,message:`A new version of ShadowClaw is ready. Reload now to apply the update?`,confirmLabel:`Reload now`,cancelLabel:`Later`}):!1}async function k(){let e=await D();e?.requestDialog&&await e.requestDialog({title:`Update Failed`,message:`The app update failed to install automatically. Please try restarting your browser to complete the update.`,confirmLabel:`OK`}),console.warn(`[ShadowClaw] Service worker update failed. Please restart your browser to complete the update.`)}function A(){try{let e=globalThis.sessionStorage?.getItem(S);if(!e)return null;let t=JSON.parse(e);return typeof t.startedAt!=`number`||typeof t.fallbackReloadAttempts!=`number`?null:{startedAt:t.startedAt,fallbackReloadAttempts:t.fallbackReloadAttempts}}catch{return null}}function j(e){try{globalThis.sessionStorage?.setItem(S,JSON.stringify(e))}catch{}}function M(){try{globalThis.sessionStorage?.removeItem(S)}catch{}}function N(){let e=A();return e?Date.now()-e.startedAt<=C?!0:(M(),!1):!1}function P(){L(),j({startedAt:Date.now(),fallbackReloadAttempts:0})}function F(){try{let e=globalThis.sessionStorage?.getItem(w);if(!e)return null;let t=JSON.parse(e);return typeof t.failedAt==`number`?{failedAt:t.failedAt}:null}catch{return null}}function I(e){try{globalThis.sessionStorage?.setItem(w,JSON.stringify(e))}catch{}}function L(){try{globalThis.sessionStorage?.removeItem(w)}catch{}}function R(){let e=F();return e?Date.now()-e.failedAt<=3e5?!0:(L(),!1):!1}function z(){M(),I({failedAt:Date.now()})}function B(){if(T)return;T=!0,E!==null&&(globalThis.clearTimeout(E),E=null);let e=globalThis.location;typeof e?.reload==`function`&&e.reload()}async function V(){if(T||E!==null)return;let e=A();if(e){if(Date.now()-e.startedAt>C){M();return}if(e.fallbackReloadAttempts>=2){z(),await k();return}j({...e,fallbackReloadAttempts:e.fallbackReloadAttempts+1}),E=globalThis.setTimeout(()=>{B()},3e3)}}async function H(e){e.messageSkipWaiting(),await V()}function U(){return N()}function W(){if(globalThis.originAgentCluster!==!1)return!1;let e=globalThis.location?.protocol;if(e!==`http:`&&e!==`https:`)return!1;try{return!globalThis.sessionStorage?.getItem(x)}catch{return!1}}function G(){try{globalThis.sessionStorage?.setItem(x,`1`)}catch{return}B()}function K(){let e=U();if(M(),L(),e){B();return}W()&&G()}try{if(typeof navigator<`u`&&`serviceWorker`in navigator&&navigator.serviceWorker){y();let e=new p(b(`service-worker.js`));e.addEventListener(`waiting`,async()=>{if(!R()){if(N()){await H(e);return}await O()&&(P(),await H(e))}}),e.addEventListener(`controlling`,()=>{K()}),navigator.serviceWorker.addEventListener(`controllerchange`,()=>{K()});let t=()=>{globalThis.setTimeout(()=>{e.register()},1e4)};document.readyState===`complete`?t():globalThis.addEventListener(`load`,t)}}catch{}export{B as reloadCurrentPage,U as shouldReloadAfterControllerChange,W as shouldReloadForOriginAgentCluster};</script> </body></html>
|