@cmdoss/agent-pass-plugin 0.1.2-dev.19.1 → 0.1.2-dev.21.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.
@@ -1 +1 @@
1
- var l="Agent Pass Plugin";var d=Object.freeze({decimals:3}),h=Object.freeze({leading:3,trailing:3,ellipsis:"\u2026",addressPrefix:"0x"}),w=Object.freeze({codex:"Codex",claude:"Claude Code",fallback:"your agent"});function u(n,o=d.decimals){return new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:Math.min(o,d.decimals)}).format(Number(n)||0)}function c(n){let o=String(n??""),{leading:i,trailing:r,ellipsis:e,addressPrefix:t}=h,a=o.startsWith(t)?t:"",s=o.slice(a.length);return s.length>i+r+e.length?`${a}${s.slice(0,i)}${e}${s.slice(-r)}`:o||"\u2014"}var y="https://agent-pass-plugin.commandoss.com",f=new WeakMap;function v(){for(let n of document.querySelectorAll("aside .panel > h2")){if(n.textContent.trim()!=="Held by the pass")continue;let o=n.parentElement;if(o.classList.add("sdk-split-cards"),n.classList.add("sdk-held-title"),f.has(o))continue;let i=()=>{let e=n.getBoundingClientRect().top-o.getBoundingClientRect().top-24;o.style.setProperty("--held-card-start",`${e}px`),o.style.setProperty("--balance-card-end",`${e-24}px`)},r=new ResizeObserver(i);r.observe(o),r.observe(n),f.set(o,r),i()}}function g(){document.documentElement.dataset.sdkPage=location.hash.startsWith("#/authorize/")?"authorization":"pass",document.title=`${l} \xB7 Agent Pass`;let n=document.querySelector("main > header");if(n&&!n.dataset.pluginTheme){n.dataset.pluginTheme="true",n.classList.add("app-header");let e=n.querySelector(".brand");e&&(e.textContent=l,e.classList.add("wordmark"),e.href=`${y}/#home`);let t=n.querySelector(".nav");t&&(t.className="sdk-subnav",n.after(t))}if(v(),document.querySelectorAll("p.fine").forEach(e=>{e.textContent.startsWith("Deletes the pass, its policies, its receipt and any remaining allowances,")&&e.classList.add("sdk-omit")}),document.querySelectorAll("button, a.primary, a.revoke").forEach(e=>{if(e.classList.add("button"),(e.classList.contains("primary")||e.classList.contains("revoke"))&&!e.querySelector(".action-arrow")){let t=document.createElement("span");t.className="action-arrow",t.setAttribute("aria-hidden","true"),t.textContent="\u2197",e.append(t)}}),document.querySelectorAll('a[href*="/object/"], a[href*="/tx/"], a[href*="/account/"], a[href*="#/owner/"]').forEach(e=>{let t=e.getAttribute("href").match(/(?:object|tx|owner|account)\/([^/?#]+)/);if(!t||e.dataset.pluginShort)return;let a=decodeURIComponent(t[1]);e.title=a,e.textContent=e.textContent.startsWith("Owner ")?`Owner ${c(a)}`:c(a),e.dataset.pluginShort="true"}),location.hash.startsWith("#/authorize/")){let e=document.querySelector(".hero h1");e&&e.textContent!=="Authorize plan"&&(e.textContent="Authorize plan")}let o=location.hash.match(/^#\/pass\/(0x[a-f\d]+)/i)?.[1],i=document.querySelector(".hero h1");o&&i&&!i.dataset.pluginTitle&&(i.title=i.textContent,i.textContent=`Agent Pass ${c(o)}`,i.dataset.pluginTitle="true");let r=document.querySelector(".crumbs");if(o&&r){let e=r.lastChild,t=`Agent Pass ${c(o)}`;e?.nodeType===Node.TEXT_NODE&&e.textContent!==t&&(e.textContent=t)}document.querySelectorAll(".attempt strong, .attempt .moved").forEach(e=>{for(let t of e.childNodes){if(t.nodeType!==Node.TEXT_NODE)continue;let a=t.textContent.replace(/0x([a-f\d]{3})[a-f\d]*…[a-f\d]*([a-f\d]{3})/gi,"0x$1\u2026$2").replace(/\b(\d+\.\d{4,})\b/g,s=>u(s));a!==t.textContent&&(e.title||=t.textContent,t.textContent=a)}}),document.querySelectorAll(".balance").forEach(e=>{for(let t of e.childNodes){if(t.nodeType!==Node.TEXT_NODE)continue;let a=t.textContent.trim();if(!/^\d+(\.\d+)?$/.test(a))continue;let s=u(a);a!==s&&(e.title=a,t.textContent=`${s} `)}})}var N=new MutationObserver(g);N.observe(document.body,{childList:!0,subtree:!0});g();var S=await fetch("/plugin/styles/sdk-wallet.css").then(n=>n.text()),m=new WeakSet;function p(n){if(n.host?.tagName==="CONNECTED-ACCOUNT-MENU"){let o=n.host.connection?.account?.address,i=n.querySelector(".trigger-content");if(o&&i){for(let r of i.childNodes)r.nodeType===Node.TEXT_NODE&&r.textContent.trim()&&r.textContent!==c(o)&&(r.textContent=c(o));i.title=o}}for(let o of n.querySelectorAll("*")){let i=o.shadowRoot;if(i){if(!m.has(i)){m.add(i);let r=document.createElement("style");r.textContent=S,i.append(r),new MutationObserver(()=>p(i)).observe(i,{childList:!0,subtree:!0})}p(i)}}}function b(){for(let n of document.querySelectorAll("mysten-dapp-kit-connect-button"))p(n.parentElement)}new MutationObserver(b).observe(document.body,{childList:!0,subtree:!0});b();
1
+ var l="Agent Pass Plugin";var d="Stop the agent now",u="Close the pass",y=`Open the Agent Pass page, choose "${d}" (revokes the agent key and deletes its allowances; the pass stays) or "${u}" (does the same and also returns everything the pass holds to the owner wallet), then approve in the owner wallet. Only the owner presses these buttons; the agent never does.`;var p=Object.freeze({decimals:3}),m=Object.freeze({leading:3,trailing:3,ellipsis:"\u2026",addressPrefix:"0x"}),N=Object.freeze({codex:"Codex",claude:"Claude Code",fallback:"your agent"});function h(n,o=p.decimals){return new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:Math.min(o,p.decimals)}).format(Number(n)||0)}function c(n){let o=String(n??""),{leading:r,trailing:i,ellipsis:e,addressPrefix:t}=m,s=o.startsWith(t)?t:"",a=o.slice(s.length);return a.length>r+i+e.length?`${s}${a.slice(0,r)}${e}${a.slice(-i)}`:o||"\u2014"}var O="https://agent-pass-plugin.commandoss.com",g=new WeakMap;function S(){for(let n of document.querySelectorAll("aside .panel > h2")){if(n.textContent.trim()!=="Held by the pass")continue;let o=n.parentElement;if(o.classList.add("sdk-split-cards"),n.classList.add("sdk-held-title"),g.has(o))continue;let r=()=>{let e=n.getBoundingClientRect().top-o.getBoundingClientRect().top-24;o.style.setProperty("--held-card-start",`${e}px`),o.style.setProperty("--balance-card-end",`${e-24}px`)},i=new ResizeObserver(r);i.observe(o),i.observe(n),g.set(o,i),r()}}function b(){document.documentElement.dataset.sdkPage=location.hash.startsWith("#/authorize/")?"authorization":"pass",document.title=`${l} \xB7 Agent Pass`;let n=document.querySelector("main > header");if(n&&!n.dataset.pluginTheme){n.dataset.pluginTheme="true",n.classList.add("app-header");let e=n.querySelector(".brand");e&&(e.textContent=l,e.classList.add("wordmark"),e.href=`${O}/#home`);let t=n.querySelector(".nav");t&&(t.className="sdk-subnav",n.after(t))}if(S(),document.querySelectorAll("p.fine").forEach(e=>{e.textContent.startsWith("Deletes the pass, its policies, its receipt and any remaining allowances,")&&e.classList.add("sdk-omit")}),document.querySelectorAll("button, a.primary, a.revoke").forEach(e=>{if(e.classList.add("button"),(e.classList.contains("primary")||e.classList.contains("revoke"))&&!e.querySelector(".action-arrow")){let t=document.createElement("span");t.className="action-arrow",t.setAttribute("aria-hidden","true"),t.textContent="\u2197",e.append(t)}}),document.querySelectorAll('a[href*="/object/"], a[href*="/tx/"], a[href*="/account/"], a[href*="#/owner/"]').forEach(e=>{let t=e.getAttribute("href").match(/(?:object|tx|owner|account)\/([^/?#]+)/);if(!t||e.dataset.pluginShort)return;let s=decodeURIComponent(t[1]);e.title=s,e.textContent=e.textContent.startsWith("Owner ")?`Owner ${c(s)}`:c(s),e.dataset.pluginShort="true"}),location.hash.startsWith("#/authorize/")){let e=document.querySelector(".hero h1");e&&e.textContent!=="Authorize plan"&&(e.textContent="Authorize plan")}let o=location.hash.match(/^#\/pass\/(0x[a-f\d]+)/i)?.[1],r=document.querySelector(".hero h1");o&&r&&!r.dataset.pluginTitle&&(r.title=r.textContent,r.textContent=`Agent Pass ${c(o)}`,r.dataset.pluginTitle="true");let i=document.querySelector(".crumbs");if(o&&i){let e=i.lastChild,t=`Agent Pass ${c(o)}`;e?.nodeType===Node.TEXT_NODE&&e.textContent!==t&&(e.textContent=t)}document.querySelectorAll(".attempt strong, .attempt .moved").forEach(e=>{for(let t of e.childNodes){if(t.nodeType!==Node.TEXT_NODE)continue;let s=t.textContent.replace(/0x([a-f\d]{3})[a-f\d]*…[a-f\d]*([a-f\d]{3})/gi,"0x$1\u2026$2").replace(/\b(\d+\.\d{4,})\b/g,a=>h(a));s!==t.textContent&&(e.title||=t.textContent,t.textContent=s)}}),document.querySelectorAll(".balance").forEach(e=>{for(let t of e.childNodes){if(t.nodeType!==Node.TEXT_NODE)continue;let s=t.textContent.trim();if(!/^\d+(\.\d+)?$/.test(s))continue;let a=h(s);s!==a&&(e.title=s,t.textContent=`${a} `)}})}var v=new MutationObserver(b);v.observe(document.body,{childList:!0,subtree:!0});b();var A=await fetch("/plugin/styles/sdk-wallet.css").then(n=>n.text()),x=new WeakSet;function f(n){if(n.host?.tagName==="CONNECTED-ACCOUNT-MENU"){let o=n.host.connection?.account?.address,r=n.querySelector(".trigger-content");if(o&&r){for(let i of r.childNodes)i.nodeType===Node.TEXT_NODE&&i.textContent.trim()&&i.textContent!==c(o)&&(i.textContent=c(o));r.title=o}}for(let o of n.querySelectorAll("*")){let r=o.shadowRoot;if(r){if(!x.has(r)){x.add(r);let i=document.createElement("style");i.textContent=A,r.append(i),new MutationObserver(()=>f(r)).observe(r,{childList:!0,subtree:!0})}f(r)}}}function w(){for(let n of document.querySelectorAll("mysten-dapp-kit-connect-button"))f(n.parentElement)}new MutationObserver(w).observe(document.body,{childList:!0,subtree:!0});w();
@@ -63,7 +63,7 @@ Use `list_plans` and `list_transactions({planId?})`. Report actual digests and c
63
63
 
64
64
  `pause_plan` prevents new local execution; `resume_plan` requires explicit user intent and rechecks the same bound plan. `stop_plan` ends local scheduling. These operations do not liquidate holdings or revoke an onchain pass.
65
65
 
66
- `revoke_plan` first blocks new local submissions and returns the official owner review URL. The owner must sign revocation. While status is `revoking`, do not claim it is revoked or offer Start/resume. Report confirmed onchain revocation only after fresh verified state. Transactions submitted before pause/stop/revocation still need reconciliation.
66
+ `revoke_plan` first blocks new local submissions and returns the official Agent Pass page URL with `revocationSteps`. That page has no "Revoke" button, so name the exact buttons: open the pass page, choose **Stop the agent now** (revokes the agent key and deletes its allowances; the pass stays) or **Close the pass** (same, and also returns everything the pass holds to the owner wallet), then approve in the wallet. The owner must sign; never press either button yourself. Once confirmed, the `revoked` history entry carries the owner's revocation digest when it could be verified from chain; if it is absent, say the digest was not recorded rather than inventing one. While status is `revoking`, do not claim it is revoked or offer Start/resume. Report confirmed onchain revocation only after fresh verified state. Transactions submitted before pause/stop/revocation still need reconciliation.
67
67
 
68
68
  The computer/runtime must remain online. Browser/chat closure and Logout do not stop jobs or revoke a pass. If the user's intent is to stop trading, perform the appropriate local control within their authorization and explain the remaining owner-signature step for onchain revoke.
69
69